From 87ae18e3019ca7b59d3f1448db618bb3094ed3f8 Mon Sep 17 00:00:00 2001 From: ajlake Date: Thu, 25 Oct 2018 15:04:39 -0700 Subject: [PATCH] Bulldozer 1.0 Github App rewrite (#50) Bulldozer 1.0 Github App rewrite --- .circleci/config.yml | 212 +- .gitattributes | 1 - .gitignore | 12 +- Dockerfile | 11 - Gopkg.lock | 370 +- Gopkg.toml | 83 +- LICENSE | 2 +- README.md | 168 +- auth/auth.go | 89 - bulldozer/config_fetcher.go | 221 + .../context.go => bulldozer/config_v0.go | 31 +- bulldozer/config_v1.go | 68 + bulldozer/evaluate.go | 202 + bulldozer/evaluate_test.go | 336 + bulldozer/merge.go | 197 + bulldozer/update.go | 113 + client/package.json | 29 - client/src/favicons/android-icon-144x144.png | Bin 15534 -> 0 bytes client/src/favicons/android-icon-192x192.png | Bin 24094 -> 0 bytes client/src/favicons/android-icon-36x36.png | Bin 2410 -> 0 bytes client/src/favicons/android-icon-48x48.png | Bin 3392 -> 0 bytes client/src/favicons/android-icon-72x72.png | Bin 5728 -> 0 bytes client/src/favicons/android-icon-96x96.png | Bin 8413 -> 0 bytes client/src/favicons/apple-icon-114x114.png | Bin 10699 -> 0 bytes client/src/favicons/apple-icon-120x120.png | Bin 11592 -> 0 bytes client/src/favicons/apple-icon-144x144.png | Bin 15534 -> 0 bytes client/src/favicons/apple-icon-152x152.png | Bin 17038 -> 0 bytes client/src/favicons/apple-icon-180x180.png | Bin 22257 -> 0 bytes client/src/favicons/apple-icon-57x57.png | Bin 4195 -> 0 bytes client/src/favicons/apple-icon-60x60.png | Bin 4458 -> 0 bytes client/src/favicons/apple-icon-72x72.png | Bin 5728 -> 0 bytes client/src/favicons/apple-icon-76x76.png | Bin 6123 -> 0 bytes .../src/favicons/apple-icon-precomposed.png | Bin 24583 -> 0 bytes client/src/favicons/apple-icon.png | Bin 24583 -> 0 bytes client/src/favicons/browserconfig.xml | 2 - client/src/favicons/favicon-16x16.png | Bin 1233 -> 0 bytes client/src/favicons/favicon-32x32.png | Bin 2102 -> 0 bytes client/src/favicons/favicon-96x96.png | Bin 8413 -> 0 bytes client/src/favicons/favicon.ico | Bin 1150 -> 0 bytes client/src/favicons/manifest.json | 41 - client/src/favicons/ms-icon-144x144.png | Bin 15534 -> 0 bytes client/src/favicons/ms-icon-150x150.png | Bin 16616 -> 0 bytes client/src/favicons/ms-icon-310x310.png | Bin 52893 -> 0 bytes client/src/favicons/ms-icon-70x70.png | Bin 5467 -> 0 bytes client/src/index.html | 29 - client/src/index.js | 15 - client/webpack.config.js | 65 - client/yarn.lock | 2798 - cmd/root.go | 49 +- cmd/server.go | 98 +- config/bulldozer.example.yml | 48 + config/examples/standard.bulldozer.v1.yml | 18 + docker/Dockerfile | 12 + docker/ca-certificates.crt | 3314 + github/github.go | 847 - github/github_test.go | 796 - github/hook_processor.go | 69 - godel/config/check-plugin.yml | 17 + godel/config/check.yml | 8 - .../{generate.yml => conjure-plugin.yml} | 0 godel/config/dist-plugin.yml | 33 + godel/config/dist.yml | 14 - godel/config/exclude.yml | 5 - godel/config/format-plugin.yml | 4 + godel/config/format.yml | 4 - godel/config/godel.properties | 4 +- godel/config/godel.yml | 15 + godel/config/imports.yml | 0 .../{license.yml => license-plugin.yml} | 2 +- godel/config/test-plugin.yml | 4 + godel/config/test.yml | 0 godelw | 8 +- main.go | 18 +- persist/repo.go | 61 - persist/schema.go | 122 - persist/user.go | 78 - pull/context.go | 66 + pull/github_context.go | 190 + pull/pull_requests.go | 92 + pull/pulltest/mock_context.go | 102 + scripts/make_client.sh | 39 - scripts/publish_docker.sh | 13 - server/config.go | 67 + server/config/config.go | 140 - server/endpoints/hook.go | 243 - server/endpoints/repositories.go | 280 - server/endpoints/token.go | 76 - server/handler/base.go | 97 + server/{endpoints => handler}/health.go | 25 +- server/handler/issue_comment.go | 68 + server/handler/pull_request_review.go | 68 + server/handler/push.go | 89 + server/handler/status.go | 80 + server/init.go | 46 - server/server.go | 133 +- .../github.com/DataDog/datadog-go/LICENSE.txt | 19 + .../DataDog/datadog-go/statsd/statsd.go | 680 + .../DataDog/datadog-go/statsd/udp.go | 40 + .../DataDog/datadog-go/statsd/uds.go | 67 + .../antonlindstrom/pgstore/.travis.yml | 26 - .../antonlindstrom/pgstore/Makefile | 60 - .../antonlindstrom/pgstore/README.md | 79 - .../antonlindstrom/pgstore/cleanup.go | 58 - .../antonlindstrom/pgstore/cleanup_test.go | 56 - .../antonlindstrom/pgstore/pgstore.go | 270 - .../antonlindstrom/pgstore/pgstore_test.go | 157 - .../echo => bluekeyes/hatpear}/LICENSE | 4 +- .../github.com/bluekeyes/hatpear/hatpear.go | 175 + vendor/github.com/boj/redistore/.gitignore | 2 - vendor/github.com/boj/redistore/LICENSE | 19 - vendor/github.com/boj/redistore/README.md | 52 - vendor/github.com/boj/redistore/doc.go | 4 - vendor/github.com/boj/redistore/redistore.go | 358 - .../boj/redistore/redistore_test.go | 404 - .../bradleyfalzon/ghinstallation/LICENSE | 24 + .../ghinstallation/appsTransport.go | 80 + .../bradleyfalzon/ghinstallation/transport.go | 136 + vendor/github.com/davecgh/go-spew/.gitignore | 22 - vendor/github.com/davecgh/go-spew/.travis.yml | 14 - vendor/github.com/davecgh/go-spew/LICENSE | 2 +- vendor/github.com/davecgh/go-spew/README.md | 205 - .../github.com/davecgh/go-spew/cov_report.sh | 22 - .../github.com/davecgh/go-spew/spew/bypass.go | 187 +- .../davecgh/go-spew/spew/bypasssafe.go | 2 +- .../github.com/davecgh/go-spew/spew/common.go | 2 +- .../davecgh/go-spew/spew/common_test.go | 298 - .../github.com/davecgh/go-spew/spew/dump.go | 10 +- .../davecgh/go-spew/spew/dump_test.go | 1042 - .../davecgh/go-spew/spew/dumpcgo_test.go | 99 - .../davecgh/go-spew/spew/dumpnocgo_test.go | 26 - .../davecgh/go-spew/spew/example_test.go | 226 - .../github.com/davecgh/go-spew/spew/format.go | 4 +- .../davecgh/go-spew/spew/format_test.go | 1558 - .../davecgh/go-spew/spew/internal_test.go | 87 - .../go-spew/spew/internalunsafe_test.go | 102 - .../davecgh/go-spew/spew/spew_test.go | 320 - .../davecgh/go-spew/test_coverage.txt | 61 - vendor/github.com/dgrijalva/jwt-go/.gitignore | 4 - .../github.com/dgrijalva/jwt-go/.travis.yml | 8 - .../dgrijalva/jwt-go/MIGRATION_GUIDE.md | 96 - vendor/github.com/dgrijalva/jwt-go/README.md | 85 - .../dgrijalva/jwt-go/VERSION_HISTORY.md | 105 - vendor/github.com/dgrijalva/jwt-go/ecdsa.go | 1 + .../github.com/dgrijalva/jwt-go/ecdsa_test.go | 100 - vendor/github.com/dgrijalva/jwt-go/errors.go | 6 +- .../dgrijalva/jwt-go/example_test.go | 114 - vendor/github.com/dgrijalva/jwt-go/hmac.go | 3 +- .../dgrijalva/jwt-go/hmac_example_test.go | 64 - .../github.com/dgrijalva/jwt-go/hmac_test.go | 91 - .../dgrijalva/jwt-go/http_example_test.go | 216 - .../github.com/dgrijalva/jwt-go/none_test.go | 72 - vendor/github.com/dgrijalva/jwt-go/parser.go | 136 +- .../dgrijalva/jwt-go/parser_test.go | 252 - vendor/github.com/dgrijalva/jwt-go/rsa.go | 5 +- .../dgrijalva/jwt-go/rsa_pss_test.go | 96 - .../github.com/dgrijalva/jwt-go/rsa_test.go | 176 - .../github.com/dgrijalva/jwt-go/rsa_utils.go | 32 + .../fsnotify/fsnotify/.editorconfig | 5 - .../github.com/fsnotify/fsnotify/.gitignore | 6 - .../github.com/fsnotify/fsnotify/.travis.yml | 28 - vendor/github.com/fsnotify/fsnotify/AUTHORS | 46 - .../github.com/fsnotify/fsnotify/CHANGELOG.md | 307 - .../fsnotify/fsnotify/CONTRIBUTING.md | 77 - vendor/github.com/fsnotify/fsnotify/LICENSE | 28 - vendor/github.com/fsnotify/fsnotify/README.md | 50 - .../fsnotify/fsnotify/example_test.go | 42 - vendor/github.com/fsnotify/fsnotify/fen.go | 37 - .../github.com/fsnotify/fsnotify/fsnotify.go | 62 - .../fsnotify/fsnotify/fsnotify_test.go | 40 - .../github.com/fsnotify/fsnotify/inotify.go | 325 - .../fsnotify/fsnotify/inotify_poller.go | 187 - .../fsnotify/fsnotify/inotify_poller_test.go | 229 - .../fsnotify/fsnotify/inotify_test.go | 360 - .../fsnotify/integration_darwin_test.go | 147 - .../fsnotify/fsnotify/integration_test.go | 1237 - vendor/github.com/fsnotify/fsnotify/kqueue.go | 503 - .../fsnotify/fsnotify/open_mode_bsd.go | 11 - .../fsnotify/fsnotify/open_mode_darwin.go | 12 - .../github.com/fsnotify/fsnotify/windows.go | 561 - vendor/github.com/garyburd/redigo/.travis.yml | 18 - .../garyburd/redigo/README.markdown | 50 - .../garyburd/redigo/internal/commandinfo.go | 54 - .../redigo/internal/commandinfo_test.go | 27 - .../github.com/garyburd/redigo/redis/conn.go | 618 - .../garyburd/redigo/redis/conn_test.go | 670 - .../github.com/garyburd/redigo/redis/doc.go | 177 - .../github.com/garyburd/redigo/redis/go17.go | 33 - .../github.com/garyburd/redigo/redis/log.go | 117 - .../github.com/garyburd/redigo/redis/pool.go | 416 - .../garyburd/redigo/redis/pool_test.go | 684 - .../garyburd/redigo/redis/pre_go17.go | 31 - .../garyburd/redigo/redis/pubsub.go | 144 - .../garyburd/redigo/redis/pubsub_test.go | 148 - .../github.com/garyburd/redigo/redis/redis.go | 41 - .../github.com/garyburd/redigo/redis/reply.go | 425 - .../garyburd/redigo/redis/reply_test.go | 184 - .../github.com/garyburd/redigo/redis/scan.go | 559 - .../garyburd/redigo/redis/scan_test.go | 440 - .../garyburd/redigo/redis/script.go | 86 - .../garyburd/redigo/redis/script_test.go | 100 - .../garyburd/redigo/redis/test_test.go | 177 - .../redigo/redis/zpop_example_test.go | 113 - .../go-playground/locales/.gitignore | 24 - .../go-playground/locales/README.md | 173 - .../github.com/go-playground/locales/cu/cu.go | 594 - .../go-playground/locales/cu/cu_test.go | 1120 - .../locales/currency/currency.go | 306 - .../github.com/go-playground/locales/logo.png | Bin 37360 -> 0 bytes .../github.com/go-playground/locales/rules.go | 293 - .../github.com/go-playground/locales/tq\033q" | 255022 --------------- .../universal-translator/.gitignore | 24 - .../universal-translator/README.md | 90 - .../universal-translator/benchmarks_test.go | 110 - .../universal-translator/errors.go | 148 - .../universal-translator/import_export.go | 274 - .../import_export_test.go | 789 - .../universal-translator/logo.png | Bin 16598 -> 0 bytes .../universal-translator/translator.go | 420 - .../universal-translator/translator_test.go | 858 - .../universal_translator.go | 113 - vendor/github.com/golang/protobuf/.gitignore | 16 - vendor/github.com/golang/protobuf/.travis.yml | 18 - vendor/github.com/golang/protobuf/AUTHORS | 3 - .../github.com/golang/protobuf/CONTRIBUTORS | 3 - vendor/github.com/golang/protobuf/LICENSE | 31 - .../github.com/golang/protobuf/Make.protobuf | 40 - vendor/github.com/golang/protobuf/Makefile | 55 - vendor/github.com/golang/protobuf/README.md | 243 - .../github.com/golang/protobuf/proto/Makefile | 43 - .../golang/protobuf/proto/all_test.go | 2278 - .../golang/protobuf/proto/any_test.go | 300 - .../github.com/golang/protobuf/proto/clone.go | 229 - .../golang/protobuf/proto/clone_test.go | 300 - .../golang/protobuf/proto/decode.go | 970 - .../golang/protobuf/proto/decode_test.go | 258 - .../golang/protobuf/proto/encode.go | 1362 - .../golang/protobuf/proto/encode_test.go | 85 - .../github.com/golang/protobuf/proto/equal.go | 300 - .../golang/protobuf/proto/equal_test.go | 224 - .../golang/protobuf/proto/extensions.go | 587 - .../golang/protobuf/proto/extensions_test.go | 536 - .../github.com/golang/protobuf/proto/lib.go | 897 - .../golang/protobuf/proto/map_test.go | 46 - .../golang/protobuf/proto/message_set.go | 311 - .../golang/protobuf/proto/message_set_test.go | 66 - .../golang/protobuf/proto/pointer_reflect.go | 484 - .../golang/protobuf/proto/pointer_unsafe.go | 270 - .../golang/protobuf/proto/properties.go | 872 - .../golang/protobuf/proto/proto3_test.go | 135 - .../golang/protobuf/proto/size2_test.go | 63 - .../golang/protobuf/proto/size_test.go | 164 - .../github.com/golang/protobuf/proto/text.go | 854 - .../golang/protobuf/proto/text_parser.go | 895 - .../golang/protobuf/proto/text_parser_test.go | 673 - .../golang/protobuf/proto/text_test.go | 474 - vendor/github.com/google/go-github/.gitignore | 2 - .../github.com/google/go-github/.travis.yml | 29 - vendor/github.com/google/go-github/AUTHORS | 48 + .../google/go-github/CONTRIBUTING.md | 114 - vendor/github.com/google/go-github/LICENSE | 314 - vendor/github.com/google/go-github/README.md | 245 - .../go-github/github/activity_events.go | 8 +- .../go-github/github/activity_events_test.go | 331 - .../github/activity_notifications_test.go | 204 - .../google/go-github/github/activity_star.go | 6 +- .../go-github/github/activity_star_test.go | 172 - .../google/go-github/github/activity_test.go | 129 - .../github/activity_watching_test.go | 184 - .../google/go-github/github/admin.go | 6 +- .../google/go-github/github/admin_stats.go | 2 +- .../go-github/github/admin_stats_test.go | 142 - .../google/go-github/github/admin_test.go | 81 - .../google/go-github/github/apps.go | 101 +- .../go-github/github/apps_installation.go | 22 +- .../github/apps_installation_test.go | 100 - .../go-github/github/apps_marketplace.go | 168 + .../google/go-github/github/apps_test.go | 150 - .../google/go-github/github/authorizations.go | 14 +- .../go-github/github/authorizations_test.go | 359 - .../google/go-github/github/checks.go | 421 + .../github.com/google/go-github/github/doc.go | 18 +- .../google/go-github/github/event_types.go | 153 +- .../google/go-github/github/examples_test.go | 76 - .../google/go-github/github/gen-accessors.go | 332 + .../google/go-github/github/gists.go | 7 + .../google/go-github/github/gists_comments.go | 8 +- .../go-github/github/gists_comments_test.go | 154 - .../google/go-github/github/gists_test.go | 507 - .../google/go-github/github/git_blobs.go | 21 +- .../google/go-github/github/git_blobs_test.go | 98 - .../google/go-github/github/git_commits.go | 3 +- .../go-github/github/git_commits_test.go | 84 - .../google/go-github/github/git_refs.go | 1 + .../google/go-github/github/git_refs_test.go | 429 - .../google/go-github/github/git_tags.go | 3 +- .../google/go-github/github/git_tags_test.go | 69 - .../google/go-github/github/git_trees.go | 6 + .../google/go-github/github/git_trees_test.go | 191 - .../go-github/github/github-accessors.go | 8588 +- .../google/go-github/github/github.go | 138 +- .../google/go-github/github/github_test.go | 1056 - .../google/go-github/github/gitignore_test.go | 59 - .../google/go-github/github/issues.go | 46 +- .../go-github/github/issues_assignees_test.go | 158 - .../go-github/github/issues_comments.go | 25 +- .../go-github/github/issues_comments_test.go | 188 - .../google/go-github/github/issues_events.go | 25 +- .../go-github/github/issues_events_test.go | 84 - .../google/go-github/github/issues_labels.go | 43 +- .../go-github/github/issues_labels_test.go | 317 - .../go-github/github/issues_milestones.go | 3 +- .../github/issues_milestones_test.go | 159 - .../google/go-github/github/issues_test.go | 288 - .../go-github/github/issues_timeline.go | 4 +- .../go-github/github/issues_timeline_test.go | 40 - .../google/go-github/github/licenses.go | 6 - .../google/go-github/github/licenses_test.go | 67 - .../google/go-github/github/messages.go | 9 +- .../google/go-github/github/messages_test.go | 326 - .../google/go-github/github/migrations.go | 10 +- .../github/migrations_source_import.go | 4 +- .../github/migrations_source_import_test.go | 226 - .../go-github/github/migrations_test.go | 178 - .../go-github/github/migrations_user.go | 214 + .../google/go-github/github/misc.go | 4 + .../google/go-github/github/misc_test.go | 232 - .../google/go-github/github/orgs.go | 57 +- .../google/go-github/github/orgs_hooks.go | 21 +- .../go-github/github/orgs_hooks_test.go | 135 - .../google/go-github/github/orgs_members.go | 73 +- .../go-github/github/orgs_members_test.go | 434 - .../github/orgs_outside_collaborators.go | 31 + .../github/orgs_outside_collaborators_test.go | 47 - .../go-github/github/orgs_projects_test.go | 68 - .../go-github/github/orgs_teams_test.go | 639 - .../google/go-github/github/orgs_test.go | 164 - .../github/orgs_users_blocking_test.go | 90 - .../google/go-github/github/projects.go | 113 +- .../google/go-github/github/projects_test.go | 371 - .../google/go-github/github/pulls.go | 51 +- .../google/go-github/github/pulls_comments.go | 75 +- .../go-github/github/pulls_comments_test.go | 188 - .../go-github/github/pulls_reviewers.go | 9 - .../go-github/github/pulls_reviewers_test.go | 104 - .../google/go-github/github/pulls_reviews.go | 12 +- .../go-github/github/pulls_reviews_test.go | 252 - .../google/go-github/github/pulls_test.go | 513 - .../google/go-github/github/reactions.go | 136 +- .../google/go-github/github/reactions_test.go | 201 - .../google/go-github/github/repos.go | 252 +- .../github/repos_collaborators_test.go | 189 - .../google/go-github/github/repos_comments.go | 8 +- .../go-github/github/repos_comments_test.go | 184 - .../google/go-github/github/repos_commits.go | 2 +- .../go-github/github/repos_commits_test.go | 325 - .../github/repos_community_health.go | 10 +- .../github/repos_community_health_test.go | 86 - .../go-github/github/repos_contents_test.go | 378 - .../go-github/github/repos_deployments.go | 20 +- .../github/repos_deployments_test.go | 161 - .../google/go-github/github/repos_forks.go | 6 +- .../go-github/github/repos_forks_test.go | 75 - .../google/go-github/github/repos_hooks.go | 72 +- .../go-github/github/repos_hooks_test.go | 188 - .../go-github/github/repos_invitations.go | 6 +- .../github/repos_invitations_test.go | 74 - .../google/go-github/github/repos_keys.go | 6 +- .../go-github/github/repos_keys_test.go | 154 - .../go-github/github/repos_merging_test.go | 48 - .../google/go-github/github/repos_pages.go | 2 +- .../go-github/github/repos_pages_test.go | 134 - .../github/repos_prereceive_hooks.go | 110 + .../google/go-github/github/repos_projects.go | 4 +- .../go-github/github/repos_projects_test.go | 68 - .../google/go-github/github/repos_releases.go | 101 +- .../go-github/github/repos_releases_test.go | 353 - .../google/go-github/github/repos_stats.go | 2 +- .../go-github/github/repos_stats_test.go | 211 - .../google/go-github/github/repos_statuses.go | 2 +- .../go-github/github/repos_statuses_test.go | 97 - .../google/go-github/github/repos_test.go | 978 - .../go-github/github/repos_traffic_test.go | 145 - .../google/go-github/github/search.go | 69 +- .../google/go-github/github/search_test.go | 268 - .../google/go-github/github/strings_test.go | 141 - .../github/{orgs_teams.go => teams.go} | 235 +- .../github/teams_discussion_comments.go | 155 + .../go-github/github/teams_discussions.go | 160 + .../google/go-github/github/teams_members.go | 174 + .../google/go-github/github/timestamp.go | 4 +- .../google/go-github/github/timestamp_test.go | 189 - .../google/go-github/github/users.go | 64 +- .../github/users_administration_test.go | 72 - .../go-github/github/users_blocking_test.go | 90 - .../go-github/github/users_emails_test.go | 95 - .../go-github/github/users_followers_test.go | 223 - .../google/go-github/github/users_gpg_keys.go | 8 +- .../go-github/github/users_gpg_keys_test.go | 139 - .../google/go-github/github/users_keys.go | 6 +- .../go-github/github/users_keys_test.go | 125 - .../google/go-github/github/users_test.go | 242 - .../google/go-github/github/with_appengine.go | 5 - .../google/go-querystring/.gitignore | 1 - .../google/go-querystring/CONTRIBUTING.md | 67 - .../google/go-querystring/README.md | 39 - .../go-querystring/query/encode_test.go | 328 - vendor/github.com/gorilla/context/.travis.yml | 19 - vendor/github.com/gorilla/context/LICENSE | 27 - vendor/github.com/gorilla/context/README.md | 7 - vendor/github.com/gorilla/context/context.go | 143 - .../gorilla/context/context_test.go | 161 - vendor/github.com/gorilla/context/doc.go | 82 - .../gorilla/securecookie/.travis.yml | 18 - .../github.com/gorilla/securecookie/LICENSE | 27 - .../github.com/gorilla/securecookie/README.md | 76 - vendor/github.com/gorilla/securecookie/doc.go | 61 - .../github.com/gorilla/securecookie/fuzz.go | 25 - .../gorilla/securecookie/securecookie.go | 646 - .../gorilla/securecookie/securecookie_test.go | 274 - .../github.com/gorilla/sessions/.travis.yml | 22 - vendor/github.com/gorilla/sessions/LICENSE | 27 - vendor/github.com/gorilla/sessions/README.md | 79 - vendor/github.com/gorilla/sessions/doc.go | 199 - vendor/github.com/gorilla/sessions/lex.go | 102 - .../github.com/gorilla/sessions/sessions.go | 241 - .../gorilla/sessions/sessions_test.go | 160 - vendor/github.com/gorilla/sessions/store.go | 295 - .../github.com/gorilla/sessions/store_test.go | 125 - vendor/github.com/hashicorp/golang-lru/2q.go | 223 + .../hashicorp/{hcl => golang-lru}/LICENSE | 302 +- vendor/github.com/hashicorp/golang-lru/arc.go | 257 + vendor/github.com/hashicorp/golang-lru/doc.go | 21 + vendor/github.com/hashicorp/golang-lru/lru.go | 110 + .../hashicorp/golang-lru/simplelru/lru.go | 161 + .../golang-lru/simplelru/lru_interface.go | 36 + vendor/github.com/hashicorp/hcl/.gitignore | 9 - vendor/github.com/hashicorp/hcl/.travis.yml | 12 - vendor/github.com/hashicorp/hcl/Makefile | 18 - vendor/github.com/hashicorp/hcl/README.md | 125 - vendor/github.com/hashicorp/hcl/appveyor.yml | 19 - vendor/github.com/hashicorp/hcl/decoder.go | 724 - .../github.com/hashicorp/hcl/decoder_test.go | 1203 - vendor/github.com/hashicorp/hcl/hcl.go | 11 - .../github.com/hashicorp/hcl/hcl/ast/ast.go | 219 - .../hashicorp/hcl/hcl/ast/ast_test.go | 200 - .../github.com/hashicorp/hcl/hcl/ast/walk.go | 52 - .../hashicorp/hcl/hcl/parser/error.go | 17 - .../hashicorp/hcl/hcl/parser/error_test.go | 9 - .../hashicorp/hcl/hcl/parser/parser.go | 526 - .../hashicorp/hcl/hcl/parser/parser_test.go | 575 - .../hashicorp/hcl/hcl/scanner/scanner.go | 651 - .../hashicorp/hcl/hcl/scanner/scanner_test.go | 591 - .../hashicorp/hcl/hcl/strconv/quote.go | 241 - .../hashicorp/hcl/hcl/strconv/quote_test.go | 96 - .../hashicorp/hcl/hcl/token/position.go | 46 - .../hashicorp/hcl/hcl/token/token.go | 219 - .../hashicorp/hcl/hcl/token/token_test.go | 69 - vendor/github.com/hashicorp/hcl/hcl_test.go | 19 - .../hashicorp/hcl/json/parser/flatten.go | 117 - .../hashicorp/hcl/json/parser/parser.go | 313 - .../hashicorp/hcl/json/parser/parser_test.go | 384 - .../hashicorp/hcl/json/scanner/scanner.go | 451 - .../hcl/json/scanner/scanner_test.go | 362 - .../hashicorp/hcl/json/token/position.go | 46 - .../hashicorp/hcl/json/token/token.go | 118 - .../hashicorp/hcl/json/token/token_test.go | 34 - vendor/github.com/hashicorp/hcl/lex.go | 38 - vendor/github.com/hashicorp/hcl/lex_test.go | 37 - vendor/github.com/hashicorp/hcl/parse.go | 39 - .../inconshreveable/mousetrap/README.md | 23 - .../github.com/ipfans/echo-session/.gitignore | 28 - .../github.com/ipfans/echo-session/README.md | 57 - .../ipfans/echo-session/cookie_store.go | 40 - .../ipfans/echo-session/filesystem_store.go | 54 - .../ipfans/echo-session/postgres_store.go | 36 - .../ipfans/echo-session/redis_store.go | 78 - .../github.com/ipfans/echo-session/session.go | 157 - vendor/github.com/jmoiron/sqlx/.gitignore | 24 - vendor/github.com/jmoiron/sqlx/LICENSE | 23 - vendor/github.com/jmoiron/sqlx/README.md | 183 - vendor/github.com/jmoiron/sqlx/bind.go | 207 - vendor/github.com/jmoiron/sqlx/doc.go | 12 - vendor/github.com/jmoiron/sqlx/named.go | 344 - .../github.com/jmoiron/sqlx/named_context.go | 132 - .../jmoiron/sqlx/named_context_test.go | 136 - vendor/github.com/jmoiron/sqlx/named_test.go | 227 - .../jmoiron/sqlx/reflectx/README.md | 17 - .../jmoiron/sqlx/reflectx/reflect.go | 422 - .../jmoiron/sqlx/reflectx/reflect_test.go | 905 - vendor/github.com/jmoiron/sqlx/sqlx.go | 1035 - .../github.com/jmoiron/sqlx/sqlx_context.go | 335 - .../jmoiron/sqlx/sqlx_context_test.go | 1344 - vendor/github.com/jmoiron/sqlx/sqlx_test.go | 1792 - vendor/github.com/labstack/echo/.editorconfig | 25 - .../github.com/labstack/echo/.gitattributes | 20 - vendor/github.com/labstack/echo/.gitignore | 7 - vendor/github.com/labstack/echo/.travis.yml | 14 - vendor/github.com/labstack/echo/Gopkg.lock | 75 - vendor/github.com/labstack/echo/Gopkg.toml | 87 - vendor/github.com/labstack/echo/Makefile | 10 - vendor/github.com/labstack/echo/README.md | 62 - vendor/github.com/labstack/echo/bind.go | 261 - vendor/github.com/labstack/echo/bind_test.go | 334 - vendor/github.com/labstack/echo/context.go | 577 - .../github.com/labstack/echo/context_test.go | 427 - vendor/github.com/labstack/echo/echo.go | 728 - vendor/github.com/labstack/echo/echo_go1.8.go | 25 - .../labstack/echo/echo_go1.8_test.go | 30 - vendor/github.com/labstack/echo/echo_test.go | 443 - vendor/github.com/labstack/echo/group.go | 114 - vendor/github.com/labstack/echo/group_test.go | 66 - vendor/github.com/labstack/echo/log.go | 40 - .../labstack/echo/middleware/basic_auth.go | 106 - .../echo/middleware/basic_auth_test.go | 50 - .../labstack/echo/middleware/body_dump.go | 112 - .../echo/middleware/body_dump_test.go | 40 - .../labstack/echo/middleware/body_limit.go | 116 - .../echo/middleware/body_limit_test.go | 53 - .../labstack/echo/middleware/compress.go | 122 - .../labstack/echo/middleware/compress_test.go | 100 - .../labstack/echo/middleware/cors.go | 139 - .../labstack/echo/middleware/cors_test.go | 50 - .../labstack/echo/middleware/csrf.go | 210 - .../labstack/echo/middleware/csrf_test.go | 82 - .../labstack/echo/middleware/jwt.go | 190 - .../labstack/echo/middleware/jwt_test.go | 226 - .../labstack/echo/middleware/key_auth.go | 136 - .../labstack/echo/middleware/key_auth_test.go | 59 - .../labstack/echo/middleware/logger.go | 202 - .../labstack/echo/middleware/logger_test.go | 139 - .../echo/middleware/method_override.go | 88 - .../echo/middleware/method_override_test.go | 49 - .../labstack/echo/middleware/middleware.go | 14 - .../labstack/echo/middleware/proxy.go | 176 - .../labstack/echo/middleware/proxy_test.go | 91 - .../labstack/echo/middleware/recover.go | 85 - .../labstack/echo/middleware/recover_test.go | 26 - .../labstack/echo/middleware/redirect.go | 215 - .../labstack/echo/middleware/redirect_test.go | 80 - .../labstack/echo/middleware/request_id.go | 64 - .../echo/middleware/request_id_test.go | 33 - .../labstack/echo/middleware/secure.go | 116 - .../labstack/echo/middleware/secure_test.go | 45 - .../labstack/echo/middleware/slash.go | 119 - .../labstack/echo/middleware/slash_test.go | 72 - .../labstack/echo/middleware/static.go | 150 - .../labstack/echo/middleware/static_test.go | 67 - vendor/github.com/labstack/echo/response.go | 98 - .../github.com/labstack/echo/response_test.go | 23 - vendor/github.com/labstack/echo/router.go | 437 - .../github.com/labstack/echo/router_test.go | 935 - vendor/github.com/labstack/echo/util_go17.go | 12 - vendor/github.com/labstack/echo/util_go18.go | 10 - vendor/github.com/labstack/gommon/.gitignore | 1 - vendor/github.com/labstack/gommon/.travis.yml | 20 - vendor/github.com/labstack/gommon/README.md | 6 - .../labstack/gommon/bytes/README.md | 29 - .../github.com/labstack/gommon/bytes/bytes.go | 106 - .../labstack/gommon/bytes/bytes_test.go | 91 - .../labstack/gommon/color/README.md | 86 - .../github.com/labstack/gommon/color/color.go | 407 - .../labstack/gommon/color/color_test.go | 60 - vendor/github.com/labstack/gommon/glide.lock | 26 - vendor/github.com/labstack/gommon/glide.yaml | 9 - vendor/github.com/labstack/gommon/gommon.go | 1 - .../github.com/labstack/gommon/log/README.md | 5 - .../github.com/labstack/gommon/log/color.go | 13 - vendor/github.com/labstack/gommon/log/log.go | 405 - .../labstack/gommon/log/log_test.go | 128 - .../github.com/labstack/gommon/log/white.go | 12 - .../labstack/gommon/random/random.go | 48 - .../labstack/gommon/random/random_test.go | 14 - vendor/github.com/lib/pq/.gitignore | 4 - vendor/github.com/lib/pq/.travis.sh | 73 - vendor/github.com/lib/pq/.travis.yml | 46 - vendor/github.com/lib/pq/CONTRIBUTING.md | 29 - vendor/github.com/lib/pq/LICENSE.md | 8 - vendor/github.com/lib/pq/README.md | 105 - vendor/github.com/lib/pq/array.go | 756 - vendor/github.com/lib/pq/array_test.go | 1317 - vendor/github.com/lib/pq/bench_test.go | 435 - vendor/github.com/lib/pq/buf.go | 91 - vendor/github.com/lib/pq/conn.go | 1823 - vendor/github.com/lib/pq/conn_go18.go | 128 - vendor/github.com/lib/pq/conn_test.go | 1614 - vendor/github.com/lib/pq/copy.go | 282 - vendor/github.com/lib/pq/copy_test.go | 465 - vendor/github.com/lib/pq/doc.go | 235 - vendor/github.com/lib/pq/encode.go | 603 - vendor/github.com/lib/pq/encode_test.go | 767 - vendor/github.com/lib/pq/error.go | 508 - vendor/github.com/lib/pq/go18_test.go | 319 - vendor/github.com/lib/pq/issues_test.go | 26 - vendor/github.com/lib/pq/notify.go | 782 - vendor/github.com/lib/pq/notify_test.go | 564 - vendor/github.com/lib/pq/oid/doc.go | 6 - vendor/github.com/lib/pq/oid/gen.go | 93 - vendor/github.com/lib/pq/oid/types.go | 343 - vendor/github.com/lib/pq/rows.go | 93 - vendor/github.com/lib/pq/rows_test.go | 220 - vendor/github.com/lib/pq/ssl.go | 158 - vendor/github.com/lib/pq/ssl_go1.7.go | 14 - vendor/github.com/lib/pq/ssl_permissions.go | 20 - vendor/github.com/lib/pq/ssl_renegotiation.go | 8 - vendor/github.com/lib/pq/ssl_test.go | 279 - vendor/github.com/lib/pq/ssl_windows.go | 9 - vendor/github.com/lib/pq/url.go | 76 - vendor/github.com/lib/pq/url_test.go | 66 - vendor/github.com/lib/pq/user_posix.go | 24 - vendor/github.com/lib/pq/user_windows.go | 27 - vendor/github.com/lib/pq/uuid.go | 23 - vendor/github.com/lib/pq/uuid_test.go | 46 - .../magiconair/properties/.gitignore | 6 - .../magiconair/properties/.travis.yml | 8 - .../magiconair/properties/CHANGELOG.md | 96 - .../github.com/magiconair/properties/LICENSE | 25 - .../magiconair/properties/README.md | 100 - .../magiconair/properties/benchmark_test.go | 24 - .../magiconair/properties/decode.go | 289 - .../magiconair/properties/decode_test.go | 299 - .../github.com/magiconair/properties/doc.go | 156 - .../magiconair/properties/example_test.go | 93 - .../magiconair/properties/integrate.go | 34 - .../magiconair/properties/integrate_test.go | 76 - .../github.com/magiconair/properties/lex.go | 408 - .../github.com/magiconair/properties/load.go | 241 - .../magiconair/properties/load_test.go | 231 - .../magiconair/properties/parser.go | 95 - .../magiconair/properties/properties.go | 808 - .../magiconair/properties/properties_test.go | 934 - .../magiconair/properties/rangecheck.go | 31 - .../github.com/mattn/go-colorable/.travis.yml | 9 - vendor/github.com/mattn/go-colorable/LICENSE | 21 - .../github.com/mattn/go-colorable/README.md | 48 - .../mattn/go-colorable/colorable_appengine.go | 29 - .../mattn/go-colorable/colorable_others.go | 30 - .../mattn/go-colorable/colorable_test.go | 83 - .../mattn/go-colorable/colorable_windows.go | 884 - .../mattn/go-colorable/noncolorable.go | 55 - vendor/github.com/mattn/go-isatty/.travis.yml | 9 - vendor/github.com/mattn/go-isatty/LICENSE | 9 - vendor/github.com/mattn/go-isatty/README.md | 50 - vendor/github.com/mattn/go-isatty/doc.go | 2 - .../mattn/go-isatty/example_test.go | 18 - .../mattn/go-isatty/isatty_appengine.go | 15 - .../github.com/mattn/go-isatty/isatty_bsd.go | 18 - .../mattn/go-isatty/isatty_linux.go | 18 - .../mattn/go-isatty/isatty_linux_ppc64x.go | 19 - .../mattn/go-isatty/isatty_others.go | 10 - .../mattn/go-isatty/isatty_others_test.go | 19 - .../mattn/go-isatty/isatty_solaris.go | 16 - .../mattn/go-isatty/isatty_windows.go | 94 - .../mattn/go-isatty/isatty_windows_test.go | 35 - .../mitchellh/mapstructure/.travis.yml | 7 - .../github.com/mitchellh/mapstructure/LICENSE | 21 - .../mitchellh/mapstructure/README.md | 46 - .../mitchellh/mapstructure/decode_hooks.go | 152 - .../mapstructure/decode_hooks_test.go | 229 - .../mitchellh/mapstructure/error.go | 50 - .../mitchellh/mapstructure/mapstructure.go | 828 - .../mapstructure_benchmark_test.go | 279 - .../mapstructure/mapstructure_bugs_test.go | 260 - .../mapstructure_examples_test.go | 203 - .../mapstructure/mapstructure_test.go | 1193 - .../go-baseapp}/LICENSE | 1 - .../palantir/go-baseapp/baseapp/config.go | 15 +- .../go-baseapp/baseapp/datadog/datadog.go | 56 + .../palantir/go-baseapp/baseapp/error.go | 47 + .../palantir/go-baseapp/baseapp/metrics.go | 114 + .../palantir/go-baseapp/baseapp/middleware.go | 60 + .../palantir/go-baseapp/baseapp/params.go | 97 + .../palantir/go-baseapp/baseapp/server.go | 107 + .../godel/config/license-plugin.yml | 14 + .../palantir/go-baseapp/pkg/errfmt/errfmt.go | 50 +- .../redigo => palantir/go-githubapp}/LICENSE | 28 +- .../githubapp/caching_client_creator.go | 123 + .../go-githubapp/githubapp/client_creator.go | 246 + .../palantir/go-githubapp/githubapp/config.go | 32 + .../go-githubapp/githubapp/context.go | 79 + .../go-githubapp/githubapp/dispatcher.go | 138 + .../go-githubapp/githubapp/installations.go | 124 + .../go-githubapp/githubapp/middleware.go | 117 + .../godel/config/license-plugin.yml | 14 + .../pelletier/go-buffruneio/.gitignore | 1 - .../pelletier/go-buffruneio/.travis.yml | 7 - .../pelletier/go-buffruneio/README.md | 62 - .../pelletier/go-buffruneio/buffruneio.go | 117 - .../go-buffruneio/buffruneio_test.go | 145 - .../github.com/pelletier/go-toml/.gitignore | 1 - .../github.com/pelletier/go-toml/.travis.yml | 21 - vendor/github.com/pelletier/go-toml/LICENSE | 21 - vendor/github.com/pelletier/go-toml/README.md | 118 - vendor/github.com/pelletier/go-toml/doc.go | 23 - .../github.com/pelletier/go-toml/doc_test.go | 53 - .../pelletier/go-toml/example-crlf.toml | 29 - .../github.com/pelletier/go-toml/example.toml | 29 - .../pelletier/go-toml/keysparsing.go | 94 - .../pelletier/go-toml/keysparsing_test.go | 56 - vendor/github.com/pelletier/go-toml/lexer.go | 658 - .../pelletier/go-toml/lexer_test.go | 779 - .../github.com/pelletier/go-toml/marshal.go | 484 - .../pelletier/go-toml/marshal_test.go | 619 - .../pelletier/go-toml/marshal_test.toml | 38 - vendor/github.com/pelletier/go-toml/parser.go | 393 - .../pelletier/go-toml/parser_test.go | 785 - .../github.com/pelletier/go-toml/position.go | 29 - .../pelletier/go-toml/position_test.go | 29 - vendor/github.com/pelletier/go-toml/test.sh | 88 - vendor/github.com/pelletier/go-toml/token.go | 140 - .../pelletier/go-toml/token_test.go | 67 - vendor/github.com/pelletier/go-toml/toml.go | 281 - .../github.com/pelletier/go-toml/toml_test.go | 106 - .../pelletier/go-toml/tomltree_create.go | 142 - .../pelletier/go-toml/tomltree_create_test.go | 126 - .../pelletier/go-toml/tomltree_write.go | 217 - .../pelletier/go-toml/tomltree_write_test.go | 295 - vendor/github.com/pkg/errors/.gitignore | 24 - vendor/github.com/pkg/errors/.travis.yml | 11 - vendor/github.com/pkg/errors/README.md | 52 - vendor/github.com/pkg/errors/appveyor.yml | 32 - vendor/github.com/pkg/errors/bench_test.go | 59 - vendor/github.com/pkg/errors/errors_test.go | 226 - vendor/github.com/pkg/errors/example_test.go | 205 - vendor/github.com/pkg/errors/format_test.go | 535 - vendor/github.com/pkg/errors/stack_test.go | 292 - .../github.com/pmezard/go-difflib/.travis.yml | 5 - .../github.com/pmezard/go-difflib/README.md | 50 - .../go-difflib/difflib/difflib_test.go | 426 - vendor/github.com/rcrowley/go-metrics/LICENSE | 29 + .../github.com/rcrowley/go-metrics/counter.go | 112 + .../github.com/rcrowley/go-metrics/debug.go | 76 + vendor/github.com/rcrowley/go-metrics/ewma.go | 138 + .../github.com/rcrowley/go-metrics/gauge.go | 120 + .../rcrowley/go-metrics/gauge_float64.go | 125 + .../rcrowley/go-metrics/graphite.go | 113 + .../rcrowley/go-metrics/healthcheck.go | 61 + .../rcrowley/go-metrics/histogram.go | 202 + vendor/github.com/rcrowley/go-metrics/json.go | 31 + vendor/github.com/rcrowley/go-metrics/log.go | 80 + .../github.com/rcrowley/go-metrics/meter.go | 257 + .../github.com/rcrowley/go-metrics/metrics.go | 13 + .../rcrowley/go-metrics/opentsdb.go | 119 + .../rcrowley/go-metrics/registry.go | 363 + .../github.com/rcrowley/go-metrics/runtime.go | 212 + .../rcrowley/go-metrics/runtime_cgo.go | 10 + .../go-metrics/runtime_gccpufraction.go | 9 + .../rcrowley/go-metrics/runtime_no_cgo.go | 7 + .../go-metrics/runtime_no_gccpufraction.go | 9 + .../github.com/rcrowley/go-metrics/sample.go | 616 + .../github.com/rcrowley/go-metrics/syslog.go | 78 + .../github.com/rcrowley/go-metrics/timer.go | 329 + .../github.com/rcrowley/go-metrics/writer.go | 100 + .../{go-playground/locales => rs/xid}/LICENSE | 12 +- vendor/github.com/rs/xid/hostid_darwin.go | 9 + vendor/github.com/rs/xid/hostid_fallback.go | 9 + vendor/github.com/rs/xid/hostid_freebsd.go | 9 + vendor/github.com/rs/xid/hostid_linux.go | 10 + vendor/github.com/rs/xid/hostid_windows.go | 38 + vendor/github.com/rs/xid/id.go | 365 + .../{labstack/gommon => rs/zerolog}/LICENSE | 5 +- vendor/github.com/rs/zerolog/array.go | 224 + vendor/github.com/rs/zerolog/console.go | 150 + vendor/github.com/rs/zerolog/context.go | 381 + vendor/github.com/rs/zerolog/ctx.go | 47 + vendor/github.com/rs/zerolog/encoder.go | 56 + vendor/github.com/rs/zerolog/encoder_cbor.go | 35 + vendor/github.com/rs/zerolog/encoder_json.go | 32 + vendor/github.com/rs/zerolog/event.go | 670 + vendor/github.com/rs/zerolog/fields.go | 178 + vendor/github.com/rs/zerolog/globals.go | 71 + vendor/github.com/rs/zerolog/hlog/hlog.go | 184 + vendor/github.com/rs/zerolog/hook.go | 60 + .../rs/zerolog/internal/cbor/base.go | 11 + .../rs/zerolog/internal/cbor/cbor.go | 100 + .../rs/zerolog/internal/cbor/decode_stream.go | 614 + .../rs/zerolog/internal/cbor/string.go | 68 + .../rs/zerolog/internal/cbor/time.go | 93 + .../rs/zerolog/internal/cbor/types.go | 478 + .../rs/zerolog/internal/json/base.go | 12 + .../rs/zerolog/internal/json/bytes.go | 85 + .../rs/zerolog/internal/json/string.go | 121 + .../rs/zerolog/internal/json/time.go | 76 + .../rs/zerolog/internal/json/types.go | 402 + vendor/github.com/rs/zerolog/log.go | 398 + vendor/github.com/rs/zerolog/log/log.go | 115 + vendor/github.com/rs/zerolog/sampler.go | 126 + vendor/github.com/rs/zerolog/syslog.go | 57 + vendor/github.com/rs/zerolog/writer.go | 100 + .../shurcooL/githubv4}/LICENSE | 5 +- vendor/github.com/shurcooL/githubv4/doc.go | 13 + vendor/github.com/shurcooL/githubv4/enum.go | 529 + vendor/github.com/shurcooL/githubv4/gen.go | 192 + .../github.com/shurcooL/githubv4/githubv4.go | 56 + vendor/github.com/shurcooL/githubv4/input.go | 483 + vendor/github.com/shurcooL/githubv4/scalar.go | 139 + .../shurcooL/go/browser}/LICENSE | 0 .../github.com/shurcooL/go/ctxhttp/ctxhttp.go | 78 + .../graphql}/LICENSE | 4 +- vendor/github.com/shurcooL/graphql/doc.go | 11 + vendor/github.com/shurcooL/graphql/graphql.go | 123 + .../shurcooL/graphql/ident/ident.go | 240 + .../graphql/internal/jsonutil/graphql.go | 308 + vendor/github.com/shurcooL/graphql/query.go | 131 + vendor/github.com/shurcooL/graphql/scalar.go | 51 + vendor/github.com/sirupsen/logrus/.gitignore | 1 - vendor/github.com/sirupsen/logrus/.travis.yml | 15 - .../github.com/sirupsen/logrus/CHANGELOG.md | 113 - vendor/github.com/sirupsen/logrus/LICENSE | 21 - vendor/github.com/sirupsen/logrus/README.md | 505 - vendor/github.com/sirupsen/logrus/alt_exit.go | 64 - .../sirupsen/logrus/alt_exit_test.go | 83 - .../github.com/sirupsen/logrus/appveyor.yml | 14 - vendor/github.com/sirupsen/logrus/doc.go | 26 - vendor/github.com/sirupsen/logrus/entry.go | 276 - .../github.com/sirupsen/logrus/entry_test.go | 77 - .../sirupsen/logrus/example_basic_test.go | 69 - .../sirupsen/logrus/example_hook_test.go | 35 - vendor/github.com/sirupsen/logrus/exported.go | 193 - .../github.com/sirupsen/logrus/formatter.go | 45 - .../sirupsen/logrus/formatter_bench_test.go | 101 - .../github.com/sirupsen/logrus/hook_test.go | 122 - vendor/github.com/sirupsen/logrus/hooks.go | 34 - .../sirupsen/logrus/json_formatter.go | 79 - .../sirupsen/logrus/json_formatter_test.go | 199 - vendor/github.com/sirupsen/logrus/logger.go | 317 - .../sirupsen/logrus/logger_bench_test.go | 61 - vendor/github.com/sirupsen/logrus/logrus.go | 143 - .../github.com/sirupsen/logrus/logrus_test.go | 386 - .../sirupsen/logrus/terminal_bsd.go | 10 - .../sirupsen/logrus/terminal_linux.go | 14 - .../sirupsen/logrus/text_formatter.go | 191 - .../sirupsen/logrus/text_formatter_test.go | 141 - vendor/github.com/sirupsen/logrus/writer.go | 62 - vendor/github.com/spf13/afero/.travis.yml | 20 - vendor/github.com/spf13/afero/LICENSE.txt | 174 - vendor/github.com/spf13/afero/README.md | 449 - vendor/github.com/spf13/afero/afero.go | 108 - vendor/github.com/spf13/afero/afero_test.go | 699 - vendor/github.com/spf13/afero/appveyor.yml | 15 - vendor/github.com/spf13/afero/basepath.go | 145 - .../github.com/spf13/afero/basepath_test.go | 142 - .../github.com/spf13/afero/cacheOnReadFs.go | 295 - .../github.com/spf13/afero/composite_test.go | 368 - vendor/github.com/spf13/afero/const_bsds.go | 22 - .../github.com/spf13/afero/const_win_unix.go | 25 - .../github.com/spf13/afero/copyOnWriteFs.go | 253 - .../spf13/afero/copyOnWriteFs_test.go | 23 - vendor/github.com/spf13/afero/httpFs.go | 110 - vendor/github.com/spf13/afero/ioutil.go | 230 - vendor/github.com/spf13/afero/ioutil_test.go | 112 - vendor/github.com/spf13/afero/match.go | 110 - vendor/github.com/spf13/afero/match_test.go | 183 - vendor/github.com/spf13/afero/mem/dir.go | 37 - vendor/github.com/spf13/afero/mem/dirmap.go | 43 - vendor/github.com/spf13/afero/mem/file.go | 285 - vendor/github.com/spf13/afero/memmap.go | 366 - vendor/github.com/spf13/afero/memmap_test.go | 386 - vendor/github.com/spf13/afero/memradix.go | 14 - vendor/github.com/spf13/afero/os.go | 94 - vendor/github.com/spf13/afero/path.go | 108 - vendor/github.com/spf13/afero/path_test.go | 69 - vendor/github.com/spf13/afero/readonlyfs.go | 70 - vendor/github.com/spf13/afero/regexpfs.go | 214 - .../github.com/spf13/afero/ro_regexp_test.go | 96 - vendor/github.com/spf13/afero/unionFile.go | 274 - vendor/github.com/spf13/afero/util.go | 331 - vendor/github.com/spf13/afero/util_test.go | 450 - vendor/github.com/spf13/cast/.gitignore | 25 - vendor/github.com/spf13/cast/.travis.yml | 14 - vendor/github.com/spf13/cast/LICENSE | 21 - vendor/github.com/spf13/cast/Makefile | 38 - vendor/github.com/spf13/cast/README.md | 75 - vendor/github.com/spf13/cast/cast.go | 159 - vendor/github.com/spf13/cast/cast_test.go | 1183 - vendor/github.com/spf13/cast/caste.go | 1146 - vendor/github.com/spf13/cobra/.gitignore | 36 - vendor/github.com/spf13/cobra/.mailmap | 3 - vendor/github.com/spf13/cobra/.travis.yml | 21 - vendor/github.com/spf13/cobra/README.md | 942 - vendor/github.com/spf13/cobra/args.go | 25 +- .../spf13/cobra/bash_completions.go | 169 +- .../spf13/cobra/bash_completions.md | 206 - .../spf13/cobra/bash_completions_test.go | 194 - vendor/github.com/spf13/cobra/cobra.go | 12 +- .../cobra/cobra/cmd/testdata/LICENSE.golden} | 0 vendor/github.com/spf13/cobra/cobra_test.go | 1244 - vendor/github.com/spf13/cobra/command.go | 303 +- vendor/github.com/spf13/cobra/command_test.go | 349 - .../spf13/cobra/zsh_completions_test.go | 88 - .../spf13/jwalterweatherman/.gitignore | 22 - .../spf13/jwalterweatherman/LICENSE | 21 - .../spf13/jwalterweatherman/README.md | 148 - .../jwalterweatherman/default_notepad.go | 113 - .../jwalterweatherman/default_notepad_test.go | 102 - .../spf13/jwalterweatherman/log_counter.go | 55 - .../spf13/jwalterweatherman/notepad.go | 194 - .../spf13/jwalterweatherman/notepad_test.go | 50 - vendor/github.com/spf13/pflag/.gitignore | 2 - vendor/github.com/spf13/pflag/.travis.yml | 21 - vendor/github.com/spf13/pflag/README.md | 296 - .../github.com/spf13/pflag/bool_slice_test.go | 215 - vendor/github.com/spf13/pflag/bool_test.go | 179 - vendor/github.com/spf13/pflag/bytes.go | 209 + vendor/github.com/spf13/pflag/count.go | 12 +- vendor/github.com/spf13/pflag/count_test.go | 52 - .../github.com/spf13/pflag/duration_slice.go | 128 + vendor/github.com/spf13/pflag/example_test.go | 36 - vendor/github.com/spf13/pflag/export_test.go | 29 - vendor/github.com/spf13/pflag/flag.go | 161 +- vendor/github.com/spf13/pflag/flag_test.go | 1085 - vendor/github.com/spf13/pflag/golangflag.go | 4 + .../github.com/spf13/pflag/golangflag_test.go | 39 - vendor/github.com/spf13/pflag/int16.go | 88 + .../github.com/spf13/pflag/int_slice_test.go | 165 - .../github.com/spf13/pflag/ip_slice_test.go | 222 - vendor/github.com/spf13/pflag/ip_test.go | 63 - vendor/github.com/spf13/pflag/ipnet_test.go | 70 - vendor/github.com/spf13/pflag/string_array.go | 8 +- .../spf13/pflag/string_array_test.go | 233 - vendor/github.com/spf13/pflag/string_slice.go | 20 + .../spf13/pflag/string_slice_test.go | 253 - .../github.com/spf13/pflag/string_to_int.go | 149 + .../spf13/pflag/string_to_string.go | 160 + .../github.com/spf13/pflag/uint_slice_test.go | 161 - vendor/github.com/spf13/viper/.gitignore | 24 - vendor/github.com/spf13/viper/.travis.yml | 27 - vendor/github.com/spf13/viper/LICENSE | 21 - vendor/github.com/spf13/viper/README.md | 643 - vendor/github.com/spf13/viper/flags.go | 57 - vendor/github.com/spf13/viper/flags_test.go | 65 - vendor/github.com/spf13/viper/nohup.out | 1 - .../github.com/spf13/viper/overrides_test.go | 173 - vendor/github.com/spf13/viper/util.go | 282 - vendor/github.com/spf13/viper/util_test.go | 54 - vendor/github.com/spf13/viper/viper.go | 1571 - vendor/github.com/spf13/viper/viper_test.go | 1221 - vendor/github.com/stretchr/testify/.gitignore | 24 - .../github.com/stretchr/testify/.travis.yml | 16 - .../github.com/stretchr/testify/LICENCE.txt | 22 - vendor/github.com/stretchr/testify/README.md | 332 - .../testify/assert/assertion_format.go | 484 + .../testify/assert/assertion_forward.go | 839 +- .../testify/assert/assertion_forward.go.tmpl | 4 - .../stretchr/testify/assert/assertions.go | 772 +- .../testify/assert/assertions_test.go | 1210 - .../testify/assert/forward_assertions.go | 2 +- .../testify/assert/forward_assertions_test.go | 611 - .../testify/assert/http_assertions.go | 81 +- .../testify/assert/http_assertions_test.go | 86 - vendor/github.com/stretchr/testify/doc.go | 22 - .../stretchr/testify/package_test.go | 12 - .../testify/require/forward_requirements.go | 2 +- .../require/forward_requirements_test.go | 385 - .../stretchr/testify/require/require.go | 1247 +- .../stretchr/testify/require/require.go.tmpl | 6 - .../testify/require/require_forward.go | 839 +- .../testify/require/require_forward.go.tmpl | 4 - .../stretchr/testify/require/requirements.go | 22 +- .../testify/require/requirements_test.go | 369 - .../syntaqx/go-metrics-datadog/LICENSE | 20 + .../syntaqx/go-metrics-datadog/reporter.go | 144 + .../valyala/bytebufferpool/.travis.yml | 15 - .../github.com/valyala/bytebufferpool/LICENSE | 22 - .../valyala/bytebufferpool/README.md | 21 - .../valyala/bytebufferpool/bytebuffer.go | 111 - .../bytebufferpool/bytebuffer_example_test.go | 21 - .../valyala/bytebufferpool/bytebuffer_test.go | 138 - .../bytebufferpool/bytebuffer_timing_test.go | 32 - .../github.com/valyala/bytebufferpool/doc.go | 7 - .../github.com/valyala/bytebufferpool/pool.go | 151 - .../valyala/bytebufferpool/pool_test.go | 94 - .../github.com/valyala/fasttemplate/LICENSE | 22 - .../github.com/valyala/fasttemplate/README.md | 85 - .../valyala/fasttemplate/example_test.go | 87 - .../valyala/fasttemplate/template.go | 317 - .../valyala/fasttemplate/template_test.go | 317 - .../fasttemplate/template_timing_test.go | 266 - .../github.com/valyala/fasttemplate/unsafe.go | 22 - .../valyala/fasttemplate/unsafe_gae.go | 11 - vendor/github.com/zenazn/goji/LICENSE | 20 + .../github.com/zenazn/goji/web/mutil/mutil.go | 3 + .../zenazn/goji/web/mutil/writer_proxy.go | 139 + .../pgstore => goji.io}/LICENSE | 21 +- vendor/goji.io/dispatch.go | 19 + vendor/goji.io/goji.go | 63 + vendor/goji.io/handle.go | 37 + vendor/goji.io/internal/context.go | 17 + vendor/goji.io/internal/internal.go | 13 + vendor/goji.io/middleware.go | 75 + vendor/goji.io/mux.go | 77 + vendor/goji.io/pat/match.go | 51 + vendor/goji.io/pat/methods.go | 51 + vendor/goji.io/pat/pat.go | 302 + vendor/goji.io/pat/url.go | 70 + vendor/goji.io/pattern.go | 13 + vendor/goji.io/pattern/pattern.go | 67 + vendor/goji.io/router.go | 27 + vendor/goji.io/router_simple.go | 33 + vendor/goji.io/router_trie.go | 176 + vendor/golang.org/x/crypto/.gitattributes | 10 - vendor/golang.org/x/crypto/.gitignore | 2 - vendor/golang.org/x/crypto/AUTHORS | 3 - vendor/golang.org/x/crypto/CONTRIBUTING.md | 31 - vendor/golang.org/x/crypto/CONTRIBUTORS | 3 - vendor/golang.org/x/crypto/PATENTS | 22 - vendor/golang.org/x/crypto/README.md | 21 - vendor/golang.org/x/crypto/acme/acme.go | 1054 - vendor/golang.org/x/crypto/acme/acme_test.go | 1346 - .../x/crypto/acme/autocert/autocert.go | 821 - .../x/crypto/acme/autocert/autocert_test.go | 606 - .../x/crypto/acme/autocert/cache.go | 130 - .../x/crypto/acme/autocert/cache_test.go | 58 - .../x/crypto/acme/autocert/example_test.go | 35 - .../x/crypto/acme/autocert/listener.go | 160 - .../x/crypto/acme/autocert/renewal.go | 124 - .../x/crypto/acme/autocert/renewal_test.go | 191 - vendor/golang.org/x/crypto/acme/jws.go | 153 - vendor/golang.org/x/crypto/acme/jws_test.go | 319 - vendor/golang.org/x/crypto/acme/types.go | 329 - vendor/golang.org/x/crypto/acme/types_test.go | 63 - vendor/golang.org/x/crypto/codereview.cfg | 1 - .../golang.org/x/crypto/ssh/benchmark_test.go | 122 - vendor/golang.org/x/crypto/ssh/buffer.go | 97 - vendor/golang.org/x/crypto/ssh/buffer_test.go | 87 - vendor/golang.org/x/crypto/ssh/certs.go | 519 - vendor/golang.org/x/crypto/ssh/certs_test.go | 222 - vendor/golang.org/x/crypto/ssh/channel.go | 633 - vendor/golang.org/x/crypto/ssh/cipher.go | 629 - vendor/golang.org/x/crypto/ssh/cipher_test.go | 129 - vendor/golang.org/x/crypto/ssh/client.go | 257 - vendor/golang.org/x/crypto/ssh/client_auth.go | 486 - .../x/crypto/ssh/client_auth_test.go | 628 - vendor/golang.org/x/crypto/ssh/client_test.go | 81 - vendor/golang.org/x/crypto/ssh/common.go | 373 - vendor/golang.org/x/crypto/ssh/connection.go | 143 - vendor/golang.org/x/crypto/ssh/doc.go | 21 - .../golang.org/x/crypto/ssh/example_test.go | 320 - vendor/golang.org/x/crypto/ssh/handshake.go | 640 - .../golang.org/x/crypto/ssh/handshake_test.go | 559 - vendor/golang.org/x/crypto/ssh/kex.go | 540 - vendor/golang.org/x/crypto/ssh/kex_test.go | 50 - vendor/golang.org/x/crypto/ssh/keys.go | 1031 - vendor/golang.org/x/crypto/ssh/keys_test.go | 500 - vendor/golang.org/x/crypto/ssh/mac.go | 61 - .../golang.org/x/crypto/ssh/mempipe_test.go | 110 - vendor/golang.org/x/crypto/ssh/messages.go | 758 - .../golang.org/x/crypto/ssh/messages_test.go | 288 - vendor/golang.org/x/crypto/ssh/mux.go | 330 - vendor/golang.org/x/crypto/ssh/mux_test.go | 505 - vendor/golang.org/x/crypto/ssh/server.go | 563 - vendor/golang.org/x/crypto/ssh/session.go | 647 - .../golang.org/x/crypto/ssh/session_test.go | 774 - vendor/golang.org/x/crypto/ssh/streamlocal.go | 115 - vendor/golang.org/x/crypto/ssh/tcpip.go | 465 - vendor/golang.org/x/crypto/ssh/tcpip_test.go | 20 - .../x/crypto/ssh/terminal/terminal.go | 951 - .../x/crypto/ssh/terminal/terminal_test.go | 350 - .../golang.org/x/crypto/ssh/terminal/util.go | 123 - .../x/crypto/ssh/terminal/util_bsd.go | 12 - .../x/crypto/ssh/terminal/util_linux.go | 10 - .../x/crypto/ssh/terminal/util_plan9.go | 58 - .../x/crypto/ssh/terminal/util_solaris.go | 128 - .../x/crypto/ssh/terminal/util_windows.go | 102 - .../golang.org/x/crypto/ssh/testdata_test.go | 63 - vendor/golang.org/x/crypto/ssh/transport.go | 375 - .../golang.org/x/crypto/ssh/transport_test.go | 109 - vendor/golang.org/x/net/.gitattributes | 10 - vendor/golang.org/x/net/.gitignore | 2 - vendor/golang.org/x/net/CONTRIBUTING.md | 31 - vendor/golang.org/x/net/README.md | 16 - vendor/golang.org/x/net/codereview.cfg | 1 - vendor/golang.org/x/net/context/context.go | 2 + .../golang.org/x/net/context/context_test.go | 583 - .../x/net/context/ctxhttp/ctxhttp_17_test.go | 29 - .../net/context/ctxhttp/ctxhttp_pre17_test.go | 79 - .../x/net/context/ctxhttp/ctxhttp_test.go | 105 - .../x/net/context/withtimeout_test.go | 31 - vendor/golang.org/x/oauth2/.travis.yml | 13 - vendor/golang.org/x/oauth2/CONTRIBUTING.md | 31 - vendor/golang.org/x/oauth2/README.md | 77 - .../golang.org/x/oauth2/client_appengine.go | 25 - vendor/golang.org/x/oauth2/example_test.go | 89 - .../x/oauth2/internal/client_appengine.go | 13 + vendor/golang.org/x/oauth2/internal/oauth2.go | 38 - .../x/oauth2/internal/oauth2_test.go | 61 - vendor/golang.org/x/oauth2/internal/token.go | 39 +- .../x/oauth2/internal/token_test.go | 104 - .../golang.org/x/oauth2/internal/transport.go | 46 +- .../x/oauth2/internal/transport_test.go | 38 - vendor/golang.org/x/oauth2/oauth2.go | 58 +- vendor/golang.org/x/oauth2/oauth2_test.go | 490 - vendor/golang.org/x/oauth2/token.go | 21 +- vendor/golang.org/x/oauth2/token_test.go | 72 - vendor/golang.org/x/oauth2/transport.go | 16 +- vendor/golang.org/x/oauth2/transport_test.go | 108 - vendor/golang.org/x/sys/.gitattributes | 10 - vendor/golang.org/x/sys/.gitignore | 2 - vendor/golang.org/x/sys/AUTHORS | 3 - vendor/golang.org/x/sys/CONTRIBUTING.md | 31 - vendor/golang.org/x/sys/CONTRIBUTORS | 3 - vendor/golang.org/x/sys/LICENSE | 27 - vendor/golang.org/x/sys/PATENTS | 22 - vendor/golang.org/x/sys/README.md | 18 - vendor/golang.org/x/sys/codereview.cfg | 1 - vendor/golang.org/x/sys/unix/.gitignore | 1 - vendor/golang.org/x/sys/unix/README.md | 173 - vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 - .../golang.org/x/sys/unix/asm_darwin_amd64.s | 29 - vendor/golang.org/x/sys/unix/asm_darwin_arm.s | 30 - .../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 - .../x/sys/unix/asm_dragonfly_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_386.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 - vendor/golang.org/x/sys/unix/asm_linux_386.s | 35 - .../golang.org/x/sys/unix/asm_linux_amd64.s | 29 - vendor/golang.org/x/sys/unix/asm_linux_arm.s | 29 - .../golang.org/x/sys/unix/asm_linux_arm64.s | 24 - .../golang.org/x/sys/unix/asm_linux_mips64x.s | 28 - .../golang.org/x/sys/unix/asm_linux_mipsx.s | 31 - .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 28 - .../golang.org/x/sys/unix/asm_linux_s390x.s | 28 - vendor/golang.org/x/sys/unix/asm_netbsd_386.s | 29 - .../golang.org/x/sys/unix/asm_netbsd_amd64.s | 29 - vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_386.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 - .../golang.org/x/sys/unix/asm_openbsd_arm.s | 29 - .../golang.org/x/sys/unix/asm_solaris_amd64.s | 17 - .../golang.org/x/sys/unix/bluetooth_linux.go | 35 - vendor/golang.org/x/sys/unix/cap_freebsd.go | 195 - vendor/golang.org/x/sys/unix/constants.go | 13 - vendor/golang.org/x/sys/unix/creds_test.go | 136 - vendor/golang.org/x/sys/unix/dev_darwin.go | 24 - .../golang.org/x/sys/unix/dev_darwin_test.go | 49 - vendor/golang.org/x/sys/unix/dev_dragonfly.go | 30 - .../x/sys/unix/dev_dragonfly_test.go | 48 - vendor/golang.org/x/sys/unix/dev_freebsd.go | 30 - vendor/golang.org/x/sys/unix/dev_linux.go | 42 - .../golang.org/x/sys/unix/dev_linux_test.go | 51 - vendor/golang.org/x/sys/unix/dev_netbsd.go | 29 - .../golang.org/x/sys/unix/dev_netbsd_test.go | 50 - vendor/golang.org/x/sys/unix/dev_openbsd.go | 29 - .../golang.org/x/sys/unix/dev_openbsd_test.go | 52 - .../golang.org/x/sys/unix/dev_solaris_test.go | 49 - vendor/golang.org/x/sys/unix/dirent.go | 102 - vendor/golang.org/x/sys/unix/endian_big.go | 9 - vendor/golang.org/x/sys/unix/endian_little.go | 9 - vendor/golang.org/x/sys/unix/env_unix.go | 27 - vendor/golang.org/x/sys/unix/env_unset.go | 14 - .../x/sys/unix/errors_freebsd_386.go | 227 - .../x/sys/unix/errors_freebsd_amd64.go | 227 - .../x/sys/unix/errors_freebsd_arm.go | 226 - vendor/golang.org/x/sys/unix/export_test.go | 9 - vendor/golang.org/x/sys/unix/file_unix.go | 27 - vendor/golang.org/x/sys/unix/flock.go | 22 - .../x/sys/unix/flock_linux_32bit.go | 13 - vendor/golang.org/x/sys/unix/gccgo.go | 46 - vendor/golang.org/x/sys/unix/gccgo_c.c | 41 - .../x/sys/unix/gccgo_linux_amd64.go | 20 - vendor/golang.org/x/sys/unix/mkall.sh | 197 - vendor/golang.org/x/sys/unix/mkerrors.sh | 565 - vendor/golang.org/x/sys/unix/mkpost.go | 88 - vendor/golang.org/x/sys/unix/mksyscall.pl | 328 - .../x/sys/unix/mksyscall_solaris.pl | 289 - .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 - .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 - .../x/sys/unix/mksysnum_dragonfly.pl | 50 - .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 50 - .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 - .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 - .../golang.org/x/sys/unix/mmap_unix_test.go | 35 - .../golang.org/x/sys/unix/openbsd_pledge.go | 38 - vendor/golang.org/x/sys/unix/openbsd_test.go | 113 - vendor/golang.org/x/sys/unix/pagesize_unix.go | 15 - vendor/golang.org/x/sys/unix/race.go | 30 - vendor/golang.org/x/sys/unix/race0.go | 25 - .../golang.org/x/sys/unix/sockcmsg_linux.go | 36 - vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 104 - vendor/golang.org/x/sys/unix/str.go | 26 - vendor/golang.org/x/sys/unix/syscall.go | 69 - vendor/golang.org/x/sys/unix/syscall_bsd.go | 635 - .../golang.org/x/sys/unix/syscall_bsd_test.go | 62 - .../golang.org/x/sys/unix/syscall_darwin.go | 536 - .../x/sys/unix/syscall_darwin_386.go | 75 - .../x/sys/unix/syscall_darwin_amd64.go | 75 - .../x/sys/unix/syscall_darwin_arm.go | 69 - .../x/sys/unix/syscall_darwin_arm64.go | 75 - .../x/sys/unix/syscall_dragonfly.go | 415 - .../x/sys/unix/syscall_dragonfly_amd64.go | 59 - .../golang.org/x/sys/unix/syscall_freebsd.go | 708 - .../x/sys/unix/syscall_freebsd_386.go | 59 - .../x/sys/unix/syscall_freebsd_amd64.go | 59 - .../x/sys/unix/syscall_freebsd_arm.go | 59 - .../x/sys/unix/syscall_freebsd_test.go | 297 - vendor/golang.org/x/sys/unix/syscall_linux.go | 1469 - .../x/sys/unix/syscall_linux_386.go | 397 - .../x/sys/unix/syscall_linux_amd64.go | 150 - .../x/sys/unix/syscall_linux_amd64_gc.go | 13 - .../x/sys/unix/syscall_linux_arm.go | 261 - .../x/sys/unix/syscall_linux_arm64.go | 188 - .../x/sys/unix/syscall_linux_mips64x.go | 207 - .../x/sys/unix/syscall_linux_mipsx.go | 237 - .../x/sys/unix/syscall_linux_ppc64x.go | 133 - .../x/sys/unix/syscall_linux_s390x.go | 326 - .../x/sys/unix/syscall_linux_sparc64.go | 149 - .../x/sys/unix/syscall_linux_test.go | 234 - .../golang.org/x/sys/unix/syscall_netbsd.go | 472 - .../x/sys/unix/syscall_netbsd_386.go | 40 - .../x/sys/unix/syscall_netbsd_amd64.go | 40 - .../x/sys/unix/syscall_netbsd_arm.go | 40 - .../golang.org/x/sys/unix/syscall_no_getwd.go | 11 - .../golang.org/x/sys/unix/syscall_openbsd.go | 282 - .../x/sys/unix/syscall_openbsd_386.go | 40 - .../x/sys/unix/syscall_openbsd_amd64.go | 40 - .../x/sys/unix/syscall_openbsd_arm.go | 40 - .../golang.org/x/sys/unix/syscall_solaris.go | 719 - .../x/sys/unix/syscall_solaris_amd64.go | 35 - .../x/sys/unix/syscall_solaris_test.go | 34 - vendor/golang.org/x/sys/unix/syscall_test.go | 50 - vendor/golang.org/x/sys/unix/syscall_unix.go | 293 - .../golang.org/x/sys/unix/syscall_unix_gc.go | 15 - .../x/sys/unix/syscall_unix_test.go | 345 - vendor/golang.org/x/sys/unix/types_darwin.go | 254 - .../golang.org/x/sys/unix/types_dragonfly.go | 249 - vendor/golang.org/x/sys/unix/types_freebsd.go | 372 - vendor/golang.org/x/sys/unix/types_netbsd.go | 239 - vendor/golang.org/x/sys/unix/types_openbsd.go | 251 - vendor/golang.org/x/sys/unix/types_solaris.go | 265 - .../x/sys/unix/zerrors_darwin_386.go | 1673 - .../x/sys/unix/zerrors_darwin_amd64.go | 1673 - .../x/sys/unix/zerrors_darwin_arm.go | 1673 - .../x/sys/unix/zerrors_darwin_arm64.go | 1673 - .../x/sys/unix/zerrors_dragonfly_amd64.go | 1568 - .../x/sys/unix/zerrors_freebsd_386.go | 1706 - .../x/sys/unix/zerrors_freebsd_amd64.go | 1707 - .../x/sys/unix/zerrors_freebsd_arm.go | 1715 - .../x/sys/unix/zerrors_linux_386.go | 2231 - .../x/sys/unix/zerrors_linux_amd64.go | 2232 - .../x/sys/unix/zerrors_linux_arm.go | 2236 - .../x/sys/unix/zerrors_linux_arm64.go | 2222 - .../x/sys/unix/zerrors_linux_mips.go | 2241 - .../x/sys/unix/zerrors_linux_mips64.go | 2241 - .../x/sys/unix/zerrors_linux_mips64le.go | 2241 - .../x/sys/unix/zerrors_linux_mipsle.go | 2241 - .../x/sys/unix/zerrors_linux_ppc64.go | 2294 - .../x/sys/unix/zerrors_linux_ppc64le.go | 2294 - .../x/sys/unix/zerrors_linux_s390x.go | 2293 - .../x/sys/unix/zerrors_linux_sparc64.go | 2142 - .../x/sys/unix/zerrors_netbsd_386.go | 1712 - .../x/sys/unix/zerrors_netbsd_amd64.go | 1702 - .../x/sys/unix/zerrors_netbsd_arm.go | 1691 - .../x/sys/unix/zerrors_openbsd_386.go | 1584 - .../x/sys/unix/zerrors_openbsd_amd64.go | 1583 - .../x/sys/unix/zerrors_openbsd_arm.go | 1586 - .../x/sys/unix/zerrors_solaris_amd64.go | 1489 - .../x/sys/unix/zsyscall_darwin_386.go | 1609 - .../x/sys/unix/zsyscall_darwin_amd64.go | 1609 - .../x/sys/unix/zsyscall_darwin_arm.go | 1609 - .../x/sys/unix/zsyscall_darwin_arm64.go | 1609 - .../x/sys/unix/zsyscall_dragonfly_amd64.go | 1440 - .../x/sys/unix/zsyscall_freebsd_386.go | 1877 - .../x/sys/unix/zsyscall_freebsd_amd64.go | 1877 - .../x/sys/unix/zsyscall_freebsd_arm.go | 1877 - .../x/sys/unix/zsyscall_linux_386.go | 1953 - .../x/sys/unix/zsyscall_linux_amd64.go | 2146 - .../x/sys/unix/zsyscall_linux_arm.go | 2055 - .../x/sys/unix/zsyscall_linux_arm64.go | 2029 - .../x/sys/unix/zsyscall_linux_mips.go | 2111 - .../x/sys/unix/zsyscall_linux_mips64.go | 2105 - .../x/sys/unix/zsyscall_linux_mips64le.go | 2105 - .../x/sys/unix/zsyscall_linux_mipsle.go | 2111 - .../x/sys/unix/zsyscall_linux_ppc64.go | 2157 - .../x/sys/unix/zsyscall_linux_ppc64le.go | 2157 - .../x/sys/unix/zsyscall_linux_s390x.go | 1937 - .../x/sys/unix/zsyscall_linux_sparc64.go | 1833 - .../x/sys/unix/zsyscall_netbsd_386.go | 1346 - .../x/sys/unix/zsyscall_netbsd_amd64.go | 1346 - .../x/sys/unix/zsyscall_netbsd_arm.go | 1346 - .../x/sys/unix/zsyscall_openbsd_386.go | 1404 - .../x/sys/unix/zsyscall_openbsd_amd64.go | 1404 - .../x/sys/unix/zsyscall_openbsd_arm.go | 1404 - .../x/sys/unix/zsyscall_solaris_amd64.go | 1630 - .../golang.org/x/sys/unix/zsysctl_openbsd.go | 270 - .../x/sys/unix/zsysnum_darwin_386.go | 398 - .../x/sys/unix/zsysnum_darwin_amd64.go | 398 - .../x/sys/unix/zsysnum_darwin_arm.go | 426 - .../x/sys/unix/zsysnum_darwin_arm64.go | 426 - .../x/sys/unix/zsysnum_dragonfly_amd64.go | 315 - .../x/sys/unix/zsysnum_freebsd_386.go | 353 - .../x/sys/unix/zsysnum_freebsd_amd64.go | 353 - .../x/sys/unix/zsysnum_freebsd_arm.go | 353 - .../x/sys/unix/zsysnum_linux_386.go | 390 - .../x/sys/unix/zsysnum_linux_amd64.go | 342 - .../x/sys/unix/zsysnum_linux_arm.go | 362 - .../x/sys/unix/zsysnum_linux_arm64.go | 286 - .../x/sys/unix/zsysnum_linux_mips.go | 375 - .../x/sys/unix/zsysnum_linux_mips64.go | 335 - .../x/sys/unix/zsysnum_linux_mips64le.go | 335 - .../x/sys/unix/zsysnum_linux_mipsle.go | 375 - .../x/sys/unix/zsysnum_linux_ppc64.go | 370 - .../x/sys/unix/zsysnum_linux_ppc64le.go | 370 - .../x/sys/unix/zsysnum_linux_s390x.go | 333 - .../x/sys/unix/zsysnum_linux_sparc64.go | 348 - .../x/sys/unix/zsysnum_netbsd_386.go | 274 - .../x/sys/unix/zsysnum_netbsd_amd64.go | 274 - .../x/sys/unix/zsysnum_netbsd_arm.go | 274 - .../x/sys/unix/zsysnum_openbsd_386.go | 207 - .../x/sys/unix/zsysnum_openbsd_amd64.go | 207 - .../x/sys/unix/zsysnum_openbsd_arm.go | 213 - .../x/sys/unix/zsysnum_solaris_amd64.go | 13 - .../x/sys/unix/ztypes_darwin_386.go | 462 - .../x/sys/unix/ztypes_darwin_amd64.go | 472 - .../x/sys/unix/ztypes_darwin_arm.go | 463 - .../x/sys/unix/ztypes_darwin_arm64.go | 471 - .../x/sys/unix/ztypes_dragonfly_amd64.go | 448 - .../x/sys/unix/ztypes_freebsd_386.go | 521 - .../x/sys/unix/ztypes_freebsd_amd64.go | 524 - .../x/sys/unix/ztypes_freebsd_arm.go | 524 - .../golang.org/x/sys/unix/ztypes_linux_386.go | 793 - .../x/sys/unix/ztypes_linux_amd64.go | 811 - .../golang.org/x/sys/unix/ztypes_linux_arm.go | 782 - .../x/sys/unix/ztypes_linux_arm64.go | 790 - .../x/sys/unix/ztypes_linux_mips.go | 787 - .../x/sys/unix/ztypes_linux_mips64.go | 792 - .../x/sys/unix/ztypes_linux_mips64le.go | 792 - .../x/sys/unix/ztypes_linux_mipsle.go | 787 - .../x/sys/unix/ztypes_linux_ppc64.go | 800 - .../x/sys/unix/ztypes_linux_ppc64le.go | 800 - .../x/sys/unix/ztypes_linux_s390x.go | 817 - .../x/sys/unix/ztypes_linux_sparc64.go | 666 - .../x/sys/unix/ztypes_netbsd_386.go | 401 - .../x/sys/unix/ztypes_netbsd_amd64.go | 408 - .../x/sys/unix/ztypes_netbsd_arm.go | 406 - .../x/sys/unix/ztypes_openbsd_386.go | 446 - .../x/sys/unix/ztypes_openbsd_amd64.go | 453 - .../x/sys/unix/ztypes_openbsd_arm.go | 439 - .../x/sys/unix/ztypes_solaris_amd64.go | 440 - .../x/sys/windows/asm_windows_386.s | 13 - .../x/sys/windows/asm_windows_amd64.s | 13 - .../golang.org/x/sys/windows/dll_windows.go | 377 - vendor/golang.org/x/sys/windows/env_unset.go | 15 - .../golang.org/x/sys/windows/env_windows.go | 25 - vendor/golang.org/x/sys/windows/eventlog.go | 20 - .../golang.org/x/sys/windows/exec_windows.go | 97 - .../x/sys/windows/memory_windows.go | 26 - vendor/golang.org/x/sys/windows/mksyscall.go | 7 - vendor/golang.org/x/sys/windows/race.go | 30 - vendor/golang.org/x/sys/windows/race0.go | 25 - .../x/sys/windows/security_windows.go | 435 - vendor/golang.org/x/sys/windows/service.go | 164 - vendor/golang.org/x/sys/windows/str.go | 22 - vendor/golang.org/x/sys/windows/syscall.go | 71 - .../golang.org/x/sys/windows/syscall_test.go | 33 - .../x/sys/windows/syscall_windows.go | 1009 - .../x/sys/windows/syscall_windows_test.go | 107 - .../golang.org/x/sys/windows/types_windows.go | 1282 - .../x/sys/windows/types_windows_386.go | 22 - .../x/sys/windows/types_windows_amd64.go | 22 - .../x/sys/windows/zsyscall_windows.go | 2428 - vendor/golang.org/x/text/.gitattributes | 10 - vendor/golang.org/x/text/.gitignore | 6 - vendor/golang.org/x/text/AUTHORS | 3 - vendor/golang.org/x/text/CONTRIBUTING.md | 31 - vendor/golang.org/x/text/CONTRIBUTORS | 3 - vendor/golang.org/x/text/LICENSE | 27 - vendor/golang.org/x/text/PATENTS | 22 - vendor/golang.org/x/text/README.md | 63 - vendor/golang.org/x/text/codereview.cfg | 1 - vendor/golang.org/x/text/doc.go | 13 - vendor/golang.org/x/text/gen.go | 318 - vendor/golang.org/x/text/internal/gen.go | 52 - vendor/golang.org/x/text/internal/gen/code.go | 351 - vendor/golang.org/x/text/internal/gen/gen.go | 281 - vendor/golang.org/x/text/internal/gen_test.go | 38 - vendor/golang.org/x/text/internal/internal.go | 51 - .../x/text/internal/internal_test.go | 38 - vendor/golang.org/x/text/internal/match.go | 67 - .../golang.org/x/text/internal/match_test.go | 56 - vendor/golang.org/x/text/internal/tables.go | 117 - .../x/text/internal/triegen/compact.go | 58 - .../x/text/internal/triegen/data_test.go | 875 - .../internal/triegen/example_compact_test.go | 71 - .../x/text/internal/triegen/example_test.go | 148 - .../x/text/internal/triegen/gen_test.go | 68 - .../x/text/internal/triegen/print.go | 251 - .../x/text/internal/triegen/triegen.go | 494 - .../x/text/internal/ucd/example_test.go | 81 - vendor/golang.org/x/text/internal/ucd/ucd.go | 371 - .../x/text/internal/ucd/ucd_test.go | 105 - .../x/text/transform/examples_test.go | 37 - .../golang.org/x/text/transform/transform.go | 705 - .../x/text/transform/transform_test.go | 1317 - vendor/golang.org/x/text/unicode/cldr/base.go | 100 - vendor/golang.org/x/text/unicode/cldr/cldr.go | 130 - .../x/text/unicode/cldr/cldr_test.go | 27 - .../golang.org/x/text/unicode/cldr/collate.go | 359 - .../x/text/unicode/cldr/collate_test.go | 275 - .../x/text/unicode/cldr/data_test.go | 186 - .../golang.org/x/text/unicode/cldr/decode.go | 171 - .../x/text/unicode/cldr/examples_test.go | 21 - .../golang.org/x/text/unicode/cldr/makexml.go | 400 - .../golang.org/x/text/unicode/cldr/resolve.go | 602 - .../x/text/unicode/cldr/resolve_test.go | 368 - .../golang.org/x/text/unicode/cldr/slice.go | 144 - .../x/text/unicode/cldr/slice_test.go | 175 - vendor/golang.org/x/text/unicode/cldr/xml.go | 1487 - vendor/golang.org/x/text/unicode/doc.go | 8 - .../x/text/unicode/norm/composition.go | 508 - .../x/text/unicode/norm/composition_test.go | 130 - .../x/text/unicode/norm/example_iter_test.go | 82 - .../x/text/unicode/norm/example_test.go | 27 - .../x/text/unicode/norm/forminfo.go | 259 - .../x/text/unicode/norm/forminfo_test.go | 54 - .../golang.org/x/text/unicode/norm/input.go | 109 - vendor/golang.org/x/text/unicode/norm/iter.go | 457 - .../x/text/unicode/norm/iter_test.go | 98 - .../x/text/unicode/norm/maketables.go | 976 - .../x/text/unicode/norm/norm_test.go | 14 - .../x/text/unicode/norm/normalize.go | 609 - .../x/text/unicode/norm/normalize_test.go | 1287 - .../x/text/unicode/norm/readwriter.go | 125 - .../x/text/unicode/norm/readwriter_test.go | 56 - .../golang.org/x/text/unicode/norm/tables.go | 7651 - .../x/text/unicode/norm/transform.go | 88 - .../x/text/unicode/norm/transform_test.go | 101 - vendor/golang.org/x/text/unicode/norm/trie.go | 54 - .../golang.org/x/text/unicode/norm/triegen.go | 117 - .../x/text/unicode/norm/ucd_test.go | 275 - .../google.golang.org/appengine/.travis.yml | 18 - vendor/google.golang.org/appengine/README.md | 73 - .../google.golang.org/appengine/appengine.go | 112 - .../appengine/appengine_test.go | 49 - .../appengine/appengine_vm.go | 20 - vendor/google.golang.org/appengine/errors.go | 46 - .../google.golang.org/appengine/identity.go | 142 - .../appengine/internal/api.go | 646 - .../appengine/internal/api_classic.go | 159 - .../appengine/internal/api_common.go | 86 - .../appengine/internal/api_race_test.go | 9 - .../appengine/internal/api_test.go | 467 - .../appengine/internal/app_id.go | 28 - .../appengine/internal/app_id_test.go | 34 - .../appengine/internal/base/api_base.pb.go | 133 - .../appengine/internal/base/api_base.proto | 33 - .../internal/datastore/datastore_v3.pb.go | 2778 - .../internal/datastore/datastore_v3.proto | 541 - .../appengine/internal/identity.go | 14 - .../appengine/internal/identity_classic.go | 27 - .../appengine/internal/identity_vm.go | 97 - .../appengine/internal/internal.go | 110 - .../appengine/internal/internal_vm_test.go | 60 - .../appengine/internal/log/log_service.pb.go | 899 - .../appengine/internal/log/log_service.proto | 150 - .../appengine/internal/main.go | 15 - .../appengine/internal/main_vm.go | 44 - .../appengine/internal/metadata.go | 61 - .../appengine/internal/net.go | 56 - .../appengine/internal/net_test.go | 58 - .../appengine/internal/regen.sh | 40 - .../internal/remote_api/remote_api.pb.go | 231 - .../internal/remote_api/remote_api.proto | 44 - .../appengine/internal/transaction.go | 107 - .../internal/urlfetch/urlfetch_service.pb.go | 355 - .../internal/urlfetch/urlfetch_service.proto | 64 - .../google.golang.org/appengine/namespace.go | 25 - .../appengine/namespace_test.go | 39 - vendor/google.golang.org/appengine/timeout.go | 20 - .../appengine/urlfetch/urlfetch.go | 210 - .../go-playground/validator.v9/.gitignore | 29 - .../go-playground/validator.v9/README.md | 140 - .../go-playground/validator.v9/baked_in.go | 1509 - .../validator.v9/benchmarks_test.go | 1080 - .../go-playground/validator.v9/cache.go | 272 - .../go-playground/validator.v9/doc.go | 860 - .../go-playground/validator.v9/errors.go | 272 - .../validator.v9/examples_test.go | 83 - .../go-playground/validator.v9/field_level.go | 69 - .../go-playground/validator.v9/logo.png | Bin 13443 -> 0 bytes .../go-playground/validator.v9/regexes.go | 65 - .../validator.v9/struct_level.go | 175 - .../validator.v9/translations.go | 11 - .../go-playground/validator.v9/util.go | 257 - .../go-playground/validator.v9/validator.go | 474 - .../validator.v9/validator_instance.go | 623 - .../validator.v9/validator_test.go | 7274 - vendor/gopkg.in/yaml.v2/.travis.yml | 9 - vendor/gopkg.in/yaml.v2/NOTICE | 13 + vendor/gopkg.in/yaml.v2/README.md | 133 - vendor/gopkg.in/yaml.v2/apic.go | 55 +- vendor/gopkg.in/yaml.v2/decode.go | 240 +- vendor/gopkg.in/yaml.v2/decode_test.go | 1017 - vendor/gopkg.in/yaml.v2/emitterc.go | 11 +- vendor/gopkg.in/yaml.v2/encode.go | 136 +- vendor/gopkg.in/yaml.v2/encode_test.go | 501 - .../gopkg.in/yaml.v2/example_embedded_test.go | 41 - vendor/gopkg.in/yaml.v2/readerc.go | 20 +- vendor/gopkg.in/yaml.v2/resolve.go | 80 +- vendor/gopkg.in/yaml.v2/scannerc.go | 29 +- vendor/gopkg.in/yaml.v2/sorter.go | 9 + vendor/gopkg.in/yaml.v2/suite_test.go | 12 - vendor/gopkg.in/yaml.v2/writerc.go | 65 +- vendor/gopkg.in/yaml.v2/yaml.go | 125 +- vendor/gopkg.in/yaml.v2/yamlh.go | 30 +- vendor/vendor.json | 13 - version/version.go | 13 +- 1506 files changed, 37404 insertions(+), 621104 deletions(-) delete mode 100644 .gitattributes delete mode 100644 Dockerfile delete mode 100644 auth/auth.go create mode 100644 bulldozer/config_fetcher.go rename middleware/context.go => bulldozer/config_v0.go (50%) create mode 100644 bulldozer/config_v1.go create mode 100644 bulldozer/evaluate.go create mode 100644 bulldozer/evaluate_test.go create mode 100644 bulldozer/merge.go create mode 100644 bulldozer/update.go delete mode 100644 client/package.json delete mode 100644 client/src/favicons/android-icon-144x144.png delete mode 100644 client/src/favicons/android-icon-192x192.png delete mode 100644 client/src/favicons/android-icon-36x36.png delete mode 100644 client/src/favicons/android-icon-48x48.png delete mode 100644 client/src/favicons/android-icon-72x72.png delete mode 100644 client/src/favicons/android-icon-96x96.png delete mode 100644 client/src/favicons/apple-icon-114x114.png delete mode 100644 client/src/favicons/apple-icon-120x120.png delete mode 100644 client/src/favicons/apple-icon-144x144.png delete mode 100644 client/src/favicons/apple-icon-152x152.png delete mode 100644 client/src/favicons/apple-icon-180x180.png delete mode 100644 client/src/favicons/apple-icon-57x57.png delete mode 100644 client/src/favicons/apple-icon-60x60.png delete mode 100644 client/src/favicons/apple-icon-72x72.png delete mode 100644 client/src/favicons/apple-icon-76x76.png delete mode 100644 client/src/favicons/apple-icon-precomposed.png delete mode 100644 client/src/favicons/apple-icon.png delete mode 100644 client/src/favicons/browserconfig.xml delete mode 100644 client/src/favicons/favicon-16x16.png delete mode 100644 client/src/favicons/favicon-32x32.png delete mode 100644 client/src/favicons/favicon-96x96.png delete mode 100644 client/src/favicons/favicon.ico delete mode 100644 client/src/favicons/manifest.json delete mode 100644 client/src/favicons/ms-icon-144x144.png delete mode 100644 client/src/favicons/ms-icon-150x150.png delete mode 100644 client/src/favicons/ms-icon-310x310.png delete mode 100644 client/src/favicons/ms-icon-70x70.png delete mode 100644 client/src/index.html delete mode 100644 client/src/index.js delete mode 100644 client/webpack.config.js delete mode 100644 client/yarn.lock create mode 100644 config/bulldozer.example.yml create mode 100644 config/examples/standard.bulldozer.v1.yml create mode 100644 docker/Dockerfile create mode 100644 docker/ca-certificates.crt delete mode 100644 github/github.go delete mode 100644 github/github_test.go delete mode 100644 github/hook_processor.go create mode 100644 godel/config/check-plugin.yml delete mode 100644 godel/config/check.yml rename godel/config/{generate.yml => conjure-plugin.yml} (100%) create mode 100644 godel/config/dist-plugin.yml delete mode 100644 godel/config/dist.yml delete mode 100644 godel/config/exclude.yml create mode 100644 godel/config/format-plugin.yml delete mode 100644 godel/config/format.yml create mode 100644 godel/config/godel.yml delete mode 100644 godel/config/imports.yml rename godel/config/{license.yml => license-plugin.yml} (91%) create mode 100644 godel/config/test-plugin.yml delete mode 100644 godel/config/test.yml delete mode 100644 persist/repo.go delete mode 100644 persist/schema.go delete mode 100644 persist/user.go create mode 100644 pull/context.go create mode 100644 pull/github_context.go create mode 100644 pull/pull_requests.go create mode 100644 pull/pulltest/mock_context.go delete mode 100755 scripts/make_client.sh delete mode 100755 scripts/publish_docker.sh create mode 100644 server/config.go delete mode 100644 server/config/config.go delete mode 100644 server/endpoints/hook.go delete mode 100644 server/endpoints/repositories.go delete mode 100644 server/endpoints/token.go create mode 100644 server/handler/base.go rename server/{endpoints => handler}/health.go (61%) create mode 100644 server/handler/issue_comment.go create mode 100644 server/handler/pull_request_review.go create mode 100644 server/handler/push.go create mode 100644 server/handler/status.go delete mode 100644 server/init.go create mode 100644 vendor/github.com/DataDog/datadog-go/LICENSE.txt create mode 100644 vendor/github.com/DataDog/datadog-go/statsd/statsd.go create mode 100644 vendor/github.com/DataDog/datadog-go/statsd/udp.go create mode 100644 vendor/github.com/DataDog/datadog-go/statsd/uds.go delete mode 100644 vendor/github.com/antonlindstrom/pgstore/.travis.yml delete mode 100644 vendor/github.com/antonlindstrom/pgstore/Makefile delete mode 100644 vendor/github.com/antonlindstrom/pgstore/README.md delete mode 100644 vendor/github.com/antonlindstrom/pgstore/cleanup.go delete mode 100644 vendor/github.com/antonlindstrom/pgstore/cleanup_test.go delete mode 100644 vendor/github.com/antonlindstrom/pgstore/pgstore.go delete mode 100644 vendor/github.com/antonlindstrom/pgstore/pgstore_test.go rename vendor/github.com/{labstack/echo => bluekeyes/hatpear}/LICENSE (95%) create mode 100644 vendor/github.com/bluekeyes/hatpear/hatpear.go delete mode 100644 vendor/github.com/boj/redistore/.gitignore delete mode 100644 vendor/github.com/boj/redistore/LICENSE delete mode 100644 vendor/github.com/boj/redistore/README.md delete mode 100644 vendor/github.com/boj/redistore/doc.go delete mode 100644 vendor/github.com/boj/redistore/redistore.go delete mode 100644 vendor/github.com/boj/redistore/redistore_test.go create mode 100644 vendor/github.com/bradleyfalzon/ghinstallation/LICENSE create mode 100644 vendor/github.com/bradleyfalzon/ghinstallation/appsTransport.go create mode 100644 vendor/github.com/bradleyfalzon/ghinstallation/transport.go delete mode 100644 vendor/github.com/davecgh/go-spew/.gitignore delete mode 100644 vendor/github.com/davecgh/go-spew/.travis.yml delete mode 100644 vendor/github.com/davecgh/go-spew/README.md delete mode 100644 vendor/github.com/davecgh/go-spew/cov_report.sh delete mode 100644 vendor/github.com/davecgh/go-spew/spew/common_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dump_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/example_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/format_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/internal_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/spew/spew_test.go delete mode 100644 vendor/github.com/davecgh/go-spew/test_coverage.txt delete mode 100644 vendor/github.com/dgrijalva/jwt-go/.gitignore delete mode 100644 vendor/github.com/dgrijalva/jwt-go/.travis.yml delete mode 100644 vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md delete mode 100644 vendor/github.com/dgrijalva/jwt-go/README.md delete mode 100644 vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md delete mode 100644 vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/example_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/hmac_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/http_example_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/none_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/parser_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go delete mode 100644 vendor/github.com/dgrijalva/jwt-go/rsa_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/.editorconfig delete mode 100644 vendor/github.com/fsnotify/fsnotify/.gitignore delete mode 100644 vendor/github.com/fsnotify/fsnotify/.travis.yml delete mode 100644 vendor/github.com/fsnotify/fsnotify/AUTHORS delete mode 100644 vendor/github.com/fsnotify/fsnotify/CHANGELOG.md delete mode 100644 vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md delete mode 100644 vendor/github.com/fsnotify/fsnotify/LICENSE delete mode 100644 vendor/github.com/fsnotify/fsnotify/README.md delete mode 100644 vendor/github.com/fsnotify/fsnotify/example_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/fen.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/fsnotify_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_poller.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/inotify_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/integration_test.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/kqueue.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go delete mode 100644 vendor/github.com/fsnotify/fsnotify/windows.go delete mode 100644 vendor/github.com/garyburd/redigo/.travis.yml delete mode 100644 vendor/github.com/garyburd/redigo/README.markdown delete mode 100644 vendor/github.com/garyburd/redigo/internal/commandinfo.go delete mode 100644 vendor/github.com/garyburd/redigo/internal/commandinfo_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/conn.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/conn_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/doc.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/go17.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/log.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/pool.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/pool_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/pre_go17.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/pubsub.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/pubsub_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/redis.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/reply.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/reply_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/scan.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/scan_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/script.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/script_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/test_test.go delete mode 100644 vendor/github.com/garyburd/redigo/redis/zpop_example_test.go delete mode 100644 vendor/github.com/go-playground/locales/.gitignore delete mode 100644 vendor/github.com/go-playground/locales/README.md delete mode 100644 vendor/github.com/go-playground/locales/cu/cu.go delete mode 100644 vendor/github.com/go-playground/locales/cu/cu_test.go delete mode 100644 vendor/github.com/go-playground/locales/currency/currency.go delete mode 100644 vendor/github.com/go-playground/locales/logo.png delete mode 100644 vendor/github.com/go-playground/locales/rules.go delete mode 100644 "vendor/github.com/go-playground/locales/tq\033q" delete mode 100644 vendor/github.com/go-playground/universal-translator/.gitignore delete mode 100644 vendor/github.com/go-playground/universal-translator/README.md delete mode 100644 vendor/github.com/go-playground/universal-translator/benchmarks_test.go delete mode 100644 vendor/github.com/go-playground/universal-translator/errors.go delete mode 100644 vendor/github.com/go-playground/universal-translator/import_export.go delete mode 100644 vendor/github.com/go-playground/universal-translator/import_export_test.go delete mode 100644 vendor/github.com/go-playground/universal-translator/logo.png delete mode 100644 vendor/github.com/go-playground/universal-translator/translator.go delete mode 100644 vendor/github.com/go-playground/universal-translator/translator_test.go delete mode 100644 vendor/github.com/go-playground/universal-translator/universal_translator.go delete mode 100644 vendor/github.com/golang/protobuf/.gitignore delete mode 100644 vendor/github.com/golang/protobuf/.travis.yml delete mode 100644 vendor/github.com/golang/protobuf/AUTHORS delete mode 100644 vendor/github.com/golang/protobuf/CONTRIBUTORS delete mode 100644 vendor/github.com/golang/protobuf/LICENSE delete mode 100644 vendor/github.com/golang/protobuf/Make.protobuf delete mode 100644 vendor/github.com/golang/protobuf/Makefile delete mode 100644 vendor/github.com/golang/protobuf/README.md delete mode 100644 vendor/github.com/golang/protobuf/proto/Makefile delete mode 100644 vendor/github.com/golang/protobuf/proto/all_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/any_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/clone.go delete mode 100644 vendor/github.com/golang/protobuf/proto/clone_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/decode.go delete mode 100644 vendor/github.com/golang/protobuf/proto/decode_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/encode.go delete mode 100644 vendor/github.com/golang/protobuf/proto/encode_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/equal.go delete mode 100644 vendor/github.com/golang/protobuf/proto/equal_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions.go delete mode 100644 vendor/github.com/golang/protobuf/proto/extensions_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/lib.go delete mode 100644 vendor/github.com/golang/protobuf/proto/map_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/message_set.go delete mode 100644 vendor/github.com/golang/protobuf/proto/message_set_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/pointer_reflect.go delete mode 100644 vendor/github.com/golang/protobuf/proto/pointer_unsafe.go delete mode 100644 vendor/github.com/golang/protobuf/proto/properties.go delete mode 100644 vendor/github.com/golang/protobuf/proto/proto3_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/size2_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/size_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_parser.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_parser_test.go delete mode 100644 vendor/github.com/golang/protobuf/proto/text_test.go delete mode 100644 vendor/github.com/google/go-github/.gitignore delete mode 100644 vendor/github.com/google/go-github/.travis.yml delete mode 100644 vendor/github.com/google/go-github/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/go-github/README.md delete mode 100644 vendor/github.com/google/go-github/github/activity_events_test.go delete mode 100644 vendor/github.com/google/go-github/github/activity_notifications_test.go delete mode 100644 vendor/github.com/google/go-github/github/activity_star_test.go delete mode 100644 vendor/github.com/google/go-github/github/activity_test.go delete mode 100644 vendor/github.com/google/go-github/github/activity_watching_test.go delete mode 100644 vendor/github.com/google/go-github/github/admin_stats_test.go delete mode 100644 vendor/github.com/google/go-github/github/admin_test.go delete mode 100644 vendor/github.com/google/go-github/github/apps_installation_test.go create mode 100644 vendor/github.com/google/go-github/github/apps_marketplace.go delete mode 100644 vendor/github.com/google/go-github/github/apps_test.go delete mode 100644 vendor/github.com/google/go-github/github/authorizations_test.go create mode 100644 vendor/github.com/google/go-github/github/checks.go delete mode 100644 vendor/github.com/google/go-github/github/examples_test.go create mode 100644 vendor/github.com/google/go-github/github/gen-accessors.go delete mode 100644 vendor/github.com/google/go-github/github/gists_comments_test.go delete mode 100644 vendor/github.com/google/go-github/github/gists_test.go delete mode 100644 vendor/github.com/google/go-github/github/git_blobs_test.go delete mode 100644 vendor/github.com/google/go-github/github/git_commits_test.go delete mode 100644 vendor/github.com/google/go-github/github/git_refs_test.go delete mode 100644 vendor/github.com/google/go-github/github/git_tags_test.go delete mode 100644 vendor/github.com/google/go-github/github/git_trees_test.go delete mode 100644 vendor/github.com/google/go-github/github/github_test.go delete mode 100644 vendor/github.com/google/go-github/github/gitignore_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_assignees_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_comments_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_events_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_labels_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_milestones_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_test.go delete mode 100644 vendor/github.com/google/go-github/github/issues_timeline_test.go delete mode 100644 vendor/github.com/google/go-github/github/licenses_test.go delete mode 100644 vendor/github.com/google/go-github/github/messages_test.go delete mode 100644 vendor/github.com/google/go-github/github/migrations_source_import_test.go delete mode 100644 vendor/github.com/google/go-github/github/migrations_test.go create mode 100644 vendor/github.com/google/go-github/github/migrations_user.go delete mode 100644 vendor/github.com/google/go-github/github/misc_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_hooks_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_members_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_outside_collaborators_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_projects_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_teams_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_test.go delete mode 100644 vendor/github.com/google/go-github/github/orgs_users_blocking_test.go delete mode 100644 vendor/github.com/google/go-github/github/projects_test.go delete mode 100644 vendor/github.com/google/go-github/github/pulls_comments_test.go delete mode 100644 vendor/github.com/google/go-github/github/pulls_reviewers_test.go delete mode 100644 vendor/github.com/google/go-github/github/pulls_reviews_test.go delete mode 100644 vendor/github.com/google/go-github/github/pulls_test.go delete mode 100644 vendor/github.com/google/go-github/github/reactions_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_collaborators_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_comments_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_commits_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_community_health_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_contents_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_deployments_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_forks_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_hooks_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_invitations_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_keys_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_merging_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_pages_test.go create mode 100644 vendor/github.com/google/go-github/github/repos_prereceive_hooks.go delete mode 100644 vendor/github.com/google/go-github/github/repos_projects_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_releases_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_stats_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_statuses_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_test.go delete mode 100644 vendor/github.com/google/go-github/github/repos_traffic_test.go delete mode 100644 vendor/github.com/google/go-github/github/search_test.go delete mode 100644 vendor/github.com/google/go-github/github/strings_test.go rename vendor/github.com/google/go-github/github/{orgs_teams.go => teams.go} (50%) create mode 100644 vendor/github.com/google/go-github/github/teams_discussion_comments.go create mode 100644 vendor/github.com/google/go-github/github/teams_discussions.go create mode 100644 vendor/github.com/google/go-github/github/teams_members.go delete mode 100644 vendor/github.com/google/go-github/github/timestamp_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_administration_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_blocking_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_emails_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_followers_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_gpg_keys_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_keys_test.go delete mode 100644 vendor/github.com/google/go-github/github/users_test.go delete mode 100644 vendor/github.com/google/go-querystring/.gitignore delete mode 100644 vendor/github.com/google/go-querystring/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/go-querystring/README.md delete mode 100644 vendor/github.com/google/go-querystring/query/encode_test.go delete mode 100644 vendor/github.com/gorilla/context/.travis.yml delete mode 100644 vendor/github.com/gorilla/context/LICENSE delete mode 100644 vendor/github.com/gorilla/context/README.md delete mode 100644 vendor/github.com/gorilla/context/context.go delete mode 100644 vendor/github.com/gorilla/context/context_test.go delete mode 100644 vendor/github.com/gorilla/context/doc.go delete mode 100644 vendor/github.com/gorilla/securecookie/.travis.yml delete mode 100644 vendor/github.com/gorilla/securecookie/LICENSE delete mode 100644 vendor/github.com/gorilla/securecookie/README.md delete mode 100644 vendor/github.com/gorilla/securecookie/doc.go delete mode 100644 vendor/github.com/gorilla/securecookie/fuzz.go delete mode 100644 vendor/github.com/gorilla/securecookie/securecookie.go delete mode 100644 vendor/github.com/gorilla/securecookie/securecookie_test.go delete mode 100644 vendor/github.com/gorilla/sessions/.travis.yml delete mode 100644 vendor/github.com/gorilla/sessions/LICENSE delete mode 100644 vendor/github.com/gorilla/sessions/README.md delete mode 100644 vendor/github.com/gorilla/sessions/doc.go delete mode 100644 vendor/github.com/gorilla/sessions/lex.go delete mode 100644 vendor/github.com/gorilla/sessions/sessions.go delete mode 100644 vendor/github.com/gorilla/sessions/sessions_test.go delete mode 100644 vendor/github.com/gorilla/sessions/store.go delete mode 100644 vendor/github.com/gorilla/sessions/store_test.go create mode 100644 vendor/github.com/hashicorp/golang-lru/2q.go rename vendor/github.com/hashicorp/{hcl => golang-lru}/LICENSE (50%) create mode 100644 vendor/github.com/hashicorp/golang-lru/arc.go create mode 100644 vendor/github.com/hashicorp/golang-lru/doc.go create mode 100644 vendor/github.com/hashicorp/golang-lru/lru.go create mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru.go create mode 100644 vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go delete mode 100644 vendor/github.com/hashicorp/hcl/.gitignore delete mode 100644 vendor/github.com/hashicorp/hcl/.travis.yml delete mode 100644 vendor/github.com/hashicorp/hcl/Makefile delete mode 100644 vendor/github.com/hashicorp/hcl/README.md delete mode 100644 vendor/github.com/hashicorp/hcl/appveyor.yml delete mode 100644 vendor/github.com/hashicorp/hcl/decoder.go delete mode 100644 vendor/github.com/hashicorp/hcl/decoder_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/ast/ast.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/ast/walk.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/parser/error.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/parser/parser.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/scanner/scanner.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/token/position.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/token/token.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl/token/token_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/hcl_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/parser/flatten.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/parser/parser.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/parser/parser_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/scanner/scanner.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/token/position.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/token/token.go delete mode 100644 vendor/github.com/hashicorp/hcl/json/token/token_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/lex.go delete mode 100644 vendor/github.com/hashicorp/hcl/lex_test.go delete mode 100644 vendor/github.com/hashicorp/hcl/parse.go delete mode 100644 vendor/github.com/inconshreveable/mousetrap/README.md delete mode 100644 vendor/github.com/ipfans/echo-session/.gitignore delete mode 100644 vendor/github.com/ipfans/echo-session/README.md delete mode 100644 vendor/github.com/ipfans/echo-session/cookie_store.go delete mode 100644 vendor/github.com/ipfans/echo-session/filesystem_store.go delete mode 100644 vendor/github.com/ipfans/echo-session/postgres_store.go delete mode 100644 vendor/github.com/ipfans/echo-session/redis_store.go delete mode 100644 vendor/github.com/ipfans/echo-session/session.go delete mode 100644 vendor/github.com/jmoiron/sqlx/.gitignore delete mode 100644 vendor/github.com/jmoiron/sqlx/LICENSE delete mode 100644 vendor/github.com/jmoiron/sqlx/README.md delete mode 100644 vendor/github.com/jmoiron/sqlx/bind.go delete mode 100644 vendor/github.com/jmoiron/sqlx/doc.go delete mode 100644 vendor/github.com/jmoiron/sqlx/named.go delete mode 100644 vendor/github.com/jmoiron/sqlx/named_context.go delete mode 100644 vendor/github.com/jmoiron/sqlx/named_context_test.go delete mode 100644 vendor/github.com/jmoiron/sqlx/named_test.go delete mode 100644 vendor/github.com/jmoiron/sqlx/reflectx/README.md delete mode 100644 vendor/github.com/jmoiron/sqlx/reflectx/reflect.go delete mode 100644 vendor/github.com/jmoiron/sqlx/reflectx/reflect_test.go delete mode 100644 vendor/github.com/jmoiron/sqlx/sqlx.go delete mode 100644 vendor/github.com/jmoiron/sqlx/sqlx_context.go delete mode 100644 vendor/github.com/jmoiron/sqlx/sqlx_context_test.go delete mode 100644 vendor/github.com/jmoiron/sqlx/sqlx_test.go delete mode 100644 vendor/github.com/labstack/echo/.editorconfig delete mode 100644 vendor/github.com/labstack/echo/.gitattributes delete mode 100644 vendor/github.com/labstack/echo/.gitignore delete mode 100644 vendor/github.com/labstack/echo/.travis.yml delete mode 100644 vendor/github.com/labstack/echo/Gopkg.lock delete mode 100644 vendor/github.com/labstack/echo/Gopkg.toml delete mode 100644 vendor/github.com/labstack/echo/Makefile delete mode 100644 vendor/github.com/labstack/echo/README.md delete mode 100644 vendor/github.com/labstack/echo/bind.go delete mode 100644 vendor/github.com/labstack/echo/bind_test.go delete mode 100644 vendor/github.com/labstack/echo/context.go delete mode 100644 vendor/github.com/labstack/echo/context_test.go delete mode 100644 vendor/github.com/labstack/echo/echo.go delete mode 100644 vendor/github.com/labstack/echo/echo_go1.8.go delete mode 100644 vendor/github.com/labstack/echo/echo_go1.8_test.go delete mode 100644 vendor/github.com/labstack/echo/echo_test.go delete mode 100644 vendor/github.com/labstack/echo/group.go delete mode 100644 vendor/github.com/labstack/echo/group_test.go delete mode 100644 vendor/github.com/labstack/echo/log.go delete mode 100644 vendor/github.com/labstack/echo/middleware/basic_auth.go delete mode 100644 vendor/github.com/labstack/echo/middleware/basic_auth_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/body_dump.go delete mode 100644 vendor/github.com/labstack/echo/middleware/body_dump_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/body_limit.go delete mode 100644 vendor/github.com/labstack/echo/middleware/body_limit_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/compress.go delete mode 100644 vendor/github.com/labstack/echo/middleware/compress_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/cors.go delete mode 100644 vendor/github.com/labstack/echo/middleware/cors_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/csrf.go delete mode 100644 vendor/github.com/labstack/echo/middleware/csrf_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/jwt.go delete mode 100644 vendor/github.com/labstack/echo/middleware/jwt_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/key_auth.go delete mode 100644 vendor/github.com/labstack/echo/middleware/key_auth_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/logger.go delete mode 100644 vendor/github.com/labstack/echo/middleware/logger_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/method_override.go delete mode 100644 vendor/github.com/labstack/echo/middleware/method_override_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/middleware.go delete mode 100644 vendor/github.com/labstack/echo/middleware/proxy.go delete mode 100644 vendor/github.com/labstack/echo/middleware/proxy_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/recover.go delete mode 100644 vendor/github.com/labstack/echo/middleware/recover_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/redirect.go delete mode 100644 vendor/github.com/labstack/echo/middleware/redirect_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/request_id.go delete mode 100644 vendor/github.com/labstack/echo/middleware/request_id_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/secure.go delete mode 100644 vendor/github.com/labstack/echo/middleware/secure_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/slash.go delete mode 100644 vendor/github.com/labstack/echo/middleware/slash_test.go delete mode 100644 vendor/github.com/labstack/echo/middleware/static.go delete mode 100644 vendor/github.com/labstack/echo/middleware/static_test.go delete mode 100644 vendor/github.com/labstack/echo/response.go delete mode 100644 vendor/github.com/labstack/echo/response_test.go delete mode 100644 vendor/github.com/labstack/echo/router.go delete mode 100644 vendor/github.com/labstack/echo/router_test.go delete mode 100644 vendor/github.com/labstack/echo/util_go17.go delete mode 100644 vendor/github.com/labstack/echo/util_go18.go delete mode 100644 vendor/github.com/labstack/gommon/.gitignore delete mode 100644 vendor/github.com/labstack/gommon/.travis.yml delete mode 100644 vendor/github.com/labstack/gommon/README.md delete mode 100644 vendor/github.com/labstack/gommon/bytes/README.md delete mode 100644 vendor/github.com/labstack/gommon/bytes/bytes.go delete mode 100644 vendor/github.com/labstack/gommon/bytes/bytes_test.go delete mode 100644 vendor/github.com/labstack/gommon/color/README.md delete mode 100644 vendor/github.com/labstack/gommon/color/color.go delete mode 100644 vendor/github.com/labstack/gommon/color/color_test.go delete mode 100644 vendor/github.com/labstack/gommon/glide.lock delete mode 100644 vendor/github.com/labstack/gommon/glide.yaml delete mode 100644 vendor/github.com/labstack/gommon/gommon.go delete mode 100644 vendor/github.com/labstack/gommon/log/README.md delete mode 100644 vendor/github.com/labstack/gommon/log/color.go delete mode 100644 vendor/github.com/labstack/gommon/log/log.go delete mode 100644 vendor/github.com/labstack/gommon/log/log_test.go delete mode 100644 vendor/github.com/labstack/gommon/log/white.go delete mode 100644 vendor/github.com/labstack/gommon/random/random.go delete mode 100644 vendor/github.com/labstack/gommon/random/random_test.go delete mode 100644 vendor/github.com/lib/pq/.gitignore delete mode 100755 vendor/github.com/lib/pq/.travis.sh delete mode 100644 vendor/github.com/lib/pq/.travis.yml delete mode 100644 vendor/github.com/lib/pq/CONTRIBUTING.md delete mode 100644 vendor/github.com/lib/pq/LICENSE.md delete mode 100644 vendor/github.com/lib/pq/README.md delete mode 100644 vendor/github.com/lib/pq/array.go delete mode 100644 vendor/github.com/lib/pq/array_test.go delete mode 100644 vendor/github.com/lib/pq/bench_test.go delete mode 100644 vendor/github.com/lib/pq/buf.go delete mode 100644 vendor/github.com/lib/pq/conn.go delete mode 100644 vendor/github.com/lib/pq/conn_go18.go delete mode 100644 vendor/github.com/lib/pq/conn_test.go delete mode 100644 vendor/github.com/lib/pq/copy.go delete mode 100644 vendor/github.com/lib/pq/copy_test.go delete mode 100644 vendor/github.com/lib/pq/doc.go delete mode 100644 vendor/github.com/lib/pq/encode.go delete mode 100644 vendor/github.com/lib/pq/encode_test.go delete mode 100644 vendor/github.com/lib/pq/error.go delete mode 100644 vendor/github.com/lib/pq/go18_test.go delete mode 100644 vendor/github.com/lib/pq/issues_test.go delete mode 100644 vendor/github.com/lib/pq/notify.go delete mode 100644 vendor/github.com/lib/pq/notify_test.go delete mode 100644 vendor/github.com/lib/pq/oid/doc.go delete mode 100644 vendor/github.com/lib/pq/oid/gen.go delete mode 100644 vendor/github.com/lib/pq/oid/types.go delete mode 100644 vendor/github.com/lib/pq/rows.go delete mode 100644 vendor/github.com/lib/pq/rows_test.go delete mode 100644 vendor/github.com/lib/pq/ssl.go delete mode 100644 vendor/github.com/lib/pq/ssl_go1.7.go delete mode 100644 vendor/github.com/lib/pq/ssl_permissions.go delete mode 100644 vendor/github.com/lib/pq/ssl_renegotiation.go delete mode 100644 vendor/github.com/lib/pq/ssl_test.go delete mode 100644 vendor/github.com/lib/pq/ssl_windows.go delete mode 100644 vendor/github.com/lib/pq/url.go delete mode 100644 vendor/github.com/lib/pq/url_test.go delete mode 100644 vendor/github.com/lib/pq/user_posix.go delete mode 100644 vendor/github.com/lib/pq/user_windows.go delete mode 100644 vendor/github.com/lib/pq/uuid.go delete mode 100644 vendor/github.com/lib/pq/uuid_test.go delete mode 100644 vendor/github.com/magiconair/properties/.gitignore delete mode 100644 vendor/github.com/magiconair/properties/.travis.yml delete mode 100644 vendor/github.com/magiconair/properties/CHANGELOG.md delete mode 100644 vendor/github.com/magiconair/properties/LICENSE delete mode 100644 vendor/github.com/magiconair/properties/README.md delete mode 100644 vendor/github.com/magiconair/properties/benchmark_test.go delete mode 100644 vendor/github.com/magiconair/properties/decode.go delete mode 100644 vendor/github.com/magiconair/properties/decode_test.go delete mode 100644 vendor/github.com/magiconair/properties/doc.go delete mode 100644 vendor/github.com/magiconair/properties/example_test.go delete mode 100644 vendor/github.com/magiconair/properties/integrate.go delete mode 100644 vendor/github.com/magiconair/properties/integrate_test.go delete mode 100644 vendor/github.com/magiconair/properties/lex.go delete mode 100644 vendor/github.com/magiconair/properties/load.go delete mode 100644 vendor/github.com/magiconair/properties/load_test.go delete mode 100644 vendor/github.com/magiconair/properties/parser.go delete mode 100644 vendor/github.com/magiconair/properties/properties.go delete mode 100644 vendor/github.com/magiconair/properties/properties_test.go delete mode 100644 vendor/github.com/magiconair/properties/rangecheck.go delete mode 100644 vendor/github.com/mattn/go-colorable/.travis.yml delete mode 100644 vendor/github.com/mattn/go-colorable/LICENSE delete mode 100644 vendor/github.com/mattn/go-colorable/README.md delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_appengine.go delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_others.go delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_test.go delete mode 100644 vendor/github.com/mattn/go-colorable/colorable_windows.go delete mode 100644 vendor/github.com/mattn/go-colorable/noncolorable.go delete mode 100644 vendor/github.com/mattn/go-isatty/.travis.yml delete mode 100644 vendor/github.com/mattn/go-isatty/LICENSE delete mode 100644 vendor/github.com/mattn/go-isatty/README.md delete mode 100644 vendor/github.com/mattn/go-isatty/doc.go delete mode 100644 vendor/github.com/mattn/go-isatty/example_test.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_appengine.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_bsd.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_linux.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_others.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_others_test.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_solaris.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_windows.go delete mode 100644 vendor/github.com/mattn/go-isatty/isatty_windows_test.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/.travis.yml delete mode 100644 vendor/github.com/mitchellh/mapstructure/LICENSE delete mode 100644 vendor/github.com/mitchellh/mapstructure/README.md delete mode 100644 vendor/github.com/mitchellh/mapstructure/decode_hooks.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/decode_hooks_test.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/error.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure_benchmark_test.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure_bugs_test.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure_examples_test.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure_test.go rename vendor/github.com/{ipfans/echo-session => palantir/go-baseapp}/LICENSE (99%) rename log/logger.go => vendor/github.com/palantir/go-baseapp/baseapp/config.go (70%) create mode 100644 vendor/github.com/palantir/go-baseapp/baseapp/datadog/datadog.go create mode 100644 vendor/github.com/palantir/go-baseapp/baseapp/error.go create mode 100644 vendor/github.com/palantir/go-baseapp/baseapp/metrics.go create mode 100644 vendor/github.com/palantir/go-baseapp/baseapp/middleware.go create mode 100644 vendor/github.com/palantir/go-baseapp/baseapp/params.go create mode 100644 vendor/github.com/palantir/go-baseapp/baseapp/server.go create mode 100644 vendor/github.com/palantir/go-baseapp/godel/config/license-plugin.yml rename utils/utils.go => vendor/github.com/palantir/go-baseapp/pkg/errfmt/errfmt.go (50%) rename vendor/github.com/{garyburd/redigo => palantir/go-githubapp}/LICENSE (89%) create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/caching_client_creator.go create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/client_creator.go create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/config.go create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/context.go create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/dispatcher.go create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/installations.go create mode 100644 vendor/github.com/palantir/go-githubapp/githubapp/middleware.go create mode 100644 vendor/github.com/palantir/go-githubapp/godel/config/license-plugin.yml delete mode 100644 vendor/github.com/pelletier/go-buffruneio/.gitignore delete mode 100644 vendor/github.com/pelletier/go-buffruneio/.travis.yml delete mode 100644 vendor/github.com/pelletier/go-buffruneio/README.md delete mode 100644 vendor/github.com/pelletier/go-buffruneio/buffruneio.go delete mode 100644 vendor/github.com/pelletier/go-buffruneio/buffruneio_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/.gitignore delete mode 100644 vendor/github.com/pelletier/go-toml/.travis.yml delete mode 100644 vendor/github.com/pelletier/go-toml/LICENSE delete mode 100644 vendor/github.com/pelletier/go-toml/README.md delete mode 100644 vendor/github.com/pelletier/go-toml/doc.go delete mode 100644 vendor/github.com/pelletier/go-toml/doc_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/example-crlf.toml delete mode 100644 vendor/github.com/pelletier/go-toml/example.toml delete mode 100644 vendor/github.com/pelletier/go-toml/keysparsing.go delete mode 100644 vendor/github.com/pelletier/go-toml/keysparsing_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/lexer.go delete mode 100644 vendor/github.com/pelletier/go-toml/lexer_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/marshal.go delete mode 100644 vendor/github.com/pelletier/go-toml/marshal_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/marshal_test.toml delete mode 100644 vendor/github.com/pelletier/go-toml/parser.go delete mode 100644 vendor/github.com/pelletier/go-toml/parser_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/position.go delete mode 100644 vendor/github.com/pelletier/go-toml/position_test.go delete mode 100755 vendor/github.com/pelletier/go-toml/test.sh delete mode 100644 vendor/github.com/pelletier/go-toml/token.go delete mode 100644 vendor/github.com/pelletier/go-toml/token_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/toml.go delete mode 100644 vendor/github.com/pelletier/go-toml/toml_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_create.go delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_create_test.go delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_write.go delete mode 100644 vendor/github.com/pelletier/go-toml/tomltree_write_test.go delete mode 100644 vendor/github.com/pkg/errors/.gitignore delete mode 100644 vendor/github.com/pkg/errors/.travis.yml delete mode 100644 vendor/github.com/pkg/errors/README.md delete mode 100644 vendor/github.com/pkg/errors/appveyor.yml delete mode 100644 vendor/github.com/pkg/errors/bench_test.go delete mode 100644 vendor/github.com/pkg/errors/errors_test.go delete mode 100644 vendor/github.com/pkg/errors/example_test.go delete mode 100644 vendor/github.com/pkg/errors/format_test.go delete mode 100644 vendor/github.com/pkg/errors/stack_test.go delete mode 100644 vendor/github.com/pmezard/go-difflib/.travis.yml delete mode 100644 vendor/github.com/pmezard/go-difflib/README.md delete mode 100644 vendor/github.com/pmezard/go-difflib/difflib/difflib_test.go create mode 100644 vendor/github.com/rcrowley/go-metrics/LICENSE create mode 100644 vendor/github.com/rcrowley/go-metrics/counter.go create mode 100644 vendor/github.com/rcrowley/go-metrics/debug.go create mode 100644 vendor/github.com/rcrowley/go-metrics/ewma.go create mode 100644 vendor/github.com/rcrowley/go-metrics/gauge.go create mode 100644 vendor/github.com/rcrowley/go-metrics/gauge_float64.go create mode 100644 vendor/github.com/rcrowley/go-metrics/graphite.go create mode 100644 vendor/github.com/rcrowley/go-metrics/healthcheck.go create mode 100644 vendor/github.com/rcrowley/go-metrics/histogram.go create mode 100644 vendor/github.com/rcrowley/go-metrics/json.go create mode 100644 vendor/github.com/rcrowley/go-metrics/log.go create mode 100644 vendor/github.com/rcrowley/go-metrics/meter.go create mode 100644 vendor/github.com/rcrowley/go-metrics/metrics.go create mode 100644 vendor/github.com/rcrowley/go-metrics/opentsdb.go create mode 100644 vendor/github.com/rcrowley/go-metrics/registry.go create mode 100644 vendor/github.com/rcrowley/go-metrics/runtime.go create mode 100644 vendor/github.com/rcrowley/go-metrics/runtime_cgo.go create mode 100644 vendor/github.com/rcrowley/go-metrics/runtime_gccpufraction.go create mode 100644 vendor/github.com/rcrowley/go-metrics/runtime_no_cgo.go create mode 100644 vendor/github.com/rcrowley/go-metrics/runtime_no_gccpufraction.go create mode 100644 vendor/github.com/rcrowley/go-metrics/sample.go create mode 100644 vendor/github.com/rcrowley/go-metrics/syslog.go create mode 100644 vendor/github.com/rcrowley/go-metrics/timer.go create mode 100644 vendor/github.com/rcrowley/go-metrics/writer.go rename vendor/github.com/{go-playground/locales => rs/xid}/LICENSE (86%) create mode 100644 vendor/github.com/rs/xid/hostid_darwin.go create mode 100644 vendor/github.com/rs/xid/hostid_fallback.go create mode 100644 vendor/github.com/rs/xid/hostid_freebsd.go create mode 100644 vendor/github.com/rs/xid/hostid_linux.go create mode 100644 vendor/github.com/rs/xid/hostid_windows.go create mode 100644 vendor/github.com/rs/xid/id.go rename vendor/github.com/{labstack/gommon => rs/zerolog}/LICENSE (95%) create mode 100644 vendor/github.com/rs/zerolog/array.go create mode 100644 vendor/github.com/rs/zerolog/console.go create mode 100644 vendor/github.com/rs/zerolog/context.go create mode 100644 vendor/github.com/rs/zerolog/ctx.go create mode 100644 vendor/github.com/rs/zerolog/encoder.go create mode 100644 vendor/github.com/rs/zerolog/encoder_cbor.go create mode 100644 vendor/github.com/rs/zerolog/encoder_json.go create mode 100644 vendor/github.com/rs/zerolog/event.go create mode 100644 vendor/github.com/rs/zerolog/fields.go create mode 100644 vendor/github.com/rs/zerolog/globals.go create mode 100644 vendor/github.com/rs/zerolog/hlog/hlog.go create mode 100644 vendor/github.com/rs/zerolog/hook.go create mode 100644 vendor/github.com/rs/zerolog/internal/cbor/base.go create mode 100644 vendor/github.com/rs/zerolog/internal/cbor/cbor.go create mode 100644 vendor/github.com/rs/zerolog/internal/cbor/decode_stream.go create mode 100644 vendor/github.com/rs/zerolog/internal/cbor/string.go create mode 100644 vendor/github.com/rs/zerolog/internal/cbor/time.go create mode 100644 vendor/github.com/rs/zerolog/internal/cbor/types.go create mode 100644 vendor/github.com/rs/zerolog/internal/json/base.go create mode 100644 vendor/github.com/rs/zerolog/internal/json/bytes.go create mode 100644 vendor/github.com/rs/zerolog/internal/json/string.go create mode 100644 vendor/github.com/rs/zerolog/internal/json/time.go create mode 100644 vendor/github.com/rs/zerolog/internal/json/types.go create mode 100644 vendor/github.com/rs/zerolog/log.go create mode 100644 vendor/github.com/rs/zerolog/log/log.go create mode 100644 vendor/github.com/rs/zerolog/sampler.go create mode 100644 vendor/github.com/rs/zerolog/syslog.go create mode 100644 vendor/github.com/rs/zerolog/writer.go rename vendor/{gopkg.in/go-playground/validator.v9 => github.com/shurcooL/githubv4}/LICENSE (95%) create mode 100644 vendor/github.com/shurcooL/githubv4/doc.go create mode 100644 vendor/github.com/shurcooL/githubv4/enum.go create mode 100644 vendor/github.com/shurcooL/githubv4/gen.go create mode 100644 vendor/github.com/shurcooL/githubv4/githubv4.go create mode 100644 vendor/github.com/shurcooL/githubv4/input.go create mode 100644 vendor/github.com/shurcooL/githubv4/scalar.go rename vendor/{golang.org/x/crypto => github.com/shurcooL/go/browser}/LICENSE (100%) create mode 100644 vendor/github.com/shurcooL/go/ctxhttp/ctxhttp.go rename vendor/github.com/{go-playground/universal-translator => shurcooL/graphql}/LICENSE (94%) create mode 100644 vendor/github.com/shurcooL/graphql/doc.go create mode 100644 vendor/github.com/shurcooL/graphql/graphql.go create mode 100644 vendor/github.com/shurcooL/graphql/ident/ident.go create mode 100644 vendor/github.com/shurcooL/graphql/internal/jsonutil/graphql.go create mode 100644 vendor/github.com/shurcooL/graphql/query.go create mode 100644 vendor/github.com/shurcooL/graphql/scalar.go delete mode 100644 vendor/github.com/sirupsen/logrus/.gitignore delete mode 100644 vendor/github.com/sirupsen/logrus/.travis.yml delete mode 100644 vendor/github.com/sirupsen/logrus/CHANGELOG.md delete mode 100644 vendor/github.com/sirupsen/logrus/LICENSE delete mode 100644 vendor/github.com/sirupsen/logrus/README.md delete mode 100644 vendor/github.com/sirupsen/logrus/alt_exit.go delete mode 100644 vendor/github.com/sirupsen/logrus/alt_exit_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/appveyor.yml delete mode 100644 vendor/github.com/sirupsen/logrus/doc.go delete mode 100644 vendor/github.com/sirupsen/logrus/entry.go delete mode 100644 vendor/github.com/sirupsen/logrus/entry_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/example_basic_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/example_hook_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/exported.go delete mode 100644 vendor/github.com/sirupsen/logrus/formatter.go delete mode 100644 vendor/github.com/sirupsen/logrus/formatter_bench_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/hook_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/hooks.go delete mode 100644 vendor/github.com/sirupsen/logrus/json_formatter.go delete mode 100644 vendor/github.com/sirupsen/logrus/json_formatter_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/logger.go delete mode 100644 vendor/github.com/sirupsen/logrus/logger_bench_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/logrus.go delete mode 100644 vendor/github.com/sirupsen/logrus/logrus_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_bsd.go delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_linux.go delete mode 100644 vendor/github.com/sirupsen/logrus/text_formatter.go delete mode 100644 vendor/github.com/sirupsen/logrus/text_formatter_test.go delete mode 100644 vendor/github.com/sirupsen/logrus/writer.go delete mode 100644 vendor/github.com/spf13/afero/.travis.yml delete mode 100644 vendor/github.com/spf13/afero/LICENSE.txt delete mode 100644 vendor/github.com/spf13/afero/README.md delete mode 100644 vendor/github.com/spf13/afero/afero.go delete mode 100644 vendor/github.com/spf13/afero/afero_test.go delete mode 100644 vendor/github.com/spf13/afero/appveyor.yml delete mode 100644 vendor/github.com/spf13/afero/basepath.go delete mode 100644 vendor/github.com/spf13/afero/basepath_test.go delete mode 100644 vendor/github.com/spf13/afero/cacheOnReadFs.go delete mode 100644 vendor/github.com/spf13/afero/composite_test.go delete mode 100644 vendor/github.com/spf13/afero/const_bsds.go delete mode 100644 vendor/github.com/spf13/afero/const_win_unix.go delete mode 100644 vendor/github.com/spf13/afero/copyOnWriteFs.go delete mode 100644 vendor/github.com/spf13/afero/copyOnWriteFs_test.go delete mode 100644 vendor/github.com/spf13/afero/httpFs.go delete mode 100644 vendor/github.com/spf13/afero/ioutil.go delete mode 100644 vendor/github.com/spf13/afero/ioutil_test.go delete mode 100644 vendor/github.com/spf13/afero/match.go delete mode 100644 vendor/github.com/spf13/afero/match_test.go delete mode 100644 vendor/github.com/spf13/afero/mem/dir.go delete mode 100644 vendor/github.com/spf13/afero/mem/dirmap.go delete mode 100644 vendor/github.com/spf13/afero/mem/file.go delete mode 100644 vendor/github.com/spf13/afero/memmap.go delete mode 100644 vendor/github.com/spf13/afero/memmap_test.go delete mode 100644 vendor/github.com/spf13/afero/memradix.go delete mode 100644 vendor/github.com/spf13/afero/os.go delete mode 100644 vendor/github.com/spf13/afero/path.go delete mode 100644 vendor/github.com/spf13/afero/path_test.go delete mode 100644 vendor/github.com/spf13/afero/readonlyfs.go delete mode 100644 vendor/github.com/spf13/afero/regexpfs.go delete mode 100644 vendor/github.com/spf13/afero/ro_regexp_test.go delete mode 100644 vendor/github.com/spf13/afero/unionFile.go delete mode 100644 vendor/github.com/spf13/afero/util.go delete mode 100644 vendor/github.com/spf13/afero/util_test.go delete mode 100644 vendor/github.com/spf13/cast/.gitignore delete mode 100644 vendor/github.com/spf13/cast/.travis.yml delete mode 100644 vendor/github.com/spf13/cast/LICENSE delete mode 100644 vendor/github.com/spf13/cast/Makefile delete mode 100644 vendor/github.com/spf13/cast/README.md delete mode 100644 vendor/github.com/spf13/cast/cast.go delete mode 100644 vendor/github.com/spf13/cast/cast_test.go delete mode 100644 vendor/github.com/spf13/cast/caste.go delete mode 100644 vendor/github.com/spf13/cobra/.gitignore delete mode 100644 vendor/github.com/spf13/cobra/.mailmap delete mode 100644 vendor/github.com/spf13/cobra/.travis.yml delete mode 100644 vendor/github.com/spf13/cobra/README.md delete mode 100644 vendor/github.com/spf13/cobra/bash_completions.md delete mode 100644 vendor/github.com/spf13/cobra/bash_completions_test.go rename vendor/{google.golang.org/appengine/LICENSE => github.com/spf13/cobra/cobra/cmd/testdata/LICENSE.golden} (100%) delete mode 100644 vendor/github.com/spf13/cobra/cobra_test.go delete mode 100644 vendor/github.com/spf13/cobra/command_test.go delete mode 100644 vendor/github.com/spf13/cobra/zsh_completions_test.go delete mode 100644 vendor/github.com/spf13/jwalterweatherman/.gitignore delete mode 100644 vendor/github.com/spf13/jwalterweatherman/LICENSE delete mode 100644 vendor/github.com/spf13/jwalterweatherman/README.md delete mode 100644 vendor/github.com/spf13/jwalterweatherman/default_notepad.go delete mode 100644 vendor/github.com/spf13/jwalterweatherman/default_notepad_test.go delete mode 100644 vendor/github.com/spf13/jwalterweatherman/log_counter.go delete mode 100644 vendor/github.com/spf13/jwalterweatherman/notepad.go delete mode 100644 vendor/github.com/spf13/jwalterweatherman/notepad_test.go delete mode 100644 vendor/github.com/spf13/pflag/.gitignore delete mode 100644 vendor/github.com/spf13/pflag/.travis.yml delete mode 100644 vendor/github.com/spf13/pflag/README.md delete mode 100644 vendor/github.com/spf13/pflag/bool_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/bool_test.go create mode 100644 vendor/github.com/spf13/pflag/bytes.go delete mode 100644 vendor/github.com/spf13/pflag/count_test.go create mode 100644 vendor/github.com/spf13/pflag/duration_slice.go delete mode 100644 vendor/github.com/spf13/pflag/example_test.go delete mode 100644 vendor/github.com/spf13/pflag/export_test.go delete mode 100644 vendor/github.com/spf13/pflag/flag_test.go delete mode 100644 vendor/github.com/spf13/pflag/golangflag_test.go create mode 100644 vendor/github.com/spf13/pflag/int16.go delete mode 100644 vendor/github.com/spf13/pflag/int_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/ip_slice_test.go delete mode 100644 vendor/github.com/spf13/pflag/ip_test.go delete mode 100644 vendor/github.com/spf13/pflag/ipnet_test.go delete mode 100644 vendor/github.com/spf13/pflag/string_array_test.go delete mode 100644 vendor/github.com/spf13/pflag/string_slice_test.go create mode 100644 vendor/github.com/spf13/pflag/string_to_int.go create mode 100644 vendor/github.com/spf13/pflag/string_to_string.go delete mode 100644 vendor/github.com/spf13/pflag/uint_slice_test.go delete mode 100644 vendor/github.com/spf13/viper/.gitignore delete mode 100644 vendor/github.com/spf13/viper/.travis.yml delete mode 100644 vendor/github.com/spf13/viper/LICENSE delete mode 100644 vendor/github.com/spf13/viper/README.md delete mode 100644 vendor/github.com/spf13/viper/flags.go delete mode 100644 vendor/github.com/spf13/viper/flags_test.go delete mode 100644 vendor/github.com/spf13/viper/nohup.out delete mode 100644 vendor/github.com/spf13/viper/overrides_test.go delete mode 100644 vendor/github.com/spf13/viper/util.go delete mode 100644 vendor/github.com/spf13/viper/util_test.go delete mode 100644 vendor/github.com/spf13/viper/viper.go delete mode 100644 vendor/github.com/spf13/viper/viper_test.go delete mode 100644 vendor/github.com/stretchr/testify/.gitignore delete mode 100644 vendor/github.com/stretchr/testify/.travis.yml delete mode 100644 vendor/github.com/stretchr/testify/LICENCE.txt delete mode 100644 vendor/github.com/stretchr/testify/README.md create mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/assert/assertions_test.go delete mode 100644 vendor/github.com/stretchr/testify/assert/forward_assertions_test.go delete mode 100644 vendor/github.com/stretchr/testify/assert/http_assertions_test.go delete mode 100644 vendor/github.com/stretchr/testify/doc.go delete mode 100644 vendor/github.com/stretchr/testify/package_test.go delete mode 100644 vendor/github.com/stretchr/testify/require/forward_requirements_test.go delete mode 100644 vendor/github.com/stretchr/testify/require/require.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/requirements_test.go create mode 100644 vendor/github.com/syntaqx/go-metrics-datadog/LICENSE create mode 100644 vendor/github.com/syntaqx/go-metrics-datadog/reporter.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/.travis.yml delete mode 100644 vendor/github.com/valyala/bytebufferpool/LICENSE delete mode 100644 vendor/github.com/valyala/bytebufferpool/README.md delete mode 100644 vendor/github.com/valyala/bytebufferpool/bytebuffer.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/bytebuffer_example_test.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/bytebuffer_test.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/bytebuffer_timing_test.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/doc.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/pool.go delete mode 100644 vendor/github.com/valyala/bytebufferpool/pool_test.go delete mode 100644 vendor/github.com/valyala/fasttemplate/LICENSE delete mode 100644 vendor/github.com/valyala/fasttemplate/README.md delete mode 100644 vendor/github.com/valyala/fasttemplate/example_test.go delete mode 100644 vendor/github.com/valyala/fasttemplate/template.go delete mode 100644 vendor/github.com/valyala/fasttemplate/template_test.go delete mode 100644 vendor/github.com/valyala/fasttemplate/template_timing_test.go delete mode 100644 vendor/github.com/valyala/fasttemplate/unsafe.go delete mode 100644 vendor/github.com/valyala/fasttemplate/unsafe_gae.go create mode 100644 vendor/github.com/zenazn/goji/LICENSE create mode 100644 vendor/github.com/zenazn/goji/web/mutil/mutil.go create mode 100644 vendor/github.com/zenazn/goji/web/mutil/writer_proxy.go rename vendor/{github.com/antonlindstrom/pgstore => goji.io}/LICENSE (52%) create mode 100644 vendor/goji.io/dispatch.go create mode 100644 vendor/goji.io/goji.go create mode 100644 vendor/goji.io/handle.go create mode 100644 vendor/goji.io/internal/context.go create mode 100644 vendor/goji.io/internal/internal.go create mode 100644 vendor/goji.io/middleware.go create mode 100644 vendor/goji.io/mux.go create mode 100644 vendor/goji.io/pat/match.go create mode 100644 vendor/goji.io/pat/methods.go create mode 100644 vendor/goji.io/pat/pat.go create mode 100644 vendor/goji.io/pat/url.go create mode 100644 vendor/goji.io/pattern.go create mode 100644 vendor/goji.io/pattern/pattern.go create mode 100644 vendor/goji.io/router.go create mode 100644 vendor/goji.io/router_simple.go create mode 100644 vendor/goji.io/router_trie.go delete mode 100644 vendor/golang.org/x/crypto/.gitattributes delete mode 100644 vendor/golang.org/x/crypto/.gitignore delete mode 100644 vendor/golang.org/x/crypto/AUTHORS delete mode 100644 vendor/golang.org/x/crypto/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/crypto/CONTRIBUTORS delete mode 100644 vendor/golang.org/x/crypto/PATENTS delete mode 100644 vendor/golang.org/x/crypto/README.md delete mode 100644 vendor/golang.org/x/crypto/acme/acme.go delete mode 100644 vendor/golang.org/x/crypto/acme/acme_test.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/autocert.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/autocert_test.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/cache.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/cache_test.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/example_test.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/listener.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/renewal.go delete mode 100644 vendor/golang.org/x/crypto/acme/autocert/renewal_test.go delete mode 100644 vendor/golang.org/x/crypto/acme/jws.go delete mode 100644 vendor/golang.org/x/crypto/acme/jws_test.go delete mode 100644 vendor/golang.org/x/crypto/acme/types.go delete mode 100644 vendor/golang.org/x/crypto/acme/types_test.go delete mode 100644 vendor/golang.org/x/crypto/codereview.cfg delete mode 100644 vendor/golang.org/x/crypto/ssh/benchmark_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer.go delete mode 100644 vendor/golang.org/x/crypto/ssh/buffer_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/certs.go delete mode 100644 vendor/golang.org/x/crypto/ssh/certs_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/channel.go delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher.go delete mode 100644 vendor/golang.org/x/crypto/ssh/cipher_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_auth_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/client_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/common.go delete mode 100644 vendor/golang.org/x/crypto/ssh/connection.go delete mode 100644 vendor/golang.org/x/crypto/ssh/doc.go delete mode 100644 vendor/golang.org/x/crypto/ssh/example_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake.go delete mode 100644 vendor/golang.org/x/crypto/ssh/handshake_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/kex.go delete mode 100644 vendor/golang.org/x/crypto/ssh/kex_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/keys.go delete mode 100644 vendor/golang.org/x/crypto/ssh/keys_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mac.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mempipe_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/messages.go delete mode 100644 vendor/golang.org/x/crypto/ssh/messages_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mux.go delete mode 100644 vendor/golang.org/x/crypto/ssh/mux_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/server.go delete mode 100644 vendor/golang.org/x/crypto/ssh/session.go delete mode 100644 vendor/golang.org/x/crypto/ssh/session_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip.go delete mode 100644 vendor/golang.org/x/crypto/ssh/tcpip_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_linux.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_windows.go delete mode 100644 vendor/golang.org/x/crypto/ssh/testdata_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/transport.go delete mode 100644 vendor/golang.org/x/crypto/ssh/transport_test.go delete mode 100644 vendor/golang.org/x/net/.gitattributes delete mode 100644 vendor/golang.org/x/net/.gitignore delete mode 100644 vendor/golang.org/x/net/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/net/README.md delete mode 100644 vendor/golang.org/x/net/codereview.cfg delete mode 100644 vendor/golang.org/x/net/context/context_test.go delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go delete mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go delete mode 100644 vendor/golang.org/x/net/context/withtimeout_test.go delete mode 100644 vendor/golang.org/x/oauth2/.travis.yml delete mode 100644 vendor/golang.org/x/oauth2/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/oauth2/README.md delete mode 100644 vendor/golang.org/x/oauth2/client_appengine.go delete mode 100644 vendor/golang.org/x/oauth2/example_test.go create mode 100644 vendor/golang.org/x/oauth2/internal/client_appengine.go delete mode 100644 vendor/golang.org/x/oauth2/internal/oauth2_test.go delete mode 100644 vendor/golang.org/x/oauth2/internal/token_test.go delete mode 100644 vendor/golang.org/x/oauth2/internal/transport_test.go delete mode 100644 vendor/golang.org/x/oauth2/oauth2_test.go delete mode 100644 vendor/golang.org/x/oauth2/token_test.go delete mode 100644 vendor/golang.org/x/oauth2/transport_test.go delete mode 100644 vendor/golang.org/x/sys/.gitattributes delete mode 100644 vendor/golang.org/x/sys/.gitignore delete mode 100644 vendor/golang.org/x/sys/AUTHORS delete mode 100644 vendor/golang.org/x/sys/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/sys/CONTRIBUTORS delete mode 100644 vendor/golang.org/x/sys/LICENSE delete mode 100644 vendor/golang.org/x/sys/PATENTS delete mode 100644 vendor/golang.org/x/sys/README.md delete mode 100644 vendor/golang.org/x/sys/codereview.cfg delete mode 100644 vendor/golang.org/x/sys/unix/.gitignore delete mode 100644 vendor/golang.org/x/sys/unix/README.md delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mips64x.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_mipsx.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_linux_s390x.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_arm.s delete mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s delete mode 100644 vendor/golang.org/x/sys/unix/bluetooth_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/cap_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/constants.go delete mode 100644 vendor/golang.org/x/sys/unix/creds_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_darwin.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_darwin_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_dragonfly_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_linux_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_netbsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_openbsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dev_solaris_test.go delete mode 100644 vendor/golang.org/x/sys/unix/dirent.go delete mode 100644 vendor/golang.org/x/sys/unix/endian_big.go delete mode 100644 vendor/golang.org/x/sys/unix/endian_little.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unset.go delete mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/errors_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/export_test.go delete mode 100644 vendor/golang.org/x/sys/unix/file_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/flock.go delete mode 100644 vendor/golang.org/x/sys/unix/flock_linux_32bit.go delete mode 100644 vendor/golang.org/x/sys/unix/gccgo.go delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c delete mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go delete mode 100755 vendor/golang.org/x/sys/unix/mkall.sh delete mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh delete mode 100644 vendor/golang.org/x/sys/unix/mkpost.go delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl delete mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl delete mode 100644 vendor/golang.org/x/sys/unix/mmap_unix_test.go delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_pledge.go delete mode 100644 vendor/golang.org/x/sys/unix/openbsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/pagesize_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/race.go delete mode 100644 vendor/golang.org/x/sys/unix/race0.go delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/str.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_no_getwd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_test.go delete mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go delete mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go delete mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go delete mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/windows/asm_windows_386.s delete mode 100644 vendor/golang.org/x/sys/windows/asm_windows_amd64.s delete mode 100644 vendor/golang.org/x/sys/windows/dll_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/env_unset.go delete mode 100644 vendor/golang.org/x/sys/windows/env_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/eventlog.go delete mode 100644 vendor/golang.org/x/sys/windows/exec_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/memory_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/mksyscall.go delete mode 100644 vendor/golang.org/x/sys/windows/race.go delete mode 100644 vendor/golang.org/x/sys/windows/race0.go delete mode 100644 vendor/golang.org/x/sys/windows/security_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/service.go delete mode 100644 vendor/golang.org/x/sys/windows/str.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_test.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/syscall_windows_test.go delete mode 100644 vendor/golang.org/x/sys/windows/types_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_386.go delete mode 100644 vendor/golang.org/x/sys/windows/types_windows_amd64.go delete mode 100644 vendor/golang.org/x/sys/windows/zsyscall_windows.go delete mode 100644 vendor/golang.org/x/text/.gitattributes delete mode 100644 vendor/golang.org/x/text/.gitignore delete mode 100644 vendor/golang.org/x/text/AUTHORS delete mode 100644 vendor/golang.org/x/text/CONTRIBUTING.md delete mode 100644 vendor/golang.org/x/text/CONTRIBUTORS delete mode 100644 vendor/golang.org/x/text/LICENSE delete mode 100644 vendor/golang.org/x/text/PATENTS delete mode 100644 vendor/golang.org/x/text/README.md delete mode 100644 vendor/golang.org/x/text/codereview.cfg delete mode 100644 vendor/golang.org/x/text/doc.go delete mode 100644 vendor/golang.org/x/text/gen.go delete mode 100644 vendor/golang.org/x/text/internal/gen.go delete mode 100644 vendor/golang.org/x/text/internal/gen/code.go delete mode 100644 vendor/golang.org/x/text/internal/gen/gen.go delete mode 100644 vendor/golang.org/x/text/internal/gen_test.go delete mode 100644 vendor/golang.org/x/text/internal/internal.go delete mode 100644 vendor/golang.org/x/text/internal/internal_test.go delete mode 100644 vendor/golang.org/x/text/internal/match.go delete mode 100644 vendor/golang.org/x/text/internal/match_test.go delete mode 100644 vendor/golang.org/x/text/internal/tables.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/compact.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/data_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/example_compact_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/example_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/gen_test.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/print.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/triegen.go delete mode 100644 vendor/golang.org/x/text/internal/ucd/example_test.go delete mode 100644 vendor/golang.org/x/text/internal/ucd/ucd.go delete mode 100644 vendor/golang.org/x/text/internal/ucd/ucd_test.go delete mode 100644 vendor/golang.org/x/text/transform/examples_test.go delete mode 100644 vendor/golang.org/x/text/transform/transform.go delete mode 100644 vendor/golang.org/x/text/transform/transform_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/base.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/cldr.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/cldr_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/collate.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/collate_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/data_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/decode.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/examples_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/makexml.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/resolve.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/resolve_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/slice.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/slice_test.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/xml.go delete mode 100644 vendor/golang.org/x/text/unicode/doc.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/composition.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/composition_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/example_iter_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/example_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/forminfo_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/input.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/iter.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/iter_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/maketables.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/norm_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/normalize.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/normalize_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/readwriter_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/tables.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/transform.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/transform_test.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/trie.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/triegen.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/ucd_test.go delete mode 100644 vendor/google.golang.org/appengine/.travis.yml delete mode 100644 vendor/google.golang.org/appengine/README.md delete mode 100644 vendor/google.golang.org/appengine/appengine.go delete mode 100644 vendor/google.golang.org/appengine/appengine_test.go delete mode 100644 vendor/google.golang.org/appengine/appengine_vm.go delete mode 100644 vendor/google.golang.org/appengine/errors.go delete mode 100644 vendor/google.golang.org/appengine/identity.go delete mode 100644 vendor/google.golang.org/appengine/internal/api.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_classic.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_common.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_race_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/api_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_id.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_id_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/base/api_base.proto delete mode 100644 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go delete mode 100755 vendor/google.golang.org/appengine/internal/datastore/datastore_v3.proto delete mode 100644 vendor/google.golang.org/appengine/internal/identity.go delete mode 100644 vendor/google.golang.org/appengine/internal/identity_classic.go delete mode 100644 vendor/google.golang.org/appengine/internal/identity_vm.go delete mode 100644 vendor/google.golang.org/appengine/internal/internal.go delete mode 100644 vendor/google.golang.org/appengine/internal/internal_vm_test.go delete mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/log/log_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/main.go delete mode 100644 vendor/google.golang.org/appengine/internal/main_vm.go delete mode 100644 vendor/google.golang.org/appengine/internal/metadata.go delete mode 100644 vendor/google.golang.org/appengine/internal/net.go delete mode 100644 vendor/google.golang.org/appengine/internal/net_test.go delete mode 100755 vendor/google.golang.org/appengine/internal/regen.sh delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto delete mode 100644 vendor/google.golang.org/appengine/internal/transaction.go delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto delete mode 100644 vendor/google.golang.org/appengine/namespace.go delete mode 100644 vendor/google.golang.org/appengine/namespace_test.go delete mode 100644 vendor/google.golang.org/appengine/timeout.go delete mode 100644 vendor/google.golang.org/appengine/urlfetch/urlfetch.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/.gitignore delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/README.md delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/baked_in.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/benchmarks_test.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/cache.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/doc.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/errors.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/examples_test.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/field_level.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/logo.png delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/regexes.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/struct_level.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/translations.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/util.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/validator.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/validator_instance.go delete mode 100644 vendor/gopkg.in/go-playground/validator.v9/validator_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/.travis.yml create mode 100644 vendor/gopkg.in/yaml.v2/NOTICE delete mode 100644 vendor/gopkg.in/yaml.v2/README.md delete mode 100644 vendor/gopkg.in/yaml.v2/decode_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/encode_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/example_embedded_test.go delete mode 100644 vendor/gopkg.in/yaml.v2/suite_test.go delete mode 100644 vendor/vendor.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 7969132b1..bb9a25476 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,166 +1,88 @@ -darwin-linux-no-cgo: &darwin-linux-no-cgo - working_directory: /go/src/github.com/palantir/bulldozer - docker: - - image: nmiyake/go:go-darwin-linux-no-cgo-1.9-t112 - environment: - CGO_ENABLED: 0 - -define-artifact-dir: &define-artifacts-dir - run: echo "export ARTIFACT_STORE=/tmp/artifacts/${CIRCLE_PROJECT_REPONAME}-${TAG_NAME}-tests" >> $BASH_ENV - -mkdir-artifacts-dir: &mkdir-artifacts-dir - run: mkdir -p "${ARTIFACT_STORE}" - -store-test-results: &store-test-results - type: test-results-store - path: /tmp/artifacts - -store-artifacts: &store-artifacts - type: artifacts-store - path: /tmp/artifacts - -make-client: &make-client - run: ./scripts/make_client.sh - -install-docker-client: &install-docker-client - run: - name: Install docker client - command: | - set -x - VER="17.05.0-ce" - curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz - tar -xz -C /tmp -f /tmp/docker-$VER.tgz - mv /tmp/docker/* /usr/bin - -build-docker-image: &build-docker-image - run: - name: Build docker image - command: | - set -x - version=$(./godelw project-version) - cp /etc/ssl/certs/ca-certificates.crt . - docker build \ - -t palantirtechnologies/bulldozer \ - --build-arg VERSION=${version} \ - -f Dockerfile \ - . - rm -f ca-certificates.crt - -install-git: &install-git - run: - name: Install git - command: apt-get install -y git - -install-yarn: &install-yarn - run: - name: Install yarn - command: | - curl -sL https://deb.nodesource.com/setup_6.x | bash - - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list - apt-get -y update - apt-get -y install nodejs yarn +common: + godel-cache: + key: &godel-cache-key v1-godel-cache-{{ checksum "godelw" }}-{{ checksum "godel/config/godel.yml" }} + <<: &restore-godel-cache + restore_cache: + keys: + - *godel-cache-key + <<: &save-godel-cache + save_cache: + key: *godel-cache-key + paths: + - ~/.godel + + test-results: + dir: &results-dir /tmp/test-results + <<: &store-results + store_test_results: + path: *results-dir + <<: &store-artifacts + store_artifacts: + path: *results-dir + destination: test-results + +### Jobs ### version: 2 jobs: build: - <<: *darwin-linux-no-cgo + working_directory: /go/src/github.com/palantir/bulldozer + environment: + TESTS_DIR: *results-dir + docker: + - image: nmiyake/go:go-darwin-linux-1.11-t134 steps: - - *define-artifacts-dir - - *mkdir-artifacts-dir - checkout - - *install-yarn - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "./client/package.json" }} - - v1-dependencies- - - - run: go version + - *restore-godel-cache - run: ./godelw version - - run: ./godelw verify --apply=false --junit-output="${ARTIFACT_STORE}/tests.xml" - - - setup_remote_docker - - *install-docker-client - - - run: ./godelw dist - - *make-client - - *build-docker-image - - - save_cache: - paths: - - ./client/node_modules - key: v1-dependencies-{{ checksum "./client/package.json" }} + - *save-godel-cache + - run: mkdir -p "${TESTS_DIR}" + - run: ./godelw build + - run: ./godelw verify --apply=false --junit-output="$TESTS_DIR/$CIRCLE_PROJECT_REPONAME-tests.xml" + - *store-results + - *store-artifacts - persist_to_workspace: - root: /go/src/github.com/palantir/bulldozer + root: . paths: - - client/build - - *store-test-results - - changelog: - <<: *darwin-linux-no-cgo - steps: - - checkout - - *install-git - - *define-artifacts-dir - - *mkdir-artifacts-dir - - run: git log `git describe --tags --abbrev=0`..HEAD --pretty="### %s%n%b%n" > /tmp/artifacts/changelog.md - - *store-artifacts + - build/bulldozer - publish-snapshot: - <<: *darwin-linux-no-cgo + dist: + working_directory: /go/src/github.com/palantir/bulldozer + docker: + - image: nmiyake/go:go-darwin-linux-1.11-docker-17.06.0-ce-bsdtar-unzip-t134 steps: - checkout - setup_remote_docker - - *install-docker-client - attach_workspace: - at: /go/src/github.com/palantir/bulldozer - - run: ./godelw dist - - *build-docker-image - - run: ./scripts/publish_docker.sh - - publish-release: - <<: *darwin-linux-no-cgo - steps: - - checkout - - setup_remote_docker - - *install-docker-client - - run: ./godelw publish bintray --url https://api.bintray.com --subject palantir --repository releases --user "$BINTRAY_USERNAME" --password "$BINTRAY_PASSWORD" --publish --downloads-list bulldozer - - run: sha256sum dist/*.tgz - - attach_workspace: - at: /go/src/github.com/palantir/bulldozer - - *build-docker-image - - run: ./scripts/publish_docker.sh + at: . + - *restore-godel-cache + - run: ./godelw docker build --verbose + - deploy: + name: Publish + command: | + if [[ "${CIRCLE_BRANCH}" == "develop" ]]; then + docker login -u "${DOCKERHUB_USERNAME}" -p "${DOCKERHUB_PASSWORD}" + ./godelw docker push --tags=snapshot + fi + if [[ -n "${CIRCLE_TAG}" ]] ; then + docker login -u "${DOCKERHUB_USERNAME}" -p "${DOCKERHUB_PASSWORD}" + ./godelw docker push --tags=latest,version + ./godelw publish bintray \ + --url https://api.bintray.com \ + --subject palantir --repository releases --product bulldozer \ + --username "${BINTRAY_USERNAME}" --password "${BINTRAY_PASSWORD}" \ + --downloads-list --publish bulldozer + fi + +### Workflows ### workflows: version: 2 - build-publish: + build: jobs: - build: - filters: - tags: - only: /.*/ - - changelog: - requires: - - build - filters: - tags: - ignore: /.*/ - branches: - only: /^master$/ - - publish-snapshot: - requires: - - build - filters: - tags: - ignore: /.*/ - branches: - only: /^master$/ - - publish-release: + filters: { tags: { only: /.*/ } } + - dist: + filters: { tags: { only: /.*/ } } requires: - build - filters: - tags: - only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?(-alpha[0-9]+)?$/ - branches: - ignore: /.*/ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 6c052cd31..000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -/vendor/** -diff diff --git a/.gitignore b/.gitignore index d0efd5ead..41f7f34f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,2 @@ -*.iml -*.ipr -*.iws .idea/ -/build/ -coverage.out -dist/ -gotest.out -.DS_Store -config/bulldozer.yml -client/build -client/node_modules +build/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4df396ead..000000000 --- a/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM scratch - -ARG VERSION - -ADD ca-certificates.crt /etc/ssl/certs/ -ADD build/${VERSION}/linux-amd64/bulldozer / -ADD client/build/ /assets/ - -EXPOSE 8080 - -CMD ["/bulldozer", "server", "--config", "/secrets/bulldozer.yml"] \ No newline at end of file diff --git a/Gopkg.lock b/Gopkg.lock index 5c77bdb5e..f33f425b3 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -1,285 +1,277 @@ # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. +[[projects]] + digest = "1:6d83aad9c98e13079ad8a4dbc740892edf5384bcd07f1d789bb66cd8ecfae2cd" + name = "github.com/DataDog/datadog-go" + packages = ["statsd"] + pruneopts = "NUT" + revision = "e67964b4021ad3a334e748e8811eb3cd6becbc6e" + version = "2.1.0" + [[projects]] branch = "master" - name = "github.com/antonlindstrom/pgstore" + digest = "1:dd49560573b3eeb2993a036b2dfebf301b7ed2c9220a77322b0747f0257cebdc" + name = "github.com/bluekeyes/hatpear" packages = ["."] - revision = "a407030ba6d0efd9a1aad3d0cfc18a9b13d2f2e7" + pruneopts = "NUT" + revision = "ffb42d5bb417aa8e12b3b7ff73d028b915dafa10" [[projects]] - name = "github.com/boj/redistore" + digest = "1:a3998b8ea2d61301e5dce8de279e789da031fb36cd98b374e7299591609c34f1" + name = "github.com/bradleyfalzon/ghinstallation" packages = ["."] - revision = "fc113767cd6b051980f260d6dbe84b2740c46ab0" - version = "v1.2" + pruneopts = "NUT" + revision = "3f4e9b1898e6b65e31827d5dccb97d91d59feaa3" + version = "v0.1.2" [[projects]] + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" + pruneopts = "NUT" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" [[projects]] + digest = "1:7a6852b35eb5bbc184561443762d225116ae630c26a7c4d90546619f1e7d2ad2" name = "github.com/dgrijalva/jwt-go" packages = ["."] - revision = "d2709f9f1f31ebcda9651b03077758c1f3a0018c" - version = "v3.0.0" - -[[projects]] - name = "github.com/fsnotify/fsnotify" - packages = ["."] - revision = "629574ca2a5df945712d3079857300b5e4da0236" - version = "v1.4.2" - -[[projects]] - name = "github.com/garyburd/redigo" - packages = ["internal","redis"] - revision = "433969511232c397de61b1442f9fd49ec06ae9ba" - version = "v1.1.0" - -[[projects]] - name = "github.com/go-playground/locales" - packages = [".","currency"] - revision = "b860c92274dfb72f517b8b4c11c6d9f2f8cc9d91" - version = "v0.11.1" - -[[projects]] - name = "github.com/go-playground/universal-translator" - packages = ["."] - revision = "b32fa301c9fe55953584134cb6853a13c87ec0a1" - version = "v0.16.0" - -[[projects]] - branch = "master" - name = "github.com/golang/protobuf" - packages = ["proto"] - revision = "130e6b02ab059e7b717a096f397c5b60111cae74" + pruneopts = "NUT" + revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" + version = "v3.2.0" [[projects]] + digest = "1:f4f203acd8b11b8747bdcd91696a01dbc95ccb9e2ca2db6abf81c3a4f5e950ce" name = "github.com/google/go-github" packages = ["github"] - revision = "511f540f1887d30b88cee4a2fcd1f2922754acf4" + pruneopts = "NUT" + revision = "f55b50f38167644bb7e4be03d9a2bde71d435239" + version = "v18.2.0" [[projects]] - branch = "master" + digest = "1:a63cff6b5d8b95638bfe300385d93b2a6d9d687734b863da8e09dc834510a690" name = "github.com/google/go-querystring" packages = ["query"] - revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" - -[[projects]] - name = "github.com/gorilla/context" - packages = ["."] - revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a" - version = "v1.1" - -[[projects]] - name = "github.com/gorilla/securecookie" - packages = ["."] - revision = "667fe4e3466a040b780561fe9b51a83a3753eefc" - version = "v1.1" - -[[projects]] - name = "github.com/gorilla/sessions" - packages = ["."] - revision = "ca9ada44574153444b00d3fd9c8559e4cc95f896" - version = "v1.1" + pruneopts = "NUT" + revision = "44c6ddd0a2342c386950e880b658017258da92fc" + version = "v1.0.0" [[projects]] - branch = "master" - name = "github.com/hashicorp/hcl" - packages = [".","hcl/ast","hcl/parser","hcl/scanner","hcl/strconv","hcl/token","json/parser","json/scanner","json/token"] - revision = "68e816d1c783414e79bc65b3994d9ab6b0a722ab" + digest = "1:b42cde0e1f3c816dd57f57f7bbcf05ca40263ad96f168714c130c611fc0856a6" + name = "github.com/hashicorp/golang-lru" + packages = [ + ".", + "simplelru", + ] + pruneopts = "NUT" + revision = "20f1fb78b0740ba8c3cb143a61e86ba5c8669768" + version = "v0.5.0" [[projects]] + digest = "1:406338ad39ab2e37b7f4452906442a3dbf0eb3379dd1f06aafb5c07e769a5fbb" name = "github.com/inconshreveable/mousetrap" packages = ["."] + pruneopts = "NUT" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" [[projects]] - name = "github.com/ipfans/echo-session" - packages = ["."] - revision = "53b07854989517a32290e9ab5b3c3ec6d9e2f13c" - version = "v3.1.1" - -[[projects]] - name = "github.com/jmoiron/sqlx" - packages = [".","reflectx"] - revision = "d9bd385d68c068f1fabb5057e3dedcbcbb039d0f" - -[[projects]] - name = "github.com/labstack/echo" - packages = [".","middleware"] - revision = "cec7629194fe4bf83b0c72d9a02d340c7a1468ac" - version = "3.2.3" - -[[projects]] - name = "github.com/labstack/gommon" - packages = ["bytes","color","log","random"] - revision = "57409ada9da0f2afad6664c49502f8c50fbd8476" - version = "0.2.3" - -[[projects]] - name = "github.com/lib/pq" - packages = [".","oid"] - revision = "b77235e3890a962fe8a6f8c4c7198679ca7814e7" - -[[projects]] - name = "github.com/magiconair/properties" - packages = ["."] - revision = "be5ece7dd465ab0765a9682137865547526d1dfb" - version = "v1.7.3" - -[[projects]] - name = "github.com/mattn/go-colorable" - packages = ["."] - revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" - version = "v0.0.9" - -[[projects]] - name = "github.com/mattn/go-isatty" - packages = ["."] - revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" - version = "v0.0.3" - -[[projects]] - branch = "master" - name = "github.com/mitchellh/mapstructure" - packages = ["."] - revision = "d0303fe809921458f417bcf828397a65db30a7e4" + branch = "develop" + digest = "1:d78dd9767ded5926aa52cf1b8abf20f68fbbca5db5262be3398c242f1344bb22" + name = "github.com/palantir/go-baseapp" + packages = [ + "baseapp", + "baseapp/datadog", + "pkg/errfmt", + ] + pruneopts = "NUT" + revision = "0561b0583746f5a1dfa575bed73ba6d18243d73b" [[projects]] - name = "github.com/pelletier/go-buffruneio" - packages = ["."] - revision = "c37440a7cf42ac63b919c752ca73a85067e05992" - version = "v0.2.0" - -[[projects]] - name = "github.com/pelletier/go-toml" - packages = ["."] - revision = "5ccdfb18c776b740aecaf085c4d9a2779199c279" - version = "v1.0.0" + branch = "develop" + digest = "1:653408339bc30675f4f7091f0c5977f48add53ff62bc2383ac2b961ee419e4c3" + name = "github.com/palantir/go-githubapp" + packages = ["githubapp"] + pruneopts = "NUT" + revision = "9cd091d20a9e9f3b7c43280e1ff5fa596fe7bba4" [[projects]] + digest = "1:5cf3f025cbee5951a4ee961de067c8a89fc95a5adabead774f82822efabab121" name = "github.com/pkg/errors" packages = ["."] + pruneopts = "NUT" revision = "645ef00459ed84a119197bfb8d8205042c6df63d" version = "v0.8.0" [[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" name = "github.com/pmezard/go-difflib" packages = ["difflib"] + pruneopts = "NUT" revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" [[projects]] - name = "github.com/sirupsen/logrus" + branch = "master" + digest = "1:7c522337040d4ec9a136cd9d64fe4677ee1d3eae4a7f8831c2108f9bec43fa48" + name = "github.com/rcrowley/go-metrics" packages = ["."] - revision = "f006c2ac4710855cf0f916dd6b77acf6b048dc6e" - version = "v1.0.3" + pruneopts = "NUT" + revision = "e2704e165165ec55d062f5919b4b29494e9fa790" [[projects]] - branch = "master" - name = "github.com/spf13/afero" - packages = [".","mem"] - revision = "ee1bd8ee15a1306d1f9201acc41ef39cd9f99a1b" + digest = "1:0975c74a2cd70df6c2ae353c6283a25ce759dda7e1e706e5c07458baf3faca22" + name = "github.com/rs/xid" + packages = ["."] + pruneopts = "NUT" + revision = "15d26544def341f036c5f8dca987a4cbe575032c" + version = "v1.2.1" [[projects]] - name = "github.com/spf13/cast" - packages = ["."] - revision = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4" - version = "v1.1.0" + digest = "1:23e8c184b0a2dff80ce2d0d62bdf433ecf9707eb58361d755cdf2f08c22c2d0c" + name = "github.com/rs/zerolog" + packages = [ + ".", + "hlog", + "internal/cbor", + "internal/json", + "log", + ] + pruneopts = "NUT" + revision = "338f9bc14084d22cb8eeacd6492861f8449d715c" + version = "v1.9.1" [[projects]] - name = "github.com/spf13/cobra" + branch = "master" + digest = "1:3d10a3bdabc0890155135c0be1034e56c69ea22239eb8f19a430230c74edad3b" + name = "github.com/shurcooL/githubv4" packages = ["."] - revision = "e5f66de850af3302fbe378c8acded2b0fa55472c" + pruneopts = "NUT" + revision = "51d7b505e2e9434db74794b52222c13253209955" [[projects]] branch = "master" - name = "github.com/spf13/jwalterweatherman" - packages = ["."] - revision = "12bd96e66386c1960ab0f74ced1362f66f552f7b" + digest = "1:ddaa79b37808fbd09a1c3f484bba6320c884664dfc25ccc5f2d7d5a82222177c" + name = "github.com/shurcooL/go" + packages = ["ctxhttp"] + pruneopts = "NUT" + revision = "9e1955d9fb6e1ee2345ba1f5e71669263e719e27" [[projects]] - name = "github.com/spf13/pflag" + branch = "master" + digest = "1:95aa903ea7bb8beff197c3770764373d076095408996e39e2206ed9e85ab14bb" + name = "github.com/shurcooL/graphql" + packages = [ + ".", + "ident", + "internal/jsonutil", + ] + pruneopts = "NUT" + revision = "e4a3a37e6d42afa87afee2edeeced52300b63893" + +[[projects]] + digest = "1:343d44e06621142ab09ae0c76c1799104cdfddd3ffb445d78b1adf8dc3ffaf3d" + name = "github.com/spf13/cobra" packages = ["."] - revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" - version = "v1.0.0" + pruneopts = "NUT" + revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" + version = "v0.0.3" [[projects]] - name = "github.com/spf13/viper" + digest = "1:9d8420bbf131d1618bde6530af37c3799340d3762cc47210c1d9532a4c3a2779" + name = "github.com/spf13/pflag" packages = ["."] - revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7" - version = "v1.0.0" + pruneopts = "NUT" + revision = "298182f68c66c05229eb03ac171abe6e309ee79a" + version = "v1.0.3" [[projects]] + digest = "1:0331452965d8695c0a5633e0f509012987681a654f388f2ad0c3b2d7f7004b1c" name = "github.com/stretchr/testify" - packages = ["assert","require"] - revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" - version = "v1.1.4" + packages = [ + "assert", + "require", + ] + pruneopts = "NUT" + revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686" + version = "v1.2.2" [[projects]] branch = "master" - name = "github.com/valyala/bytebufferpool" + digest = "1:4202ae4bc475052ad99562194dac3db816ee76f018b92cf2d699071f4c6e3f7a" + name = "github.com/syntaqx/go-metrics-datadog" packages = ["."] - revision = "e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7" + pruneopts = "NUT" + revision = "defd050220648a3021b2bccfa09d15bcdffeea27" [[projects]] - branch = "master" - name = "github.com/valyala/fasttemplate" - packages = ["."] - revision = "dcecefd839c4193db0d35b88ec65b4c12d360ab0" + digest = "1:f23222558887a5919f8e9021ecb205395de463f031dd0c049e6e8e547b57c3f4" + name = "github.com/zenazn/goji" + packages = ["web/mutil"] + pruneopts = "NUT" + revision = "64eb34159fe53473206c2b3e70fe396a639452f2" + version = "v1.0" [[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["acme","acme/autocert","ssh/terminal"] - revision = "9419663f5a44be8b34ca85f08abc5fe1be11f8a3" + digest = "1:1787b9946a55f9ca5908bd65b9dcf6e2649a00991042ed50bb0eee6a26ff0fe7" + name = "goji.io" + packages = [ + ".", + "internal", + "pat", + "pattern", + ] + pruneopts = "NUT" + revision = "0d89ff54b2c18c9c4ba530e32496aef902d3c6cd" + version = "v2.0" [[projects]] branch = "master" + digest = "1:d6b719875cf8091fbab38527d81d34e71f4521b9ee9ccfbd4a32cff2ac5af96e" name = "golang.org/x/net" - packages = ["context","context/ctxhttp"] - revision = "0a9397675ba34b2845f758fe3cd68828369c6517" - -[[projects]] - name = "golang.org/x/oauth2" - packages = [".","internal"] - revision = "bb50c06baba3d0c76f9d125c0719093e315b5b44" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = ["unix","windows"] - revision = "314a259e304ff91bd6985da2a7149bbf91237993" + packages = [ + "context", + "context/ctxhttp", + ] + pruneopts = "NUT" + revision = "49bb7cea24b1df9410e1712aa6433dae904ff66a" [[projects]] branch = "master" - name = "golang.org/x/text" - packages = ["internal/gen","internal/triegen","internal/ucd","transform","unicode/cldr","unicode/norm"] - revision = "1cbadb444a806fd9430d14ad08967ed91da4fa0a" - -[[projects]] - name = "google.golang.org/appengine" - packages = ["internal","internal/base","internal/datastore","internal/log","internal/remote_api","internal/urlfetch","urlfetch"] - revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" - version = "v1.0.0" - -[[projects]] - name = "gopkg.in/go-playground/validator.v9" - packages = ["."] - revision = "a021b2ec9a8a8bb970f3f15bc42617cb520e8a64" - version = "v9.7.0" + digest = "1:fab6f7f953638242af9ab52d7ab10bcbfd695c09934cac829206732973e94662" + name = "golang.org/x/oauth2" + packages = [ + ".", + "internal", + ] + pruneopts = "NUT" + revision = "c57b0facaced709681d9f90397429b9430a74754" [[projects]] + digest = "1:7c95b35057a0ff2e19f707173cc1a947fa43a6eb5c4d300d196ece0334046082" name = "gopkg.in/yaml.v2" packages = ["."] - revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" + pruneopts = "NUT" + revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" + version = "v2.2.1" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "40bc7063ffd9b03f5f059775cab1296e4b6efc4fcd2e316eedf49e91dfb7e6c9" + input-imports = [ + "github.com/google/go-github/github", + "github.com/palantir/go-baseapp/baseapp", + "github.com/palantir/go-baseapp/baseapp/datadog", + "github.com/palantir/go-baseapp/pkg/errfmt", + "github.com/palantir/go-githubapp/githubapp", + "github.com/pkg/errors", + "github.com/rs/zerolog", + "github.com/spf13/cobra", + "github.com/stretchr/testify/assert", + "github.com/stretchr/testify/require", + "goji.io/pat", + "gopkg.in/yaml.v2", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 15d93117b..efd1bd67e 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -1,74 +1,9 @@ - -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" - - -[[constraint]] - name = "github.com/google/go-github" - revision = "511f540f1887d30b88cee4a2fcd1f2922754acf4" - -[[constraint]] - name = "github.com/ipfans/echo-session" - version = "3.1.1" - -[[constraint]] - name = "github.com/jmoiron/sqlx" - revision = "d9bd385d68c068f1fabb5057e3dedcbcbb039d0f" - -[[constraint]] - name = "github.com/labstack/echo" - version = "3.2.3" - -[[constraint]] - name = "github.com/lib/pq" - revision = "b77235e3890a962fe8a6f8c4c7198679ca7814e7" - -[[constraint]] - name = "github.com/pkg/errors" - version = "0.8.0" - -[[constraint]] - name = "github.com/sirupsen/logrus" - version = "1.0.3" - -[[constraint]] - name = "github.com/spf13/cobra" - revision = "e5f66de850af3302fbe378c8acded2b0fa55472c" - -[[constraint]] - name = "github.com/spf13/viper" - version = "1.0.0" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.1.4" - -[[constraint]] - name = "golang.org/x/oauth2" - revision = "bb50c06baba3d0c76f9d125c0719093e315b5b44" - -[[constraint]] - name = "gopkg.in/go-playground/validator.v9" - version = "9.7.0" - -[[constraint]] - name = "gopkg.in/yaml.v2" - revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" +ignored = [ + "google.golang.org/appengine*", + "github.com/golang/protobuf/proto" +] + +[prune] + non-go = true + go-tests = true + unused-packages = true diff --git a/LICENSE b/LICENSE index 9c8f3ea08..8dada3eda 100644 --- a/LICENSE +++ b/LICENSE @@ -198,4 +198,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/README.md b/README.md index 10834bafc..e2fe34c8d 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,140 @@ -# Bulldozer +# bulldozer -The `Bulldozer` is a bot that auto-merges PRs when all status checks are green and the PR is reviewed. -It uses [GitHub status checks](https://developer.github.com/v3/repos/statuses/) and [GitHub reviews](https://developer.github.com/v3/pulls/reviews/) to do this. +bulldozer is a [GitHub App](https://developer.github.com/apps/) that auto-merges +PRs when all status checks are green and the PR is reviewed. +## Configuration -## Running the server +By default, the behavior of the bot is configured by a `.bulldozer.yml` file at +the root of the repository. The file name and location are configurable when +running your own instance of the server. The `.bulldozer.yml` file is read from +most recent commit on the target branch of each pull request. If bulldozer cannot +find a configuration file, it will take no action. This means it is safe to enable +the bulldozer Github App on all repositories in an organization. -* The server expects a config file name to be passed-in with the `-c` parameter (see `./bulldozer --help`). This config file should look like this. +## Behaviour -```yml -rest: - address: 0.0.0.0 - port: 80 +When bulldozer is enabled on a repo, it will merge all PRs as the `bulldozer[bot]` +committer. Behaviour is configured by a file in each repository. -logging: - level: info +We recommend using the following configuration, which can be copied into your configuration file. -database: - name: dbName - host: dbHost - username: dbUser - password: dbPassword - sslmode: require +```yaml +version: 1 -github: - address: https://github.com/ - apiURL: https://api.github.com/ - callbackURL: https://bulldozer.dev/login - clientID: ??? - clientSecret: ??? - webhookURL: https://bulldozer.dev/api/github/hook - webhookSecret: ??? +# "merge" defines how to merge PRs into the target +merge: -assetDir: ??? -``` + # "whitelist" defines how to select PRs to evaluate and merge + whitelist: -You can get the `clientID` and `clientSecret` after you create an OAuth application. More details on this [here](https://developer.github.com/apps/building-integrations/setting-up-and-registering-oauth-apps/). The `assetsDir` config option should point to where you saved the web assets that `Bulldozer` serves. After building the project they can be found in the `client/build` folder. + # "labels" is a list of labels that must be matched to whitelist a PR for merging + labels: ["merge when ready"] -## Behavior + # "comment_substrings" matches on substrings in comments + comment_substrings: ["==MERGE_WHEN_READY=="] -When bulldozer is enabled on a repo, it will merge all PRs under the user which enabled it in the first place (enabled will be the commiter). + # "blacklist" defines how to exclude PRs from evaluation and merging + blacklist: -Bulldozer has the following behavior: + # similar as above, "labels" defines a list of labels. In this case, matched labels cause exclusion. + labels: ["do not merge"] -### there exists no `.bulldozer.yml` file in the destination branch of a PR -- Bulldozer will ignore the PR and will not act on it + # "comment_substrings" matches substrings in comments. In this case, matched substrings cause exclusion. + comment_substrings: ["==DO_NOT_MERGE=="] -### there exists a `.bulldozer.yml` file in the destination branch of a PR -The format of the file is: + # "method" defines how to merge in changes. Available options are "merge", "rebase" and "squash" + method: squash -```yaml -mode: whitelist/blacklist/pr_body -strategy: merge/squash/rebase -deleteAfterMerge: true/false + # "options" is used in conjunction with "method", and defines additional merging options for each type. + options: + + # "squash" is used when the "method" above is set to "squash" + squash: + + # "body" is a an option for handling the merge body. available options are "summarize_commits", "pull_request_body", and "empty_body" + body: summarize_commits + + # "delete_after_merge" is a bool that will cause merged PRs to be deleted once they are successfully merged + delete_after_merge: true + +# "update" defines how to keep open PRs up to date +update: + + # The "whitelist" and "blacklist" options here operate the same as described for the `merge` block. + whitelist: + labels: ["WIP", "Update Me"] ``` -The `mode` block specifies in which mode Bulldozer should operate. Available options: - - `whitelist` it will act on PRs that have a GitHub label with the text `MERGE WHEN READY`. - - `blacklist` it will not act on PRs that have a GitHub label with the text `DO NOT MERGE` or `WIP`. - - `pr_body` it will act on PRs that have in their body the text `==MERGE_WHEN_READY==`. This is useful for PRs from forks because usually people that fork the repo do not have write permissions on the source to attach the needed labels. +### Caveats and Notes + +If both `blacklist` and `whitelist` are specified, bulldozer will attempt to match on both. +In cases where both match, `blacklist` will take precedence. + +The `merge_method` specifies the strategy that will be used to merge. Possible choices +are `merge`, `squash`, and `rebase`. Specifying `squash` will allow for a further +set of `squash_strategy` options, `pull_request_body`, `summarize_commits` and +`empty_body` that will constitute the body of the merge commit message. + +## Deployment -The `strategy` field allows you to tune the merge strategy. Available options: - - `merge`: it will create a merge commit. - - `squash`: it will squash all the commits into one and will apply it on the target branch. With this merge strategy the user can specify the commit message ahead of time by putting a block like the following `==COMMIT_MSG== sample commit message ==COMMIT_MSG==` in the PR body. - - `rebase`: it will rebase all commits on top of the target branch. +bulldozer is easy to deploy in your own environment as it has no dependencies +other than GitHub. It is also safe to run multiple instances of the server, +making it a good fit for container schedulers like Nomad or Kubernetes. -If the desired merge method is not allowed by the repository one will be chosen by default in the following order `squash, merge, rebase` from the ones allowed. +We provide both a Docker container and a binary distribution of the server. A +sample configuration file is provided at `config/bulldozer.example.yml`. We +recommend deploying the application behind a reverse proxy or load balancer +that terminates TLS connections. -The `deleteAfterMerge` block specifies if the source branch of the PR should be deleted after the merge is performed. +### GitHub App Configuration -If the repository has branch protection active but does not require PRs to have at least one reviewer Bulldozer will just merge the PR unless the creator of the PR assigned a reviewer explicitly. In that case it will wait for at least one APPROVED review +bulldozer requires the following permissions as a GitHub app: -If the repository has branch protection active and enforces code reviews on PRs Bulldozer will wait until all status checks are green and at least one APPROVED review exists on the PR before merging it +* Repository Admin - read-only +* Repository Contents - read & write +* Issues - read-only +* Repository metadata - read-only +* Pull requests - read-only +* Commit status - read-only -### Keeping PRs up to date with base branch -Bulldozer also has the option to update PR branches if the target branch has been updated. If the PR has a GitHub label with the text `UPDATE ME` then Bulldozer will keep this PR up to date with the base branch. +It should be subscribed to the following events: + +* Commit comment +* Pull request +* Status +* Push +* Issue comment +* Pull request review +* Pull request review comment + +### Operations + +bulldozer uses [go-baseapp](https://github.com/palantir/go-baseapp) and +[go-githubapp](https://github.com/palantir/go-githubapp), both of which emit +standard metrics and structured log keys. Please see those projects for +details. + +### Example Files + +Example `.bulldozer.yml` files can be found in [`config/examples`](https://github.com/palantir/bulldozer/tree/develop/config/examples) + +### Migrating: Version 0.4.X to 1.X + +The server configuration for bulldozer allows you to specify `configuration_v0_path`, which is a list of paths +to check for `0.4.X` style bulldozer configuration. When a `1.X` style configuration file does not appear +at the configured path, bulldozer will attempt to read from the paths configured by `configuration_v0_path`, +converting the legacy configuration into an equivalent `v1` configuration internally. + +The upgrade process is therefore to deploy the latest version of bulldozer with both `configuration_path` and +`configuration_v0_path` configured, and to enable the bulldozer Github App on all organizations where it was +previously installed. ## Contributing -For general guidelines on contributing the Palantir products, see [this page](https://github.com/palantir/gradle-baseline/blob/develop/docs/best-practices/contributing/readme.md) + +Contributions and issues are welcome. For new features or large contributions, +we prefer discussing the proposed change on a GitHub issue prior to a PR. + +## License + +This application is made available under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). diff --git a/auth/auth.go b/auth/auth.go deleted file mode 100644 index 44cc69832..000000000 --- a/auth/auth.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package auth - -import ( - "fmt" - "math/rand" - "net/http" - "time" - - "github.com/ipfans/echo-session" - "github.com/labstack/echo" - "github.com/pkg/errors" - "golang.org/x/oauth2" - - "github.com/palantir/bulldozer/server/config" -) - -var GithubOauthConfig *oauth2.Config - -func InitGithubAuth(cfg *config.GithubConfig) { - GithubOauthConfig = &oauth2.Config{ - RedirectURL: cfg.CallbackURL, - ClientID: cfg.ClientID, - ClientSecret: cfg.ClientSecret, - Endpoint: oauth2.Endpoint{ - AuthURL: cfg.Address + "/login/oauth/authorize", - TokenURL: cfg.Address + "/login/oauth/access_token", - }, - Scopes: []string{"repo", "read:org", "admin:repo_hook"}, - } -} - -func BeginAuthHandler(c echo.Context) error { - state := GenerateState() - redirectURL := GithubOauthConfig.AuthCodeURL(state) - sess := session.Default(c) - sess.Set("state", state) - if err := sess.Save(); err != nil { - return errors.Wrap(err, "cannot save session") - } - - return c.Redirect(http.StatusTemporaryRedirect, redirectURL) -} - -func CompleteAuth(assetsDir string) echo.HandlerFunc { - return func(c echo.Context) error { - sess := session.Default(c) - state := sess.Get("state") - flowState := c.QueryParam("state") - - if flowState == "" { - return c.Redirect(http.StatusMovedPermanently, "/") - } - if state != flowState { - return errors.New("state does not match, possible MITM attempt") - } - - return c.File(fmt.Sprintf("%s/index.html", assetsDir)) - } -} - -func stringWithCharset(length int, charset string) string { - seededRand := rand.New(rand.NewSource(time.Now().UnixNano())) - b := make([]byte, length) - - for i := range b { - b[i] = charset[seededRand.Intn(len(charset))] - } - - return string(b) -} - -func GenerateState() string { - charset := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" - return stringWithCharset(10, charset) -} diff --git a/bulldozer/config_fetcher.go b/bulldozer/config_fetcher.go new file mode 100644 index 000000000..051df0f65 --- /dev/null +++ b/bulldozer/config_fetcher.go @@ -0,0 +1,221 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bulldozer + +import ( + "context" + "fmt" + "net/http" + + "github.com/google/go-github/github" + "github.com/pkg/errors" + "github.com/rs/zerolog" + "gopkg.in/yaml.v2" +) + +type FetchedConfig struct { + Owner string + Repo string + Ref string + Config *Config + Error error +} + +func (fc FetchedConfig) Missing() bool { + return fc.Config == nil && fc.Error == nil +} + +func (fc FetchedConfig) Valid() bool { + return fc.Config != nil && fc.Error == nil +} + +func (fc FetchedConfig) Invalid() bool { + return fc.Error != nil +} + +func (fc FetchedConfig) String() string { + return fmt.Sprintf("%s/%s ref=%s", fc.Owner, fc.Repo, fc.Ref) +} + +type ConfigFetcher struct { + configurationV1Path string + configurationV0Paths []string +} + +func NewConfigFetcher(configurationV1Path string, configurationV0Paths []string) ConfigFetcher { + return ConfigFetcher{ + configurationV1Path: configurationV1Path, + configurationV0Paths: configurationV0Paths, + } +} + +// ConfigForPR fetches the configuration for a PR. It returns an error +// only if the existence of the configuration file could not be determined. If the file +// does not exist or is invalid, the returned error is nil and the appropriate +// fields are set on the FetchedConfig. +func (cf *ConfigFetcher) ConfigForPR(ctx context.Context, client *github.Client, pr *github.PullRequest) (FetchedConfig, error) { + fc := FetchedConfig{ + Owner: pr.GetBase().GetRepo().GetOwner().GetLogin(), + Repo: pr.GetBase().GetRepo().GetName(), + Ref: pr.GetBase().GetRef(), + } + + logger := zerolog.Ctx(ctx) + + bytes, err := cf.fetchConfigContents(ctx, client, fc.Owner, fc.Repo, fc.Ref, cf.configurationV1Path) + if err == nil && bytes != nil { + config, err := cf.unmarshalConfig(bytes) + if err != nil { + logger.Debug().Msgf("v1 config is invalid") + } else { + fc.Config = config + return fc, nil + } + } + + for _, configV0Path := range cf.configurationV0Paths { + logger.Debug().Msgf("v1 configuration not found; will attempt fetch v0 %s and unmarshal as v0", configV0Path) + bytes, err := cf.fetchConfigContents(ctx, client, fc.Owner, fc.Repo, fc.Ref, configV0Path) + if err != nil { + continue + } + + if bytes == nil { + continue + } + + config, err := cf.unmarshalConfigV0(bytes) + if err != nil { + continue + } + logger.Debug().Msgf("found v0 configuration at %s with merge method %s", configV0Path, config.Merge.Method) + + fc.Config = config + return fc, nil + } + + fc.Error = errors.New("Unable to find valid v1 or v0 configuration") + return fc, nil +} + +// fetchConfigContents returns a nil slice if there is no configuration file +func (cf *ConfigFetcher) fetchConfigContents(ctx context.Context, client *github.Client, owner, repo, ref, configPath string) ([]byte, error) { + logger := zerolog.Ctx(ctx) + logger.Debug().Str("path", configPath).Str("ref", ref).Msg("Attempting to fetch configuration definition") + + opts := &github.RepositoryContentGetOptions{ + Ref: ref, + } + + file, _, _, err := client.Repositories.GetContents(ctx, owner, repo, configPath, opts) + if err != nil { + if rerr, ok := err.(*github.ErrorResponse); ok && rerr.Response.StatusCode == http.StatusNotFound { + return nil, nil + } + return nil, errors.Wrapf(err, "failed to fetch content of %q", configPath) + } + + // file will be nil if the ref contains a directory at the expected file path + if file == nil { + return nil, nil + } + + content, err := file.GetContent() + if err != nil { + return nil, errors.Wrapf(err, "failed to decode content of %q", configPath) + } + + return []byte(content), nil +} + +func (cf *ConfigFetcher) unmarshalConfig(bytes []byte) (*Config, error) { + var config Config + if err := yaml.UnmarshalStrict(bytes, &config); err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal configuration") + } + + return &config, nil +} + +func (cf *ConfigFetcher) unmarshalConfigV0(bytes []byte) (*Config, error) { + var configv0 ConfigV0 + var config Config + if err := yaml.UnmarshalStrict(bytes, &configv0); err != nil { + return nil, errors.Wrapf(err, "failed to unmarshal v0 configuration") + } + + switch configv0.Mode { + case ModeWhitelistV0: + config = Config{ + Version: 1, + Update: UpdateConfig{ + Whitelist: Signals{ + Labels: []string{"update me", "Update Me", "UPDATE ME", "update-me", "Update-Me", "UPDATE-ME", "update_me", "Update_Me", "UPDATE_ME"}, + }, + }, + Merge: MergeConfig{ + Whitelist: Signals{ + Labels: []string{"merge when ready", "Merge When Ready", "MERGE WHEN READY", "merge-when-ready", "Merge-When-Ready", "MERGE-WHEN-READY", "merge_when_ready", "Merge_When_Ready", "MERGE_WHEN_READY"}, + }, + DeleteAfterMerge: configv0.DeleteAfterMerge, + Method: configv0.Strategy, + Options: map[MergeMethod]MergeOption{ + configv0.Strategy: {SummarizeCommits}, + }, + }, + } + case ModeBlacklistV0: + config = Config{ + Version: 1, + Update: UpdateConfig{ + Whitelist: Signals{ + Labels: []string{"update me", "Update Me", "UPDATE ME", "update-me", "Update-Me", "UPDATE-ME", "update_me", "Update_Me", "UPDATE_ME"}, + }, + }, + Merge: MergeConfig{ + Blacklist: Signals{ + Labels: []string{"do not merge", "Do Not Merge", "DO NOT MERGE", "wip", "WIP", "do-not-merge", "Do-Not-Merge", "DO-NOT-MERGE", "do_not_merge", "Do_Not_Merge", "DO_NOT_MERGE"}, + }, + DeleteAfterMerge: configv0.DeleteAfterMerge, + Method: configv0.Strategy, + Options: map[MergeMethod]MergeOption{ + configv0.Strategy: {SummarizeCommits}, + }, + }, + } + case ModeBodyV0: + config = Config{ + Version: 1, + Update: UpdateConfig{ + Whitelist: Signals{ + Labels: []string{"update me", "Update Me", "UPDATE ME", "update-me", "Update-Me", "UPDATE-ME", "update_me", "Update_Me", "UPDATE_ME"}, + }, + }, + Merge: MergeConfig{ + Whitelist: Signals{ + CommentSubstrings: []string{"==MERGE_WHEN_READY=="}, + }, + DeleteAfterMerge: configv0.DeleteAfterMerge, + Method: configv0.Strategy, + Options: map[MergeMethod]MergeOption{ + configv0.Strategy: {PullRequestBody}, + }, + }, + } + default: + } + + return &config, nil +} diff --git a/middleware/context.go b/bulldozer/config_v0.go similarity index 50% rename from middleware/context.go rename to bulldozer/config_v0.go index 35a983723..516f38313 100644 --- a/middleware/context.go +++ b/bulldozer/config_v0.go @@ -1,4 +1,4 @@ -// Copyright 2017 Palantir Technologies, Inc. +// Copyright 2018 Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,26 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -package middleware +package bulldozer -import ( - "github.com/google/go-github/github" - "github.com/labstack/echo" - "github.com/sirupsen/logrus" +type ModeV0 string - "github.com/palantir/bulldozer/server/config" +const ( + ModeWhitelistV0 ModeV0 = "whitelist" + ModeBlacklistV0 ModeV0 = "blacklist" + ModeBodyV0 ModeV0 = "pr_body" ) -func ContextMiddleware(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - deliveryID := github.DeliveryID(c.Request()) +type ConfigV0 struct { + Mode ModeV0 `yaml:"mode"` + Strategy MergeMethod `yaml:"strategy"` + DeleteAfterMerge bool `yaml:"deleteAfterMerge"` - logger := logrus.New() - logger.SetLevel(config.Instance.LogLevel()) - logger.Formatter = &logrus.JSONFormatter{} - - c.Set("log", logger.WithField("deliveryID", deliveryID)) - - return next(c) - } + // this setting is unused, but needs to be present for valid v0 configuration + IgnoreSquashedMessages bool `yaml:"ignoreSquashedMessages"` } diff --git a/bulldozer/config_v1.go b/bulldozer/config_v1.go new file mode 100644 index 000000000..0be120695 --- /dev/null +++ b/bulldozer/config_v1.go @@ -0,0 +1,68 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bulldozer + +type MessageStrategy string +type MergeMethod string + +const ( + PullRequestBody MessageStrategy = "pull_request_body" + SummarizeCommits MessageStrategy = "summarize_commits" + EmptyBody MessageStrategy = "empty_body" + + MergeCommit MergeMethod = "merge" + SquashAndMerge MergeMethod = "squash" + RebaseAndMerge MergeMethod = "rebase" +) + +type Signals struct { + Labels []string `yaml:"labels"` + CommentSubstrings []string `yaml:"comment_substrings"` + Comments []string `yaml:"comments"` +} + +func (s *Signals) Enabled() bool { + return len(s.Labels)+len(s.CommentSubstrings)+len(s.Comments) > 0 +} + +type MergeConfig struct { + Whitelist Signals `yaml:"whitelist"` + Blacklist Signals `yaml:"blacklist"` + + DeleteAfterMerge bool `yaml:"delete_after_merge"` + + Method MergeMethod `yaml:"method"` + Options map[MergeMethod]MergeOption `yaml:"options"` + + // Additional status checks that bulldozer should require + // (even if the branch protection settings doesn't require it) + RequiredStatuses []string `yaml:"required_statuses"` +} + +type MergeOption struct { + Body MessageStrategy `yaml:"body"` +} + +type UpdateConfig struct { + Whitelist Signals `yaml:"whitelist"` + Blacklist Signals `yaml:"blacklist"` +} + +type Config struct { + Version int `yaml:"version"` + + Merge MergeConfig `yaml:"merge"` + Update UpdateConfig `yaml:"update"` +} diff --git a/bulldozer/evaluate.go b/bulldozer/evaluate.go new file mode 100644 index 000000000..d579a357e --- /dev/null +++ b/bulldozer/evaluate.go @@ -0,0 +1,202 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bulldozer + +import ( + "context" + "fmt" + "strings" + + "github.com/pkg/errors" + "github.com/rs/zerolog" + + "github.com/palantir/bulldozer/pull" +) + +// IsPRBlacklisted returns true if the PR is identified as blacklisted, +// false otherwise. Additionally, a description of the reason will be returned. +func IsPRBlacklisted(ctx context.Context, pullCtx pull.Context, config Signals) (bool, string, error) { + labels, err := pullCtx.Labels(ctx) + if err != nil { + return true, "unable to list PR labels", err + } + + if inSlice, idx := anyInSlice(labels, config.Labels); inSlice { + return true, fmt.Sprintf("PR label matches one of specified blacklist labels: %q", config.Labels[idx]), nil + } + + body, err := pullCtx.Body(ctx) + if err != nil { + return true, "unable to list PR body", err + } + + comments, err := pullCtx.Comments(ctx) + if err != nil { + return true, "unable to list PR comments", err + } + + if inSlice, idx := anyInSlice(comments, config.Comments); inSlice { + return true, fmt.Sprintf("PR comment matches one of specified blacklist comments: %q", config.Comments[idx]), nil + } + + for _, blacklistedComment := range config.Comments { + if blacklistedComment == body { + return true, fmt.Sprintf("PR body matches one of specified blacklist comments: %q", blacklistedComment), nil + } + } + + for _, blacklistedSubstring := range config.CommentSubstrings { + for _, comment := range comments { + if strings.Contains(comment, blacklistedSubstring) { + return true, fmt.Sprintf("PR comment matches one of specified blacklist comment substrings: %q", blacklistedSubstring), nil + } + } + + if strings.Contains(body, blacklistedSubstring) { + return true, fmt.Sprintf("PR body matches one of specified blacklist comment substrings: %q", blacklistedSubstring), nil + } + } + + return false, "no matching blacklist found", nil +} + +// IsPRWhitelisted returns true if the PR is identified as whitelisted, +// false otherwise. Additionally, a description of the reason will be returned. +func IsPRWhitelisted(ctx context.Context, pullCtx pull.Context, config Signals) (bool, string, error) { + labels, err := pullCtx.Labels(ctx) + if err != nil { + return false, "unable to list PR labels", err + } + + if inSlice, idx := anyInSlice(labels, config.Labels); inSlice { + return true, fmt.Sprintf("PR label matches one of specified whitelist labels: %q", config.Labels[idx]), nil + } + + body, err := pullCtx.Body(ctx) + if err != nil { + return false, "unable to list PR body", err + } + + comments, err := pullCtx.Comments(ctx) + if err != nil { + return false, "unable to list PR comments", err + } + + if inSlice, idx := anyInSlice(comments, config.Comments); inSlice { + return true, fmt.Sprintf("PR comment matches one of specified whitelist comments: %q", config.Comments[idx]), nil + } + + for _, whitelistedComment := range config.Comments { + if whitelistedComment == body { + return true, fmt.Sprintf("PR body matches one of specified whitelist comments: %q", whitelistedComment), nil + } + } + + for _, whitelistedSubstring := range config.CommentSubstrings { + for _, comment := range comments { + if strings.Contains(comment, whitelistedSubstring) { + return true, fmt.Sprintf("PR comment matches one of specified whitelist comment substrings: %q", whitelistedSubstring), nil + } + } + + if strings.Contains(body, whitelistedSubstring) { + return true, fmt.Sprintf("PR body matches one of specified whitelist comment substrings: %q", whitelistedSubstring), nil + } + } + + return false, "no matching whitelist found", nil +} + +func anyInSlice(testValues []string, elements []string) (bool, int) { + for _, testValue := range testValues { + for index, element := range elements { + if testValue == element { + return true, index + } + } + } + return false, -1 +} + +// setDifference returns all elements in set1 that +// are not in set2. +func setDifference(set1, set2 []string) []string { + m2 := make(map[string]struct{}) + for _, s2 := range set2 { + m2[s2] = struct{}{} + } + + seen := make(map[string]struct{}) + var result []string + for _, s1 := range set1 { + if _, ok := m2[s1]; !ok { + if _, alreadySeen := seen[s1]; !alreadySeen { + result = append(result, s1) + seen[s1] = struct{}{} + } + } + } + return result +} + +// ShouldMergePR TODO: may want to return a richer type than bool +func ShouldMergePR(ctx context.Context, pullCtx pull.Context, mergeConfig MergeConfig) (bool, error) { + logger := zerolog.Ctx(ctx) + + if mergeConfig.Blacklist.Enabled() { + blacklisted, reason, err := IsPRBlacklisted(ctx, pullCtx, mergeConfig.Blacklist) + if err != nil { + return false, errors.Wrap(err, "failed to determine if pull request is blacklisted") + } + if blacklisted { + logger.Debug().Msgf("%s is deemed not mergeable because blacklisting is enabled and %s", pullCtx.Locator(), reason) + return false, nil + } + } + + if mergeConfig.Whitelist.Enabled() { + whitelisted, reason, err := IsPRWhitelisted(ctx, pullCtx, mergeConfig.Whitelist) + if err != nil { + return false, errors.Wrap(err, "failed to determine if pull request is whitelisted") + } + if !whitelisted { + logger.Debug().Msgf("%s is deemed not mergeable because whitelisting is enabled and no whitelist signal detected", pullCtx.Locator()) + return false, nil + } + + logger.Debug().Msgf("%s is whitelisted because whitelisting is enabled and %s", pullCtx.Locator(), reason) + } + + requiredStatuses, err := pullCtx.RequiredStatuses(ctx) + if err != nil { + return false, errors.Wrap(err, "failed to determine required Github status checks") + } + requiredStatuses = append(requiredStatuses, mergeConfig.RequiredStatuses...) + + successStatuses, err := pullCtx.CurrentSuccessStatuses(ctx) + if err != nil { + return false, errors.Wrap(err, "failed to determine currently successful status checks") + } + + unsatisfiedStatuses := setDifference(requiredStatuses, successStatuses) + if len(unsatisfiedStatuses) > 0 { + logger.Debug().Msgf("%s is deemed not mergeable because of unfulfilled status checks: [%s]", pullCtx.Locator(), strings.Join(unsatisfiedStatuses, ",")) + return false, nil + } + + // Ignore required reviews and try a merge (which may fail with a 4XX). + + return true, nil +} diff --git a/bulldozer/evaluate_test.go b/bulldozer/evaluate_test.go new file mode 100644 index 000000000..55ec8d152 --- /dev/null +++ b/bulldozer/evaluate_test.go @@ -0,0 +1,336 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bulldozer + +import ( + "context" + "testing" + + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/palantir/bulldozer/pull/pulltest" +) + +func TestSimpleXListed(t *testing.T) { + mergeConfig := MergeConfig{ + Whitelist: Signals{ + Labels: []string{"LABEL_MERGE"}, + Comments: []string{"FULL_COMMENT_PLZ_MERGE"}, + CommentSubstrings: []string{":+1:"}, + }, + Blacklist: Signals{ + Labels: []string{"LABEL_NOMERGE"}, + Comments: []string{"NO_WAY"}, + CommentSubstrings: []string{":-1:"}, + }, + } + + ctx := context.Background() + + t.Run("singleCommentCausesWhitelist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + CommentValue: []string{"FULL_COMMENT_PLZ_MERGE"}, + } + + actualBlacklist, actualBlacklistReason, err := IsPRBlacklisted(ctx, pc, mergeConfig.Blacklist) + require.Nil(t, err) + assert.False(t, actualBlacklist) + assert.Equal(t, "no matching blacklist found", actualBlacklistReason) + + actualWhitelist, actualWhitelistReason, err := IsPRWhitelisted(ctx, pc, mergeConfig.Whitelist) + require.Nil(t, err) + assert.True(t, actualWhitelist) + assert.Equal(t, "PR comment matches one of specified whitelist comments: \"FULL_COMMENT_PLZ_MERGE\"", actualWhitelistReason) + }) + + t.Run("commentSubstringCausesWhitelist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_nothing"}, + CommentValue: []string{"a comment", "another comment", "this is good :+1: yep"}, + } + + actualBlacklist, actualBlacklistReason, err := IsPRBlacklisted(ctx, pc, mergeConfig.Blacklist) + require.Nil(t, err) + assert.False(t, actualBlacklist) + assert.Equal(t, "no matching blacklist found", actualBlacklistReason) + + actualWhitelist, actualWhitelistReason, err := IsPRWhitelisted(ctx, pc, mergeConfig.Whitelist) + require.Nil(t, err) + assert.True(t, actualWhitelist) + assert.Equal(t, "PR comment matches one of specified whitelist comment substrings: \":+1:\"", actualWhitelistReason) + }) + + t.Run("commentSubstringCausesBlacklist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_NOTHING"}, + CommentValue: []string{"a comment", "another comment", "this is no good nope\n\r:-1:\n"}, + } + + actualBlacklist, actualBlacklistReason, err := IsPRBlacklisted(ctx, pc, mergeConfig.Blacklist) + require.Nil(t, err) + assert.True(t, actualBlacklist) + assert.Equal(t, "PR comment matches one of specified blacklist comment substrings: \":-1:\"", actualBlacklistReason) + + actualWhitelist, actualWhitelistReason, err := IsPRWhitelisted(ctx, pc, mergeConfig.Whitelist) + require.Nil(t, err) + assert.False(t, actualWhitelist) + assert.Equal(t, "no matching whitelist found", actualWhitelistReason) + }) + + t.Run("noMatchingWhitelist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + CommentValue: []string{""}, + } + + actualBlacklist, actualBlacklistReason, err := IsPRBlacklisted(ctx, pc, mergeConfig.Blacklist) + require.Nil(t, err) + assert.False(t, actualBlacklist) + assert.Equal(t, "no matching blacklist found", actualBlacklistReason) + + actualWhitelist, actualWhitelistReason, err := IsPRWhitelisted(ctx, pc, mergeConfig.Whitelist) + require.Nil(t, err) + assert.False(t, actualWhitelist) + assert.Equal(t, "no matching whitelist found", actualWhitelistReason) + }) + + t.Run("commentCausesBlacklist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + CommentValue: []string{"NO_WAY"}, + LabelValue: []string{"LABEL_MERGE"}, + } + + actualBlacklist, actualBlacklistReason, err := IsPRBlacklisted(ctx, pc, mergeConfig.Blacklist) + require.Nil(t, err) + assert.True(t, actualBlacklist) + assert.Equal(t, "PR comment matches one of specified blacklist comments: \"NO_WAY\"", actualBlacklistReason) + + actualWhitelist, actualWhitelistReason, err := IsPRWhitelisted(ctx, pc, mergeConfig.Whitelist) + require.Nil(t, err) + assert.True(t, actualWhitelist) + assert.Equal(t, "PR label matches one of specified whitelist labels: \"LABEL_MERGE\"", actualWhitelistReason) + }) + + t.Run("labelCausesBlacklist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_NOMERGE"}, + } + + actualBlacklist, actualBlacklistReason, err := IsPRBlacklisted(ctx, pc, mergeConfig.Blacklist) + require.Nil(t, err) + assert.True(t, actualBlacklist) + assert.Equal(t, "PR label matches one of specified blacklist labels: \"LABEL_NOMERGE\"", actualBlacklistReason) + + actualWhitelist, actualWhitelistReason, err := IsPRWhitelisted(ctx, pc, mergeConfig.Whitelist) + require.Nil(t, err) + assert.False(t, actualWhitelist) + assert.Equal(t, "no matching whitelist found", actualWhitelistReason) + }) + +} + +func TestShouldMerge(t *testing.T) { + mergeConfig := MergeConfig{ + Whitelist: Signals{ + Labels: []string{"LABEL_MERGE", "LABEL2_MERGE"}, + Comments: []string{"FULL_COMMENT_PLZ_MERGE"}, + CommentSubstrings: []string{":+1:", ":y:"}, + }, + Blacklist: Signals{ + Labels: []string{"LABEL_NOMERGE"}, + Comments: []string{"NO_WAY"}, + CommentSubstrings: []string{":-1:"}, + }, + } + + ctx := context.Background() + + t.Run("fullCommentShouldMerge", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + CommentValue: []string{"FULL_COMMENT_PLZ_MERGE"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.True(t, actualShouldMerge) + }) + + t.Run("partialCommentShouldntMerge", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + CommentValue: []string{"This is not a FULL_COMMENT_PLZ_MERGE"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("labelShouldMerge", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_MERGE"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.True(t, actualShouldMerge) + }) + + t.Run("noContextShouldntMerge", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"NOT_A_LABEL"}, + CommentValue: []string{"commenta", "foo", "bar", "baz\n\rbaz"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("noMatchingShouldntMerge", func(t *testing.T) { + pc := &pulltest.MockPullContext{} + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("blacklistOverridesWhitelist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL2_MERGE"}, + CommentValue: []string{"NO_WAY"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("labelCausesBlacklist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_NOMERGE"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("substringCausesWhitelist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"NOT_A_LABEL"}, + CommentValue: []string{"a comment", "another comment", "this is good :+1: yep"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.True(t, actualShouldMerge) + }) + + t.Run("substringCausesBlacklist", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_NOMERGE"}, + CommentValue: []string{"a comment", "another comment", "this is no good nope\n\r:-1:"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("failClosedOnLabelErr", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_NOMERGE"}, + CommentValue: []string{"a comment", "another comment", "this is no good nope\n\r:-1:"}, + LabelErrValue: errors.New("failure"), + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.NotNil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("failClosedOnCommentErr", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + CommentValue: []string{"a comment", "another comment", "this is no good nope\n\r:-1:"}, + CommentErrValue: errors.New("failure"), + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.NotNil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("failClosedOnRequiredStatusCheckErr", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_MERGE"}, + RequiredStatusesErrValue: errors.New("failure"), + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.NotNil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("failClosedOnSuccessStatusCheckErr", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_MERGE"}, + SuccessStatusesErrValue: errors.New("failure"), + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.NotNil(t, err) + assert.False(t, actualShouldMerge) + }) + + t.Run("allStatusChecksMet", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_MERGE"}, + SuccessStatusesValue: []string{"StatusCheckA", "StatusCheckB"}, + RequiredStatusesValue: []string{"StatusCheckB", "StatusCheckA"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.True(t, actualShouldMerge) + }) + + t.Run("notAllStatusChecksMet", func(t *testing.T) { + pc := &pulltest.MockPullContext{ + LabelValue: []string{"LABEL_MERGE"}, + SuccessStatusesValue: []string{"StatusCheckA"}, + RequiredStatusesValue: []string{"StatusCheckA", "StatusCheckB"}, + } + + actualShouldMerge, err := ShouldMergePR(ctx, pc, mergeConfig) + + require.Nil(t, err) + assert.False(t, actualShouldMerge) + }) +} diff --git a/bulldozer/merge.go b/bulldozer/merge.go new file mode 100644 index 000000000..ff4ee4db2 --- /dev/null +++ b/bulldozer/merge.go @@ -0,0 +1,197 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bulldozer + +import ( + "context" + "fmt" + "net/http" + "strings" + "time" + + "github.com/google/go-github/github" + "github.com/pkg/errors" + "github.com/rs/zerolog" + + "github.com/palantir/bulldozer/pull" +) + +const MaxPullRequestPollCount = 5 + +func MergePR(ctx context.Context, pullCtx pull.Context, client *github.Client, mergeConfig MergeConfig) error { + logger := zerolog.Ctx(ctx) + + mergeOpts := &github.PullRequestOptions{} + + switch mergeConfig.Method { + case SquashAndMerge, MergeCommit, RebaseAndMerge: + mergeOpts.MergeMethod = string(mergeConfig.Method) + default: + mergeOpts.MergeMethod = string(MergeCommit) + } + + commitMessage := "" + if mergeConfig.Method == SquashAndMerge { + opt, ok := mergeConfig.Options[SquashAndMerge] + if !ok { + logger.Error().Msgf("Unable to find matching %s in merge option configuration; using default %s", SquashAndMerge, EmptyBody) + opt = MergeOption{EmptyBody} + } + + switch opt.Body { + case PullRequestBody: + body, err := pullCtx.Body(ctx) + if err != nil { + return errors.Wrap(err, "failed to determine pull request body") + } + commitMessage = body + case SummarizeCommits: + summarizedMessages, err := summarizeCommitMessages(ctx, pullCtx, client) + if err != nil { + return errors.Wrap(err, "failed to collect pull request commit messages") + } + + commitMessage = summarizedMessages + case EmptyBody: + default: + } + } + + go func(ctx context.Context) { + ticker := time.NewTicker(4 * time.Second) + defer ticker.Stop() + + for i := 0; i < MaxPullRequestPollCount; i++ { + <-ticker.C + + pr, _, err := client.PullRequests.Get(ctx, pullCtx.Owner(), pullCtx.Repo(), pullCtx.Number()) + if err != nil { + logger.Error().Err(errors.WithStack(err)).Msgf("Failed to retrieve pull request %q", pullCtx.Locator()) + return + } + + if pr.GetState() == "closed" { + logger.Debug().Msg("Pull request already closed") + return + } + + if pr.Mergeable == nil { + logger.Debug().Msg("Pull request mergeability not yet known") + continue + } + + if !pr.GetMergeable() { + logger.Debug().Msg("Pull request is not mergeable") + return + } + + // Try a merge, a 405 is expected if required reviews are not satisfied + logger.Info().Msgf("Attempting to merge pull request with method %s", mergeOpts.MergeMethod) + result, _, err := client.PullRequests.Merge(ctx, pullCtx.Owner(), pullCtx.Repo(), pullCtx.Number(), commitMessage, mergeOpts) + if err != nil { + gerr, ok := err.(*github.ErrorResponse) + if !ok { + logger.Error().Err(errors.WithStack(err)).Msg("Merge failed unexpectedly") + continue + } + + switch gerr.Response.StatusCode { + case http.StatusMethodNotAllowed: + logger.Info().Msgf("Merge rejected due to unsatisfied condition %q", gerr.Message) + return + case http.StatusConflict: + logger.Info().Msgf("Merge rejected due to being invalid %q", gerr.Message) + return + default: + logger.Error().Err(errors.WithStack(err)).Msgf("Merge failed unexpectedly %q", gerr.Message) + continue + } + } + + logger.Info().Msgf("Successfully merged pull request for sha %s with message %q", result.GetSHA(), result.GetMessage()) + + // Delete ref if owner of BASE and HEAD match + // otherwise, its from a fork that we cannot delete + if pr.GetBase().GetUser().GetLogin() == pr.GetHead().GetUser().GetLogin() { + if mergeConfig.DeleteAfterMerge { + ref := fmt.Sprintf("refs/heads/%s", pr.Head.GetRef()) + + // check other open PRs to make sure that nothing is trying to merge into the ref we're about to delete + prs, err := pull.ListOpenPullRequestsForRef(ctx, client, pullCtx.Owner(), pullCtx.Repo(), ref) + if err != nil { + logger.Error().Err(errors.WithStack(err)).Msgf("Unable to list open prs against ref %s to compare delete request", ref) + return + } + + if len(prs) > 0 { + logger.Info().Msgf("Unable to delete ref %s after merging %q because there are open PRs against this ref", ref, pullCtx.Locator()) + return + } + + logger.Debug().Msgf("Attempting to delete ref %s", ref) + _, err = client.Git.DeleteRef(ctx, pullCtx.Owner(), pullCtx.Repo(), ref) + if err != nil { + logger.Error().Err(errors.WithStack(err)).Msgf("Failed to delete ref %s on %q", pr.Head.GetRef(), pullCtx.Locator()) + return + } + + logger.Info().Msgf("Successfully deleted ref %s on %q", pr.Head.GetRef(), pullCtx.Locator()) + } + } else { + logger.Debug().Msg("Pull Request is from a fork, not deleting") + } + + return + } + }(zerolog.Ctx(ctx).WithContext(context.Background())) + + return nil +} + +func summarizeCommitMessages(ctx context.Context, pullCtx pull.Context, client *github.Client) (string, error) { + var builder strings.Builder + repositoryCommits, err := allCommits(ctx, pullCtx, client) + if err != nil { + return "", errors.Wrapf(err, "cannot list commits for %q", pullCtx.Locator()) + } + + for _, repositoryCommit := range repositoryCommits { + fmt.Fprintf(&builder, "* %s\n", repositoryCommit.Commit.GetMessage()) + } + + return builder.String(), nil +} + +func allCommits(ctx context.Context, pullCtx pull.Context, client *github.Client) ([]*github.RepositoryCommit, error) { + var repositoryCommits []*github.RepositoryCommit + opts := &github.ListOptions{ + PerPage: 100, + } + + for { + commits, resp, err := client.PullRequests.ListCommits(ctx, pullCtx.Owner(), pullCtx.Repo(), pullCtx.Number(), opts) + if err != nil { + return nil, err + } + repositoryCommits = append(repositoryCommits, commits...) + if resp.NextPage == 0 { + break + } + + opts.Page = resp.NextPage + } + + return repositoryCommits, nil +} diff --git a/bulldozer/update.go b/bulldozer/update.go new file mode 100644 index 000000000..14ef37a0f --- /dev/null +++ b/bulldozer/update.go @@ -0,0 +1,113 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bulldozer + +import ( + "context" + "time" + + "github.com/google/go-github/github" + "github.com/pkg/errors" + "github.com/rs/zerolog" + + "github.com/palantir/bulldozer/pull" +) + +func ShouldUpdatePR(ctx context.Context, pullCtx pull.Context, updateConfig UpdateConfig) (bool, error) { + logger := zerolog.Ctx(ctx) + + if updateConfig.Blacklist.Enabled() { + blacklisted, reason, err := IsPRBlacklisted(ctx, pullCtx, updateConfig.Blacklist) + if err != nil { + return false, errors.Wrap(err, "failed to determine if pull request is blacklisted") + } + if blacklisted { + logger.Debug().Msgf("%s is deemed not updateable because blacklisting is enabled and %s", pullCtx.Locator(), reason) + return false, nil + } + } + + if updateConfig.Whitelist.Enabled() { + whitelisted, reason, err := IsPRWhitelisted(ctx, pullCtx, updateConfig.Whitelist) + if err != nil { + return false, errors.Wrap(err, "failed to determine if pull request is whitelisted") + } + if !whitelisted { + logger.Debug().Msgf("%s is deemed not updateable because whitelisting is enabled and no whitelist signal detected", pullCtx.Locator()) + return false, nil + } + + logger.Debug().Msgf("%s is whitelisted because whitelisting is enabled and %s", pullCtx.Locator(), reason) + } + + return true, nil +} + +func UpdatePR(ctx context.Context, pullCtx pull.Context, client *github.Client, updateConfig UpdateConfig, baseRef string) error { + logger := zerolog.Ctx(ctx) + + //todo: should the updateConfig struct provide any other details here? + + go func(ctx context.Context, baseRef string) { + ticker := time.NewTicker(2 * time.Second) + defer ticker.Stop() + + for i := 0; i < MaxPullRequestPollCount; i++ { + <-ticker.C + + pr, _, err := client.PullRequests.Get(ctx, pullCtx.Owner(), pullCtx.Repo(), pullCtx.Number()) + if err != nil { + logger.Error().Err(errors.WithStack(err)).Msgf("Failed to retrieve pull request %q", pullCtx.Locator()) + return + } + + if pr.GetState() == "closed" { + logger.Debug().Msg("Pull request already closed") + return + } + + if pr.Head.Repo.GetFork() { + logger.Debug().Msg("Pull request is from a fork, cannot keep it up to date with base ref") + return + } + + comparison, _, err := client.Repositories.CompareCommits(ctx, pullCtx.Owner(), pullCtx.Repo(), baseRef, pr.GetHead().GetSHA()) + if err != nil { + logger.Error().Err(errors.WithStack(err)).Msgf("cannot compare %s and %s for %q", baseRef, pr.GetHead().GetSHA(), pullCtx.Locator()) + } + if comparison.GetBehindBy() > 0 { + logger.Debug().Msg("Pull request is not up to date") + + mergeRequest := &github.RepositoryMergeRequest{ + Base: github.String(pr.Head.GetRef()), + Head: github.String(baseRef), + } + + mergeCommit, _, err := client.Repositories.Merge(ctx, pullCtx.Owner(), pullCtx.Repo(), mergeRequest) + if err != nil { + logger.Error().Err(errors.WithStack(err)).Msg("Merge failed unexpectedly") + } + + logger.Info().Msgf("Successfully updated pull request from base ref %s as merge %s", baseRef, mergeCommit.GetSHA()) + } else { + logger.Debug().Msg("Pull request is not out of date, not updating") + } + + return + } + }(zerolog.Ctx(ctx).WithContext(context.Background()), baseRef) + + return nil +} diff --git a/client/package.json b/client/package.json deleted file mode 100644 index c025c31c0..000000000 --- a/client/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "bulldozer", - "version": "1.0.0", - "description": "Auto-merge bot", - "main": "client/index.js", - "repository": { - "type": "git", - "url": "https://github.com/palantir/bulldozer.git" - }, - "author": "Vlad Ungureanu ", - "license": "Apache-2.0", - "dependencies": { - "@blueprintjs/core": "1.27.0", - "github-bot-ui": "0.5.0", - "react": "15.0.2", - "react-addons-css-transition-group": "15.0.2", - "react-addons-shallow-compare": "15.0.2", - "react-dom": "15.0.2" - }, - "devDependencies": { - "copy-webpack-plugin": "^4.0.1", - "css-loader": "^0.23.1", - "extract-text-webpack-plugin": "^1.0.1", - "file-loader": "^0.8.5", - "html-webpack-plugin": "^2.16.1", - "style-loader": "^0.13.1", - "webpack": "^1.13.0" - } -} diff --git a/client/src/favicons/android-icon-144x144.png b/client/src/favicons/android-icon-144x144.png deleted file mode 100644 index f1ec2ea40b433c062e0f81ace68ef0ae02baf1cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15534 zcmd73Wl$YY)IJF065QQ_ySrziPj4 zP4{$7_j9DDZKnI2NF@a+BzSyy2nYxyptQKkXPWR|g#G$?Kakx1^O*oFMdd{yAnM`~ zUX7tYpCMgTq{JX*`Ml-73nOr`%PN{-kHeUgv@#YNRTm(M!AQp^|J z)*tu}6dbBGZ&v4SLK7jRQ30??5VVnG5-Oh|(QIini;x!?YbhxQOF}!5k=j;51ydUl zIH;3|r5h&>-llMZqBS8QLBCma(bV)<(5qb+SUt*lbz1jPpVJq_tjreqa-mz**0%1r z;dkKck?(i^e%~c#3py%_)`WY~$rr)l=4t~Ro9G^*mq*(d$`(|G&S%xMd$P6xmZ91J zZMgTgeo)*{GNtH-FUt#;0`Vw*hu^i*?sW2JPQL0RxI(K{sSCXwDc;a`U(@^EE53)$ z{!;9o|8?6YmM)?xQmC{!E%nXV(-qO0-}i+d1>^DE)=#IFz!lCFIwm&mxj3YcCb+oBuA_ z{rOUe{R%8;&9l}CwKhbxPc0WS39Oh*DOuH%!00G_HMWMfj$V-p6AKT|@Z~TKIk_of zJR&;_OW=VQj^B{Rg!RhK&6k%F0!$s-AxSB(OTi1{=P|s5Bq?H_7>|tr;Rs}+wwZQo zWoQUefN=?I|4){fOTYZoRDm0po3Y8sB*VO7jXYE9(w^r7@2#b8l`UpAf;zWLvx#pMe~ zbZKq!#|!iYeSt}Ec3~Fz(p0I~s#2^{p#n;yt!8TYG-&Y4{J~7%U!1(5`CIuFnt5rCyjddGF{ z|H8l6?jT%TY)XM{i+${kTKU=Lf%92iT|(;*n?Af=-uPIw*f=^&e-}Y>nh5ELFp09C5{>RwYv@RZLZP94b9u z5vas{*1kienH#UTpU?))qcvE@JMG`1bv^HW#9xi%t~#ISdXDBg>|M%pvvYFJdA&7> ze|8y2Qh*pN6*cvhUOEfn_|A#J%>aht<FXiA~1Y|A}_`u6!1lG=zJks_1NIY!~fQ0VLD4Wg^l`^w31U>refj)GHQ@4)tdC8Xb9Rp`g>)Hu%$bv82SrVKfij3CV4o*-n{H19dO$$Ql|%aMgvSYNK@XGeez7ZGY{tP7=6N7ma!j`As; zvwEeMrc_DB?fn}uF}TSde?0K5Wo_bc0;rOScx0EQMg?Tc?UD85$%{SH(nePx{w;NA68O-3wt$hD4fl5peq3B4 z%Y)wR;mOH*NB69!Ol$Z-c(DP1v9CP1B>V3oR4|EF1K$auRkF=bxDZ(8#DRJW9r{M> zfjSZLDI1K*?;?b>`<7|iJS}~vnS=DdD45tt@M!@mI-s>Iu|ZY?vXOzjx7DX};_XX) z2dOXL`*&8|Ux*f5<=U{V5VZ3BwYo#$NUb>VLybkqmO@aWN};PP^T0oHs3%Uz+3O=_ zY%)LJCttFa{Rp(IOBJD)dz;IcEX*^LA_EAEE{^ZOsyanXhbvQ$7{7Pryer%1qP-Ri zF+eLWWbebNu%=CRc zJKy9LlmlrB!TWfeib=um)qvJ_M0_O~b{CU8nL2m3BWS0iw`5eP(RwcG!mp$C)?v-# z&F}beTiNb#x*7bVE*tL~3GPuL53g*h{119Fm7n#B%i{rd8eHi0%Frt0@C}YFH3X6> zm6#NDe zgVTa2+ie-SQtS53t;ahv)%Hiv;cqfnQN|qVs3KW|;2H6AM- z;@Jf<%Cv<>w)MiK;?7HYPADInD)oPB76f*EkYcmh3L0K07 z%-{?E6S!IHF0s5r$;1a?NM3IDjmveM1r!Aod?Yz=BHQs7xUe3(<-hj9`QI0J67q3` z8}iCKRrGim;%(aPFnZGBfH-5llQEccJLl^<<{v_MqPW&DrANgKeu)KgM`D1KbuRl< zQF=22#@Dy7Qo?s+lS`1_xVSg`iRaC$gLW1r;p-ydl4iD#sELc2uQ(nyS|Wb4%DTCw zQpbCC=>5Uqo|~;xDIy>F(|l;R);d51Dy91K%~Ms21OzQ*@GMj{`4PV=@?Ak=0B+r`CYU@yY+vI|o0T1{4#khj9q`JUJ7a>ECnR^i%!7~%FS#njNx+OG<^Jb%Y9x(7jD z6t@?Hm*&37yme3b3E$pOU@*zdPOmfuq|AfLYl<}DA+n|68c}n3ax{{j*f(~IKdfLn zkErfu1gI4rU)Qd(uhu%XWM=7X$KxCiNvz$TU~`Zs(i!!L(`9_Z149twV5Klbb%IE9DeYF^YviF z&mvfmNhACig`~t!jp<4_I=~)=giz-_6o0sw9sfW*hl=eKEAht^CV2>ax4`JOT`aZX zv>H7U!wX)K7MdiL16H^sCiY+!4HsD*&pb`jJqB&;Rsv88f&`!vc;aQH-?{r>kZ#is zt0H46QQPm?T?mUAipDH-$N2XqerJ(XjGnB!hjHfs_plYFl!1*m+Q<7PVY?PhBFsD! zHycy(-15j&>zERib>^#V*2vOb9$}$iaHD-maV9T{`@O~wp#-wZe6nsW^L^jkhqX0| zR8M%U*}q|#F3~A=+FYWT*^C~zS>V2T7nJTP@DB5VNSIbL0_--An3e@x+ZcSf`N~ja z7phLSd|-#r`8h$9$kQIQO@rYUBmcgm9So8*smQ6g?QcLypliI1J_zR-8XYfGtMFW4 zp{ty|2+AEcl63!ut8Zm;oIAECggxb2T_L}s!KHEJ9B3*LW7^&oBh~cLfZS%v%b=@T z?k#XHmUWf;f|s`%HXr3(+Lu{8slN_$%wW7#rXdaM1-$xjzX~Tq<)he>_!Af1XY+({ zLZ#S3VVv#?jY-qJCsjTBZbdUsQ3rpuqi&Ji;&{mT^81#d$vJg)*3CJSj~~oQckcU7 z9dN#kj&!pi!qwvf$m|j&ocvBN(LC8JTUL&#InFQs!hbmNvCtQRbI~7z!N^xRVjIhi z7?d)@z_1SoMNBH%%=6p-fo}OD>Mo##7@YHrYSK1&9JjHmSNfK?Z@Ej#R-sFKdPe^IyKDN(wt+qSMP0+HT`+Yh`Z8V1y2}A{E~| z$j>gwA@<6fLfYE^3wc{|3JM;a9`9N8)T#CIz|A;6`w2&7AqP!TS5QKEn)RgeKn>Ei zqKcB!$x&ASY(U_#Yty8XEE-tP`^1PtVj{3Cg<~h+2U(;_)RHQ7WYb`#DfRF@iV?rU z3AogtVy2vX+Jv#t8+7@VB%w^>f%oZOzVpE&f`Hd9ME=J-x)ULqL>7sPIAc<1BB?57 zHcP{8r$U>Mtrr8{P)Y$^p zYLF{7wZ@<$-P%H%lZ0sySZ+z4s-n(Jju3&NLYvO}_LpzR5Zi{|`gc;V6G){yb-L7a z+$$4F6(rYjF|t@{lVckQQT9e9o#x;m^jLs(=49Hw11&`wQXHc+Pgd{x&vZ+qAgJz< zCsiqabWN~Z>q!uCS%BG?)}jWiiI)>vz<&1Y{3OFn`dnxsMbtPnh6F0TXf?Fg$BDq( zBhH^2B4W}l-UYMU4G6$zb*>(#If@0DVnsF=p}=h<_66K87t07Gn71WZ=n{5%2>3|j zMtouiWjs1(JJB07H}u3>+kPJZ>O$Z%^>lZ!z9>hOLnt$NZe_@pGS!v9VF40*ezcP5 z5X^Yz8GV=y4Ez?e0#1ygbJ$ihjjL)I^f=5r>h6uCnJ1r}k!Ma6G_o}-$S^REzZOXi zMdJ|?N?D*3s|QYzmZO5irbwMmZ~8KYceN&ITGpKmWyu;l_fEs9l}eX4ed6C3J>>FC zd>2bqaA-iWoPT6A#lJLD9snT+86r`}wadVZD>Qu`_;_#(np;4&tN@!yLO%fpxV7GY_-l@b&cfg%Y z;j*qUV3?whNVGb7IC}nmwhquuQb}E$7|uoIizH zg{diA?2yqwa~YK;dnQl}VLY=Gu~QXBI`&iqA(C>l_oacb%Q~>E84oY!iqLOKUvq^L zeM)Cj4yogZ;6gJ5RPS>XBQ2vHc&IrS3EcM2ESsnVjyppuj7>vX3bX;wBCHdgChTUv zzZFiIAaZ$)u(7lH5D@XO&KGSC6x&m=Jw}4;s0!PGovDB&CCAnvvbq0J=6+wKZfjGz z`ELZ>=?PKQlr+!Bi`R``WHFDrbZ`jFoV_}O^BPV+?uiPL=&ZdLT!7-H3F4ru*};0x zL0R>Wv6CriV!(qpekl zu1#UV3r$mO5@Kp%^>EwjZRWdrZUey8e&sGhDdBuy#leg0lFm_vg^ZTSP9DS*)e2#J z6yEm?4n?qL-hcFsE38<%-D4<{Hq{O;-3uH%+F5054K{7K8=1ke0U)NJOY7=45j$7J zcjkHL({F`0iqL75Ih`Yj$C`%*+I+wMWq7gk_yjPg&OUC$Bx&#D z?}(4|sTso zsEzDzW;Y*Cc_O_X8J$>N!(C9b2d>mB|rb4u==Y6{0L31CYfvtxCC3JXU@4m*qM z;s9xE=58(us0$bAe+rhE#i_2AOwmAijKv@KChA_IfG2Nc>zcWK6&Ss7Awch!>7P)J z6*B_B$cM@aifqS=>F?O*;x^&VxM^vO`2w?&;Ff2n&~nmW2SH8`tTIN$^mMW zU{HSd&ke}I)XvUs^yc~t^^``tsWm8aC!<&@Ek*rX~$P5noYF~iC6SQ%>Y(UCP>D!j+K8;;@IO6@iA`|G5#a(m^h zRh-WZ7gG0H%jGdmWz&8?@e^$RYel}r`{^j+z(-~~N^S`K&)SkwuWPLMfR9v2WI69$ zm8lhaX=;*WR0@4*&;1tL5c?+o-DPy@fkFRBm0*wcEE4X2{agBixq+s*)|IgtWoYo5 zR5Nn<>bDgAZem`Lo-~w~#h%Fs(x~E+VZYPl;_A#oO6TYz=BiEz8qJ|Nv*jlgh)K(H zzk`ud<{!HzhyQh+E;c#X+Z$w4iKse+c08^rV(fQ^7=CE3`o6UDQMBbuvIz@Mj%Bj1 zdM)S+e7qw3*Y(O&n8-`Q;^Y9@L8MBmZo4Jv>>^^YeJs1V4;zyKFID+PY85W;!-iK| zD{+aAgIFHAdu_YX@wb=c9+aM!?!bR^uyZGv@h2aOCmz0{$JKA3aTm$_TZ{_@c8=-( zW0|}u6eVT3I((;R-{ee*-iBY4VNoWfzg<-6ZCw|#4RdV#{LpM$lnyU04y2Lj+A zbNMHpx<7u!lq#C)Le_jyCUkP$kI>3_<7E>J@f`72$u#H?N1sfUHolr^h-X24$Adu` zzj?!X=g*6O57fQzlBn&H4wZ8JU%4X(xn$Vafde2Wz^ z(w!(fSaQ#2CX@wns$?b=^290E9c2h}at?Msj&E!>uQ&v##}3zKiBKUhl&4RyW%}e1 zy&+{a%>&zmQy$U7*f%JYkU4WrL?2K`AsgouX};FIS+?392&AQSxINr-xNd7c`CoOH zIauK|XZK#sc;-bk3WUl*aDf$b%v|kY; z=YO~-x%Tbb6$AMdJ!#Pgo#X-ngg;&vKA?T>&-XU`&Rt&5G`sqK`Lo$D!lZu_SqVP! ziU#LTUR}KqGDOq=xZn>BQqWe!r6spf1?9A&N+NFJgLD}+JuZps87=fZi zGF~LHA6$$RS>EL4;G5DCW1UfDze3ayjn?SRBZ=w-epiZ6q6tkPJoU+(>-%NJz`~)?PU=X<1<1e`Vx7~WvanK9%^f$eG?BgZ>J($I6CcCqK;S78^N6og%mTKla z>{~0Voqf+{!4N|gg{5pK{*DjVH<*Uz)g52z7^T%}0j3@s(9FWVkw}-BrMd@%s0MH4 zMoAWn64t6)Nt5y$UYoqNBwk~WQl?Ze6{u9AO4!ep79732ZhgGNta=^j6AJle^cIr3 zpDsGhsT1mwC7>Et}|zKU_yO$X62iCM5ACFXMWYnGj6yGAgd**XjFA8`N5C!Vh~4rxL$pWdjsN@7 zFCn+NoIf^DO}e4DP#{*JM9gyBBBfd+GfOjWcgoHwu_2uCr7Q#{Xvw?+tWMgwOcDqz z_~Wf*{?LCVTASPfGe7^}2Nj&lR=NROnP?Xnqc|h`woHlhz``$5gg&>*Kk@}8wywT8 zN22q4f5A5=hlEbR_Jj*+9P`2<2zC%$>KB9&tOuI;d$hsIs1hbLwA zpp&L4sr3m(#d5?>QO-jN*Oxydi%BzBoABGpmY1nipxerK8dx?di439{Pf@_*gUU<9 zWe`Y9p6cdxHZv_$A&qg-p&<_;u%u{8`DDu|?MwEImfWjcB3gSCas(!#nLBzuXQg2? zHch)g%3JJnwK5JupDo>=$;6f$T9G_lF!503nse%d1~uHv(?&}wsZA~lXZx~rT-ZPv zq`v)sVo4Rfe0hFOZGBFpsjOLh%))uwucxTO?k%$a(6^=PsA8Hb3{jE=as&8fN*v8X zhl;T8AfQO)JW%H<bgbw_hO7=s5#7Lu-=ocBJh;$quUiF_!fHG|T0qLqhOe!=RK40k)OvVj4 z70_Jy!U-79y7u>o*(E^rOI^26v|C(v3$ieJuaAU zA$aGjhTE4DKR>R24`zC`H^myd97E$I)7{$crdy0yG-&R@*vEf`>4jNLbtbgRm6}ZXuI}l40G!BmJF~sNNn^h!1MC~`M z1hvg0k8p6abmo+@B&pC+`ZoZJmAT*l>n8*v(N=wZbtJ}Nr$n}F=?h~_*-*VK<>X-% zDY0V2pdGh*v~g)eVL$EOe~tt8?a{ZE=&u`wXIqCcXn)LAuxrT6=S{P^5-f{$3Gn;nk86EnwPSU9)Exo^fai$~NGR(%i!HbK2m#)@Pdqzo5 z&iL(8EP1T_;-#3M+Zf=oe#upvSE51IF5*Uat1O_tGhQrdU|u2PT+62zJxBjSQ&CrD!4RgVP6N~i_Ty9 zCDfU^$dCIwRRVW1cwnbG{n}EnJFnL@AXO$TFK-kEw?&R*rA|k80%2b)!^e1VdOj($ z7HfbH{65o_eRRMuZ(Y6eZ8n&eraD`X4sU>ta<&@hA0wYf4KYZFaDhk#t zo-{2Lm(eZ;;g33}XP0j}*2ouVt8J5eF8L9~2;UJAV<99>)o9c`x39oYg~ab$qiGTj znIdV8kxf2{OAgepKLFQ_FzrN5ohf>zew6*s%!CN?g(@a)=GdjcqKILUlpmF7oyVq<(yjPS!piCJBj!5TGl=QXCQ@`2bt39 z5upDd(wxUVy-E~IzV-FLUXynggnm9VFVZ1i7W@fcWmfd-G4qA|ecR`)Iux#i#W};I zuIKiaqw6ABrj&^{PS>!nBo;ezyttVg){86W+MF>#@?@AJu;DVPUmKt4W44x%S<|~CVl4_T z)6v5BU?Yg%vpAWefvRF|!#Y0Vu<~jJ0uzv%?VX#LtboS{zU1An4d4V5AR4(Kh8(< zXX=h;EO*_>=5ayJx1(S^Zs{tJW>?W5`8)%% zP3l|3o492~h?^<3bhKFgaB2e?F{EJ$C_AFRImq%jki6URJdBf+ff#QkPyPE+RTKFCBX z{V`6AqlL36QU3d45`(XVYPebYIdsYlOiGcQY5&x0nvlGjWR0T%Gt#4?(EypFSpC`C zA+ffJPEi8_(1ZH-W{N_bi~U$75O?-&vhW?+dDn}3*F$diZcz3+`5_(2Pm|v5D0#j@ z+>@&7*@y1F&pLP=hUE(Q*`#<|{Y~;f;Yy34Oq5e<})*)g%YShJ6U7udaGYJ<1|^K;sWuv@kKj2^r@!qBl{X#5+>%w#i$sk zDQ0Z6B@>_XEFpM|nZfa~ESrhnzt)7nq4-K^`Os%&V;pvP1u2#!k@Z@(y8`ZQL8#{s zuPe1o$58`anVO!lNksoy%f{Hi<1fd*s^X;^67?ooR1k{9H-F9wCLI-=X5+Bjk7AAbM{y`qaQ%J~BRA5cldssne%m1z z@H0uUIJ}I6(d6k+EN%+Jgr=MODFce=8Zg+tz5#Kcq*0>N%=J+0L8DKR1)Y^i!!9)b z{Sx<0u;iRU35(`_*pyDO zYqIc*M?Pu$uK}>oGbx+k&g195jM^1Si)vIu;ofgeoH%th33MRDm9aSjQFS zFsBpy_JVR*7w`8P^^g_d21trbV<;3{JV~m6vhx@}h3}Eg5??zRN4HN&GdS%8!c{$a zz0WQPk47sB4hX*DBMS|AKzhcarK|=M^T|bZXOk9CU zrRE?@dVJ#~UtVCVo%fd~`C*E*#9lghSl{GZ`%@#-aEiObZ2yEpxIw(i4}35PLaQy5szZ9JuVbtS}Ey< zCMEBJ9rcQ;2z28VH9wN%Y*s@z*LAa2o0*MR9qQD6|7MgA$S0eoBOt3J+otL}BTeIV zrO>h0jWN7wvZUhW<{ol1lxD)1T_`>p7o$Rg!(ot}E&l%O4gY8U^YoV7vHai6m^x9V zn<#2Vt2Cdyw6zFofWsav=5`O$?k7ATw zy{|B#(g9-ter1~DxJ*88CkxrM9ZXiF<#<{>zR{ht8TSS9g-VPJS}Y7!INqGIuEW1^ zFRR>redylqyhELZ3s%q?*cX{dCT2s7#yw3(r4lT;S+{yvs^U^UM~ZkS=?wd`DVEWc z5D#xHiDmv@5~IF`oif5KCcbr7z&%x2^h@j0eh8wpJg(&Dh)*85H9&zf4!vYE=MW8! z!ycA}Uk&|ZCu}a2XsQ26MkF}ySS)n$q7UDjIAYSsNnhZ%1zD@*e3$gt#yyIxk4JEutNiZ6n zo!H@b!c8#O9f?Hgxw5TRXb>4ZmT~nwG(C3=X5HtRkNnKN6T^;>T6WS?u+)0KQH9Wi zo>$0#;pi)Yql{7cZxgt%(Y4 z|~IwPq}R?S>1jciNuUl#VH!Y^Ld?9E-@q}C4E zdI#dSVjms;x&%AEk#l{F#b$XS!_CF3Pt$}=(Qm$&qI#1%GM-qiET|e^i59JhOte9f z>rf>e?d;U(1BK@tl1Y7Pf{SsBi-EupDOp1zo1z}A&NKK$4k%e8IwfY&g19NgeqYw{ z2Zi{{u`!zVuLvcbf$J%g?I>d`GpfA}_ z6=$y;8rrWIt)#P3;*3?MNLn1X4Us|nkA5tFO$;@grN@(t0lVnTg8%M;EMEQmqs$2({`N%>giVD7b$i*z3oUciZD z*r4Y;j6<1Psg3jK%RoQ|ek8f7`bP?^V`}puo!2FiQ!b5ilby5bs{5)@Nt>p4 zx}BK`=Z=`N$lnNWb&qt=YVDgzGo^*R%f{-^T{`k{eept*O8L-P3M90(QJ?i~U?ys? zq@miQwUgbEYPJ^K(MYtiF}8WDaC1&9t=u2*8X27pE_DtUq5N5dD=Sv4!TJ`jVogOw zwbY^v3TJ;(di&>1}ZeX)7- zQJbI?(5WrK1d^sqIob>Z8ke7JKK{rsgp8y9O&Daj0MLzPKZ+gshoDan>UB}4#@MLl zh7EyW-m+gT)KV!-DcI*H%p@|gC{2%ir^`&SD8OdPsxm^u7`*)3I2y5Gu(yevUm7gG ztbCdk1N>t+;|%icb$3BBL~!xHqu}@ zxIOa7<6pU2ko_|ChSW5^<-pUEamyX1&?SW; z?R7Y2)D~UJYaG9w&ES89Eld6n;j zHf23S(%AE0Eae~)u&lS`1Af)$KGaycqB@wGn7yMq(PA^o0{H~Qf4m$|bEv5Hb952BF453;czD145hDJza?okWFSK+kU;>rOB*$b==` z-2t+@tu|1M3=CJ>{U71|t=(n?Qf}xa&7r+|V@6C=F$MD}DOE{JSlOA-*=j1RDbXWk z@&ctU$z3NRMedP_s8e=&ZxPbQ16SFddS8HwrY+6a#wA+Xw25*LCfe9FMC`0eTl+-x zt6WWEHPh&RM^tHQR+N#Za&S%%PFBugUoxAHQ(3xPvwyjpN6rV&RSqV)T>b;5YfeyU z(=GwfV9|E?xLVi!%iPb*ot=}Wr&*IKIOK(mnv}M0#{~AAQ*}DyE?{=Ooe2dT1J&rp zzn}<-(4|`V+96Kf7|c044c6!N9n&ca-qtRi_=S)3LV%dgm|eH&@bTq)Z6s96wFc@) zQk8BkFh75cwrr~BHyc&S7G`*!nR7Xn{(V2Kz9v!d=}nG%@;ZE{dw>&pTFsXBs$q-K&NFQY_0D z=LaN8kY#cRf*SCsJmgrLY`MwFi+O6KI@d|Mbtt-ZN<8tIERAr@?1P0TPfPXV&`2W z2NNMenY(mnKel8thg6L1s^u^%=hxu5(XV6%>KHL>`I>Sz2ibvnys6u_9a61Z3FCLH zEJ;P(-SKNaC{qh7->H&&>xn9xz8)N;X)&ghtJ#(r7O9k=1J$aZrcrzY#mRbyhhe#! zO7NQP4I64|(wjt#aj*Uu^hX_kaIu+4eot=nO=uPq)`rbnhVR02L14twb+b0Eli zx%=*p=Gn(232qH7+d+896c&?%sdF5s&lQuO_rlqz&(d#{EVk~e)PxU%CL!_}9NxKl zh6Neu7{)}c|x4j=x62g|Ek=CiCFGw5ZU z{|Jz9m$mluT5x z(enXuwB^n&(aDL_HjQ^1IhS&9OYr)yn{IeExR9sZ9UOz4DZoM}t{|BTp2H`G2qbT%*E@q}nWh7H*-1M?_>S^GXCbFsIq8)-LeN zsy1nmBb(ZR3-y>>z-JD|cD^~Kdz9-p=P(%=xYTi`;Zl+{D5gv~lk^x?XV#@gPEL_w z?D49)k6$DAH(1khEm&}jm&)uOlVn$^$d?VM5+tS7Yk*PeK#*}IZc<(uH^FSSHUdfq z{!(=mr>M~`g}tn?HWhwN<7U_na(g(`&S5PvVIeIy`&gP3GoMADHQT3+Ci#x+^NGEQ zHY2Gfxoal<-OVX&{DA^x2L1jp@@Wxuc3Ca==)f+rw~r5GxmqOy6G(|B?eZ;Gn_=nOJBnC%^oejaL!u6Dt$|MzaRPiJ;G4>30EZ8{HJ}4W6d`M7^PI)9$ zY$ISKg>;Htim>e2Pw#+CnZAi-#Lg>4OE)((Vm`Q9(_En4RoTq*4TKnDH)qk5x3&A1 z0<7u&TaWm=cBf~al!IbcP>_(`0%erR-#z$f+0m50>iF{cu59v5>84)hnRZnD)Iv|H z9NF^EFV8%#kB%q&6~sK&T)rD14$VbGe^h0<8aBVvc8>jSaRtE%Y4@xyxu0iRR_0k$ z_Jbyk>8Wi%(4kRR<$9%XzjG`#!Ojnzxx_u=N_5&KP;k=1-@S7f-AKo5J6Xg66Y0_Fo(&toy=@HXD&^N z-BCmBj3qi$p5QTC)}8!aKUM9gv6r27sCPz5ZWr#zE}nEILG1tK`8!*vVRnpAeeMXzmKwm+ruJsMl zJx}*=YO{pYyx>5=1dyQusX<|`f%(caTR z{=sA9&Z_GpOZTH}_t?w~Iyj!l)W#+%Bm!Cg!mHcjk2_!)f_=pa@yv46OXoho`Rloc32lylnFF!Zo&qP-8r0KOj|yJWbt1> zpw{#54Ahg+S2MGMzu9b^rR{qCM-ykC2psCTbA-3t%)LGH7H&uG$j!_1*PCoD37gZI zwd1N|Kma>gab+_wF%+bjOs;q4E;KsiITvs8p;_5a=@5U%q~EugY~Z+|i5+xEi2P@$LWkr%7DUu`3nXM5IsneLP*w#zJ%95*kjCHA8im z4W7Bs^QlBO>1X14h9icyG~?Li*wb6bS#iFl%|YH>{(Pi#xAs*C=@jMW3+YoTQSydm$$>y?N?$XjOlB77Y(kM*Dk4$)19na8P{%bULkbz;`scqy!iirIUsIg3|lFjGYTBZTTSo50+%N3capS*yg z9y^&nu7l0jV3l!K7seFIJN#3;tIyw9X3io2LKEq}hTiS4@V1oD^CYmeIX}>se2bG( z3FgGzvB_K7{|NEMGOs}B0s3n-b;jvvvO*YawQZTV-UWM5qCyHi_8r|H_fXf4@ODJaD$UX@3pNv(E@o?i7Xw^*w_({Ht(ARTW<>T=xlEop($par0Vpp@mK_i0Bka=mnc z%HWr5aHT)woqjZ81#q5SzGp-Uol+zCHtO~1A)r-Lk^$Q26BNGh{xk#GQh4~y#I@}v zTfkY30^MWdpSjnXuElr9{pYT>zTpA!O)z#|u+QKPSpinQE^BwJ4+6>1vAH9CW#gfJ z^*POFeJs10e)}uQly_qmy>;?;9le~r*ScDa+IOVy6Ag$DW3$Ns;}H<;moeqc(F30L z)zQ{ISf7hGqVui?zcM0Oob&-CNs=#Xe=CkOY|~Oxp>8a@q}(Ymu+~3*1y>2om$+WF$O{#B(Q%_mIib<5}ZH`4!)8@aR z3tsgjT9zG6a$M?-uC|aFba%kzd3pt!U*unQt4^xHX@ z=#YCqZJ7>>IBe+xYdIvkE=$XyW*zayA834#Uc6s^`Wh?_*!n$lW3DFvY)r=^u>pk^ zZsvJ|E|W?5@93F_q-D>Rk*))(2LZt?{+lQnIjdJX`PWDh+#Eq%->VCjtXPEk$4~2+ zRcLeeFFU)3*8L(3PgL7UuRc8*bnyzBNTN*e#}i!tb{?-Jc+{ae2tnER#FqDX`EAMj zFS(60=y#03{Tp{mg8h`u}z2hcK#SHN}HQ4(q4aD5a}} zmaCbut2v*kv-xKN!N$VM&B(&_8Pr%=`8c@vI63H9Som025(v?G|6c_54rbOCUjN?& zTcVX=p9GTsNpNwnaP=^DHirP(8(W&o8(UhN+LCZFaWnBS@{)XtVCrUX{==1zPw5lt z0>S$0qn-Kx!2FL)K0YgRYfCFv2v%M;6bR@4G{gB{eEx5YrnQ-?)qjxLYEsxw2;TpK z$XnZ+yLvgAL;R0c%#J@Sh3hpG{trI#YM&?wRt{b+?$5}|v4Ki^`Uye#Uwl-pz0Dz5 z#KcmHg#Ihi_+LfpDnJMeYdiDL>NDH_aJ6%=WVSGNw>EY7;llj?Gz>F~83&iKxj73b x8Z|$XH@}I&!9j!&Xsw^^Q~Q}mO97rmH2nRK|J%Ru7a#f%ZTU9Vtlz-rZ@cZ; zKD8x-mI6GBXt+6h_Us|$d0g|{>shgK1wXj+N9^3W6Dj36X9bKgXsv%{T(p(~Jd3a_ z3xE%N-~+t&4L?sRlR+y*s3LCv&;NW@&#fWoN-305O+^$!Af;?>(zVv8C~Cgvr%f?h z3h*qV;pg}E_3_GAyqr?82tts{X1VwN``NW?*E4Db8qp`62>C*SZdn$VWi=yIrDBm? zJ9jcNGK$u5f)2H85XTkA_x?iOFe3h7U7*c!>S`4{+$vAr6lWGd(j)adsLLlgvE?&yRO{E~JQyAVuq!fNVAdD1Bf$OEnw{_CHte=&u*0OQqMmC>!K386K6@7iZ zbLXiw+GvE3r={3u0xbnN2hgwr)oO+R_P+NqIzB-S=%45dYNY3GM|rp z^Ln-pEhFuQC=Es_j1WZi3YCe2ASF@=gb)ZoX+;!91VKRE4+ukzHiFLXUM{`-Dqi@a zm-5^jp390AD~`B!t@YDf!!w7L0-PggSb=YR;~RYV@Bg0m_I83Wpe>u@lOO*$>2&&p z8Dgz9Q`1F;hDO=DZ;%5A1{plKpRv(F{PHkDP12byv8v=*bsZ-d*E41Bx}5C|33w`Z_hK6yRtu8Wflaq6h+Cpz0E1 zEQ}H4(*Zk&JDDn{NP7`RgCVgt7!VSKIO4qKpIFDS{2#CUnM<4tl_ul<& zvbjz!+Hx5;Jnv?1y7>ic+_<3`89Q5ODZn`f+i|dM`?#xpp#~-7;y&c<4 z(Vlns`(NG8=GA44ln6T(aw1R>1d*Up0c`|QNTdME(%4et*nm(VK}Q0Sf}O)XXyM@4 z25l@F20&{KI(B^w^Ul%CDap}#VT_q0`3XsTdpn(-f-nqu^09k)=>9wTmw)^S8#iCb z4L9Dzi(mRu&O7hCvva@C_5*I=#PI8N!Z1Xfzy;7s;ifz`Uw9#&>!P)y9tix%MTd%t zFR_F`N`q}_ENMu4G=9?dr1b%=D zLxLax17R2v1$8WGuq=sfTUZh-OClu*VX&kG=JqJDWdJZqcoaa8%jaopmnapnZ`Y$d z_R!tjcI&74+8sZjqoe&9CkD0@;2eVx5{TUkAtg~1QK?o*XEIG;hy_C6*Xsxj0!`g_ z8J^9u<$?(^D2$QR0+*?BirHFFf} z$fT-dGAZ12JMF!BQt32@_wAuHGr{t;YZ%SE>4S~qhK*<6lHHiPZTvqlSVDZn|0dHzGzHbO4gVqMev9K&jD(#ZZW$0g-CfAlH+tx-l zpC{Xv$8u7HfkxUELP(6!oOk7QJbC|JlxN3rT!&hvOfKKf+6$h8iUKOd0`+Q@dbL8m zR-;s^VOcgp2#QkRSddQHc%H;*DuZddOpUCv?ZjJ*vw@ZZoXaqP0Kt*c5L<-`S}FW$ zm3pm)ibB3SZ1GjU3&)YTu1zZClF4OQ(VHcg&yj6wqph=@Og=|8pC^;gkV>aWWm7n= zh3nebZmb*+-Sq^OQUNQH&5f<&d35)$U}|Krd45;F=oPFv|DxCmBm+G5yx>zr(IGho0KPUY=MZk*Uhi9g_Z)GlSo7$iL_{Qqy=d>Es#l=a&FriA5v?L z<2oGJb(qP~SzOPVbGzm#fwU~N(m0++TW1&bN*Se8(+zT542v?s}=9V`iFGf&)7fO8E^A0MO;gi2AZRGPnT zWQ5=Ip7-$kfBZ*8k>UE6zntg2^0^otA>=&aZul07o6!tW8iP{v*4ZS2Bc-HLsLKtt3d zv>mye&X1-X@v{{xo$Xlc+IoOWsn%TmpAHL0XkrDlEF0T)FxsG0L=*%>1Xz~E+6%U@ z`n(G%%}jA<_b#4%;KwL!n4GB-nPMvuwp0;@Vbh&3#>5t3-tQYiStt|KK)rf+!{hxU%*xb_)faGH4kA|)yc zy zysuKJ0ESE^)AY$*&tYn!$mFiOF;12h7hFnvhf8s$j1U4Z<<40I1JaVzDs`UPdXP%F z#-Y8Vi$BlBY*mv@yov(MQTv!U+zU|{Af-hn*G8>cb^7+s6rnkP8`|i81Nfs*<3WQ;VkPTsrhobT*hccTUQs` zezKLzvR~xVtDi%;R7dK=RA=k#+CIz9!vo}U4qd(N&5gBf+w6UEkm7754tG9NjQDtQ zCk(=;-OxT;to)V&oB?PZfe_sK$&VoR{1I>1^jRMN(u=v{j_)JH;%a)Oh!a!`abUF8 zSe8Y5dwcV>Qn^efmtktE&Sjn7UjdhR;y6=fqglW?6vidS^EUoS>xurwOGZq_p|!SHA{(f1g*}AW_oeoi8b| z|IT-Dc&rq=Lr)`UuII)p^l^S~v_Y#mMe^%q3T2D+nfrL>FR!H*u0*PBlx8DTrN~!* z(#4p$p7y-NAPD>r$FWc+612l;wmnidw;Tx zp}T*Lx4%#^U9@l=#l#G#)F$%T^rAj1lg>1=tH(tmuPO={9j~&!Z-zhkjrAz|0(9vC zf|`#%TjZYY4qK<5%ktGZLO&o1759DbaW-AFnkZ7tOcrt6#U;8<3j!?LNixwIDXim& zxS9Kdvy7GkoFW=-$*#TQ+;{t%c;}7dlzj`!5(ph}+k+SLs`q||ww%4FgpO7^mi=bv z@K`kDwO9_A9ox;{{6Q~WE1pAnax17Jm8l9(4Mu!t*Yg-yx17+gfshHM$gtzF{YWXW zooC+liBA|nBw64PFKx$xfurt)G2nO}LY{pEXt_YAfJS?diD{p&eEhBa($!C3EE}aE z>qh*?JpI;+o!QyUlD&?J!1FyBBv$KP5-SK0B$$#Zd?|3cc zi7{*rQk+thXA6Ac{&hIL*Wy?KS|9siaeeVAUibX(Cn2fw>1uo%wf0Go&)G)H1v*(6 z1;Xaj|NJ4YZTmQDR@lsxG(GL`od>|a@LzfP%U*y|5temgSHmQ}F~}pjvKYQBk%)U&uJVXi7c6BQH?>&vov$(*0|oe@A121;Wb22 zh){}hVKye~Ek*-Oe2q#)L}7rJ$()t!?#ZB~01IG#!>I=1O|Qc@@Av_F*L!)osb%DzVGrKkr% zvJ%ot(sdOxQ-R;I~W|C1|cyjUZJ&8s3?eq zFp4lHrfH}!NPZt-w8m(SQXxhgj1G~)prSCY*HtPG!6w<<(65niZ)bLLYVr4SUfJV< z?}2BnLtIM%7Jv|fVyRBCR3nOflu~$(Wc$v&9J=dQc+2yu6zeH0+kj=b_uv|w9>Lc? z^*hw+0a6+)5nv2h!bgg@v6QQJBcj7tqK-h}Sc;Srfzfn2HZQ#NN&@ZTSrN8vux&#} z4t6|M=F&?CxZ?WjDGon`ZPzJ|*Euj0u;-A^^EW(1t@=RXQVGiSxb=^aP!BA^2&4o* zw5W#`jsT@WM>1KB1sEGCAc!pLN+yl1BwEFE3){A^Y=?BlJE_K1QYJlwPPFVBgX4P1 zXSQ6RXAO;T<n5m%5laj~~H@XlY#5CwYxkWygD zxB~(-Xuk#_Q^;Tn5gZ2DaB-SDK+pl#Ty!5II{=o8(F&1~3=ak5oE~2NbI+wRz5~aa zp)wmXJXB`qfq>t7vrjfx$An^D5zRcyW#V%bjh}Vw0x1na5Qj*$fl6JHODn$pU?(5{ z)=FGApj0U1rqXDoQIVoru8_*4@zRUSZ2&l4iiSBmk=tazX4Po^#s6*82f~nC8kL`|l>2*~+$EG+7mOQeX#N3Z_ zuM2VH>YDPRrXHqU@Y0%1%PUB!DHV!r+;T1btJV^R0YXTM(~~^;;N5Y9+(lyk9^iOk zE@Oy0T!<4SL7pMB6kr}?@_=kpps%NmQZacPO$RnYHUzEtts%j45gfrn&st-dAPLPI zm?wJjZgFN&XCJDS6R_-Q?8o0v)d^^ zsrj2=f%Ks>AK}Rw#>+FXW*t!&Hr<_`ffeLCx=@inPgoaI81r=RG1yK_1v%Snh?WA( zL+k>9ZQDdj;kk)iA0f;qHqoZ}zxl5Sga`qDfn$PYK`k&m_LPg164%!39xAZmve&V3 zLkFd?`w*5(WxT-SyA3_<16-p3C;enV_kBudqRfH?O!7iyGJV06Sc?q9~r^Dm&i&BCwNIKR(u-o=vg z#KTyQLwT~mo`VtfdYMQ zdlW$^s8vd&vTc}zqAe{8DXqBcM55>q{@`1T4ILz%%f~%_QYmcL!%JtG968KWk34{s zf`dCAqpSCYq*6|j9TrK=v&MEDs>SJ~t;^Z14QMFE=hd{IaXL{ad4y z%N6{5?6~;iV9uX-+5NiBTqcqfNDvqwy6x!H)_Ah(5VvV6z zi$jveK+02m1p1mJ$*+#(U;U}xyd{sa?<5I7id8@x! zz~x%-BA>S3paGE3-&x0!d1{p+-EtK%S4R?s0hQt`sf>%!8fjTnibWp1>-%%Pj4TVw zvauYy8TE-omY@9i5q9l3gqO{e%4Espa-_5IcgJlq;Rdu>GO?h{76n67kYX(KE1u zzLl#{QAijBgh4o5Ssv4AniZ2Nx2&WwUP;h>i#hS~& z^$JW(S6SARKkeCQi$O~Pl8x`3-~2ajTs=adZEAsq=R$9nhb0#%QZXm^XTv=r>FN+F zvKfb5N~3ff3pWOkhOyZc8wV;hnm&B)hgpygzx2EUb>ARt!OWf=4B)V3lcHWMVu@r^ zJwJy4AYxZ7h$N<=5W-4+Z^i$XHpU2STM!u=5ZIPP8HwY>pQVkYuQMQ1^hk|U%P^d^88&aOYbp$tD>Jvs1 z6GE0Y^4Zl)P0tdA0Z|yT^O5^#>+Fa}qb8xJMx(2GwbE?nHFxFE*42aUx|FJt*#h{^ zM!ei6qOgh}i1%1J1QTFXL}Yx{td01E+#THhvA6K1_kEWBzGqemmb?Nq_FLcn?!7$k z;sV!QD7pK9L#?h!xr<>`9v?!)E=_yR!gVX?`kZItD~o!yPJ5e;Sa}7@yO!~lPx$=v zrziQh&kNpg{VbbTD)x>zcsYqJ6@e1RB(sh<7_kNLLxIu)Wem0j^)Sf>C(0m%q3R1# z#!wHTD<2^VKnsM@m_QTFb!vY|MN%kTJDQJF&7El6@ZahT-V{5#*!_F(OP5K z7T^BfeSGsX@8eJ3R;N$_DIE%xc#y>D)+oiJL!muqW63xwWZ8mpMf1?URow963yAPQ z#UqiFf?7qfVnv2MV>!Be;JmdVC)2aa9QA$f7ctjH8;F!hW`8w*b<7{e-P#nE?I47; zK#!wEG|o+qr}WXUHooM%&3ZGEkOU9T&V>0TsQ@}DY22}M5C8C2zsjG!WgOSGh$65Y zmtv(+sB)SRF#)Y3ufeXPHMnlXcOUNJvTHZdkqrsMx#AVuHYj8Bl`rk$sN zcoK&LBjzGH34&1IICGTb236xkrRb(n`gMeM9CNhe!X(ECB0<%UlXmCgJl-X#0Fqd^ z@4Mq~`JGqpVACp_axIPq2|L3~F&XoD+HPlTMLOF66_Cxq!`p4_uJgF$0*7+NB)$A& zqMB_xeB~>Lcy!J8k}%Ju0+^$*^!5No zgRlrnyLtUZU&GX(T+>J?kOri5DU?oP**)R0KuAGnUVs(1N_lc@BR~K1Jya?oRw9*J z8*({^FMV~K^SgGic|BAs;z)+)NgQ(_i97m}gn&rJ-=#RMP}hl1=3HF%=V6IifOyEW zQZ>qt{0jc;7@>|^1EyWg-~@d0;qE!=?iqP_g3esL`TPE3ecW)V9yd_B@L}90n;YmURbAj9TQEZDycbQ1@dOMJYo*Z*k90 zs)S?PxapcYwTg9Sgx`>a6$Q3+tSfa!+@5*kP8awEQp%VR_bm1OTnv_!0yLh((3HVj z_cDy|FvgJ282<9}-Q2Y;!RIp?eARgLg^Vp-0a{sP& zx~~5gsg=J(X9hm{)n0D-PM+QlgXcOF%29KM?Wv+c=<-~P&RmtJMh2MTb<{bZTE(YU z3fOy4@z}lFc>Rr2gyFm@vC}}K{B}MisQJabucKaH7^cbVk3Tz(|68^lvqHmw>Cxe& za6TDoAtjb=<9Hr^txD+E&uJxC5}V*gC%4hj5$?Y0E`Igb-bp=x?Gu;qiGT3;_G2An zya3m+uq{Eg7M)h1Ndu9BzHS&C&v7971y-%NoZ)gW-HcG53fQrAH?O{K1Zmksp*bVN zp~FZJCVO}(a|*&G&>pHZiKXwP_$N!dIWLA_cMVdp#U){ zE#!+|xSiL&{`I6XIkrCb7{C63PckyPjIQxj`8cyYK^Q+H{0R{ARD#A!4$Dd0?rCifY%n1RGon(P6 zLwBdbX;WB%L^_5{J@(=KS{)VEsFcdoDi!=%oiGfOIc9ScaEde2=p)*nn1n26p|nf6 z9-oKS@ut67J+=UJ;ywkT#@6xY$8`vEE7F;yM*PexK!Z~IxzB!<>z?x*RBti)O{5HMIU6Yi<*JHVpr_%HNNG{26uIWQ7qI2hOEId-j-A6W`(OOx zD-R(pL8v5QD4tgMW7cHM;c0eiBd#m3ERfPP*w8%p>RRmB&aXl=KqQEKLCqIb>Vis5 zGFui*7A*D;+kESu4AVu)bWt!<_Sm&&H|0{DN-bzsx!I0|6cWp_nl%j&w{~}(BmI3T z1t|}T6^Y~6gua06ifWCzxi7pdf)-Ny1EFX*x%QQ0vH3;x+3kJ zIuA%nNv&36&DyoR{a4?K5Owwsm6_i6pS;;-qFMX@TW)Ff43QmqL>6;q)tOCS-X9B9izE)7rY zR|H{|)dMbn!7xSyX_G@RPUf`TlfM#nxt($b) zQ$eGB`L?ZF866$vZEt@&^}5e3pZXNH-FhpXot;GUcm_%vy4oEowFsrm+??K%M8n<6 zW;6WO``=GzXB(5lBkX$Q8@&7GpU|GOsnzwO>Up&R&ovwvarpdqvrLx+GbKr(EGbqk zYQCWE$LvpSEF4GTNP{B%c9o=B;iNX$(tbMp&d*6gx;G7v%#g%P*kb{nsI-Rnqa zGVI*Bi$D3JKSD(jPAUb&4PJGks|^cKuIj`BoWjktZ6+rt`Mux&AH3zQZ)JLVn%i%? zolR~3#kH4(RLl0FlUzzcrd@N}w{q+}nBmKRD(J{s$tIDeFssJq(!?7~Z3Oj@rtloS zNFF^Da(+nEwxAvuR`m$}{5RI}%dc8Z5D6?>#Qj5!psN3!dDQ z=l||sPda5EGm*aejE%sLoThLul%9^F_?nJ+ivZVg86O|xZND-%OZjwhS_;tc)$hLR zPKKWPE>aDn{As|(wF9On53}szKj5`L_lqa61S%OX3RPe7-7o$zANrN2_|7A5;)}DN z&vB!Bk74>EM<5N&O3XdO|hNh}L8 z-du-=?hc1yC2E@Ple&?%&Ghs%uX){T`TalqLjZp8!~1yn&cElMf4hiZb+F{(7^cR6 z<3Mr7;(vd>o&WxG9vKhDW;nuin!h2QyDvw*ew+)L|2wTAjN)PxKZ^VRy!nNo>tpPG zvP2mAC_k={iF6ve8Htxv8yo;_wAec)J>ZDDXz$BJ!}r8>W*OhQIC ziJWPzsn_bP80hAbOD{d444l++JJmmI2>)zJv-8gP^Xe^+f+fkMHJ$^~5;(5mi$D4; zKKtou)~s2Jo9-l??V+u`i)=1OD&>$)Sy(8*;wxYL3|IGkfpojaYo9;MZQp()x8MFb ze&H8>E>WQQ7p$8c_jt84NsA4aJHGWzIy&09?z-zJl`H)HNB$3Y{_ux%cXy+8NVz6? z@9Roz-RtthM^Y^7(%813qs?OHzUoO+cP-1JTq<+XMHlhmk9-7xM<02R|Mj>3hf4;A zk)DkT^rBrKtp%xe#h-twlQq3Aueus$%baotxCWZH&%_olRE8ilgeq2oM)+M?Hv4yv zB9eO^C%^=b4Qbbq?~zPbTy~B*q*4yHoutf+I(|fJp5;2`ypsPZ755y{#-NlUilVqL zsnP^Nz{OiG=A-}gPpnz9rs?LME>7D8nwgnlMdvX6YbCQ|HleR+aLI&(S6nf{p^^7e z*ah{-qNuX$3$uiDp{+iY)q|T^Mmg#yTl_fJ-4qvv2x;?6ukg9!uD5XOXa12ZpYw83 zo{N`C<9Z(Hv`jW`@y#>ZU^_P3wr%I|;c?#nj<*s7K41CL?cDOoPteoTi6Ep4)gjWjX-&PX2>iM0 z_l=;h(`KOCAcaPVB2YxB5sZ0~FoaqFeh9s*C535;5b-7`tV>>Ujn88{-^KoK<_J_8 zB|73S*@?C~u)H2Dw-+bXgOlpu!2Vsll!xf2xcBeQTCn#-&&e6Y`juU-o)@0R#Mco&Wp){+^4sY@tvn@DCsT zD0kg?7ujr%_U!cB8y5=+fAOhye&Km8>jxxL#l^QkJleGhqPR&{q;%4W!61k*NF)MZ z*#xo&&vlT(hIx~HrGT<;vvts8Xg1GyA<0M+4P$o*k&2#;old-4sEKb}e zMjUY~8ZBJvb)PVbu&g*|Fg`lL)a2w5f}P9f7#<$sbD#Yz>({U6IoDr*s-k-YPTK-R zk!m)K6#}wt5>wDbVbYny7=lP8Zc4&LY1mrgBv3jH*$mX{dR~9Y_|8>|f=vU43#Y(fAX#=)((W^bCN@28b6TK1A)LaBPq>>w@vQ6Kw6TC@o|3d_kW+)z5ey6DB?4> ze2V|P{R?C=DT1=5Gp`rjL$d<@%mc<~Eg#K7|9 zbai#{(wDuA)Jb%#J|hayxX4^S&yepm(}-XcZ9#byQf7xj#Z++b*`7LRt<=YoukfYSn5Y z6>--+cT<=xuyXkdUi;eDHrukC?7rZ%Er2DhBi#fO3tA>8sT9sYT`i5yYYUfq#~DgM zLzq09IDsap)D7k8oCr03lJi25BAMP+DhMn&&0oE38l?r5x}+Kis=lODmCTeZX3CP; zip6Z%VxnN7l;+RgC!u&Nk8Z8P@kk~WC4(~N*r!t3Shj;@ zdokHgN`#bnwnJ}s2d?LF`0!y?tXz3&iA!^eoZrSCVDNB(N4{_|uY2wgwfY>NT?nX_ z4Swy+upG}0M7&Btl1MUGVlJU1Wvq;iEGGi$wU|^^szEj@$meW!4|h?l2(H~YN}(Jl zoEEwV>8v1?iLFaIW7xLW;r)NNjF0|C8rMpC`G^J=C<#-BV06e}xtB3>4Q*Z-%P7)z zopPAvaCI$4$XEevNzFHC6;KQ9Bo`CsY-~#-gifdo@oROzPNh+H_J>n$xxbj^o5R>t>13 zTwFbs7KFYz6B+BXggI8GGN2+s*tnv3iKY4XRtgItpd%MYR>Eos!6fCPP2G=u<>Ogp zzh-b#@ye(|!{2Eo0-RO-&liVsP3DAf<&i&Vrjf zX@Q#()T=*DRv^awXv&EaN-+s}uGggzB$ZIsqOMs8gO^t9+?V0fb?sb#Aq-6_lrpF$ zYdBVtw5tgf+_S%*C&oGm^e9@AP?H5dvAL2-(r|v}ef}53p~X_EM6F&!N()O`v9Jdr z1R**KiNYFDP)|-mBBX_My0Dxyt{W%+ymT8<#!a(auMNk|qE(3Pco^Fus25`<2yT6FgTsZwhXqMq#@u^%yov2|1F!L$Jo!0hxf&sT8ZO0RBCl<)fyO$ zQc=8#j(nof2V(!*aWf!nLcc^9)LGS6L8}RN4noS6@d#JxVB0PrP%0n{s!exj{;i3W zp{FZLXFkK^)Ce7U3l+`q))&{pHHJNNO59N0RbnlV;I$afHA! zhQotQoIrqh-vlS-nOM;_D|kTzI0aai=H%nF?Hydb}4#|!og<-0i!`Pk7)U$m1sa|}g>FEgK8iq(FRAobybZkC)OSe#DB<}U^6V}TZ zqvKUuD}q{)Fs$QxIlOc`Dymbjmr2_Z=dbRhTrTn}FDapo;L~?FOcy0ng*dWwtN=MgX=Wh{B(JD7uVdLBQaT7>lg{QIy_fmOl%E{uMhdm*T(qNSBA-^Z94l`A}t%+c9E7%TU$GYVu7j2NxFM_7HtJi zTLD~GU_^!>gd~x83{H~F`O}U0o8+g}d4WM-%&|73!HrKl6--p7UJa=l>llB&vBC=> zh-; zWqFI7SD`)UQx6?F+hFa0U}W0h998yvG$Bu5uq;8X9`N|i{Y1*);a!3^y&|qtc5SHn zhW31x-+c21jBuDKMOY#Z^V*KXZ@hUqDNk_Ax9Y4vZwpG9BMvw*Imv(g$LD$XufHb_ z&Maao&gokK0U8&j;}2V~i=BO@Li_l&xEYwmQwOWm1B)v*#5n^?#=}G2 z`|4>@=>l!CL{I|PS%s0y5yB#>jWBxPE`I4MmqWvw**6=IaYK}uORQ-Xao@f7@tW7Z zj#aBxEozF|=_x>>V3ylX6oKO{%$->>vQJXNC>xVt#M4~7NtmZH>4rSFfLHxngQ@bi86v!eepoO>Cj4w?KO^V@ElEBTG5s@ zv}HrO+d_KUG~MkHU2X9w))hSgQBAU}vqERSMn^ut2t!Z>M}ScW2s5w3h&yV#j)dZ&1^Qq*2kaV{qO%>R;^mK=yJ)^s|O%SU0CTje6^G${R9w# zX5or>nm5*K6&%~ebz@4UB|&S6MG^ZvN|mO?+?L8md8xtQUe{ z!Pe>87)%t!w1<-9EiW14E!S^nYOI8=7|!d2|M`{-S6{G#|MNK)v`YFQ%~@)l@Rw}c z;^4?EL1dV%WSJ=jU_;gSsMaldI}~q!=_L7#p|?ZPkqha{E8264OiGdQ3@J}1h5C(3 zm$mB7=!$NiSPYeYQwfs>Z9YGYskL@MIZnB&n3g z{=ElCr!yz@tWMhkAVAt}D0TdY-R!Wv1Qf)WcoS?eCv<^~0ndTmwQKpp*PcQLlXP`< z;acE_ir;x-3EL7>s&RI`ucN|yU-2j}y5s=2-E%(o?_Lf-+KXcD&QZs*q@Wf^F5Xb% z4bM5i=%HfFpOTVl%}_2^dEJ!N9CIh+v-fXoo-CgrW~pXHB#;XWRGs-OS3=K{7L z?!j{uo~@2?i?oK8v|v?lo!|NSF$Q{~ zxv4b9(3#f^^ag~XL>obGM~!8j)p$&7)t*Ouo43jnC;DQ+ZZLftjf_ZIqs$EsKlUbp zG~=LCAT4wdfs7+zsy4>p)L|T1!x(|o-(qMZCEb;0FTF zGg!8uR0W`dqqhhVo<(Pg6aLwJ2>t zwNT#u-|Y)!oD+l^Wzile}&TgJUa%FlZxV z7slu{tZol0SgxYRb% znrf|f((-irE)d|Ra#ZUHYjXh&P)E1h7vQ?FnLJZ10nZsUI-}93e>mRiCP0BLLM%&? z@>2Z58{f=jSKUN^?axu=&&PAQi0^9<34Zu!hW@UQ%Qpv|MkFT zzWK;H%5|4~IzTDG=2bOvZk2IATCmx#B?a}GVSRs%%idIlz$XeVs%7gK>b6MEx zPic=S=BbP#3?yT-S%OHCc6{19QW&o{siml3bU)Htj7%4K@4B!6Fcev={ix>U4PTK_nu$?qvg#~>aW8w>% zSK~q^FK|-=qrtC3z4Eh_BoiWLlZKJNwT|zV3IS77ldRvAqAg=HGh3psw+&x^jOp1P z+KV5>2nVG!?ODb1F0Jv&Z{$d&43}J7r!r*|Rc+cb0q=bAR&KiRAfLbILLS^ZK(Xr3 z+Zm#&rMShWePpK1n7IDdPJ4)SCzYy=@F$V-3z!2>R#?q=2U%cvEGVn2Bv^VYJ#v0@pCOKj)%3J3^w znovh*;thPYT0?8YV~;+<^z<}cU0sVxhMkrIG^h_wDo3Q@=+#anZ7v$~apQzW%nxde z;7VoUU4OOov!eu!>ak{geSu5UN|VdNzx?ChQUBa9fAk0MWz(kfiToOqC57+Z41BbC zAN@d(%P4;5EwjAmull%opUW@3szg{31fe91Bx?tX{Nc~v&yK+!zI^|BQnrO~Tr9@| zt>#s1Nh~jgn{UU->2GKpV4%+ zMZD>y6TIZPRVsBW$#{d5HuXA;juptarLkll#}zoPz;;CJs*$vOQHH>e^8|Y*yXebT z>CE`35JI|R5+H(9%Hz<`VXnF6THg1*_ciNeNOI)H_Y!Zl`QDd4gjf0k@BTSK+B}Jt zHfcM+4a^W}B6Z19nmpE8yh1m96QPUlcJ*Yq`EzR z;UzT&I-bB5Wze-G0Fa>;byL$0g`z{DV5lVHXKhQ9OGRX4iP~%lKag=3h~!4iBYGx- z{{(BhW{_wirKv?(rqo7kCm@s(+qNi`D@U}tT=a7~y~muyiQOE5c0dHp*Bb7Rissyb zR8|}@z3>QGFf^;9g8EOl5;SU?7c<}2b4)y7LRu^z=;FVC1S|zTplGz0(i!)*Yyi}TUWP|aKSnlRmgSjbzmp*aJabqBp6S28Jjb1p< zCK?SdENO^TBaRNoOM+xmF}pL9(tP(pkI#L(gSWkCmU2ZA8A(_Tv2y|12+BoGDjf$9 zq=Z^I?%Z(x+JI_J^1X*r+F_`>g;X_CnPnL1(&$>CwcyT& z^Q>5=dBN3nR`mt+bcEzHI&Q`#lD3OshzZM3t09RnLg0%GwWy0yEk&VdQ7S2dK!XmG zMg#)Op}CQ$hc1;MO-HH}H>aE*NlG@kLVztbwiRc_LnWvL4qtxa`D`0r!G<*hT$Kes z&^V66*!U#Vv&FdH_#|<9o8Ux3)9DPg;K*36*5D^AxtkKCvtrTBrm}64a-+4%PoWaP zyz!KOBBH(?$u)(UUPGW7GTXScJl{x1C;y>9jQ{>q0We;2HTK!4UTPy z6y2QVUsPSR$5lXJ072;nDe3N%P`aB@nxUlxL|_o4Q#yz4t^tOW8oIk-DCzFF^W69M zAGoj2-k)>UIcu-8*Iw)UBPiiOY^h$2mRUSs06r;-Pf16|+v&F#NdDt`d!4adZHHT1 zixw0dj6kIS9!pOV_e13L`=vyxNlCX-fGBEzgnkDgDqRj^ZTq{A#*o#d;k5LN6Jalm z{&{VB+KxYr6#&t3XEY1V0tJ?c__g&`VVLOt<}w+?q3HE12aBb@?CTRGIG46%7*VWF z;&@S6U#lB!l`@9+UqQSFWSDo4Baxl|^{MpLvdTIM^%@ap++T^Il$jPy8$E}3k00N2DP1&{r=x9CYo-m|B6 zl?T9Rivld+y0l^R%)}M2G0=0>FmYRwIbtBjj-wd=&Yuf!I4>EaKx&$+`0E(JNay3U z6q@q~4Gb~jt7vx~o@G_Md3k9b#|%OTOEJ-`cNQP+e!SYEf%J9@KHS!6^;Bo+$2~aN zMN!JwxKj=X5jVd3#y3VLEGn-th0{)Pl`gL_1IwXwscGRO{k@U5-r^LM>O+!mX}BM!NI z5|3V@P$l{jnc?o__*d|k|1cu_|6um-x`o9b*0KpItdyEys$@gV^QJzFU&M4$#0g7m zC(>(wV@7l6U)h+U{(hQ5eeuVIKasCdSJvp0nQ{tBGga0%6G}%GIaBvUBq2U5*!B*I zzq9uv*S}Hbl3cmrmL=y8<`)_SJ%LsV{ibzaZ|zEcJ@f|{CMnjGp(1< zc-uty;7`bjDs6^&B8Hbp13(S#Wp~GcVMi|R_Bl;5m|twty+^CP6pNd#kUimtPQhD; zdR^bX6C-9bP38#l{s%u?y0;*{XA&`3K>`LUptGqGofd5}W;Ep4Zfi4@408{%|E6eqUq#X0T)Hm>Xc|o{ zBA(Fhq4kQXn#DKPQ&?+f;f7=}ESH$+ZYkN=JnF_{?Ovhvn>VjG)B7#iejh?H{+Z#Z zKVRF zlw#KtB9mzS-E}mFB)Zo@Ko^CCiWccUeWyp7H)EoSIg)~y(z$g#^2P1Nd69OG^rDlF z2Z<_#*lJW&o^B02E3}buBa?}0acW7egqwXhuF53<51DVHa5ridk{B6p`#<^yR3l|)ljumz!?}`hI=Svf#eJ-_DyC+#+7jgRfEaY>j z6QO(a-Fkn<`|QfSLb81T{L|-`cz{525b*B&<*WlnAIOX>oEpH=W-U>8a}pGPC`g*U zMI)ETo?2TL__rSMl8T?&oq|B@F5cq)<6k$8ZhO7ioKjwudSC&UXrLwngW2YI*9@u5 zV!u?EfJwdgdh_+RMDMMfMlIG- zG4_y<4O)nvTI5@z%$s1zou*dm^-e5`61jjKG6?ub#yE3YK<*n+ToKPV*cY;821FBo zW-&-X!Cmrvk6j=mYBGv^U~rb^)bPQjjSs}~9miNdjq0n!FgX#JNYtZ)Ch#3@T5V`N zeG;I_3V|`}NVXn!nag&}riJV9p56IS|ARed96r&YD4ip$aj35`ie`H&?wCd?A)$63m(!OF8YlA zp=Qp)rz+KtFaKkVyW1bclRUu#gh?XWO0P?+!!Y$l@oF3`JZzk#4~vY&@qF1}z)lQ(i?|W~ zrx{EYsim_~^%6zJ>Eu|NJTx?FPU9@_El*w8M$Wg-)z#pjQo#tPtvl|S%h3%l5d$f< z&eV*ur63x=4}M%+yLpZD98k#(zRaryv+U@90EqdCy-W|Wz4)5*=#>DKXGvt27I!J% zmb5@QW><_NLno9H2K#ByV9HA_;AnBU@V%~K2eT_ACB*V7No{O7huFAg6ce#Tw`N9rl9p4ZELjXd6E>6Jr!@nU`UG{MOamw|4L@-g1D+)6NXV8g7(Imw6MOU1_ zeJ{`vmZzA{LFC4o=chXZo|EgY{{j^j9UrlQffM zcfaSxPy~dTJ!un=#S%T7qDTbZ6M6i`6N1ui^;RtXbq>CFhn^!29S$f@Pw2=;b>|YL z<-)kaoG6kYD-tsfbKTqLBcQDkoy{5p?^TekZBTWn0wW`+XlC!m*AGvDn*c)@0$qm~$F5%TyP>OVX}8=VI2 zc7%_EzlG4r1(pmW0&Ezq*gECM5~qRR+eQP)eK6wg0IXm6{KsrH%g_o^mPECrsT<7s z^3pvkxdrS_PgcY{B1VVqdd)WWPMl@V_=IXMLEc&cqr(STpl!Wu-g2;O))Kd)0H`z#U=(s75j{{ zbR#zds~wXtDMngKN+F@%S&8$-mS=v;I?ldr)a-9>KZ*3Cavb>$Ki!k%cu{O9H3ebK zq5&HvvUKq&Aa$e^u5->Ev|F76DA%A(}kyW%F{kDbi3CO=gG~cjb5 zKDkW2v~@Pp{2^E_A=GGP>MCULy+WxxpE{@sD|OM^M>i*FHVw_8WIZE zWRC8%hOO4H>B0A~1;UB<9MR$1hB4`U-T`#_5%-!)ZVG`kz`0j* z6I?nq%;-c(j#t&1Sty~@ee}OYq9rP{Cwqi55+sfqX{5R(T6cOivc&0_kCw-KTNil` z$iHLK{n{b9ySwkVa7D6&W?Qxb4lByWYD`V`LGsK6Agh%0bW<0vAhTlsWAykixrYv> zq(KH+*ZzU6L18iPWX1eWxWv_{+x3Ndxo%q5;dbTO=Bm4|bGr#AtVglrgA#;VEWCHSn?ca~SWC~T9!yBhQHjsvVu~}nKb~IsZzZY(PYDS}{?%9dCSHMJU z+Y;(>v6(WZ#MV!ich}gOj!UX1WATHJiwK;R^lek44{kfvj zvcG(sqy9m?RQKQEzTFkK57b!`fJaPjmsdxVqTYC3OiR`Nj8#-^G(UBTL0rkZDMBw& zbBcoB{>*2-hx5zTA;4|p{rx}xp0(uRzIZtT1=s>X={?Xc; z9KNjxUIKZs5Ybq@*|WF+9h9mPOH;v~RbMywgi*Ei6Yg6X)JxOYhi7qwPW>}L6XMCS z5EK}H4Y2G-8h(eSK(*hm5~X!{lT?R4IqNzfKt7i3e!& zsf0%o>qf5g>`8CIqydC(- zu*!VrBgAtJ3zaT&{Q=@&KmQ^H$_pY)g*#TMmCxx&OXahWk~NT!H6Ve48k^yPwh*0G zP-5b^XOLpg0N#zWvmy(=oqQ3h$5PzJ4`Llvc>sUMQ%b^(21^BM+OsH~Q(4SqMsSpp zpySQOM65H9(&t9qC5U(3)JR)?eYKZ(@ytJV^#nf)wX=DEdakXd|jCQEtxn_1orB1-y^^A>0uAEwoH?xBpYsG z+QZG-A`ly)WvK!;-G;-=lt{2rcQAmgIlw?$94D=V41-a8x}9ndThe@3FgsxsVXSJC z1urSvAd+9!HbkJmG{pbx5K+LzJ6MuX`hfr|A~N!i0_f(V@Y~-@V97K~KtMpASakjV z4Et_xI#$JS4)tn^rr)j51WPyVAd|;|`Myu4jG8wj{NBT9T|~Y?LE9QX{bT8i&yG1? z;52M91oFKF4CrtQMv(dY*_w*v#PP-Kn5&d!StU&4X4c`$9UXbA&z#;B81}^}B~V_? zy{>m68lPk=*hI9@bfJ;>HYt3-`0BAmK)a)m*vsZ#9_2yu(*+I__zI~z4yn}m^wFO| zFASTva;Y>Jc*ssf0S$udc{Tz-5tp=$oIp~3ZEf7YVjGEvc1dMDJ>u2pr|bDz5N`Vu z=aTL#L%n`J#~ja|F(^qT%{s>odi?c)~!TwL5Rh?|@DjQl#U$zCNP0z|~k z{`yL_GKUJL5b5`kH2mp-UOa^~&oa)PUn5HxY0u{`y;J-adM$}qmEJfz84aPzis~$S z^9?_la3vq`7NO#QPj){j%DK6@!0^iPp?EvR%e?NZu6x4JD z+fNNG4rEk$DqAaKmO{ZowtSoda95ulK6!Y@ZXMw^y2vD0KEC=LX-wSTn8piEWy-On zfW*Yx5j91aemCw8TL}TWJJ(^GcevuL!Z^ErJo1awzzoQpTF&L0gQ&lao@NB|x^0__ zI2-Anr$^!+r0o?#z-VceH*!$msTfRjB9bn<{*{H66gjI~7kf%3(4UTu>;CG<(#1B+ zuA=F6LLJq!0pSH=y^OWPo5F$c0gnpoE!s@=L@_hu0OYGm!kY0ejmM3K9zc}Xe_VCB@fiE$?z_?ijL--C^n-4fB(uZH*%%k#U9vR zqac+o$`m7CNTYSP6;ItFZiy#e~4z$63r~ZjYOjL?pesY(bT988i!7H{ndS+t;T&+LgzuF;e z`jSX`l11P71L4}*7+dtxHNVyMYUkd?7a)u_t56UMXybgxdN%ZB#M`jX zQj7_ap z3k{OmlLiHUyIo;KIG;TBu56@8HkezJ@{9;#yuDt?BqnwWu|+W*PM%^ahBMU`ORt@3CVJ(6_>~#$kV~F=PFMPbmR2+tZQZ3?K1{Jlp*YW} z3fd6Ap7St?4L-hAQw(URDn`8I_(DCt!p_A~4FJWspI+=RIUR&N(tQc(D`eF&g{AJO zoBDY(ZY*AZ23{^0dG?2AMr)SLBMJg*12VnPlB09WrL)UC57slQo=?^Ols*zCm8Y02 z+g2^rf(Xd~TtX`<+SmP!FPoY4CKCyl9#60zXCF}7FM5roi!la8nEYLo0Fqir_y42& zlFxtn=cgYRE1Vm+;Kaxb+-l2=obvslcvr{`5H+ftgyJ|4C=mZ3R*|$`O&PbF03K>y zy&mp$+M%QSV{Q*T1*;&6339b^J&(S1aXOkCa z-#NbU4(<`s*x%O;2&c7z2RNF8X4NZ4&T_@|&eOmTKkmF-hOf@p#eV9$An*N|_~-+U zs0Ys3T=>^~Xs@cmU<32P)g z5(^&F^vkVM7v8~NyskNX8l@|E3c$L90JVidxsqdj%7U3sR;hMhpP9ej#iki`f}^tY zU%>w&!<2W)NSEX-RdD8w$KBzvbI;woL3CNoP3k1qumT+}eciC=$HLD$iMXeU4bKg_ zWzQ6{NR6#ufdj&so*T?i$(tXW7hosfV^t2Iq~3_ZHO_p?y3%Sj$>=lx@$K-cP0!t^ zMjgQ#eUBLT$NI@%SeY1|8@y?9Yw1Z3Ew2dp=V?bN<%oX2;DuWVK$m zM$RFqMw$b45S=?++u=q~7t&;oF8bc#|s4+7>ptC4!ayncx%&lg#QaX(*=y?e-{s&hGIXS1mz$O>eLOng;W qmG^&Yja!>4?bD@@q$Vr*o0OTcqy$3k5k<*$QbB|NjB$bp}KL diff --git a/client/src/favicons/android-icon-36x36.png b/client/src/favicons/android-icon-36x36.png deleted file mode 100644 index 53f14dc545a40dd61d92011eecb68409d9b697d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2410 zcmZ{lc{J4BAIHDUSgR*VQK<%Ft6^rCF?>}RGq$2J#!{A;FIwkI z3;-ZO3;=V`QNj=aL}CEob07eKkbq|R1*!WED4Bi`<31SMVh`Z^zL8Q7Nm&cB5?1^q@7$5EIZ*kt3osiY; zMDFn3_?Uy6%TK>O7$cia&7ivMa-`OkB%R4hPFCsoH0jaxyiVRpxn=rQCG8+SU}v1R zam!4sAA9o?(`(V})HZA8)$_R6h2KYq#@aBC9J}6D7&qXpI}=Z7TGcE89)nAy_-?q+ z|1N*iJdbSp02Bs3PL@6WA?~%vYG~XFGr1I&#k;wuk za<3t${-K5`N(U|)ZHOn7vP3OH0YyT+;c@PWsZX`(0Wi?L6gLZHtcaXx~}6D zPxb@b`u*+=5gebLQICbW2599HU3{vB=jWOrYyG9;@I1lzOZ3n!necc&`+CNU)%{I2em@PVxq zv59c$K>Vp0!;VLfcs|w1$~Mmu-#oJ`!IP;Vtzz3+b47Qg)^K`lWqnd9s;wo+!GjrK zvtDl+oafOco+5x+O?(uceScdV#B( zIbGT?$nCsL2^~V6bJadTcG#%vb?dP2Q?9geQsL6SdUg6~v%!+JFU{6B|H*Fd_}+4E ztD>rX;pBZA;^9!lwCVgEvRbKTn(j1;E%Va}SXkxgu+Gh&@|2cXif+26>FADKzBrrM-)w4!}9rRCo7f@{~_OScpd+Uk41i{CNsV@|`r-g(v^ z^V{R8>f%?6!a+GYjOL#Fooun*Oj&3?s`}P5)T<~mq3UxV( zai4d69=C3HS#QlH&&uckfSBR-UAzc>k|J|lrt-(*3cH#Y+F2(x$YhQ&4mNMwQ%_M= zfd{Y5u-(7f>Z&1JTl95DD5A!9+eoU#U!U_Y6m&n9vP<6gcb~d^dEcLcbo5yD;kgJ= zq&4f1<-q%l-9|?+*pJwqJ5xubxsqAi6Jn7@c})6)X#VQ~*o={)+DuI}=Cpde1}RVQGXK3V-fj8XlhoR;v)R*Q_|4fOJ%2~<&ELLk{J^+)4xwxTQz_OZ zr&!9H>t|qZev1!-ivhB2=j6>>sOYf_hp@OjnDuxd5(iF#_O0rkQY228?u^VvPHTyh zSl3dvvW*8;3`uVv?GWo`98~mFa@CBQf(g;?G$C-85*pzKRLIwk^XFcwNX5Zng?6&= zBrzf-TUlQ?hAgkHj1HCW7Pjv{)%HqbdvCyX9{Oqw&R#e3^~&I`DjnbKo5i9uTW@`q zOCVB#*weipE;O9*KRVt>a<}b5uJRqc66IiN)+p=z!5ZdOy9eBOXyEI#m%mcO8X6SB*7m#oL0e%aw$v`{x*SG(G-p zhvSF05qkFOBB!tQyRAU$?9X8R!+cL4z>nXylk8P4E!CablxxXOF@95QWVz0 z!YwQeEt%!c7!91L`D4m*yJ7LX^`rONc{NG&3Cslpg5=3L(i)Nud>5)7#9UAK77Rmo zgf~c2%Rl9#_Qi6B<)qRmGfPXS_;{N(dZqwORTIT`N!EMG7x=eU#w8t!CD9hmSpo&u z@8a5&t*SJI63)jMf7p}cfCT$3Plp{>_qQh$ECTBKNwMAccTV27+hCB-`H&FnnUJkQ9Iw7eLq%{$(At=4PF zxn@#HFoHDD*U%>_D|C9@;>9Kk88&54-^|c3>8k{LgS0;2s@8V(wV?|U{f&+uTXgZ? z_@H!V2maAo*v?CLqH4BfUpkgnCz~)49^F>7lv6k0J-6YhdC`;X0=b1gxrG%KO>~&c5->qV1QT+A83s!*!B{|(hQ)$73lNXnj=_K!Ooq0))&C^$!h*T1 zqyIml->xDNN^n@Nzz<^yqJkorfHNK|pI+k;aMS(LspER>J_@57)m!8nT`CKH1>V3|N@>nE(J_F*4LeQ9SIA zf#@l#E%iwP#nHNInQ8$*L)y7BG#zD6<&QGZ25R35{7uKo=nY8O6^lA5u;jeGG5J<~C$p)~C14glC8NZi@sa(Hq7<^myz7 z$7Q2|-KUGqdedHDPP=xml}@d>Lv*>8%wV7>zgF2?w#>~eZOe*d-lRHVSLL*yS1a$A z=o&Rl^*wmXJH{~L@@1v)8;SgtOjuUGlnjq&^L@?mTvK4M412mt3me!w`}WTN^WonN zt?@??s#tJxO4_#r={ldC8F*)sUUHP^xUR3J03tD3>U~Y%+vlX7qXUuN-rj511j=v@ zk*F$$`Bou8pa-gPB3f5))wJV|3x*J*6cL>9awk8tOK!LtvnI8<*?87_$lKDw6)**P zI5c7R868fhH79=NOBEvKy>;AQ1(Z``ww3#QM`oLFd-iqRed1}JKEgw5`Rbq_mpofL zw=UXPD{Z&Widb^ORonU&T0$aVzX;t23B(cH*(V-BRv=Q59>c7o6C)7%xyea<@U^O7 z?dJKo^DpB?vG=G@U0))v*eV$g8n;Q!SHJF%Opme1 zrtY(w?t%g>!y=mKZL?WAyB4RI=1x@ww6dYx~JIo&-cnkZ~c zrzM(udmki{ugt6oiUsp7##?3+p22>*Y=#bYIg55JR8COrtMWHjH(zbP4=dX zCHr?CS@>9Zel+~`AqN{hBuRuD8gakvt^N8(dFt}H<#V(}s)FMaA&(1v-KF0oJLUMG zK;c6jd^{SNyqAK*iOC+J67THvrTS;4(4Nl6N6$Bpj}1K8y)0SG&&Qjuc0T&aT>qV^ zd?jDEApzyE3rI-%+=-DeTVu@etV(pHsZbZ96F$}=DQziJ6{KH=YcrKKTC@UKbeJ9| zt4*%s;m;q@Y|P+z;S0}9!o%i1&OJ@x+#mHo@!tx494fCP8U3_tw-Rc|A84MEOIUErp^QFH6KyL1UPb(=e1;eK}Ajc1^x0+!%vB8@9dZ*a05 zd%wPAbmtCVjH&#>%J4*y{7GL9AD>1*5Kv>4?P>=8AUmmY%-C3Psc%&=tAkjHJ9ra( za#gc2oDjzWB_uS}5g7)ft))lILIVPWzLi4>g=s9mFFxA3! zzx2So&GF+A2~ku-3rQ;7i=r~y7 zHyHTL=@)-1y(FB#c5`~oxI7{56ecOi$oFch;=?tpA`SnMRE@ruYwTF0=w>U#tDzGM z)^-G|ecRbQ9=0We-hGR>LnX|$BEn^8Qu>$OI&YsT=3YUX*}QEik|R`=%CWiQRd7+9 z3`1A|x0&9_ER& zDn2pL*=S;gnlfa*apq4swF6=y3TC8?d#VfJX|Rf4lNX9ZE8p;QKAR8myBkCJ)ihG; z{&_y+3f&984Y|U*AN!}1Kv)Tv)g0FMJ~iC67bh1VP1qusf9N?i2@eEVNL^gHb*ya3 zyI8|y#J;}E%bvMtcIhuN?%tx4M?N10jHe1ZVB1<-4qgb$TAh${buq}j`Q_sfVOk>8 zbl|%_r&>|C{^WH-zTLJbit6;IcF7XLXCV_l1riI6WeCHXN9!M=LldaIBCXqs+%7}M zt6t*rikP&&aPH|7@*le1T?;Dog0O4|6xpjHdn?nfj4evS+#_l1l4i_(ujs_;^}m|{ z$*d{F8Gb$thP(CRO&Yuh?ytRE*oD;#`th6SlrgZ#2lQpWD>FzFoE*p`jb{j0URlI;u+Nc-yov z>-rDN)B07~Gp!L`}{QbX8R6b3s!tff;!v=B%h8<=F)zt}V z`{!P~o|>B4bzk11xxMW_1wB&~3!yg=bE~;$rIn{GojH>&yw02Hp3^>`Ik}?5Y_zZx zd?~#hPkK`rPKwz_4;dC!Y$-Gt8cw!WuIbj#)_2s;jGpwX)4B`P!D6jtQ@6*bHF_{< z7ahaHg?qTYHyt3Z~Nr*y*=y_58Xp3mrMpvtxyLfqX zyo8%hY?byPzlnATiAUxR{eefj9K=YhX2!W;?oCIWF#k^POxRfP#z9C$MFp?WvO!Rg zlAWDh8{c=rFZ||eEgan3y4UvB%KnV|WRDbFnkmr#|d&MVwmun8XHx$G0_tsXig@nURjg#~% zUjmUA2jMTj3#7dNiuus3Rd`OhG&OSLaF(S>Pb zmaxIptM#MgYe1VmC!N>zZ1Yk@drfhL!>#Gruod|qYLh1&RPE<)U5Nf9_27k32_g~2 z_Iu~Jn_4Y7c!m5xojRCy&tEVN5X7rd2hZ$-R?ve9f-6KSg(PpA(Q_Hhlz*&PfZmM& zCv<=_665Dgaey2Qt|S9fq)cl#9EngwDj=j`FeD6?F2Jtxe-gZKPFR>uDS% zLH|z$f1FD|5ZccfF!DmXI-8nnK`h~l5VwE;A0!kS z6ci+j{XYZDS`m+A4O}oKrcrmQWu8_^m6tNKq4(Ds6PO&B$J^3#r#tf ziF9+uy1E4ba1}W=!0%6IJpa=9AI28z6yWv;nXDEDQ4qd=A*NU_=YS9&XW*Z%pg!KN z8jUt)|D|JUO`!ldLPb%DVsOMVSaOGgu>DKN3LEMSz_hh9ORxS3+59VX9c2W#U_G5F z*N1v}2YBLKp)P1V7K8KlhyL%wKw(Y@MYOXsOhHc3Q9(gbNeSVMkV7~s!Qp5ZB?TBl ZmXaY$>F?KU1TCckV5DcJTdVC5{U0#3@!|jg diff --git a/client/src/favicons/android-icon-72x72.png b/client/src/favicons/android-icon-72x72.png deleted file mode 100644 index 80d2d4098694ebf9e5e6a94b00db1232d8e4978d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5728 zcmb7IcTiJbw+%>%^d<>{RB2L!AyjFhHv##9prEusq!$5c0Sq7lp@Rz2k&ez2hh~qyyHCjYR=BR3*3IJ5aQ(xMU6Jru@6D>7B|?f3INEz0RTWAna#$E!~}({o|Zb`>hG1)T9izjx$dED;Z5}a(gbJ@ zI4c1F%#%9ms;2&PI~jp4k7t4j%7leL!br?r4lkiLbz}NcjLSe;#lz^G4~7#^!?<&AV7GqbAc;yZE3KhbqUB8gp9egF10jkWW;lL-wb zccvS$Yd>(`c3w0uXdp(+&-)0w0Gjtb!bv$V6Ikol#_;&h^sNN$y?eg^QG0fW+MrWOv=^B0PzP$7KR2tbKeIjvX}ilY~Cl#_GWy28c?#D>_lEkDTRgKgZ_k2Q(gr(;? z=*cg=L+WhJi{$Tkt3(HjuW7CIZzW@AXXls4DX)oRB#wq6;7|oR_m-fno``h=yMcGo z6#zyP-u3B*-`C<*E!hPOgBblb+E)pSePiRw1x7-Z*X;QUA|N?&PoG_46@8r2#+(nk zxBSLzfNX+O&SGc)3}9K8_WUD|1QAECMulFm4E+;EdKjF28}kNxd~4`zkD-*bbkBS| zy6^Z5=Tt{i3NM?@Nh)JL?Ut>#tqn+Oc|+iO5~(@gWy?_r)v-02%Sjc8rBQuD@pEji zBS2d?TRNRdjTdcS7S~TtW>kc?KRk0Bcqd{%#erAo+fOFdRU}Wo|Ma?sKoDn1r4hqE zm-3tj?s(V`SeLbR6DDXidYMS@3{dqt-Sdz{?cwdSJgE8gje&!J(jp5mSHyE6a_FJWV@p?G#aA$R6kaOy~IvFSFhMgRB&{plg9hOgX7eD z0lMbz9a~>&BNLcPi*%1MivtT&;>#iqfphxr@UL7Xp5{?=|yWzpU;Mbw~ zMPn740$J3hr|t-cwNZD{Y9w`O3IN(xJb^_iM_q7SmL#)y*VWQNkRg`OWHU1ufQd|o zDNlX4b7eBPlVEq#M|dK7t6jZ%#9!lY&?JRdv4J^NziE=t$|L4b$wHX^=C_Y1i$|bDwUK$=t6f47U~TPsUee>*s2_y~z53VPzL&LM|KJtp$*nxWsC8G&c*m`qx2j zKP!}kmhIIsOw3JiE>@`-_qlr2jgBQ}5SnC~H_0N|zxb#DsVoefb_z_zjWQnbPRhZB z*K~`ZxW^Th+69Ov?6sAejN8QKkKedQV-3?Pm`hX{p4R00wB5eyP+t=>G66*QP zRimFPHvq=EE*0Z6Ge&=BBRNrB>$!paRTDE6ePFnF`sd1!*nr^h#6@OPs>Qi3T88c% zCe;+6?X@0p4F=sVqlp9lA^{ge4E3UHjr!_y$vb&T#%GffxgaP|)mJtTf1R9kO zzTzk|cpdi*hn;P@F!VaVe00rTe~uMQla|7+Kf6_{lk~=<$qRpxmY!ZBA$Bm8eE%@D zuRWY)`D@Z`$P8WrSM9%Dgo?a|rS)TNQ>!a`2{Zrr>*Rnmxkf{jr&GHi;i1Xu!|+(K z?*mkiwU(nITYtma_YWAW*`h&C2to#Q!!WUm*(GuRQjajMU%4Y@{7yai?YdKfR>=8L zEZ);;D>OE2VDd@@di9SAk4U`H4=lUjqps?j$8tZFwckldd7Q;>R$_P^Zb}9#+xz;4 zB@5m^P*y&b^EC}hQ(!9~D}>3nO}|4OZRTI@!}p4u50oLY3+frr+qxtmgv$mfz~2K! zhm&&7<}oAno-1Qxa(HDsJo*!EJUn4x+Vbne%9ey4EBkK|-#2Cpz2(z}-)l|yuWK!# zB(jT-m!{a=fI^1QgRZ4X(52rh@Ull@qQyupMoKqjAm)e#f3prGSOVJBK->Xh)e2nH zQVC^GE)`DbhxVU@l=M_3Ym5y0F!LjgDJd#wwJ;nj<9$jasEaM-^<=L1`nW3}B~6CU z12Q;{uWx&X3ugPCO5S90eU-{%#vq)rUX0FWQRygQ%ZQGkN#9}}G)pNne?(iQ2BYB% zS`u`tgP2U>6}lHL70=be)N(&btB{5zFv(DILz*=(tR4c((814x@SFY3hUP1k`tc;FCWJ_Jn^*HQ<}s;d*uZkHHbLrWz>d0m^@MT?=N0z^NY%Hu;YLfeho? zkD#%b=L5nAdlKSN9fXzBpC&?PFAgvQPXds!504LfzfUUecfcEG%lI#cCtDtp+^#n< z{4GLa^=N`BrbILG?QCd1Wya+te02YqolnsZA&ASun%t)1Y&w=<)ZLks z*6}m8iDor9WAVPOe7YhZZMeCkD|CY;A~P?=JmoMF|JxOvDR_A5<>a5)-x_m$&n+OJ z^ed*OiM$Yz(pRqUGt-;88gP29bUpDzAL-yCr}1m=LJWgCk~RE;s&ed;YVCpTEh!Jr zSmSXx5as5ev(hJ2W*&ZJzqqd*Wm-Lk4(yYcP0O`3^tg3)aEhcMmH6aoMUAV-GiA-g zZQkyB11J=?W6ItwkIInk_6)*HUTuVyE6x=dWLZXQoaf!fOvE0+9*}a=1hFc32d#pX zb=uA0er+nP{NtrPsI#iI7T=QWXv+$GJ1Y5w58Wd zHC&S-g(@iSOE?pi;Xo9@sZK~gjHx3#z-Y)&U76^HA0wJ4AA7py@};N1 zO2wJlfd#|YZ*T6{k}zD9usZg*VeO~*c^dF7bp7Ug$-AE6h81CAv=}?^PMiu=rRdzZ z$M7c&@dmN$$2krlx2hPg5uQD=+tEBgvO6%ctOCY4A#zON*Ks^A6?57g-Orrtk`0FR zRs}YEdwS2D=s?@IX8uKvgvkg9-2|o|0gFWPaGNtcWWDX#49Bs4HEeb+q|qU}16g98 z4p2&%)?=IB?}`Xfx;R$ad@td+&$;Iq1dAHLm{jh5YYW^%*my?kx+|aFlB)eAUfpvwL98q4>3X=pCzD&ekfF@!l*0D5 zy}v+Bf&Q4>U4e_pG`1fG{wMaB+(q=WfxaVhHTFZd(6}5n^RZr4AiOUs+M=@wry;JN zPJ9`far}`Klx(wgF}`KPL9WqSoK23-6_F5+^Wh?o4HTDNMn=ciP)ALZ|t#4npPi_7HEvo%@q_}|~|dtQy_ z%RFA9Q0eVRr5?=@|055NkRgd_$zbRul}M>&H~V4D1{cq0{){L=Nh7Y4g!$!Df8-=+ zBO4t>c_FS8Q6IqDquw*xao0Y_n8w^f8>=UB)6u+iX!Z3*Yxk8N(PqpD9JcuI^nJ6H z=_-+g%6H{<@?`3>N&t~Bcx;%wmhVx@`foDu@$seL)-yP@+yN{ajCBL<<67@!6YX8% z7?NCi6TENCsc=xY7#X>LK#e^&d06Q>Z7Ax7?i?<3u-VLTrdN^yEXrhhd>esLYNq!i zpqN+DYQVYjOxFq}bV6@KA*N?mM9%uw-pa%TcO#!EWz>tkFeXd(a3PzfTZuS}ZLUCi zzgvp^{Uh&90|Gvk4-+P4q{~#7tDu3ePmaw!=dM&NvUt)D5=|=W$ji)_1xb~e&T>_p z`(+dSq}>E=#dZChz7Z8EsqHK>9~OY?tz)T7wr(8zo}0`fsX3PHJhlV-$O(Qu6&K#U zK4=0G6c~J59>4sSXYihaFiT9gu{xOF{&9L|7>}mk9>U4#RcEK_oz%fc0Uj%np=PN< z@G=N|ZLqI>s~za=G5Mvn#1v z{k4n0?@|8tp&-FvU&l|*S-UROh1{m%!^K_a=XV^P^QSIV%k^a<)JO`MT;_R_2c%&2 z+0W_*7h40_z~GMRaxrCtlQclZAQ%`FU)VIWsgHWAPskRsAoMG!$~#)jxKvUssKdd9 zo+5@F)n=<{SSJ0M3coh-@i5+W9lJzW(m~HH|HR>uUHPxU-9219GG}WE^SFV#=CUXo z4n4J2YeyFs8eFw((3#}Rm+<4`tPnZ*YpP(q0)6aO3vu-$E#XOL?;dM@9O_(|XQpRrJoP>s3!&&$(r;=8`Qf=m zfD?T?a}}(WTP8v*=7Z>lE0!%W63bM`^2Mz*MEsh8GG_k#CjW(jmtpOp(|~lu`k=BU zJO$XI!k|gY(@9MhGB0Tw%}DxeM{&6AzUNXDin=edVH_Od5jriR!-D%Moc2*M!s3!i z-&q!-w~OS<2}s(1I} z@~9$aEBJkNaAG;L6{xH-;)W(`4Yh?ph8@k~RUbzqfv;h~YtdI_>xSU#^&UOZC+8GX zTt#~AD&wwCaqQi9NW?~0y1T6d=zeqhweLAj${o1o`H_v4#)cUd4NMHhkljVypT45t zcMLCQE~**?l10im`i}iLXVK#P^A88%B*5q57J03;XXaRO++^k-$6{r}=yYMk&Dxiu zpr7tun=4BK*`xSpoDFnirL`m<@lTPz$S>bs>E%#uH(fpONo{tQj+wtU7NB9A8PdRu zt@|i|r^1`4>`~x-pA59%YiXUBU9Zil&xgXsVL1l>ukiSa#8G~}cX7pNk@&BV-$&!2 zkG+kLgS?%W1JMDbBq1_lk}%?J3W3N&Ve-;Y5lKmTNy!8bCb|Dr;OcIVM7;RF3szK1 zBZvi>e-*sl5k7u4UJd{qR~ttM0~<%AoijH~Tt-}0Opco<2^Eu+7K2D}8$)2+PCh;! z@)8n$etzP}zi6Tn(cBjv0O{)B^TNXc z@UN~UJlq_WtIZ7mgU7&>hyp;MaxfX9L7+FI) zkBJTdfpl>oKE8yjn~#gTqXfdn7is72<}L9*8zUiU4~5w{I7muM!EB|aVKOpM2dEU( jRt5sGLC8o;LdA&{;>7-b&xVi@6#zOKhU%4SPs9HU(AIe< diff --git a/client/src/favicons/android-icon-96x96.png b/client/src/favicons/android-icon-96x96.png deleted file mode 100644 index 281a29a623cb336ed7259b9cd27951d2bf296006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8413 zcmb_hbx<7LvR{0WpuyeU7q=|3usECG?(Xg`!JXg`JcQr`cMTdyaCZ+DTpr)8SM~0@ zRqwx7b9%Z?_pfF8Or1Vc^HEh<_6-^d8UO%z1C^78y>g>}2#EZ8-~8k$_{tD1!Af8N zpf&;h(HQA<4(AG!l>~g7AUk-SP?^fXlmGx91^^%^3;?))6$R}B0Pb7>z@ZTUAp8jc zAau%URTF(xAe$)2N&{a0xe7YUQeGvfPIB6=uUzh51R1dv2LLEkq0-(<7pX@H)K4)8=rc(B)$|zv?Xlxa`;)L^vJWhS_YfSkhi4m3Q?E+dpL~ zcWQ?ywk+H%1;pTn47`FR?w0p%dkMRSkC&G%u=ZM=XYguXu9xn*BgOk+En{=vmKw(q5)O5mId9?`sObnXU=>mJw4!=!74?tG6Qrj9b;|yk6`&=dj&FGBW>Jj{k`9K zlb1iv_q+~SRnFGLA1pE6ya{x~t=aS|;()7c3D#(LYRbsmK{@*j3LY`}%BI01OOwKw zGMYp@UMH4D)21pVgKP@gGZ2DwXqe9R_zvU8c#RV@?#Pr*<_DVqy zhXg;vWl6g1A$ZcXG06YW(v9T?QlBk~$LYkxl$EI^Mbl>Ug@6W)8se)nl0WdvT90Cn zxMls+_tnnJ-?^&}$ka1N&s5xP9eT>6>L!xHMx^Su8T*#{dBq_`uJmk)effs~POpg? z8T`hygq}3>_}%;WV@e!_jh&@6(^lcLX!aQCrZXafiozLtNjDt{CKYZgrd`aq+@=^O z8YxUZ^>M#-E*s18cSR<}BJH(vyms(A&&M5cBdEtU&_ku!0%Ck4lwD+>j}$u|F{;uN zQbPtZ&3DVv`O9es7SAD)Vc50x0?0Uq1c44vvZ0Q`mX)`Nig~^tGbmneavrY@u@R5z zVI^-l+r45BGKpV{sibmw>^g}P0moh~#Y3|9(3Hby>>Zms(-1=DuZ!lzo_{_wLz?VE zPh>x9z9bp-&AY7@<56Fw`*;lT{p1s)L;W*W6?!1JUQPGrMG~ktq_1Bk3A9^cz~F;c zPB2o~@v2&Jd$j%#m>{P~l}X>L)Fa9+RkJnJ~lVnwDGgwHZLipsa{2*o$a@dH5XR1Q&mRr!F*!hHn9MM$!izRWW z$mOCdNDWw+WP?fE9@{^Z936>5?(kxUGn&r!8%8Exmyz1oeNamu;Ug)o=7(E?ArCG_ zOp0JimPShrc?Zq&6&o73LyWgCiUZ4TWFxlW5@!mO2Q{oBAdaczQO!Jx_|zdMA+=eu z*2EQ35Pe22UCgbKhNNgc3u%1)o6bh$`w_|U6M36QeM$91crDVja!hC>O|eziT`*14 z-im;mA5{O3+0lfUTRZ=rp)Zb$vz9If8JB#s(^mw6^3sS&wq`t+dHO)1(wbjb;@dKJQ)NTpP z8oqXrs9(RC23z?$50A&_I6LkT!Z0DOV)>{-L?%} zTY#0lNtab?{3KCBM2~o6!s-gd!nkF_NS0!Umof7%Z4;I?N$G@D6Z8i#mJvtNB+*S0 zJq{74YjbjojwLgwvpwM#`)9dYL0;&-r&A8%()BT8?kHY3T;mR!tf%H(|I?QABKg=RqJm-z76`bv8 z?+JBe?+X$2XCS+B890_xiEk|A`Fd&et(2G{uq5YQAXOGVX_la zR2P(pyW~#1(vhLZJt20OMuITPc`>X{oU>`ng;qq%Mcuf|%+Y>}0u zkWdx9OzSdM+08#!LX~KC5q88jd!Oh=t3wV>BrdZU|72Wt=w}?TaRAh5KyGnuC(o?jN7M#(%$Z50( z;r`Z&lBkOM$@Pgx%WI5Tt2<1!tBBt(7RbY;;2((x5D9->Pa{S>;ZBC~aqi_gn%vgM zxiU7C--Bvh2C}AHx5%hsHAEv1IzdDo96YTQb|i2NUscPWaXjOdr;Y^`Ia-dpWA0*wx|KC1HsUZ=m@_?=qsu_V`f-Z5LxeFN!;Za6oL$8#9fLT*YvMW>r2Y!4k zGs8J&et`rL1(Q{B$Ef0O-K@^^w@DX=V;L7QsqIVei@Rm@(G^EhxH%J*BBss97T4`M zA@P^H$;&jxd_-!wGCE^3lL!AyU#lu1pS2FMmOZf9j$_MFlj$}L&3+cWYdW>vjUT*} z;+1>KS_71X5D{$R0oXX8!4U@0;#9L` z%=h(gzV7UCZ6<4SA-kQi)u#kbBB>V~i1rT!9^MRF)H}unF~M$g83vhBd5WjK_2#ra z<6v2Hh5^xet7?#@lQs-+L<}M4rXa_p_ygO^L-k7*Q#5U)+cXXE%3P@u7A=BFu}v6o zKGR^?*?kk|mv&4VhJ|hI^_VRre1aP)mYjp|L=W!8p(As$ce1NtuQ7Yn;g&^dBE3F6 z*-D{Y4xtA%TJ(>>`map-?=Im-`&%M=AhwZIHdVeJ<%-`$rzI=Arx8N^KIn__w6eev zD*K1;woE2AkT4YiT_oiH%-(F3`pA`DG&_WZFVvT#clGx66Qtf_^etghnTyuqk4;Sc zbnty`civa^`SciB$7_W`V#X=*I&L9xD3y&Cqw7>%*Q8w&o6Bqyk89k`Re06ge2KX6 z`OfDZ@RV&!rAGn>5sydBd<+5MNz||irfD*uE$@u6^3v@B4R`{ z^|e8*H`9=!RESKpq)M>ib74M13bcz4o(3skhuEVyKZuDVQy?Q@MtkfhLtL^rj#BmqHm|siZ74|k+R^ov;U?*kNvCbXdssV|!U1NPe4>78_`-Xu>>1$OI zPgoL|SW1>2RY|z%x4Tq_DR*b8k;#a0t6kEtbo0UA?5oeZ_%c!RlDFc)lv7rq9wr~3 zi`aOKt;VI|=>yg#)@WApX>?k_r!mKRr5ABYg?0e_<$IDdt4=9nfF*pHC=Tczo5blutyM@5fA&GNnz~1-3 zjM_Pa?S#OhF)2?s)k9dYlHBcKE$HN);B?X4)w-*{z+E&?)txXETG&WMrNquuvz_+I zF)gZ<1YbI&$r0EGfRi>RntPdJm}Rw*A^QL#;rsCRbLwCnIol{hnmjL$@DHq)vxKv= zKCHD*$a1KX4BYbTt?;=a%1e6U+eaD{?5G4Jz}G`8M(O*KwQwxT({B*=a!oK=-$Wj9 zz|s5UCQj>zkWxl#uVmGh<(uwH#m;*W)*rGh1Yc0mT@ZxN0O$aZ%iMF7JTRt*g>_o5 zhL#$yG}=BVD_b%(`1u=hV(%1;m?ZaYVUraSCh|w_h?=E&bw|*?m;IODEZ{PkxA#D5 z92iY2`Sk1lkET|b5FOG?SdopYFbdJ(uliyZa4$M-<%5QFD(L0ZD0G~K`YxyjhTU)I zh8M!cRUTyvY1iT~FLXSH*G7GEWme)SnM*~%n1amZ895R}P&A-Qf>q>k!q0iG-pqen z@BI*;i@;1%a_*;8{N^%_ZgL#+JvvGa`#V7(bJ9w`JQ^6=<4hE*)JEF={BtHIAoR+~d3 zMpVF{cro3GVC%X!P1pUws~8(GIAQIe;Dhx3cer3vupx)pnq2N2r@RF#rqRHP6H9Ep zyD1R~hx5ZV0cA^>e6hUWNps)x2{DiL$lVC$Xd^Z=qK+)+5I+^BMS7g0p9FvdiUf1x z2FIt6WdHRg{)4^Ab8$bJn*NKFIJFL&s3BccqAhaa8hb<(V@Fdi?%^qp8>GwrV+Rdf z7LJAx7S&d$zK<6nzF?BIk-W)Bp>5Q;c@Y_CX!OmmBGkk@@bfeJ+PtHk9is>a5ZADF~)ae7#Ej+ z$A}2(q=-xsA9vADmS=)}V@R3ao{83L?dep@55qhES)}mR1wYy&Qy%tY*Kpy`(S6W~+z;)f+IiRJ#fty@tSs-Yr7vi0AW{0GGhxvIb!I&0Zx4uyxb+~?hXk8;TQkz zp@c}prh(QnXczscsd=!d!YRiW}Oh8ssXOG*~5922H~2A|(FN8PHp?c$DS=BcDgs55|DYv+U;GS$^t zz7MH2xt>jaeJ3kE?PkDQmn2HginHj_70_Me(A1oo54-WoOC?ZSjO9O+M7#U+rc} zHb;=9O54t2n1Q}foeD$h{vKJ-ZGS4_vK9G_Twz;=^&1wD7XQ4mXPQ>x54lC9xXx!< z*qm~AL^09eWd4RO=d*YuFKScV>%p_RS);#a3El@iYam*Qh{cD8JtA5O#KDlu_*ST) zDJpg2(e7h-IH*KVn!|Ru6bY3umVN&K$M3k4o~`1{KeEL;^0k9U^ACI=|LuTxFdvML zkq(%f*892w5tE35;ed&fUL$; z&LUQ&QWXb^<* zVk9DiPG#Ic+r*pB)RIcK6dvPcI?@VGw8J*&@jl5}@hFr2e4DwMbUKxsdF3I{!h#{hHkgVAZFAsfO0;0J)Xb?Ii&Eq>g^WDtXD;>N^R(~#&kNCA zg7mv}6mh>T5~BrF5Hq$jfnSLd;Zm@o0d9CL1F*YJCa2xqI5sNV%wLK~FJVycP)3V5 zHT?6vPmCZn<{b+Bf1DB!O^I73nnns=dkj@4jQm`d3 zq;jZ<)CPdO#IxeBmrupQWxydxY><6m*<3bK_*3ZKmEGe?gSe#U`ng%~_Qr7ZqO*@8 zGpzJ?JeG+iZuDxZtW~m?8nT3Z|BCAhS@F*Z^!kw65yTV)q(k;#?kq(H=u0HFH? z`WY}O#FVom8a%zU)Mkux`UR0_eRE+Cb@D~H?~a&&1+x&h7&l8#C&ldzD~gl@h_#7L z&KxOyt*XudOv=%i4Ah#L+nRUYp0;V)Kbn)H=7L~LJ0otfW+N0SU|iobZ4|nPeO!O? zY#3fdQ|OaR7_1#X)FTtMs{pEpr2pYkZxZC=@b;IiS#|?6KpDuI9F8oHn#k>l$$Fdc zKG?WVE|b05t;2o3wwlaro-60r&c3hL-pNT>n~ zv}s(<1Lw#iPI&OlJ+_&Z(y${^O~gb6VjgCxdF#ywa-IXa61(hVz^dzXX z;7U9^TnPLex7qtF#p$oQN^_x1AkEm~(sVN97@Vd?7xA}wV!6B91BfLd7G_*fj;$Kg z0*GN}9J@&&3YbjX@U)ZF*{{+1{Qg7oo{FWnJ&Vf9B#a4jN|%MJ)tz+!CP4zOS~Y8d z6|G$C9~=~Fu{ocugE7~<8U3H0UO%~P^DeVN-GIM8LL%G2{ymlx4(a|ljUwv?}1%vC=#+c_$gX9WORg-Mh>iSg+>LV3h z%0!L*kq0JObEs4#X42#yv}{J;>H$n@6Eqv))6u)R?b={TL5mj<4%?*3lnzTY=_9XA zvy??^KmC@zr@&@CO!sD?fnnnlpT2cQWOVlp$awfLyb1k1I_7|)bZ^VmNmhOt#r98~ zf;hS({sWZ^fjqYJODS{SdOO!m$@COn-A~`H5?N1-yv$OcpAFtk*?6;Q+BWD=ysllC z@v#5RiV9DX(aZBwF)#7O-J?7DV-`>=MwzidG%$W=gp>A5!uvXd;>0go^G0KX6Ea^N zKEGqc1}&az6aipRDGq!QXKy4%2aNJz?0YvU(VlSPn1)!nRtxn41%spk3&-P6aRrE}PN%Q8H;)K3^e-uK86!xk_i)AC=3zii&XDlo<^QlwC@)Y#Iz z_6sAO$Rhp3yEaOHc%}v6Gntpq{a{lLKyf_fuItfcE-95`{CwKe828(;s0S*RB8 zB6;v^qT(lYMhE?H3}$1$K^n01V#ju@ls)g#dzchxSE9Y`M&T0 zHb#zJ=I<^<8;Q!T&EGk}SAr&(8See` z1`S-ANBn^fs)9{~YmD?@2{R`3gSe#eRp=GwX_1bj>*+D^L=JJ$%t4|YosjP-hU}?u z?>GIn%$!f_MU)Rj-;Oq0Pd(N59W#UQrGKbabJPmnVdS<94a=yg$t$PGm$TXo=oI#5 zMSWoh(tI>EblHrz*U&X!++&w69%lH5TKR6+7EM-jSd~OL;J9BTxZrmZ8ynOE%VW5V zPY0bqM@-LZc^pCFI^zlp!@fzhn$%GQj+HBD?piBLOve2}K`@RJ=3+pbZ)2=qq|u!f z^`pORS){XI25}CSy5v2v9>cDDiKS+rhR$tvEByh){#ys)yXtH-xL56cD*JN z3bTnXuB_H()i8=RD$FU^TFNmbp{d`~Z29x>LjJAo07cvp_y_nJ7kTl7AcmK*Ld74o z?3~^QuR2Ac>D8`*Aa)WzlVvZ7R$?-g@~&ibcF_^Jy$JEE3=#8}9qn|6JO;f-c%(~= zfnV^@y&pOok^DoG_Jz4mP>RP}$4>TzeG8KrpjI&VlntMDPC)qm)fSzO%G6POl7f4p zBa<%>4)0Q1`FCK>gT(X06_(wC-Cc*do$zZ#!=i1xqf0)PMG;UIb$@3rA=p|>h?;a4 z6S>2=4t$|}ZL+816sJoep7?OAQ^-2w$T2gFR?06DxF?+N-Bes_J))*_^G)YEX|u)p zzrXn-4?jx-q+!{C5)5`hS}i$6ZY13FBP-WVyyoy~;O#X68cgeDFRnLBQS%&o$&MCx z8y6664Tjj^`H8;+=gpRBj8dFqf|LgTKLwA0I<^+h!;Mi|uRodT-DI@f%#7X4g-u<| zUm1Xhi(7!5i~n_e;N}(v@eA{TSh=`_xwsO^aE1PtfxV-dwT1WpZLk6U68>rc`6q&_ zqlKHNv5PqXYHw_5u4HU!ZE8!!&mq7e$Sy?n8WP0L#mCOgL#4*ePi5ui<|NF?>FMdo zVf_#Km0r;tjxLtV5ht$>0Yv|J{9xs7Zz3!#?P%(5Z|>kGEUfwpbp>#jy|i)u2j*Wf zg@vumtu3wG0Ng@6SOAxQG9&yqKmU!+}Ia+dB7<*WoIy$&={?Ed2a+!hnjm^!u_;~nD`1tq*1VH8>9*~Iu iH@C5c03R2KU|iW@VE!1w zzyN>3zEj}nFfz=+4gb?eqsM`D8+M5tSg@O-fbarLn!h%qRh!5@F>l9$kU@6G+ZDPcYUnvpDrmAdwF)@^Qmy2cpa+w*#Vgn z5fRbz)c2yGtts^*B4($#24NUQ=S3IAy=50g&Ocy5U0ouk-`2-WQeqP?^K=LQLqVVC z0blV4;vW+qCDG6^>pTrnTfW8G z^2!6V{3gz?Sj4HjJ3G9Wy@$?(ZvS$TcztG1 zxW0a}_{ADKSDxJmheJI;G8JPkAe<_J@)0(D-%+9~0)QWzL7q7B<@D5iEXC-2&HvNW z{pQ4Cg)X>o4v9j);mLapkTzoKaX}S#J)4)xkUW-2OlCk)J7dYtCpfktIRFU})U9_+31S&?|OW7Cu18P<&f53nIu$2o{C_`O1`Ag7BY*Q2rVmFLq6=(DH zttcv*iHDR)%>Pbf%I*VyH(Ia(BQ1IUaNDTM&Efo-9;$(_q>`oiY%62Dia|cD(?INQ zr_gyDj(de!aXYFuAn~DVA>Z9F{&cbJOB%^bDD$#Um;$RJFp)A%X^WP`c4)BHMAY*% zlShtJg7yZt%gC8EA)L#q?E@8Ly(KT*qZ)hTKqn%}3 zwawsrn<{t)38FdRj9~hme{Xbndp?gD>}UVj?9p@BY~pMp#F5D-2)5F_uI<&#);2ZI z_j#R&FIPnHySMcdvH6|I9qD#N~R2yIUZGZ0(wq@~zHbpGDdf zSBfd6S;y(tmu#%j5hua}`AdZ{fSOA?S_6qebGU+e{wGmJfrb@!=uB%WKmsXx(Xyi2 zHe-WD@~=H1<)tvuzBZ}XQd`wb$)JZk*0LqH#$JngLEs`01I?}1XDe;~2)Nr>>Z}De zW8L(+ItL3kihCllO%C(gd{N>H}TEMc<;jayKl=3-?wLF)sJ3d_w6Xe=VI@Qe9@CUoSX(Uy8+d z$56sn^2sO+1u9XJUd)-ie^jaQ*G{GbHW+;aa6^mUB0~ssx-5(1w&U!&$_UXp4$GUJ*sfBPod{5Jts{uDG8XdBu1Hd|P{3R0Gcy zr4o+e8VV6i=!$3lt$6D(xXuXC?=z($vxV{rLrg4W1n%dnYM5@jW{O`w?pk2zT?2<) z7cI+Fkw}KbQN#;ojB`~EI_^WEnfP2d&ORsm6<^2Q;1H^|o$vaoE5h6-uEOI}kE|(- zqkQl#i?XQ><;;{sA9dFfgagEP3Q3^_7Dow7z((g8=RvVCRPxMi3;))rS5ie!>3N%|axT z%Gz#v;awN@O>N(3%!-1=veG8;+I~7EO*6bWld`@s5pw45fef_Otl?fc^{G_xEWt6R zhBf~&U{lW`FKjmssMl|2V41!7i1GPZ%_}2^Hs^*=Z$@*j!Z4}?Q(sW#!-j~`&`Bb&eNQL>yQ1dHovWbB`u zB=Vs{tlUA}gb2fmtSw?YiMp8zNgO;Hh zC>1;vUi&CLQDS9Bl%3F|b|Qt1OAwI>zxx3Jsu~+5D15U#;g?_bb`L3cM)iw0^M!Y` z=nI@GL5PYhE~gK22`z-)w&XX1?dxOQEoBy*1f%)k+}cz3*&g|VHu8p z{1Di}ogN$paVVS|YOicA9!Q##Cugf=S0G<@C@`8ss}WE4RSJp(rQz5fxTj-z@`B6a z!-Pzj2bUE1kIB9QV$CR=!a$m2)yRO;WA1LDF%0(ClInJ3XnM?&i`{**^9?rb@Klrc=idz=`bhRnxS4oeS1VQ>sx0(k8z2D*LLiw@|J)dLu9 zO?11Y>>LwnYKVegNFULDxrW6_BSoggf0IjOaf6KPgUxD_iU!&3ilFfXI|5&r%fy&g z?AF|(#dQ|T#CFk@psHawZ2qW(nSHgk^?58_Id7Ua!K!Eet6g*?IV3e?II#HE7>TbK zUcC1^i-+{~i=Yba$(V(sah~OQGY^{m%0V&S3IauNKlezK0~h{GQUDNKUMyK)59aO` zT{xN%6j@SojL+wRBQ?kKt5HA^oq*;jhtMfx#^SQWYFr}f@fR841eZ`Qd+XT-Xf=rK zP{)Lb0|C1-kBQ8wbWsdR{K)&ELhCgnCu?_ruJg05?kaY$dFTel#PS83A)WK@2(-ow zql0n6$QDXDyJ;Qe&G6t$0KGV_Nm56gcLURVctM&GishG31U5>nsm$9xU* zb$HWOE!jh$nkAq$Pxnxd3bQcMhSk*<9GxmrB@6;StO@+Dq6#J3Xia&)p&4^aN9?0E6GLh+%MMe2fyW+lP#+4 zh^ff4CLkwA)@A&#g*;yvl--rMn(g=~d0>DrI6)C&h?(gxLWfG51Czq{26LI7lGr6Y zLbrS3r?WYA{&5GyKUSP~fc7&fK|azH)APcC7k7!oghfordwe2R{8zPkMBGQmI(l|~ z8|CO%2~^R>e8f_@y9@Ag;sC;sFNWN(F{%{F*MB2pnL@vT^@l)%HYz3xLPJq-y`#bN zOgRi8xpiFmq`XxvE4yJyN0XVr(W9Qtz0U1ja-8|}6aNZ3NnRW*tBIBYQeM0DutWvp z=$?DZ1Sd!*sT9ytU=^QfR2Gk_(q8$tkQ!jPRH(zpgkQNBAb!7W@0Iqud1t`7Ize{4hPrIG#=Ad)Bm!HOb z?k;Y)hj$)hT-Uoe;+2TLS>>JT6E%c?9W*}OL(5p3b20tfDvNvegSWboK&%{2I@L#S z)h9J^Y0OW<*qG9wuOf{P4KhfeluZJELQ0fou*3Ft&G)d@14rf)*MGBQ0YL~pK`QEK zgOs=fCWRuRCubRCjv3$xs48c}nyXS#w^H7^cbI}--ELIND(1sl0_Wf`0QIvkuX+gKY}z|GjA(>rU5?2aKT9#<_lz|w$DjL;qlq=+Q^!J`|ycvve!{INplih=Wc6zWK*ND^s3~>^czwr zelxsX|0D?%{N!osk5G~2u_fS0U6vnEuQ!ljs2%jRSH;RwT3MM2XNJg84@qTZy8IPc zl;p)mVn#;N;b2|#b?P@Kf4|pdI^g(8WWhS-{JgR(_LoN8z(^t;Ara{Tlff%W&Rg45 z1t_|b3Ze>-)|{LqHj$;q_W5h^%F(phm^fhK-~CY#LoWqH?Q?7xW)X)wOiQCG`%O3A z(mS9YbsbE=h@^@v3k-syR^l)LWAWVm`cPZUEZE+5sDeRX%5VSWNfY-hJDZIjDyhgm zGTEsR;mhsPceoW)ECQ@PU*Pm?A@z+v1LWn&yj&yZSJ;Ie6U_HTg6nPLBGS z(;9#6R(ee$ZXKfaK0$7!gKI4Of<+$fY)giJN0uZusfs)qB`oW&xv)jJAlh?Eb}aS^ zJ|V7k?YEJ58>P_yqe76r8_}MT5+OMspkTws?`piqn3ogCKb;2@0vyKa{BXxojvZKu@11oA!G(tUB61E9WIq zMpCx6wmxchJ)cC|uK)Xky=*;C&p$*+&pKT`P+&p*BD67k142z0rnXFDR!^jwO~~8P zwx#;5?vqfH>Yq|j@Pws=b?io-2|IgCJ&zpC@z-u+;Np2m+4=MctJZ3SZo^=oj?DV| z(;eF8vv@jrh-{#%_^4xAzh2Y%&gScA*Y31D+x2@c9iAUL8h-PfL@oKK5@ic#O8gRP zLYGhKd@hyFxSQOU#bF3vVfvS%gcUDCt{IZ1I) z^;rdmlB-5))P-`Wlze6HjN5H(MoxWv^gJ-PU~qGZmn&QeoO8u)AqkR4T}#SUk6YK6 z4b{rD|G)z0>_`U+l4dy{4(vCo7l^(R_r@+{!Nr%;-9xo1{lO{3Sv%Y(S~XmVet&T# zPVDz54|so(wi~sH`^P%f=Y1!FSIWhOt`j&={ z`l{D!5FyONDDB3?Gn!fF9pQoS`ZqfQM-pEIvrSTD48L8Pjv!I&%=)cc#~1XsU3_!Pgxwck zk8^0CYZ(@8uNrN$Pv-UkchHpZQYRM;7^AzbuS|4y2K(&WOjVaX@e6KJv^f8gDzjJl z(!Sx0b0w`7yxkq89oAO+7Z=p_v+OfV7{&yB3_C@(lG>c`?+_1D?dxj~h+-}YqdxWu z0~=KP3MG4q97zHnA0J6FXWAxzHN$_$xZF&bcVoLy9YlZt%8QE)YNj9SZxBs6GuFmP zv2$+KG55MA@xDLbx5E^Xt{mN6DCmSkmS=5V}}X=ylNh>oaRnMkKVF?dpgPFCHH zr{^+a2<^-#0K(E!bGMNZfG-a%cRY!#vgHK(|312EuLob#e2k9B{JPzIp;jkh+Oty>bv1pvqsf36N9kFJx`pl z0ih?Jx3@+##Pxs7HA|^9!to6$^M`c`exU4toadZ>EuoweDomqr%MJaJV~TI*UKq$b zhP|zhPP%fE8I^)2X{k2mBxQg981ov;j6;r&{Kb+iOS{Izy1ys|t!Iwb z%4li)9GDbVhHuz~&^&)OjB1my5>7cX?|~^EPksE;ZOfQzhGg$sVMbz<6{Y-cq{jtR zBa$7>2#6sxt|Viv81?A0#DC9+DL0SM7C z0srQpe@rDiGkY>5HDTWHbx41^dgEqOw4+F5q6{^4@(Sx?>l%M;J8yNPECdihj1|w- zzERHnLy%z2*pX7OhR$DMclY1eaxRl!WSV-F5{tT2m*0`1Q7ksA#iO|_E;~OF?1zS5 ze0EB!>L2^LuLKYSgw5+Fm^1aeh#CB#-6u-#>~7#eUWx}>axzGX6bu(Ko)TWk0wV<* zS)2~^LOh za4C{p{*dA4JkmxIx2g#gBL{`dCa?&LbUg%0VIxb)NJEsFIKhgX zd5$D8Cc!MbZWgUJ{U4M*CQ;4`L|4v2?5~eR;^zKgFk2A_@{L^%58uKIO3MO{wOF)y zt{svJl&38IvgKo~DkW}Qp$hpv^DFybkdt|r4@%xk8E$Rpnm5~h&%VexIy_;s-M1~7 z)(F}8@-`_bhqiBl)Q&{4bvI!qau>d*OvW~?_Sf_8IpgxzHNp&_q#LGpKyGzIXq#Fv zyNy%Epe!0I!l!6Nkj+PdIXIpuUKE@#>VA^WrG9dxASRiV6Y|-93{cS$z(S!sTkO<0 z6mWD>KG9Cf%yzk?p@zgBwBEGdQ+4sikJx!@cDMhADnT+x@KdjTX7DmwaLV!Ud&C7P z>5lG?u%8u045qkEn3Dy)-_3v#5)+*jcz#cxgj%^2Tcc*=Diqpjg+)gjVsBS94C}tS zgIm+TaRk@2O`D@i^TfYmDSS2YRF3DM7#+_m@E|k+gE`a0h=1{&Bpt}1p`m?af}AIf*>Bk{nUb!4BcUkv>#tYBao*Vl5X<69fVdi2+g~Kl~ohyf->?$X+5ax074H z+;oMT#ww`Z%vz;Bwwm6nMCJHw!96uiT;H=rv#TGIpEPP9FiDVS!HxI?PJ%)%@pK}h z@Tg&oEaCB|a!$9q$38Ois`@+#->fYhQib$7C~;^q&L*y-O_&V3?R@yiXt@=N&!C%Y z76zgO<4Qs22=kfB?-x@Cv9Ya+r?(%kNToQ8QqW^@_^2U~ZwEZ@a~I8`*nJ*ZVx6bw z1q;#O`zD!(hatbnwx(>*EX+r+W}P$pUfHH{-PeX@n;%nmit=b8*Vs1=XrY-g@f}wI z$r|m6V@@iAeGqv^Z0#Y_^gEG6SzYD^P7;x&iGH7y4#AAIST=eYXp^W`P4Q%Qia24qT{l}eUYY$d*i2Xmt{+$0&9 z65NqyXbc2*5Vjo}m&&=@H|GwCt{=U9qLg~v1WvLF6z9ue~=bi$XL%PClqEWOhsUxQPHJLj;h+kZZ4MZr5XHt zkt~lVGp*5c+ce?HA&Q2(B0W4sxtGNl8(wTHl=tN$?@JcOqXMWGqbBsn^amrPifQxC zv|Jr`OHZc(?*Y5_-w&kTCmKP1Fi`y$HIJxb$xP48GR5S)y~Wg7A9QAXJZ0FlO7M3C zo!uC?paGs%LMq;RDk?QWJ0##Mty@!%8MB(snd>hRgHsn@h1ymfYen76J8cJ(eO#F$ zFM`wZc(>h5vpwQ`7-qz8pBnFEOu53W^{}Plr>t#D*n40l5DA)s?J{^00632T9%SA0 zQ1i&v)V%#b6g(riKw~qNEHcaf7o@McymP1+1!`cq9yg+Ee8vjq&f4V`-=7M=f%$Qg zn6Rmr`*pv8uZykn!qBXqtz5;BGn7iV(r`fhIFc=5Z$NUmhFsuo(0;vMZNwoW9$`Kp z|8ga$Fj-NkJoz{TW|dR+!&K&}5!l}7un6AmK2`QNmb-0Q!B6{q2}v#(E5hr_o=GGn zWkDf#p`NTJINLwb>_+HGan;Pz6gmv)q~k0Hmmi}-^m=%L!rmv))SqIVJ|J1eQ|_eU z5Wb#|*qf&$a0^9!UCAqB>uxNwT?LL0Ps2ndGs?te?aT~q3{k}id%ftC!6Y@#4EENd zorw6y@Sp8BkFj20!*^0*{AAYMq9us^9JFh5SIsuq z`+dYv+5micdC@$(am5ng;~Sezo0?6vt5s__A)R5GP9LzW$WgCU}n89wwo-~cy5eo ziM_M+=+3bANSc*6S2)g~eQ&;sY@ONn@VsrTR&OtHEoNp7eqOH>xdv&1FlYk9dE14^ z#@j3Aw}$cE_n2AK`Ty-*RI}WQGC=VLyHyN8(4DMqdDjt%1#vk^-a-ab9`KT(-uJ{M z6b6c9yzqnl;G%^+gHkbhfJ_CT%Jww1KYid!hI7 zZCYr$iLNK$rsjO*%dExb7gz_lV zM@4l~n$%`Yrnf=Kq>$+qwz8Kh`)E+i<{RcSIE0P=kCBRJV-eO5kf>vWk}tc}sxnOP zbj+W8BM0W8#R!1C*a_D_dheuRTD(wHH@##Va8ed|B5X8>SbX*xtgD#R>gB?`x?fos1lW& z@7LYmx97ZhT`RIu8;YzS~LG>W9D~nd56(QaY|3 z;9KXSG%ejTZ;_Mw_KZ^wWfI%DHK6uk0JjvymkdG@66!1^tPqNuniAuhA}YV5dxOgNf3KP_A#bSI8M>>PyB0W!l!o@kBI49$wbdRYEh7 zh|#j1dZ87Hhs2Eh7)_fI%XLzw9zWJYpn??=7!jNwy|orCH9zZeu!yaFTc@z(wUlIY zcWBN){l{jM$HZ|sH+mu=_3*1F7u{%Il1|19<*Q%Wc_qfTrJfrfxf@hwR*kEd00;yt zC56#;nX~&NW;;3qocH}%AAz&tX3uRpR?BQ)z+vdPQcUgl^OK`TwwYZKWzEK*lguhu zUA7WA$-cy|e-ctYjd`Ud<;AN*u}|Ux3Ij$GLN%9M_7_$jNqTHMG72?VJ2k8kZn&U& zReDwymJb+Feq`v4T)@P=BU4CZj*KkvYLIEKln%ZT09y)+Wy-|E@~2*#+ZWcUo0>R3 zGzxe*1|Sfq@4Qo)F}x6-lvn%J{NQwsyQou)_gTrd@c7qfk8-sS)&@oBOg*X;W&H}rIao_6o;y)+=36XR#UY>qWpZp z!EDN%2DL)nF4s06XVLnag611~l>fMhN@L*HnKNLXzG2*7vFa7C7dPE;`=ym{6I@de zj5?KhFBIq0q9Bq(cj>E?EdlCAUutxg0W)zED-8PmjxTFJ8JXV*6c+ebln_ zr{b}fwd+aIo!B-qzlzvaPsyuRKnt2l?(+3dLebvdmMUY-E|9}D(trZ`kiGxa2v0&Q zvxH%;YO2)_!U#F%nr{i8YTfW`JG%qZ{I}kv|*u^R|in(1w zLhB5A?0iDc`>}wWiX<|*w@l6<65Xo8BQ65+CF%K)NASiKP8Zn1Vu{HshmUyU`#Wni z+I|c8U=RZ^E}|4jcQi2>uXN-(RVYDFbcmXn$*598dLScm+4lF=&a1%TjAsa4YLBx% zP`ab%Z%gVg1s|;9R~|1lnd9O5YG%)YmajG=HO^Vltis*CqIV3^jb|PO4u`Hi=-@r; zhd|>zZc^RjwYS3H;^WE5#<=5eHihpg=jlnLyVzZHe-UX~cf2UOR!4I{Si1zV_7VKj zuo+ismo>aQ8u4^*iIj;KSZX0qOZ*1n&PcrTC9{6XjaNF9xfl$MLBk&7A7#L4Vk!Emy3@UgJ- zzTaOtIDp)|Kpt);c6J~;dprrY!2e-j=U{4O?)m>V*cLAheK(N)4}-IVxr@7zlNk)y z&d9<{(a6He#D<)gm5-I5MS%RBlADE{hlPWa{0j#!xuuKCcOV;^ySqE9)ql|M@{VS8 zaI#nnJ9~EsL+~GuUoBnjjDbLqgNdu1nY{}TsPYbVhT$lFYh(MrF#p8~1X`NCkI*hK z90Ht}Fi!u8?9+eq^FJ|~R;DhN|AEYvQy{%V2>%;I(aO%u#q+xv%zs72_TAn>v{pmu z|MH{w^&JJn!7aec_bwdVn*fH>cL?Tx^P^_vWd_48A(50X@}DY=|5l~03WhPavNd~e zKAWAri>-qNo4Jvjm5GDBGu!`83>&*CH?NVI89NUruQ3k~FCQPb88;`lF&_tqkvSg^ cJ2&gQ1?zi!FUx*#?+h?tDJ4*)gkjMC0PGzr5C8xG diff --git a/client/src/favicons/apple-icon-120x120.png b/client/src/favicons/apple-icon-120x120.png deleted file mode 100644 index 4a7f425f83cd67676427bd235da535b694ff66a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11592 zcmch-bx<5n^e>7B4-hmsEN;us`o{fA*E3 zSV*ZzAt2NxU_Bb4zV;DaAo9`()sqy5uN@i_1&9g)f;S@qLSQHY!u_i#@Bjh94Tym7 z#}ENQI0FHJ#4+dlC(&00nz53+48qHQS3zfa%Buv!QQ?crD_8j6BsXFsj)1`04wjM9 z@LW0R^h(qn^4q@~@s(fy>_;t$9EXM;OoO3M@b(-J{3)5i#_bE6Pf1dz&1t`1t_lPseWX~ou4~(orQ4$g~e430wlU0+op`Z zEX-3akcWHZpkNhLl}Fg%Qf}AfKZcG}R8)zT2oNr$cl|5n(mRpr$YdtO1SEs?JqW4QCYaXYa6ieL!O8Ek4q7wZ#$i7qM+N>Z6fuW0S?5jT%mzP+| z_UEOZDfvwqkAAFXYYy=)^gocNQ{V~HH$(xlscF@rd4iA5Y zoCZjkynDya&Uvw`uBInh%Z&!dY4VQQ+aoB2B>fo$?QLW4?O}AR0O)cUSV%?~#$3&8 zC|DbBe=Yeln%|h{(3JEy+ac{WK=cbVa`umvrc4lM*^>{k`yOx|SKCi_n?2Sin0VRo`61|W{1fw&g>~3#im>dfZdQc((EkK&I1i?gVJf8+LD@W*x zf-6^WaPj5O6xj+-uS(0>Af?B~#D592x04S!aUSV!CZQk$QosaJGOHx|=@}y<;OB!) zzpyeA;Ln}&QUl+to;=2Q)Mk`e00^lR;BWcqn}|jh=U(_&KO~%ohef(OtcI=#NOzHa z3rA;>!VF49qLpfX+5O{9fyyB_MX^6#v43|h@Ejb}Bj&qnlE2-M|ByBY**w(_Zd$N} zOG%Q3Tb9<^k{9#YgMwTs=zamUj--DKM=03(wL{8^;>eNMY+C^i$|2=&`3SLUIX37}fp#>O|tWsltA}=^N*N#Pz0FWc7F0 ziap~?bc$ppssH}2^hK3Z57blIx9(7Rqj~JKWO+_7?hSYis!|SN@iyZ~zX7BWkA%jV zVX%*Vrwd;c$umS`E}fP`o?c&9kr$u3P)yS~?Tnaw)(0)~9_nUkFoHpc+W-pNRcR;z zEs8WccKF;>+`Djm>BuDpXT8u`N8R*ivA*4Q?}deXy$9Tn&>V}K=MdLx9H5wYc-ROx zZ0s{Ze7_s^J!U9mvkrx=^dmF`Plh#mo^N_}b!>VXPx#aBWW-;(%}i8$oq4$$)!Xm= zLzNq~kZ;@~ZH?xLHPwHLo^&4X1fT5?LTNH5r(1lu){)x}*7;wCAy0T%fIu>S%A7XT2M2C0$ILe?%Uy)rgGm*EVl zm!=~!#>I(6S4^$SQpLwqM0mvG=3|X!q;En(z_xm8wa=HEyLg6H%_{s*T6C#~<^CJL zISy1sXCQpEmr!Pvq{G%dm zXu*u-*_=gQA*2E?oYo(&2r7HsE@8I$F-y)YGsS|p)I6xG2bW@~3{uJCWuG@z7t+Xo z(iCus?8vaaZL{dj!}vTQNob|-d7qt8$K@<|w?8g=DLcA1D?8;z>63y*7pkp<6l$bE z+Sq!uh25f;&uGaB>{tY;+xGyYp^7WT->^X<6;(GZ$hV^FkG(dmoF^p(DfVO z^S6nluKRprORxEK#1_=jiNZBL<@kIaFj#nOLW*ob{?>5qn`>N*!Ji2cSw6 zW8`wmKcD& z*s9HXxlP|a7J2DLp>zqkb9Z0A;v!pf!IPM_gs%iex^-(EMMB|G{KQ6$!gs;uewlgW z+_(lQMNQ6m`C>J9BmEp1rg_6y+~FDQ@7npv0~Vn{Gw9p5%`@kl*I76kgnGK`&70~; z-_H_Lbz8$b#5>^V_WarGT;m0)5s>J^^sWi2BXZZ@SnL`EsS|M}`*~Y;%kn+UG$`+A z`aXrS(ke$XAequ{Ka+FB);ij%G?XqkRi*p<9VXys%pk1-8T`byFhIGalOo*@4?#~2 z1`;saMbb^br^DeesQ>65MHi;&6gpnNjnZ2R(EnDEI5EUA=DlBGS;|`;?@toFNs|pS zBzz;{ibe7S5M8OJ{_q`_DfV z4}C1UG=P4*62*WF-+vYFTaz50e4Bksf?a!Hf5ty3Kmnod!O{U84}BUfNDkd*!s7FL z-yPlG93d%w5D$zPaI7%_t! zuevRfi(_(SqNGAGhi^`bS{mfw+NQ=uJzY`>(){8MRnS>d1t#A0yU1mrenK3g(ZFCb z1Yf@jT-{J*rw2yq=S+@Lk7b9sBR3JqQO`?s)HY(X! zoZgDaqWKw`H24-<3f+Uk-r26ke7=fIXV}>7*kUt};@7s<@vdm0MMjqWth(j&=DOxU zHjD4TIoXdooK8yGeWv$yWq5QjRTFf-d<*J3s<1rqH5nv|BHxbjaHmol7mKJ?|{?OFurSYj*Iy>>8w>KcbgnD`ww*ZtC+N>?d}4Afmm~ zdV%-3Jvn(hSPc{|HKq$l+zTRzq`b4|(VxWd(PvAhG zI18L6BgnBgjAi`yAsUMZolO24=nkoQ2hWoVE|)9UBxg|8>$f;z)ca1RFlJCT27oLT zve9W(x#ty2*7hx9Xf=3ix#ClBDFNH3_>nfboZszVkLpx|5OsADr}`m)KK(aZ{n6oftA zPS3ZezY!bAd^fjttVRcDZSJwnk_-7!3rWezw5++2e#a8RKpz{VfH4dHpf>sein$1w z9^F62n!*dCg4q=pS&H4XH%}^3Fa;41D=sGr#ikwifhs$RZ9tZ|e4=IL`9@P`Mil#3 z6-O6vm2MfBD|o=k0b`vhS^* zkoa|yRF*K>yJQ{)4V~6SK$Hzey&G_$_Nq!9mWa|m_JQB%`g^>(y9mZ9bXDR z+3IXXaHg#+NH_pZlMPpCcLu2Lum94fMPgJ65c2E~k{)LDxp9gmIHe6#juCa&fujsa zL%r=h->sx<7TMI&W;_tvpWC1>eymoa5>YSE@Wasp2J5bD-4P3mDXV!906n{mUSDAz zgc*k!Cllb`Asj z{slfQ@!}-9s6;)DQN%6>QW2i9>Yt>Pnedd=>X=vtZC%H$*?gTb<^iHiC#n8+u|S{9<+GNoMP7 zDbu~1GQC6|`0+y%+f?@_pZ(YMQ z=6>5zI5td~Mkd-++HgdW(l~|@%!Kr#j)9VF;%8A2=_I|b!{y2xXY&o~oT$JZa}u8d z&mYs>`-s+?=ePEmy8^L>aGWc-7+wC((jE;>*4TtNr-_~r-<_k)E%Jb;MVtHvj-Vs- zN6GHW@3YXk`T2o>bDM5C1GS+0wt%VJ#eDm!C9J7*f=Sg?->ddq!{ZEg+Pcyo%?x0z z#Cp^U0JbU0A*U28;$bMwFUelS#dw34T_0NYG>Vt)0Krg`5%(lX3TYgALHA=)u}S8t z<}_}nuk!{%VJl}_@b9LIHUvlnmZ1cMY{`c+*uOiem+DtGKs{1;A2}zBdf!9YdOyxB zi%1t1Ulu|5c)Y@Q5?&A^>|eOZgl_HiD+qqx_^IX!k8J!hiWm1ueR*Ir=($0r!DSR| z?r#Q2ef8pN#Ymre5$GOyy6H|RmU!G>^VqT|(RBicR1);Fne2mY&(NQ34iCQ5( z>9`o{ojeIJCW+=dg4*Cl|^qH+M15oVyQ(GN&PdC7uSQ#;5P%+bkTIGd4f{%7H{^PGbL^X49u;pGB-GT zHo6k`C%?DaE4$)lX>|!9ci$?#1giO7yn8$hxMj_abC~l1NLR!JC_vA4FTu*GJ7N)V zEOuAB){+`)Y#DF9VzbD`LVCEw4lIt5-ivgcDYd!{bnex<` z^60<>F~V{U<5oVWF)rf`5+cF*x~Pp~%RbpmUqB7F<<5~8DGI6@T;Lzhqw&AtkP;c{ zYylXIzG8?vnkhJ#qlO~#Z0fuG5Hti!`7z`T`;Fw!uu3RtxXu6~l?h~{BMGIKjyGE( z_NgMMTvFA<3djy1zW07^-!HRX&Ku0ABi*XhyyYe=l%MA=& z|A_|tiwKZ`L&_36UA5=X`{?C)j!(ycOAM{r?_`eY$mmK}OQM@#lYtb23b03g^Q`uB z`u3+S^sFG+QY(B#sWR$nO5m+Oo(DE*%eEpe2=Ub`!l(NY9*S*l#II7#=94U=ue!&u7$Rtj;Ej z=Xt9i!u*dLN?Q_k0>Gagu$dQfyFks8xMrt*zDsa^!V%aKoMcnHgrO57h3*;0q7cpo z%P3A)I*2LXTyO@*?1iQx{k-2q`5qAGMG#6WhJqOi9Kqk0eaP-jGJs-b79(l)HfhWC${Q(VAdS{-KCGNa zTNSj_c$D0=dJd{I46Zv2pdqduA1lYZpl!b)^m@ z3H93|?-)clR*!ZDkz{DG?P$*Q{FFvY!8+hF|kbz?O9~yizEZy zXuOa9YB!CNwCl?D`E5NrqZ1DmJeRqo!yKo*t zgTgWdTv`Pj%5?}bMy0BdHX?i=L?xwc>dOmvoi!^E84J=gqxue47XGxQ)}39n*JoIx z1fu=I8ul~$QwNcH``&VXG^ydQ3lfvkn@oFL^%hDr54by{WvV7KQB9m8i|=OnVbio?ac|(XL(~2sqTMtr z9k!n{OH7w^Ry(dh>!o9qh5qPydO`{Fyykj8j=82!K!O4mD~>Gx$xIR(4TJA(m%jLu ziyuI@XE$dm;4vFjH7;WJB3EIIF_**f&n`xILPQzr350z~i2t zlbHc~ER-MZ;5_d>i2dB{X`&f_rzYByL@&VI;jp=f&u)ffM!{*>B@LZ*J|oNA$AU$fju8uiLNd z3us48OIKxTpiD#SPk7AJa-g-E44nm2^(cJe%mwhcRTR zQ`Wg>v|0{CDn(TtHBgJr5Dw)*w7rhZ^e`|cYYrd;5}&tW@Q z>-E&RMgU_Abf37BErOtpDLS2qbq{=nZXX#uym+1sHk3eU6)_0h`#U2nTAijq3Hd7% zZxc>U%2IW(z7m3>-`MBK%i+-BFdr!Vye)m8tc=4I1|d>+`h;x+OOwBTLHXt4!$N;O zgPfbX2m9X^6i|}!;3oD&6837~@d~shqJ>2fb2G}IBKGoHEf6!yQU0uCGX>?=2vX~4 z&A20#uB(J8oZyb$wxZ4wd_Ch!?dg!h>(vEtkZPIY{&T-L%6|cPZ2G;)osj6Sr$VEg z{>PxM&fkYjOYL>zWl#2H_cY;jr%t_{WkLP;uN5d!N2dT?gr}ZMN5)ds) z^|}SGxxToq`HsOgVqRhm4@IlJVXjEC;0Y5hK-)>})JL`4sjeG93w6%U!_*0Vu6wO) zB;AJA2Zbotl-4`ki+E|ztJ|RNgLq*yJCyz3E{|tzVieS;h2`q!3F6;nHZ&D}&3%op ztNqzyC@*n4rtRL&P9jB!#tX&8&@nEF!MFP6e*UzzwY4W-kH9Vxgg;sKew{hK%cu>h zYTbLEaa*g#=?d@#oihmq)9dyqpr`vKf$45<$}jrC0n6#1Mh(RXm( zd^#;}Z-2PJfN3JBINNPEMi*;K57PdKdz+LUxsFid_HgqmcC@-%r4>-^a_hJ8Yh1TG5>8ZtlAD| zA2zu_L^>t-BW$0hHzuxE;pW5Pq*TCTYFk5%K#XiW6kf5Ito-5)SM*0gC+g5} zg&~5w3)ZB0TMayL^yln4)bz|1JU%bV0rQ~ne46yJxz$BALYB!K^5Pngz>SR!why&t zUufoR%u1q4Bv*8;>vXcGO`(R%jdSki6Djo+K|A%ZUY-+EZ^FS!gYL<*j6%wTtzPX$ zJiASGQvD3(v%S;J{=y#2mXmDSJsE5_&BLih?$Is29*3Zl9~*!148W>69-q+cI~SPt zER{bZ?$NWqX-oj(L#?9I05NP|Z1K0DI27ziX>!>yS~5^1i0W{~At2yNMj%BAJjzEd zl4N2yJm5q>%Mx>hi<_d{nj<0sF2+C0?!HS{Zt$2&qt#X*m;J7CZL=!f>x3HL&^3e_ z?AGmgb#Esy=Cp&YNSJXulAtfrC#_3buFJ5|v?_}a%^gi~oJr#0Q4aOI=dDk@0wA<_bO-V}8F{SSQt#8Pw-TDdC z?z#OSn&wBn@fB$p?I*%yXWLkO89Cq=*4K7+aEOnK!&z6}ptyq5>UAm#eItm`=VNbs zo*t0CBjLw27V+1bF060{PrEl!jpf?y4L~oXX026HT81>)W_R>@sS>B};M?wQ>wqzz zS`%5q##iF^G4YeC;o;Xn=PjD`bur$~z~ZU=5^ZQI2+>5$U0*+5b`k4)kURK$C`&F?(b#*gzOVhI z0#6P<%s0s3Y2Lu(=I?rm0j*4%S#UYi6!+7(#NObByc6ZYs7?K0;%n&!u0%XWFcdB= zmojFV9REdqQ!CnGjJTvBSX2F7r{c}1^;c)U>_(%xFup^5_z7#e&92CIV?K)?O+2C_7w6CCs$x;{_hO-Ab1)^0+HNXf7Wj4=xGDd&H>(Icqf zVxl*S!oruXgqX)v?~QM!^@WAor_n~)KC9-Em3KgBG3j4_Fh0m%H`pxN$5ROPZgl#9 z8B=t8mJANrHulZSg&uAteuYogBq`acIz?T_%HsdjNlwcu*&8ClTYjw*R4Fhjul=yC zR;XfwhAd8p*2vUHDg_LZP{^V6s*D8_o(-R42Rt-jtEg?WMdSsEmCS*!Z{UuX!*q+d zu!B)A?IOLwcg{h-JXkJ2M7j~_R_o+sDPA@-Sn1~|G-x<|geIyo9Uf5|dU}QycJ}Q$ zd-W=OV%1`XX=+z!oQo#d3M+Bu??1g2lW{Phj=-htb;?=nm_K7+@bvP^e3$U-ur~X& zxH}h|UiI)JgZFZSObc#Nj zP)tk=@D40~_WX8wZgmVtU`|97|pSmxvmpS)@mn zPg;xvbK#Y=R1;?fKZ6lKfr0lfmNtEXTsIy5b}d6tk@z;7AtddzW(W!C`eIu(1h2lMYG}<@U)CC(~FJ}_`V}pVaW4S2= z9k-%W?!IGeMAB%mb0{|euWwLd-p(=P7f5IU(qet|T3nlOL?&evKiXlkx?xR`ENLpc z%4?=5e~WmdfAYO9jhv)Khd76#=}<8YupWoYePu|zZ@4RKkeyQR$4?HtENPmNsYROb^Pro6z{zUP=&>=; z+pe3W33G5MM5o!m=6w%2QzKN*$mw2i;M^hUIzYkU4{t8n+f|rt&l>~kP;CaEbp;zw zCov69_^=svW~lwmO_%Vp^baKyepCTKZmZ+FqUdy!E-IxuM6~)b*V4*q#-=}J+EKW8 z=6_2H-w549a!2kMjR*(Ax2?Tw+nKr26zdv0#`6kkpMOa_QtVIW?kwoon>jAhd?JLW zE$icS*avGF1=38jPv%-!UC4*VY!9lv5|6t~z)U2LkQK%KHQxE0vVHnphGOtkN zfP5{&4jesTR#wg^eW`hNsP98fN)vF3JJYJX-6 zTYN@>1F^s8>h{;OyPvEOQ7_(Cg8wk=pD7Y_;B#;pdl{vM)lnBlZA~=qKKyf(2g3xeTY;u9m%T85|KBHC%pGhF6JKJL@V4eQ=Yrf0BQ#HT;m2 z==Af`iBId!JqyS0z$`6*Rslt>)vf0?8BbmUpU1s0GZBbgn1m9;ezKk62As{QsrpZ=80Kk10xM!lp77*$nPMGNF?#aZ(EMJt(%Cp;sJ zZkDYIDXKM-I@FyBm%isugriKr3T6{|#d^jew%}80^cBiG{>v+>!SwcJzlT%jp-$>< zh=JNa*g&@88Ea!Wq@usqlzl$)ECSn+=&zO(Rz*rY(W8IM((UfcQ~ur6n4 z`O<6S;j&vwIL))c;YnraGp#2P+8LB8#>Ip^=S9bKPsDY3YBs%UixJ^+h5anuKnH0o zjc^pJ0?mstM(8nq>gys`k&oR6XOp_m%$iK@}8${1rhSN@` zcc_Y)wEEn(n(pSqqr&XVV4&1-pVo(+?xDZyKF#;P?1EY-dbqbqok+-i5S}Tl7v!7iI~e8YIQsCC91>yQx*~90w!@)#W=@Jc0h?O;iJ_RX zDX&RY#&u4&-uAxQ&k0LZbIK}@qBG3q^g%+hg9H6_UHYjp8Z#a%9^QQm z6uL6GZ`745{qP*VxfA~&9&Xo(yu4?paK?)Lv5N0YmKfOS(V@;}vrxb* zy4sd#2tOy|pm^n~y<^|6JND?imQSk|j)P9H09`EaKq>0)A*um`M`GT*!PDEJwdd&o zdDgZkzjdwNW*SeTK}k5Yv{h6^ZIjBmZEc=v_VZ9Po#z`8S{ATW`FKCV+spfnps&`x*~83f!-oG|Cbrb z|M2sFVYIAFT`m8E%zdLpe}$0!4~UADotdkbqZz{g&Wg*?-a?{YQ}zGwqoVPOLg3~V z;um-&Zr)8img85*+yCK5-OAex0Vpk zziPj4 zP4{$7_j9DDZKnI2NF@a+BzSyy2nYxyptQKkXPWR|g#G$?Kakx1^O*oFMdd{yAnM`~ zUX7tYpCMgTq{JX*`Ml-73nOr`%PN{-kHeUgv@#YNRTm(M!AQp^|J z)*tu}6dbBGZ&v4SLK7jRQ30??5VVnG5-Oh|(QIini;x!?YbhxQOF}!5k=j;51ydUl zIH;3|r5h&>-llMZqBS8QLBCma(bV)<(5qb+SUt*lbz1jPpVJq_tjreqa-mz**0%1r z;dkKck?(i^e%~c#3py%_)`WY~$rr)l=4t~Ro9G^*mq*(d$`(|G&S%xMd$P6xmZ91J zZMgTgeo)*{GNtH-FUt#;0`Vw*hu^i*?sW2JPQL0RxI(K{sSCXwDc;a`U(@^EE53)$ z{!;9o|8?6YmM)?xQmC{!E%nXV(-qO0-}i+d1>^DE)=#IFz!lCFIwm&mxj3YcCb+oBuA_ z{rOUe{R%8;&9l}CwKhbxPc0WS39Oh*DOuH%!00G_HMWMfj$V-p6AKT|@Z~TKIk_of zJR&;_OW=VQj^B{Rg!RhK&6k%F0!$s-AxSB(OTi1{=P|s5Bq?H_7>|tr;Rs}+wwZQo zWoQUefN=?I|4){fOTYZoRDm0po3Y8sB*VO7jXYE9(w^r7@2#b8l`UpAf;zWLvx#pMe~ zbZKq!#|!iYeSt}Ec3~Fz(p0I~s#2^{p#n;yt!8TYG-&Y4{J~7%U!1(5`CIuFnt5rCyjddGF{ z|H8l6?jT%TY)XM{i+${kTKU=Lf%92iT|(;*n?Af=-uPIw*f=^&e-}Y>nh5ELFp09C5{>RwYv@RZLZP94b9u z5vas{*1kienH#UTpU?))qcvE@JMG`1bv^HW#9xi%t~#ISdXDBg>|M%pvvYFJdA&7> ze|8y2Qh*pN6*cvhUOEfn_|A#J%>aht<FXiA~1Y|A}_`u6!1lG=zJks_1NIY!~fQ0VLD4Wg^l`^w31U>refj)GHQ@4)tdC8Xb9Rp`g>)Hu%$bv82SrVKfij3CV4o*-n{H19dO$$Ql|%aMgvSYNK@XGeez7ZGY{tP7=6N7ma!j`As; zvwEeMrc_DB?fn}uF}TSde?0K5Wo_bc0;rOScx0EQMg?Tc?UD85$%{SH(nePx{w;NA68O-3wt$hD4fl5peq3B4 z%Y)wR;mOH*NB69!Ol$Z-c(DP1v9CP1B>V3oR4|EF1K$auRkF=bxDZ(8#DRJW9r{M> zfjSZLDI1K*?;?b>`<7|iJS}~vnS=DdD45tt@M!@mI-s>Iu|ZY?vXOzjx7DX};_XX) z2dOXL`*&8|Ux*f5<=U{V5VZ3BwYo#$NUb>VLybkqmO@aWN};PP^T0oHs3%Uz+3O=_ zY%)LJCttFa{Rp(IOBJD)dz;IcEX*^LA_EAEE{^ZOsyanXhbvQ$7{7Pryer%1qP-Ri zF+eLWWbebNu%=CRc zJKy9LlmlrB!TWfeib=um)qvJ_M0_O~b{CU8nL2m3BWS0iw`5eP(RwcG!mp$C)?v-# z&F}beTiNb#x*7bVE*tL~3GPuL53g*h{119Fm7n#B%i{rd8eHi0%Frt0@C}YFH3X6> zm6#NDe zgVTa2+ie-SQtS53t;ahv)%Hiv;cqfnQN|qVs3KW|;2H6AM- z;@Jf<%Cv<>w)MiK;?7HYPADInD)oPB76f*EkYcmh3L0K07 z%-{?E6S!IHF0s5r$;1a?NM3IDjmveM1r!Aod?Yz=BHQs7xUe3(<-hj9`QI0J67q3` z8}iCKRrGim;%(aPFnZGBfH-5llQEccJLl^<<{v_MqPW&DrANgKeu)KgM`D1KbuRl< zQF=22#@Dy7Qo?s+lS`1_xVSg`iRaC$gLW1r;p-ydl4iD#sELc2uQ(nyS|Wb4%DTCw zQpbCC=>5Uqo|~;xDIy>F(|l;R);d51Dy91K%~Ms21OzQ*@GMj{`4PV=@?Ak=0B+r`CYU@yY+vI|o0T1{4#khj9q`JUJ7a>ECnR^i%!7~%FS#njNx+OG<^Jb%Y9x(7jD z6t@?Hm*&37yme3b3E$pOU@*zdPOmfuq|AfLYl<}DA+n|68c}n3ax{{j*f(~IKdfLn zkErfu1gI4rU)Qd(uhu%XWM=7X$KxCiNvz$TU~`Zs(i!!L(`9_Z149twV5Klbb%IE9DeYF^YviF z&mvfmNhACig`~t!jp<4_I=~)=giz-_6o0sw9sfW*hl=eKEAht^CV2>ax4`JOT`aZX zv>H7U!wX)K7MdiL16H^sCiY+!4HsD*&pb`jJqB&;Rsv88f&`!vc;aQH-?{r>kZ#is zt0H46QQPm?T?mUAipDH-$N2XqerJ(XjGnB!hjHfs_plYFl!1*m+Q<7PVY?PhBFsD! zHycy(-15j&>zERib>^#V*2vOb9$}$iaHD-maV9T{`@O~wp#-wZe6nsW^L^jkhqX0| zR8M%U*}q|#F3~A=+FYWT*^C~zS>V2T7nJTP@DB5VNSIbL0_--An3e@x+ZcSf`N~ja z7phLSd|-#r`8h$9$kQIQO@rYUBmcgm9So8*smQ6g?QcLypliI1J_zR-8XYfGtMFW4 zp{ty|2+AEcl63!ut8Zm;oIAECggxb2T_L}s!KHEJ9B3*LW7^&oBh~cLfZS%v%b=@T z?k#XHmUWf;f|s`%HXr3(+Lu{8slN_$%wW7#rXdaM1-$xjzX~Tq<)he>_!Af1XY+({ zLZ#S3VVv#?jY-qJCsjTBZbdUsQ3rpuqi&Ji;&{mT^81#d$vJg)*3CJSj~~oQckcU7 z9dN#kj&!pi!qwvf$m|j&ocvBN(LC8JTUL&#InFQs!hbmNvCtQRbI~7z!N^xRVjIhi z7?d)@z_1SoMNBH%%=6p-fo}OD>Mo##7@YHrYSK1&9JjHmSNfK?Z@Ej#R-sFKdPe^IyKDN(wt+qSMP0+HT`+Yh`Z8V1y2}A{E~| z$j>gwA@<6fLfYE^3wc{|3JM;a9`9N8)T#CIz|A;6`w2&7AqP!TS5QKEn)RgeKn>Ei zqKcB!$x&ASY(U_#Yty8XEE-tP`^1PtVj{3Cg<~h+2U(;_)RHQ7WYb`#DfRF@iV?rU z3AogtVy2vX+Jv#t8+7@VB%w^>f%oZOzVpE&f`Hd9ME=J-x)ULqL>7sPIAc<1BB?57 zHcP{8r$U>Mtrr8{P)Y$^p zYLF{7wZ@<$-P%H%lZ0sySZ+z4s-n(Jju3&NLYvO}_LpzR5Zi{|`gc;V6G){yb-L7a z+$$4F6(rYjF|t@{lVckQQT9e9o#x;m^jLs(=49Hw11&`wQXHc+Pgd{x&vZ+qAgJz< zCsiqabWN~Z>q!uCS%BG?)}jWiiI)>vz<&1Y{3OFn`dnxsMbtPnh6F0TXf?Fg$BDq( zBhH^2B4W}l-UYMU4G6$zb*>(#If@0DVnsF=p}=h<_66K87t07Gn71WZ=n{5%2>3|j zMtouiWjs1(JJB07H}u3>+kPJZ>O$Z%^>lZ!z9>hOLnt$NZe_@pGS!v9VF40*ezcP5 z5X^Yz8GV=y4Ez?e0#1ygbJ$ihjjL)I^f=5r>h6uCnJ1r}k!Ma6G_o}-$S^REzZOXi zMdJ|?N?D*3s|QYzmZO5irbwMmZ~8KYceN&ITGpKmWyu;l_fEs9l}eX4ed6C3J>>FC zd>2bqaA-iWoPT6A#lJLD9snT+86r`}wadVZD>Qu`_;_#(np;4&tN@!yLO%fpxV7GY_-l@b&cfg%Y z;j*qUV3?whNVGb7IC}nmwhquuQb}E$7|uoIizH zg{diA?2yqwa~YK;dnQl}VLY=Gu~QXBI`&iqA(C>l_oacb%Q~>E84oY!iqLOKUvq^L zeM)Cj4yogZ;6gJ5RPS>XBQ2vHc&IrS3EcM2ESsnVjyppuj7>vX3bX;wBCHdgChTUv zzZFiIAaZ$)u(7lH5D@XO&KGSC6x&m=Jw}4;s0!PGovDB&CCAnvvbq0J=6+wKZfjGz z`ELZ>=?PKQlr+!Bi`R``WHFDrbZ`jFoV_}O^BPV+?uiPL=&ZdLT!7-H3F4ru*};0x zL0R>Wv6CriV!(qpekl zu1#UV3r$mO5@Kp%^>EwjZRWdrZUey8e&sGhDdBuy#leg0lFm_vg^ZTSP9DS*)e2#J z6yEm?4n?qL-hcFsE38<%-D4<{Hq{O;-3uH%+F5054K{7K8=1ke0U)NJOY7=45j$7J zcjkHL({F`0iqL75Ih`Yj$C`%*+I+wMWq7gk_yjPg&OUC$Bx&#D z?}(4|sTso zsEzDzW;Y*Cc_O_X8J$>N!(C9b2d>mB|rb4u==Y6{0L31CYfvtxCC3JXU@4m*qM z;s9xE=58(us0$bAe+rhE#i_2AOwmAijKv@KChA_IfG2Nc>zcWK6&Ss7Awch!>7P)J z6*B_B$cM@aifqS=>F?O*;x^&VxM^vO`2w?&;Ff2n&~nmW2SH8`tTIN$^mMW zU{HSd&ke}I)XvUs^yc~t^^``tsWm8aC!<&@Ek*rX~$P5noYF~iC6SQ%>Y(UCP>D!j+K8;;@IO6@iA`|G5#a(m^h zRh-WZ7gG0H%jGdmWz&8?@e^$RYel}r`{^j+z(-~~N^S`K&)SkwuWPLMfR9v2WI69$ zm8lhaX=;*WR0@4*&;1tL5c?+o-DPy@fkFRBm0*wcEE4X2{agBixq+s*)|IgtWoYo5 zR5Nn<>bDgAZem`Lo-~w~#h%Fs(x~E+VZYPl;_A#oO6TYz=BiEz8qJ|Nv*jlgh)K(H zzk`ud<{!HzhyQh+E;c#X+Z$w4iKse+c08^rV(fQ^7=CE3`o6UDQMBbuvIz@Mj%Bj1 zdM)S+e7qw3*Y(O&n8-`Q;^Y9@L8MBmZo4Jv>>^^YeJs1V4;zyKFID+PY85W;!-iK| zD{+aAgIFHAdu_YX@wb=c9+aM!?!bR^uyZGv@h2aOCmz0{$JKA3aTm$_TZ{_@c8=-( zW0|}u6eVT3I((;R-{ee*-iBY4VNoWfzg<-6ZCw|#4RdV#{LpM$lnyU04y2Lj+A zbNMHpx<7u!lq#C)Le_jyCUkP$kI>3_<7E>J@f`72$u#H?N1sfUHolr^h-X24$Adu` zzj?!X=g*6O57fQzlBn&H4wZ8JU%4X(xn$Vafde2Wz^ z(w!(fSaQ#2CX@wns$?b=^290E9c2h}at?Msj&E!>uQ&v##}3zKiBKUhl&4RyW%}e1 zy&+{a%>&zmQy$U7*f%JYkU4WrL?2K`AsgouX};FIS+?392&AQSxINr-xNd7c`CoOH zIauK|XZK#sc;-bk3WUl*aDf$b%v|kY; z=YO~-x%Tbb6$AMdJ!#Pgo#X-ngg;&vKA?T>&-XU`&Rt&5G`sqK`Lo$D!lZu_SqVP! ziU#LTUR}KqGDOq=xZn>BQqWe!r6spf1?9A&N+NFJgLD}+JuZps87=fZi zGF~LHA6$$RS>EL4;G5DCW1UfDze3ayjn?SRBZ=w-epiZ6q6tkPJoU+(>-%NJz`~)?PU=X<1<1e`Vx7~WvanK9%^f$eG?BgZ>J($I6CcCqK;S78^N6og%mTKla z>{~0Voqf+{!4N|gg{5pK{*DjVH<*Uz)g52z7^T%}0j3@s(9FWVkw}-BrMd@%s0MH4 zMoAWn64t6)Nt5y$UYoqNBwk~WQl?Ze6{u9AO4!ep79732ZhgGNta=^j6AJle^cIr3 zpDsGhsT1mwC7>Et}|zKU_yO$X62iCM5ACFXMWYnGj6yGAgd**XjFA8`N5C!Vh~4rxL$pWdjsN@7 zFCn+NoIf^DO}e4DP#{*JM9gyBBBfd+GfOjWcgoHwu_2uCr7Q#{Xvw?+tWMgwOcDqz z_~Wf*{?LCVTASPfGe7^}2Nj&lR=NROnP?Xnqc|h`woHlhz``$5gg&>*Kk@}8wywT8 zN22q4f5A5=hlEbR_Jj*+9P`2<2zC%$>KB9&tOuI;d$hsIs1hbLwA zpp&L4sr3m(#d5?>QO-jN*Oxydi%BzBoABGpmY1nipxerK8dx?di439{Pf@_*gUU<9 zWe`Y9p6cdxHZv_$A&qg-p&<_;u%u{8`DDu|?MwEImfWjcB3gSCas(!#nLBzuXQg2? zHch)g%3JJnwK5JupDo>=$;6f$T9G_lF!503nse%d1~uHv(?&}wsZA~lXZx~rT-ZPv zq`v)sVo4Rfe0hFOZGBFpsjOLh%))uwucxTO?k%$a(6^=PsA8Hb3{jE=as&8fN*v8X zhl;T8AfQO)JW%H<bgbw_hO7=s5#7Lu-=ocBJh;$quUiF_!fHG|T0qLqhOe!=RK40k)OvVj4 z70_Jy!U-79y7u>o*(E^rOI^26v|C(v3$ieJuaAU zA$aGjhTE4DKR>R24`zC`H^myd97E$I)7{$crdy0yG-&R@*vEf`>4jNLbtbgRm6}ZXuI}l40G!BmJF~sNNn^h!1MC~`M z1hvg0k8p6abmo+@B&pC+`ZoZJmAT*l>n8*v(N=wZbtJ}Nr$n}F=?h~_*-*VK<>X-% zDY0V2pdGh*v~g)eVL$EOe~tt8?a{ZE=&u`wXIqCcXn)LAuxrT6=S{P^5-f{$3Gn;nk86EnwPSU9)Exo^fai$~NGR(%i!HbK2m#)@Pdqzo5 z&iL(8EP1T_;-#3M+Zf=oe#upvSE51IF5*Uat1O_tGhQrdU|u2PT+62zJxBjSQ&CrD!4RgVP6N~i_Ty9 zCDfU^$dCIwRRVW1cwnbG{n}EnJFnL@AXO$TFK-kEw?&R*rA|k80%2b)!^e1VdOj($ z7HfbH{65o_eRRMuZ(Y6eZ8n&eraD`X4sU>ta<&@hA0wYf4KYZFaDhk#t zo-{2Lm(eZ;;g33}XP0j}*2ouVt8J5eF8L9~2;UJAV<99>)o9c`x39oYg~ab$qiGTj znIdV8kxf2{OAgepKLFQ_FzrN5ohf>zew6*s%!CN?g(@a)=GdjcqKILUlpmF7oyVq<(yjPS!piCJBj!5TGl=QXCQ@`2bt39 z5upDd(wxUVy-E~IzV-FLUXynggnm9VFVZ1i7W@fcWmfd-G4qA|ecR`)Iux#i#W};I zuIKiaqw6ABrj&^{PS>!nBo;ezyttVg){86W+MF>#@?@AJu;DVPUmKt4W44x%S<|~CVl4_T z)6v5BU?Yg%vpAWefvRF|!#Y0Vu<~jJ0uzv%?VX#LtboS{zU1An4d4V5AR4(Kh8(< zXX=h;EO*_>=5ayJx1(S^Zs{tJW>?W5`8)%% zP3l|3o492~h?^<3bhKFgaB2e?F{EJ$C_AFRImq%jki6URJdBf+ff#QkPyPE+RTKFCBX z{V`6AqlL36QU3d45`(XVYPebYIdsYlOiGcQY5&x0nvlGjWR0T%Gt#4?(EypFSpC`C zA+ffJPEi8_(1ZH-W{N_bi~U$75O?-&vhW?+dDn}3*F$diZcz3+`5_(2Pm|v5D0#j@ z+>@&7*@y1F&pLP=hUE(Q*`#<|{Y~;f;Yy34Oq5e<})*)g%YShJ6U7udaGYJ<1|^K;sWuv@kKj2^r@!qBl{X#5+>%w#i$sk zDQ0Z6B@>_XEFpM|nZfa~ESrhnzt)7nq4-K^`Os%&V;pvP1u2#!k@Z@(y8`ZQL8#{s zuPe1o$58`anVO!lNksoy%f{Hi<1fd*s^X;^67?ooR1k{9H-F9wCLI-=X5+Bjk7AAbM{y`qaQ%J~BRA5cldssne%m1z z@H0uUIJ}I6(d6k+EN%+Jgr=MODFce=8Zg+tz5#Kcq*0>N%=J+0L8DKR1)Y^i!!9)b z{Sx<0u;iRU35(`_*pyDO zYqIc*M?Pu$uK}>oGbx+k&g195jM^1Si)vIu;ofgeoH%th33MRDm9aSjQFS zFsBpy_JVR*7w`8P^^g_d21trbV<;3{JV~m6vhx@}h3}Eg5??zRN4HN&GdS%8!c{$a zz0WQPk47sB4hX*DBMS|AKzhcarK|=M^T|bZXOk9CU zrRE?@dVJ#~UtVCVo%fd~`C*E*#9lghSl{GZ`%@#-aEiObZ2yEpxIw(i4}35PLaQy5szZ9JuVbtS}Ey< zCMEBJ9rcQ;2z28VH9wN%Y*s@z*LAa2o0*MR9qQD6|7MgA$S0eoBOt3J+otL}BTeIV zrO>h0jWN7wvZUhW<{ol1lxD)1T_`>p7o$Rg!(ot}E&l%O4gY8U^YoV7vHai6m^x9V zn<#2Vt2Cdyw6zFofWsav=5`O$?k7ATw zy{|B#(g9-ter1~DxJ*88CkxrM9ZXiF<#<{>zR{ht8TSS9g-VPJS}Y7!INqGIuEW1^ zFRR>redylqyhELZ3s%q?*cX{dCT2s7#yw3(r4lT;S+{yvs^U^UM~ZkS=?wd`DVEWc z5D#xHiDmv@5~IF`oif5KCcbr7z&%x2^h@j0eh8wpJg(&Dh)*85H9&zf4!vYE=MW8! z!ycA}Uk&|ZCu}a2XsQ26MkF}ySS)n$q7UDjIAYSsNnhZ%1zD@*e3$gt#yyIxk4JEutNiZ6n zo!H@b!c8#O9f?Hgxw5TRXb>4ZmT~nwG(C3=X5HtRkNnKN6T^;>T6WS?u+)0KQH9Wi zo>$0#;pi)Yql{7cZxgt%(Y4 z|~IwPq}R?S>1jciNuUl#VH!Y^Ld?9E-@q}C4E zdI#dSVjms;x&%AEk#l{F#b$XS!_CF3Pt$}=(Qm$&qI#1%GM-qiET|e^i59JhOte9f z>rf>e?d;U(1BK@tl1Y7Pf{SsBi-EupDOp1zo1z}A&NKK$4k%e8IwfY&g19NgeqYw{ z2Zi{{u`!zVuLvcbf$J%g?I>d`GpfA}_ z6=$y;8rrWIt)#P3;*3?MNLn1X4Us|nkA5tFO$;@grN@(t0lVnTg8%M;EMEQmqs$2({`N%>giVD7b$i*z3oUciZD z*r4Y;j6<1Psg3jK%RoQ|ek8f7`bP?^V`}puo!2FiQ!b5ilby5bs{5)@Nt>p4 zx}BK`=Z=`N$lnNWb&qt=YVDgzGo^*R%f{-^T{`k{eept*O8L-P3M90(QJ?i~U?ys? zq@miQwUgbEYPJ^K(MYtiF}8WDaC1&9t=u2*8X27pE_DtUq5N5dD=Sv4!TJ`jVogOw zwbY^v3TJ;(di&>1}ZeX)7- zQJbI?(5WrK1d^sqIob>Z8ke7JKK{rsgp8y9O&Daj0MLzPKZ+gshoDan>UB}4#@MLl zh7EyW-m+gT)KV!-DcI*H%p@|gC{2%ir^`&SD8OdPsxm^u7`*)3I2y5Gu(yevUm7gG ztbCdk1N>t+;|%icb$3BBL~!xHqu}@ zxIOa7<6pU2ko_|ChSW5^<-pUEamyX1&?SW; z?R7Y2)D~UJYaG9w&ES89Eld6n;j zHf23S(%AE0Eae~)u&lS`1Af)$KGaycqB@wGn7yMq(PA^o0{H~Qf4m$|bEv5Hb952BF453;czD145hDJza?okWFSK+kU;>rOB*$b==` z-2t+@tu|1M3=CJ>{U71|t=(n?Qf}xa&7r+|V@6C=F$MD}DOE{JSlOA-*=j1RDbXWk z@&ctU$z3NRMedP_s8e=&ZxPbQ16SFddS8HwrY+6a#wA+Xw25*LCfe9FMC`0eTl+-x zt6WWEHPh&RM^tHQR+N#Za&S%%PFBugUoxAHQ(3xPvwyjpN6rV&RSqV)T>b;5YfeyU z(=GwfV9|E?xLVi!%iPb*ot=}Wr&*IKIOK(mnv}M0#{~AAQ*}DyE?{=Ooe2dT1J&rp zzn}<-(4|`V+96Kf7|c044c6!N9n&ca-qtRi_=S)3LV%dgm|eH&@bTq)Z6s96wFc@) zQk8BkFh75cwrr~BHyc&S7G`*!nR7Xn{(V2Kz9v!d=}nG%@;ZE{dw>&pTFsXBs$q-K&NFQY_0D z=LaN8kY#cRf*SCsJmgrLY`MwFi+O6KI@d|Mbtt-ZN<8tIERAr@?1P0TPfPXV&`2W z2NNMenY(mnKel8thg6L1s^u^%=hxu5(XV6%>KHL>`I>Sz2ibvnys6u_9a61Z3FCLH zEJ;P(-SKNaC{qh7->H&&>xn9xz8)N;X)&ghtJ#(r7O9k=1J$aZrcrzY#mRbyhhe#! zO7NQP4I64|(wjt#aj*Uu^hX_kaIu+4eot=nO=uPq)`rbnhVR02L14twb+b0Eli zx%=*p=Gn(232qH7+d+896c&?%sdF5s&lQuO_rlqz&(d#{EVk~e)PxU%CL!_}9NxKl zh6Neu7{)}c|x4j=x62g|Ek=CiCFGw5ZU z{|Jz9m$mluT5x z(enXuwB^n&(aDL_HjQ^1IhS&9OYr)yn{IeExR9sZ9UOz4DZoM}t{|BTp2H`G2qbT%*E@q}nWh7H*-1M?_>S^GXCbFsIq8)-LeN zsy1nmBb(ZR3-y>>z-JD|cD^~Kdz9-p=P(%=xYTi`;Zl+{D5gv~lk^x?XV#@gPEL_w z?D49)k6$DAH(1khEm&}jm&)uOlVn$^$d?VM5+tS7Yk*PeK#*}IZc<(uH^FSSHUdfq z{!(=mr>M~`g}tn?HWhwN<7U_na(g(`&S5PvVIeIy`&gP3GoMADHQT3+Ci#x+^NGEQ zHY2Gfxoal<-OVX&{DA^x2L1jp@@Wxuc3Ca==)f+rw~r5GxmqOy6G(|B?eZ;Gn_=nOJBnC%^oejaL!u6Dt$|MzaRPiJ;G4>30EZ8{HJ}4W6d`M7^PI)9$ zY$ISKg>;Htim>e2Pw#+CnZAi-#Lg>4OE)((Vm`Q9(_En4RoTq*4TKnDH)qk5x3&A1 z0<7u&TaWm=cBf~al!IbcP>_(`0%erR-#z$f+0m50>iF{cu59v5>84)hnRZnD)Iv|H z9NF^EFV8%#kB%q&6~sK&T)rD14$VbGe^h0<8aBVvc8>jSaRtE%Y4@xyxu0iRR_0k$ z_Jbyk>8Wi%(4kRR<$9%XzjG`#!Ojnzxx_u=N_5&KP;k=1-@S7f-AKo5J6Xg66Y0_Fo(&toy=@HXD&^N z-BCmBj3qi$p5QTC)}8!aKUM9gv6r27sCPz5ZWr#zE}nEILG1tK`8!*vVRnpAeeMXzmKwm+ruJsMl zJx}*=YO{pYyx>5=1dyQusX<|`f%(caTR z{=sA9&Z_GpOZTH}_t?w~Iyj!l)W#+%Bm!Cg!mHcjk2_!)f_=pa@yv46OXoho`Rloc32lylnFF!Zo&qP-8r0KOj|yJWbt1> zpw{#54Ahg+S2MGMzu9b^rR{qCM-ykC2psCTbA-3t%)LGH7H&uG$j!_1*PCoD37gZI zwd1N|Kma>gab+_wF%+bjOs;q4E;KsiITvs8p;_5a=@5U%q~EugY~Z+|i5+xEi2P@$LWkr%7DUu`3nXM5IsneLP*w#zJ%95*kjCHA8im z4W7Bs^QlBO>1X14h9icyG~?Li*wb6bS#iFl%|YH>{(Pi#xAs*C=@jMW3+YoTQSydm$$>y?N?$XjOlB77Y(kM*Dk4$)19na8P{%bULkbz;`scqy!iirIUsIg3|lFjGYTBZTTSo50+%N3capS*yg z9y^&nu7l0jV3l!K7seFIJN#3;tIyw9X3io2LKEq}hTiS4@V1oD^CYmeIX}>se2bG( z3FgGzvB_K7{|NEMGOs}B0s3n-b;jvvvO*YawQZTV-UWM5qCyHi_8r|H_fXf4@ODJaD$UX@3pNv(E@o?i7Xw^*w_({Ht(ARTW<>T=xlEop($par0Vpp@mK_i0Bka=mnc z%HWr5aHT)woqjZ81#q5SzGp-Uol+zCHtO~1A)r-Lk^$Q26BNGh{xk#GQh4~y#I@}v zTfkY30^MWdpSjnXuElr9{pYT>zTpA!O)z#|u+QKPSpinQE^BwJ4+6>1vAH9CW#gfJ z^*POFeJs10e)}uQly_qmy>;?;9le~r*ScDa+IOVy6Ag$DW3$Ns;}H<;moeqc(F30L z)zQ{ISf7hGqVui?zcM0Oob&-CNs=#Xe=CkOY|~Oxp>8a@q}(Ymu+~3*1y>2om$+WF$O{#B(Q%_mIib<5}ZH`4!)8@aR z3tsgjT9zG6a$M?-uC|aFba%kzd3pt!U*unQt4^xHX@ z=#YCqZJ7>>IBe+xYdIvkE=$XyW*zayA834#Uc6s^`Wh?_*!n$lW3DFvY)r=^u>pk^ zZsvJ|E|W?5@93F_q-D>Rk*))(2LZt?{+lQnIjdJX`PWDh+#Eq%->VCjtXPEk$4~2+ zRcLeeFFU)3*8L(3PgL7UuRc8*bnyzBNTN*e#}i!tb{?-Jc+{ae2tnER#FqDX`EAMj zFS(60=y#03{Tp{mg8h`u}z2hcK#SHN}HQ4(q4aD5a}} zmaCbut2v*kv-xKN!N$VM&B(&_8Pr%=`8c@vI63H9Som025(v?G|6c_54rbOCUjN?& zTcVX=p9GTsNpNwnaP=^DHirP(8(W&o8(UhN+LCZFaWnBS@{)XtVCrUX{==1zPw5lt z0>S$0qn-Kx!2FL)K0YgRYfCFv2v%M;6bR@4G{gB{eEx5YrnQ-?)qjxLYEsxw2;TpK z$XnZ+yLvgAL;R0c%#J@Sh3hpG{trI#YM&?wRt{b+?$5}|v4Ki^`Uye#Uwl-pz0Dz5 z#KcmHg#Ihi_+LfpDnJMeYdiDL>NDH_aJ6%=WVSGNw>EY7;llj?Gz>F~83&iKxj73b x8eSXrajA;O_43?(R^$6nA%*;vC%F-RSsntyg9-w|F9-tS`SXZWTnI*KK|Q&ca$W4o`JKI)^Pl!(*Hk6j#vsoK>YXu5EoH#TR!V>O)?sB zUVn-VJD5p!)t=WrD=}^Ll#Bgp0)Yx8X7ClQu(>w@^i&8ztIA^!l5{y*Q1O?s z-E@R8+pac0v~dSDfM+DIHKCu>bbnx9*f_y~2U7B7tC<=xv;#WeoYodj`rONyH?zZ- zYHSF!5gGyGFMXj#%?jLqpVjZVn(!2S6dlmuatE-!bxjUca@6VUSP@xGC99q7%&g_V5j_%@*QK` zb!d^Tw51ONH|S*s?KBI#_MluJHg!srY86laaeb}ks!_=18wlSSN>9(x_tD4F&JA&c z(Pf&!$G{y|PotST+Q5t-qsCwhX}29|CMoKMXMrIwcC(@yau|?^(_`?1AVn30EVTvu zqc&GY9<)H<7;0p64Zn_mCGtJByuCxIHQlHnXnD~&Z~G8DU201ufwjxZR19V6;qt%d z?kFh&g^J+Ko|3^)9|WL0v^KO_#Z+Y z78+xC6h#zfo?5$;PY_U+pp6J3Fbkaej>i*<2|*N-SGcKkT@Xz0-0b zH0b*j>wUWJ>i0tI78m=L9$V-A5|hcN_MfKp+ed+6K>Y1@O5TQy;anKc&vx41%6m`* zLY_JJ)PVHi=zuhyIr318*&>iD4Om-klt{KBcQ2yPV!*gFDGyhjkD?MQ5+@OLh*e)u zG%TrD20n>gNoJEK7`0F+)2dAeGOoE&99Cqp{POxn@$!{DHgRn4aZd4VT%NFisb?KS z{Ge+YC!gm0mFjMmqZqv_LBQ1}%455__P9pb8OYRDu0jx@nyS2(_q~M!9Xk+Zrtc1_ zokWZ)Ro`h?iuN1#@MbI1UNYrAQ&xU`yLf}j;N&jN?L(qCsZt$aF=`3`4bCSBKY{g9 z-}Zo)f(rs_j(TqlO~bHc;sjb2$X0U)mtDlxgE=yhoD!zO$m+Sg?yp3Is6$wK#b}7R zhf$4cjXWF>&uQXLMiQBKhwqF=_UeorghZ%*v>==6bV=K{EW=svdc45mbE;wQ+iRur z6F+|$biE)C7u#kbgU?inEX#7c(uf#~#5wsc38M*jB^XL#cPSX2Q1Q5ob#~VZ?TKz? zeb4^^_OK4W6^I=nT;X-uhJF$yZd!Nz<}D_+>v6pcufg`jkZ$Fddvz&*J)}xQ8DD$W zj=+FLOIe4FMO&d(1J+|KO{Dr-d0{Az$Ayc7+jr+pFiD=M=v@|m_cD+g@! z1Iw#{3^LM%4u|-7`d$x0g(^|<=f(By!>hq{zq2rDe)g6L|9Km5b_?HOLoKNtTUHtR!ZK zWJ+&y2Y+jt7rw_UJ%>mwIUXwLJWmv4`P^Z;SY;Yb=6G{^M}6L6_G&CpqDjR-{V>=i zhkhPjM&^|Sq8li3wT+vw%+@nybNv=LH|ngl(1S3OmW&!e6UFO%3%O^2iK>Oxw@4H8 z;{?ajni|K_3GWY5Ew9Hnscw+a^>nP=2NcTcE$K0um0-EG{O+CUEJ(IgMHGKFLtMTn zgKtY&rXH+PhRFaq;28uslDaM5uuzR z1uS$*mr733V71V!McS|WKz4*p>TS=I+IQ2QnNxE5$p~DETFE&aEg3k}`DWeuI$t$q z#sOlk5x7pS`qaS-&qLDMC5B`f%nHt!i@H{pN$I<>RaaBwp{o&Nlc%>T???-;ppFiW zI7qm1rsNhklXGR&{st!8FZaj3B?Jexh0o6m0S?(}1Xa!_R_j0=IPHM=YxCpNvMj-O zo)wp_)Q%UF_*N!$qGOq&-qfyV)tJs_JQ2$$bkWP}vMObU zDgv{Mo3-|)u|sK=-VmcPhIf?{Cgd4wdD=W?hv!4gFSM$DP!%15jV^qzCqLTxG88O?t!3ua$ga>s61tJmN<M%G??%T=>9 z3cM_u9x}gCC9dEB8HNr*;@duiLeJkt3Y%No=nF;v(xZh8osLn?B77sf^G1q{#STT)iq>JJ-4@13)nc}f3keCJT zzV6Nmn|vIS>G8D1l?c5yHD5sGQe5s~z9qXPt=nV7I2s4I=L{{eAMpB~3SZR_XZ7dF z0n?424FYWmR;2pcFr|uE7r26&SC?$0UaB0axw{caDHja#Py;gCY}+w5)Ug;SVF|pi z;6|l{UYIAw=4)aV01O>@9!fL;DbXw$!WAed1_QVP#1W43dT~HOa_rxfN1eD&+!t{C)yzb-1edD_4vIr1 zz&qNq)iOncb+K>MR!_KIlO!y^Ggs@Hq;=oLa5A5Nq97Zw-1GEy<}i8xr6j{RO8Aps z@_nRbLU}PKGSHA{5Fds+)Ir|`z~0sxN&aBn7lLh;B%39qO^(j-6ii%30)$3L;fyqu zdtM})8G@}>$mLf1%{X4+_L|A8z*0wH-wrYPz&eP=iBCv5)Q~!?R$iHib)2@MK-6IQ zIl+2ba)jRcwd!t(M620EivdC@3f};ynY8qGXf!PYgBnT)&=Q=4=Q1b|a%50lzR-u# zsIqBk;cPXwAs3t?>RTt5A|T;K!#og0ToI-h`)t;>SPlI<#mrSlgV&JPWioPU3DrDr z&z0kftx37QCNqugs%OG--E&rkjb|za>GoE+5c;Vcx5`9w2f8x$K*MR|rrdYDl}m(y zktwG{AcIHlGBB&J|#dqpz-7*s2B_YM)k1U82o7MrgHo?uEy{}e@!2^6v8)%7F z60%f|ca{xyxWeL^e?&I%o*lo(V8@v!r_<7oV8J)%EVw+)dXYJWwZBIU;GZYOK*-B1 zjhfp06KJQ0!=espX)$i+k(7?J#Sy5P$S7wFKgmUdjZ)~AEazrc22L26kW>_7`LQzQ1#e(JvGhq5clQ*n0kQ28KL4k>5`9 zC=$Kcyv&$1W|S#)GMri#k)h=`CttyXqQz8phN|EWy8qqvyuHKFap}tI@B$m%jGcWr zmkuty*RqT>=bcqDkWNtfmu@CYplM(oZn)ScXd)$)*U(J*b-dDToa@11B^!O$OO}H> z7LkGL>W@14gsv6avaab1P^NMWT!gfaBK@@h3a^a3w>li(sCuxG?Dpt|%6=Rn);qiO z*U(iU1T*aAE5y)Uv)eIGvU2cjRma2xlzHu%y>^m=9f3%Z3TZ?_!^M<5a%*Q9EKD_s z!G0@vW8Z)6!0l8bwn~6A6r90RBW^E~Ps7#^*B?#^nE5H5Z~gpHcn3uA*<;3Dyc3cy z7m<-It>oeSrMEFbmaZJm69F3;2}@1#^NV97u9o2By8RD&zS@1~7$*x-TbkE(odMkQ zXuBk;@&%gP`#{vB6zuQ<7*XjUKa-BZ*WkMB%LtN+?^E`@_xeb(vFxfoa7WP6+<`mB zaW)})PwoQKhyAbvoNPFmJ#8U+)+cw*vK#s=Pw+Vhmuu>Oy|y&Vcr4bkA{uikne1En zGi$)t+wRCMax-u(vT$|uU*492LDA%0aZRVWFzfaf>MYvbEFx@Kd^gHx!IY8ApLijb;rUpE8%tY=66lV!yKW z(kzo;@XKuh6%oW3Bc5X0i7~ao9FFdP0T4KV!7c@-s^i;f0~80H8Xv%*W2By+#W8Tt z?#J7(xldk+xi5?G!uRWR0H7hyEX9dtdCZ1hA@om_uTqm9LGj`vN%i&#A(G{oG+*@@ zuCzoHiELJq{erT_<8P!&lVmym8Z%{iVOEHFaVKKA@-PJ&qTeDTJD01!MAo`p33Rlm zrxPeGo-#^PhjPlZurBg+s2R{T?6g1LeuQ6qu-_B&c+IMfx+3)ip{me1>v-?sBFiNm zF(WEh7J+CS$pLNmFL4fZI{=6DKSjn(;^Dt>;ja@7A9p+-Z*t*raOiKI=@TsK{JAy{ zK=0sW6DdEg1Oo{rlvx=|O46vWl@`2bkomw8tOY7qLb51{ewZTY`8`Y>&wGBH0)GBs z1#03%$(Lx>Y%IvehM{`N-_fGY=%`U7Q`r?|X4W_`A$qx*Ma^y*MjJh9_UDXPL z(a5wQEQYr^F2r67hBKKzcLn6}Gi^uwqps~4y^za5qK|v-=Eqgxt-esxIOXr=p&sma zxm+@AP)3mc7elc68cg&ly@aRB!YMG?n)Vf-`D&KBUOV66;osH(ugVyO_R z+16PHq=nE`rWQq#Wbo<_Oqa~+j#%X?vfcHi={umTOg9UBvr?c9!DSvWk(7M6t$@qcu#B36v?9u*noVY z7f?iAGRFK%_d41v z^wacmLvGyC&=k%#26bx&!Y(UvG5rm@)FZM|g1ZijArFc6f>dcs#({x4oD!6+$7Zz7 zd(oJWXCQNU3Wr!?NE+8|PHEL#W)lrb?wAsNCa?Z0^^TZD2fJ-4@rQp`qh$RDys8)5?YG9eqUvp&83 z5;Cylb#Rb{Ymf-(LBYp7#zMmu#z``)`=>21WxuF-I9ehK`jK9=kLD{W8#eSTPoIfv z?q{E0?%*>Uqs+X^t|?-G8R^Bft)dkwg*p|eT*q_tlz0uJ_{_U}555HnXZSt*F5#cf zPW$_^<*LKjm(iNOuBTa|&P!<&1c^|7n|QPAeGKkS0oWvta*mL686Q|?*EGkQ?|tj$ zum?QthO9`dHhQlMWt4@`#)o0AK@d^_&OZQ|E@VlYFIYo$(x8u2bAD>Vp-%^O(QL+w z<4+TGGPBQ%lGcV|Bu}9zFS6uNlG@l}=&mtErwTq;O&XSpWnn;!{>4RXKXwRz$kX38m|%NG;U2^lYJ6^;hH_Pu&7v znnBlJ!T_zShSZexraJM`*Y$)kychyR*7A|&U`$vjB??${Gsyr8F=b2m9IyEj5H>^k zvz#{2#Kbp0T!~eXjOJF^``eBXDyH9l9zQDaYf^#{8}b2` zg5CC_%e9~w27Je^gNBytO-q3*M$fV}Z7h*sL{dV>%l(y<@1xXf>ZBKpza%XnpYf@j zEM~T_;lL_NZxAPD)e+^w{gPBoEt2Dacx!7#SHE6Z2HFJwz4gag*>2xbmsMUGDSEvy&Yj1$nU6#lB%gi?$n7D{Eh7~ zhhnGXJp}`DgWbq`7S7jA2b7gCiRJ#}L|9^qdt`p93Np5^4v)+|*ekW2t{0=Qi1NU& zn}kBSS^q{1$)y8&pn`QtK2F8=<1)`MV&`#u<|s0Ve`tRY$?>=b2)(Uz$yb1^&2u3v zX^k+Wf0oo@*&B8ypa$^7wA?kWJQ54tB|b9AWxwGOFMmLjd&Ai~++}AsZ1SX-#y)vH z9Wng-scb8a7f+@D4IpEcEbdVL+AI@?G?SafjB^pZnpPO+U!Dr%&Ym;iN`epDd22Op z`v&NZ{g~nrej{HA%P`O0c|MtzynGIibo+<>ITO&(6*sDv#7Fpt{o8#nv)T``(GzB? z=!mn3Ktb*)ODN|8)vCY^9a^((%2}JR%A-{RUmxS9mpzu1wI!F3pUSp560v)AmEd49 z_h5L<)$#sR!{tXC{zi7ZzR#UTXPY6bhv#X(dou@PDN8 zycGK0bXPD^R*y68H#HBnfxW@I@R zw7YvUS@V3oQS5b3auwJ$dcNjaDJ$crTr*rI6cL>4q#k@}i>yaeoPVdI!h)!dyrAdjYbUsc25`9tHO&#e0 zHpPZu9?b$n(I`*&eguMSX8lPfNh5jJN!RZ))QD-kJ(}~E{=th zCA7-K&6c>sw1u2UlE^yW_?*t~uX4gmUcw?&p%?tkGPU(uM*D}hjvwo(;Ryu-4;46; zzS$$$FF%h*W#bw`OxU*vQgw{n+|stT^nD&?bN6L+U&;P9O!(Y(!jzO~PmDM7#E_)M z&mE5-Rjh+SNh+_mldl}PkJH3^OQyMd>|Gyiuf0PPJ8cO(o#053mdkDPRCR^@r=w8q z`jE?O(BfD?>2~eG^3lL8M2M3k+DXcFqcOPMEPRPQ62}_!wF}D>8F5dY%S5+pH2Ulk|u$!?)RI2^yM?&;l?T zU1X701s_#YO1i|{dh+zy##bOgh3Cc8E$Rk#@!Y1lm2_}}JswfL6}exsg! zdC#0Z1y2r145QL)V`qHGbPk>-;Bw(rVq&p4JzS7mY-pd^ujtO%|k4!=+`H{?&-d7 z)Ne-Y$VCx7!0Dr#yO5w-RB@$YZK;?`Zl5dcX}&F2;WzUf_h<7)6xmw;mVJ0jM%bb2 z{>U$PApdW~acPzu=2-cJ;@00~G|?&mXpuHgTCl<7oc7yn_~&F)p{%trQdx&2qoCx-x91`nm)k&DY)T z8A!e$g@5NDPgj#WsZYb4vFo4EetF{ey-3Af;hOlksqzV(^u9+3ikGC71vjOl-LNG` zVN`1=dz~y13E3?c#Q}6l5sUNpe4=WlW-E*k#k)7&u@w z%AdsnvLq%8wb7#f7g7~!P)F1zH^I)&RVjY<^Ifqv$!K$EXq5+|We9ZRA&$CDoVZa)WYscb+q&zDt}oNF~1Wc{!vExjE^ zfy@dBQrNCXkv!S_RwR(LLq>=q#d`>iWodkTNB3#dN~*euCvR-ZLr*0qBdsJadl!6z z1z+*rf*aPP=IS{tY-_l7m2(<8+uq8E5;nA!FlU*%`qmW83ih;1USsa%18J8 z^}{Dm0VLFR1a5ofeZFtUu)nVB_ezEe4+Z615ajrBW!?5BY77mbV~0HRi9MtNd8uL@9RLRXR^2>3Vr+ z%%>|V-kg^A&3Yn-JezHGL!!RT7n8C!VjkI+YKx`T$?_^B3nbls&(}UwI!Vfa zBaK%kGd@-alEU?+=*}sNsr*&Vr;!|~-|+5G)2-nDN>^qGoeh2t~NCm=?p z*$emyn>vmV`0B?Efc!AorAd{~+U3UP3gavf_(zkBWZ;8T4#j^}CQXA3qp4ytXw#$2 z;}wdoXgLBqewM46hhQx@hxO7a)08)GSeBU)qA$77(*zdi8Mr}9#FM|E!!OZ2$@xp= z+|#Q5sww6=0s;@SMjL%D^Cgq5Hsi+jY|UP|w|1fE%$!R!e7y*1)JY0E3OzUYznrlq z_3G5M)hl4I|LWuDgHWt6W(=xUDL_;e?3XJF#WwNyL-|{4jW$T$X~w?33Ik}9i-i`7 zlt9z)Ly}rt-(xv+2gZzWXEe+j>NENRL)_UmI$d|!3y5top8h*vH8ckXB#WQyYE4pJ z3QWO0{qBj$qjTLz*b6U6nP)rAfNj38LwPDUuwdGKTA(XW`gO8|oJ3#L%;OxBSfb#t zI~;!!a~6^+P5Xlm#c&?qKu)ISPI`*{0UnE=6TjqhcsQm~{Nqd=#V-=0{ctu*UAbEC%PCenLO8TN zXm65mQpdU0#!aOa{mTw^|Ey!pzUeMx!~&sZjnlMgcKD2wk_bO!q|;rBbRG(ldLO(4 zx=Yk7f0n6D{lm=2GqYAeR00BAUBLB!$7cJBc4#t`LOQlpzQ1u(#RbDb z7i$AXb`%9Bas)k_4?15^7ifqUt5H&z62B~KJr!xLPFjuW0SLX9WoGEt0;^&5`H<~b zzTF3e5t2KeR)AtA5tU=Lw9FSqQfCPbG{cwUxita4m4hf7f_>78!8-?-8*b}{E;U75 zM?7(s;6KWiY+Q3g^WI$R&sBR%%dLzah9W6nfS$WjCQ@IPP zZC(CVXfDx=j(So-7n7vN)be7qs%8Q7Y3JmlFrKMQzRU7qZEn}J}?l`HF-O#|^0 zPyp#d!~y9&?Ibd2XghIcJzHy}9W7`bykfqjdCVoWyBsauaY%?UhV}%J%A56_goE97 zwiV8krM@Iqh$CoJ3|o(oWrQ(umD^VMc}y-lbbYI@WTGaxL`0qE)iw&13qTT?{;HdYqIA^c^UO*aIZ(lI<3er9 zzfb9=zu9UVJH?ZSH5@yykzn)b4ZVn-8MV)RFW04;mGk?G=H^}QxFsroBe>cB$ z_=dc$13Dj~hvcmwg$|7)fc3$b`Ix+>sTTt{!XPI-iayX6e5catwoG zD!Wi`a-bs9{!HVNkSc3~jV|bX@85(r+!Sg|HHT3Ie;PPYoEyn#4Q+eE7()A(jJP>7 z=%FozFP3<)uUvhvNc^JI9RZmJBg$MTNY}soHoLw@RR+xLqcV^DA|kg)qimsKui9%- zBd(k4D|XY$8qkoo!-H#Z)~QcrHFnxaYP4+FbBJ&Fq8aW|L(dr6to_(}Zqp4SNVmHX zY;wHphDH&7MQwWS@=s9AcV0F%C}K$0bzbUV)Gw@>pg!jx&~C$ayG_paI=F+Q(+73) z^DZ0Jmx#9iWlpD|B}GOTa#IgRAqXFCBlUT~8Im1z&)zRjylFUsBSSkzN>%>X=g8sR zfeal8bO5#y$|9rZiUkd^0H7=nId)|cgd>2OU(w@DxG-D1{Clj3D`jZZEw!>bhp(^M zmaOhGc3MdT8WQ0JqadBn zH6%L_Nm4ST`9o0nhYD^<&9f}@NK*|Bj0Xq1Y=miy`=?`CIMj5C$8^O`EHLWrY3jaP zwAOBClIEX-lRn2E|Ix6I4!`&EDEL)N$^TFIG~v=dX7F)-G8#LUi5k1W(=%6&0N1Dm z(EI!v^a62x9K@T(03kj##N`w`Bu0HmqgK0XRuaLr%Yh(k#x%RyJrvj#pg^dC2A?D*h?p?M?3f zR%%$7lkZ4Itta%J4u8_R_9P9HQ$ zdT5DE(Juc?@3U`FXZQZb=AM+~!LU+M#gJJv3?h}$a%Is${4J<&dpqzDNI54^K+8YTpT20IA z3|en5?pl~p_w#C0l_o>#jK)3I98CNUE5d&Nhr?l9Mer}D2u`E1R7&0{U2qOw<@{XP zeuBH%g1x9rb)HvZGALz--nCl~B?ke_Gk1cNz|)dPx|a0SQ5z*XmecYERjSn3K}#gA zqjh}o<}3I|T}^l;g=W+}gzmpyc>SwYr%0hTG`oF+z?TQGxp;tNIUIq!)y&=;!c5KK zKj3pM+`pgyO`xb_Ul!E5TVk%D~cSW|3p)wN^BuTAML}L1g8Auq*O!G^wQn@3hA6JswbSNW3^bF z%`iM~=bmO*)<<+^RMR}lymFVN41%2eUD5puMv-%h>&+NVGXa|5o0hP1miMH?$5z~C zlCj15rwJS}mTwJYhs?`d+=uKv8EXBiC1v-KM^~9CV<4ZPmw@^`)zy3a8I62ZNpi8ddXRXS;2AouSRWzG6o=K_D56)ZKT~8b$ zB2kEWk8E`6$^61Zx=dS$%$pv9Z$^!E5()-^2M7WmgQn|~ut7n8^sBU389^hC>QgqT zhDfEv35$$yhs7ICD{x=5jvhK!5*~5Ja)sD?YA5X6ymD3=8RH*z)YkNm$LsIxl{E;s zo$=3?v6ahYQ)DA%*^yVIIG_aavSEV&Bw8?pWbHcTHT_CqQ}R=!GW{H6sZaBe^VL7H z{A%R|GzKIL#HWtrygA+IBmrX<^ILOP-A65czu3R9(|<|t5i@#mt=|{jq3OxdMmJ&? zvd^+ReZ&=D-ei7N6dtJ5ZnH6y<38Hu2c|>O*HFEM=uBE@UzvFO?-Ywl5YF;efnfR2 z$yUzxkH+!AVfDG*NubEGyNE>=kTc9Po_t`DR^p)?{_(hR6s7qrfyOWeQFGFdno<-(y_S%;n>(?Ez0S{r0)07{N4NU~|+|v`VxkC!{Q- z%5g#qX0GI6f}=XlaFAI6O{n{^J(cr&RY0S}O_E7b`Qw8w@pkEsAcbU}GhP*9#w=nG z+$Sva(skXPe`iG!fc9_c2D^oYvya+m7k$-dD0}sfZ=HF7d8T|U`FC5Jkp#5YA3v&7 z8k++G9%lTNH~Aqa6}hpL*zdknHLb40@+k<}a>ObB7}O-rnx-)itKXhK(vQ(05P@~O zUxofQgw4aoJC>727W_M0r7`h?U2;=~r=Gg7Oa11~lueG2Pryk%(7NM{M?sVwOXWCX zFW*RCV#W-1@HtZs5e$nSYfu*oN)p3gQgSUPuD!1W4&TD|6p;yBIWSjcotak7MdH)c zRz}*WqTv>3=%f{wG^Ktca*NZvzbKkEb9i3Gz%DVZ0oQuJxNvO?*viPWI=}O9=tzyI z$%qz@$?$8}F7d9zDy@w9IY6fiG_wZ%b8(*C&odgMZXInHj**i>4KAJGP%SK$K`7U2 zNZDE$a=ltzf^$K_ZZUiz;D;Hd0I{sAn*ce@D9oqNfnEEP-hW1gpHZONJ(hP8i7SFd-|d=37=K27{<7{`mdVizn~`1Y8crf-UA`L!-tKO;PpQ%VCLkpxnMqPdT=xQ%6-8>#3;dkM- zl+b%$RBS9eAJ-uMBu>|0`|2=pky^R3+7?!T%?nwK|iyhlxvv4teTiW6ZQ{gVA7w zg5hQsHaqLjy{TO^*K;ks@~V&m4qV0GM$0%%R`5QT=X8A?aP~9c*ox>5E++*kO<6pD zQu!;Rc2q-Xdd$#YvkB^xd|A2JbH`YFFm9cp^bnap508uuhA7%xFZ8_(_?N6wXk>so zj1K#+fQTZtXcP1bP5{OyIvEEKZ@)3{TY6U3>ZRK{Y7cbE)02eG<8zf`^@T7yn;s~J z6!8u(HlH&50#SU~A7KO}F&V0=0SHyHJV!`w{ zs2zHO)tdg#F$M<1C>K2m5+WEdP66;*rvUU3HdS2=P04jKMLSw3Uk|V$b%av)k{vZB z#=j<6pp}cz%5x>^>zSpU@l&N|t&U7x!sZbFwB^tM($%&*#5fd*7A#SOqYEsEK{Tzo z#61W-l5`%}4`sVGirF~?s8Qxjm2ic;CFQ4*g19zZ5KSs7> zsHsWSkX#}Kc7*r`^qll3uitiPednv;PBKy)F;3UEFAYt2+aay#ywwTzdrBCaF7*S6 zp}D1K@38hkL6Qp8ij3=ZhL<^c>^EW^24R(gt~!zWFJ=r@lWsu>`w_^@xnozoM+DTx z?By!IILj{DqO3DXQpZ>XIEG_JvJnxHNt4AIK&HkG!=o1ApbmwOb+hDZ-l*tkWmRc)?H2JSmR(;ABi|useRFFVFda{Pr+J5#FPkaQ7{1G(FhsNjN}J^%IUk?NHe0xM{d z<$?~!$eu-i)a;`n#QMM2qpDdhne(5QqNauwCYv`;TiR&SQUCM*^%pR~?AGqYHH2X5 zAjh}|+n}hc%e=GFG`p}ewz!BxUQpmxDa#%K)X_1vvGG@K3E+Y$K>F zd(_`$OulsH%$pqpLo?bQKTjN9mdWsl+04Vyd^(_kjPc0S(TJVuEbn`8DQDYm5?i_p z1c;6nOO3#0Y28a~R2o*6e1b(2mvqKFQD>TM1qNq~aXOcFqk5|Wwotl{NFVW6B$L$S zf!m#du<5>Ixf-EEu#U^w`oG~}md^)tdw)k3oDV9iZC5rjcTaXGieL>9t?WKrq%l>< zHQ8AAew`W;8eDxPASW+awI3qdrKlHSI=hI0VP@(asegpjZUfFy4HJpRq|cr=h{(uOvzZZZGJEimk@Vw}%xIFVAWMQFV=Jqu zr6t@Lf|ktO$M9S|7Z-ng~IAhC65zU@-oIl(YvPHKniiWesPQQPTm|D}rwtyM!$iL_q&J1^fH@}*X zT_#8D?xrW{spF;nY?DhJ3agiT;TTc@Ww9*r2bO>vevx3(j>f>x8^m)YGO!o<#4yS^ zc)0WLxrJ$U#)=AkVsL&An_g+9@=P--GuAcNi{^7G;n*KG20n^(4;-0?z ztB6;&p;K!}UgYQjgI;0FIaMs>Cvv>vw+E!`$~N?-JkzJw(ORrLoFrQ7tzZ47TngGa zAn5)y46BtEU8KV?2=a<4PQ)S1%$iqx&xUbX(3V+%LkRYBkasw(-%hzIJIR*O_YXeS zqi(UPAh8o|e3;mlUTfX29|cjTSU{;|ym5RwtOI^K2rC-pvELKLB2;v-9*JT;VfmC1 z2FG_W%Q#6psKMVK)*P9Y2<-32HGJL=K1`8`_@rC3{#z@@!7=B4_K&CN-eg<8fmOE+ zTSSqxFWXgE+U-$rTgCFzWX* zs`;;$zXm=7JxVD#?fTVHiDQN7K`t>WTI`Lr_ikqlLk&8ZsRct-%8_hI8Nu~&>j4D` zbGZqn1ApiB^U$g@R^dA?3S2*44o9pF-7UUOW=YEBlK)LXt>A*1m%%h-^g-1_`}g*+ zrdXuBHFxxjhW2Ti_)Q501|}^d!@$Z4k(Sci+uJhry)g;4ix$D9Xrwk9C}HrszO{Gz z)V^3zDB#z-06+W?F43QzwnF7xc^@ZJerA6)r*>R~zs@}t8cOEUg?|1-|9)0cC7K5d zgSJ8~y)8Ou-OuU`E~LYh)$ebDs+0O4Z{|sZP;uywCd=6ltEz$b>18pf#v6(sm9gxd zFGL>S29J(Lnk>kWk{!a6=gAHxvUeI5bSP8D>^D=O2n0Qn7GgUT2qa$Dx*o=MZ`_%* zn!8_D2~dP?r<`T`*JGMnpxdBJxs4cu^!u-8AWe0BlLlXN*|r6SfES2@OE?QkIMCqs zkul&w(*WM6>VScga)oSCKxcbi)$ft7SPM0&^~k!Ps~pICrhhTDg^Fq&L<1ZVnnxWh zs5Vh@aC+der8LeL3yz3ezM4K7p0=NnTV*baq3+r(J3nV=pz>;1H=CZ)k zVns4AFjV_~_ymwZ9MW*DhcAi-ROETLrZ$8alnw^ZPAa!PVy-T8<4zD5*Eh*<74Yf9 zlCHl}j({sU05g|EG8#&jh3J_`Gez~>sa&vt*&j#Bc$5JJ)Y>k{A#Uf%aQnQMujx8D zOmC_%QV--)rx^tMF>S;~Zf2Wk!iONC>Ew{kHEOH3ll7R+`RHv=(P}PmD8B{LztsVB z21Q{B?|a$Ze}<<7z~U-u%7STIo#JI3nU!pdZ5+DjdQ!WhoZH8xF|qRB z@i~?Vg>F2e@q0|NuB!K`LdKcgwp2Ra|{E_abp z&CD!w?6SIQ1xXeFZyTEj@ug93$#}h@1QWE3_|4udFOR=#DS=ho3pNIl?`6en{{Ejl*mXWGB)x&yXCgLeC>gU_N~x{a?znNsz# zsmd!$)|KTnoytJm(wc1#=5;%!aP2D94=sufad;{%PlDAs{O zwc8e)1$(aPlzT#UAf*FuVD)u`H^ur~Nt1+kZ!K{Aw^;N=KZD9QS}uny4Ltn~v98fK z6d#O*quLV>H+;0yQCM=ZmiqqN7ImP&4fSqs72A?;{Cf`GIwysAW-vy|fO3rFJQ{xN zo(Hk%L0#1P-NRG2ln=p%qnnh=(hJcJp;-0(U^k8|j+9(B|Je8lGx?aV$*_0$R*t(z zUEyduxJ+dmwCz!P_1leOj)j-u@~2 z+io4wHWPS^P5 zWw)mH%Ec$P5zd8^qc2FtJ^h9{*ZAp_czVcC?p|>=(Xy~Jqq#Fk8g|Tra+2QEqXow| z4CUjYYa)ga-S)1cgZ!$J9LNuE6IC<~%jo zDLZ&}vp@H4zd-+pdut*%%=)o1FnIY{7yslJm%TxHdgt)=+^@NV&QCBX%#Ppz&d~ym zR3qNOl0wfw@87Y4scVqWw6y{*Gy@u(HNZH3@2CzGJH}trnKzAGuDkm_$kTu0 zOLyQtc2a)!K6T2(4CDRuNJfcNJ#8!6R_GH0+3EkoMIS%Ds1oe96M7-ze*P7J(n$j7WTfw8%xCCe z{7E3#SXj9kS-3uT6;@V04lX`U4tf?AJ{FcZ0yN(LQNh~Q$lS#Jf3L75@;CUig5-Z3 z9BoaUT=gA{Apq9;rpEI6rsjs0BwS3~OgxOdB%drf7+E+OS=mUGSh+~doSf|Vn3-K& zU75`PEB%>1OEcLzn68GLeKrVz^IwZ9X3o|Ie0<`zhR)W;|8IFER#pK(rNs<}%m44z zM^gi~)5?uq;3)tA diff --git a/client/src/favicons/apple-icon-180x180.png b/client/src/favicons/apple-icon-180x180.png deleted file mode 100644 index e7d6145be7c3a4fec3498026cd786b14ca50edde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22257 zcmV*CKyAN?P)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L002k;002k;M#*bF002~E zNkl+_j-4> zB>IHDi3r1xKl-CT;+KELf-^PDaqw>{Me8E7>|7PF-FG5&_?s>>#y_1;luCAJ{e=sTKB%d`uN>1 z0HZZpDYVw_8>06KeG?#rz;PVzyZ?SZ{)vwh1OcAsvAnXvv(G(8v(dOAR=P{Vjl|u! zjg8S3tu^gdi|OfU=I0lPq8M!qYHC}nOSCLW|&`GV5M4RwYq|d z+6<43GCn!Qj-9*NwQCpKw{K^BVuE6!U_V<*q?EnS-e}q1OY{kSlhD1`d-v|;BM(2s zSHJ#O)tIN%Tw}SW2xE;90_iw7o(n3Xxirnp*<+{|3?Pt>PrguOU~rhR@kyq(?_|%O zJ=}WR?d;jRhkQPd=XvS=Y5OKP9 z4uxzR4%s;ta&mE$Klt7qG(sQ8(HL#FqoRP;%2~8lh;+Lc&_3q^MC zJ-`DGeuRe}{s?>b?IWMhlgVUo90#rSO}E^A3w;yObpiJ5-oqmge}pf6`O9Q78P;lR zEG{ly^nRrjQ5X`%F>xHH7I&4o*;!_1&#^dvj+Lcz1g$w_vP8kJGgNA_V<_aILot&> zn&FC~m{&NSMhK0>U=$oaH%YzYAVh*zy&X(_W&y@v*cc-hxSosWyFG$x6>iIzFeDD#Y3$=Oq{f*0~S}ArVr5+OQrp^vG>@ZT+F1&1T67 z&?@HG+b?nW^&jxZzyCYz*>`|@KKuapKkyKH_U@%psZcByaUAD{p4&d5-y=xJNgwCu zM-sqVF{KoL_=kVQGtYjHTsDW}`Rtzx`KLd1f~m0%S_p(N2yH-vQlJg!Fg3JTYio=| zBZ-wmm^egAaB8v4>E#j_g;ols!C>7E6-UIe#wd-D(z*-)7!c{V4ZCZM#@>s9TrNkU zAV`vg<8Qyho3FpfpZ>`g*|}>k_uP9wpZ?5ex%-}bZ>W{-6Z$pBqz0koSf!cH5K_9`X#M@Ed^4F)YrEDev$wP za``-YAy6veuy~4##!k;q2D8Hv{J?x!YD#(-3x`0#(R?_u>?oZ zi9C+Xk05@5aD5VHG9l(+!i4)d334iqMaeO(%THB`+ zdW6a)(H;m7=~|Lz^BHoZS%!*P3Z*=SVxD|4Prg_nUo4=FV0pey93@CcqP4;GJo2Ry zXOF&Nt*(UKhi+%rEw_;*5mBc@(CH9%Ia6Av!b8w`@acu?L;eu z5SExm81o{Qr;)~~gz z!QLXyq&G}AG9d)istwMaS|CX@jw^d>JpoARAfy8Z9LK?NT;eFiXr10v_LH;u0;Qo5 zviSo0@4Sb-w||IEyUEJ@9P?*Ru{3*@M!iM@O)l$`^&MQ-+?059pV03C?BXdoFDsZN zNpF$Z{eH*ox0BE3K_=`vbdZC0?L%vo#?Z7i=-o&O-Dtzc?Q}!S0^vxKC}HOGB8^%L z$C2kh9XQ|XF|4Pwd)uKKy3=3;nQV^o&D}zk#+(WIp%*y->^V6qUnmJ1p zX_Ss>wZeWJdaI#lk-Lj5E-vuz5~3UQ zt1i_@Vg(rH&n+Xbl2n&{Tbe2d&`M#nMk%{^^|M(ZbX=s6EYHm% zrvD@NZd>B?+#vI{k7M#XId^=9iS5Je*f(JlDi{QkvnS_SU1=btAPVDmB+^D-`O0si zmmWW#`s+88(RMEof^xY+sZ=`e&u;|!_0ZQ0gVD-#eu={`1fGd}V}W zW@eV@>1pD4oph~snELBtn)N2}>96t8+n2fZ&=`;1wZus94NkuLI<>V9(oNIW z1{_CHU0mbbsYRq*Ux2;En zeOd0?#s>GI-`_}T_g#)_fYFATb4Pjpo4=0Z6}aueFR*vtL9D^LaxL>(txmn!BA?5h z=VC}9SgX}oUS96K-fFeLXgoj5(utRN=p7#Fi9Vs<6>QhX-0WGt`{jSdKJokb8eaPP zVf2sw4;(yr2)Ocsr(64QDUu0cYaqH6Y3)uM>3SrcD)(();O-CYCXOPK&Mft6z-uQ9 zys>zQY-xm{(IT$z;z-HL!W!pJF5KWVvHtJn4_4s1-i>PbgLY4R_w62_s1uYO2WrM#gW$ccE9KaR~?^@IC*XudjeaB`h!3 zc<{E6zx|W9Ae|C%`z<>47H7`JJbUsW9rpl*tRzVkr;pCksI|%De5#AJ8=h(wQX&v& zrMdJ0rR`f+;g4TW^a*{Hh+@Nw&wY*L-%a@DzR~CE=_C4^KNPjR^R1#2N+|}2wr>X8LF@T3m)8i4u!yI#j%A^g0X+Z1CRYJ z3b}V)d`T(EWHXmdY#3v3U5Axwoo{^gxA^QQ1$+1JBW|B24%S$n@9_Mw0ZumWrdTec zb#h+J*l``Cdu^Arx93;QJ+U$5d@-5R->o+Y+#K{R^c7&OrR2@mUg7k!zs5s54%><~ zqd2uxVmbedJpA!rV6c)&>n1Kw)Gpbjl$Q+g8Dnf(Sa>}3pE#U zrCD!nO27MlmX}`mKKI=+$0t5>09UUOhx4@8S{y&4d2#MevV*(vU4zzg-9PPGLr8;m ztiRAZz6+0c{nt7@R+S_q@jEXj4Yo251UgX|bLm?^0Mc<&Lf@Q)VV}@&$=U)TB-3Z- zdFhG&iCc?bVW_OoN>FWNI2!&GAO6g*uye;Y5)E1lw6?k!#%K~{z(|y`6?I9R5XBK- zSgy87bcQh02&|rlNi%yY4k&wv`S?d~BcBb4J2Q0Z9o{|`^VL@m(#jnm8zywx2GW)% zTN9!;{A@Frz3iN^HOyM8v`S8;-7uj9*cD9=}z>@oF&zp^zUz)7Fr)M_iKNBw?$=+)Rhp zjzyTHMmcy6)k;7MqS)REN*m%hElJf7C&H4{7?fJ?)K)r`@#=BQh6uZhP)lNipUJ#C zkr;6$+beGRqVNMx=p@k`ed|?D9{y|cnGj5ZKofQv>@UC0-mya%;p1Rs0PekK2%Muh z;bAb~Iw0L{r?m#@;iwbH=rDpdLVy$?Wtv^9INUKc0hs~&x@Q|?-#R83+j%bs_mt4l zDdJ9xrMVU-&joz!zJULvbQBd?n`aCtl~%VIL9*fJSXnY^Er?_5k|-mHl^{+e-+66- zS5KCZCPXFcJ&a1nc)o{BJH4+61CHz31W+%+af$L(?31qVL*Eowax5>+bLP!2vA_Hx z!$Sp38dsGPvY814+tLDe`zO1~V2lEsb#GN{cmp0XNpQj#8$=T4Z4m=yF%Mn`;}7Au zf;Uej42|E;p<5=A$yuVHPHidR=&6vs+dAC3CtaYjksI$!lI|nlq(8(;uvp9S;?V-d zLV;bo4v@*^t!!Ak#mvbg7ghXS4njx_ppx{dBrZ19*4LIdHU0eoCbT`vQP?D77TGbL zLAc&}yOFiG>x;$on=NB@HoRmuxQHpKlh}%6YMRj9Lr$EIFs98N2NhC^o`u~EG~fsrDko$! zR-10UtkWQjK)UNPUkH&BF+EnZ9*yZHyVqTlE9{`SxzdRrU_wI}CY+mHrq#0Ln(Jkt zVuP~4`NiuSuJ^i_VNZ=fU`zr;=WWLr>qFO?k{3>GV|2$(gs+i7hXZ3Hj15*v!Ul0C z3Al zXrt5Oscz(CJwnv0>R2yF!F605M_!@g2_vd23A6KUZrj_TQoMd-P7fJ?Qb99NRGeN7Na6@Dlf!6wvR_?GtdoS- zp8XDsvuDW`3iy5oKa;`BWN|&8xl_lfS66Txm+HbC<)IOzBN5U`qa?O1E9`VG5=QS! zfn8@9V0n3g6EFUseEi@^+UhR;-5;ML2tuOR5XFix(!`0O6KIq+v^(~D7%5BM*bpoG zo;WtdiJ=w1KlteZ{@!OIYw)zS+)D3TUl4arjl@#JV`w!E<^?eBcOe z`}Y*b-~2Aa$(I-za`=Pqb@-ou^Bhqer|tdbqBGx(Xsjpa#Jby&R!ABgJSWBxs>d(a zF&v-GA%)N0+!5+04cbVgw7*lGHIk(xOgDE>Fmvo3ZXm;K>f_qjH_`zl2-y>1ByHU~ ze}#DY$~Kd_6gkf@GN4G3h%gAqm#sMY%*kW48mnZo*`B8J_I(E#nVd>9h!Jrdq2idJ z-C}WWkq7oI^Qn6SFe^0MnnXbmNgESGlbE_bTBqe!6!AOB8CBx+iVPb-ygX_91&YorA+(}&5>&2zLOorPZc!c4JZM|%u zNqZoZB{rdY3MOGhLNb*h&M~qUhuCSOn!?}}3F-GBf{(6)#^{1mSSa0S{Uw2%W zOfFBNCCwJ#jUp>|0S=f5OadkblVEg$B<8kCh%@~JuRphg%D_LOQqJ8FIfD-rp>5X* zy!qAGrF6D`8@yA ze;x7Xf1Raz&QR}I%dK6B=XR4Cm)VKbrBK>_2_Z-{C=H1gNNtZVQZ@ySYv@GXq)b z)5fL@(Mltve?tcfeIN+kjfpNURr%xJ`#0>6|ACL*39Ue)giEW_&8S>snWHsYWHW+n zR-ui?^$aIxJX-Emax27XS^ISIo1_Ezsln==ch8XUN0H7)38#G zlIAroQR2Klg5rY41aoy~KpR1{AtAah`M7>gF8MPzR#x|e(XnDQ#%Nx7_Rpv^ew!bA zFeFL1qwOHcoEW7RBMKl)omQQZ4BQ{g%pKAN(e$Y^2R(RbCO-- z!Mh@}O@6Fbi5Nhcb&Cy`ISg^}=Ug(?c~wVhzbEQiT(rJe<0fJKKOHTyL;OC6?yr*Z z1#xW1_!1SnG~20*aP6A_BPiqq*^DMhG;f|AW@_(Fh6i1=UQeSZN^tm%WeUkjZrR(h z@mc-u3et316Vlsuit~)3u$H>#id^qRU3YxOb^h4R;sZcv&^jhK^>3JPUP9*}Q5r`Y z&aJqdtmjCQ)~2tF0SZ~j`7v)#XK@F2vwLSAybP1DsjNqEyT~ zRH|QjGXU6FuZ}gfXdBzN58*oNn#ztVIC`u_d;U0g?OVfh#HPtCu-4jOT^TMQbvNL! zzK>V=p}h~dv^;^phVE?4dXv}aI%7){+N7nO%PY%JK7jB_2w@0g$#4Bth3DQXkk3G~ zt$T~8Yub)6NGU1hHJ;Rz3m#!Bpt=$e#|Gb%oH-M)cC>lq<%Exa+y6#p+uuZMpWl0OkUxF8NIq-lf3!L} z)zr9lb~sW{&L`A5c~;^FX{g(2Gz9HN#JSms6Nis;-@Zli8P+GaUL$(x_YL1SM%udZ zh6|%_7s#r!u@n?6Ni9(&NgPvOStbrcR2-*$hv|d?r3iy|nsB*E7xXHzWqoKN1l4Ml zS6+IF58ZtiPJRb3&fdzO{6Uc?Un!%sBA0d02Es`7Bxm3KcI?p0jBf~Hk7MUC5S^Wt}&pinBOGhFOgILGtQam2Z^3*7c$=-R|979MSk3U;3W z-KO5I6vB17Gqxex{#;oI!rw!}TVY7CZCn%#SMpS_VN#(?J|4<8JWr%{1I0^`ZHl0?RuoDo+k(KsJo$s*IA!s$v zi|!fhxoSr)QDSePi=P9RKgdKWf*>G@BZQDRLR{BG%a$W_cOcLApL>pcKF`5hZsFX_ z4FCK8_P=uK#4&Oi50z#Eig^d63}K{koNG;c3zUl4wtY8u-SZH|QiYQz&Y;(x;L&@I zF*gtXE=1}M83eh!;r3fXlu1+Gi9jh(i699Doj}kEB<(;@Z%fu1 zlKR^jYAs2lC8@O}r{)u;=Z=xYk(E3U*4=QVB$IV;qPNfB|?<2y~y!`aP=j7-Ca-|6>1EUm*MFuKmDwXo4$^An{=*?BknzXX( z@ZrO>+imW@|9;w?4!`klf1U3?`z)^Oq0=!60x0Ai;@H+Sd+xg@w5>c#s8j~{%x6E# zp<53zbM7q7xhMJ2+h1k4k`OCtMP=UUump4xK_{{#O%g#82|A&m)v+XPv?YzUpx$z* zw*<{j_cci;l!UP)N+d}-sNQuXo+oex z;G~Z$M@p1V$a_sPu9ZL#faeJu$H51VoC9~Ufm=9g+uzNV&X;X4&IYfrH0RKaO9X0& zxn;$~o=5mQzxWR+m&==SKQ>KhleV#MR^3{sg*EOq?ol^=J3T$k?92>z-gOt*T%O0#xB@0z98d3#)CpmFjRn@!-7)I z{=bleat`u7WPCw30~y!gIpDj3#hT_~@GwDJbtlDvFun0`+8Cy1 zTfFt!QSRHjN~|^%2N)YNw7&T&nAIy!u`ugTAXx;bY=6%9lCvevbE{=yD=@ODMaHHH zeW|cXs+T3-dGF@uB<3=d!$8Yb}Ied3l*5Z@kf@034)=I9ajH6rn`1p@}n*ZzH{kv!_IQ{z9xqajt+_t-RbsZXM z#xF<&fBNkLFT7dd!v{Tvih`VPEJ3qS%tF?Oj3>x=wmj5z)_v&S2;wv?-dg~6|DP@p zm4;$g^3d&BvZWjogBg;@cGNi1E*#r|rV|<>1sIJoE;DO`bPk8O=}^#(m(dpA3BuS# z8*!O)1yQU?v^npFFa|u&Ww{z)Mz4<`&87&gwPtyFnMQ36p;{;%Td|Wc!10IJx#xBY zh0B!*cB{K2wY560KJ)9e=KcyD{x{rq?|(wMl_W`Ks^r+LAczbL%Vnyy+!fau zDpi)cQ?tk=e zQZ8M1Go0U5+&x=i81lyJucMUWjyvyUdipH??l*peHxD1i^BiIY+ea16KvJzsd{^Un zf_zTWY^!%q<~U*Zo<02IfAUYb_0~f?@y)0C`d|JYKl{)T21}A4yb3ZK>s~FcIsDbL zc@A#Na>s7TTGLw6je0WTqJ6l4u$R!gG1wOY(33yv&(-hmk=+)|WI} zb`a%Nc^krRuQE{K@Bh*-@#v$E^5)?;_?`drcR2Ib%Va-puDUo<2pcc{=1W=DYDNCj zPf9W_gt1M{zZ>+@+o=^+3KDHQ(REj-QG*fIM#e!xwcSAogKeP{v}35X9Tw{j)5{J= zW?hsPR>Q+2tP3ige|z;xSkK!Z`>IwNrFCz(kp0qD575}q>VX3X_`m(%|2}u#b=P^a z!`JG5Y{EiYwaUR_lYB|i(vmRHy$Y|4gjuqe^Oz&o+aZuv^oinqf4qSm+7NRW9P&p~eJmvmC!cd_X(yP9Qo)nR_kVY%VZXj`8S+Ti*2n1i-mC2M8dckx1;L7+tz z$1!AOL^UXKrgezeWJr|LyCdw(amiZSq1JJU9f?0I**;>Q5JDK*tqzGw&btwWkmoN7 zd+jS1A9!_jjW7zW=(#ae1_p`asK+5GC9dP}M}Pc>eDldC_~=I;V{&qm%D?~z4<5w# z{hLGRZfCTY$q*~Icf$RgT{MK9uG3^lF6x%(Dh-KVO>dHHe1kzHcF|VMc3+Bs2t%Xy zNb0WQ5#T97D=n8GcGla>dd1S+W`P8w1DmkvQq^(rHdxHAOVE=7!zw9hwO(n} z{ruiQPGd--5UpYy32xTIaXqBt_Iejv?KbsOrt5314tF~ZQmWZPMht;Q~cV`J2cb8MKiR?ih9eT){@lQl19g&-m;27|BwG{iX9^- zdEtA{@WhvY2S+WkYsV0A6tZVLCL=Uq%jz|EkID7y6R3Mk!Z9qjBu_kFWZz_#TX)Ly z$hDeLzp#-ZBI(FigrA*^g}F((mn zJ@l5uia3dpQWA7Rma8j0o@EgIPj_V^G57)I-eeGsQl4uqd%hYQ%M#sk9Jul5Qj2Z1pWt~2Cg40hv z&d2VYCW;(nnh}d5=rr}F3vsRmmpYou-7r#skQWA%Qs2{bwU;4EY+844U=Ss;EU(3M z+N&hmXLhwhDbr%lXpMYE)77czZCgS%C-AfBHY7apLY60<9p&%+XqHmeMj`BW?Sd{! ztRKA4uCT0bA>+olBzQ7mEgq&CPvD?%L_&f?5JM+&h?RpuZYXIsINb_5AdEtyD8X?g zjw5L_nyl4oJzc+6yG0xY#6gR&(?lf^j^lx_dK*$YNXJE~7{~E&JwKfSppeofjym=R zOf*XA^+w%P^{E?~I$sjFE7&8_l2w;%VUR<&eTc^%dyJ2K`Pat!e<0F`sv``p2U*X)o^+N0!$=04Jj5y@2}6oG z%}_}ZMi<9vjfN;NxW2$~V0Ovj+b@>+*qs>$i_mCWBFD<~7Iwx6vR*v{N|M-;`hnoUdMC?JX2fIvDK zgme)iCR-RnNJ-eKBZR>9^XPUBDLq`Th|vj25}}pV;t;^D@q}Fynir4Qr(ZW}v$5}d z!x>7mh<073v_jXHc=L^yIdkSTItt^={zTq`%Qw3_3VZAA`D8J5=UJeKb8Sg;GSIDyw^hd8`gW;I;x z)hOGs%AzN%c=<28c&pdzbb=02*uM{>kRS}f7<3Yo#6c=pZe0e0kK<<2!A347TSPkc zrpe|8Flda{xPA_dChXKOTA@^oN<#K*AEez0_>ubqZrzpOxr%3A&7jSO*!p=ssJZC8 z2|#N_yRpJ8x8A{>ciw4Vze*BqDpTmX9!6v@YM3@ykrme!Xm#_g^v!~`nCbfJ3hy&U zP;X>ub#nL=xqA;ZJLgBNom6jNzMkdTQ==SRsE}xh6stWsFxg!ob**w5LX*OhT&9-V z`n(S9cAHM81L=TF6$hv!wE7rAA{`IuWI$VgdD~D##;tMeoOQQc*F{Lzx*b50gd}m0 z4kd!_ZK#x?T+A?BDIiUQ(E-Cip~=sFGGSt9lrKFaX}0YXMx`xqR&K$h`+LC&69S#Y zEYF`~d3l9msdUxXWK&TN$92$TF1Aj#Sp>($N+oYyP6O|(G?6ID+~O!<q%lM z4DHxwEgq$#%e*=}z+A_pR7y~~8Y? z;rV%_bcmx4p6)O?lE)F6Pu|^N+i=WZKkspR-sRk4cwPD5?V>3t%7uPvdpFWW+VMMvd$dGR2PWSDFg zwr}hHzWZJ~t!h2yyfO2pXtmn}LC0D>rAVT{{v0PZB4I!X2R~CpshBwGki>1mFkLaIagh;zOx<&YIIyyoK+Y^~-_{_~m1f32+YZa{w(s9!Gc|_c7qjiGTNzb}>KhyVo zf-u22nw%d~%0*}m10}Qyl?dQ0odE@v3VeE43oIqh)zkJs) zIh1hAzA}&A?GuCnO1r6Qli?$G8a#Y{<1c;u!Cm;ie_k2yk)ua=@|)k}Z~gSo;JWTR zl6n(_HaJ3HWEQOj4i{h4jT&rQ6%t5{SYH=k=3EJ3{mzRPL5`uFB(z#p)|vszICxH4 z&mm;5yINj?;6ex-$110KPQv!dB?fXe7OR32X9cyo!Ew%id~RGgf*}Y)1}na8=nZ09 z4{dB9b8HKYq+>-*VCBXOlSn;6f{;m8eR9}JXBZ62FiX8+D54xbs}#gpTls}@m8;yUSM z*j@rk^u7x~NSnScqMsI>$yAJ6lZ=Zd_2%DN0)bX^`}Y)8t?t&TGmAMX8Wb&MQgl&LlksD?5Y;a#|+vn&=`_!TWkPh{FgGR%K9j_Lf>{yW?3%zvdg}AKv&K5u#$U&x$=qnwkBR%rFev(tu zEq?IrCur0gIBu55?~i!w{)i-TND_hLXbw%Suydrw-Fp^z=B@3#baI^4b{5akxKj7J zLWF=gk?h$P@aSy|c&bjPV~~y{P7G0$uzO&czx!E-*`)!_%n2M9riLQ!InXBSo8D)+ zj^>U%Z9Z~G8wbHqsZBW_knt4xTte6NH)*`xXo1#(P<7MZT}ta-5@)^TZQZ@GI}U;- zs6~XMZE8FWaWIHzhDNZ4#)c%Dt(L75c^BA}4{a@U-d4?BiqLvPFIo4sE7WhiAJHu| zGgo+rL2}^GJ^bx`53pzdoqYK(zsmHnAY3+$U%quk2x?L#311AfVF`|Ic9fY1omJZ?4b1xk_x>hjzR?aok-TT~KAFFSgK5+Fh;H z4Gx14m-Awv-@X%k`LW|4<}y#G9TOd??F$aaZ^nV!O1xf&(%zg zD2myLM{k|sz|<-)9Utf0hj(&(elT5_Y0CM8ecPJ&qC-nv>|aU=aS-z(AFlJ!yFyBt zh;m+ApL)Z!GRAhA_paN9Cyq$(Slhf|ND@gq^e{%-hKt+)#w}u~pv`uq%s?`O4&TBg zHQP#-7FKBuM%h9#%|cqx6!-SQ^|K5P4q%KeqDqwFPQ&U%UJvQk>OB^>x z6pBk)Xr)=#a5J_N&(B$r!YG6|e82l6#-_BfkKm1quO4iTC1KE_lFN|w9d5t<7Pe1~ zk?m|JsQ)jx9K{$1&ovAb6we;c5XLdL?2Cv4!Dy+?r|&+^tvjkb`}Q`TdTR$~mP!m) z6oa`oItnr7{ES;S)+;=p@<5hRCx$3NYX_BZ$-KcuN0&YYJYUmj`Mi8`gjY@sac;T5 zfvGk>{#cFSj7y>&FioU9%j#;8I4LqvxP_$g157&Ku^Zy-8f~Lm^tzLcjqhrav)O0T zkffBXt*!Cmi!XBj0}tSN-aB5AP5ID52pm685?tzJtZTR#V<(gOIa|17jJ4EKZm6Ap zAEFnB=JGCw(FQ3){^Otg0r}^%{Pf@YF)Eco+MN<@^$BwRxAEd5JsE+~LB&V!>F^(( zEHSg}^0E6nkP3_M8m%!g*yP@Qi#&aJ8_Vs%bYUh_*Jr(bNqRnBu83PKBE1YrtP!ex zNsW+RjC@05gAL7Tf=Ke+H^=$f3p+SAH%OGYY#)o+wn(bTz>MSEru(aBoTO0 zb8y=VJ4b6Y+8J_%3{Gx@eBPiFTR`r3F4FfAPIpY505^+>T`*QUSfu+-PYhkBu7>sH z+p)*Fl_D>m80Yx>FqHwpPu;T0&XGDhhSwM!h#<-l=o~>PQ5vEM+HIFgX_btb#xL08 zQOXd7w!hJ&u7`E89M0A%3>Vsr6dDB1INC^b9HF$P*=Te3y?3&6=dO#U(OwRlayhI{ zupRGZBbe)QElFZ}7FtU1{0kO>sSlU!xghUPQm-eD1c;te;ze*A+nxUW557mzc!hjp zKcBj5249~>I09odabl}Nqge3JT>%GoN4$C@!#7{dao;T=yC-AYb*==SqZlc-!L-qF z2I-eE`7*{x!qA{YdOe2*L)MpgB9oF{5+@KViPCn)p%D&_BS5$)lcB8&$U=sP?@stk z?hHAFt{P4791Qclx}T;5#1jc{m+e8J#I>njIAKomyr>Uvze%aQh@d6^usO4a?0 zZBSD&sMw?{S3xFsWw99PK&}9tCM55ZLZbiDUibD%wm5&65M8o%9&vE$vHuoQB z(+C9Z$XYjiL(sPJyne>UjZuP9PBT!{RBMv&y^&${CWa#hO3HTFIN0W8oj}q76@amG79*3T9hWSLo03-Bki@39 z((kz~7!u_WCO$>KeZd*(RmrE?ANGXA+NB=2JU4v@&!5@P;K)wyoXlB`5Gh$&s;Sxs%&l7klu@eP@WzDA^=L5&v!6DK)T46S|#FC(+ND_m= zio#2|ZehqWP3NHQZ~Ag%WvqTyGpp8AYT-8TIRe3<&}0o zZVUzKbyD0Eq=h6*Xifm#0*9wqbf#67=HlQu@!7l2tvo8JBXx%V?vBE z1d&T48lV{zX|^E>6_NfAz- zJwQA3&`4aN(K=?w)G)(C1NPXJ;^^_yH0muL|K#J`b=O_*jzgQeo4d@UYo_wSiu_ec$}og%}97OvE&G{F&vhByMpvE+7K!Ei}a${LQI z^_W|6m>N$wustU0*(e2oi0hyuj8_J&a8!UW5rTy74YXJ!8K#%AtTwDT`rwda$DW8>PN20Wj$?)f z2idcG2cGAmjpod`IZmFO=D`OZ;_v*z-#xD&>uRtGA3ANdax-Z1J<>Vu`lQ`!C5cQI zie5&bVoU1o=gG7a#&y?qJ-U1q0Iq;cS|F3yg=UiWHf~a>^^)i+fa-U+X`Bs77b$IF zPb>6!_QVd}n3-T|a1CRil#BW3fob-Pu2Igmah)_JZPr7fLKsw5P$(Jjkr58= z-^Dy?Y*~x6W3+L9W`;O2EvbiPMur4V+F%>Uahf=?9X3(WVE3NAJn-PdjE#@cY_>Q%GtcSibA*xA z2`N{~?^fa4dN7u2}z8whWR|O|#3}+UythNi(T2=|5 zP;h9sngl^a97lMbM=qCRWNd=nd-gN6V<%%{qi7AMr)QX(TV$oWMjR*P@_Cx|2K7cG z-S*Y>5_WNIgf<#w;Q8-;6*c`oaNEHJYE6f^6-gmy7%FLU8G~>PMy-?ky$Z*5FNo`k zv>V+nxRQ9YpDfO^(3eer1HRXFJ8U+t)9H{TF|O;T!aeJM?@EK~#26!(Ua4?qWq@an z?80>vSuf$?eKXv@=PU!c4jC^&ItI@doLcb6x|&bk(Wv0k8#%yA`_0^6aA)?Ky=T_5-qrSg_nP%S>p|z3Gn7qZW*F+T#2!PjR&NyM zn;`8dO~bZ38_B>s&#W=hCHInwlfONO%b;>4UA6_T_~gl7YHAMFm(f}1jJePIV^seA z@t$S+#l~6IZe>a}laC_U<6%mwZ@k++Ujrf0j~uLC1~P}QJq<#3RdN1=*!NLKadz2_l$ zghPWI1Y;?k3fZ952J6V$+=(FR0_sBamx(D5|GYCumAw1Rm&W{d;Vq?Si!rkzwF*yS zGtCBF&aiWO)%JK}tXnDUnwXh)Y`LzGDDsC6d?o>*J5T7cvxg z%E=Q4XAvqhqFZB`9tUjSV6gQF?Yn=8exSwVFU*&-0>O6&c0+Wck4DJS%G`f^!K zkb&lXm_&y4`}KPYf_#|~oeWZ=c20;?jPCqwJqDDJkdXL>I z;sHQ{Qpw+!&XI0$pKxes{8>Nm^*xXzR!6W2W8!!*3EwC+Ei^3f`}C=zwJUAonvrtH zKYlr$tMhfn9!+5e+xC>ZLiocl;^QKVIyU4j{W*J}`>c8tv~H>nE#4cCE*AP{R!S-{ zi<9}fs$teJnGIcTgnMMa!a*O>pWDKHa&_L3b~7Z%{qcK|TT#(3+ND&BAZnlAir1D6 zl}YN)h%UU#ymMfNL1ooGV;ocY@SG{*)lHm-*J5AOm;T*^jk!k8Ha>CDjMc(>igz_P zQcXt2w%>71k&T`Chj!&z*6+>q{bApwX1>#UJm+MFQ+KOVDqGAQM^GzLXX$}C!|(mg z^VjVg!NKyr%jD({Ge&fHQWzN+8h59E@!ZCYPK_5R!%l_?36$!-QE}DH&#&yo z3Oa*jm)qM>{}dCp8)o-p`m|mZrn}XDK5n&yrgZhg1P#pvQ=mVDBC6OF6K^xAcdev< z$|#niUDB7CFk1G)|8@ZVU@MorLL28iXeHM1$2WdObO@{#E2xCoZLyBh{< z)c^C>ytR82*v9W0PFwVyPCJOVim$7+ezmGCT9h}{xy-Ry&%^7tS|EK4o#&-#a#HAv zeDqr1_f1%^d_m%iTaWq&X4_rCYdX{eakY{+P$)Nz?6iVK#Mo9yh^0b4jbOVb6|q{h z=64u>lv0-YRUaX8dD*gdiuSFdOOt7{rdU1y@(0tqWg;~~c3zj0;F6r*x{qp}S`ZY1 zUASb~F(dfGH{NC{tYL6jQ?tkE)Y*u^eD|}BrBCxvqu(Ep&N%G6h?FE_8e`*a64IR9hXXp|H7)%w6-)1^61PhZT%?z)@$!gK3 z;ay4Y&XYUOqes>}mkr|#G}cqgE)=TXY4PeXGCxWP)2Rz!Z^D(Rq4ub;fHc{#&e0pYr4Z<&&{7s_0ep9N2$4W#9hR=ue8D zson)62OI)I9!H}eNtP`3KJq4TV5CN$rRTQ|rRk*1g#PB|x{XvZaa6sp|3KgVZa7UM zc|o!^MHh-w*=S$CME^NL)){~e0wpLWS$Pm% zBbL>>VV2+l&?YF1QS!{-Od08s!5;G-y^i7fD-@dbz4ov&EI-4x`9k@$Z@y+JtJYi{ zCELbjR3gDU%^4n_=#mcXZds_r9ZavbPUGJfB}M5fk9$M?=)VN2O_h7csQYa8R@$-4 znW;WAV+exvY}Ii`#?k-Q01aA{_ZwQ?QZDgOLExytRGf3R@AHf<2yySGZAH)P`*1B*5?!`0NH@i8W4qGj&$_M2Y(Mo)W2uXmQ#htq^w zPv%fk7n=pX>oqxCDm1k^XK88z;$OLb!MhzY`dV02ESnW+-yfFLSvDDOd_;{_O8n;f z+bcOsUWg)j+eUiIXO3ceCmHMKq#T4TeFB7{T`Ins=FfzZzac@h`HB`C@Q00JSaaPM=i zlyQ#0{wp-#9JTMS-;*z)6?aqzZ% zRACYiKtJqf@LekY=1}80aQEcr{ODi;*xB?=z{%+K3$oX8ny6+i-l7e=tWFSt@M6F5nul!6Zq4qi68r8ArYI{o06kaSs^Ao$&Ej! z=2NpW))r=6uet@Uq*=UBR5V~OBagtDqpThP$Sj**4?+{TNk?Di(;_j$OR_p4)3j~&OPakSU z*gt>R?2Lm_n~?y~ZP~Lzmqrpx$bP&UHqywE8A;o!$&~a+UQ4p&StA1$bHkrUs%mQ$ zY9?(E7O?@>IKl%Q4%d2pfoFc|9x1uknlO4D)#3aae{#)!ptJyy^QiI<$_0&?7?ui& z{U(cgZKsXX)D;$hXd7Ah5-mgq>j?hjUT7`tl4w$|ke7@kuB&Z-H=E2k)XespSx+@x z^;N>LTZNcL;cU~3pKn(?)5KHyY-fb-n+X^1%ON>9&TUlYBn3w=`i~vr-NcYvvVvU>?U>Xue;OE_= zgjPCo5_^bC`?=q#fC_TP zM$6O8Q!T^4#U1)n#PsV z9e@p(YQRAw%x=~&sS=~;F3@@~iR>^x9 zhPj7qvqc5=JdZsPmZuw;$z{(Gfn~$J7p>iusvX(8-6*P>vCp+YZ)$MC%#Hy;nuLW8 zYtPN@b04^TSim7k!{ne3ck4#T?s6-cmn;M0HtH>}K&I76uWksS0Kj{A(+4b}$8$5% z`ptX>-mcE4W&F-);gXy2^&Ba2U6D=Q@>n==Hi`jMjT>mt^h|Umy#yD$dOM+n;4nhp z(Z#H#Z7uYG{ZGVZM4_$z@}Nc5c*EleuPp3%-tz_m2Nv zaHtk(&#akm6;}`aR#H>D=w`>C_pK|4E^9@ehI1WCH>Icp@(bEHhZWitiNfVAw)m^Vaz)5OGfo!W1!@@*5 zSb6Q859ug#HKv}e*VOt~Vh{_QXd^ktknwNSWXW2`$t!@W zm!bG2XZ3+F-2oFvUkwEyc)&>d92C)_Y6U{$3~{TjaOaTK4bHmZfT7~2geAc`O#Cqj z7Xyl-B+hGT9J2?Lea_CZKKXIF$@^51-#c2Cpx!^E&Z8KJ+m^=TRYS(CGSGzK|&HraOh*yt+ReLcZS%}7l88DEB{0i|D%qz&y;=)16u>>z(!^);9AMaJ?8=~9oA`ahZSE^1DLc4 zcY9{VW}wX4{3?;LoCoJzW#t?&@zq~H8}`=63J4D-Llm*k}L21D36vBoNC(U4;eN-mgu$6Z4g2O@d%>l1qp8uC!9lm_d{q-Q%d-Z`+mn zS%75X@L9cdWK@*%>iWR3bKT~>3#M^tjB0{C;wb#8=O6Vui&qZ|@cQV?r!xaSF*12# z;q4t)J+J-i)L2c({Nzrn3dg|M{|}G*1d>mIG`&<=D~o{eC>K`I5Nl(JwUw}Tu?22K zf)J<}A4C+m^q^1)VNnSY;U^G?1OyVxOe6lk3Sa-B-#d+_5W$gXTcG;_ z7zZrc(M|wv>5jB^bZ`~;pNSEG*a(XPUnE3CP}E99L{v;n*j89j*h&lvwSe$V<712qt-C~7E_%UJ~d7gxa?3;+NC diff --git a/client/src/favicons/apple-icon-57x57.png b/client/src/favicons/apple-icon-57x57.png deleted file mode 100644 index 9ccf8c34f1cfe1352e3ff51980c9cb47b3b5dd41..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4195 zcmZ{n2Q-`Q+rU#*qgIL%t3=IO2@w%W#io=9uh4-=NNs}Jt0;}sC~B+S(iTN)q*iOz z9<5!iRch3zRj)67zwey?d;aHq=XtK@I`?(`uJN4b-1l>?I5Sgyw)6bw0RRA-p@9yX zrd9t469er@21P~F6upy{i537*^@!!S{W;qDj1O8L1$fyn_?@;8!5N@U0DwRV03iH6 z0B}Szg|7erz7POl)eZnaJ^=uDJ+m9k)oBg}2V;F5!0DeWpIVwivoL!aV0~!X;2+WJ zcF~~qF>a`%g>jx;&$J~Ad@>ko*o@88a8Xjw7*qHpQJLb7&Wqa(rcmL*b*iOhC9~y*X^?$ptObu7#te$YKb{e?UliHKR zf|cbte3SS4eiS3e>=v~n9GzLW`R!Q4==%W4Ah!w z^w0#osJc7i>^&G`CGMqxt=4V{V;PglJyEPe@4*pso%=CoR^4=GSC>>>2=4wAyL9nF z#;ed&e|8~riMML~JRwHSK?Gx80 z)7Re~+I|cmPLnc|YIP}MMqExn;3DruBGUoeg zzy8|MI^3N50{xlW675?@UUhTnZDnvahHl4OC6pYTSKa4l8sUj_U@_C-*4{n|u4_C+Y^j`?HjU!03AIFcXZL>A;q0vNQ*d zb_v6&}IP1{p*PEwYqR6OGaS1ARmm+bw5Z?Zsu9K49 zmE7Xn&-DTL0Vsp8H8A%mW%@1Q&}S9#bgk&OU^cAfYlg}Si@%bCZdaWCiV9qB^Xv>N z#v}as)_c82u@aJoi#xFR9re2U4z8*5<;n~=db@-46RzyCt0v{Q3mU2;p$$Q^06J;8 zqMA?fBW@8D>Acp+6JbFaS<>_aHgi`dl(xpyk_(5<=p-M?1*C9c=y|SWo_vbwnJ)KC zKNd2O%yIuZBRpbru*?#%Hy?zE6I&l9j>e-@iH?}fn0>fb|BdF}q5avVSj_|?W1w7% zQM&~PbM6EWmmaaCUzfH1T!$VvwliD-E33*~?k6df;OKZw=`jx`t=~f0(o^YD`V`udC13C)+@bm7Sy#H9Y8S^yV7H`+8y$))h8Z2FnpzkUOF+^_$Jl` zJX0pkHc5)KuT0!N0;zoH)+=n?HcH7msea^7Q40_IE35 z!aPMg?k^#c20f-vYg>|&$!zZE#GXi;R!{Qp4J9h;vJl0zQ&7VuAM4^nnw;;-5bdZS z!N&v77qf5w7Pie}ueMaE3_ciGf##X1*j6>UAvS>K>md~@h-IU>55M4-vo%nQTixBN ze$591!N)2rH3jPWC4vs(i8EDeYXhh3x#`7KZ___Mk+7mG{_;%;3tza(5U8fr8m>5# z#>H|a!nniO?8=egq1aM8-$Sm~XQh-r8+sv6Ke5xT)-q73)F#MpfEFcBekndwxUZ#TjAAW+ zeDFd-PgexlcmW5q2MyjGjVl03CW+<^?0kIPc+j8sx2pRj74Aq?ys)~O36~>caR29`W_TL9)Eqf5@(UXQ9?gPSpLO~()E}FgzZNO{~V;mzRG!t zngq>@(tl=tP*~0@I8qET&UxkuUx@x z3^F5LOUYJS6X0lT--$1j^#ZdDJD0gfhf5*CKU>}h%pTo~JUwz0O3}WUJE0hD4xQK) z>DK8olP6SY7B%bdq|d!H^H43iWjNedh>Ck)ykeJ&AX(=L;3mF4Hc1$h9ABz&P3qGNju|i5(TO+EDwzpasp;gvzpfeec6e8R z(eAm}wNc?Xk@!n2!ozIF{Y!m_VTq-j#kBx+uIqb`F}&X8`|+qW+qKvN0vfihY$Kq)yj-3#}=Mak-yj9_*Nfede|y|!>CRu?=Ii{)fNPeGI z!vW=@960KY0a8ArrmdI1sY1^P)U9{_3}O=UMA^VzO2zi$#biPCB)gZ7b*HphSrdK^ zc4!pky!T6XtfmI<&FkM=7}8fzzk*9n84;X`H%A_Hm)Cb zFrg{n42X3a)`czoY^^PU4Z~EXERI6mu<`MhZ#^C%!c9JtIr#MgT@a!u-5A8i0-5^@ zV`M!#ve3yVTZ)YSBw$c-Y#2l>nuakwoS!#`SIo84txxd@2~i!g8|j8Y+P?VA$?4k_ ztM2G|d&RgbXaLHAl|D&i1ErSMn*2qg?_8_`9otk4WaVQ~LJO)h#?{80STFnLsH=qS z#69D_>z$fYZp;a*#X~HmKf&U>BqYv!x+WHwOist!*(Fw0LE$Fu4l@UcXP9__@9|ar zAZO)rSlaAU>cJKFAYmd@yN#k{0LhsUx1!SoO0n6C8I(2zp_U`tZG0pDa>3TDW>%Cl zJH*ycN*S?q1o2ejuZb}b%gkr5rhMDo2JShB&(e+yBky_*2^BZOJ?95(TwDt~hd1_2 z#(lvGR@}Oy#v?U6emJ97$&1=(tJkk{3M_)j5pP*m89Bj7afxsIuDy1)W-kphl@roe zt^KMYI#m;$3p%;GUGmdOb8SB*5TOn+sc7bl`s9QJhbi{`xiHO)>q{|>rvt3@S6;Ba zI8v-_JIzlE(`yUk8pv(0gVEK)JI`zF*FVb_@wZ4v*p4V{@X->#sn3 zLhWlp?;L_}-Wpy!w~&UqT>)WzCMR5Id7$dIXQ}9LKK6Xwxsu~9=h{Wk*-$AaRKz9= zT9oikLvQt* zhdbs9^XfA?h>mQst{NV-G99}4IZBGE(-Hi@Wh@cxw|T4GTf7guck5E{hDX=Et8du0 zO0-@YxkSy$T43)9+zL+6ana1Z%Ax1={4kcR`S;}`#twIxFD9`~*0i6Kl!WPzdtx1mdBs>!5ji)JqA_S@;2Z7UW3>1ol!I8=^83+Uk zfg}oY{+UPr6X53INF)UO{{iz_&;QJH~n5o;E7{7xPa|B+?mAbaEyEpsI=-0PjDY@%}5%|1p0N9ZAlA zkdX>76Aj_}7h*zm!;=C$@qmB2Qt)(l(yX>J{jWSG7#anD!c^fZG=akAfYLu`2*?Nl(7uF)M~8 zKq&LxbG%+WGiP%-8|Q#e#lFIOhI2GCztwXaG~qRvbL^OZU6xjrxaq0%DQL#qgg>TK zawKayD79pr|D)a7rvmRW|H~`l!Yx#SJdro9lfZh?Mh478d>kFUAOf@wJ}QK4^DNq7 zvD;Z;4hb;Vi>w;gMc~qP{*aU($-Ljhwa&SUPEH1E&rNuCFP`~T>b+~xeuv9^x++yU ztweB2bc6Pf|IMjZ?pGfi#E8e^ckoLU6_Q`W)|m_*homOo(){@INpAejPs_SDhi2oM zfa6%3UW$=oZuRr1cQ(jTR!CM{JAElSeP|^omoWD37@rc%fDfOWyI5JIxNIRalH}s& z|1nQgM@SY1onZmZ$avRX z*U~buq2MfGS()GE839U2dGjIXnBvFHG@mnu^iQq%p{MNaSbo9&EHe557bXqqp_P5Q zq+fO+_G(GrzxV)m5LQU*cOUzAu4pPP!j-|Zf9 zXj6B($3}HjCLA}P_QVMp6%?3{ePX3#)<*PkbXN;SI|?ggZ8{K??6BRNkcUBgrgts^ z)2?^vhc1Mw*Tzr$)xA?^qTO-1xW(6W=7*!J{utx=#MTlQz9M z>CJ8pPX2ItE)wiV*I4U8H&!cn!M(G1OIUZieXkVolIr!y<8D8hH)ZVFi#pOz&2E&@ zQN^V&Ec*f8&LC_;P9LjyInii^TX8MVG7WG$EFJJ;!4^#wkOPtX*G6n_2MaEo;hP%9 z^#M4-7s?j&`bac&Nu0Lcdaw-?pEkVDvb`^QWX!#_&;G?Jb|vXL2r2Bo-1*gSsb5;W z)#s8k?8-`)={@oZk3e>6$QoJl`;7SdhWt(@Z@WWwDk_MD-MBu^>np07;C-8F=%h|a zS{OO4hs5$Lr#j9=1jB#OMsJ|`PXB&*V}VYJVJ{$VcsQ^HTZH!yx3sJoS2?#_VZqYD zw`5=PkheAUc~M9;rf)BZdz~Xzi0mvaKdYa8hFEi~w%?|XnvB$j_NCDvf3rk1q-OOQ zi@}{5BnCy(N99%2DYeIca^LyVxxu^mUd4^hV&gg8&`qm1=m0FcGo7PZ%-!j}`d+WV56emF ziIwKjm*$fLjSQy1%#A7Mjk}PI{uxVH*_MVZMu5W*1Bm)ewRntCw6@U*OY(XDY~c+y zVv){bN8Pi03gv})8g_Zay%-4WFTpEwCo#pO4xM8tDPIwPNUZ$a%w>VJr>St9M2MKD z8N&0haW}1+@Y$J)*QaDno7nrY%#&&{s|E>d*V+qpnvwki)IvIy7a}7@Gn@+-0#OV4 z?)0sMs-0wv2v-^Nya{2Z{aG z(ZO{w=hum$apvw67-yGe@+3Zuo-WO!yTs3OnQdmnlj}z;*Vjdl)6>;XSIRYYHZp4! z&UT4nZtp}N0@+(Vq>Lu#3?=9W4tpPRx?V%qyLLoz7$+5M?M@vi4ayn42*4>cvRuoU zJSn_eKD9cIKi=)1Ak?}hE;nQ6L16RbE9TQRt>tFeM&XAE{beW>mZAU@m8F`(m9Lv* zH1qQxS7~)0iPA~K-4n)h)l01ycY$ZkqdUZ}JKnybnV0Kc?}>9_+SJj}*<4fLs=dmR^atHqzqc&+&yrukv1`m{IEyxO9>7b!I} zWeXeQ+fBP2w`OJN6?-{bZffkqi@ZhSl;+YT{s%()(&rC0kqP< z*tkEs>U?xnFOe^vuH32im0K7IR=oEzr#^_`pWB>>C)Gl2(I1G&q{eA4V8;2gjJ_PE zvXDpt5jyo3-Qsi|)VCBAI6w`Jqp59l+rZZMhEVl8d}n2&UeC&J>HC#<$WQj6JLxjc*_>s=$ zl?}%8%@#{E)l4dzH(Al;y@DX4`!%lnT*gu;&JD&{#m}qKMd^2Txa|T(m*QTsW_-Vp zk&yv+cwF(2le+|U+k1cZh{~~Cv@*%k+cO2)stgMksSlQHNUMhhMed9l-@}NjhTM%? zyj+6!-aeS6)oD_nRpSGx@;2Z>D|fYKdYaiQq6hqJN}HJGb;bpMNu3ph$1<3BzIqoQ z(G#)xYOlR}xYdQc_i!!Okk*{S>yTr;-$^ufGG<~Uc24tviRO3=KB%bKc`S5%CoAx1 zg)P?40&XSmKEF&`^fLtqbxda-I3z|Y(X7=lm~OFd<>FlY4qErrg=$KCGC?4#tVFgn zzmAKwZluV#ez9;=6U9)*ZSmp-@aq%f30upK=UhUO-5v*{9v6yTr<+rKtjtN#0+HWB z3bcr;R70hSP3IGS4EFKT@t8BP;Du_UD7~Vbo>F$VFPmje#0X2jIZqR8^BJO}C{H6s zDesnpnmdCGKzLF@G_^P7&Trm~jFe%+&K9ReR;kaM56C_I7|q=B4aO>(x!HlAWE+&f zr{d^Y`%`8O-^fPDlCuc)`cjbL9rw9#Tv3zb?zx5h33Qn)PemaM2eMCo=R9o|LWf1N zd*t<=Xtoysk6iPDJc_@uamSngJmafH>p;chUfMouz^3@gX_%)9-k|q79O$;ko0dYX zSPBC$jPdVB0!n(${W5YmUB-*deegrm4~7iuVPXU^hvNIw0kFK5qTYBGo(Gi8Eh~Lb z$wF~rdLPEXb$I^k41A8Lir&LQd_rO(fw$FEjybDKXGXaXkp_R_wmH31Mp@(Q5b6H# znzKg2DPdD5m#h?&^BazsptW9YN4cYN?$dtYZ37Km)`JT+F86@!;BFhJYn*6pY58uKF!|l z#@`q9W2lx-^FU>wBzWxMjcqEn0#+406Y+Udw31QF}S0@ zop?hlO|}&mOB~z%`yILY`HoJnvLDPH@!X7Ra+D7>0d}!8=QK+=iMgbfs zN)UCk5}r<8;jXUVn+_RRDnh}z5Hn<{f~uI97#AO(lf8Z9L@Kk)`Ddv|dqG!woM{?Yde-7%u_((j<_<;bY$Ei&aO8R=@Q zBSA@c4qP~lGCO~`owVPZuTzn$lUiaWlV;fJwxHDa@uRK2fdMBsw^;TFfn`aS%p+6c zFPDt5p%cU*sxjIrYM%=++L&<6vN(k;|GHjA;H{AGn7CP_mS*#dGJf4O^HfaMgg(=EB z(i4+Y*hX4g2HY@-SeI$W;JjqTzIuU7NQQJ|C(n0iUi-}5irojVj`*Dd9O(uF{oNhE zf_Gy$$xYX%B#L_Ew8)#qhxWjd;#-8xIWsuTgtbH&C5)mu=BWc4VnOCjGH%zh%LL^) zc(uB}qq%D_LB-un2{l^msnXDsA__`Y#$YkFwSrO7gAH#84oz#e%~hlDuv`hCZap{ zlh=V-FknbtmGxj+Ol2mDIMMa3`=Tp8<88!I0pKeWc>qCadpdj9vM6TFpJqR-`$Xfh zSni!K9JBsx0hN7-Z~jkOhj?qAhisC+pNUvB!X1y5`L}L;}!MMv+{97`JkZ=I5f!tz#w^LS&$OxHJ6u%LX@D2 z5NQwy3Ie6@vZ(&A0<4E4#wqasFZc#~^ORJe|EGhuhm(Wo;3u_$M>G0GX^;3}X5 zR0gWZstS-=LS#XTvhrX7Q+Xu;7at!_sGOX?zdsQ3hb9?`272I}zr<{l1Oc3X6wO_H zvG!1?u7`s!7VYi>h2A5f-T?XXs}8yU!~CZw6zYN|9l(45@~U7)0PfFZH~*#c-;5>3 z(Z}TvGF2r=O+vW-g&1S7XrDk&G~ho|$$7dvYc*Jy{2v`-a}ouRho~wklT046$RxQ% zLKy$0a~~6g27t7+GhS%^Nm=|W^}q}caKgBuN!yphy8F0!ILkSq{4fq4?%s0$^JC;d zju0gj8VyneE7>b5Dk&>N&=4@hURhoq<)o|#f&fVsK+=2{bD%^d<>{RB2L!AyjFhHv##9prEusq!$5c0Sq7lp@Rz2k&ez2hh~qyyHCjYR=BR3*3IJ5aQ(xMU6Jru@6D>7B|?f3INEz0RTWAna#$E!~}({o|Zb`>hG1)T9izjx$dED;Z5}a(gbJ@ zI4c1F%#%9ms;2&PI~jp4k7t4j%7leL!br?r4lkiLbz}NcjLSe;#lz^G4~7#^!?<&AV7GqbAc;yZE3KhbqUB8gp9egF10jkWW;lL-wb zccvS$Yd>(`c3w0uXdp(+&-)0w0Gjtb!bv$V6Ikol#_;&h^sNN$y?eg^QG0fW+MrWOv=^B0PzP$7KR2tbKeIjvX}ilY~Cl#_GWy28c?#D>_lEkDTRgKgZ_k2Q(gr(;? z=*cg=L+WhJi{$Tkt3(HjuW7CIZzW@AXXls4DX)oRB#wq6;7|oR_m-fno``h=yMcGo z6#zyP-u3B*-`C<*E!hPOgBblb+E)pSePiRw1x7-Z*X;QUA|N?&PoG_46@8r2#+(nk zxBSLzfNX+O&SGc)3}9K8_WUD|1QAECMulFm4E+;EdKjF28}kNxd~4`zkD-*bbkBS| zy6^Z5=Tt{i3NM?@Nh)JL?Ut>#tqn+Oc|+iO5~(@gWy?_r)v-02%Sjc8rBQuD@pEji zBS2d?TRNRdjTdcS7S~TtW>kc?KRk0Bcqd{%#erAo+fOFdRU}Wo|Ma?sKoDn1r4hqE zm-3tj?s(V`SeLbR6DDXidYMS@3{dqt-Sdz{?cwdSJgE8gje&!J(jp5mSHyE6a_FJWV@p?G#aA$R6kaOy~IvFSFhMgRB&{plg9hOgX7eD z0lMbz9a~>&BNLcPi*%1MivtT&;>#iqfphxr@UL7Xp5{?=|yWzpU;Mbw~ zMPn740$J3hr|t-cwNZD{Y9w`O3IN(xJb^_iM_q7SmL#)y*VWQNkRg`OWHU1ufQd|o zDNlX4b7eBPlVEq#M|dK7t6jZ%#9!lY&?JRdv4J^NziE=t$|L4b$wHX^=C_Y1i$|bDwUK$=t6f47U~TPsUee>*s2_y~z53VPzL&LM|KJtp$*nxWsC8G&c*m`qx2j zKP!}kmhIIsOw3JiE>@`-_qlr2jgBQ}5SnC~H_0N|zxb#DsVoefb_z_zjWQnbPRhZB z*K~`ZxW^Th+69Ov?6sAejN8QKkKedQV-3?Pm`hX{p4R00wB5eyP+t=>G66*QP zRimFPHvq=EE*0Z6Ge&=BBRNrB>$!paRTDE6ePFnF`sd1!*nr^h#6@OPs>Qi3T88c% zCe;+6?X@0p4F=sVqlp9lA^{ge4E3UHjr!_y$vb&T#%GffxgaP|)mJtTf1R9kO zzTzk|cpdi*hn;P@F!VaVe00rTe~uMQla|7+Kf6_{lk~=<$qRpxmY!ZBA$Bm8eE%@D zuRWY)`D@Z`$P8WrSM9%Dgo?a|rS)TNQ>!a`2{Zrr>*Rnmxkf{jr&GHi;i1Xu!|+(K z?*mkiwU(nITYtma_YWAW*`h&C2to#Q!!WUm*(GuRQjajMU%4Y@{7yai?YdKfR>=8L zEZ);;D>OE2VDd@@di9SAk4U`H4=lUjqps?j$8tZFwckldd7Q;>R$_P^Zb}9#+xz;4 zB@5m^P*y&b^EC}hQ(!9~D}>3nO}|4OZRTI@!}p4u50oLY3+frr+qxtmgv$mfz~2K! zhm&&7<}oAno-1Qxa(HDsJo*!EJUn4x+Vbne%9ey4EBkK|-#2Cpz2(z}-)l|yuWK!# zB(jT-m!{a=fI^1QgRZ4X(52rh@Ull@qQyupMoKqjAm)e#f3prGSOVJBK->Xh)e2nH zQVC^GE)`DbhxVU@l=M_3Ym5y0F!LjgDJd#wwJ;nj<9$jasEaM-^<=L1`nW3}B~6CU z12Q;{uWx&X3ugPCO5S90eU-{%#vq)rUX0FWQRygQ%ZQGkN#9}}G)pNne?(iQ2BYB% zS`u`tgP2U>6}lHL70=be)N(&btB{5zFv(DILz*=(tR4c((814x@SFY3hUP1k`tc;FCWJ_Jn^*HQ<}s;d*uZkHHbLrWz>d0m^@MT?=N0z^NY%Hu;YLfeho? zkD#%b=L5nAdlKSN9fXzBpC&?PFAgvQPXds!504LfzfUUecfcEG%lI#cCtDtp+^#n< z{4GLa^=N`BrbILG?QCd1Wya+te02YqolnsZA&ASun%t)1Y&w=<)ZLks z*6}m8iDor9WAVPOe7YhZZMeCkD|CY;A~P?=JmoMF|JxOvDR_A5<>a5)-x_m$&n+OJ z^ed*OiM$Yz(pRqUGt-;88gP29bUpDzAL-yCr}1m=LJWgCk~RE;s&ed;YVCpTEh!Jr zSmSXx5as5ev(hJ2W*&ZJzqqd*Wm-Lk4(yYcP0O`3^tg3)aEhcMmH6aoMUAV-GiA-g zZQkyB11J=?W6ItwkIInk_6)*HUTuVyE6x=dWLZXQoaf!fOvE0+9*}a=1hFc32d#pX zb=uA0er+nP{NtrPsI#iI7T=QWXv+$GJ1Y5w58Wd zHC&S-g(@iSOE?pi;Xo9@sZK~gjHx3#z-Y)&U76^HA0wJ4AA7py@};N1 zO2wJlfd#|YZ*T6{k}zD9usZg*VeO~*c^dF7bp7Ug$-AE6h81CAv=}?^PMiu=rRdzZ z$M7c&@dmN$$2krlx2hPg5uQD=+tEBgvO6%ctOCY4A#zON*Ks^A6?57g-Orrtk`0FR zRs}YEdwS2D=s?@IX8uKvgvkg9-2|o|0gFWPaGNtcWWDX#49Bs4HEeb+q|qU}16g98 z4p2&%)?=IB?}`Xfx;R$ad@td+&$;Iq1dAHLm{jh5YYW^%*my?kx+|aFlB)eAUfpvwL98q4>3X=pCzD&ekfF@!l*0D5 zy}v+Bf&Q4>U4e_pG`1fG{wMaB+(q=WfxaVhHTFZd(6}5n^RZr4AiOUs+M=@wry;JN zPJ9`far}`Klx(wgF}`KPL9WqSoK23-6_F5+^Wh?o4HTDNMn=ciP)ALZ|t#4npPi_7HEvo%@q_}|~|dtQy_ z%RFA9Q0eVRr5?=@|055NkRgd_$zbRul}M>&H~V4D1{cq0{){L=Nh7Y4g!$!Df8-=+ zBO4t>c_FS8Q6IqDquw*xao0Y_n8w^f8>=UB)6u+iX!Z3*Yxk8N(PqpD9JcuI^nJ6H z=_-+g%6H{<@?`3>N&t~Bcx;%wmhVx@`foDu@$seL)-yP@+yN{ajCBL<<67@!6YX8% z7?NCi6TENCsc=xY7#X>LK#e^&d06Q>Z7Ax7?i?<3u-VLTrdN^yEXrhhd>esLYNq!i zpqN+DYQVYjOxFq}bV6@KA*N?mM9%uw-pa%TcO#!EWz>tkFeXd(a3PzfTZuS}ZLUCi zzgvp^{Uh&90|Gvk4-+P4q{~#7tDu3ePmaw!=dM&NvUt)D5=|=W$ji)_1xb~e&T>_p z`(+dSq}>E=#dZChz7Z8EsqHK>9~OY?tz)T7wr(8zo}0`fsX3PHJhlV-$O(Qu6&K#U zK4=0G6c~J59>4sSXYihaFiT9gu{xOF{&9L|7>}mk9>U4#RcEK_oz%fc0Uj%np=PN< z@G=N|ZLqI>s~za=G5Mvn#1v z{k4n0?@|8tp&-FvU&l|*S-UROh1{m%!^K_a=XV^P^QSIV%k^a<)JO`MT;_R_2c%&2 z+0W_*7h40_z~GMRaxrCtlQclZAQ%`FU)VIWsgHWAPskRsAoMG!$~#)jxKvUssKdd9 zo+5@F)n=<{SSJ0M3coh-@i5+W9lJzW(m~HH|HR>uUHPxU-9219GG}WE^SFV#=CUXo z4n4J2YeyFs8eFw((3#}Rm+<4`tPnZ*YpP(q0)6aO3vu-$E#XOL?;dM@9O_(|XQpRrJoP>s3!&&$(r;=8`Qf=m zfD?T?a}}(WTP8v*=7Z>lE0!%W63bM`^2Mz*MEsh8GG_k#CjW(jmtpOp(|~lu`k=BU zJO$XI!k|gY(@9MhGB0Tw%}DxeM{&6AzUNXDin=edVH_Od5jriR!-D%Moc2*M!s3!i z-&q!-w~OS<2}s(1I} z@~9$aEBJkNaAG;L6{xH-;)W(`4Yh?ph8@k~RUbzqfv;h~YtdI_>xSU#^&UOZC+8GX zTt#~AD&wwCaqQi9NW?~0y1T6d=zeqhweLAj${o1o`H_v4#)cUd4NMHhkljVypT45t zcMLCQE~**?l10im`i}iLXVK#P^A88%B*5q57J03;XXaRO++^k-$6{r}=yYMk&Dxiu zpr7tun=4BK*`xSpoDFnirL`m<@lTPz$S>bs>E%#uH(fpONo{tQj+wtU7NB9A8PdRu zt@|i|r^1`4>`~x-pA59%YiXUBU9Zil&xgXsVL1l>ukiSa#8G~}cX7pNk@&BV-$&!2 zkG+kLgS?%W1JMDbBq1_lk}%?J3W3N&Ve-;Y5lKmTNy!8bCb|Dr;OcIVM7;RF3szK1 zBZvi>e-*sl5k7u4UJd{qR~ttM0~<%AoijH~Tt-}0Opco<2^Eu+7K2D}8$)2+PCh;! z@)8n$etzP}zi6Tn(cBjv0O{)B^TNXc z@UN~UJlq_WtIZ7mgU7&>hyp;MaxfX9L7+FI) zkBJTdfpl>oKE8yjn~#gTqXfdn7is72<}L9*8zUiU4~5w{I7muM!EB|aVKOpM2dEU( jRt5sGLC8o;LdA&{;>7-b&xVi@6#zOKhU%4SPs9HU(AIe< diff --git a/client/src/favicons/apple-icon-76x76.png b/client/src/favicons/apple-icon-76x76.png deleted file mode 100644 index debe9da3f8ed86638596dc10984d4f60ba3e7d0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6123 zcma)=bx>U2lE()d2=4Cg4DRk40{qaR1AzgCK?WzmNrDb80|A1Czz_li53Yfr37+7= zEx3eP@@lL0?W@|Vt$X`+oztKGcAvWUk6ZoP*hrfQpB^6o01)ZwXqY^BgTICce0UCK zKM{Cv*siLEssO;p6oNZPoQE}rpNX~_pk|D5=V8GL)-f>z07AF{fQT3X;O1c~VjBSP z2LS-P4gi2$4gf&oo!|OI;UNHY(%04ip#NS)pDWTIb{=`_SouA8oqw6uu!j-=KxL<^ zp=uViaDcQz*bW9ShyQSGx&2(fG!L4?1w4vD0ECNpU*Ug3_!?OG%?LDW_Ka@7Q!vQ8@MAoT7sgy2x2^xqPJn~WHEy*eBSS24B$_%{hLDs)ftf9Ustt3YZ-eMLl=pxM1f1CAS6aM%5pUUFF<7*Eh4B zV?AqYDCRFzt=x|DPl4p z?;n0iks5TZwj|?wQ=WpN^74asJ&dW#E^cl)latUh5<=rjv!P92G#Z0}o_t>`=#)%w}2HRrNar1#qI7kupGPdJ3_WCoSdsO5piaJl3~ z`nmWLJB%zJTTdHM)zNx*;Vq|8hgzd0x3cBiCNl?*$_Vp3KUfllc6`}SUH4PJrSsGj z)BT-(kEWp0D}oJtoICS^+QlyNJl=S(JGP(hyhmIpf9s~K$fV@tI+w)&rBi9NT&y11 zVwO&Bnk4O=*HD@Gw1#6MDJGv#sY|Lr)=>5r=hI-Ic2oVW$a6ff!;9bKFs5*3X&bdK z4B~`MlAz^N9WyoBINmb6UQ%hK`a9v4{w+wQki@xpT+_w0S3vM-reDyHm3WWR&7}xY zTCip1QHxsS!R>{3=#BzO*cn)wa6ju7gp#bMfK9$1w?8=zX#0x3nQ7XFx8{fa@qhTR zG!@1<;?+X#SbT$4B+t%B+-9uZ%36X#@{C4$x2v)S)T)0qssN%gH|s@#BaK7P#H1B| z+Tf1@vW=7n_x(D1T3GJ&dwA^>sWr*cO-89L9msSMp{Roql|jw0qqH=Ykxv(nyr^6*bu*+mXYOkhCK;^T|8Av^r<%sgC_YT{ zVzSuQer3lr)NSWU&vd$j%AUX1t@{f#)|f80&o?lLl_&P8P(tlOj|2fvhu&~|r1I52 z0n4X>wStjsNeXO2F%6Si4hVzf&f(-;h756`HwvPCo3dT))%H1VUmXuI|5ztBe8 zy%DTg;SsLjT>3>ut;zNyAR2U*qj-JvZdch=AsEroahub5#sMdHO2bKXr?_F#ieG>A zgawR!8~D`u-O{G^Aj9Z)T)y}~9W}!=T5=cTF9^=OWRdL~UX)!z_VIOVTYSDX#J*KE%S5PU7Khtcm0_)`Ss}o zV2`#7YQ*ZmB6?f~whE6auiX9tV({xuh44%brOgbGw!^y0$CY}gu6blcT`A(?K{Fbu zR`)jRFZ2GiQ5K>t4JaS|%A*Rw<(GM{JCUbxtDi{RPb-wofm2hnJAn5-leV~(x9n93 zf)`KbeCm`^Kry1rrd8v~STR!F((6sLWTfbB+|l}T3~HXdlcvs*mU@~i>E#AvYgEwi z$QJL_nycrF169qDdLMX~pNJqxYQou}Xdp{3imFtJ-<(=p64!;3b=r+AEz(XMCZ+Zs zm{4yjk^O6E!*^dkj3w42)~jNq>zJ(I3Y5~uH9c;K1Ul2J?EIsNZ&zK~F2$*zJGWiHd4?_vH=?Mf!37zGO-k>&~hT+Be#pEzPOno z9{X!^QY}nna)Vi+yCEmY$NrwMXwdPiu$1)h6U8M1AQW5sat2hMotc>dDoQGTf@HIp zS5>lSMf!)|cQr_jNVCt#mgnZ@m;UfNl}B%O{{FRtLwqPe##HFKWeug|P zoS&DDwyL34>vA&n-Brs1WyGXvlIr$Yrg2hR>x0N6onNSmwE)=Nf6r|J5$rG5%^roZ z9N4piJwgcBDAL({SNq(ndA>|sEIX`eD3@=MDV>j?v1k3IfP#byyQfDEX1I=*6Y|Y0 zi$1l^))M0#_t;*IeaZ4lU%#VDb93o1m$yj5(Ii3Vn-&O@G=DBTZ`AS=y^}6&8Rm3$HXjjKbec86&1RFIC0 zINj-&MdI~!;WX@M^|#o1w>!Opfl3Ck`lV?<;%@GynlAG5S(B!w$SI!D|G*K3_qIf_4I%j#qp4gnX4H za?ks%1gX|<4B?lyaNLHEL$taBh6wU@0{ddW;zVlA2HvPlE+mS*e0k%e_FmZiG;U&0B6G>?fF+da>bG4Csh#yO3Ph!fRpsj^)~Cwgx2vGSWYLUpC5Dd1z1Y zW@_1$3cl^*mY}nKl1m4pRUURElu$@0%VL8Qfp6b#dhKOyawLPTQQVHC2+nv<;X#T) zX4kMg_Rcf?!V)un+g{D5u*z#*U+{jp zQ$rt5J>vXYQ)EWxaCEP(@MnwXBOIx%JjJ>faiGGDE0WLe*sq>=p-)~0(X{&2&PKkz zQprq7e9)|dXojo3)Ub(pl4uei(56{6&w0G?j??;$EZ0<>=t5B%03NXwON$~iak3%? zs!LgH%y!<MgW~wd+*w z9VZ)pnCB{)W>I2nMj9uvX<*7T4=QE_%XJZ>*8IXoZ%@2+QZVcBLfFycl#^qQ!WJKg ztb*mOp# zSby#^ac`StHc!Lfc#!U30=q}gB)+?!YjKRKBF}1{O2wc*bj?%*p;9DD#eLj0B$HSj zLPS~3@fWErO`H}X1fjJu30396>-mONV31Zxk`|X#X4K%z0k!1Lg7qH44e_`zEz?n) zGpfZo^PxfF#&;JCTG|9lO*}=)EGKJySiE4rizTZ=xuE0tg+N;eHRlPLB~O$LynYHf zz#22sa>J`E`+3M-X=zQLrEqPc52xdD-S*D;JxduU-kj{lY356#DI~=E&QqlGwBSYJ zB;f_;hM4{trDD8nKR9KK!`a}mUFtZ$SPk1cE#o3e|X*ry|u+nF6NCDhwxjwkn zbiCow*4$wEt3#2%%umv+TDGnt`Bu89Vx>NmQw?98t%?j2C=jPXuzNswov+?F7d`b4 zTp}qsJFBfx|D6tdQr9P^jH!kNl*hmgGhYk2BM^n7rOqwjEf&=!-Zwc8^YEm1%)TXX zoY+K3+ig-5-rEpX$r|i=^u1nLYS{Ss(MPEr{AO$U=fGSRz_Cq-uhuV^S&sc91q;gH zMy$W|V6P=4lBGkj$Ao8GL}B9DJ5Eb?`lr+SV}g+wWta;c(G6c@a>?gCko= zg-o!r`+#iS!+51c^J?xiX;)j=hEK1bRJ~HZD(oDLv?yG!vd`&Fz$vSC+KX`LcqTqa zalEbQS}Vi=rqOk#|M2MuzzM zEhizNyX=&pjYHdrmL%J`+3VE`s3(mDl_(!k4OB*Qa&WeAad?%_fTrYw~j_(%kO?7P+jswi(n_&Hq=3;A3oL$vszaUrc{Bk_$q!MmFZmp|!> z(ui$EJ}LKCr+~Z-`t{SlF)$4b z40z{z*!Hw`$rW(>!R`g(s-<(P>bmjS&Sp{?zkd*+ zpuqHm;Pt-Z#s65KaKPF-d_wjt&xQCPf8EV1D$Q#u-GY#^_* z&>N5P!w7B}GA=7Dz%nF0$lDs5kPY0_T6PERT+)Ug&#>9cYkWyHg&gb;w9abs? z!^O`jXjQ+Tc4 zku>;sAQYI+!gQ!y_~!Rmmw%CF+(f5BFaD!bB4meC6xZ~Tf%F##*Wp&gNA)j81gM(! zJj#c^$MfW`JC*D_BIly>3-LBfy67&vShY7AkULgev&)N%Cn$5eMa6-+H;QIe-~IQ# z#YLbLe3mcYeeEy`yjg56P%ar%GW68Koo(h3Qqfr4vg@hmG>--VW$T;M3G{n|LJ&?Zg$CT} zv|606)%1|}?wLQ@2CpW%qca4k;``U)E>r(J3>-2!^PWM|2ELIPCxjc!w`&aB_I+$- z-<|2vr^HU}Bfx%5KG$efAR##1>JRgsc{m+bLdFO@^p%b*AvHB$n_+u%1nhu^k8zcU zLYQY2ZmpU7>(vWZ{36q zCvxtT$^#P9WR2!gjy6wEFxTmWJh+oUuJ(p)FwVjOTK80FS(*_*Zp!xw+reBJtmWmCm#S?TbV)mE=G~r)f(ik6C1b&>tMFn)rmgFlwnF zL8wt2&-N`~rE#ev?yQJP3 zIxu|Wt|fA(m;-)#caa18 zx;!|57)VrF2qg7zn~93bNl3{_N(g{Jav%_bkzDqFB|u@$kY~aFcfzXb``CvBt-lrg zV9(%zj=nAcU8tk0i=m?{1nj{oB`hs0BP7fEP*Oq&Bq<~+#`;85iq#Dc_m&e82@DJr zhWw=;?12`B`MNH}9XtpEX#Xmjx%oq#C>hqK?m` dB|#Fx4;jJ_{r#DLf&EYcpsQ)5QKRM%^Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L002k;002k;M#*bF003R( zNklZ|$XH@}I&!9j!&Xsw^^Q~Q}mO97rmH2nRK|J%Ru7a#f%ZTU9V ztlz-rZ@cZ;KD8x-mI6GBXt+6h_Us|$d0g|{>shgK1wXj+N9^3W6Dj36X9bKgXsv%{ zT(p(~Jd3a_3xE%N-~+t&4L?sRlR+y*s3LCv&;NW@&#fWoN-305O+^$!Af;?>(zVv8 zC~Cgvr%f?h3h*qV;pg}E_3_GAyqr?82tts{X1VwN``NW?*E4Db8qp`62>C*SZdn$V zWi=yIrDBm?J9jcNGK$u5f)2H85XTkA_x?iOFe3h7U7*c!>S`4{+$vAr6lWGd(j) zadsLLlgvE?&yRO{E~JQyAVuq!fNVAdD1Bf$OEnw{_CHte=&u*0OQqMmC>! zK386K6@7iZbLXiw+GvE3r={3u0xbnN2hgwr)oO+R_P+NqIzB-S=%45 zdYNY3GM|rp^Ln-pEhFuQC=Es_j1WZi3YCe2ASF@=gb)ZoX+;!91VKRE4+ukzHiFLX zUM{`-Dqi@am-5^jp390AD~`B!t@YDf!!w7L0-PggSb=YR;~RYV@Bg0m_I83Wpe>u@ zlOO*$>2&&p8Dgz9Q`1F;hDO=DZ;%5A1{plKpRv(F{PHkDP12byv8v=*bsZ-d*E41Bx}5C|33w`Z_hK6yRtu8Wfla zq6h+Cpz0E1EQ}H4(*Zk&JDDn{NP7`RgCVgt7!VSKIO4qKpIFDS{2#CUn zM<4tl_ul<&vbjz!+Hx5;Jnv?1y7>ic+_<3`89Q5ODZn`f+i|dM`?#xpp z#~-7;y&c<4(Vlns`(NG8=GA44ln6T(aw1R>1d*Up0c`|QNTdME(%4et*nm(VK}Q0S zf}O)XXyM@425l@F20&{KI(B^w^Ul%CDap}#VT_q0`3XsTdpn(-f-nqu^09k)=>9wT zmw)^S8#iCb4L9Dzi(mRu&O7hCvva@C_5*I=#PI8N!Z1Xfzy;7s;ifz`Uw9#&>!P)y z9tix%MTd%tFR_F`N`q}_ENMu4G=9?d zr1b%=DLxLax17R2v1$8WGuq=sfTUZh-OClu*VX&kG=JqJDWdJZqcoaa8%jaop zmnapnZ`Y$d_R!tjcI&74+8sZjqoe&9CkD0@;2eVx5{TUkAtg~1QK?o*XEIG;hy_C6 z*Xsxj0!`g_8J^9u<$?(^D2$QR0+*?BirHFFf}$fT-dGAZ12JMF!BQt32@_wAuHGr{t;YZ%SE>4S~qhK*<6lHHiPZTvqlSVDZn|0dHzGzHbO4gVqMev9K&jD(#ZZW$0g- zCfAlH+tx-lpC{Xv$8u7HfkxUELP(6!oOk7QJbC|JlxN3rT!&hvOfKKf+6$h8iUKOd z0`+Q@dbL8mR-;s^VOcgp2#QkRSddQHc%H;*DuZddOpUCv?ZjJ*vw@ZZoXaqP0Kt*c z5L<-`S}FW$m3pm)ibB3SZ1GjU3&)YTu1zZClF4OQ(VHcg&yj6wqph=@Og=|8pC^;g zkV>aWWm7n=h3nebZmb*+-Sq^OQUNQH&5f<&d35)$U}|Krd45;F=oPFv|DxCmBm+G5yx>zr(IGho0KPUY=MZk*Uhi9g_Z)GlSo7$iL_{Q zqy=d>Es#l= za&FriA5v?L<2oGJb(qP~SzOPVbGzm#fwU~N(m0++TW1&bN*Se8(+zT542v?s}=9V`iFGf&)7fO8E^A0MO; zgi2AZRGPnTWQ5=Ip7-$kfBZ*8k>UE6zntg2^0^otA>=&aZul07o6!tW8iP{v*4ZS2 zBc-HLsLKtt3dv>mye&X1-X@v{{xo$Xlc+IoOWsn%TmpAHL0XkrDlEF0T)FxsG0L=*%> z1Xz~E+6%U@`n(G%%}jA<_b#4%;KwL!n4GB-nPMvuwp0;@Vbh&3#>5t3-tQYiStt|< zgOK*FPNcNZ4Hw0+kxmvN3{g-=g&NC_g-Pop1=<*c<2nrO8>KK)rf+!{hxU%*xb_)f zaGH4kA|)ycyysuKJ0ESE^)AY$*&tYn!$mFiOF;12h7hFnvhf8s$j1U4Z<<40I1JaVz zDs`UPdXP%F#-Y8Vi$BlBY*mv@yov(MQTv!U+zU|{Af-hn*G8>cb^7+s6rnkP8`|i81Nfs*<3WQ;VkPTsrhob zT*hccTUQs`ezKLzvR~xVtDi%;R7dK=RA=k#+CIz9!vo}U4qd(N&5gBf+w6UEkm775 z4tG9NjQDtQCk(=;-OxT;to)V&oB?PZfe_sK$&VoR{1I>1^jRMN(u=v{j_)JH;%a)O zh!a!`abUF8Se8Y5dwcV>Qn^efmtktE&Sjn7UjdhR;y6=fqglW?6vidS^EUoS>xurwOGZq_p|!SHA{(f1g*} zAW_oeoi8b||IT-Dc&rq=Lr)`UuII)p^l^S~v_Y#mMe^%q3T2D+nfrL>FR!H*u0*PB zlx8DTrN~!*(#4p$p7y-NAPD>r$FWc+612l z;wmnidw;Txp}T*Lx4%#^U9@l=#l#G#)F$%T^rAj1lg>1=tH(tmuPO={9j~&!Z-zhk zjrAz|0(9vCf|`#%TjZYY4qK<5%ktGZLO&o1759DbaW-AFnkZ7tOcrt6#U;8<3j!?L zNixwIDXim&xS9Kdvy7GkoFW=-$*#TQ+;{t%c;}7dlzj`!5(ph}+k+SLs`q||ww%4F zgpO7^mi=bv@K`kDwO9_A9ox;{{6Q~WE1pAnax17Jm8l9(4Mu!t*Yg-yx17+gfshHM z$gtzF{YWXWooC+liBA|nBw64PFKx$xfurt)G2nO}LY{pEXt_YAfJS?diD{p&eEhBa z($!C3EE}aE>qh*?JpI;+o!QyUlD&?J!1FyBBv$KP5-SK0B z$$#Zd?|3cci7{*rQk+thXA6Ac{&hIL*Wy?KS|9siaeeVAUibX(Cn2fw>1uo%wf0Go z&)G)H1v*(61;Xaj|NJ4YZTmQDR@lsxG(GL`od>|a@LzfP%U*y|5temgSHmQ}F~}pj zvKYQBk%)U&uJVXi7c6BQH?>&vov$(*0|oe z@A121;Wb22h){}hVKye~Ek*-Oe2q#)L}7rJ$()t!?#ZB~01IG#!>I=1O|Qc@@Av_F z*L!)osb%DzVGrKkr%vJ%ot(sdOxQ-R;I~W|C1|cyj zUZJ&8s3?eqFp4lHrfH}!NPZt-w8m(SQXxhgj1G~)prSCY*HtPG!6w<<(65niZ)bLL zYVr4SUfJVLc?^*hw+0a6+)5nv2h!bgg@v6QQJBcj7tqK-h}Sc;Srfzfn2HZQ#NN&@ZT zSrN8vux&#}4t6|M=F&?CxZ?WjDGon`ZPzJ|*Euj0u;-A^^EW(1t@=RXQVGiSxb=^a zP!BA^2&4o*w5W#`jsT@WM>1KB1sEGCAc!pLN+yl1BwEFE3){A^Y=?BlJE_K1QYJlw zPPFVBgX4P1XSQ6RXAO;T<n5m%5laj~~H@XlY# z5CwYxkWygDxB~(-Xuk#_Q^;Tn5gZ2DaB-SDK+pl#Ty!5II{=o8(F&1~3=ak5oE~2N zbI+wRz5~aap)wmXJXB`qfq>t7vrjfx$An^D5zRcyW#V%bjh}Vw0x1na5Qj*$fl6JH zODn$pU?(5{)=FGApj0U1rqXDoQIVoru8_*4@zRUSZ2&l4iiSBmk=tazX4Po^#s6*82f~nC8kL`|l>2*~+$EG+7 zmOQeX#N3Z_uM2VH>YDPRrXHqU@Y0%1%PUB!DHV!r+;T1btJV^R0YXTM(~~^;;N5Y9 z+(lyk9^iOkE@Oy0T!<4SL7pMB6kr}?@_=kpps%NmQZacPO$RnYHUzEtts%j45gfrn z&st-dAPLPIm?wJjZgFN&XCJDS6R_- zQ?8o0v)d^^srj2=f%Ks>AK}Rw#>+FXW*t!&Hr<_`ffeLCx=@inPgoaI81r=RG1yK_ z1v%Snh?WA(L+k>9ZQDdj;kk)iA0f;qHqoZ}zxl5Sga`qDfn$PYK`k&m_LPg164%!3 z9xAZmve&V3LkFd?`w*5(WxT-SyA3_<16-p3C;enV_kBudqRfH?O!7iyGJV06Sc?q9~r^Dm&i&BCwN zIKR(u-o=vg#KTyQLwT~mo`VtfdYMQdlW$^s8vd&vTc}zqAe{8DXqBcM55>q{@`1T4ILz%%f~%_QYmcL!%JtG z968KWk34{sf`dCAqpSCYq*6|j9TrK=v&MEDs>SJ~t;^Z14QMFE=hd z{IaXL{ad4y%N6{5?6~;iV9uX-+5NiBTqcqfNDvqwy6x!H) z_Ah(5VvV6zi$jveK+02m1p1mJ$*+#(U;U}xyd{sa? z<5I7id8@x!z~x%-BA>S3paGE3-&x0!d1{p+-EtK%S4R?s0hQt`sf>%!8fjTnibWp1 z>-%%Pj4TVwvauYy8TE-omY@9i5q9l3gqO{e%4Espa-_5IcgJlq;Rdu>GO?h{76n z67kYX(KE1uzLl#{QAijBgh4o5Ssv4AniZ2Nx2&WwU zP;h>i#hS~&^$JW(S6SARKkeCQi$O~Pl8x`3-~2ajTs=adZEAsq=R$9nhb0#%QZXm^ zXTv=r>FN+FvKfb5N~3ff3pWOkhOyZc8wV;hnm&B)hgpygzx2EUb>ARt!OWf=4B)V3 zlcHWMVu@r^JwJy4AYxZ7h$N<=5W-4+Z^i$XHpU2STM!u=5ZIPP8HwY>pQVkYuQMQ< zhH9mP)(S6`VRYyq!v~(CtFJfC4jY4I+dSuGuc5ntIZ+rkxlIl0FgbjP@7{hJFTc9X zb1n*~)}TQ~Rmt{BHRg2~u%zVB*aWxy-#7Ed-?)WU%b)q)KucZ$8o2!0m-GJL{uqD$ z&Kjw1n@TN;8%doyff6t%ZAf{Nd@4jMlFhQgC_%L*N#~0opqAUjZTGu;|DH03CM-Vi zbJJ9Pfoo~{+7*!!319v=vGT-!e&ERz)w+ngK-(dfH29%FYe>1^hk|U%P^d^88&aOY zbp$tD>Jvs16GE0Y^4Zl)P0tdA0Z|yT^O5^#>+Fa}qb8xJMx(2GwbE?nHFxFE*42aU zx|FJt*#h{^M!ei6qOgh}i1%1J1QTFXL}Yx{td01E+#THhvA6K1_kEWBzGqemmb?Nq z_FLcn?!7$k;sV!QD7pK9L#?h!xr<>`9v?!)E=_yR!gVX?`kZItD~o!yPJ5e;Sa}7@ zyO!~lPx$=vrziQh&kNpg{VbbTD)x>zcsYqJ6@e1RB(sh<7_kNLLxIu)Wem0j^)Sf> zC(0m%q3R1##!wHTD<2^VKnsM@m_QTFb!vY|MN%kTJDQJF&7El6@ZahT-V{5 z#*!_F(OP5K7T^BfeSGsX@8eJ3R;N$_DIE%xc#y>D)+oiJL!muqW63xwWZ8mpMf1?U zRow963yAPQ#UqiFf?7qfVnv2MV>!Be;JmdVC)2aa9QA$f7ctjH8;F!hW`8w*b<7{e z-P#nE?I47;K#!wEG|o+qr}WXUHooM%&3ZGEkOU9T&V>0TsQ@}DY22}M5C8C2zsjG! zWgOSGh$65Ymtv(+sB)SRF#)Y3ufeXPHMnlXcOUNJvTHZdkqrsMx#AVuHYj8Bl`rk$ zsNcoK&LBjzGH34&1IICGTb236xkrRb(n`gMeM9CNhe!X(ECB0<%UlXmCg zJl-X#0Fqd^@4Mq~`JGqpVACp_axIPq2|L3~F&XoD+HPlTMLOF66_Cxq!`p4_uJgF$ z0*7+NB)$A&qMB_xeB~>Lcy!J8k}%Ju z0+^$*^!5NogRlrnyLtUZU&GX(T+>J?kOri5DU?oP**)R0KuAGnUVs(1N_lc@BR~K1 zJya?oRw9*J8*({^FMV~K^SgGic|BAs;z)+)NgQ(_i97m}gn&rJ-=#RMP}hl1=3HF% z=V6IifOyEWQZ>qt{0jc;7@>|^1EyWg-~@d0;qE!=?iqP_g3esL`TPE3ecW)V9yd_B@L}90n;YmURbAj9TQEZDycbQ1@dO zMJYo*Z*k90s)S?PxapcYwTg9Sgx`>a6$Q3+tSfa!+@5*kP8awEQp%VR_bm1OTnv_! z0yLh((3HVj_cDy|FvgJ282<9}-Q2Y;!RIp?eARgLg z^Vp-0a{sP&x~~5gsg=J(X9hm{)n0D-PM+QlgXcOF%29KM?Wv+c=<-~P&RmtJMh2MT zb<{bZTE(YU3fOy4@z}lFc>Rr2gyFm@vC}}K{B}MisQJabucKaH7^cbVk3Tz(|68^l zvqHmw>Cxe&a6TDoAtjb=<9Hr^txD+E&uJxC5}V*gC%4hj5$?Y0E`Igb-bp=x?Gu;q ziGT3;_G2Anya3m+uq{Eg7M)h1Ndu9BzHS&C&v7971y-%NoZ)gW-HcG53fQrAH?O{K z1Zmksp*bVNp~FZJCVO}(a|*&G&>pHZiKXwP_$N!dIWLA z_cMVdp#U){E#!+|xSiL&{`I6XIkrCb7{C63PckyPjIQxj`8cyYK^Q+H{0R{ARD#A!4$Dd0?rCifY z%n1RGon(P6LwBdbX;WB%L^_5{J@(=KS{)VEsFcdoDi!=%oiGfOIc9ScaEde2=p)*n zn1n26p|nf69-oKS@ut67J+=UJ;ywkT#@6xY$8`vEE7F;yM*PexK!Z~IxzB!<>z?x* zRBti)O{5HMIU6Yi<*JHVpr_%HNNG{26uIWQ7qI2hOEId- zj-A6W`(OOxD-R(pL8v5QD4tgMW7cHM;c0eiBd#m3ERfPP*w8%p>RRmB&aXl=KqQEK zLCqIb>Vis5GFui*7A*D;+kESu4AVu)bWt!<_Sm&&H|0{DN-bzsx!I0|6cWp_nl%j& zw{~}(BmI3T1t|}T6^Y~6gua06ifWCzxi7pdf)-Ny1EFX*x%QQ z0vH3;x+3kJIuA%nNv&36&DyoR{a4?K5Owwsm6_i6pS;;-qFMX@TW)Ff43QmqL>6;q)tOCS-X z9B9izE)7rYR|H{|)dMbn!7xSyX_G@RPUf`Tl zfM#nxt($b)Q$eGB`L?ZF866$vZEt@&^}5e3pZXNH-FhpXot;GUcm_%vy4oEowFsrm z+??K%M8n<6W;6WO``=GzXB(5lBkX$Q8@&7GpU|GOsnzwO>Up&R&ovwvarpdqvrLx+ zGbKr(EGbqkYQCWE$LvpSEF4GTNP{B%c9o=B z;iNX$(tbMp&d*6gx;G7v%#g%P*k zb{nsI-RnqaGVI*Bi$D3JKSD(jPAUb&4PJGks|^cKuIj`BoWjktZ6+rt`Mux&AH3zQ zZ)JLVn%i%?olR~3#kH4(RLl0FlUzzcrd@N}w{q+}nBmKRD(J{s$tIDeFssJq(!?7~ zZ3Oj@rtloSNFF^Da(+nEwxAvuR`m$}{5RI}%dc8Z5D6?>#Qj5!psN3!dDQ=l||sPda5EGm*aejE%sLoThLul%9^F_?nJ+ivZVg86O|xZND-%OZjwh zS_;tc)$hLRPKKWPE>aDn{As|(wF9On53}szKj5`L_lqa61S%OX3RPe7-7o$zANrN2 z_|7A5;)}DN&vB!Bk74>EM<5N&O3 zXdO|hNh}L8-du-=?hc1yC2E@Ple&?%&Ghs%uX){T`TalqLjZp8!~1yn&cElMf4hiZ zb+F{(7^cR6<3Mr7;(vd>o&WxG9vKhDW;nuin!h2QyDvw*ew+)L|2wTAjN)PxKZ^VR zy!nNo>tpPGvP2mAC_k={iF6ve8Htxv8yo;_wAec)J>ZDDXz$BJ!} zr8>W*OhQICiJWPzsn_bP80hAbOD{d444l++JJmmI2>)zJv-8gP^Xe^+f+fkMHJ$^~ z5;(5mi$D4;KKtou)~s2Jo9-l??V+u`i)=1OD&>$)Sy(8*;wxYL3|IGkfpojaYo9;M zZQp()x8MFbe&H8>E>WQQ7p$8c_jt84NsA4aJHGWzIy&09?z-zJl`H)HNB$3Y{_ux% zcXy+8NVz6?@9Roz-RtthM^Y^7(%813qs?OHzUoO+cP-1JTq<+XMHlhmk9-7xM<02R z|Mj>3hf4;Ak)DkT^rBrKtp%xe#h-twlQq3Aueus$%baotxCWZH&%_olRE8ilgeq2o zM)+M?Hv4yvB9eO^C%^=b4Qbbq?~zPbTy~B*q*4yHoutf+I(|fJp5;2`ypsPZ755y{ z#-NlUilVqLsnP^Nz{OiG=A-}gPpnz9rs?LME>7D8nwgnlMdvX6YbCQ|HleR+aLI&( zS6nf{p^^7e*ah{-qNuX$3$uiDp{+iY)q|T^Mmg#yTl_fJ-4qvv2x;?6ukg9!uD5XO zXa12ZpYw83o{N`C<9Z(Hv`jW`@y#>ZU^_P3wr%I|;c?#nj<*s7K41CL?cDOoPteoT zi6Ep4)gjWj zX-&PX2>iM0_l=;h(`KOCAcaPVB2YxB5sZ0~FoaqFeh9s*C535;5b-7`tV>>Ujn88{ z-^KoK<_J_8B|73S*@?C~u)H2Dw-+bXgOlpu!2Vsll!xf2xcBeQTCn#-&&e6Y`juU-o)@0R#Mco&Wp){+^4s zY@tvn@DCsTD0kg?7ujr%_U!cB8y5=+fAOhye&Km8>jxxL#l^QkJleGhqPR&{q;%4W z!61k*NF)MZ*#xo&&vlT(hIx~HrGT<;vvts8Xg1GyA<0M+4P$o*k&2#;o zld-4sEKb}eMjUY~8ZBJvb)PVbu&g*|Fg`lL)a2w5f}P9f7#<$sbD#Yz>({U6IoDr* zs-k-YPTK-Rk!m)K6#}wt5>wDbVbYny7=lP8Zc4&LY1mrgBv3jH*$mX{dR~9Y_|8>| zf=vU43#Y(fAX#=)((W^bCN@28b6TK1A)LaBPq>>w@vQ6Kw6TC@o|3d_kW+) zz5ey6DB?4>e2V|P{R?C=DT1=5Gp`rjL$d<@%m zc<~Eg#K7|9bai#{(wDuA)Jb%#J|hayxX4^S&yepm(}-XcZ9#byQf7xj#Z++b*`7LRt<= zYoukfYSn5Y6>--+cT<=xuyXkdUi;eDHrukC?7rZ%Er2DhBi#fO3tA>8sT9sYT`i5y zYYUfq#~DgMLzq09IDsap)D7k8oCr03lJi25BAMP+DhMn&&0oE38l?r5x}+Kis=lOD zmCTeZX3CP;ip6Z%VxnN7l;+RgC!u&Nk8Z8P@kk~WC4(~N z*r!t3Shj;@dokHgN`#bnwnJ}s2d?LF`0!y?tXz3&iA!^eoZrSCVDNB(N4{_|uY2wg zwfY>NT?nX_4Swy+upG}0M7&Btl1MUGVlJU1Wvq;iEGGi$wU|^^szEj@$meW!4|h?l z2(H~YN}(JloEEwV>8v1?iLFaIW7xLW;r)NNjF0|C8rMpC`G^J=C<#-BV06e}xtB3> z4Q*Z-%P7)zopPAvaCI$4$XEevNzFHC6;KQ9Bo`CsY-~#-gifdo@oROzPNh+H_J>n$xxb zj^o5R>t>13TwFbs7KFYz6B+BXggI8GGN2+s*tnv3iKY4XRtgItpd%MYR>Eos!6fCP zP2G=u<>Ogpzh-b#@ye(|!{2Eo0-RO-&liVsP3D zAf<&i&VrjfX@Q#()T=*DRv^awXv&EaN-+s}uGggzB$ZIsqOMs8gO^t9+?V0fb?sb# zAq-6_lrpF$YdBVtw5tgf+_S%*C&oGm^e9@AP?H5dvAL2-(r|v}ef}53p~X_EM6F&! zN()O`v9Jdr1R**KiNYFDP)|-mBBX_My0Dxyt{W%+ymT8<#!a(auMNk|qE(3Pco^Fu zs25`<2yT6FgTsZwhXqMq#@u^%yov2|1F!L$Jo!0hxf&sT8ZO0 zRBCl<)fyO$Qc=8#j(nof2V(!*aWf!nLcc^9)LGS6L8}RN4noS6@d#JxVB0PrP%0n{ zs!exj{;i3Wp{FZLXFkK^)Ce7U3l+`q))&{pHHJNNO59N0Rbn zlV;I$afHA!hQotQoIrqh-vlS-nOM;_D|kTzI0aai=H%nF?Hydb}4#|!og<-0i!`Pk7)U$m1sa|}g>FEgK8iq(FRAobybZkC)OSe#D zB<}U^6V}TZqvKUuD}q{)Fs$QxIlOc`Dymbjmr2_Z=dbRhTrTn}FDapo;L~?FOcy0n zg*dWwtN=MgX=Wh{B(JD7uVdLBQaT7>lg{QIy_fmOl%E{uMhdm*T(qNSBA-^Z94l`A}t%+c9E7%TU$GYVu7j2 zNxFM_7HtJiTLD~GU_^!>gd~x83{H~F`O}U0o8+g}d4WM-%&|73!HrKl6--p7UJa=l z>llB&vBC=>h-;WqFI7SD`)UQx6?F+hFa0U}W0h998yvG$Bu5uq;8X9`N|i{Y1*);a!3^ zy&|qtc5SHnhW31x-+c21jBuDKMOY#Z^V*KXZ@hUqDNk_Ax9Y4vZwpG9BMvw*Imv(g z$LD$XufHb_&Maao&gokK0U8&j;}2V~i=BO@Li_l&xEYwmQwOWm1B)v* z#5n^?#=}G2`|4>@=>l!CL{I|PS%s0y5yB#>jWBxPE`I4MmqWvw**6=IaYK}uORQ-X zao@f7@tW7Zj#aBxEozF|=_x>>V3ylX6oKO{%$->>vQJXNC>xVt#M4~7NtmZH>4rSF zfLHxngQ@bi86v!eepoO>Cj4w?KO^V z@ElEBTG5s@v}HrO+d_KUG~MkHU2X9w))hSgQBAU}vqERSMn^ut2t!Z>M}ScW2s5w3 zh&yV#j)dZ&1^Qq*2kaV{qO%>R;^mK=yJ)^s|O%SU0CTj ze6^G${R9w#X5or>nm5*K6&%~ebz@4UB|&S6MG^ZvN|mO?+?L z8md8xtQUe{!Pe>87)%t!w1<-9EiW14E!S^nYOI8=7|!d2|M`{-S6{G#|MNK)v`YFQ z%~@)l@Rw}c;^4?EL1dV%WSJ=jU_;gSsMaldI}~q!=_L7#p|?ZPkqha{E8264OiGdQ z3@J}1h5C(3m$mB7=!$NiSPYeYQwfs>Z9YGYskL z@MIZnB&n3g{=ElCr!yz@tWMhkAVAt}D0TdY-R!Wv1Qf)WcoS?eCv<^~0ndTmwQKpp z*PcQLlXP`<;acE_ir;x-3EL7>s&RI`ucN|yU-2j}y5s=2-E%(o?_Lf-+KXcD&QZs* zq@Wf^F5Xb%4bM5i=%HfFpOTVl%}_2^dEJ!N9CIh+v-fXoo-CgrW~pXHB#;XWRG zs-OS3=K{7L?!j{uo~@2?i?oK8v|v?l zo!|NSF$Q{~xv4b9(3#f^^ag~XL>obGM~!8j)p$&7)t*Ouo43jnC;DQ+ZZLftjf_ZI zqs$EsKlUbpG~=LCAT4wdfs7+zsy4>p)L|T1!x(|o-(q zMZCEb;0FTFGg!8uR0W`dqqhhVo<( zPg6aLwJ2>twNT#u-|Y)!oD+l^Wzile}&T zgJUa%FlZxV7slu{tZ zol0SgxYRb%nrf|f((-irE)d|Ra#ZUHYjXh&P)E1h7vQ?FnLJZ10nZsUI-}93e>mRi zCP0BLLM%&?@>2Z58{f=jSKUN^?axu=&&PAQi0^9<34Zu!hW@UQ%Qpv|MkFTzWK;H%5|4~IzTDG=2bOvZk2IATCmx#B?a}GVSRs%%idIlz$XeVs%7gK z>b6MExPic=S=BbP#3?yT-S%OHCc6{19QW&o{siml3bU)Htj7%4K@4B!6Fcev={ix>U4PTK_nu$?qv zg#~>aW8w>%SK~q^FK|-=qrtC3z4Eh_BoiWLlZKJNwT|zV3IS77ldRvAqAg=HGh3ps zw+&x^jOp1P+KV5>2nVG!?ODb1F0Jv&Z{$d&43}J7r!r*|Rc+cb0q=bAR&KiRAfLbI zLLS^ZK(Xr3+Zm#&rMShWePpK1n7IDdPJ4)SCzYy=@F$V-3z!2>R#?q=2U%cvEGVn2Bv^VYJ#v0@pC zOKj)%3J3^wnovh*;thPYT0?8YV~;+<^z<}cU0sVxhMkrIG^h_wDo3Q@=+#anZ7v$~ zapQzW%nxde;7VoUU4OOov!eu!>ak{geSu5UN|VdNzx?ChQUBa9fAk0MWz(kfiToOq zC57+Z41BbCAN@d(%P4;5EwjAmull%opUW@3szg{31fe91Bx?tX{Nc~v&yK+!zI^|B zQnrO~Tr9@|t>#s1Nh~jgn{UU->2GKpV4%+MZD>y6TIZPRVsBW$#{d5HuXA;juptarLkll#}zoPz;;CJs*$vOQHH>e z^8|Y*yXebT>CE`35JI|R5+H(9%Hz<`VXnF6THg1*_ciNeNOI)H_Y!Zl`QDd4gjf0k z@BTSK+B}JtHfcM+4a^W}B6Z19nmpE8yh1m96QPU zlcJ*Yq`EzR;UzT&I-bB5Wze-G0Fa>;byL$0g`z{DV5lVHXKhQ9OGRX4iP~%lKag=3 zh~!4iBYGx-{{(BhW{_wirKv?(rqo7kCm@s(+qNi`D@U}tT=a7~y~muyiQOE5c0dHp z*Bb7RissybR8|}@z3>QGFf^;9g8EOl5;SU?7c<}2b4)y7LRu^z=;FVC1S|zTplGz0(i!)*Yyi}TUWP|aKSnlRmgSjbzmp*aJabqBp z6S28Jjb1pF_`>g;X_CnPnL1 z(&$>CwcyT&^Q>5=dBN3nR`mt+bcEzHI&Q`#lD3OshzZM3t09RnLg0%GwWy0yEk&Vd zQ7S2dK!XmGMg#)Op}CQ$hc1;MO-HH}H>aE*NlG@kLVztbwiRc_LnWvL4qtxa`D`0r z!G<*hT$Kes&^V66*!U#Vv&FdH_#|<9o8Ux3)9DPg;K*36*5D^AxtkKCvtrTBrm}64 za-+4%PoWaPyz!KOBBH(?$u)( zUUPGWo}Sa5f_^Sqy)yY71bz+J0*^@rN0t4??I>5{Ye+h2idyh``j46`UI zq;CV~oM1aLUw>!5qn#Y4(QtnH8b~eep2u#6(>r5V#)>SiT)oAqSyilsClp2%I=Db! zJjUj6iQt!7U9F~RT8Lu(Yv?y<|}{L zHm8X&uWiauqgb3ov7@rSRyWxwW{e%ah58IjG3}p5!ZZKtQ|YRum9!J;)gvxAzY;c( zXPP%}^&MkJMu#xVX}=*im6sxtx6J(kNWiF-Dbjg^``aD8t{JCe2j^qs;@fipRkVjG}jKqD|~-4~5}vD;aY|Hnb(S*d7?p=<06Wlqu3TRp3`Y5cz0u4r3|$&I zS$%BU4J&Orx)_Olge2m3d64lG7d-2#+s$2)yQr_uMg=Pw+KD}v2zFM%Mc!ittj@N3l=VMme~Y&gc2y%_hwABa7cmyB8< zF$*mIIteh;{xmCr?EFz3RfO;++JlR0RRw!dPLj(Z1K-|4L^$h%`NxNEZ+EDm{k{B8 z_jQ_m)meIRPfoT`5 zi78Sxeh)y+S6i;1Ag`AbQAE3qdg;W-RbOa!5B%%7sz+Q&y4PcJv-bVP< zT{jV{%{uXfT_&H%v!5VTk*-8)tT#FS?ZBIVs1g3Z(T4Wj!s3r>S^4GHN{!K!v!P~r ze?N;}#dMR!35x9|(rGy|A=?kFZOu`-pQlh>{dVC^>M?^!h&yFfoyA%2q7(yHUMg{jy%1^Xt&5&uz;8yfQ|; zoTcq=t@xL*ZsF@+huJ$KKE{5B{O?`*QhTm;eB*<>=~6Q`NJ_JgC07aE>RH6@DwsMh zp2=RHPrdJEbrYKIoAICg@i~wrP0`LouoI~ONWuMV9+)i{k<0soPBZjoSKG8S$hFrZ zakCZDXS@x62iiybU2#5$5VD#ivj_S78#rEhG$(vy6w+UV6AYBW7k^8%+q6iSkl|~) z?X472OnvZ_kI@mMn-5FN%aaPOR#x%lswdJ4;dTr?{mP_qV4sUE9|J&E9Dc6e`=Z%H zWd%Dk$-xwmNi?C5XhNr_=3B;U<{z= zG&|BmzW5@%b7N7zzjj>gBZHbfejV~t7@M79Ky&x{(@8#+r#DGUVkgj7`l_cKHvGL0 zfE?@!W0~J=2p0@(!=UlkEqy1Sg1-cl^%t<(W$UdGyTI;w;Zt*kKW@A|()r;w$+Ca| zwpnLGC|_Bs+0R1>?C!OmAp1v+BXVU`(jBR-2J`+WZa zZ|P#)z0aKELRZbp8&=|0;Q*-~49w^cL4bT3JL}q=8pVZ|Ufd#0IX_+}1ps#A!W`1@ z*81x@iq}wTbge^%aKBo0C5U9k9Gb35f`H#%8~Ou!xq6!I-&iYYB1_q{Nd zkk@;RE9o+Qg6ZG$sKnsl9yy-p9>39PIU>~l zLbmr2ODor207XEeJM-KXJW1vwE2$fv>uMwv_CtgePFO_hy+`qt<(gt#${k&2S(pP2 z*leN>_q~<WM##!Zq65oFh<&2pH57uapxSfqyb;%{Z*kJtTS_O&3K?2 zf(Kc_lAfU?+Yi;7qRggAPOm41kG_mQ1M;&9Y2gfk-WvAEI4&amxb~~sJPgdFkIM|j z@jTfOz+Mbpo2VhK>>Qf1#LC5lT8Vo2!>xogI?`|M(Y5A_-Xu?g(=U{%kvQA3lM^vB#J|yApm6)>wd9MtKn|bK zs|}9J143yn#S80j#$C;~WWrE>Tb@xo`T!UoZ5-c^kN-wlblAf6rpPz*VZj7Ju82%f z%n>JM1>+D`gq}FQ$9|AQOP)eLJAoTZo}U8MB5!KJ$$%yoSb+e>?H_hJJ=F>jztEc( z9;r{0)ms-2Ptr)1-gnQ9AqxmIebK@ri6wYCM-&TuB=G!&Ezm%{(_gXj$2s`Xqu~;E zY=1<4env|=p|g-EDH8?^b0SNEu8GarFZAwSj)Qkfw6|;Yeb&J?HbK>)@(c{%qPc^+ zAAZ2tcQMe+LW ztFLCH0@Dd6M1em^K-yARo}`UckjH_W$3(Lj?Sgo$#3C%A9cNKVDGrnN(-o^-j%s3@ zdC2o?sQ=hFb#z)oufxC;#4&_cCa`1-7GTX_$=WS9nK%n_@0bWA^+k<)0I+=J@t?HO zC_^qtSrOKhq--?f$xHXDit6psd7lgfdokJelNCn=`w zV74+xqu5xVpyH5Wo_73hc)e?;MS_8voLoSle_rfzx$TwLqK;#57b)8jM^>LY@*QDk3ll#6EB|im_+EqO^L8cKD|AR{RC!`1p9N zzr(<`X7PyoPCD9KCEVj@9b97oRs3Z$shGSa@Y0)NH}*Q!r%-|=xQn0Yim7ruQlN(Z zkMowv$WIQUlo}#3*JSqIw8owGu-OrsmL>dY8usY$U4xkP^FSK3Yi-3Kpk8{8;Rk^B z5bRN7#Z5kt3bgQcVH&7i!-PVRyBSGw>iAthZtbMOv zJxi39>11`PzkQkeh}0d8_U9ha!^7i{xhtGYXu4y=XTPRoq{`TA7bM420Jcm?Pd9P# z4l*tFKShZTlX>c5Od6r5b{!ht84(omNmj`39uT{kaJ#)yE7wWuIo_?jnD|u*SsD1w zOdD$%h7&F3hK17bBP{C77S!MoR?qTDh%cK%b%~kmGG>=vn{1it*lRX3`8P(CV8ldk zg@h5fcj+Z&O(pQS7bhR+9mF?9!@hQFyZh_;2Z?-@#@N=muQjwWUu510oE?oHJLHX( zpPJF+rE_s+<{dB{+p&VQT5PIBF1GWX`NJ)ShQo@=*<}34^D+$cc)UkH4F40~;WYf` z4)cb$xW;nz-Mhr=>E#*aVOO~9hmtB`a%zf&k4vgT{_xdbo*j)8H$G*CxIe%7ID9tI z1)a{QRK@O*CcdvJw;isY=BRyCE7kdTd}w>a>D%C}0l+3Cwau%eN>OXNET*RDd_^y+ zHeCFBjY?R_y)8s1RCA7q+xg04c7XZQ)jq&&i{|m4f8R#(*kHU2o_xy^Ug;z4yB3-i zx*R;&9C=p(+*^YXFXRec7$z82e{WT#F@pa`)Nn=wqL?BVj=ai4jgeimDB7IZj3cod zvd%)QKO?5JR>~7+9Ny_!{Xst4xjY#v_QikTCcpV{NFe6|C{o(Lk1;`56o0)*h^8JDN75J!Bg;0{B@|5e@ttVv5PIOsMLkIJexzsjCC%H&?JJgNO z4nq}lNQdeK0bbaE4&TawNJ5?Hbpm9mBKw=MGBN*c&+T&zTjBSci<{2tuG^wvX%_&D zsC;MEqCkJCz#kNXb%~UYweU!qOCzJJn|R657SrGpH9oG=A}l<(SL+9#7ZVYagYDqz zT<7rk%_v{Uy?rTIlE94kjCgf(bFl!6R%cGUyH))W3pesvFVte4o?Rthw-wA}cfN4j z0h1Jp(AWH2U{2l*lr^X_+xrCd+CWF5&D?x~+S@H6q%?4Y@lyvJs#MDtv?V3-nTbgn ziAWmZgn}CDvEhyo?RIct;*?jALfw-PLrgGneA$CY=?iPu<_~xZJ}fG)rTe5Y$%71Q+dkJ8K;9UEs1~8O22DqQ?BMN}rBP9u?AMwy5A|rpxgYT{i z9sgW|N@ke@0s`_xqU#Um*!KI=(JRJsDA!Xo{O$#&nR}^67(I{74t+DFRDGb~kDgAO zLUN7rT2{E}pGpxvJLG&BpkkH6lj|>_M;Rbv0GrXw*Hk1YPAzB0+@!2ZE20^-vW#8t zY0FuD=J2UNwJT03Y2em4==mU|E-PiuDx`_5(-4Vkox%f(ubx~6bUFx#ylL&{QW_yW zUt%{NSR?kpB$k+(J^4N2jcSb}lS+k(4bMd6Q^&hqWW@s%0VS%H#YvcYETZ=t) ziYw{r60X0#+%DFFu{vL%x2$@0)2K#J0M0R}i#rDalc!A5jElN!!8|hf^p)MLRZKba z>3vcqORWz=%=-=wHSi>J?;cP$ev<)*p8U^tS>Hxe&wf0ehJS|&e3U```~@%|DrykK z$;o{|dYjj5r<@Q0Cg5ayccW67L(w81>Gz2^{N;&GG=(_NBF=+XJxdVo&*v}we|gPy z+Y-?$eK7Yj8bg&7)R=V_8^1GRi9ca4H;Dc@+yAH_DnR1rJsg%vK?=^>o>BzORf@(*OIEoLKFxKX^eQV-Pu0k$L2Rv2Db09FwggMqc0ZBqMa|t_+5wSlP;c5A<_R4t~y@M%xi2+ zg51wTYyp=We?G~|1~uQb9HxdA2QnzXlx>tTNg$%bQ$EfCSnIF$vYtM%J11C8E>Z~= z&u@Q48W9dPrEx=28FMVipfT~b1kDj9?nb>~Yat*H=Q<3tE?3O;7LJ~8&%8o4E&8NR zZI^PbL6nXY=NZA=Zo6he&W1Xd>5;fcX$OT+2y$BGolFDhT%<*KI+8ZK{;j#D1SyMK z4_itm$e)%L_;_<-;bIeJThaV3p^oBJAO8xrS;o@kLuQZvgiQhQ5pJb;A)6bu2k}%T zq0jlJB}ivyn43f(R?0DL+aqwRLVh8H1k(WppW{jLF5PUjO%9@h-R*d>6DZt2Z2cX85*H4=x`DwBv z0Znl9qUC*!v|Db8bQHU@PPcD_4}Ct38=`+5r@3J3R-3p^6fxW5PC839TCS?$FulG& z#Ro80!hCytRr7%Tlk>&;+}Km|#b>MmPJ8j(FygS;Kx>Q-YO-7+!V+w9Gy9~J{A6-Z z-m%5eb6ew(YQ16q^)5k^Hw2P1%zDlr@i#UmS)*5Oc`a|(yAQ6ufLf@t3i%rV9ULE6 zE=IqM`xx{;Ed>c01Sw;~>BhCr7K0l_V-2hCbsb7-3pn(u^eeEdAl?WjdtOf8yU^Fp zrN-CWJf_UV3xta=GtoWMa8qsGroCG{XPO?FKc%`RuuWZ7W5*(aegNYn&ey=XNQRs8Eo7 z2%!NOk=UAC#@54!+;P3nymr%SWIFS(!?r0Nepd_++mi-3~RqX=T)%NyJ}yKErsPe?siM>Nk=s zMja7i^mkDNh-<>T|8Jc)JpQZSWxrjmacp5h5+gIPsx2~d$`425U7>d%q^NQtveP^e zU;L9uMbc(9dE9;iWVChtaoMUob*PJAoc#v_e%8+gLh(6fk*BWc#oK+xf79z57xi&v zf&n|}1L=t8O_{5~--%Kj3faKb;8&#JW6#SM@h4m00qTniI+##=2Hr~s;$2A=uK$`e zJa2m(^kiCS?$O#U8V`D+x^1UVb(2SIp8K+>Z6~LuZk!kEo-b2AAuYP)CU@eWe`|m< zva^1|5?sZ+UZaV;FJ`VT+}Xcyj~w7r**(?`3#PS0hS^(#=G7|4FLFh7FVi4T-yXbO z#%?ayM84~}!0Y}@c=8cb*c0<&q5bufz>OgL{&Iifb&yi4bTFgQI5A=C#~X}WZZZ4I z)pEqPV?-lM*uze_)1II|eL1`fg2w+{4kC)1dp$D#hr)`L^cxWrDWgB>?>a3epk;=Za4bD)DE& zSf<*3eP#Ok5SwP$4T;LmM;Q164^uuR<2~Z{6v3Hyo)5>T&V3IbMo^?RwkeZb!wR&4 zdOBgz&xN1&60yz`8($lB%3jH&;Tl^%1BV4Oy|$Pd#P7asUqPIHoT{*c#C6B@Z!s6! zHWk;ai6&loPw&Upt@|D()a&pz=&IB<$M>ZZP)_a%V5+O#3a8&eEe*q621B{gHXV?= zTd!BjSB_umy=+*S$1GNxR&X1KDzZ-0RDhY%e z$o{7WS4T@XPZJjl1bKTCu!XV-*xJmNijSS2U4TuH3SK1-8<3ZclZ#57laI>E&CN-O zgTvF)lim71X!r?7vpc$gSAve=H$))%&mFa_-0e+;grptK-0dwK+=PVG;80ft&cfGL z4mgJ3zcBw(r;w19g*Dj94FQ;<&C~@);Qzk}U2AhUD+FMS|-Wovs2w{K1s z2>;U}4krh&c#Vz<9E9~>AWds;xHPk*WPFa;5xnTbe-&wK$Rk)<+gZT<`r{cs0WU?6 Mmr;?fkTmxHKZ}ExeEPx#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L002k;002k;M#*bF003R( zNklZ|$XH@}I&!9j!&Xsw^^Q~Q}mO97rmH2nRK|J%Ru7a#f%ZTU9V ztlz-rZ@cZ;KD8x-mI6GBXt+6h_Us|$d0g|{>shgK1wXj+N9^3W6Dj36X9bKgXsv%{ zT(p(~Jd3a_3xE%N-~+t&4L?sRlR+y*s3LCv&;NW@&#fWoN-305O+^$!Af;?>(zVv8 zC~Cgvr%f?h3h*qV;pg}E_3_GAyqr?82tts{X1VwN``NW?*E4Db8qp`62>C*SZdn$V zWi=yIrDBm?J9jcNGK$u5f)2H85XTkA_x?iOFe3h7U7*c!>S`4{+$vAr6lWGd(j) zadsLLlgvE?&yRO{E~JQyAVuq!fNVAdD1Bf$OEnw{_CHte=&u*0OQqMmC>! zK386K6@7iZbLXiw+GvE3r={3u0xbnN2hgwr)oO+R_P+NqIzB-S=%45 zdYNY3GM|rp^Ln-pEhFuQC=Es_j1WZi3YCe2ASF@=gb)ZoX+;!91VKRE4+ukzHiFLX zUM{`-Dqi@am-5^jp390AD~`B!t@YDf!!w7L0-PggSb=YR;~RYV@Bg0m_I83Wpe>u@ zlOO*$>2&&p8Dgz9Q`1F;hDO=DZ;%5A1{plKpRv(F{PHkDP12byv8v=*bsZ-d*E41Bx}5C|33w`Z_hK6yRtu8Wfla zq6h+Cpz0E1EQ}H4(*Zk&JDDn{NP7`RgCVgt7!VSKIO4qKpIFDS{2#CUn zM<4tl_ul<&vbjz!+Hx5;Jnv?1y7>ic+_<3`89Q5ODZn`f+i|dM`?#xpp z#~-7;y&c<4(Vlns`(NG8=GA44ln6T(aw1R>1d*Up0c`|QNTdME(%4et*nm(VK}Q0S zf}O)XXyM@425l@F20&{KI(B^w^Ul%CDap}#VT_q0`3XsTdpn(-f-nqu^09k)=>9wT zmw)^S8#iCb4L9Dzi(mRu&O7hCvva@C_5*I=#PI8N!Z1Xfzy;7s;ifz`Uw9#&>!P)y z9tix%MTd%tFR_F`N`q}_ENMu4G=9?d zr1b%=DLxLax17R2v1$8WGuq=sfTUZh-OClu*VX&kG=JqJDWdJZqcoaa8%jaop zmnapnZ`Y$d_R!tjcI&74+8sZjqoe&9CkD0@;2eVx5{TUkAtg~1QK?o*XEIG;hy_C6 z*Xsxj0!`g_8J^9u<$?(^D2$QR0+*?BirHFFf}$fT-dGAZ12JMF!BQt32@_wAuHGr{t;YZ%SE>4S~qhK*<6lHHiPZTvqlSVDZn|0dHzGzHbO4gVqMev9K&jD(#ZZW$0g- zCfAlH+tx-lpC{Xv$8u7HfkxUELP(6!oOk7QJbC|JlxN3rT!&hvOfKKf+6$h8iUKOd z0`+Q@dbL8mR-;s^VOcgp2#QkRSddQHc%H;*DuZddOpUCv?ZjJ*vw@ZZoXaqP0Kt*c z5L<-`S}FW$m3pm)ibB3SZ1GjU3&)YTu1zZClF4OQ(VHcg&yj6wqph=@Og=|8pC^;g zkV>aWWm7n=h3nebZmb*+-Sq^OQUNQH&5f<&d35)$U}|Krd45;F=oPFv|DxCmBm+G5yx>zr(IGho0KPUY=MZk*Uhi9g_Z)GlSo7$iL_{Q zqy=d>Es#l= za&FriA5v?L<2oGJb(qP~SzOPVbGzm#fwU~N(m0++TW1&bN*Se8(+zT542v?s}=9V`iFGf&)7fO8E^A0MO; zgi2AZRGPnTWQ5=Ip7-$kfBZ*8k>UE6zntg2^0^otA>=&aZul07o6!tW8iP{v*4ZS2 zBc-HLsLKtt3dv>mye&X1-X@v{{xo$Xlc+IoOWsn%TmpAHL0XkrDlEF0T)FxsG0L=*%> z1Xz~E+6%U@`n(G%%}jA<_b#4%;KwL!n4GB-nPMvuwp0;@Vbh&3#>5t3-tQYiStt|< zgOK*FPNcNZ4Hw0+kxmvN3{g-=g&NC_g-Pop1=<*c<2nrO8>KK)rf+!{hxU%*xb_)f zaGH4kA|)ycyysuKJ0ESE^)AY$*&tYn!$mFiOF;12h7hFnvhf8s$j1U4Z<<40I1JaVz zDs`UPdXP%F#-Y8Vi$BlBY*mv@yov(MQTv!U+zU|{Af-hn*G8>cb^7+s6rnkP8`|i81Nfs*<3WQ;VkPTsrhob zT*hccTUQs`ezKLzvR~xVtDi%;R7dK=RA=k#+CIz9!vo}U4qd(N&5gBf+w6UEkm775 z4tG9NjQDtQCk(=;-OxT;to)V&oB?PZfe_sK$&VoR{1I>1^jRMN(u=v{j_)JH;%a)O zh!a!`abUF8Se8Y5dwcV>Qn^efmtktE&Sjn7UjdhR;y6=fqglW?6vidS^EUoS>xurwOGZq_p|!SHA{(f1g*} zAW_oeoi8b||IT-Dc&rq=Lr)`UuII)p^l^S~v_Y#mMe^%q3T2D+nfrL>FR!H*u0*PB zlx8DTrN~!*(#4p$p7y-NAPD>r$FWc+612l z;wmnidw;Txp}T*Lx4%#^U9@l=#l#G#)F$%T^rAj1lg>1=tH(tmuPO={9j~&!Z-zhk zjrAz|0(9vCf|`#%TjZYY4qK<5%ktGZLO&o1759DbaW-AFnkZ7tOcrt6#U;8<3j!?L zNixwIDXim&xS9Kdvy7GkoFW=-$*#TQ+;{t%c;}7dlzj`!5(ph}+k+SLs`q||ww%4F zgpO7^mi=bv@K`kDwO9_A9ox;{{6Q~WE1pAnax17Jm8l9(4Mu!t*Yg-yx17+gfshHM z$gtzF{YWXWooC+liBA|nBw64PFKx$xfurt)G2nO}LY{pEXt_YAfJS?diD{p&eEhBa z($!C3EE}aE>qh*?JpI;+o!QyUlD&?J!1FyBBv$KP5-SK0B z$$#Zd?|3cci7{*rQk+thXA6Ac{&hIL*Wy?KS|9siaeeVAUibX(Cn2fw>1uo%wf0Go z&)G)H1v*(61;Xaj|NJ4YZTmQDR@lsxG(GL`od>|a@LzfP%U*y|5temgSHmQ}F~}pj zvKYQBk%)U&uJVXi7c6BQH?>&vov$(*0|oe z@A121;Wb22h){}hVKye~Ek*-Oe2q#)L}7rJ$()t!?#ZB~01IG#!>I=1O|Qc@@Av_F z*L!)osb%DzVGrKkr%vJ%ot(sdOxQ-R;I~W|C1|cyj zUZJ&8s3?eqFp4lHrfH}!NPZt-w8m(SQXxhgj1G~)prSCY*HtPG!6w<<(65niZ)bLL zYVr4SUfJVLc?^*hw+0a6+)5nv2h!bgg@v6QQJBcj7tqK-h}Sc;Srfzfn2HZQ#NN&@ZT zSrN8vux&#}4t6|M=F&?CxZ?WjDGon`ZPzJ|*Euj0u;-A^^EW(1t@=RXQVGiSxb=^a zP!BA^2&4o*w5W#`jsT@WM>1KB1sEGCAc!pLN+yl1BwEFE3){A^Y=?BlJE_K1QYJlw zPPFVBgX4P1XSQ6RXAO;T<n5m%5laj~~H@XlY# z5CwYxkWygDxB~(-Xuk#_Q^;Tn5gZ2DaB-SDK+pl#Ty!5II{=o8(F&1~3=ak5oE~2N zbI+wRz5~aap)wmXJXB`qfq>t7vrjfx$An^D5zRcyW#V%bjh}Vw0x1na5Qj*$fl6JH zODn$pU?(5{)=FGApj0U1rqXDoQIVoru8_*4@zRUSZ2&l4iiSBmk=tazX4Po^#s6*82f~nC8kL`|l>2*~+$EG+7 zmOQeX#N3Z_uM2VH>YDPRrXHqU@Y0%1%PUB!DHV!r+;T1btJV^R0YXTM(~~^;;N5Y9 z+(lyk9^iOkE@Oy0T!<4SL7pMB6kr}?@_=kpps%NmQZacPO$RnYHUzEtts%j45gfrn z&st-dAPLPIm?wJjZgFN&XCJDS6R_- zQ?8o0v)d^^srj2=f%Ks>AK}Rw#>+FXW*t!&Hr<_`ffeLCx=@inPgoaI81r=RG1yK_ z1v%Snh?WA(L+k>9ZQDdj;kk)iA0f;qHqoZ}zxl5Sga`qDfn$PYK`k&m_LPg164%!3 z9xAZmve&V3LkFd?`w*5(WxT-SyA3_<16-p3C;enV_kBudqRfH?O!7iyGJV06Sc?q9~r^Dm&i&BCwN zIKR(u-o=vg#KTyQLwT~mo`VtfdYMQdlW$^s8vd&vTc}zqAe{8DXqBcM55>q{@`1T4ILz%%f~%_QYmcL!%JtG z968KWk34{sf`dCAqpSCYq*6|j9TrK=v&MEDs>SJ~t;^Z14QMFE=hd z{IaXL{ad4y%N6{5?6~;iV9uX-+5NiBTqcqfNDvqwy6x!H) z_Ah(5VvV6zi$jveK+02m1p1mJ$*+#(U;U}xyd{sa? z<5I7id8@x!z~x%-BA>S3paGE3-&x0!d1{p+-EtK%S4R?s0hQt`sf>%!8fjTnibWp1 z>-%%Pj4TVwvauYy8TE-omY@9i5q9l3gqO{e%4Espa-_5IcgJlq;Rdu>GO?h{76n z67kYX(KE1uzLl#{QAijBgh4o5Ssv4AniZ2Nx2&WwU zP;h>i#hS~&^$JW(S6SARKkeCQi$O~Pl8x`3-~2ajTs=adZEAsq=R$9nhb0#%QZXm^ zXTv=r>FN+FvKfb5N~3ff3pWOkhOyZc8wV;hnm&B)hgpygzx2EUb>ARt!OWf=4B)V3 zlcHWMVu@r^JwJy4AYxZ7h$N<=5W-4+Z^i$XHpU2STM!u=5ZIPP8HwY>pQVkYuQMQ< zhH9mP)(S6`VRYyq!v~(CtFJfC4jY4I+dSuGuc5ntIZ+rkxlIl0FgbjP@7{hJFTc9X zb1n*~)}TQ~Rmt{BHRg2~u%zVB*aWxy-#7Ed-?)WU%b)q)KucZ$8o2!0m-GJL{uqD$ z&Kjw1n@TN;8%doyff6t%ZAf{Nd@4jMlFhQgC_%L*N#~0opqAUjZTGu;|DH03CM-Vi zbJJ9Pfoo~{+7*!!319v=vGT-!e&ERz)w+ngK-(dfH29%FYe>1^hk|U%P^d^88&aOY zbp$tD>Jvs16GE0Y^4Zl)P0tdA0Z|yT^O5^#>+Fa}qb8xJMx(2GwbE?nHFxFE*42aU zx|FJt*#h{^M!ei6qOgh}i1%1J1QTFXL}Yx{td01E+#THhvA6K1_kEWBzGqemmb?Nq z_FLcn?!7$k;sV!QD7pK9L#?h!xr<>`9v?!)E=_yR!gVX?`kZItD~o!yPJ5e;Sa}7@ zyO!~lPx$=vrziQh&kNpg{VbbTD)x>zcsYqJ6@e1RB(sh<7_kNLLxIu)Wem0j^)Sf> zC(0m%q3R1##!wHTD<2^VKnsM@m_QTFb!vY|MN%kTJDQJF&7El6@ZahT-V{5 z#*!_F(OP5K7T^BfeSGsX@8eJ3R;N$_DIE%xc#y>D)+oiJL!muqW63xwWZ8mpMf1?U zRow963yAPQ#UqiFf?7qfVnv2MV>!Be;JmdVC)2aa9QA$f7ctjH8;F!hW`8w*b<7{e z-P#nE?I47;K#!wEG|o+qr}WXUHooM%&3ZGEkOU9T&V>0TsQ@}DY22}M5C8C2zsjG! zWgOSGh$65Ymtv(+sB)SRF#)Y3ufeXPHMnlXcOUNJvTHZdkqrsMx#AVuHYj8Bl`rk$ zsNcoK&LBjzGH34&1IICGTb236xkrRb(n`gMeM9CNhe!X(ECB0<%UlXmCg zJl-X#0Fqd^@4Mq~`JGqpVACp_axIPq2|L3~F&XoD+HPlTMLOF66_Cxq!`p4_uJgF$ z0*7+NB)$A&qMB_xeB~>Lcy!J8k}%Ju z0+^$*^!5NogRlrnyLtUZU&GX(T+>J?kOri5DU?oP**)R0KuAGnUVs(1N_lc@BR~K1 zJya?oRw9*J8*({^FMV~K^SgGic|BAs;z)+)NgQ(_i97m}gn&rJ-=#RMP}hl1=3HF% z=V6IifOyEWQZ>qt{0jc;7@>|^1EyWg-~@d0;qE!=?iqP_g3esL`TPE3ecW)V9yd_B@L}90n;YmURbAj9TQEZDycbQ1@dO zMJYo*Z*k90s)S?PxapcYwTg9Sgx`>a6$Q3+tSfa!+@5*kP8awEQp%VR_bm1OTnv_! z0yLh((3HVj_cDy|FvgJ282<9}-Q2Y;!RIp?eARgLg z^Vp-0a{sP&x~~5gsg=J(X9hm{)n0D-PM+QlgXcOF%29KM?Wv+c=<-~P&RmtJMh2MT zb<{bZTE(YU3fOy4@z}lFc>Rr2gyFm@vC}}K{B}MisQJabucKaH7^cbVk3Tz(|68^l zvqHmw>Cxe&a6TDoAtjb=<9Hr^txD+E&uJxC5}V*gC%4hj5$?Y0E`Igb-bp=x?Gu;q ziGT3;_G2Anya3m+uq{Eg7M)h1Ndu9BzHS&C&v7971y-%NoZ)gW-HcG53fQrAH?O{K z1Zmksp*bVNp~FZJCVO}(a|*&G&>pHZiKXwP_$N!dIWLA z_cMVdp#U){E#!+|xSiL&{`I6XIkrCb7{C63PckyPjIQxj`8cyYK^Q+H{0R{ARD#A!4$Dd0?rCifY z%n1RGon(P6LwBdbX;WB%L^_5{J@(=KS{)VEsFcdoDi!=%oiGfOIc9ScaEde2=p)*n zn1n26p|nf69-oKS@ut67J+=UJ;ywkT#@6xY$8`vEE7F;yM*PexK!Z~IxzB!<>z?x* zRBti)O{5HMIU6Yi<*JHVpr_%HNNG{26uIWQ7qI2hOEId- zj-A6W`(OOxD-R(pL8v5QD4tgMW7cHM;c0eiBd#m3ERfPP*w8%p>RRmB&aXl=KqQEK zLCqIb>Vis5GFui*7A*D;+kESu4AVu)bWt!<_Sm&&H|0{DN-bzsx!I0|6cWp_nl%j& zw{~}(BmI3T1t|}T6^Y~6gua06ifWCzxi7pdf)-Ny1EFX*x%QQ z0vH3;x+3kJIuA%nNv&36&DyoR{a4?K5Owwsm6_i6pS;;-qFMX@TW)Ff43QmqL>6;q)tOCS-X z9B9izE)7rYR|H{|)dMbn!7xSyX_G@RPUf`Tl zfM#nxt($b)Q$eGB`L?ZF866$vZEt@&^}5e3pZXNH-FhpXot;GUcm_%vy4oEowFsrm z+??K%M8n<6W;6WO``=GzXB(5lBkX$Q8@&7GpU|GOsnzwO>Up&R&ovwvarpdqvrLx+ zGbKr(EGbqkYQCWE$LvpSEF4GTNP{B%c9o=B z;iNX$(tbMp&d*6gx;G7v%#g%P*k zb{nsI-RnqaGVI*Bi$D3JKSD(jPAUb&4PJGks|^cKuIj`BoWjktZ6+rt`Mux&AH3zQ zZ)JLVn%i%?olR~3#kH4(RLl0FlUzzcrd@N}w{q+}nBmKRD(J{s$tIDeFssJq(!?7~ zZ3Oj@rtloSNFF^Da(+nEwxAvuR`m$}{5RI}%dc8Z5D6?>#Qj5!psN3!dDQ=l||sPda5EGm*aejE%sLoThLul%9^F_?nJ+ivZVg86O|xZND-%OZjwh zS_;tc)$hLRPKKWPE>aDn{As|(wF9On53}szKj5`L_lqa61S%OX3RPe7-7o$zANrN2 z_|7A5;)}DN&vB!Bk74>EM<5N&O3 zXdO|hNh}L8-du-=?hc1yC2E@Ple&?%&Ghs%uX){T`TalqLjZp8!~1yn&cElMf4hiZ zb+F{(7^cR6<3Mr7;(vd>o&WxG9vKhDW;nuin!h2QyDvw*ew+)L|2wTAjN)PxKZ^VR zy!nNo>tpPGvP2mAC_k={iF6ve8Htxv8yo;_wAec)J>ZDDXz$BJ!} zr8>W*OhQICiJWPzsn_bP80hAbOD{d444l++JJmmI2>)zJv-8gP^Xe^+f+fkMHJ$^~ z5;(5mi$D4;KKtou)~s2Jo9-l??V+u`i)=1OD&>$)Sy(8*;wxYL3|IGkfpojaYo9;M zZQp()x8MFbe&H8>E>WQQ7p$8c_jt84NsA4aJHGWzIy&09?z-zJl`H)HNB$3Y{_ux% zcXy+8NVz6?@9Roz-RtthM^Y^7(%813qs?OHzUoO+cP-1JTq<+XMHlhmk9-7xM<02R z|Mj>3hf4;Ak)DkT^rBrKtp%xe#h-twlQq3Aueus$%baotxCWZH&%_olRE8ilgeq2o zM)+M?Hv4yvB9eO^C%^=b4Qbbq?~zPbTy~B*q*4yHoutf+I(|fJp5;2`ypsPZ755y{ z#-NlUilVqLsnP^Nz{OiG=A-}gPpnz9rs?LME>7D8nwgnlMdvX6YbCQ|HleR+aLI&( zS6nf{p^^7e*ah{-qNuX$3$uiDp{+iY)q|T^Mmg#yTl_fJ-4qvv2x;?6ukg9!uD5XO zXa12ZpYw83o{N`C<9Z(Hv`jW`@y#>ZU^_P3wr%I|;c?#nj<*s7K41CL?cDOoPteoT zi6Ep4)gjWj zX-&PX2>iM0_l=;h(`KOCAcaPVB2YxB5sZ0~FoaqFeh9s*C535;5b-7`tV>>Ujn88{ z-^KoK<_J_8B|73S*@?C~u)H2Dw-+bXgOlpu!2Vsll!xf2xcBeQTCn#-&&e6Y`juU-o)@0R#Mco&Wp){+^4s zY@tvn@DCsTD0kg?7ujr%_U!cB8y5=+fAOhye&Km8>jxxL#l^QkJleGhqPR&{q;%4W z!61k*NF)MZ*#xo&&vlT(hIx~HrGT<;vvts8Xg1GyA<0M+4P$o*k&2#;o zld-4sEKb}eMjUY~8ZBJvb)PVbu&g*|Fg`lL)a2w5f}P9f7#<$sbD#Yz>({U6IoDr* zs-k-YPTK-Rk!m)K6#}wt5>wDbVbYny7=lP8Zc4&LY1mrgBv3jH*$mX{dR~9Y_|8>| zf=vU43#Y(fAX#=)((W^bCN@28b6TK1A)LaBPq>>w@vQ6Kw6TC@o|3d_kW+) zz5ey6DB?4>e2V|P{R?C=DT1=5Gp`rjL$d<@%m zc<~Eg#K7|9bai#{(wDuA)Jb%#J|hayxX4^S&yepm(}-XcZ9#byQf7xj#Z++b*`7LRt<= zYoukfYSn5Y6>--+cT<=xuyXkdUi;eDHrukC?7rZ%Er2DhBi#fO3tA>8sT9sYT`i5y zYYUfq#~DgMLzq09IDsap)D7k8oCr03lJi25BAMP+DhMn&&0oE38l?r5x}+Kis=lOD zmCTeZX3CP;ip6Z%VxnN7l;+RgC!u&Nk8Z8P@kk~WC4(~N z*r!t3Shj;@dokHgN`#bnwnJ}s2d?LF`0!y?tXz3&iA!^eoZrSCVDNB(N4{_|uY2wg zwfY>NT?nX_4Swy+upG}0M7&Btl1MUGVlJU1Wvq;iEGGi$wU|^^szEj@$meW!4|h?l z2(H~YN}(JloEEwV>8v1?iLFaIW7xLW;r)NNjF0|C8rMpC`G^J=C<#-BV06e}xtB3> z4Q*Z-%P7)zopPAvaCI$4$XEevNzFHC6;KQ9Bo`CsY-~#-gifdo@oROzPNh+H_J>n$xxb zj^o5R>t>13TwFbs7KFYz6B+BXggI8GGN2+s*tnv3iKY4XRtgItpd%MYR>Eos!6fCP zP2G=u<>Ogpzh-b#@ye(|!{2Eo0-RO-&liVsP3D zAf<&i&VrjfX@Q#()T=*DRv^awXv&EaN-+s}uGggzB$ZIsqOMs8gO^t9+?V0fb?sb# zAq-6_lrpF$YdBVtw5tgf+_S%*C&oGm^e9@AP?H5dvAL2-(r|v}ef}53p~X_EM6F&! zN()O`v9Jdr1R**KiNYFDP)|-mBBX_My0Dxyt{W%+ymT8<#!a(auMNk|qE(3Pco^Fu zs25`<2yT6FgTsZwhXqMq#@u^%yov2|1F!L$Jo!0hxf&sT8ZO0 zRBCl<)fyO$Qc=8#j(nof2V(!*aWf!nLcc^9)LGS6L8}RN4noS6@d#JxVB0PrP%0n{ zs!exj{;i3Wp{FZLXFkK^)Ce7U3l+`q))&{pHHJNNO59N0Rbn zlV;I$afHA!hQotQoIrqh-vlS-nOM;_D|kTzI0aai=H%nF?Hydb}4#|!og<-0i!`Pk7)U$m1sa|}g>FEgK8iq(FRAobybZkC)OSe#D zB<}U^6V}TZqvKUuD}q{)Fs$QxIlOc`Dymbjmr2_Z=dbRhTrTn}FDapo;L~?FOcy0n zg*dWwtN=MgX=Wh{B(JD7uVdLBQaT7>lg{QIy_fmOl%E{uMhdm*T(qNSBA-^Z94l`A}t%+c9E7%TU$GYVu7j2 zNxFM_7HtJiTLD~GU_^!>gd~x83{H~F`O}U0o8+g}d4WM-%&|73!HrKl6--p7UJa=l z>llB&vBC=>h-;WqFI7SD`)UQx6?F+hFa0U}W0h998yvG$Bu5uq;8X9`N|i{Y1*);a!3^ zy&|qtc5SHnhW31x-+c21jBuDKMOY#Z^V*KXZ@hUqDNk_Ax9Y4vZwpG9BMvw*Imv(g z$LD$XufHb_&Maao&gokK0U8&j;}2V~i=BO@Li_l&xEYwmQwOWm1B)v* z#5n^?#=}G2`|4>@=>l!CL{I|PS%s0y5yB#>jWBxPE`I4MmqWvw**6=IaYK}uORQ-X zao@f7@tW7Zj#aBxEozF|=_x>>V3ylX6oKO{%$->>vQJXNC>xVt#M4~7NtmZH>4rSF zfLHxngQ@bi86v!eepoO>Cj4w?KO^V z@ElEBTG5s@v}HrO+d_KUG~MkHU2X9w))hSgQBAU}vqERSMn^ut2t!Z>M}ScW2s5w3 zh&yV#j)dZ&1^Qq*2kaV{qO%>R;^mK=yJ)^s|O%SU0CTj ze6^G${R9w#X5or>nm5*K6&%~ebz@4UB|&S6MG^ZvN|mO?+?L z8md8xtQUe{!Pe>87)%t!w1<-9EiW14E!S^nYOI8=7|!d2|M`{-S6{G#|MNK)v`YFQ z%~@)l@Rw}c;^4?EL1dV%WSJ=jU_;gSsMaldI}~q!=_L7#p|?ZPkqha{E8264OiGdQ z3@J}1h5C(3m$mB7=!$NiSPYeYQwfs>Z9YGYskL z@MIZnB&n3g{=ElCr!yz@tWMhkAVAt}D0TdY-R!Wv1Qf)WcoS?eCv<^~0ndTmwQKpp z*PcQLlXP`<;acE_ir;x-3EL7>s&RI`ucN|yU-2j}y5s=2-E%(o?_Lf-+KXcD&QZs* zq@Wf^F5Xb%4bM5i=%HfFpOTVl%}_2^dEJ!N9CIh+v-fXoo-CgrW~pXHB#;XWRG zs-OS3=K{7L?!j{uo~@2?i?oK8v|v?l zo!|NSF$Q{~xv4b9(3#f^^ag~XL>obGM~!8j)p$&7)t*Ouo43jnC;DQ+ZZLftjf_ZI zqs$EsKlUbpG~=LCAT4wdfs7+zsy4>p)L|T1!x(|o-(q zMZCEb;0FTFGg!8uR0W`dqqhhVo<( zPg6aLwJ2>twNT#u-|Y)!oD+l^Wzile}&T zgJUa%FlZxV7slu{tZ zol0SgxYRb%nrf|f((-irE)d|Ra#ZUHYjXh&P)E1h7vQ?FnLJZ10nZsUI-}93e>mRi zCP0BLLM%&?@>2Z58{f=jSKUN^?axu=&&PAQi0^9<34Zu!hW@UQ%Qpv|MkFTzWK;H%5|4~IzTDG=2bOvZk2IATCmx#B?a}GVSRs%%idIlz$XeVs%7gK z>b6MExPic=S=BbP#3?yT-S%OHCc6{19QW&o{siml3bU)Htj7%4K@4B!6Fcev={ix>U4PTK_nu$?qv zg#~>aW8w>%SK~q^FK|-=qrtC3z4Eh_BoiWLlZKJNwT|zV3IS77ldRvAqAg=HGh3ps zw+&x^jOp1P+KV5>2nVG!?ODb1F0Jv&Z{$d&43}J7r!r*|Rc+cb0q=bAR&KiRAfLbI zLLS^ZK(Xr3+Zm#&rMShWePpK1n7IDdPJ4)SCzYy=@F$V-3z!2>R#?q=2U%cvEGVn2Bv^VYJ#v0@pC zOKj)%3J3^wnovh*;thPYT0?8YV~;+<^z<}cU0sVxhMkrIG^h_wDo3Q@=+#anZ7v$~ zapQzW%nxde;7VoUU4OOov!eu!>ak{geSu5UN|VdNzx?ChQUBa9fAk0MWz(kfiToOq zC57+Z41BbCAN@d(%P4;5EwjAmull%opUW@3szg{31fe91Bx?tX{Nc~v&yK+!zI^|B zQnrO~Tr9@|t>#s1Nh~jgn{UU->2GKpV4%+MZD>y6TIZPRVsBW$#{d5HuXA;juptarLkll#}zoPz;;CJs*$vOQHH>e z^8|Y*yXebT>CE`35JI|R5+H(9%Hz<`VXnF6THg1*_ciNeNOI)H_Y!Zl`QDd4gjf0k z@BTSK+B}JtHfcM+4a^W}B6Z19nmpE8yh1m96QPU zlcJ*Yq`EzR;UzT&I-bB5Wze-G0Fa>;byL$0g`z{DV5lVHXKhQ9OGRX4iP~%lKag=3 zh~!4iBYGx-{{(BhW{_wirKv?(rqo7kCm@s(+qNi`D@U}tT=a7~y~muyiQOE5c0dHp z*Bb7RissybR8|}@z3>QGFf^;9g8EOl5;SU?7c<}2b4)y7LRu^z=;FVC1S|zTplGz0(i!)*Yyi}TUWP|aKSnlRmgSjbzmp*aJabqBp z6S28Jjb1pF_`>g;X_CnPnL1 z(&$>CwcyT&^Q>5=dBN3nR`mt+bcEzHI&Q`#lD3OshzZM3t09RnLg0%GwWy0yEk&Vd zQ7S2dK!XmGMg#)Op}CQ$hc1;MO-HH}H>aE*NlG@kLVztbwiRc_LnWvL4qtxa`D`0r z!G<*hT$Kes&^V66*!U#Vv&FdH_#|<9o8Ux3)9DPg;K*36*5D^AxtkKCvtrTBrm}64 za-+4%PoWaPyz!KOBBH(?$u)( zUUPGWo}Sa5f_^Sqy)yY71bz+J0*^@rN0t4??I>5{Ye+h2idyh``j46`UI zq;CV~oM1aLUw>!5qn#Y4(QtnH8b~eep2u#6(>r5V#)>SiT)oAqSyilsClp2%I=Db! zJjUj6iQt!7U9F~RT8Lu(Yv?y<|}{L zHm8X&uWiauqgb3ov7@rSRyWxwW{e%ah58IjG3}p5!ZZKtQ|YRum9!J;)gvxAzY;c( zXPP%}^&MkJMu#xVX}=*im6sxtx6J(kNWiF-Dbjg^``aD8t{JCe2j^qs;@fipRkVjG}jKqD|~-4~5}vD;aY|Hnb(S*d7?p=<06Wlqu3TRp3`Y5cz0u4r3|$&I zS$%BU4J&Orx)_Olge2m3d64lG7d-2#+s$2)yQr_uMg=Pw+KD}v2zFM%Mc!ittj@N3l=VMme~Y&gc2y%_hwABa7cmyB8< zF$*mIIteh;{xmCr?EFz3RfO;++JlR0RRw!dPLj(Z1K-|4L^$h%`NxNEZ+EDm{k{B8 z_jQ_m)meIRPfoT`5 zi78Sxeh)y+S6i;1Ag`AbQAE3qdg;W-RbOa!5B%%7sz+Q&y4PcJv-bVP< zT{jV{%{uXfT_&H%v!5VTk*-8)tT#FS?ZBIVs1g3Z(T4Wj!s3r>S^4GHN{!K!v!P~r ze?N;}#dMR!35x9|(rGy|A=?kFZOu`-pQlh>{dVC^>M?^!h&yFfoyA%2q7(yHUMg{jy%1^Xt&5&uz;8yfQ|; zoTcq=t@xL*ZsF@+huJ$KKE{5B{O?`*QhTm;eB*<>=~6Q`NJ_JgC07aE>RH6@DwsMh zp2=RHPrdJEbrYKIoAICg@i~wrP0`LouoI~ONWuMV9+)i{k<0soPBZjoSKG8S$hFrZ zakCZDXS@x62iiybU2#5$5VD#ivj_S78#rEhG$(vy6w+UV6AYBW7k^8%+q6iSkl|~) z?X472OnvZ_kI@mMn-5FN%aaPOR#x%lswdJ4;dTr?{mP_qV4sUE9|J&E9Dc6e`=Z%H zWd%Dk$-xwmNi?C5XhNr_=3B;U<{z= zG&|BmzW5@%b7N7zzjj>gBZHbfejV~t7@M79Ky&x{(@8#+r#DGUVkgj7`l_cKHvGL0 zfE?@!W0~J=2p0@(!=UlkEqy1Sg1-cl^%t<(W$UdGyTI;w;Zt*kKW@A|()r;w$+Ca| zwpnLGC|_Bs+0R1>?C!OmAp1v+BXVU`(jBR-2J`+WZa zZ|P#)z0aKELRZbp8&=|0;Q*-~49w^cL4bT3JL}q=8pVZ|Ufd#0IX_+}1ps#A!W`1@ z*81x@iq}wTbge^%aKBo0C5U9k9Gb35f`H#%8~Ou!xq6!I-&iYYB1_q{Nd zkk@;RE9o+Qg6ZG$sKnsl9yy-p9>39PIU>~l zLbmr2ODor207XEeJM-KXJW1vwE2$fv>uMwv_CtgePFO_hy+`qt<(gt#${k&2S(pP2 z*leN>_q~<WM##!Zq65oFh<&2pH57uapxSfqyb;%{Z*kJtTS_O&3K?2 zf(Kc_lAfU?+Yi;7qRggAPOm41kG_mQ1M;&9Y2gfk-WvAEI4&amxb~~sJPgdFkIM|j z@jTfOz+Mbpo2VhK>>Qf1#LC5lT8Vo2!>xogI?`|M(Y5A_-Xu?g(=U{%kvQA3lM^vB#J|yApm6)>wd9MtKn|bK zs|}9J143yn#S80j#$C;~WWrE>Tb@xo`T!UoZ5-c^kN-wlblAf6rpPz*VZj7Ju82%f z%n>JM1>+D`gq}FQ$9|AQOP)eLJAoTZo}U8MB5!KJ$$%yoSb+e>?H_hJJ=F>jztEc( z9;r{0)ms-2Ptr)1-gnQ9AqxmIebK@ri6wYCM-&TuB=G!&Ezm%{(_gXj$2s`Xqu~;E zY=1<4env|=p|g-EDH8?^b0SNEu8GarFZAwSj)Qkfw6|;Yeb&J?HbK>)@(c{%qPc^+ zAAZ2tcQMe+LW ztFLCH0@Dd6M1em^K-yARo}`UckjH_W$3(Lj?Sgo$#3C%A9cNKVDGrnN(-o^-j%s3@ zdC2o?sQ=hFb#z)oufxC;#4&_cCa`1-7GTX_$=WS9nK%n_@0bWA^+k<)0I+=J@t?HO zC_^qtSrOKhq--?f$xHXDit6psd7lgfdokJelNCn=`w zV74+xqu5xVpyH5Wo_73hc)e?;MS_8voLoSle_rfzx$TwLqK;#57b)8jM^>LY@*QDk3ll#6EB|im_+EqO^L8cKD|AR{RC!`1p9N zzr(<`X7PyoPCD9KCEVj@9b97oRs3Z$shGSa@Y0)NH}*Q!r%-|=xQn0Yim7ruQlN(Z zkMowv$WIQUlo}#3*JSqIw8owGu-OrsmL>dY8usY$U4xkP^FSK3Yi-3Kpk8{8;Rk^B z5bRN7#Z5kt3bgQcVH&7i!-PVRyBSGw>iAthZtbMOv zJxi39>11`PzkQkeh}0d8_U9ha!^7i{xhtGYXu4y=XTPRoq{`TA7bM420Jcm?Pd9P# z4l*tFKShZTlX>c5Od6r5b{!ht84(omNmj`39uT{kaJ#)yE7wWuIo_?jnD|u*SsD1w zOdD$%h7&F3hK17bBP{C77S!MoR?qTDh%cK%b%~kmGG>=vn{1it*lRX3`8P(CV8ldk zg@h5fcj+Z&O(pQS7bhR+9mF?9!@hQFyZh_;2Z?-@#@N=muQjwWUu510oE?oHJLHX( zpPJF+rE_s+<{dB{+p&VQT5PIBF1GWX`NJ)ShQo@=*<}34^D+$cc)UkH4F40~;WYf` z4)cb$xW;nz-Mhr=>E#*aVOO~9hmtB`a%zf&k4vgT{_xdbo*j)8H$G*CxIe%7ID9tI z1)a{QRK@O*CcdvJw;isY=BRyCE7kdTd}w>a>D%C}0l+3Cwau%eN>OXNET*RDd_^y+ zHeCFBjY?R_y)8s1RCA7q+xg04c7XZQ)jq&&i{|m4f8R#(*kHU2o_xy^Ug;z4yB3-i zx*R;&9C=p(+*^YXFXRec7$z82e{WT#F@pa`)Nn=wqL?BVj=ai4jgeimDB7IZj3cod zvd%)QKO?5JR>~7+9Ny_!{Xst4xjY#v_QikTCcpV{NFe6|C{o(Lk1;`56o0)*h^8JDN75J!Bg;0{B@|5e@ttVv5PIOsMLkIJexzsjCC%H&?JJgNO z4nq}lNQdeK0bbaE4&TawNJ5?Hbpm9mBKw=MGBN*c&+T&zTjBSci<{2tuG^wvX%_&D zsC;MEqCkJCz#kNXb%~UYweU!qOCzJJn|R657SrGpH9oG=A}l<(SL+9#7ZVYagYDqz zT<7rk%_v{Uy?rTIlE94kjCgf(bFl!6R%cGUyH))W3pesvFVte4o?Rthw-wA}cfN4j z0h1Jp(AWH2U{2l*lr^X_+xrCd+CWF5&D?x~+S@H6q%?4Y@lyvJs#MDtv?V3-nTbgn ziAWmZgn}CDvEhyo?RIct;*?jALfw-PLrgGneA$CY=?iPu<_~xZJ}fG)rTe5Y$%71Q+dkJ8K;9UEs1~8O22DqQ?BMN}rBP9u?AMwy5A|rpxgYT{i z9sgW|N@ke@0s`_xqU#Um*!KI=(JRJsDA!Xo{O$#&nR}^67(I{74t+DFRDGb~kDgAO zLUN7rT2{E}pGpxvJLG&BpkkH6lj|>_M;Rbv0GrXw*Hk1YPAzB0+@!2ZE20^-vW#8t zY0FuD=J2UNwJT03Y2em4==mU|E-PiuDx`_5(-4Vkox%f(ubx~6bUFx#ylL&{QW_yW zUt%{NSR?kpB$k+(J^4N2jcSb}lS+k(4bMd6Q^&hqWW@s%0VS%H#YvcYETZ=t) ziYw{r60X0#+%DFFu{vL%x2$@0)2K#J0M0R}i#rDalc!A5jElN!!8|hf^p)MLRZKba z>3vcqORWz=%=-=wHSi>J?;cP$ev<)*p8U^tS>Hxe&wf0ehJS|&e3U```~@%|DrykK z$;o{|dYjj5r<@Q0Cg5ayccW67L(w81>Gz2^{N;&GG=(_NBF=+XJxdVo&*v}we|gPy z+Y-?$eK7Yj8bg&7)R=V_8^1GRi9ca4H;Dc@+yAH_DnR1rJsg%vK?=^>o>BzORf@(*OIEoLKFxKX^eQV-Pu0k$L2Rv2Db09FwggMqc0ZBqMa|t_+5wSlP;c5A<_R4t~y@M%xi2+ zg51wTYyp=We?G~|1~uQb9HxdA2QnzXlx>tTNg$%bQ$EfCSnIF$vYtM%J11C8E>Z~= z&u@Q48W9dPrEx=28FMVipfT~b1kDj9?nb>~Yat*H=Q<3tE?3O;7LJ~8&%8o4E&8NR zZI^PbL6nXY=NZA=Zo6he&W1Xd>5;fcX$OT+2y$BGolFDhT%<*KI+8ZK{;j#D1SyMK z4_itm$e)%L_;_<-;bIeJThaV3p^oBJAO8xrS;o@kLuQZvgiQhQ5pJb;A)6bu2k}%T zq0jlJB}ivyn43f(R?0DL+aqwRLVh8H1k(WppW{jLF5PUjO%9@h-R*d>6DZt2Z2cX85*H4=x`DwBv z0Znl9qUC*!v|Db8bQHU@PPcD_4}Ct38=`+5r@3J3R-3p^6fxW5PC839TCS?$FulG& z#Ro80!hCytRr7%Tlk>&;+}Km|#b>MmPJ8j(FygS;Kx>Q-YO-7+!V+w9Gy9~J{A6-Z z-m%5eb6ew(YQ16q^)5k^Hw2P1%zDlr@i#UmS)*5Oc`a|(yAQ6ufLf@t3i%rV9ULE6 zE=IqM`xx{;Ed>c01Sw;~>BhCr7K0l_V-2hCbsb7-3pn(u^eeEdAl?WjdtOf8yU^Fp zrN-CWJf_UV3xta=GtoWMa8qsGroCG{XPO?FKc%`RuuWZ7W5*(aegNYn&ey=XNQRs8Eo7 z2%!NOk=UAC#@54!+;P3nymr%SWIFS(!?r0Nepd_++mi-3~RqX=T)%NyJ}yKErsPe?siM>Nk=s zMja7i^mkDNh-<>T|8Jc)JpQZSWxrjmacp5h5+gIPsx2~d$`425U7>d%q^NQtveP^e zU;L9uMbc(9dE9;iWVChtaoMUob*PJAoc#v_e%8+gLh(6fk*BWc#oK+xf79z57xi&v zf&n|}1L=t8O_{5~--%Kj3faKb;8&#JW6#SM@h4m00qTniI+##=2Hr~s;$2A=uK$`e zJa2m(^kiCS?$O#U8V`D+x^1UVb(2SIp8K+>Z6~LuZk!kEo-b2AAuYP)CU@eWe`|m< zva^1|5?sZ+UZaV;FJ`VT+}Xcyj~w7r**(?`3#PS0hS^(#=G7|4FLFh7FVi4T-yXbO z#%?ayM84~}!0Y}@c=8cb*c0<&q5bufz>OgL{&Iifb&yi4bTFgQI5A=C#~X}WZZZ4I z)pEqPV?-lM*uze_)1II|eL1`fg2w+{4kC)1dp$D#hr)`L^cxWrDWgB>?>a3epk;=Za4bD)DE& zSf<*3eP#Ok5SwP$4T;LmM;Q164^uuR<2~Z{6v3Hyo)5>T&V3IbMo^?RwkeZb!wR&4 zdOBgz&xN1&60yz`8($lB%3jH&;Tl^%1BV4Oy|$Pd#P7asUqPIHoT{*c#C6B@Z!s6! zHWk;ai6&loPw&Upt@|D()a&pz=&IB<$M>ZZP)_a%V5+O#3a8&eEe*q621B{gHXV?= zTd!BjSB_umy=+*S$1GNxR&X1KDzZ-0RDhY%e z$o{7WS4T@XPZJjl1bKTCu!XV-*xJmNijSS2U4TuH3SK1-8<3ZclZ#57laI>E&CN-O zgTvF)lim71X!r?7vpc$gSAve=H$))%&mFa_-0e+;grptK-0dwK+=PVG;80ft&cfGL z4mgJ3zcBw(r;w19g*Dj94FQ;<&C~@);Qzk}U2AhUD+FMS|-Wovs2w{K1s z2>;U}4krh&c#Vz<9E9~>AWds;xHPk*WPFa;5xnTbe-&wK$Rk)<+gZT<`r{cs0WU?6 Mmr;?fkTmxHKZ}ExeE -#ffffff \ No newline at end of file diff --git a/client/src/favicons/favicon-16x16.png b/client/src/favicons/favicon-16x16.png deleted file mode 100644 index 8923661edfab8db4f2751fa2798bd14b0ac0b2b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1233 zcmZ{h3rtg27{?FK@epBV6EJLIm<*k5@2!1|yM+zp(GH5d9k1C^ZreL(3-s0od;}OW zU?^L{7TlNwG9fZjzyhL(Y$Oc9jg6rO45+A6UK40pX-i9YYL<+dEIHr#&Uer6|Np+5 zQyCW<<>9u=4FKT5<%B1|>}3lV2e=1OJQHDZ6o>Lc0qCr8Hw&C#ZKp_x3Ipmfzj;{r z3poiq0Ez+uC@urQ1V0te0iZ+xSl|PI)dAq0SARABU8t*xi%E*GTCE!!8;eUzn-;TS zU2ifOhkhC!9qtVgxA@k$>9Dz*vMcp}*$z-)|4s=w+y#MCc#Q_TgK7U-^KKk9O z^4u7uBICC!@(rWTwDxFyWy-kr@bQD&GC^3-8-eG`>5ErA#v6C^*7$vr|4v~}h`N?D zIWe?pwXWVdKHu#<*SmMRJ*cn7y`|Lm)`eGYo`3zDlE?~WG>M00B(No^lR;$xZ z7A<#!g?6ym2^KrRbj!BEZzZu)3+ZzprQJ-hG3?xM5h*KWW#Fr)dXwY5VOSX}sqqFB>NAao2nThEy zsYE9a2@?-GxJd|s|84-%-2#+Wc3TFVd@mXCA(<^8aZFf%!vyFE%BCPJxROv5W3VtL z<1GZi5ae^e9l`$*NafjtsPO*j!`!bZb@G*w<8o-Y3r8Ui1iW0FKE&BCy7xlk#^ zWh92hK~w?I7Hc2v1?G8A43pr5SV96cnC=M*Y?FC!@%e{2LS&N?8#2+h#|0w3TM!;0 z#mT}v96XE zOS;Lep^KATN|~rmN$EJKgC=r*dj8Mz?|+`>|9ron-{<*$Kd;aG^Z7pC@AEtCLEEmS zVWa^7fEI;J^a4G6$)FJM8!Ht44LVgefl2@XS&rsBLk(Q3#CmOa25P!sAC^ca*^3GQ zLNfpmi2+~^+!DP9fH)KYj0FJz{uBV{M-|`p{1ps9g59G76} zeyQ5Q%g^uAABtA4KISKSE^~1X-leXtm)A>u(Os%NmSMqt^9tM5P7B`OQE=;V((D9G zZ%uqT8T(XK_MlFw_i|*u>vPkna!*-(|Ge>*{fYjT?Jtpmr32v(@e>pQYlev25;lSf z2&0{`BUC3FH^=GMMyE?y1=3v}go2)_QM<%3t0PB_GEV0pEQQvs=4X>1&UHYh15Qp4 zPI%m(gZ90ytKWp!qkzB1lFLPbIQi<~gsh3=iLdm>Dk3`yG))90EPk%dRcs|RRG`au z#klAj{whqfSjl~QgLD1Pxt(bwr3uA@9hH=!REE8{UDxJIAD5GBq6M4XSlikJ%f;Gc zIs7E8&oSy)qqJuj$n)awyWxL!(Pp5B_vZSus6nfnmj_qculptok|~<#I_9cnW*W<# zjGLaPj+3+44-&HT(mudu!Zd9X*Mu z^b;2D<`V5~Ktg2Jz--E6rDnmD3juc^%lH6Wg8K8^^OW>fZ>LThjuKMg-+KR*K>@Rf zR^2W;ASg7-8DI}uOdEL_?S+*#%&+oAmW(WX7G=npr%me%oQH#b|2E9e^xs{7t1dK} zV|uq5xi(?Tr*_LK^NA@%9>FbKN8&*HscvD&T*Ktqc+5LF{R_w8E=D!uNu^-CH7o0F z8|LV`Hxiv}ryYbwW-mu<(M%fYfMq|jxeLA9A{{zknkRgb+H$!UaaKO&C_;UOHn1Qw zP2%1Y16z$J8yo|r3d(Vd_L}fB1@sMNoRZewi2Tk({5Uqk7Zc=W;v19H7PJ@fM}?Br zwfEDl+Xin|%o^CAnw+7hQ1B&*x-DVzn)P4IN-QKghN_6+KRm@JH}7t0&1p`|{pBQ9 z(=APwe$Wnk(~0EcH}rcq_uU$j9)mquzT10fWdyzM%3H4wA>CxYO{pjEs>1(ur}5*d zv1hc+;^&mR{d2Iul#-i+@Kq|U@uhC+&d_Ta#Pt4-^e&v5Rgr7{$F+eM+`Ct8O=zN5 z^mNQBU>5y;cWS4WCB)r!G0UwAtcMnJlV?8f^|a89hiPLZdU{@&E3)J>yFP3%P=OwY zQ>mBg@)lg)##)7}H!FHHl(YaovcSJ|!XEtoVAXHd1cM@&VV2?WZfQRP)!^L{w@pKB zBjo+&eq2Twg=Lyrt-RALHnucrxSy5#*esdM>-seE zH$wxdx(-*i_$=#ug2h87b{Do$=T6xR*FVnI9yiM9z7#%E*id-x-9%aSL3Hu5oi6uI z;f1il>jI#>Th4oF!u0dI>ITzvwmz(r%H@Q+F%7z(A+-_WR1!Cp8J29<7gD;2ktS`p zpo^E?YQnVz%-Z_|$i@B1d+d^r^xn6S_ClEz%;!fN$KTFa9x^fJeLQPA?a!a4S3ZgB zMtg?CE8#RJjVsh_pKgwZyN=Iq4QOgn(v;f1F{p2(vv1DTX6%E>NtCn~)gC-0BfLe6 z#ufV}17^u%qla)WK`Fz=P!stm?t z;#}=oPhDZcQ~MK&pD)fJxb=tf&;f4qPFEDCtG@K|42|%yg-4-|!F25Z zCn16t!VOLQ{|T=N7bRchP!KR!QuOA;MFivVL>@CPf)&Zf<2^t$ z7C@g{Y(V~t`Cb!`=dieJ4j(|iYY{#oUw14SPy+H~g>}2#EZ8-~8k$_{tD1!Af8N zpf&;h(HQA<4(AG!l>~g7AUk-SP?^fXlmGx91^^%^3;?))6$R}B0Pb7>z@ZTUAp8jc zAau%URTF(xAe$)2N&{a0xe7YUQeGvfPIB6=uUzh51R1dv2LLEkq0-(<7pX@H)K4)8=rc(B)$|zv?Xlxa`;)L^vJWhS_YfSkhi4m3Q?E+dpL~ zcWQ?ywk+H%1;pTn47`FR?w0p%dkMRSkC&G%u=ZM=XYguXu9xn*BgOk+En{=vmKw(q5)O5mId9?`sObnXU=>mJw4!=!74?tG6Qrj9b;|yk6`&=dj&FGBW>Jj{k`9K zlb1iv_q+~SRnFGLA1pE6ya{x~t=aS|;()7c3D#(LYRbsmK{@*j3LY`}%BI01OOwKw zGMYp@UMH4D)21pVgKP@gGZ2DwXqe9R_zvU8c#RV@?#Pr*<_DVqy zhXg;vWl6g1A$ZcXG06YW(v9T?QlBk~$LYkxl$EI^Mbl>Ug@6W)8se)nl0WdvT90Cn zxMls+_tnnJ-?^&}$ka1N&s5xP9eT>6>L!xHMx^Su8T*#{dBq_`uJmk)effs~POpg? z8T`hygq}3>_}%;WV@e!_jh&@6(^lcLX!aQCrZXafiozLtNjDt{CKYZgrd`aq+@=^O z8YxUZ^>M#-E*s18cSR<}BJH(vyms(A&&M5cBdEtU&_ku!0%Ck4lwD+>j}$u|F{;uN zQbPtZ&3DVv`O9es7SAD)Vc50x0?0Uq1c44vvZ0Q`mX)`Nig~^tGbmneavrY@u@R5z zVI^-l+r45BGKpV{sibmw>^g}P0moh~#Y3|9(3Hby>>Zms(-1=DuZ!lzo_{_wLz?VE zPh>x9z9bp-&AY7@<56Fw`*;lT{p1s)L;W*W6?!1JUQPGrMG~ktq_1Bk3A9^cz~F;c zPB2o~@v2&Jd$j%#m>{P~l}X>L)Fa9+RkJnJ~lVnwDGgwHZLipsa{2*o$a@dH5XR1Q&mRr!F*!hHn9MM$!izRWW z$mOCdNDWw+WP?fE9@{^Z936>5?(kxUGn&r!8%8Exmyz1oeNamu;Ug)o=7(E?ArCG_ zOp0JimPShrc?Zq&6&o73LyWgCiUZ4TWFxlW5@!mO2Q{oBAdaczQO!Jx_|zdMA+=eu z*2EQ35Pe22UCgbKhNNgc3u%1)o6bh$`w_|U6M36QeM$91crDVja!hC>O|eziT`*14 z-im;mA5{O3+0lfUTRZ=rp)Zb$vz9If8JB#s(^mw6^3sS&wq`t+dHO)1(wbjb;@dKJQ)NTpP z8oqXrs9(RC23z?$50A&_I6LkT!Z0DOV)>{-L?%} zTY#0lNtab?{3KCBM2~o6!s-gd!nkF_NS0!Umof7%Z4;I?N$G@D6Z8i#mJvtNB+*S0 zJq{74YjbjojwLgwvpwM#`)9dYL0;&-r&A8%()BT8?kHY3T;mR!tf%H(|I?QABKg=RqJm-z76`bv8 z?+JBe?+X$2XCS+B890_xiEk|A`Fd&et(2G{uq5YQAXOGVX_la zR2P(pyW~#1(vhLZJt20OMuITPc`>X{oU>`ng;qq%Mcuf|%+Y>}0u zkWdx9OzSdM+08#!LX~KC5q88jd!Oh=t3wV>BrdZU|72Wt=w}?TaRAh5KyGnuC(o?jN7M#(%$Z50( z;r`Z&lBkOM$@Pgx%WI5Tt2<1!tBBt(7RbY;;2((x5D9->Pa{S>;ZBC~aqi_gn%vgM zxiU7C--Bvh2C}AHx5%hsHAEv1IzdDo96YTQb|i2NUscPWaXjOdr;Y^`Ia-dpWA0*wx|KC1HsUZ=m@_?=qsu_V`f-Z5LxeFN!;Za6oL$8#9fLT*YvMW>r2Y!4k zGs8J&et`rL1(Q{B$Ef0O-K@^^w@DX=V;L7QsqIVei@Rm@(G^EhxH%J*BBss97T4`M zA@P^H$;&jxd_-!wGCE^3lL!AyU#lu1pS2FMmOZf9j$_MFlj$}L&3+cWYdW>vjUT*} z;+1>KS_71X5D{$R0oXX8!4U@0;#9L` z%=h(gzV7UCZ6<4SA-kQi)u#kbBB>V~i1rT!9^MRF)H}unF~M$g83vhBd5WjK_2#ra z<6v2Hh5^xet7?#@lQs-+L<}M4rXa_p_ygO^L-k7*Q#5U)+cXXE%3P@u7A=BFu}v6o zKGR^?*?kk|mv&4VhJ|hI^_VRre1aP)mYjp|L=W!8p(As$ce1NtuQ7Yn;g&^dBE3F6 z*-D{Y4xtA%TJ(>>`map-?=Im-`&%M=AhwZIHdVeJ<%-`$rzI=Arx8N^KIn__w6eev zD*K1;woE2AkT4YiT_oiH%-(F3`pA`DG&_WZFVvT#clGx66Qtf_^etghnTyuqk4;Sc zbnty`civa^`SciB$7_W`V#X=*I&L9xD3y&Cqw7>%*Q8w&o6Bqyk89k`Re06ge2KX6 z`OfDZ@RV&!rAGn>5sydBd<+5MNz||irfD*uE$@u6^3v@B4R`{ z^|e8*H`9=!RESKpq)M>ib74M13bcz4o(3skhuEVyKZuDVQy?Q@MtkfhLtL^rj#BmqHm|siZ74|k+R^ov;U?*kNvCbXdssV|!U1NPe4>78_`-Xu>>1$OI zPgoL|SW1>2RY|z%x4Tq_DR*b8k;#a0t6kEtbo0UA?5oeZ_%c!RlDFc)lv7rq9wr~3 zi`aOKt;VI|=>yg#)@WApX>?k_r!mKRr5ABYg?0e_<$IDdt4=9nfF*pHC=Tczo5blutyM@5fA&GNnz~1-3 zjM_Pa?S#OhF)2?s)k9dYlHBcKE$HN);B?X4)w-*{z+E&?)txXETG&WMrNquuvz_+I zF)gZ<1YbI&$r0EGfRi>RntPdJm}Rw*A^QL#;rsCRbLwCnIol{hnmjL$@DHq)vxKv= zKCHD*$a1KX4BYbTt?;=a%1e6U+eaD{?5G4Jz}G`8M(O*KwQwxT({B*=a!oK=-$Wj9 zz|s5UCQj>zkWxl#uVmGh<(uwH#m;*W)*rGh1Yc0mT@ZxN0O$aZ%iMF7JTRt*g>_o5 zhL#$yG}=BVD_b%(`1u=hV(%1;m?ZaYVUraSCh|w_h?=E&bw|*?m;IODEZ{PkxA#D5 z92iY2`Sk1lkET|b5FOG?SdopYFbdJ(uliyZa4$M-<%5QFD(L0ZD0G~K`YxyjhTU)I zh8M!cRUTyvY1iT~FLXSH*G7GEWme)SnM*~%n1amZ895R}P&A-Qf>q>k!q0iG-pqen z@BI*;i@;1%a_*;8{N^%_ZgL#+JvvGa`#V7(bJ9w`JQ^6=<4hE*)JEF={BtHIAoR+~d3 zMpVF{cro3GVC%X!P1pUws~8(GIAQIe;Dhx3cer3vupx)pnq2N2r@RF#rqRHP6H9Ep zyD1R~hx5ZV0cA^>e6hUWNps)x2{DiL$lVC$Xd^Z=qK+)+5I+^BMS7g0p9FvdiUf1x z2FIt6WdHRg{)4^Ab8$bJn*NKFIJFL&s3BccqAhaa8hb<(V@Fdi?%^qp8>GwrV+Rdf z7LJAx7S&d$zK<6nzF?BIk-W)Bp>5Q;c@Y_CX!OmmBGkk@@bfeJ+PtHk9is>a5ZADF~)ae7#Ej+ z$A}2(q=-xsA9vADmS=)}V@R3ao{83L?dep@55qhES)}mR1wYy&Qy%tY*Kpy`(S6W~+z;)f+IiRJ#fty@tSs-Yr7vi0AW{0GGhxvIb!I&0Zx4uyxb+~?hXk8;TQkz zp@c}prh(QnXczscsd=!d!YRiW}Oh8ssXOG*~5922H~2A|(FN8PHp?c$DS=BcDgs55|DYv+U;GS$^t zz7MH2xt>jaeJ3kE?PkDQmn2HginHj_70_Me(A1oo54-WoOC?ZSjO9O+M7#U+rc} zHb;=9O54t2n1Q}foeD$h{vKJ-ZGS4_vK9G_Twz;=^&1wD7XQ4mXPQ>x54lC9xXx!< z*qm~AL^09eWd4RO=d*YuFKScV>%p_RS);#a3El@iYam*Qh{cD8JtA5O#KDlu_*ST) zDJpg2(e7h-IH*KVn!|Ru6bY3umVN&K$M3k4o~`1{KeEL;^0k9U^ACI=|LuTxFdvML zkq(%f*892w5tE35;ed&fUL$; z&LUQ&QWXb^<* zVk9DiPG#Ic+r*pB)RIcK6dvPcI?@VGw8J*&@jl5}@hFr2e4DwMbUKxsdF3I{!h#{hHkgVAZFAsfO0;0J)Xb?Ii&Eq>g^WDtXD;>N^R(~#&kNCA zg7mv}6mh>T5~BrF5Hq$jfnSLd;Zm@o0d9CL1F*YJCa2xqI5sNV%wLK~FJVycP)3V5 zHT?6vPmCZn<{b+Bf1DB!O^I73nnns=dkj@4jQm`d3 zq;jZ<)CPdO#IxeBmrupQWxydxY><6m*<3bK_*3ZKmEGe?gSe#U`ng%~_Qr7ZqO*@8 zGpzJ?JeG+iZuDxZtW~m?8nT3Z|BCAhS@F*Z^!kw65yTV)q(k;#?kq(H=u0HFH? z`WY}O#FVom8a%zU)Mkux`UR0_eRE+Cb@D~H?~a&&1+x&h7&l8#C&ldzD~gl@h_#7L z&KxOyt*XudOv=%i4Ah#L+nRUYp0;V)Kbn)H=7L~LJ0otfW+N0SU|iobZ4|nPeO!O? zY#3fdQ|OaR7_1#X)FTtMs{pEpr2pYkZxZC=@b;IiS#|?6KpDuI9F8oHn#k>l$$Fdc zKG?WVE|b05t;2o3wwlaro-60r&c3hL-pNT>n~ zv}s(<1Lw#iPI&OlJ+_&Z(y${^O~gb6VjgCxdF#ywa-IXa61(hVz^dzXX z;7U9^TnPLex7qtF#p$oQN^_x1AkEm~(sVN97@Vd?7xA}wV!6B91BfLd7G_*fj;$Kg z0*GN}9J@&&3YbjX@U)ZF*{{+1{Qg7oo{FWnJ&Vf9B#a4jN|%MJ)tz+!CP4zOS~Y8d z6|G$C9~=~Fu{ocugE7~<8U3H0UO%~P^DeVN-GIM8LL%G2{ymlx4(a|ljUwv?}1%vC=#+c_$gX9WORg-Mh>iSg+>LV3h z%0!L*kq0JObEs4#X42#yv}{J;>H$n@6Eqv))6u)R?b={TL5mj<4%?*3lnzTY=_9XA zvy??^KmC@zr@&@CO!sD?fnnnlpT2cQWOVlp$awfLyb1k1I_7|)bZ^VmNmhOt#r98~ zf;hS({sWZ^fjqYJODS{SdOO!m$@COn-A~`H5?N1-yv$OcpAFtk*?6;Q+BWD=ysllC z@v#5RiV9DX(aZBwF)#7O-J?7DV-`>=MwzidG%$W=gp>A5!uvXd;>0go^G0KX6Ea^N zKEGqc1}&az6aipRDGq!QXKy4%2aNJz?0YvU(VlSPn1)!nRtxn41%spk3&-P6aRrE}PN%Q8H;)K3^e-uK86!xk_i)AC=3zii&XDlo<^QlwC@)Y#Iz z_6sAO$Rhp3yEaOHc%}v6Gntpq{a{lLKyf_fuItfcE-95`{CwKe828(;s0S*RB8 zB6;v^qT(lYMhE?H3}$1$K^n01V#ju@ls)g#dzchxSE9Y`M&T0 zHb#zJ=I<^<8;Q!T&EGk}SAr&(8See` z1`S-ANBn^fs)9{~YmD?@2{R`3gSe#eRp=GwX_1bj>*+D^L=JJ$%t4|YosjP-hU}?u z?>GIn%$!f_MU)Rj-;Oq0Pd(N59W#UQrGKbabJPmnVdS<94a=yg$t$PGm$TXo=oI#5 zMSWoh(tI>EblHrz*U&X!++&w69%lH5TKR6+7EM-jSd~OL;J9BTxZrmZ8ynOE%VW5V zPY0bqM@-LZc^pCFI^zlp!@fzhn$%GQj+HBD?piBLOve2}K`@RJ=3+pbZ)2=qq|u!f z^`pORS){XI25}CSy5v2v9>cDDiKS+rhR$tvEByh){#ys)yXtH-xL56cD*JN z3bTnXuB_H()i8=RD$FU^TFNmbp{d`~Z29x>LjJAo07cvp_y_nJ7kTl7AcmK*Ld74o z?3~^QuR2Ac>D8`*Aa)WzlVvZ7R$?-g@~&ibcF_^Jy$JEE3=#8}9qn|6JO;f-c%(~= zfnV^@y&pOok^DoG_Jz4mP>RP}$4>TzeG8KrpjI&VlntMDPC)qm)fSzO%G6POl7f4p zBa<%>4)0Q1`FCK>gT(X06_(wC-Cc*do$zZ#!=i1xqf0)PMG;UIb$@3rA=p|>h?;a4 z6S>2=4t$|}ZL+816sJoep7?OAQ^-2w$T2gFR?06DxF?+N-Bes_J))*_^G)YEX|u)p zzrXn-4?jx-q+!{C5)5`hS}i$6ZY13FBP-WVyyoy~;O#X68cgeDFRnLBQS%&o$&MCx z8y6664Tjj^`H8;+=gpRBj8dFqf|LgTKLwA0I<^+h!;Mi|uRodT-DI@f%#7X4g-u<| zUm1Xhi(7!5i~n_e;N}(v@eA{TSh=`_xwsO^aE1PtfxV-dwT1WpZLk6U68>rc`6q&_ zqlKHNv5PqXYHw_5u4HU!ZE8!!&mq7e$Sy?n8WP0L#mCOgL#4*ePi5ui<|NF?>FMdo zVf_#Km0r;tjxLtV5ht$>0Yv|J{9xs7Zz3!#?P%(5Z|>kGEUfwpbp>#jy|i)u2j*Wf zg@vumtu3wG0Ng@6SOAxQG9&yqKmU!+}Ia+dB7<*WoIy$&={?Ed2a+!hnjm^!u_;~nD`1tq*1VH8>9*~Iu iH@C5c03R2K5XXNtacrVI>)I>4v(rX$)$KaG>*84>va&+I)!L)67Xn{I_sE3tEkRN zN#$c&c#kIe3at(zy6lMNNyO7>{M)~?qREbb)exb@?L=8V5nXH{=SCT=jSYMo8eGJs zk=QG-O-=&arZKikeEm3n<`E2K{X`x;M_|POqU|REl~y+9ma#1@j|Vl6=cfx-G9NBf`@D>G_$g#gEbYs_%~0nue=RqV${o#)+g(&8fN_y z8{ySf3e@Ol{!cTlA5auGqocDu@&cAHzW>0#`dziPj4 zP4{$7_j9DDZKnI2NF@a+BzSyy2nYxyptQKkXPWR|g#G$?Kakx1^O*oFMdd{yAnM`~ zUX7tYpCMgTq{JX*`Ml-73nOr`%PN{-kHeUgv@#YNRTm(M!AQp^|J z)*tu}6dbBGZ&v4SLK7jRQ30??5VVnG5-Oh|(QIini;x!?YbhxQOF}!5k=j;51ydUl zIH;3|r5h&>-llMZqBS8QLBCma(bV)<(5qb+SUt*lbz1jPpVJq_tjreqa-mz**0%1r z;dkKck?(i^e%~c#3py%_)`WY~$rr)l=4t~Ro9G^*mq*(d$`(|G&S%xMd$P6xmZ91J zZMgTgeo)*{GNtH-FUt#;0`Vw*hu^i*?sW2JPQL0RxI(K{sSCXwDc;a`U(@^EE53)$ z{!;9o|8?6YmM)?xQmC{!E%nXV(-qO0-}i+d1>^DE)=#IFz!lCFIwm&mxj3YcCb+oBuA_ z{rOUe{R%8;&9l}CwKhbxPc0WS39Oh*DOuH%!00G_HMWMfj$V-p6AKT|@Z~TKIk_of zJR&;_OW=VQj^B{Rg!RhK&6k%F0!$s-AxSB(OTi1{=P|s5Bq?H_7>|tr;Rs}+wwZQo zWoQUefN=?I|4){fOTYZoRDm0po3Y8sB*VO7jXYE9(w^r7@2#b8l`UpAf;zWLvx#pMe~ zbZKq!#|!iYeSt}Ec3~Fz(p0I~s#2^{p#n;yt!8TYG-&Y4{J~7%U!1(5`CIuFnt5rCyjddGF{ z|H8l6?jT%TY)XM{i+${kTKU=Lf%92iT|(;*n?Af=-uPIw*f=^&e-}Y>nh5ELFp09C5{>RwYv@RZLZP94b9u z5vas{*1kienH#UTpU?))qcvE@JMG`1bv^HW#9xi%t~#ISdXDBg>|M%pvvYFJdA&7> ze|8y2Qh*pN6*cvhUOEfn_|A#J%>aht<FXiA~1Y|A}_`u6!1lG=zJks_1NIY!~fQ0VLD4Wg^l`^w31U>refj)GHQ@4)tdC8Xb9Rp`g>)Hu%$bv82SrVKfij3CV4o*-n{H19dO$$Ql|%aMgvSYNK@XGeez7ZGY{tP7=6N7ma!j`As; zvwEeMrc_DB?fn}uF}TSde?0K5Wo_bc0;rOScx0EQMg?Tc?UD85$%{SH(nePx{w;NA68O-3wt$hD4fl5peq3B4 z%Y)wR;mOH*NB69!Ol$Z-c(DP1v9CP1B>V3oR4|EF1K$auRkF=bxDZ(8#DRJW9r{M> zfjSZLDI1K*?;?b>`<7|iJS}~vnS=DdD45tt@M!@mI-s>Iu|ZY?vXOzjx7DX};_XX) z2dOXL`*&8|Ux*f5<=U{V5VZ3BwYo#$NUb>VLybkqmO@aWN};PP^T0oHs3%Uz+3O=_ zY%)LJCttFa{Rp(IOBJD)dz;IcEX*^LA_EAEE{^ZOsyanXhbvQ$7{7Pryer%1qP-Ri zF+eLWWbebNu%=CRc zJKy9LlmlrB!TWfeib=um)qvJ_M0_O~b{CU8nL2m3BWS0iw`5eP(RwcG!mp$C)?v-# z&F}beTiNb#x*7bVE*tL~3GPuL53g*h{119Fm7n#B%i{rd8eHi0%Frt0@C}YFH3X6> zm6#NDe zgVTa2+ie-SQtS53t;ahv)%Hiv;cqfnQN|qVs3KW|;2H6AM- z;@Jf<%Cv<>w)MiK;?7HYPADInD)oPB76f*EkYcmh3L0K07 z%-{?E6S!IHF0s5r$;1a?NM3IDjmveM1r!Aod?Yz=BHQs7xUe3(<-hj9`QI0J67q3` z8}iCKRrGim;%(aPFnZGBfH-5llQEccJLl^<<{v_MqPW&DrANgKeu)KgM`D1KbuRl< zQF=22#@Dy7Qo?s+lS`1_xVSg`iRaC$gLW1r;p-ydl4iD#sELc2uQ(nyS|Wb4%DTCw zQpbCC=>5Uqo|~;xDIy>F(|l;R);d51Dy91K%~Ms21OzQ*@GMj{`4PV=@?Ak=0B+r`CYU@yY+vI|o0T1{4#khj9q`JUJ7a>ECnR^i%!7~%FS#njNx+OG<^Jb%Y9x(7jD z6t@?Hm*&37yme3b3E$pOU@*zdPOmfuq|AfLYl<}DA+n|68c}n3ax{{j*f(~IKdfLn zkErfu1gI4rU)Qd(uhu%XWM=7X$KxCiNvz$TU~`Zs(i!!L(`9_Z149twV5Klbb%IE9DeYF^YviF z&mvfmNhACig`~t!jp<4_I=~)=giz-_6o0sw9sfW*hl=eKEAht^CV2>ax4`JOT`aZX zv>H7U!wX)K7MdiL16H^sCiY+!4HsD*&pb`jJqB&;Rsv88f&`!vc;aQH-?{r>kZ#is zt0H46QQPm?T?mUAipDH-$N2XqerJ(XjGnB!hjHfs_plYFl!1*m+Q<7PVY?PhBFsD! zHycy(-15j&>zERib>^#V*2vOb9$}$iaHD-maV9T{`@O~wp#-wZe6nsW^L^jkhqX0| zR8M%U*}q|#F3~A=+FYWT*^C~zS>V2T7nJTP@DB5VNSIbL0_--An3e@x+ZcSf`N~ja z7phLSd|-#r`8h$9$kQIQO@rYUBmcgm9So8*smQ6g?QcLypliI1J_zR-8XYfGtMFW4 zp{ty|2+AEcl63!ut8Zm;oIAECggxb2T_L}s!KHEJ9B3*LW7^&oBh~cLfZS%v%b=@T z?k#XHmUWf;f|s`%HXr3(+Lu{8slN_$%wW7#rXdaM1-$xjzX~Tq<)he>_!Af1XY+({ zLZ#S3VVv#?jY-qJCsjTBZbdUsQ3rpuqi&Ji;&{mT^81#d$vJg)*3CJSj~~oQckcU7 z9dN#kj&!pi!qwvf$m|j&ocvBN(LC8JTUL&#InFQs!hbmNvCtQRbI~7z!N^xRVjIhi z7?d)@z_1SoMNBH%%=6p-fo}OD>Mo##7@YHrYSK1&9JjHmSNfK?Z@Ej#R-sFKdPe^IyKDN(wt+qSMP0+HT`+Yh`Z8V1y2}A{E~| z$j>gwA@<6fLfYE^3wc{|3JM;a9`9N8)T#CIz|A;6`w2&7AqP!TS5QKEn)RgeKn>Ei zqKcB!$x&ASY(U_#Yty8XEE-tP`^1PtVj{3Cg<~h+2U(;_)RHQ7WYb`#DfRF@iV?rU z3AogtVy2vX+Jv#t8+7@VB%w^>f%oZOzVpE&f`Hd9ME=J-x)ULqL>7sPIAc<1BB?57 zHcP{8r$U>Mtrr8{P)Y$^p zYLF{7wZ@<$-P%H%lZ0sySZ+z4s-n(Jju3&NLYvO}_LpzR5Zi{|`gc;V6G){yb-L7a z+$$4F6(rYjF|t@{lVckQQT9e9o#x;m^jLs(=49Hw11&`wQXHc+Pgd{x&vZ+qAgJz< zCsiqabWN~Z>q!uCS%BG?)}jWiiI)>vz<&1Y{3OFn`dnxsMbtPnh6F0TXf?Fg$BDq( zBhH^2B4W}l-UYMU4G6$zb*>(#If@0DVnsF=p}=h<_66K87t07Gn71WZ=n{5%2>3|j zMtouiWjs1(JJB07H}u3>+kPJZ>O$Z%^>lZ!z9>hOLnt$NZe_@pGS!v9VF40*ezcP5 z5X^Yz8GV=y4Ez?e0#1ygbJ$ihjjL)I^f=5r>h6uCnJ1r}k!Ma6G_o}-$S^REzZOXi zMdJ|?N?D*3s|QYzmZO5irbwMmZ~8KYceN&ITGpKmWyu;l_fEs9l}eX4ed6C3J>>FC zd>2bqaA-iWoPT6A#lJLD9snT+86r`}wadVZD>Qu`_;_#(np;4&tN@!yLO%fpxV7GY_-l@b&cfg%Y z;j*qUV3?whNVGb7IC}nmwhquuQb}E$7|uoIizH zg{diA?2yqwa~YK;dnQl}VLY=Gu~QXBI`&iqA(C>l_oacb%Q~>E84oY!iqLOKUvq^L zeM)Cj4yogZ;6gJ5RPS>XBQ2vHc&IrS3EcM2ESsnVjyppuj7>vX3bX;wBCHdgChTUv zzZFiIAaZ$)u(7lH5D@XO&KGSC6x&m=Jw}4;s0!PGovDB&CCAnvvbq0J=6+wKZfjGz z`ELZ>=?PKQlr+!Bi`R``WHFDrbZ`jFoV_}O^BPV+?uiPL=&ZdLT!7-H3F4ru*};0x zL0R>Wv6CriV!(qpekl zu1#UV3r$mO5@Kp%^>EwjZRWdrZUey8e&sGhDdBuy#leg0lFm_vg^ZTSP9DS*)e2#J z6yEm?4n?qL-hcFsE38<%-D4<{Hq{O;-3uH%+F5054K{7K8=1ke0U)NJOY7=45j$7J zcjkHL({F`0iqL75Ih`Yj$C`%*+I+wMWq7gk_yjPg&OUC$Bx&#D z?}(4|sTso zsEzDzW;Y*Cc_O_X8J$>N!(C9b2d>mB|rb4u==Y6{0L31CYfvtxCC3JXU@4m*qM z;s9xE=58(us0$bAe+rhE#i_2AOwmAijKv@KChA_IfG2Nc>zcWK6&Ss7Awch!>7P)J z6*B_B$cM@aifqS=>F?O*;x^&VxM^vO`2w?&;Ff2n&~nmW2SH8`tTIN$^mMW zU{HSd&ke}I)XvUs^yc~t^^``tsWm8aC!<&@Ek*rX~$P5noYF~iC6SQ%>Y(UCP>D!j+K8;;@IO6@iA`|G5#a(m^h zRh-WZ7gG0H%jGdmWz&8?@e^$RYel}r`{^j+z(-~~N^S`K&)SkwuWPLMfR9v2WI69$ zm8lhaX=;*WR0@4*&;1tL5c?+o-DPy@fkFRBm0*wcEE4X2{agBixq+s*)|IgtWoYo5 zR5Nn<>bDgAZem`Lo-~w~#h%Fs(x~E+VZYPl;_A#oO6TYz=BiEz8qJ|Nv*jlgh)K(H zzk`ud<{!HzhyQh+E;c#X+Z$w4iKse+c08^rV(fQ^7=CE3`o6UDQMBbuvIz@Mj%Bj1 zdM)S+e7qw3*Y(O&n8-`Q;^Y9@L8MBmZo4Jv>>^^YeJs1V4;zyKFID+PY85W;!-iK| zD{+aAgIFHAdu_YX@wb=c9+aM!?!bR^uyZGv@h2aOCmz0{$JKA3aTm$_TZ{_@c8=-( zW0|}u6eVT3I((;R-{ee*-iBY4VNoWfzg<-6ZCw|#4RdV#{LpM$lnyU04y2Lj+A zbNMHpx<7u!lq#C)Le_jyCUkP$kI>3_<7E>J@f`72$u#H?N1sfUHolr^h-X24$Adu` zzj?!X=g*6O57fQzlBn&H4wZ8JU%4X(xn$Vafde2Wz^ z(w!(fSaQ#2CX@wns$?b=^290E9c2h}at?Msj&E!>uQ&v##}3zKiBKUhl&4RyW%}e1 zy&+{a%>&zmQy$U7*f%JYkU4WrL?2K`AsgouX};FIS+?392&AQSxINr-xNd7c`CoOH zIauK|XZK#sc;-bk3WUl*aDf$b%v|kY; z=YO~-x%Tbb6$AMdJ!#Pgo#X-ngg;&vKA?T>&-XU`&Rt&5G`sqK`Lo$D!lZu_SqVP! ziU#LTUR}KqGDOq=xZn>BQqWe!r6spf1?9A&N+NFJgLD}+JuZps87=fZi zGF~LHA6$$RS>EL4;G5DCW1UfDze3ayjn?SRBZ=w-epiZ6q6tkPJoU+(>-%NJz`~)?PU=X<1<1e`Vx7~WvanK9%^f$eG?BgZ>J($I6CcCqK;S78^N6og%mTKla z>{~0Voqf+{!4N|gg{5pK{*DjVH<*Uz)g52z7^T%}0j3@s(9FWVkw}-BrMd@%s0MH4 zMoAWn64t6)Nt5y$UYoqNBwk~WQl?Ze6{u9AO4!ep79732ZhgGNta=^j6AJle^cIr3 zpDsGhsT1mwC7>Et}|zKU_yO$X62iCM5ACFXMWYnGj6yGAgd**XjFA8`N5C!Vh~4rxL$pWdjsN@7 zFCn+NoIf^DO}e4DP#{*JM9gyBBBfd+GfOjWcgoHwu_2uCr7Q#{Xvw?+tWMgwOcDqz z_~Wf*{?LCVTASPfGe7^}2Nj&lR=NROnP?Xnqc|h`woHlhz``$5gg&>*Kk@}8wywT8 zN22q4f5A5=hlEbR_Jj*+9P`2<2zC%$>KB9&tOuI;d$hsIs1hbLwA zpp&L4sr3m(#d5?>QO-jN*Oxydi%BzBoABGpmY1nipxerK8dx?di439{Pf@_*gUU<9 zWe`Y9p6cdxHZv_$A&qg-p&<_;u%u{8`DDu|?MwEImfWjcB3gSCas(!#nLBzuXQg2? zHch)g%3JJnwK5JupDo>=$;6f$T9G_lF!503nse%d1~uHv(?&}wsZA~lXZx~rT-ZPv zq`v)sVo4Rfe0hFOZGBFpsjOLh%))uwucxTO?k%$a(6^=PsA8Hb3{jE=as&8fN*v8X zhl;T8AfQO)JW%H<bgbw_hO7=s5#7Lu-=ocBJh;$quUiF_!fHG|T0qLqhOe!=RK40k)OvVj4 z70_Jy!U-79y7u>o*(E^rOI^26v|C(v3$ieJuaAU zA$aGjhTE4DKR>R24`zC`H^myd97E$I)7{$crdy0yG-&R@*vEf`>4jNLbtbgRm6}ZXuI}l40G!BmJF~sNNn^h!1MC~`M z1hvg0k8p6abmo+@B&pC+`ZoZJmAT*l>n8*v(N=wZbtJ}Nr$n}F=?h~_*-*VK<>X-% zDY0V2pdGh*v~g)eVL$EOe~tt8?a{ZE=&u`wXIqCcXn)LAuxrT6=S{P^5-f{$3Gn;nk86EnwPSU9)Exo^fai$~NGR(%i!HbK2m#)@Pdqzo5 z&iL(8EP1T_;-#3M+Zf=oe#upvSE51IF5*Uat1O_tGhQrdU|u2PT+62zJxBjSQ&CrD!4RgVP6N~i_Ty9 zCDfU^$dCIwRRVW1cwnbG{n}EnJFnL@AXO$TFK-kEw?&R*rA|k80%2b)!^e1VdOj($ z7HfbH{65o_eRRMuZ(Y6eZ8n&eraD`X4sU>ta<&@hA0wYf4KYZFaDhk#t zo-{2Lm(eZ;;g33}XP0j}*2ouVt8J5eF8L9~2;UJAV<99>)o9c`x39oYg~ab$qiGTj znIdV8kxf2{OAgepKLFQ_FzrN5ohf>zew6*s%!CN?g(@a)=GdjcqKILUlpmF7oyVq<(yjPS!piCJBj!5TGl=QXCQ@`2bt39 z5upDd(wxUVy-E~IzV-FLUXynggnm9VFVZ1i7W@fcWmfd-G4qA|ecR`)Iux#i#W};I zuIKiaqw6ABrj&^{PS>!nBo;ezyttVg){86W+MF>#@?@AJu;DVPUmKt4W44x%S<|~CVl4_T z)6v5BU?Yg%vpAWefvRF|!#Y0Vu<~jJ0uzv%?VX#LtboS{zU1An4d4V5AR4(Kh8(< zXX=h;EO*_>=5ayJx1(S^Zs{tJW>?W5`8)%% zP3l|3o492~h?^<3bhKFgaB2e?F{EJ$C_AFRImq%jki6URJdBf+ff#QkPyPE+RTKFCBX z{V`6AqlL36QU3d45`(XVYPebYIdsYlOiGcQY5&x0nvlGjWR0T%Gt#4?(EypFSpC`C zA+ffJPEi8_(1ZH-W{N_bi~U$75O?-&vhW?+dDn}3*F$diZcz3+`5_(2Pm|v5D0#j@ z+>@&7*@y1F&pLP=hUE(Q*`#<|{Y~;f;Yy34Oq5e<})*)g%YShJ6U7udaGYJ<1|^K;sWuv@kKj2^r@!qBl{X#5+>%w#i$sk zDQ0Z6B@>_XEFpM|nZfa~ESrhnzt)7nq4-K^`Os%&V;pvP1u2#!k@Z@(y8`ZQL8#{s zuPe1o$58`anVO!lNksoy%f{Hi<1fd*s^X;^67?ooR1k{9H-F9wCLI-=X5+Bjk7AAbM{y`qaQ%J~BRA5cldssne%m1z z@H0uUIJ}I6(d6k+EN%+Jgr=MODFce=8Zg+tz5#Kcq*0>N%=J+0L8DKR1)Y^i!!9)b z{Sx<0u;iRU35(`_*pyDO zYqIc*M?Pu$uK}>oGbx+k&g195jM^1Si)vIu;ofgeoH%th33MRDm9aSjQFS zFsBpy_JVR*7w`8P^^g_d21trbV<;3{JV~m6vhx@}h3}Eg5??zRN4HN&GdS%8!c{$a zz0WQPk47sB4hX*DBMS|AKzhcarK|=M^T|bZXOk9CU zrRE?@dVJ#~UtVCVo%fd~`C*E*#9lghSl{GZ`%@#-aEiObZ2yEpxIw(i4}35PLaQy5szZ9JuVbtS}Ey< zCMEBJ9rcQ;2z28VH9wN%Y*s@z*LAa2o0*MR9qQD6|7MgA$S0eoBOt3J+otL}BTeIV zrO>h0jWN7wvZUhW<{ol1lxD)1T_`>p7o$Rg!(ot}E&l%O4gY8U^YoV7vHai6m^x9V zn<#2Vt2Cdyw6zFofWsav=5`O$?k7ATw zy{|B#(g9-ter1~DxJ*88CkxrM9ZXiF<#<{>zR{ht8TSS9g-VPJS}Y7!INqGIuEW1^ zFRR>redylqyhELZ3s%q?*cX{dCT2s7#yw3(r4lT;S+{yvs^U^UM~ZkS=?wd`DVEWc z5D#xHiDmv@5~IF`oif5KCcbr7z&%x2^h@j0eh8wpJg(&Dh)*85H9&zf4!vYE=MW8! z!ycA}Uk&|ZCu}a2XsQ26MkF}ySS)n$q7UDjIAYSsNnhZ%1zD@*e3$gt#yyIxk4JEutNiZ6n zo!H@b!c8#O9f?Hgxw5TRXb>4ZmT~nwG(C3=X5HtRkNnKN6T^;>T6WS?u+)0KQH9Wi zo>$0#;pi)Yql{7cZxgt%(Y4 z|~IwPq}R?S>1jciNuUl#VH!Y^Ld?9E-@q}C4E zdI#dSVjms;x&%AEk#l{F#b$XS!_CF3Pt$}=(Qm$&qI#1%GM-qiET|e^i59JhOte9f z>rf>e?d;U(1BK@tl1Y7Pf{SsBi-EupDOp1zo1z}A&NKK$4k%e8IwfY&g19NgeqYw{ z2Zi{{u`!zVuLvcbf$J%g?I>d`GpfA}_ z6=$y;8rrWIt)#P3;*3?MNLn1X4Us|nkA5tFO$;@grN@(t0lVnTg8%M;EMEQmqs$2({`N%>giVD7b$i*z3oUciZD z*r4Y;j6<1Psg3jK%RoQ|ek8f7`bP?^V`}puo!2FiQ!b5ilby5bs{5)@Nt>p4 zx}BK`=Z=`N$lnNWb&qt=YVDgzGo^*R%f{-^T{`k{eept*O8L-P3M90(QJ?i~U?ys? zq@miQwUgbEYPJ^K(MYtiF}8WDaC1&9t=u2*8X27pE_DtUq5N5dD=Sv4!TJ`jVogOw zwbY^v3TJ;(di&>1}ZeX)7- zQJbI?(5WrK1d^sqIob>Z8ke7JKK{rsgp8y9O&Daj0MLzPKZ+gshoDan>UB}4#@MLl zh7EyW-m+gT)KV!-DcI*H%p@|gC{2%ir^`&SD8OdPsxm^u7`*)3I2y5Gu(yevUm7gG ztbCdk1N>t+;|%icb$3BBL~!xHqu}@ zxIOa7<6pU2ko_|ChSW5^<-pUEamyX1&?SW; z?R7Y2)D~UJYaG9w&ES89Eld6n;j zHf23S(%AE0Eae~)u&lS`1Af)$KGaycqB@wGn7yMq(PA^o0{H~Qf4m$|bEv5Hb952BF453;czD145hDJza?okWFSK+kU;>rOB*$b==` z-2t+@tu|1M3=CJ>{U71|t=(n?Qf}xa&7r+|V@6C=F$MD}DOE{JSlOA-*=j1RDbXWk z@&ctU$z3NRMedP_s8e=&ZxPbQ16SFddS8HwrY+6a#wA+Xw25*LCfe9FMC`0eTl+-x zt6WWEHPh&RM^tHQR+N#Za&S%%PFBugUoxAHQ(3xPvwyjpN6rV&RSqV)T>b;5YfeyU z(=GwfV9|E?xLVi!%iPb*ot=}Wr&*IKIOK(mnv}M0#{~AAQ*}DyE?{=Ooe2dT1J&rp zzn}<-(4|`V+96Kf7|c044c6!N9n&ca-qtRi_=S)3LV%dgm|eH&@bTq)Z6s96wFc@) zQk8BkFh75cwrr~BHyc&S7G`*!nR7Xn{(V2Kz9v!d=}nG%@;ZE{dw>&pTFsXBs$q-K&NFQY_0D z=LaN8kY#cRf*SCsJmgrLY`MwFi+O6KI@d|Mbtt-ZN<8tIERAr@?1P0TPfPXV&`2W z2NNMenY(mnKel8thg6L1s^u^%=hxu5(XV6%>KHL>`I>Sz2ibvnys6u_9a61Z3FCLH zEJ;P(-SKNaC{qh7->H&&>xn9xz8)N;X)&ghtJ#(r7O9k=1J$aZrcrzY#mRbyhhe#! zO7NQP4I64|(wjt#aj*Uu^hX_kaIu+4eot=nO=uPq)`rbnhVR02L14twb+b0Eli zx%=*p=Gn(232qH7+d+896c&?%sdF5s&lQuO_rlqz&(d#{EVk~e)PxU%CL!_}9NxKl zh6Neu7{)}c|x4j=x62g|Ek=CiCFGw5ZU z{|Jz9m$mluT5x z(enXuwB^n&(aDL_HjQ^1IhS&9OYr)yn{IeExR9sZ9UOz4DZoM}t{|BTp2H`G2qbT%*E@q}nWh7H*-1M?_>S^GXCbFsIq8)-LeN zsy1nmBb(ZR3-y>>z-JD|cD^~Kdz9-p=P(%=xYTi`;Zl+{D5gv~lk^x?XV#@gPEL_w z?D49)k6$DAH(1khEm&}jm&)uOlVn$^$d?VM5+tS7Yk*PeK#*}IZc<(uH^FSSHUdfq z{!(=mr>M~`g}tn?HWhwN<7U_na(g(`&S5PvVIeIy`&gP3GoMADHQT3+Ci#x+^NGEQ zHY2Gfxoal<-OVX&{DA^x2L1jp@@Wxuc3Ca==)f+rw~r5GxmqOy6G(|B?eZ;Gn_=nOJBnC%^oejaL!u6Dt$|MzaRPiJ;G4>30EZ8{HJ}4W6d`M7^PI)9$ zY$ISKg>;Htim>e2Pw#+CnZAi-#Lg>4OE)((Vm`Q9(_En4RoTq*4TKnDH)qk5x3&A1 z0<7u&TaWm=cBf~al!IbcP>_(`0%erR-#z$f+0m50>iF{cu59v5>84)hnRZnD)Iv|H z9NF^EFV8%#kB%q&6~sK&T)rD14$VbGe^h0<8aBVvc8>jSaRtE%Y4@xyxu0iRR_0k$ z_Jbyk>8Wi%(4kRR<$9%XzjG`#!Ojnzxx_u=N_5&KP;k=1-@S7f-AKo5J6Xg66Y0_Fo(&toy=@HXD&^N z-BCmBj3qi$p5QTC)}8!aKUM9gv6r27sCPz5ZWr#zE}nEILG1tK`8!*vVRnpAeeMXzmKwm+ruJsMl zJx}*=YO{pYyx>5=1dyQusX<|`f%(caTR z{=sA9&Z_GpOZTH}_t?w~Iyj!l)W#+%Bm!Cg!mHcjk2_!)f_=pa@yv46OXoho`Rloc32lylnFF!Zo&qP-8r0KOj|yJWbt1> zpw{#54Ahg+S2MGMzu9b^rR{qCM-ykC2psCTbA-3t%)LGH7H&uG$j!_1*PCoD37gZI zwd1N|Kma>gab+_wF%+bjOs;q4E;KsiITvs8p;_5a=@5U%q~EugY~Z+|i5+xEi2P@$LWkr%7DUu`3nXM5IsneLP*w#zJ%95*kjCHA8im z4W7Bs^QlBO>1X14h9icyG~?Li*wb6bS#iFl%|YH>{(Pi#xAs*C=@jMW3+YoTQSydm$$>y?N?$XjOlB77Y(kM*Dk4$)19na8P{%bULkbz;`scqy!iirIUsIg3|lFjGYTBZTTSo50+%N3capS*yg z9y^&nu7l0jV3l!K7seFIJN#3;tIyw9X3io2LKEq}hTiS4@V1oD^CYmeIX}>se2bG( z3FgGzvB_K7{|NEMGOs}B0s3n-b;jvvvO*YawQZTV-UWM5qCyHi_8r|H_fXf4@ODJaD$UX@3pNv(E@o?i7Xw^*w_({Ht(ARTW<>T=xlEop($par0Vpp@mK_i0Bka=mnc z%HWr5aHT)woqjZ81#q5SzGp-Uol+zCHtO~1A)r-Lk^$Q26BNGh{xk#GQh4~y#I@}v zTfkY30^MWdpSjnXuElr9{pYT>zTpA!O)z#|u+QKPSpinQE^BwJ4+6>1vAH9CW#gfJ z^*POFeJs10e)}uQly_qmy>;?;9le~r*ScDa+IOVy6Ag$DW3$Ns;}H<;moeqc(F30L z)zQ{ISf7hGqVui?zcM0Oob&-CNs=#Xe=CkOY|~Oxp>8a@q}(Ymu+~3*1y>2om$+WF$O{#B(Q%_mIib<5}ZH`4!)8@aR z3tsgjT9zG6a$M?-uC|aFba%kzd3pt!U*unQt4^xHX@ z=#YCqZJ7>>IBe+xYdIvkE=$XyW*zayA834#Uc6s^`Wh?_*!n$lW3DFvY)r=^u>pk^ zZsvJ|E|W?5@93F_q-D>Rk*))(2LZt?{+lQnIjdJX`PWDh+#Eq%->VCjtXPEk$4~2+ zRcLeeFFU)3*8L(3PgL7UuRc8*bnyzBNTN*e#}i!tb{?-Jc+{ae2tnER#FqDX`EAMj zFS(60=y#03{Tp{mg8h`u}z2hcK#SHN}HQ4(q4aD5a}} zmaCbut2v*kv-xKN!N$VM&B(&_8Pr%=`8c@vI63H9Som025(v?G|6c_54rbOCUjN?& zTcVX=p9GTsNpNwnaP=^DHirP(8(W&o8(UhN+LCZFaWnBS@{)XtVCrUX{==1zPw5lt z0>S$0qn-Kx!2FL)K0YgRYfCFv2v%M;6bR@4G{gB{eEx5YrnQ-?)qjxLYEsxw2;TpK z$XnZ+yLvgAL;R0c%#J@Sh3hpG{trI#YM&?wRt{b+?$5}|v4Ki^`Uye#Uwl-pz0Dz5 z#KcmHg#Ihi_+LfpDnJMeYdiDL>NDH_aJ6%=WVSGNw>EY7;llj?Gz>F~83&iKxj73b x8a?K_qJ;P z-M4>7t07oA;q{h-91t_SW)KE~rf}o(DJ|6u#go1Kqfr9#H00qUH z3I&Dd@Vixo|DyuVNKQ%|>is`QPJ3~}#}fnxX)WguD*azYa@blB3QAB%MqEVAWBIh* zGj?^sb>q3^zUgLNfX|FY6OIre00tqTKwhPwIV^dXs*xcnll!i2qs~}p#j!M=fADs@ z;G3LjUD=O0xszsqkY_l>lA=+6qls2>^I{&QEIAz}rO2;ERw%QLpXYCk_v`nAudWbe z_+R+w6iok^%Xk8h&NiN2*PPFIHk>P22Jn9#Zc&SMtbLj6^}-S`x~--=#3&0@5Q)*` z3d^$oY1?dn|LO0_B*pA)E|-xl`T)LSw%~Xqb4M8H->KklcZQ#R%TU|g`;q!DkB~6WL#W<}W5qQq03uH#ZOYJyvXNPtS6I&#(IulrTfcM8oW#YyQp*uYLex zAqOqzKIc1NvCtvBEAO3_18&cMvqk3%_%lAP)yZQTKi^L!A)XshSC9N8?|n4f>^#G( zFZ@W6k>0n~`o{kX+_^j6fE|0_RFDtTbCSOs;CoZ8Dntski`C0i z%hWZ0XPddXg&d_3;Ns$HmZ<&to;-QV`x+<~1&*$>eO7ckSsZ?7w7t2#Rb@!R$Hynl z81FEA-$0#N`xu)+RJW@hvDb}C$J@9)3s+}X&o;S|z$=H>{fQQrm0qN{D180=td#;T zZc19VzKNw}xU8rD)fGqd2#1O_T*>~h7t$C*%U=gO{Gh-c-sZ|kjLC9l)d~iOyIGZb zxWP;5LU!y3A7s?%YG)&^FXw+FSJ2jn&-B`4%t83qr(~&zRJmMm#>m?AZx=CdVM1>S zkYDIg(NPy9Z>OE678ZY=c`7(%>FVdjRmP^Bg42$)ii(TVvNQ6uvx@Yx2ZEdn_Mi)I z5I?u@2KH0?1pg9cDoUNho=F#a-M4+YtlJ3oaJ<7x4SUnvA(6S zfdw3~`F=znB0mkm=OAI}aCB&6m+j`2rh-^$hzxkvAj-_~jNEw!@8Mrcr+A5d*lW{T zx6i#$*H-U+t*J{Qs03~B2;*f@GmxzijSdZR1&hNnWq#n*9V|c`dhb z4Q(vOh`tFQ7)TWegn~8{CY0fGvyfsMpUhu(OVb^5cB}jqF4n^>NzaGbFB0jNgDy%@ zD30ibpPYO=UhM)Xpoqo%+CbHD*+BC+u<(}N;cs}i=0xasY@EG$dH%)%TK`M>UsH}7 zJhd#m%`BlZ>jS|L%vPM@V)>Pb%8JUE)PtdrH%X?9S}~MAe@DxuT0ZNYY)vf3ncW{T z=rmpka{mL=`|2LyTX+H zKCc*2g0ZgwVwlq%agEWQ$t7qN9}z=BJ1V*W5rEQ=mq1zFww{d#?D&l6)7_WeFf8nz zA&-&ff4+~vAF(z%b5$NpTg@V9GX}Ut=B#(&M<+r<{9Q)6m0Fs?zf9^~0HN}{!NU!jo2pi36A3S=_Z)M}^XbGX-^8PC8CDjQhiQ*SnFhPQidB z?+_QD*teaXV%?X-!EN0%Eaq$qa5)-Hp^1ab?_jwDR_!|11>!TGlYH*VKroIYHl`FS zo+9y1!$EfcC8*%a^IsBM>wKRQj|m%b2aO|D>TYL-fXE5Pu_T!|SI81;a3+CHuI4WI z^B0e+qhf-M_LyE0?_Z*HQq(DAnF>3Fst+9*sSM$Xd0xij>F*MTV`IDghUgTg=KJR5 zki-YEBO6pYDs9W4M2`}VlJefgN`c>eZ{NJm`NzOM&syo3W>2dG`^8Mvpvq0|ScT_i z@EN#+>tjV;BQ1|9w3Q#hw??et5=>BZem?#3aBSYu(mz{g&@t{>p z?|_I7b_Neu>&G8AnFivr6|rhCU;rN`K#g~_Ylt?@+y7FaiKW#Tui=XAS{1L^VVj#C z$(a^s3Q>)D^+HhuU&5lI>LF`B zU=bJ_@K{1M0cd;JpSnE8H>g*^uW0SaX8kpV-=$>!sXMFP>tT}uZQ}-`tk@2U*T3&r zL6qYwieeV81oj{)j0!e8yTDq~q(w!^f;B#wgHH@g82p6Lu#YkG#ZX7e5wl;2s??9I z-Kog>uZ&PZL6QyqyCrF5;2>+VW;a<$X@Bf#->a(`Oz1e64)Lqjr9%v)$&pFBhOiwj zjiBUFQ^Ci!&R)OQn_}CO5&Zi3m+oSr@$=WW^AEkjI-p!JXLB)gsmXKgdiIsC|KS05 z+OoTElVMMe=7QZ4(TArir@`=Qm*dvz`kUa~9(p-iaAhd=H1F*`A|)r>pkwPk=BC-f zZO2Y{VdDN`T(RfB7+?P?pQ8k|Z=98`X*#Ds^NGy-DU0&w=bkGz8pTXI`nNFb!0VTRuT|QTTx2+pPb5u}x4w0>`oC|v zLATD`83JZLgP5cEfxr-~!5_P;b)7v#OG@w$adg~-wR2sOv}PcCAtRw;ljg^ zvvcGLzV_~*p9e`=ebM)pp)s{UW|HijeL$D{=}FCB&3tt`XfxG-!~uLYO#L>%be#0y z(k5;d$wpjJwYK%ewEjCU*7gkYUB7tT{^5&Aqt8O8@qNcibFzY+V313p(gJX!boMw~Vy<@H zg=sq95Y-e?vMuSkreOmxlMFzxh0CnD5039W`|pE^R-&dBC{tn=h~t71;g4*RBX56j z1($WivxaEW{dic`Cue>kytC00hUXUG3Rt>?aKCh+#a^wQHSu=3_;L*_^V-6IuLnk{ ziBhi3l^i_oEzjOJ@k@Q;++2ef6u)+Gdf|7nB!@lx?z>2%2bj_*ShNc94JsC6(x}&G zpls8&wmx!X;-^#>T|_)O)iA9()Lmv#Cr|hAZV%)n?jOcgDGS}v1D1axkii@rO#fC9 z8u()8m6}vYm#3WDAX)}rfg{_%@=dr59w)R7jQ=>>S^GYG}6%DGe+YuS^cXe=BXn4mQ3E4hVSXKr*gh5^jbFiDUDgYak ztpB@t@EyNbk;7;7J{3Zmzg_DHWg{E|R^WOqA-U;g7iRz5ol%!{&Qx0QzIhF;I?rc2 z-F{kbc0TwPJ^~U5X2XPvo}H6hZ8x~)SKKG~KrY|=T7Azz9$6Dku|g=N5ag&6Q=36M z`kAO{ljRNE&W+>3HT{*gUn}~f`$=If7!M)z zh+5IpnUpP(__5#_&OmMJ0*81J*Y5!ofG^_Pq2Z(d0DK4ZeP%71=K@9z+GNZ=r+%>! zkhqb8Ze8HE3rcQ9?9|Wi7RB{PZ{tZAV1%{}9OwXe#fj*6l8r$FzlcBlVuoG)oT@O< zxOmJQad{JO2*FeKjFKkEyLA!%qJ8ppEoQqIdY-7F)hs@7a^{M$^tW5BOyJ|KR^oB( zB*_MOVD@LCou3E<38kckHZH!==yyfi0^$sTA`T}>=8jBnUv=D(uNEND==EYf(pW+1 zw7~k$64-Gv2%gSqQEPf!jsbMIQ_3Q0TIR9qapqUp z%IqFTfG%Y4)@Pd~r?plze?Dg|Vi;StfQ<*V#PG4wNH+AG-0<({G}_2o9ejw~y}iwb zG$=H@ro()BQbPXz(gel|AsTi7ap&+k89Y~v)&(SIp^~&R$6zDEHcvZP3Mv42qat@^ z6_=P>*+iRkXaQzLbtgp4!rix1wp=pMa?g3j@w`(SHBan3ZvI5N!8Pe1V;k4;WdGDd zlMGr!8T0EzyaTPY>_$&v+oAhg_6})VE8dMjFA z@P~H%)ygdTl+-$^T!}Dnfd|3yyybYAm9maPlYoiDBe(@f%CZ*C>8{~Tvg$<(*Qz;A z4&W-`ld(!J!*kzlEOUEQ=EP!QU%^?z^!5X&?XZH$rY)V1#*Xpx9RL~d8@x54VrT+p zuYdaRus{y`4Lealq23rlZHk29zyvYt;3-z^hIsBYvyvz1DuGw}i=j>+Ru#U`5GOAS3-LKJTe>4n?)2eBEOW+1C8$`dh-;wu^2_FQ zUY6b;-tnzoQQc4NF^&bT#ud$zk4aYeI^34=OhAZ}L2+9rJ?JZU8v)t(D$D4DlNwI= zU$1iat6e$zT$}Bnk)}$PYhk9fNhL6)aI9mBt~0tE+b0OBRwf$I%Q!ns2U||Wt;hdK zwz5xT92&Qe&Y|4>`}q7cTi+j-?Ip&shP)t@24i7V~WP1p3Fqd8Nm_2KR{Dqhf+BSdN%9gYJ< z$AgIo*S@MqwP6hX{sSx*YbE>m&$co5D;sVL+iMC8SW|-UeApREIX(_S`#rV2Chfv) zL>r6LD7!Oo;oCPaxNd75NiK-n__`V_oLJS|p7DH*%*$|uT<9&pVPB>NS4*ncvjNGX zImXKOrjtaEb_EZOjGkuC@VgUs+Br$YKTTAf&;5dmx+Bx5+b9d8uKVBn|9&!+-V2dw z3t?ett~7AuF?+hvx{Dc)S6DOPEhvlDw?{;gi8r9gV3WCesg(u{{Oc`9%oKiZB0ASL z>USI~agJ1z6_Ry(M#JnUem^Y{%<^DW0#cN4a&qMvV~Hw{S&1f5V|!_7%BqwFC5}ea z4MOVN4>1c@ThSNbnv^sIYM$Qbh$$8v8s>@e6M-cJaJDNHWzR*?(R4VS6{js54Mi6{ zyOgTzre{7IXionM5&a%IJI3&`M#+Nu+$E+@&z{V!h`6T>9C*I_U{Bo}Za6mV*`GN^QFA(t}EV*fbey9lUY;+^E&ub&^`T{-)E zOcRvJ)cp_*Y4lh;?`INkWD3yOZ=ZnY z!R)QgiEktDQ7u2?k{!An6LL&2VZMhO)vqPjlS`X(jteVWBYahmsbjR{gl#A)NPcOX zO6JgxCylTF+`UB53%cbGE+^Z;XX6Q1b&xLR*ByM)s6+}bpPMF>UY3w`i&oPrXTb8n zP@Mf6@rv80jm6M8bgeW-!M1Y2wj*8DH4%=03gC7SYnR!;HKK}$LCIgUbH16=SgJKe z`WzVevhVk%ko7W+C4J=gml^D3bu3*m@4HGD zL-{d|Z+&%9eA!!BK6OA9hRO~UvYdI$m#24zDVse4!q@`cp(0o@u>f5}HaZa?)zCvo zBK?KHh3*A_kKKiGt#Z)%C6zBp2pKz z^C+3^W9Yy@E2$vI+lWDu!4T=RGhf(EUKIJ9aMfGFGYUtszEX8-wd7*fQtxb*ma{ZTKCi#P!kB6X&C{Xmibz-HuG;t$3V`NQK} z(!VP|_Q*5ry~M()VN&=P&og*29SCj8>X`tCozTwF6Xbe*KIv*21j4NG;RKTtUqC4<)k`W!2WA3S{8-hrrr1dBGkqFvb|BPZhaBzcOgT(eyae77{E!?Sk?8-L6_TS zcxOoi@#Qqs8}LbloEOJ_abXVZUs)drJHnJgsgAxUC)vLdN3um?QYEtgx(JDTgBl`+EaM&?WDn{O~af9j_3dv5Z4YdJulCfl)o zgOHTg`k4<^`IKgx>)+Du1HO(IK$2RL5wQ9k$NJ6?-Y%J6^|2!*-ge%fNj&$fvUk1g zRP}1s8sISoE|#kHTYPjv^mH&yd*EJl134vX*u-nd=4G~5U69j+2h$~~#0|n43Z}8g z67?p=+kU4zrfR!Y2YgAu4t0@yrw>KpB@51G z#JgIAtn6`4UvqooT_g_FZN4RHohe%{7Su4wTcq~wD#q_9h1=ozli+KK(q-EFBTX|o zbvCQLm1wZB$J-o7q#Ug8i^_dER(u1sB%$&MdjB$5@#igf;Uvcn0EIm&_J>9$GfX{2 zsPi>l5k1`qicA4ziO8Z>1bjdvmAt5AoW&BKxV9XkKWE*o`A0w*tCo(^?{BhE$!Idwl8{&`5y6OyNVPa8~RGpezt+IpeSJMpD0qhK#X`0yMhDdU{J)vfge|wYlZCQ+3P1d$RsMv ziWK?Vo>G-E!ald}09j@&sw4J_Z5#{rYao_{6&OYF|);SFQc!jX9l z5hi2x@5R>XSXB}&WS&pK&}ggsGbw@6dcK*5S*qm;{|+><=yY-`F4225AM3`ZCqIkV zeU>qCo*l7Q-LA=1hEU`juGp%u@(+dsTYEeNKDT!v3;r zEJ)I!s%$S;svy&Fq+B8QO+lu8Pq~u*tj(TT=&8o`!vjwB_R{%I?dS!*oMPY$Dcu#2 zSgbXZg_{1fpo4Ra0J*q9;;FUE;&UHnD&gHiF(w7U6&fW@_kGoF4I+;g`xPh1DQN*i zKu#4NEyhDzJv&4lp&aN!33g~D3!sgNwdi3na^uTC zaDJ^Y+NP~8$)Oc585&6o?sN13FbD5=G-rK*Q_S*4S&+G0G>)n9f@B>7!wG+=SAvi{ z_o{s3+d|**7aUuiV$|2rgEKNRTBqYGZG{Zt{rJGHvKrc ztmBet+I$}|nuGZoD%mCc1uddaLBG_rH_c(dpAYr{zW0#O$G*>=a7b=#aK|oEHAEsz z9F3||I|Zh{=#9Tkv2b$!l7knWj3Cm^6)WI1filGg*B4%D4{~Hwh`-WlY0=GCXpj5U zEsn@xphj{u9%u`TL@3B}=zLL0T7`AF7o6jS|6RBE_mmU`` z)mRIWct5BJK2622@dEFP?yY($l6SaC*~9+=c{o1#YNJcppJn{T(Y-aqIQGp++>Exh zLIGEA`6nW!@;bIFcADc82RTs$ESfgsS6q8Bu#zDo`wqn4&@97xyXZxpQjdQ+s0~G3N2MA4 z>DPLCyTbI*>YNkVJd$-w+i%b3<}NlT3JTkB;ik`GWPHIn*1%nDXAD^T{8pQM>G-zN z1ekeioD_R;Y`)oaOX?6LY*4^nt1RXaT)3oVcgr3$v))&OM(Qae#57tA^D{TP-?o2?<*>?i8SAF}caenVAJA++UCS%l74 z`DW%qt3-C-yzxdIddEp?s+Z+KHn>{bj;dnPs^Ybvm5HLWl}l-}K!?j_LqOEv=ZBTh zEMlak`b&N#>}I)%vRP1kYh^r{@K-e~@&ftya!Tiv5Q_%(#Odiq64|U=_21+y5)&2J zo`$tCR;or(Jr->pU``?Hk&T5Ljq|@ztU;%6jsS{6Ic$#bd|a^ccO>op-RXGmPj(wx zX3f}FyG^>dqo~nEC&1E%NVvm>;*d{QOB|NWl-c3<$5j{IVxAN7=4n5IYzDS2`~f;} z{K?-~2O%7^3&sG;+Y4&4sgoPnA40yr?}aY9#))feeoIpJX>Ulv{#L{oLa|C(2d0X% zF*JW`iNb*KR|4>@VaIfrsvl_g0<>C@f*_mKCen*{G4pW?GG?N#Dc8|Sd2?1%R!dJE z+=x?-^4J`w~8_DkU;l!8Nuw%eX6x;Iv1i(Y!c;tPn7oL-Lcay3ZreX$F&&?va$Nf?Dec< z-Jo$6feq5VIjlN!sn`Z)h-;f~k_+XyS-M=sFSmTr$$YK!l-6u|t$*?&le zJ{8&&eeM*pkGO^>wbo;?3WVvWxA$T+h)8V_Wd=?~ArwA{bTT$DvPhE86vS_?mog0RGb&Ya;Q%F*xP$BP6t2l#9q z)S1(}>=8zis$+Cc1pVD>wjdC@X8ENU+V`OXPA#8L%a+nalE?hxg?LL^y8AmDoFjM; zfN*3vRmD6!Wk2Xhq3QsIG8bifJWsU6s%zs^lYOIkzPxb>3@?VakuW?|KtNDgZNGtx zw&v)M2eH{2)^KBMQHHUpYid|1POwtZuC=c3SMoWeTtQ;TFZA5~HMjvF+E>*d0oiLi zEunIkUDge!A$DXN6(S;v(Yw%@e8m3e;mP}jRi?5v60cbM%gM8AcCUN_&$W75hW`N7 ztQNl%stT7K!*j-fSERMRr0s7$U^@C`vAJ)Jq-wXzw5%E#9rP)I9(t{UM;c%`K?v9ozZxPXhOVX;V5o(2L@2DhszGpWqwEwfsh6J{|$s=ao!A!6<9vDKq?w7ERMAz#Lt1V(!7}fU^t>A_Q z#x`6((ZYK^bdj4EhqQ2%wYd8Q#{8|41)8?*87)QixZ4uDt8&1`0cAgYK;CA3aQRg13M+CEt~ zZ6`M@Hkr=}Oa;bOsp{u1hUE#LrmB5GMjNpCmwMxYXdN+p=c$`5RYG04(^V9n!HTy1 zFA;JLbgB5!OKq;fwql%TD}23pF(>PPQlvw*;_rtYNwv)^C@*$ z$j=vt&HnS4Qq+d}adjwbfM@jj726NHw|OsFr_xivK1{PRMFuQOih`Xj}uH2j_LLuh+JLcdgj^AuS!D4}nXWdt0RIapT zCZREH>ms#nqP%R_3Nj&Gq0R^h^Q{M3a8#H@#`v6sK6IJENPhxwMYCm&wXHR)qf6aY zN?XqGSxfy<(>CCMscOZd5$8*8qT~N02IlNzD?)-SN>3TUh%(Qt zV5Iz4R-p%jG12~9b?0X8gLp-2xaatbz^Sl5aHYW)Pm{I3!fju3+wDS%^@(>Lj#wq1 zD4woZeIyk8Fd{sMin?4;2(Vj3GxR9vn?YEXDUvJZW;{w2XOlK!fTd8XbFL+A&2D$2 zWt0ZHyoN?N5aPH)N57~5WO#1{0Z!_Ip9QQ`X3B^31I;c>vm-mVsC{?nWN3C6<0qZS zH=jK+5WF>RG;7~^*Y7;(2&BrFtZsJ{Fo!&IVGGOJhaI14Mr$b*5mgKy?eo;0NK_Mw zn7)-)v>eOtzFLeUO)NP3k=I6xA}WQ>u-$6AswO1)B#nGc&!pW9=uoY*)tpXoA1Z(W zt4U*#s}Z_{&4;kKX(2ezrqfxu%9Npe`!QGU>OHvF+$_3-n8B@dwJBqaxsp$>Y-uGD zk`TG#dACZ03|{YfQ$Ztx867qKNcOX6(phk2Z*?*fn9T+xPiC0iQWjE%aZ$RdHjH@erVhoLqY~P8D zIs~N|hqixO4oEhU7Ury>@_7EU0RfIHcX|}a)bHggW5^O#ZTvwY^6D<%lkMS-gn7-0 zo@iOt3|k0a6-OrZlr}w*qx8P8v$kX|9gIiBRZJjOU3CN{+NV`;z6^6Uvad}zIe3Sx z4B!qGZd1Y-yK3nL@W3r#c?kY}2LqGRd;57p-FDe(IH|LzX{kw{DhX(ko)K-;O#5JA9riV<@$}BRu}yK z^6B+ImU+ZYAi0BOL(5IaE|vW6KD*C`;LGQMOI3Mt~@2EO&{imvEO%wInV$$ zOIfIr1}@0mY~+v(1Xd-)*o zt)bTx>|h*65wY-AjM~>5%{QQo|0+w-sTgmP(Fyz43Y~x}o_nfaXjcwdZq7~`ng%8Y!E>8~vSC2;ptyW0?KB&erPi}d&98au-8~5)9BmHi32q#4* zAR=0uT;?N89;apG_Ic5A+GZeiC=ihiR1cUiLgtD%zRTq8NUo2!SilRim8&M443-`{|p%3G>bTz0EMZ{Z5b>!PXBi!!HS5wLcQiTE{kRoAW=2_t6 zrO+v2O^75C6O%Mp36Y6$ucQ$a#QKmWwrGP6!&rchjVRF=Wor&u*ID8fRAfpqxAP5` zo2g@9tl0c1*kV&zM&w-SOxKEnKKdkD)&9aTp70*!MKe*O=9s4Kf=_D!Cl}!|;-Yio z&G$JMw7gVwyu_^qSle`q*Il1O71+z@<3I{<6UK)zsZFC?Fte|wKn5FsiX^0G9ol#YA5H`HCXHZ&=2Gpoww^0H$1`lhp- znfpY;y;xEl8LqW0@?40vcs1C=PE-+7poF!2oU`=QgT_m$h$SdGWM2^8k`)r1GwZ!P zj0ac?PwbeoFG)Ll;)oV02z^)8HW4?Gkodq1@PqH%$xIehDMkZH8D8F*z($G!pPDb6 zt=SN5NCHzRkd2d5Mt`UA50A(OyP+GzvptLEc1=D2?OOJ5?@pHLF1;LyqI#f;6#+Zj z*PT6Ewvc!QnW#pkVFwx3>8dbt+6AKI()c|~G&<5073}MDkowLuX%uH6*Yd#O(~uzz zEKtfbbN8Q{drK=vTA#UPXro9vYe;bL*OqP4${k8NqH*b(;mSBf_Y+-{_XkX!FaHYo zlO8nPR03%OSZWnt&oJ6@Ow9}aY8z)Lj{a;)SV3Az9K9H6;g_2DP?QHVh@Y@AhfHRW zQBYVpIEFr~N`kf4Bo}Ha^q}(cL>`|rO!_^xf|fjswSYf%~bA4ai3h<`O5X z2ya45?(;>FYw!U6L>ABZaMc?YYK#x~?Jw2b9*wQJGY|t)vN27wkg0^T0vVW)M=yTu zU4G$*MKzXLdVIkPl7{1>_^t0q$3=8!j}*3ji-jQ7Qg*tK?EM;)HXPBpIJq8a0Z2`l@vtWt z7H;Jk1tzAu@b-6YvaGnBm<&!JgoH|6ykd{LbzM27?Ip1_Xa|~=NdWq}!D6|}q$%T< zmoa_;Y9k+0vAtmCsLA`aipPjxbGu(gQRo@M!~etshp3U<zrM5c!@if=6LQXAV_w-R`nN7+%^O#zF_nL*Vcau&O>Mm{obmih96E zjRBv54)p|;;7A`vce*6CoWvCeQ-v}-K}DuQ#=U}gbFRvhrpU}WCE!E*UCI$;@ueLs z1|!RHl9=iOq^eDAkSKH{>2RE*V(g7AJYeYbN^jv(itsdFhsO~nF{Y%{TLf~I!w>@I?ubA)2Dnu z^g=C~R$e9tg%tHm(8ypr{G8_}JbO8P*j4c*Fz}dvo1U#|ge7-~ck_?VZ!>(B@S>{M zMzQH2;Qc0@#$8$=Tn(zDW)Fj@{M-_i+nGaa#tAld*8JI^`4D0dmB|=lTh}VQw}&Sx zT)4$jcjB~icSpFb1^p+KxJEi*_-nnJa*aIpm)Ps{0`V1K>D+=}IW@u(H)guOfz!m! z+%SMSd)(1ZP)-i#W0Qu>N@Mg?jSAe;Gr?D4>b++e!y(z0p4C zMu+_UnJKL3l)hRmOeI{f_+`HUXR5n(%ZQNm?GrXc#ug?tDQU}ugSn91m-^AS(^Jl$ z7rUYeV(cSq-^HjmDiK1ye4)KfiWLQwacTZws;dW?nHC1fjBK92S3Ya$YMWR(hQFWE_y*_#ng95Q*_h!qsJ_0j%?bphI9PAB!fZQj6>=cszy^YiZPb&MB9reZa)OF4RcSn3Xx7y z7yE_v{XsRtg4tpO3JoCh7F|O-JO7{U2+#qfyUFd(AI|%+amZz4=L6c|`FXK=1sgwG zttItY>-m9X+jzNp?Z>{I^29RvEMM@y!cIy;{$A-j*N{lYX-k?ZHRtjDYK`??D_K#? zKb(|u-(@Pc41U?js*Wvb08P=IjHy*A4Pl8^)M9tE8m#lFJZ^(V-)y^aI`J%1j{f0l zJO2C*vVo!FGV!wfs!=*R(VfmyVM911ZJuh6?D*3$aVBylwE~5_9aHQxtkV*9n*7%d z=c$27n|dv#6fIrdqB+#?p4bjhIGWF)wI{-bdE;W}U*FFT5*X)M>Hfiwu8$-)Q&Ob1|0^T@>~IDF?EY zwn7m>NASjr@EliGiIX8jhs*D?vf58K->4A&LJAKn^~1fz)!L!|9P!gF%c#vq3~8mj zjWyu+hKY{j{5QgCB3;TxUeDb9I?VI@+z@V_JtsTMUtKp_&BS13c;qZ|!YoVMcx7Re zrXB7mWR&aNL7~3k1e!R}D|VslI%%nC3yxS&d`ma?jM>gWcmwL18(vUc?nnOJSbsi4 z)+-?G4sU77FV5d+lp36H_LFd3EYzguEswLF!nz~53^h8r>l*p9#JKQOQ3^oaTz8>v zlm!#OvsL3Rw=ywNdDYVLgr1a>c-REvllCqD5mtu@r`JhfRM$Dt?MdXx%{%pS?S8x2 zazbgs;bc)|B1@qE>I!oJpMOEjQUM)KnvQ_r>wYiE8+;WJ-@sIUmD7E0+ha@iyQlUz z^(kpiRh7MJ=2=E?hIn~{v^Oh?$fVi7X-YgL?@z@~8pzMg>}sj`iLggQecpN-QCA~U z_JN_2i<^dp`_+qNY1X~?g@4IXfF5>(E)})}EyOAe+)h2F_YSG$D=z~O=})8M3jQi;;e}?&_V|-I>o4mPn2Hj(23)}Q^6{fRl=B!vf-}q^ivP_JO0zmpC z%=yqcYDE0k-bNcl{k`h@Tgy+e@$$XwfZh8aeOsI&97JW+T`DWHNl^419J5ISCw7=hDVxbnLn<+=b2;~dTn4A zdLu#NhQFcOw;vBJPq@_hlg5_Mo-nW@+lKDuDwdD2|Mea-w`R>t)acVtE}qXPXI2C| zZc_Ml`3K%tcpm6Y%5AQMHAQO@5f(J$&Y?Ct+_~;U-f?usu4o4XrW?7VTzUi0Kl)XNPgK^;conW+q{;9%Gv$mZx+zmrulzEv!C$sz zr00arOi?IY>ybgHu8I|?EceZHS4Z}=e1);>DCxUivY}-^6)HzozJ&zc{?}fHL?ZRo zn2VvoH`tvW`}O!IK7w*`dA{8`WO-S?;z6J@$C(Q+)y7H)IL_%xUZLdj;)9 zDs8G|o6-6NO@X3q)PL0!IprVa(~BVXIx&vQE|IAb;93(f&D!mCoIlh$bhN7(E%@6b(eo{cz)?6VqVr^Bwn0K)u0 zLnph~r9FN;4Y)zl{}0y^CS zp(@9jqk`u~hKyO^(sr2L{1{jN>gHV`~CK7_a1{aQApt6j$ufCITyAT@U45VKkY|H}rsFJTGV^fU3iW(2evdz0aqn0& zzo_i@%FslRH>YGrmyC!^I7k(G$G)7#O6=nzU{svZz%HMK(dT*oym}p{Z@O^i)2=zE z)8!6R!>dVHtNeBU08caZXZTfrG5Q=t)efchzFYsGapl~5;V66E@&Qaf|C7>|=|iRW z_ndel$LqD(uT9F{2ee-|IxtK-o(<(^Z(soOQbaTqk-gqdT_Qk zb8$CxGKG?{H8eL>Ff_L`wk8EKaWQc-@{oRX$-&6N$;iq^s=^8+wQzB9;ALiZcXwy9 z{15u0e4v@^oy=E5PCpnz;s1xDnuV*a5ihT}y|JsUshtZiukr`f8H%;|y^Z<*!u(gC zyu22smgW{NP^>&`Xi!f7kqqy@@%i5v4NDUji~m4o%E{nAAO!ynqF`xj>f-5O3iV%7 zF+13q3)QMC{$G3))ILy9tQ9lW3I3-_{l8Ux z2gyL0S=yL>44>K7&c(*woY~CK&C=N3&YAiDd>CdH6AqxEsVNI58_DD@6?g{uh{z9)bV> diff --git a/client/src/favicons/ms-icon-310x310.png b/client/src/favicons/ms-icon-310x310.png deleted file mode 100644 index 246b3f4c98a024b4f370623a5d179887e1527c37..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52893 zcmbSS1y`F*)5fhh6nA$o?k>gMp=fb;cXxM};_mJiq(w`iXmAUzU;4cN;7iV(JK3D% z?8weu*UW6RijoWp5&;qf1O$qltfU$Q1SI#r3jq#1a@yNp4Zguxi7ARfKr|(OdNqXw ze};5blM#og2M`^DKaiQpswqN1_|QN=1cgCBJcEaVjvyf1*&rZJOdufmvmhXFo$|U> z1;JmyeN&K;g!uUPEb6OF1&<&)$?Cd-@3Q}0(o?p=;GaXtNs4KBZJfOUQ>oUo4`bf| zd@SPS8R_LU?hm4O5TV4(9v&VSDYmV)nF>pf+lz6e)@Arz0zIzYe3*kKMR20f*1=lk znwI5A=O+jOycZVx8ZIdA_S(22gQ+W?pikg$WZIX0-soW z-#2V0muzz(H)ly!|NUE~jh-zkD(YkArGMhb^Y%O8_RH3T>{43Cc0g`}-(5`}zkAHs zm{b@#r%CR**>5ISffm+36*Ywd0s?*?#_!=D_dJ0kXaQHyOI+ogJc-ES!q1Op!hL@D zw&yKI2ibjp|HopH>Do2a{3D9hL>>q{>Z?E{hopzLC(m?nAhVJJXTJvf$rq#o2$%Xe0YEUd(`=B z&!2kM`|aDLR;X5d)2FF5F@*w)|YR(&VRqe@V9$8Qv2yf?3$B8)J*YaEsyzy7HQEUUzHd^}43U7e#d z=$^P1`!-U7)B{Rh4iy#6`!W>G>$p6Vx2-E$2;Pjq8rjU{fgev@+4J78QvPj8@_V+Rd(3&3k#%6UFP|7}l5B?tpqR3JOi9u2)9d4dnLHui zj0O*W7%`{OpHCd;ErWlBm2DZA1iihJfPA_+DHinKb5f|}o@C`_R>$|)LjwvIoubkf zY}#~mbjp?;e%f(=Z{KLuW7ezVuCq*)ZjmcpBtw3qW-9ah3zqbL4-jN;sr)BRElI}8`aMGx8`cz^tXxum=AcGI~F_Y{Hn2X>Lq+S6zvDeTkFni)wJR( zx58iB!fWfiQXGFD^aXF>^6u!t$IaIe?5)QnBunRaM|Zx+5fbBa;v6KY?9vjZE69~A7bQ)jO@_8yQZ8Hrlbq`6w{}t% zBv?~9n&joK32ZTIYiob&I<`tgh+N*rQOeR_#Ddr&&cW(?-pA?>IK?@)Ox4nr_1Z)_ z4#j-@d3s+2^DdVGjJW14-X>i~*#b)zf?9C2Eze%>kpfcL9RCX{?X9h&+FL%c;Mm~& z0yrmVO;d}LrgYfu8j&Fl{HFk*NU8WU+u)Bt0rNK5wI>13vFV zNcwr#8zzgqI6M@1WO$*7P?iy~!o{m3^G!QZXrW8ZkV7&`U;)e)gn^3L9WP{bn#qcnAa=@OlL5$`EUUW<> z%q{Khfa9N5I@@a|-rm_=Pu~3bsOKKJbjULc%k1m+B>MsCM>PLJj(W#Q$gvxL@69x$ z-|f_d-_0?t+Y5B-3fM4eF+)z1zLx{@D=RoaK)!^$H${*l?KG)|yW2zG_5lA|R|y?n zqWbe2M&ut7czCembpH#5US6UNs}@{msR=#U-lR1$FyAC=F>_R>4JfV34I4Z48W&cW zT2W3v;lH&`i3|h=qg^t&vN@pBMW*1K$~U^BmW|>=qryPZ`|FTIsK3-92j{!$0G(D$ z@3I0sWgko?SdmBrB2>RxITYN*D*_671{GKbroq>2I0&d~s9(Bl^9NY`PIJ6B_iueH zSFlphQ-eStgKn>6ZDa3rrmEO1qV&Po2mCK>zO-)@>Nw&%y>44qIlu z(`VJ|p|}-mGufYUi`J3@JVmP@5}g4cY3Ms-sc9zH@wZsvVPutWl0;>#dwCw5R>g*m zf>ydGcsM|&Pxe`kd>e`~lrAvE5_E;6BYb&SvZg~~84Pf8lka5T(h$&Lahz6mc#V=E z!UhqGkgyV+e^w~UMvG&@2#a`(O1Pt%AxkAU4fsap_jHKT5yayt%-GuH3y*{=usR<h7b_xjFXlfr<8dD9MshTj%!cu8^a!az-AbO%{F>CvGqt+ZwmpxcTo z|6E>|<&c5IPX_{mWbzmyF>3@Ug{r(jSp=B!)q{a;Y^cg1K2;GYSb064(y07^*mvF% zwiMo9Dh>cHbH!I~_B*dm#mIO~Ykxn|NK;w#FkY*fKh{T{o_MJDoi0zSuT{&Y&fn9) zcFW`QEpP?0I_>OA0rL1}rl*li@p_XOCjPBB&W_GSlkeZ7J$e+;VX&owM?xn`*YX8C zAE%T9hSM3f*S5E571Se2*-ICrm=tur6T3LOXNCikEb|uQzMMx?{N$MJ=zUoJE?x;a zhqsFm0ucsdjwnhJeRZ)yrL1jMUn4H#gaGv&V|r29%;SX_lXxeIj`|IF3C*Hfu|cIq z(xCFZx#3*nbUw7%6NAl!P7##St8cBCVTl~+kBa88zTQ7qm#f`%b1YNqSg?D0+yWLR z0W4E(ZGCfR=jhE12Y5AscNB3ihkxR@nzjv4RP?q+8i@YHU5!6oeTp3TfERwhRZrn6 zUbmyr4AO{U)5sG^2L(QQWPT!~%u(C}X-$)tN$^Ixk)6Sm#eF`q3$YNkzYLy<^sB#J zo4)$0v9P!L2Vd+0yBqxsS?}z216!Kh{7IO6FgjZOP>{6#f}~M~_}2?#XMMoij^8el zUm}+tM#N6CUpYHmK1!Es%f#Gi;Y}=A$#S-pg?s)_D*)KfW_q7DPJ3Uc8UO9emMu@U z%9-=6|G8MMD{ASdIQ9ozIN_HOY&~^6#b0(syHV0aFGxRj$L4>*Ua!pmucyJ$@Jg{Vn1QZs2+{*YJ*lzy~d^dhqHt4>^yixsgY-Rq> z8Z9mKiDP*Bhbx;H+GQvHwa=u=NTFqElFqZ6uYwR_cw`XvMBiDazRuFcPqvaJ5OrS# zY0c;&6-u}~zGgW??Ug-j#z_(euY`yzxYWraNu|KXfr6Y5NlUp*vf$#>#;V@yc!{Kt z)uUJVR`_OYKBq|`T>282E$~-v6E=7FW)iM8n8xkQzrV6J;j)qw(P~u{;^zJX4f)Fe z3F4!t)rw&i+dA5D9N4-W3jQS?hUs~JHa%aH(a4yUkQK5$MW#-GKZ5W=|V z4iG|u$dFY{CDEn9C{`mzwL#{?sgMaDbBuk?BR8N!AsN@&Fro@z8ea^U)l|G%3e8Kg zaP4Cd68OML!-P2~y?LwOQ|9gl@%#KhZnlpXi%4xGUbMAs4kQ=BH zWkB%YidEjadE;VVHB zX}`i^plQO3MNl8_=3wuAAcNV6P$?s(U}jSck`9{hd*d+LRuAa-3)Itb(_BL@l1F1f7QAFe@C(mn6}l zMiZ(cexnBU?}#zkjJ8?fNWXic!&NOjw7?aM!y)O?fc)v`hxk%dBU}w{HX{>wBi+^A zGHg!sD5K0m*lvgsEf5&WOZplorw?&JGc_=(QHvXnJdXjYdyF+uV#$@WtjwlvVjKiX z<@Bc5KMQhc9oiaKI7n`%Qpz-N=_ff5prr8Rhea`9s0Y)fkmPf2WB-;b{{BZMiF7o( z1rBk)-ldahm)CuTg>=nFol#IAa_d2!FcU9F7|vRGrKqWFx1OKJl7@`8Ozm91+S1zN zwT2B-{VT?(BK%cd9r5YrTLWX_?h$`XwGvc0)iLjZQ-_RagEIfLpKl8GgPgDLR)K{4 zfyF|3?E`p6qKiQ+o%FSkUM)pTe3%X)b7<3zHtY87Idj~mp6B5I6q^@#u86a`;=JP0 z=$aYoD{zZ;kB0_t!D~C^B8RRMB8mwoY#uKjo(3Q#d7$evYJ71X zelARMsBAdQ`3Mwe{OQKNN-$%c)C_hf!RacT!wN!#geF@?C;p||_etOS5=Xi+B=l)q z27)@A8NysUL%(b-D^y$N^Cu}SrF_e^^Cf{bGpEM+##L&3G=-CB33@r~@crPsI#Woa zNwu$$Rr4MH&3LoI3PD55@K?L}IANWClt)Nieckmlq2pD}!}i{Dd@hXG|&wU2>yX}K#2*B1rJsJnSzrIFJ*)1xZ+XFndcd$m`A6xG*5q(Yi znah@CPhsu!_xO=i287`D6(eu z>oT<*QK}&IAVORqEsV?wCYX}d@8C)5YV&{DnTKjuji-_&*W49(U!5Dh4Da@nK7?R3 zvEyVuCpg==eQ3b4X=x|gc}4CbX)hoZmj+XkK?OU!!jo;^sX;kspZ7G$0&w1BKOJix+L9ty<<1^2KqZ7Z{-}_#tD>_k%;J%_~#j0{Zl&^O6$uz zvaa#yup_Dw{z`~l6ZZe8;h|++o!FeBVe4npRxK#+L127a!GfN3UMLxY>cJ~aVPiu# zj;QPb5CQ@6&JRl8EIeu1Q^YU7#_7vE(oOB4wZbMs(~5KFYUMVu;z}VaX1^x+31z>2 zTGt?lComQRm6pb+%4w@qo%%a(oLSB}>Up>nSaHen$(4wEI}rI6WK{b4`n@+NwoFV+ zB&si7Mq&>CP3urTq^|9L$Ca~Egfrdjr(S9qy>|gLx^w}%aWo_``9+4@yWDBAV?Xx& z5w1w>&}O>1CeY-U@)0qzY-*mRfHb|7XP_uQ;3QyrUIgya+2l%RQ7WytnpprRtcovS zng6&X%TH3CpbquC3%1#OcIN_h$}6lT;@%*)A@J?=^|VIjt3a!X& z+WpmOp07Sqq>ad>DBcC8b@T_Vlp$=A2*)7BVa^NCW(qQV9NGi>2KuNX{|qCS0CUK~ zHzY;XHMu(wWc-$7RT8m=yu#HoMo7>yRHw5kx`hgw-61%#(SX=FtXa4gh8_gpPG^p{JXAMKG72UWm zXl1?-)}>P%$_we@zc{fZ>!QdPV38j#lZm&;rX7Npv&;)r+rxD?N?LlwIRN-~GDpMc zJQVyO<`UjpQLTf?uuCL57sUaAk{*$wKwhTrc&TuA6DW%XI_5wc|B5TJM!_8Y))k7l zc`14NQ$MT9KbB^$q4DwYwEm9+T>pWdYE8`nA0IwVw9-Mf!)+wxheouj7@In|R2V}| z;mV2%_~1dEA*ZB;o+pyJecWD;b_GUmq67jzKda!-i(I@1<_PGycL2%T2u3U;D6g+| zrw2?C%na~{eHP@U@qInf@NUO-Z2bc(z497er)?@`a78=lSNo_fRoToM2bIq{l1IwsD=qv+LX3Dy13 z<0<{3Tkryaj&zjIOd(T=DjMqC2L9cEXNpba?QkDluS0b{)4{U}bIHy1AG>eMa_F9P zI+C5>^Oz!o*7dPX?Il2H=Bo5$Gx;z|6r52&J4Zaf`7zBvWkSlxlHROw;-8n!@QF^1 z0qvK%%)8Wo$=G16pOrrbP796CxI6*HZ57*>uBR)^U|JB_`*CXg^ZYKs&-g&~w$Omdi11JbpQ?f>u(xCaRIUO%6{UX#9Iuo`xc z?(R~E8h*ap`SFoJ7Sp8E=zm85dKNO$9ROsj$8rHPg{0enmho=|GWtkt;@_Sr#Jox;{PG|8~AAV-t(C9aVZuBp zOJa(HQ(j;StKZ>BS-yX#ZG13${PWJYb;bOklA5Aa(z6$a@;vlzfFXs)to)RXq0_@kq~GmKpt+M%d{x)%bGXRP@Qkskt?dlZ zsb92zE)5&C+|SjgWnB%Q7bWB_$a`;7FkIZx26JBf|>?`&D> zM>eWCMMVoxL?0T*vfOmoh(2$2{@gcmL{!Xu(vtP97u$^b(We^Aj_ON!-;Rclre50y zBgU3(a@VUPB+`ZXw^dVp_|uSxui8K4maY|^mBK{`+JV1x29^$#cY;KCe+rL&M!9&s z5gPCN_?q(m1qdi8S&vJcb_-N`>7CmuNW?*(U?2K5`q_-jyMR1h5>GCL4<{x!&xYjc zc`T`}4z?(qGm^JYnH#Y1T`9*#xO@F?s&7r1ODtJV=`vE5u^kpqUsw`0l&xX)$|BID zBXO}E^{&9y_bWQ+q(_Xo>z(4C^0Yb#gU#~H?Y6sy(jPuh`#=wQ2?0}GQjy$jg1yq0 z5&L=zrluFH2&K$rUcG+$V}_~axTd5o7)sir>1ko6QE3yw%oDuPEd;7W&24P^b)V?1 z0C^REzNgY40&dx!g8U5Fi102h;0?A6&3s$Kty!?f$xW%E36e<>)Lm9?m`Z!Lflh&< z9P+2S(DOCXQ+b0^!hZW`>I?-{z;?qE)w40eYrz&;2hEUmy-xR2RMP$z=p})`5lis0 zHAZ*ihXlDoZu`}lD87fi&3riCdpf2Z*4JnF7ob;SMrs6iH!R&>eJ;oOmiI1fiz1br zYKc0V)%FNy?8^rvG}f(LG@xN+TC+Z{XC;EJJ*l`q~{kI#i9I~lZ5Pgajsi`#^T)P2}fLyF~J2GnRJaMw4uzHM+iziGN;mc~mAK|5GHwM)c zy2sUMe75+s_)}i98-CNPM%u4K9a`%fdgMG9(%WO$@YvtQxB+};Ho|`#T;7~QgM}0- z7inTdZADNR@h!@xNcL2xm!=JLiAhpv@B#c9S5$nq#tGiTjZDC?G_^g8y^m6_F}8e8 zfA%3T$Qmf;o~jWGwC;4igRbud1zM@U24wWOSsiLI3Z4~=-cLTV z588ghU@}Zk025{n=qowjHYg3eWtRDi77}($WRuT8bKB0Z$E3AQ9w$(0Vg+`4UrBQ- z%}eu)Sb>KQp~l-n67%`RLIY80kKQm}&AaQ|k$owbR3p$$eoUA6ss4!3)K9CMxD`6- zo8WPnj6VDMY5Emh=5Q=lBq)WI%W=I+edq#Bi7Y4$OjIxD)-vie$N4_@+|LAh8&Ci8+1{SgkzwzO`8x1)9aO z#j!s_)I2QciWiv2!SSuOO9=OM3>OQ>TGygWP1hK&$;Z{@EbK3AsO%s7O;h834euO0 zHOLiMLb$B3CJQJXohr;v;l-SH4&HA8Be4OC!wRJ{CeE|-i>qta4>*qx0psoN5f_=# z{9%3>I_3>o;Xm0{#(tro?Z*L^<2J|UUi6(WM5OA9nqF<|WC#h?VM0EVrxG$%~nrJvmZJm!oqJxAc z5xV@>sqg_Z5949uuK_|fMAPOl+p$RY|NOC8?(um2hR4BRXTOHKy<%1K~_=%y0QDKr+MF9;;L`Nzh0V<67g@Z6Y>n)UBz_X#r z6(nHCba^x9*f%crvt~exNYF;Nsy>F zGglt<46{HeYR90qD(;>8_G9}AAe;Vj$-%Q0fOz@BsIVhx#vF;0q=W(mVO|| zu7y{2{aEN6MJX*_0u1aG=L7D|sco{&=K-hVIgy>sC+0LYqvKt6I0aGjtpd3qr{ zWi83f2hRna^K3HI>y?W)^|j33DQ_2hz74e41r9&8N#ry^V4MD(~z%p);zk5Kyb{3lMpH>M`Cl9$UWT7Xf~G$;j?ow!QyYWOqS8>slh zjaH~{0Dc86DVg`xOH2fN{c6l|Q*$e$Ol_?0h$In7ZF#?*QZ58{#uN)*?)`H$q58G%|R`eve5=P>!kpNXA|LWe4JP0G`Kx8uK ziy>(Fgu~biQU*H(47t-+4F-tvUaP;E4?+0QpZ$mApa1xtMVY0|cJ$_Hw6$qgZ8r6(@N_BM!jY_N#Wy-&kJStG@Q%yUdn+KR8V22Z z-Nig0*{jiB$6}=a!#xOIWFEy802+wOQ6w(DxE z(}>8Tv(%Xzw$fS2OwlM(6hIIMXsUov#bIk^uNWBdGm9z!T?*tZIm<%Ihp@x05Da^a z6S7YDo#qnS*?SBg==cXQ!yOH?k>H%29~cbSuJd7+Wfx;zmhz5Ti`W488^;xcDz)6eEosF0?T2~q z?aw(MP+c~3u)nNJ$KO)hhaagtt6<=q zGmM#{AB;>S&NohT2ylx3>J}Ai$ntUH*i}y?WjbAwFSUzUgBmGG$%e4=fypAaZWzWV z+DRTl6kPb7K3ob>fec05Yo0D60cE4t+b4cV4?37E35S|kjXx}mE=>A}_Y4PFIwL+F z)%fj%zzR@ET_nT3Da|%cpvXbTE6B7az;zpulfFWtkdGm)a2ZS==xoC{NsM>eA&Jn4 zfCMwH6j4hEvw_r_tV8Q(eIm$4KzWixG{_(Px%u7+iE>d|MMsXhRaKiV`)fC@xc6=Y zwkTIN@*Ql2!4NiD!;kiW0;zQJnunBwUp~D$lVE_3yLL0|;?+2lp15Ty*r`y9l=qXD z2?~vD#b$hjd~R309l)Ikq1+99Z9`)UHDTY7pV7}CNN0g|C)v(v8_`?0bBVEyW24&A$aerjSb7*< zBfNUqwMZbjfv;|i_EeuER|k|$+z{;!+VL3a;w0&}eSIIu4yXUntX_U`Rw4_ln7nDG z6Z#XX8(teihFlr6A3GK#E>8;BS|zygu2_nle|&jr$8YR2(V`8`F9nn8mvP$7=f^^) z<1bn`y;iU|^go=Y7O->LV0l}bq|oVV(_xyl2kThQ!rQ-jQx0xGS;4)}gaH#2Ed!NU zERA)UBtGL)7z8cg6uX8k3hxVEQ{+>f=g;uXpoU3Et_@9f?h27nh^6RyT<9(xpeocT z^tye|KR8ITbAz|TwNomv_KAe`h36}E9vaR&v~9pY1j=(X!)`Vitzcn-P=oUcjP_h# zcM({42lZ5a?6980npCXCu=$ZFACDr2Fq~h=$YzM;5j4J){z zuVQnU?tV>UReVLf;%ht}gZlyoa-Xb)S@&uW0CkL;UH6>rhYrmF+@{{%sHz2%SUyq* z%u^|ma8;$1HlJC%9jQfOP7pX}(#6V~&~!*CF#zQ5!3%JzI2f;cS%E6ATeHkVJuY(Laq>2yXfEzV{@}+)X`UA@<1wc+t-bVfsM7*XJTqt zJef5$lo~?c*PU+k9o)KCjOitdq3mze9NqYV*k1tmfe)csVHuA8jyK8B8=xk+UkR>- z_=?T#$VNn(kJxK*yK-kz*CpI&K-ng`B!%6YrWeTT#UA&I$|un)zsCd#JT-S)EfMR- zo_xbt*=-fevB9xCuIoBx&E}pr1g$Em(i~}K&)77!*mm~eO0*6woqX5I046!$=AZA` zMNEB?_MZbd44LRGM19Gv$ylZyaI2HT4{=G$_8D$_6Q#-ZS~%5A-#Oxt#P{eR%<+)G zLO=nO40FfU5Hi)*Vo5JzB+lt6;7KEQ!OOl643^O_d zb<;sA)!HvJ6G4Q#abmU;b@@S|<_VyN{?U~ciev(nGG9EQK>{&uj$2gq_6OwPrM%yC zI{G2JDdt_c+Jb5Zej%%sZ4X%5`B+gm;~3!ymSxcz!D=aNHj4$uU<-)U1xydqm91Ya zShp?mkLelGUL_Kp(MO)Dj=_iJ5_QP%YSUD>~;0)v1|o8L$l&f8IuqIx!XUQ`~6EfkzB!|g1GdB;7l$qUt61aPqIpx zfKKicqTXI!pZ{DRbgU~rV=Szd65sBmZ~4`M2Nbb!`*ywD+6Dq~endHjZkfiK{MGfS z|E`#h>^3vmNs7XqAr#;8@Sy=Up7$?U_pfwxcl;!}^Yg(<7uJrKvDV;8Le4>YlTW%# zeu|_=ERtCR(fVI-0#vVy*v>~+EC2As!nZ|26Fw59k1P_)-bb>(l|^Gg218LZm5y?J zC1kR%bF#5b_TZH1B&j&sA=sh5IPv4n=reZ7 z!jg>+zaqFvs18LM_Y1Cr3wE`HlxMBa@duF20w~J-;J@U|9H=n{&n`46rSa^!3-i|d zB5^XkQ#k9M1#WeGNvT5;iy3xaQ{X*Hz)MJJuKt}ET_Z7Nw)1Hd&1d(KR2@5lABiE^ zzB||#lUh^04lb-|sjynDBe-2p zzVR3`gD6b0k{-->E`lxDn4(7VG66anhsBd`p2GGj0?jYez~E*s!icU6>ZBZTTQ}9m zO{?`0-OE(^5?xJ|>hUezx~Xxql*Oo(VG1$4Z=?IJn*F~#m7}@|7^aW!u!7}=%0NGf zp%+WL)GslVGQJ26K6eqCfY8Cv^OI#b1~^+Y4L|Tm3+EXyF7Frlq!g+pAS_N$_cc!k zIXA5CJvyr!p$hopt1-l#t%hHHbx&U-!l}2TV9_%Tby)C05o=f5>NhIxtZjq6+jVcf zI=ndPL{##51SrLxS?dz#3;To3}MHo#g30*-Z$p>|sfIMRpGeb-m z6SYuh=s1C^0!18kn1ZfLrv2)QRi0Zo0yB=4%r90v%xX_W#DZu@0v4fNSN1j_dj)LS z*)_F&d}-Sd*{{LTA77buxz6R%3$DSTnAwo+h-4`zmli=HgzOe+)HDhSDh&y-1c98I ze`c-AJ3chu-mMrvar|tvR}7n{4*~+J*jx^-o}~Q4FeR&n%Yq9p#md_oI@c?WHD(nI zP=H$o{^G|Jz?+H7X5Y6+gS?Nl*h*7V?{wP^%{DxF;$M_8~}U> z&@w5A^_$Ua#DJf9`X;u^&6{{hcSO~&nTd^k#CA*2R4H)5$f|Qv=JYJyzycbDPk=%W zyIQ1Sx~d_q$eUVbE5FZ6fkmE)7)b@eM3 z&8Z-S9`LnU9<2eYhk=T@m3lQKTxoLE$Qdv7g}c5QDq^(5_CRle7#7^QDTdU37%|H( zi9)RP!s;m%LGr-nedzlc9zNiz0SV87{l!qC;5Iu}+OCe5A0?b~+VRZaZEtUW>`mZy z$M+SX?I5i6eFT;vAFT(dpCe7Q3$2$eTekaBQeA|h|2A@`@)4^FG7X>XWrdW1@O9-9QYzNBR z8W8S=tCY^=&HF&cI4$c>uH?0~0yk3e9wAD; zvdJFD_dZOso(R9p+fP79;Qlw?di&k@vy08YCy^rNfPmTKF=5l91+C=65U!Sei!2>) z?1wIVb^oMgEN7~9VgIIrt1Sk>9GmDAarB53>HU$p9~-nMBnpLIBvvt0pR#NT4hdnG zzUKvBpnLen%)+!1I(gI;;qx^^p`+$jmc2YQhC(ub%2kli0&<3N^Qwh?{+eb~snu9P zPvn2G>h$cc`?0O*TLh?|dF~tjh?Y?LgTU|{R+YOCnU|zProy($0d7qd)pJWOjfHAp z#Wiso^5XjIN+S?|k7R%aFZQ}$DAC~b$y6T=d`?}*r zzJu{ItJYciy#X|PxeW(Q^ZKpr`(1THPPSr%HfY-!6c8&&wODuUhhteyD_MO5dsZUW zS1Ua4A>d|R@w>QBUkbrFXJ0X<`Elfzmm@KG<4-AXFOZTF#g?k6p zUbZ=GC(}-v3}V>wyOWVdv?wCZqIz^L%sO@lTq96suu8B*W#l67RJ#|!--_*@QX8lY zHtC|Ewoh$p#S)*x#*)fqn>X282~@CQAK;77ME6rhEQqPHsb*?EX{ULYMoT8uV26xJ z8vV|AqADNck9OW7)L44h=7%wbsEe>V+k;UOfWoemU9`aq8C1pYYKY@kC=y>1-21!5 z9XjIgmb_%=sS*rdzd@Li(ltiS4alo(>C`}NX8&qCrMXN|j9o#8M|9!p#U|-?*~sC@ zJ5bQlwd^8?l zfEJ@{m7JzH)9Ar2FSUl%`_u||;DQY+8yt_r%LaPgt=Of#v8(5ohoLgB9c&wrOC)g0-(E z+eGDAm+;}p%1oN}cmt==BLnd9BH195XTHOL!jP7jz=vy;f4OIfT_*W&jD%&Ec4CiYiEH$x745VFjy$)=c8b^zP+pXd>0r z=XIeSZmy7q;LedbxS6CPI)+I+eMAnYS&8=+gC2i>2;gL9AV6Om9RB_nzH(h38SsjBEl1>5U6x_d@0*JV3NJO)Ly3QbiHM8N0Z5rn1h$x5i|$j(J-Y<*~4kl zA{y5v-Ea`}YwQ+x9zOENexxba$32dH9=gdp+?5_b38B_tQ-U2w)ZkS_u0PvBF<SM%#98j0Kxei@qNoXqcYJ78Jo@f)oZdU*wKZ zlcZG?c0IA6EB(eI&`}>8YWk5Rh)+%hW6I0-_s&C6DMYV7PwnqtyejYZsQeQ)bPK7C zPmp+&qF)+qFmUaIRZKXxk%02&INCRUjR@Lu<%Co?^h`Cb_|0bPZ?`OCf05wfeYy0R zhl^C}4?(d1LKI*Qk92&qHz40ObNk@et5AQprc;0fyITlX=DrjkT{)9nz>}MNp@h2H zLL9YoRkE6yb9v*p>{OSKufA+fqNU4ZMmplN`4rZySJQfvU9PZ>{Y2Mqqze5X>QhP$ zMLhC4Cy%|VYO=Lyt<vrx597tV7KGx4iQzN!@Xvb&@)si| z(wc(Y(pxw9<+DLHE0W8Zj0)+>#S|KA(vuKYl%gxZuU(ClB2sN=wWW({Ol?Sjg!|*z zuz<^?^;XVh=Ze{jobB11w^!)rL!3GhT0)#62kPtllwse{cS1dTF+tk;LghX@Fo z{?_pj)YiiEzJhD5SYdN z)<&!sHbC(yV8B+9d({x#o8B};QN0^N7_K_|v}|#7%4hA4!2dZyDb+IZ?Ea*h_hw@M zA#Fn2^oi<^4tvM>KD%Ot@RTmNib*>t7lxe7AxJ~`{<@C5R=}BSS(uobce?6$y+`^= z*_Zn%8m}d27YddHE2UvQ>=!@l5q_P+VVWNT*ctk=v>aWS@=9EG*zao z4L#3a@TIp>r+yo^IKtMO#>*aObT7(%K~?bWv`*swa`$n15mxtXpyKF*m2={NCxG(f zWBvzP%? zGlY3Pt>SnS0fu$iCGnyKd^fY0FqjguocM4~uBMnoDww^+q})~E-RH=UD85IMZJ(~08Y?M2Sr}0Y z^C0dJCQq!clFF{`$NL=1GXy9Uamp~`OjVjr*EP$t3_gF4Pts-6SQ^vAc92YwQ;c$W&%a71V*Q128qS; zY=R5jYe^O`z^ApwpX95!cOhLF0zmc|X1+?ZGM2(c$0VD(hZ7%@>np4}{;q|eauaw{ z%B!d()hNs*>p#n#d`HrRzW-U|qcIR7x?m$p))(S{J#310K@vgb5Z+a8p=2L6in0Hs zs!J|%DN0fPcjY`RclBNu*>g?rtfdt~O*W=Pem8KZ4VH!kKh0?Um+uL1!o?O%P-`M1 zFpuq3aLtYFxS%8bB?Vj=nGf%JmUm&H<>Jv%7ulH|N72g3(UMS$kF4n>sutwqnX)@> z5;DYs5~sEvM~5l+Fpo29Aa(BO5Vf+1o>M0#XnN52f!=UqQX-pj(AcBhIN%yJdC}Cx zXKpWtMHkJE21pj!Ldx{@>At*c+4@LgiLd4lYRD44qrBof_f8-jfC2j!Cy(~&1+R8d zYR_yenz!p4rNI)kf+9_N^DTcZ)hhXSnn@RZ=&hf6hK>c^+i`Ded}c&{icK7OC$hd6 zZR7xd`9!gdEtTcfnrQMKp&<#swZ_VO^7Xh4jyG4}E8J}IY|PO1DHZ~Eg^&A|=PHRt zscmy6fyS?yHuG~af&$f!VK>je2GZiAe;h`q?Yx z)0VO`e>LMZDngnBVP|{k8a_9A9Zh6t_12JC?8{A^&3ik76&^L@OR3c13Jzc2a>e4` zesn$+C|lD!or}#2&b4i`x|aDvwQ++_F`L@g`|24b1@*G4e0`DOB@Q?Jv}l7exH>gu zek*-72Gu@BLoEdFS9#!rum$CO`ZN2T`*8PvWsXJ?8^4p{XNo0&$g{E87O)sOuc-;Zr6Q{p8BpOzz35>YLttB|4Ar3~tT$vJpoZmUUWi-|S3Y z*zTL~b4paGbk$?u&t@8#uY|GrVqALm{R_z)1Js4Y^@+k=)Mis<;;>b2(N=47{R36a z-d*{{91whr`raUmY+hY@4}<%Ri~z*zr;wbIAdT?w3@P%~IfW)-O;(cC5ICkRKwu?2 zK~t!9rp1RYk5qzAkW8I~vqN+aN5?g_;C=U76hkV6?N*izZ|F}CrN`x_S-JDz@d10? zT8+n=m4;TW?w#^Sjffd*CbPj3+INf_>xQFSU&aQdG#3T6>8YnHKl?THmTiZ?JN#S; zaA*5GC+bVin>lJmzhdis&!qLTtreski}#0K=)i|=ESlqZSva`i#8q`~w4mtegSy_; zyO@qTO2Rs<-3|o_Aq1`);pmQNB$%Ao)@_F{4xGh%a2S8ThZO4{$xbJ))Us!`y_H2d zH~ux6Y@8}G`gYlM>2G}hgV?tCW~YfUoc26aShAdlM-{Wcy6!E5@4JlMVUrMa?j(ak zGn0jtRW9LbkNF-7&ek*Z#*Su+{s-&sBHA(W+11Y(=J%a^Zjq-du@r&B9I!?>0N))d ztuc&Qc)vdAGSXX1W?0tZTS5M@ONVq^M8`nsh-5}Z$KD6mq1;~hR#`6>a0Ge-OefVQ zOzQGl+5Drmcdjpj_qbAy{ni(0ylIw>h~@@}y+3Y45-wZJYzw=YP~{FMsL2I_Y-kPP|iS1)_^t4c^DirekvcamZxM zY)GnzI7rWo&g_pc%TD$y{M|!(JvHI`3i7oNxR(nJ?UzJoh{BK!<_^%q{%Tld+`P9p z!YxCD2z4;oWWx*7ZT6GK1-6p~2QNYWxlcIxkA;8J{6>j1!m<1CW~MP@ zou}eD==(V~THSt{7lC3r7B=tBiBcjZl`+t`Q#B1XF!s6+$efaw13T}zCm2@5)5}Kj)#C<%T-*~;X z!XVv@IZlM$RmrUT3Pmqfy?mIPQmBvvlJklN1Cl*T)5X<$7^r_C(n&{8yg2(SH zlb}hao(G>b^UT$DpIYX9GL7oK54ZmV2|@P0XdQK7ajG%=c*~}9;>bW~NO@NFlS?_9HHz+;3a+wnuH6LPDLs^QVKoR=mV_~heHxO?XgTc=NR_WXI8trmmfkYBxbnZNzpcX|I;Ber)sB)Zh>5)cKFFqEa@ zt0UL$=rEC|u>JxlbirY=%$@P;tSr3FT;~*_5)67Hdi#Bv#U6`|Z5HM%D~&#_PM_uZ zf+#F$AYT%x_;`QkG%!VhqZNDc#Ogg2E5f?UV{?Ro=cxIygA-K`St67+e%+(c(QaCn z77dM#B@7&)5s1JMYDY75^%O2^EzVlB)gHi#VghD`M(YBjJ;)htu*Q^y4MUzL6j@rw zzegmIYQ2I%e{L;q-@Y^Q0n$W z7)s*EH#!!&8h9)aPo?}NJZTt#3Sx*h(eazaoh_Qph$I=&JGf1M?=sE!290=|Iq6uO z&*(IAqOkO2{6O;0otin(F*vrIBLa)%b?e*E9EvbRlp;k{6P_L&;%JGaimeGmF**x*Y0K zd|3imozMg0JM=64;3)vFWR$#AyC0|=Af?1QKb%G>hnGl4joY#;&5nFdTgN}4kfbk*ow;g5x6fA+bYk%7>x=7 zR@YB)?!rr)K69FOJ7zpixp%KeZ|@3C{VU$Mber?*Bi}J0%Zu>~sNYt(tMacCFPO@4 zk#%x^(iwn&%?-`kI^`sGCIDE6qvbFh3s~O;QD{M-A=iFZLSFdU33(y>)T;tA9gyaN zBoid5V4Mk(T+$y!e0+P%&b@8Yv>?wlh1NbNRmR3Oje}}3R<*y%6)Y_X6jBP56eoH> z9=yvTGm)gzHiV%f2n108gaQ*vqDUd6!dXQt3e#cgrRzBDU#zh1GcANRbH(q3ift)xqbUKNs_Sj(o38@ zcaA8Exqjn1KlE@=uQkyj2BL1&&a;`l3Iw zwUzE+mFuczW;%f}g2F(dp|FC&meZz8`MVs@;(vSaDvI)vLskg?$jkR?F9(!s|9Vl# z`m^=$VJjG=g2SPpH_S+6Dqry25AwnuvR+ib?+T`@<)5KNb<0%2%Zym7J{GO*pXq}qbI2sPQa^(t# zhli}Lt#SJFY3AnUI5;@u=Rf;7|MXA)#FfjJNt1+jyA4cFCGyLQLP-?*oSW7bZ5&}x z4e$MOx5F62{QLr!UV53Yf8*<1xOf()ha4V`INaNY@w=Sc`jp?f*rOE-avjuKagV#Z zD-1BsgOSl?6T0)-X|B{zv&Vs|1Rg(7+Iv&uOpv6Kapqr7@+l81^hoo3nhs4eaKRPcI zG$L`N`M;Vi;G82246V3833r4x0-m59D1R)(jU6&dk#QFp2MFP%*&jI> zFy+-rDR4$JCkwK~k@O_vA|%sIa@!`i9r`23D6y=adYP|&J^-m{(69&}mj;hmQ|x)pkqeD70X|ulVR@$o7GkJE{OH%SAbYP}H7NUWSZ? z5oja*WGN>+0G8AYfxk$VDu*8n4_M7mFyC+lfglVdVE|Deh?NJgp!_=wy>}EUM^yc< zoHg2M!sWY`fB3oOryo1gLbARR^GDxW;g7$ygtQJ__#~aRt`^d)!skjiuHwyE3xl!a z;9#FYcbiiSV^-!3g(;_XO;utlN{Mq8Y=*N%Nf8+#Re`X3e6G7-SAVd4R`hw_r?jk_s&uj#S=d-Kg*svuuYeS#gQM=V$1crdE~pwXPD0qS+ubz zB?(mZonQXlqbLgQ-o4B1TeoPnT5N4?vAVWKp67h}>8E`6yWi!P@4Um|{sD0#CI|wo zJ<3n3c3UI%9$QgZ3T>yzo=@ImtAM{K3RFmoD$ipn zJg_ZxB=>rXk8c@<2Qc3WxOlq7S6`h6<7YewSyD`iwu3j5+c~H=a z`>b~~+8*ULPdD?!gxcb@2y$@wBe#!DUy=0)hbdJ}DL^RdK4!|}6-O{oK&I&R4k_|< za?L+cfxU;@Qw6pvB&(9Yesg`#qYxFylyx6BePMj@o#C8iG*0OCM$FB%n44?WN#-vD z+@|wt-ENngH*RonaKPJdzs;F5XUMXQ>({RH(|`LnzW1H)aQoIR8jXf`^^YOcbjGFG zki?-NFFm#|v(ItjH99s=ZSo)f>aTd~t6ybhb(KKC-k{6D-CwiW{1vZmUSoY(69nps zDBo6}HxAyv7VbazmBh!Lg zcS3&oNzCngF<*Zv;H~qDm3g0NmjdsB1=N$p(7YQ|wr9(4F{u`sA0qSczG z*=iDo$5-=V7xFYH`1cis=I)&v-1_vp?0)?Jz>dB_Gtva|+bk}x5&8LXPt;X*&M_K| zxO?X=ckkZi+_`hS^2#eTTP^nX_Idxk_xRWEf1h9d;+N>6AP54gDNgsT##ETuEJM+} zn0RcD#zy*lR)xZyxjBCC+u!Cd{^Boq^UXJrQgO9=l^fSSCENcMmzFMbc74D?N04QH z%K8_T9&&izS-&s&$pB1FB>8 zpgz!(dP%G0RJqSq1i$-wo3E;QzWREbm3c{;q-f(i4ystuTFA6zuUl~EUdDdc&>K01 zsiZ%0j8lK37$ur}2O+x$^Nf>r32fq_z&5>4t(BOP+jeBV?`!dzfPOVh=aJOs1t_UV zk}+Cqez(&>g^kI{{1iR6FCEyXTZs1d_PKrY3f;ZS=yVt1hB!UOT8$sV>cHlVhh1dj zG)t%dlvm&Q8mCTePBnQyZ0D5C9#dzoLoynV`Q-iYLhn2Lhp%1daJ0kTCtU_3&BfRL zfR`_Am2S5M_aL6oqaBoLd-FW!gAYDndwZLWjSbG6IYVb|j=U)N;DZnN-~QMCm0!RA zKI8F-IF6ChCz7+mSKpNKiD@M#TPE;1wlEZolA}4cCuLGfthFRb!s6m0U;D<_`K$l< zANl6DzD1+a;Kt2uKKk%OKKbCgoNNDrw|-~Haz~&GS$b-Zze07vKzMz$J39g2d8a{M z#Qf3kgq&XS`(~U~9s);Oeoi_axc~ptVD(6u))T_J>D;Hk_+5Epc4!OQSgf;L+O#z0 zEUjR~usa~nGv8fc3{HDeu63TLI8F^>Y-l@+Pymt}2LT`5mZXI!M;8jLYZAsMZ`;E* zAyDN7|B#J6GR5oYkEwkyAuCU(E1YxaLK6mpPOHu4sSVcG*9pV$vCoOewJ#mmDyBkS zSnl2VkUJm$9gX7G#Owhnk_3rCN{LbqK|x0i8ICvDyV^yGF{9DfXf$JjAVSIzsX~Il zKUCmBz~@LRqT}TI54r=cU-^)1?_XF8-s95gF^7X5*LQ!+?He)ITuPw+oXyP*nvIAD z7covah3bpS)mMiQlHqX3y`3HI?QA1}^A|3#w!TiD7ku>5NBroAKjhzj@)P#<_fg6d zFSYT(_~}(kpkRuXf(!N2~1{TuIb;k6wW=Pgm_N9cXg8?tkt0zf*h?*zR2X~eyQh}X^p zy#2CZt_f-3L%riiXtEIx{@;Vv??EA{IDQH+5do+=5~}8T>n7DqQ&&12%H_yn!02#D zQ5cF`W3BO=6U$f9Y9|ShKZuko)edp`!@^(fszFB5kYP0bgsTfeAauX z_s6lz!2_5rnFW4_Sm&_ioWDjKaq;4L-hAsV-u~U+<<(bTBaY+x{Q8aHu}yMZkfet0 z&U>WW|AUveuCdZdut_?IPO-JMMHq%$y?TxB zfA72e=m-DGty{N{QWD1z)>*WHg*N=&n;DB8%hkIf?_UkMcc^NriVD2Prj*~G+IVvA zlW_5?ldi~pSbX}-Y5wq!{)qqZSAWI&`a1o7k551Sm>>M`hy3V=KVY-HL!b;!3M@~c zp}lGnmyXN{e*Q_sJD)UI?gYGXMsQ)>w=or(+KYV}Rv+iGSF!>wW4(7)0o;+H?o)*6 z;V@$`NPU;V)V>B!dXv@FTk-*!Z~0soVsa5;iEyHc6HTma zf@~pF3!&Penn=||g-wth3frW+^Dgwi!LY|zy%L@PrT5IW z7CM4f!&6n#%u;Cg+2PouST#(>7_`x>Z>;k_{ipxLpZ)otv$C>+(V83AukpR_ewUyA zBHYsx#ABB*s+^9Wb_F|oig!MWxwG5gPktxhjdQZjseM^?zm(9# z^YYyUuJq6xrlM%LvfNdohN#M@Zqg$u-L(Fin}piV6N<-$A28id0=gr~!BDa{5bO;E z`vVxHmR!5~=6WCXqTYb16Y|*0pT%&j0H*>mQ-M|mYSv+_!5BLsoL6!w<#*<#8c7_- ztgWqa_S`u-oz7&rZjvH;8lKyi25i#_O=}!!njjg|Y34Lqf~XJ(Md2nFMOn2{ z64vH&+Uf?Q5`D-@dq^V^ zWSQ^4R)J)F83a4H{QKP7iP%Z^u)~W)aT_TWDrlgB2pL2KL4XPrfl^-8Km-U8crp*Z z0XRuAZr{4aV9;Y}X_>99({$z**xNtg-+uZF{^_6oh4%jLKezD?#5TefetgWx{^|!yl zpZwXM^7P2TzWJN)Q}KjO;etLQxQw2Ju2G~ZVWz(MG^x2O2UM={&GG4suc zuUt@Ut%$Nh_+_1~N4+lRra;VAzwHz+toFSS!WW)=tJldroU(Muob%^zQV7PmWRxm; z33Nw-{b9htK(Rj*bca6t%#AO^1cANp7~hvLdB9|uswL}z=f{*@$q=4h>tcwZIiU6vB&&Owr-93CEGj3J658jS{GdZ_GEu%{G?T8cc!nH(iF!de8N z!t#z_te>4ZRSh)dy+%sOLI5X$A4isNI^D8GtkC^(o)Cr&DS&j!?(sP zwJj#`oU1?hO2VmC&C0yxfBb92_F+`#+!6S~i4=n0{oUW?fB&EV zGq1e*Dvd^i-Q8V&`qQ8CFW>tfAAR@{!{LyHxrkQ75S16)7qw~0r7L%Q!5|JJ-a04Q zT=waOQCcZqe1Y$|@5!X zyaduHQ*8GYyMu^c644t=MyVhzdrf6au+oCnGAEW71$kc7Rcb$d${kz&q~DY>k2X>L zov7`eoOcxUZ|fXIq0w6Vjuz=dV<82}C}A)dG8&Gs*4#G*t0I=-hu##kdrBl~kYGGc3nF8uZ9DXe+TUz!BmIvDL$c7!%@bjMEW_ z7$;&75!yvW&T%@-I2~@Xn7)hB9R_zb*WbIxc<*Pdw(qgEs0actuAL4m{qHJoR4L$2 zbJhe7SvGcq5|%(}v=O95%t5iv$S#6V7%Op3PVMx`iU>RyriG-ND27^*2?Y(`AKEC3 zUb0MgDCuwFd0voZIo28vs^Wehc@o+kMK3Xl6dzOzs7*?V)`rn|OqORDW4wrE379Gf z3F8Kxxz1Goas{vsAtXwA!ONX{JACK6-=Wj#aBA}uZ@&2^%gf8ejRsK|GB-cZ>gp;{ z6n$x6_f&wbXHIeE>^c7OKl~-X_w8@9dFm8dn(^UBAMr2$ z@_pX<`8(XXbB8Djy|zAkCssBWr`5KS8=BvM$c%PE{n{a)krSwZ^B3RZkN)i6^B@1yf9Bk|vt)U}uRr>f?|$b8{Nq1FNxNPLC5C>+|#`pl{3 z!dC5p)M4SIwpkd1F}e;l>l3X?=$~-P`wkR}DKcEBJ1-Ufg2`=_{c zF2K5dZr<4C=l}Kt-u>l|+1Ey0RR~93rKc2p7^HXeni>qN`8{v@wjw32B;QjU^e6>2|wy6}8IM zJxce)=dq_2iprV~c7m06?;t2W3j;I|K*O}P0iH1rtd!136k95 zDo^ww-;cOo8MeBRv#few!E&SEFTXCz2IUEm6$T#?l>p~8$fVaDtA6K_aq1J+NorVF z2>I*ZPx<<#8!-H5dcBaFAK&4|um2T0{FqCd8BVp4s)4|u^OUvuoKs7hhP3F^SH1Im zDqJjo%j$*|l<9`!8!f$L^{;OR{N&e7I?a$*&nUK*{mGu>ei>qVA8~ZQ*SxY)Sh51P z$pvpPE+VH*#u7#}Q6fj7k!YXPr$OT88Jh-49+BiRg$=MsjH_aMOHwGtc|fjZt)T{! zyjU1|oi{FD(U_vZn4+95>dVK~5Emh< zE2`pNPR7_Dt)Na?sC-CkOJZ&5$r^*Rh5tTdutwub@3!jGJ`%)=Nx?!2g;1&nxC-Rz zS*KE>grwC75ke7$4YE9EdwZKGj%%LV3*)gJy*mAlcS8B3{0T!O>XLr|CY|SHM-yk0e7Dprg;NmuKZw>*$FoRKUu*Ndq7_u=xWMfIwP=<6o;e6c($^x_o z8$u8Y-&IhqV-WiFJ?Kh4x)yO`JL30V4S4gM2L)@7O5#ky%cI;f=PXGPFw`x^ZUsYw zP-aLh5=$U721R1#7?@R3+d&G8EP>5?p#iB0z2~bXX%TwQt;z{I?>$%3>Vu%9IMgHX zgqOf}7Gn*%D9YpI0lm6llQd;G9AS*EDH7Tkw6^6oI&_g@bb%={w9YX_;j55GHN)!@ zM9Kgu|CN_tewhmwE^zwvX_i-3Xti2T4BVcY$L3wt087CA zd8|oZNh*KRJ1ekdNcxOq(;sU)kJ?mamoK&*lh1nXF+X8_lH?W=B+g$*%GI92ME`%{ z{Y`uQ&Sm7q6|#F}qqBxp30vo&*$_w-u-A9&^;6OuPA`u+wV04(rJQzt%#%89hWZP= zH{)Lpl;dzH`QX!tJNIH*VZ>{vC8t*)FDA?K)$Qrf(kK75@!p3Nnp6iIq%H0hTjXwu zW|-E%7D_*|FgGy+Jx^*{{$eXD^pz%>HhAyF`8?TVANjp3O0Jp|7U2v6TZ5J;H%ePW zp64VSBZxj&|g8z`3qcMbrGZlTO_F zmRoiv*r^+{JMuY)n*z6t+qVi14iC9{^(wEv`YPZ0*0*>g2xvB&H5h+UfO|T?CO|2L zkRgbWx}te}SCy{?fhP-^FPW72V%q(DE{D$%f~Z5{huU%X(N&2(M--L+7GMg8DKsWe z&{b<`|Pi?26W*F$_jW{7UAx$;ydp&(M5xAz8bQ=D7^<&w<)`asnHG&AD><6Alj#SXx~4oVSe)e>%P>z~)_MS+cYP z+!S;Bq@5;8u|27(iq2D6%NN$%eNRsK^B4tWiuo}Gl)kcAQ8;XQHu|aLq6`6D%@KS+ zedqr5tMl6qrTp(vD(DSEbkSsMIpUSmUbBCcI?|%_)XHXaXD4B{0F-bD>5CQzjR7XbYd* zk{tAeSI9lqFfi$WIGHiv+zGD=QFBgl4x=;D@c>;o;y7mW)Fw;I%P(Gzts>VV6b{8_ z4QibZNv#E|Uz~9CS=jxQm=pdK5BuPRUvosytnyT3m6(ywzo5-Y4bj+*Rq73aJQXh>(G& zP?VW|ArwKV>O7UL2e60|(EPw+V{%^*5MDaU*rI;Tm3c^40vlL5i*qb3wAk;CSzE|? z{ha0H(+1=GF)+px(F;x81~z>V>l&+=kis9@uRK+WMF_OkXgwfqE^umdgO^@@h4uCI zCl-dnQw&9A8H&2&q38p)K?>h^E(@?vpdWE&pVOv}i;@m0OHb`FQv=Qkv{n>Gk{2Q4 zQG<5a2mfT4CS;UQlHrEe2>NaF1TMOO|Cco6RS7`aZQ#R7r^tA&$Ves64`Fr1Fn)EW*s5kx3@u z>Ej*-V~#Zm8ETUF=3j1wFt5!Vk}T;1z%r`KeZ1sE$( z(jqVj+>ylpRQjiEzNi>v6~Hk8v}2x{ocg~PLiN+1@+>DWa*Wnh4~OT=nF6Z|pV%+G zD-TAh-X32JvxLggDka_{Rd8WbGuJdEnd8&ju#*X#k!UMQPk91xRa3C9YF3=HDNviT zYF8TT2&JMCg~Va#I|-yA3N&%#h{Bw9BVlRI(u@O)v)tWR+&lE3Y>Y2Vg`r@st!OqB zf%4mvYe$+{vdor%=Z?%qJwiU7O1R}kLiccw8`rLK=FC~noIO(uoj%t&wj&AvA26VFp_Of+`dI@B}ScinIki`Z_ETRl+tes-^SD~S+1QE;sRT^W{&#MM_ z=LbShdlz-DsI^#aO0P_#^Au+-LIo)2y)y6uph8GgP=%lZqjL&paHb4hg=1-{$wE6s zNl6eHmO2H?^N!8s94S&d4aLh_F}vLcAKs8$x#K6&SF>d&Vcvtu8224dAxaH6Pf8BM zfWk%$6UAVZBSb+XHe|yH>&oh|AHzXmEDN20S1&aA{jV?b(wQa;a{+J_PrtRy=4y0buGLz{YZnVPR~xjO0YBC~`a_Ef8_X{*5r(lZ+(=bYS|ni< z(Q36Z)^c!g!1newr?$3ewOU`e#p@)V->BK`YM{tZ6-A`s;ullviA2!XMN z;b6dE2x*%57A<4Qk`YE11ZpDT69it)-8qZaDHPWCR8}oY&Q98q%G{SHsCqtI6#4?% zaGWC>o(~rVnnqO6jI}Qu1eRtDOLP9w9eQ42P!3dkpccebPI2;lqQF~d&3?D^PQNi5NPd5%GDi3NJ+aD^1Ht?N2e`` zBFRrbNa>|5mRC;^H=ACiXNvUehgmCEs|0}}2t&@FKR-EskC}gZDjplg?+(afHjO+4$#dFCEF*EY%0JuDaGmu#K%qKsX|&Vk_|850GjZ276k zw3S-Mbft4bn5`K9_dPgP1r?x#SAZ2l`i_b$1Dj#;Ax3L*8{jBsnFii(^&Vd(DP$*} z+cD|v{rHKOLC$*J(S4l^^;aKcALM2IbwWt2z?Bg(E6U;S3naduTBoFj}JU%5D9bJ0_^bmj#Gga`pu z9yWs{rO6=|mInO(s|BNBz{fiQGVq#(K184HS)f+zy?y&OS(JP2NiJ+Fz5#lo`ZIgB&F~hcJW%a%~4a_wmm&d^W^jc7pFO34dDZ>Sh0 zj;yd~O)l$UL4#+t9bl<<{Hnm8VFZgY&(A;y3Z zEdsfOlPe&6PR#0rBHdv;xJ=;syuJ~$e{l&-o86)y%K}2BYp=c9PoA)={n$PgFc=QW zvWzecJ-vpvn)B45fc;^vKOtk2#EYWl!Vmciz zCB$*gdRXu~*0IIN2IGt{3|O3R zuz#4b*OeUhJ!p1XCFjowEP__UvC#HQ7^f0#s_$^MEWDp^?+BC!{wVN+al*h7hn8k! zX+*AkSemgV4h>-d%X5Zv8wG3g8Vt1J9Oj42w-e$pCkS*IDob20kPd_hKptX*#Hj`j zh0PB!<6Ah>2bB|r@Y>cMhKP4|&e6-}OHy%lv;|=p_yI_J`>d~R@b=rk%f*WqpGeQ> zmk(@HkSj!pkP*(wN$C6ts5bM|o~?wA(35 zjg0w)G3PhBY#+9{c5i`O`*YmuHyLLkc~ODY(Lv2eTY!$yH>QAY@_!#XM3Lq6%7|~h zvd?QafSuZL_d$NcJY#H}4a_tiNcwmJ9NXK5vK)E{O9fnss4MUpG> zJmhfTNOIqxX`Ce23a$MN*`LoQR&4-;WUUrGqyA$OCvTkV@oS` zG-F%7?r27qIC8XNOFOnSVvDoT2o0f10Y?;B0#$0#X)wCv_c@1i8A7e&w{ z8205)f@iwIsX+RwsD($N>CWtVu&F%m@y>up`nd3XtD^8Bhf+Zq{`vn;Dx3m@C5m$9 zItdGN32S1^IVZ>qMQ_mH>dpecy0OMbcb2((*rqTFi6bogK&#x+!>kI~s=I2T{oKn- zTM6HOeV=c?w9P`;BOT{x>zBJ6305x#ymG3^#ZwD>|J?@v_P!*|9a2m@i{rWOY2Chx zt2az?FIk^k1|w)i0a@+^E1dxC6uI`plBI-|1<(rP$b4M)3SX~u?DY-z>T z&!C8`2e`lyg^nl?xkd9E6c|0S?%!G3)N|)O?-MBE4<*2fki&e1t9JtS_Q&8faioZ&m@x1c zk2a3gMa?VcGQvO;gp3Z-INg7UMhwAW#-1PxjvK zH{UKKrDMLOdGlPKubkVbqk6bJ!D(9ql?0SEEX9^@TmXr|x;F1$mK^k;5qaQnPGAgZ z>qP^m3on&f=ac4nkucXZyn1HL%cnDz=M2t(!qNzHOhcliBUs2evzCI;gaJgMAEXni z>fv)^O1V-Xppt)|gvZsdAEKVQRmDL%0O&0BZ^m1u_ueELK}g zo}&zeN;4n!C`5svg%ld$at~~AOqS+l(WYv9dori)Qw2650)&WhOcJ3dahaxVhG);- zDh?WaK2?wE{Q?lOfoZ(Lu5IxC&JMkUdl;P%g_=OgQW8k;wO2G3&t^zvu~w275@!Wc zI+V05&m}C)C!AgFb8)@Pudc80;q4V}?#(gELX4GI_u1=Lr9q65%(V>{Pi4GzrqAic z9^-?IqOj$pb`J!3;m9(FQUxn>1HOIsVhY(HW3mc*Lq~g$`RCSI|_jfr0 zX?Xc`#y4LZ^TvgY<&GoQf>3D|+6m3LAW)80T+nId1kus(%-?G!-j;L1>lm6!2Co9K z(wm&Rnx^xP{^{|X!E}4u@vE>Z0VD`Jz!`%O29(6=0+SnDp5uhW$pUE(v93=+0ca!z z&iTA%QO;O+(ii&E_1J_b=vpUhM*9OnZK^z0A2??Dwr6Fv>PH#2JbD=F=OIKHoB}W zj(OwEJ|Ev%;{6+IT-#lsJC1P(qQLkucDSh_$5Y#cZxveXXx_Tum4Ss$OYT{ff2(AR zKqwCsqoJV{kNN6(#f`fQ+&gS={f?i}(1@YcFuc5#^3B&qtSxGykh;OYTBMSWR>QKs zRIt9RnQvOO^~-NWhB!1hmm`H2Ai#mnWxd`&Nfw4Gl%%eNPFh1snr-zijw8sVdRsjn zCFxyyY$OOb1Y7o935heMVy~!*g9fXIBx#rZ><}R=k^-C{j3Neu0a;d*qL)wZ>VAsA zCcMWcqt8VdIG)#e(0l6rJ+mif)o!mPy2}JseMA2o$52Sc+}tAPS6(ApY|(7ZvADd- zhrj+cSFYY68Fx9oHsaK3!s3GQ;*piAM7bPe!8fD(gn1knbXo=T&5Wf^%F0~I=G`Gz z?=5n#*J7AP6k3*K--+Cko4Q#>fn#+c=hCSWb8$kE7ZbUrscoG8Y_1)xuwbb%;`Or; z`+Z4(FET988#a~;-nx+R_G@F7I|ij3)*d}MmGt3cBeJN#p|z|-*IGBOJPOWiG6op3MRgb;2LQb0H<&=3_SErwZJtcx}c^ISzHtXaOW!#fIF){Venb733 zGspe22c|Ff&&pxdm#4K9`IxBfxNzKYi!N+`94(-+uK5Uwb)Y zZmw)+Dtt1#;*41VQ*ABVIdwz=yY1_~mt9U^o~yF;dn6bH-5Q&_8JZbkjY2$qVvOpV)$TH5YCGZtEwPcYPHkJy`uIFs77A(yh zl)z)gkqg$_Iipq zvMhBhiybcktH+k=c_zFF|vIl+Zf1yX2QfuB?eriQ1PX!{E|~Lb5+W?WGsH2Elq(3ggfmN^@8a|x&Zgk(6u7!0 z*WmPZ1_s9nhrzi5oIa8>@@p>CDYN z-?Bwi$FZuemB3~)Upe}$B8b1EojmtIlrg*tCX?i?@w!ouD~33;V>W$VO_6Iq7o<(a zaMox)U?mI)0!tjWXtp}E=hhj%x=AZ~dEiM6N`D1Vn*?D1iT;010#u0Rf^Yl9D*u@jLBp+4PxV zpS}0$hx=YcWL9-|Rd-c&b?!SrxvVtt+=;I_-}5acfoJK(ntnUSBg1O9wMoh^dZ;Sh znh*rOq}vfhkwMx5Ta*|h(OOa#pZy({Mf)d{&D5GbV+CpEF-turGoO=b$Sn2IMlfjS zYz_<7hZ5g!p=HQ|O+|`ejuf zJ|oOCy1t?n1z-h9lH+@ZR(l=O`fHN>0y2q-(*J;0-o^^G*q0C}!{)$=Q-AY*z(@By zg23`pSTG!DbSf!xi8k)F_1hWWzq!lx%@J>0?eg1Cw|M8?I`@w|WQ76@VQ6Xj1-8gA zx?Dz7pOI(R54eyL>HCPFg^>YSE)muGth!Dm#S=!gkHDgUUpMG~tf1@Du-3r8I)SV(_i7CfSMn3a21QF5e^k^wfo*iO~ zoP{`KWiqVpj@Qn_7TgYCU6Uru8)6Z))yt|S+PbkZRV}MF#=7*=TBg$}4<0<===hjC z&j|u&b@XMY51y~wL%N8~A}V(e`?*g>9j!fde~D@luMbL9V>HU0dEsV0D08QlZt&G0 z&ir~(NugU22eWj>+kf~SlMjY$Ue|p4+plox!nzxusqBQ3VnA+Q!wc@>=WpThDXV#n z6$0P047-|_uN8O?Jl^^wVE07v+Krrx>zXJwlzH8`wY2<_a5$qA<#gkmE9+A}+3WMc zgC3JKBo5tf(S;pGU0XY2Na_Aty5+#0kMaX#7^1=!!c&;iAgqtDS@mr`|18m*Pj|a~c)!O-JALjSwK<+eB)LcETP|-FY;Q@{*FB^M+BzM| z>KaCHcH)zXWi}7-!vXEM1zrmmVbwl}Vxftv*Cs9kaGXb?u^_D_$vtwd2t7@p3`$v~ zh0;nit%bp?lm57!s#%s$mLUGk*BP@3OUZvC@NDtj=70ht^7ct?muF2T2GQvAz0IPCGLE{)3Q@?)r?! zk{`U0arHupCoIAWw2|mafZJ&meEaGlFKvz4J!$jS?KN&6_89a%B3~mt4}t(y2!vhQ z@c_%YQsp6i9~DM;VTAMps#R*>1qkaQ%;WjkFV5#f_2pH;Ml~d^B}FOOIco9N?E%03 zXoL6e4LF&H2qB3h&2~HI%2vkrUzzg#TXU{%7nG$SFPtNZ5%tC?_v~f4Wj4=A(gNjW zNIOT#1kbk!RhM`iv8|FBhRUF`u8+IoL|S-^vxt^o(g_RVz~$ivg{F-Wkz)c|jb%wm znq?G4$>!!J-}~P8`RPx8itqbRWueP++j#&Wh3CvBYulogi+J`hYKxUq-Qz_Q!uh*B z{6$pnHUd9zb&w*n)r{M7Inr~9TIRI+hU4(X%ECJCk!QReYKKlgOAc2UUITHtF-H?q9` zQqC{m3HeXIYjJzuAKOIdGP(ykU8`X!gvC-mZsH_`))^@(GN^dv&{ zi2{K&%S9};t-bOTLV49MRV@HtGP{+k(rGG$El-`BQ|>gvo{G$B4m`UZ%xFoWCG#}k zVAA5wL6=YWd)zkmbG;KQlww5x$rqqrB3kxo6a9yRhY7t+&H5#*)EIB7BROV-|iGY~W6!DS7xH zMZI(Mvx;+dEx?gmoQT_{*IRGJ0!tE%lqXYmHl!YMhEZ=@9M_UL!wv?sd?gNibV7R(nGVHmz zNhO`)LTi^j1fFK2H)o> zJY7)R*DO1UVo_JF%{G_3R?nGMySS{RG>WVYnB)x$frmCoUYs<{ihSP;eT7;^1X zh%Pg+L7`%#&{*MYqNs>0%X7-I{K{?~XYt&LO{fr!x9o_DhaZhP%w63mW^J`Z*<04u zz6e58s@6vtNB#10WTesz@ zG>WwFvBn^6iO?F)vlw5TvW)jVOW4(@YnHWvW;Ah8RbB}8PZYsS68M&0$Ixn7O5-ee zj9GbTtwork(r}eva)fGOWmviK*4e{Kj8z@9QqB|Y<>KoI&625z05?+Jt_+-}awK_diWtAQz!fSt&5b&q&N7gG@Re<^8*eCV|b zO6{osBw6D)xxzFaB2<7c-97+Msfyg7EK7=_SS*-+T6hk`wp2kc1iE-tSbqA9)is>6 zjf47uQeG|ZcpTMxJ<0=02t40~;I{buPHclSSgEho57c6~`U&14gm4oA&bzEqXG0ZM;QGC49 z=9llsOy>~#hV@=aC)TuEns#JpSEEvaXOW@B3oT*j#>1T8)}n-|qOcNWb0irUr^q*2 zkQ9p2`jp0V(OKz}`E^Sp`TYgM=0?!A}7mr11HR{jvgUYqlxEaLy*=q3lSe13v zy45;s5UZc?dEdj<-Awmj)iat|0q@;W{Fk>PE)F$+{7OQvRl3EyR+4K=nHd75kxGNG zXbmQHWd+XzSqZd-09}Yh9jF@{+ATv-2zCw?A3yN;^#>tgV0rzef~(sl{kBGzEan?Qc;%XAy;m~qmh{?=*jm*zLVXVE zQ8715Sw)CCM^t8<0vDNSB!+;}I1)<>k2F)HnIy|BdEuTHtylI5RB!03eup)ImD(dK z-S<+yMhROHyM5>~E*l!l3`t6}7_qB$db%>_m}DXE>|f`@g9{wbJ9yDL>l+v8`2oIi z%aoN;Xswye5+;)wNt&W{`S=g?W8(R2sjBV;r4-5w&{i!)ealB=aWZukKGy<4QJEapUt|nqg{!A}!fCZ!2h*iQ5>4!7 zcuKoShU#G}p|DP}X`J2$G)r>cf` zdf?r)0fkAStoAj~0vUo>u8Oji14%p5+`OD}^D6Y)hHh*YF12+;CPg*3VGY*msykNw zqNG{@gE0baJPNHSwC{+h@W@L^QMf3yC|vDNYZsY`s)-@00}!m-+bb8$SV2*dTc~oB zG7IvmX9l1mu4=b~T#44*NT{UH0jUm2iilYjF)sp+k{%x(Ughq|8nZm+LcC7cTEp|y zBDNC((k$oT=$NCE5tGT3$#_DVrcb3CTH`rIZ0@9aRm7%^M`!f)#y>&akEguf%#5R8%cVcCRZ64c9Mbc$I6d%ihJZ6KX)0hO%n)3sZv45hh1C z=QI!sgNHT&nfA$Y-xdEeMVboo+)$Qoz2DN!My!ZuSG%k%&hg68EdDHwBG>-X%4sn) zP{~tPyhG|^G)9q^lC%hz<`Ltx&2iG_a6aHD=`l*X%<>j#=~Eg(y9FDAh+)5ll=UuJ zf!2oUbjI%PKGVsxY9M58nKaAe`l@)Ywnb7(r1C%nSnEbw+<~|=ZnS$Bvc|f1+(0;? zpjsLoe&tsosuz6sO*3&UBC-^(OR~+u{ZKr>p{O=I^}wmvX+KwU1Jr6PA| zSksh+;NVzc4D>sOC^FSDXF*YjMX6#TRkIq(xpTlUCDv;>M`$7NR9(XoOE+3mMP<6g zngUEw5t>F;sirZ8!bIdIA}fPMtt`!5WTv&PKEK4P3(C>AK zqUe+!a6F!{v%AmE?mnLK*}SyHwJX;c4u?<8vIw60NR>oM4}@RYrj(0QE?9~IrE>4Q zK^>(%K~3#(AQkwvS)LG-h5bt3e=$ENacRIxmc4LCIHLjj#$lxfvpRY31;Yo+FRvyB z>KZ%&5It&Db9Acc0Mx?#%f1^wkEV3tn>N@H%X9}imV7p%a~Nht4smK3S>I)wyxk z$DI=)pxuhtSRc}9$0(&R#_e0p(wyD>Lw5HL(b{nH#!bHc>T7InZE^A9Mb{~PN_f7_ z10fO0x#(Kd%KwOk5D?)A&8t$1(=&BX33V|$6t0e-9JxKJhWV)BhWbBb6^TesoQe=u z3BcLE*eZ2enWiwyWBV%6;`78JN_x^4Yimh>bAw&2;|L75_gf@?==1K;fX%*Pt9!yL zTZi1(JYl;#a|9=ycFkykwvH6tHu+lJzg%ypOLr~Hdgif8Rkd-#ZY5!@XXvynqp4)~ zNU?jYXh(*N8=5N@N?M`C78a{rLqgWO1HskZiV}2=_1hqWsvcJ&O0^up>qyL31#yrOssbf7+A8ugAkzW4_R&^-NkUuhgIBV|SNURT z%RH0ZJqWma7_v9=*gFZ>8wDIsJSK@G&D|h-+!kzKhE5Mczsj+NMM#M*HO3gCFkm?7 zvAwxY7zPUi$t=q_JU-#>y&cBmDI1%c{P-t7;YUCE5lSh1&sz}NHz*aYGHmG_J}f@g zdZ(pi2Mtm-6kc)hq9spe~$!9gnT0~$~gd*x$Rmq}oT}x0_pZUd%zZF=o z`o7hY4`Wt-Rz0$^^15CqtPqnn&K~G#T^1pr(2{BDb2x308IOaB&)&Gr#|LX%9*)`U z%!q=Lq*~b0i*hav#thpT##$%dHK46n3|hnT8d|dyXA4<17JLXimxj9KDuR3a9=G>= z-o2xF`EtR{O9f%*zP2cq(MdIWfY6omtni$K#b~V62(%NyN{f*7K)Vy_CaK_L7BHFx zlv<)Fh`f?O<@mC|t31|>mE;wf6Ts3IX>J$ml<)pjq()M81kY(mnBgYv2kI8?X3->R)p`l z^OEHmhsPuC@9cAQbW9Y*ymIqpu3fuEx7)2=<2SG?>h9nwx{*Fsgcw`d6EAu}bsPK{ zMrvnKJ+PkVniR%!-B_b*@;OtDt)eucT!g07QYgCeEtj8urrxGlF5aleRdgv9b-q-oAgNrarY$_1`*XYhScvaaV9 zB+~;-nUbYFJl~C;m1Rj71jK_L7q-?}UmGBm!eYtuf}@iWd;5nR9UYUV8C#p%ynORz z2K@oRLY%9VdZOd{JUn}MkJ^5OdK}6F5n`>s(q0z`b;fV~IX>V^0kKOZ@s|3Xv&6O> zX8vp?{^I+7<~gbAKhmY##)yjKT=T?KUE!56+piU$Rd#;dOXMO2OH}E&&VH?3IfqJG zeC2L*Z3O$1Hb=9Ti(-sKNyFXa0e6pjTwNP+b#2V0!HA9Sj80IxsM5Oicdp5?y#MN+ ztgSlaLb;y-&}|!j_??ui7Yg3~DBz=eJ|F#ipYMMw<9oMqE^QYmYspi&v?r(DB=5*T z)b(HkSuPk)B}Ws*(O5B_N#=>umR(%S*zC`V1LsXezv$91}w8+YU!YGWD)wICl zx1m>~vsysx$tv2`mNd8AKTy0ij=6u(;?up5+XrouBB0+@C?)Xy0MGN#WdT?>oGzV; zp)5<%WX5ECf;O5kj96RS;L7Ez+%%`Uo*;Cjo_i5y8O4?e!< z@$r41SthwTl3d%=then#n+Vz)s>7^TNU$}th zd8Ap&beeE{GUDLqgrnmTc~QE(7e#?KW?=>Otngfxxzt|mNm4MGjL_xGjjOD-?RoS} z+VjTq+Hv|&lR_+YSWfoB!YuRabS7EVKgmijRlg}c?zK8KinH>8`rk%t%F>MuEybb^ zp3;j5&Yd`y^kt=DXVhVL+~M7w4Tf>b<>7?u>nB{_IO1Y&No<&*9(%c8(OgCq9Q0pOdLehm8@0flsd$VzjOZM^ct0x^&LA));hkeWVn0x_$bC zH3nk9p|A=)t^W=b>_>(^4CJxUmdhIhO#IrwXUMURlSUOWEv)`0;#crtnfIP#7wh* zdnaAq-CgHGZ_0MhIp=EQh_Dl8Z1-kd9**&(LFX1-I6<(e>PnvP>ZhI1GVHo2@^GX` zQbFWLq`BnEc1hq_=80fB7o?e>EM1+=SB48cO)FSV9)!Lj@GPFHH*Sdq$p)%G2usV> z!f{DjxXA5M?;NK@x5Cw>m2~N_F_7nQJP{mC1bfGV-6PBXNHEI+3KL-n$hARALlAg) zN}|hxEKSI=%n8@E#u$zAJi;KN-D%V5bQuf=Y;10_w!X<=xJJ7j69xf7Dn_FTqw$2} z(TK@p#(bVuMv?_sXtz6rVTdg?N-0O4PkHct70-^?R!A+$GIk&A@Zh8WlYIZ*a^d1f zZ1hvK_DNFbMBw?Bz+-Xo9~G&d>Ks0^7yk8O^`@=seeO?-kOE!UFRfpC8d#1*iN}g2 z&O%9-W-hO*sJ1M*6r~=9mX&z1eq&sX;1=gcI7f;4|Fv;x)kzZZVASRI;edWCr5!lG zwo*&BdNaPYeMF!P{Z{I9VzmUNvcp2SKj)d`;Kc1D-5!=~^faMo*gcS76@h0-GeMra z3m5u^PRlT88~SZG^d9=Q8j^Pn3~iPRp8-6nQNE!?x{$8q+Nab$nXapXobJf4)_JMw zd8KnQnWmPL3G5!j&XHi}NOCx`%o2eL0>UUD@TAko*&JaErGcWz$uqa}K`M_R@Cl~I z+BG&dHaOV3Ot0T((C_0vCGWLI;hB7AYnQu>EP~yg2mH-{{#S&Pf642czvl8*N*pTY zbIZMbkAsoBfqHHCF4=1v;?TG`zLgDB&dX}~bIx-Vw`gccr|VOmMSFrgTk7qe=keDM z)T73m9_LsDPM{l9bCdM~VP`PtBDOqp-dtfAE=(LhOVhNPvI<-W&r?nasjXm~1RPHz zj1@>}iGu?wZteuys&KYt_PPrsdlwH%HV zCo_pH1#7XUzoF^09ErJZqFuZJXT>t-uIqdYFEgAcTK)Qk0Bxn4w4j=_sHIR9yDcKL zs(DzHFiGHGBzSND4-O@}$1Y+^vgMLx-&e%3kLOE@JSR)%=C_p7VVt%b89m#I2ZD zUwxH7`lCPMr5iUW%Mu|3?RJ|m3>Wvn)5cRLw)!Fl1(rLE>nq2avoU2VNoJ5Ur7 z7roU*{AYQysD`K?S_)C1Mx5uanUCaY4H`iB3^^HED5sA^+YV6U@#X0NUl&$`Z3;j9k-GpwK(uqpq5W*0AwX%5FgQAekE32b#UCw!FyI`wdUbSC{g_!0Y#pXCUeRnM@U6GY7w{FbbCDpgCT?AkilS$ zUcX1T(U&O5g`{Ivv*5 z*I8RzdxkgaX*^Y8TaX%16a}Nv5%2%uKQg}aulZL0zi@4PLbvBrX71teJ~C!rNNr-Xjnh5BLO-m!$hIU2B>RX&fTwmh%ZMy}AMra3_IoJO=3 z(W84(>o=0eJ=dp*x306*HMc4R8AYBuf7;KvmbHz}snlIKF>Ig=?WkbAn{a7u z%C(I#S2iYG984LuQv%OW>Sb46)%HO`pepj1Cj!sHrL~gln>oWy$!zX^W-BmsTV_FG zwKMK∈1A`+4W6wgLy?c6wFp_k`)o=2zCK@8VeU*Dk9?c!ChrT+CaHEWN;Q;yiG zHZGF;_wV!0@BcH!?*GcQ_W#TEO9`Dwy17hP6ohLfbkNiEI)s}Lf}}Gj@Tx1$t01?Q+FYY zQZShbvfMeNMxiAP9Jz(Q8({X-vJT;%LUC#f(39SPFB+r-;VzA?qL-OOInnuAR}rQM6C!ZmJflgm_-Up=xh418mEvmyd7+u5a597ak5G;<$s7f>tZ4Qq2LwwKayrH9FlMVH6>y8&J>koFqw@%@U^5IkS1fJV{8>Y@s_V ziV|xrf$!t{K2l1O`J7I>%`30G!fVR)>Gpbfo`(j*{X1@69J4X-DBW^tm(D!mf|pv_}bvHJ2+ZKby zXh?IxbnepC@mw%E@|;zTw8SmfbQp9Dy|yI^odKb!?nZ6IDf_o?s>$T)!?7^l#8ToO z%4cy%wTfNIN&{wAtie~A>rtrnSi;pvePtJEWT}_C58Sb7rqhgQG)G9EFbXk7FTA{b zW#~jX8@)MK)+StCpKxV;!iC|CK_?{&T~sD2M-{j2o$9OIk(~1UTm0!ge6kzy$!^5${gC~U&m>XKzYrJghJkzLjB(aS z#)6WHAPnhrItM=XeSMv^^>qe=A? zJOyI2i}dr}{X;(e@K;Rk{LieZ|HvyBkLkq%YZPD9MtkJ8DO`%8aPo&Z1YfzWLuhA5+NR;Ywb4|)pS~uFH z+`DV3ouuS=>fAK$9|hb$^4U4|IT-t#%zS34B+a4J7Wb}i7BjKRQ}{thtL2LS{lSo7 z)d1-C2Xs0e!YIP?T$-7rIaxMkHcv>Bl%#3|WLZv87FFY>GWFEXsY41yD+-CCh%C+U zmB*{MZt==1uMkBMd7cxuW3FDkM!Vg9`ZwHHz*C9X%2G3*Pr3WaZ`t|q-_f`K2iMl_ zvc0aHIy-0KtM*xVlxEFX0eUIYl@g-B(2AB1O`f}ybu^QV=aT7MkR%d2cfR_qNYH6X zx-F;r_5zD1oxW)C?z>v#wNK~9ex6WXWhP)*L~hRn3k{oC>Z`usWH}jw`+KKldF@)k z`p}YOj?nT#kX65m5{$_}CPZoyvdiI+?Ti zig329B0hH!t#JX0uM}yiG1@Q~4!L;Y0_z(aZ0_&jc^y-KIsSsu5wpIbM3 z-q9L-C1SHxWFVMKrhNS2A2|Nxf1zLeTVB6@z_24J^5u~5m%(D#d~pJKD5aFrJuq=g zvt>0}yJ%pZxY@XA;<`t7wTt9hp-WZ!ZI`-6RU`*1QJgv5`THhBamo_}q9!=Ia0+=E z59?};Y`ID7@w`3Uo09w87$`I(xnMkZ@*ZuRyKT2+xUi;Om%Oi0a)Pi5i$E%a@42Ne zo^-FMEak%^wAFE&^7OLby1BwLjLes{J0~|$vYL$*u0}UYCHoVfdxxPLJl_v_a1?Mf z@tCEOyc(U8qBa4rDCH4%`t%0t1inY$d$d{s!@H!C(LIF z^C~h+v)l=wwZ64}>5V4sDr6tP)rNz;-$pMJpae(|pvPufLx5C*O$7x_z}r6=pc_LAsU zhmBYMcwyk|)ZJ??3R~~?eL636^$n)}?F&-3`ty`>7T@EUY+S^^Ko|E&sTL8;O?8E z6pRy}(M)kT_Sik~xPRz#?9k4G0%MJ{BC>VrVxL;{b5qi#lahoK#x5qp`Dv z34G{OTDg8(6Gs-`UpjrPyczR|zrIlLs&1*p&6wJ+I6z;|b)Gu!w*CoUfLec7x!+C` z$$NJK{_o#Mto1bCx>B&Urdc0oF05+?9k&iHN#&`*`C53p`c3P)nbvl(*ri^pc(!Kx zte!cs(g>jP+AFnSo(m2q9(NBSKHd%aWH;d6VZhgr`>QKF3_Agx^|Q%Z@F(nV)Q z!N&RqTU%QgV;PUf6h*vFyRqTNuP0pHF1WN=a(Szy*E95DOFO7Wk_2ED zu|1}i>r@xjRtBI8tMxNGB^E#SDP4y}6QCN#7XmzCD|1pu?|C5@CmwqzKKG9T?(F;A zJM`E&_Boy?rl};$C8&TXZsGd@N=cN0IF1<%*Vx>4TCYw!rWHkmVSw*@SOi*YCX<>p4<;|=7{O3O>j$`sXC(m=P zUb{vd$B*-H za4n2QS5)w4|9tL5w-VTt#d3%0LvFxN09mQ*XPM;gzRx_9+`5u6XlwGKZs&i-HNe%4 ztaXL+tn@HKG3*=KvBe0mTA;P0EUPrLI*^*Iq%?T4#KRS$v=)oq5vLCQY2G_4r?Xxb z?Ygec-o4PSD?dpThZBzn#{qZu1MVDz+&}U;o(9Zwx6eQ-Nfao0{Vx6Ckaips1R+5X z(CKvP4+ix6ed4%9;CV>pqNJ>f%%-!s+rK%PRdzomy2^#ivc!~{FbeT~A8QS1nxeI# z)9G^g(j_ilyvS@eV>CKJYt2u7@)Lgcv!4@Joy!`d+%_v^Go#P*R*+;t?nTghB?EYC5iwcEB9Du#K%)iS3m#tRtLXu5pjvK zu~3$RBo$2NE^VDAuE=eyAn;xEHt1*u9k*#b2wZK2dXGW9OOhqWe4Y1#F%`MxOY5U2 zdQFw~&{*M?e(XEr#aov%`fW{7iYFLl6C}FDtcWSJT9_JGTer;XcRQRJWHn+Gc?sQc zM%zzNLZ8yUJqxV5iO9-*)@|3a6s6!~?y+;E_;lCjY}k(MQCZ3k)|25>5OEakmm(b zN&LXa^E`xwR@CCwty{D^Z4M3(d2s&$d69GDrJMZ8pZp1Le*aCh)=Z~U%A#N}7_hd! zek!f}rV!TS;;G0z>fBo?MHq&(+C743K-}G8dhrIclRqIDeZ=wfeMZM0(mMWxZn#Ik zmC$cP9Dx@|ED~#ktDD%WoA#9FKOed0lS(X!n@{zXB?<(c*plR~@sQN}5G9t_>t9 zjOLPqalr10&%L9Ny-|yUNsFV2lW4d#egYNv^algh)`kp+1L8O)j$^vr4xLViIF1Q? z&n-2wkR(~9DRXN7ddPg9xB|YE3MmA6UNBr+7&yiAc z_ugIJe*10GB<1qu%e?Z+E8Kkf<;AmDPbI9@%#`QxsM7y8DaCwTJhh0e?vkE%U2rF? z75QAeu+DJsJ+hZ?kj(yy0EF$_OMnEc!oGK^gEVbh6nPz{>f> zxo}8hA0m{8uFJxMtlmWRSiRUUcp3E)WQ(MV)TLR}5wlV;N!uLE`rJG2@$ru0?t$ds zL@}O2UPz=DF)<_E;Bh&YaD$1$BwhbRhBp2E%YY9^B@v-zCa+>J3gQ^qOU zIHwEG^Dx?xQK#Le9k+>EEhdvO2L}htrZa>PT)23V_4RdbzWg$8zWII9B*F7MHa0h_ z`$#OhnGfFw?&6-kX6KF6;3>O%oIXMBDY00j6hxsS3VYD+QRvIWgO><8H#iyGB02dU z<@`PN^{32^?-5UTX@@6t!kjpSz?Y~hl&e?Qt(xyWofm(aSk9U$*4uuhG|O4X(sfni z$TCZvHZIFux|&w0$#gEAJ#=7+R#MfVYCzO3C$(L)JwtX+_xjYoM70XhBC8?r#pqEr z>7gnk0lBb%ETb9$ab)Sl)r_4Hgb~@a6=?2DHCX)&C`JAF~X=u08 z<;KmM{P-t7A&MeSPEI&EIib~R(Qda-busJO_Txld=P@$-EIgNm$q%=Y>!_h}1L%c# zeoU{|XMXhtv++-v9)HZq;kz6ize8~F0bTzN>+LyfU8jo+BZ0LNt)-g-T&eLr)62I~ z=CM@Ii*XN*#0}pMx|XLt862WBVIkmdy8V{Y8>$bL|Wy)F;NS(Hx znzrC6j7r&M1ShMVm`b{OTKxm0I2}F8g(>5gBR3%|k(bjAr&ueL!iFkx&7du@t2wDO%(@qBK5*5sb5l-RY3M={kqAA>+JDT1FV_ zxfxGkP*S6$>#pRP#*|*QFt~ODv2L?gSynTcrYhJk-C^@QBhPZKUA@Nk_BKUPaCCgc z;o%`!ma)0H$*o(rSX*~?*~S>A(<#&G6o6K%wWyORrHJGBbFSn0EB=2~JU3!n#o{7} zW$a^D@}1BZT-fZfK6st-wHwT*e~BH>kfcEYVs}6jk&#cjDmv6UF@l7s*ATa|rHtH2t3U0YTs|q)%_W@diKs@sA0^ zke!_!-hcmnc6N5Sbm|QhOL*3$Z!Ej5_&32=(~B=II?uwmLxM|nX~UHwTtl5+~aWMBDkntY!e!yYE_|-OGa`7 z;t&7ar*}Zh=?x*48^h}5ERW~(Q46pwEia`silm6prN6K?s*C!@g0vPXbUj!FLf|Q} zuolbp)wLe?y(P6@$UKVYqY z4fE1fX30-D*gxRj?RPld`89i^UlUE;d+QCyLp_db=0&Ub%*S2z{q^Oo@ujtoIC5Y2nkmf$)B;aHo zagz0zaShwLMKt&h>lfc(`_e0HZf(+OhbU<&3e99X<#2zO2lwxD@7_HgJb1vt;UVMk zm^4ePd(W+q3xg1)6h-MemQ=N2Td9TPR*N70@eldV8*gxMaKOhOf6NCTe#qUscaTCd z7&ya6&v%bmyVK!DXX#`1sPfEeTG`anzC2zSVq1k+EU~o9?qo#>N=e#rfPZm|em^FA z>vLgZ~rZN-luGKMr`z<*8wkdV>^pxgIVrAeO~v?3U^lzxm(78 zSq>D%p(PA7gRY^_&PX%KoRnmqNe)jGyGLrV1gBG3qIctE%39aFEPD;}bErGNoiRE|-M-wX6Aq6K+1uS^XJ?m#!vlJ~ z9xq+L&V>sX$@78_Kl*^32Rj@b9B_1eNRbyrTU&H{J+?1gU^pCd>GEa1``z!dySvBH z(GkWt|Nn>2;peB54Uv6yypY6JOPA8QVv?7mIGyn$VHF*!pD;b%p))%mj>g1cLF^kmPgJh6&rlclna8yJd##nLEvf6yV;~_4+y{-RU4ku> z#4=3;N#^u&c_A1XXCFPD30fh9;pxRT^@82n?6I~vTa+}PfT-#;a$#OjNix1n4D8N> zA*&E%!uCyCgIo00Z!z4w!N%q$ z-HzfB($qyHq?Dr7ifOfChV^wYhRI~Y;lTlWdwcBd@6+vcxO&YM{>!ptYipC8ogH>} zce!`(F7x@E;c$&XWxN;!0iAA_?d@$YU%A3$G9gP-2E*a$SF*AQx~Z2vJ3N&k_~(sN zVSDv4Q;m`6vS2z(IXKwm!R@y=e(+0*(XZ&pciC$1b9t?x-_wMxDy^uS4U6LJi*Y(u zU&W#uxex}s1=HhdylXsjl9JN6`PFvIEw$;l4V~DHc-5=tY*mXhX9)H4&vz}(wY-1F z=kBh@b}whGqY3?L4C!&jx)qs*o@JaU-n$p^hubag9|p8S@RX|;`krN@mveJ-h9TfM z+a?cQB^rK@%`4wy`^syqZ(gJwx9~h4DLtgD_l?%qQhsK-SEK&_dJIWxjn*0=#A3q| zR4y9EkYySBdwZOmoS=>2=FOXIZf-tgz*rMlQ#bp1@IpsypM~Z4mRP#zA{WJ7FN_JI zF73{M*_E5jM?YbD{1Kzc`;3m?BRKq!uK$3wPQsuKofxDqvBGT>UlQF)D*U{0cF24o zE(PCnTf%+M(rF9UbI2;4T$)SrQgA$W`zMvGOgAG_Y31y~4!u$^EL}-fpUp=_a-tsD zS&>~lNn4bq_D@ym@@OXbbic>@JL_~}<%rFIk|kTIhuvVDWj4a^G3ZA4zH@gGlnnbVT34^I`K|A9 z<)v@4Hf$4k50@vFT0Z%iDc)z@H;=l19`$*va*Hqw3B&L+zwg;bKtpuTAK%DS^z*SI z9Ib9FW1%QDMV?V)GbWP}M+f)WyY~mC2fsnge@D;%fUWK^7Y2r2&kcWLT}QHZ{Dl`M zRfW^R(y2LDTnDx+U43pkmrN2zdTH(!sQAitS$l1#mFu)DQD_#6rmd;;c$Mu^y`1F3 zdp>t}73*=yuu~F;kDrRJzSh8pos)oHeX@mr>7R4ywSUUy#*i>jixPw9NunquYQ+R$ z3r{&Un_V*5${WDbA&<`zyRLrx^9ZoPi-B)!#P-=ZU1zC>@Wa3(3_R$xY4^8?dshiN zmlSf)OxY!+fjWK>anZ(?{zKC zEw-`XgAUv@L);Q{Qn&Ul%_L>DlI~=pn9e1Ex3bhGu(X0|0-`cltjDhE%6x6_un!*y=nyvBv?^)H~O)6)*mf>b{1do~32&B8e(HV1J=+py?H z0lpHf4@1@lH__%LlH_OX?(VU3_Z@cc{eKiEzalp8ventImh%<_k*QL(Rk79AAHAJQ zS#bnYu1q~h0j}YYY^|XI8eErY-W)qbM|amXl{CVdyQ2_lufX{q<5jbX~umbKa2Li;i3&zK{86CXM!SP#od+*Tm@37vPve9=#_qiW`wl1jZkzUAmw7bsXpEf7gVwD$@0oCGbJCw6onQon&N^SZAD>IHD^`H{w;6 zf~?x!ZY)ew$;nhQO(mDsOE&u@aj-OOJoS2T1ebpKOzqltm*3*B2YYLS0VwdV;L15Vk-JVZtU6*y9x|DS?mmE*s z?5zd5ZOhJ);;lO#SqaIDYeHqYcnf4ls2Hu5~fK+BCZj(uQ2HM z@V%uEe?w>uz6$=%65AtD?@JYK2;cJ*At9}H7cUsl?rkx>bd&k$$7GX_Ih?-F(a{Hl zhabD;G;zkT4Xp^2FRLMZCtrA8lMRoHRY^xJAz4g6ROz%@EVi-qI?h|pR8E+s7F^ku zj3$y$X*!Yn4`Y`)H(4ETu00p230Z;13etcCa4>P_jj6IxM@?=6=qeF^ij zuj#m#q*r%Ym0a#(UCH1VQxKDhAWL00_H2#OTFE4jnPeT3vQ1uS=Bef5!%M^${)(Uc z)&InmYd7e`{^Gnh#Ma=eq9L}=L;VD^v^^5S>A;GjBunR{$%Ogzgv0$$Io^GT`QdL- z+3)FkAG6gRv)MQFd*J&LBLt>g4&fu7&mPq$KJ4nxN4>UF|A%WBj3ypQDhWif*e4*R zrPPXf5pt6DNy->cS?=%U+&vz!`O1ICE8qQVZoT$xI_-`#l6=ulM1yZE8e)4)tQuho zaXNy_H5?sHIo!L)=-_?Q(Yu)BeZ1lmTHK@U@6d@xw4;J{;7Cp=z{-^&{I6dZ_u0q3 z^7oY^cN^Z}coH&CJUns&RpLp5vC@%R(j~JoSs@uuG7je3o^ZoU2|400SO1iq*(IjRv3lOHDDjItp$`t-;eo(>(Z+5T{0ZsxF}PP^mf0_B@&zT*6#OUNb zj*i~O+k20Wf0xZp%CK5aqXIYCV9qY5;l+&NmM4N0F|9ybL9RVUX@_~)#`h$L$5Rfb z9n|p8xcchf=e2Ktm*HS=Y96;igQtmx*uDZz>*Ao^uFTeJuY;Ui-8D3)>OP>bM1WhXXOkhtrf>;E))RaX|S*A=T6ZZEWuy^-w zne6=<=D(rmeaKe#kP8D%ujeKkL@gI7S!rH;-N#lPVV#N!IGM(brU6-I-H4P45wgW( zRN#nlb`=Xwl7@5^SmbgZ17Cc5Zg1tX$J^cjkO95<8jK-!2>48w@D|T zkWW6q%-_c=?Olme6KNKYVu34$peT$8;TVsZ1#*!P2$vkY|6r>6tFEr^_kQnv z*Xw@W@2j@jvo&(kVR`e&*^te@ZghK9ZHgJVvz%Q~wsdDy!F{*HG_z6bl6U)7M6iM( zl6|wpdXtDx9`Cs)PkjAEPG*7sywzhYJhGTw!$))U%E$jfiZ1OdwCI}7?Q2fW&#Zmx zGc9H(@M47dTC4FHk)p(f{we1j5H9aF6pgbdl$ZIR1FluA?fyjF?S`S-4HTr_zidzR zTRNGcd~FL?6=Yv%aw9Q&v?K0QlB)Ap(Xa?C!0|+qn^~>$%MRaL44YJ^)>O4yf>;+7 zDQ<|H^<`|KWeV|SWsnIqGvPUd>(HtvwjWbI7)$bq^`-0ud$sC#0;JL?GVc6O$!QG# z#j#<1eloWS!I4>qtu{MX^HokI4dv&+ZxS^9moxjp^%X%!TCT>`ciL!p9U!xFE4ij)^nto#rWV~=FO(ANxJ_#w zjJqPp?!Cn8^jRFtsq1yHW1?Xn*PZcZR2%;B)x!Dcw)WHuZ}~BAgsbWTKG~lpyk#Kv zdmPj5X&ul{+~8N%@>}v<#RcY=e%U^+gNKeDyyf_Gn%*+AOTW!HL`UU%qRwZ5a7CkL zzB#)`V(&3tx@FiTibEemqG2a-_dI(mo9Yhcq(NEF1V419OwRXRCxd0QSkUfj^@08c zsiY*`GR578enTyiK;aVgjh&*mnJ1Og=aNfZAB9L+WaALZ$!q&Vx>y4IUdnY=Iw)pyIZRgg7JQ^Q_~W0BBU z0&}66iFgED(eVuhUiy{jUZ!fje^JiMB(P6S=9g}L#xSG*b>++l>+x4o*$(hFq+xDb zN2NROfik=#)~*;@*^Xd5o!#o_CVgawWQzszj5aUdJfEYgRh^;0vCSQ@ zV~Y2k=~HPZ#qphvoIX7t6*g`JB7jZiON8JVt1O9jdGyb#AvUUvv~4Fmi`uQp8nmLh zK!dW8u$~V^uKGjOtlvAl<(6Vu9k=0Lg|FTv?+&XDMY1`VvGF6ht?|)DkHfO=rtYFy z?KI9traCR`(20G%I2=6NEgsn}?NXjD7V%5Fc`iy8WPb_H!>1q5PZ~CSQjoDHiTtE! zaq%-1lA_sj&*bO4$Z|dY=|>r>OkntH;38kFQ%^6(HCxi2In}=uy(?2hZvtcW_*_#&W^c^q3#Zx` zJrswV&exqUffS#Hnd!lH1Sh$jWAo38*C)J>b0pa_MMODP168P|$T3zJ7>={IV{#A7 zRJAbk2;A%zo`;FTIk!bELlkU2vP8SY&hct{eQ_YaN9k zc=byyZP#B)&;B$!d3vBRJh?Z&Kc_A^F1}wAmh#Z-*!kg2w8T64`|q68vFio5ko5w+ za>bO!h;u;%k1_*03A}_572d7t%|kbeyz})yQ%IWUqrg=}!bxMfXgKS4z+|DWX&dy} z+18E;*TkDft{K2n99IFd^seDIxquO_dBYsv*q39&V3y>=5Q%gcKv^(sf&4N0Pnd5yNhCUzL8C)3tQiggi&(Qv<2#=JV7wRuFAvB5f;c`QbF_4!66Vcl!gxUJIx3P4Pl}GJ1}Sr1#jX@t%A0%V&V4Uh_r3-l^$ltO06>S-RMRKv zyMF~pNqTySE<7VCatCD{WdNY=In9|31V03b2|02cS07CkwVgVI)8Lk)28_bO;BOD2t6ao05UB5BQk)Six02U-GDXBno^?5;ol*6A;w>;=w7SV@5vr z6L4vU0rUA#HKbH9CeUlNUU{z9d;D0{Kw8uA)_wLXX)Nl6cE&N7XkK-Fj->9djXvN1 zxH_yy%1Ydbk+_wr38EOh=?j(EenMzoJttnsjd)l$)6f{iYW zYVGXtxt<~6FuYR}v?%@3sN&|KE>RRRWE3m?U2a6%VfbCyHm2%Icfx^Fs!>I_{zi=) z=%_oQ&N5%_Nmlx!pv=|0;Jn*h!8suzAyueerE*%mYh%t67^&%(RYS}$hbCOZz(hP^ zvO%5Ws)V?B@9}w9+)bJO(cgF|;x)s_kwS}g%m-e@y$OS}$eN(k&GB(sTH2kJ?A6Td z=9seYcfCt@Cg|i=1X?Thsp!ZBN8ar+rh`tQ9%1*r@q2D(>W@A09#|2$HJ;}#CHCdb zhZrzOz!dP?zi)~_0AXQaO?cI;QZ>Dv;6H5yl*eJ;*^Gk~s$iB!%i@Mjhd$qk6ZYwe z84JyULUBqx0$TNX0YMg`{_0uy2^)yT-giCRZG3LLk8trzabdOnnC7NDWQw)2!Lh1t zs&FhtH}$wkIm=b>!e>NKR+eYe3l!8I=$bvwG7ems4+Xn_%@ za^r5#t{lytgpVY?l|HTxL?ckrzwG&wowMX9@3P!Z4_{NBHlt>73Xn&0Jmt=+gL@l4 z*-q$FQ88((=h4nd-jTiCd*&?ID}X3R%`&kRC@Jjy@9<klVIQ-S} zhAaM&EmzE;EW`IlD}4Z8Dg%W25+R<(r#lyN&JYIpDzGvIHCd70NA07shJQ0zS``{u&iE@*tJ<%w)J}=ZN^7{Z;l(!O zg4To(7K>ErcbOg~mVA{;Td4r@xO(w-^84_R>kr6Qmj^FcBXa2_YR>sT48J-4lV7a6 z@fESsB3hk2*#4+$Hv0Lu2ad}1MQUTi?CwImCm4Y z<8xUozcSbW*rvuDc{Z`@opl7{c%L1K7k(`x5sQDqwI&-j7GW5opCA-F=8oa-^BmFu z=v64!wFYm_W2&K<8RoK`zmXj<_j!uVwHhu<$(3bZ^u*FD{#Sd)O9Z@20huHEx?37}WBcAZPMECR-tu)OmhM1)GT|F)lA59j^7>e3&kW%VGyS;5;KDH`Gqhx+2vu1Na zS#!4#@q)NW@0Ly`O`DJFfFd_S%}K`wYs0BLk?Fm5ik6YnFy6o%P!d||8nMR7Ryr3G zohAm=b)9wczVo*I@+{86xykVxJ3AZFRSn#F&@x`VPPLFBgU3{gy`Jsg`#q9wS``~# z;I}tPeF;vuy#N`C;H`ROBk=xR(Hr4yyFwjgW*dwk(aRjklY95_9k5wR<9FIlPQ$^Q z0M;t0y}dmPtJyx|c4*u~mlUXMkP%SZ%r}&MGKd&`{&aMJEH7EP|DJW7ku|NMR+dTF zR022@l4fD7#bh82pJz&>qWX)8$W4l3WdB6P zMP7BH##iZ+Yv0muVzCdM4iFc6*@UH^*qZqOGD13dU{;bM4$6VRMFk(1h#6omH1M?T zxh3;-WrJ0ScYe+J-Fy^*EOJz{@#!hfI#O6Vsz~x6WBilLSsxmnDFz$t6w$!Pn#fcN z=p5fLrMRSBiFY+vFW-H@MVMoe<%%v$IQ(`IL0p0}U$2FEr$_~}zEjqBS(hGRv|?Lv zI!M2wwI~xrp_6yN*zaTz-u~yOMBs^+&a__b-Kqmez0Vm5=C)b0H2ejp2 zILhq;rOltSTHVjZjAdYHW$$CFtT9y|SU=A&3ToCDq=M>Xo^3)|YA~f~a>F{>Q|5nw z(Aw+Tq+JpfRg`hROqKO+;KFCseL5l^GKn*w!?sLh=5gzX0S3iS34tN^4XkmXA!)@7 z9iG@RGL$8)0wsf@@zRE~ChKDvj|W-`wK?xcKiv$Pwke?;!WVNQgNUo|HA@^)E)EYa zx@s=k;9T-IP)suP78&#z+3Y{oG9v2=>ebkQ<4=2JaE6Jx%P)K7g(IJ+4X9$Zi>e&o zs^D&*;>dU!J4o#zeTk)8TkLXog zS3KTgiT@--uWj#DXY*s|m5s2Yh-M1+WT<{~q?5e8x1|L9#zHHokAh7m$M4D0IwCb* zvYxkd^G>p);msIcBi~|vCG$uDBY~2&XPikgrFvFnbFM|nz;(M1d5mPjzT$QTV>bRw z3t*b=u|#W;ubHOM3O!)xf!Z+tHEEa?SxFv)+F8^E-T$J;Y3j)@_9B(Uj?`zaG6=drE+v1 zBz45)=Qk~t|(b@y`hEYP&#PB~UvSa^`khy1QJ z+I15zi&v^Ra!`ctIZ%#$@o~E90^WMeWlXKIyz?vmGHJ8#UnY3Gs7o_KU7vhp*Op~l zue?dFp>h#5LO93925vity9G(7$D5m3P<4Gy*yH1B8(C(dUukmlO!0CX+Wk$aVHEF5 zyg1;5GGjFCw?wJ%%I! z7D1lXZWgY#p2TxZp5nJ52?s5pa0m@DiC4WVEK)VFM%71e)WFCvCQC~hI#UJ@s*PS1 zEgAzI(T(iw<@+Zz&M+i>y6zSYCAxOMEd;R3bG3>*dY8|@YXYMYi(O0=+uDMc z7W-(CLUo#F7EIlYFw4#j5Mpx8jxzb#{&jOhwLHW3SY+KDRvsl#?TuRN`VTbZK>)qg z$Ga=^oNpe+0vXf5^wGH)R;Oc%=$8#K#52JPZ`Q3x3)4Z5<5|Sw7Mm2>9UwDhCc-<~ z!F-+42f`>bh*5$-q_o@q?qbE|90ar1S#8Obz+!Py4#uVDjs070@7QDIr#fHO_U9<$ z7|C+TU^aIi{=VefuB544hJl>^d78W|&O@%HeztnCZyvbu(cy$j(K`{G7FM|#?_^qfv#pI8+Fi}Rws^>sLspU}+Ct3FH~GUSL>>>9piGb^YZrWT5RbfK2c;q`8T>tFamh_i58~qp`I*5yLg5|IrFXEpb>7iS`bsGsKV#+> z;`$~}n98@FdNy~hwd)wp3pFfjAHdq$wa#_1OM=f@DFa1*Q5-1r(eq{UbK=D8#N8!&$ z&fgN!A$l{ACq(v?ii;$o3TI_;iZNJ=u{X3KLJbI%)8PJ8Z->4~O@(oy z{FWT=y)r~y9A7KCtkBnM442U@n&%flBd;dhpcG=yKJ2oMv#$E#Zo@xfbLu3c1k_)-8DgQ z2o+p0n>jmSDw`QAp?T85>>|Hm;odVm+ctZ`?NK zD%BOXsVW(d-U;JKPL5<_W3#cf4Lv^(q7Ls0m~sBbG&rShvR3a@DR!3NyBnMsn^(4Q z|Ee!_$n3_vo5~pf=0aqhnxMO7KUKsmW$_jf!rqp75CO)pQ!7)JGNqe1p&7vVhoJse zp1NPa53HZIc!F?M+3N?F>eotj1rlfi^-I>aZ`yhOf~cyh{v^E5ClZOW{=-Bu3j5Y1 zLp`h9LgEC&aHwcd*`R zf+(uV?q;%zNB!zP?#?d>AYf7iJkT46HxlDAcsn#Y{JH!Yv>uv+@TMjlHRh%GD&jP( z-?qM-vnYdIQ16b7FD-8CdN}M7mJ7EM;zDGG7W8vs;&VfUeH#&>wHSfrL8CMOs?*qO zhfmUe`mj@&kW;R6*tsdsS6ThGjuvkT>^^NbkZ+`{PrGmxya zu?wtnj81d3cf?-@@|}gR#M-`%;b_NL=3t5NM@jVXHkrLa@0Xu8ODE~bw7k-Uz~`@} zHRfHNd$&Ko`NEZscmXCVHCWnx{cSFHHXWQy%sW3)NNA-SeEh*f#bueds`(;*{P?QS z0tdzW_-m~IGTUW$m+HaSe`t>s53W;c&wbBm1ZAygXxiT1 zZGrq_A&vWTC&mf{4a&jC7!+nI?d8Y?+-VsTvq6EVQx!k`#sNQ|P$*dPJPP}2xKbE( z@IgANh!T~YA7r)p{JC((^BAJ|WrF<7 z?|>i5<>91&yMHTqx!L1GIMTF1r#gTivdM5RS#MBv<{l9D12DG{hRw;mM6 z?TEv##=#K>fWpNY0G@w4WBFH}|7MIab~wks$ap0Wkc6=P3(>*2pmBcg zXuv;RiMhKvD84qj{~vjD3`rCKDhY>4lLRVBU=;jGLKyy)#{lDx20&C)QVJFRx{Uti zdZ>>C*khd0q}La7am6{iIf&WYkk*NttC!gSOpF-BP7-E=Mnj~;VYX6IFllK?w4}JC jtuz#BV=pZQkrX9Gh?4sI^EHT^Q~`igzpqxUVjcQlJHimn diff --git a/client/src/index.html b/client/src/index.html deleted file mode 100644 index fa19720bc..000000000 --- a/client/src/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Bulldozer - - -
- - \ No newline at end of file diff --git a/client/src/index.js b/client/src/index.js deleted file mode 100644 index fe8b67a8d..000000000 --- a/client/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -require('normalize.css'); -require('@blueprintjs/core/dist/blueprint.css'); -require('github-bot-ui/github-bot-ui.css'); - -var React = require('react'); -var ReactDOM = require('react-dom'); -var GitHubBotUi = require('github-bot-ui'); - -ReactDOM.render( - React.createElement(GitHubBotUi, { - appName: 'Bulldozer', - docsUrl: "https://github.com/palantir/bulldozer#bulldozer" - }), - document.getElementById('container') -); diff --git a/client/webpack.config.js b/client/webpack.config.js deleted file mode 100644 index 094f12245..000000000 --- a/client/webpack.config.js +++ /dev/null @@ -1,65 +0,0 @@ -const path = require('path'); -const webpack = require('webpack'); - -const ExtractTextPlugin = require('extract-text-webpack-plugin'); -const HtmlWebpackPlugin = require('html-webpack-plugin'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); - -const plugins = [ - new ExtractTextPlugin('[name]-[hash].css'), - new HtmlWebpackPlugin({ - minify: { - collapseWhitespace: true - }, - template: path.resolve(__dirname, 'src/index.html'), - title: 'Bulldozer' - }), - new CopyWebpackPlugin([{ - from: path.resolve(__dirname, "src/favicons"), - to: path.resolve(__dirname, "build/favicons") - }]) -]; - -if (process.env.NODE_ENV === 'production') { - plugins.push( - new webpack.DefinePlugin({ - 'process.env': { - 'NODE_ENV': '"production"' - } - }), - new webpack.optimize.DedupePlugin(), - new webpack.optimize.UglifyJsPlugin({ - compress: { - warnings: false - } - }), - new webpack.optimize.OccurenceOrderPlugin() - ); -} - -module.exports = { - entry: { - 'bulldozer': [ - path.resolve(__dirname, 'src/index.js') - ] - }, - output: { - path: path.resolve(__dirname, 'build'), - filename: '[name]-[hash].js', - publicPath: '/' - }, - module: { - loaders: [{ - test: /\.css$/, - loader: ExtractTextPlugin.extract('style', 'css') - }, { - test: /\.(woff|ttf|eot|svg|gif|jpeg|jpg|png)([\?]?.*)$/, - loader: 'file', - include: path.resolve(__dirname, 'node_modules'), - query: { - name: 'resources/[name].[ext]' - } - }] - }, - plugins: plugins -}; \ No newline at end of file diff --git a/client/yarn.lock b/client/yarn.lock deleted file mode 100644 index e36d42cc3..000000000 --- a/client/yarn.lock +++ /dev/null @@ -1,2798 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@blueprintjs/core@1.25.1": - version "1.25.1" - resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-1.25.1.tgz#396153c2eeb57728feb9e93574de3bcdc27a835d" - dependencies: - "@types/dom4" "^1.5.20" - "@types/tether" "^1.1.27" - classnames "^2.2" - dom4 "^1.8" - normalize.css "4.1.1" - pure-render-decorator "^1.1" - tether "^1.4" - tslib "^1.5.0" - -"@blueprintjs/core@1.27.0": - version "1.27.0" - resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-1.27.0.tgz#ba8e52af4456c1a5ecf09e67b30db3ed3c21a5ed" - dependencies: - "@types/dom4" "^1.5.20" - "@types/tether" "^1.1.27" - classnames "^2.2" - dom4 "^1.8" - normalize.css "4.1.1" - pure-render-decorator "^1.1" - tether "^1.4" - tslib "^1.5.0" - -"@types/dom4@^1.5.20": - version "1.5.20" - resolved "https://registry.yarnpkg.com/@types/dom4/-/dom4-1.5.20.tgz#ccf636d3b794fe65a4191ebc7ff979a78efea6c2" - -"@types/tether@^1.1.27": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@types/tether/-/tether-1.4.3.tgz#bbcb46a35dfbeeaaf60d60afaba3d872b6e1ebf5" - -abbrev@1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" - -acorn@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -ajv@^4.9.1: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - -aproba@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" - -are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async@^0.9.0: - version "0.9.2" - resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" - -async@^1.3.0, async@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -autoprefixer@^6.3.1: - version "6.7.7" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" - dependencies: - browserslist "^1.7.6" - caniuse-db "^1.0.30000634" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^5.2.16" - postcss-value-parser "^3.2.3" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - -balanced-match@^0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -base64-js@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.1.tgz#a91947da1f4a516ea38e5b4ec0ec3773675e0886" - -bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" - dependencies: - tweetnacl "^0.14.3" - -big.js@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" - -binary-extensions@^1.0.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -bluebird@^2.10.2: - version "2.11.0" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" - -bluebird@^3.4.7: - version "3.5.0" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" - -boolbase@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -browserify-aes@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-0.4.0.tgz#067149b668df31c4b58533e02d01e806d8608e2c" - dependencies: - inherits "^2.0.1" - -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - dependencies: - pako "~0.2.0" - -browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: - version "1.7.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" - dependencies: - caniuse-db "^1.0.30000639" - electron-to-chromium "^1.2.7" - -buffer@^4.9.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - -camel-case@3.0.x: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -caniuse-api@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" - dependencies: - browserslist "^1.3.6" - caniuse-db "^1.0.30000529" - lodash.memoize "^4.1.2" - lodash.uniq "^4.5.0" - -caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000727" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000727.tgz#4e22593089b0f35c1b2adcfc28234493a21a4b2e" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chain-function@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chokidar@^1.0.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -clap@^1.0.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857" - dependencies: - chalk "^1.1.3" - -classnames@^2.2: - version "2.2.5" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" - -clean-css@4.1.x: - version "4.1.8" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.8.tgz#061455b2494a750ac98f46d8d5ebb17c679ea9d1" - dependencies: - source-map "0.5.x" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -coa@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" - dependencies: - q "^1.1.2" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -color-convert@^1.3.0, color-convert@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" - dependencies: - color-name "^1.1.1" - -color-name@^1.0.0, color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" - dependencies: - color-name "^1.0.0" - -color@^0.11.0: - version "0.11.4" - resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" - dependencies: - clone "^1.0.2" - color-convert "^1.3.0" - color-string "^0.3.0" - -colormin@^1.0.5: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" - dependencies: - color "^0.11.0" - css-color-names "0.0.4" - has "^1.0.1" - -colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -commander@2.11.x, commander@~2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -copy-webpack-plugin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz#9728e383b94316050d0c7463958f2b85c0aa8200" - dependencies: - bluebird "^2.10.2" - fs-extra "^0.26.4" - glob "^6.0.4" - is-glob "^3.1.0" - loader-utils "^0.2.15" - lodash "^4.3.0" - minimatch "^3.0.0" - node-dir "^0.1.10" - -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -crypto-browserify@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.3.0.tgz#b9fc75bb4a0ed61dcf1cd5dae96eb30c9c3e506c" - dependencies: - browserify-aes "0.4.0" - pbkdf2-compat "2.0.1" - ripemd160 "0.2.0" - sha.js "2.2.6" - -css-color-names@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" - -css-loader@^0.23.1: - version "0.23.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.23.1.tgz#9fa23f2b5c0965235910ad5ecef3b8a36390fe50" - dependencies: - css-selector-tokenizer "^0.5.1" - cssnano ">=2.6.1 <4" - loader-utils "~0.2.2" - lodash.camelcase "^3.0.1" - object-assign "^4.0.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.0.0" - postcss-modules-local-by-default "^1.0.1" - postcss-modules-scope "^1.0.0" - postcss-modules-values "^1.1.0" - source-list-map "^0.1.4" - -css-select@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" - dependencies: - boolbase "~1.0.0" - css-what "2.1" - domutils "1.5.1" - nth-check "~1.0.1" - -css-selector-tokenizer@^0.5.1: - version "0.5.4" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.5.4.tgz#139bafd34a35fd0c1428487049e0699e6f6a2c21" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - -css-selector-tokenizer@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" - dependencies: - cssesc "^0.1.0" - fastparse "^1.1.1" - regexpu-core "^1.0.0" - -css-what@2.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" - -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - -"cssnano@>=2.6.1 <4": - version "3.10.0" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" - dependencies: - autoprefixer "^6.3.1" - decamelize "^1.1.2" - defined "^1.0.0" - has "^1.0.1" - object-assign "^4.0.1" - postcss "^5.0.14" - postcss-calc "^5.2.0" - postcss-colormin "^2.1.8" - postcss-convert-values "^2.3.4" - postcss-discard-comments "^2.0.4" - postcss-discard-duplicates "^2.0.1" - postcss-discard-empty "^2.0.1" - postcss-discard-overridden "^0.1.1" - postcss-discard-unused "^2.2.1" - postcss-filter-plugins "^2.0.0" - postcss-merge-idents "^2.1.5" - postcss-merge-longhand "^2.0.1" - postcss-merge-rules "^2.0.3" - postcss-minify-font-values "^1.0.2" - postcss-minify-gradients "^1.0.1" - postcss-minify-params "^1.0.4" - postcss-minify-selectors "^2.0.4" - postcss-normalize-charset "^1.1.0" - postcss-normalize-url "^3.0.7" - postcss-ordered-values "^2.1.0" - postcss-reduce-idents "^2.2.2" - postcss-reduce-initial "^1.0.0" - postcss-reduce-transforms "^1.0.3" - postcss-svgo "^2.1.1" - postcss-unique-selectors "^2.0.2" - postcss-value-parser "^3.2.3" - postcss-zindex "^2.0.1" - -csso@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" - dependencies: - clap "^1.0.9" - source-map "^0.5.3" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@^2.2.0: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - -decamelize@^1.0.0, decamelize@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-equal@^1.0.0, deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - -deep-extend@~0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" - -define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" - dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" - -defined@^1.0.0, defined@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -dom-converter@~0.1: - version "0.1.4" - resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.1.4.tgz#a45ef5727b890c9bffe6d7c876e7b19cb0e17f3b" - dependencies: - utila "~0.3" - -dom-helpers@^3.2.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.2.1.tgz#3203e07fed217bd1f424b019735582fc37b2825a" - -dom-serializer@0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" - dependencies: - domelementtype "~1.1.1" - entities "~1.1.1" - -dom4@^1.8: - version "1.8.5" - resolved "https://registry.yarnpkg.com/dom4/-/dom4-1.8.5.tgz#4de3a2e59af45b2af8b30bc595713ecae5037037" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - -domelementtype@1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" - -domelementtype@~1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" - -domhandler@2.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594" - dependencies: - domelementtype "1" - -domutils@1.1: - version "1.1.6" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485" - dependencies: - domelementtype "1" - -domutils@1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" - dependencies: - dom-serializer "0" - domelementtype "1" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -electron-to-chromium@^1.2.7: - version "1.3.21" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.21.tgz#a967ebdcfe8ed0083fc244d1894022a8e8113ea2" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - dependencies: - iconv-lite "~0.4.13" - -enhanced-resolve@~0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.2.0" - tapable "^0.1.8" - -entities@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" - -errno@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - -es-abstract@^1.5.0: - version "1.8.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.2.tgz#25103263dc4decbda60e0c737ca32313518027ee" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - -es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" - dependencies: - is-callable "^1.1.1" - is-date-object "^1.0.1" - is-symbol "^1.0.1" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extract-text-webpack-plugin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/extract-text-webpack-plugin/-/extract-text-webpack-plugin-1.0.1.tgz#c95bf3cbaac49dc96f1dc6e072549fbb654ccd2c" - dependencies: - async "^1.5.0" - loader-utils "^0.2.3" - webpack-sources "^0.1.0" - -extsprintf@1.3.0, extsprintf@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - -fastparse@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" - -fbjs@^0.8.0, fbjs@^0.8.4, fbjs@^0.8.9: - version "0.8.15" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.15.tgz#4f0695fdfcc16c37c0b07facec8cb4c4091685b9" - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.9" - -file-loader@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.8.5.tgz#9275d031fe780f27d47f5f4af02bd43713cc151b" - dependencies: - loader-utils "~0.2.5" - -filename-regex@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -flatten@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" - -for-each@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4" - dependencies: - is-function "~1.0.0" - -for-in@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - -for-own@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" - dependencies: - for-in "^1.0.1" - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -fs-extra@^0.26.4: - version "0.26.7" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.7.tgz#9ae1fdd94897798edab76d0918cf42d0c3184fa9" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.36" - -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - dependencies: - assert-plus "^1.0.0" - -github-bot-ui@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/github-bot-ui/-/github-bot-ui-0.5.0.tgz#438da2cc4f2e63e2da16eb73827a2f0f058b24ae" - dependencies: - "@blueprintjs/core" "1.25.1" - isomorphic-fetch "2.2.1" - lodash "4.11.2" - moment "2.13.0" - react-addons-css-transition-group "^15.0.1" - react-addons-shallow-compare "^15.0.1" - react-redux "4.4.5" - react-router "2.3.0" - react-router-redux "4.0.4" - redux "3.5.2" - redux-auth-wrapper "0.4.0" - redux-logger "2.6.1" - redux-thunk "2.0.1" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob@^6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.5, glob@~7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -har-schema@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" - -har-validator@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" - dependencies: - ajv "^4.9.1" - har-schema "^1.0.5" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -has@^1.0.1, has@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" - dependencies: - function-bind "^1.0.2" - -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -he@1.1.x: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - -history@^2.0.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/history/-/history-2.1.2.tgz#4aa2de897a0e4867e4539843be6ecdb2986bfdec" - dependencies: - deep-equal "^1.0.0" - invariant "^2.0.0" - query-string "^3.0.0" - warning "^2.0.0" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -hoist-non-react-statics@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.0.5.tgz#0e36d2c130c8511f267a0d4ceb45ec7d7e4f0c70" - -hoist-non-react-statics@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" - -html-comment-regex@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" - -html-minifier@^3.2.3: - version "3.5.5" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.5.tgz#3bdc9427e638bbe3dbde96c0eb988b044f02739e" - dependencies: - camel-case "3.0.x" - clean-css "4.1.x" - commander "2.11.x" - he "1.1.x" - ncname "1.0.x" - param-case "2.1.x" - relateurl "0.2.x" - uglify-js "3.1.x" - -html-webpack-plugin@^2.16.1: - version "2.30.1" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz#7f9c421b7ea91ec460f56527d78df484ee7537d5" - dependencies: - bluebird "^3.4.7" - html-minifier "^3.2.3" - loader-utils "^0.2.16" - lodash "^4.17.3" - pretty-error "^2.0.2" - toposort "^1.0.0" - -htmlparser2@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe" - dependencies: - domelementtype "1" - domhandler "2.1" - domutils "1.1" - readable-stream "1.0" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - -iconv-lite@~0.4.13: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -interpret@^0.6.4: - version "0.6.6" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" - -invariant@^2.0.0, invariant@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" - dependencies: - loose-envify "^1.0.0" - -is-absolute-url@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" - -is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - -is-dotfile@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-extglob@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-function@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - dependencies: - is-extglob "^2.1.0" - -is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - dependencies: - kind-of "^3.0.2" - -is-plain-obj@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - dependencies: - has "^1.0.1" - -is-stream@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-svg@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" - dependencies: - html-comment-regex "^1.1.0" - -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isomorphic-fetch@2.2.1, isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -js-base64@^2.1.9: - version "2.3.2" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.3.2.tgz#a79a923666372b580f8e27f51845c6f7e8fbfbaf" - -js-tokens@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -js-yaml@~3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" - dependencies: - argparse "^1.0.7" - esprima "^2.6.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - dependencies: - is-buffer "^1.1.5" - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - optionalDependencies: - graceful-fs "^4.1.9" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -loader-utils@^0.2.11, loader-utils@^0.2.15, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@~0.2.2, loader-utils@~0.2.5: - version "0.2.17" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -loader-utils@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - -lodash-es@^4.2.1: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" - -lodash._createcompounder@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz#5dd2cb55372d6e70e0e2392fb2304d6631091075" - dependencies: - lodash.deburr "^3.0.0" - lodash.words "^3.0.0" - -lodash._root@^3.0.0, lodash._root@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" - -lodash.camelcase@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-3.0.1.tgz#932c8b87f8a4377897c67197533282f97aeac298" - dependencies: - lodash._createcompounder "^3.0.0" - -lodash.deburr@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-3.2.0.tgz#6da8f54334a366a7cf4c4c76ef8d80aa1b365ed5" - dependencies: - lodash._root "^3.0.0" - -lodash.isempty@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.2.1.tgz#6015160e77116db88bb612df42adf7f200abec77" - dependencies: - lodash._root "~3.0.0" - lodash.keys "^4.0.0" - -lodash.keys@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205" - -lodash.memoize@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - -lodash.uniq@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" - -lodash.words@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash.words/-/lodash.words-3.2.0.tgz#4e2a8649bc08745b17c695b1a3ce8fee596623b3" - dependencies: - lodash._root "^3.0.0" - -lodash@4.11.2: - version "4.11.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.11.2.tgz#d6b4338b110a58e21dae5cebcfdbbfd2bc4cdb3b" - -lodash@^4.17.3, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" - dependencies: - js-tokens "^3.0.0" - -lower-case@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - -macaddress@^0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" - -math-expression-evaluator@^1.2.14: - version "1.2.17" - resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" - -memory-fs@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" - -memory-fs@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -mime-db@~1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" - -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" - dependencies: - mime-db "~1.30.0" - -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0, minimist@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - -"mkdirp@>=0.5 0", mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -moment@2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.13.0.tgz#24162d99521e6d40f99ae6939e806d2139eaac52" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -nan@^2.3.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" - -ncname@1.0.x: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ncname/-/ncname-1.0.0.tgz#5b57ad18b1ca092864ef62b0b1ed8194f383b71c" - dependencies: - xml-char-classes "^1.0.0" - -no-case@^2.2.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - dependencies: - lower-case "^1.1.1" - -node-dir@^0.1.10: - version "0.1.17" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" - dependencies: - minimatch "^3.0.2" - -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-libs-browser@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.1.4" - buffer "^4.9.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "3.3.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" - path-browserify "0.0.0" - process "^0.11.0" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.0.5" - stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-pre-gyp@^0.6.36: - version "0.6.37" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.37.tgz#3c872b236b2e266e4140578fe1ee88f693323a05" - dependencies: - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "^2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tape "^4.6.3" - tar "^2.2.1" - tar-pack "^3.4.0" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-path@^2.0.0, normalize-path@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" - -normalize-url@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" - dependencies: - object-assign "^4.0.1" - prepend-http "^1.0.0" - query-string "^4.1.0" - sort-keys "^1.0.0" - -normalize.css@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-4.1.1.tgz#4f0b1d5a235383252b04d8566b866cc5fcad9f0c" - -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -nth-check@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" - dependencies: - boolbase "~1.0.0" - -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object-inspect@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.3.0.tgz#5b1eb8e6742e2ee83342a637034d844928ba2f6d" - -object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -once@^1.3.0, once@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -optimist@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - -os-tmpdir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -osenv@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - -param-case@2.1.x: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - dependencies: - no-case "^2.2.0" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-parse@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" - -pbkdf2-compat@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288" - -performance-now@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" - -postcss-calc@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" - dependencies: - postcss "^5.0.2" - postcss-message-helpers "^2.0.0" - reduce-css-calc "^1.2.6" - -postcss-colormin@^2.1.8: - version "2.2.2" - resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" - dependencies: - colormin "^1.0.5" - postcss "^5.0.13" - postcss-value-parser "^3.2.3" - -postcss-convert-values@^2.3.4: - version "2.6.1" - resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" - dependencies: - postcss "^5.0.11" - postcss-value-parser "^3.1.2" - -postcss-discard-comments@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" - dependencies: - postcss "^5.0.14" - -postcss-discard-duplicates@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" - dependencies: - postcss "^5.0.4" - -postcss-discard-empty@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" - dependencies: - postcss "^5.0.14" - -postcss-discard-overridden@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" - dependencies: - postcss "^5.0.16" - -postcss-discard-unused@^2.2.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" - dependencies: - postcss "^5.0.14" - uniqs "^2.0.0" - -postcss-filter-plugins@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" - dependencies: - postcss "^5.0.4" - uniqid "^4.0.0" - -postcss-merge-idents@^2.1.5: - version "2.1.7" - resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" - dependencies: - has "^1.0.1" - postcss "^5.0.10" - postcss-value-parser "^3.1.1" - -postcss-merge-longhand@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" - dependencies: - postcss "^5.0.4" - -postcss-merge-rules@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" - dependencies: - browserslist "^1.5.2" - caniuse-api "^1.5.2" - postcss "^5.0.4" - postcss-selector-parser "^2.2.2" - vendors "^1.0.0" - -postcss-message-helpers@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" - -postcss-minify-font-values@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" - dependencies: - object-assign "^4.0.1" - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-minify-gradients@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" - dependencies: - postcss "^5.0.12" - postcss-value-parser "^3.3.0" - -postcss-minify-params@^1.0.4: - version "1.2.2" - resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.2" - postcss-value-parser "^3.0.2" - uniqs "^2.0.0" - -postcss-minify-selectors@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" - dependencies: - alphanum-sort "^1.0.2" - has "^1.0.1" - postcss "^5.0.14" - postcss-selector-parser "^2.0.0" - -postcss-modules-extract-imports@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-scope@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" - dependencies: - css-selector-tokenizer "^0.7.0" - postcss "^6.0.1" - -postcss-modules-values@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" - dependencies: - icss-replace-symbols "^1.1.0" - postcss "^6.0.1" - -postcss-normalize-charset@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" - dependencies: - postcss "^5.0.5" - -postcss-normalize-url@^3.0.7: - version "3.0.8" - resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" - dependencies: - is-absolute-url "^2.0.0" - normalize-url "^1.4.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - -postcss-ordered-values@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.1" - -postcss-reduce-idents@^2.2.2: - version "2.4.0" - resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" - dependencies: - postcss "^5.0.4" - postcss-value-parser "^3.0.2" - -postcss-reduce-initial@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" - dependencies: - postcss "^5.0.4" - -postcss-reduce-transforms@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" - dependencies: - has "^1.0.1" - postcss "^5.0.8" - postcss-value-parser "^3.0.1" - -postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" - -postcss-svgo@^2.1.1: - version "2.1.6" - resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" - dependencies: - is-svg "^2.0.0" - postcss "^5.0.14" - postcss-value-parser "^3.2.3" - svgo "^0.7.0" - -postcss-unique-selectors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" - dependencies: - alphanum-sort "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" - -postcss-zindex@^2.0.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" - dependencies: - has "^1.0.1" - postcss "^5.0.4" - uniqs "^2.0.0" - -postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16: - version "5.2.17" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b" - dependencies: - chalk "^1.1.3" - js-base64 "^2.1.9" - source-map "^0.5.6" - supports-color "^3.2.3" - -postcss@^6.0.1: - version "6.0.11" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.11.tgz#f48db210b1d37a7f7ab6499b7a54982997ab6f72" - dependencies: - chalk "^2.1.0" - source-map "^0.5.7" - supports-color "^4.4.0" - -prepend-http@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -pretty-error@^2.0.2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" - dependencies: - renderkid "^2.0.1" - utila "~0.4" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -process@^0.11.0: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - dependencies: - asap "~2.0.3" - -prop-types@^15.5.6: - version "15.5.10" - resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -pure-render-decorator@^1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pure-render-decorator/-/pure-render-decorator-1.2.1.tgz#568870eeca17a1cee536b4fe94a3477fcd31eeb9" - dependencies: - fbjs "^0.8.0" - -q@^1.1.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" - -qs@~6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" - -query-string@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-3.0.3.tgz#ae2e14b4d05071d4e9b9eb4873c35b0dcd42e638" - dependencies: - strict-uri-encode "^1.0.0" - -query-string@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" - dependencies: - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -rc@^1.1.7: - version "1.2.1" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-addons-css-transition-group@15.0.2: - version "15.0.2" - resolved "https://registry.yarnpkg.com/react-addons-css-transition-group/-/react-addons-css-transition-group-15.0.2.tgz#8b0a4c296909ca70cdcce06fb254c204ea1f9721" - -react-addons-css-transition-group@^15.0.1: - version "15.6.0" - resolved "https://registry.yarnpkg.com/react-addons-css-transition-group/-/react-addons-css-transition-group-15.6.0.tgz#69887cf6e4874d25cd66e22a699e29f0d648aba0" - dependencies: - react-transition-group "^1.2.0" - -react-addons-shallow-compare@15.0.2: - version "15.0.2" - resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.0.2.tgz#d61242402f96840163e29206561da13175a6bf24" - -react-addons-shallow-compare@^15.0.1: - version "15.6.0" - resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.0.tgz#b7a4e5ff9f2704c20cf686dd8a05dd08b26de252" - dependencies: - fbjs "^0.8.4" - object-assign "^4.1.0" - -react-dom@15.0.2: - version "15.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.0.2.tgz#f8a20ac1bc2da9eb494fce3b44c3ec19d0951e27" - -react-redux@4.4.5: - version "4.4.5" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-4.4.5.tgz#f509a2981be2252d10c629ef7c559347a4aec457" - dependencies: - hoist-non-react-statics "^1.0.3" - invariant "^2.0.0" - lodash "^4.2.0" - loose-envify "^1.1.0" - -react-router-redux@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-4.0.4.tgz#335c7e50a12f67794c3d51a4630a444fa691c7e5" - -react-router@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-2.3.0.tgz#6d02385003c68ac8dd260243570897a0e0fe4ead" - dependencies: - history "^2.0.1" - invariant "^2.2.1" - warning "^2.1.0" - -react-transition-group@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.0.tgz#b51fc921b0c3835a7ef7c571c79fc82c73e9204f" - dependencies: - chain-function "^1.0.0" - dom-helpers "^3.2.0" - loose-envify "^1.3.1" - prop-types "^15.5.6" - warning "^3.0.0" - -react@15.0.2: - version "15.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-15.0.2.tgz#63b95dfda563018a20c182300651ed933e0dd30c" - dependencies: - fbjs "^0.8.0" - loose-envify "^1.1.0" - object-assign "^4.0.1" - -readable-stream@1.0: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.6: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -reduce-css-calc@^1.2.6: - version "1.3.0" - resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" - dependencies: - balanced-match "^0.4.2" - math-expression-evaluator "^1.2.14" - reduce-function-call "^1.0.1" - -reduce-function-call@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" - dependencies: - balanced-match "^0.4.2" - -redux-auth-wrapper@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/redux-auth-wrapper/-/redux-auth-wrapper-0.4.0.tgz#d781f0aeae92544257ba8c44afc1506037da94ef" - dependencies: - hoist-non-react-statics "1.0.5" - lodash.isempty "4.2.1" - -redux-logger@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-2.6.1.tgz#f558a40e3abd03feaf4e69ace4d71fec09803c74" - -redux-thunk@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.0.1.tgz#f0b31070fa1a243a4b19f904befdc2ee439aade9" - -redux@3.5.2: - version "3.5.2" - resolved "https://registry.yarnpkg.com/redux/-/redux-3.5.2.tgz#4533745e970b647ec26066a83aa30e9e26faf843" - dependencies: - lodash "^4.2.1" - lodash-es "^4.2.1" - loose-envify "^1.1.0" - symbol-observable "^0.2.3" - -regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" - -regex-cache@^0.4.2: - version "0.4.4" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" - dependencies: - is-equal-shallow "^0.1.3" - -regexpu-core@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - dependencies: - jsesc "~0.5.0" - -relateurl@0.2.x: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - -remove-trailing-separator@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - -renderkid@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.1.tgz#898cabfc8bede4b7b91135a3ffd323e58c0db319" - dependencies: - css-select "^1.1.0" - dom-converter "~0.1" - htmlparser2 "~3.3.0" - strip-ansi "^3.0.0" - utila "~0.3" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -request@^2.81.0: - version "2.81.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~4.2.1" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - qs "~6.4.0" - safe-buffer "^5.0.1" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -resolve@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" - dependencies: - path-parse "^1.0.5" - -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - dependencies: - through "~2.3.4" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - dependencies: - glob "^7.0.5" - -ripemd160@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" - -safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -sax@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - -semver@^5.3.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4, setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -sha.js@2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -sort-keys@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" - dependencies: - is-plain-obj "^1.0.0" - -source-list-map@^0.1.4, source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -source-map@~0.4.1: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -sshpk@^1.7.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.3.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.2.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string.prototype.trim@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.0" - function-bind "^1.0.2" - -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -style-loader@^0.13.1: - version "0.13.2" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.2.tgz#74533384cf698c7104c7951150b49717adc2f3bb" - dependencies: - loader-utils "^1.0.2" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.1.0, supports-color@^3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - -supports-color@^4.0.0, supports-color@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" - dependencies: - has-flag "^2.0.0" - -svgo@^0.7.0: - version "0.7.2" - resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" - dependencies: - coa "~1.0.1" - colors "~1.1.2" - csso "~2.3.1" - js-yaml "~3.7.0" - mkdirp "~0.5.1" - sax "~1.2.1" - whet.extend "~0.9.9" - -symbol-observable@^0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" - -tapable@^0.1.8, tapable@~0.1.8: - version "0.1.10" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" - -tape@^4.6.3: - version "4.8.0" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.8.0.tgz#f6a9fec41cc50a1de50fa33603ab580991f6068e" - dependencies: - deep-equal "~1.0.1" - defined "~1.0.0" - for-each "~0.3.2" - function-bind "~1.1.0" - glob "~7.1.2" - has "~1.0.1" - inherits "~2.0.3" - minimist "~1.2.0" - object-inspect "~1.3.0" - resolve "~1.4.0" - resumer "~0.0.0" - string.prototype.trim "~1.1.2" - through "~2.3.8" - -tar-pack@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -tether@^1.4: - version "1.4.0" - resolved "https://registry.yarnpkg.com/tether/-/tether-1.4.0.tgz#0f9fa171f75bf58485d8149e94799d7ae74d1c1a" - -through@~2.3.4, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -timers-browserify@^2.0.2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" - dependencies: - setimmediate "^1.0.4" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -toposort@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.3.tgz#f02cd8a74bd8be2fc0e98611c3bacb95a171869c" - -tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" - dependencies: - punycode "^1.4.1" - -tslib@^1.5.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -ua-parser-js@^0.7.9: - version "0.7.14" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" - -uglify-js@3.1.x: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.0.tgz#92fae17b88dfbc3c394175a935044cdbcf4085ae" - dependencies: - commander "~2.11.0" - source-map "~0.5.1" - -uglify-js@~2.7.3: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" - dependencies: - async "~0.2.6" - source-map "~0.5.1" - uglify-to-browserify "~1.0.0" - yargs "~3.10.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - -uniqid@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" - dependencies: - macaddress "^0.2.8" - -uniqs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" - -upper-case@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -utila@~0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226" - -utila@~0.4: - version "0.4.0" - resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" - -uuid@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" - -vendors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -warning@^2.0.0, warning@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/warning/-/warning-2.1.0.tgz#21220d9c63afc77a8c92111e011af705ce0c6901" - dependencies: - loose-envify "^1.0.0" - -warning@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" - dependencies: - loose-envify "^1.0.0" - -watchpack@^0.2.1: - version "0.2.9" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-0.2.9.tgz#62eaa4ab5e5ba35fdfc018275626e3c0f5e3fb0b" - dependencies: - async "^0.9.0" - chokidar "^1.0.0" - graceful-fs "^4.1.2" - -webpack-core@~0.6.9: - version "0.6.9" - resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - -webpack-sources@^0.1.0: - version "0.1.5" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750" - dependencies: - source-list-map "~0.1.7" - source-map "~0.5.3" - -webpack@^1.13.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-1.15.0.tgz#4ff31f53db03339e55164a9d468ee0324968fe98" - dependencies: - acorn "^3.0.0" - async "^1.3.0" - clone "^1.0.2" - enhanced-resolve "~0.9.0" - interpret "^0.6.4" - loader-utils "^0.2.11" - memory-fs "~0.3.0" - mkdirp "~0.5.0" - node-libs-browser "^0.7.0" - optimist "~0.6.0" - supports-color "^3.1.0" - tapable "~0.1.8" - uglify-js "~2.7.3" - watchpack "^0.2.1" - webpack-core "~0.6.9" - -whatwg-fetch@>=0.10.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" - -whet.extend@~0.9.9: - version "0.9.9" - resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" - -wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" - dependencies: - string-width "^1.0.2" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -xml-char-classes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" diff --git a/cmd/root.go b/cmd/root.go index 5fe563583..0a1b0f88c 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,4 +1,4 @@ -// Copyright 2017 Palantir Technologies, Inc. +// Copyright 2018 Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,48 +15,25 @@ package cmd import ( - "os" - - "github.com/pkg/errors" - log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "github.com/spf13/viper" - - "github.com/palantir/bulldozer/version" ) -var ( - cfgFile string - versionFlag bool -) +var rootConfig struct { + Debug bool +} -var RootCmd = &cobra.Command{ - Use: "bulldozer", - Short: "Auto merge bot", - Long: "Bot that merges pull requests when they are green and reviewed", - PersistentPreRun: func(cmd *cobra.Command, args []string) { - if versionFlag { - log.Info(version.Version()) - os.Exit(0) - } - }, - RunE: func(cmd *cobra.Command, args []string) error { - return errors.New("No command provided") - }, +func IsDebugMode() bool { + return rootConfig.Debug } -func Execute() { - if err := RootCmd.Execute(); err != nil { - os.Exit(-1) - } +// RootCmd represents the base command when called without any subcommands +var RootCmd = &cobra.Command{ + Use: "bulldozer", + Short: "A bot for auto-merging PRs when all status checks are green and the PR is reviewed", + Long: "A bot for auto-merging PRs when all status checks are green and the PR is reviewed", + SilenceUsage: true, } func init() { - RootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "bulldozer.yml", "config file") - err := viper.BindPFlag("verbose", RootCmd.PersistentFlags().Lookup("verbose")) - if err != nil { - log.Fatal(errors.Wrap(err, "Cannot bind verbose flag")) - } - - RootCmd.PersistentFlags().BoolVar(&versionFlag, "version", false, "Print version and exit") + RootCmd.PersistentFlags().BoolVarP(&rootConfig.Debug, "debug", "d", false, "enables debug output") } diff --git a/cmd/server.go b/cmd/server.go index 4d858f909..5043fa6ad 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -1,4 +1,4 @@ -// Copyright 2017 Palantir Technologies, Inc. +// Copyright 2018 Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,56 +16,68 @@ package cmd import ( "io/ioutil" + "os" - log "github.com/sirupsen/logrus" + "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/spf13/viper" - "github.com/palantir/bulldozer/auth" "github.com/palantir/bulldozer/server" - "github.com/palantir/bulldozer/server/config" ) -var serverCmd = &cobra.Command{ +var serverCmdConfig struct { + Path string +} + +var ServerCmd = &cobra.Command{ Use: "server", - Short: "Run Bulldozer as a server", - Long: "Run Bulldozer in server mode, the only mode.", - Run: func(cmd *cobra.Command, args []string) { - data, err := ioutil.ReadFile(cfgFile) - if err != nil { - log.Fatalf("Cannot read config file: %+v", err) - } - startup, err := config.Parse(data) - if err != nil { - log.Fatalf("Failed to parse config file: %+v", err) - } - - config.Instance = startup - - if startup.LogLevel() == log.DebugLevel { - cmd.DebugFlags() - viper.Debug() - } - - log.SetFormatter(&log.JSONFormatter{}) - db, err := server.InitDB(startup.Database) - if err != nil { - log.Fatalf("Cannot init db: %+v", err) - } - - auth.InitGithubAuth(startup.Github) - - srv := server.New(db, startup) - if err := srv.SetupSessionStore(); err != nil { - log.Fatal("Cannot setup session store") - } - - if err := srv.Start(); err != nil { - log.Fatal(err) - } - }, + Short: "Runs bulldozer in server mode.", + Long: "Runs bulldozer in a long-running server mode, automatically merging pull requests that meet certain conditions.", + + RunE: serverCmd, +} + +func readServerConfig(cfgFile string) (*server.Config, error) { + fi, err := os.Stat(cfgFile) + if err != nil { + return nil, errors.Wrapf(err, "failed fetching server config file: %s", cfgFile) + } + if os.IsNotExist(err) { + return nil, errors.Wrapf(err, "server config file does not exist: %s", cfgFile) + } + if !fi.Mode().IsRegular() { + return nil, errors.New("server config file is not a regular file: " + cfgFile) + } + + var bytes []byte + bytes, err = ioutil.ReadFile(cfgFile) + if err != nil { + return nil, errors.Wrapf(err, "failed reading server config file: %s", cfgFile) + } + + cfg, err := server.ParseConfig(bytes) + if err != nil { + return nil, errors.Wrapf(err, "failed parsing server config") + } + + return cfg, nil +} + +func serverCmd(cmd *cobra.Command, args []string) error { + cfg, err := readServerConfig(serverCmdConfig.Path) + if err != nil { + return errors.Wrapf(err, "failed to read server config") + } + + s, err := server.New(cfg) + if err != nil { + return err + } + + return errors.Wrap(s.Start(), "server terminated") } func init() { - RootCmd.AddCommand(serverCmd) + RootCmd.AddCommand(ServerCmd) + + ServerCmd.Flags().StringVarP(&serverCmdConfig.Path, "config", "c", "config/bulldozer.yml", "configuration file for bulldozer") } diff --git a/config/bulldozer.example.yml b/config/bulldozer.example.yml new file mode 100644 index 000000000..fbf07bb00 --- /dev/null +++ b/config/bulldozer.example.yml @@ -0,0 +1,48 @@ +# Options for the http server +server: + # The listen address and port + address: "0.0.0.0" + port: 8080 + +# Options for logging output +logging: + # If true, logs are printed in human-readable form. We recommend using + # "false" to output JSON-formatted logs in production + text: false + + # Set a minimum logging level threshold + # Choose from: debug, info, warn, error + level: debug + +# Options for connecting to GitHub +github: + # The URL of the GitHub homepage + web_url: "https://github.com" + # The base URL for v3 (REST) API requests + v3_api_url: "https://api.github.com" + app: + # The integration ID of the GitHub app + integration_id: 1 + # A random string used to validate webhooks + webhook_secret: "app_secret" + # The private key of the GitHub app + private_key: "app_private_key" + +# Options for application behavior +options: + # The path within repositories to find the bulldozer.yml config file + configuration_path: .bulldozer.yml + # The name of the application. This will affect the User-Agent header + # when making requests to Github. + app_name: bulldozer + +# Optional configuration to emit metrics to datadog +datadog: + # Database endpoint + address: "127.0.0.1:8125" + # The metric flush frequency. Accepts any string + # parseable by https://golang.org/pkg/time/#ParseDuration + interval: "10s" + # Tags to include + tags: + - "bulldozer" diff --git a/config/examples/standard.bulldozer.v1.yml b/config/examples/standard.bulldozer.v1.yml new file mode 100644 index 000000000..d579eda5e --- /dev/null +++ b/config/examples/standard.bulldozer.v1.yml @@ -0,0 +1,18 @@ +version: 1 + +merge: + whitelist: + labels: ["merge when ready"] + comment_substrings: ["==MERGE_WHEN_READY=="] + blacklist: + labels: ["do not merge"] + comment_substrings: ["==DO_NOT_MERGE=="] + method: squash + options: + squash: + body: summarize_commits + delete_after_merge: true + +update: + whitelist: + labels: ["wip", "update me"] diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..6260dca5d --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,12 @@ +FROM scratch + +STOPSIGNAL SIGINT + +# add static files +COPY ca-certificates.crt /etc/ssl/certs/ + +# add application files +COPY bulldozer / + +ENTRYPOINT ["build/linux-amd64/bulldozer"] +CMD ["server", "--config", "/secrets/bulldozer.yml"] diff --git a/docker/ca-certificates.crt b/docker/ca-certificates.crt new file mode 100644 index 000000000..ee25bee11 --- /dev/null +++ b/docker/ca-certificates.crt @@ -0,0 +1,3314 @@ +## +## Bundle of CA Root Certificates +## +## Certificate data from Mozilla as of: Wed Jun 20 03:12:06 2018 GMT +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt +## +## It contains the certificates in PEM format and therefore +## can be directly used with curl / libcurl / php_curl, or with +## an Apache+mod_ssl webserver for SSL client authentication. +## Just configure this file as the SSLCACertificateFile. +## +## Conversion done with mk-ca-bundle.pl version 1.27. +## SHA256: c80f571d9f4ebca4a91e0ad3a546f263153d71afffc845c6f8f52ce9d1a2e8ec +## + + +GlobalSign Root CA +================== +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx +GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds +b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV +BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD +VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa +DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc +THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb +Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP +c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX +gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF +AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj +Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG +j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH +hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC +X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +GlobalSign Root CA - R2 +======================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 +ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp +s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN +S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL +TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C +ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i +YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN +BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp +9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu +01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7 +9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 +TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 +EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc +cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw +EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj +055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f +j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC +/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 +xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa +t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp +bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx +NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl +MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u +ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL +Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr +hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW +nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi +VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ +KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy +T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf +zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT +J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e +nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE +ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li +ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC +SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs +dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME +uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB +UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C +G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 +XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr +l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI +VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB +BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh +cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 +hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa +Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H +RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +AddTrust External Root +====================== +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD +VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw +NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU +cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg +Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821 ++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw +Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo +aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy +2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7 +7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P +BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL +VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk +VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB +IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl +j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 +e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u +G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- + +Entrust Root Certification Authority +==================================== +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw +b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG +A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 +MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu +MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu +Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v +dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz +A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww +Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 +j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN +rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 +MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH +hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA +A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM +Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa +v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS +W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 +tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 +-----END CERTIFICATE----- + +GeoTrust Global CA +================== +-----BEGIN CERTIFICATE----- +MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK +Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw +MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j +LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo +BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet +8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc +T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU +vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk +DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q +zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 +d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 +mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p +XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm +Mw== +-----END CERTIFICATE----- + +GeoTrust Universal CA +===================== +-----BEGIN CERTIFICATE----- +MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 +MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu +Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t +JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e +RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs +7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d +8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V +qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga +Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB +Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu +KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08 +ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0 +XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB +hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc +aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2 +qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL +oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK +xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF +KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 +DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK +xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU +p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI +P/rmMuGNG2+k5o7Y+SlIis5z/iw= +-----END CERTIFICATE----- + +GeoTrust Universal CA 2 +======================= +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 +MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg +SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 +DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 +j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q +JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a +QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2 +WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP +20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn +ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC +SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG +8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2 ++/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E +BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z +dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ +4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+ +mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq +A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg +Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP +pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d +FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp +gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm +X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS +-----END CERTIFICATE----- + +Visa eCommerce Root +=================== +-----BEGIN CERTIFICATE----- +MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG +EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug +QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2 +WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm +VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv +bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL +F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b +RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0 +TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI +/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs +GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG +MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc +CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW +YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz +zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu +YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt +398znM/jra6O1I7mT1GvFpLgXPYHDw== +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw +MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl +c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV +BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG +C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs +i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW +Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH +Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK +Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f +BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl +cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz +LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm +7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z +8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C +12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +QuoVadis Root CA +================ +-----BEGIN CERTIFICATE----- +MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE +ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz +MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp +cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD +EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk +J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL +F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL +YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen +AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w +PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y +ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7 +MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj +YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs +ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh +Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW +Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu +BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw +FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6 +tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo +fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul +LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x +gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi +5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi +5nrQNiOKSnQ2+Q== +-----END CERTIFICATE----- + +QuoVadis Root CA 2 +================== +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx +ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 +XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk +lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB +lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy +lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt +66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn +wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh +D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy +BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie +J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud +DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU +a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT +ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv +Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 +UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm +VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK ++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW +IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 +WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X +f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II +4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 +VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u +-----END CERTIFICATE----- + +QuoVadis Root CA 3 +================== +-----BEGIN CERTIFICATE----- +MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx +OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg +DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij +KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K +DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv +BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp +p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 +nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX +MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM +Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz +uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT +BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj +YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 +aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB +BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD +VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 +ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE +AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV +qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s +hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z +POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 +Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp +8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC +bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu +g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p +vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr +qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +Security Communication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw +8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM +DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX +5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd +DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 +JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g +0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a +mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ +s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ +6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi +FL39vmwLAw== +-----END CERTIFICATE----- + +Sonera Class 2 Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG +U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw +NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh +IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 +/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT +dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG +f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P +tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH +nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT +XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt +0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI +cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph +Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx +EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH +llpwrN9M +-----END CERTIFICATE----- + +XRamp Global CA Root +==================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE +BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj +dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx +HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg +U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu +IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx +foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE +zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs +AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry +xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap +oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC +AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc +/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt +qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n +nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz +8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= +-----END CERTIFICATE----- + +Go Daddy Class 2 CA +=================== +-----BEGIN CERTIFICATE----- +MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY +VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG +A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g +RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD +ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv +2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 +qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j +YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY +vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O +BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o +atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu +MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG +A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim +PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt +I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI +Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b +vZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc +U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo +MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG +A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG +SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY +bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ +JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm +epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN +F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF +MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f +hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo +bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs +afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM +PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD +KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 +QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +Taiwan GRCA +=========== +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG +EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X +DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv +dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN +w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 +BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O +1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO +htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov +J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 +Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t +B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB +O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8 +lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV +HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2 +09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ +TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj +Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 +Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU +D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz +DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk +Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk +7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ +CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy ++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS +-----END CERTIFICATE----- + +DigiCert Assured ID Root CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx +MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO +9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy +UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW +/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy +oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf +GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF +66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq +hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc +EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn +SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i +8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +DigiCert Global Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw +MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn +TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 +BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H +4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y +7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB +o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm +8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF +BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr +EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt +tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 +UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +DigiCert High Assurance EV Root CA +================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw +KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw +MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ +MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu +Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t +Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS +OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 +MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ +NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe +h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB +Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY +JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ +V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp +myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK +mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K +-----END CERTIFICATE----- + +Certplus Class 2 Primary CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE +BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN +OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy +dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR +5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ +Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO +YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e +e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME +CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ +YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t +L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD +P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R +TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+ +7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW +//1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7 +l7+ijrRU +-----END CERTIFICATE----- + +DST Root CA X3 +============== +-----BEGIN CERTIFICATE----- +MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK +ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X +DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1 +cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT +rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9 +UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy +xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d +utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ +MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug +dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE +GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw +RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS +fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE----- + +SwissSign Gold CA - G2 +====================== +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw +EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN +MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp +c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq +t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C +jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg +vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF +ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR +AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend +jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO +peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR +7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi +GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 +OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov +L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm +5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr +44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf +Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m +Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp +mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk +vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf +KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br +NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj +viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +SwissSign Silver CA - G2 +======================== +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X +DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 +aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 +N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm ++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH +6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu +MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h +qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 +FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs +ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc +celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X +CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB +tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 +cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P +4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F +kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L +3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx +/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa +DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP +e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu +WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ +DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub +DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG +EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ +cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN +b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 +nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge +RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt +tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI +hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K +Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN +NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa +Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG +1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= +-----END CERTIFICATE----- + +thawte Primary Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3 +MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg +SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv +KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT +FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs +oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ +1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc +q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K +aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p +afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF +AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE +uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX +xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 +jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH +z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G5 +============================================================ +-----BEGIN CERTIFICATE----- +MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB +yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln +biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh +dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt +YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz +j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD +Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/ +Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r +fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/ +BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv +Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy +aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG +SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+ +X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE +KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC +Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE +ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq +-----END CERTIFICATE----- + +SecureTrust CA +============== +-----BEGIN CERTIFICATE----- +MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy +dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe +BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX +OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t +DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH +GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b +01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH +ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj +aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu +SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf +mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ +nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR +3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= +-----END CERTIFICATE----- + +Secure Global CA +================ +-----BEGIN CERTIFICATE----- +MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH +bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg +MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg +Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx +YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ +bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g +8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV +HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi +0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn +oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA +MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ +OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn +CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 +3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc +f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +COMODO Certification Authority +============================== +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb +MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD +T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH ++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww +xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV +4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA +1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI +rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k +b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC +AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP +OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ +RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc +IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN ++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== +-----END CERTIFICATE----- + +Network Solutions Certificate Authority +======================================= +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG +EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr +IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx +MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu +MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx +jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT +aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT +crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc +/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB +AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv +bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA +A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q +4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ +GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv +wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD +ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey +-----END CERTIFICATE----- + +COMODO ECC Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix +GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X +4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni +wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG +FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA +U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GA CA +=============================== +-----BEGIN CERTIFICATE----- +MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE +BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG +A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH +bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD +VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw +IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 +IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 +Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg +Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD +d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ +/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R +LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm +MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 ++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa +hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY +okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= +-----END CERTIFICATE----- + +Certigna +======== +-----BEGIN CERTIFICATE----- +MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw +EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 +MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI +Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q +XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH +GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p +ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg +DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf +Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ +tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ +BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J +SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA +hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ +ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu +PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY +1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== +-----END CERTIFICATE----- + +Deutsche Telekom Root CA 2 +========================== +-----BEGIN CERTIFICATE----- +MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT +RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG +A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5 +MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G +A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS +b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5 +bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI +KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY +AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK +Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV +jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV +HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr +E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy +zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8 +rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G +dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU +Cm26OWMohpLzGITY+9HPBVZkVw== +-----END CERTIFICATE----- + +Cybertrust Global Root +====================== +-----BEGIN CERTIFICATE----- +MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li +ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 +MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD +ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA ++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW +0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL +AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin +89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT +8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 +MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G +A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO +lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi +5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 +hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T +X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW +WL1WMRJOEcgh4LMRkWXbtKaIOM5V +-----END CERTIFICATE----- + +ePKI Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG +EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg +Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx +MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq +MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs +IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi +lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv +qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX +12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O +WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ +ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao +lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ +vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi +Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi +MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH +ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 +1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq +KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV +xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP +NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r +GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE +xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx +gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy +sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD +BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= +-----END CERTIFICATE----- + +certSIGN ROOT CA +================ +-----BEGIN CERTIFICATE----- +MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD +VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa +Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE +CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I +JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH +rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 +ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD +0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 +AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B +Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB +AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 +SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 +x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt +vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz +TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G3 +============================================= +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE +BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 +IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz +NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo +YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT +LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j +K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE +c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C +IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu +dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr +2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 +cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE +Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD +AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s +t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt +-----END CERTIFICATE----- + +thawte Primary Root CA - G2 +=========================== +-----BEGIN CERTIFICATE----- +MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC +VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu +IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg +Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV +MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG +b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt +IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS +LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 +8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU +mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN +G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K +rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== +-----END CERTIFICATE----- + +thawte Primary Root CA - G3 +=========================== +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w +ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh +d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD +VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG +A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At +P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC ++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY +7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW +vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ +KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK +A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu +t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC +8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm +er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G2 +============================================= +-----BEGIN CERTIFICATE----- +MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu +Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 +OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg +MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl +b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG +BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc +KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ +EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m +ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 +npaqBA+K +-----END CERTIFICATE----- + +VeriSign Universal Root Certification Authority +=============================================== +-----BEGIN CERTIFICATE----- +MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj +1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP +MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72 +9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I +AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR +tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G +CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O +a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud +DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 +Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx +Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx +P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P +wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 +mJO37M2CYfE45k+XmCpajQ== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G4 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC +VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 +b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz +ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU +cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo +b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 +Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz +rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw +HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u +Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD +A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx +AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== +-----END CERTIFICATE----- + +NetLock Arany (Class Gold) Főtanúsítvány +======================================== +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G +A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 +dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB +cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx +MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO +ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv +biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 +c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu +0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw +/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk +H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw +fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 +neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW +qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta +YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC +bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna +NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu +dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G2 +================================== +-----BEGIN CERTIFICATE----- +MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ +5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn +vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj +CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil +e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR +OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI +CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65 +48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi +trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737 +qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB +AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC +ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV +HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA +A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz ++51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj +f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN +kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk +CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF +URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb +CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h +oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV +IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm +66+KAQ== +-----END CERTIFICATE----- + +Hongkong Post Root CA 1 +======================= +-----BEGIN CERTIFICATE----- +MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT +DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx +NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n +IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 +ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr +auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh +qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY +V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV +HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i +h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio +l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei +IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps +T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT +c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== +-----END CERTIFICATE----- + +SecureSign RootCA11 +=================== +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi +SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS +b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw +KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 +cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL +TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO +wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq +g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP +O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA +bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX +t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh +OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r +bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ +Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 +y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 +lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER +MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv +c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o +dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE +BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt +U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA +fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG +0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA +pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm +1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC +AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf +QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE +FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o +lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX +I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 +yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi +LXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +GlobalSign Root CA - R3 +======================= +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt +iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ +0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 +rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl +OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 +xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 +lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 +EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E +bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 +YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r +kpeDMdmztcpHWD9f +-----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB +NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD +Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P +B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY +7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH +ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI +plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX +MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX +LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK +bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU +vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud +EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH +DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp +cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA +bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx +ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx +51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk +R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP +T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f +Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl +osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR +crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR +saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD +KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi +6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +-----END CERTIFICATE----- + +Izenpe.com +========== +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG +EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz +MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu +QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ +03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK +ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU ++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC +PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT +OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK +F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK +0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ +0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB +leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID +AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ +SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG +NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx +MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l +Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga +kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q +hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs +g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 +aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 +nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC +ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo +Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z +WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +Chambers of Commerce Root - 2008 +================================ +-----BEGIN CERTIFICATE----- +MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy +Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl +ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF +EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl +cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA +XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj +h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/ +ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk +NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g +D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331 +lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ +0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj +ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2 +EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI +G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ +BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh +bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh +bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC +CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH +AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1 +wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH +3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU +RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6 +M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1 +YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF +9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK +zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG +nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg +OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ +-----END CERTIFICATE----- + +Global Chambersign Root - 2008 +============================== +-----BEGIN CERTIFICATE----- +MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx +NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg +Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ +QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD +aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf +VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf +XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0 +ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB +/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA +TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M +H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe +Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF +HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh +wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB +AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT +BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE +BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm +aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm +aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp +1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0 +dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG +/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6 +ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s +dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg +9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH +foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du +qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr +P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq +c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z +09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B +-----END CERTIFICATE----- + +Go Daddy Root Certificate Authority - G2 +======================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu +MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G +A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq +9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD ++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd +fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl +NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 +BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac +vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r +5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV +N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 +-----END CERTIFICATE----- + +Starfield Root Certificate Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 +eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw +DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg +VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB +dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv +W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs +bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk +N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf +ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU +JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol +TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx +4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw +F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K +pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ +c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +Starfield Services Root Certificate Authority - G2 +================================================== +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl +IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV +BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT +dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg +Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 +h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa +hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP +LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB +rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG +SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP +E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy +xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd +iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza +YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 +-----END CERTIFICATE----- + +AffirmTrust Commercial +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw +MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb +DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV +C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 +BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww +MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV +HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG +hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi +qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv +0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh +sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +AffirmTrust Networking +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw +MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE +Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI +dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 +/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb +h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV +HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu +UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 +12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 +WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 +/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= +-----END CERTIFICATE----- + +AffirmTrust Premium +=================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy +OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy +dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn +BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV +5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs ++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd +GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R +p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI +S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 +6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 +/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo ++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv +MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg +Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC +6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S +L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK ++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV +BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg +IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 +g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb +zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== +-----END CERTIFICATE----- + +AffirmTrust Premium ECC +======================= +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV +BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx +MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U +cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ +N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW +BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK +BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X +57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM +eQ== +-----END CERTIFICATE----- + +Certum Trusted Network CA +========================= +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK +ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy +MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU +ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC +l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J +J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 +fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 +cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB +Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw +DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj +jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 +mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj +Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI +03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= +-----END CERTIFICATE----- + +TWCA Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ +VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG +EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB +IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx +QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC +oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP +4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r +y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB +BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG +9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC +mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW +QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY +T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny +Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw== +-----END CERTIFICATE----- + +Security Communication RootCA2 +============================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC +SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy +aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++ ++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R +3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV +spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K +EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8 +QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB +CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj +u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk +3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q +tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29 +mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- + +EC-ACC +====== +-----BEGIN CERTIFICATE----- +MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE +BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w +ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD +VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE +CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT +BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7 +MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt +SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl +Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh +cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK +w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT +ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4 +HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a +E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw +0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD +VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0 +Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l +dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ +lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa +Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe +l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2 +E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D +5EI= +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2011 +======================================================= +-----BEGIN CERTIFICATE----- +MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT +O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y +aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT +AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z +IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo +IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI +1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa +71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u +8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH +3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/ +MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8 +MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu +b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt +XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8 +TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD +/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N +7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4 +-----END CERTIFICATE----- + +Actalis Authentication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM +BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE +AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky +MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz +IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290 +IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ +wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa +by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6 +zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f +YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2 +oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l +EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7 +hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8 +EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5 +jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY +iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt +ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI +WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0 +JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx +K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+ +Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC +4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo +2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz +lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem +OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9 +vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg== +-----END CERTIFICATE----- + +Trustis FPS Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG +EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290 +IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV +BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ +RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk +H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa +cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt +o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA +AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd +BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c +GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC +yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P +8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV +l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl +iB6XzCGcKQENZetX2fNXlrtIzYE= +-----END CERTIFICATE----- + +Buypass Class 2 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X +DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1 +g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn +9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b +/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU +CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff +awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI +zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn +Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX +Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs +M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s +A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI +osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S +aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd +DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD +LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0 +oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC +wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS +CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN +rJgWVqA= +-----END CERTIFICATE----- + +Buypass Class 3 Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X +DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1 +eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH +sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR +5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh +7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ +ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH +2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV +/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ +RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA +Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq +j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD +VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF +AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV +cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G +uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG +Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8 +ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2 +KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz +6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug +UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe +eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi +Cp/HuZc= +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 3 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx +MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK +9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU +NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF +iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W +0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr +AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb +fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT +ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h +P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml +e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw== +-----END CERTIFICATE----- + +EE Certification Centre Root CA +=============================== +-----BEGIN CERTIFICATE----- +MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG +EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy +dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw +MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB +UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy +ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB +DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM +TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2 +rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw +93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN +P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ +MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF +BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj +xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM +lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u +uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU +3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM +dcGWxZ0= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe +Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE +LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD +ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA +BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv +KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z +p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC +AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ +4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y +eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw +MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G +PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw +OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm +2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 +o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV +dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph +X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 EV 2009 +================================= +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS +egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh +zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T +7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 +sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 +11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv +cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v +ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El +MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp +b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh +c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ +PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 +nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX +ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA +NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv +w9y4AyHqnxbxLFS1 +-----END CERTIFICATE----- + +CA Disig Root R2 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp +ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx +EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp +c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC +w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia +xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 +A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S +GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV +g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa +5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE +koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A +Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i +Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u +Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM +tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV +sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je +dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 +1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx +mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 +utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 +sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg +UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV +7+ZtsH8tZ/3zbBt1RqPlShfppNcL +-----END CERTIFICATE----- + +ACCVRAIZ1 +========= +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB +SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 +MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH +UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM +jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 +RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD +aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ +0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG +WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 +8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR +5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J +9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK +Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw +Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu +Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 +VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM +Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA +QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh +AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA +YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj +AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA +IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk +aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 +dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 +MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI +hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E +R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN +YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 +nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ +TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 +sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h +I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg +Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd +3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p +EfbRD0tVNEYqi4Y7 +-----END CERTIFICATE----- + +TWCA Global Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT +CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD +QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK +EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg +Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C +nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV +r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR +Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV +tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W +KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 +sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p +yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn +kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI +zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g +cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn +LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M +8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg +/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg +lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP +A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m +i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 +EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 +zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= +-----END CERTIFICATE----- + +TeliaSonera Root CA v1 +====================== +-----BEGIN CERTIFICATE----- +MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE +CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 +MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW +VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ +6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA +3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k +B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn +Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH +oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 +F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ +oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 +gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc +TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB +AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW +DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm +zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx +0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW +pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV +G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc +c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT +JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 +qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 +Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems +WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= +-----END CERTIFICATE----- + +E-Tugra Certification Authority +=============================== +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w +DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls +ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN +ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw +NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx +QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl +cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD +DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd +hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K +CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g +ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ +BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 +E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz +rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq +jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn +rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 +dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB +/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG +MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK +kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO +XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 +VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo +a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc +dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV +KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT +Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 +8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G +C7TbO6Orb1wdtn7os4I07QZcJA== +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 2 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx +MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ +SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F +vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 +2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV +WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy +YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 +r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf +vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR +3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN +9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== +-----END CERTIFICATE----- + +Atos TrustedRoot 2011 +===================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU +cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 +MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG +A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV +hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr +54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ +DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 +HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR +z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R +l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ +bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h +k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh +TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 +61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G +3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed +-----END CERTIFICATE----- + +QuoVadis Root CA 1 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE +PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm +PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 +Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN +ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l +g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV +7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX +9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f +iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg +t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI +hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC +MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 +GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct +Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP ++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh +3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa +wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 +O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 +FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV +hMJKzRwuJIczYOXD +-----END CERTIFICATE----- + +QuoVadis Root CA 2 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh +ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY +NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t +oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o +MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l +V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo +L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ +sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD +6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh +lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI +hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K +pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 +x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz +dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X +U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw +mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD +zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN +JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr +O3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + +QuoVadis Root CA 3 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 +IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL +Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe +6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 +I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U +VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 +5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi +Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM +dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt +rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI +hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px +KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS +t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ +TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du +DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib +Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD +hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX +0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW +dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 +PpxxVJkES/1Y+Zj0 +-----END CERTIFICATE----- + +DigiCert Assured ID Root G2 +=========================== +-----BEGIN CERTIFICATE----- +MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw +MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH +35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq +bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw +VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP +YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn +lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO +w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv +0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz +d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW +hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M +jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo +IhNzbM8m9Yop5w== +-----END CERTIFICATE----- + +DigiCert Assured ID Root G3 +=========================== +-----BEGIN CERTIFICATE----- +MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD +VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ +BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb +RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs +KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF +UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy +YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy +1vUhZscv6pZjamVFkpUBtA== +-----END CERTIFICATE----- + +DigiCert Global Root G2 +======================= +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx +MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ +kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO +3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV +BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM +UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB +o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu +5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr +F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U +WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH +QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ +iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl +MrY= +-----END CERTIFICATE----- + +DigiCert Global Root G3 +======================= +-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD +VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw +MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k +aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C +AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O +YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp +Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y +3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 +VOKa5Vt8sycX +-----END CERTIFICATE----- + +DigiCert Trusted Root G4 +======================== +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw +HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G +CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp +pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o +k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa +vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY +QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 +MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm +mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 +f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH +dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 +oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD +ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY +ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr +yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy +7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah +ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN +5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb +/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa +5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK +G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP +82Z+ +-----END CERTIFICATE----- + +COMODO RSA Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn +dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ +FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ +5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG +x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX +2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL +OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 +sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C +GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 +WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E +FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt +rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ +nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg +tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW +sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp +pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA +zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq +ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 +7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I +LaZRfyHBNVOFBkpdn627G190 +-----END CERTIFICATE----- + +USERTrust RSA Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz +0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j +Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn +RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O ++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq +/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE +Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM +lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 +yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ +eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd +BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW +FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ +7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ +Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM +8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi +FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi +yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c +J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw +sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx +Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 +-----END CERTIFICATE----- + +USERTrust ECC Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 +0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez +nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV +HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB +HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu +9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R4 +=========================== +-----BEGIN CERTIFICATE----- +MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl +OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P +AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV +MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF +JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R5 +=========================== +-----BEGIN CERTIFICATE----- +MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 +SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS +h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx +uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 +yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G3 +================================== +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y +olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t +x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy +EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K +Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur +mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5 +1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp +07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo +FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE +41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB +AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu +yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD +U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq +KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1 +v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA +8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b +8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r +mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq +1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI +JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV +tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk= +-----END CERTIFICATE----- + +Staat der Nederlanden EV Root CA +================================ +-----BEGIN CERTIFICATE----- +MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M +MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl +cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk +SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW +O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r +0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 +Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV +XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr +08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV +0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd +74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx +fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa +ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI +eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu +c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq +5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN +b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN +f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi +5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 +WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK +DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy +eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== +-----END CERTIFICATE----- + +IdenTrust Commercial Root CA 1 +============================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS +b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES +MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB +IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld +hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ +mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi +1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C +XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl +3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy +NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV +WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg +xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix +uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI +hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH +6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg +ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt +ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV +YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX +feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro +kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe +2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz +Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R +cGzM7vRX+Bi6hG6H +-----END CERTIFICATE----- + +IdenTrust Public Sector Root CA 1 +================================= +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv +ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV +UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS +b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy +P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 +Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI +rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf +qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS +mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn +ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh +LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v +iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL +4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B +Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw +DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj +t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A +mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt +GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt +m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx +NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 +Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI +ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC +ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ +3Wl9af0AVqW3rLatt8o+Ae+c +-----END CERTIFICATE----- + +Entrust Root Certification Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy +bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug +b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw +HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT +DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx +OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s +eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP +/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz +HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU +s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y +TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx +AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 +0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z +iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ +Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi +nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ +vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO +e4pIb4tF9g== +-----END CERTIFICATE----- + +Entrust Root Certification Authority - EC1 +========================================== +-----BEGIN CERTIFICATE----- +MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx +FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn +YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl +ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw +FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs +LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg +dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt +IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy +AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef +9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h +vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 +kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G +-----END CERTIFICATE----- + +CFCA EV ROOT +============ +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE +CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB +IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw +MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD +DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV +BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD +7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN +uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW +ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 +xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f +py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K +gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol +hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ +tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf +BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB +/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB +ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q +ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua +4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG +E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX +BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn +aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy +PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX +kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C +ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su +-----END CERTIFICATE----- + +Certinomis - Root CA +==================== +-----BEGIN CERTIFICATE----- +MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK +Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg +LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx +EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD +ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos +P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo +d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap +z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00 +8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x +RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE +6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t +FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV +PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH +i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj +YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I +6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF +AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV +WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw +Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX +lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ +y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9 +Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng +DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi +I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM +cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr +hkIGuUE= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GB CA +=============================== +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG +EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl +ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw +MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD +VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds +b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX +scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP +rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk +9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o +Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg +GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI +hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD +dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 +VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui +HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic +Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= +-----END CERTIFICATE----- + +SZAFIR ROOT CA2 +=============== +-----BEGIN CERTIFICATE----- +MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG +A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV +BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ +BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD +VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q +qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK +DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE +2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ +ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi +ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P +AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC +AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5 +O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67 +oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul +4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6 ++/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw== +-----END CERTIFICATE----- + +Certum Trusted Network CA 2 +=========================== +-----BEGIN CERTIFICATE----- +MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE +BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1 +bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y +ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ +TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB +IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9 +7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o +CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b +Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p +uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130 +GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ +9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB +Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye +hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM +BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI +hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW +Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA +L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo +clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM +pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb +w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo +J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm +ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX +is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7 +zAYspsbiDrW5viSP +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions RootCA 2015 +======================================================= +-----BEGIN CERTIFICATE----- +MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT +BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0 +aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl +YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx +MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg +QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV +BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw +MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv +bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh +iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+ +6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd +FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr +i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F +GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2 +fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu +iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc +Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI +hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+ +D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM +d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y +d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn +82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb +davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F +Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt +J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa +JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q +p/UsQu0yrbYhnr68 +-----END CERTIFICATE----- + +Hellenic Academic and Research Institutions ECC RootCA 2015 +=========================================================== +-----BEGIN CERTIFICATE----- +MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0 +aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u +cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj +aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw +MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj +IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD +VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290 +Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP +dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK +Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA +GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn +dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR +-----END CERTIFICATE----- + +Certplus Root CA G1 +=================== +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgISESBVg+QtPlRWhS2DN7cs3EYRMA0GCSqGSIb3DQEBDQUAMD4xCzAJBgNV +BAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTAe +Fw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhD +ZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBANpQh7bauKk+nWT6VjOaVj0W5QOVsjQcmm1iBdTYj+eJZJ+622SLZOZ5KmHN +r49aiZFluVj8tANfkT8tEBXgfs+8/H9DZ6itXjYj2JizTfNDnjl8KvzsiNWI7nC9hRYt6kuJPKNx +Qv4c/dMcLRC4hlTqQ7jbxofaqK6AJc96Jh2qkbBIb6613p7Y1/oA/caP0FG7Yn2ksYyy/yARujVj +BYZHYEMzkPZHogNPlk2dT8Hq6pyi/jQu3rfKG3akt62f6ajUeD94/vI4CTYd0hYCyOwqaK/1jpTv +LRN6HkJKHRUxrgwEV/xhc/MxVoYxgKDEEW4wduOU8F8ExKyHcomYxZ3MVwia9Az8fXoFOvpHgDm2 +z4QTd28n6v+WZxcIbekN1iNQMLAVdBM+5S//Ds3EC0pd8NgAM0lm66EYfFkuPSi5YXHLtaW6uOrc +4nBvCGrch2c0798wct3zyT8j/zXhviEpIDCB5BmlIOklynMxdCm+4kLV87ImZsdo/Rmz5yCTmehd +4F6H50boJZwKKSTUzViGUkAksnsPmBIgJPaQbEfIDbsYIC7Z/fyL8inqh3SV4EJQeIQEQWGw9CEj +jy3LKCHyamz0GqbFFLQ3ZU+V/YDI+HLlJWvEYLF7bY5KinPOWftwenMGE9nTdDckQQoRb5fc5+R+ +ob0V8rqHDz1oihYHAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0G +A1UdDgQWBBSowcCbkahDFXxdBie0KlHYlwuBsTAfBgNVHSMEGDAWgBSowcCbkahDFXxdBie0KlHY +lwuBsTANBgkqhkiG9w0BAQ0FAAOCAgEAnFZvAX7RvUz1isbwJh/k4DgYzDLDKTudQSk0YcbX8ACh +66Ryj5QXvBMsdbRX7gp8CXrc1cqh0DQT+Hern+X+2B50ioUHj3/MeXrKls3N/U/7/SMNkPX0XtPG +YX2eEeAC7gkE2Qfdpoq3DIMku4NQkv5gdRE+2J2winq14J2by5BSS7CTKtQ+FjPlnsZlFT5kOwQ/ +2wyPX1wdaR+v8+khjPPvl/aatxm2hHSco1S1cE5j2FddUyGbQJJD+tZ3VTNPZNX70Cxqjm0lpu+F +6ALEUz65noe8zDUa3qHpimOHZR4RKttjd5cUvpoUmRGywO6wT/gUITJDT5+rosuoD6o7BlXGEilX +CNQ314cnrUlZp5GrRHpejXDbl85IULFzk/bwg2D5zfHhMf1bfHEhYxQUqq/F3pN+aLHsIqKqkHWe +tUNy6mSjhEv9DKgma3GX7lZjZuhCVPnHHd/Qj1vfyDBviP4NxDMcU6ij/UgQ8uQKTuEVV/xuZDDC +VRHc6qnNSlSsKWNEz0pAoNZoWRsz+e86i9sgktxChL8Bq4fA1SCC28a5g4VCXA9DO2pJNdWY9BW/ ++mGBDAkgGNLQFwzLSABQ6XaCjGTXOqAHVcweMcDvOrRl++O/QmueD6i9a5jc2NvLi6Td11n0bt3+ +qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo= +-----END CERTIFICATE----- + +Certplus Root CA G2 +=================== +-----BEGIN CERTIFICATE----- +MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4xCzAJBgNVBAYT +AkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x +NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0 +cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN +Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD +AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud +IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV +HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl +vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw== +-----END CERTIFICATE----- + +OpenTrust Root CA G1 +==================== +-----BEGIN CERTIFICATE----- +MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUAMEAxCzAJBgNV +BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcx +MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM +CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7fa +Yp6bwiTXj/HbpqbfRm9RpnHLPhsxZ2L3EVs0J9V5ToybWL0iEA1cJwzdMOWo010hOHQX/uMftk87 +ay3bfWAfjH1MBcLrARYVmBSO0ZB3Ij/swjm4eTrwSSTilZHcYTSSjFR077F9jAHiOH3BX2pfJLKO +YheteSCtqx234LSWSE9mQxAGFiQD4eCcjsZGT44ameGPuY4zbGneWK2gDqdkVBFpRGZPTBKnjix9 +xNRbxQA0MMHZmf4yzgeEtE7NCv82TWLxp2NX5Ntqp66/K7nJ5rInieV+mhxNaMbBGN4zK1FGSxyO +9z0M+Yo0FMT7MzUj8czxKselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq +3ywgsNw2TgOzfALU5nsaqocTvz6hdLubDuHAk5/XpGbKuxs74zD0M1mKB3IDVedzagMxbm+WG+Oi +n6+Sx+31QrclTDsTBM8clq8cIqPQqwWyTBIjUtz9GVsnnB47ev1CI9sjgBPwvFEVVJSmdz7QdFG9 +URQIOTfLHzSpMJ1ShC5VkLG631UAC9hWLbFJSXKAqWLXwPYYEQRVzXR7z2FwefR7LFxckvzluFqr +TJOVoSfupb7PcSNCupt2LQIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUl0YhVyE12jZVx/PxN3DlCPaTKbYwHwYDVR0jBBgwFoAUl0YhVyE12jZVx/Px +N3DlCPaTKbYwDQYJKoZIhvcNAQELBQADggIBAB3dAmB84DWn5ph76kTOZ0BP8pNuZtQ5iSas000E +PLuHIT839HEl2ku6q5aCgZG27dmxpGWX4m9kWaSW7mDKHyP7Rbr/jyTwyqkxf3kfgLMtMrpkZ2Cv +uVnN35pJ06iCsfmYlIrM4LvgBBuZYLFGZdwIorJGnkSI6pN+VxbSFXJfLkur1J1juONI5f6ELlgK +n0Md/rcYkoZDSw6cMoYsYPXpSOqV7XAp8dUv/TW0V8/bhUiZucJvbI/NeJWsZCj9VrDDb8O+WVLh +X4SPgPL0DTatdrOjteFkdjpY3H1PXlZs5VVZV6Xf8YpmMIzUUmI4d7S+KNfKNsSbBfD4Fdvb8e80 +nR14SohWZ25g/4/Ii+GOvUKpMwpZQhISKvqxnUOOBZuZ2mKtVzazHbYNeS2WuOvyDEsMpZTGMKcm +GS3tTAZQMPH9WD25SxdfGbRqhFS0OE85og2WaMMolP3tLR9Ka0OWLpABEPs4poEL0L9109S5zvE/ +bw4cHjdx5RiHdRk/ULlepEU0rbDK5uUTdg8xFKmOLZTW1YVNcxVPS/KyPu1svf0OnWZzsD2097+o +4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJAwSQiumPv+i2tCqjI40cHLI5kqiPAlxA +OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx +-----END CERTIFICATE----- + +OpenTrust Root CA G2 +==================== +-----BEGIN CERTIFICATE----- +MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUAMEAxCzAJBgNV +BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcy +MB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM +CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEB +AQUAA4ICDwAwggIKAoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+ +Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz +4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/61UWY0jUJ9gNDlP7ZvyCV +eYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fEFY8ElggGQgT4hNYdvJGmQr5J1WqIP7wt +UdGejeBSzFfdNTVY27SPJIjki9/ca1TSgSuyzpJLHB9G+h3Ykst2Z7UJmQnlrBcUVXDGPKBWCgOz +3GIZ38i1MH/1PCZ1Eb3XG7OHngevZXHloM8apwkQHZOJZlvoPGIytbU6bumFAYueQ4xncyhZW+vj +3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5cZJ5L+epJUzpM5ChaHvGOz +9bGTXOBut9Dq+WIyiET7vycotjCVXRIouZW+j1MY5aIYFuJWpLIsEPUdN6b4t/bQWVyJ98LVtZR0 +0dX+G7bw5tYee9I8y6jj9RjzIR9u701oBnstXW5DiabA+aC/gh7PU3+06yzbXfZqfUAkBXKJOAGT +y3HCOV0GEfZvePg3DTmEJwIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUajn6QiL35okATV59M4PLuG53hq8wHwYDVR0jBBgwFoAUajn6QiL35okATV59 +M4PLuG53hq8wDQYJKoZIhvcNAQENBQADggIBAJjLq0A85TMCl38th6aP1F5Kr7ge57tx+4BkJamz +Gj5oXScmp7oq4fBXgwpkTx4idBvpkF/wrM//T2h6OKQQbA2xx6R3gBi2oihEdqc0nXGEL8pZ0keI +mUEiyTCYYW49qKgFbdEfwFFEVn8nNQLdXpgKQuswv42hm1GqO+qTRmTFAHneIWv2V6CG1wZy7HBG +S4tz3aAhdT7cHcCP009zHIXZ/n9iyJVvttN7jLpTwm+bREx50B1ws9efAvSyB7DH5fitIw6mVskp +EndI2S9G/Tvw/HRwkqWOOAgfZDC2t0v7NqwQjqBSM2OdAzVWxWm9xiNaJ5T2pBL4LTM8oValX9YZ +6e18CL13zSdkzJTaTkZQh+D5wVOAHrut+0dSixv9ovneDiK3PTNZbNTe9ZUGMg1RGUFcPk8G97kr +gCf2o6p6fAbhQ8MTOWIaNr3gKC6UAuQpLmBVrkA9sHSSXvAgZJY/X0VdiLWK2gKgW0VU3jg9CcCo +SmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eAiN1nE28daCSLT7d0geX0 +YJ96Vdc+N9oWaz53rK4YcJUIeSkDiv7BO7M/Gg+kO14fWKGVyasvc0rQLW6aWQ9VGHgtPFGml4vm +u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK +-----END CERTIFICATE----- + +OpenTrust Root CA G3 +==================== +-----BEGIN CERTIFICATE----- +MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT +AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X +DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w +ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B +ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB +/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf +BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM +BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta +3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB +-----END CERTIFICATE----- + +ISRG Root X1 +============ +-----BEGIN CERTIFICATE----- +MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE +BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD +EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG +EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT +DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r +Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1 +3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K +b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN +Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ +4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf +1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu +hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH +usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r +OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G +A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY +9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL +ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV +0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt +hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw +TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx +e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA +JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD +YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n +JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ +m+kXQ99b21/+jh5Xos1AnX5iItreGCc= +-----END CERTIFICATE----- + +AC RAIZ FNMT-RCM +================ +-----BEGIN CERTIFICATE----- +MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT +AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw +MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD +TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf +qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr +btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL +j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou +08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw +WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT +tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ +47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC +ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa +i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o +dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD +nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s +D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ +j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT +Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW ++YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7 +Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d +8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm +5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG +rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM= +-----END CERTIFICATE----- + +Amazon Root CA 1 +================ +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1 +MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH +FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ +gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t +dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce +VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3 +DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM +CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy +8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa +2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2 +xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5 +-----END CERTIFICATE----- + +Amazon Root CA 2 +================ +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD +VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1 +MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv +bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4 +kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp +N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9 +AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd +fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx +kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS +btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0 +Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN +c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+ +3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw +DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA +A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY ++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE +YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW +xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ +gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW +aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV +Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3 +KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi +JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw= +-----END CERTIFICATE----- + +Amazon Root CA 3 +================ +-----BEGIN CERTIFICATE----- +MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB +f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr +Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43 +rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc +eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw== +-----END CERTIFICATE----- + +Amazon Root CA 4 +================ +-----BEGIN CERTIFICATE----- +MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG +EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy +NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ +MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN +/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri +83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA +MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1 +AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA== +-----END CERTIFICATE----- + +LuxTrust Global Root 2 +====================== +-----BEGIN CERTIFICATE----- +MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG +A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh +bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW +MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC +AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm +Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2 +xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC +wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm +1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm +FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF +wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/ +a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U +ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ +MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB +/zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5 +Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT ++Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ +FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN +H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW +7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu +ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA +VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR +TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt +/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc +7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I +iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr +-----END CERTIFICATE----- + +TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT +D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr +IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g +TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp +ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD +VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt +c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth +bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11 +IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8 +6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc +wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0 +3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9 +WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU +ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ +KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh +AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc +lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R +e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j +q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM= +-----END CERTIFICATE----- + +GDCA TrustAUTH R5 ROOT +====================== +-----BEGIN CERTIFICATE----- +MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw +BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD +DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow +YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ +IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs +AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p +OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr +pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ +9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ +xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM +R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ +D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4 +oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx +9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg +p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9 +H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35 +6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd ++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ +HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD +F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ +8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv +/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT +aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== +-----END CERTIFICATE----- + +TrustCor RootCert CA-1 +====================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx +MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu +YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe +VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy +dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq +jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 +pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 +JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h +gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw +/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j +BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 +mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf +ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C +qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P +3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= +-----END CERTIFICATE----- + +TrustCor RootCert CA-2 +====================== +-----BEGIN CERTIFICATE----- +MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w +DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT +eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 +eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy +MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h +bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U +cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 +IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb +ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk +RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 +oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb +XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 +/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q +jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP +eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg +rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh +8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU +2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h +Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp +kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv +2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 +S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw +PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv +DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU +RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE +xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX +RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ +-----END CERTIFICATE----- + +TrustCor ECA-1 +============== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP +MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig +U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp +dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw +N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 +MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y +IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR +MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 +xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc +p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ +fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj +YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL +f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF +AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u +/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F +hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs +J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC +jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== +-----END CERTIFICATE----- + +SSL.com Root Certification Authority RSA +======================================== +-----BEGIN CERTIFICATE----- +MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM +BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x +MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw +MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM +LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C +Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8 +P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge +oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp +k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z +fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ +gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2 +UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8 +1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s +bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV +HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr +dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf +ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl +u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq +erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj +MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ +vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI +Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y +wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI +WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k= +-----END CERTIFICATE----- + +SSL.com Root Certification Authority ECC +======================================== +-----BEGIN CERTIFICATE----- +MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv +BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy +MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO +BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv +bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA +BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+ +8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR +hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT +jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW +e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z +5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority RSA R2 +============================================== +-----BEGIN CERTIFICATE----- +MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w +DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u +MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy +MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD +VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh +hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w +cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO +Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+ +B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh +CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim +9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto +RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm +JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48 ++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV +HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp +qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1 +++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx +Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G +guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz +OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7 +CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq +lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR +rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1 +hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX +9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w== +-----END CERTIFICATE----- + +SSL.com EV Root Certification Authority ECC +=========================================== +-----BEGIN CERTIFICATE----- +MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV +BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy +BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw +MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx +EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM +LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB +BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy +3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O +BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe +5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ +N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm +m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg== +-----END CERTIFICATE----- diff --git a/github/github.go b/github/github.go deleted file mode 100644 index 2fb55861f..000000000 --- a/github/github.go +++ /dev/null @@ -1,847 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package github - -import ( - "context" - "fmt" - "net/http" - "net/url" - "regexp" - "strings" - "time" - - "github.com/google/go-github/github" - "github.com/labstack/echo" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "golang.org/x/oauth2" - "gopkg.in/yaml.v2" - - "github.com/palantir/bulldozer/log" - "github.com/palantir/bulldozer/server/config" - "github.com/palantir/bulldozer/utils" - "github.com/palantir/bulldozer/version" -) - -const ( - MergeMethod = "merge" - SquashMethod = "squash" - RebaseMethod = "rebase" - - PingEvent = "ping" - StatusEvent = "status" - PullRequestEvent = "pull_request" - PullRequestReviewEvent = "pull_request_review" - PushEvent = "push" - - ModeWhitelist = "whitelist" - ModeBlacklist = "blacklist" - ModeBody = "pr_body" - - MaxPullRequestPollCount = 5 -) - -var ( - AcceptedPermLevels = []string{"write", "admin"} - DefaultConfigPaths = []string{".bulldozer.yml"} -) - -type UpdateStrategy string - -const ( - // UpdateStrategyLabel the default value for UpdateStrategy - UpdateStrategyLabel UpdateStrategy = "label" - - // Future feature, see https://github.com/palantir/bulldozer/issues/21 - // UpdateStrategyOnRequiredChecksPassing UpdateStrategy = "onRequiredChecksPassing" - - UpdateStrategyAlways UpdateStrategy = "always" -) - -type Option func(c *Client) - -func WithConfigPaths(paths []string) Option { - return func(c *Client) { - c.configPaths = paths - } -} - -type Client struct { - Logger *logrus.Entry - Ctx context.Context - - *github.Client - - configPaths []string -} - -type BulldozerFile struct { - MergeStrategy string `yaml:"strategy" validate:"nonzero"` - DeleteAfterMerge bool `yaml:"deleteAfterMerge" validate:"nonzero"` - Mode string `yaml:"mode" validate:"nonzero"` - UpdateStrategy UpdateStrategy `yaml:"updateStrategy"` - IgnoreSquashedMessages bool `yaml:"ignoreSquashedMessages"` -} - -func FromToken(c echo.Context, token string, opts ...Option) *Client { - ts := oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: token}, - ) - tc := oauth2.NewClient(context.TODO(), ts) - - gh := github.NewClient(tc) - - gh.BaseURL, _ = url.Parse(config.Instance.Github.APIURL) - gh.UserAgent = "bulldozer/" + version.Version() - - client := &Client{ - Logger: log.FromContext(c), - Ctx: context.TODO(), - Client: gh, - } - - for _, opt := range opts { - opt(client) - } - - if len(client.configPaths) == 0 { - client.configPaths = DefaultConfigPaths - } - - return client -} - -func FromAuthHeader(c echo.Context, authHeader string, opts ...Option) (*Client, error) { - if authHeader == "" { - return nil, errors.New("authorization header not present") - } - - parts := strings.Split(authHeader, " ") - if len(parts) != 2 { - return nil, errors.New("incorrectly formatted auth header") - } - - token := parts[1] - return FromToken(c, token, opts...), nil -} - -func (client *Client) ConfigFile(repo *github.Repository, ref string) (*BulldozerFile, error) { - repositoryContent, err := client.findConfigFile(repo, ref) - if err != nil { - return nil, err - } - - content, err := repositoryContent.GetContent() - if err != nil { - return nil, err - } - - var bulldozerFile BulldozerFile - err = yaml.Unmarshal([]byte(content), &bulldozerFile) - if err != nil { - return nil, errors.Wrapf(err, "cannot unmarshal .bulldozer.yml for %s on %s", repo.GetFullName(), ref) - } - - // Default update strategy - if bulldozerFile.UpdateStrategy == "" { - bulldozerFile.UpdateStrategy = UpdateStrategyLabel - } - - allowedUpdateStrategies := []UpdateStrategy{UpdateStrategyAlways, UpdateStrategyLabel} - validStrategy := func() bool { - for _, valid := range allowedUpdateStrategies { - if bulldozerFile.UpdateStrategy == valid { - return true - } - } - return false - }() - if !validStrategy { - return nil, errors.Errorf("Invalid update strategy: %#v, valid strategies: %#v", bulldozerFile.UpdateStrategy, allowedUpdateStrategies) - } - - return &bulldozerFile, nil -} - -func (client *Client) findConfigFile(repo *github.Repository, ref string) (*github.RepositoryContent, error) { - owner := repo.Owner.GetLogin() - name := repo.GetName() - - opts := github.RepositoryContentGetOptions{ - Ref: ref, - } - - for _, p := range client.configPaths { - content, _, _, err := client.Repositories.GetContents(client.Ctx, owner, name, p, &opts) - if err != nil { - if rerr, ok := err.(*github.ErrorResponse); ok && rerr.Response.StatusCode == http.StatusNotFound { - continue - } - return nil, errors.Wrapf(err, "cannot get %s for %s on ref %s", p, repo.GetFullName(), ref) - } - return content, nil - } - - return nil, errors.Errorf("no configuration found for %s on ref %s", repo.GetFullName(), ref) -} - -func (client *Client) MergeMethod(branch *github.PullRequestBranch) (string, error) { - logger := client.Logger - - owner := branch.Repo.Owner.GetLogin() - name := branch.Repo.GetName() - - cfgFile, err := client.ConfigFile(branch.Repo, branch.GetRef()) - if err != nil { - return "", err - } - - repo, _, err := client.Repositories.Get(client.Ctx, owner, name) - if err != nil { - return "", errors.Wrapf(err, "cannot get %s", branch.Repo.GetFullName()) - } - - allowedMethods := []string{SquashMethod, MergeMethod, RebaseMethod} - - rAllowedMethods := []struct { - name string - isAllowed bool - }{ - { - name: SquashMethod, - isAllowed: repo.GetAllowSquashMerge(), - }, - { - name: MergeMethod, - isAllowed: repo.GetAllowMergeCommit(), - }, - { - name: RebaseMethod, - isAllowed: repo.GetAllowRebaseMerge(), - }, - } - - validMethod := func() bool { - for _, method := range allowedMethods { - if method == cfgFile.MergeStrategy { - return true - } - } - - return false - }() - - if !validMethod { - for _, method := range rAllowedMethods { - if method.isAllowed { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "wantedMethod": cfgFile.MergeStrategy, - "chosenMethod": method.name, - }).Debug("Wanted merge method is not allowed, fallback one was chosen") - return method.name, nil - } - } - } - - desiredIsAllowed := func() bool { - switch cfgFile.MergeStrategy { - case MergeMethod: - return repo.GetAllowMergeCommit() - case SquashMethod: - return repo.GetAllowSquashMerge() - default: - return repo.GetAllowRebaseMerge() - - } - }() - - if desiredIsAllowed { - return cfgFile.MergeStrategy, nil - } - - var m string - for _, method := range rAllowedMethods { - if method.isAllowed { - m = method.name - break - } - } - - return m, nil -} - -func (client *Client) DeleteFlag(branch *github.PullRequestBranch) (bool, error) { - bulldozerFile, err := client.ConfigFile(branch.Repo, branch.GetRef()) - if err != nil { - return false, err - } - - return bulldozerFile.DeleteAfterMerge, nil -} - -func (client *Client) IgnoreSquashedMessages(branch *github.PullRequestBranch) (bool, error) { - bulldozerFile, err := client.ConfigFile(branch.Repo, branch.GetRef()) - if err != nil { - return false, err - } - - return bulldozerFile.IgnoreSquashedMessages, nil -} - -func (client *Client) OperationMode(branch *github.PullRequestBranch) (string, error) { - cfgFile, err := client.ConfigFile(branch.Repo, branch.GetRef()) - if err != nil { - return "", err - } - - if !utils.StringInSlice(cfgFile.Mode, []string{ModeBlacklist, ModeWhitelist, ModeBody}) { - return "", fmt.Errorf("%s is not a valid operation mode", cfgFile.Mode) - } - - return cfgFile.Mode, nil -} - -func (client *Client) AllCommits(pr *github.PullRequest) ([]*github.RepositoryCommit, error) { - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - var repositoryCommits []*github.RepositoryCommit - opts := &github.ListOptions{ - PerPage: 100, - } - - for { - commits, resp, err := client.PullRequests.ListCommits(client.Ctx, owner, name, pr.GetNumber(), opts) - if err != nil { - return nil, err - } - repositoryCommits = append(repositoryCommits, commits...) - if resp.NextPage == 0 { - break - } - - opts.Page = resp.NextPage - } - - return repositoryCommits, nil -} - -func (client *Client) CommitMessages(pr *github.PullRequest) ([]string, error) { - repo := pr.Base.Repo - - repositoryCommits, err := client.AllCommits(pr) - if err != nil { - return []string{}, errors.Wrapf(err, "cannot list commits for %s-%d", repo.GetFullName(), pr.GetNumber()) - } - - var commitMessages []string - for _, repositoryCommit := range repositoryCommits { - commitMessages = append(commitMessages, fmt.Sprintf("* %s", repositoryCommit.Commit.GetMessage())) - } - - return commitMessages, nil -} - -func (client *Client) commitMessage(pr *github.PullRequest, mergeMethod string) (string, error) { - commitMessage := "" - if mergeMethod == SquashMethod { - repo := pr.Base.Repo - ignoreSquashedMessages, err := client.IgnoreSquashedMessages(pr.Base) - if err != nil { - return "", errors.Wrapf(err, - "cannot get ignore squash messages flag for %s on ref %s", - repo.GetFullName(), - pr.Base.GetRef()) - } - - if !ignoreSquashedMessages { - messages, err := client.CommitMessages(pr) - if err != nil { - return "", err - } - for _, message := range messages { - commitMessage = fmt.Sprintf("%s%s\n", commitMessage, message) - } - } - - if msg, ok := extractMessageOverride(pr.GetBody()); ok { - commitMessage = msg - } - } - - return commitMessage, nil -} - -func extractMessageOverride(body string) (msg string, found bool) { - var r *regexp.Regexp - if strings.Contains(body, "==COMMIT_MSG==") { - r = regexp.MustCompile(`(?sm:(==COMMIT_MSG==\s*)^(.*)$(\s*==COMMIT_MSG==))`) - } else if strings.Contains(body, "==SQUASH_MSG==") { - r = regexp.MustCompile(`(?sm:(==SQUASH_MSG==\s*)^(.*)$(\s*==SQUASH_MSG==))`) - } - - if r != nil { - m := r.FindStringSubmatch(body) - if len(m) == 4 { - msg = strings.TrimSpace(m[2]) - found = true - } - } - return -} - -func (client *Client) Merge(pr *github.PullRequest) error { - logger := client.Logger - - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - mergeMethod, err := client.MergeMethod(pr.Base) - if err != nil { - return errors.Wrapf(err, "cannot get merge method for %s on ref %s", repo.GetFullName(), pr.Base.GetRef()) - } - commitMessage, err := client.commitMessage(pr, mergeMethod) - if err != nil { - return err - } - - delete, err := client.DeleteFlag(pr.Base) - if err != nil { - return errors.Wrapf(err, "cannot get delete flag for %s on ref %s", repo.GetFullName(), pr.Base.GetRef()) - } - - mergeCommit, _, err := client.PullRequests.Merge(client.Ctx, owner, name, pr.GetNumber(), - commitMessage, - &github.PullRequestOptions{ - MergeMethod: mergeMethod, - }) - if err != nil { - return errors.Wrapf(err, "merge of %s-%d has failed", repo.GetFullName(), pr.GetNumber()) - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "method": mergeMethod, - "sha": mergeCommit.GetSHA(), - }).Info("Merged pull request") - - if !pr.Head.Repo.GetFork() { - if delete { - _, err = client.Git.DeleteRef(client.Ctx, owner, name, fmt.Sprintf("heads/%s", pr.Head.GetRef())) - if err != nil { - return errors.Wrapf(err, "cannot delete ref %s on %s", pr.Head.GetRef(), repo.GetFullName()) - } - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "ref": pr.Head.GetRef(), - }).Info("Deleted ref on repo") - } - } else { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Debug("Pull request is from a fork, not deleting if enabled") - } - - _, _, err = client.Issues.CreateComment(client.Ctx, owner, name, pr.GetNumber(), &github.IssueComment{ - Body: github.String("Automatically merged via Bulldozer!"), - }) - if err != nil { - return errors.Wrapf(err, "cannot comment on %s-%d", repo.GetFullName(), pr.GetNumber()) - } - - return nil -} - -func (client *Client) PullRequestForSHA(repo *github.Repository, SHA string) (*github.PullRequest, error) { - owner := repo.Owner.GetLogin() - name := repo.GetName() - opt := &github.PullRequestListOptions{ - State: "open", - ListOptions: github.ListOptions{ - PerPage: 100, - }, - } - var pullRequest *github.PullRequest - for { - prs, resp, err := client.PullRequests.List(client.Ctx, owner, name, opt) - if err != nil { - return nil, errors.Wrapf(err, "cannot list PRs for repository %s", repo) - } - for _, pr := range prs { - if pr.Head.GetSHA() == SHA { - pullRequest = pr - break - } - } - if resp.NextPage == 0 { - break - } - opt.ListOptions.Page = resp.NextPage - } - - if pullRequest == nil || pullRequest.Mergeable != nil { - return pullRequest, nil - } - - ticker := time.NewTicker(2 * time.Second) - defer ticker.Stop() - - // polling for merge status (https://developer.github.com/v3/pulls/#get-a-single-pull-request) - for i := 0; i < MaxPullRequestPollCount; i++ { - <-ticker.C - - p, _, err := client.PullRequests.Get(client.Ctx, owner, name, pullRequest.GetNumber()) - if err != nil { - return nil, errors.Wrapf(err, "cannot get details for PR %d on %s", pullRequest.GetNumber(), repo.GetFullName()) - } - - if p.GetState() != "open" || p.Mergeable != nil { - return p, nil - } - - pullRequest = p - } - - client.Logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pullRequest.GetNumber(), - }).Warnf("Failed to get a non-nil mergeable value after %d attempts; continuing with nil", MaxPullRequestPollCount) - - return pullRequest, nil -} - -func (client *Client) ReviewStatus(pr *github.PullRequest) (bool, error) { - logger := client.Logger - - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - reviewers, err := client.AllReviewers(pr) - if err != nil { - return false, err - } - - reviews, err := client.AllReviews(pr) - if err != nil { - return false, err - } - - approval := false - disapproval := false - for _, review := range reviews { - perms, _, err := client.Repositories.GetPermissionLevel(client.Ctx, owner, name, review.User.GetLogin()) - if err != nil { - return false, errors.Wrapf(err, "cannot get permission level for %s on %s", review.User.GetLogin(), repo.GetFullName()) - } - - hasWrite := utils.StringInSlice(perms.GetPermission(), AcceptedPermLevels) - if hasWrite { - if review.GetState() == "APPROVED" { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "approver": review.User.GetLogin(), - }).Info("Review approved") - approval = true - } else if review.GetState() == "CHANGES_REQUESTED" { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "approver": review.User.GetLogin(), - }).Info("Review not approved") - disapproval = true - } - } - } - - protection, _, err := client.Repositories.GetBranchProtection(client.Ctx, owner, name, pr.Base.GetRef()) - if err != nil { - ghErr := err.(*github.ErrorResponse) - if ghErr.Response.StatusCode == http.StatusNotFound { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "branch": pr.Base.GetRef(), - }).Debug("Branch does not have branch protection active") - return true, nil - } - } - - reviewRequired := protection.RequiredPullRequestReviews != nil - if !reviewRequired && !disapproval { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Info("Review not required and no one has disapproved, considering status true") - return true, nil - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "nReviewers": len(reviewers.Users), - "nReviews": len(reviews), - }).Info("Pull request has reviewers/reviews") - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "approvalStatus": approval, - }).Info("Pull request has approval status") - - if reviewRequired { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "branch": pr.Base.GetRef(), - }).Debug("Branch requires code reviews") - return approval, nil - } else if len(reviews) != 0 || len(reviewers.Users) != 0 { - return approval, nil - } - - return true, nil -} - -func (client *Client) LastReviewFromUser(pr *github.PullRequest, user *github.User) (*github.PullRequestReview, error) { - reviews, err := client.AllReviews(pr) - if err != nil { - return nil, err - } - - for _, review := range reviews { - if review.User.GetLogin() == user.GetLogin() { - return review, nil - } - } - - return nil, nil -} - -func (client *Client) HasLabels(pr *github.PullRequest, labelNames []string) (bool, error) { - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - if len(labelNames) == 0 { - return false, nil - } - - issue, _, err := client.Issues.Get(client.Ctx, owner, name, pr.GetNumber()) - if err != nil { - return true, errors.Wrapf(err, "cannot get %s-%d", repo.GetFullName(), pr.GetNumber()) - } - - attachedLabels := []string{} - for _, label := range issue.Labels { - attachedLabels = append(attachedLabels, strings.ToLower(label.GetName())) - } - - for _, label := range labelNames { - if utils.StringInSlice(label, attachedLabels) { - return true, nil - } - } - - return false, nil -} - -func (client *Client) AllPullRequests(repo *github.Repository) ([]*github.PullRequest, error) { - var pullRequests []*github.PullRequest - owner := repo.Owner.GetLogin() - name := repo.GetName() - opt := &github.PullRequestListOptions{ - State: "open", - ListOptions: github.ListOptions{ - PerPage: 100, - }, - } - for { - prs, resp, err := client.PullRequests.List(client.Ctx, owner, name, opt) - if err != nil { - return nil, err - } - pullRequests = append(pullRequests, prs...) - if resp.NextPage == 0 { - break - } - opt.ListOptions.Page = resp.NextPage - } - - return pullRequests, nil -} - -func (client *Client) LastStatusForContext(repo *github.Repository, SHA, context string) (string, error) { - owner := repo.Owner.GetLogin() - name := repo.GetName() - - statuses, _, err := client.Repositories.ListStatuses(client.Ctx, owner, name, SHA, &github.ListOptions{ - PerPage: 100, - }) - if err != nil { - return "", err - } - - for _, status := range statuses { - if context == status.GetContext() { - return status.GetState(), nil - } - } - - return "", errors.New("context not found in last 100 statuses") -} - -func (client *Client) ShaStatus(pr *github.PullRequest, SHA string) (bool, error) { - logger := client.Logger - - eval := true - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - _, _, err := client.Repositories.GetBranchProtection(client.Ctx, owner, name, pr.Base.GetRef()) - if err != nil { - ghErr := err.(*github.ErrorResponse) - if ghErr.Response.StatusCode == http.StatusNotFound { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "branch": pr.Base.GetRef(), - }).Debug("Branch protection is not set") - return true, nil - } - - return false, errors.Wrapf(err, "cannot get branch protection for %s/%s", repo.GetFullName(), pr.Base.GetRef()) - } - - combinedStatus, _, err := client.Repositories.GetCombinedStatus(client.Ctx, owner, name, SHA, nil) - if err != nil { - return false, errors.Wrapf(err, "cannot get combined status for SHA %s on %s", SHA, repo.GetFullName()) - } - - requiredStatusChecks, _, err := client.Repositories.GetRequiredStatusChecks(client.Ctx, owner, name, pr.Base.GetRef()) - if err != nil { - return false, errors.Wrapf(err, "cannot get required status checks for %s", repo.GetFullName()) - } - - nRequiredStatuses := len(requiredStatusChecks.Contexts) - nStatuses := len(combinedStatus.Statuses) - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "postedStatuses": nStatuses, - "requiredStatuses": nRequiredStatuses, - }).Debug("Pull request overview") - if nStatuses == 0 && nRequiredStatuses == 0 { - return true, nil - } - - for _, reqContext := range requiredStatusChecks.Contexts { - lastStatus, err := client.LastStatusForContext(repo, SHA, reqContext) - if err != nil { - return false, errors.Wrapf(err, "cannot get last status for %s on repo %s", SHA, repo.GetFullName()) - } - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "context": reqContext, - "state": lastStatus, - "sha": SHA, - }).Debug("Context has last status on repository") - eval = eval && (lastStatus == "success") - } - - return eval, nil -} - -func (client *Client) AllRepositories(user *github.User) ([]*github.Repository, error) { - opts := &github.RepositoryListOptions{ - ListOptions: github.ListOptions{ - PerPage: 100, - }, - } - - var allRepos []*github.Repository - for { - repos, resp, err := client.Repositories.List(client.Ctx, "", opts) - if err != nil { - return nil, errors.Wrapf(err, "cannot list repositories for user %s", user.GetLogin()) - } - allRepos = append(allRepos, repos...) - if resp.NextPage == 0 { - break - } - opts.Page = resp.NextPage - } - - return allRepos, nil -} - -func (client *Client) AllReviews(pr *github.PullRequest) ([]*github.PullRequestReview, error) { - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - opts := &github.ListOptions{ - PerPage: 100, - } - - var allReviews []*github.PullRequestReview - for { - reviews, resp, err := client.PullRequests.ListReviews(client.Ctx, owner, name, pr.GetNumber(), opts) - if err != nil { - return nil, errors.Wrapf(err, "cannot list reviews for %s#%d", repo.GetFullName(), pr.GetNumber()) - } - - allReviews = append(allReviews, reviews...) - if resp.NextPage == 0 { - break - } - opts.Page = resp.NextPage - } - - return allReviews, nil -} - -func (client *Client) AllReviewers(pr *github.PullRequest) (*github.Reviewers, error) { - repo := pr.Base.Repo - owner := repo.Owner.GetLogin() - name := repo.GetName() - - opts := &github.ListOptions{ - PerPage: 100, - } - - var allReviewers github.Reviewers - for { - reviewers, resp, err := client.PullRequests.ListReviewers(client.Ctx, owner, name, pr.GetNumber(), opts) - if err != nil { - return nil, errors.Wrapf(err, "cannot list reviewers for %s#%d", repo.GetFullName(), pr.GetNumber()) - } - - allReviewers.Users = append(allReviewers.Users, reviewers.Users...) - allReviewers.Teams = append(allReviewers.Teams, reviewers.Teams...) - - if resp.NextPage == 0 { - break - } - opts.Page = resp.NextPage - } - - return &allReviewers, nil -} diff --git a/github/github_test.go b/github/github_test.go deleted file mode 100644 index 0711a4113..000000000 --- a/github/github_test.go +++ /dev/null @@ -1,796 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package github - -import ( - "context" - "fmt" - "io/ioutil" - "net/http" - "net/http/httptest" - "net/url" - "reflect" - "testing" - - "github.com/google/go-github/github" - "github.com/sirupsen/logrus" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -var ( - mux *http.ServeMux - client *Client - server *httptest.Server -) - -func setup() { - // test server - mux = http.NewServeMux() - server = httptest.NewServer(mux) - - logger := logrus.New().WithField("deliveryID", "randomDelivery") - client = &Client{ - Logger: logger, - Ctx: context.TODO(), - Client: github.NewClient(nil), - - configPaths: []string{".bulldozer.yml", ".palantir/bulldozer.yml"}, - } - - url, _ := url.Parse(server.URL + "/") - client.BaseURL = url - client.UploadURL = url -} - -// teardown closes the test HTTP server. -func teardown() { - server.Close() -} - -func testMethod(t *testing.T, r *http.Request, want string) { - if got := r.Method; got != want { - t.Errorf("Request method: %v, want %v", got, want) - } -} - -type values map[string]string - -func testFormValues(t *testing.T, r *http.Request, values values) { - want := url.Values{} - for k, v := range values { - want.Set(k, v) - } - - _ = r.ParseForm() - if got := r.Form; !reflect.DeepEqual(got, want) { - t.Errorf("Request parameters: %v, want %v", got, want) - } -} - -func testBody(t *testing.T, r *http.Request, want string) { - b, err := ioutil.ReadAll(r.Body) - if err != nil { - t.Errorf("Error reading request body: %v", err) - } - if got := string(b); got != want { - t.Errorf("request Body is %s, want %s", got, want) - } -} - -func fakeUser(login string) *github.User { - return &github.User{ - Login: github.String(login), - } -} - -func fakeRepository(name string) *github.Repository { - return &github.Repository{ - Owner: fakeUser("o"), - Name: github.String(name), - FullName: github.String("o/r"), - } -} - -func fakePullRequestBranch() *github.PullRequestBranch { - return &github.PullRequestBranch{ - Repo: fakeRepository("r"), - } -} - -func fakePullRequest(number int) *github.PullRequest { - return &github.PullRequest{ - Base: fakePullRequestBranch(), - Number: github.Int(number), - } -} - -func TestLastReviewFromUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/reviews", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "id": 1, - "user": { - "login": "octocat" - } - }, - { - "id": 2, - "user": { - "login": "u" - } - }, - { - "id": 3, - "user": { - "login": "u" - } - } - ]`) - }) - - lastReview, err := client.LastReviewFromUser(fakePullRequest(1), fakeUser("u")) - require.Nil(t, err) - - want := &github.PullRequestReview{ - ID: github.Int(2), - User: fakeUser("u"), - } - if !reflect.DeepEqual(lastReview, want) { - t.Errorf("PullRequests.ListReviews returned %+v, want %+v", lastReview, want) - } -} - -func TestHasLabel(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "labels": [ - { - "id": 1, - "name": "label_1" - }, - { - "id": 2, - "name": "label_2" - }, - { - "id": 3, - "name": "label_3" - }, - { - "id": 4, - "name": "CAPITAL_LABEL" - } - ] - }`) - }) - - pr := &github.PullRequest{ - Base: &github.PullRequestBranch{ - Repo: &github.Repository{ - Owner: &github.User{ - Login: github.String("o"), - }, - Name: github.String("r"), - }, - }, - Number: github.Int(1), - } - - hasLabels, err := client.HasLabels(pr, []string{"label_1", "label_2"}) - require.Nil(t, err) - assert.True(t, hasLabels) - - hasLabels, err = client.HasLabels(pr, []string{"unknown_label"}) - require.Nil(t, err) - assert.False(t, hasLabels) - - hasLabels, err = client.HasLabels(pr, []string{"unknown_label"}) - require.Nil(t, err) - assert.False(t, hasLabels) - - hasLabels, err = client.HasLabels(pr, []string{}) - require.Nil(t, err) - assert.False(t, hasLabels) - - hasLabels, err = client.HasLabels(pr, []string{"capital_label"}) - require.Nil(t, err) - assert.True(t, hasLabels) -} - -func TestLastStatusForContext(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/commits/1234/statuses", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "per_page": "100", - }) - - fmt.Fprint(w, ` - [ - { - "id": 1, - "context": "context_1", - "state": "success" - }, - { - "id": 2, - "context": "context_2", - "state": "pending" - }, - { - "id": 3, - "context": "context_1", - "state": "success" - } - ]`) - }) - - repo := fakeRepository("r") - sha := "1234" - - status, err := client.LastStatusForContext(repo, sha, "context_1") - require.Nil(t, err) - assert.Equal(t, "success", status) - - status, err = client.LastStatusForContext(repo, sha, "context_2") - require.Nil(t, err) - assert.Equal(t, "pending", status) - - status, err = client.LastStatusForContext(repo, sha, "inexistent_context") - require.NotNil(t, err) - assert.Equal(t, "", status) -} - -func TestAllPullRequestForSHA(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "id": 1, - "number": 1, - "state": "open", - "head": { - "ref": "ref_1", - "sha": "1234" - } - }, - { - "id": 3, - "number": 3, - "state": "open", - "head": { - "ref": "ref_3", - "sha": "12345" - } - } - ]`) - }) - - mux.HandleFunc("/repos/o/r/pulls/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "id": 1, - "number": 1, - "state": "open", - "head": { - "ref": "ref_1", - "sha": "1234" - }, - "mergeable": true - }`) - }) - - want := &github.PullRequest{ - ID: github.Int(1), - Number: github.Int(1), - State: github.String("open"), - Head: &github.PullRequestBranch{ - Ref: github.String("ref_1"), - SHA: github.String("1234"), - }, - Mergeable: github.Bool(true), - } - pr, err := client.PullRequestForSHA(fakeRepository("r"), "1234") - require.Nil(t, err) - if !reflect.DeepEqual(pr, want) { - t.Errorf("PullRequestForSHA returned %+v, want %+v", pr, want) - } - - pr, err = client.PullRequestForSHA(fakeRepository("r"), "inexistent_sha") - require.Nil(t, err) - require.Nil(t, pr) -} - -func TestShaStatusSuccess(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/develop/protection", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "url": "https://github.com", - "required_status_checks": { - "url": "https://github.com", - "strict": true, - "contexts": [ - "context_1", - "context_2" - ], - "contexts_url": "https://github.com" - }, - "enforce_admins": { - "url": "https://github.com", - "enabled": true - } - } - `) - }) - mux.HandleFunc("/repos/o/r/commits/develop/status", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "state": "success", - "statuses": [ - { - "id": 15263, - "state": "success", - "context": "context_1" - }, - { - "id": 15265, - "state": "success", - "context": "context_2" - } - ] - } - `) - }) - mux.HandleFunc("/repos/o/r/branches/develop/protection/required_status_checks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "contexts": [ - "context_1", - "context_2" - ] - } - `) - }) - mux.HandleFunc("/repos/o/r/commits/develop/statuses", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "state": "success", - "context": "context_1" - }, - { - "state": "success", - "context": "context_2" - }, - { - "state": "pending", - "context": "context_1" - } - ] - `) - }) - - pr := &github.PullRequest{ - Number: github.Int(1), - Base: &github.PullRequestBranch{ - Repo: fakeRepository("r"), - Ref: github.String("develop"), - }, - } - status, err := client.ShaStatus(pr, "develop") - require.Nil(t, err) - assert.Equal(t, true, status) -} - -func TestShaStatusFailure(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/develop/protection", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "url": "https://github.com", - "required_status_checks": { - "url": "https://github.com", - "strict": true, - "contexts": [ - "context_1", - "context_2" - ], - "contexts_url": "https://github.com" - }, - "enforce_admins": { - "url": "https://github.com", - "enabled": true - } - } - `) - }) - mux.HandleFunc("/repos/o/r/commits/develop/status", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "state": "success", - "statuses": [ - { - "id": 15263, - "state": "success", - "context": "context_1" - }, - { - "id": 15265, - "state": "success", - "context": "context_2" - } - ] - } - `) - }) - mux.HandleFunc("/repos/o/r/branches/develop/protection/required_status_checks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "contexts": [ - "context_1", - "context_2" - ] - } - `) - }) - mux.HandleFunc("/repos/o/r/commits/develop/statuses", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "state": "failed", - "context": "context_1" - }, - { - "state": "success", - "context": "context_2" - }, - { - "state": "pending", - "context": "context_1" - } - ] - `) - }) - - pr := &github.PullRequest{ - Number: github.Int(1), - Base: &github.PullRequestBranch{ - Repo: fakeRepository("r"), - Ref: github.String("develop"), - }, - } - status, err := client.ShaStatus(pr, "develop") - require.Nil(t, err) - assert.Equal(t, false, status) -} - -func TestConfigFileSuccess(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/contents/.bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "bW9kZTogd2hpdGVsaXN0CnN0cmF0ZWd5OiBzcXVhc2gKZGVsZXRlQWZ0ZXJNZXJnZTogdHJ1ZQp1cGRhdGVTdHJhdGVneTogbGFiZWwK", - "name": ".bulldozer.yml", - "path": ".bulldozer.yml" - }`) - }) - - want := &BulldozerFile{ - Mode: "whitelist", - MergeStrategy: "squash", - UpdateStrategy: UpdateStrategyLabel, - DeleteAfterMerge: true, - } - configFile, err := client.ConfigFile(fakeRepository("r"), "develop") - require.Nil(t, err) - - if !reflect.DeepEqual(configFile, want) { - t.Errorf("ConfigFile returned %+v, want %+v", configFile, want) - } -} - -func TestConfigFileAlternatePathSuccess(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/contents/.palantir/bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "bW9kZTogd2hpdGVsaXN0CnN0cmF0ZWd5OiBzcXVhc2gKZGVsZXRlQWZ0ZXJNZXJnZTogdHJ1ZQp1cGRhdGVTdHJhdGVneTogbGFiZWwK", - "name": ".palantir/bulldozer.yml", - "path": ".palantir/bulldozer.yml" - }`) - }) - - want := &BulldozerFile{ - Mode: "whitelist", - MergeStrategy: "squash", - UpdateStrategy: UpdateStrategyLabel, - DeleteAfterMerge: true, - } - configFile, err := client.ConfigFile(fakeRepository("r"), "develop") - require.Nil(t, err) - - if !reflect.DeepEqual(configFile, want) { - t.Errorf("ConfigFile returned %+v, want %+v", configFile, want) - } -} - -func TestConfigFileInvalid(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/contents/.bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "invalidContent", - "name": ".bulldozer.yml", - "path": ".bulldozer.yml" - }`) - }) - - configFile, err := client.ConfigFile(fakeRepository("r"), "develop") - require.NotNil(t, err) - assert.Empty(t, configFile, ".bulldozer.yml not empty") -} - -func TestOperationModeInvalid(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/contents/.bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "bW9kZTogaW52YWxpZApzdHJhdGVneTogc3F1YXNoCmRlbGV0ZUFmdGVyTWVy\nZ2U6IHRydWUK\n", - "name": ".bulldozer.yml", - "path": ".bulldozer.yml" - }`) - }) - - branch := &github.PullRequestBranch{ - Ref: github.String("develop"), - Repo: fakeRepository("r"), - } - operationMode, err := client.OperationMode(branch) - require.NotNil(t, err) - assert.Empty(t, operationMode, "operationMode should be empty") -} - -func TestMergeMethodAllowed(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "allow_squash_merge": true, - "allow_merge_commit": true, - "allow_rebase_merge": true - }`) - }) - - mux.HandleFunc("/repos/o/r/contents/.bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "bW9kZTogd2hpdGVsaXN0CnN0cmF0ZWd5OiBzcXVhc2gKZGVsZXRlQWZ0ZXJN\nZXJnZTogdHJ1ZQo=\n", - "name": ".bulldozer.yml", - "path": ".bulldozer.yml" - }`) - }) - - branch := &github.PullRequestBranch{ - Ref: github.String("develop"), - Repo: fakeRepository("r"), - } - mergeMethod, err := client.MergeMethod(branch) - require.Nil(t, err) - assert.Equal(t, SquashMethod, mergeMethod) -} - -func TestMergeMethodDisallowed(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "allow_merge_commit": true, - "allow_squash_merge": false, - "allow_rebase_merge": true - }`) - }) - - mux.HandleFunc("/repos/o/r/contents/.bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "bW9kZTogd2hpdGVsaXN0CnN0cmF0ZWd5OiBzcXVhc2gKZGVsZXRlQWZ0ZXJN\nZXJnZTogdHJ1ZQo=\n", - "name": ".bulldozer.yml", - "path": ".bulldozer.yml" - }`) - }) - - branch := &github.PullRequestBranch{ - Ref: github.String("develop"), - Repo: fakeRepository("r"), - } - mergeMethod, err := client.MergeMethod(branch) - require.Nil(t, err) - assert.Equal(t, MergeMethod, mergeMethod) -} - -func TestCommitMessage(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "commit": { - "message": "1st commit msg" - } - }, - { - "commit": { - "message": "2nd commit msg" - } - }, - { - "commit": { - "message": "3rd commit msg" - } - } - ] - `) - - }) - - pr := fakePullRequest(1) - commitMessages, err := client.CommitMessages(pr) - require.Nil(t, err) - require.Equal(t, []string{ - "* 1st commit msg", "* 2nd commit msg", "* 3rd commit msg", - }, commitMessages) -} - -func TestSquashCommitMessage(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "commit": { - "message": "1st commit msg" - } - }, - { - "commit": { - "message": "2nd commit msg" - } - }, - { - "commit": { - "message": "3rd commit msg" - } - } - ] - `) - }) - - mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "allow_merge_commit": true, - "allow_squash_merge": true, - "allow_rebase_merge": true - }`) - }) - - mux.HandleFunc("/repos/o/r/contents/.bulldozer.yml", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "content": "bW9kZTogd2hpdGVsaXN0CnN0cmF0ZWd5OiBzcXVhc2gKZGVsZXRlQWZ0ZXJNZXJnZTogdHJ1ZQppZ25vcmVTcXVhc2hlZE1lc3NhZ2VzOiB0cnVlCg==", - "name": ".bulldozer.yml", - "path": ".bulldozer.yml" - }`) - }) - - branch := &github.PullRequestBranch{ - Ref: github.String("develop"), - Repo: fakeRepository("r"), - } - mergeMethod, err := client.MergeMethod(branch) - require.Nil(t, err) - assert.Equal(t, SquashMethod, mergeMethod) - - pr := fakePullRequest(1) - commitMessage, err := client.commitMessage(pr, mergeMethod) - require.Nil(t, err) - require.Equal(t, "", commitMessage) -} - -func TestExtractMessageOverride(t *testing.T) { - _, ok := extractMessageOverride("no override here") - assert.False(t, ok, "found unexpected message override") - - _, ok = extractMessageOverride("==COMITT_MSG==\r\nUnclosed message") - assert.False(t, ok, "found unexpected message override") - - msg, ok := extractMessageOverride("==COMMIT_MSG==\r\nThe real message\r\n==COMMIT_MSG==") - if assert.True(t, ok, "override was not found") { - assert.Equal(t, "The real message", msg) - } - - msg, ok = extractMessageOverride("==COMMIT_MSG== \r\nThe real message\r\n ==COMMIT_MSG==") - if assert.True(t, ok, "override was not found") { - assert.Equal(t, "The real message", msg) - } - - msg, ok = extractMessageOverride("==SQUASH_MSG==\nThe real message\n==SQUASH_MSG==") - if assert.True(t, ok, "override was not found") { - assert.Equal(t, "The real message", msg) - } -} diff --git a/github/hook_processor.go b/github/hook_processor.go deleted file mode 100644 index 5bc7c4709..000000000 --- a/github/hook_processor.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package github - -import ( - "github.com/google/go-github/github" - "github.com/labstack/echo" - "github.com/pkg/errors" - - "github.com/palantir/bulldozer/log" -) - -type ProcessResult struct { - Merge bool - SHA string - RepoID int - UpdatedRef string - Update bool -} - -func ProcessHook(c echo.Context, hookSecret string) (*ProcessResult, error) { - logger := log.FromContext(c) - - payload, err := github.ValidatePayload(c.Request(), []byte(hookSecret)) - if err != nil { - return nil, errors.Wrap(err, "cannot validate payload") - } - - webHookType := github.WebHookType(c.Request()) - webHook, err := github.ParseWebHook(webHookType, payload) - if err != nil { - return nil, errors.Wrap(err, "cannot parse webhook") - } - - logger.Debugf("Got a %s event", webHookType) - - switch event := webHook.(type) { - case (*github.StatusEvent): - merge := event.GetState() == "success" - return &ProcessResult{RepoID: event.Repo.GetID(), SHA: event.GetSHA(), Merge: merge}, nil - - case (*github.PullRequestEvent): - merge := event.GetAction() != "closed" - return &ProcessResult{RepoID: event.Repo.GetID(), SHA: event.PullRequest.Head.GetSHA(), Merge: merge}, nil - - case (*github.PullRequestReviewEvent): - return &ProcessResult{RepoID: event.Repo.GetID(), SHA: event.PullRequest.Head.GetSHA(), Merge: true}, nil - - case (*github.PushEvent): - return &ProcessResult{RepoID: event.Repo.GetID(), Update: true, UpdatedRef: event.GetRef()}, nil - - case (*github.PingEvent): - return &ProcessResult{}, nil - } - - return nil, errors.New("unknown event, ignoring") -} diff --git a/godel/config/check-plugin.yml b/godel/config/check-plugin.yml new file mode 100644 index 000000000..f6aa3b8ab --- /dev/null +++ b/godel/config/check-plugin.yml @@ -0,0 +1,17 @@ +checks: + golint: + filters: + - value: should have comment or be unexported + - value: or a comment on this block + novendor: + filters: + - value: github.com/stretchr/objx + errcheck: + filters: + - value: "Client\\.(Count|Gauge)" + config: + exclude: + - (*strings.Builder).Write + - (*strings.Builder).WriteByte + - (*strings.Builder).WriteRune + - (*strings.Builder).WriteString diff --git a/godel/config/check.yml b/godel/config/check.yml deleted file mode 100644 index 476845eb9..000000000 --- a/godel/config/check.yml +++ /dev/null @@ -1,8 +0,0 @@ -checks: - golint: - filters: - - value: "should have comment or be unexported" - - value: "or a comment on this block" - novendor: - filters: - - vaule: "github.com/google/go-querystring" \ No newline at end of file diff --git a/godel/config/generate.yml b/godel/config/conjure-plugin.yml similarity index 100% rename from godel/config/generate.yml rename to godel/config/conjure-plugin.yml diff --git a/godel/config/dist-plugin.yml b/godel/config/dist-plugin.yml new file mode 100644 index 000000000..2a9618f4a --- /dev/null +++ b/godel/config/dist-plugin.yml @@ -0,0 +1,33 @@ +product-defaults: + publish: + group-id: com.palantir.bulldozer + +products: + bulldozer: + dist: + output-dir: build + build: + output-dir: build + main-pkg: . + version-var: github.com/palantir/bulldozer/version.version + environment: + CGO_ENABLED: "0" + os-archs: + - os: linux + arch: amd64 + docker: + docker-builders: + bulldozer: + type: default + context-dir: build/docker + dockerfile-path: Dockerfile + input-products-dir: . + script: | + #!/usr/bin/env bash + cp -R docker/* ${CONTEXT_DIR} + tag-templates: + version: "{{Repository}}palantirtechnologies/bulldozer:{{Version}}" + latest: "{{Repository}}palantirtechnologies/bulldozer:latest" + snapshot: "{{Repository}}palantirtechnologies/bulldozer:snapshot" + publish: + group-id: com.palantir.bulldozer diff --git a/godel/config/dist.yml b/godel/config/dist.yml deleted file mode 100644 index d632c2f67..000000000 --- a/godel/config/dist.yml +++ /dev/null @@ -1,14 +0,0 @@ -products: - bulldozer: - build: - main-pkg: . - os-archs: - - os: linux - arch: amd64 - - os: darwin - arch: amd64 - version-var: github.com/palantir/bulldozer/version.version - dist: - dist-type: - type: bin -group-id: com.palantir.bulldozer diff --git a/godel/config/exclude.yml b/godel/config/exclude.yml deleted file mode 100644 index 9ed4d8576..000000000 --- a/godel/config/exclude.yml +++ /dev/null @@ -1,5 +0,0 @@ -names: - - "\\..+" - - "vendor" -paths: - - "godel" diff --git a/godel/config/format-plugin.yml b/godel/config/format-plugin.yml new file mode 100644 index 000000000..b2a3e9f35 --- /dev/null +++ b/godel/config/format-plugin.yml @@ -0,0 +1,4 @@ +formatters: + ptimports: + config: + separate-project-imports: true diff --git a/godel/config/format.yml b/godel/config/format.yml deleted file mode 100644 index b569c0a5f..000000000 --- a/godel/config/format.yml +++ /dev/null @@ -1,4 +0,0 @@ -formatters: - gofmt: - args: - - "-s" diff --git a/godel/config/godel.properties b/godel/config/godel.properties index 549b92a7c..29d8917ef 100644 --- a/godel/config/godel.properties +++ b/godel/config/godel.properties @@ -1,2 +1,2 @@ -distributionURL=https://palantir.bintray.com/releases/com/palantir/godel/godel/0.25.0/godel-0.25.0.tgz -distributionSHA256=a822869c80bec1e93c6237fc0ffd0cda0f61a21f4db7f184ec69aaba7b5a9bdb +distributionURL=https://palantir.bintray.com/releases/com/palantir/godel/godel/2.10.0/godel-2.10.0.tgz +distributionSHA256=503074b9177d05152f3225a4bd8fa1516182f9c35d88796fbbdc975637e06c45 diff --git a/godel/config/godel.yml b/godel/config/godel.yml new file mode 100644 index 000000000..0070595b1 --- /dev/null +++ b/godel/config/godel.yml @@ -0,0 +1,15 @@ +plugins: + resolvers: + - https://palantir.bintray.com/releases/{{GroupPath}}/{{Product}}/{{Version}}/{{Product}}-{{Version}}-{{OS}}-{{Arch}}.tgz + plugins: + - locator: + id: "com.palantir.godel-dep-plugin:dep-plugin:1.1.0" + checksums: + darwin-amd64: 946b0def510a7e94b46bb635a67f00c05243505e2a2ef9b0b7dab45b0437be1f + linux-amd64: cc2729e7f25c0121f841e237238c11514ee4c1376c458a1c4997ee86de17b209 +exclude: + names: + - \..+ + - vendor + paths: + - godel diff --git a/godel/config/imports.yml b/godel/config/imports.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/godel/config/license.yml b/godel/config/license-plugin.yml similarity index 91% rename from godel/config/license.yml rename to godel/config/license-plugin.yml index 89fff7aab..4ee7d40da 100644 --- a/godel/config/license.yml +++ b/godel/config/license-plugin.yml @@ -1,5 +1,5 @@ header: | - // Copyright 2017 Palantir Technologies, Inc. + // Copyright {{YEAR}} Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/godel/config/test-plugin.yml b/godel/config/test-plugin.yml new file mode 100644 index 000000000..59cbf4208 --- /dev/null +++ b/godel/config/test-plugin.yml @@ -0,0 +1,4 @@ +tags: + integration: + names: + - ^integration$ diff --git a/godel/config/test.yml b/godel/config/test.yml deleted file mode 100644 index e69de29bb..000000000 diff --git a/godelw b/godelw index 7cb22350f..78dc04e0f 100755 --- a/godelw +++ b/godelw @@ -3,9 +3,9 @@ set -euo pipefail # Version and checksums for godel. Values are populated by the godel "dist" task. -VERSION=0.25.0 -DARWIN_CHECKSUM=6b93011bdb3d037438308e3722901ba863ffb7ea4041b349b31f9b24a6515241 -LINUX_CHECKSUM=6e6bb9a04019d803eb94b617fa51cfeac1b224609163ae510e8d6e8f7f7d0dff +VERSION=2.10.0 +DARWIN_CHECKSUM=2f2d8a62e598f8a7784c92a0e6325251efa347d3550187a290ab72a9ed44917c +LINUX_CHECKSUM=36f963816d8e06ab6f41711fd66a75706d3ddb376de4edef80e4fd09688c97f5 # Downloads file at URL to destination path using wget or curl. Prints an error and exits if wget or curl is not present. function download { @@ -144,7 +144,7 @@ function verify_godel_version { local os=$3 local expected_output="godel version $version" - local version_output=$($base_dir/godel-$version/bin/$os-amd64/godel --verify-path=false version) + local version_output=$($base_dir/godel-$version/bin/$os-amd64/godel version) if [ "$expected_output" != "$version_output" ]; then echo "Version reported by godel executable did not match expected version: expected \"$expected_output\", was \"$version_output\"" diff --git a/main.go b/main.go index a8e744c72..c96fde199 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Copyright 2017 Palantir Technologies, Inc. +// Copyright 2018 Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,13 +15,21 @@ package main import ( - log "github.com/sirupsen/logrus" + "fmt" + "os" + + "github.com/palantir/go-baseapp/pkg/errfmt" "github.com/palantir/bulldozer/cmd" ) func main() { - log.SetFormatter(&log.JSONFormatter{}) - - cmd.Execute() + if err := cmd.RootCmd.Execute(); err != nil { + if cmd.IsDebugMode() { + fmt.Fprint(os.Stderr, errfmt.Print(err)+"\n") + } else { + fmt.Fprint(os.Stderr, err.Error()+"\n") + } + os.Exit(-1) + } } diff --git a/persist/repo.go b/persist/repo.go deleted file mode 100644 index 95c72ccc7..000000000 --- a/persist/repo.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package persist - -import ( - "fmt" - "strings" - - "github.com/jmoiron/sqlx" - "github.com/pkg/errors" -) - -type Repository struct { - ID int `db:"id"` - Name string `db:"name"` - EnabledBy string `db:"enabled_by"` - EnabledAt int64 `db:"enabled_at"` - HookID int `db:"hook_id"` -} - -func (*Repository) InsertStmt() string { - return "INSERT INTO REPOS (id, name, enabled_by, enabled_at, hook_id) VALUES (:id, :name, :enabled_by, :enabled_at, :hook_id)" -} - -func (*Repository) DeleteStmt() string { - return "DELETE FROM REPOS WHERE id = :id" -} - -func (*Repository) UpdateStmt() string { - return "TODO" -} - -func GetRepositoryByID(db *sqlx.DB, repoID int) (*Repository, error) { - r := &Repository{} - - q := fmt.Sprintf("SELECT * FROM REPOS WHERE id=%d", repoID) - row := db.QueryRowx(q) - err := row.StructScan(r) - - if err != nil { - if strings.Contains(err.Error(), "no rows in result set") { - return nil, nil - } - - return nil, errors.Wrapf(err, "cannot get repo %d", repoID) - } - - return r, nil -} diff --git a/persist/schema.go b/persist/schema.go deleted file mode 100644 index 5ebd484b7..000000000 --- a/persist/schema.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package persist - -import ( - "github.com/jmoiron/sqlx" - "github.com/pkg/errors" -) - -var metaSchema = ` -CREATE TABLE IF NOT EXISTS schema ( - version INTEGER PRIMARY KEY CHECK (version > 0) -); - -CREATE UNIQUE INDEX IF NOT EXISTS schema_one_row ON schema((TRUE));` - -var currSchemaVersion = 1 - -var schema = ` -CREATE TABLE IF NOT EXISTS USERS ( - github_id INTEGER PRIMARY KEY UNIQUE, - name TEXT, - token TEXT -); - -CREATE TABLE IF NOT EXISTS REPOS ( - id INTEGER PRIMARY KEY UNIQUE, - name TEXT, - enabled_by TEXT, - enabled_at BIGINT, - hook_id INTEGER -); -` - -// Persistable are structs that can be persisted to a DB and -// are compatible with associated utility methods in this package -type Persistable interface { - InsertStmt() string - DeleteStmt() string - UpdateStmt() string -} - -// Put persists a Persistable to the given DB -func Put(db *sqlx.DB, p Persistable) error { - _, err := db.NamedExec(p.InsertStmt(), p) - if err != nil { - return errors.Wrapf(err, "failed persisting %v", p) - } - return nil -} - -// Delete deletes a Persistable from the given DB -func Delete(db *sqlx.DB, p Persistable) error { - _, err := db.NamedExec(p.DeleteStmt(), p) - if err != nil { - return errors.Wrapf(err, "failed deleting %v", p) - } - return nil -} - -func Update(db *sqlx.DB, p Persistable) error { - _, err := db.NamedExec(p.UpdateStmt(), p) - if err != nil { - return errors.Wrapf(err, "failed updating %v", p) - } - return nil -} - -// InitializeSchema initializes the schema for storing artifact data -func InitializeSchema(db *sqlx.DB) error { - version, err := getSchemaVersion(db) - if err != nil { - return errors.Wrapf(err, "failed to determine database schema version") - } - if version != currSchemaVersion { - err := migrateSchema(db, currSchemaVersion) - if err != nil { - return errors.Wrapf(err, "failed migrating database schema from version %d to %d", version, currSchemaVersion) - } - } - _, err = db.Exec(schema) - if err != nil { - return errors.Wrapf(err, "failed initializing database schema") - } - return nil -} - -func getSchemaVersion(db *sqlx.DB) (int, error) { - _, err := db.Exec(metaSchema) - if err != nil { - return 0, errors.Wrapf(err, "failed initializing schema table") - } - var version []int - err = db.Select(&version, "SELECT version FROM schema") - if err != nil { - return 0, errors.Wrapf(err, "failed querying schema table") - } - if len(version) == 0 { - _, err := db.Exec("INSERT INTO schema (version) VALUES ($1)", currSchemaVersion) - if err != nil { - return 0, errors.Wrapf(err, "failed setting schema version in database") - } - version = append(version, currSchemaVersion) - } - return version[0], nil -} - -func migrateSchema(db *sqlx.DB, schemaVersion int) error { - return errors.New("SCHEMA MIGRATION NOT IMPLEMENTED AT THIS TIME :(") -} diff --git a/persist/user.go b/persist/user.go deleted file mode 100644 index bf6caeeb3..000000000 --- a/persist/user.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package persist - -import ( - "fmt" - "strings" - - "github.com/jmoiron/sqlx" - "github.com/pkg/errors" -) - -type User struct { - GithubID int `db:"github_id"` - Name string `db:"name"` - Token string `db:"token"` -} - -func (*User) InsertStmt() string { - return "INSERT INTO USERS (github_id, name, token) VALUES (:github_id, :name, :token)" -} - -func (*User) DeleteStmt() string { - return "DELETE FROM USERS WHERE github_id = :github_id" -} - -func (*User) UpdateStmt() string { - return "UPDATE USERS SET token = :token WHERE github_id = :github_id" -} - -func GetUserByName(db *sqlx.DB, name string) (*User, error) { - u := &User{} - - q := fmt.Sprintf("SELECT * FROM USERS WHERE name='%s'", name) - row := db.QueryRowx(q) - err := row.StructScan(u) - - if err != nil { - if strings.Contains(err.Error(), "no rows in result set") { - return nil, nil - } - - return nil, errors.Wrapf(err, "cannot get user %s", name) - } - - return u, nil -} - -func GetUserByID(db *sqlx.DB, id int) (*User, error) { - u := &User{} - - q := fmt.Sprintf("SELECT * FROM USERS WHERE github_id='%d'", id) - row := db.QueryRowx(q) - err := row.StructScan(u) - - if err != nil { - return nil, errors.Wrapf(err, "cannot get user %d", id) - } - - return u, nil -} - -func UpdateUserToken(db *sqlx.DB, id int, token string) error { - q := fmt.Sprintf("UPDATE USERS SET token='%s' WHERE github_id='%d'", token, id) - return db.QueryRowx(q).Err() -} diff --git a/pull/context.go b/pull/context.go new file mode 100644 index 000000000..e3212e8d6 --- /dev/null +++ b/pull/context.go @@ -0,0 +1,66 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pull + +import ( + "context" +) + +// Context is the context for a pull request. It defines methods to get +// information about the pull request. It is assumed that the implementation +// is not thread safe. +// +// A new Context should be created each time a Pull Request is being evaluated +// such that implementations are not required to consider cache invalidation. +type Context interface { + // The Pull Request repository owner + Owner() string + + // The Pull Request repository name + Repo() string + + // The Pull Request Number + Number() int + + // Locator returns a locator string for the pull request. The locator + // string is formatted as "/#" + Locator() string + + // Title returns the pull request title + Title(ctx context.Context) (string, error) + + // Body returns the pull request body + Body(ctx context.Context) (string, error) + + // RequiredStatuses returns the names of the required status + // checks for the pull request. + RequiredStatuses(ctx context.Context) ([]string, error) + + // CurrentSuccessStatuses returns the names of all currently + // successful status checks for the pull request. + CurrentSuccessStatuses(ctx context.Context) ([]string, error) + + // Comments lists all comments on a Pull Request + Comments(ctx context.Context) ([]string, error) + + // Labels lists all labels on a Pull Request + Labels(ctx context.Context) ([]string, error) + + // Branches returns the base (also known as target) and head branch names + // of this pull request. Branches in this repository have no prefix, while + // branches in forks are prefixed with the owner of the fork and a colon. + // The base branch will always be unprefixed. + Branches(ctx context.Context) (base string, head string, err error) +} diff --git a/pull/github_context.go b/pull/github_context.go new file mode 100644 index 000000000..bbba41573 --- /dev/null +++ b/pull/github_context.go @@ -0,0 +1,190 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pull + +import ( + "context" + "fmt" + "net/http" + + "github.com/google/go-github/github" + "github.com/pkg/errors" +) + +// GithubContext is a Context implementation that gets information from GitHub. +// A new instance must be created for each request. +type GithubContext struct { + client *github.Client + + owner string + repo string + number int + pr *github.PullRequest + + // cached fields + comments []string + requiredStatuses []string + successStatuses []string +} + +func NewGithubContext(client *github.Client, pr *github.PullRequest, owner, repo string, number int) Context { + return &GithubContext{ + client: client, + + pr: pr, + owner: owner, + repo: repo, + number: number, + } +} + +func (ghc *GithubContext) Owner() string { + return ghc.owner +} + +func (ghc *GithubContext) Repo() string { + return ghc.repo +} + +func (ghc *GithubContext) Number() int { + return ghc.number +} + +func (ghc *GithubContext) Locator() string { + return fmt.Sprintf("%s/%s#%d", ghc.owner, ghc.repo, ghc.number) +} + +func (ghc *GithubContext) Title(ctx context.Context) (string, error) { + return ghc.pr.GetTitle(), nil +} + +func (ghc *GithubContext) Body(ctx context.Context) (string, error) { + return ghc.pr.GetBody(), nil +} + +func (ghc *GithubContext) Comments(ctx context.Context) ([]string, error) { + if ghc.comments == nil { + + prCommentOpts := &github.PullRequestListCommentsOptions{ListOptions: github.ListOptions{PerPage: 100}} + for { + comments, res, err := ghc.client.PullRequests.ListComments(ctx, ghc.owner, ghc.repo, ghc.number, prCommentOpts) + if err != nil { + return nil, errors.Wrap(err, "failed to list pull request comments") + } + + for _, c := range comments { + ghc.comments = append(ghc.comments, c.GetBody()) + } + + if res.NextPage == 0 { + break + } + prCommentOpts.Page = res.NextPage + } + + issueCommentOpts := &github.IssueListCommentsOptions{ListOptions: github.ListOptions{PerPage: 100}} + for { + comments, res, err := ghc.client.Issues.ListComments(ctx, ghc.owner, ghc.repo, ghc.number, issueCommentOpts) + if err != nil { + return nil, errors.Wrap(err, "failed to list issue comments") + } + + for _, c := range comments { + ghc.comments = append(ghc.comments, c.GetBody()) + } + + if res.NextPage == 0 { + break + } + issueCommentOpts.Page = res.NextPage + } + } + + return ghc.comments, nil +} + +func (ghc *GithubContext) RequiredStatuses(ctx context.Context) ([]string, error) { + if ghc.requiredStatuses == nil { + requiredStatuses, _, err := ghc.client.Repositories.GetRequiredStatusChecks(ctx, ghc.owner, ghc.repo, ghc.pr.GetBase().GetRef()) + if err != nil { + if isNotFound(err) { + // Github returns 404 when there are no branch protections + return nil, nil + } + return ghc.requiredStatuses, errors.Wrapf(err, "cannot get required status checks for %s", ghc.Locator()) + } + ghc.requiredStatuses = requiredStatuses.Contexts + } + + return ghc.requiredStatuses, nil +} + +func isNotFound(err error) bool { + rerr, ok := err.(*github.ErrorResponse) + return ok && rerr.Response.StatusCode == http.StatusNotFound +} + +func (ghc *GithubContext) CurrentSuccessStatuses(ctx context.Context) ([]string, error) { + if ghc.successStatuses == nil { + opts := &github.ListOptions{PerPage: 100} + var successStatuses []string + + for { + combinedStatus, res, err := ghc.client.Repositories.GetCombinedStatus(ctx, ghc.owner, ghc.repo, ghc.pr.GetHead().GetSHA(), opts) + if err != nil { + return ghc.successStatuses, errors.Wrapf(err, "cannot get combined status for SHA %s on %s", ghc.pr.GetHead().GetSHA(), ghc.Locator()) + } + + for _, s := range combinedStatus.Statuses { + if s.GetState() == "success" { + successStatuses = append(successStatuses, s.GetContext()) + } + } + + if res.NextPage == 0 { + break + } + opts.Page = res.NextPage + } + + ghc.successStatuses = successStatuses + } + + return ghc.successStatuses, nil +} + +func (ghc *GithubContext) Branches(ctx context.Context) (base string, head string, err error) { + base = ghc.pr.GetBase().GetRef() + + // Check for forks + if ghc.pr.GetHead().GetRepo().GetID() == ghc.pr.GetBase().GetRepo().GetID() { + head = ghc.pr.GetHead().GetRef() + } else { + head = ghc.pr.GetHead().GetLabel() + } + + return +} + +func (ghc *GithubContext) Labels(ctx context.Context) ([]string, error) { + var labelNames []string + for _, label := range ghc.pr.Labels { + labelNames = append(labelNames, label.GetName()) + } + return labelNames, nil +} + +// type assertion +var _ Context = &GithubContext{} diff --git a/pull/pull_requests.go b/pull/pull_requests.go new file mode 100644 index 000000000..ce2ae268b --- /dev/null +++ b/pull/pull_requests.go @@ -0,0 +1,92 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pull + +import ( + "context" + "fmt" + + "github.com/google/go-github/github" + "github.com/pkg/errors" + "github.com/rs/zerolog" +) + +// ListOpenPullRequestsForSHA returns all pull requests where the HEAD of the source branch +// in the pull request matches the given SHA. +func ListOpenPullRequestsForSHA(ctx context.Context, client *github.Client, owner, repoName, SHA string) ([]*github.PullRequest, error) { + var results []*github.PullRequest + + openPRs, err := ListOpenPullRequests(ctx, client, owner, repoName) + + if err != nil { + return nil, err + } + + for _, openPR := range openPRs { + if openPR.Head.GetSHA() == SHA { + results = append(results, openPR) + } + } + + return results, nil +} + +func ListOpenPullRequestsForRef(ctx context.Context, client *github.Client, owner, repoName, ref string) ([]*github.PullRequest, error) { + var results []*github.PullRequest + logger := zerolog.Ctx(ctx) + + openPRs, err := ListOpenPullRequests(ctx, client, owner, repoName) + + if err != nil { + return nil, err + } + + for _, openPR := range openPRs { + formattedRef := fmt.Sprintf("refs/heads/%s", openPR.GetBase().GetRef()) + logger.Debug().Msgf("found open pull request with base ref %s", formattedRef) + if formattedRef == ref { + results = append(results, openPR) + } + } + + return results, nil +} + +func ListOpenPullRequests(ctx context.Context, client *github.Client, owner, repoName string) ([]*github.PullRequest, error) { + var results []*github.PullRequest + + opts := &github.PullRequestListOptions{ + State: "open", + ListOptions: github.ListOptions{ + PerPage: 100, + }, + } + + for { + prs, resp, err := client.PullRequests.List(ctx, owner, repoName, opts) + if err != nil { + return results, errors.Wrapf(err, "failed to list pull requests for repository %s/%s", owner, repoName) + } + for _, pr := range prs { + results = append(results, pr) + } + if resp.NextPage == 0 { + break + } + opts.ListOptions.Page = resp.NextPage + } + + return results, nil +} diff --git a/pull/pulltest/mock_context.go b/pull/pulltest/mock_context.go new file mode 100644 index 000000000..77582bced --- /dev/null +++ b/pull/pulltest/mock_context.go @@ -0,0 +1,102 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pulltest + +import ( + "context" + + "github.com/palantir/bulldozer/pull" +) + +// MockPullContext is a dummy Context implementation. +type MockPullContext struct { + OwnerValue string + RepoValue string + NumberValue int + + TitleValue string + TitleErrValue error + + BodyValue string + BodyErrValue error + + LocatorValue string + + LabelValue []string + LabelErrValue error + + CommentValue []string + CommentErrValue error + + RequiredStatusesValue []string + RequiredStatusesErrValue error + + SuccessStatusesValue []string + SuccessStatusesErrValue error + + BranchBase string + BranchName string + BranchErrValue error +} + +func (c *MockPullContext) Owner() string { + return c.OwnerValue +} + +func (c *MockPullContext) Repo() string { + return c.RepoValue +} + +func (c *MockPullContext) Number() int { + return c.NumberValue +} + +func (c *MockPullContext) Locator() string { + if c.LocatorValue != "" { + return c.LocatorValue + } + return "pulltest/context#1" +} + +func (c *MockPullContext) Title(ctx context.Context) (string, error) { + return c.TitleValue, c.TitleErrValue +} + +func (c *MockPullContext) Body(ctx context.Context) (string, error) { + return c.BodyValue, c.BodyErrValue +} + +func (c *MockPullContext) Comments(ctx context.Context) ([]string, error) { + return c.CommentValue, c.CommentErrValue +} + +func (c *MockPullContext) RequiredStatuses(ctx context.Context) ([]string, error) { + return c.RequiredStatusesValue, c.RequiredStatusesErrValue +} + +func (c *MockPullContext) CurrentSuccessStatuses(ctx context.Context) ([]string, error) { + return c.SuccessStatusesValue, c.SuccessStatusesErrValue +} + +func (c *MockPullContext) Branches(ctx context.Context) (base string, head string, err error) { + return c.BranchBase, c.BranchName, c.BranchErrValue +} + +func (c *MockPullContext) Labels(ctx context.Context) ([]string, error) { + return c.LabelValue, c.LabelErrValue +} + +// type assertion +var _ pull.Context = &MockPullContext{} diff --git a/scripts/make_client.sh b/scripts/make_client.sh deleted file mode 100755 index f285ad3c8..000000000 --- a/scripts/make_client.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -##### Config ##### - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ROOT_DIR="$( cd "$SCRIPT_DIR/.." && pwd)" -CLIENT_DIR="${ROOT_DIR}/client" - -################## - -die () { - echo >&2 "$1" - exit 1 -} - -have_yarn() { - hash yarn &> /dev/null -} - -have_node6() { - hash node &> /dev/null && [ $(node --version | sed 's/^v\([0-9]\).*/\1/') -ge 6 ] -} - -check_prereqs() { - have_node6 || die "Error: node 6.x or newer must be installed and on the PATH." - have_yarn || die "Error: yarn must be installed and on the PATH." -} - -install_and_bundle() { - cd ${CLIENT_DIR} - yarn install - ./node_modules/.bin/webpack -} - -##### Main ##### - -check_prereqs -install_and_bundle -echo "Installed dependencies and built client bundle" \ No newline at end of file diff --git a/scripts/publish_docker.sh b/scripts/publish_docker.sh deleted file mode 100755 index 36dfb117e..000000000 --- a/scripts/publish_docker.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -u - -docker login -u "${DOCKERHUB_USERNAME}" -p "${DOCKERHUB_PASSWORD}" - -if git describe --exact-match --tags HEAD; then - docker tag palantirtechnologies/bulldozer palantirtechnologies/bulldozer:$(./godelw project-version) - docker push palantirtechnologies/bulldozer:$(./godelw project-version) -else - docker tag palantirtechnologies/bulldozer palantirtechnologies/bulldozer:snapshot - docker push palantirtechnologies/bulldozer:snapshot -fi diff --git a/server/config.go b/server/config.go new file mode 100644 index 000000000..f0d7f3382 --- /dev/null +++ b/server/config.go @@ -0,0 +1,67 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package server + +import ( + "github.com/palantir/go-baseapp/baseapp" + "github.com/palantir/go-baseapp/baseapp/datadog" + "github.com/palantir/go-githubapp/githubapp" + "github.com/pkg/errors" + "gopkg.in/yaml.v2" +) + +const ( + DefaultAppName = "bulldozer" + DefaultConfigurationV1Path = ".bulldozer.v1.yml" +) + +type Config struct { + Server baseapp.HTTPConfig `yaml:"server"` + Github githubapp.Config `yaml:"github"` + Options Options `yaml:"options"` + Logging LoggingConfig `yaml:"logging"` + Datadog datadog.Config `yaml:"datadog"` +} + +type LoggingConfig struct { + Level string `yaml:"level"` + Text bool `yaml:"text"` +} + +type Options struct { + AppName string `yaml:"app_name"` + ConfigurationPath string `yaml:"configuration_path"` + ConfigurationV0Paths []string `yaml:"configuration_v0_paths"` +} + +func (o *Options) fillDefaults() { + if o.AppName == "" { + o.AppName = DefaultAppName + } + + if o.ConfigurationPath == "" { + o.ConfigurationPath = DefaultConfigurationV1Path + } +} + +func ParseConfig(bytes []byte) (*Config, error) { + var c Config + err := yaml.UnmarshalStrict(bytes, &c) + if err != nil { + return nil, errors.Wrapf(err, "failed unmarshaling yaml") + } + + return &c, nil +} diff --git a/server/config/config.go b/server/config/config.go deleted file mode 100644 index d628899a5..000000000 --- a/server/config/config.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - "gopkg.in/go-playground/validator.v9" - "gopkg.in/yaml.v2" -) - -const ( - EchoLoggingFormat = `{"time":"${time_rfc3339_nano}","id":"${id}","remote_ip":"${remote_ip}","x_forwarded_for":"${header:X-Forwarded-For}",host":"${host}",` + - `"method":"${method}","uri":"${uri}","status":${status}, "latency":${latency},` + - `"latency_human":"${latency_human}","bytes_in":${bytes_in},` + - `"bytes_out":${bytes_out}}` + "\n" -) - -var ( - validate *validator.Validate - - Instance *Startup - - DoNotMerge = []string{"do not merge", "wip", "do-not-merge", "do_not_merge"} - MergeWhenReady = []string{"merge when ready", "merge-when-ready", "merge_when_ready"} - UpdateMe = []string{"update me", "update-me", "update_me"} -) - -type Startup struct { - Server Rest `yaml:"rest" validate:"required"` - Logging LoggingConfig `yaml:"logging" validate:"required,dive"` - Database *DatabaseConfig `yaml:"database" validate:"required,dive"` - Github *GithubConfig `yaml:"github" validate:"required,dive"` - AssetDir string `yaml:"assetDir" validate:"required"` - ConfigPaths []string `yaml:"configPaths"` -} - -type Rest struct { - Address string `yaml:"address" validate:"required"` - Port int `yaml:"port" validate:"required"` -} - -type LoggingConfig struct { - Level string `yaml:"level" validate:"required"` -} - -type DatabaseConfig struct { - DBName string `yaml:"name" validate:"required"` - Host string `yaml:"host" validate:"required"` - Username string `yaml:"username" validate:"required"` - Password string `yaml:"password" validate:"required"` - SSLMode string `yaml:"sslmode" validate:"required"` -} - -type GithubConfig struct { - Address string `yaml:"address" validate:"required"` - APIURL string `yaml:"apiURL" validate:"required"` - CallbackURL string `yaml:"callbackURL" validate:"required"` - ClientID string `yaml:"clientID" validate:"required"` - ClientSecret string `yaml:"clientSecret" validate:"required"` - WebHookURL string `yaml:"webhookURL" validate:"required"` - WebhookSecret string `yaml:"webhookSecret" validate:"required"` -} - -func Parse(bytes []byte) (*Startup, error) { - var c Startup - err := yaml.Unmarshal(bytes, &c) - if err != nil { - return nil, errors.Wrapf(err, "failed unmarshalling yaml") - } - - err = validateConfig(&c) - if err != nil { - return nil, errors.Wrapf(err, "failed basic config validation") - } - - return &c, nil -} - -func (s *Startup) LogLevel() logrus.Level { - level, _ := logrus.ParseLevel(s.Logging.Level) - return level -} - -func validateConfig(c *Startup) error { - if err := validate.Struct(c); err != nil { - return errors.Wrapf(err, "failed validating struct") - } - - if c.Database.SSLMode == "" { - c.Database.SSLMode = "require" - } - - if err := validate.Var(c.Database.SSLMode, "sslmode"); err != nil { - return errors.Wrapf(err, "invalid sslmode") - } - - if err := validate.Var(c.Logging.Level, "level"); err != nil { - return errors.Wrapf(err, "invalid log level") - } - - return nil -} - -func in(test string, strings []string) bool { - for _, s := range strings { - if s == test { - return true - } - } - return false -} - -func isSSLMode(fl validator.FieldLevel) bool { - allowedModes := []string{"disable", "require", "verify-ca", "verify-full"} - return in(fl.Field().String(), allowedModes) -} - -func isAllowedLogLevel(fl validator.FieldLevel) bool { - allowedLevels := []string{"debug", "info", "warning", "error", "fatal", "panic"} - return in(fl.Field().String(), allowedLevels) -} - -func init() { - validate = validator.New() - _ = validate.RegisterValidation("level", isAllowedLogLevel) - _ = validate.RegisterValidation("sslmode", isSSLMode) -} diff --git a/server/endpoints/hook.go b/server/endpoints/hook.go deleted file mode 100644 index db5643f47..000000000 --- a/server/endpoints/hook.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package endpoints - -import ( - "fmt" - "net/http" - "strings" - - "github.com/google/go-github/github" - "github.com/jmoiron/sqlx" - "github.com/labstack/echo" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - - gh "github.com/palantir/bulldozer/github" - "github.com/palantir/bulldozer/log" - "github.com/palantir/bulldozer/persist" - "github.com/palantir/bulldozer/server/config" -) - -func Hook(db *sqlx.DB, secret string, configPaths []string) echo.HandlerFunc { - return func(c echo.Context) error { - logger := log.FromContext(c) - - result, err := gh.ProcessHook(c, secret) - if err != nil { - return errors.Wrap(err, "cannot process hook") - } - - logger.Debugf("ProcessHook returned %+v", result) - - dbRepo, err := persist.GetRepositoryByID(db, result.RepoID) - if err != nil { - return errors.Wrapf(err, "cannot get repo with id %d from database", result.RepoID) - } - - if dbRepo == nil { - return errors.Wrapf(err, "repository with ID not enabled", result.RepoID) - } - - user, err := persist.GetUserByName(db, dbRepo.EnabledBy) - if err != nil { - return errors.Wrapf(err, "cannot get user %s from database", dbRepo.EnabledBy) - } - - ghClient := gh.FromToken(c, user.Token, gh.WithConfigPaths(configPaths)) - - if !(result.Update || result.Merge) { - return c.String(http.StatusOK, "Not taking action") - } - - repo, _, err := ghClient.Repositories.GetByID(ghClient.Ctx, result.RepoID) - if err != nil { - return errors.Wrapf(err, "cannot get repo with id %d from GitHub", result.RepoID) - } - - owner := repo.Owner.GetLogin() - name := repo.GetName() - - if result.Update { - updatedRef := result.UpdatedRef - pullRequests, err := ghClient.AllPullRequests(repo) - if err != nil { - return errors.Wrapf(err, "cannot get all open PRs for %s", repo.GetFullName()) - } - var updateTargets []*github.PullRequest - - for _, pr := range pullRequests { - if fmt.Sprintf("refs/heads/%s", pr.Base.GetRef()) == updatedRef { - updateTargets = append(updateTargets, pr) - } - } - - for _, pr := range updateTargets { - repoConfig, err := ghClient.ConfigFile(repo, *pr.Base.Ref) - if err != nil { - return err - } - - // Validate that we should update - switch repoConfig.UpdateStrategy { - case gh.UpdateStrategyLabel: - if shouldUpdate, err := shouldUpdatePR(logger, ghClient, repo, pr); err != nil { - return err - } else if !shouldUpdate { - continue - } - case gh.UpdateStrategyAlways: - } - - if pr.Head.Repo.GetFork() { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Debug("Pull request is from a fork, cannot keep it up to date with base ref") - continue - } - - comparison, _, err := ghClient.Repositories.CompareCommits(ghClient.Ctx, owner, name, updatedRef, pr.Head.GetRef()) - if err != nil { - return errors.Wrapf(err, "cannot compare %s vs %s for %s", updatedRef, pr.Head.GetRef(), repo.GetFullName()) - } - if comparison.GetBehindBy() > 0 { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "aheadBy": comparison.GetAheadBy(), - "behindBy": comparison.GetBehindBy(), - }).Debug("Pull request is not up to date with base ref") - mergeRequest := &github.RepositoryMergeRequest{ - Base: github.String(pr.Head.GetRef()), - Head: github.String(updatedRef), - } - mergeCommit, _, err := ghClient.Repositories.Merge(ghClient.Ctx, owner, name, mergeRequest) - if err != nil { - return errors.Wrapf(err, "cannot merge %s into %s for %s", updatedRef, pr.Head.GetRef(), repo.GetFullName()) - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - "updatedRef": updatedRef, - "mergeSHA": mergeCommit.GetSHA(), - }).Info("Base ref has been merged into head ref of pull request") - } - } - - return c.String(http.StatusOK, "Updated pull requests") - } - - pr, err := ghClient.PullRequestForSHA(repo, result.SHA) - if err != nil { - return errors.Wrapf(err, "cannot get PR for %s/%s", repo.GetFullName(), result.SHA) - } - if pr == nil { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "sha": result.SHA, - }).Debug("SHA is not head of an open pull request") - return c.NoContent(http.StatusOK) - } - - mode, err := ghClient.OperationMode(pr.Base) - if err != nil { - return errors.Wrapf(err, "cannot get operation mode for %s/%s", repo.GetFullName(), pr.Base.GetRef()) - } - - switch mode { - case gh.ModeBlacklist: - hasDoNotMerge, err := ghClient.HasLabels(pr, config.DoNotMerge) - if err != nil { - return errors.Wrapf(err, "cannot get labels for %s-%d", repo.GetFullName(), pr.GetNumber()) - } - if hasDoNotMerge { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Info("Pull request has do not merge label") - return c.String(http.StatusOK, fmt.Sprintf("Skipping PR %d", pr.GetNumber())) - } - case gh.ModeWhitelist: - hasMergeWhenReady, err := ghClient.HasLabels(pr, config.MergeWhenReady) - if err != nil { - return errors.Wrapf(err, "cannot get labels for %s-%d", repo.GetFullName(), pr.GetNumber()) - } - if !hasMergeWhenReady { - logger.Infof("%s-%d does not have merge when ready label, skipping", repo.GetFullName(), pr.GetNumber()) - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Info("Pull request doest not have merge when ready label") - return c.String(http.StatusOK, fmt.Sprintf("Skipping PR %d", pr.GetNumber())) - } - case gh.ModeBody: - if !strings.Contains(pr.GetBody(), "==MERGE_WHEN_READY==") { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Info("Pull request does not have ==MERGE_WHEN_READY== body content") - return c.String(http.StatusOK, fmt.Sprintf("Skipping PR %d", pr.GetNumber())) - } - } - - reviewStatus, err := ghClient.ReviewStatus(pr) - if err != nil { - return errors.Wrapf(err, "cannot get review state for %s-%d", repo.GetFullName(), pr.GetNumber()) - } - shaStatus, err := ghClient.ShaStatus(pr, result.SHA) - if err != nil { - return errors.Wrapf(err, "cannot evaluate status for %s-%s", repo.GetFullName(), result.SHA) - } - - overallStatus := shaStatus && reviewStatus && pr.GetMergeable() - - logger.Infof("%s-%d has sha status %v, review status %v and mergeable %v", repo.GetFullName(), pr.GetNumber(), shaStatus, reviewStatus, pr.GetMergeable()) - - switch overallStatus { - case true: - logger.Infof("Merging %s-%d", repo.GetFullName(), pr.GetNumber()) - err := ghClient.Merge(pr) - if err != nil { - return errors.Wrapf(err, "cannot merge %s-%d into target branch %s", repo.GetFullName(), pr.GetNumber(), pr.Base.GetRef()) - } - default: - msg := fmt.Sprintf("SHA %s on %s-%d has state %v, not doing anything", result.SHA, repo.GetFullName(), pr.GetNumber(), overallStatus) - logger.Info(msg) - return c.String(http.StatusOK, msg) - } - - zen, _, _ := ghClient.Zen(ghClient.Ctx) - msg := fmt.Sprintf("Action executed successfuly! Here is some zen: %s", zen) - - return c.String(http.StatusOK, msg) - } -} - -func shouldUpdatePR(logger *logrus.Entry, ghClient *gh.Client, repo *github.Repository, pr *github.PullRequest) (bool, error) { - updateLabel, err := ghClient.HasLabels(pr, config.UpdateMe) - if err != nil { - return false, errors.Wrapf(err, "cannot check if %s-%d has update label", repo.GetFullName(), pr.GetNumber()) - } - if !updateLabel { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "pr": pr.GetNumber(), - }).Info("Pull request does not have update me label, not updating") - return false, nil - } - return true, nil -} diff --git a/server/endpoints/repositories.go b/server/endpoints/repositories.go deleted file mode 100644 index cac5a534b..000000000 --- a/server/endpoints/repositories.go +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package endpoints - -import ( - "fmt" - "net/http" - "sync" - "time" - - "github.com/google/go-github/github" - "github.com/jmoiron/sqlx" - "github.com/labstack/echo" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" - - gh "github.com/palantir/bulldozer/github" - "github.com/palantir/bulldozer/log" - "github.com/palantir/bulldozer/persist" -) - -type Repository struct { - ID int `json:"id"` - Owner string `json:"owner"` - Name string `json:"name"` - IsEnabled bool `json:"isEnabled"` - IsUserAdmin bool `json:"isUserAdmin"` - EnabledBy string `json:"enabledBy,omitempty"` - EnabledAt string `json:"enabledAt,omitempty"` -} - -func worker(c echo.Context, db *sqlx.DB, wg *sync.WaitGroup, repo *github.Repository, repoc chan *Repository, user *github.User, client *gh.Client) { - logger := log.FromContext(c) - defer wg.Done() - - var isAdmin, isEnabled bool - var enabledBy, enabledAt string - - perm, _, err := client.Repositories.GetPermissionLevel(client.Ctx, repo.Owner.GetLogin(), repo.GetName(), user.GetLogin()) - - if err != nil { - logger.Error(errors.Wrapf(err, "cannot get permission level for %s on %s", user.GetLogin(), repo.GetFullName())) - isAdmin = false - } else { - isAdmin = perm.GetPermission() == "admin" - } - - repository, err := persist.GetRepositoryByID(db, repo.GetID()) - if err != nil { - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - }).Error(errors.Wrap(err, "Cannot get repository from database")) - return - } - - if repository != nil { - isEnabled = true - enabledBy = repository.EnabledBy - enabledAt = time.Unix(repository.EnabledAt, 0).Format(time.RFC3339) - } - - repoc <- &Repository{ - ID: repo.GetID(), - Owner: repo.Owner.GetLogin(), - Name: repo.GetName(), - IsEnabled: isEnabled, - IsUserAdmin: isAdmin, - EnabledAt: enabledAt, - EnabledBy: enabledBy, - } -} - -func Repositories(db *sqlx.DB) echo.HandlerFunc { - return func(c echo.Context) error { - var repositories []*Repository - var wg sync.WaitGroup - - repoc := make(chan *Repository, 100) - - client, err := gh.FromAuthHeader(c, c.Request().Header.Get(echo.HeaderAuthorization)) - if err != nil { - return errors.Wrap(err, "cannot create GitHub client") - } - - user, _, err := client.Users.Get(client.Ctx, "") - if err != nil { - return errors.Wrap(err, "cannot get current user") - } - - myRepositories, err := client.AllRepositories(user) - if err != nil { - return errors.Wrap(err, "cannot list user repositories") - } - - wg.Add(len(myRepositories)) - for _, repo := range myRepositories { - go worker(c, db, &wg, repo, repoc, user, client) - } - - go func() { - wg.Wait() - close(repoc) - }() - - for repo := range repoc { - repositories = append(repositories, repo) - } - - return c.JSON(http.StatusOK, repositories) - } -} - -func RepositoryEnable(db *sqlx.DB, webHookURL string, webHookSecret string) echo.HandlerFunc { - return func(c echo.Context) error { - logger := log.FromContext(c) - - client, err := gh.FromAuthHeader(c, c.Request().Header.Get(echo.HeaderAuthorization)) - if err != nil { - return errors.Wrap(err, "cannot create GitHub client") - } - - user, _, err := client.Users.Get(client.Ctx, "") - if err != nil { - return errors.Wrap(err, "cannot get current user") - } - - owner := c.Param("owner") - name := c.Param("name") - repo, _, err := client.Repositories.Get(client.Ctx, owner, name) - if err != nil { - return errors.Wrapf(err, "cannot get %s/%s", owner, name) - } - - perms, _, err := client.Repositories.GetPermissionLevel(client.Ctx, owner, name, user.GetLogin()) - if err != nil { - return errors.Wrapf(err, "cannot get permission level for %s on %s", user.GetLogin(), repo.GetFullName()) - } - - if perms.GetPermission() != "admin" { - return echo.NewHTTPError(http.StatusUnauthorized, - fmt.Sprintf("%s does not have admin over %s", user.GetLogin(), repo.GetFullName())) - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "user": user.GetLogin(), - }).Debug("Creating hook on repository") - - hook, _, err := client.Repositories.CreateHook(client.Ctx, owner, name, &github.Hook{ - Name: github.String("web"), - URL: github.String(webHookURL), - Events: []string{"status", "pull_request_review", "pull_request", "push"}, - Config: map[string]interface{}{ - "name": "bulldozer", - "enabled_by": user.GetLogin(), - "enabled_at": time.Now().UTC().Format(time.RFC3339), - "url": webHookURL, - "secret": webHookSecret, - "content_type": "json", - }, - }) - - if err != nil { - return errors.Wrapf(err, "cannot add hook to %s/%s via %s", owner, name, user.GetLogin()) - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "user": user.GetLogin(), - }).Info("Created hook on repository") - - dbRepo := &persist.Repository{ - ID: repo.GetID(), - Name: repo.GetFullName(), - EnabledAt: time.Now().UTC().Unix(), - EnabledBy: user.GetLogin(), - HookID: hook.GetID(), - } - - err = persist.Put(db, dbRepo) - if err != nil { - _, e := client.Repositories.DeleteHook(client.Ctx, owner, name, hook.GetID()) - if e != nil { - logger.Error(errors.Wrapf(err, "cannot delete hook on %s/%s (repo not saved to DB)", owner, name)) - } - return errors.Wrapf(err, "cannot add %s/%s to the database", owner, name) - } - - data := struct { - ID int `json:"id"` - Owner string `json:"owner"` - Name string `json:"name"` - IsEnabled bool `json:"isEnabled"` - IsUserAdmin bool `json:"isUserAdmin"` - EnabledBy string `json:"enabledBy,omitempty"` - EnabledAt string `json:"enabledAt,omitempty"` - }{ - ID: repo.GetID(), - Owner: owner, - Name: name, - IsEnabled: true, - IsUserAdmin: true, - EnabledBy: user.GetLogin(), - EnabledAt: time.Now().UTC().Format(time.RFC3339), - } - - return c.JSON(http.StatusOK, data) - } -} - -func RepositoryDisable(db *sqlx.DB) echo.HandlerFunc { - return func(c echo.Context) error { - logger := log.FromContext(c) - - client, err := gh.FromAuthHeader(c, c.Request().Header.Get(echo.HeaderAuthorization)) - if err != nil { - return errors.Wrap(err, "cannot create GitHub client") - } - - user, _, err := client.Users.Get(client.Ctx, "") - if err != nil { - return errors.Wrap(err, "cannot get current user from GitHub") - } - - owner := c.Param("owner") - name := c.Param("name") - repo, _, err := client.Repositories.Get(client.Ctx, owner, name) - if err != nil { - return errors.Wrapf(err, "cannot get %s/%s from GitHub", owner, name) - } - - perms, _, err := client.Repositories.GetPermissionLevel(client.Ctx, owner, name, user.GetLogin()) - if err != nil { - return errors.Wrapf(err, "cannot get permission level for %s on %s", user.GetLogin(), repo.GetFullName()) - } - - if perms.GetPermission() != "admin" { - return echo.NewHTTPError(http.StatusUnauthorized, - fmt.Sprintf("%s does not have admin over %s", user.GetLogin(), repo.GetFullName())) - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "user": user.GetLogin(), - }).Debug("Deleting hook from repository") - - dbRepo, err := persist.GetRepositoryByID(db, repo.GetID()) - if err != nil { - return errors.Wrapf(err, "cannot get repo with ID %d from database", repo.GetID()) - } - _, err = client.Repositories.DeleteHook(client.Ctx, owner, name, dbRepo.HookID) - if err != nil { - return errors.Wrapf(err, "cannot delete hook %d for %s/%s via %s", owner, name, dbRepo.HookID, user.GetLogin()) - } - - logger.WithFields(logrus.Fields{ - "repo": repo.GetFullName(), - "user": user.GetLogin(), - }).Info("Deleted hook from repository") - - err = persist.Delete(db, dbRepo) - if err != nil { - return errors.Wrapf(err, "cannot remove %s/%s from database", owner, name) - } - - return c.String(http.StatusOK, fmt.Sprintf("Disabled repository %s", repo.GetFullName())) - } -} diff --git a/server/endpoints/token.go b/server/endpoints/token.go deleted file mode 100644 index 31ba757f2..000000000 --- a/server/endpoints/token.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package endpoints - -import ( - "context" - "net/http" - - "github.com/jmoiron/sqlx" - "github.com/labstack/echo" - "github.com/pkg/errors" - - "github.com/palantir/bulldozer/auth" - gh "github.com/palantir/bulldozer/github" - "github.com/palantir/bulldozer/log" - "github.com/palantir/bulldozer/persist" -) - -func Token(db *sqlx.DB) echo.HandlerFunc { - return func(c echo.Context) error { - logger := log.FromContext(c) - - token, err := auth.GithubOauthConfig.Exchange(context.TODO(), c.QueryParam("code")) - if err != nil { - return errors.Wrap(err, "Cannot get code from GitHub") - } - - accessToken := token.AccessToken - ghClient := gh.FromToken(c, accessToken) - u, _, err := ghClient.Users.Get(ghClient.Ctx, "") - if err != nil { - return errors.Wrap(err, "Cannot get user from token") - } - - user, err := persist.GetUserByID(db, u.GetID()) - if err != nil { - dbUser := &persist.User{ - GithubID: u.GetID(), - Name: u.GetLogin(), - Token: accessToken, - } - if err := persist.Put(db, dbUser); err != nil { - return errors.Wrapf(err, "Cannot add %s to the database", u.GetLogin()) - } - } else { - if user.Token != accessToken { - if err := persist.UpdateUserToken(db, u.GetID(), accessToken); err != nil { - return errors.Wrapf(err, "Cannot update token for user %s", u.GetLogin()) - } - logger.Debugf("Updated token for user %s", u.GetLogin()) - } - } - - p := struct { - Result string `json:"result"` - Token string `json:"token"` - }{ - Result: "ok", - Token: accessToken, - } - - return c.JSON(http.StatusOK, p) - } -} diff --git a/server/handler/base.go b/server/handler/base.go new file mode 100644 index 000000000..ec8069c2e --- /dev/null +++ b/server/handler/base.go @@ -0,0 +1,97 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handler + +import ( + "context" + + "github.com/google/go-github/github" + "github.com/palantir/go-githubapp/githubapp" + "github.com/pkg/errors" + "github.com/rs/zerolog" + + "github.com/palantir/bulldozer/bulldozer" + "github.com/palantir/bulldozer/pull" +) + +type Base struct { + githubapp.ClientCreator + bulldozer.ConfigFetcher +} + +func (b *Base) ProcessPullRequest(ctx context.Context, pullCtx pull.Context, client *github.Client, pr *github.PullRequest) error { + logger := zerolog.Ctx(ctx) + + bulldozerConfig, err := b.ConfigForPR(ctx, client, pr) + if err != nil { + return errors.Wrap(err, "failed to fetch configuration") + } + + switch { + case bulldozerConfig.Missing(): + logger.Debug().Msgf("No bulldozer configuration for %q", bulldozerConfig.String()) + case bulldozerConfig.Invalid(): + logger.Debug().Msgf("Bulldozer configuration is invalid for %q", bulldozerConfig.String()) + default: + logger.Debug().Msgf("Bulldozer configuration is valid for %q", bulldozerConfig.String()) + config := *bulldozerConfig.Config + shouldMerge, err := bulldozer.ShouldMergePR(ctx, pullCtx, config.Merge) + if err != nil { + return errors.Wrap(err, "unable to determine merge status") + } + if shouldMerge { + logger.Debug().Msg("Pull request should be merged") + if err := bulldozer.MergePR(ctx, pullCtx, client, config.Merge); err != nil { + return errors.Wrap(err, "failed to merge pull request") + } + } + } + + return nil +} + +func (b *Base) UpdatePullRequest(ctx context.Context, pullCtx pull.Context, client *github.Client, pr *github.PullRequest, baseRef string) error { + logger := zerolog.Ctx(ctx) + + bulldozerConfig, err := b.ConfigForPR(ctx, client, pr) + if err != nil { + return errors.Wrap(err, "failed to fetch configuration") + } + + switch { + case bulldozerConfig.Missing(): + logger.Debug().Msgf("No bulldozer configuration for %q", bulldozerConfig.String()) + case bulldozerConfig.Invalid(): + logger.Debug().Msgf("Bulldozer configuration is invalid for %q", bulldozerConfig.String()) + default: + logger.Debug().Msgf("Bulldozer configuration is valid for %q", bulldozerConfig.String()) + config := *bulldozerConfig.Config + + shouldUpdate, err := bulldozer.ShouldUpdatePR(ctx, pullCtx, config.Update) + + if err != nil { + return errors.Wrap(err, "unable to determine update status") + } + + if shouldUpdate { + logger.Debug().Msg("Pull request should be updated") + if err := bulldozer.UpdatePR(ctx, pullCtx, client, config.Update, baseRef); err != nil { + return errors.Wrap(err, "failed to update pull request") + } + } + } + + return nil +} diff --git a/server/endpoints/health.go b/server/handler/health.go similarity index 61% rename from server/endpoints/health.go rename to server/handler/health.go index f44d7c735..c74fd0367 100644 --- a/server/endpoints/health.go +++ b/server/handler/health.go @@ -1,4 +1,4 @@ -// Copyright 2017 Palantir Technologies, Inc. +// Copyright 2018 Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,24 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -package endpoints +package handler import ( "net/http" - "github.com/labstack/echo" + "github.com/palantir/go-baseapp/baseapp" "github.com/palantir/bulldozer/version" ) -func Health() echo.HandlerFunc { - return func(c echo.Context) error { - return c.JSON(http.StatusOK, struct { - Healthy bool `json:"healthy"` - Version string `json:"version"` - }{ - true, - version.Version(), - }) - } +type HealthCheck struct { + Status string `json:"status"` + Version string `json:"version"` +} + +func Health() http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + baseapp.WriteJSON(w, http.StatusOK, &HealthCheck{Status: "ok", Version: version.GetVersion()}) + }) } diff --git a/server/handler/issue_comment.go b/server/handler/issue_comment.go new file mode 100644 index 000000000..d33577363 --- /dev/null +++ b/server/handler/issue_comment.go @@ -0,0 +1,68 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handler + +import ( + "context" + "encoding/json" + + "github.com/google/go-github/github" + "github.com/palantir/go-githubapp/githubapp" + "github.com/pkg/errors" + + "github.com/palantir/bulldozer/pull" +) + +type IssueComment struct { + Base +} + +func (h *IssueComment) Handles() []string { + return []string{"issue_comment"} +} + +func (h *IssueComment) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error { + var event github.IssueCommentEvent + if err := json.Unmarshal(payload, &event); err != nil { + return errors.Wrap(err, "failed to parse issue comment payload") + } + + repo := event.GetRepo() + owner := repo.GetOwner().GetLogin() + repoName := repo.GetName() + number := event.GetIssue().GetNumber() + installationID := githubapp.GetInstallationIDFromEvent(&event) + ctx, logger := githubapp.PreparePRContext(ctx, installationID, repo, number) + + client, err := h.ClientCreator.NewInstallationClient(installationID) + if err != nil { + return errors.Wrap(err, "failed to instantiate github client") + } + + pr, _, err := client.PullRequests.Get(ctx, repo.GetOwner().GetLogin(), repo.GetName(), number) + if err != nil { + return errors.Wrapf(err, "failed to get pull request %s/%s#%d", owner, repoName, number) + } + pullCtx := pull.NewGithubContext(client, pr, owner, repoName, number) + + if err := h.ProcessPullRequest(ctx, pullCtx, client, pr); err != nil { + logger.Error().Err(errors.WithStack(err)).Msg("Error processing pull request") + } + + return nil +} + +// type assertion +var _ githubapp.EventHandler = &IssueComment{} diff --git a/server/handler/pull_request_review.go b/server/handler/pull_request_review.go new file mode 100644 index 000000000..62ee91ed6 --- /dev/null +++ b/server/handler/pull_request_review.go @@ -0,0 +1,68 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handler + +import ( + "context" + "encoding/json" + + "github.com/google/go-github/github" + "github.com/palantir/go-githubapp/githubapp" + "github.com/pkg/errors" + + "github.com/palantir/bulldozer/pull" +) + +type PullRequestReview struct { + Base +} + +func (h *PullRequestReview) Handles() []string { + return []string{"pull_request_review"} +} + +func (h *PullRequestReview) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error { + var event github.PullRequestReviewEvent + if err := json.Unmarshal(payload, &event); err != nil { + return errors.Wrap(err, "failed to parse pull request review event payload") + } + + repo := event.GetRepo() + owner := repo.GetOwner().GetLogin() + repoName := repo.GetName() + number := event.GetPullRequest().GetNumber() + installationID := githubapp.GetInstallationIDFromEvent(&event) + ctx, logger := githubapp.PreparePRContext(ctx, installationID, repo, number) + + client, err := h.ClientCreator.NewInstallationClient(installationID) + if err != nil { + return errors.Wrap(err, "failed to instantiate github client") + } + + pr, _, err := client.PullRequests.Get(ctx, repo.GetOwner().GetLogin(), repo.GetName(), number) + if err != nil { + return errors.Wrapf(err, "failed to get pull request %s/%s#%d", owner, repoName, number) + } + pullCtx := pull.NewGithubContext(client, pr, owner, repoName, number) + + if err := h.ProcessPullRequest(ctx, pullCtx, client, pr); err != nil { + logger.Error().Err(errors.WithStack(err)).Msg("Error processing pull request") + } + + return nil +} + +// type assertion +var _ githubapp.EventHandler = &PullRequestReview{} diff --git a/server/handler/push.go b/server/handler/push.go new file mode 100644 index 000000000..e8ff4b352 --- /dev/null +++ b/server/handler/push.go @@ -0,0 +1,89 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handler + +import ( + "context" + "encoding/json" + + "github.com/google/go-github/github" + "github.com/palantir/go-githubapp/githubapp" + "github.com/pkg/errors" + + "github.com/palantir/bulldozer/pull" +) + +type Push struct { + Base +} + +func (h *Push) Handles() []string { + return []string{"push"} +} + +func (h *Push) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error { + var event github.PushEvent + if err := json.Unmarshal(payload, &event); err != nil { + return errors.Wrap(err, "failed to parse push event payload") + } + + repo := event.GetRepo() + owner := repo.GetOwner().GetLogin() + repoName := repo.GetName() + installationID := githubapp.GetInstallationIDFromEvent(&event) + baseRef := event.GetRef() + + // todo: fixup PushEventRepository != Repository + ghRepo := &github.Repository{ + Name: github.String(repoName), + Owner: &github.User{ + Login: github.String(owner), + }, + } + + ctx, logger := githubapp.PrepareRepoContext(ctx, installationID, ghRepo) + + client, err := h.ClientCreator.NewInstallationClient(installationID) + if err != nil { + return errors.Wrap(err, "failed to instantiate github client") + } + + prs, err := pull.ListOpenPullRequestsForRef(ctx, client, owner, repoName, baseRef) + if err != nil { + return errors.Wrap(err, "failed to determine open pull requests matching the push change") + } + + logger.Debug().Msgf("received push event with base ref %s", baseRef) + + if len(prs) == 0 { + logger.Debug().Msg("Doing nothing since push event affects no open pull requests") + return nil + } + + for _, pr := range prs { + pullCtx := pull.NewGithubContext(client, pr, owner, repoName, pr.GetNumber()) + logger := logger.With().Int(githubapp.LogKeyPRNum, pr.GetNumber()).Logger() + + logger.Debug().Msgf("checking status for updated sha %s", baseRef) + if err := h.UpdatePullRequest(logger.WithContext(ctx), pullCtx, client, pr, baseRef); err != nil { + logger.Error().Err(errors.WithStack(err)).Msg("Error updating pull request") + } + } + + return nil +} + +// type assertion +var _ githubapp.EventHandler = &Push{} diff --git a/server/handler/status.go b/server/handler/status.go new file mode 100644 index 000000000..4ff8509d4 --- /dev/null +++ b/server/handler/status.go @@ -0,0 +1,80 @@ +// Copyright 2018 Palantir Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package handler + +import ( + "context" + "encoding/json" + + "github.com/google/go-github/github" + "github.com/palantir/go-githubapp/githubapp" + "github.com/pkg/errors" + + "github.com/palantir/bulldozer/pull" +) + +type Status struct { + Base +} + +func (h *Status) Handles() []string { + return []string{"status"} +} + +func (h *Status) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error { + var event github.StatusEvent + if err := json.Unmarshal(payload, &event); err != nil { + return errors.Wrap(err, "failed to parse status event payload") + } + + repo := event.GetRepo() + owner := repo.GetOwner().GetLogin() + repoName := repo.GetName() + installationID := githubapp.GetInstallationIDFromEvent(&event) + ctx, logger := githubapp.PrepareRepoContext(ctx, installationID, repo) + + if event.GetState() != "success" { + logger.Debug().Msgf("Doing nothing since context state for %q was %q", event.GetContext(), event.GetState()) + return nil + } + + client, err := h.ClientCreator.NewInstallationClient(installationID) + if err != nil { + return errors.Wrap(err, "failed to instantiate github client") + } + + prs, err := pull.ListOpenPullRequestsForSHA(ctx, client, owner, repoName, event.GetSHA()) + if err != nil { + return errors.Wrap(err, "failed to determine open pull requests matching the status context change") + } + + if len(prs) == 0 { + logger.Debug().Msg("Doing nothing since status change event affects no open pull requests") + return nil + } + + for _, pr := range prs { + pullCtx := pull.NewGithubContext(client, pr, owner, repoName, pr.GetNumber()) + logger := logger.With().Int(githubapp.LogKeyPRNum, pr.GetNumber()).Logger() + if err := h.ProcessPullRequest(logger.WithContext(ctx), pullCtx, client, pr); err != nil { + logger.Error().Err(errors.WithStack(err)).Msg("Error processing pull request") + } + } + + return nil +} + +// type assertion +var _ githubapp.EventHandler = &Status{} diff --git a/server/init.go b/server/init.go deleted file mode 100644 index 3971bad2c..000000000 --- a/server/init.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2017 Palantir Technologies, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -import ( - "fmt" - - "github.com/jmoiron/sqlx" - _ "github.com/lib/pq" // postgres bindings - "github.com/pkg/errors" - log "github.com/sirupsen/logrus" - - "github.com/palantir/bulldozer/persist" - "github.com/palantir/bulldozer/server/config" -) - -func InitDB(dbc *config.DatabaseConfig) (*sqlx.DB, error) { - connectStr := fmt.Sprintf("host=%s dbname=%s user=%s sslmode=%s", dbc.Host, dbc.DBName, dbc.Username, dbc.SSLMode) - log.WithFields(log.Fields{ - "connectionString": connectStr, - }).Info("Attempting to connect to DB") - - if dbc.Password != "" { - connectStr += fmt.Sprintf(" password=%s", dbc.Password) - } - - db, err := sqlx.Connect("postgres", connectStr) - if err != nil { - return nil, errors.Wrapf(err, "failed connecting to postgres") - } - - err = persist.InitializeSchema(db) - return db, errors.Wrap(err, "failed to initialize schema") -} diff --git a/server/server.go b/server/server.go index 90600aa82..326227c83 100644 --- a/server/server.go +++ b/server/server.go @@ -1,4 +1,4 @@ -// Copyright 2017 Palantir Technologies, Inc. +// Copyright 2018 Palantir Technologies, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,85 +16,100 @@ package server import ( "fmt" - "math/rand" - "net/http" - "strings" - - "github.com/ipfans/echo-session" - "github.com/jmoiron/sqlx" - "github.com/labstack/echo" - "github.com/labstack/echo/middleware" + "io" + "os" + + "github.com/palantir/go-baseapp/baseapp" + "github.com/palantir/go-baseapp/baseapp/datadog" + "github.com/palantir/go-githubapp/githubapp" "github.com/pkg/errors" + "github.com/rs/zerolog" + "goji.io/pat" - "github.com/palantir/bulldozer/auth" - bm "github.com/palantir/bulldozer/middleware" - "github.com/palantir/bulldozer/server/config" - "github.com/palantir/bulldozer/server/endpoints" - "github.com/palantir/bulldozer/utils" + "github.com/palantir/bulldozer/bulldozer" + "github.com/palantir/bulldozer/server/handler" + "github.com/palantir/bulldozer/version" ) type Server struct { - rest config.Rest - e *echo.Echo + config *Config + base *baseapp.Server } -func New(db *sqlx.DB, startup *config.Startup) *Server { - e := echo.New() - - e.Use(bm.ContextMiddleware) - e.Use(middleware.BodyLimit("6M")) - e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ - Format: config.EchoLoggingFormat, - Skipper: func(c echo.Context) bool { - return strings.Contains(c.Request().URL.String(), "callback?code=") - }, - })) - e.Use(middleware.Recover()) - - e.HTTPErrorHandler = utils.CustomHTTPErrorHandler +// New instantiates a new Server. +// Callers must then invoke Start to run the Server. +func New(c *Config) (*Server, error) { + logger, err := configureLogger(c.Logging) + if err != nil { + return nil, errors.Wrap(err, "failed to initialize logging") + } - registerEndpoints(startup, e, db) + serverParams := baseapp.DefaultParams(logger, c.Options.AppName+".") + base, err := baseapp.NewServer(c.Server, serverParams...) + if err != nil { + return nil, errors.Wrap(err, "failed to initialize base server") + } - return &Server{startup.Server, e} -} + userAgent := fmt.Sprintf("%s/%s", c.Options.AppName, version.GetVersion()) + clientCreator, err := githubapp.NewDefaultCachingClientCreator( + c.Github, + githubapp.WithClientUserAgent(userAgent), + githubapp.WithClientMiddleware( + githubapp.ClientLogging(zerolog.DebugLevel), + githubapp.ClientMetrics(base.Registry()), + ), + ) + if err != nil { + return nil, errors.Wrap(err, "failed to initialize Github client creator") + } -func registerEndpoints(startup *config.Startup, e *echo.Echo, db *sqlx.DB) { - e.Static("/", startup.AssetDir) + baseHandler := handler.Base{ + ClientCreator: clientCreator, + ConfigFetcher: bulldozer.NewConfigFetcher(c.Options.ConfigurationPath, c.Options.ConfigurationV0Paths), + } - e.GET("/repositories", func(c echo.Context) error { - return c.Redirect(http.StatusMovedPermanently, "/") - }) + webhookHandler := githubapp.NewDefaultEventDispatcher(c.Github, + &handler.IssueComment{Base: baseHandler}, + &handler.PullRequestReview{Base: baseHandler}, + &handler.Push{Base: baseHandler}, + &handler.Status{Base: baseHandler}, + ) - e.GET("/health", endpoints.Health()) - e.GET("/api/user/repos", endpoints.Repositories(db)) + mux := base.Mux() - e.GET("/api/auth/github", auth.BeginAuthHandler) - e.GET("/login", auth.CompleteAuth(startup.AssetDir)) + // webhook route + mux.Handle(pat.Post(githubapp.DefaultWebhookRoute), webhookHandler) - e.POST("/api/repo/:owner/:name", endpoints.RepositoryEnable(db, startup.Github.WebHookURL, startup.Github.WebhookSecret)) - e.DELETE("/api/repo/:owner/:name", endpoints.RepositoryDisable(db)) + // any additional API routes + mux.Handle(pat.Get("/api/health"), handler.Health()) - e.POST("/api/github/hook", endpoints.Hook(db, startup.Github.WebhookSecret, startup.ConfigPaths)) - e.GET("/api/auth/github/token", endpoints.Token(db)) + return &Server{ + config: c, + base: base, + }, nil } -func (s *Server) SetupSessionStore() error { - var cookieSecretAuth = make([]byte, 32) - var cookieSecretEnc = make([]byte, 32) - - if _, err := rand.Read(cookieSecretAuth); err != nil { - return errors.Wrap(err, "cannot read rand cookie auth") - } - if _, err := rand.Read(cookieSecretEnc); err != nil { - return errors.Wrap(err, "cannot read rand cookie secret") +func configureLogger(c LoggingConfig) (zerolog.Logger, error) { + out := io.Writer(os.Stdout) + if c.Text { + out = zerolog.ConsoleWriter{Out: out} } - cookieStore := session.NewCookieStore(cookieSecretAuth, cookieSecretEnc) - s.e.Use(session.Sessions("bulldozer", cookieStore)) + logLevel, err := zerolog.ParseLevel(c.Level) + if err != nil { + return zerolog.New(out).With().Timestamp().Logger(), err + } + zerolog.SetGlobalLevel(logLevel) - return nil + return zerolog.New(out).With().Timestamp().Logger(), nil } +// Start is blocking and long-running func (s *Server) Start() error { - return s.e.Start(fmt.Sprintf("%s:%d", s.rest.Address, s.rest.Port)) + if s.config.Datadog.Address != "" { + if err := datadog.StartEmitter(s.base, s.config.Datadog); err != nil { + return err + } + } + return s.base.Start() } diff --git a/vendor/github.com/DataDog/datadog-go/LICENSE.txt b/vendor/github.com/DataDog/datadog-go/LICENSE.txt new file mode 100644 index 000000000..97cd06d7f --- /dev/null +++ b/vendor/github.com/DataDog/datadog-go/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2015 Datadog, Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/DataDog/datadog-go/statsd/statsd.go b/vendor/github.com/DataDog/datadog-go/statsd/statsd.go new file mode 100644 index 000000000..0ae4dac03 --- /dev/null +++ b/vendor/github.com/DataDog/datadog-go/statsd/statsd.go @@ -0,0 +1,680 @@ +// Copyright 2013 Ooyala, Inc. + +/* +Package statsd provides a Go dogstatsd client. Dogstatsd extends the popular statsd, +adding tags and histograms and pushing upstream to Datadog. + +Refer to http://docs.datadoghq.com/guides/dogstatsd/ for information about DogStatsD. + +Example Usage: + + // Create the client + c, err := statsd.New("127.0.0.1:8125") + if err != nil { + log.Fatal(err) + } + // Prefix every metric with the app name + c.Namespace = "flubber." + // Send the EC2 availability zone as a tag with every metric + c.Tags = append(c.Tags, "us-east-1a") + err = c.Gauge("request.duration", 1.2, nil, 1) + +statsd is based on go-statsd-client. +*/ +package statsd + +import ( + "bytes" + "errors" + "fmt" + "io" + "math/rand" + "strconv" + "strings" + "sync" + "time" +) + +/* +OptimalPayloadSize defines the optimal payload size for a UDP datagram, 1432 bytes +is optimal for regular networks with an MTU of 1500 so datagrams don't get +fragmented. It's generally recommended not to fragment UDP datagrams as losing +a single fragment will cause the entire datagram to be lost. + +This can be increased if your network has a greater MTU or you don't mind UDP +datagrams getting fragmented. The practical limit is MaxUDPPayloadSize +*/ +const OptimalPayloadSize = 1432 + +/* +MaxUDPPayloadSize defines the maximum payload size for a UDP datagram. +Its value comes from the calculation: 65535 bytes Max UDP datagram size - +8byte UDP header - 60byte max IP headers +any number greater than that will see frames being cut out. +*/ +const MaxUDPPayloadSize = 65467 + +/* +UnixAddressPrefix holds the prefix to use to enable Unix Domain Socket +traffic instead of UDP. +*/ +const UnixAddressPrefix = "unix://" + +/* +Stat suffixes +*/ +var ( + gaugeSuffix = []byte("|g") + countSuffix = []byte("|c") + histogramSuffix = []byte("|h") + distributionSuffix = []byte("|d") + decrSuffix = []byte("-1|c") + incrSuffix = []byte("1|c") + setSuffix = []byte("|s") + timingSuffix = []byte("|ms") +) + +// A statsdWriter offers a standard interface regardless of the underlying +// protocol. For now UDS and UPD writers are available. +type statsdWriter interface { + Write(data []byte) (n int, err error) + SetWriteTimeout(time.Duration) error + Close() error +} + +// A Client is a handle for sending messages to dogstatsd. It is safe to +// use one Client from multiple goroutines simultaneously. +type Client struct { + // Writer handles the underlying networking protocol + writer statsdWriter + // Namespace to prepend to all statsd calls + Namespace string + // Tags are global tags to be added to every statsd call + Tags []string + // skipErrors turns off error passing and allows UDS to emulate UDP behaviour + SkipErrors bool + // BufferLength is the length of the buffer in commands. + bufferLength int + flushTime time.Duration + commands []string + buffer bytes.Buffer + stop chan struct{} + sync.Mutex +} + +// New returns a pointer to a new Client given an addr in the format "hostname:port" or +// "unix:///path/to/socket". +func New(addr string) (*Client, error) { + if strings.HasPrefix(addr, UnixAddressPrefix) { + w, err := newUdsWriter(addr[len(UnixAddressPrefix)-1:]) + if err != nil { + return nil, err + } + return NewWithWriter(w) + } + w, err := newUDPWriter(addr) + if err != nil { + return nil, err + } + return NewWithWriter(w) +} + +// NewWithWriter creates a new Client with given writer. Writer is a +// io.WriteCloser + SetWriteTimeout(time.Duration) error +func NewWithWriter(w statsdWriter) (*Client, error) { + client := &Client{writer: w, SkipErrors: false} + return client, nil +} + +// NewBuffered returns a Client that buffers its output and sends it in chunks. +// Buflen is the length of the buffer in number of commands. +func NewBuffered(addr string, buflen int) (*Client, error) { + client, err := New(addr) + if err != nil { + return nil, err + } + client.bufferLength = buflen + client.commands = make([]string, 0, buflen) + client.flushTime = time.Millisecond * 100 + client.stop = make(chan struct{}, 1) + go client.watch() + return client, nil +} + +// format a message from its name, value, tags and rate. Also adds global +// namespace and tags. +func (c *Client) format(name string, value interface{}, suffix []byte, tags []string, rate float64) string { + var buf bytes.Buffer + if c.Namespace != "" { + buf.WriteString(c.Namespace) + } + buf.WriteString(name) + buf.WriteString(":") + + switch val := value.(type) { + case float64: + buf.Write(strconv.AppendFloat([]byte{}, val, 'f', 6, 64)) + + case int64: + buf.Write(strconv.AppendInt([]byte{}, val, 10)) + + case string: + buf.WriteString(val) + + default: + // do nothing + } + buf.Write(suffix) + + if rate < 1 { + buf.WriteString(`|@`) + buf.WriteString(strconv.FormatFloat(rate, 'f', -1, 64)) + } + + writeTagString(&buf, c.Tags, tags) + + return buf.String() +} + +// SetWriteTimeout allows the user to set a custom UDS write timeout. Not supported for UDP. +func (c *Client) SetWriteTimeout(d time.Duration) error { + if c == nil { + return nil + } + return c.writer.SetWriteTimeout(d) +} + +func (c *Client) watch() { + ticker := time.NewTicker(c.flushTime) + + for { + select { + case <-ticker.C: + c.Lock() + if len(c.commands) > 0 { + // FIXME: eating error here + c.flushLocked() + } + c.Unlock() + case <-c.stop: + ticker.Stop() + return + } + } +} + +func (c *Client) append(cmd string) error { + c.Lock() + defer c.Unlock() + c.commands = append(c.commands, cmd) + // if we should flush, lets do it + if len(c.commands) == c.bufferLength { + if err := c.flushLocked(); err != nil { + return err + } + } + return nil +} + +func (c *Client) joinMaxSize(cmds []string, sep string, maxSize int) ([][]byte, []int) { + c.buffer.Reset() //clear buffer + + var frames [][]byte + var ncmds []int + sepBytes := []byte(sep) + sepLen := len(sep) + + elem := 0 + for _, cmd := range cmds { + needed := len(cmd) + + if elem != 0 { + needed = needed + sepLen + } + + if c.buffer.Len()+needed <= maxSize { + if elem != 0 { + c.buffer.Write(sepBytes) + } + c.buffer.WriteString(cmd) + elem++ + } else { + frames = append(frames, copyAndResetBuffer(&c.buffer)) + ncmds = append(ncmds, elem) + // if cmd is bigger than maxSize it will get flushed on next loop + c.buffer.WriteString(cmd) + elem = 1 + } + } + + //add whatever is left! if there's actually something + if c.buffer.Len() > 0 { + frames = append(frames, copyAndResetBuffer(&c.buffer)) + ncmds = append(ncmds, elem) + } + + return frames, ncmds +} + +func copyAndResetBuffer(buf *bytes.Buffer) []byte { + tmpBuf := make([]byte, buf.Len()) + copy(tmpBuf, buf.Bytes()) + buf.Reset() + return tmpBuf +} + +// Flush forces a flush of the pending commands in the buffer +func (c *Client) Flush() error { + if c == nil { + return nil + } + c.Lock() + defer c.Unlock() + return c.flushLocked() +} + +// flush the commands in the buffer. Lock must be held by caller. +func (c *Client) flushLocked() error { + frames, flushable := c.joinMaxSize(c.commands, "\n", OptimalPayloadSize) + var err error + cmdsFlushed := 0 + for i, data := range frames { + _, e := c.writer.Write(data) + if e != nil { + err = e + break + } + cmdsFlushed += flushable[i] + } + + // clear the slice with a slice op, doesn't realloc + if cmdsFlushed == len(c.commands) { + c.commands = c.commands[:0] + } else { + //this case will cause a future realloc... + // drop problematic command though (sorry). + c.commands = c.commands[cmdsFlushed+1:] + } + return err +} + +func (c *Client) sendMsg(msg string) error { + // return an error if message is bigger than MaxUDPPayloadSize + if len(msg) > MaxUDPPayloadSize { + return errors.New("message size exceeds MaxUDPPayloadSize") + } + + // if this client is buffered, then we'll just append this + if c.bufferLength > 0 { + return c.append(msg) + } + + _, err := c.writer.Write([]byte(msg)) + + if c.SkipErrors { + return nil + } + return err +} + +// send handles sampling and sends the message over UDP. It also adds global namespace prefixes and tags. +func (c *Client) send(name string, value interface{}, suffix []byte, tags []string, rate float64) error { + if c == nil { + return nil + } + if rate < 1 && rand.Float64() > rate { + return nil + } + data := c.format(name, value, suffix, tags, rate) + return c.sendMsg(data) +} + +// Gauge measures the value of a metric at a particular time. +func (c *Client) Gauge(name string, value float64, tags []string, rate float64) error { + return c.send(name, value, gaugeSuffix, tags, rate) +} + +// Count tracks how many times something happened per second. +func (c *Client) Count(name string, value int64, tags []string, rate float64) error { + return c.send(name, value, countSuffix, tags, rate) +} + +// Histogram tracks the statistical distribution of a set of values on each host. +func (c *Client) Histogram(name string, value float64, tags []string, rate float64) error { + return c.send(name, value, histogramSuffix, tags, rate) +} + +// Distribution tracks the statistical distribution of a set of values across your infrastructure. +func (c *Client) Distribution(name string, value float64, tags []string, rate float64) error { + return c.send(name, value, distributionSuffix, tags, rate) +} + +// Decr is just Count of -1 +func (c *Client) Decr(name string, tags []string, rate float64) error { + return c.send(name, nil, decrSuffix, tags, rate) +} + +// Incr is just Count of 1 +func (c *Client) Incr(name string, tags []string, rate float64) error { + return c.send(name, nil, incrSuffix, tags, rate) +} + +// Set counts the number of unique elements in a group. +func (c *Client) Set(name string, value string, tags []string, rate float64) error { + return c.send(name, value, setSuffix, tags, rate) +} + +// Timing sends timing information, it is an alias for TimeInMilliseconds +func (c *Client) Timing(name string, value time.Duration, tags []string, rate float64) error { + return c.TimeInMilliseconds(name, value.Seconds()*1000, tags, rate) +} + +// TimeInMilliseconds sends timing information in milliseconds. +// It is flushed by statsd with percentiles, mean and other info (https://github.com/etsy/statsd/blob/master/docs/metric_types.md#timing) +func (c *Client) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error { + return c.send(name, value, timingSuffix, tags, rate) +} + +// Event sends the provided Event. +func (c *Client) Event(e *Event) error { + if c == nil { + return nil + } + stat, err := e.Encode(c.Tags...) + if err != nil { + return err + } + return c.sendMsg(stat) +} + +// SimpleEvent sends an event with the provided title and text. +func (c *Client) SimpleEvent(title, text string) error { + e := NewEvent(title, text) + return c.Event(e) +} + +// ServiceCheck sends the provided ServiceCheck. +func (c *Client) ServiceCheck(sc *ServiceCheck) error { + if c == nil { + return nil + } + stat, err := sc.Encode(c.Tags...) + if err != nil { + return err + } + return c.sendMsg(stat) +} + +// SimpleServiceCheck sends an serviceCheck with the provided name and status. +func (c *Client) SimpleServiceCheck(name string, status ServiceCheckStatus) error { + sc := NewServiceCheck(name, status) + return c.ServiceCheck(sc) +} + +// Close the client connection. +func (c *Client) Close() error { + if c == nil { + return nil + } + select { + case c.stop <- struct{}{}: + default: + } + + // if this client is buffered, flush before closing the writer + if c.bufferLength > 0 { + if err := c.Flush(); err != nil { + return err + } + } + + return c.writer.Close() +} + +// Events support +// EventAlertType and EventAlertPriority became exported types after this issue was submitted: https://github.com/DataDog/datadog-go/issues/41 +// The reason why they got exported is so that client code can directly use the types. + +// EventAlertType is the alert type for events +type EventAlertType string + +const ( + // Info is the "info" AlertType for events + Info EventAlertType = "info" + // Error is the "error" AlertType for events + Error EventAlertType = "error" + // Warning is the "warning" AlertType for events + Warning EventAlertType = "warning" + // Success is the "success" AlertType for events + Success EventAlertType = "success" +) + +// EventPriority is the event priority for events +type EventPriority string + +const ( + // Normal is the "normal" Priority for events + Normal EventPriority = "normal" + // Low is the "low" Priority for events + Low EventPriority = "low" +) + +// An Event is an object that can be posted to your DataDog event stream. +type Event struct { + // Title of the event. Required. + Title string + // Text is the description of the event. Required. + Text string + // Timestamp is a timestamp for the event. If not provided, the dogstatsd + // server will set this to the current time. + Timestamp time.Time + // Hostname for the event. + Hostname string + // AggregationKey groups this event with others of the same key. + AggregationKey string + // Priority of the event. Can be statsd.Low or statsd.Normal. + Priority EventPriority + // SourceTypeName is a source type for the event. + SourceTypeName string + // AlertType can be statsd.Info, statsd.Error, statsd.Warning, or statsd.Success. + // If absent, the default value applied by the dogstatsd server is Info. + AlertType EventAlertType + // Tags for the event. + Tags []string +} + +// NewEvent creates a new event with the given title and text. Error checking +// against these values is done at send-time, or upon running e.Check. +func NewEvent(title, text string) *Event { + return &Event{ + Title: title, + Text: text, + } +} + +// Check verifies that an event is valid. +func (e Event) Check() error { + if len(e.Title) == 0 { + return fmt.Errorf("statsd.Event title is required") + } + if len(e.Text) == 0 { + return fmt.Errorf("statsd.Event text is required") + } + return nil +} + +// Encode returns the dogstatsd wire protocol representation for an event. +// Tags may be passed which will be added to the encoded output but not to +// the Event's list of tags, eg. for default tags. +func (e Event) Encode(tags ...string) (string, error) { + err := e.Check() + if err != nil { + return "", err + } + text := e.escapedText() + + var buffer bytes.Buffer + buffer.WriteString("_e{") + buffer.WriteString(strconv.FormatInt(int64(len(e.Title)), 10)) + buffer.WriteRune(',') + buffer.WriteString(strconv.FormatInt(int64(len(text)), 10)) + buffer.WriteString("}:") + buffer.WriteString(e.Title) + buffer.WriteRune('|') + buffer.WriteString(text) + + if !e.Timestamp.IsZero() { + buffer.WriteString("|d:") + buffer.WriteString(strconv.FormatInt(int64(e.Timestamp.Unix()), 10)) + } + + if len(e.Hostname) != 0 { + buffer.WriteString("|h:") + buffer.WriteString(e.Hostname) + } + + if len(e.AggregationKey) != 0 { + buffer.WriteString("|k:") + buffer.WriteString(e.AggregationKey) + + } + + if len(e.Priority) != 0 { + buffer.WriteString("|p:") + buffer.WriteString(string(e.Priority)) + } + + if len(e.SourceTypeName) != 0 { + buffer.WriteString("|s:") + buffer.WriteString(e.SourceTypeName) + } + + if len(e.AlertType) != 0 { + buffer.WriteString("|t:") + buffer.WriteString(string(e.AlertType)) + } + + writeTagString(&buffer, tags, e.Tags) + + return buffer.String(), nil +} + +// ServiceCheckStatus support +type ServiceCheckStatus byte + +const ( + // Ok is the "ok" ServiceCheck status + Ok ServiceCheckStatus = 0 + // Warn is the "warning" ServiceCheck status + Warn ServiceCheckStatus = 1 + // Critical is the "critical" ServiceCheck status + Critical ServiceCheckStatus = 2 + // Unknown is the "unknown" ServiceCheck status + Unknown ServiceCheckStatus = 3 +) + +// An ServiceCheck is an object that contains status of DataDog service check. +type ServiceCheck struct { + // Name of the service check. Required. + Name string + // Status of service check. Required. + Status ServiceCheckStatus + // Timestamp is a timestamp for the serviceCheck. If not provided, the dogstatsd + // server will set this to the current time. + Timestamp time.Time + // Hostname for the serviceCheck. + Hostname string + // A message describing the current state of the serviceCheck. + Message string + // Tags for the serviceCheck. + Tags []string +} + +// NewServiceCheck creates a new serviceCheck with the given name and status. Error checking +// against these values is done at send-time, or upon running sc.Check. +func NewServiceCheck(name string, status ServiceCheckStatus) *ServiceCheck { + return &ServiceCheck{ + Name: name, + Status: status, + } +} + +// Check verifies that an event is valid. +func (sc ServiceCheck) Check() error { + if len(sc.Name) == 0 { + return fmt.Errorf("statsd.ServiceCheck name is required") + } + if byte(sc.Status) < 0 || byte(sc.Status) > 3 { + return fmt.Errorf("statsd.ServiceCheck status has invalid value") + } + return nil +} + +// Encode returns the dogstatsd wire protocol representation for an serviceCheck. +// Tags may be passed which will be added to the encoded output but not to +// the Event's list of tags, eg. for default tags. +func (sc ServiceCheck) Encode(tags ...string) (string, error) { + err := sc.Check() + if err != nil { + return "", err + } + message := sc.escapedMessage() + + var buffer bytes.Buffer + buffer.WriteString("_sc|") + buffer.WriteString(sc.Name) + buffer.WriteRune('|') + buffer.WriteString(strconv.FormatInt(int64(sc.Status), 10)) + + if !sc.Timestamp.IsZero() { + buffer.WriteString("|d:") + buffer.WriteString(strconv.FormatInt(int64(sc.Timestamp.Unix()), 10)) + } + + if len(sc.Hostname) != 0 { + buffer.WriteString("|h:") + buffer.WriteString(sc.Hostname) + } + + writeTagString(&buffer, tags, sc.Tags) + + if len(message) != 0 { + buffer.WriteString("|m:") + buffer.WriteString(message) + } + + return buffer.String(), nil +} + +func (e Event) escapedText() string { + return strings.Replace(e.Text, "\n", "\\n", -1) +} + +func (sc ServiceCheck) escapedMessage() string { + msg := strings.Replace(sc.Message, "\n", "\\n", -1) + return strings.Replace(msg, "m:", `m\:`, -1) +} + +func removeNewlines(str string) string { + return strings.Replace(str, "\n", "", -1) +} + +func writeTagString(w io.Writer, tagList1, tagList2 []string) { + // the tag lists may be shared with other callers, so we cannot modify + // them in any way (which means we cannot append to them either) + // therefore we must make an entirely separate copy just for this call + totalLen := len(tagList1) + len(tagList2) + if totalLen == 0 { + return + } + tags := make([]string, 0, totalLen) + tags = append(tags, tagList1...) + tags = append(tags, tagList2...) + + io.WriteString(w, "|#") + io.WriteString(w, removeNewlines(tags[0])) + for _, tag := range tags[1:] { + io.WriteString(w, ",") + io.WriteString(w, removeNewlines(tag)) + } +} diff --git a/vendor/github.com/DataDog/datadog-go/statsd/udp.go b/vendor/github.com/DataDog/datadog-go/statsd/udp.go new file mode 100644 index 000000000..8af522c5b --- /dev/null +++ b/vendor/github.com/DataDog/datadog-go/statsd/udp.go @@ -0,0 +1,40 @@ +package statsd + +import ( + "errors" + "net" + "time" +) + +// udpWriter is an internal class wrapping around management of UDP connection +type udpWriter struct { + conn net.Conn +} + +// New returns a pointer to a new udpWriter given an addr in the format "hostname:port". +func newUDPWriter(addr string) (*udpWriter, error) { + udpAddr, err := net.ResolveUDPAddr("udp", addr) + if err != nil { + return nil, err + } + conn, err := net.DialUDP("udp", nil, udpAddr) + if err != nil { + return nil, err + } + writer := &udpWriter{conn: conn} + return writer, nil +} + +// SetWriteTimeout is not needed for UDP, returns error +func (w *udpWriter) SetWriteTimeout(d time.Duration) error { + return errors.New("SetWriteTimeout: not supported for UDP connections") +} + +// Write data to the UDP connection with no error handling +func (w *udpWriter) Write(data []byte) (int, error) { + return w.conn.Write(data) +} + +func (w *udpWriter) Close() error { + return w.conn.Close() +} diff --git a/vendor/github.com/DataDog/datadog-go/statsd/uds.go b/vendor/github.com/DataDog/datadog-go/statsd/uds.go new file mode 100644 index 000000000..31154ab4d --- /dev/null +++ b/vendor/github.com/DataDog/datadog-go/statsd/uds.go @@ -0,0 +1,67 @@ +package statsd + +import ( + "net" + "time" +) + +/* +UDSTimeout holds the default timeout for UDS socket writes, as they can get +blocking when the receiving buffer is full. +*/ +const defaultUDSTimeout = 1 * time.Millisecond + +// udsWriter is an internal class wrapping around management of UDS connection +type udsWriter struct { + // Address to send metrics to, needed to allow reconnection on error + addr net.Addr + // Established connection object, or nil if not connected yet + conn net.Conn + // write timeout + writeTimeout time.Duration +} + +// New returns a pointer to a new udsWriter given a socket file path as addr. +func newUdsWriter(addr string) (*udsWriter, error) { + udsAddr, err := net.ResolveUnixAddr("unixgram", addr) + if err != nil { + return nil, err + } + // Defer connection to first Write + writer := &udsWriter{addr: udsAddr, conn: nil, writeTimeout: defaultUDSTimeout} + return writer, nil +} + +// SetWriteTimeout allows the user to set a custom write timeout +func (w *udsWriter) SetWriteTimeout(d time.Duration) error { + w.writeTimeout = d + return nil +} + +// Write data to the UDS connection with write timeout and minimal error handling: +// create the connection if nil, and destroy it if the statsd server has disconnected +func (w *udsWriter) Write(data []byte) (int, error) { + // Try connecting (first packet or connection lost) + if w.conn == nil { + conn, err := net.Dial(w.addr.Network(), w.addr.String()) + if err != nil { + return 0, err + } + w.conn = conn + } + w.conn.SetWriteDeadline(time.Now().Add(w.writeTimeout)) + n, e := w.conn.Write(data) + if e != nil { + // Statsd server disconnected, retry connecting at next packet + w.conn = nil + return 0, e + } + return n, e +} + +func (w *udsWriter) Close() error { + if w.conn != nil { + return w.conn.Close() + } + return nil +} diff --git a/vendor/github.com/antonlindstrom/pgstore/.travis.yml b/vendor/github.com/antonlindstrom/pgstore/.travis.yml deleted file mode 100644 index df66c08bd..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: go - -go: - - 1.6 - - 1.7 - - tip - -install: - - make get-deps - - go get github.com/campoy/embedmd - -script: - - make metalint - - make docs-check - - make check - -env: - - GO15VENDOREXPERIMENT=1 PGSTORE_TEST_CONN="postgres://postgres@127.0.0.1/test?sslmode=disable" - -before_script: - - psql -c 'create database test;' -U postgres - -addons: - postgresql: "9.4" - -sudo: false diff --git a/vendor/github.com/antonlindstrom/pgstore/Makefile b/vendor/github.com/antonlindstrom/pgstore/Makefile deleted file mode 100644 index 2fa41ce1d..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -UNAME := $(shell uname) -ifeq ($(UNAME), Darwin) - DHOST := $(shell echo $$(docker-machine ip)) -else - DHOST := 127.0.0.1 -endif - -all: get-deps build - -.PHONY: build -build: - go build ./... - -.PHONY: get-deps -get-deps: - go get -v ./... - -.PHONY: test -test: get-deps metalint docs-check check - -.PHONY: check -check: - go test -v -race -cover ./... - -.PHONY: metalint -metalint: - which gometalinter > /dev/null || (go get github.com/alecthomas/gometalinter && gometalinter --install --update) - gometalinter --cyclo-over=20 -e "struct field Id should be ID" --disable=gas --enable=misspell --fast ./... - -.PHONY: fmt -fmt: - @go fmt ./... | awk '{ print "Please run go fmt"; exit 1 }' - -.PHONY: docker-test -docker-test: - docker run -d -p 5432:5432 --name=pgstore_test_1 postgres:9.4 - @echo "Ugly hack: Sleeping for 75 secs to give the Postgres container time to come up..." - sleep 75 - @echo "Waking up - let's do this!" - docker run --rm --link pgstore_test_1:postgres postgres:9.4 psql -c 'create database test;' -U postgres -h postgres - PGSTORE_TEST_CONN="postgres://postgres@$(DHOST):5432/test?sslmode=disable" make test - docker kill pgstore_test_1 - docker rm pgstore_test_1 - -.PHONY: docker-clean -docker-clean: - -docker kill pgstore_test_1 - -docker rm pgstore_test_1 - -.PHONY: docs-dep - which embedmd > /dev/null || go get github.com/campoy/embedmd - -.PHONY: docs-check -docs-check: docs-dep - @echo "Checking if docs are generated, if this fails, run 'make docs'." - embedmd README.md | diff README.md - - -.PHONY: docs -docs: docs-dep - embedmd -w README.md diff --git a/vendor/github.com/antonlindstrom/pgstore/README.md b/vendor/github.com/antonlindstrom/pgstore/README.md deleted file mode 100644 index eb79f3a95..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# pgstore - -A session store backend for [gorilla/sessions](http://www.gorillatoolkit.org/pkg/sessions) - [src](https://github.com/gorilla/sessions). - -## Installation - - make get-deps - -## Documentation - -Available on [godoc.org](http://www.godoc.org/github.com/antonlindstrom/pgstore). - -See http://www.gorillatoolkit.org/pkg/sessions for full documentation on underlying interface. - -### Example - -[embedmd]:# (examples/sessions.go) -```go -package examples - -import ( - "log" - "net/http" - "time" - - "github.com/antonlindstrom/pgstore" -) - -// ExampleHandler is an example that displays the usage of PGStore. -func ExampleHandler(w http.ResponseWriter, r *http.Request) { - // Fetch new store. - store, err := pgstore.NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key")) - if err != nil { - log.Fatalf(err.Error()) - } - defer store.Close() - - // Run a background goroutine to clean up expired sessions from the database. - defer store.StopCleanup(store.Cleanup(time.Minute * 5)) - - // Get a session. - session, err := store.Get(r, "session-key") - if err != nil { - log.Fatalf(err.Error()) - } - - // Add a value. - session.Values["foo"] = "bar" - - // Save. - if err = session.Save(r, w); err != nil { - log.Fatalf("Error saving session: %v", err) - } - - // Delete session. - session.Options.MaxAge = -1 - if err = session.Save(r, w); err != nil { - log.Fatalf("Error saving session: %v", err) - } -} -``` - -## Breaking changes - -* 2016-07-19 - `NewPGStore` and `NewPGStoreFromPool` now returns `(*PGStore, error)` - -## Thanks - -I've stolen, borrowed and gotten inspiration from the other backends available: - -* [redistore](https://github.com/boj/redistore) -* [mysqlstore](https://github.com/srinathgs/mysqlstore) -* [babou dbstore](https://github.com/drbawb/babou/blob/master/lib/session/dbstore.go) - -Thank you all for sharing your code! - -What makes this backend different is that it's for PostgreSQL. - -We've recently refactored this backend to use the standard database/sql driver instead of Gorp. This removes a dependency and makes this package very lightweight and makes database interactions very transparent. Lastly, from the standpoint of unit testing where you want to mock the database layer instead of requiring a real database, you can now easily use a package like [go-SQLMock](https://github.com/DATA-DOG/go-sqlmock) to do just that. diff --git a/vendor/github.com/antonlindstrom/pgstore/cleanup.go b/vendor/github.com/antonlindstrom/pgstore/cleanup.go deleted file mode 100644 index 64983658b..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/cleanup.go +++ /dev/null @@ -1,58 +0,0 @@ -package pgstore - -import ( - "log" - "time" -) - -var defaultInterval = time.Minute * 5 - -// Cleanup runs a background goroutine every interval that deletes expired -// sessions from the database. -// -// The design is based on https://github.com/yosssi/boltstore -func (db *PGStore) Cleanup(interval time.Duration) (chan<- struct{}, <-chan struct{}) { - if interval <= 0 { - interval = defaultInterval - } - - quit, done := make(chan struct{}), make(chan struct{}) - go db.cleanup(interval, quit, done) - return quit, done -} - -// StopCleanup stops the background cleanup from running. -func (db *PGStore) StopCleanup(quit chan<- struct{}, done <-chan struct{}) { - quit <- struct{}{} - <-done -} - -// cleanup deletes expired sessions at set intervals. -func (db *PGStore) cleanup(interval time.Duration, quit <-chan struct{}, done chan<- struct{}) { - ticker := time.NewTicker(interval) - - defer func() { - ticker.Stop() - }() - - for { - select { - case <-quit: - // Handle the quit signal. - done <- struct{}{} - return - case <-ticker.C: - // Delete expired sessions on each tick. - err := db.deleteExpired() - if err != nil { - log.Printf("pgstore: unable to delete expired sessions: %v", err) - } - } - } -} - -// deleteExpired deletes expired sessions from the database. -func (db *PGStore) deleteExpired() error { - _, err := db.DbPool.Exec("DELETE FROM http_sessions WHERE expires_on < now()") - return err -} diff --git a/vendor/github.com/antonlindstrom/pgstore/cleanup_test.go b/vendor/github.com/antonlindstrom/pgstore/cleanup_test.go deleted file mode 100644 index 32f933019..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/cleanup_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package pgstore - -import ( - "net/http" - "os" - "testing" - "time" -) - -func TestCleanup(t *testing.T) { - dsn := os.Getenv("PGSTORE_TEST_CONN") - if dsn == "" { - t.Skip("This test requires a real database.") - } - - ss, err := NewPGStore(dsn, []byte(secret)) - if err != nil { - t.Fatal("Failed to get store", err) - } - - defer ss.Close() - // Start the cleanup goroutine. - defer ss.StopCleanup(ss.Cleanup(time.Millisecond * 500)) - - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("Failed to create request", err) - } - - session, err := ss.Get(req, "newsess") - if err != nil { - t.Fatal("Failed to create session", err) - } - - // Expire the session. - session.Options.MaxAge = 1 - - m := make(http.Header) - if err = ss.Save(req, headerOnlyResponseWriter(m), session); err != nil { - t.Fatal("failed to save session:", err.Error()) - } - - // Give the ticker a moment to run. - time.Sleep(time.Millisecond * 1500) - - // SELECT expired sessions. We should get a count of zero back. - var count int - err = ss.DbPool.QueryRow("SELECT count(*) FROM http_sessions WHERE expires_on < now()").Scan(&count) - if err != nil { - t.Fatalf("failed to select expired sessions from DB: %v", err) - } - - if count > 0 { - t.Fatalf("ticker did not delete expired sessions: want 0 got %v", count) - } -} diff --git a/vendor/github.com/antonlindstrom/pgstore/pgstore.go b/vendor/github.com/antonlindstrom/pgstore/pgstore.go deleted file mode 100644 index 91019cd35..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/pgstore.go +++ /dev/null @@ -1,270 +0,0 @@ -package pgstore - -import ( - "database/sql" - "encoding/base32" - "net/http" - "strings" - "time" - - "github.com/pkg/errors" - - "github.com/gorilla/securecookie" - "github.com/gorilla/sessions" - - // Include the pq postgres driver. - _ "github.com/lib/pq" -) - -// PGStore represents the currently configured session store. -type PGStore struct { - Codecs []securecookie.Codec - Options *sessions.Options - Path string - DbPool *sql.DB -} - -// PGSession type -type PGSession struct { - ID int64 - Key string - Data string - CreatedOn time.Time - ModifiedOn time.Time - ExpiresOn time.Time -} - -// NewPGStore creates a new PGStore instance and a new database/sql pool. -// This will also create in the database the schema needed by pgstore. -func NewPGStore(dbURL string, keyPairs ...[]byte) (*PGStore, error) { - db, err := sql.Open("postgres", dbURL) - if err != nil { - // Ignore and return nil. - return nil, err - } - return NewPGStoreFromPool(db, keyPairs...) -} - -// NewPGStoreFromPool creates a new PGStore instance from an existing -// database/sql pool. -// This will also create the database schema needed by pgstore. -func NewPGStoreFromPool(db *sql.DB, keyPairs ...[]byte) (*PGStore, error) { - dbStore := &PGStore{ - Codecs: securecookie.CodecsFromPairs(keyPairs...), - Options: &sessions.Options{ - Path: "/", - MaxAge: 86400 * 30, - }, - DbPool: db, - } - - // Create table if it doesn't exist - err := dbStore.createSessionsTable() - if err != nil { - return nil, err - } - - return dbStore, nil -} - -// Close closes the database connection. -func (db *PGStore) Close() { - db.DbPool.Close() -} - -// Get Fetches a session for a given name after it has been added to the -// registry. -func (db *PGStore) Get(r *http.Request, name string) (*sessions.Session, error) { - return sessions.GetRegistry(r).Get(db, name) -} - -// New returns a new session for the given name without adding it to the registry. -func (db *PGStore) New(r *http.Request, name string) (*sessions.Session, error) { - session := sessions.NewSession(db, name) - if session == nil { - return nil, nil - } - - opts := *db.Options - session.Options = &(opts) - session.IsNew = true - - var err error - if c, errCookie := r.Cookie(name); errCookie == nil { - err = securecookie.DecodeMulti(name, c.Value, &session.ID, db.Codecs...) - if err == nil { - err = db.load(session) - if err == nil { - session.IsNew = false - } else if errors.Cause(err) == sql.ErrNoRows { - err = nil - } - } - } - - db.MaxAge(db.Options.MaxAge) - - return session, err -} - -// Save saves the given session into the database and deletes cookies if needed -func (db *PGStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error { - // Set delete if max-age is < 0 - if session.Options.MaxAge < 0 { - if err := db.destroy(session); err != nil { - return err - } - http.SetCookie(w, sessions.NewCookie(session.Name(), "", session.Options)) - return nil - } - - if session.ID == "" { - // Generate a random session ID key suitable for storage in the DB - session.ID = strings.TrimRight( - base32.StdEncoding.EncodeToString( - securecookie.GenerateRandomKey(32), - ), "=") - } - - if err := db.save(session); err != nil { - return err - } - - // Keep the session ID key in a cookie so it can be looked up in DB later. - encoded, err := securecookie.EncodeMulti(session.Name(), session.ID, db.Codecs...) - if err != nil { - return err - } - - http.SetCookie(w, sessions.NewCookie(session.Name(), encoded, session.Options)) - return nil -} - -// MaxLength restricts the maximum length of new sessions to l. -// If l is 0 there is no limit to the size of a session, use with caution. -// The default for a new PGStore is 4096. PostgreSQL allows for max -// value sizes of up to 1GB (http://www.postgresql.org/docs/current/interactive/datatype-character.html) -func (db *PGStore) MaxLength(l int) { - for _, c := range db.Codecs { - if codec, ok := c.(*securecookie.SecureCookie); ok { - codec.MaxLength(l) - } - } -} - -// MaxAge sets the maximum age for the store and the underlying cookie -// implementation. Individual sessions can be deleted by setting Options.MaxAge -// = -1 for that session. -func (db *PGStore) MaxAge(age int) { - db.Options.MaxAge = age - - // Set the maxAge for each securecookie instance. - for _, codec := range db.Codecs { - if sc, ok := codec.(*securecookie.SecureCookie); ok { - sc.MaxAge(age) - } - } -} - -// load fetches a session by ID from the database and decodes its content -// into session.Values. -func (db *PGStore) load(session *sessions.Session) error { - var s PGSession - - err := db.selectOne(&s, session.ID) - if err != nil { - return err - } - - return securecookie.DecodeMulti(session.Name(), string(s.Data), &session.Values, db.Codecs...) -} - -// save writes encoded session.Values to a database record. -// writes to http_sessions table by default. -func (db *PGStore) save(session *sessions.Session) error { - encoded, err := securecookie.EncodeMulti(session.Name(), session.Values, db.Codecs...) - if err != nil { - return err - } - - crOn := session.Values["created_on"] - exOn := session.Values["expires_on"] - - var expiresOn time.Time - - createdOn, ok := crOn.(time.Time) - if !ok { - createdOn = time.Now() - } - - if exOn == nil { - expiresOn = time.Now().Add(time.Second * time.Duration(session.Options.MaxAge)) - } else { - expiresOn = exOn.(time.Time) - if expiresOn.Sub(time.Now().Add(time.Second*time.Duration(session.Options.MaxAge))) < 0 { - expiresOn = time.Now().Add(time.Second * time.Duration(session.Options.MaxAge)) - } - } - - s := PGSession{ - Key: session.ID, - Data: encoded, - CreatedOn: createdOn, - ExpiresOn: expiresOn, - ModifiedOn: time.Now(), - } - - if session.IsNew { - return db.insert(&s) - } - - return db.update(&s) -} - -// Delete session -func (db *PGStore) destroy(session *sessions.Session) error { - _, err := db.DbPool.Exec("DELETE FROM http_sessions WHERE key = $1", session.ID) - return err -} - -func (db *PGStore) createSessionsTable() error { - stmt := `CREATE TABLE IF NOT EXISTS http_sessions ( - id BIGSERIAL PRIMARY KEY, - key BYTEA, - data BYTEA, - created_on TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, - modified_on TIMESTAMPTZ, - expires_on TIMESTAMPTZ);` - - _, err := db.DbPool.Exec(stmt) - if err != nil { - return errors.Wrapf(err, "Unable to create http_sessions table in the database") - } - - return nil -} - -func (db *PGStore) selectOne(s *PGSession, key string) error { - stmt := "SELECT id, key, data, created_on, modified_on, expires_on FROM http_sessions WHERE key = $1" - err := db.DbPool.QueryRow(stmt, key).Scan(&s.ID, &s.Key, &s.Data, &s.CreatedOn, &s.ModifiedOn, &s.ExpiresOn) - if err != nil { - return errors.Wrapf(err, "Unable to find session in the database") - } - - return nil -} - -func (db *PGStore) insert(s *PGSession) error { - stmt := `INSERT INTO http_sessions (key, data, created_on, modified_on, expires_on) - VALUES ($1, $2, $3, $4, $5)` - _, err := db.DbPool.Exec(stmt, s.Key, s.Data, s.CreatedOn, s.ModifiedOn, s.ExpiresOn) - - return err -} - -func (db *PGStore) update(s *PGSession) error { - stmt := `UPDATE http_sessions SET data=$1, modified_on=$2, expires_on=$3 WHERE key=$4` - _, err := db.DbPool.Exec(stmt, s.Data, s.ModifiedOn, s.ExpiresOn, s.Key) - - return err -} diff --git a/vendor/github.com/antonlindstrom/pgstore/pgstore_test.go b/vendor/github.com/antonlindstrom/pgstore/pgstore_test.go deleted file mode 100644 index cfc0a92da..000000000 --- a/vendor/github.com/antonlindstrom/pgstore/pgstore_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package pgstore - -import ( - "encoding/base64" - "net/http" - "os" - "testing" - - "github.com/gorilla/securecookie" - "github.com/gorilla/sessions" -) - -type headerOnlyResponseWriter http.Header - -func (ho headerOnlyResponseWriter) Header() http.Header { - return http.Header(ho) -} - -func (ho headerOnlyResponseWriter) Write([]byte) (int, error) { - panic("NOIMPL") -} - -func (ho headerOnlyResponseWriter) WriteHeader(int) { - panic("NOIMPL") -} - -var secret = "EyaC2BPcJtNqU3tjEHy+c+Wmqc1yihYIbUWEl/jk0Ga73kWBclmuSFd9HuJKwJw/Wdsh1XnjY2Bw1HBVph6WOw==" - -func TestPGStore(t *testing.T) { - dsn := os.Getenv("PGSTORE_TEST_CONN") - if dsn == "" { - t.Skip("This test requires a real database.") - } - - ss, err := NewPGStore(dsn, []byte(secret)) - if err != nil { - t.Fatal("Failed to get store", err) - } - - defer ss.Close() - - // ROUND 1 - Check that the cookie is being saved - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - - session, err := ss.Get(req, "mysess") - if err != nil { - t.Fatal("failed to get session", err.Error()) - } - - session.Values["counter"] = 1 - - m := make(http.Header) - if err = ss.Save(req, headerOnlyResponseWriter(m), session); err != nil { - t.Fatal("Failed to save session:", err.Error()) - } - - if m["Set-Cookie"][0][0:6] != "mysess" { - t.Fatal("Cookie wasn't set!") - } - - // ROUND 2 - check that the cookie can be retrieved - req, err = http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create round 2 request", err) - } - - encoded, err := securecookie.EncodeMulti(session.Name(), session.ID, ss.Codecs...) - if err != nil { - t.Fatal("Failed to make cookie value", err) - } - - req.AddCookie(sessions.NewCookie(session.Name(), encoded, session.Options)) - - session, err = ss.Get(req, "mysess") - if err != nil { - t.Fatal("failed to get round 2 session", err.Error()) - } - - if session.Values["counter"] != 1 { - t.Fatal("Retrieved session had wrong value:", session.Values["counter"]) - } - - session.Values["counter"] = 9 // set new value for round 3 - if err = ss.Save(req, headerOnlyResponseWriter(m), session); err != nil { - t.Fatal("Failed to save session:", err.Error()) - } - - // ROUND 2 - check that the cookie has been updated - req, err = http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create round 3 request", err) - } - req.AddCookie(sessions.NewCookie(session.Name(), encoded, session.Options)) - - session, err = ss.Get(req, "mysess") - if err != nil { - t.Fatal("failed to get session round 3", err.Error()) - } - - if session.Values["counter"] != 9 { - t.Fatal("Retrieved session had wrong value in round 3:", session.Values["counter"]) - } - - // ROUND 3 - Increase max length - req, err = http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create round 3 request", err) - } - - req.AddCookie(sessions.NewCookie(session.Name(), encoded, session.Options)) - session, err = ss.New(req, "my session") - session.Values["big"] = make([]byte, base64.StdEncoding.DecodedLen(4096*2)) - - if err = ss.Save(req, headerOnlyResponseWriter(m), session); err == nil { - t.Fatal("expected an error, got nil") - } - - ss.MaxLength(4096 * 3) // A bit more than the value size to account for encoding overhead. - if err = ss.Save(req, headerOnlyResponseWriter(m), session); err != nil { - t.Fatal("Failed to save session:", err.Error()) - } -} - -func TestSessionOptionsAreUniquePerSession(t *testing.T) { - dsn := os.Getenv("PGSTORE_TEST_CONN") - if dsn == "" { - t.Skip("This test requires a real database.") - } - - ss, err := NewPGStore(dsn, []byte(secret)) - if err != nil { - t.Fatal("Failed to get store", err) - } - - defer ss.Close() - - ss.Options.MaxAge = 900 - - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("Failed to create request", err) - } - - session, err := ss.Get(req, "newsess") - if err != nil { - t.Fatal("Failed to create session", err) - } - - session.Options.MaxAge = -1 - - if ss.Options.MaxAge != 900 { - t.Fatalf("PGStore.Options.MaxAge: expected %d, got %d", 900, ss.Options.MaxAge) - } -} diff --git a/vendor/github.com/labstack/echo/LICENSE b/vendor/github.com/bluekeyes/hatpear/LICENSE similarity index 95% rename from vendor/github.com/labstack/echo/LICENSE rename to vendor/github.com/bluekeyes/hatpear/LICENSE index b5b006b4e..3c19fffca 100644 --- a/vendor/github.com/labstack/echo/LICENSE +++ b/vendor/github.com/bluekeyes/hatpear/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) 2017 LabStack +Copyright (c) 2017 Billy Keyes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/bluekeyes/hatpear/hatpear.go b/vendor/github.com/bluekeyes/hatpear/hatpear.go new file mode 100644 index 000000000..90738ea7a --- /dev/null +++ b/vendor/github.com/bluekeyes/hatpear/hatpear.go @@ -0,0 +1,175 @@ +// Package hatpear provides a way to aggregate errors from HTTP handlers so +// they can be processed by middleware. Errors are stored in the context of the +// current request either manually, when using standard library handler types, +// or automatically, when using this package's handler types. +// +// Using the middleware returned by the Catch function is required for this +// package to work; usage of all other functions and types is optional. +package hatpear + +import ( + "context" + "fmt" + "io" + "net/http" + "runtime" +) + +type contextKey int + +const ( + errorKey contextKey = iota +) + +// Store stores an error into the request's context. It panics if the request +// was not configured to store errors. +func Store(r *http.Request, err error) { + errptr, ok := r.Context().Value(errorKey).(*error) + if !ok { + panic("hatpear: request not configured to store errors") + } + // check err after checking context to fail fast if unconfigured + if err != nil { + *errptr = err + } +} + +// Get retrieves an error from the request's context. It returns nil if the +// request was not configured to store errors. +func Get(r *http.Request) error { + errptr, ok := r.Context().Value(errorKey).(*error) + if !ok { + return nil + } + return *errptr +} + +// Middleware adds additional functionality to an existing handler. +type Middleware func(http.Handler) http.Handler + +// Catch creates middleware that processes errors stored while serving a +// request. Errors are passed to the callback, which should write them to the +// response in an appropriate format. This is usually the outermost middleware +// in a chain. +func Catch(h func(w http.ResponseWriter, r *http.Request, err error)) Middleware { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + ctx := context.WithValue(r.Context(), errorKey, &err) + + next.ServeHTTP(w, r.WithContext(ctx)) + if err != nil { + h(w, r, err) + } + }) + } +} + +// Handler is a variant on http.Handler that can return an error. +type Handler interface { + ServeHTTP(w http.ResponseWriter, r *http.Request) error +} + +// HandlerFunc is a variant on http.HandlerFunc that can return an error. +type HandlerFunc func(w http.ResponseWriter, r *http.Request) error + +func (f HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) error { + return f(w, r) +} + +// Try converts a handler to a standard http.Handler, storing any error in the +// request's context. +func Try(h Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + err := h.ServeHTTP(w, r) + Store(r, err) + }) +} + +var ( + // RecoverStackDepth is the max depth of stack trace to recover on panic. + RecoverStackDepth = 32 +) + +// Recover creates middleware that can recover from a panic in a handler, +// storing a PanicError for future handling. +func Recover() Middleware { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + defer func() { + if v := recover(); v != nil { + Store(r, PanicError{ + value: v, + stack: stack(1), + }) + } + }() + next.ServeHTTP(w, r) + }) + } +} + +func stack(skip int) []runtime.Frame { + rpc := make([]uintptr, RecoverStackDepth) + + n := runtime.Callers(skip+2, rpc) + frames := runtime.CallersFrames(rpc[0:n]) + + var stack []runtime.Frame + for { + f, more := frames.Next() + if !more { + break + } + stack = append(stack, f) + } + return stack +} + +// PanicError is an Error created from a recovered panic. +type PanicError struct { + value interface{} + stack []runtime.Frame +} + +// Value returns the exact value with which panic() was called. +func (e PanicError) Value() interface{} { + return e.value +} + +// StackTrace returns the stack of the panicking goroutine. +func (e PanicError) StackTrace() []runtime.Frame { + return e.stack +} + +// Format formats the error optionally including the stack trace. +// +// %s the error message +// %v the error message and the source file and line number for each stack frame +// +// Format accepts the following flags: +// +// %+v the error message, and the function, file, and line for each stack frame +func (e PanicError) Format(s fmt.State, verb rune) { + switch verb { + case 's': + io.WriteString(s, e.Error()) + case 'v': + io.WriteString(s, e.Error()) + for _, f := range e.stack { + io.WriteString(s, "\n") + if s.Flag('+') { + fmt.Fprintf(s, "%s\n\t", f.Function) + } + fmt.Fprintf(s, "%s:%d", f.File, f.Line) + } + } +} + +func (e PanicError) Error() string { + v := e.value + if err, ok := v.(error); ok { + v = err.Error() + } + return fmt.Sprintf("panic: %v", v) +} diff --git a/vendor/github.com/boj/redistore/.gitignore b/vendor/github.com/boj/redistore/.gitignore deleted file mode 100644 index 5ca0973f8..000000000 --- a/vendor/github.com/boj/redistore/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store - diff --git a/vendor/github.com/boj/redistore/LICENSE b/vendor/github.com/boj/redistore/LICENSE deleted file mode 100644 index fabd7b99c..000000000 --- a/vendor/github.com/boj/redistore/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013 Brian Jones - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/boj/redistore/README.md b/vendor/github.com/boj/redistore/README.md deleted file mode 100644 index e6bb250a2..000000000 --- a/vendor/github.com/boj/redistore/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# redistore - -[![Build Status](https://drone.io/github.com/boj/redistore/status.png)](https://drone.io/github.com/boj/redistore/latest) - -A session store backend for [gorilla/sessions](http://www.gorillatoolkit.org/pkg/sessions) - [src](https://github.com/gorilla/sessions). - -## Requirements - -Depends on the [Redigo](https://github.com/garyburd/redigo) Redis library. - -## Installation - - go get gopkg.in/boj/redistore.v1 - -## Documentation - -Available on [godoc.org](http://www.godoc.org/gopkg.in/boj/redistore.v1). - -See http://www.gorillatoolkit.org/pkg/sessions for full documentation on underlying interface. - -### Example - - // Fetch new store. - store, err := NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - if err != nil { - panic(err) - } - defer store.Close() - - // Get a session. - session, err = store.Get(req, "session-key") - if err != nil { - log.Error(err.Error()) - } - - // Add a value. - session.Values["foo"] = "bar" - - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - - // Delete session. - session.Options.MaxAge = -1 - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - - // Change session storage configuration for MaxAge = 10 days. - store.SetMaxAge(10*24*3600) - diff --git a/vendor/github.com/boj/redistore/doc.go b/vendor/github.com/boj/redistore/doc.go deleted file mode 100644 index 43fb829cb..000000000 --- a/vendor/github.com/boj/redistore/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package redistore is a session store backend for gorilla/sessions -*/ -package redistore diff --git a/vendor/github.com/boj/redistore/redistore.go b/vendor/github.com/boj/redistore/redistore.go deleted file mode 100644 index f19a9c8cd..000000000 --- a/vendor/github.com/boj/redistore/redistore.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2012 Brian "bojo" Jones. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package redistore - -import ( - "bytes" - "encoding/base32" - "encoding/gob" - "encoding/json" - "errors" - "fmt" - "net/http" - "strings" - "time" - - "github.com/garyburd/redigo/redis" - "github.com/gorilla/securecookie" - "github.com/gorilla/sessions" -) - -// Amount of time for cookies/redis keys to expire. -var sessionExpire = 86400 * 30 - -// SessionSerializer provides an interface hook for alternative serializers -type SessionSerializer interface { - Deserialize(d []byte, ss *sessions.Session) error - Serialize(ss *sessions.Session) ([]byte, error) -} - -// JSONSerializer encode the session map to JSON. -type JSONSerializer struct{} - -// Serialize to JSON. Will err if there are unmarshalable key values -func (s JSONSerializer) Serialize(ss *sessions.Session) ([]byte, error) { - m := make(map[string]interface{}, len(ss.Values)) - for k, v := range ss.Values { - ks, ok := k.(string) - if !ok { - err := fmt.Errorf("Non-string key value, cannot serialize session to JSON: %v", k) - fmt.Printf("redistore.JSONSerializer.serialize() Error: %v", err) - return nil, err - } - m[ks] = v - } - return json.Marshal(m) -} - -// Deserialize back to map[string]interface{} -func (s JSONSerializer) Deserialize(d []byte, ss *sessions.Session) error { - m := make(map[string]interface{}) - err := json.Unmarshal(d, &m) - if err != nil { - fmt.Printf("redistore.JSONSerializer.deserialize() Error: %v", err) - return err - } - for k, v := range m { - ss.Values[k] = v - } - return nil -} - -// GobSerializer uses gob package to encode the session map -type GobSerializer struct{} - -// Serialize using gob -func (s GobSerializer) Serialize(ss *sessions.Session) ([]byte, error) { - buf := new(bytes.Buffer) - enc := gob.NewEncoder(buf) - err := enc.Encode(ss.Values) - if err == nil { - return buf.Bytes(), nil - } - return nil, err -} - -// Deserialize back to map[interface{}]interface{} -func (s GobSerializer) Deserialize(d []byte, ss *sessions.Session) error { - dec := gob.NewDecoder(bytes.NewBuffer(d)) - return dec.Decode(&ss.Values) -} - -// RediStore stores sessions in a redis backend. -type RediStore struct { - Pool *redis.Pool - Codecs []securecookie.Codec - Options *sessions.Options // default configuration - DefaultMaxAge int // default Redis TTL for a MaxAge == 0 session - maxLength int - keyPrefix string - serializer SessionSerializer -} - -// SetMaxLength sets RediStore.maxLength if the `l` argument is greater or equal 0 -// maxLength restricts the maximum length of new sessions to l. -// If l is 0 there is no limit to the size of a session, use with caution. -// The default for a new RediStore is 4096. Redis allows for max. -// value sizes of up to 512MB (http://redis.io/topics/data-types) -// Default: 4096, -func (s *RediStore) SetMaxLength(l int) { - if l >= 0 { - s.maxLength = l - } -} - -// SetKeyPrefix set the prefix -func (s *RediStore) SetKeyPrefix(p string) { - s.keyPrefix = p -} - -// SetSerializer sets the serializer -func (s *RediStore) SetSerializer(ss SessionSerializer) { - s.serializer = ss -} - -// SetMaxAge restricts the maximum age, in seconds, of the session record -// both in database and a browser. This is to change session storage configuration. -// If you want just to remove session use your session `s` object and change it's -// `Options.MaxAge` to -1, as specified in -// http://godoc.org/github.com/gorilla/sessions#Options -// -// Default is the one provided by this package value - `sessionExpire`. -// Set it to 0 for no restriction. -// Because we use `MaxAge` also in SecureCookie crypting algorithm you should -// use this function to change `MaxAge` value. -func (s *RediStore) SetMaxAge(v int) { - var c *securecookie.SecureCookie - var ok bool - s.Options.MaxAge = v - for i := range s.Codecs { - if c, ok = s.Codecs[i].(*securecookie.SecureCookie); ok { - c.MaxAge(v) - } else { - fmt.Printf("Can't change MaxAge on codec %v\n", s.Codecs[i]) - } - } -} - -func dial(network, address, password string) (redis.Conn, error) { - c, err := redis.Dial(network, address) - if err != nil { - return nil, err - } - if password != "" { - if _, err := c.Do("AUTH", password); err != nil { - c.Close() - return nil, err - } - } - return c, err -} - -// NewRediStore returns a new RediStore. -// size: maximum number of idle connections. -func NewRediStore(size int, network, address, password string, keyPairs ...[]byte) (*RediStore, error) { - return NewRediStoreWithPool(&redis.Pool{ - MaxIdle: size, - IdleTimeout: 240 * time.Second, - TestOnBorrow: func(c redis.Conn, t time.Time) error { - _, err := c.Do("PING") - return err - }, - Dial: func() (redis.Conn, error) { - return dial(network, address, password) - }, - }, keyPairs...) -} - -func dialWithDB(network, address, password, DB string) (redis.Conn, error) { - c, err := dial(network, address, password) - if err != nil { - return nil, err - } - if _, err := c.Do("SELECT", DB); err != nil { - c.Close() - return nil, err - } - return c, err -} - -// NewRediStoreWithDB - like NewRedisStore but accepts `DB` parameter to select -// redis DB instead of using the default one ("0") -func NewRediStoreWithDB(size int, network, address, password, DB string, keyPairs ...[]byte) (*RediStore, error) { - return NewRediStoreWithPool(&redis.Pool{ - MaxIdle: size, - IdleTimeout: 240 * time.Second, - TestOnBorrow: func(c redis.Conn, t time.Time) error { - _, err := c.Do("PING") - return err - }, - Dial: func() (redis.Conn, error) { - return dialWithDB(network, address, password, DB) - }, - }, keyPairs...) -} - -// NewRediStoreWithPool instantiates a RediStore with a *redis.Pool passed in. -func NewRediStoreWithPool(pool *redis.Pool, keyPairs ...[]byte) (*RediStore, error) { - rs := &RediStore{ - // http://godoc.org/github.com/garyburd/redigo/redis#Pool - Pool: pool, - Codecs: securecookie.CodecsFromPairs(keyPairs...), - Options: &sessions.Options{ - Path: "/", - MaxAge: sessionExpire, - }, - DefaultMaxAge: 60 * 20, // 20 minutes seems like a reasonable default - maxLength: 4096, - keyPrefix: "session_", - serializer: GobSerializer{}, - } - _, err := rs.ping() - return rs, err -} - -// Close closes the underlying *redis.Pool -func (s *RediStore) Close() error { - return s.Pool.Close() -} - -// Get returns a session for the given name after adding it to the registry. -// -// See gorilla/sessions FilesystemStore.Get(). -func (s *RediStore) Get(r *http.Request, name string) (*sessions.Session, error) { - return sessions.GetRegistry(r).Get(s, name) -} - -// New returns a session for the given name without adding it to the registry. -// -// See gorilla/sessions FilesystemStore.New(). -func (s *RediStore) New(r *http.Request, name string) (*sessions.Session, error) { - var err error - session := sessions.NewSession(s, name) - // make a copy - options := *s.Options - session.Options = &options - session.IsNew = true - if c, errCookie := r.Cookie(name); errCookie == nil { - err = securecookie.DecodeMulti(name, c.Value, &session.ID, s.Codecs...) - if err == nil { - ok, err := s.load(session) - session.IsNew = !(err == nil && ok) // not new if no error and data available - } - } - return session, err -} - -// Save adds a single session to the response. -func (s *RediStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error { - // Marked for deletion. - if session.Options.MaxAge < 0 { - if err := s.delete(session); err != nil { - return err - } - http.SetCookie(w, sessions.NewCookie(session.Name(), "", session.Options)) - } else { - // Build an alphanumeric key for the redis store. - if session.ID == "" { - session.ID = strings.TrimRight(base32.StdEncoding.EncodeToString(securecookie.GenerateRandomKey(32)), "=") - } - if err := s.save(session); err != nil { - return err - } - encoded, err := securecookie.EncodeMulti(session.Name(), session.ID, s.Codecs...) - if err != nil { - return err - } - http.SetCookie(w, sessions.NewCookie(session.Name(), encoded, session.Options)) - } - return nil -} - -// Delete removes the session from redis, and sets the cookie to expire. -// -// WARNING: This method should be considered deprecated since it is not exposed via the gorilla/sessions interface. -// Set session.Options.MaxAge = -1 and call Save instead. - July 18th, 2013 -func (s *RediStore) Delete(r *http.Request, w http.ResponseWriter, session *sessions.Session) error { - conn := s.Pool.Get() - defer conn.Close() - if _, err := conn.Do("DEL", s.keyPrefix+session.ID); err != nil { - return err - } - // Set cookie to expire. - options := *session.Options - options.MaxAge = -1 - http.SetCookie(w, sessions.NewCookie(session.Name(), "", &options)) - // Clear session values. - for k := range session.Values { - delete(session.Values, k) - } - return nil -} - -// ping does an internal ping against a server to check if it is alive. -func (s *RediStore) ping() (bool, error) { - conn := s.Pool.Get() - defer conn.Close() - data, err := conn.Do("PING") - if err != nil || data == nil { - return false, err - } - return (data == "PONG"), nil -} - -// save stores the session in redis. -func (s *RediStore) save(session *sessions.Session) error { - b, err := s.serializer.Serialize(session) - if err != nil { - return err - } - if s.maxLength != 0 && len(b) > s.maxLength { - return errors.New("SessionStore: the value to store is too big") - } - conn := s.Pool.Get() - defer conn.Close() - if err = conn.Err(); err != nil { - return err - } - age := session.Options.MaxAge - if age == 0 { - age = s.DefaultMaxAge - } - _, err = conn.Do("SETEX", s.keyPrefix+session.ID, age, b) - return err -} - -// load reads the session from redis. -// returns true if there is a sessoin data in DB -func (s *RediStore) load(session *sessions.Session) (bool, error) { - conn := s.Pool.Get() - defer conn.Close() - if err := conn.Err(); err != nil { - return false, err - } - data, err := conn.Do("GET", s.keyPrefix+session.ID) - if err != nil { - return false, err - } - if data == nil { - return false, nil // no data was associated with this key - } - b, err := redis.Bytes(data, err) - if err != nil { - return false, err - } - return true, s.serializer.Deserialize(b, session) -} - -// delete removes keys from redis if MaxAge<0 -func (s *RediStore) delete(session *sessions.Session) error { - conn := s.Pool.Get() - defer conn.Close() - if _, err := conn.Do("DEL", s.keyPrefix+session.ID); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/boj/redistore/redistore_test.go b/vendor/github.com/boj/redistore/redistore_test.go deleted file mode 100644 index bbc6846c9..000000000 --- a/vendor/github.com/boj/redistore/redistore_test.go +++ /dev/null @@ -1,404 +0,0 @@ -package redistore - -import ( - "bytes" - "encoding/base64" - "encoding/gob" - "net/http" - "net/http/httptest" - "testing" - - "github.com/gorilla/sessions" -) - -// ---------------------------------------------------------------------------- -// ResponseRecorder -// ---------------------------------------------------------------------------- -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// ResponseRecorder is an implementation of http.ResponseWriter that -// records its mutations for later inspection in tests. -type ResponseRecorder struct { - Code int // the HTTP response code from WriteHeader - HeaderMap http.Header // the HTTP response headers - Body *bytes.Buffer // if non-nil, the bytes.Buffer to append written data to - Flushed bool -} - -// NewRecorder returns an initialized ResponseRecorder. -func NewRecorder() *ResponseRecorder { - return &ResponseRecorder{ - HeaderMap: make(http.Header), - Body: new(bytes.Buffer), - } -} - -// DefaultRemoteAddr is the default remote address to return in RemoteAddr if -// an explicit DefaultRemoteAddr isn't set on ResponseRecorder. -const DefaultRemoteAddr = "1.2.3.4" - -// Header returns the response headers. -func (rw *ResponseRecorder) Header() http.Header { - return rw.HeaderMap -} - -// Write always succeeds and writes to rw.Body, if not nil. -func (rw *ResponseRecorder) Write(buf []byte) (int, error) { - if rw.Body != nil { - rw.Body.Write(buf) - } - if rw.Code == 0 { - rw.Code = http.StatusOK - } - return len(buf), nil -} - -// WriteHeader sets rw.Code. -func (rw *ResponseRecorder) WriteHeader(code int) { - rw.Code = code -} - -// Flush sets rw.Flushed to true. -func (rw *ResponseRecorder) Flush() { - rw.Flushed = true -} - -// ---------------------------------------------------------------------------- - -type FlashMessage struct { - Type int - Message string -} - -func TestRediStore(t *testing.T) { - var req *http.Request - var rsp *ResponseRecorder - var hdr http.Header - var err error - var ok bool - var cookies []string - var session *sessions.Session - var flashes []interface{} - - // Copyright 2012 The Gorilla Authors. All rights reserved. - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - - // Round 1 ---------------------------------------------------------------- - - // RedisStore - store, err := NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - if err != nil { - t.Fatal(err.Error()) - } - defer store.Close() - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Get a flash. - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected empty flashes; Got %v", flashes) - } - // Add some flashes. - session.AddFlash("foo") - session.AddFlash("bar") - // Custom key. - session.AddFlash("baz", "custom_key") - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - hdr = rsp.Header() - cookies, ok = hdr["Set-Cookie"] - if !ok || len(cookies) != 1 { - t.Fatalf("No cookies. Header:", hdr) - } - - // Round 2 ---------------------------------------------------------------- - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - req.Header.Add("Cookie", cookies[0]) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Check all saved values. - flashes = session.Flashes() - if len(flashes) != 2 { - t.Fatalf("Expected flashes; Got %v", flashes) - } - if flashes[0] != "foo" || flashes[1] != "bar" { - t.Errorf("Expected foo,bar; Got %v", flashes) - } - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected dumped flashes; Got %v", flashes) - } - // Custom key. - flashes = session.Flashes("custom_key") - if len(flashes) != 1 { - t.Errorf("Expected flashes; Got %v", flashes) - } else if flashes[0] != "baz" { - t.Errorf("Expected baz; Got %v", flashes) - } - flashes = session.Flashes("custom_key") - if len(flashes) != 0 { - t.Errorf("Expected dumped flashes; Got %v", flashes) - } - - // RediStore specific - // Set MaxAge to -1 to mark for deletion. - session.Options.MaxAge = -1 - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - - // Round 3 ---------------------------------------------------------------- - // Custom type - - // RedisStore - store, err = NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - if err != nil { - t.Fatal(err.Error()) - } - defer store.Close() - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Get a flash. - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected empty flashes; Got %v", flashes) - } - // Add some flashes. - session.AddFlash(&FlashMessage{42, "foo"}) - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - hdr = rsp.Header() - cookies, ok = hdr["Set-Cookie"] - if !ok || len(cookies) != 1 { - t.Fatalf("No cookies. Header:", hdr) - } - - // Round 4 ---------------------------------------------------------------- - // Custom type - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - req.Header.Add("Cookie", cookies[0]) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Check all saved values. - flashes = session.Flashes() - if len(flashes) != 1 { - t.Fatalf("Expected flashes; Got %v", flashes) - } - custom := flashes[0].(FlashMessage) - if custom.Type != 42 || custom.Message != "foo" { - t.Errorf("Expected %#v, got %#v", FlashMessage{42, "foo"}, custom) - } - - // RediStore specific - // Set MaxAge to -1 to mark for deletion. - session.Options.MaxAge = -1 - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - - // Round 5 ---------------------------------------------------------------- - // RediStore Delete session (deprecated) - - //req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - //req.Header.Add("Cookie", cookies[0]) - //rsp = NewRecorder() - //// Get a session. - //if session, err = store.Get(req, "session-key"); err != nil { - // t.Fatalf("Error getting session: %v", err) - //} - //// Delete session. - //if err = store.Delete(req, rsp, session); err != nil { - // t.Fatalf("Error deleting session: %v", err) - //} - //// Get a flash. - //flashes = session.Flashes() - //if len(flashes) != 0 { - // t.Errorf("Expected empty flashes; Got %v", flashes) - //} - //hdr = rsp.Header() - //cookies, ok = hdr["Set-Cookie"] - //if !ok || len(cookies) != 1 { - // t.Fatalf("No cookies. Header:", hdr) - //} - - // Round 6 ---------------------------------------------------------------- - // RediStore change MaxLength of session - - store, err = NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - if err != nil { - t.Fatal(err.Error()) - } - req, err = http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - w := httptest.NewRecorder() - - session, err = store.New(req, "my session") - session.Values["big"] = make([]byte, base64.StdEncoding.DecodedLen(4096*2)) - err = session.Save(req, w) - if err == nil { - t.Fatal("expected an error, got nil") - } - - store.SetMaxLength(4096 * 3) // A bit more than the value size to account for encoding overhead. - err = session.Save(req, w) - if err != nil { - t.Fatal("failed to Save:", err) - } - - // Round 7 ---------------------------------------------------------------- - - // RedisStoreWithDB - store, err = NewRediStoreWithDB(10, "tcp", ":6379", "", "1", []byte("secret-key")) - if err != nil { - t.Fatal(err.Error()) - } - defer store.Close() - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - rsp = NewRecorder() - // Get a session. Using the same key as previously, but on different DB - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Get a flash. - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected empty flashes; Got %v", flashes) - } - // Add some flashes. - session.AddFlash("foo") - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - hdr = rsp.Header() - cookies, ok = hdr["Set-Cookie"] - if !ok || len(cookies) != 1 { - t.Fatalf("No cookies. Header:", hdr) - } - - // Get a session. - req.Header.Add("Cookie", cookies[0]) - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Check all saved values. - flashes = session.Flashes() - if len(flashes) != 1 { - t.Fatalf("Expected flashes; Got %v", flashes) - } - if flashes[0] != "foo" { - t.Errorf("Expected foo,bar; Got %v", flashes) - } - - // Round 8 ---------------------------------------------------------------- - // JSONSerializer - - // RedisStore - store, err = NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - store.SetSerializer(JSONSerializer{}) - if err != nil { - t.Fatal(err.Error()) - } - defer store.Close() - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Get a flash. - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected empty flashes; Got %v", flashes) - } - // Add some flashes. - session.AddFlash("foo") - // Save. - if err = sessions.Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - hdr = rsp.Header() - cookies, ok = hdr["Set-Cookie"] - if !ok || len(cookies) != 1 { - t.Fatalf("No cookies. Header:", hdr) - } - - // Get a session. - req.Header.Add("Cookie", cookies[0]) - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Check all saved values. - flashes = session.Flashes() - if len(flashes) != 1 { - t.Fatalf("Expected flashes; Got %v", flashes) - } - if flashes[0] != "foo" { - t.Errorf("Expected foo,bar; Got %v", flashes) - } -} - -func TestPingGoodPort(t *testing.T) { - store, _ := NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - defer store.Close() - ok, err := store.ping() - if err != nil { - t.Error(err.Error()) - } - if !ok { - t.Error("Expected server to PONG") - } -} - -func TestPingBadPort(t *testing.T) { - store, _ := NewRediStore(10, "tcp", ":6378", "", []byte("secret-key")) - defer store.Close() - _, err := store.ping() - if err == nil { - t.Error("Expected error") - } -} - -func ExampleRediStore() { - // RedisStore - store, err := NewRediStore(10, "tcp", ":6379", "", []byte("secret-key")) - if err != nil { - panic(err) - } - defer store.Close() -} - -func init() { - gob.Register(FlashMessage{}) -} diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/LICENSE b/vendor/github.com/bradleyfalzon/ghinstallation/LICENSE new file mode 100644 index 000000000..cf1ab25da --- /dev/null +++ b/vendor/github.com/bradleyfalzon/ghinstallation/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/appsTransport.go b/vendor/github.com/bradleyfalzon/ghinstallation/appsTransport.go new file mode 100644 index 000000000..f34219cc7 --- /dev/null +++ b/vendor/github.com/bradleyfalzon/ghinstallation/appsTransport.go @@ -0,0 +1,80 @@ +package ghinstallation + +import ( + "crypto/rsa" + "fmt" + "io/ioutil" + "net/http" + "strconv" + "time" + + jwt "github.com/dgrijalva/jwt-go" +) + +// AppsTransport provides a http.RoundTripper by wrapping an existing +// http.RoundTripper and provides GitHub Apps authentication as a +// GitHub App. +// +// Client can also be overwritten, and is useful to change to one which +// provides retry logic if you do experience retryable errors. +// +// See https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/ +type AppsTransport struct { + BaseURL string // BaseURL is the scheme and host for GitHub API, defaults to https://api.github.com + Client Client // Client to use to refresh tokens, defaults to http.Client with provided transport + tr http.RoundTripper // tr is the underlying roundtripper being wrapped + key *rsa.PrivateKey // key is the GitHub Integration's private key + integrationID int // integrationID is the GitHub Integration's Installation ID +} + +// NewAppsTransportKeyFromFile returns a AppsTransport using a private key from file. +func NewAppsTransportKeyFromFile(tr http.RoundTripper, integrationID int, privateKeyFile string) (*AppsTransport, error) { + privateKey, err := ioutil.ReadFile(privateKeyFile) + if err != nil { + return nil, fmt.Errorf("could not read private key: %s", err) + } + return NewAppsTransport(tr, integrationID, privateKey) +} + +// NewAppsTransport returns a AppsTransport using private key. The key is parsed +// and if any errors occur the error is non-nil. +// +// The provided tr http.RoundTripper should be shared between multiple +// installations to ensure reuse of underlying TCP connections. +// +// The returned Transport's RoundTrip method is safe to be used concurrently. +func NewAppsTransport(tr http.RoundTripper, integrationID int, privateKey []byte) (*AppsTransport, error) { + t := &AppsTransport{ + tr: tr, + integrationID: integrationID, + BaseURL: apiBaseURL, + Client: &http.Client{Transport: tr}, + } + var err error + t.key, err = jwt.ParseRSAPrivateKeyFromPEM(privateKey) + if err != nil { + return nil, fmt.Errorf("could not parse private key: %s", err) + } + return t, nil +} + +// RoundTrip implements http.RoundTripper interface. +func (t *AppsTransport) RoundTrip(req *http.Request) (*http.Response, error) { + claims := &jwt.StandardClaims{ + IssuedAt: time.Now().Unix(), + ExpiresAt: time.Now().Add(time.Minute).Unix(), + Issuer: strconv.Itoa(t.integrationID), + } + bearer := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) + + ss, err := bearer.SignedString(t.key) + if err != nil { + return nil, fmt.Errorf("could not sign jwt: %s", err) + } + + req.Header.Set("Authorization", "Bearer "+ss) + req.Header.Set("Accept", acceptHeader) + + resp, err := t.tr.RoundTrip(req) + return resp, err +} diff --git a/vendor/github.com/bradleyfalzon/ghinstallation/transport.go b/vendor/github.com/bradleyfalzon/ghinstallation/transport.go new file mode 100644 index 000000000..fb4628a7a --- /dev/null +++ b/vendor/github.com/bradleyfalzon/ghinstallation/transport.go @@ -0,0 +1,136 @@ +package ghinstallation + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "sync" + "time" +) + +const ( + // acceptHeader is the GitHub Integrations Preview Accept header. + acceptHeader = "application/vnd.github.machine-man-preview+json" + apiBaseURL = "https://api.github.com" +) + +// Transport provides a http.RoundTripper by wrapping an existing +// http.RoundTripper and provides GitHub Apps authentication as an +// installation. +// +// Client can also be overwritten, and is useful to change to one which +// provides retry logic if you do experience retryable errors. +// +// See https://developer.github.com/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/ +type Transport struct { + BaseURL string // BaseURL is the scheme and host for GitHub API, defaults to https://api.github.com + Client Client // Client to use to refresh tokens, defaults to http.Client with provided transport + tr http.RoundTripper // tr is the underlying roundtripper being wrapped + integrationID int // integrationID is the GitHub Integration's Installation ID + installationID int // installationID is the GitHub Integration's Installation ID + appsTransport *AppsTransport + + mu *sync.Mutex // mu protects token + token *accessToken // token is the installation's access token +} + +// accessToken is an installation access token response from GitHub +type accessToken struct { + Token string `json:"token"` + ExpiresAt time.Time `json:"expires_at"` +} + +var _ http.RoundTripper = &Transport{} + +// NewKeyFromFile returns a Transport using a private key from file. +func NewKeyFromFile(tr http.RoundTripper, integrationID, installationID int, privateKeyFile string) (*Transport, error) { + privateKey, err := ioutil.ReadFile(privateKeyFile) + if err != nil { + return nil, fmt.Errorf("could not read private key: %s", err) + } + return New(tr, integrationID, installationID, privateKey) +} + +// Client is a HTTP client which sends a http.Request and returns a http.Response +// or an error. +type Client interface { + Do(*http.Request) (*http.Response, error) +} + +// New returns an Transport using private key. The key is parsed +// and if any errors occur the error is non-nil. +// +// The provided tr http.RoundTripper should be shared between multiple +// installations to ensure reuse of underlying TCP connections. +// +// The returned Transport's RoundTrip method is safe to be used concurrently. +func New(tr http.RoundTripper, integrationID, installationID int, privateKey []byte) (*Transport, error) { + t := &Transport{ + tr: tr, + integrationID: integrationID, + installationID: installationID, + BaseURL: apiBaseURL, + Client: &http.Client{Transport: tr}, + mu: &sync.Mutex{}, + } + var err error + t.appsTransport, err = NewAppsTransport(t.tr, t.integrationID, privateKey) + if err != nil { + return nil, err + } + return t, nil +} + +// RoundTrip implements http.RoundTripper interface. +func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { + token, err := t.Token() + if err != nil { + return nil, err + } + + req.Header.Set("Authorization", "token "+token) + req.Header.Add("Accept", acceptHeader) // We add to "Accept" header to avoid overwriting existing req headers. + resp, err := t.tr.RoundTrip(req) + return resp, err +} + +// Token checks the active token expiration and renews if necessary. Token returns +// a valid access token. If renewal fails an error is returned. +func (t *Transport) Token() (string, error) { + t.mu.Lock() + defer t.mu.Unlock() + if t.token == nil || t.token.ExpiresAt.Add(-time.Minute).Before(time.Now()) { + // Token is not set or expired/nearly expired, so refresh + if err := t.refreshToken(); err != nil { + return "", fmt.Errorf("could not refresh installation id %v's token: %s", t.installationID, err) + } + } + + return t.token.Token, nil +} + +func (t *Transport) refreshToken() error { + req, err := http.NewRequest("POST", fmt.Sprintf("%s/installations/%v/access_tokens", t.BaseURL, t.installationID), nil) + if err != nil { + return fmt.Errorf("could not create request: %s", err) + } + + t.appsTransport.BaseURL = t.BaseURL + t.appsTransport.Client = t.Client + resp, err := t.appsTransport.RoundTrip(req) + if err != nil { + return fmt.Errorf("could not get access_tokens from GitHub API for installation ID %v: %v", t.installationID, err) + } + defer resp.Body.Close() + + if resp.StatusCode/100 != 2 { + return fmt.Errorf("received non 2xx response status %q when fetching %v", resp.Status, req.URL) + } + + if err := json.NewDecoder(resp.Body).Decode(&t.token); err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/davecgh/go-spew/.gitignore b/vendor/github.com/davecgh/go-spew/.gitignore deleted file mode 100644 index 00268614f..000000000 --- a/vendor/github.com/davecgh/go-spew/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe diff --git a/vendor/github.com/davecgh/go-spew/.travis.yml b/vendor/github.com/davecgh/go-spew/.travis.yml deleted file mode 100644 index 984e0736e..000000000 --- a/vendor/github.com/davecgh/go-spew/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -go: - - 1.5.4 - - 1.6.3 - - 1.7 -install: - - go get -v golang.org/x/tools/cmd/cover -script: - - go test -v -tags=safe ./spew - - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov -after_success: - - go get -v github.com/mattn/goveralls - - export PATH=$PATH:$HOME/gopath/bin - - goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/vendor/github.com/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE index c83641619..bc52e96f2 100644 --- a/vendor/github.com/davecgh/go-spew/LICENSE +++ b/vendor/github.com/davecgh/go-spew/LICENSE @@ -2,7 +2,7 @@ ISC License Copyright (c) 2012-2016 Dave Collins -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. diff --git a/vendor/github.com/davecgh/go-spew/README.md b/vendor/github.com/davecgh/go-spew/README.md deleted file mode 100644 index 262430449..000000000 --- a/vendor/github.com/davecgh/go-spew/README.md +++ /dev/null @@ -1,205 +0,0 @@ -go-spew -======= - -[![Build Status](https://img.shields.io/travis/davecgh/go-spew.svg)] -(https://travis-ci.org/davecgh/go-spew) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) [![Coverage Status] -(https://img.shields.io/coveralls/davecgh/go-spew.svg)] -(https://coveralls.io/r/davecgh/go-spew?branch=master) - - -Go-spew implements a deep pretty printer for Go data structures to aid in -debugging. A comprehensive suite of tests with 100% test coverage is provided -to ensure proper functionality. See `test_coverage.txt` for the gocov coverage -report. Go-spew is licensed under the liberal ISC license, so it may be used in -open source or commercial projects. - -If you're interested in reading about how this package came to life and some -of the challenges involved in providing a deep pretty printer, there is a blog -post about it -[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/). - -## Documentation - -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)] -(http://godoc.org/github.com/davecgh/go-spew/spew) - -Full `go doc` style documentation for the project can be viewed online without -installing this package by using the excellent GoDoc site here: -http://godoc.org/github.com/davecgh/go-spew/spew - -You can also view the documentation locally once the package is installed with -the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to -http://localhost:6060/pkg/github.com/davecgh/go-spew/spew - -## Installation - -```bash -$ go get -u github.com/davecgh/go-spew/spew -``` - -## Quick Start - -Add this import line to the file you're working in: - -```Go -import "github.com/davecgh/go-spew/spew" -``` - -To dump a variable with full newlines, indentation, type, and pointer -information use Dump, Fdump, or Sdump: - -```Go -spew.Dump(myVar1, myVar2, ...) -spew.Fdump(someWriter, myVar1, myVar2, ...) -str := spew.Sdump(myVar1, myVar2, ...) -``` - -Alternatively, if you would prefer to use format strings with a compacted inline -printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most -compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types -and pointer addresses): - -```Go -spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) -spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) -spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -``` - -## Debugging a Web Application Example - -Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production. - -```Go -package main - -import ( - "fmt" - "html" - "net/http" - - "github.com/davecgh/go-spew/spew" -) - -func handler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/html") - fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:]) - fmt.Fprintf(w, "") -} - -func main() { - http.HandleFunc("/", handler) - http.ListenAndServe(":8080", nil) -} -``` - -## Sample Dump Output - -``` -(main.Foo) { - unexportedField: (*main.Bar)(0xf84002e210)({ - flag: (main.Flag) flagTwo, - data: (uintptr) - }), - ExportedField: (map[interface {}]interface {}) { - (string) "one": (bool) true - } -} -([]uint8) { - 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - 00000020 31 32 |12| -} -``` - -## Sample Formatter Output - -Double pointer to a uint8: -``` - %v: <**>5 - %+v: <**>(0xf8400420d0->0xf8400420c8)5 - %#v: (**uint8)5 - %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 -``` - -Pointer to circular struct with a uint8 field and a pointer to itself: -``` - %v: <*>{1 <*>} - %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} - %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} - %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} -``` - -## Configuration Options - -Configuration of spew is handled by fields in the ConfigState type. For -convenience, all of the top-level functions use a global state available via the -spew.Config global. - -It is also possible to create a ConfigState instance that provides methods -equivalent to the top-level functions. This allows concurrent configuration -options. See the ConfigState documentation for more details. - -``` -* Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - -* MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - -* DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - -* DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. This option - relies on access to the unsafe package, so it will not have any effect when - running in environments without access to the unsafe package such as Google - App Engine or with the "safe" build tag specified. - Pointer method invocation is enabled by default. - -* DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - -* DisableCapacities - DisableCapacities specifies whether to disable the printing of capacities - for arrays, slices, maps and channels. This is useful when diffing data - structures in tests. - -* ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - -* SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are supported, - with other types sorted according to the reflect.Value.String() output - which guarantees display stability. Natural map order is used by - default. - -* SpewKeys - SpewKeys specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only considered - if SortKeys is true. - -``` - -## Unsafe Package Dependency - -This package relies on the unsafe package to perform some of the more advanced -features, however it also supports a "limited" mode which allows it to work in -environments where the unsafe package is not available. By default, it will -operate in this mode on Google App Engine and when compiled with GopherJS. The -"safe" build tag may also be specified to force the package to build without -using the unsafe package. - -## License - -Go-spew is licensed under the [copyfree](http://copyfree.org) ISC License. diff --git a/vendor/github.com/davecgh/go-spew/cov_report.sh b/vendor/github.com/davecgh/go-spew/cov_report.sh deleted file mode 100644 index 9579497e4..000000000 --- a/vendor/github.com/davecgh/go-spew/cov_report.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# This script uses gocov to generate a test coverage report. -# The gocov tool my be obtained with the following command: -# go get github.com/axw/gocov/gocov -# -# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. - -# Check for gocov. -if ! type gocov >/dev/null 2>&1; then - echo >&2 "This script requires the gocov tool." - echo >&2 "You may obtain it with the following command:" - echo >&2 "go get github.com/axw/gocov/gocov" - exit 1 -fi - -# Only run the cgo tests if gcc is installed. -if type gcc >/dev/null 2>&1; then - (cd spew && gocov test -tags testcgo | gocov report) -else - (cd spew && gocov test | gocov report) -fi diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go index 8a4a6589a..792994785 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -16,7 +16,9 @@ // when the code is not running on Google App Engine, compiled by GopherJS, and // "-tags safe" is not added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe +// Go versions prior to 1.4 are disabled because they use a different layout +// for interfaces which make the implementation of unsafeReflectValue more complex. +// +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew @@ -34,80 +36,49 @@ const ( ptrSize = unsafe.Sizeof((*byte)(nil)) ) +type flag uintptr + var ( - // offsetPtr, offsetScalar, and offsetFlag are the offsets for the - // internal reflect.Value fields. These values are valid before golang - // commit ecccf07e7f9d which changed the format. The are also valid - // after commit 82f48826c6c7 which changed the format again to mirror - // the original format. Code in the init function updates these offsets - // as necessary. - offsetPtr = uintptr(ptrSize) - offsetScalar = uintptr(0) - offsetFlag = uintptr(ptrSize * 2) - - // flagKindWidth and flagKindShift indicate various bits that the - // reflect package uses internally to track kind information. - // - // flagRO indicates whether or not the value field of a reflect.Value is - // read-only. - // - // flagIndir indicates whether the value field of a reflect.Value is - // the actual data or a pointer to the data. - // - // These values are valid before golang commit 90a7c3c86944 which - // changed their positions. Code in the init function updates these - // flags as necessary. - flagKindWidth = uintptr(5) - flagKindShift = uintptr(flagKindWidth - 1) - flagRO = uintptr(1 << 0) - flagIndir = uintptr(1 << 1) + // flagRO indicates whether the value field of a reflect.Value + // is read-only. + flagRO flag + + // flagAddr indicates whether the address of the reflect.Value's + // value may be taken. + flagAddr flag ) -func init() { - // Older versions of reflect.Value stored small integers directly in the - // ptr field (which is named val in the older versions). Versions - // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named - // scalar for this purpose which unfortunately came before the flag - // field, so the offset of the flag field is different for those - // versions. - // - // This code constructs a new reflect.Value from a known small integer - // and checks if the size of the reflect.Value struct indicates it has - // the scalar field. When it does, the offsets are updated accordingly. - vv := reflect.ValueOf(0xf00) - if unsafe.Sizeof(vv) == (ptrSize * 4) { - offsetScalar = ptrSize * 2 - offsetFlag = ptrSize * 3 - } +// flagKindMask holds the bits that make up the kind +// part of the flags field. In all the supported versions, +// it is in the lower 5 bits. +const flagKindMask = flag(0x1f) - // Commit 90a7c3c86944 changed the flag positions such that the low - // order bits are the kind. This code extracts the kind from the flags - // field and ensures it's the correct type. When it's not, the flag - // order has been changed to the newer format, so the flags are updated - // accordingly. - upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) - upfv := *(*uintptr)(upf) - flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { - flagKindShift = 0 - flagRO = 1 << 5 - flagIndir = 1 << 6 - - // Commit adf9b30e5594 modified the flags to separate the - // flagRO flag into two bits which specifies whether or not the - // field is embedded. This causes flagIndir to move over a bit - // and means that flagRO is the combination of either of the - // original flagRO bit and the new bit. - // - // This code detects the change by extracting what used to be - // the indirect bit to ensure it's set. When it's not, the flag - // order has been changed to the newer format, so the flags are - // updated accordingly. - if upfv&flagIndir == 0 { - flagRO = 3 << 5 - flagIndir = 1 << 7 - } +// Different versions of Go have used different +// bit layouts for the flags type. This table +// records the known combinations. +var okFlags = []struct { + ro, addr flag +}{{ + // From Go 1.4 to 1.5 + ro: 1 << 5, + addr: 1 << 7, +}, { + // Up to Go tip. + ro: 1<<5 | 1<<6, + addr: 1 << 8, +}} + +var flagValOffset = func() uintptr { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") } + return field.Offset +}() + +// flagField returns a pointer to the flag field of a reflect.Value. +func flagField(v *reflect.Value) *flag { + return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset)) } // unsafeReflectValue converts the passed reflect.Value into a one that bypasses @@ -119,34 +90,56 @@ func init() { // This allows us to check for implementations of the Stringer and error // interfaces to be used for pretty printing ordinarily unaddressable and // inaccessible values such as unexported struct fields. -func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { - indirects := 1 - vt := v.Type() - upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) - rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) - if rvf&flagIndir != 0 { - vt = reflect.PtrTo(v.Type()) - indirects++ - } else if offsetScalar != 0 { - // The value is in the scalar field when it's not one of the - // reference types. - switch vt.Kind() { - case reflect.Uintptr: - case reflect.Chan: - case reflect.Func: - case reflect.Map: - case reflect.Ptr: - case reflect.UnsafePointer: - default: - upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + - offsetScalar) - } +func unsafeReflectValue(v reflect.Value) reflect.Value { + if !v.IsValid() || (v.CanInterface() && v.CanAddr()) { + return v } + flagFieldPtr := flagField(&v) + *flagFieldPtr &^= flagRO + *flagFieldPtr |= flagAddr + return v +} - pv := reflect.NewAt(vt, upv) - rv = pv - for i := 0; i < indirects; i++ { - rv = rv.Elem() +// Sanity checks against future reflect package changes +// to the type or semantics of the Value.flag field. +func init() { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") + } + if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() { + panic("reflect.Value flag field has changed kind") + } + type t0 int + var t struct { + A t0 + // t0 will have flagEmbedRO set. + t0 + // a will have flagStickyRO set + a t0 + } + vA := reflect.ValueOf(t).FieldByName("A") + va := reflect.ValueOf(t).FieldByName("a") + vt0 := reflect.ValueOf(t).FieldByName("t0") + + // Infer flagRO from the difference between the flags + // for the (otherwise identical) fields in t. + flagPublic := *flagField(&vA) + flagWithRO := *flagField(&va) | *flagField(&vt0) + flagRO = flagPublic ^ flagWithRO + + // Infer flagAddr from the difference between a value + // taken from a pointer and not. + vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A") + flagNoPtr := *flagField(&vA) + flagPtr := *flagField(&vPtrA) + flagAddr = flagNoPtr ^ flagPtr + + // Check that the inferred flags tally with one of the known versions. + for _, f := range okFlags { + if flagRO == f.ro && flagAddr == f.addr { + return + } } - return rv + panic("reflect.Value read-only flag has changed semantics") } diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 1fe3cf3d5..205c28d68 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,7 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build js appengine safe disableunsafe +// +build js appengine safe disableunsafe !go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go index 7c519ff47..1be8ce945 100644 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ b/vendor/github.com/davecgh/go-spew/spew/common.go @@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) { w.Write(closeParenBytes) } -// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' +// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. diff --git a/vendor/github.com/davecgh/go-spew/spew/common_test.go b/vendor/github.com/davecgh/go-spew/spew/common_test.go deleted file mode 100644 index 0f5ce47dc..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/common_test.go +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew_test - -import ( - "fmt" - "reflect" - "testing" - - "github.com/davecgh/go-spew/spew" -) - -// custom type to test Stinger interface on non-pointer receiver. -type stringer string - -// String implements the Stringer interface for testing invocation of custom -// stringers on types with non-pointer receivers. -func (s stringer) String() string { - return "stringer " + string(s) -} - -// custom type to test Stinger interface on pointer receiver. -type pstringer string - -// String implements the Stringer interface for testing invocation of custom -// stringers on types with only pointer receivers. -func (s *pstringer) String() string { - return "stringer " + string(*s) -} - -// xref1 and xref2 are cross referencing structs for testing circular reference -// detection. -type xref1 struct { - ps2 *xref2 -} -type xref2 struct { - ps1 *xref1 -} - -// indirCir1, indirCir2, and indirCir3 are used to generate an indirect circular -// reference for testing detection. -type indirCir1 struct { - ps2 *indirCir2 -} -type indirCir2 struct { - ps3 *indirCir3 -} -type indirCir3 struct { - ps1 *indirCir1 -} - -// embed is used to test embedded structures. -type embed struct { - a string -} - -// embedwrap is used to test embedded structures. -type embedwrap struct { - *embed - e *embed -} - -// panicer is used to intentionally cause a panic for testing spew properly -// handles them -type panicer int - -func (p panicer) String() string { - panic("test panic") -} - -// customError is used to test custom error interface invocation. -type customError int - -func (e customError) Error() string { - return fmt.Sprintf("error: %d", int(e)) -} - -// stringizeWants converts a slice of wanted test output into a format suitable -// for a test error message. -func stringizeWants(wants []string) string { - s := "" - for i, want := range wants { - if i > 0 { - s += fmt.Sprintf("want%d: %s", i+1, want) - } else { - s += "want: " + want - } - } - return s -} - -// testFailed returns whether or not a test failed by checking if the result -// of the test is in the slice of wanted strings. -func testFailed(result string, wants []string) bool { - for _, want := range wants { - if result == want { - return false - } - } - return true -} - -type sortableStruct struct { - x int -} - -func (ss sortableStruct) String() string { - return fmt.Sprintf("ss.%d", ss.x) -} - -type unsortableStruct struct { - x int -} - -type sortTestCase struct { - input []reflect.Value - expected []reflect.Value -} - -func helpTestSortValues(tests []sortTestCase, cs *spew.ConfigState, t *testing.T) { - getInterfaces := func(values []reflect.Value) []interface{} { - interfaces := []interface{}{} - for _, v := range values { - interfaces = append(interfaces, v.Interface()) - } - return interfaces - } - - for _, test := range tests { - spew.SortValues(test.input, cs) - // reflect.DeepEqual cannot really make sense of reflect.Value, - // probably because of all the pointer tricks. For instance, - // v(2.0) != v(2.0) on a 32-bits system. Turn them into interface{} - // instead. - input := getInterfaces(test.input) - expected := getInterfaces(test.expected) - if !reflect.DeepEqual(input, expected) { - t.Errorf("Sort mismatch:\n %v != %v", input, expected) - } - } -} - -// TestSortValues ensures the sort functionality for relect.Value based sorting -// works as intended. -func TestSortValues(t *testing.T) { - v := reflect.ValueOf - - a := v("a") - b := v("b") - c := v("c") - embedA := v(embed{"a"}) - embedB := v(embed{"b"}) - embedC := v(embed{"c"}) - tests := []sortTestCase{ - // No values. - { - []reflect.Value{}, - []reflect.Value{}, - }, - // Bools. - { - []reflect.Value{v(false), v(true), v(false)}, - []reflect.Value{v(false), v(false), v(true)}, - }, - // Ints. - { - []reflect.Value{v(2), v(1), v(3)}, - []reflect.Value{v(1), v(2), v(3)}, - }, - // Uints. - { - []reflect.Value{v(uint8(2)), v(uint8(1)), v(uint8(3))}, - []reflect.Value{v(uint8(1)), v(uint8(2)), v(uint8(3))}, - }, - // Floats. - { - []reflect.Value{v(2.0), v(1.0), v(3.0)}, - []reflect.Value{v(1.0), v(2.0), v(3.0)}, - }, - // Strings. - { - []reflect.Value{b, a, c}, - []reflect.Value{a, b, c}, - }, - // Array - { - []reflect.Value{v([3]int{3, 2, 1}), v([3]int{1, 3, 2}), v([3]int{1, 2, 3})}, - []reflect.Value{v([3]int{1, 2, 3}), v([3]int{1, 3, 2}), v([3]int{3, 2, 1})}, - }, - // Uintptrs. - { - []reflect.Value{v(uintptr(2)), v(uintptr(1)), v(uintptr(3))}, - []reflect.Value{v(uintptr(1)), v(uintptr(2)), v(uintptr(3))}, - }, - // SortableStructs. - { - // Note: not sorted - DisableMethods is set. - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - }, - // UnsortableStructs. - { - // Note: not sorted - SpewKeys is false. - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - }, - // Invalid. - { - []reflect.Value{embedB, embedA, embedC}, - []reflect.Value{embedB, embedA, embedC}, - }, - } - cs := spew.ConfigState{DisableMethods: true, SpewKeys: false} - helpTestSortValues(tests, &cs, t) -} - -// TestSortValuesWithMethods ensures the sort functionality for relect.Value -// based sorting works as intended when using string methods. -func TestSortValuesWithMethods(t *testing.T) { - v := reflect.ValueOf - - a := v("a") - b := v("b") - c := v("c") - tests := []sortTestCase{ - // Ints. - { - []reflect.Value{v(2), v(1), v(3)}, - []reflect.Value{v(1), v(2), v(3)}, - }, - // Strings. - { - []reflect.Value{b, a, c}, - []reflect.Value{a, b, c}, - }, - // SortableStructs. - { - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})}, - }, - // UnsortableStructs. - { - // Note: not sorted - SpewKeys is false. - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - }, - } - cs := spew.ConfigState{DisableMethods: false, SpewKeys: false} - helpTestSortValues(tests, &cs, t) -} - -// TestSortValuesWithSpew ensures the sort functionality for relect.Value -// based sorting works as intended when using spew to stringify keys. -func TestSortValuesWithSpew(t *testing.T) { - v := reflect.ValueOf - - a := v("a") - b := v("b") - c := v("c") - tests := []sortTestCase{ - // Ints. - { - []reflect.Value{v(2), v(1), v(3)}, - []reflect.Value{v(1), v(2), v(3)}, - }, - // Strings. - { - []reflect.Value{b, a, c}, - []reflect.Value{a, b, c}, - }, - // SortableStructs. - { - []reflect.Value{v(sortableStruct{2}), v(sortableStruct{1}), v(sortableStruct{3})}, - []reflect.Value{v(sortableStruct{1}), v(sortableStruct{2}), v(sortableStruct{3})}, - }, - // UnsortableStructs. - { - []reflect.Value{v(unsortableStruct{2}), v(unsortableStruct{1}), v(unsortableStruct{3})}, - []reflect.Value{v(unsortableStruct{1}), v(unsortableStruct{2}), v(unsortableStruct{3})}, - }, - } - cs := spew.ConfigState{DisableMethods: true, SpewKeys: true} - helpTestSortValues(tests, &cs, t) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go index df1d582a7..f78d89fc1 100644 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -35,16 +35,16 @@ var ( // cCharRE is a regular expression that matches a cgo char. // It is used to detect character arrays to hexdump them. - cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") + cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`) // cUnsignedCharRE is a regular expression that matches a cgo unsigned // char. It is used to detect unsigned character arrays to hexdump // them. - cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") + cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`) // cUint8tCharRE is a regular expression that matches a cgo uint8_t. // It is used to detect uint8_t arrays to hexdump them. - cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") + cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`) ) // dumpState contains information about the state of a dump operation. @@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) { // Display dereferenced value. d.w.Write(openParenBytes) switch { - case nilFound == true: + case nilFound: d.w.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: d.w.Write(circularBytes) default: diff --git a/vendor/github.com/davecgh/go-spew/spew/dump_test.go b/vendor/github.com/davecgh/go-spew/spew/dump_test.go deleted file mode 100644 index 5aad9c7af..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/dump_test.go +++ /dev/null @@ -1,1042 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* -Test Summary: -NOTE: For each test, a nil pointer, a single pointer and double pointer to the -base test element are also tested to ensure proper indirection across all types. - -- Max int8, int16, int32, int64, int -- Max uint8, uint16, uint32, uint64, uint -- Boolean true and false -- Standard complex64 and complex128 -- Array containing standard ints -- Array containing type with custom formatter on pointer receiver only -- Array containing interfaces -- Array containing bytes -- Slice containing standard float32 values -- Slice containing type with custom formatter on pointer receiver only -- Slice containing interfaces -- Slice containing bytes -- Nil slice -- Standard string -- Nil interface -- Sub-interface -- Map with string keys and int vals -- Map with custom formatter type on pointer receiver only keys and vals -- Map with interface keys and values -- Map with nil interface value -- Struct with primitives -- Struct that contains another struct -- Struct that contains custom type with Stringer pointer interface via both - exported and unexported fields -- Struct that contains embedded struct and field to same struct -- Uintptr to 0 (null pointer) -- Uintptr address of real variable -- Unsafe.Pointer to 0 (null pointer) -- Unsafe.Pointer to address of real variable -- Nil channel -- Standard int channel -- Function with no params and no returns -- Function with param and no returns -- Function with multiple params and multiple returns -- Struct that is circular through self referencing -- Structs that are circular through cross referencing -- Structs that are indirectly circular -- Type that panics in its Stringer interface -*/ - -package spew_test - -import ( - "bytes" - "fmt" - "testing" - "unsafe" - - "github.com/davecgh/go-spew/spew" -) - -// dumpTest is used to describe a test to be performed against the Dump method. -type dumpTest struct { - in interface{} - wants []string -} - -// dumpTests houses all of the tests to be performed against the Dump method. -var dumpTests = make([]dumpTest, 0) - -// addDumpTest is a helper method to append the passed input and desired result -// to dumpTests -func addDumpTest(in interface{}, wants ...string) { - test := dumpTest{in, wants} - dumpTests = append(dumpTests, test) -} - -func addIntDumpTests() { - // Max int8. - v := int8(127) - nv := (*int8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "int8" - vs := "127" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Max int16. - v2 := int16(32767) - nv2 := (*int16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "int16" - v2s := "32767" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Max int32. - v3 := int32(2147483647) - nv3 := (*int32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "int32" - v3s := "2147483647" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Max int64. - v4 := int64(9223372036854775807) - nv4 := (*int64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "int64" - v4s := "9223372036854775807" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") - - // Max int. - v5 := int(2147483647) - nv5 := (*int)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "int" - v5s := "2147483647" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") - addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") - addDumpTest(nv5, "(*"+v5t+")()\n") -} - -func addUintDumpTests() { - // Max uint8. - v := uint8(255) - nv := (*uint8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uint8" - vs := "255" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Max uint16. - v2 := uint16(65535) - nv2 := (*uint16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Max uint32. - v3 := uint32(4294967295) - nv3 := (*uint32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "uint32" - v3s := "4294967295" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Max uint64. - v4 := uint64(18446744073709551615) - nv4 := (*uint64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "uint64" - v4s := "18446744073709551615" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") - - // Max uint. - v5 := uint(4294967295) - nv5 := (*uint)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "uint" - v5s := "4294967295" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") - addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") - addDumpTest(nv5, "(*"+v5t+")()\n") -} - -func addBoolDumpTests() { - // Boolean true. - v := bool(true) - nv := (*bool)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "bool" - vs := "true" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Boolean false. - v2 := bool(false) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "bool" - v2s := "false" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") -} - -func addFloatDumpTests() { - // Standard float32. - v := float32(3.1415) - nv := (*float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "float32" - vs := "3.1415" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Standard float64. - v2 := float64(3.1415926) - nv2 := (*float64)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "float64" - v2s := "3.1415926" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") -} - -func addComplexDumpTests() { - // Standard complex64. - v := complex(float32(6), -2) - nv := (*complex64)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "complex64" - vs := "(6-2i)" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Standard complex128. - v2 := complex(float64(-6), 2) - nv2 := (*complex128)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "complex128" - v2s := "(-6+2i)" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") -} - -func addArrayDumpTests() { - // Array containing standard ints. - v := [3]int{1, 2, 3} - vLen := fmt.Sprintf("%d", len(v)) - vCap := fmt.Sprintf("%d", cap(v)) - nv := (*[3]int)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "int" - vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 1,\n (" + - vt + ") 2,\n (" + vt + ") 3\n}" - addDumpTest(v, "([3]"+vt+") "+vs+"\n") - addDumpTest(pv, "(*[3]"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**[3]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*[3]"+vt+")()\n") - - // Array containing type with custom formatter on pointer receiver only. - v2i0 := pstringer("1") - v2i1 := pstringer("2") - v2i2 := pstringer("3") - v2 := [3]pstringer{v2i0, v2i1, v2i2} - v2i0Len := fmt.Sprintf("%d", len(v2i0)) - v2i1Len := fmt.Sprintf("%d", len(v2i1)) - v2i2Len := fmt.Sprintf("%d", len(v2i2)) - v2Len := fmt.Sprintf("%d", len(v2)) - v2Cap := fmt.Sprintf("%d", cap(v2)) - nv2 := (*[3]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.pstringer" - v2sp := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + - ") (len=" + v2i0Len + ") stringer 1,\n (" + v2t + - ") (len=" + v2i1Len + ") stringer 2,\n (" + v2t + - ") (len=" + v2i2Len + ") " + "stringer 3\n}" - v2s := v2sp - if spew.UnsafeDisabled { - v2s = "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + - ") (len=" + v2i0Len + ") \"1\",\n (" + v2t + ") (len=" + - v2i1Len + ") \"2\",\n (" + v2t + ") (len=" + v2i2Len + - ") " + "\"3\"\n}" - } - addDumpTest(v2, "([3]"+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*[3]"+v2t+")("+v2Addr+")("+v2sp+")\n") - addDumpTest(&pv2, "(**[3]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2sp+")\n") - addDumpTest(nv2, "(*[3]"+v2t+")()\n") - - // Array containing interfaces. - v3i0 := "one" - v3 := [3]interface{}{v3i0, int(2), uint(3)} - v3i0Len := fmt.Sprintf("%d", len(v3i0)) - v3Len := fmt.Sprintf("%d", len(v3)) - v3Cap := fmt.Sprintf("%d", cap(v3)) - nv3 := (*[3]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[3]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " + - "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" + - v3t4 + ") 3\n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Array containing bytes. - v4 := [34]byte{ - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, - } - v4Len := fmt.Sprintf("%d", len(v4)) - v4Cap := fmt.Sprintf("%d", cap(v4)) - nv4 := (*[34]byte)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "[34]uint8" - v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + - "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" + - " |............... |\n" + - " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" + - " |!\"#$%&'()*+,-./0|\n" + - " 00000020 31 32 " + - " |12|\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") -} - -func addSliceDumpTests() { - // Slice containing standard float32 values. - v := []float32{3.14, 6.28, 12.56} - vLen := fmt.Sprintf("%d", len(v)) - vCap := fmt.Sprintf("%d", cap(v)) - nv := (*[]float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "float32" - vs := "(len=" + vLen + " cap=" + vCap + ") {\n (" + vt + ") 3.14,\n (" + - vt + ") 6.28,\n (" + vt + ") 12.56\n}" - addDumpTest(v, "([]"+vt+") "+vs+"\n") - addDumpTest(pv, "(*[]"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**[]"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*[]"+vt+")()\n") - - // Slice containing type with custom formatter on pointer receiver only. - v2i0 := pstringer("1") - v2i1 := pstringer("2") - v2i2 := pstringer("3") - v2 := []pstringer{v2i0, v2i1, v2i2} - v2i0Len := fmt.Sprintf("%d", len(v2i0)) - v2i1Len := fmt.Sprintf("%d", len(v2i1)) - v2i2Len := fmt.Sprintf("%d", len(v2i2)) - v2Len := fmt.Sprintf("%d", len(v2)) - v2Cap := fmt.Sprintf("%d", cap(v2)) - nv2 := (*[]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.pstringer" - v2s := "(len=" + v2Len + " cap=" + v2Cap + ") {\n (" + v2t + ") (len=" + - v2i0Len + ") stringer 1,\n (" + v2t + ") (len=" + v2i1Len + - ") stringer 2,\n (" + v2t + ") (len=" + v2i2Len + ") " + - "stringer 3\n}" - addDumpTest(v2, "([]"+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*[]"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**[]"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*[]"+v2t+")()\n") - - // Slice containing interfaces. - v3i0 := "one" - v3 := []interface{}{v3i0, int(2), uint(3), nil} - v3i0Len := fmt.Sprintf("%d", len(v3i0)) - v3Len := fmt.Sprintf("%d", len(v3)) - v3Cap := fmt.Sprintf("%d", cap(v3)) - nv3 := (*[]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3t5 := "interface {}" - v3s := "(len=" + v3Len + " cap=" + v3Cap + ") {\n (" + v3t2 + ") " + - "(len=" + v3i0Len + ") \"one\",\n (" + v3t3 + ") 2,\n (" + - v3t4 + ") 3,\n (" + v3t5 + ") \n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Slice containing bytes. - v4 := []byte{ - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, - } - v4Len := fmt.Sprintf("%d", len(v4)) - v4Cap := fmt.Sprintf("%d", cap(v4)) - nv4 := (*[]byte)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "[]uint8" - v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + - "{\n 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20" + - " |............... |\n" + - " 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30" + - " |!\"#$%&'()*+,-./0|\n" + - " 00000020 31 32 " + - " |12|\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") - - // Nil slice. - v5 := []int(nil) - nv5 := (*[]int)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "[]int" - v5s := "" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - addDumpTest(pv5, "(*"+v5t+")("+v5Addr+")("+v5s+")\n") - addDumpTest(&pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")("+v5s+")\n") - addDumpTest(nv5, "(*"+v5t+")()\n") -} - -func addStringDumpTests() { - // Standard string. - v := "test" - vLen := fmt.Sprintf("%d", len(v)) - nv := (*string)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "string" - vs := "(len=" + vLen + ") \"test\"" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -func addInterfaceDumpTests() { - // Nil interface. - var v interface{} - nv := (*interface{})(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "interface {}" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Sub-interface. - v2 := interface{}(uint16(65535)) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") -} - -func addMapDumpTests() { - // Map with string keys and int vals. - k := "one" - kk := "two" - m := map[string]int{k: 1, kk: 2} - klen := fmt.Sprintf("%d", len(k)) // not kLen to shut golint up - kkLen := fmt.Sprintf("%d", len(kk)) - mLen := fmt.Sprintf("%d", len(m)) - nilMap := map[string]int(nil) - nm := (*map[string]int)(nil) - pm := &m - mAddr := fmt.Sprintf("%p", pm) - pmAddr := fmt.Sprintf("%p", &pm) - mt := "map[string]int" - mt1 := "string" - mt2 := "int" - ms := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + klen + ") " + - "\"one\": (" + mt2 + ") 1,\n (" + mt1 + ") (len=" + kkLen + - ") \"two\": (" + mt2 + ") 2\n}" - ms2 := "(len=" + mLen + ") {\n (" + mt1 + ") (len=" + kkLen + ") " + - "\"two\": (" + mt2 + ") 2,\n (" + mt1 + ") (len=" + klen + - ") \"one\": (" + mt2 + ") 1\n}" - addDumpTest(m, "("+mt+") "+ms+"\n", "("+mt+") "+ms2+"\n") - addDumpTest(pm, "(*"+mt+")("+mAddr+")("+ms+")\n", - "(*"+mt+")("+mAddr+")("+ms2+")\n") - addDumpTest(&pm, "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms+")\n", - "(**"+mt+")("+pmAddr+"->"+mAddr+")("+ms2+")\n") - addDumpTest(nm, "(*"+mt+")()\n") - addDumpTest(nilMap, "("+mt+") \n") - - // Map with custom formatter type on pointer receiver only keys and vals. - k2 := pstringer("one") - v2 := pstringer("1") - m2 := map[pstringer]pstringer{k2: v2} - k2Len := fmt.Sprintf("%d", len(k2)) - v2Len := fmt.Sprintf("%d", len(v2)) - m2Len := fmt.Sprintf("%d", len(m2)) - nilMap2 := map[pstringer]pstringer(nil) - nm2 := (*map[pstringer]pstringer)(nil) - pm2 := &m2 - m2Addr := fmt.Sprintf("%p", pm2) - pm2Addr := fmt.Sprintf("%p", &pm2) - m2t := "map[spew_test.pstringer]spew_test.pstringer" - m2t1 := "spew_test.pstringer" - m2t2 := "spew_test.pstringer" - m2s := "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + ") " + - "stringer one: (" + m2t2 + ") (len=" + v2Len + ") stringer 1\n}" - if spew.UnsafeDisabled { - m2s = "(len=" + m2Len + ") {\n (" + m2t1 + ") (len=" + k2Len + - ") " + "\"one\": (" + m2t2 + ") (len=" + v2Len + - ") \"1\"\n}" - } - addDumpTest(m2, "("+m2t+") "+m2s+"\n") - addDumpTest(pm2, "(*"+m2t+")("+m2Addr+")("+m2s+")\n") - addDumpTest(&pm2, "(**"+m2t+")("+pm2Addr+"->"+m2Addr+")("+m2s+")\n") - addDumpTest(nm2, "(*"+m2t+")()\n") - addDumpTest(nilMap2, "("+m2t+") \n") - - // Map with interface keys and values. - k3 := "one" - k3Len := fmt.Sprintf("%d", len(k3)) - m3 := map[interface{}]interface{}{k3: 1} - m3Len := fmt.Sprintf("%d", len(m3)) - nilMap3 := map[interface{}]interface{}(nil) - nm3 := (*map[interface{}]interface{})(nil) - pm3 := &m3 - m3Addr := fmt.Sprintf("%p", pm3) - pm3Addr := fmt.Sprintf("%p", &pm3) - m3t := "map[interface {}]interface {}" - m3t1 := "string" - m3t2 := "int" - m3s := "(len=" + m3Len + ") {\n (" + m3t1 + ") (len=" + k3Len + ") " + - "\"one\": (" + m3t2 + ") 1\n}" - addDumpTest(m3, "("+m3t+") "+m3s+"\n") - addDumpTest(pm3, "(*"+m3t+")("+m3Addr+")("+m3s+")\n") - addDumpTest(&pm3, "(**"+m3t+")("+pm3Addr+"->"+m3Addr+")("+m3s+")\n") - addDumpTest(nm3, "(*"+m3t+")()\n") - addDumpTest(nilMap3, "("+m3t+") \n") - - // Map with nil interface value. - k4 := "nil" - k4Len := fmt.Sprintf("%d", len(k4)) - m4 := map[string]interface{}{k4: nil} - m4Len := fmt.Sprintf("%d", len(m4)) - nilMap4 := map[string]interface{}(nil) - nm4 := (*map[string]interface{})(nil) - pm4 := &m4 - m4Addr := fmt.Sprintf("%p", pm4) - pm4Addr := fmt.Sprintf("%p", &pm4) - m4t := "map[string]interface {}" - m4t1 := "string" - m4t2 := "interface {}" - m4s := "(len=" + m4Len + ") {\n (" + m4t1 + ") (len=" + k4Len + ")" + - " \"nil\": (" + m4t2 + ") \n}" - addDumpTest(m4, "("+m4t+") "+m4s+"\n") - addDumpTest(pm4, "(*"+m4t+")("+m4Addr+")("+m4s+")\n") - addDumpTest(&pm4, "(**"+m4t+")("+pm4Addr+"->"+m4Addr+")("+m4s+")\n") - addDumpTest(nm4, "(*"+m4t+")()\n") - addDumpTest(nilMap4, "("+m4t+") \n") -} - -func addStructDumpTests() { - // Struct with primitives. - type s1 struct { - a int8 - b uint8 - } - v := s1{127, 255} - nv := (*s1)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.s1" - vt2 := "int8" - vt3 := "uint8" - vs := "{\n a: (" + vt2 + ") 127,\n b: (" + vt3 + ") 255\n}" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Struct that contains another struct. - type s2 struct { - s1 s1 - b bool - } - v2 := s2{s1{127, 255}, true} - nv2 := (*s2)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.s2" - v2t2 := "spew_test.s1" - v2t3 := "int8" - v2t4 := "uint8" - v2t5 := "bool" - v2s := "{\n s1: (" + v2t2 + ") {\n a: (" + v2t3 + ") 127,\n b: (" + - v2t4 + ") 255\n },\n b: (" + v2t5 + ") true\n}" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Struct that contains custom type with Stringer pointer interface via both - // exported and unexported fields. - type s3 struct { - s pstringer - S pstringer - } - v3 := s3{"test", "test2"} - nv3 := (*s3)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.s3" - v3t2 := "spew_test.pstringer" - v3s := "{\n s: (" + v3t2 + ") (len=4) stringer test,\n S: (" + v3t2 + - ") (len=5) stringer test2\n}" - v3sp := v3s - if spew.UnsafeDisabled { - v3s = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" + - v3t2 + ") (len=5) \"test2\"\n}" - v3sp = "{\n s: (" + v3t2 + ") (len=4) \"test\",\n S: (" + - v3t2 + ") (len=5) stringer test2\n}" - } - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3sp+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3sp+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") - - // Struct that contains embedded struct and field to same struct. - e := embed{"embedstr"} - eLen := fmt.Sprintf("%d", len("embedstr")) - v4 := embedwrap{embed: &e, e: &e} - nv4 := (*embedwrap)(nil) - pv4 := &v4 - eAddr := fmt.Sprintf("%p", &e) - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "spew_test.embedwrap" - v4t2 := "spew_test.embed" - v4t3 := "string" - v4s := "{\n embed: (*" + v4t2 + ")(" + eAddr + ")({\n a: (" + v4t3 + - ") (len=" + eLen + ") \"embedstr\"\n }),\n e: (*" + v4t2 + - ")(" + eAddr + ")({\n a: (" + v4t3 + ") (len=" + eLen + ")" + - " \"embedstr\"\n })\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - addDumpTest(pv4, "(*"+v4t+")("+v4Addr+")("+v4s+")\n") - addDumpTest(&pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")("+v4s+")\n") - addDumpTest(nv4, "(*"+v4t+")()\n") -} - -func addUintptrDumpTests() { - // Null pointer. - v := uintptr(0) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uintptr" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - - // Address of real variable. - i := 1 - v2 := uintptr(unsafe.Pointer(&i)) - nv2 := (*uintptr)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uintptr" - v2s := fmt.Sprintf("%p", &i) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") -} - -func addUnsafePointerDumpTests() { - // Null pointer. - v := unsafe.Pointer(uintptr(0)) - nv := (*unsafe.Pointer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "unsafe.Pointer" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Address of real variable. - i := 1 - v2 := unsafe.Pointer(&i) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "unsafe.Pointer" - v2s := fmt.Sprintf("%p", &i) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -func addChanDumpTests() { - // Nil channel. - var v chan int - pv := &v - nv := (*chan int)(nil) - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "chan int" - vs := "" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Real channel. - v2 := make(chan int) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "chan int" - v2s := fmt.Sprintf("%p", v2) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") -} - -func addFuncDumpTests() { - // Function with no params and no returns. - v := addIntDumpTests - nv := (*func())(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "func()" - vs := fmt.Sprintf("%p", v) - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") - - // Function with param and no returns. - v2 := TestDump - nv2 := (*func(*testing.T))(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "func(*testing.T)" - v2s := fmt.Sprintf("%p", v2) - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s+")\n") - addDumpTest(nv2, "(*"+v2t+")()\n") - - // Function with multiple params and multiple returns. - var v3 = func(i int, s string) (b bool, err error) { - return true, nil - } - nv3 := (*func(int, string) (bool, error))(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "func(int, string) (bool, error)" - v3s := fmt.Sprintf("%p", v3) - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s+")\n") - addDumpTest(nv3, "(*"+v3t+")()\n") -} - -func addCircularDumpTests() { - // Struct that is circular through self referencing. - type circular struct { - c *circular - } - v := circular{nil} - v.c = &v - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.circular" - vs := "{\n c: (*" + vt + ")(" + vAddr + ")({\n c: (*" + vt + ")(" + - vAddr + ")()\n })\n}" - vs2 := "{\n c: (*" + vt + ")(" + vAddr + ")()\n}" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs2+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs2+")\n") - - // Structs that are circular through cross referencing. - v2 := xref1{nil} - ts2 := xref2{&v2} - v2.ps2 = &ts2 - pv2 := &v2 - ts2Addr := fmt.Sprintf("%p", &ts2) - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.xref1" - v2t2 := "spew_test.xref2" - v2s := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t + - ")(" + v2Addr + ")({\n ps2: (*" + v2t2 + ")(" + ts2Addr + - ")()\n })\n })\n}" - v2s2 := "{\n ps2: (*" + v2t2 + ")(" + ts2Addr + ")({\n ps1: (*" + v2t + - ")(" + v2Addr + ")()\n })\n}" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - addDumpTest(pv2, "(*"+v2t+")("+v2Addr+")("+v2s2+")\n") - addDumpTest(&pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")("+v2s2+")\n") - - // Structs that are indirectly circular. - v3 := indirCir1{nil} - tic2 := indirCir2{nil} - tic3 := indirCir3{&v3} - tic2.ps3 = &tic3 - v3.ps2 = &tic2 - pv3 := &v3 - tic2Addr := fmt.Sprintf("%p", &tic2) - tic3Addr := fmt.Sprintf("%p", &tic3) - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.indirCir1" - v3t2 := "spew_test.indirCir2" - v3t3 := "spew_test.indirCir3" - v3s := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 + - ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr + - ")({\n ps2: (*" + v3t2 + ")(" + tic2Addr + - ")()\n })\n })\n })\n}" - v3s2 := "{\n ps2: (*" + v3t2 + ")(" + tic2Addr + ")({\n ps3: (*" + v3t3 + - ")(" + tic3Addr + ")({\n ps1: (*" + v3t + ")(" + v3Addr + - ")()\n })\n })\n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n") - addDumpTest(pv3, "(*"+v3t+")("+v3Addr+")("+v3s2+")\n") - addDumpTest(&pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")("+v3s2+")\n") -} - -func addPanicDumpTests() { - // Type that panics in its Stringer interface. - v := panicer(127) - nv := (*panicer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.panicer" - vs := "(PANIC=test panic)127" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -func addErrorDumpTests() { - // Type that has a custom Error interface. - v := customError(127) - nv := (*customError)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.customError" - vs := "error: 127" - addDumpTest(v, "("+vt+") "+vs+"\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n") - addDumpTest(nv, "(*"+vt+")()\n") -} - -// TestDump executes all of the tests described by dumpTests. -func TestDump(t *testing.T) { - // Setup tests. - addIntDumpTests() - addUintDumpTests() - addBoolDumpTests() - addFloatDumpTests() - addComplexDumpTests() - addArrayDumpTests() - addSliceDumpTests() - addStringDumpTests() - addInterfaceDumpTests() - addMapDumpTests() - addStructDumpTests() - addUintptrDumpTests() - addUnsafePointerDumpTests() - addChanDumpTests() - addFuncDumpTests() - addCircularDumpTests() - addPanicDumpTests() - addErrorDumpTests() - addCgoDumpTests() - - t.Logf("Running %d tests", len(dumpTests)) - for i, test := range dumpTests { - buf := new(bytes.Buffer) - spew.Fdump(buf, test.in) - s := buf.String() - if testFailed(s, test.wants) { - t.Errorf("Dump #%d\n got: %s %s", i, s, stringizeWants(test.wants)) - continue - } - } -} - -func TestDumpSortedKeys(t *testing.T) { - cfg := spew.ConfigState{SortKeys: true} - s := cfg.Sdump(map[int]string{1: "1", 3: "3", 2: "2"}) - expected := "(map[int]string) (len=3) {\n(int) 1: (string) (len=1) " + - "\"1\",\n(int) 2: (string) (len=1) \"2\",\n(int) 3: (string) " + - "(len=1) \"3\"\n" + - "}\n" - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - - s = cfg.Sdump(map[stringer]int{"1": 1, "3": 3, "2": 2}) - expected = "(map[spew_test.stringer]int) (len=3) {\n" + - "(spew_test.stringer) (len=1) stringer 1: (int) 1,\n" + - "(spew_test.stringer) (len=1) stringer 2: (int) 2,\n" + - "(spew_test.stringer) (len=1) stringer 3: (int) 3\n" + - "}\n" - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - - s = cfg.Sdump(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) - expected = "(map[spew_test.pstringer]int) (len=3) {\n" + - "(spew_test.pstringer) (len=1) stringer 1: (int) 1,\n" + - "(spew_test.pstringer) (len=1) stringer 2: (int) 2,\n" + - "(spew_test.pstringer) (len=1) stringer 3: (int) 3\n" + - "}\n" - if spew.UnsafeDisabled { - expected = "(map[spew_test.pstringer]int) (len=3) {\n" + - "(spew_test.pstringer) (len=1) \"1\": (int) 1,\n" + - "(spew_test.pstringer) (len=1) \"2\": (int) 2,\n" + - "(spew_test.pstringer) (len=1) \"3\": (int) 3\n" + - "}\n" - } - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - - s = cfg.Sdump(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) - expected = "(map[spew_test.customError]int) (len=3) {\n" + - "(spew_test.customError) error: 1: (int) 1,\n" + - "(spew_test.customError) error: 2: (int) 2,\n" + - "(spew_test.customError) error: 3: (int) 3\n" + - "}\n" - if s != expected { - t.Errorf("Sorted keys mismatch:\n %v %v", s, expected) - } - -} diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go deleted file mode 100644 index 6ab180809..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/dumpcgo_test.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2013-2016 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when both cgo is supported and "-tags testcgo" is added to the go test -// command line. This means the cgo tests are only added (and hence run) when -// specifially requested. This configuration is used because spew itself -// does not require cgo to run even though it does handle certain cgo types -// specially. Rather than forcing all clients to require cgo and an external -// C compiler just to run the tests, this scheme makes them optional. -// +build cgo,testcgo - -package spew_test - -import ( - "fmt" - - "github.com/davecgh/go-spew/spew/testdata" -) - -func addCgoDumpTests() { - // C char pointer. - v := testdata.GetCgoCharPointer() - nv := testdata.GetCgoNullCharPointer() - pv := &v - vcAddr := fmt.Sprintf("%p", v) - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "*testdata._Ctype_char" - vs := "116" - addDumpTest(v, "("+vt+")("+vcAddr+")("+vs+")\n") - addDumpTest(pv, "(*"+vt+")("+vAddr+"->"+vcAddr+")("+vs+")\n") - addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+"->"+vcAddr+")("+vs+")\n") - addDumpTest(nv, "("+vt+")()\n") - - // C char array. - v2, v2l, v2c := testdata.GetCgoCharArray() - v2Len := fmt.Sprintf("%d", v2l) - v2Cap := fmt.Sprintf("%d", v2c) - v2t := "[6]testdata._Ctype_char" - v2s := "(len=" + v2Len + " cap=" + v2Cap + ") " + - "{\n 00000000 74 65 73 74 32 00 " + - " |test2.|\n}" - addDumpTest(v2, "("+v2t+") "+v2s+"\n") - - // C unsigned char array. - v3, v3l, v3c := testdata.GetCgoUnsignedCharArray() - v3Len := fmt.Sprintf("%d", v3l) - v3Cap := fmt.Sprintf("%d", v3c) - v3t := "[6]testdata._Ctype_unsignedchar" - v3t2 := "[6]testdata._Ctype_uchar" - v3s := "(len=" + v3Len + " cap=" + v3Cap + ") " + - "{\n 00000000 74 65 73 74 33 00 " + - " |test3.|\n}" - addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n") - - // C signed char array. - v4, v4l, v4c := testdata.GetCgoSignedCharArray() - v4Len := fmt.Sprintf("%d", v4l) - v4Cap := fmt.Sprintf("%d", v4c) - v4t := "[6]testdata._Ctype_schar" - v4t2 := "testdata._Ctype_schar" - v4s := "(len=" + v4Len + " cap=" + v4Cap + ") " + - "{\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 101,\n (" + v4t2 + - ") 115,\n (" + v4t2 + ") 116,\n (" + v4t2 + ") 52,\n (" + v4t2 + - ") 0\n}" - addDumpTest(v4, "("+v4t+") "+v4s+"\n") - - // C uint8_t array. - v5, v5l, v5c := testdata.GetCgoUint8tArray() - v5Len := fmt.Sprintf("%d", v5l) - v5Cap := fmt.Sprintf("%d", v5c) - v5t := "[6]testdata._Ctype_uint8_t" - v5s := "(len=" + v5Len + " cap=" + v5Cap + ") " + - "{\n 00000000 74 65 73 74 35 00 " + - " |test5.|\n}" - addDumpTest(v5, "("+v5t+") "+v5s+"\n") - - // C typedefed unsigned char array. - v6, v6l, v6c := testdata.GetCgoTypdefedUnsignedCharArray() - v6Len := fmt.Sprintf("%d", v6l) - v6Cap := fmt.Sprintf("%d", v6c) - v6t := "[6]testdata._Ctype_custom_uchar_t" - v6s := "(len=" + v6Len + " cap=" + v6Cap + ") " + - "{\n 00000000 74 65 73 74 36 00 " + - " |test6.|\n}" - addDumpTest(v6, "("+v6t+") "+v6s+"\n") -} diff --git a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go b/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go deleted file mode 100644 index 52a0971fb..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/dumpnocgo_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013 Dave Collins -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when either cgo is not supported or "-tags testcgo" is not added to the go -// test command line. This file intentionally does not setup any cgo tests in -// this scenario. -// +build !cgo !testcgo - -package spew_test - -func addCgoDumpTests() { - // Don't add any tests for cgo since this file is only compiled when - // there should not be any cgo tests. -} diff --git a/vendor/github.com/davecgh/go-spew/spew/example_test.go b/vendor/github.com/davecgh/go-spew/spew/example_test.go deleted file mode 100644 index c6ec8c6d5..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/example_test.go +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew_test - -import ( - "fmt" - - "github.com/davecgh/go-spew/spew" -) - -type Flag int - -const ( - flagOne Flag = iota - flagTwo -) - -var flagStrings = map[Flag]string{ - flagOne: "flagOne", - flagTwo: "flagTwo", -} - -func (f Flag) String() string { - if s, ok := flagStrings[f]; ok { - return s - } - return fmt.Sprintf("Unknown flag (%d)", int(f)) -} - -type Bar struct { - data uintptr -} - -type Foo struct { - unexportedField Bar - ExportedField map[interface{}]interface{} -} - -// This example demonstrates how to use Dump to dump variables to stdout. -func ExampleDump() { - // The following package level declarations are assumed for this example: - /* - type Flag int - - const ( - flagOne Flag = iota - flagTwo - ) - - var flagStrings = map[Flag]string{ - flagOne: "flagOne", - flagTwo: "flagTwo", - } - - func (f Flag) String() string { - if s, ok := flagStrings[f]; ok { - return s - } - return fmt.Sprintf("Unknown flag (%d)", int(f)) - } - - type Bar struct { - data uintptr - } - - type Foo struct { - unexportedField Bar - ExportedField map[interface{}]interface{} - } - */ - - // Setup some sample data structures for the example. - bar := Bar{uintptr(0)} - s1 := Foo{bar, map[interface{}]interface{}{"one": true}} - f := Flag(5) - b := []byte{ - 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, - 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, - 0x31, 0x32, - } - - // Dump! - spew.Dump(s1, f, b) - - // Output: - // (spew_test.Foo) { - // unexportedField: (spew_test.Bar) { - // data: (uintptr) - // }, - // ExportedField: (map[interface {}]interface {}) (len=1) { - // (string) (len=3) "one": (bool) true - // } - // } - // (spew_test.Flag) Unknown flag (5) - // ([]uint8) (len=34 cap=34) { - // 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | - // 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| - // 00000020 31 32 |12| - // } - // -} - -// This example demonstrates how to use Printf to display a variable with a -// format string and inline formatting. -func ExamplePrintf() { - // Create a double pointer to a uint 8. - ui8 := uint8(5) - pui8 := &ui8 - ppui8 := &pui8 - - // Create a circular data type. - type circular struct { - ui8 uint8 - c *circular - } - c := circular{ui8: 1} - c.c = &c - - // Print! - spew.Printf("ppui8: %v\n", ppui8) - spew.Printf("circular: %v\n", c) - - // Output: - // ppui8: <**>5 - // circular: {1 <*>{1 <*>}} -} - -// This example demonstrates how to use a ConfigState. -func ExampleConfigState() { - // Modify the indent level of the ConfigState only. The global - // configuration is not modified. - scs := spew.ConfigState{Indent: "\t"} - - // Output using the ConfigState instance. - v := map[string]int{"one": 1} - scs.Printf("v: %v\n", v) - scs.Dump(v) - - // Output: - // v: map[one:1] - // (map[string]int) (len=1) { - // (string) (len=3) "one": (int) 1 - // } -} - -// This example demonstrates how to use ConfigState.Dump to dump variables to -// stdout -func ExampleConfigState_Dump() { - // See the top-level Dump example for details on the types used in this - // example. - - // Create two ConfigState instances with different indentation. - scs := spew.ConfigState{Indent: "\t"} - scs2 := spew.ConfigState{Indent: " "} - - // Setup some sample data structures for the example. - bar := Bar{uintptr(0)} - s1 := Foo{bar, map[interface{}]interface{}{"one": true}} - - // Dump using the ConfigState instances. - scs.Dump(s1) - scs2.Dump(s1) - - // Output: - // (spew_test.Foo) { - // unexportedField: (spew_test.Bar) { - // data: (uintptr) - // }, - // ExportedField: (map[interface {}]interface {}) (len=1) { - // (string) (len=3) "one": (bool) true - // } - // } - // (spew_test.Foo) { - // unexportedField: (spew_test.Bar) { - // data: (uintptr) - // }, - // ExportedField: (map[interface {}]interface {}) (len=1) { - // (string) (len=3) "one": (bool) true - // } - // } - // -} - -// This example demonstrates how to use ConfigState.Printf to display a variable -// with a format string and inline formatting. -func ExampleConfigState_Printf() { - // See the top-level Dump example for details on the types used in this - // example. - - // Create two ConfigState instances and modify the method handling of the - // first ConfigState only. - scs := spew.NewDefaultConfig() - scs2 := spew.NewDefaultConfig() - scs.DisableMethods = true - - // Alternatively - // scs := spew.ConfigState{Indent: " ", DisableMethods: true} - // scs2 := spew.ConfigState{Indent: " "} - - // This is of type Flag which implements a Stringer and has raw value 1. - f := flagTwo - - // Dump using the ConfigState instances. - scs.Printf("f: %v\n", f) - scs2.Printf("f: %v\n", f) - - // Output: - // f: 1 - // f: flagTwo -} diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go index c49875bac..b04edb7d7 100644 --- a/vendor/github.com/davecgh/go-spew/spew/format.go +++ b/vendor/github.com/davecgh/go-spew/spew/format.go @@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) { // Display dereferenced value. switch { - case nilFound == true: + case nilFound: f.fs.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: f.fs.Write(circularShortBytes) default: diff --git a/vendor/github.com/davecgh/go-spew/spew/format_test.go b/vendor/github.com/davecgh/go-spew/spew/format_test.go deleted file mode 100644 index f9b93abe8..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/format_test.go +++ /dev/null @@ -1,1558 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* -Test Summary: -NOTE: For each test, a nil pointer, a single pointer and double pointer to the -base test element are also tested to ensure proper indirection across all types. - -- Max int8, int16, int32, int64, int -- Max uint8, uint16, uint32, uint64, uint -- Boolean true and false -- Standard complex64 and complex128 -- Array containing standard ints -- Array containing type with custom formatter on pointer receiver only -- Array containing interfaces -- Slice containing standard float32 values -- Slice containing type with custom formatter on pointer receiver only -- Slice containing interfaces -- Nil slice -- Standard string -- Nil interface -- Sub-interface -- Map with string keys and int vals -- Map with custom formatter type on pointer receiver only keys and vals -- Map with interface keys and values -- Map with nil interface value -- Struct with primitives -- Struct that contains another struct -- Struct that contains custom type with Stringer pointer interface via both - exported and unexported fields -- Struct that contains embedded struct and field to same struct -- Uintptr to 0 (null pointer) -- Uintptr address of real variable -- Unsafe.Pointer to 0 (null pointer) -- Unsafe.Pointer to address of real variable -- Nil channel -- Standard int channel -- Function with no params and no returns -- Function with param and no returns -- Function with multiple params and multiple returns -- Struct that is circular through self referencing -- Structs that are circular through cross referencing -- Structs that are indirectly circular -- Type that panics in its Stringer interface -- Type that has a custom Error interface -- %x passthrough with uint -- %#x passthrough with uint -- %f passthrough with precision -- %f passthrough with width and precision -- %d passthrough with width -- %q passthrough with string -*/ - -package spew_test - -import ( - "bytes" - "fmt" - "testing" - "unsafe" - - "github.com/davecgh/go-spew/spew" -) - -// formatterTest is used to describe a test to be performed against NewFormatter. -type formatterTest struct { - format string - in interface{} - wants []string -} - -// formatterTests houses all of the tests to be performed against NewFormatter. -var formatterTests = make([]formatterTest, 0) - -// addFormatterTest is a helper method to append the passed input and desired -// result to formatterTests. -func addFormatterTest(format string, in interface{}, wants ...string) { - test := formatterTest{format, in, wants} - formatterTests = append(formatterTests, test) -} - -func addIntFormatterTests() { - // Max int8. - v := int8(127) - nv := (*int8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "int8" - vs := "127" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Max int16. - v2 := int16(32767) - nv2 := (*int16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "int16" - v2s := "32767" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Max int32. - v3 := int32(2147483647) - nv3 := (*int32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "int32" - v3s := "2147483647" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - - // Max int64. - v4 := int64(9223372036854775807) - nv4 := (*int64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "int64" - v4s := "9223372036854775807" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") - - // Max int. - v5 := int(2147483647) - nv5 := (*int)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "int" - v5s := "2147483647" - addFormatterTest("%v", v5, v5s) - addFormatterTest("%v", pv5, "<*>"+v5s) - addFormatterTest("%v", &pv5, "<**>"+v5s) - addFormatterTest("%v", nv5, "") - addFormatterTest("%+v", v5, v5s) - addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s) - addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%+v", nv5, "") - addFormatterTest("%#v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s) - addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s) - addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") - addFormatterTest("%#+v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s) - addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%#+v", nv5, "(*"+v5t+")"+"") -} - -func addUintFormatterTests() { - // Max uint8. - v := uint8(255) - nv := (*uint8)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uint8" - vs := "255" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Max uint16. - v2 := uint16(65535) - nv2 := (*uint16)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Max uint32. - v3 := uint32(4294967295) - nv3 := (*uint32)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "uint32" - v3s := "4294967295" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - - // Max uint64. - v4 := uint64(18446744073709551615) - nv4 := (*uint64)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "uint64" - v4s := "18446744073709551615" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") - - // Max uint. - v5 := uint(4294967295) - nv5 := (*uint)(nil) - pv5 := &v5 - v5Addr := fmt.Sprintf("%p", pv5) - pv5Addr := fmt.Sprintf("%p", &pv5) - v5t := "uint" - v5s := "4294967295" - addFormatterTest("%v", v5, v5s) - addFormatterTest("%v", pv5, "<*>"+v5s) - addFormatterTest("%v", &pv5, "<**>"+v5s) - addFormatterTest("%v", nv5, "") - addFormatterTest("%+v", v5, v5s) - addFormatterTest("%+v", pv5, "<*>("+v5Addr+")"+v5s) - addFormatterTest("%+v", &pv5, "<**>("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%+v", nv5, "") - addFormatterTest("%#v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#v", pv5, "(*"+v5t+")"+v5s) - addFormatterTest("%#v", &pv5, "(**"+v5t+")"+v5s) - addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") - addFormatterTest("%#+v", v5, "("+v5t+")"+v5s) - addFormatterTest("%#+v", pv5, "(*"+v5t+")("+v5Addr+")"+v5s) - addFormatterTest("%#+v", &pv5, "(**"+v5t+")("+pv5Addr+"->"+v5Addr+")"+v5s) - addFormatterTest("%#v", nv5, "(*"+v5t+")"+"") -} - -func addBoolFormatterTests() { - // Boolean true. - v := bool(true) - nv := (*bool)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "bool" - vs := "true" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Boolean false. - v2 := bool(false) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "bool" - v2s := "false" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addFloatFormatterTests() { - // Standard float32. - v := float32(3.1415) - nv := (*float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "float32" - vs := "3.1415" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Standard float64. - v2 := float64(3.1415926) - nv2 := (*float64)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "float64" - v2s := "3.1415926" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") -} - -func addComplexFormatterTests() { - // Standard complex64. - v := complex(float32(6), -2) - nv := (*complex64)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "complex64" - vs := "(6-2i)" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Standard complex128. - v2 := complex(float64(-6), 2) - nv2 := (*complex128)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "complex128" - v2s := "(-6+2i)" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") -} - -func addArrayFormatterTests() { - // Array containing standard ints. - v := [3]int{1, 2, 3} - nv := (*[3]int)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "[3]int" - vs := "[1 2 3]" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Array containing type with custom formatter on pointer receiver only. - v2 := [3]pstringer{"1", "2", "3"} - nv2 := (*[3]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "[3]spew_test.pstringer" - v2sp := "[stringer 1 stringer 2 stringer 3]" - v2s := v2sp - if spew.UnsafeDisabled { - v2s = "[1 2 3]" - } - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2sp) - addFormatterTest("%v", &pv2, "<**>"+v2sp) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2sp) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2sp) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2sp) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2sp) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2sp) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2sp) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Array containing interfaces. - v3 := [3]interface{}{"one", int(2), uint(3)} - nv3 := (*[3]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[3]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3s := "[one 2 3]" - v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3]" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") -} - -func addSliceFormatterTests() { - // Slice containing standard float32 values. - v := []float32{3.14, 6.28, 12.56} - nv := (*[]float32)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "[]float32" - vs := "[3.14 6.28 12.56]" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Slice containing type with custom formatter on pointer receiver only. - v2 := []pstringer{"1", "2", "3"} - nv2 := (*[]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "[]spew_test.pstringer" - v2s := "[stringer 1 stringer 2 stringer 3]" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Slice containing interfaces. - v3 := []interface{}{"one", int(2), uint(3), nil} - nv3 := (*[]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "[]interface {}" - v3t2 := "string" - v3t3 := "int" - v3t4 := "uint" - v3t5 := "interface {}" - v3s := "[one 2 3 ]" - v3s2 := "[(" + v3t2 + ")one (" + v3t3 + ")2 (" + v3t4 + ")3 (" + v3t5 + - ")]" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - - // Nil slice. - var v4 []int - nv4 := (*[]int)(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "[]int" - v4s := "" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") -} - -func addStringFormatterTests() { - // Standard string. - v := "test" - nv := (*string)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "string" - vs := "test" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") -} - -func addInterfaceFormatterTests() { - // Nil interface. - var v interface{} - nv := (*interface{})(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "interface {}" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Sub-interface. - v2 := interface{}(uint16(65535)) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uint16" - v2s := "65535" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addMapFormatterTests() { - // Map with string keys and int vals. - v := map[string]int{"one": 1, "two": 2} - nilMap := map[string]int(nil) - nv := (*map[string]int)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "map[string]int" - vs := "map[one:1 two:2]" - vs2 := "map[two:2 one:1]" - addFormatterTest("%v", v, vs, vs2) - addFormatterTest("%v", pv, "<*>"+vs, "<*>"+vs2) - addFormatterTest("%v", &pv, "<**>"+vs, "<**>"+vs2) - addFormatterTest("%+v", nilMap, "") - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs, vs2) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs, "<*>("+vAddr+")"+vs2) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs, - "<**>("+pvAddr+"->"+vAddr+")"+vs2) - addFormatterTest("%+v", nilMap, "") - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs, "("+vt+")"+vs2) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs, "(*"+vt+")"+vs2) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs, "(**"+vt+")"+vs2) - addFormatterTest("%#v", nilMap, "("+vt+")"+"") - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs, "("+vt+")"+vs2) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs, - "(*"+vt+")("+vAddr+")"+vs2) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs, - "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs2) - addFormatterTest("%#+v", nilMap, "("+vt+")"+"") - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Map with custom formatter type on pointer receiver only keys and vals. - v2 := map[pstringer]pstringer{"one": "1"} - nv2 := (*map[pstringer]pstringer)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "map[spew_test.pstringer]spew_test.pstringer" - v2s := "map[stringer one:stringer 1]" - if spew.UnsafeDisabled { - v2s = "map[one:1]" - } - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Map with interface keys and values. - v3 := map[interface{}]interface{}{"one": 1} - nv3 := (*map[interface{}]interface{})(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "map[interface {}]interface {}" - v3t1 := "string" - v3t2 := "int" - v3s := "map[one:1]" - v3s2 := "map[(" + v3t1 + ")one:(" + v3t2 + ")1]" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s2) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s2) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s2) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s2) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s2) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - - // Map with nil interface value - v4 := map[string]interface{}{"nil": nil} - nv4 := (*map[string]interface{})(nil) - pv4 := &v4 - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "map[string]interface {}" - v4t1 := "interface {}" - v4s := "map[nil:]" - v4s2 := "map[nil:(" + v4t1 + ")]" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%+v", v4, v4s) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s2) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s2) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s2) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s2) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s2) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s2) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") -} - -func addStructFormatterTests() { - // Struct with primitives. - type s1 struct { - a int8 - b uint8 - } - v := s1{127, 255} - nv := (*s1)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.s1" - vt2 := "int8" - vt3 := "uint8" - vs := "{127 255}" - vs2 := "{a:127 b:255}" - vs3 := "{a:(" + vt2 + ")127 b:(" + vt3 + ")255}" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs2) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs2) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs2) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs3) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs3) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs3) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs3) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs3) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs3) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Struct that contains another struct. - type s2 struct { - s1 s1 - b bool - } - v2 := s2{s1{127, 255}, true} - nv2 := (*s2)(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.s2" - v2t2 := "spew_test.s1" - v2t3 := "int8" - v2t4 := "uint8" - v2t5 := "bool" - v2s := "{{127 255} true}" - v2s2 := "{s1:{a:127 b:255} b:true}" - v2s3 := "{s1:(" + v2t2 + "){a:(" + v2t3 + ")127 b:(" + v2t4 + ")255} b:(" + - v2t5 + ")true}" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s2) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s2) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s2) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s3) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s3) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s3) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s3) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s3) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s3) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Struct that contains custom type with Stringer pointer interface via both - // exported and unexported fields. - type s3 struct { - s pstringer - S pstringer - } - v3 := s3{"test", "test2"} - nv3 := (*s3)(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.s3" - v3t2 := "spew_test.pstringer" - v3s := "{stringer test stringer test2}" - v3sp := v3s - v3s2 := "{s:stringer test S:stringer test2}" - v3s2p := v3s2 - v3s3 := "{s:(" + v3t2 + ")stringer test S:(" + v3t2 + ")stringer test2}" - v3s3p := v3s3 - if spew.UnsafeDisabled { - v3s = "{test test2}" - v3sp = "{test stringer test2}" - v3s2 = "{s:test S:test2}" - v3s2p = "{s:test S:stringer test2}" - v3s3 = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")test2}" - v3s3p = "{s:(" + v3t2 + ")test S:(" + v3t2 + ")stringer test2}" - } - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3sp) - addFormatterTest("%v", &pv3, "<**>"+v3sp) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s2) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s2p) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s2p) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s3) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s3p) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s3p) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s3) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s3p) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s3p) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") - - // Struct that contains embedded struct and field to same struct. - e := embed{"embedstr"} - v4 := embedwrap{embed: &e, e: &e} - nv4 := (*embedwrap)(nil) - pv4 := &v4 - eAddr := fmt.Sprintf("%p", &e) - v4Addr := fmt.Sprintf("%p", pv4) - pv4Addr := fmt.Sprintf("%p", &pv4) - v4t := "spew_test.embedwrap" - v4t2 := "spew_test.embed" - v4t3 := "string" - v4s := "{<*>{embedstr} <*>{embedstr}}" - v4s2 := "{embed:<*>(" + eAddr + "){a:embedstr} e:<*>(" + eAddr + - "){a:embedstr}}" - v4s3 := "{embed:(*" + v4t2 + "){a:(" + v4t3 + ")embedstr} e:(*" + v4t2 + - "){a:(" + v4t3 + ")embedstr}}" - v4s4 := "{embed:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + - ")embedstr} e:(*" + v4t2 + ")(" + eAddr + "){a:(" + v4t3 + ")embedstr}}" - addFormatterTest("%v", v4, v4s) - addFormatterTest("%v", pv4, "<*>"+v4s) - addFormatterTest("%v", &pv4, "<**>"+v4s) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%+v", v4, v4s2) - addFormatterTest("%+v", pv4, "<*>("+v4Addr+")"+v4s2) - addFormatterTest("%+v", &pv4, "<**>("+pv4Addr+"->"+v4Addr+")"+v4s2) - addFormatterTest("%+v", nv4, "") - addFormatterTest("%#v", v4, "("+v4t+")"+v4s3) - addFormatterTest("%#v", pv4, "(*"+v4t+")"+v4s3) - addFormatterTest("%#v", &pv4, "(**"+v4t+")"+v4s3) - addFormatterTest("%#v", nv4, "(*"+v4t+")"+"") - addFormatterTest("%#+v", v4, "("+v4t+")"+v4s4) - addFormatterTest("%#+v", pv4, "(*"+v4t+")("+v4Addr+")"+v4s4) - addFormatterTest("%#+v", &pv4, "(**"+v4t+")("+pv4Addr+"->"+v4Addr+")"+v4s4) - addFormatterTest("%#+v", nv4, "(*"+v4t+")"+"") -} - -func addUintptrFormatterTests() { - // Null pointer. - v := uintptr(0) - nv := (*uintptr)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "uintptr" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Address of real variable. - i := 1 - v2 := uintptr(unsafe.Pointer(&i)) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "uintptr" - v2s := fmt.Sprintf("%p", &i) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addUnsafePointerFormatterTests() { - // Null pointer. - v := unsafe.Pointer(uintptr(0)) - nv := (*unsafe.Pointer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "unsafe.Pointer" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Address of real variable. - i := 1 - v2 := unsafe.Pointer(&i) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "unsafe.Pointer" - v2s := fmt.Sprintf("%p", &i) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addChanFormatterTests() { - // Nil channel. - var v chan int - pv := &v - nv := (*chan int)(nil) - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "chan int" - vs := "" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Real channel. - v2 := make(chan int) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "chan int" - v2s := fmt.Sprintf("%p", v2) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) -} - -func addFuncFormatterTests() { - // Function with no params and no returns. - v := addIntFormatterTests - nv := (*func())(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "func()" - vs := fmt.Sprintf("%p", v) - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") - - // Function with param and no returns. - v2 := TestFormatter - nv2 := (*func(*testing.T))(nil) - pv2 := &v2 - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "func(*testing.T)" - v2s := fmt.Sprintf("%p", v2) - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s) - addFormatterTest("%v", &pv2, "<**>"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%+v", v2, v2s) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%+v", nv2, "") - addFormatterTest("%#v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s) - addFormatterTest("%#v", nv2, "(*"+v2t+")"+"") - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s) - addFormatterTest("%#+v", nv2, "(*"+v2t+")"+"") - - // Function with multiple params and multiple returns. - var v3 = func(i int, s string) (b bool, err error) { - return true, nil - } - nv3 := (*func(int, string) (bool, error))(nil) - pv3 := &v3 - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "func(int, string) (bool, error)" - v3s := fmt.Sprintf("%p", v3) - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s) - addFormatterTest("%v", &pv3, "<**>"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%+v", v3, v3s) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%+v", nv3, "") - addFormatterTest("%#v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s) - addFormatterTest("%#v", nv3, "(*"+v3t+")"+"") - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s) - addFormatterTest("%#+v", nv3, "(*"+v3t+")"+"") -} - -func addCircularFormatterTests() { - // Struct that is circular through self referencing. - type circular struct { - c *circular - } - v := circular{nil} - v.c = &v - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.circular" - vs := "{<*>{<*>}}" - vs2 := "{<*>}" - vs3 := "{c:<*>(" + vAddr + "){c:<*>(" + vAddr + ")}}" - vs4 := "{c:<*>(" + vAddr + ")}" - vs5 := "{c:(*" + vt + "){c:(*" + vt + ")}}" - vs6 := "{c:(*" + vt + ")}" - vs7 := "{c:(*" + vt + ")(" + vAddr + "){c:(*" + vt + ")(" + vAddr + - ")}}" - vs8 := "{c:(*" + vt + ")(" + vAddr + ")}" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs2) - addFormatterTest("%v", &pv, "<**>"+vs2) - addFormatterTest("%+v", v, vs3) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs4) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs4) - addFormatterTest("%#v", v, "("+vt+")"+vs5) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs6) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs6) - addFormatterTest("%#+v", v, "("+vt+")"+vs7) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs8) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs8) - - // Structs that are circular through cross referencing. - v2 := xref1{nil} - ts2 := xref2{&v2} - v2.ps2 = &ts2 - pv2 := &v2 - ts2Addr := fmt.Sprintf("%p", &ts2) - v2Addr := fmt.Sprintf("%p", pv2) - pv2Addr := fmt.Sprintf("%p", &pv2) - v2t := "spew_test.xref1" - v2t2 := "spew_test.xref2" - v2s := "{<*>{<*>{<*>}}}" - v2s2 := "{<*>{<*>}}" - v2s3 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + "){ps2:<*>(" + - ts2Addr + ")}}}" - v2s4 := "{ps2:<*>(" + ts2Addr + "){ps1:<*>(" + v2Addr + ")}}" - v2s5 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + "){ps2:(*" + v2t2 + - ")}}}" - v2s6 := "{ps2:(*" + v2t2 + "){ps1:(*" + v2t + ")}}" - v2s7 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t + - ")(" + v2Addr + "){ps2:(*" + v2t2 + ")(" + ts2Addr + - ")}}}" - v2s8 := "{ps2:(*" + v2t2 + ")(" + ts2Addr + "){ps1:(*" + v2t + - ")(" + v2Addr + ")}}" - addFormatterTest("%v", v2, v2s) - addFormatterTest("%v", pv2, "<*>"+v2s2) - addFormatterTest("%v", &pv2, "<**>"+v2s2) - addFormatterTest("%+v", v2, v2s3) - addFormatterTest("%+v", pv2, "<*>("+v2Addr+")"+v2s4) - addFormatterTest("%+v", &pv2, "<**>("+pv2Addr+"->"+v2Addr+")"+v2s4) - addFormatterTest("%#v", v2, "("+v2t+")"+v2s5) - addFormatterTest("%#v", pv2, "(*"+v2t+")"+v2s6) - addFormatterTest("%#v", &pv2, "(**"+v2t+")"+v2s6) - addFormatterTest("%#+v", v2, "("+v2t+")"+v2s7) - addFormatterTest("%#+v", pv2, "(*"+v2t+")("+v2Addr+")"+v2s8) - addFormatterTest("%#+v", &pv2, "(**"+v2t+")("+pv2Addr+"->"+v2Addr+")"+v2s8) - - // Structs that are indirectly circular. - v3 := indirCir1{nil} - tic2 := indirCir2{nil} - tic3 := indirCir3{&v3} - tic2.ps3 = &tic3 - v3.ps2 = &tic2 - pv3 := &v3 - tic2Addr := fmt.Sprintf("%p", &tic2) - tic3Addr := fmt.Sprintf("%p", &tic3) - v3Addr := fmt.Sprintf("%p", pv3) - pv3Addr := fmt.Sprintf("%p", &pv3) - v3t := "spew_test.indirCir1" - v3t2 := "spew_test.indirCir2" - v3t3 := "spew_test.indirCir3" - v3s := "{<*>{<*>{<*>{<*>}}}}" - v3s2 := "{<*>{<*>{<*>}}}" - v3s3 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" + - v3Addr + "){ps2:<*>(" + tic2Addr + ")}}}}" - v3s4 := "{ps2:<*>(" + tic2Addr + "){ps3:<*>(" + tic3Addr + "){ps1:<*>(" + - v3Addr + ")}}}" - v3s5 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t + - "){ps2:(*" + v3t2 + ")}}}}" - v3s6 := "{ps2:(*" + v3t2 + "){ps3:(*" + v3t3 + "){ps1:(*" + v3t + - ")}}}" - v3s7 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" + - tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + "){ps2:(*" + v3t2 + - ")(" + tic2Addr + ")}}}}" - v3s8 := "{ps2:(*" + v3t2 + ")(" + tic2Addr + "){ps3:(*" + v3t3 + ")(" + - tic3Addr + "){ps1:(*" + v3t + ")(" + v3Addr + ")}}}" - addFormatterTest("%v", v3, v3s) - addFormatterTest("%v", pv3, "<*>"+v3s2) - addFormatterTest("%v", &pv3, "<**>"+v3s2) - addFormatterTest("%+v", v3, v3s3) - addFormatterTest("%+v", pv3, "<*>("+v3Addr+")"+v3s4) - addFormatterTest("%+v", &pv3, "<**>("+pv3Addr+"->"+v3Addr+")"+v3s4) - addFormatterTest("%#v", v3, "("+v3t+")"+v3s5) - addFormatterTest("%#v", pv3, "(*"+v3t+")"+v3s6) - addFormatterTest("%#v", &pv3, "(**"+v3t+")"+v3s6) - addFormatterTest("%#+v", v3, "("+v3t+")"+v3s7) - addFormatterTest("%#+v", pv3, "(*"+v3t+")("+v3Addr+")"+v3s8) - addFormatterTest("%#+v", &pv3, "(**"+v3t+")("+pv3Addr+"->"+v3Addr+")"+v3s8) -} - -func addPanicFormatterTests() { - // Type that panics in its Stringer interface. - v := panicer(127) - nv := (*panicer)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.panicer" - vs := "(PANIC=test panic)127" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") -} - -func addErrorFormatterTests() { - // Type that has a custom Error interface. - v := customError(127) - nv := (*customError)(nil) - pv := &v - vAddr := fmt.Sprintf("%p", pv) - pvAddr := fmt.Sprintf("%p", &pv) - vt := "spew_test.customError" - vs := "error: 127" - addFormatterTest("%v", v, vs) - addFormatterTest("%v", pv, "<*>"+vs) - addFormatterTest("%v", &pv, "<**>"+vs) - addFormatterTest("%v", nv, "") - addFormatterTest("%+v", v, vs) - addFormatterTest("%+v", pv, "<*>("+vAddr+")"+vs) - addFormatterTest("%+v", &pv, "<**>("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%+v", nv, "") - addFormatterTest("%#v", v, "("+vt+")"+vs) - addFormatterTest("%#v", pv, "(*"+vt+")"+vs) - addFormatterTest("%#v", &pv, "(**"+vt+")"+vs) - addFormatterTest("%#v", nv, "(*"+vt+")"+"") - addFormatterTest("%#+v", v, "("+vt+")"+vs) - addFormatterTest("%#+v", pv, "(*"+vt+")("+vAddr+")"+vs) - addFormatterTest("%#+v", &pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")"+vs) - addFormatterTest("%#+v", nv, "(*"+vt+")"+"") -} - -func addPassthroughFormatterTests() { - // %x passthrough with uint. - v := uint(4294967295) - pv := &v - vAddr := fmt.Sprintf("%x", pv) - pvAddr := fmt.Sprintf("%x", &pv) - vs := "ffffffff" - addFormatterTest("%x", v, vs) - addFormatterTest("%x", pv, vAddr) - addFormatterTest("%x", &pv, pvAddr) - - // %#x passthrough with uint. - v2 := int(2147483647) - pv2 := &v2 - v2Addr := fmt.Sprintf("%#x", pv2) - pv2Addr := fmt.Sprintf("%#x", &pv2) - v2s := "0x7fffffff" - addFormatterTest("%#x", v2, v2s) - addFormatterTest("%#x", pv2, v2Addr) - addFormatterTest("%#x", &pv2, pv2Addr) - - // %f passthrough with precision. - addFormatterTest("%.2f", 3.1415, "3.14") - addFormatterTest("%.3f", 3.1415, "3.142") - addFormatterTest("%.4f", 3.1415, "3.1415") - - // %f passthrough with width and precision. - addFormatterTest("%5.2f", 3.1415, " 3.14") - addFormatterTest("%6.3f", 3.1415, " 3.142") - addFormatterTest("%7.4f", 3.1415, " 3.1415") - - // %d passthrough with width. - addFormatterTest("%3d", 127, "127") - addFormatterTest("%4d", 127, " 127") - addFormatterTest("%5d", 127, " 127") - - // %q passthrough with string. - addFormatterTest("%q", "test", "\"test\"") -} - -// TestFormatter executes all of the tests described by formatterTests. -func TestFormatter(t *testing.T) { - // Setup tests. - addIntFormatterTests() - addUintFormatterTests() - addBoolFormatterTests() - addFloatFormatterTests() - addComplexFormatterTests() - addArrayFormatterTests() - addSliceFormatterTests() - addStringFormatterTests() - addInterfaceFormatterTests() - addMapFormatterTests() - addStructFormatterTests() - addUintptrFormatterTests() - addUnsafePointerFormatterTests() - addChanFormatterTests() - addFuncFormatterTests() - addCircularFormatterTests() - addPanicFormatterTests() - addErrorFormatterTests() - addPassthroughFormatterTests() - - t.Logf("Running %d tests", len(formatterTests)) - for i, test := range formatterTests { - buf := new(bytes.Buffer) - spew.Fprintf(buf, test.format, test.in) - s := buf.String() - if testFailed(s, test.wants) { - t.Errorf("Formatter #%d format: %s got: %s %s", i, test.format, s, - stringizeWants(test.wants)) - continue - } - } -} - -type testStruct struct { - x int -} - -func (ts testStruct) String() string { - return fmt.Sprintf("ts.%d", ts.x) -} - -type testStructP struct { - x int -} - -func (ts *testStructP) String() string { - return fmt.Sprintf("ts.%d", ts.x) -} - -func TestPrintSortedKeys(t *testing.T) { - cfg := spew.ConfigState{SortKeys: true} - s := cfg.Sprint(map[int]string{1: "1", 3: "3", 2: "2"}) - expected := "map[1:1 2:2 3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 1:\n %v %v", s, expected) - } - - s = cfg.Sprint(map[stringer]int{"1": 1, "3": 3, "2": 2}) - expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 2:\n %v %v", s, expected) - } - - s = cfg.Sprint(map[pstringer]int{pstringer("1"): 1, pstringer("3"): 3, pstringer("2"): 2}) - expected = "map[stringer 1:1 stringer 2:2 stringer 3:3]" - if spew.UnsafeDisabled { - expected = "map[1:1 2:2 3:3]" - } - if s != expected { - t.Errorf("Sorted keys mismatch 3:\n %v %v", s, expected) - } - - s = cfg.Sprint(map[testStruct]int{testStruct{1}: 1, testStruct{3}: 3, testStruct{2}: 2}) - expected = "map[ts.1:1 ts.2:2 ts.3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 4:\n %v %v", s, expected) - } - - if !spew.UnsafeDisabled { - s = cfg.Sprint(map[testStructP]int{testStructP{1}: 1, testStructP{3}: 3, testStructP{2}: 2}) - expected = "map[ts.1:1 ts.2:2 ts.3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 5:\n %v %v", s, expected) - } - } - - s = cfg.Sprint(map[customError]int{customError(1): 1, customError(3): 3, customError(2): 2}) - expected = "map[error: 1:1 error: 2:2 error: 3:3]" - if s != expected { - t.Errorf("Sorted keys mismatch 6:\n %v %v", s, expected) - } -} diff --git a/vendor/github.com/davecgh/go-spew/spew/internal_test.go b/vendor/github.com/davecgh/go-spew/spew/internal_test.go deleted file mode 100644 index 20a9cfefc..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/internal_test.go +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2013-2016 Dave Collins - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* -This test file is part of the spew package rather than than the spew_test -package because it needs access to internals to properly test certain cases -which are not possible via the public interface since they should never happen. -*/ - -package spew - -import ( - "bytes" - "reflect" - "testing" -) - -// dummyFmtState implements a fake fmt.State to use for testing invalid -// reflect.Value handling. This is necessary because the fmt package catches -// invalid values before invoking the formatter on them. -type dummyFmtState struct { - bytes.Buffer -} - -func (dfs *dummyFmtState) Flag(f int) bool { - if f == int('+') { - return true - } - return false -} - -func (dfs *dummyFmtState) Precision() (int, bool) { - return 0, false -} - -func (dfs *dummyFmtState) Width() (int, bool) { - return 0, false -} - -// TestInvalidReflectValue ensures the dump and formatter code handles an -// invalid reflect value properly. This needs access to internal state since it -// should never happen in real code and therefore can't be tested via the public -// API. -func TestInvalidReflectValue(t *testing.T) { - i := 1 - - // Dump invalid reflect value. - v := new(reflect.Value) - buf := new(bytes.Buffer) - d := dumpState{w: buf, cs: &Config} - d.dump(*v) - s := buf.String() - want := "" - if s != want { - t.Errorf("InvalidReflectValue #%d\n got: %s want: %s", i, s, want) - } - i++ - - // Formatter invalid reflect value. - buf2 := new(dummyFmtState) - f := formatState{value: *v, cs: &Config, fs: buf2} - f.format(*v) - s = buf2.String() - want = "" - if s != want { - t.Errorf("InvalidReflectValue #%d got: %s want: %s", i, s, want) - } -} - -// SortValues makes the internal sortValues function available to the test -// package. -func SortValues(values []reflect.Value, cs *ConfigState) { - sortValues(values, cs) -} diff --git a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go b/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go deleted file mode 100644 index a0c612ec3..000000000 --- a/vendor/github.com/davecgh/go-spew/spew/internalunsafe_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2013-2016 Dave Collins - -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. - -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -// NOTE: Due to the following build constraints, this file will only be compiled -// when the code is not running on Google App Engine, compiled by GopherJS, and -// "-tags safe" is not added to the go build command line. The "disableunsafe" -// tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe - -/* -This test file is part of the spew package rather than than the spew_test -package because it needs access to internals to properly test certain cases -which are not possible via the public interface since they should never happen. -*/ - -package spew - -import ( - "bytes" - "reflect" - "testing" - "unsafe" -) - -// changeKind uses unsafe to intentionally change the kind of a reflect.Value to -// the maximum kind value which does not exist. This is needed to test the -// fallback code which punts to the standard fmt library for new types that -// might get added to the language. -func changeKind(v *reflect.Value, readOnly bool) { - rvf := (*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + offsetFlag)) - *rvf = *rvf | ((1< - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -package spew_test - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" - "testing" - - "github.com/davecgh/go-spew/spew" -) - -// spewFunc is used to identify which public function of the spew package or -// ConfigState a test applies to. -type spewFunc int - -const ( - fCSFdump spewFunc = iota - fCSFprint - fCSFprintf - fCSFprintln - fCSPrint - fCSPrintln - fCSSdump - fCSSprint - fCSSprintf - fCSSprintln - fCSErrorf - fCSNewFormatter - fErrorf - fFprint - fFprintln - fPrint - fPrintln - fSdump - fSprint - fSprintf - fSprintln -) - -// Map of spewFunc values to names for pretty printing. -var spewFuncStrings = map[spewFunc]string{ - fCSFdump: "ConfigState.Fdump", - fCSFprint: "ConfigState.Fprint", - fCSFprintf: "ConfigState.Fprintf", - fCSFprintln: "ConfigState.Fprintln", - fCSSdump: "ConfigState.Sdump", - fCSPrint: "ConfigState.Print", - fCSPrintln: "ConfigState.Println", - fCSSprint: "ConfigState.Sprint", - fCSSprintf: "ConfigState.Sprintf", - fCSSprintln: "ConfigState.Sprintln", - fCSErrorf: "ConfigState.Errorf", - fCSNewFormatter: "ConfigState.NewFormatter", - fErrorf: "spew.Errorf", - fFprint: "spew.Fprint", - fFprintln: "spew.Fprintln", - fPrint: "spew.Print", - fPrintln: "spew.Println", - fSdump: "spew.Sdump", - fSprint: "spew.Sprint", - fSprintf: "spew.Sprintf", - fSprintln: "spew.Sprintln", -} - -func (f spewFunc) String() string { - if s, ok := spewFuncStrings[f]; ok { - return s - } - return fmt.Sprintf("Unknown spewFunc (%d)", int(f)) -} - -// spewTest is used to describe a test to be performed against the public -// functions of the spew package or ConfigState. -type spewTest struct { - cs *spew.ConfigState - f spewFunc - format string - in interface{} - want string -} - -// spewTests houses the tests to be performed against the public functions of -// the spew package and ConfigState. -// -// These tests are only intended to ensure the public functions are exercised -// and are intentionally not exhaustive of types. The exhaustive type -// tests are handled in the dump and format tests. -var spewTests []spewTest - -// redirStdout is a helper function to return the standard output from f as a -// byte slice. -func redirStdout(f func()) ([]byte, error) { - tempFile, err := ioutil.TempFile("", "ss-test") - if err != nil { - return nil, err - } - fileName := tempFile.Name() - defer os.Remove(fileName) // Ignore error - - origStdout := os.Stdout - os.Stdout = tempFile - f() - os.Stdout = origStdout - tempFile.Close() - - return ioutil.ReadFile(fileName) -} - -func initSpewTests() { - // Config states with various settings. - scsDefault := spew.NewDefaultConfig() - scsNoMethods := &spew.ConfigState{Indent: " ", DisableMethods: true} - scsNoPmethods := &spew.ConfigState{Indent: " ", DisablePointerMethods: true} - scsMaxDepth := &spew.ConfigState{Indent: " ", MaxDepth: 1} - scsContinue := &spew.ConfigState{Indent: " ", ContinueOnMethod: true} - scsNoPtrAddr := &spew.ConfigState{DisablePointerAddresses: true} - scsNoCap := &spew.ConfigState{DisableCapacities: true} - - // Variables for tests on types which implement Stringer interface with and - // without a pointer receiver. - ts := stringer("test") - tps := pstringer("test") - - type ptrTester struct { - s *struct{} - } - tptr := &ptrTester{s: &struct{}{}} - - // depthTester is used to test max depth handling for structs, array, slices - // and maps. - type depthTester struct { - ic indirCir1 - arr [1]string - slice []string - m map[string]int - } - dt := depthTester{indirCir1{nil}, [1]string{"arr"}, []string{"slice"}, - map[string]int{"one": 1}} - - // Variable for tests on types which implement error interface. - te := customError(10) - - spewTests = []spewTest{ - {scsDefault, fCSFdump, "", int8(127), "(int8) 127\n"}, - {scsDefault, fCSFprint, "", int16(32767), "32767"}, - {scsDefault, fCSFprintf, "%v", int32(2147483647), "2147483647"}, - {scsDefault, fCSFprintln, "", int(2147483647), "2147483647\n"}, - {scsDefault, fCSPrint, "", int64(9223372036854775807), "9223372036854775807"}, - {scsDefault, fCSPrintln, "", uint8(255), "255\n"}, - {scsDefault, fCSSdump, "", uint8(64), "(uint8) 64\n"}, - {scsDefault, fCSSprint, "", complex(1, 2), "(1+2i)"}, - {scsDefault, fCSSprintf, "%v", complex(float32(3), 4), "(3+4i)"}, - {scsDefault, fCSSprintln, "", complex(float64(5), 6), "(5+6i)\n"}, - {scsDefault, fCSErrorf, "%#v", uint16(65535), "(uint16)65535"}, - {scsDefault, fCSNewFormatter, "%v", uint32(4294967295), "4294967295"}, - {scsDefault, fErrorf, "%v", uint64(18446744073709551615), "18446744073709551615"}, - {scsDefault, fFprint, "", float32(3.14), "3.14"}, - {scsDefault, fFprintln, "", float64(6.28), "6.28\n"}, - {scsDefault, fPrint, "", true, "true"}, - {scsDefault, fPrintln, "", false, "false\n"}, - {scsDefault, fSdump, "", complex(-10, -20), "(complex128) (-10-20i)\n"}, - {scsDefault, fSprint, "", complex(-1, -2), "(-1-2i)"}, - {scsDefault, fSprintf, "%v", complex(float32(-3), -4), "(-3-4i)"}, - {scsDefault, fSprintln, "", complex(float64(-5), -6), "(-5-6i)\n"}, - {scsNoMethods, fCSFprint, "", ts, "test"}, - {scsNoMethods, fCSFprint, "", &ts, "<*>test"}, - {scsNoMethods, fCSFprint, "", tps, "test"}, - {scsNoMethods, fCSFprint, "", &tps, "<*>test"}, - {scsNoPmethods, fCSFprint, "", ts, "stringer test"}, - {scsNoPmethods, fCSFprint, "", &ts, "<*>stringer test"}, - {scsNoPmethods, fCSFprint, "", tps, "test"}, - {scsNoPmethods, fCSFprint, "", &tps, "<*>stringer test"}, - {scsMaxDepth, fCSFprint, "", dt, "{{} [] [] map[]}"}, - {scsMaxDepth, fCSFdump, "", dt, "(spew_test.depthTester) {\n" + - " ic: (spew_test.indirCir1) {\n \n },\n" + - " arr: ([1]string) (len=1 cap=1) {\n \n },\n" + - " slice: ([]string) (len=1 cap=1) {\n \n },\n" + - " m: (map[string]int) (len=1) {\n \n }\n}\n"}, - {scsContinue, fCSFprint, "", ts, "(stringer test) test"}, - {scsContinue, fCSFdump, "", ts, "(spew_test.stringer) " + - "(len=4) (stringer test) \"test\"\n"}, - {scsContinue, fCSFprint, "", te, "(error: 10) 10"}, - {scsContinue, fCSFdump, "", te, "(spew_test.customError) " + - "(error: 10) 10\n"}, - {scsNoPtrAddr, fCSFprint, "", tptr, "<*>{<*>{}}"}, - {scsNoPtrAddr, fCSSdump, "", tptr, "(*spew_test.ptrTester)({\ns: (*struct {})({\n})\n})\n"}, - {scsNoCap, fCSSdump, "", make([]string, 0, 10), "([]string) {\n}\n"}, - {scsNoCap, fCSSdump, "", make([]string, 1, 10), "([]string) (len=1) {\n(string) \"\"\n}\n"}, - } -} - -// TestSpew executes all of the tests described by spewTests. -func TestSpew(t *testing.T) { - initSpewTests() - - t.Logf("Running %d tests", len(spewTests)) - for i, test := range spewTests { - buf := new(bytes.Buffer) - switch test.f { - case fCSFdump: - test.cs.Fdump(buf, test.in) - - case fCSFprint: - test.cs.Fprint(buf, test.in) - - case fCSFprintf: - test.cs.Fprintf(buf, test.format, test.in) - - case fCSFprintln: - test.cs.Fprintln(buf, test.in) - - case fCSPrint: - b, err := redirStdout(func() { test.cs.Print(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fCSPrintln: - b, err := redirStdout(func() { test.cs.Println(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fCSSdump: - str := test.cs.Sdump(test.in) - buf.WriteString(str) - - case fCSSprint: - str := test.cs.Sprint(test.in) - buf.WriteString(str) - - case fCSSprintf: - str := test.cs.Sprintf(test.format, test.in) - buf.WriteString(str) - - case fCSSprintln: - str := test.cs.Sprintln(test.in) - buf.WriteString(str) - - case fCSErrorf: - err := test.cs.Errorf(test.format, test.in) - buf.WriteString(err.Error()) - - case fCSNewFormatter: - fmt.Fprintf(buf, test.format, test.cs.NewFormatter(test.in)) - - case fErrorf: - err := spew.Errorf(test.format, test.in) - buf.WriteString(err.Error()) - - case fFprint: - spew.Fprint(buf, test.in) - - case fFprintln: - spew.Fprintln(buf, test.in) - - case fPrint: - b, err := redirStdout(func() { spew.Print(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fPrintln: - b, err := redirStdout(func() { spew.Println(test.in) }) - if err != nil { - t.Errorf("%v #%d %v", test.f, i, err) - continue - } - buf.Write(b) - - case fSdump: - str := spew.Sdump(test.in) - buf.WriteString(str) - - case fSprint: - str := spew.Sprint(test.in) - buf.WriteString(str) - - case fSprintf: - str := spew.Sprintf(test.format, test.in) - buf.WriteString(str) - - case fSprintln: - str := spew.Sprintln(test.in) - buf.WriteString(str) - - default: - t.Errorf("%v #%d unrecognized function", test.f, i) - continue - } - s := buf.String() - if test.want != s { - t.Errorf("ConfigState #%d\n got: %s want: %s", i, s, test.want) - continue - } - } -} diff --git a/vendor/github.com/davecgh/go-spew/test_coverage.txt b/vendor/github.com/davecgh/go-spew/test_coverage.txt deleted file mode 100644 index 2cd087a2a..000000000 --- a/vendor/github.com/davecgh/go-spew/test_coverage.txt +++ /dev/null @@ -1,61 +0,0 @@ - -github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88) -github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82) -github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44) -github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39) -github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30) -github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18) -github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13) -github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12) -github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11) -github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11) -github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10) -github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8) -github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7) -github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5) -github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4) -github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4) -github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4) -github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3) -github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3) -github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3) -github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1) -github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1) -github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1) -github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1) -github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1) -github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505) - diff --git a/vendor/github.com/dgrijalva/jwt-go/.gitignore b/vendor/github.com/dgrijalva/jwt-go/.gitignore deleted file mode 100644 index 80bed650e..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -bin - - diff --git a/vendor/github.com/dgrijalva/jwt-go/.travis.yml b/vendor/github.com/dgrijalva/jwt-go/.travis.yml deleted file mode 100644 index bde823d8a..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -go: - - 1.3 - - 1.4 - - 1.5 - - 1.6 - - tip diff --git a/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md b/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md deleted file mode 100644 index fd62e9490..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md +++ /dev/null @@ -1,96 +0,0 @@ -## Migration Guide from v2 -> v3 - -Version 3 adds several new, frequently requested features. To do so, it introduces a few breaking changes. We've worked to keep these as minimal as possible. This guide explains the breaking changes and how you can quickly update your code. - -### `Token.Claims` is now an interface type - -The most requested feature from the 2.0 verison of this library was the ability to provide a custom type to the JSON parser for claims. This was implemented by introducing a new interface, `Claims`, to replace `map[string]interface{}`. We also included two concrete implementations of `Claims`: `MapClaims` and `StandardClaims`. - -`MapClaims` is an alias for `map[string]interface{}` with built in validation behavior. It is the default claims type when using `Parse`. The usage is unchanged except you must type cast the claims property. - -The old example for parsing a token looked like this.. - -```go - if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil { - fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"]) - } -``` - -is now directly mapped to... - -```go - if token, err := jwt.Parse(tokenString, keyLookupFunc); err == nil { - claims := token.Claims.(jwt.MapClaims) - fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"]) - } -``` - -`StandardClaims` is designed to be embedded in your custom type. You can supply a custom claims type with the new `ParseWithClaims` function. Here's an example of using a custom claims type. - -```go - type MyCustomClaims struct { - User string - *StandardClaims - } - - if token, err := jwt.ParseWithClaims(tokenString, &MyCustomClaims{}, keyLookupFunc); err == nil { - claims := token.Claims.(*MyCustomClaims) - fmt.Printf("Token for user %v expires %v", claims.User, claims.StandardClaims.ExpiresAt) - } -``` - -### `ParseFromRequest` has been moved - -To keep this library focused on the tokens without becoming overburdened with complex request processing logic, `ParseFromRequest` and its new companion `ParseFromRequestWithClaims` have been moved to a subpackage, `request`. The method signatues have also been augmented to receive a new argument: `Extractor`. - -`Extractors` do the work of picking the token string out of a request. The interface is simple and composable. - -This simple parsing example: - -```go - if token, err := jwt.ParseFromRequest(tokenString, req, keyLookupFunc); err == nil { - fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"]) - } -``` - -is directly mapped to: - -```go - if token, err := request.ParseFromRequest(tokenString, request.OAuth2Extractor, req, keyLookupFunc); err == nil { - fmt.Printf("Token for user %v expires %v", token.Claims["user"], token.Claims["exp"]) - } -``` - -There are several concrete `Extractor` types provided for your convenience: - -* `HeaderExtractor` will search a list of headers until one contains content. -* `ArgumentExtractor` will search a list of keys in request query and form arguments until one contains content. -* `MultiExtractor` will try a list of `Extractors` in order until one returns content. -* `AuthorizationHeaderExtractor` will look in the `Authorization` header for a `Bearer` token. -* `OAuth2Extractor` searches the places an OAuth2 token would be specified (per the spec): `Authorization` header and `access_token` argument -* `PostExtractionFilter` wraps an `Extractor`, allowing you to process the content before it's parsed. A simple example is stripping the `Bearer ` text from a header - - -### RSA signing methods no longer accept `[]byte` keys - -Due to a [critical vulnerability](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/), we've decided the convenience of accepting `[]byte` instead of `rsa.PublicKey` or `rsa.PrivateKey` isn't worth the risk of misuse. - -To replace this behavior, we've added two helper methods: `ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error)` and `ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error)`. These are just simple helpers for unpacking PEM encoded PKCS1 and PKCS8 keys. If your keys are encoded any other way, all you need to do is convert them to the `crypto/rsa` package's types. - -```go - func keyLookupFunc(*Token) (interface{}, error) { - // Don't forget to validate the alg is what you expect: - if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok { - return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"]) - } - - // Look up key - key, err := lookupPublicKey(token.Header["kid"]) - if err != nil { - return nil, err - } - - // Unpack key from PEM encoded PKCS8 - return jwt.ParseRSAPublicKeyFromPEM(key) - } -``` diff --git a/vendor/github.com/dgrijalva/jwt-go/README.md b/vendor/github.com/dgrijalva/jwt-go/README.md deleted file mode 100644 index 00f613672..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/README.md +++ /dev/null @@ -1,85 +0,0 @@ -A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) - -[![Build Status](https://travis-ci.org/dgrijalva/jwt-go.svg?branch=master)](https://travis-ci.org/dgrijalva/jwt-go) - -**BREAKING CHANGES:*** Version 3.0.0 is here. It includes _a lot_ of changes including a few that break the API. We've tried to break as few things as possible, so there should just be a few type signature changes. A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code. - -**NOTICE:** A vulnerability in JWT was [recently published](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/). As this library doesn't force users to validate the `alg` is what they expected, it's possible your usage is effected. There will be an update soon to remedy this, and it will likey require backwards-incompatible changes to the API. In the short term, please make sure your implementation verifies the `alg` is what you expect. - - -## What the heck is a JWT? - -JWT.io has [a great introduction](https://jwt.io/introduction) to JSON Web Tokens. - -In short, it's a signed JSON object that does something useful (for example, authentication). It's commonly used for `Bearer` tokens in Oauth 2. A token is made of three parts, separated by `.`'s. The first two parts are JSON objects, that have been [base64url](http://tools.ietf.org/html/rfc4648) encoded. The last part is the signature, encoded the same way. - -The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used. - -The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [the RFC](http://self-issued.info/docs/draft-jones-json-web-token.html) for information about reserved keys and the proper way to add your own. - -## What's in the box? - -This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own. - -## Examples - -See [the project documentation](https://godoc.org/github.com/dgrijalva/jwt-go) for examples of usage: - -* [Simple example of parsing and validating a token](https://godoc.org/github.com/dgrijalva/jwt-go#example_Parse_hmac) -* [Simple example of building and signing a token](https://godoc.org/github.com/dgrijalva/jwt-go#example_New_hmac) -* [Directory of Examples](https://godoc.org/github.com/dgrijalva/jwt-go#pkg-examples) - -## Extensions - -This library publishes all the necessary components for adding your own signing methods. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod`. - -Here's an example of an extension that integrates with the Google App Engine signing tools: https://github.com/someone1/gcp-jwt-go - -## Compliance - -This library was last reviewed to comply with [RTF 7519](http://www.rfc-editor.org/info/rfc7519) dated May 2015 with a few notable differences: - -* In order to protect against accidental use of [Unsecured JWTs](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#UnsecuredJWT), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key. - -## Project Status & Versioning - -This library is considered production ready. Feedback and feature requests are appreciated. The API should be considered stable. There should be very few backwards-incompatible changes outside of major version updates (and only with good reason). - -This project uses [Semantic Versioning 2.0.0](http://semver.org). Accepted pull requests will land on `master`. Periodically, versions will be tagged from `master`. You can find all the releases on [the project releases page](https://github.com/dgrijalva/jwt-go/releases). - -While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users. You may want to use this alternative package include: `gopkg.in/dgrijalva/jwt-go.v2`. It will do the right thing WRT semantic versioning. - -## Usage Tips - -### Signing vs Encryption - -A token is simply a JSON object that is signed by its author. this tells you exactly two things about the data: - -* The author of the token was in the possession of the signing secret -* The data has not been modified since it was signed - -It's important to know that JWT does not provide encryption, which means anyone who has access to the token can read its contents. If you need to protect (encrypt) the data, there is a companion spec, `JWE`, that provides this functionality. JWE is currently outside the scope of this library. - -### Choosing a Signing Method - -There are several signing methods available, and you should probably take the time to learn about the various options before choosing one. The principal design decision is most likely going to be symmetric vs asymmetric. - -Symmetric signing methods, such as HSA, use only a single secret. This is probably the simplest signing method to use since any `[]byte` can be used as a valid secret. They are also slightly computationally faster to use, though this rarely is enough to matter. Symmetric signing methods work the best when both producers and consumers of tokens are trusted, or even the same system. Since the same secret is used to both sign and validate tokens, you can't easily distribute the key for validation. - -Asymmetric signing methods, such as RSA, use different keys for signing and verifying tokens. This makes it possible to produce tokens with a private key, and allow any consumer to access the public key for verification. - -### JWT and OAuth - -It's worth mentioning that OAuth and JWT are not the same thing. A JWT token is simply a signed JSON object. It can be used anywhere such a thing is useful. There is some confusion, though, as JWT is the most common type of bearer token used in OAuth2 authentication. - -Without going too far down the rabbit hole, here's a description of the interaction of these technologies: - -* OAuth is a protocol for allowing an identity provider to be separate from the service a user is logging in to. For example, whenever you use Facebook to log into a different service (Yelp, Spotify, etc), you are using OAuth. -* OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token. -* Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL. - -## More - -Documentation can be found [on godoc.org](http://godoc.org/github.com/dgrijalva/jwt-go). - -The command line utility included in this project (cmd/jwt) provides a straightforward example of token creation and parsing as well as a useful tool for debugging your own integration. You'll also find several implementation examples in to documentation. diff --git a/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md b/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md deleted file mode 100644 index b605b4509..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md +++ /dev/null @@ -1,105 +0,0 @@ -## `jwt-go` Version History - -#### 3.0.0 - -* **Compatibility Breaking Changes**: See MIGRATION_GUIDE.md for tips on updating your code - * Dropped support for `[]byte` keys when using RSA signing methods. This convenience feature could contribute to security vulnerabilities involving mismatched key types with signing methods. - * `ParseFromRequest` has been moved to `request` subpackage and usage has changed - * The `Claims` property on `Token` is now type `Claims` instead of `map[string]interface{}`. The default value is type `MapClaims`, which is an alias to `map[string]interface{}`. This makes it possible to use a custom type when decoding claims. -* Other Additions and Changes - * Added `Claims` interface type to allow users to decode the claims into a custom type - * Added `ParseWithClaims`, which takes a third argument of type `Claims`. Use this function instead of `Parse` if you have a custom type you'd like to decode into. - * Dramatically improved the functionality and flexibility of `ParseFromRequest`, which is now in the `request` subpackage - * Added `ParseFromRequestWithClaims` which is the `FromRequest` equivalent of `ParseWithClaims` - * Added new interface type `Extractor`, which is used for extracting JWT strings from http requests. Used with `ParseFromRequest` and `ParseFromRequestWithClaims`. - * Added several new, more specific, validation errors to error type bitmask - * Moved examples from README to executable example files - * Signing method registry is now thread safe - * Added new property to `ValidationError`, which contains the raw error returned by calls made by parse/verify (such as those returned by keyfunc or json parser) - -#### 2.7.0 - -This will likely be the last backwards compatible release before 3.0.0, excluding essential bug fixes. - -* Added new option `-show` to the `jwt` command that will just output the decoded token without verifying -* Error text for expired tokens includes how long it's been expired -* Fixed incorrect error returned from `ParseRSAPublicKeyFromPEM` -* Documentation updates - -#### 2.6.0 - -* Exposed inner error within ValidationError -* Fixed validation errors when using UseJSONNumber flag -* Added several unit tests - -#### 2.5.0 - -* Added support for signing method none. You shouldn't use this. The API tries to make this clear. -* Updated/fixed some documentation -* Added more helpful error message when trying to parse tokens that begin with `BEARER ` - -#### 2.4.0 - -* Added new type, Parser, to allow for configuration of various parsing parameters - * You can now specify a list of valid signing methods. Anything outside this set will be rejected. - * You can now opt to use the `json.Number` type instead of `float64` when parsing token JSON -* Added support for [Travis CI](https://travis-ci.org/dgrijalva/jwt-go) -* Fixed some bugs with ECDSA parsing - -#### 2.3.0 - -* Added support for ECDSA signing methods -* Added support for RSA PSS signing methods (requires go v1.4) - -#### 2.2.0 - -* Gracefully handle a `nil` `Keyfunc` being passed to `Parse`. Result will now be the parsed token and an error, instead of a panic. - -#### 2.1.0 - -Backwards compatible API change that was missed in 2.0.0. - -* The `SignedString` method on `Token` now takes `interface{}` instead of `[]byte` - -#### 2.0.0 - -There were two major reasons for breaking backwards compatibility with this update. The first was a refactor required to expand the width of the RSA and HMAC-SHA signing implementations. There will likely be no required code changes to support this change. - -The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibilty has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`. - -It is likely the only integration change required here will be to change `func(t *jwt.Token) ([]byte, error)` to `func(t *jwt.Token) (interface{}, error)` when calling `Parse`. - -* **Compatibility Breaking Changes** - * `SigningMethodHS256` is now `*SigningMethodHMAC` instead of `type struct` - * `SigningMethodRS256` is now `*SigningMethodRSA` instead of `type struct` - * `KeyFunc` now returns `interface{}` instead of `[]byte` - * `SigningMethod.Sign` now takes `interface{}` instead of `[]byte` for the key - * `SigningMethod.Verify` now takes `interface{}` instead of `[]byte` for the key -* Renamed type `SigningMethodHS256` to `SigningMethodHMAC`. Specific sizes are now just instances of this type. - * Added public package global `SigningMethodHS256` - * Added public package global `SigningMethodHS384` - * Added public package global `SigningMethodHS512` -* Renamed type `SigningMethodRS256` to `SigningMethodRSA`. Specific sizes are now just instances of this type. - * Added public package global `SigningMethodRS256` - * Added public package global `SigningMethodRS384` - * Added public package global `SigningMethodRS512` -* Moved sample private key for HMAC tests from an inline value to a file on disk. Value is unchanged. -* Refactored the RSA implementation to be easier to read -* Exposed helper methods `ParseRSAPrivateKeyFromPEM` and `ParseRSAPublicKeyFromPEM` - -#### 1.0.2 - -* Fixed bug in parsing public keys from certificates -* Added more tests around the parsing of keys for RS256 -* Code refactoring in RS256 implementation. No functional changes - -#### 1.0.1 - -* Fixed panic if RS256 signing method was passed an invalid key - -#### 1.0.0 - -* First versioned release -* API stabilized -* Supports creating, signing, parsing, and validating JWT tokens -* Supports RS256 and HS256 signing methods \ No newline at end of file diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa.go b/vendor/github.com/dgrijalva/jwt-go/ecdsa.go index 2f59a2223..f97738124 100644 --- a/vendor/github.com/dgrijalva/jwt-go/ecdsa.go +++ b/vendor/github.com/dgrijalva/jwt-go/ecdsa.go @@ -14,6 +14,7 @@ var ( ) // Implements the ECDSA family of signing methods signing methods +// Expects *ecdsa.PrivateKey for signing and *ecdsa.PublicKey for verification type SigningMethodECDSA struct { Name string Hash crypto.Hash diff --git a/vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go b/vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go deleted file mode 100644 index 753047b1e..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/ecdsa_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package jwt_test - -import ( - "crypto/ecdsa" - "io/ioutil" - "strings" - "testing" - - "github.com/dgrijalva/jwt-go" -) - -var ecdsaTestData = []struct { - name string - keys map[string]string - tokenString string - alg string - claims map[string]interface{} - valid bool -}{ - { - "Basic ES256", - map[string]string{"private": "test/ec256-private.pem", "public": "test/ec256-public.pem"}, - "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJmb28iOiJiYXIifQ.feG39E-bn8HXAKhzDZq7yEAPWYDhZlwTn3sePJnU9VrGMmwdXAIEyoOnrjreYlVM_Z4N13eK9-TmMTWyfKJtHQ", - "ES256", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic ES384", - map[string]string{"private": "test/ec384-private.pem", "public": "test/ec384-public.pem"}, - "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzM4NCJ9.eyJmb28iOiJiYXIifQ.ngAfKMbJUh0WWubSIYe5GMsA-aHNKwFbJk_wq3lq23aPp8H2anb1rRILIzVR0gUf4a8WzDtrzmiikuPWyCS6CN4-PwdgTk-5nehC7JXqlaBZU05p3toM3nWCwm_LXcld", - "ES384", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic ES512", - map[string]string{"private": "test/ec512-private.pem", "public": "test/ec512-public.pem"}, - "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzUxMiJ9.eyJmb28iOiJiYXIifQ.AAU0TvGQOcdg2OvrwY73NHKgfk26UDekh9Prz-L_iWuTBIBqOFCWwwLsRiHB1JOddfKAls5do1W0jR_F30JpVd-6AJeTjGKA4C1A1H6gIKwRY0o_tFDIydZCl_lMBMeG5VNFAjO86-WCSKwc3hqaGkq1MugPRq_qrF9AVbuEB4JPLyL5", - "ES512", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "basic ES256 invalid: foo => bar", - map[string]string{"private": "test/ec256-private.pem", "public": "test/ec256-public.pem"}, - "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.MEQCIHoSJnmGlPaVQDqacx_2XlXEhhqtWceVopjomc2PJLtdAiAUTeGPoNYxZw0z8mgOnnIcjoxRuNDVZvybRZF3wR1l8W", - "ES256", - map[string]interface{}{"foo": "bar"}, - false, - }, -} - -func TestECDSAVerify(t *testing.T) { - for _, data := range ecdsaTestData { - var err error - - key, _ := ioutil.ReadFile(data.keys["public"]) - - var ecdsaKey *ecdsa.PublicKey - if ecdsaKey, err = jwt.ParseECPublicKeyFromPEM(key); err != nil { - t.Errorf("Unable to parse ECDSA public key: %v", err) - } - - parts := strings.Split(data.tokenString, ".") - - method := jwt.GetSigningMethod(data.alg) - err = method.Verify(strings.Join(parts[0:2], "."), parts[2], ecdsaKey) - if data.valid && err != nil { - t.Errorf("[%v] Error while verifying key: %v", data.name, err) - } - if !data.valid && err == nil { - t.Errorf("[%v] Invalid key passed validation", data.name) - } - } -} - -func TestECDSASign(t *testing.T) { - for _, data := range ecdsaTestData { - var err error - key, _ := ioutil.ReadFile(data.keys["private"]) - - var ecdsaKey *ecdsa.PrivateKey - if ecdsaKey, err = jwt.ParseECPrivateKeyFromPEM(key); err != nil { - t.Errorf("Unable to parse ECDSA private key: %v", err) - } - - if data.valid { - parts := strings.Split(data.tokenString, ".") - method := jwt.GetSigningMethod(data.alg) - sig, err := method.Sign(strings.Join(parts[0:2], "."), ecdsaKey) - if err != nil { - t.Errorf("[%v] Error signing token: %v", data.name, err) - } - if sig == parts[2] { - t.Errorf("[%v] Identical signatures\nbefore:\n%v\nafter:\n%v", data.name, parts[2], sig) - } - } - } -} diff --git a/vendor/github.com/dgrijalva/jwt-go/errors.go b/vendor/github.com/dgrijalva/jwt-go/errors.go index 662df19d4..1c93024aa 100644 --- a/vendor/github.com/dgrijalva/jwt-go/errors.go +++ b/vendor/github.com/dgrijalva/jwt-go/errors.go @@ -51,13 +51,9 @@ func (e ValidationError) Error() string { } else { return "token is invalid" } - return e.Inner.Error() } // No errors func (e *ValidationError) valid() bool { - if e.Errors > 0 { - return false - } - return true + return e.Errors == 0 } diff --git a/vendor/github.com/dgrijalva/jwt-go/example_test.go b/vendor/github.com/dgrijalva/jwt-go/example_test.go deleted file mode 100644 index ae8b788a0..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/example_test.go +++ /dev/null @@ -1,114 +0,0 @@ -package jwt_test - -import ( - "fmt" - "github.com/dgrijalva/jwt-go" - "time" -) - -// Example (atypical) using the StandardClaims type by itself to parse a token. -// The StandardClaims type is designed to be embedded into your custom types -// to provide standard validation features. You can use it alone, but there's -// no way to retrieve other fields after parsing. -// See the CustomClaimsType example for intended usage. -func ExampleNewWithClaims_standardClaims() { - mySigningKey := []byte("AllYourBase") - - // Create the Claims - claims := &jwt.StandardClaims{ - ExpiresAt: 15000, - Issuer: "test", - } - - token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) - ss, err := token.SignedString(mySigningKey) - fmt.Printf("%v %v", ss, err) - //Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.QsODzZu3lUZMVdhbO76u3Jv02iYCvEHcYVUI1kOWEU0 -} - -// Example creating a token using a custom claims type. The StandardClaim is embedded -// in the custom type to allow for easy encoding, parsing and validation of standard claims. -func ExampleNewWithClaims_customClaimsType() { - mySigningKey := []byte("AllYourBase") - - type MyCustomClaims struct { - Foo string `json:"foo"` - jwt.StandardClaims - } - - // Create the Claims - claims := MyCustomClaims{ - "bar", - jwt.StandardClaims{ - ExpiresAt: 15000, - Issuer: "test", - }, - } - - token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) - ss, err := token.SignedString(mySigningKey) - fmt.Printf("%v %v", ss, err) - //Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c -} - -// Example creating a token using a custom claims type. The StandardClaim is embedded -// in the custom type to allow for easy encoding, parsing and validation of standard claims. -func ExampleParseWithClaims_customClaimsType() { - tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" - - type MyCustomClaims struct { - Foo string `json:"foo"` - jwt.StandardClaims - } - - // sample token is expired. override time so it parses as valid - at(time.Unix(0, 0), func() { - token, err := jwt.ParseWithClaims(tokenString, &MyCustomClaims{}, func(token *jwt.Token) (interface{}, error) { - return []byte("AllYourBase"), nil - }) - - if claims, ok := token.Claims.(*MyCustomClaims); ok && token.Valid { - fmt.Printf("%v %v", claims.Foo, claims.StandardClaims.ExpiresAt) - } else { - fmt.Println(err) - } - }) - - // Output: bar 15000 -} - -// Override time value for tests. Restore default value after. -func at(t time.Time, f func()) { - jwt.TimeFunc = func() time.Time { - return t - } - f() - jwt.TimeFunc = time.Now -} - -// An example of parsing the error types using bitfield checks -func ExampleParse_errorChecking() { - // Token from another example. This token is expired - var tokenString = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" - - token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) { - return []byte("AllYourBase"), nil - }) - - if token.Valid { - fmt.Println("You look nice today") - } else if ve, ok := err.(*jwt.ValidationError); ok { - if ve.Errors&jwt.ValidationErrorMalformed != 0 { - fmt.Println("That's not even a token") - } else if ve.Errors&(jwt.ValidationErrorExpired|jwt.ValidationErrorNotValidYet) != 0 { - // Token is either expired or not active yet - fmt.Println("Timing is everything") - } else { - fmt.Println("Couldn't handle this token:", err) - } - } else { - fmt.Println("Couldn't handle this token:", err) - } - - // Output: Timing is everything -} diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac.go b/vendor/github.com/dgrijalva/jwt-go/hmac.go index c22991925..addbe5d40 100644 --- a/vendor/github.com/dgrijalva/jwt-go/hmac.go +++ b/vendor/github.com/dgrijalva/jwt-go/hmac.go @@ -7,6 +7,7 @@ import ( ) // Implements the HMAC-SHA family of signing methods signing methods +// Expects key type of []byte for both signing and validation type SigningMethodHMAC struct { Name string Hash crypto.Hash @@ -90,5 +91,5 @@ func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, return EncodeSegment(hasher.Sum(nil)), nil } - return "", ErrInvalidKey + return "", ErrInvalidKeyType } diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go b/vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go deleted file mode 100644 index 8fb567820..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/hmac_example_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package jwt_test - -import ( - "fmt" - "github.com/dgrijalva/jwt-go" - "io/ioutil" - "time" -) - -// For HMAC signing method, the key can be any []byte. It is recommended to generate -// a key using crypto/rand or something equivalent. You need the same key for signing -// and validating. -var hmacSampleSecret []byte - -func init() { - // Load sample key data - if keyData, e := ioutil.ReadFile("test/hmacTestKey"); e == nil { - hmacSampleSecret = keyData - } else { - panic(e) - } -} - -// Example creating, signing, and encoding a JWT token using the HMAC signing method -func ExampleNew_hmac() { - // Create a new token object, specifying signing method and the claims - // you would like it to contain. - token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{ - "foo": "bar", - "nbf": time.Date(2015, 10, 10, 12, 0, 0, 0, time.UTC).Unix(), - }) - - // Sign and get the complete encoded token as a string using the secret - tokenString, err := token.SignedString(hmacSampleSecret) - - fmt.Println(tokenString, err) - // Output: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYmYiOjE0NDQ0Nzg0MDB9.u1riaD1rW97opCoAuRCTy4w58Br-Zk-bh7vLiRIsrpU -} - -// Example parsing and validating a token using the HMAC signing method -func ExampleParse_hmac() { - // sample token string taken from the New example - tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYmYiOjE0NDQ0Nzg0MDB9.u1riaD1rW97opCoAuRCTy4w58Br-Zk-bh7vLiRIsrpU" - - // Parse takes the token string and a function for looking up the key. The latter is especially - // useful if you use multiple keys for your application. The standard is to use 'kid' in the - // head of the token to identify which key to use, but the parsed token (head and claims) is provided - // to the callback, providing flexibility. - token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) { - // Don't forget to validate the alg is what you expect: - if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok { - return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"]) - } - return hmacSampleSecret, nil - }) - - if claims, ok := token.Claims.(jwt.MapClaims); ok && token.Valid { - fmt.Println(claims["foo"], claims["nbf"]) - } else { - fmt.Println(err) - } - - // Output: bar 1.4444784e+09 -} diff --git a/vendor/github.com/dgrijalva/jwt-go/hmac_test.go b/vendor/github.com/dgrijalva/jwt-go/hmac_test.go deleted file mode 100644 index c7e114f4f..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/hmac_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package jwt_test - -import ( - "github.com/dgrijalva/jwt-go" - "io/ioutil" - "strings" - "testing" -) - -var hmacTestData = []struct { - name string - tokenString string - alg string - claims map[string]interface{} - valid bool -}{ - { - "web sample", - "eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", - "HS256", - map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, - true, - }, - { - "HS384", - "eyJhbGciOiJIUzM4NCIsInR5cCI6IkpXVCJ9.eyJleHAiOjEuMzAwODE5MzhlKzA5LCJodHRwOi8vZXhhbXBsZS5jb20vaXNfcm9vdCI6dHJ1ZSwiaXNzIjoiam9lIn0.KWZEuOD5lbBxZ34g7F-SlVLAQ_r5KApWNWlZIIMyQVz5Zs58a7XdNzj5_0EcNoOy", - "HS384", - map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, - true, - }, - { - "HS512", - "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEuMzAwODE5MzhlKzA5LCJodHRwOi8vZXhhbXBsZS5jb20vaXNfcm9vdCI6dHJ1ZSwiaXNzIjoiam9lIn0.CN7YijRX6Aw1n2jyI2Id1w90ja-DEMYiWixhYCyHnrZ1VfJRaFQz1bEbjjA5Fn4CLYaUG432dEYmSbS4Saokmw", - "HS512", - map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, - true, - }, - { - "web sample: invalid", - "eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXo", - "HS256", - map[string]interface{}{"iss": "joe", "exp": 1300819380, "http://example.com/is_root": true}, - false, - }, -} - -// Sample data from http://tools.ietf.org/html/draft-jones-json-web-signature-04#appendix-A.1 -var hmacTestKey, _ = ioutil.ReadFile("test/hmacTestKey") - -func TestHMACVerify(t *testing.T) { - for _, data := range hmacTestData { - parts := strings.Split(data.tokenString, ".") - - method := jwt.GetSigningMethod(data.alg) - err := method.Verify(strings.Join(parts[0:2], "."), parts[2], hmacTestKey) - if data.valid && err != nil { - t.Errorf("[%v] Error while verifying key: %v", data.name, err) - } - if !data.valid && err == nil { - t.Errorf("[%v] Invalid key passed validation", data.name) - } - } -} - -func TestHMACSign(t *testing.T) { - for _, data := range hmacTestData { - if data.valid { - parts := strings.Split(data.tokenString, ".") - method := jwt.GetSigningMethod(data.alg) - sig, err := method.Sign(strings.Join(parts[0:2], "."), hmacTestKey) - if err != nil { - t.Errorf("[%v] Error signing token: %v", data.name, err) - } - if sig != parts[2] { - t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", data.name, sig, parts[2]) - } - } - } -} - -func BenchmarkHS256Signing(b *testing.B) { - benchmarkSigning(b, jwt.SigningMethodHS256, hmacTestKey) -} - -func BenchmarkHS384Signing(b *testing.B) { - benchmarkSigning(b, jwt.SigningMethodHS384, hmacTestKey) -} - -func BenchmarkHS512Signing(b *testing.B) { - benchmarkSigning(b, jwt.SigningMethodHS512, hmacTestKey) -} diff --git a/vendor/github.com/dgrijalva/jwt-go/http_example_test.go b/vendor/github.com/dgrijalva/jwt-go/http_example_test.go deleted file mode 100644 index 82e9c50a4..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/http_example_test.go +++ /dev/null @@ -1,216 +0,0 @@ -package jwt_test - -// Example HTTP auth using asymmetric crypto/RSA keys -// This is based on a (now outdated) example at https://gist.github.com/cryptix/45c33ecf0ae54828e63b - -import ( - "bytes" - "crypto/rsa" - "fmt" - "github.com/dgrijalva/jwt-go" - "github.com/dgrijalva/jwt-go/request" - "io" - "io/ioutil" - "log" - "net" - "net/http" - "net/url" - "strings" - "time" -) - -// location of the files used for signing and verification -const ( - privKeyPath = "test/sample_key" // openssl genrsa -out app.rsa keysize - pubKeyPath = "test/sample_key.pub" // openssl rsa -in app.rsa -pubout > app.rsa.pub -) - -var ( - verifyKey *rsa.PublicKey - signKey *rsa.PrivateKey - serverPort int - // storing sample username/password pairs - // don't do this on a real server - users = map[string]string{ - "test": "known", - } -) - -// read the key files before starting http handlers -func init() { - signBytes, err := ioutil.ReadFile(privKeyPath) - fatal(err) - - signKey, err = jwt.ParseRSAPrivateKeyFromPEM(signBytes) - fatal(err) - - verifyBytes, err := ioutil.ReadFile(pubKeyPath) - fatal(err) - - verifyKey, err = jwt.ParseRSAPublicKeyFromPEM(verifyBytes) - fatal(err) - - http.HandleFunc("/authenticate", authHandler) - http.HandleFunc("/restricted", restrictedHandler) - - // Setup listener - listener, err := net.ListenTCP("tcp", &net.TCPAddr{}) - serverPort = listener.Addr().(*net.TCPAddr).Port - - log.Println("Listening...") - go func() { - fatal(http.Serve(listener, nil)) - }() -} - -var start func() - -func fatal(err error) { - if err != nil { - log.Fatal(err) - } -} - -// Define some custom types were going to use within our tokens -type CustomerInfo struct { - Name string - Kind string -} - -type CustomClaimsExample struct { - *jwt.StandardClaims - TokenType string - CustomerInfo -} - -func Example_getTokenViaHTTP() { - // See func authHandler for an example auth handler that produces a token - res, err := http.PostForm(fmt.Sprintf("http://localhost:%v/authenticate", serverPort), url.Values{ - "user": {"test"}, - "pass": {"known"}, - }) - if err != nil { - fatal(err) - } - - if res.StatusCode != 200 { - fmt.Println("Unexpected status code", res.StatusCode) - } - - // Read the token out of the response body - buf := new(bytes.Buffer) - io.Copy(buf, res.Body) - res.Body.Close() - tokenString := strings.TrimSpace(buf.String()) - - // Parse the token - token, err := jwt.ParseWithClaims(tokenString, &CustomClaimsExample{}, func(token *jwt.Token) (interface{}, error) { - // since we only use the one private key to sign the tokens, - // we also only use its public counter part to verify - return verifyKey, nil - }) - fatal(err) - - claims := token.Claims.(*CustomClaimsExample) - fmt.Println(claims.CustomerInfo.Name) - - //Output: test -} - -func Example_useTokenViaHTTP() { - - // Make a sample token - // In a real world situation, this token will have been acquired from - // some other API call (see Example_getTokenViaHTTP) - token, err := createToken("foo") - fatal(err) - - // Make request. See func restrictedHandler for example request processor - req, err := http.NewRequest("GET", fmt.Sprintf("http://localhost:%v/restricted", serverPort), nil) - fatal(err) - req.Header.Set("Authorization", fmt.Sprintf("Bearer %v", token)) - res, err := http.DefaultClient.Do(req) - fatal(err) - - // Read the response body - buf := new(bytes.Buffer) - io.Copy(buf, res.Body) - res.Body.Close() - fmt.Println(buf.String()) - - // Output: Welcome, foo -} - -func createToken(user string) (string, error) { - // create a signer for rsa 256 - t := jwt.New(jwt.GetSigningMethod("RS256")) - - // set our claims - t.Claims = &CustomClaimsExample{ - &jwt.StandardClaims{ - // set the expire time - // see http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-20#section-4.1.4 - ExpiresAt: time.Now().Add(time.Minute * 1).Unix(), - }, - "level1", - CustomerInfo{user, "human"}, - } - - // Creat token string - return t.SignedString(signKey) -} - -// reads the form values, checks them and creates the token -func authHandler(w http.ResponseWriter, r *http.Request) { - // make sure its post - if r.Method != "POST" { - w.WriteHeader(http.StatusBadRequest) - fmt.Fprintln(w, "No POST", r.Method) - return - } - - user := r.FormValue("user") - pass := r.FormValue("pass") - - log.Printf("Authenticate: user[%s] pass[%s]\n", user, pass) - - // check values - if user != "test" || pass != "known" { - w.WriteHeader(http.StatusForbidden) - fmt.Fprintln(w, "Wrong info") - return - } - - tokenString, err := createToken(user) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - fmt.Fprintln(w, "Sorry, error while Signing Token!") - log.Printf("Token Signing error: %v\n", err) - return - } - - w.Header().Set("Content-Type", "application/jwt") - w.WriteHeader(http.StatusOK) - fmt.Fprintln(w, tokenString) -} - -// only accessible with a valid token -func restrictedHandler(w http.ResponseWriter, r *http.Request) { - // Get token from request - token, err := request.ParseFromRequestWithClaims(r, request.OAuth2Extractor, &CustomClaimsExample{}, func(token *jwt.Token) (interface{}, error) { - // since we only use the one private key to sign the tokens, - // we also only use its public counter part to verify - return verifyKey, nil - }) - - // If the token is missing or invalid, return error - if err != nil { - w.WriteHeader(http.StatusUnauthorized) - fmt.Fprintln(w, "Invalid token:", err) - return - } - - // Token is valid - fmt.Fprintln(w, "Welcome,", token.Claims.(*CustomClaimsExample).Name) - return -} diff --git a/vendor/github.com/dgrijalva/jwt-go/none_test.go b/vendor/github.com/dgrijalva/jwt-go/none_test.go deleted file mode 100644 index 29a69efef..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/none_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package jwt_test - -import ( - "github.com/dgrijalva/jwt-go" - "strings" - "testing" -) - -var noneTestData = []struct { - name string - tokenString string - alg string - key interface{} - claims map[string]interface{} - valid bool -}{ - { - "Basic", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.", - "none", - jwt.UnsafeAllowNoneSignatureType, - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic - no key", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.", - "none", - nil, - map[string]interface{}{"foo": "bar"}, - false, - }, - { - "Signed", - "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.W-jEzRfBigtCWsinvVVuldiuilzVdU5ty0MvpLaSaqK9PlAWWlDQ1VIQ_qSKzwL5IXaZkvZFJXT3yL3n7OUVu7zCNJzdwznbC8Z-b0z2lYvcklJYi2VOFRcGbJtXUqgjk2oGsiqUMUMOLP70TTefkpsgqDxbRh9CDUfpOJgW-dU7cmgaoswe3wjUAUi6B6G2YEaiuXC0XScQYSYVKIzgKXJV8Zw-7AN_DBUI4GkTpsvQ9fVVjZM9csQiEXhYekyrKu1nu_POpQonGd8yqkIyXPECNmmqH5jH4sFiF67XhD7_JpkvLziBpI-uh86evBUadmHhb9Otqw3uV3NTaXLzJw", - "none", - jwt.UnsafeAllowNoneSignatureType, - map[string]interface{}{"foo": "bar"}, - false, - }, -} - -func TestNoneVerify(t *testing.T) { - for _, data := range noneTestData { - parts := strings.Split(data.tokenString, ".") - - method := jwt.GetSigningMethod(data.alg) - err := method.Verify(strings.Join(parts[0:2], "."), parts[2], data.key) - if data.valid && err != nil { - t.Errorf("[%v] Error while verifying key: %v", data.name, err) - } - if !data.valid && err == nil { - t.Errorf("[%v] Invalid key passed validation", data.name) - } - } -} - -func TestNoneSign(t *testing.T) { - for _, data := range noneTestData { - if data.valid { - parts := strings.Split(data.tokenString, ".") - method := jwt.GetSigningMethod(data.alg) - sig, err := method.Sign(strings.Join(parts[0:2], "."), data.key) - if err != nil { - t.Errorf("[%v] Error signing token: %v", data.name, err) - } - if sig != parts[2] { - t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", data.name, sig, parts[2]) - } - } - } -} diff --git a/vendor/github.com/dgrijalva/jwt-go/parser.go b/vendor/github.com/dgrijalva/jwt-go/parser.go index 7020c52a1..d6901d9ad 100644 --- a/vendor/github.com/dgrijalva/jwt-go/parser.go +++ b/vendor/github.com/dgrijalva/jwt-go/parser.go @@ -8,8 +8,9 @@ import ( ) type Parser struct { - ValidMethods []string // If populated, only these methods will be considered valid - UseJSONNumber bool // Use JSON Number format in JSON decoder + ValidMethods []string // If populated, only these methods will be considered valid + UseJSONNumber bool // Use JSON Number format in JSON decoder + SkipClaimsValidation bool // Skip claims validation during token parsing } // Parse, validate, and return a token. @@ -20,55 +21,9 @@ func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { } func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) { - parts := strings.Split(tokenString, ".") - if len(parts) != 3 { - return nil, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) - } - - var err error - token := &Token{Raw: tokenString} - - // parse Header - var headerBytes []byte - if headerBytes, err = DecodeSegment(parts[0]); err != nil { - if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { - return token, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) - } - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - if err = json.Unmarshal(headerBytes, &token.Header); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // parse Claims - var claimBytes []byte - token.Claims = claims - - if claimBytes, err = DecodeSegment(parts[1]); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) - if p.UseJSONNumber { - dec.UseNumber() - } - // JSON Decode. Special case for map type to avoid weird pointer behavior - if c, ok := token.Claims.(MapClaims); ok { - err = dec.Decode(&c) - } else { - err = dec.Decode(&claims) - } - // Handle decode error + token, parts, err := p.ParseUnverified(tokenString, claims) if err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // Lookup signature method - if method, ok := token.Header["alg"].(string); ok { - if token.Method = GetSigningMethod(method); token.Method == nil { - return token, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) - } - } else { - return token, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) + return token, err } // Verify signing method is in the required set @@ -95,20 +50,25 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf } if key, err = keyFunc(token); err != nil { // keyFunc returned an error + if ve, ok := err.(*ValidationError); ok { + return token, ve + } return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable} } vErr := &ValidationError{} // Validate Claims - if err := token.Claims.Valid(); err != nil { - - // If the Claims Valid returned an error, check if it is a validation error, - // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set - if e, ok := err.(*ValidationError); !ok { - vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} - } else { - vErr = e + if !p.SkipClaimsValidation { + if err := token.Claims.Valid(); err != nil { + + // If the Claims Valid returned an error, check if it is a validation error, + // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set + if e, ok := err.(*ValidationError); !ok { + vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} + } else { + vErr = e + } } } @@ -126,3 +86,63 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf return token, vErr } + +// WARNING: Don't use this method unless you know what you're doing +// +// This method parses the token but doesn't validate the signature. It's only +// ever useful in cases where you know the signature is valid (because it has +// been checked previously in the stack) and you want to extract values from +// it. +func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) { + parts = strings.Split(tokenString, ".") + if len(parts) != 3 { + return nil, parts, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) + } + + token = &Token{Raw: tokenString} + + // parse Header + var headerBytes []byte + if headerBytes, err = DecodeSegment(parts[0]); err != nil { + if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { + return token, parts, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) + } + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + if err = json.Unmarshal(headerBytes, &token.Header); err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + + // parse Claims + var claimBytes []byte + token.Claims = claims + + if claimBytes, err = DecodeSegment(parts[1]); err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) + if p.UseJSONNumber { + dec.UseNumber() + } + // JSON Decode. Special case for map type to avoid weird pointer behavior + if c, ok := token.Claims.(MapClaims); ok { + err = dec.Decode(&c) + } else { + err = dec.Decode(&claims) + } + // Handle decode error + if err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + + // Lookup signature method + if method, ok := token.Header["alg"].(string); ok { + if token.Method = GetSigningMethod(method); token.Method == nil { + return token, parts, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) + } + } else { + return token, parts, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) + } + + return token, parts, nil +} diff --git a/vendor/github.com/dgrijalva/jwt-go/parser_test.go b/vendor/github.com/dgrijalva/jwt-go/parser_test.go deleted file mode 100644 index 0c86801b9..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/parser_test.go +++ /dev/null @@ -1,252 +0,0 @@ -package jwt_test - -import ( - "crypto/rsa" - "encoding/json" - "fmt" - "reflect" - "testing" - "time" - - "github.com/dgrijalva/jwt-go" - "github.com/dgrijalva/jwt-go/test" -) - -var keyFuncError error = fmt.Errorf("error loading key") - -var ( - jwtTestDefaultKey *rsa.PublicKey - defaultKeyFunc jwt.Keyfunc = func(t *jwt.Token) (interface{}, error) { return jwtTestDefaultKey, nil } - emptyKeyFunc jwt.Keyfunc = func(t *jwt.Token) (interface{}, error) { return nil, nil } - errorKeyFunc jwt.Keyfunc = func(t *jwt.Token) (interface{}, error) { return nil, keyFuncError } - nilKeyFunc jwt.Keyfunc = nil -) - -func init() { - jwtTestDefaultKey = test.LoadRSAPublicKeyFromDisk("test/sample_key.pub") -} - -var jwtTestData = []struct { - name string - tokenString string - keyfunc jwt.Keyfunc - claims jwt.Claims - valid bool - errors uint32 - parser *jwt.Parser -}{ - { - "basic", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - defaultKeyFunc, - jwt.MapClaims{"foo": "bar"}, - true, - 0, - nil, - }, - { - "basic expired", - "", // autogen - defaultKeyFunc, - jwt.MapClaims{"foo": "bar", "exp": float64(time.Now().Unix() - 100)}, - false, - jwt.ValidationErrorExpired, - nil, - }, - { - "basic nbf", - "", // autogen - defaultKeyFunc, - jwt.MapClaims{"foo": "bar", "nbf": float64(time.Now().Unix() + 100)}, - false, - jwt.ValidationErrorNotValidYet, - nil, - }, - { - "expired and nbf", - "", // autogen - defaultKeyFunc, - jwt.MapClaims{"foo": "bar", "nbf": float64(time.Now().Unix() + 100), "exp": float64(time.Now().Unix() - 100)}, - false, - jwt.ValidationErrorNotValidYet | jwt.ValidationErrorExpired, - nil, - }, - { - "basic invalid", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.EhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - defaultKeyFunc, - jwt.MapClaims{"foo": "bar"}, - false, - jwt.ValidationErrorSignatureInvalid, - nil, - }, - { - "basic nokeyfunc", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - nilKeyFunc, - jwt.MapClaims{"foo": "bar"}, - false, - jwt.ValidationErrorUnverifiable, - nil, - }, - { - "basic nokey", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - emptyKeyFunc, - jwt.MapClaims{"foo": "bar"}, - false, - jwt.ValidationErrorSignatureInvalid, - nil, - }, - { - "basic errorkey", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - errorKeyFunc, - jwt.MapClaims{"foo": "bar"}, - false, - jwt.ValidationErrorUnverifiable, - nil, - }, - { - "invalid signing method", - "", - defaultKeyFunc, - jwt.MapClaims{"foo": "bar"}, - false, - jwt.ValidationErrorSignatureInvalid, - &jwt.Parser{ValidMethods: []string{"HS256"}}, - }, - { - "valid signing method", - "", - defaultKeyFunc, - jwt.MapClaims{"foo": "bar"}, - true, - 0, - &jwt.Parser{ValidMethods: []string{"RS256", "HS256"}}, - }, - { - "JSON Number", - "", - defaultKeyFunc, - jwt.MapClaims{"foo": json.Number("123.4")}, - true, - 0, - &jwt.Parser{UseJSONNumber: true}, - }, - { - "Standard Claims", - "", - defaultKeyFunc, - &jwt.StandardClaims{ - ExpiresAt: time.Now().Add(time.Second * 10).Unix(), - }, - true, - 0, - &jwt.Parser{UseJSONNumber: true}, - }, - { - "JSON Number - basic expired", - "", // autogen - defaultKeyFunc, - jwt.MapClaims{"foo": "bar", "exp": json.Number(fmt.Sprintf("%v", time.Now().Unix()-100))}, - false, - jwt.ValidationErrorExpired, - &jwt.Parser{UseJSONNumber: true}, - }, - { - "JSON Number - basic nbf", - "", // autogen - defaultKeyFunc, - jwt.MapClaims{"foo": "bar", "nbf": json.Number(fmt.Sprintf("%v", time.Now().Unix()+100))}, - false, - jwt.ValidationErrorNotValidYet, - &jwt.Parser{UseJSONNumber: true}, - }, - { - "JSON Number - expired and nbf", - "", // autogen - defaultKeyFunc, - jwt.MapClaims{"foo": "bar", "nbf": json.Number(fmt.Sprintf("%v", time.Now().Unix()+100)), "exp": json.Number(fmt.Sprintf("%v", time.Now().Unix()-100))}, - false, - jwt.ValidationErrorNotValidYet | jwt.ValidationErrorExpired, - &jwt.Parser{UseJSONNumber: true}, - }, -} - -func TestParser_Parse(t *testing.T) { - privateKey := test.LoadRSAPrivateKeyFromDisk("test/sample_key") - - // Iterate over test data set and run tests - for _, data := range jwtTestData { - // If the token string is blank, use helper function to generate string - if data.tokenString == "" { - data.tokenString = test.MakeSampleToken(data.claims, privateKey) - } - - // Parse the token - var token *jwt.Token - var err error - var parser = data.parser - if parser == nil { - parser = new(jwt.Parser) - } - // Figure out correct claims type - switch data.claims.(type) { - case jwt.MapClaims: - token, err = parser.ParseWithClaims(data.tokenString, jwt.MapClaims{}, data.keyfunc) - case *jwt.StandardClaims: - token, err = parser.ParseWithClaims(data.tokenString, &jwt.StandardClaims{}, data.keyfunc) - } - - // Verify result matches expectation - if !reflect.DeepEqual(data.claims, token.Claims) { - t.Errorf("[%v] Claims mismatch. Expecting: %v Got: %v", data.name, data.claims, token.Claims) - } - - if data.valid && err != nil { - t.Errorf("[%v] Error while verifying token: %T:%v", data.name, err, err) - } - - if !data.valid && err == nil { - t.Errorf("[%v] Invalid token passed validation", data.name) - } - - if (err == nil && !token.Valid) || (err != nil && token.Valid) { - t.Errorf("[%v] Inconsistent behavior between returned error and token.Valid") - } - - if data.errors != 0 { - if err == nil { - t.Errorf("[%v] Expecting error. Didn't get one.", data.name) - } else { - - ve := err.(*jwt.ValidationError) - // compare the bitfield part of the error - if e := ve.Errors; e != data.errors { - t.Errorf("[%v] Errors don't match expectation. %v != %v", data.name, e, data.errors) - } - - if err.Error() == keyFuncError.Error() && ve.Inner != keyFuncError { - t.Errorf("[%v] Inner error does not match expectation. %v != %v", data.name, ve.Inner, keyFuncError) - } - } - } - if data.valid && token.Signature == "" { - t.Errorf("[%v] Signature is left unpopulated after parsing", data.name) - } - } -} - -// Helper method for benchmarking various methods -func benchmarkSigning(b *testing.B, method jwt.SigningMethod, key interface{}) { - t := jwt.New(method) - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - if _, err := t.SignedString(key); err != nil { - b.Fatal(err) - } - } - }) - -} diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa.go b/vendor/github.com/dgrijalva/jwt-go/rsa.go index 0ae0b1984..e4caf1ca4 100644 --- a/vendor/github.com/dgrijalva/jwt-go/rsa.go +++ b/vendor/github.com/dgrijalva/jwt-go/rsa.go @@ -7,6 +7,7 @@ import ( ) // Implements the RSA family of signing methods signing methods +// Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation type SigningMethodRSA struct { Name string Hash crypto.Hash @@ -44,7 +45,7 @@ func (m *SigningMethodRSA) Alg() string { } // Implements the Verify method from SigningMethod -// For this signing method, must be an rsa.PublicKey structure. +// For this signing method, must be an *rsa.PublicKey structure. func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error { var err error @@ -73,7 +74,7 @@ func (m *SigningMethodRSA) Verify(signingString, signature string, key interface } // Implements the Sign method from SigningMethod -// For this signing method, must be an rsa.PrivateKey structure. +// For this signing method, must be an *rsa.PrivateKey structure. func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) { var rsaKey *rsa.PrivateKey var ok bool diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go b/vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go deleted file mode 100644 index 9045aaf34..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/rsa_pss_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// +build go1.4 - -package jwt_test - -import ( - "crypto/rsa" - "io/ioutil" - "strings" - "testing" - - "github.com/dgrijalva/jwt-go" -) - -var rsaPSSTestData = []struct { - name string - tokenString string - alg string - claims map[string]interface{} - valid bool -}{ - { - "Basic PS256", - "eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.PPG4xyDVY8ffp4CcxofNmsTDXsrVG2npdQuibLhJbv4ClyPTUtR5giNSvuxo03kB6I8VXVr0Y9X7UxhJVEoJOmULAwRWaUsDnIewQa101cVhMa6iR8X37kfFoiZ6NkS-c7henVkkQWu2HtotkEtQvN5hFlk8IevXXPmvZlhQhwzB1sGzGYnoi1zOfuL98d3BIjUjtlwii5w6gYG2AEEzp7HnHCsb3jIwUPdq86Oe6hIFjtBwduIK90ca4UqzARpcfwxHwVLMpatKask00AgGVI0ysdk0BLMjmLutquD03XbThHScC2C2_Pp4cHWgMzvbgLU2RYYZcZRKr46QeNgz9w", - "PS256", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic PS384", - "eyJhbGciOiJQUzM4NCIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.w7-qqgj97gK4fJsq_DCqdYQiylJjzWONvD0qWWWhqEOFk2P1eDULPnqHRnjgTXoO4HAw4YIWCsZPet7nR3Xxq4ZhMqvKW8b7KlfRTb9cH8zqFvzMmybQ4jv2hKc3bXYqVow3AoR7hN_CWXI3Dv6Kd2X5xhtxRHI6IL39oTVDUQ74LACe-9t4c3QRPuj6Pq1H4FAT2E2kW_0KOc6EQhCLWEhm2Z2__OZskDC8AiPpP8Kv4k2vB7l0IKQu8Pr4RcNBlqJdq8dA5D3hk5TLxP8V5nG1Ib80MOMMqoS3FQvSLyolFX-R_jZ3-zfq6Ebsqr0yEb0AH2CfsECF7935Pa0FKQ", - "PS384", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic PS512", - "eyJhbGciOiJQUzUxMiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.GX1HWGzFaJevuSLavqqFYaW8_TpvcjQ8KfC5fXiSDzSiT9UD9nB_ikSmDNyDILNdtjZLSvVKfXxZJqCfefxAtiozEDDdJthZ-F0uO4SPFHlGiXszvKeodh7BuTWRI2wL9-ZO4mFa8nq3GMeQAfo9cx11i7nfN8n2YNQ9SHGovG7_T_AvaMZB_jT6jkDHpwGR9mz7x1sycckEo6teLdHRnH_ZdlHlxqknmyTu8Odr5Xh0sJFOL8BepWbbvIIn-P161rRHHiDWFv6nhlHwZnVzjx7HQrWSGb6-s2cdLie9QL_8XaMcUpjLkfOMKkDOfHo6AvpL7Jbwi83Z2ZTHjJWB-A", - "PS512", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "basic PS256 invalid: foo => bar", - "eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.PPG4xyDVY8ffp4CcxofNmsTDXsrVG2npdQuibLhJbv4ClyPTUtR5giNSvuxo03kB6I8VXVr0Y9X7UxhJVEoJOmULAwRWaUsDnIewQa101cVhMa6iR8X37kfFoiZ6NkS-c7henVkkQWu2HtotkEtQvN5hFlk8IevXXPmvZlhQhwzB1sGzGYnoi1zOfuL98d3BIjUjtlwii5w6gYG2AEEzp7HnHCsb3jIwUPdq86Oe6hIFjtBwduIK90ca4UqzARpcfwxHwVLMpatKask00AgGVI0ysdk0BLMjmLutquD03XbThHScC2C2_Pp4cHWgMzvbgLU2RYYZcZRKr46QeNgz9W", - "PS256", - map[string]interface{}{"foo": "bar"}, - false, - }, -} - -func TestRSAPSSVerify(t *testing.T) { - var err error - - key, _ := ioutil.ReadFile("test/sample_key.pub") - var rsaPSSKey *rsa.PublicKey - if rsaPSSKey, err = jwt.ParseRSAPublicKeyFromPEM(key); err != nil { - t.Errorf("Unable to parse RSA public key: %v", err) - } - - for _, data := range rsaPSSTestData { - parts := strings.Split(data.tokenString, ".") - - method := jwt.GetSigningMethod(data.alg) - err := method.Verify(strings.Join(parts[0:2], "."), parts[2], rsaPSSKey) - if data.valid && err != nil { - t.Errorf("[%v] Error while verifying key: %v", data.name, err) - } - if !data.valid && err == nil { - t.Errorf("[%v] Invalid key passed validation", data.name) - } - } -} - -func TestRSAPSSSign(t *testing.T) { - var err error - - key, _ := ioutil.ReadFile("test/sample_key") - var rsaPSSKey *rsa.PrivateKey - if rsaPSSKey, err = jwt.ParseRSAPrivateKeyFromPEM(key); err != nil { - t.Errorf("Unable to parse RSA private key: %v", err) - } - - for _, data := range rsaPSSTestData { - if data.valid { - parts := strings.Split(data.tokenString, ".") - method := jwt.GetSigningMethod(data.alg) - sig, err := method.Sign(strings.Join(parts[0:2], "."), rsaPSSKey) - if err != nil { - t.Errorf("[%v] Error signing token: %v", data.name, err) - } - if sig == parts[2] { - t.Errorf("[%v] Signatures shouldn't match\nnew:\n%v\noriginal:\n%v", data.name, sig, parts[2]) - } - } - } -} diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_test.go b/vendor/github.com/dgrijalva/jwt-go/rsa_test.go deleted file mode 100644 index 2e0f78536..000000000 --- a/vendor/github.com/dgrijalva/jwt-go/rsa_test.go +++ /dev/null @@ -1,176 +0,0 @@ -package jwt_test - -import ( - "github.com/dgrijalva/jwt-go" - "io/ioutil" - "strings" - "testing" -) - -var rsaTestData = []struct { - name string - tokenString string - alg string - claims map[string]interface{} - valid bool -}{ - { - "Basic RS256", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.FhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - "RS256", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic RS384", - "eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.W-jEzRfBigtCWsinvVVuldiuilzVdU5ty0MvpLaSaqK9PlAWWlDQ1VIQ_qSKzwL5IXaZkvZFJXT3yL3n7OUVu7zCNJzdwznbC8Z-b0z2lYvcklJYi2VOFRcGbJtXUqgjk2oGsiqUMUMOLP70TTefkpsgqDxbRh9CDUfpOJgW-dU7cmgaoswe3wjUAUi6B6G2YEaiuXC0XScQYSYVKIzgKXJV8Zw-7AN_DBUI4GkTpsvQ9fVVjZM9csQiEXhYekyrKu1nu_POpQonGd8yqkIyXPECNmmqH5jH4sFiF67XhD7_JpkvLziBpI-uh86evBUadmHhb9Otqw3uV3NTaXLzJw", - "RS384", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "Basic RS512", - "eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIifQ.zBlLlmRrUxx4SJPUbV37Q1joRcI9EW13grnKduK3wtYKmDXbgDpF1cZ6B-2Jsm5RB8REmMiLpGms-EjXhgnyh2TSHE-9W2gA_jvshegLWtwRVDX40ODSkTb7OVuaWgiy9y7llvcknFBTIg-FnVPVpXMmeV_pvwQyhaz1SSwSPrDyxEmksz1hq7YONXhXPpGaNbMMeDTNP_1oj8DZaqTIL9TwV8_1wb2Odt_Fy58Ke2RVFijsOLdnyEAjt2n9Mxihu9i3PhNBkkxa2GbnXBfq3kzvZ_xxGGopLdHhJjcGWXO-NiwI9_tiu14NRv4L2xC0ItD9Yz68v2ZIZEp_DuzwRQ", - "RS512", - map[string]interface{}{"foo": "bar"}, - true, - }, - { - "basic invalid: foo => bar", - "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJmb28iOiJiYXIifQ.EhkiHkoESI_cG3NPigFrxEk9Z60_oXrOT2vGm9Pn6RDgYNovYORQmmA0zs1AoAOf09ly2Nx2YAg6ABqAYga1AcMFkJljwxTT5fYphTuqpWdy4BELeSYJx5Ty2gmr8e7RonuUztrdD5WfPqLKMm1Ozp_T6zALpRmwTIW0QPnaBXaQD90FplAg46Iy1UlDKr-Eupy0i5SLch5Q-p2ZpaL_5fnTIUDlxC3pWhJTyx_71qDI-mAA_5lE_VdroOeflG56sSmDxopPEG3bFlSu1eowyBfxtu0_CuVd-M42RU75Zc4Gsj6uV77MBtbMrf4_7M_NUTSgoIF3fRqxrj0NzihIBg", - "RS256", - map[string]interface{}{"foo": "bar"}, - false, - }, -} - -func TestRSAVerify(t *testing.T) { - keyData, _ := ioutil.ReadFile("test/sample_key.pub") - key, _ := jwt.ParseRSAPublicKeyFromPEM(keyData) - - for _, data := range rsaTestData { - parts := strings.Split(data.tokenString, ".") - - method := jwt.GetSigningMethod(data.alg) - err := method.Verify(strings.Join(parts[0:2], "."), parts[2], key) - if data.valid && err != nil { - t.Errorf("[%v] Error while verifying key: %v", data.name, err) - } - if !data.valid && err == nil { - t.Errorf("[%v] Invalid key passed validation", data.name) - } - } -} - -func TestRSASign(t *testing.T) { - keyData, _ := ioutil.ReadFile("test/sample_key") - key, _ := jwt.ParseRSAPrivateKeyFromPEM(keyData) - - for _, data := range rsaTestData { - if data.valid { - parts := strings.Split(data.tokenString, ".") - method := jwt.GetSigningMethod(data.alg) - sig, err := method.Sign(strings.Join(parts[0:2], "."), key) - if err != nil { - t.Errorf("[%v] Error signing token: %v", data.name, err) - } - if sig != parts[2] { - t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", data.name, sig, parts[2]) - } - } - } -} - -func TestRSAVerifyWithPreParsedPrivateKey(t *testing.T) { - key, _ := ioutil.ReadFile("test/sample_key.pub") - parsedKey, err := jwt.ParseRSAPublicKeyFromPEM(key) - if err != nil { - t.Fatal(err) - } - testData := rsaTestData[0] - parts := strings.Split(testData.tokenString, ".") - err = jwt.SigningMethodRS256.Verify(strings.Join(parts[0:2], "."), parts[2], parsedKey) - if err != nil { - t.Errorf("[%v] Error while verifying key: %v", testData.name, err) - } -} - -func TestRSAWithPreParsedPrivateKey(t *testing.T) { - key, _ := ioutil.ReadFile("test/sample_key") - parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) - if err != nil { - t.Fatal(err) - } - testData := rsaTestData[0] - parts := strings.Split(testData.tokenString, ".") - sig, err := jwt.SigningMethodRS256.Sign(strings.Join(parts[0:2], "."), parsedKey) - if err != nil { - t.Errorf("[%v] Error signing token: %v", testData.name, err) - } - if sig != parts[2] { - t.Errorf("[%v] Incorrect signature.\nwas:\n%v\nexpecting:\n%v", testData.name, sig, parts[2]) - } -} - -func TestRSAKeyParsing(t *testing.T) { - key, _ := ioutil.ReadFile("test/sample_key") - pubKey, _ := ioutil.ReadFile("test/sample_key.pub") - badKey := []byte("All your base are belong to key") - - // Test parsePrivateKey - if _, e := jwt.ParseRSAPrivateKeyFromPEM(key); e != nil { - t.Errorf("Failed to parse valid private key: %v", e) - } - - if k, e := jwt.ParseRSAPrivateKeyFromPEM(pubKey); e == nil { - t.Errorf("Parsed public key as valid private key: %v", k) - } - - if k, e := jwt.ParseRSAPrivateKeyFromPEM(badKey); e == nil { - t.Errorf("Parsed invalid key as valid private key: %v", k) - } - - // Test parsePublicKey - if _, e := jwt.ParseRSAPublicKeyFromPEM(pubKey); e != nil { - t.Errorf("Failed to parse valid public key: %v", e) - } - - if k, e := jwt.ParseRSAPublicKeyFromPEM(key); e == nil { - t.Errorf("Parsed private key as valid public key: %v", k) - } - - if k, e := jwt.ParseRSAPublicKeyFromPEM(badKey); e == nil { - t.Errorf("Parsed invalid key as valid private key: %v", k) - } - -} - -func BenchmarkRS256Signing(b *testing.B) { - key, _ := ioutil.ReadFile("test/sample_key") - parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) - if err != nil { - b.Fatal(err) - } - - benchmarkSigning(b, jwt.SigningMethodRS256, parsedKey) -} - -func BenchmarkRS384Signing(b *testing.B) { - key, _ := ioutil.ReadFile("test/sample_key") - parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) - if err != nil { - b.Fatal(err) - } - - benchmarkSigning(b, jwt.SigningMethodRS384, parsedKey) -} - -func BenchmarkRS512Signing(b *testing.B) { - key, _ := ioutil.ReadFile("test/sample_key") - parsedKey, err := jwt.ParseRSAPrivateKeyFromPEM(key) - if err != nil { - b.Fatal(err) - } - - benchmarkSigning(b, jwt.SigningMethodRS512, parsedKey) -} diff --git a/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go b/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go index 213a90dbb..a5ababf95 100644 --- a/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go +++ b/vendor/github.com/dgrijalva/jwt-go/rsa_utils.go @@ -39,6 +39,38 @@ func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) { return pkey, nil } +// Parse PEM encoded PKCS1 or PKCS8 private key protected with password +func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.PrivateKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + var parsedKey interface{} + + var blockDecrypted []byte + if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil { + return nil, err + } + + if parsedKey, err = x509.ParsePKCS1PrivateKey(blockDecrypted); err != nil { + if parsedKey, err = x509.ParsePKCS8PrivateKey(blockDecrypted); err != nil { + return nil, err + } + } + + var pkey *rsa.PrivateKey + var ok bool + if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { + return nil, ErrNotRSAPrivateKey + } + + return pkey, nil +} + // Parse PEM encoded PKCS1 or PKCS8 public key func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) { var err error diff --git a/vendor/github.com/fsnotify/fsnotify/.editorconfig b/vendor/github.com/fsnotify/fsnotify/.editorconfig deleted file mode 100644 index ba49e3c23..000000000 --- a/vendor/github.com/fsnotify/fsnotify/.editorconfig +++ /dev/null @@ -1,5 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore deleted file mode 100644 index 4cd0cbaf4..000000000 --- a/vendor/github.com/fsnotify/fsnotify/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Setup a Global .gitignore for OS and editor generated files: -# https://help.github.com/articles/ignoring-files -# git config --global core.excludesfile ~/.gitignore_global - -.vagrant -*.sublime-project diff --git a/vendor/github.com/fsnotify/fsnotify/.travis.yml b/vendor/github.com/fsnotify/fsnotify/.travis.yml deleted file mode 100644 index 3a5c933bc..000000000 --- a/vendor/github.com/fsnotify/fsnotify/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -sudo: false -language: go - -go: - - 1.6.3 - - tip - -matrix: - allow_failures: - - go: tip - -before_script: - - go get -u github.com/golang/lint/golint - -script: - - go test -v --race ./... - -after_script: - - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" - - test -z "$(golint ./... | tee /dev/stderr)" - - go vet ./... - -os: - - linux - - osx - -notifications: - email: false diff --git a/vendor/github.com/fsnotify/fsnotify/AUTHORS b/vendor/github.com/fsnotify/fsnotify/AUTHORS deleted file mode 100644 index 0a5bf8f61..000000000 --- a/vendor/github.com/fsnotify/fsnotify/AUTHORS +++ /dev/null @@ -1,46 +0,0 @@ -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# You can update this list using the following command: -# -# $ git shortlog -se | awk '{print $2 " " $3 " " $4}' - -# Please keep the list sorted. - -Adrien Bustany -Amit Krishnan -Bjørn Erik Pedersen -Bruno Bigras -Caleb Spare -Case Nelson -Chris Howey -Christoffer Buchholz -Daniel Wagner-Hall -Dave Cheney -Evan Phoenix -Francisco Souza -Hari haran -John C Barstow -Kelvin Fo -Ken-ichirou MATSUZAWA -Matt Layher -Nathan Youngman -Patrick -Paul Hammond -Pawel Knap -Pieter Droogendijk -Pursuit92 -Riku Voipio -Rob Figueiredo -Slawek Ligus -Soge Zhang -Tiffany Jernigan -Tilak Sharma -Travis Cline -Tudor Golubenco -Yukang -bronze1man -debrando -henrikedwards -铁哥 diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md deleted file mode 100644 index 40d7660d5..000000000 --- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md +++ /dev/null @@ -1,307 +0,0 @@ -# Changelog - -## v1.4.2 / 2016-10-10 - -* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) - -## v1.4.1 / 2016-10-04 - -* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) - -## v1.4.0 / 2016-10-01 - -* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) - -## v1.3.1 / 2016-06-28 - -* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) - -## v1.3.0 / 2016-04-19 - -* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) - -## v1.2.10 / 2016-03-02 - -* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) - -## v1.2.9 / 2016-01-13 - -kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) - -## v1.2.8 / 2015-12-17 - -* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) -* inotify: fix race in test -* enable race detection for continuous integration (Linux, Mac, Windows) - -## v1.2.5 / 2015-10-17 - -* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) -* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) -* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) -* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) - -## v1.2.1 / 2015-10-14 - -* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) - -## v1.2.0 / 2015-02-08 - -* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) -* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) -* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) - -## v1.1.1 / 2015-02-05 - -* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) - -## v1.1.0 / 2014-12-12 - -* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) - * add low-level functions - * only need to store flags on directories - * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13) - * done can be an unbuffered channel - * remove calls to os.NewSyscallError -* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher) -* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) -* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) - -## v1.0.4 / 2014-09-07 - -* kqueue: add dragonfly to the build tags. -* Rename source code files, rearrange code so exported APIs are at the top. -* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) - -## v1.0.3 / 2014-08-19 - -* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) - -## v1.0.2 / 2014-08-17 - -* [Fix] Missing create events on OS X. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) -* [Fix] Make ./path and path equivalent. (thanks @zhsso) - -## v1.0.0 / 2014-08-15 - -* [API] Remove AddWatch on Windows, use Add. -* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) -* Minor updates based on feedback from golint. - -## dev / 2014-07-09 - -* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify). -* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno) - -## dev / 2014-07-04 - -* kqueue: fix incorrect mutex used in Close() -* Update example to demonstrate usage of Op. - -## dev / 2014-06-28 - -* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4) -* Fix for String() method on Event (thanks Alex Brainman) -* Don't build on Plan 9 or Solaris (thanks @4ad) - -## dev / 2014-06-21 - -* Events channel of type Event rather than *Event. -* [internal] use syscall constants directly for inotify and kqueue. -* [internal] kqueue: rename events to kevents and fileEvent to event. - -## dev / 2014-06-19 - -* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally). -* [internal] remove cookie from Event struct (unused). -* [internal] Event struct has the same definition across every OS. -* [internal] remove internal watch and removeWatch methods. - -## dev / 2014-06-12 - -* [API] Renamed Watch() to Add() and RemoveWatch() to Remove(). -* [API] Pluralized channel names: Events and Errors. -* [API] Renamed FileEvent struct to Event. -* [API] Op constants replace methods like IsCreate(). - -## dev / 2014-06-12 - -* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) - -## dev / 2014-05-23 - -* [API] Remove current implementation of WatchFlags. - * current implementation doesn't take advantage of OS for efficiency - * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes - * no tests for the current implementation - * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) - -## v0.9.3 / 2014-12-31 - -* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) - -## v0.9.2 / 2014-08-17 - -* [Backport] Fix missing create events on OS X. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) - -## v0.9.1 / 2014-06-12 - -* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) - -## v0.9.0 / 2014-01-17 - -* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) -* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) -* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. - -## v0.8.12 / 2013-11-13 - -* [API] Remove FD_SET and friends from Linux adapter - -## v0.8.11 / 2013-11-02 - -* [Doc] Add Changelog [#72][] (thanks @nathany) -* [Doc] Spotlight and double modify events on OS X [#62][] (reported by @paulhammond) - -## v0.8.10 / 2013-10-19 - -* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) -* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) -* [Doc] specify OS-specific limits in README (thanks @debrando) - -## v0.8.9 / 2013-09-08 - -* [Doc] Contributing (thanks @nathany) -* [Doc] update package path in example code [#63][] (thanks @paulhammond) -* [Doc] GoCI badge in README (Linux only) [#60][] -* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) - -## v0.8.8 / 2013-06-17 - -* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) - -## v0.8.7 / 2013-06-03 - -* [API] Make syscall flags internal -* [Fix] inotify: ignore event changes -* [Fix] race in symlink test [#45][] (reported by @srid) -* [Fix] tests on Windows -* lower case error messages - -## v0.8.6 / 2013-05-23 - -* kqueue: Use EVT_ONLY flag on Darwin -* [Doc] Update README with full example - -## v0.8.5 / 2013-05-09 - -* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) - -## v0.8.4 / 2013-04-07 - -* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) - -## v0.8.3 / 2013-03-13 - -* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) -* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) - -## v0.8.2 / 2013-02-07 - -* [Doc] add Authors -* [Fix] fix data races for map access [#29][] (thanks @fsouza) - -## v0.8.1 / 2013-01-09 - -* [Fix] Windows path separators -* [Doc] BSD License - -## v0.8.0 / 2012-11-09 - -* kqueue: directory watching improvements (thanks @vmirage) -* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) -* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) - -## v0.7.4 / 2012-10-09 - -* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) -* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) -* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) -* [Fix] kqueue: modify after recreation of file - -## v0.7.3 / 2012-09-27 - -* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) -* [Fix] kqueue: no longer get duplicate CREATE events - -## v0.7.2 / 2012-09-01 - -* kqueue: events for created directories - -## v0.7.1 / 2012-07-14 - -* [Fix] for renaming files - -## v0.7.0 / 2012-07-02 - -* [Feature] FSNotify flags -* [Fix] inotify: Added file name back to event path - -## v0.6.0 / 2012-06-06 - -* kqueue: watch files after directory created (thanks @tmc) - -## v0.5.1 / 2012-05-22 - -* [Fix] inotify: remove all watches before Close() - -## v0.5.0 / 2012-05-03 - -* [API] kqueue: return errors during watch instead of sending over channel -* kqueue: match symlink behavior on Linux -* inotify: add `DELETE_SELF` (requested by @taralx) -* [Fix] kqueue: handle EINTR (reported by @robfig) -* [Doc] Godoc example [#1][] (thanks @davecheney) - -## v0.4.0 / 2012-03-30 - -* Go 1 released: build with go tool -* [Feature] Windows support using winfsnotify -* Windows does not have attribute change notifications -* Roll attribute notifications into IsModify - -## v0.3.0 / 2012-02-19 - -* kqueue: add files when watch directory - -## v0.2.0 / 2011-12-30 - -* update to latest Go weekly code - -## v0.1.0 / 2011-10-19 - -* kqueue: add watch on file creation to match inotify -* kqueue: create file event -* inotify: ignore `IN_IGNORED` events -* event String() -* linux: common FileEvent functions -* initial commit - -[#79]: https://github.com/howeyc/fsnotify/pull/79 -[#77]: https://github.com/howeyc/fsnotify/pull/77 -[#72]: https://github.com/howeyc/fsnotify/issues/72 -[#71]: https://github.com/howeyc/fsnotify/issues/71 -[#70]: https://github.com/howeyc/fsnotify/issues/70 -[#63]: https://github.com/howeyc/fsnotify/issues/63 -[#62]: https://github.com/howeyc/fsnotify/issues/62 -[#60]: https://github.com/howeyc/fsnotify/issues/60 -[#59]: https://github.com/howeyc/fsnotify/issues/59 -[#49]: https://github.com/howeyc/fsnotify/issues/49 -[#45]: https://github.com/howeyc/fsnotify/issues/45 -[#40]: https://github.com/howeyc/fsnotify/issues/40 -[#36]: https://github.com/howeyc/fsnotify/issues/36 -[#33]: https://github.com/howeyc/fsnotify/issues/33 -[#29]: https://github.com/howeyc/fsnotify/issues/29 -[#25]: https://github.com/howeyc/fsnotify/issues/25 -[#24]: https://github.com/howeyc/fsnotify/issues/24 -[#21]: https://github.com/howeyc/fsnotify/issues/21 diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md deleted file mode 100644 index 6a81ba489..000000000 --- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md +++ /dev/null @@ -1,77 +0,0 @@ -# Contributing - -## Issues - -* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues). -* Please indicate the platform you are using fsnotify on. -* A code example to reproduce the problem is appreciated. - -## Pull Requests - -### Contributor License Agreement - -fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual). - -Please indicate that you have signed the CLA in your pull request. - -### How fsnotify is Developed - -* Development is done on feature branches. -* Tests are run on BSD, Linux, OS X and Windows. -* Pull requests are reviewed and [applied to master][am] using [hub][]. - * Maintainers may modify or squash commits rather than asking contributors to. -* To issue a new release, the maintainers will: - * Update the CHANGELOG - * Tag a version, which will become available through gopkg.in. - -### How to Fork - -For smooth sailing, always use the original import path. Installing with `go get` makes this easy. - -1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`) -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Ensure everything works and the tests pass (see below) -4. Commit your changes (`git commit -am 'Add some feature'`) - -Contribute upstream: - -1. Fork fsnotify on GitHub -2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`) -3. Push to the branch (`git push fork my-new-feature`) -4. Create a new Pull Request on GitHub - -This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/). - -### Testing - -fsnotify uses build tags to compile different code on Linux, BSD, OS X, and Windows. - -Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on. - -To aid in cross-platform testing there is a Vagrantfile for Linux and BSD. - -* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) -* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder. -* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password) -* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`. -* When you're done, you will want to halt or destroy the Vagrant boxes. - -Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory. - -Right now there is no equivalent solution for Windows and OS X, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads). - -### Maintainers - -Help maintaining fsnotify is welcome. To be a maintainer: - -* Submit a pull request and sign the CLA as above. -* You must be able to run the test suite on Mac, Windows, Linux and BSD. - -To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][]. - -All code changes should be internal pull requests. - -Releases are tagged using [Semantic Versioning](http://semver.org/). - -[hub]: https://github.com/github/hub -[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE deleted file mode 100644 index f21e54080..000000000 --- a/vendor/github.com/fsnotify/fsnotify/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2012 fsnotify Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md deleted file mode 100644 index 3c891e349..000000000 --- a/vendor/github.com/fsnotify/fsnotify/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# File system notifications for Go - -[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify) - -fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running: - -```console -go get -u golang.org/x/sys/... -``` - -Cross platform: Windows, Linux, BSD and OS X. - -|Adapter |OS |Status | -|----------|----------|----------| -|inotify |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| -|kqueue |BSD, OS X, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)| -|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)| -|FSEvents |OS X |[Planned](https://github.com/fsnotify/fsnotify/issues/11)| -|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)| -|fanotify |Linux 2.6.37+ | | -|USN Journals |Windows |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)| -|Polling |*All* |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)| - -\* Android and iOS are untested. - -Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) for usage. Consult the [Wiki](https://github.com/fsnotify/fsnotify/wiki) for the FAQ and further information. - -## API stability - -fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA). - -All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number. - -Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`. - -## Contributing - -Please refer to [CONTRIBUTING][] before opening an issue or pull request. - -## Example - -See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go). - -[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md - -## Related Projects - -* [notify](https://github.com/rjeczalik/notify) -* [fsevents](https://github.com/fsnotify/fsevents) - diff --git a/vendor/github.com/fsnotify/fsnotify/example_test.go b/vendor/github.com/fsnotify/fsnotify/example_test.go deleted file mode 100644 index 700502cb3..000000000 --- a/vendor/github.com/fsnotify/fsnotify/example_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9 - -package fsnotify_test - -import ( - "log" - - "github.com/fsnotify/fsnotify" -) - -func ExampleNewWatcher() { - watcher, err := fsnotify.NewWatcher() - if err != nil { - log.Fatal(err) - } - defer watcher.Close() - - done := make(chan bool) - go func() { - for { - select { - case event := <-watcher.Events: - log.Println("event:", event) - if event.Op&fsnotify.Write == fsnotify.Write { - log.Println("modified file:", event.Name) - } - case err := <-watcher.Errors: - log.Println("error:", err) - } - } - }() - - err = watcher.Add("/tmp/foo") - if err != nil { - log.Fatal(err) - } - <-done -} diff --git a/vendor/github.com/fsnotify/fsnotify/fen.go b/vendor/github.com/fsnotify/fsnotify/fen.go deleted file mode 100644 index ced39cb88..000000000 --- a/vendor/github.com/fsnotify/fsnotify/fen.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package fsnotify - -import ( - "errors" -) - -// Watcher watches a set of files, delivering events to a channel. -type Watcher struct { - Events chan Event - Errors chan error -} - -// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. -func NewWatcher() (*Watcher, error) { - return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") -} - -// Close removes all watches and closes the events channel. -func (w *Watcher) Close() error { - return nil -} - -// Add starts watching the named file or directory (non-recursively). -func (w *Watcher) Add(name string) error { - return nil -} - -// Remove stops watching the the named file or directory (non-recursively). -func (w *Watcher) Remove(name string) error { - return nil -} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go deleted file mode 100644 index e7f55fee7..000000000 --- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9 - -// Package fsnotify provides a platform-independent interface for file system notifications. -package fsnotify - -import ( - "bytes" - "fmt" -) - -// Event represents a single file system notification. -type Event struct { - Name string // Relative path to the file or directory. - Op Op // File operation that triggered the event. -} - -// Op describes a set of file operations. -type Op uint32 - -// These are the generalized file operations that can trigger a notification. -const ( - Create Op = 1 << iota - Write - Remove - Rename - Chmod -) - -func (op Op) String() string { - // Use a buffer for efficient string concatenation - var buffer bytes.Buffer - - if op&Create == Create { - buffer.WriteString("|CREATE") - } - if op&Remove == Remove { - buffer.WriteString("|REMOVE") - } - if op&Write == Write { - buffer.WriteString("|WRITE") - } - if op&Rename == Rename { - buffer.WriteString("|RENAME") - } - if op&Chmod == Chmod { - buffer.WriteString("|CHMOD") - } - if buffer.Len() == 0 { - return "" - } - return buffer.String()[1:] // Strip leading pipe -} - -// String returns a string representation of the event in the form -// "file: REMOVE|WRITE|..." -func (e Event) String() string { - return fmt.Sprintf("%q: %s", e.Name, e.Op.String()) -} diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go b/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go deleted file mode 100644 index 9d6d72afc..000000000 --- a/vendor/github.com/fsnotify/fsnotify/fsnotify_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9 - -package fsnotify - -import "testing" - -func TestEventStringWithValue(t *testing.T) { - for opMask, expectedString := range map[Op]string{ - Chmod | Create: `"/usr/someFile": CREATE|CHMOD`, - Rename: `"/usr/someFile": RENAME`, - Remove: `"/usr/someFile": REMOVE`, - Write | Chmod: `"/usr/someFile": WRITE|CHMOD`, - } { - event := Event{Name: "/usr/someFile", Op: opMask} - if event.String() != expectedString { - t.Fatalf("Expected %s, got: %v", expectedString, event.String()) - } - - } -} - -func TestEventOpStringWithValue(t *testing.T) { - expectedOpString := "WRITE|CHMOD" - event := Event{Name: "someFile", Op: Write | Chmod} - if event.Op.String() != expectedOpString { - t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) - } -} - -func TestEventOpStringWithNoValue(t *testing.T) { - expectedOpString := "" - event := Event{Name: "testFile", Op: 0} - if event.Op.String() != expectedOpString { - t.Fatalf("Expected %s, got: %v", expectedOpString, event.Op.String()) - } -} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go deleted file mode 100644 index f3b74c51f..000000000 --- a/vendor/github.com/fsnotify/fsnotify/inotify.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux - -package fsnotify - -import ( - "errors" - "fmt" - "io" - "os" - "path/filepath" - "strings" - "sync" - "unsafe" - - "golang.org/x/sys/unix" -) - -// Watcher watches a set of files, delivering events to a channel. -type Watcher struct { - Events chan Event - Errors chan error - mu sync.Mutex // Map access - cv *sync.Cond // sync removing on rm_watch with IN_IGNORE - fd int - poller *fdPoller - watches map[string]*watch // Map of inotify watches (key: path) - paths map[int]string // Map of watched paths (key: watch descriptor) - done chan struct{} // Channel for sending a "quit message" to the reader goroutine - doneResp chan struct{} // Channel to respond to Close -} - -// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. -func NewWatcher() (*Watcher, error) { - // Create inotify fd - fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC) - if fd == -1 { - return nil, errno - } - // Create epoll - poller, err := newFdPoller(fd) - if err != nil { - unix.Close(fd) - return nil, err - } - w := &Watcher{ - fd: fd, - poller: poller, - watches: make(map[string]*watch), - paths: make(map[int]string), - Events: make(chan Event), - Errors: make(chan error), - done: make(chan struct{}), - doneResp: make(chan struct{}), - } - w.cv = sync.NewCond(&w.mu) - - go w.readEvents() - return w, nil -} - -func (w *Watcher) isClosed() bool { - select { - case <-w.done: - return true - default: - return false - } -} - -// Close removes all watches and closes the events channel. -func (w *Watcher) Close() error { - if w.isClosed() { - return nil - } - - // Send 'close' signal to goroutine, and set the Watcher to closed. - close(w.done) - - // Wake up goroutine - w.poller.wake() - - // Wait for goroutine to close - <-w.doneResp - - return nil -} - -// Add starts watching the named file or directory (non-recursively). -func (w *Watcher) Add(name string) error { - name = filepath.Clean(name) - if w.isClosed() { - return errors.New("inotify instance already closed") - } - - const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM | - unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY | - unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF - - var flags uint32 = agnosticEvents - - w.mu.Lock() - watchEntry, found := w.watches[name] - w.mu.Unlock() - if found { - watchEntry.flags |= flags - flags |= unix.IN_MASK_ADD - } - wd, errno := unix.InotifyAddWatch(w.fd, name, flags) - if wd == -1 { - return errno - } - - w.mu.Lock() - w.watches[name] = &watch{wd: uint32(wd), flags: flags} - w.paths[wd] = name - w.mu.Unlock() - - return nil -} - -// Remove stops watching the named file or directory (non-recursively). -func (w *Watcher) Remove(name string) error { - name = filepath.Clean(name) - - // Fetch the watch. - w.mu.Lock() - defer w.mu.Unlock() - watch, ok := w.watches[name] - - // Remove it from inotify. - if !ok { - return fmt.Errorf("can't remove non-existent inotify watch for: %s", name) - } - // inotify_rm_watch will return EINVAL if the file has been deleted; - // the inotify will already have been removed. - // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously - // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE - // so that EINVAL means that the wd is being rm_watch()ed or its file removed - // by another thread and we have not received IN_IGNORE event. - success, errno := unix.InotifyRmWatch(w.fd, watch.wd) - if success == -1 { - // TODO: Perhaps it's not helpful to return an error here in every case. - // the only two possible errors are: - // EBADF, which happens when w.fd is not a valid file descriptor of any kind. - // EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor. - // Watch descriptors are invalidated when they are removed explicitly or implicitly; - // explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted. - return errno - } - - // wait until ignoreLinux() deleting maps - exists := true - for exists { - w.cv.Wait() - _, exists = w.watches[name] - } - - return nil -} - -type watch struct { - wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall) - flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags) -} - -// readEvents reads from the inotify file descriptor, converts the -// received events into Event objects and sends them via the Events channel -func (w *Watcher) readEvents() { - var ( - buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events - n int // Number of bytes read with read() - errno error // Syscall errno - ok bool // For poller.wait - ) - - defer close(w.doneResp) - defer close(w.Errors) - defer close(w.Events) - defer unix.Close(w.fd) - defer w.poller.close() - - for { - // See if we have been closed. - if w.isClosed() { - return - } - - ok, errno = w.poller.wait() - if errno != nil { - select { - case w.Errors <- errno: - case <-w.done: - return - } - continue - } - - if !ok { - continue - } - - n, errno = unix.Read(w.fd, buf[:]) - // If a signal interrupted execution, see if we've been asked to close, and try again. - // http://man7.org/linux/man-pages/man7/signal.7.html : - // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable" - if errno == unix.EINTR { - continue - } - - // unix.Read might have been woken up by Close. If so, we're done. - if w.isClosed() { - return - } - - if n < unix.SizeofInotifyEvent { - var err error - if n == 0 { - // If EOF is received. This should really never happen. - err = io.EOF - } else if n < 0 { - // If an error occurred while reading. - err = errno - } else { - // Read was too short. - err = errors.New("notify: short read in readEvents()") - } - select { - case w.Errors <- err: - case <-w.done: - return - } - continue - } - - var offset uint32 - // We don't know how many events we just read into the buffer - // While the offset points to at least one whole event... - for offset <= uint32(n-unix.SizeofInotifyEvent) { - // Point "raw" to the event in the buffer - raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) - - mask := uint32(raw.Mask) - nameLen := uint32(raw.Len) - // If the event happened to the watched directory or the watched file, the kernel - // doesn't append the filename to the event, but we would like to always fill the - // the "Name" field with a valid filename. We retrieve the path of the watch from - // the "paths" map. - w.mu.Lock() - name := w.paths[int(raw.Wd)] - w.mu.Unlock() - if nameLen > 0 { - // Point "bytes" at the first byte of the filename - bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent])) - // The filename is padded with NULL bytes. TrimRight() gets rid of those. - name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") - } - - event := newEvent(name, mask) - - // Send the events that are not ignored on the events channel - if !event.ignoreLinux(w, raw.Wd, mask) { - select { - case w.Events <- event: - case <-w.done: - return - } - } - - // Move to the next event in the buffer - offset += unix.SizeofInotifyEvent + nameLen - } - } -} - -// Certain types of events can be "ignored" and not sent over the Events -// channel. Such as events marked ignore by the kernel, or MODIFY events -// against files that do not exist. -func (e *Event) ignoreLinux(w *Watcher, wd int32, mask uint32) bool { - // Ignore anything the inotify API says to ignore - if mask&unix.IN_IGNORED == unix.IN_IGNORED { - w.mu.Lock() - defer w.mu.Unlock() - name := w.paths[int(wd)] - delete(w.paths, int(wd)) - delete(w.watches, name) - w.cv.Broadcast() - return true - } - - // If the event is not a DELETE or RENAME, the file must exist. - // Otherwise the event is ignored. - // *Note*: this was put in place because it was seen that a MODIFY - // event was sent after the DELETE. This ignores that MODIFY and - // assumes a DELETE will come or has come if the file doesn't exist. - if !(e.Op&Remove == Remove || e.Op&Rename == Rename) { - _, statErr := os.Lstat(e.Name) - return os.IsNotExist(statErr) - } - return false -} - -// newEvent returns an platform-independent Event based on an inotify mask. -func newEvent(name string, mask uint32) Event { - e := Event{Name: name} - if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { - e.Op |= Create - } - if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE { - e.Op |= Remove - } - if mask&unix.IN_MODIFY == unix.IN_MODIFY { - e.Op |= Write - } - if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { - e.Op |= Rename - } - if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { - e.Op |= Chmod - } - return e -} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go deleted file mode 100644 index cc7db4b22..000000000 --- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux - -package fsnotify - -import ( - "errors" - - "golang.org/x/sys/unix" -) - -type fdPoller struct { - fd int // File descriptor (as returned by the inotify_init() syscall) - epfd int // Epoll file descriptor - pipe [2]int // Pipe for waking up -} - -func emptyPoller(fd int) *fdPoller { - poller := new(fdPoller) - poller.fd = fd - poller.epfd = -1 - poller.pipe[0] = -1 - poller.pipe[1] = -1 - return poller -} - -// Create a new inotify poller. -// This creates an inotify handler, and an epoll handler. -func newFdPoller(fd int) (*fdPoller, error) { - var errno error - poller := emptyPoller(fd) - defer func() { - if errno != nil { - poller.close() - } - }() - poller.fd = fd - - // Create epoll fd - poller.epfd, errno = unix.EpollCreate1(0) - if poller.epfd == -1 { - return nil, errno - } - // Create pipe; pipe[0] is the read end, pipe[1] the write end. - errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK) - if errno != nil { - return nil, errno - } - - // Register inotify fd with epoll - event := unix.EpollEvent{ - Fd: int32(poller.fd), - Events: unix.EPOLLIN, - } - errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event) - if errno != nil { - return nil, errno - } - - // Register pipe fd with epoll - event = unix.EpollEvent{ - Fd: int32(poller.pipe[0]), - Events: unix.EPOLLIN, - } - errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event) - if errno != nil { - return nil, errno - } - - return poller, nil -} - -// Wait using epoll. -// Returns true if something is ready to be read, -// false if there is not. -func (poller *fdPoller) wait() (bool, error) { - // 3 possible events per fd, and 2 fds, makes a maximum of 6 events. - // I don't know whether epoll_wait returns the number of events returned, - // or the total number of events ready. - // I decided to catch both by making the buffer one larger than the maximum. - events := make([]unix.EpollEvent, 7) - for { - n, errno := unix.EpollWait(poller.epfd, events, -1) - if n == -1 { - if errno == unix.EINTR { - continue - } - return false, errno - } - if n == 0 { - // If there are no events, try again. - continue - } - if n > 6 { - // This should never happen. More events were returned than should be possible. - return false, errors.New("epoll_wait returned more events than I know what to do with") - } - ready := events[:n] - epollhup := false - epollerr := false - epollin := false - for _, event := range ready { - if event.Fd == int32(poller.fd) { - if event.Events&unix.EPOLLHUP != 0 { - // This should not happen, but if it does, treat it as a wakeup. - epollhup = true - } - if event.Events&unix.EPOLLERR != 0 { - // If an error is waiting on the file descriptor, we should pretend - // something is ready to read, and let unix.Read pick up the error. - epollerr = true - } - if event.Events&unix.EPOLLIN != 0 { - // There is data to read. - epollin = true - } - } - if event.Fd == int32(poller.pipe[0]) { - if event.Events&unix.EPOLLHUP != 0 { - // Write pipe descriptor was closed, by us. This means we're closing down the - // watcher, and we should wake up. - } - if event.Events&unix.EPOLLERR != 0 { - // If an error is waiting on the pipe file descriptor. - // This is an absolute mystery, and should never ever happen. - return false, errors.New("Error on the pipe descriptor.") - } - if event.Events&unix.EPOLLIN != 0 { - // This is a regular wakeup, so we have to clear the buffer. - err := poller.clearWake() - if err != nil { - return false, err - } - } - } - } - - if epollhup || epollerr || epollin { - return true, nil - } - return false, nil - } -} - -// Close the write end of the poller. -func (poller *fdPoller) wake() error { - buf := make([]byte, 1) - n, errno := unix.Write(poller.pipe[1], buf) - if n == -1 { - if errno == unix.EAGAIN { - // Buffer is full, poller will wake. - return nil - } - return errno - } - return nil -} - -func (poller *fdPoller) clearWake() error { - // You have to be woken up a LOT in order to get to 100! - buf := make([]byte, 100) - n, errno := unix.Read(poller.pipe[0], buf) - if n == -1 { - if errno == unix.EAGAIN { - // Buffer is empty, someone else cleared our wake. - return nil - } - return errno - } - return nil -} - -// Close all poller file descriptors, but not the one passed to it. -func (poller *fdPoller) close() { - if poller.pipe[1] != -1 { - unix.Close(poller.pipe[1]) - } - if poller.pipe[0] != -1 { - unix.Close(poller.pipe[0]) - } - if poller.epfd != -1 { - unix.Close(poller.epfd) - } -} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go deleted file mode 100644 index 26623efef..000000000 --- a/vendor/github.com/fsnotify/fsnotify/inotify_poller_test.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux - -package fsnotify - -import ( - "testing" - "time" - - "golang.org/x/sys/unix" -) - -type testFd [2]int - -func makeTestFd(t *testing.T) testFd { - var tfd testFd - errno := unix.Pipe(tfd[:]) - if errno != nil { - t.Fatalf("Failed to create pipe: %v", errno) - } - return tfd -} - -func (tfd testFd) fd() int { - return tfd[0] -} - -func (tfd testFd) closeWrite(t *testing.T) { - errno := unix.Close(tfd[1]) - if errno != nil { - t.Fatalf("Failed to close write end of pipe: %v", errno) - } -} - -func (tfd testFd) put(t *testing.T) { - buf := make([]byte, 10) - _, errno := unix.Write(tfd[1], buf) - if errno != nil { - t.Fatalf("Failed to write to pipe: %v", errno) - } -} - -func (tfd testFd) get(t *testing.T) { - buf := make([]byte, 10) - _, errno := unix.Read(tfd[0], buf) - if errno != nil { - t.Fatalf("Failed to read from pipe: %v", errno) - } -} - -func (tfd testFd) close() { - unix.Close(tfd[1]) - unix.Close(tfd[0]) -} - -func makePoller(t *testing.T) (testFd, *fdPoller) { - tfd := makeTestFd(t) - poller, err := newFdPoller(tfd.fd()) - if err != nil { - t.Fatalf("Failed to create poller: %v", err) - } - return tfd, poller -} - -func TestPollerWithBadFd(t *testing.T) { - _, err := newFdPoller(-1) - if err != unix.EBADF { - t.Fatalf("Expected EBADF, got: %v", err) - } -} - -func TestPollerWithData(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - tfd.put(t) - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } - tfd.get(t) -} - -func TestPollerWithWakeup(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - err := poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if ok { - t.Fatalf("expected poller to return false") - } -} - -func TestPollerWithClose(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - tfd.closeWrite(t) - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } -} - -func TestPollerWithWakeupAndData(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - tfd.put(t) - err := poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - - // both data and wakeup - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } - - // data is still in the buffer, wakeup is cleared - ok, err = poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if !ok { - t.Fatalf("expected poller to return true") - } - - tfd.get(t) - // data is gone, only wakeup now - err = poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - ok, err = poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - if ok { - t.Fatalf("expected poller to return false") - } -} - -func TestPollerConcurrent(t *testing.T) { - tfd, poller := makePoller(t) - defer tfd.close() - defer poller.close() - - oks := make(chan bool) - live := make(chan bool) - defer close(live) - go func() { - defer close(oks) - for { - ok, err := poller.wait() - if err != nil { - t.Fatalf("poller failed: %v", err) - } - oks <- ok - if !<-live { - return - } - } - }() - - // Try a write - select { - case <-time.After(50 * time.Millisecond): - case <-oks: - t.Fatalf("poller did not wait") - } - tfd.put(t) - if !<-oks { - t.Fatalf("expected true") - } - tfd.get(t) - live <- true - - // Try a wakeup - select { - case <-time.After(50 * time.Millisecond): - case <-oks: - t.Fatalf("poller did not wait") - } - err := poller.wake() - if err != nil { - t.Fatalf("wake failed: %v", err) - } - if <-oks { - t.Fatalf("expected false") - } - live <- true - - // Try a close - select { - case <-time.After(50 * time.Millisecond): - case <-oks: - t.Fatalf("poller did not wait") - } - tfd.closeWrite(t) - if !<-oks { - t.Fatalf("expected true") - } - tfd.get(t) -} diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_test.go b/vendor/github.com/fsnotify/fsnotify/inotify_test.go deleted file mode 100644 index a4bb202d1..000000000 --- a/vendor/github.com/fsnotify/fsnotify/inotify_test.go +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux - -package fsnotify - -import ( - "fmt" - "os" - "path/filepath" - "strings" - "testing" - "time" -) - -func TestInotifyCloseRightAway(t *testing.T) { - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - - // Close immediately; it won't even reach the first unix.Read. - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func TestInotifyCloseSlightlyLater(t *testing.T) { - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - - // Wait until readEvents has reached unix.Read, and Close. - <-time.After(50 * time.Millisecond) - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func TestInotifyCloseSlightlyLaterWithWatch(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - w.Add(testDir) - - // Wait until readEvents has reached unix.Read, and Close. - <-time.After(50 * time.Millisecond) - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func TestInotifyCloseAfterRead(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher") - } - - err = w.Add(testDir) - if err != nil { - t.Fatalf("Failed to add .") - } - - // Generate an event. - os.Create(filepath.Join(testDir, "somethingSOMETHINGsomethingSOMETHING")) - - // Wait for readEvents to read the event, then close the watcher. - <-time.After(50 * time.Millisecond) - w.Close() - - // Wait for the close to complete. - <-time.After(50 * time.Millisecond) - isWatcherReallyClosed(t, w) -} - -func isWatcherReallyClosed(t *testing.T, w *Watcher) { - select { - case err, ok := <-w.Errors: - if ok { - t.Fatalf("w.Errors is not closed; readEvents is still alive after closing (error: %v)", err) - } - default: - t.Fatalf("w.Errors would have blocked; readEvents is still alive!") - } - - select { - case _, ok := <-w.Events: - if ok { - t.Fatalf("w.Events is not closed; readEvents is still alive after closing") - } - default: - t.Fatalf("w.Events would have blocked; readEvents is still alive!") - } -} - -func TestInotifyCloseCreate(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testDir) - if err != nil { - t.Fatalf("Failed to add testDir: %v", err) - } - h, err := os.Create(filepath.Join(testDir, "testfile")) - if err != nil { - t.Fatalf("Failed to create file in testdir: %v", err) - } - h.Close() - select { - case _ = <-w.Events: - case err := <-w.Errors: - t.Fatalf("Error from watcher: %v", err) - case <-time.After(50 * time.Millisecond): - t.Fatalf("Took too long to wait for event") - } - - // At this point, we've received one event, so the goroutine is ready. - // It's also blocking on unix.Read. - // Now we try to swap the file descriptor under its nose. - w.Close() - w, err = NewWatcher() - defer w.Close() - if err != nil { - t.Fatalf("Failed to create second watcher: %v", err) - } - - <-time.After(50 * time.Millisecond) - err = w.Add(testDir) - if err != nil { - t.Fatalf("Error adding testDir again: %v", err) - } -} - -// This test verifies the watcher can keep up with file creations/deletions -// when under load. -func TestInotifyStress(t *testing.T) { - maxNumToCreate := 1000 - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - testFilePrefix := filepath.Join(testDir, "testfile") - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testDir) - if err != nil { - t.Fatalf("Failed to add testDir: %v", err) - } - - doneChan := make(chan struct{}) - // The buffer ensures that the file generation goroutine is never blocked. - errChan := make(chan error, 2*maxNumToCreate) - - go func() { - for i := 0; i < maxNumToCreate; i++ { - testFile := fmt.Sprintf("%s%d", testFilePrefix, i) - - handle, err := os.Create(testFile) - if err != nil { - errChan <- fmt.Errorf("Create failed: %v", err) - continue - } - - err = handle.Close() - if err != nil { - errChan <- fmt.Errorf("Close failed: %v", err) - continue - } - } - - // If we delete a newly created file too quickly, inotify will skip the - // create event and only send the delete event. - time.Sleep(100 * time.Millisecond) - - for i := 0; i < maxNumToCreate; i++ { - testFile := fmt.Sprintf("%s%d", testFilePrefix, i) - err = os.Remove(testFile) - if err != nil { - errChan <- fmt.Errorf("Remove failed: %v", err) - } - } - - close(doneChan) - }() - - creates := 0 - removes := 0 - - finished := false - after := time.After(10 * time.Second) - for !finished { - select { - case <-after: - t.Fatalf("Not done") - case <-doneChan: - finished = true - case err := <-errChan: - t.Fatalf("Got an error from file creator goroutine: %v", err) - case err := <-w.Errors: - t.Fatalf("Got an error from watcher: %v", err) - case evt := <-w.Events: - if !strings.HasPrefix(evt.Name, testFilePrefix) { - t.Fatalf("Got an event for an unknown file: %s", evt.Name) - } - if evt.Op == Create { - creates++ - } - if evt.Op == Remove { - removes++ - } - } - } - - // Drain remaining events from channels - count := 0 - for count < 10 { - select { - case err := <-errChan: - t.Fatalf("Got an error from file creator goroutine: %v", err) - case err := <-w.Errors: - t.Fatalf("Got an error from watcher: %v", err) - case evt := <-w.Events: - if !strings.HasPrefix(evt.Name, testFilePrefix) { - t.Fatalf("Got an event for an unknown file: %s", evt.Name) - } - if evt.Op == Create { - creates++ - } - if evt.Op == Remove { - removes++ - } - count = 0 - default: - count++ - // Give the watcher chances to fill the channels. - time.Sleep(time.Millisecond) - } - } - - if creates-removes > 1 || creates-removes < -1 { - t.Fatalf("Creates and removes should not be off by more than one: %d creates, %d removes", creates, removes) - } - if creates < 50 { - t.Fatalf("Expected at least 50 creates, got %d", creates) - } -} - -func TestInotifyRemoveTwice(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - testFile := filepath.Join(testDir, "testfile") - - handle, err := os.Create(testFile) - if err != nil { - t.Fatalf("Create failed: %v", err) - } - handle.Close() - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testFile) - if err != nil { - t.Fatalf("Failed to add testFile: %v", err) - } - - err = os.Remove(testFile) - if err != nil { - t.Fatalf("Failed to remove testFile: %v", err) - } - - err = w.Remove(testFile) - if err == nil { - t.Fatalf("no error on removing invalid file") - } - s1 := fmt.Sprintf("%s", err) - - err = w.Remove(testFile) - if err == nil { - t.Fatalf("no error on removing invalid file") - } - s2 := fmt.Sprintf("%s", err) - - if s1 != s2 { - t.Fatalf("receive different error - %s / %s", s1, s2) - } -} - -func TestInotifyInnerMapLength(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - testFile := filepath.Join(testDir, "testfile") - - handle, err := os.Create(testFile) - if err != nil { - t.Fatalf("Create failed: %v", err) - } - handle.Close() - - w, err := NewWatcher() - if err != nil { - t.Fatalf("Failed to create watcher: %v", err) - } - defer w.Close() - - err = w.Add(testFile) - if err != nil { - t.Fatalf("Failed to add testFile: %v", err) - } - go func() { - for err := range w.Errors { - t.Fatalf("error received: %s", err) - } - }() - - err = os.Remove(testFile) - if err != nil { - t.Fatalf("Failed to remove testFile: %v", err) - } - _ = <-w.Events // consume Remove event - <-time.After(50 * time.Millisecond) // wait IN_IGNORE propagated - - w.mu.Lock() - defer w.mu.Unlock() - if len(w.watches) != 0 { - t.Fatalf("Expected watches len is 0, but got: %d, %v", len(w.watches), w.watches) - } - if len(w.paths) != 0 { - t.Fatalf("Expected paths len is 0, but got: %d, %v", len(w.paths), w.paths) - } -} diff --git a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go b/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go deleted file mode 100644 index 5564554f7..000000000 --- a/vendor/github.com/fsnotify/fsnotify/integration_darwin_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package fsnotify - -import ( - "os" - "path/filepath" - "testing" - "time" - - "golang.org/x/sys/unix" -) - -// testExchangedataForWatcher tests the watcher with the exchangedata operation on OS X. -// -// This is widely used for atomic saves on OS X, e.g. TextMate and in Apple's NSDocument. -// -// See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/exchangedata.2.html -// Also see: https://github.com/textmate/textmate/blob/cd016be29489eba5f3c09b7b70b06da134dda550/Frameworks/io/src/swap_file_data.cc#L20 -func testExchangedataForWatcher(t *testing.T, watchDir bool) { - // Create directory to watch - testDir1 := tempMkdir(t) - - // For the intermediate file - testDir2 := tempMkdir(t) - - defer os.RemoveAll(testDir1) - defer os.RemoveAll(testDir2) - - resolvedFilename := "TestFsnotifyEvents.file" - - // TextMate does: - // - // 1. exchangedata (intermediate, resolved) - // 2. unlink intermediate - // - // Let's try to simulate that: - resolved := filepath.Join(testDir1, resolvedFilename) - intermediate := filepath.Join(testDir2, resolvedFilename+"~") - - // Make sure we create the file before we start watching - createAndSyncFile(t, resolved) - - watcher := newWatcher(t) - - // Test both variants in isolation - if watchDir { - addWatch(t, watcher, testDir1) - } else { - addWatch(t, watcher, resolved) - } - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var removeReceived counter - var createReceived counter - - done := make(chan bool) - - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(resolved) { - if event.Op&Remove == Remove { - removeReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - } - t.Logf("event received: %s", event) - } - done <- true - }() - - // Repeat to make sure the watched file/directory "survives" the REMOVE/CREATE loop. - for i := 1; i <= 3; i++ { - // The intermediate file is created in a folder outside the watcher - createAndSyncFile(t, intermediate) - - // 1. Swap - if err := unix.Exchangedata(intermediate, resolved, 0); err != nil { - t.Fatalf("[%d] exchangedata failed: %s", i, err) - } - - time.Sleep(50 * time.Millisecond) - - // 2. Delete the intermediate file - err := os.Remove(intermediate) - - if err != nil { - t.Fatalf("[%d] remove %s failed: %s", i, intermediate, err) - } - - time.Sleep(50 * time.Millisecond) - - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - - // The events will be (CHMOD + REMOVE + CREATE) X 2. Let's focus on the last two: - if removeReceived.value() < 3 { - t.Fatal("fsnotify remove events have not been received after 500 ms") - } - - if createReceived.value() < 3 { - t.Fatal("fsnotify create events have not been received after 500 ms") - } - - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -// TestExchangedataInWatchedDir test exchangedata operation on file in watched dir. -func TestExchangedataInWatchedDir(t *testing.T) { - testExchangedataForWatcher(t, true) -} - -// TestExchangedataInWatchedDir test exchangedata operation on watched file. -func TestExchangedataInWatchedFile(t *testing.T) { - testExchangedataForWatcher(t, false) -} - -func createAndSyncFile(t *testing.T, filepath string) { - f1, err := os.OpenFile(filepath, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating %s failed: %s", filepath, err) - } - f1.Sync() - f1.Close() -} diff --git a/vendor/github.com/fsnotify/fsnotify/integration_test.go b/vendor/github.com/fsnotify/fsnotify/integration_test.go deleted file mode 100644 index 8b7e9d3ec..000000000 --- a/vendor/github.com/fsnotify/fsnotify/integration_test.go +++ /dev/null @@ -1,1237 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9,!solaris - -package fsnotify - -import ( - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "runtime" - "sync/atomic" - "testing" - "time" -) - -// An atomic counter -type counter struct { - val int32 -} - -func (c *counter) increment() { - atomic.AddInt32(&c.val, 1) -} - -func (c *counter) value() int32 { - return atomic.LoadInt32(&c.val) -} - -func (c *counter) reset() { - atomic.StoreInt32(&c.val, 0) -} - -// tempMkdir makes a temporary directory -func tempMkdir(t *testing.T) string { - dir, err := ioutil.TempDir("", "fsnotify") - if err != nil { - t.Fatalf("failed to create test directory: %s", err) - } - return dir -} - -// tempMkFile makes a temporary file. -func tempMkFile(t *testing.T, dir string) string { - f, err := ioutil.TempFile(dir, "fsnotify") - if err != nil { - t.Fatalf("failed to create test file: %v", err) - } - defer f.Close() - return f.Name() -} - -// newWatcher initializes an fsnotify Watcher instance. -func newWatcher(t *testing.T) *Watcher { - watcher, err := NewWatcher() - if err != nil { - t.Fatalf("NewWatcher() failed: %s", err) - } - return watcher -} - -// addWatch adds a watch for a directory -func addWatch(t *testing.T, watcher *Watcher, dir string) { - if err := watcher.Add(dir); err != nil { - t.Fatalf("watcher.Add(%q) failed: %s", dir, err) - } -} - -func TestFsnotifyMultipleOperations(t *testing.T) { - watcher := newWatcher(t) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create directory that's not watched - testDirToMoveFiles := tempMkdir(t) - defer os.RemoveAll(testDirToMoveFiles) - - testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") - testFileRenamed := filepath.Join(testDirToMoveFiles, "TestFsnotifySeqRename.testfile") - - addWatch(t, watcher, testDir) - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, modifyReceived, deleteReceived, renameReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - if event.Op&Write == Write { - modifyReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - if event.Op&Rename == Rename { - renameReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // Modify the file outside of the watched dir - f, err = os.Open(testFileRenamed) - if err != nil { - t.Fatalf("open test renamed file failed: %s", err) - } - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Recreate the file that was moved - f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Close() - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 2 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) - } - mReceived := modifyReceived.value() - if mReceived != 1 { - t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) - } - dReceived := deleteReceived.value() - rReceived := renameReceived.value() - if dReceived+rReceived != 1 { - t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", rReceived+dReceived, 1) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyMultipleCreates(t *testing.T) { - watcher := newWatcher(t) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - testFile := filepath.Join(testDir, "TestFsnotifySeq.testfile") - - addWatch(t, watcher, testDir) - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, modifyReceived, deleteReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - if event.Op&Write == Write { - modifyReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - os.Remove(testFile) - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Recreate the file - f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Close() - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Modify - f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // Modify - f, err = os.OpenFile(testFile, os.O_WRONLY, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 2 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) - } - mReceived := modifyReceived.value() - if mReceived < 3 { - t.Fatalf("incorrect number of modify events received after 500 ms (%d vs atleast %d)", mReceived, 3) - } - dReceived := deleteReceived.value() - if dReceived != 1 { - t.Fatalf("incorrect number of rename+delete events received after 500 ms (%d vs %d)", dReceived, 1) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyDirOnly(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - // This should NOT add any events to the fsnotify event queue - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDir, "TestFsnotifyDirOnly.testfile") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, modifyReceived, deleteReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileAlreadyExists) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - if event.Op&Write == Write { - modifyReceived.increment() - } - if event.Op&Create == Create { - createReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - time.Sleep(time.Millisecond) - f.WriteString("data") - f.Sync() - f.Close() - - time.Sleep(50 * time.Millisecond) // give system time to sync write change before delete - - os.Remove(testFile) - os.Remove(testFileAlreadyExists) - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 1 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 1) - } - mReceived := modifyReceived.value() - if mReceived != 1 { - t.Fatalf("incorrect number of modify events received after 500 ms (%d vs %d)", mReceived, 1) - } - dReceived := deleteReceived.value() - if dReceived != 2 { - t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyDeleteWatchedDir(t *testing.T) { - watcher := newWatcher(t) - defer watcher.Close() - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - addWatch(t, watcher, testDir) - - // Add a watch for testFile - addWatch(t, watcher, testFileAlreadyExists) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var deleteReceived counter - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFileAlreadyExists) { - t.Logf("event received: %s", event) - if event.Op&Remove == Remove { - deleteReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - }() - - os.RemoveAll(testDir) - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - dReceived := deleteReceived.value() - if dReceived < 2 { - t.Fatalf("did not receive at least %d delete events, received %d after 500 ms", 2, dReceived) - } -} - -func TestFsnotifySubDir(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - testFile1 := filepath.Join(testDir, "TestFsnotifyFile1.testfile") - testSubDir := filepath.Join(testDir, "sub") - testSubDirFile := filepath.Join(testDir, "sub/TestFsnotifyFile1.testfile") - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived, deleteReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testSubDir) || event.Name == filepath.Clean(testFile1) { - t.Logf("event received: %s", event) - if event.Op&Create == Create { - createReceived.increment() - } - if event.Op&Remove == Remove { - deleteReceived.increment() - } - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - addWatch(t, watcher, testDir) - - // Create sub-directory - if err := os.Mkdir(testSubDir, 0777); err != nil { - t.Fatalf("failed to create test sub-directory: %s", err) - } - - // Create a file - var f *os.File - f, err := os.OpenFile(testFile1, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - - // Create a file (Should not see this! we are not watching subdir) - var fs *os.File - fs, err = os.OpenFile(testSubDirFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - fs.Sync() - fs.Close() - - time.Sleep(200 * time.Millisecond) - - // Make sure receive deletes for both file and sub-directory - os.RemoveAll(testSubDir) - os.Remove(testFile1) - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - cReceived := createReceived.value() - if cReceived != 2 { - t.Fatalf("incorrect number of create events received after 500 ms (%d vs %d)", cReceived, 2) - } - dReceived := deleteReceived.value() - if dReceived != 2 { - t.Fatalf("incorrect number of delete events received after 500 ms (%d vs %d)", dReceived, 2) - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } -} - -func TestFsnotifyRename(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDir, "TestFsnotifyEvents.testfile") - testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var renameReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { - if event.Op&Rename == Rename { - renameReceived.increment() - } - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - f.WriteString("data") - f.Sync() - f.Close() - - // Add a watch for testFile - addWatch(t, watcher, testFile) - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - if renameReceived.value() == 0 { - t.Fatal("fsnotify rename events have not been received after 500 ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } - - os.Remove(testFileRenamed) -} - -func TestFsnotifyRenameToCreate(t *testing.T) { - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create directory to get file - testDirFrom := tempMkdir(t) - defer os.RemoveAll(testDirFrom) - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") - testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var createReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) || event.Name == filepath.Clean(testFileRenamed) { - if event.Op&Create == Create { - createReceived.increment() - } - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - if createReceived.value() == 0 { - t.Fatal("fsnotify create events have not been received after 500 ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } - - os.Remove(testFileRenamed) -} - -func TestFsnotifyRenameToOverwrite(t *testing.T) { - switch runtime.GOOS { - case "plan9", "windows": - t.Skipf("skipping test on %q (os.Rename over existing file does not create event).", runtime.GOOS) - } - - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create directory to get file - testDirFrom := tempMkdir(t) - defer os.RemoveAll(testDirFrom) - - testFile := filepath.Join(testDirFrom, "TestFsnotifyEvents.testfile") - testFileRenamed := filepath.Join(testDir, "TestFsnotifyEvents.testfileRenamed") - - // Create a file - var fr *os.File - fr, err := os.OpenFile(testFileRenamed, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - fr.Sync() - fr.Close() - - addWatch(t, watcher, testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - var eventReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testFileRenamed) { - eventReceived.increment() - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err = os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - - if err := testRename(testFile, testFileRenamed); err != nil { - t.Fatalf("rename failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - if eventReceived.value() == 0 { - t.Fatal("fsnotify events have not been received after 500 ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(2 * time.Second): - t.Fatal("event stream was not closed after 2 seconds") - } - - os.Remove(testFileRenamed) -} - -func TestRemovalOfWatch(t *testing.T) { - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - watcher := newWatcher(t) - defer watcher.Close() - - addWatch(t, watcher, testDir) - if err := watcher.Remove(testDir); err != nil { - t.Fatalf("Could not remove the watch: %v\n", err) - } - - go func() { - select { - case ev := <-watcher.Events: - t.Fatalf("We received event: %v\n", ev) - case <-time.After(500 * time.Millisecond): - t.Log("No event received, as expected.") - } - }() - - time.Sleep(200 * time.Millisecond) - // Modify the file outside of the watched dir - f, err := os.Open(testFileAlreadyExists) - if err != nil { - t.Fatalf("Open test file failed: %s", err) - } - f.WriteString("data") - f.Sync() - f.Close() - if err := os.Chmod(testFileAlreadyExists, 0700); err != nil { - t.Fatalf("chmod failed: %s", err) - } - time.Sleep(400 * time.Millisecond) -} - -func TestFsnotifyAttrib(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("attributes don't work on Windows.") - } - - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Receive errors on the error channel on a separate goroutine - go func() { - for err := range watcher.Errors { - t.Fatalf("error received: %s", err) - } - }() - - testFile := filepath.Join(testDir, "TestFsnotifyAttrib.testfile") - - // Receive events on the event channel on a separate goroutine - eventstream := watcher.Events - // The modifyReceived counter counts IsModify events that are not IsAttrib, - // and the attribReceived counts IsAttrib events (which are also IsModify as - // a consequence). - var modifyReceived counter - var attribReceived counter - done := make(chan bool) - go func() { - for event := range eventstream { - // Only count relevant events - if event.Name == filepath.Clean(testDir) || event.Name == filepath.Clean(testFile) { - if event.Op&Write == Write { - modifyReceived.increment() - } - if event.Op&Chmod == Chmod { - attribReceived.increment() - } - t.Logf("event received: %s", event) - } else { - t.Logf("unexpected event received: %s", event) - } - } - done <- true - }() - - // Create a file - // This should add at least one event to the fsnotify event queue - var f *os.File - f, err := os.OpenFile(testFile, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - - f.WriteString("data") - f.Sync() - f.Close() - - // Add a watch for testFile - addWatch(t, watcher, testFile) - - if err := os.Chmod(testFile, 0700); err != nil { - t.Fatalf("chmod failed: %s", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - // Creating/writing a file changes also the mtime, so IsAttrib should be set to true here - time.Sleep(500 * time.Millisecond) - if modifyReceived.value() != 0 { - t.Fatal("received an unexpected modify event when creating a test file") - } - if attribReceived.value() == 0 { - t.Fatal("fsnotify attribute events have not received after 500 ms") - } - - // Modifying the contents of the file does not set the attrib flag (although eg. the mtime - // might have been modified). - modifyReceived.reset() - attribReceived.reset() - - f, err = os.OpenFile(testFile, os.O_WRONLY, 0) - if err != nil { - t.Fatalf("reopening test file failed: %s", err) - } - - f.WriteString("more data") - f.Sync() - f.Close() - - time.Sleep(500 * time.Millisecond) - - if modifyReceived.value() != 1 { - t.Fatal("didn't receive a modify event after changing test file contents") - } - - if attribReceived.value() != 0 { - t.Fatal("did receive an unexpected attrib event after changing test file contents") - } - - modifyReceived.reset() - attribReceived.reset() - - // Doing a chmod on the file should trigger an event with the "attrib" flag set (the contents - // of the file are not changed though) - if err := os.Chmod(testFile, 0600); err != nil { - t.Fatalf("chmod failed: %s", err) - } - - time.Sleep(500 * time.Millisecond) - - if attribReceived.value() != 1 { - t.Fatal("didn't receive an attribute change after 500ms") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() - t.Log("waiting for the event channel to become closed...") - select { - case <-done: - t.Log("event channel closed") - case <-time.After(1e9): - t.Fatal("event stream was not closed after 1 second") - } - - os.Remove(testFile) -} - -func TestFsnotifyClose(t *testing.T) { - watcher := newWatcher(t) - watcher.Close() - - var done int32 - go func() { - watcher.Close() - atomic.StoreInt32(&done, 1) - }() - - time.Sleep(50e6) // 50 ms - if atomic.LoadInt32(&done) == 0 { - t.Fatal("double Close() test failed: second Close() call didn't return") - } - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - if err := watcher.Add(testDir); err == nil { - t.Fatal("expected error on Watch() after Close(), got nil") - } -} - -func TestFsnotifyFakeSymlink(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("symlinks don't work on Windows.") - } - - watcher := newWatcher(t) - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - var errorsReceived counter - // Receive errors on the error channel on a separate goroutine - go func() { - for errors := range watcher.Errors { - t.Logf("Received error: %s", errors) - errorsReceived.increment() - } - }() - - // Count the CREATE events received - var createEventsReceived, otherEventsReceived counter - go func() { - for ev := range watcher.Events { - t.Logf("event received: %s", ev) - if ev.Op&Create == Create { - createEventsReceived.increment() - } else { - otherEventsReceived.increment() - } - } - }() - - addWatch(t, watcher, testDir) - - if err := os.Symlink(filepath.Join(testDir, "zzz"), filepath.Join(testDir, "zzznew")); err != nil { - t.Fatalf("Failed to create bogus symlink: %s", err) - } - t.Logf("Created bogus symlink") - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - - // Should not be error, just no events for broken links (watching nothing) - if errorsReceived.value() > 0 { - t.Fatal("fsnotify errors have been received.") - } - if otherEventsReceived.value() > 0 { - t.Fatal("fsnotify other events received on the broken link") - } - - // Except for 1 create event (for the link itself) - if createEventsReceived.value() == 0 { - t.Fatal("fsnotify create events were not received after 500 ms") - } - if createEventsReceived.value() > 1 { - t.Fatal("fsnotify more create events received than expected") - } - - // Try closing the fsnotify instance - t.Log("calling Close()") - watcher.Close() -} - -func TestCyclicSymlink(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("symlinks don't work on Windows.") - } - - watcher := newWatcher(t) - - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - link := path.Join(testDir, "link") - if err := os.Symlink(".", link); err != nil { - t.Fatalf("could not make symlink: %v", err) - } - addWatch(t, watcher, testDir) - - var createEventsReceived counter - go func() { - for ev := range watcher.Events { - if ev.Op&Create == Create { - createEventsReceived.increment() - } - } - }() - - if err := os.Remove(link); err != nil { - t.Fatalf("Error removing link: %v", err) - } - - // It would be nice to be able to expect a delete event here, but kqueue has - // no way for us to get events on symlinks themselves, because opening them - // opens an fd to the file to which they point. - - if err := ioutil.WriteFile(link, []byte("foo"), 0700); err != nil { - t.Fatalf("could not make symlink: %v", err) - } - - // We expect this event to be received almost immediately, but let's wait 500 ms to be sure - time.Sleep(500 * time.Millisecond) - - if got := createEventsReceived.value(); got == 0 { - t.Errorf("want at least 1 create event got %v", got) - } - - watcher.Close() -} - -// TestConcurrentRemovalOfWatch tests that concurrent calls to RemoveWatch do not race. -// See https://codereview.appspot.com/103300045/ -// go test -test.run=TestConcurrentRemovalOfWatch -test.cpu=1,1,1,1,1 -race -func TestConcurrentRemovalOfWatch(t *testing.T) { - if runtime.GOOS != "darwin" { - t.Skip("regression test for race only present on darwin") - } - - // Create directory to watch - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - // Create a file before watching directory - testFileAlreadyExists := filepath.Join(testDir, "TestFsnotifyEventsExisting.testfile") - { - var f *os.File - f, err := os.OpenFile(testFileAlreadyExists, os.O_WRONLY|os.O_CREATE, 0666) - if err != nil { - t.Fatalf("creating test file failed: %s", err) - } - f.Sync() - f.Close() - } - - watcher := newWatcher(t) - defer watcher.Close() - - addWatch(t, watcher, testDir) - - // Test that RemoveWatch can be invoked concurrently, with no data races. - removed1 := make(chan struct{}) - go func() { - defer close(removed1) - watcher.Remove(testDir) - }() - removed2 := make(chan struct{}) - go func() { - close(removed2) - watcher.Remove(testDir) - }() - <-removed1 - <-removed2 -} - -func TestClose(t *testing.T) { - // Regression test for #59 bad file descriptor from Close - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - watcher := newWatcher(t) - if err := watcher.Add(testDir); err != nil { - t.Fatalf("Expected no error on Add, got %v", err) - } - err := watcher.Close() - if err != nil { - t.Fatalf("Expected no error on Close, got %v.", err) - } -} - -// TestRemoveWithClose tests if one can handle Remove events and, at the same -// time, close Watcher object without any data races. -func TestRemoveWithClose(t *testing.T) { - testDir := tempMkdir(t) - defer os.RemoveAll(testDir) - - const fileN = 200 - tempFiles := make([]string, 0, fileN) - for i := 0; i < fileN; i++ { - tempFiles = append(tempFiles, tempMkFile(t, testDir)) - } - watcher := newWatcher(t) - if err := watcher.Add(testDir); err != nil { - t.Fatalf("Expected no error on Add, got %v", err) - } - startC, stopC := make(chan struct{}), make(chan struct{}) - errC := make(chan error) - go func() { - for { - select { - case <-watcher.Errors: - case <-watcher.Events: - case <-stopC: - return - } - } - }() - go func() { - <-startC - for _, fileName := range tempFiles { - os.Remove(fileName) - } - }() - go func() { - <-startC - errC <- watcher.Close() - }() - close(startC) - defer close(stopC) - if err := <-errC; err != nil { - t.Fatalf("Expected no error on Close, got %v.", err) - } -} - -func testRename(file1, file2 string) error { - switch runtime.GOOS { - case "windows", "plan9": - return os.Rename(file1, file2) - default: - cmd := exec.Command("mv", file1, file2) - return cmd.Run() - } -} diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go deleted file mode 100644 index c2b4acb18..000000000 --- a/vendor/github.com/fsnotify/fsnotify/kqueue.go +++ /dev/null @@ -1,503 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build freebsd openbsd netbsd dragonfly darwin - -package fsnotify - -import ( - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "sync" - "time" - - "golang.org/x/sys/unix" -) - -// Watcher watches a set of files, delivering events to a channel. -type Watcher struct { - Events chan Event - Errors chan error - done chan bool // Channel for sending a "quit message" to the reader goroutine - - kq int // File descriptor (as returned by the kqueue() syscall). - - mu sync.Mutex // Protects access to watcher data - watches map[string]int // Map of watched file descriptors (key: path). - externalWatches map[string]bool // Map of watches added by user of the library. - dirFlags map[string]uint32 // Map of watched directories to fflags used in kqueue. - paths map[int]pathInfo // Map file descriptors to path names for processing kqueue events. - fileExists map[string]bool // Keep track of if we know this file exists (to stop duplicate create events). - isClosed bool // Set to true when Close() is first called -} - -type pathInfo struct { - name string - isDir bool -} - -// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. -func NewWatcher() (*Watcher, error) { - kq, err := kqueue() - if err != nil { - return nil, err - } - - w := &Watcher{ - kq: kq, - watches: make(map[string]int), - dirFlags: make(map[string]uint32), - paths: make(map[int]pathInfo), - fileExists: make(map[string]bool), - externalWatches: make(map[string]bool), - Events: make(chan Event), - Errors: make(chan error), - done: make(chan bool), - } - - go w.readEvents() - return w, nil -} - -// Close removes all watches and closes the events channel. -func (w *Watcher) Close() error { - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() - return nil - } - w.isClosed = true - w.mu.Unlock() - - // copy paths to remove while locked - w.mu.Lock() - var pathsToRemove = make([]string, 0, len(w.watches)) - for name := range w.watches { - pathsToRemove = append(pathsToRemove, name) - } - w.mu.Unlock() - // unlock before calling Remove, which also locks - - var err error - for _, name := range pathsToRemove { - if e := w.Remove(name); e != nil && err == nil { - err = e - } - } - - // Send "quit" message to the reader goroutine: - w.done <- true - - return nil -} - -// Add starts watching the named file or directory (non-recursively). -func (w *Watcher) Add(name string) error { - w.mu.Lock() - w.externalWatches[name] = true - w.mu.Unlock() - _, err := w.addWatch(name, noteAllEvents) - return err -} - -// Remove stops watching the the named file or directory (non-recursively). -func (w *Watcher) Remove(name string) error { - name = filepath.Clean(name) - w.mu.Lock() - watchfd, ok := w.watches[name] - w.mu.Unlock() - if !ok { - return fmt.Errorf("can't remove non-existent kevent watch for: %s", name) - } - - const registerRemove = unix.EV_DELETE - if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil { - return err - } - - unix.Close(watchfd) - - w.mu.Lock() - isDir := w.paths[watchfd].isDir - delete(w.watches, name) - delete(w.paths, watchfd) - delete(w.dirFlags, name) - w.mu.Unlock() - - // Find all watched paths that are in this directory that are not external. - if isDir { - var pathsToRemove []string - w.mu.Lock() - for _, path := range w.paths { - wdir, _ := filepath.Split(path.name) - if filepath.Clean(wdir) == name { - if !w.externalWatches[path.name] { - pathsToRemove = append(pathsToRemove, path.name) - } - } - } - w.mu.Unlock() - for _, name := range pathsToRemove { - // Since these are internal, not much sense in propagating error - // to the user, as that will just confuse them with an error about - // a path they did not explicitly watch themselves. - w.Remove(name) - } - } - - return nil -} - -// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) -const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME - -// keventWaitTime to block on each read from kevent -var keventWaitTime = durationToTimespec(100 * time.Millisecond) - -// addWatch adds name to the watched file set. -// The flags are interpreted as described in kevent(2). -// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks. -func (w *Watcher) addWatch(name string, flags uint32) (string, error) { - var isDir bool - // Make ./name and name equivalent - name = filepath.Clean(name) - - w.mu.Lock() - if w.isClosed { - w.mu.Unlock() - return "", errors.New("kevent instance already closed") - } - watchfd, alreadyWatching := w.watches[name] - // We already have a watch, but we can still override flags. - if alreadyWatching { - isDir = w.paths[watchfd].isDir - } - w.mu.Unlock() - - if !alreadyWatching { - fi, err := os.Lstat(name) - if err != nil { - return "", err - } - - // Don't watch sockets. - if fi.Mode()&os.ModeSocket == os.ModeSocket { - return "", nil - } - - // Don't watch named pipes. - if fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe { - return "", nil - } - - // Follow Symlinks - // Unfortunately, Linux can add bogus symlinks to watch list without - // issue, and Windows can't do symlinks period (AFAIK). To maintain - // consistency, we will act like everything is fine. There will simply - // be no file events for broken symlinks. - // Hence the returns of nil on errors. - if fi.Mode()&os.ModeSymlink == os.ModeSymlink { - name, err = filepath.EvalSymlinks(name) - if err != nil { - return "", nil - } - - w.mu.Lock() - _, alreadyWatching = w.watches[name] - w.mu.Unlock() - - if alreadyWatching { - return name, nil - } - - fi, err = os.Lstat(name) - if err != nil { - return "", nil - } - } - - watchfd, err = unix.Open(name, openMode, 0700) - if watchfd == -1 { - return "", err - } - - isDir = fi.IsDir() - } - - const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE - if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil { - unix.Close(watchfd) - return "", err - } - - if !alreadyWatching { - w.mu.Lock() - w.watches[name] = watchfd - w.paths[watchfd] = pathInfo{name: name, isDir: isDir} - w.mu.Unlock() - } - - if isDir { - // Watch the directory if it has not been watched before, - // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) - w.mu.Lock() - - watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && - (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE) - // Store flags so this watch can be updated later - w.dirFlags[name] = flags - w.mu.Unlock() - - if watchDir { - if err := w.watchDirectoryFiles(name); err != nil { - return "", err - } - } - } - return name, nil -} - -// readEvents reads from kqueue and converts the received kevents into -// Event values that it sends down the Events channel. -func (w *Watcher) readEvents() { - eventBuffer := make([]unix.Kevent_t, 10) - - for { - // See if there is a message on the "done" channel - select { - case <-w.done: - err := unix.Close(w.kq) - if err != nil { - w.Errors <- err - } - close(w.Events) - close(w.Errors) - return - default: - } - - // Get new events - kevents, err := read(w.kq, eventBuffer, &keventWaitTime) - // EINTR is okay, the syscall was interrupted before timeout expired. - if err != nil && err != unix.EINTR { - w.Errors <- err - continue - } - - // Flush the events we received to the Events channel - for len(kevents) > 0 { - kevent := &kevents[0] - watchfd := int(kevent.Ident) - mask := uint32(kevent.Fflags) - w.mu.Lock() - path := w.paths[watchfd] - w.mu.Unlock() - event := newEvent(path.name, mask) - - if path.isDir && !(event.Op&Remove == Remove) { - // Double check to make sure the directory exists. This can happen when - // we do a rm -fr on a recursively watched folders and we receive a - // modification event first but the folder has been deleted and later - // receive the delete event - if _, err := os.Lstat(event.Name); os.IsNotExist(err) { - // mark is as delete event - event.Op |= Remove - } - } - - if event.Op&Rename == Rename || event.Op&Remove == Remove { - w.Remove(event.Name) - w.mu.Lock() - delete(w.fileExists, event.Name) - w.mu.Unlock() - } - - if path.isDir && event.Op&Write == Write && !(event.Op&Remove == Remove) { - w.sendDirectoryChangeEvents(event.Name) - } else { - // Send the event on the Events channel - w.Events <- event - } - - if event.Op&Remove == Remove { - // Look for a file that may have overwritten this. - // For example, mv f1 f2 will delete f2, then create f2. - if path.isDir { - fileDir := filepath.Clean(event.Name) - w.mu.Lock() - _, found := w.watches[fileDir] - w.mu.Unlock() - if found { - // make sure the directory exists before we watch for changes. When we - // do a recursive watch and perform rm -fr, the parent directory might - // have gone missing, ignore the missing directory and let the - // upcoming delete event remove the watch from the parent directory. - if _, err := os.Lstat(fileDir); err == nil { - w.sendDirectoryChangeEvents(fileDir) - } - } - } else { - filePath := filepath.Clean(event.Name) - if fileInfo, err := os.Lstat(filePath); err == nil { - w.sendFileCreatedEventIfNew(filePath, fileInfo) - } - } - } - - // Move to next event - kevents = kevents[1:] - } - } -} - -// newEvent returns an platform-independent Event based on kqueue Fflags. -func newEvent(name string, mask uint32) Event { - e := Event{Name: name} - if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { - e.Op |= Remove - } - if mask&unix.NOTE_WRITE == unix.NOTE_WRITE { - e.Op |= Write - } - if mask&unix.NOTE_RENAME == unix.NOTE_RENAME { - e.Op |= Rename - } - if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB { - e.Op |= Chmod - } - return e -} - -func newCreateEvent(name string) Event { - return Event{Name: name, Op: Create} -} - -// watchDirectoryFiles to mimic inotify when adding a watch on a directory -func (w *Watcher) watchDirectoryFiles(dirPath string) error { - // Get all files - files, err := ioutil.ReadDir(dirPath) - if err != nil { - return err - } - - for _, fileInfo := range files { - filePath := filepath.Join(dirPath, fileInfo.Name()) - filePath, err = w.internalWatch(filePath, fileInfo) - if err != nil { - return err - } - - w.mu.Lock() - w.fileExists[filePath] = true - w.mu.Unlock() - } - - return nil -} - -// sendDirectoryEvents searches the directory for newly created files -// and sends them over the event channel. This functionality is to have -// the BSD version of fsnotify match Linux inotify which provides a -// create event for files created in a watched directory. -func (w *Watcher) sendDirectoryChangeEvents(dirPath string) { - // Get all files - files, err := ioutil.ReadDir(dirPath) - if err != nil { - w.Errors <- err - } - - // Search for new files - for _, fileInfo := range files { - filePath := filepath.Join(dirPath, fileInfo.Name()) - err := w.sendFileCreatedEventIfNew(filePath, fileInfo) - - if err != nil { - return - } - } -} - -// sendFileCreatedEvent sends a create event if the file isn't already being tracked. -func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) { - w.mu.Lock() - _, doesExist := w.fileExists[filePath] - w.mu.Unlock() - if !doesExist { - // Send create event - w.Events <- newCreateEvent(filePath) - } - - // like watchDirectoryFiles (but without doing another ReadDir) - filePath, err = w.internalWatch(filePath, fileInfo) - if err != nil { - return err - } - - w.mu.Lock() - w.fileExists[filePath] = true - w.mu.Unlock() - - return nil -} - -func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) { - if fileInfo.IsDir() { - // mimic Linux providing delete events for subdirectories - // but preserve the flags used if currently watching subdirectory - w.mu.Lock() - flags := w.dirFlags[name] - w.mu.Unlock() - - flags |= unix.NOTE_DELETE | unix.NOTE_RENAME - return w.addWatch(name, flags) - } - - // watch file to mimic Linux inotify - return w.addWatch(name, noteAllEvents) -} - -// kqueue creates a new kernel event queue and returns a descriptor. -func kqueue() (kq int, err error) { - kq, err = unix.Kqueue() - if kq == -1 { - return kq, err - } - return kq, nil -} - -// register events with the queue -func register(kq int, fds []int, flags int, fflags uint32) error { - changes := make([]unix.Kevent_t, len(fds)) - - for i, fd := range fds { - // SetKevent converts int to the platform-specific types: - unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags) - changes[i].Fflags = fflags - } - - // register the events - success, err := unix.Kevent(kq, changes, nil, nil) - if success == -1 { - return err - } - return nil -} - -// read retrieves pending events, or waits until an event occurs. -// A timeout of nil blocks indefinitely, while 0 polls the queue. -func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) { - n, err := unix.Kevent(kq, nil, events, timeout) - if err != nil { - return nil, err - } - return events[0:n], nil -} - -// durationToTimespec prepares a timeout value -func durationToTimespec(d time.Duration) unix.Timespec { - return unix.NsecToTimespec(d.Nanoseconds()) -} diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go deleted file mode 100644 index 7d8de1451..000000000 --- a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build freebsd openbsd netbsd dragonfly - -package fsnotify - -import "golang.org/x/sys/unix" - -const openMode = unix.O_NONBLOCK | unix.O_RDONLY diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go deleted file mode 100644 index 9139e1716..000000000 --- a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin - -package fsnotify - -import "golang.org/x/sys/unix" - -// note: this constant is not defined on BSD -const openMode = unix.O_EVTONLY diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go deleted file mode 100644 index 09436f31d..000000000 --- a/vendor/github.com/fsnotify/fsnotify/windows.go +++ /dev/null @@ -1,561 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build windows - -package fsnotify - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "runtime" - "sync" - "syscall" - "unsafe" -) - -// Watcher watches a set of files, delivering events to a channel. -type Watcher struct { - Events chan Event - Errors chan error - isClosed bool // Set to true when Close() is first called - mu sync.Mutex // Map access - port syscall.Handle // Handle to completion port - watches watchMap // Map of watches (key: i-number) - input chan *input // Inputs to the reader are sent on this channel - quit chan chan<- error -} - -// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. -func NewWatcher() (*Watcher, error) { - port, e := syscall.CreateIoCompletionPort(syscall.InvalidHandle, 0, 0, 0) - if e != nil { - return nil, os.NewSyscallError("CreateIoCompletionPort", e) - } - w := &Watcher{ - port: port, - watches: make(watchMap), - input: make(chan *input, 1), - Events: make(chan Event, 50), - Errors: make(chan error), - quit: make(chan chan<- error, 1), - } - go w.readEvents() - return w, nil -} - -// Close removes all watches and closes the events channel. -func (w *Watcher) Close() error { - if w.isClosed { - return nil - } - w.isClosed = true - - // Send "quit" message to the reader goroutine - ch := make(chan error) - w.quit <- ch - if err := w.wakeupReader(); err != nil { - return err - } - return <-ch -} - -// Add starts watching the named file or directory (non-recursively). -func (w *Watcher) Add(name string) error { - if w.isClosed { - return errors.New("watcher already closed") - } - in := &input{ - op: opAddWatch, - path: filepath.Clean(name), - flags: sysFSALLEVENTS, - reply: make(chan error), - } - w.input <- in - if err := w.wakeupReader(); err != nil { - return err - } - return <-in.reply -} - -// Remove stops watching the the named file or directory (non-recursively). -func (w *Watcher) Remove(name string) error { - in := &input{ - op: opRemoveWatch, - path: filepath.Clean(name), - reply: make(chan error), - } - w.input <- in - if err := w.wakeupReader(); err != nil { - return err - } - return <-in.reply -} - -const ( - // Options for AddWatch - sysFSONESHOT = 0x80000000 - sysFSONLYDIR = 0x1000000 - - // Events - sysFSACCESS = 0x1 - sysFSALLEVENTS = 0xfff - sysFSATTRIB = 0x4 - sysFSCLOSE = 0x18 - sysFSCREATE = 0x100 - sysFSDELETE = 0x200 - sysFSDELETESELF = 0x400 - sysFSMODIFY = 0x2 - sysFSMOVE = 0xc0 - sysFSMOVEDFROM = 0x40 - sysFSMOVEDTO = 0x80 - sysFSMOVESELF = 0x800 - - // Special events - sysFSIGNORED = 0x8000 - sysFSQOVERFLOW = 0x4000 -) - -func newEvent(name string, mask uint32) Event { - e := Event{Name: name} - if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO { - e.Op |= Create - } - if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF { - e.Op |= Remove - } - if mask&sysFSMODIFY == sysFSMODIFY { - e.Op |= Write - } - if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM { - e.Op |= Rename - } - if mask&sysFSATTRIB == sysFSATTRIB { - e.Op |= Chmod - } - return e -} - -const ( - opAddWatch = iota - opRemoveWatch -) - -const ( - provisional uint64 = 1 << (32 + iota) -) - -type input struct { - op int - path string - flags uint32 - reply chan error -} - -type inode struct { - handle syscall.Handle - volume uint32 - index uint64 -} - -type watch struct { - ov syscall.Overlapped - ino *inode // i-number - path string // Directory path - mask uint64 // Directory itself is being watched with these notify flags - names map[string]uint64 // Map of names being watched and their notify flags - rename string // Remembers the old name while renaming a file - buf [4096]byte -} - -type indexMap map[uint64]*watch -type watchMap map[uint32]indexMap - -func (w *Watcher) wakeupReader() error { - e := syscall.PostQueuedCompletionStatus(w.port, 0, 0, nil) - if e != nil { - return os.NewSyscallError("PostQueuedCompletionStatus", e) - } - return nil -} - -func getDir(pathname string) (dir string, err error) { - attr, e := syscall.GetFileAttributes(syscall.StringToUTF16Ptr(pathname)) - if e != nil { - return "", os.NewSyscallError("GetFileAttributes", e) - } - if attr&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 { - dir = pathname - } else { - dir, _ = filepath.Split(pathname) - dir = filepath.Clean(dir) - } - return -} - -func getIno(path string) (ino *inode, err error) { - h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(path), - syscall.FILE_LIST_DIRECTORY, - syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE, - nil, syscall.OPEN_EXISTING, - syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OVERLAPPED, 0) - if e != nil { - return nil, os.NewSyscallError("CreateFile", e) - } - var fi syscall.ByHandleFileInformation - if e = syscall.GetFileInformationByHandle(h, &fi); e != nil { - syscall.CloseHandle(h) - return nil, os.NewSyscallError("GetFileInformationByHandle", e) - } - ino = &inode{ - handle: h, - volume: fi.VolumeSerialNumber, - index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow), - } - return ino, nil -} - -// Must run within the I/O thread. -func (m watchMap) get(ino *inode) *watch { - if i := m[ino.volume]; i != nil { - return i[ino.index] - } - return nil -} - -// Must run within the I/O thread. -func (m watchMap) set(ino *inode, watch *watch) { - i := m[ino.volume] - if i == nil { - i = make(indexMap) - m[ino.volume] = i - } - i[ino.index] = watch -} - -// Must run within the I/O thread. -func (w *Watcher) addWatch(pathname string, flags uint64) error { - dir, err := getDir(pathname) - if err != nil { - return err - } - if flags&sysFSONLYDIR != 0 && pathname != dir { - return nil - } - ino, err := getIno(dir) - if err != nil { - return err - } - w.mu.Lock() - watchEntry := w.watches.get(ino) - w.mu.Unlock() - if watchEntry == nil { - if _, e := syscall.CreateIoCompletionPort(ino.handle, w.port, 0, 0); e != nil { - syscall.CloseHandle(ino.handle) - return os.NewSyscallError("CreateIoCompletionPort", e) - } - watchEntry = &watch{ - ino: ino, - path: dir, - names: make(map[string]uint64), - } - w.mu.Lock() - w.watches.set(ino, watchEntry) - w.mu.Unlock() - flags |= provisional - } else { - syscall.CloseHandle(ino.handle) - } - if pathname == dir { - watchEntry.mask |= flags - } else { - watchEntry.names[filepath.Base(pathname)] |= flags - } - if err = w.startRead(watchEntry); err != nil { - return err - } - if pathname == dir { - watchEntry.mask &= ^provisional - } else { - watchEntry.names[filepath.Base(pathname)] &= ^provisional - } - return nil -} - -// Must run within the I/O thread. -func (w *Watcher) remWatch(pathname string) error { - dir, err := getDir(pathname) - if err != nil { - return err - } - ino, err := getIno(dir) - if err != nil { - return err - } - w.mu.Lock() - watch := w.watches.get(ino) - w.mu.Unlock() - if watch == nil { - return fmt.Errorf("can't remove non-existent watch for: %s", pathname) - } - if pathname == dir { - w.sendEvent(watch.path, watch.mask&sysFSIGNORED) - watch.mask = 0 - } else { - name := filepath.Base(pathname) - w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED) - delete(watch.names, name) - } - return w.startRead(watch) -} - -// Must run within the I/O thread. -func (w *Watcher) deleteWatch(watch *watch) { - for name, mask := range watch.names { - if mask&provisional == 0 { - w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED) - } - delete(watch.names, name) - } - if watch.mask != 0 { - if watch.mask&provisional == 0 { - w.sendEvent(watch.path, watch.mask&sysFSIGNORED) - } - watch.mask = 0 - } -} - -// Must run within the I/O thread. -func (w *Watcher) startRead(watch *watch) error { - if e := syscall.CancelIo(watch.ino.handle); e != nil { - w.Errors <- os.NewSyscallError("CancelIo", e) - w.deleteWatch(watch) - } - mask := toWindowsFlags(watch.mask) - for _, m := range watch.names { - mask |= toWindowsFlags(m) - } - if mask == 0 { - if e := syscall.CloseHandle(watch.ino.handle); e != nil { - w.Errors <- os.NewSyscallError("CloseHandle", e) - } - w.mu.Lock() - delete(w.watches[watch.ino.volume], watch.ino.index) - w.mu.Unlock() - return nil - } - e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0], - uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0) - if e != nil { - err := os.NewSyscallError("ReadDirectoryChanges", e) - if e == syscall.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 { - // Watched directory was probably removed - if w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) { - if watch.mask&sysFSONESHOT != 0 { - watch.mask = 0 - } - } - err = nil - } - w.deleteWatch(watch) - w.startRead(watch) - return err - } - return nil -} - -// readEvents reads from the I/O completion port, converts the -// received events into Event objects and sends them via the Events channel. -// Entry point to the I/O thread. -func (w *Watcher) readEvents() { - var ( - n, key uint32 - ov *syscall.Overlapped - ) - runtime.LockOSThread() - - for { - e := syscall.GetQueuedCompletionStatus(w.port, &n, &key, &ov, syscall.INFINITE) - watch := (*watch)(unsafe.Pointer(ov)) - - if watch == nil { - select { - case ch := <-w.quit: - w.mu.Lock() - var indexes []indexMap - for _, index := range w.watches { - indexes = append(indexes, index) - } - w.mu.Unlock() - for _, index := range indexes { - for _, watch := range index { - w.deleteWatch(watch) - w.startRead(watch) - } - } - var err error - if e := syscall.CloseHandle(w.port); e != nil { - err = os.NewSyscallError("CloseHandle", e) - } - close(w.Events) - close(w.Errors) - ch <- err - return - case in := <-w.input: - switch in.op { - case opAddWatch: - in.reply <- w.addWatch(in.path, uint64(in.flags)) - case opRemoveWatch: - in.reply <- w.remWatch(in.path) - } - default: - } - continue - } - - switch e { - case syscall.ERROR_MORE_DATA: - if watch == nil { - w.Errors <- errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer") - } else { - // The i/o succeeded but the buffer is full. - // In theory we should be building up a full packet. - // In practice we can get away with just carrying on. - n = uint32(unsafe.Sizeof(watch.buf)) - } - case syscall.ERROR_ACCESS_DENIED: - // Watched directory was probably removed - w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) - w.deleteWatch(watch) - w.startRead(watch) - continue - case syscall.ERROR_OPERATION_ABORTED: - // CancelIo was called on this handle - continue - default: - w.Errors <- os.NewSyscallError("GetQueuedCompletionPort", e) - continue - case nil: - } - - var offset uint32 - for { - if n == 0 { - w.Events <- newEvent("", sysFSQOVERFLOW) - w.Errors <- errors.New("short read in readEvents()") - break - } - - // Point "raw" to the event in the buffer - raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset])) - buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName)) - name := syscall.UTF16ToString(buf[:raw.FileNameLength/2]) - fullname := filepath.Join(watch.path, name) - - var mask uint64 - switch raw.Action { - case syscall.FILE_ACTION_REMOVED: - mask = sysFSDELETESELF - case syscall.FILE_ACTION_MODIFIED: - mask = sysFSMODIFY - case syscall.FILE_ACTION_RENAMED_OLD_NAME: - watch.rename = name - case syscall.FILE_ACTION_RENAMED_NEW_NAME: - if watch.names[watch.rename] != 0 { - watch.names[name] |= watch.names[watch.rename] - delete(watch.names, watch.rename) - mask = sysFSMOVESELF - } - } - - sendNameEvent := func() { - if w.sendEvent(fullname, watch.names[name]&mask) { - if watch.names[name]&sysFSONESHOT != 0 { - delete(watch.names, name) - } - } - } - if raw.Action != syscall.FILE_ACTION_RENAMED_NEW_NAME { - sendNameEvent() - } - if raw.Action == syscall.FILE_ACTION_REMOVED { - w.sendEvent(fullname, watch.names[name]&sysFSIGNORED) - delete(watch.names, name) - } - if w.sendEvent(fullname, watch.mask&toFSnotifyFlags(raw.Action)) { - if watch.mask&sysFSONESHOT != 0 { - watch.mask = 0 - } - } - if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME { - fullname = filepath.Join(watch.path, watch.rename) - sendNameEvent() - } - - // Move to the next event in the buffer - if raw.NextEntryOffset == 0 { - break - } - offset += raw.NextEntryOffset - - // Error! - if offset >= n { - w.Errors <- errors.New("Windows system assumed buffer larger than it is, events have likely been missed.") - break - } - } - - if err := w.startRead(watch); err != nil { - w.Errors <- err - } - } -} - -func (w *Watcher) sendEvent(name string, mask uint64) bool { - if mask == 0 { - return false - } - event := newEvent(name, uint32(mask)) - select { - case ch := <-w.quit: - w.quit <- ch - case w.Events <- event: - } - return true -} - -func toWindowsFlags(mask uint64) uint32 { - var m uint32 - if mask&sysFSACCESS != 0 { - m |= syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS - } - if mask&sysFSMODIFY != 0 { - m |= syscall.FILE_NOTIFY_CHANGE_LAST_WRITE - } - if mask&sysFSATTRIB != 0 { - m |= syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES - } - if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 { - m |= syscall.FILE_NOTIFY_CHANGE_FILE_NAME | syscall.FILE_NOTIFY_CHANGE_DIR_NAME - } - return m -} - -func toFSnotifyFlags(action uint32) uint64 { - switch action { - case syscall.FILE_ACTION_ADDED: - return sysFSCREATE - case syscall.FILE_ACTION_REMOVED: - return sysFSDELETE - case syscall.FILE_ACTION_MODIFIED: - return sysFSMODIFY - case syscall.FILE_ACTION_RENAMED_OLD_NAME: - return sysFSMOVEDFROM - case syscall.FILE_ACTION_RENAMED_NEW_NAME: - return sysFSMOVEDTO - } - return 0 -} diff --git a/vendor/github.com/garyburd/redigo/.travis.yml b/vendor/github.com/garyburd/redigo/.travis.yml deleted file mode 100644 index e70302ea1..000000000 --- a/vendor/github.com/garyburd/redigo/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go -sudo: false -services: - - redis-server - -go: - - 1.4 - - 1.5 - - 1.6 - - 1.7 - - 1.8 - - tip - -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d .) - - go vet $(go list ./... | grep -v /vendor/) - - go test -v -race ./... diff --git a/vendor/github.com/garyburd/redigo/README.markdown b/vendor/github.com/garyburd/redigo/README.markdown deleted file mode 100644 index fb0d35c93..000000000 --- a/vendor/github.com/garyburd/redigo/README.markdown +++ /dev/null @@ -1,50 +0,0 @@ -Redigo -====== - -[![Build Status](https://travis-ci.org/garyburd/redigo.svg?branch=master)](https://travis-ci.org/garyburd/redigo) -[![GoDoc](https://godoc.org/github.com/garyburd/redigo/redis?status.svg)](https://godoc.org/github.com/garyburd/redigo/redis) - -Redigo is a [Go](http://golang.org/) client for the [Redis](http://redis.io/) database. - -Features -------- - -* A [Print-like](http://godoc.org/github.com/garyburd/redigo/redis#hdr-Executing_Commands) API with support for all Redis commands. -* [Pipelining](http://godoc.org/github.com/garyburd/redigo/redis#hdr-Pipelining), including pipelined transactions. -* [Publish/Subscribe](http://godoc.org/github.com/garyburd/redigo/redis#hdr-Publish_and_Subscribe). -* [Connection pooling](http://godoc.org/github.com/garyburd/redigo/redis#Pool). -* [Script helper type](http://godoc.org/github.com/garyburd/redigo/redis#Script) with optimistic use of EVALSHA. -* [Helper functions](http://godoc.org/github.com/garyburd/redigo/redis#hdr-Reply_Helpers) for working with command replies. - -Documentation -------------- - -- [API Reference](http://godoc.org/github.com/garyburd/redigo/redis) -- [FAQ](https://github.com/garyburd/redigo/wiki/FAQ) - -Installation ------------- - -Install Redigo using the "go get" command: - - go get github.com/garyburd/redigo/redis - -The Go distribution is Redigo's only dependency. - -Related Projects ----------------- - -- [rafaeljusto/redigomock](https://godoc.org/github.com/rafaeljusto/redigomock) - A mock library for Redigo. -- [chasex/redis-go-cluster](https://github.com/chasex/redis-go-cluster) - A Redis cluster client implementation. -- [FZambia/go-sentinel](https://github.com/FZambia/go-sentinel) - Redis Sentinel support for Redigo -- [PuerkitoBio/redisc](https://github.com/PuerkitoBio/redisc) - Redis Cluster client built on top of Redigo - -Contributing ------------- - -See [CONTRIBUTING.md](https://github.com/garyburd/redigo/blob/master/.github/CONTRIBUTING.md). - -License -------- - -Redigo is available under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). diff --git a/vendor/github.com/garyburd/redigo/internal/commandinfo.go b/vendor/github.com/garyburd/redigo/internal/commandinfo.go deleted file mode 100644 index 11e584257..000000000 --- a/vendor/github.com/garyburd/redigo/internal/commandinfo.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2014 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package internal // import "github.com/garyburd/redigo/internal" - -import ( - "strings" -) - -const ( - WatchState = 1 << iota - MultiState - SubscribeState - MonitorState -) - -type CommandInfo struct { - Set, Clear int -} - -var commandInfos = map[string]CommandInfo{ - "WATCH": {Set: WatchState}, - "UNWATCH": {Clear: WatchState}, - "MULTI": {Set: MultiState}, - "EXEC": {Clear: WatchState | MultiState}, - "DISCARD": {Clear: WatchState | MultiState}, - "PSUBSCRIBE": {Set: SubscribeState}, - "SUBSCRIBE": {Set: SubscribeState}, - "MONITOR": {Set: MonitorState}, -} - -func init() { - for n, ci := range commandInfos { - commandInfos[strings.ToLower(n)] = ci - } -} - -func LookupCommandInfo(commandName string) CommandInfo { - if ci, ok := commandInfos[commandName]; ok { - return ci - } - return commandInfos[strings.ToUpper(commandName)] -} diff --git a/vendor/github.com/garyburd/redigo/internal/commandinfo_test.go b/vendor/github.com/garyburd/redigo/internal/commandinfo_test.go deleted file mode 100644 index 118e94b67..000000000 --- a/vendor/github.com/garyburd/redigo/internal/commandinfo_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package internal - -import "testing" - -func TestLookupCommandInfo(t *testing.T) { - for _, n := range []string{"watch", "WATCH", "wAtch"} { - if LookupCommandInfo(n) == (CommandInfo{}) { - t.Errorf("LookupCommandInfo(%q) = CommandInfo{}, expected non-zero value", n) - } - } -} - -func benchmarkLookupCommandInfo(b *testing.B, names ...string) { - for i := 0; i < b.N; i++ { - for _, c := range names { - LookupCommandInfo(c) - } - } -} - -func BenchmarkLookupCommandInfoCorrectCase(b *testing.B) { - benchmarkLookupCommandInfo(b, "watch", "WATCH", "monitor", "MONITOR") -} - -func BenchmarkLookupCommandInfoMixedCase(b *testing.B) { - benchmarkLookupCommandInfo(b, "wAtch", "WeTCH", "monItor", "MONiTOR") -} diff --git a/vendor/github.com/garyburd/redigo/redis/conn.go b/vendor/github.com/garyburd/redigo/redis/conn.go deleted file mode 100644 index 6ccace078..000000000 --- a/vendor/github.com/garyburd/redigo/redis/conn.go +++ /dev/null @@ -1,618 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "bufio" - "bytes" - "crypto/tls" - "errors" - "fmt" - "io" - "net" - "net/url" - "regexp" - "strconv" - "sync" - "time" -) - -// conn is the low-level implementation of Conn -type conn struct { - - // Shared - mu sync.Mutex - pending int - err error - conn net.Conn - - // Read - readTimeout time.Duration - br *bufio.Reader - - // Write - writeTimeout time.Duration - bw *bufio.Writer - - // Scratch space for formatting argument length. - // '*' or '$', length, "\r\n" - lenScratch [32]byte - - // Scratch space for formatting integers and floats. - numScratch [40]byte -} - -// DialTimeout acts like Dial but takes timeouts for establishing the -// connection to the server, writing a command and reading a reply. -// -// Deprecated: Use Dial with options instead. -func DialTimeout(network, address string, connectTimeout, readTimeout, writeTimeout time.Duration) (Conn, error) { - return Dial(network, address, - DialConnectTimeout(connectTimeout), - DialReadTimeout(readTimeout), - DialWriteTimeout(writeTimeout)) -} - -// DialOption specifies an option for dialing a Redis server. -type DialOption struct { - f func(*dialOptions) -} - -type dialOptions struct { - readTimeout time.Duration - writeTimeout time.Duration - dial func(network, addr string) (net.Conn, error) - db int - password string - dialTLS bool - skipVerify bool - tlsConfig *tls.Config -} - -// DialReadTimeout specifies the timeout for reading a single command reply. -func DialReadTimeout(d time.Duration) DialOption { - return DialOption{func(do *dialOptions) { - do.readTimeout = d - }} -} - -// DialWriteTimeout specifies the timeout for writing a single command. -func DialWriteTimeout(d time.Duration) DialOption { - return DialOption{func(do *dialOptions) { - do.writeTimeout = d - }} -} - -// DialConnectTimeout specifies the timeout for connecting to the Redis server. -func DialConnectTimeout(d time.Duration) DialOption { - return DialOption{func(do *dialOptions) { - dialer := net.Dialer{Timeout: d} - do.dial = dialer.Dial - }} -} - -// DialNetDial specifies a custom dial function for creating TCP -// connections. If this option is left out, then net.Dial is -// used. DialNetDial overrides DialConnectTimeout. -func DialNetDial(dial func(network, addr string) (net.Conn, error)) DialOption { - return DialOption{func(do *dialOptions) { - do.dial = dial - }} -} - -// DialDatabase specifies the database to select when dialing a connection. -func DialDatabase(db int) DialOption { - return DialOption{func(do *dialOptions) { - do.db = db - }} -} - -// DialPassword specifies the password to use when connecting to -// the Redis server. -func DialPassword(password string) DialOption { - return DialOption{func(do *dialOptions) { - do.password = password - }} -} - -// DialTLSConfig specifies the config to use when a TLS connection is dialed. -// Has no effect when not dialing a TLS connection. -func DialTLSConfig(c *tls.Config) DialOption { - return DialOption{func(do *dialOptions) { - do.tlsConfig = c - }} -} - -// DialTLSSkipVerify to disable server name verification when connecting -// over TLS. Has no effect when not dialing a TLS connection. -func DialTLSSkipVerify(skip bool) DialOption { - return DialOption{func(do *dialOptions) { - do.skipVerify = skip - }} -} - -// Dial connects to the Redis server at the given network and -// address using the specified options. -func Dial(network, address string, options ...DialOption) (Conn, error) { - do := dialOptions{ - dial: net.Dial, - } - for _, option := range options { - option.f(&do) - } - - netConn, err := do.dial(network, address) - if err != nil { - return nil, err - } - - if do.dialTLS { - tlsConfig := cloneTLSClientConfig(do.tlsConfig, do.skipVerify) - if tlsConfig.ServerName == "" { - host, _, err := net.SplitHostPort(address) - if err != nil { - netConn.Close() - return nil, err - } - tlsConfig.ServerName = host - } - - tlsConn := tls.Client(netConn, tlsConfig) - if err := tlsConn.Handshake(); err != nil { - netConn.Close() - return nil, err - } - netConn = tlsConn - } - - c := &conn{ - conn: netConn, - bw: bufio.NewWriter(netConn), - br: bufio.NewReader(netConn), - readTimeout: do.readTimeout, - writeTimeout: do.writeTimeout, - } - - if do.password != "" { - if _, err := c.Do("AUTH", do.password); err != nil { - netConn.Close() - return nil, err - } - } - - if do.db != 0 { - if _, err := c.Do("SELECT", do.db); err != nil { - netConn.Close() - return nil, err - } - } - - return c, nil -} - -func dialTLS(do *dialOptions) { - do.dialTLS = true -} - -var pathDBRegexp = regexp.MustCompile(`/(\d*)\z`) - -// DialURL connects to a Redis server at the given URL using the Redis -// URI scheme. URLs should follow the draft IANA specification for the -// scheme (https://www.iana.org/assignments/uri-schemes/prov/redis). -func DialURL(rawurl string, options ...DialOption) (Conn, error) { - u, err := url.Parse(rawurl) - if err != nil { - return nil, err - } - - if u.Scheme != "redis" && u.Scheme != "rediss" { - return nil, fmt.Errorf("invalid redis URL scheme: %s", u.Scheme) - } - - // As per the IANA draft spec, the host defaults to localhost and - // the port defaults to 6379. - host, port, err := net.SplitHostPort(u.Host) - if err != nil { - // assume port is missing - host = u.Host - port = "6379" - } - if host == "" { - host = "localhost" - } - address := net.JoinHostPort(host, port) - - if u.User != nil { - password, isSet := u.User.Password() - if isSet { - options = append(options, DialPassword(password)) - } - } - - match := pathDBRegexp.FindStringSubmatch(u.Path) - if len(match) == 2 { - db := 0 - if len(match[1]) > 0 { - db, err = strconv.Atoi(match[1]) - if err != nil { - return nil, fmt.Errorf("invalid database: %s", u.Path[1:]) - } - } - if db != 0 { - options = append(options, DialDatabase(db)) - } - } else if u.Path != "" { - return nil, fmt.Errorf("invalid database: %s", u.Path[1:]) - } - - if u.Scheme == "rediss" { - options = append([]DialOption{{dialTLS}}, options...) - } - - return Dial("tcp", address, options...) -} - -// NewConn returns a new Redigo connection for the given net connection. -func NewConn(netConn net.Conn, readTimeout, writeTimeout time.Duration) Conn { - return &conn{ - conn: netConn, - bw: bufio.NewWriter(netConn), - br: bufio.NewReader(netConn), - readTimeout: readTimeout, - writeTimeout: writeTimeout, - } -} - -func (c *conn) Close() error { - c.mu.Lock() - err := c.err - if c.err == nil { - c.err = errors.New("redigo: closed") - err = c.conn.Close() - } - c.mu.Unlock() - return err -} - -func (c *conn) fatal(err error) error { - c.mu.Lock() - if c.err == nil { - c.err = err - // Close connection to force errors on subsequent calls and to unblock - // other reader or writer. - c.conn.Close() - } - c.mu.Unlock() - return err -} - -func (c *conn) Err() error { - c.mu.Lock() - err := c.err - c.mu.Unlock() - return err -} - -func (c *conn) writeLen(prefix byte, n int) error { - c.lenScratch[len(c.lenScratch)-1] = '\n' - c.lenScratch[len(c.lenScratch)-2] = '\r' - i := len(c.lenScratch) - 3 - for { - c.lenScratch[i] = byte('0' + n%10) - i -= 1 - n = n / 10 - if n == 0 { - break - } - } - c.lenScratch[i] = prefix - _, err := c.bw.Write(c.lenScratch[i:]) - return err -} - -func (c *conn) writeString(s string) error { - c.writeLen('$', len(s)) - c.bw.WriteString(s) - _, err := c.bw.WriteString("\r\n") - return err -} - -func (c *conn) writeBytes(p []byte) error { - c.writeLen('$', len(p)) - c.bw.Write(p) - _, err := c.bw.WriteString("\r\n") - return err -} - -func (c *conn) writeInt64(n int64) error { - return c.writeBytes(strconv.AppendInt(c.numScratch[:0], n, 10)) -} - -func (c *conn) writeFloat64(n float64) error { - return c.writeBytes(strconv.AppendFloat(c.numScratch[:0], n, 'g', -1, 64)) -} - -func (c *conn) writeCommand(cmd string, args []interface{}) (err error) { - c.writeLen('*', 1+len(args)) - err = c.writeString(cmd) - for _, arg := range args { - if err != nil { - break - } - switch arg := arg.(type) { - case string: - err = c.writeString(arg) - case []byte: - err = c.writeBytes(arg) - case int: - err = c.writeInt64(int64(arg)) - case int64: - err = c.writeInt64(arg) - case float64: - err = c.writeFloat64(arg) - case bool: - if arg { - err = c.writeString("1") - } else { - err = c.writeString("0") - } - case nil: - err = c.writeString("") - default: - var buf bytes.Buffer - fmt.Fprint(&buf, arg) - err = c.writeBytes(buf.Bytes()) - } - } - return err -} - -type protocolError string - -func (pe protocolError) Error() string { - return fmt.Sprintf("redigo: %s (possible server error or unsupported concurrent read by application)", string(pe)) -} - -func (c *conn) readLine() ([]byte, error) { - p, err := c.br.ReadSlice('\n') - if err == bufio.ErrBufferFull { - return nil, protocolError("long response line") - } - if err != nil { - return nil, err - } - i := len(p) - 2 - if i < 0 || p[i] != '\r' { - return nil, protocolError("bad response line terminator") - } - return p[:i], nil -} - -// parseLen parses bulk string and array lengths. -func parseLen(p []byte) (int, error) { - if len(p) == 0 { - return -1, protocolError("malformed length") - } - - if p[0] == '-' && len(p) == 2 && p[1] == '1' { - // handle $-1 and $-1 null replies. - return -1, nil - } - - var n int - for _, b := range p { - n *= 10 - if b < '0' || b > '9' { - return -1, protocolError("illegal bytes in length") - } - n += int(b - '0') - } - - return n, nil -} - -// parseInt parses an integer reply. -func parseInt(p []byte) (interface{}, error) { - if len(p) == 0 { - return 0, protocolError("malformed integer") - } - - var negate bool - if p[0] == '-' { - negate = true - p = p[1:] - if len(p) == 0 { - return 0, protocolError("malformed integer") - } - } - - var n int64 - for _, b := range p { - n *= 10 - if b < '0' || b > '9' { - return 0, protocolError("illegal bytes in length") - } - n += int64(b - '0') - } - - if negate { - n = -n - } - return n, nil -} - -var ( - okReply interface{} = "OK" - pongReply interface{} = "PONG" -) - -func (c *conn) readReply() (interface{}, error) { - line, err := c.readLine() - if err != nil { - return nil, err - } - if len(line) == 0 { - return nil, protocolError("short response line") - } - switch line[0] { - case '+': - switch { - case len(line) == 3 && line[1] == 'O' && line[2] == 'K': - // Avoid allocation for frequent "+OK" response. - return okReply, nil - case len(line) == 5 && line[1] == 'P' && line[2] == 'O' && line[3] == 'N' && line[4] == 'G': - // Avoid allocation in PING command benchmarks :) - return pongReply, nil - default: - return string(line[1:]), nil - } - case '-': - return Error(string(line[1:])), nil - case ':': - return parseInt(line[1:]) - case '$': - n, err := parseLen(line[1:]) - if n < 0 || err != nil { - return nil, err - } - p := make([]byte, n) - _, err = io.ReadFull(c.br, p) - if err != nil { - return nil, err - } - if line, err := c.readLine(); err != nil { - return nil, err - } else if len(line) != 0 { - return nil, protocolError("bad bulk string format") - } - return p, nil - case '*': - n, err := parseLen(line[1:]) - if n < 0 || err != nil { - return nil, err - } - r := make([]interface{}, n) - for i := range r { - r[i], err = c.readReply() - if err != nil { - return nil, err - } - } - return r, nil - } - return nil, protocolError("unexpected response line") -} - -func (c *conn) Send(cmd string, args ...interface{}) error { - c.mu.Lock() - c.pending += 1 - c.mu.Unlock() - if c.writeTimeout != 0 { - c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)) - } - if err := c.writeCommand(cmd, args); err != nil { - return c.fatal(err) - } - return nil -} - -func (c *conn) Flush() error { - if c.writeTimeout != 0 { - c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)) - } - if err := c.bw.Flush(); err != nil { - return c.fatal(err) - } - return nil -} - -func (c *conn) Receive() (reply interface{}, err error) { - if c.readTimeout != 0 { - c.conn.SetReadDeadline(time.Now().Add(c.readTimeout)) - } - if reply, err = c.readReply(); err != nil { - return nil, c.fatal(err) - } - // When using pub/sub, the number of receives can be greater than the - // number of sends. To enable normal use of the connection after - // unsubscribing from all channels, we do not decrement pending to a - // negative value. - // - // The pending field is decremented after the reply is read to handle the - // case where Receive is called before Send. - c.mu.Lock() - if c.pending > 0 { - c.pending -= 1 - } - c.mu.Unlock() - if err, ok := reply.(Error); ok { - return nil, err - } - return -} - -func (c *conn) Do(cmd string, args ...interface{}) (interface{}, error) { - c.mu.Lock() - pending := c.pending - c.pending = 0 - c.mu.Unlock() - - if cmd == "" && pending == 0 { - return nil, nil - } - - if c.writeTimeout != 0 { - c.conn.SetWriteDeadline(time.Now().Add(c.writeTimeout)) - } - - if cmd != "" { - if err := c.writeCommand(cmd, args); err != nil { - return nil, c.fatal(err) - } - } - - if err := c.bw.Flush(); err != nil { - return nil, c.fatal(err) - } - - if c.readTimeout != 0 { - c.conn.SetReadDeadline(time.Now().Add(c.readTimeout)) - } - - if cmd == "" { - reply := make([]interface{}, pending) - for i := range reply { - r, e := c.readReply() - if e != nil { - return nil, c.fatal(e) - } - reply[i] = r - } - return reply, nil - } - - var err error - var reply interface{} - for i := 0; i <= pending; i++ { - var e error - if reply, e = c.readReply(); e != nil { - return nil, c.fatal(e) - } - if e, ok := reply.(Error); ok && err == nil { - err = e - } - } - return reply, err -} diff --git a/vendor/github.com/garyburd/redigo/redis/conn_test.go b/vendor/github.com/garyburd/redigo/redis/conn_test.go deleted file mode 100644 index 2ead63326..000000000 --- a/vendor/github.com/garyburd/redigo/redis/conn_test.go +++ /dev/null @@ -1,670 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "bytes" - "io" - "math" - "net" - "os" - "reflect" - "strings" - "testing" - "time" - - "github.com/garyburd/redigo/redis" -) - -type testConn struct { - io.Reader - io.Writer -} - -func (*testConn) Close() error { return nil } -func (*testConn) LocalAddr() net.Addr { return nil } -func (*testConn) RemoteAddr() net.Addr { return nil } -func (*testConn) SetDeadline(t time.Time) error { return nil } -func (*testConn) SetReadDeadline(t time.Time) error { return nil } -func (*testConn) SetWriteDeadline(t time.Time) error { return nil } - -func dialTestConn(r io.Reader, w io.Writer) redis.DialOption { - return redis.DialNetDial(func(net, addr string) (net.Conn, error) { - return &testConn{Reader: r, Writer: w}, nil - }) -} - -var writeTests = []struct { - args []interface{} - expected string -}{ - { - []interface{}{"SET", "key", "value"}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n", - }, - { - []interface{}{"SET", "key", "value"}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n", - }, - { - []interface{}{"SET", "key", byte(100)}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$3\r\n100\r\n", - }, - { - []interface{}{"SET", "key", 100}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$3\r\n100\r\n", - }, - { - []interface{}{"SET", "key", int64(math.MinInt64)}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$20\r\n-9223372036854775808\r\n", - }, - { - []interface{}{"SET", "key", float64(1349673917.939762)}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$21\r\n1.349673917939762e+09\r\n", - }, - { - []interface{}{"SET", "key", ""}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$0\r\n\r\n", - }, - { - []interface{}{"SET", "key", nil}, - "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$0\r\n\r\n", - }, - { - []interface{}{"ECHO", true, false}, - "*3\r\n$4\r\nECHO\r\n$1\r\n1\r\n$1\r\n0\r\n", - }, -} - -func TestWrite(t *testing.T) { - for _, tt := range writeTests { - var buf bytes.Buffer - c, _ := redis.Dial("", "", dialTestConn(nil, &buf)) - err := c.Send(tt.args[0].(string), tt.args[1:]...) - if err != nil { - t.Errorf("Send(%v) returned error %v", tt.args, err) - continue - } - c.Flush() - actual := buf.String() - if actual != tt.expected { - t.Errorf("Send(%v) = %q, want %q", tt.args, actual, tt.expected) - } - } -} - -var errorSentinel = &struct{}{} - -var readTests = []struct { - reply string - expected interface{} -}{ - { - "+OK\r\n", - "OK", - }, - { - "+PONG\r\n", - "PONG", - }, - { - "@OK\r\n", - errorSentinel, - }, - { - "$6\r\nfoobar\r\n", - []byte("foobar"), - }, - { - "$-1\r\n", - nil, - }, - { - ":1\r\n", - int64(1), - }, - { - ":-2\r\n", - int64(-2), - }, - { - "*0\r\n", - []interface{}{}, - }, - { - "*-1\r\n", - nil, - }, - { - "*4\r\n$3\r\nfoo\r\n$3\r\nbar\r\n$5\r\nHello\r\n$5\r\nWorld\r\n", - []interface{}{[]byte("foo"), []byte("bar"), []byte("Hello"), []byte("World")}, - }, - { - "*3\r\n$3\r\nfoo\r\n$-1\r\n$3\r\nbar\r\n", - []interface{}{[]byte("foo"), nil, []byte("bar")}, - }, - - { - // "x" is not a valid length - "$x\r\nfoobar\r\n", - errorSentinel, - }, - { - // -2 is not a valid length - "$-2\r\n", - errorSentinel, - }, - { - // "x" is not a valid integer - ":x\r\n", - errorSentinel, - }, - { - // missing \r\n following value - "$6\r\nfoobar", - errorSentinel, - }, - { - // short value - "$6\r\nxx", - errorSentinel, - }, - { - // long value - "$6\r\nfoobarx\r\n", - errorSentinel, - }, -} - -func TestRead(t *testing.T) { - for _, tt := range readTests { - c, _ := redis.Dial("", "", dialTestConn(strings.NewReader(tt.reply), nil)) - actual, err := c.Receive() - if tt.expected == errorSentinel { - if err == nil { - t.Errorf("Receive(%q) did not return expected error", tt.reply) - } - } else { - if err != nil { - t.Errorf("Receive(%q) returned error %v", tt.reply, err) - continue - } - if !reflect.DeepEqual(actual, tt.expected) { - t.Errorf("Receive(%q) = %v, want %v", tt.reply, actual, tt.expected) - } - } - } -} - -var testCommands = []struct { - args []interface{} - expected interface{} -}{ - { - []interface{}{"PING"}, - "PONG", - }, - { - []interface{}{"SET", "foo", "bar"}, - "OK", - }, - { - []interface{}{"GET", "foo"}, - []byte("bar"), - }, - { - []interface{}{"GET", "nokey"}, - nil, - }, - { - []interface{}{"MGET", "nokey", "foo"}, - []interface{}{nil, []byte("bar")}, - }, - { - []interface{}{"INCR", "mycounter"}, - int64(1), - }, - { - []interface{}{"LPUSH", "mylist", "foo"}, - int64(1), - }, - { - []interface{}{"LPUSH", "mylist", "bar"}, - int64(2), - }, - { - []interface{}{"LRANGE", "mylist", 0, -1}, - []interface{}{[]byte("bar"), []byte("foo")}, - }, - { - []interface{}{"MULTI"}, - "OK", - }, - { - []interface{}{"LRANGE", "mylist", 0, -1}, - "QUEUED", - }, - { - []interface{}{"PING"}, - "QUEUED", - }, - { - []interface{}{"EXEC"}, - []interface{}{ - []interface{}{[]byte("bar"), []byte("foo")}, - "PONG", - }, - }, -} - -func TestDoCommands(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - - for _, cmd := range testCommands { - actual, err := c.Do(cmd.args[0].(string), cmd.args[1:]...) - if err != nil { - t.Errorf("Do(%v) returned error %v", cmd.args, err) - continue - } - if !reflect.DeepEqual(actual, cmd.expected) { - t.Errorf("Do(%v) = %v, want %v", cmd.args, actual, cmd.expected) - } - } -} - -func TestPipelineCommands(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - - for _, cmd := range testCommands { - if err := c.Send(cmd.args[0].(string), cmd.args[1:]...); err != nil { - t.Fatalf("Send(%v) returned error %v", cmd.args, err) - } - } - if err := c.Flush(); err != nil { - t.Errorf("Flush() returned error %v", err) - } - for _, cmd := range testCommands { - actual, err := c.Receive() - if err != nil { - t.Fatalf("Receive(%v) returned error %v", cmd.args, err) - } - if !reflect.DeepEqual(actual, cmd.expected) { - t.Errorf("Receive(%v) = %v, want %v", cmd.args, actual, cmd.expected) - } - } -} - -func TestBlankCommmand(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - - for _, cmd := range testCommands { - if err := c.Send(cmd.args[0].(string), cmd.args[1:]...); err != nil { - t.Fatalf("Send(%v) returned error %v", cmd.args, err) - } - } - reply, err := redis.Values(c.Do("")) - if err != nil { - t.Fatalf("Do() returned error %v", err) - } - if len(reply) != len(testCommands) { - t.Fatalf("len(reply)=%d, want %d", len(reply), len(testCommands)) - } - for i, cmd := range testCommands { - actual := reply[i] - if !reflect.DeepEqual(actual, cmd.expected) { - t.Errorf("Receive(%v) = %v, want %v", cmd.args, actual, cmd.expected) - } - } -} - -func TestRecvBeforeSend(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - done := make(chan struct{}) - go func() { - c.Receive() - close(done) - }() - time.Sleep(time.Millisecond) - c.Send("PING") - c.Flush() - <-done - _, err = c.Do("") - if err != nil { - t.Fatalf("error=%v", err) - } -} - -func TestError(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - - c.Do("SET", "key", "val") - _, err = c.Do("HSET", "key", "fld", "val") - if err == nil { - t.Errorf("Expected err for HSET on string key.") - } - if c.Err() != nil { - t.Errorf("Conn has Err()=%v, expect nil", c.Err()) - } - _, err = c.Do("SET", "key", "val") - if err != nil { - t.Errorf("Do(SET, key, val) returned error %v, expected nil.", err) - } -} - -func TestReadTimeout(t *testing.T) { - l, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - t.Fatalf("net.Listen returned %v", err) - } - defer l.Close() - - go func() { - for { - c, err := l.Accept() - if err != nil { - return - } - go func() { - time.Sleep(time.Second) - c.Write([]byte("+OK\r\n")) - c.Close() - }() - } - }() - - // Do - - c1, err := redis.Dial(l.Addr().Network(), l.Addr().String(), redis.DialReadTimeout(time.Millisecond)) - if err != nil { - t.Fatalf("redis.Dial returned %v", err) - } - defer c1.Close() - - _, err = c1.Do("PING") - if err == nil { - t.Fatalf("c1.Do() returned nil, expect error") - } - if c1.Err() == nil { - t.Fatalf("c1.Err() = nil, expect error") - } - - // Send/Flush/Receive - - c2, err := redis.Dial(l.Addr().Network(), l.Addr().String(), redis.DialReadTimeout(time.Millisecond)) - if err != nil { - t.Fatalf("redis.Dial returned %v", err) - } - defer c2.Close() - - c2.Send("PING") - c2.Flush() - _, err = c2.Receive() - if err == nil { - t.Fatalf("c2.Receive() returned nil, expect error") - } - if c2.Err() == nil { - t.Fatalf("c2.Err() = nil, expect error") - } -} - -var dialErrors = []struct { - rawurl string - expectedError string -}{ - { - "localhost", - "invalid redis URL scheme", - }, - // The error message for invalid hosts is diffferent in different - // versions of Go, so just check that there is an error message. - { - "redis://weird url", - "", - }, - { - "redis://foo:bar:baz", - "", - }, - { - "http://www.google.com", - "invalid redis URL scheme: http", - }, - { - "redis://localhost:6379/abc123", - "invalid database: abc123", - }, -} - -func TestDialURLErrors(t *testing.T) { - for _, d := range dialErrors { - _, err := redis.DialURL(d.rawurl) - if err == nil || !strings.Contains(err.Error(), d.expectedError) { - t.Errorf("DialURL did not return expected error (expected %v to contain %s)", err, d.expectedError) - } - } -} - -func TestDialURLPort(t *testing.T) { - checkPort := func(network, address string) (net.Conn, error) { - if address != "localhost:6379" { - t.Errorf("DialURL did not set port to 6379 by default (got %v)", address) - } - return nil, nil - } - _, err := redis.DialURL("redis://localhost", redis.DialNetDial(checkPort)) - if err != nil { - t.Error("dial error:", err) - } -} - -func TestDialURLHost(t *testing.T) { - checkHost := func(network, address string) (net.Conn, error) { - if address != "localhost:6379" { - t.Errorf("DialURL did not set host to localhost by default (got %v)", address) - } - return nil, nil - } - _, err := redis.DialURL("redis://:6379", redis.DialNetDial(checkHost)) - if err != nil { - t.Error("dial error:", err) - } -} - -func TestDialURLPassword(t *testing.T) { - var buf bytes.Buffer - _, err := redis.DialURL("redis://x:abc123@localhost", dialTestConn(strings.NewReader("+OK\r\n"), &buf)) - if err != nil { - t.Error("dial error:", err) - } - expected := "*2\r\n$4\r\nAUTH\r\n$6\r\nabc123\r\n" - actual := buf.String() - if actual != expected { - t.Errorf("commands = %q, want %q", actual, expected) - } -} - -func TestDialURLDatabase(t *testing.T) { - var buf3 bytes.Buffer - _, err3 := redis.DialURL("redis://localhost/3", dialTestConn(strings.NewReader("+OK\r\n"), &buf3)) - if err3 != nil { - t.Error("dial error:", err3) - } - expected3 := "*2\r\n$6\r\nSELECT\r\n$1\r\n3\r\n" - actual3 := buf3.String() - if actual3 != expected3 { - t.Errorf("commands = %q, want %q", actual3, expected3) - } - // empty DB means 0 - var buf0 bytes.Buffer - _, err0 := redis.DialURL("redis://localhost/", dialTestConn(strings.NewReader("+OK\r\n"), &buf0)) - if err0 != nil { - t.Error("dial error:", err0) - } - expected0 := "" - actual0 := buf0.String() - if actual0 != expected0 { - t.Errorf("commands = %q, want %q", actual0, expected0) - } -} - -// Connect to local instance of Redis running on the default port. -func ExampleDial() { - c, err := redis.Dial("tcp", ":6379") - if err != nil { - // handle error - } - defer c.Close() -} - -// Connect to remote instance of Redis using a URL. -func ExampleDialURL() { - c, err := redis.DialURL(os.Getenv("REDIS_URL")) - if err != nil { - // handle connection error - } - defer c.Close() -} - -// TextExecError tests handling of errors in a transaction. See -// http://redis.io/topics/transactions for information on how Redis handles -// errors in a transaction. -func TestExecError(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - - // Execute commands that fail before EXEC is called. - - c.Do("DEL", "k0") - c.Do("ZADD", "k0", 0, 0) - c.Send("MULTI") - c.Send("NOTACOMMAND", "k0", 0, 0) - c.Send("ZINCRBY", "k0", 0, 0) - v, err := c.Do("EXEC") - if err == nil { - t.Fatalf("EXEC returned values %v, expected error", v) - } - - // Execute commands that fail after EXEC is called. The first command - // returns an error. - - c.Do("DEL", "k1") - c.Do("ZADD", "k1", 0, 0) - c.Send("MULTI") - c.Send("HSET", "k1", 0, 0) - c.Send("ZINCRBY", "k1", 0, 0) - v, err = c.Do("EXEC") - if err != nil { - t.Fatalf("EXEC returned error %v", err) - } - - vs, err := redis.Values(v, nil) - if err != nil { - t.Fatalf("Values(v) returned error %v", err) - } - - if len(vs) != 2 { - t.Fatalf("len(vs) == %d, want 2", len(vs)) - } - - if _, ok := vs[0].(error); !ok { - t.Fatalf("first result is type %T, expected error", vs[0]) - } - - if _, ok := vs[1].([]byte); !ok { - t.Fatalf("second result is type %T, expected []byte", vs[1]) - } - - // Execute commands that fail after EXEC is called. The second command - // returns an error. - - c.Do("ZADD", "k2", 0, 0) - c.Send("MULTI") - c.Send("ZINCRBY", "k2", 0, 0) - c.Send("HSET", "k2", 0, 0) - v, err = c.Do("EXEC") - if err != nil { - t.Fatalf("EXEC returned error %v", err) - } - - vs, err = redis.Values(v, nil) - if err != nil { - t.Fatalf("Values(v) returned error %v", err) - } - - if len(vs) != 2 { - t.Fatalf("len(vs) == %d, want 2", len(vs)) - } - - if _, ok := vs[0].([]byte); !ok { - t.Fatalf("first result is type %T, expected []byte", vs[0]) - } - - if _, ok := vs[1].(error); !ok { - t.Fatalf("second result is type %T, expected error", vs[2]) - } -} - -func BenchmarkDoEmpty(b *testing.B) { - b.StopTimer() - c, err := redis.DialDefaultServer() - if err != nil { - b.Fatal(err) - } - defer c.Close() - b.StartTimer() - for i := 0; i < b.N; i++ { - if _, err := c.Do(""); err != nil { - b.Fatal(err) - } - } -} - -func BenchmarkDoPing(b *testing.B) { - b.StopTimer() - c, err := redis.DialDefaultServer() - if err != nil { - b.Fatal(err) - } - defer c.Close() - b.StartTimer() - for i := 0; i < b.N; i++ { - if _, err := c.Do("PING"); err != nil { - b.Fatal(err) - } - } -} diff --git a/vendor/github.com/garyburd/redigo/redis/doc.go b/vendor/github.com/garyburd/redigo/redis/doc.go deleted file mode 100644 index d4f489280..000000000 --- a/vendor/github.com/garyburd/redigo/redis/doc.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -// Package redis is a client for the Redis database. -// -// The Redigo FAQ (https://github.com/garyburd/redigo/wiki/FAQ) contains more -// documentation about this package. -// -// Connections -// -// The Conn interface is the primary interface for working with Redis. -// Applications create connections by calling the Dial, DialWithTimeout or -// NewConn functions. In the future, functions will be added for creating -// sharded and other types of connections. -// -// The application must call the connection Close method when the application -// is done with the connection. -// -// Executing Commands -// -// The Conn interface has a generic method for executing Redis commands: -// -// Do(commandName string, args ...interface{}) (reply interface{}, err error) -// -// The Redis command reference (http://redis.io/commands) lists the available -// commands. An example of using the Redis APPEND command is: -// -// n, err := conn.Do("APPEND", "key", "value") -// -// The Do method converts command arguments to binary strings for transmission -// to the server as follows: -// -// Go Type Conversion -// []byte Sent as is -// string Sent as is -// int, int64 strconv.FormatInt(v) -// float64 strconv.FormatFloat(v, 'g', -1, 64) -// bool true -> "1", false -> "0" -// nil "" -// all other types fmt.Print(v) -// -// Redis command reply types are represented using the following Go types: -// -// Redis type Go type -// error redis.Error -// integer int64 -// simple string string -// bulk string []byte or nil if value not present. -// array []interface{} or nil if value not present. -// -// Use type assertions or the reply helper functions to convert from -// interface{} to the specific Go type for the command result. -// -// Pipelining -// -// Connections support pipelining using the Send, Flush and Receive methods. -// -// Send(commandName string, args ...interface{}) error -// Flush() error -// Receive() (reply interface{}, err error) -// -// Send writes the command to the connection's output buffer. Flush flushes the -// connection's output buffer to the server. Receive reads a single reply from -// the server. The following example shows a simple pipeline. -// -// c.Send("SET", "foo", "bar") -// c.Send("GET", "foo") -// c.Flush() -// c.Receive() // reply from SET -// v, err = c.Receive() // reply from GET -// -// The Do method combines the functionality of the Send, Flush and Receive -// methods. The Do method starts by writing the command and flushing the output -// buffer. Next, the Do method receives all pending replies including the reply -// for the command just sent by Do. If any of the received replies is an error, -// then Do returns the error. If there are no errors, then Do returns the last -// reply. If the command argument to the Do method is "", then the Do method -// will flush the output buffer and receive pending replies without sending a -// command. -// -// Use the Send and Do methods to implement pipelined transactions. -// -// c.Send("MULTI") -// c.Send("INCR", "foo") -// c.Send("INCR", "bar") -// r, err := c.Do("EXEC") -// fmt.Println(r) // prints [1, 1] -// -// Concurrency -// -// Connections support one concurrent caller to the Receive method and one -// concurrent caller to the Send and Flush methods. No other concurrency is -// supported including concurrent calls to the Do method. -// -// For full concurrent access to Redis, use the thread-safe Pool to get, use -// and release a connection from within a goroutine. Connections returned from -// a Pool have the concurrency restrictions described in the previous -// paragraph. -// -// Publish and Subscribe -// -// Use the Send, Flush and Receive methods to implement Pub/Sub subscribers. -// -// c.Send("SUBSCRIBE", "example") -// c.Flush() -// for { -// reply, err := c.Receive() -// if err != nil { -// return err -// } -// // process pushed message -// } -// -// The PubSubConn type wraps a Conn with convenience methods for implementing -// subscribers. The Subscribe, PSubscribe, Unsubscribe and PUnsubscribe methods -// send and flush a subscription management command. The receive method -// converts a pushed message to convenient types for use in a type switch. -// -// psc := redis.PubSubConn{Conn: c} -// psc.Subscribe("example") -// for { -// switch v := psc.Receive().(type) { -// case redis.Message: -// fmt.Printf("%s: message: %s\n", v.Channel, v.Data) -// case redis.Subscription: -// fmt.Printf("%s: %s %d\n", v.Channel, v.Kind, v.Count) -// case error: -// return v -// } -// } -// -// Reply Helpers -// -// The Bool, Int, Bytes, String, Strings and Values functions convert a reply -// to a value of a specific type. To allow convenient wrapping of calls to the -// connection Do and Receive methods, the functions take a second argument of -// type error. If the error is non-nil, then the helper function returns the -// error. If the error is nil, the function converts the reply to the specified -// type: -// -// exists, err := redis.Bool(c.Do("EXISTS", "foo")) -// if err != nil { -// // handle error return from c.Do or type conversion error. -// } -// -// The Scan function converts elements of a array reply to Go types: -// -// var value1 int -// var value2 string -// reply, err := redis.Values(c.Do("MGET", "key1", "key2")) -// if err != nil { -// // handle error -// } -// if _, err := redis.Scan(reply, &value1, &value2); err != nil { -// // handle error -// } -// -// Errors -// -// Connection methods return error replies from the server as type redis.Error. -// -// Call the connection Err() method to determine if the connection encountered -// non-recoverable error such as a network error or protocol parsing error. If -// Err() returns a non-nil value, then the connection is not usable and should -// be closed. -package redis // import "github.com/garyburd/redigo/redis" diff --git a/vendor/github.com/garyburd/redigo/redis/go17.go b/vendor/github.com/garyburd/redigo/redis/go17.go deleted file mode 100644 index 3f951e5ef..000000000 --- a/vendor/github.com/garyburd/redigo/redis/go17.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build go1.7 - -package redis - -import "crypto/tls" - -// similar cloneTLSClientConfig in the stdlib, but also honor skipVerify for the nil case -func cloneTLSClientConfig(cfg *tls.Config, skipVerify bool) *tls.Config { - if cfg == nil { - return &tls.Config{InsecureSkipVerify: skipVerify} - } - return &tls.Config{ - Rand: cfg.Rand, - Time: cfg.Time, - Certificates: cfg.Certificates, - NameToCertificate: cfg.NameToCertificate, - GetCertificate: cfg.GetCertificate, - RootCAs: cfg.RootCAs, - NextProtos: cfg.NextProtos, - ServerName: cfg.ServerName, - ClientAuth: cfg.ClientAuth, - ClientCAs: cfg.ClientCAs, - InsecureSkipVerify: cfg.InsecureSkipVerify, - CipherSuites: cfg.CipherSuites, - PreferServerCipherSuites: cfg.PreferServerCipherSuites, - ClientSessionCache: cfg.ClientSessionCache, - MinVersion: cfg.MinVersion, - MaxVersion: cfg.MaxVersion, - CurvePreferences: cfg.CurvePreferences, - DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled, - Renegotiation: cfg.Renegotiation, - } -} diff --git a/vendor/github.com/garyburd/redigo/redis/log.go b/vendor/github.com/garyburd/redigo/redis/log.go deleted file mode 100644 index 129b86d67..000000000 --- a/vendor/github.com/garyburd/redigo/redis/log.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "bytes" - "fmt" - "log" -) - -// NewLoggingConn returns a logging wrapper around a connection. -func NewLoggingConn(conn Conn, logger *log.Logger, prefix string) Conn { - if prefix != "" { - prefix = prefix + "." - } - return &loggingConn{conn, logger, prefix} -} - -type loggingConn struct { - Conn - logger *log.Logger - prefix string -} - -func (c *loggingConn) Close() error { - err := c.Conn.Close() - var buf bytes.Buffer - fmt.Fprintf(&buf, "%sClose() -> (%v)", c.prefix, err) - c.logger.Output(2, buf.String()) - return err -} - -func (c *loggingConn) printValue(buf *bytes.Buffer, v interface{}) { - const chop = 32 - switch v := v.(type) { - case []byte: - if len(v) > chop { - fmt.Fprintf(buf, "%q...", v[:chop]) - } else { - fmt.Fprintf(buf, "%q", v) - } - case string: - if len(v) > chop { - fmt.Fprintf(buf, "%q...", v[:chop]) - } else { - fmt.Fprintf(buf, "%q", v) - } - case []interface{}: - if len(v) == 0 { - buf.WriteString("[]") - } else { - sep := "[" - fin := "]" - if len(v) > chop { - v = v[:chop] - fin = "...]" - } - for _, vv := range v { - buf.WriteString(sep) - c.printValue(buf, vv) - sep = ", " - } - buf.WriteString(fin) - } - default: - fmt.Fprint(buf, v) - } -} - -func (c *loggingConn) print(method, commandName string, args []interface{}, reply interface{}, err error) { - var buf bytes.Buffer - fmt.Fprintf(&buf, "%s%s(", c.prefix, method) - if method != "Receive" { - buf.WriteString(commandName) - for _, arg := range args { - buf.WriteString(", ") - c.printValue(&buf, arg) - } - } - buf.WriteString(") -> (") - if method != "Send" { - c.printValue(&buf, reply) - buf.WriteString(", ") - } - fmt.Fprintf(&buf, "%v)", err) - c.logger.Output(3, buf.String()) -} - -func (c *loggingConn) Do(commandName string, args ...interface{}) (interface{}, error) { - reply, err := c.Conn.Do(commandName, args...) - c.print("Do", commandName, args, reply, err) - return reply, err -} - -func (c *loggingConn) Send(commandName string, args ...interface{}) error { - err := c.Conn.Send(commandName, args...) - c.print("Send", commandName, args, nil, err) - return err -} - -func (c *loggingConn) Receive() (interface{}, error) { - reply, err := c.Conn.Receive() - c.print("Receive", "", nil, reply, err) - return reply, err -} diff --git a/vendor/github.com/garyburd/redigo/redis/pool.go b/vendor/github.com/garyburd/redigo/redis/pool.go deleted file mode 100644 index 283a41d5a..000000000 --- a/vendor/github.com/garyburd/redigo/redis/pool.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "bytes" - "container/list" - "crypto/rand" - "crypto/sha1" - "errors" - "io" - "strconv" - "sync" - "time" - - "github.com/garyburd/redigo/internal" -) - -var nowFunc = time.Now // for testing - -// ErrPoolExhausted is returned from a pool connection method (Do, Send, -// Receive, Flush, Err) when the maximum number of database connections in the -// pool has been reached. -var ErrPoolExhausted = errors.New("redigo: connection pool exhausted") - -var ( - errPoolClosed = errors.New("redigo: connection pool closed") - errConnClosed = errors.New("redigo: connection closed") -) - -// Pool maintains a pool of connections. The application calls the Get method -// to get a connection from the pool and the connection's Close method to -// return the connection's resources to the pool. -// -// The following example shows how to use a pool in a web application. The -// application creates a pool at application startup and makes it available to -// request handlers using a package level variable. The pool configuration used -// here is an example, not a recommendation. -// -// func newPool(addr string) *redis.Pool { -// return &redis.Pool{ -// MaxIdle: 3, -// IdleTimeout: 240 * time.Second, -// Dial: func () (redis.Conn, error) { return redis.Dial("tcp", addr) }, -// } -// } -// -// var ( -// pool *redis.Pool -// redisServer = flag.String("redisServer", ":6379", "") -// ) -// -// func main() { -// flag.Parse() -// pool = newPool(*redisServer) -// ... -// } -// -// A request handler gets a connection from the pool and closes the connection -// when the handler is done: -// -// func serveHome(w http.ResponseWriter, r *http.Request) { -// conn := pool.Get() -// defer conn.Close() -// ... -// } -// -// Use the Dial function to authenticate connections with the AUTH command or -// select a database with the SELECT command: -// -// pool := &redis.Pool{ -// // Other pool configuration not shown in this example. -// Dial: func () (redis.Conn, error) { -// c, err := redis.Dial("tcp", server) -// if err != nil { -// return nil, err -// } -// if _, err := c.Do("AUTH", password); err != nil { -// c.Close() -// return nil, err -// } -// if _, err := c.Do("SELECT", db); err != nil { -// c.Close() -// return nil, err -// } -// return c, nil -// } -// } -// -// Use the TestOnBorrow function to check the health of an idle connection -// before the connection is returned to the application. This example PINGs -// connections that have been idle more than a minute: -// -// pool := &redis.Pool{ -// // Other pool configuration not shown in this example. -// TestOnBorrow: func(c redis.Conn, t time.Time) error { -// if time.Since(t) < time.Minute { -// return nil -// } -// _, err := c.Do("PING") -// return err -// }, -// } -// -type Pool struct { - - // Dial is an application supplied function for creating and configuring a - // connection. - // - // The connection returned from Dial must not be in a special state - // (subscribed to pubsub channel, transaction started, ...). - Dial func() (Conn, error) - - // TestOnBorrow is an optional application supplied function for checking - // the health of an idle connection before the connection is used again by - // the application. Argument t is the time that the connection was returned - // to the pool. If the function returns an error, then the connection is - // closed. - TestOnBorrow func(c Conn, t time.Time) error - - // Maximum number of idle connections in the pool. - MaxIdle int - - // Maximum number of connections allocated by the pool at a given time. - // When zero, there is no limit on the number of connections in the pool. - MaxActive int - - // Close connections after remaining idle for this duration. If the value - // is zero, then idle connections are not closed. Applications should set - // the timeout to a value less than the server's timeout. - IdleTimeout time.Duration - - // If Wait is true and the pool is at the MaxActive limit, then Get() waits - // for a connection to be returned to the pool before returning. - Wait bool - - // mu protects fields defined below. - mu sync.Mutex - cond *sync.Cond - closed bool - active int - - // Stack of idleConn with most recently used at the front. - idle list.List -} - -type idleConn struct { - c Conn - t time.Time -} - -// NewPool creates a new pool. -// -// Deprecated: Initialize the Pool directory as shown in the example. -func NewPool(newFn func() (Conn, error), maxIdle int) *Pool { - return &Pool{Dial: newFn, MaxIdle: maxIdle} -} - -// Get gets a connection. The application must close the returned connection. -// This method always returns a valid connection so that applications can defer -// error handling to the first use of the connection. If there is an error -// getting an underlying connection, then the connection Err, Do, Send, Flush -// and Receive methods return that error. -func (p *Pool) Get() Conn { - c, err := p.get() - if err != nil { - return errorConnection{err} - } - return &pooledConnection{p: p, c: c} -} - -// ActiveCount returns the number of active connections in the pool. -func (p *Pool) ActiveCount() int { - p.mu.Lock() - active := p.active - p.mu.Unlock() - return active -} - -// Close releases the resources used by the pool. -func (p *Pool) Close() error { - p.mu.Lock() - idle := p.idle - p.idle.Init() - p.closed = true - p.active -= idle.Len() - if p.cond != nil { - p.cond.Broadcast() - } - p.mu.Unlock() - for e := idle.Front(); e != nil; e = e.Next() { - e.Value.(idleConn).c.Close() - } - return nil -} - -// release decrements the active count and signals waiters. The caller must -// hold p.mu during the call. -func (p *Pool) release() { - p.active -= 1 - if p.cond != nil { - p.cond.Signal() - } -} - -// get prunes stale connections and returns a connection from the idle list or -// creates a new connection. -func (p *Pool) get() (Conn, error) { - p.mu.Lock() - - // Prune stale connections. - - if timeout := p.IdleTimeout; timeout > 0 { - for i, n := 0, p.idle.Len(); i < n; i++ { - e := p.idle.Back() - if e == nil { - break - } - ic := e.Value.(idleConn) - if ic.t.Add(timeout).After(nowFunc()) { - break - } - p.idle.Remove(e) - p.release() - p.mu.Unlock() - ic.c.Close() - p.mu.Lock() - } - } - - for { - - // Get idle connection. - - for i, n := 0, p.idle.Len(); i < n; i++ { - e := p.idle.Front() - if e == nil { - break - } - ic := e.Value.(idleConn) - p.idle.Remove(e) - test := p.TestOnBorrow - p.mu.Unlock() - if test == nil || test(ic.c, ic.t) == nil { - return ic.c, nil - } - ic.c.Close() - p.mu.Lock() - p.release() - } - - // Check for pool closed before dialing a new connection. - - if p.closed { - p.mu.Unlock() - return nil, errors.New("redigo: get on closed pool") - } - - // Dial new connection if under limit. - - if p.MaxActive == 0 || p.active < p.MaxActive { - dial := p.Dial - p.active += 1 - p.mu.Unlock() - c, err := dial() - if err != nil { - p.mu.Lock() - p.release() - p.mu.Unlock() - c = nil - } - return c, err - } - - if !p.Wait { - p.mu.Unlock() - return nil, ErrPoolExhausted - } - - if p.cond == nil { - p.cond = sync.NewCond(&p.mu) - } - p.cond.Wait() - } -} - -func (p *Pool) put(c Conn, forceClose bool) error { - err := c.Err() - p.mu.Lock() - if !p.closed && err == nil && !forceClose { - p.idle.PushFront(idleConn{t: nowFunc(), c: c}) - if p.idle.Len() > p.MaxIdle { - c = p.idle.Remove(p.idle.Back()).(idleConn).c - } else { - c = nil - } - } - - if c == nil { - if p.cond != nil { - p.cond.Signal() - } - p.mu.Unlock() - return nil - } - - p.release() - p.mu.Unlock() - return c.Close() -} - -type pooledConnection struct { - p *Pool - c Conn - state int -} - -var ( - sentinel []byte - sentinelOnce sync.Once -) - -func initSentinel() { - p := make([]byte, 64) - if _, err := rand.Read(p); err == nil { - sentinel = p - } else { - h := sha1.New() - io.WriteString(h, "Oops, rand failed. Use time instead.") - io.WriteString(h, strconv.FormatInt(time.Now().UnixNano(), 10)) - sentinel = h.Sum(nil) - } -} - -func (pc *pooledConnection) Close() error { - c := pc.c - if _, ok := c.(errorConnection); ok { - return nil - } - pc.c = errorConnection{errConnClosed} - - if pc.state&internal.MultiState != 0 { - c.Send("DISCARD") - pc.state &^= (internal.MultiState | internal.WatchState) - } else if pc.state&internal.WatchState != 0 { - c.Send("UNWATCH") - pc.state &^= internal.WatchState - } - if pc.state&internal.SubscribeState != 0 { - c.Send("UNSUBSCRIBE") - c.Send("PUNSUBSCRIBE") - // To detect the end of the message stream, ask the server to echo - // a sentinel value and read until we see that value. - sentinelOnce.Do(initSentinel) - c.Send("ECHO", sentinel) - c.Flush() - for { - p, err := c.Receive() - if err != nil { - break - } - if p, ok := p.([]byte); ok && bytes.Equal(p, sentinel) { - pc.state &^= internal.SubscribeState - break - } - } - } - c.Do("") - pc.p.put(c, pc.state != 0) - return nil -} - -func (pc *pooledConnection) Err() error { - return pc.c.Err() -} - -func (pc *pooledConnection) Do(commandName string, args ...interface{}) (reply interface{}, err error) { - ci := internal.LookupCommandInfo(commandName) - pc.state = (pc.state | ci.Set) &^ ci.Clear - return pc.c.Do(commandName, args...) -} - -func (pc *pooledConnection) Send(commandName string, args ...interface{}) error { - ci := internal.LookupCommandInfo(commandName) - pc.state = (pc.state | ci.Set) &^ ci.Clear - return pc.c.Send(commandName, args...) -} - -func (pc *pooledConnection) Flush() error { - return pc.c.Flush() -} - -func (pc *pooledConnection) Receive() (reply interface{}, err error) { - return pc.c.Receive() -} - -type errorConnection struct{ err error } - -func (ec errorConnection) Do(string, ...interface{}) (interface{}, error) { return nil, ec.err } -func (ec errorConnection) Send(string, ...interface{}) error { return ec.err } -func (ec errorConnection) Err() error { return ec.err } -func (ec errorConnection) Close() error { return ec.err } -func (ec errorConnection) Flush() error { return ec.err } -func (ec errorConnection) Receive() (interface{}, error) { return nil, ec.err } diff --git a/vendor/github.com/garyburd/redigo/redis/pool_test.go b/vendor/github.com/garyburd/redigo/redis/pool_test.go deleted file mode 100644 index 26d2747ae..000000000 --- a/vendor/github.com/garyburd/redigo/redis/pool_test.go +++ /dev/null @@ -1,684 +0,0 @@ -// Copyright 2011 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "errors" - "io" - "reflect" - "sync" - "testing" - "time" - - "github.com/garyburd/redigo/redis" -) - -type poolTestConn struct { - d *poolDialer - err error - redis.Conn -} - -func (c *poolTestConn) Close() error { - c.d.mu.Lock() - c.d.open -= 1 - c.d.mu.Unlock() - return c.Conn.Close() -} - -func (c *poolTestConn) Err() error { return c.err } - -func (c *poolTestConn) Do(commandName string, args ...interface{}) (interface{}, error) { - if commandName == "ERR" { - c.err = args[0].(error) - commandName = "PING" - } - if commandName != "" { - c.d.commands = append(c.d.commands, commandName) - } - return c.Conn.Do(commandName, args...) -} - -func (c *poolTestConn) Send(commandName string, args ...interface{}) error { - c.d.commands = append(c.d.commands, commandName) - return c.Conn.Send(commandName, args...) -} - -type poolDialer struct { - mu sync.Mutex - t *testing.T - dialed int - open int - commands []string - dialErr error -} - -func (d *poolDialer) dial() (redis.Conn, error) { - d.mu.Lock() - d.dialed += 1 - dialErr := d.dialErr - d.mu.Unlock() - if dialErr != nil { - return nil, d.dialErr - } - c, err := redis.DialDefaultServer() - if err != nil { - return nil, err - } - d.mu.Lock() - d.open += 1 - d.mu.Unlock() - return &poolTestConn{d: d, Conn: c}, nil -} - -func (d *poolDialer) check(message string, p *redis.Pool, dialed, open int) { - d.mu.Lock() - if d.dialed != dialed { - d.t.Errorf("%s: dialed=%d, want %d", message, d.dialed, dialed) - } - if d.open != open { - d.t.Errorf("%s: open=%d, want %d", message, d.open, open) - } - if active := p.ActiveCount(); active != open { - d.t.Errorf("%s: active=%d, want %d", message, active, open) - } - d.mu.Unlock() -} - -func TestPoolReuse(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - Dial: d.dial, - } - - for i := 0; i < 10; i++ { - c1 := p.Get() - c1.Do("PING") - c2 := p.Get() - c2.Do("PING") - c1.Close() - c2.Close() - } - - d.check("before close", p, 2, 2) - p.Close() - d.check("after close", p, 2, 0) -} - -func TestPoolMaxIdle(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - Dial: d.dial, - } - defer p.Close() - - for i := 0; i < 10; i++ { - c1 := p.Get() - c1.Do("PING") - c2 := p.Get() - c2.Do("PING") - c3 := p.Get() - c3.Do("PING") - c1.Close() - c2.Close() - c3.Close() - } - d.check("before close", p, 12, 2) - p.Close() - d.check("after close", p, 12, 0) -} - -func TestPoolError(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - Dial: d.dial, - } - defer p.Close() - - c := p.Get() - c.Do("ERR", io.EOF) - if c.Err() == nil { - t.Errorf("expected c.Err() != nil") - } - c.Close() - - c = p.Get() - c.Do("ERR", io.EOF) - c.Close() - - d.check(".", p, 2, 0) -} - -func TestPoolClose(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - Dial: d.dial, - } - defer p.Close() - - c1 := p.Get() - c1.Do("PING") - c2 := p.Get() - c2.Do("PING") - c3 := p.Get() - c3.Do("PING") - - c1.Close() - if _, err := c1.Do("PING"); err == nil { - t.Errorf("expected error after connection closed") - } - - c2.Close() - c2.Close() - - p.Close() - - d.check("after pool close", p, 3, 1) - - if _, err := c1.Do("PING"); err == nil { - t.Errorf("expected error after connection and pool closed") - } - - c3.Close() - - d.check("after conn close", p, 3, 0) - - c1 = p.Get() - if _, err := c1.Do("PING"); err == nil { - t.Errorf("expected error after pool closed") - } -} - -func TestPoolTimeout(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - IdleTimeout: 300 * time.Second, - Dial: d.dial, - } - defer p.Close() - - now := time.Now() - redis.SetNowFunc(func() time.Time { return now }) - defer redis.SetNowFunc(time.Now) - - c := p.Get() - c.Do("PING") - c.Close() - - d.check("1", p, 1, 1) - - now = now.Add(p.IdleTimeout) - - c = p.Get() - c.Do("PING") - c.Close() - - d.check("2", p, 2, 1) -} - -func TestPoolConcurrenSendReceive(t *testing.T) { - p := &redis.Pool{ - Dial: redis.DialDefaultServer, - } - defer p.Close() - - c := p.Get() - done := make(chan error, 1) - go func() { - _, err := c.Receive() - done <- err - }() - c.Send("PING") - c.Flush() - err := <-done - if err != nil { - t.Fatalf("Receive() returned error %v", err) - } - _, err = c.Do("") - if err != nil { - t.Fatalf("Do() returned error %v", err) - } - c.Close() -} - -func TestPoolBorrowCheck(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - Dial: d.dial, - TestOnBorrow: func(redis.Conn, time.Time) error { return redis.Error("BLAH") }, - } - defer p.Close() - - for i := 0; i < 10; i++ { - c := p.Get() - c.Do("PING") - c.Close() - } - d.check("1", p, 10, 1) -} - -func TestPoolMaxActive(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - MaxActive: 2, - Dial: d.dial, - } - defer p.Close() - - c1 := p.Get() - c1.Do("PING") - c2 := p.Get() - c2.Do("PING") - - d.check("1", p, 2, 2) - - c3 := p.Get() - if _, err := c3.Do("PING"); err != redis.ErrPoolExhausted { - t.Errorf("expected pool exhausted") - } - - c3.Close() - d.check("2", p, 2, 2) - c2.Close() - d.check("3", p, 2, 2) - - c3 = p.Get() - if _, err := c3.Do("PING"); err != nil { - t.Errorf("expected good channel, err=%v", err) - } - c3.Close() - - d.check("4", p, 2, 2) -} - -func TestPoolMonitorCleanup(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - MaxActive: 2, - Dial: d.dial, - } - defer p.Close() - - c := p.Get() - c.Send("MONITOR") - c.Close() - - d.check("", p, 1, 0) -} - -func TestPoolPubSubCleanup(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - MaxActive: 2, - Dial: d.dial, - } - defer p.Close() - - c := p.Get() - c.Send("SUBSCRIBE", "x") - c.Close() - - want := []string{"SUBSCRIBE", "UNSUBSCRIBE", "PUNSUBSCRIBE", "ECHO"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil - - c = p.Get() - c.Send("PSUBSCRIBE", "x*") - c.Close() - - want = []string{"PSUBSCRIBE", "UNSUBSCRIBE", "PUNSUBSCRIBE", "ECHO"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil -} - -func TestPoolTransactionCleanup(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 2, - MaxActive: 2, - Dial: d.dial, - } - defer p.Close() - - c := p.Get() - c.Do("WATCH", "key") - c.Do("PING") - c.Close() - - want := []string{"WATCH", "PING", "UNWATCH"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil - - c = p.Get() - c.Do("WATCH", "key") - c.Do("UNWATCH") - c.Do("PING") - c.Close() - - want = []string{"WATCH", "UNWATCH", "PING"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil - - c = p.Get() - c.Do("WATCH", "key") - c.Do("MULTI") - c.Do("PING") - c.Close() - - want = []string{"WATCH", "MULTI", "PING", "DISCARD"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil - - c = p.Get() - c.Do("WATCH", "key") - c.Do("MULTI") - c.Do("DISCARD") - c.Do("PING") - c.Close() - - want = []string{"WATCH", "MULTI", "DISCARD", "PING"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil - - c = p.Get() - c.Do("WATCH", "key") - c.Do("MULTI") - c.Do("EXEC") - c.Do("PING") - c.Close() - - want = []string{"WATCH", "MULTI", "EXEC", "PING"} - if !reflect.DeepEqual(d.commands, want) { - t.Errorf("got commands %v, want %v", d.commands, want) - } - d.commands = nil -} - -func startGoroutines(p *redis.Pool, cmd string, args ...interface{}) chan error { - errs := make(chan error, 10) - for i := 0; i < cap(errs); i++ { - go func() { - c := p.Get() - _, err := c.Do(cmd, args...) - errs <- err - c.Close() - }() - } - - // Wait for goroutines to block. - time.Sleep(time.Second / 4) - - return errs -} - -func TestWaitPool(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 1, - MaxActive: 1, - Dial: d.dial, - Wait: true, - } - defer p.Close() - - c := p.Get() - errs := startGoroutines(p, "PING") - d.check("before close", p, 1, 1) - c.Close() - timeout := time.After(2 * time.Second) - for i := 0; i < cap(errs); i++ { - select { - case err := <-errs: - if err != nil { - t.Fatal(err) - } - case <-timeout: - t.Fatalf("timeout waiting for blocked goroutine %d", i) - } - } - d.check("done", p, 1, 1) -} - -func TestWaitPoolClose(t *testing.T) { - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 1, - MaxActive: 1, - Dial: d.dial, - Wait: true, - } - defer p.Close() - - c := p.Get() - if _, err := c.Do("PING"); err != nil { - t.Fatal(err) - } - errs := startGoroutines(p, "PING") - d.check("before close", p, 1, 1) - p.Close() - timeout := time.After(2 * time.Second) - for i := 0; i < cap(errs); i++ { - select { - case err := <-errs: - switch err { - case nil: - t.Fatal("blocked goroutine did not get error") - case redis.ErrPoolExhausted: - t.Fatal("blocked goroutine got pool exhausted error") - } - case <-timeout: - t.Fatal("timeout waiting for blocked goroutine") - } - } - c.Close() - d.check("done", p, 1, 0) -} - -func TestWaitPoolCommandError(t *testing.T) { - testErr := errors.New("test") - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 1, - MaxActive: 1, - Dial: d.dial, - Wait: true, - } - defer p.Close() - - c := p.Get() - errs := startGoroutines(p, "ERR", testErr) - d.check("before close", p, 1, 1) - c.Close() - timeout := time.After(2 * time.Second) - for i := 0; i < cap(errs); i++ { - select { - case err := <-errs: - if err != nil { - t.Fatal(err) - } - case <-timeout: - t.Fatalf("timeout waiting for blocked goroutine %d", i) - } - } - d.check("done", p, cap(errs), 0) -} - -func TestWaitPoolDialError(t *testing.T) { - testErr := errors.New("test") - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: 1, - MaxActive: 1, - Dial: d.dial, - Wait: true, - } - defer p.Close() - - c := p.Get() - errs := startGoroutines(p, "ERR", testErr) - d.check("before close", p, 1, 1) - - d.dialErr = errors.New("dial") - c.Close() - - nilCount := 0 - errCount := 0 - timeout := time.After(2 * time.Second) - for i := 0; i < cap(errs); i++ { - select { - case err := <-errs: - switch err { - case nil: - nilCount++ - case d.dialErr: - errCount++ - default: - t.Fatalf("expected dial error or nil, got %v", err) - } - case <-timeout: - t.Fatalf("timeout waiting for blocked goroutine %d", i) - } - } - if nilCount != 1 { - t.Errorf("expected one nil error, got %d", nilCount) - } - if errCount != cap(errs)-1 { - t.Errorf("expected %d dial errors, got %d", cap(errs)-1, errCount) - } - d.check("done", p, cap(errs), 0) -} - -// Borrowing requires us to iterate over the idle connections, unlock the pool, -// and perform a blocking operation to check the connection still works. If -// TestOnBorrow fails, we must reacquire the lock and continue iteration. This -// test ensures that iteration will work correctly if multiple threads are -// iterating simultaneously. -func TestLocking_TestOnBorrowFails_PoolDoesntCrash(t *testing.T) { - const count = 100 - - // First we'll Create a pool where the pilfering of idle connections fails. - d := poolDialer{t: t} - p := &redis.Pool{ - MaxIdle: count, - MaxActive: count, - Dial: d.dial, - TestOnBorrow: func(c redis.Conn, t time.Time) error { - return errors.New("No way back into the real world.") - }, - } - defer p.Close() - - // Fill the pool with idle connections. - conns := make([]redis.Conn, count) - for i := range conns { - conns[i] = p.Get() - } - for i := range conns { - conns[i].Close() - } - - // Spawn a bunch of goroutines to thrash the pool. - var wg sync.WaitGroup - wg.Add(count) - for i := 0; i < count; i++ { - go func() { - c := p.Get() - if c.Err() != nil { - t.Errorf("pool get failed: %v", c.Err()) - } - c.Close() - wg.Done() - }() - } - wg.Wait() - if d.dialed != count*2 { - t.Errorf("Expected %d dials, got %d", count*2, d.dialed) - } -} - -func BenchmarkPoolGet(b *testing.B) { - b.StopTimer() - p := redis.Pool{Dial: redis.DialDefaultServer, MaxIdle: 2} - c := p.Get() - if err := c.Err(); err != nil { - b.Fatal(err) - } - c.Close() - defer p.Close() - b.StartTimer() - for i := 0; i < b.N; i++ { - c = p.Get() - c.Close() - } -} - -func BenchmarkPoolGetErr(b *testing.B) { - b.StopTimer() - p := redis.Pool{Dial: redis.DialDefaultServer, MaxIdle: 2} - c := p.Get() - if err := c.Err(); err != nil { - b.Fatal(err) - } - c.Close() - defer p.Close() - b.StartTimer() - for i := 0; i < b.N; i++ { - c = p.Get() - if err := c.Err(); err != nil { - b.Fatal(err) - } - c.Close() - } -} - -func BenchmarkPoolGetPing(b *testing.B) { - b.StopTimer() - p := redis.Pool{Dial: redis.DialDefaultServer, MaxIdle: 2} - c := p.Get() - if err := c.Err(); err != nil { - b.Fatal(err) - } - c.Close() - defer p.Close() - b.StartTimer() - for i := 0; i < b.N; i++ { - c = p.Get() - if _, err := c.Do("PING"); err != nil { - b.Fatal(err) - } - c.Close() - } -} diff --git a/vendor/github.com/garyburd/redigo/redis/pre_go17.go b/vendor/github.com/garyburd/redigo/redis/pre_go17.go deleted file mode 100644 index 0212f60fb..000000000 --- a/vendor/github.com/garyburd/redigo/redis/pre_go17.go +++ /dev/null @@ -1,31 +0,0 @@ -// +build !go1.7 - -package redis - -import "crypto/tls" - -// similar cloneTLSClientConfig in the stdlib, but also honor skipVerify for the nil case -func cloneTLSClientConfig(cfg *tls.Config, skipVerify bool) *tls.Config { - if cfg == nil { - return &tls.Config{InsecureSkipVerify: skipVerify} - } - return &tls.Config{ - Rand: cfg.Rand, - Time: cfg.Time, - Certificates: cfg.Certificates, - NameToCertificate: cfg.NameToCertificate, - GetCertificate: cfg.GetCertificate, - RootCAs: cfg.RootCAs, - NextProtos: cfg.NextProtos, - ServerName: cfg.ServerName, - ClientAuth: cfg.ClientAuth, - ClientCAs: cfg.ClientCAs, - InsecureSkipVerify: cfg.InsecureSkipVerify, - CipherSuites: cfg.CipherSuites, - PreferServerCipherSuites: cfg.PreferServerCipherSuites, - ClientSessionCache: cfg.ClientSessionCache, - MinVersion: cfg.MinVersion, - MaxVersion: cfg.MaxVersion, - CurvePreferences: cfg.CurvePreferences, - } -} diff --git a/vendor/github.com/garyburd/redigo/redis/pubsub.go b/vendor/github.com/garyburd/redigo/redis/pubsub.go deleted file mode 100644 index c0ecce824..000000000 --- a/vendor/github.com/garyburd/redigo/redis/pubsub.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import "errors" - -// Subscription represents a subscribe or unsubscribe notification. -type Subscription struct { - - // Kind is "subscribe", "unsubscribe", "psubscribe" or "punsubscribe" - Kind string - - // The channel that was changed. - Channel string - - // The current number of subscriptions for connection. - Count int -} - -// Message represents a message notification. -type Message struct { - - // The originating channel. - Channel string - - // The message data. - Data []byte -} - -// PMessage represents a pmessage notification. -type PMessage struct { - - // The matched pattern. - Pattern string - - // The originating channel. - Channel string - - // The message data. - Data []byte -} - -// Pong represents a pubsub pong notification. -type Pong struct { - Data string -} - -// PubSubConn wraps a Conn with convenience methods for subscribers. -type PubSubConn struct { - Conn Conn -} - -// Close closes the connection. -func (c PubSubConn) Close() error { - return c.Conn.Close() -} - -// Subscribe subscribes the connection to the specified channels. -func (c PubSubConn) Subscribe(channel ...interface{}) error { - c.Conn.Send("SUBSCRIBE", channel...) - return c.Conn.Flush() -} - -// PSubscribe subscribes the connection to the given patterns. -func (c PubSubConn) PSubscribe(channel ...interface{}) error { - c.Conn.Send("PSUBSCRIBE", channel...) - return c.Conn.Flush() -} - -// Unsubscribe unsubscribes the connection from the given channels, or from all -// of them if none is given. -func (c PubSubConn) Unsubscribe(channel ...interface{}) error { - c.Conn.Send("UNSUBSCRIBE", channel...) - return c.Conn.Flush() -} - -// PUnsubscribe unsubscribes the connection from the given patterns, or from all -// of them if none is given. -func (c PubSubConn) PUnsubscribe(channel ...interface{}) error { - c.Conn.Send("PUNSUBSCRIBE", channel...) - return c.Conn.Flush() -} - -// Ping sends a PING to the server with the specified data. -func (c PubSubConn) Ping(data string) error { - c.Conn.Send("PING", data) - return c.Conn.Flush() -} - -// Receive returns a pushed message as a Subscription, Message, PMessage, Pong -// or error. The return value is intended to be used directly in a type switch -// as illustrated in the PubSubConn example. -func (c PubSubConn) Receive() interface{} { - reply, err := Values(c.Conn.Receive()) - if err != nil { - return err - } - - var kind string - reply, err = Scan(reply, &kind) - if err != nil { - return err - } - - switch kind { - case "message": - var m Message - if _, err := Scan(reply, &m.Channel, &m.Data); err != nil { - return err - } - return m - case "pmessage": - var pm PMessage - if _, err := Scan(reply, &pm.Pattern, &pm.Channel, &pm.Data); err != nil { - return err - } - return pm - case "subscribe", "psubscribe", "unsubscribe", "punsubscribe": - s := Subscription{Kind: kind} - if _, err := Scan(reply, &s.Channel, &s.Count); err != nil { - return err - } - return s - case "pong": - var p Pong - if _, err := Scan(reply, &p.Data); err != nil { - return err - } - return p - } - return errors.New("redigo: unknown pubsub notification") -} diff --git a/vendor/github.com/garyburd/redigo/redis/pubsub_test.go b/vendor/github.com/garyburd/redigo/redis/pubsub_test.go deleted file mode 100644 index b95513155..000000000 --- a/vendor/github.com/garyburd/redigo/redis/pubsub_test.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "fmt" - "reflect" - "sync" - "testing" - - "github.com/garyburd/redigo/redis" -) - -func publish(channel, value interface{}) { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - c.Do("PUBLISH", channel, value) -} - -// Applications can receive pushed messages from one goroutine and manage subscriptions from another goroutine. -func ExamplePubSubConn() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - var wg sync.WaitGroup - wg.Add(2) - - psc := redis.PubSubConn{Conn: c} - - // This goroutine receives and prints pushed notifications from the server. - // The goroutine exits when the connection is unsubscribed from all - // channels or there is an error. - go func() { - defer wg.Done() - for { - switch n := psc.Receive().(type) { - case redis.Message: - fmt.Printf("Message: %s %s\n", n.Channel, n.Data) - case redis.PMessage: - fmt.Printf("PMessage: %s %s %s\n", n.Pattern, n.Channel, n.Data) - case redis.Subscription: - fmt.Printf("Subscription: %s %s %d\n", n.Kind, n.Channel, n.Count) - if n.Count == 0 { - return - } - case error: - fmt.Printf("error: %v\n", n) - return - } - } - }() - - // This goroutine manages subscriptions for the connection. - go func() { - defer wg.Done() - - psc.Subscribe("example") - psc.PSubscribe("p*") - - // The following function calls publish a message using another - // connection to the Redis server. - publish("example", "hello") - publish("example", "world") - publish("pexample", "foo") - publish("pexample", "bar") - - // Unsubscribe from all connections. This will cause the receiving - // goroutine to exit. - psc.Unsubscribe() - psc.PUnsubscribe() - }() - - wg.Wait() - - // Output: - // Subscription: subscribe example 1 - // Subscription: psubscribe p* 2 - // Message: example hello - // Message: example world - // PMessage: p* pexample foo - // PMessage: p* pexample bar - // Subscription: unsubscribe example 1 - // Subscription: punsubscribe p* 0 -} - -func expectPushed(t *testing.T, c redis.PubSubConn, message string, expected interface{}) { - actual := c.Receive() - if !reflect.DeepEqual(actual, expected) { - t.Errorf("%s = %v, want %v", message, actual, expected) - } -} - -func TestPushed(t *testing.T) { - pc, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer pc.Close() - - sc, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer sc.Close() - - c := redis.PubSubConn{Conn: sc} - - c.Subscribe("c1") - expectPushed(t, c, "Subscribe(c1)", redis.Subscription{Kind: "subscribe", Channel: "c1", Count: 1}) - c.Subscribe("c2") - expectPushed(t, c, "Subscribe(c2)", redis.Subscription{Kind: "subscribe", Channel: "c2", Count: 2}) - c.PSubscribe("p1") - expectPushed(t, c, "PSubscribe(p1)", redis.Subscription{Kind: "psubscribe", Channel: "p1", Count: 3}) - c.PSubscribe("p2") - expectPushed(t, c, "PSubscribe(p2)", redis.Subscription{Kind: "psubscribe", Channel: "p2", Count: 4}) - c.PUnsubscribe() - expectPushed(t, c, "Punsubscribe(p1)", redis.Subscription{Kind: "punsubscribe", Channel: "p1", Count: 3}) - expectPushed(t, c, "Punsubscribe()", redis.Subscription{Kind: "punsubscribe", Channel: "p2", Count: 2}) - - pc.Do("PUBLISH", "c1", "hello") - expectPushed(t, c, "PUBLISH c1 hello", redis.Message{Channel: "c1", Data: []byte("hello")}) - - c.Ping("hello") - expectPushed(t, c, `Ping("hello")`, redis.Pong{Data: "hello"}) - - c.Conn.Send("PING") - c.Conn.Flush() - expectPushed(t, c, `Send("PING")`, redis.Pong{}) -} diff --git a/vendor/github.com/garyburd/redigo/redis/redis.go b/vendor/github.com/garyburd/redigo/redis/redis.go deleted file mode 100644 index b7298298c..000000000 --- a/vendor/github.com/garyburd/redigo/redis/redis.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -// Error represents an error returned in a command reply. -type Error string - -func (err Error) Error() string { return string(err) } - -// Conn represents a connection to a Redis server. -type Conn interface { - // Close closes the connection. - Close() error - - // Err returns a non-nil value when the connection is not usable. - Err() error - - // Do sends a command to the server and returns the received reply. - Do(commandName string, args ...interface{}) (reply interface{}, err error) - - // Send writes the command to the client's output buffer. - Send(commandName string, args ...interface{}) error - - // Flush flushes the output buffer to the Redis server. - Flush() error - - // Receive receives a single reply from the Redis server - Receive() (reply interface{}, err error) -} diff --git a/vendor/github.com/garyburd/redigo/redis/reply.go b/vendor/github.com/garyburd/redigo/redis/reply.go deleted file mode 100644 index 3d25dbaed..000000000 --- a/vendor/github.com/garyburd/redigo/redis/reply.go +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "errors" - "fmt" - "strconv" -) - -// ErrNil indicates that a reply value is nil. -var ErrNil = errors.New("redigo: nil returned") - -// Int is a helper that converts a command reply to an integer. If err is not -// equal to nil, then Int returns 0, err. Otherwise, Int converts the -// reply to an int as follows: -// -// Reply type Result -// integer int(reply), nil -// bulk string parsed reply, nil -// nil 0, ErrNil -// other 0, error -func Int(reply interface{}, err error) (int, error) { - if err != nil { - return 0, err - } - switch reply := reply.(type) { - case int64: - x := int(reply) - if int64(x) != reply { - return 0, strconv.ErrRange - } - return x, nil - case []byte: - n, err := strconv.ParseInt(string(reply), 10, 0) - return int(n), err - case nil: - return 0, ErrNil - case Error: - return 0, reply - } - return 0, fmt.Errorf("redigo: unexpected type for Int, got type %T", reply) -} - -// Int64 is a helper that converts a command reply to 64 bit integer. If err is -// not equal to nil, then Int returns 0, err. Otherwise, Int64 converts the -// reply to an int64 as follows: -// -// Reply type Result -// integer reply, nil -// bulk string parsed reply, nil -// nil 0, ErrNil -// other 0, error -func Int64(reply interface{}, err error) (int64, error) { - if err != nil { - return 0, err - } - switch reply := reply.(type) { - case int64: - return reply, nil - case []byte: - n, err := strconv.ParseInt(string(reply), 10, 64) - return n, err - case nil: - return 0, ErrNil - case Error: - return 0, reply - } - return 0, fmt.Errorf("redigo: unexpected type for Int64, got type %T", reply) -} - -var errNegativeInt = errors.New("redigo: unexpected value for Uint64") - -// Uint64 is a helper that converts a command reply to 64 bit integer. If err is -// not equal to nil, then Int returns 0, err. Otherwise, Int64 converts the -// reply to an int64 as follows: -// -// Reply type Result -// integer reply, nil -// bulk string parsed reply, nil -// nil 0, ErrNil -// other 0, error -func Uint64(reply interface{}, err error) (uint64, error) { - if err != nil { - return 0, err - } - switch reply := reply.(type) { - case int64: - if reply < 0 { - return 0, errNegativeInt - } - return uint64(reply), nil - case []byte: - n, err := strconv.ParseUint(string(reply), 10, 64) - return n, err - case nil: - return 0, ErrNil - case Error: - return 0, reply - } - return 0, fmt.Errorf("redigo: unexpected type for Uint64, got type %T", reply) -} - -// Float64 is a helper that converts a command reply to 64 bit float. If err is -// not equal to nil, then Float64 returns 0, err. Otherwise, Float64 converts -// the reply to an int as follows: -// -// Reply type Result -// bulk string parsed reply, nil -// nil 0, ErrNil -// other 0, error -func Float64(reply interface{}, err error) (float64, error) { - if err != nil { - return 0, err - } - switch reply := reply.(type) { - case []byte: - n, err := strconv.ParseFloat(string(reply), 64) - return n, err - case nil: - return 0, ErrNil - case Error: - return 0, reply - } - return 0, fmt.Errorf("redigo: unexpected type for Float64, got type %T", reply) -} - -// String is a helper that converts a command reply to a string. If err is not -// equal to nil, then String returns "", err. Otherwise String converts the -// reply to a string as follows: -// -// Reply type Result -// bulk string string(reply), nil -// simple string reply, nil -// nil "", ErrNil -// other "", error -func String(reply interface{}, err error) (string, error) { - if err != nil { - return "", err - } - switch reply := reply.(type) { - case []byte: - return string(reply), nil - case string: - return reply, nil - case nil: - return "", ErrNil - case Error: - return "", reply - } - return "", fmt.Errorf("redigo: unexpected type for String, got type %T", reply) -} - -// Bytes is a helper that converts a command reply to a slice of bytes. If err -// is not equal to nil, then Bytes returns nil, err. Otherwise Bytes converts -// the reply to a slice of bytes as follows: -// -// Reply type Result -// bulk string reply, nil -// simple string []byte(reply), nil -// nil nil, ErrNil -// other nil, error -func Bytes(reply interface{}, err error) ([]byte, error) { - if err != nil { - return nil, err - } - switch reply := reply.(type) { - case []byte: - return reply, nil - case string: - return []byte(reply), nil - case nil: - return nil, ErrNil - case Error: - return nil, reply - } - return nil, fmt.Errorf("redigo: unexpected type for Bytes, got type %T", reply) -} - -// Bool is a helper that converts a command reply to a boolean. If err is not -// equal to nil, then Bool returns false, err. Otherwise Bool converts the -// reply to boolean as follows: -// -// Reply type Result -// integer value != 0, nil -// bulk string strconv.ParseBool(reply) -// nil false, ErrNil -// other false, error -func Bool(reply interface{}, err error) (bool, error) { - if err != nil { - return false, err - } - switch reply := reply.(type) { - case int64: - return reply != 0, nil - case []byte: - return strconv.ParseBool(string(reply)) - case nil: - return false, ErrNil - case Error: - return false, reply - } - return false, fmt.Errorf("redigo: unexpected type for Bool, got type %T", reply) -} - -// MultiBulk is a helper that converts an array command reply to a []interface{}. -// -// Deprecated: Use Values instead. -func MultiBulk(reply interface{}, err error) ([]interface{}, error) { return Values(reply, err) } - -// Values is a helper that converts an array command reply to a []interface{}. -// If err is not equal to nil, then Values returns nil, err. Otherwise, Values -// converts the reply as follows: -// -// Reply type Result -// array reply, nil -// nil nil, ErrNil -// other nil, error -func Values(reply interface{}, err error) ([]interface{}, error) { - if err != nil { - return nil, err - } - switch reply := reply.(type) { - case []interface{}: - return reply, nil - case nil: - return nil, ErrNil - case Error: - return nil, reply - } - return nil, fmt.Errorf("redigo: unexpected type for Values, got type %T", reply) -} - -// Strings is a helper that converts an array command reply to a []string. If -// err is not equal to nil, then Strings returns nil, err. Nil array items are -// converted to "" in the output slice. Strings returns an error if an array -// item is not a bulk string or nil. -func Strings(reply interface{}, err error) ([]string, error) { - if err != nil { - return nil, err - } - switch reply := reply.(type) { - case []interface{}: - result := make([]string, len(reply)) - for i := range reply { - if reply[i] == nil { - continue - } - p, ok := reply[i].([]byte) - if !ok { - return nil, fmt.Errorf("redigo: unexpected element type for Strings, got type %T", reply[i]) - } - result[i] = string(p) - } - return result, nil - case nil: - return nil, ErrNil - case Error: - return nil, reply - } - return nil, fmt.Errorf("redigo: unexpected type for Strings, got type %T", reply) -} - -// ByteSlices is a helper that converts an array command reply to a [][]byte. -// If err is not equal to nil, then ByteSlices returns nil, err. Nil array -// items are stay nil. ByteSlices returns an error if an array item is not a -// bulk string or nil. -func ByteSlices(reply interface{}, err error) ([][]byte, error) { - if err != nil { - return nil, err - } - switch reply := reply.(type) { - case []interface{}: - result := make([][]byte, len(reply)) - for i := range reply { - if reply[i] == nil { - continue - } - p, ok := reply[i].([]byte) - if !ok { - return nil, fmt.Errorf("redigo: unexpected element type for ByteSlices, got type %T", reply[i]) - } - result[i] = p - } - return result, nil - case nil: - return nil, ErrNil - case Error: - return nil, reply - } - return nil, fmt.Errorf("redigo: unexpected type for ByteSlices, got type %T", reply) -} - -// Ints is a helper that converts an array command reply to a []int. If -// err is not equal to nil, then Ints returns nil, err. -func Ints(reply interface{}, err error) ([]int, error) { - var ints []int - values, err := Values(reply, err) - if err != nil { - return ints, err - } - if err := ScanSlice(values, &ints); err != nil { - return ints, err - } - return ints, nil -} - -// StringMap is a helper that converts an array of strings (alternating key, value) -// into a map[string]string. The HGETALL and CONFIG GET commands return replies in this format. -// Requires an even number of values in result. -func StringMap(result interface{}, err error) (map[string]string, error) { - values, err := Values(result, err) - if err != nil { - return nil, err - } - if len(values)%2 != 0 { - return nil, errors.New("redigo: StringMap expects even number of values result") - } - m := make(map[string]string, len(values)/2) - for i := 0; i < len(values); i += 2 { - key, okKey := values[i].([]byte) - value, okValue := values[i+1].([]byte) - if !okKey || !okValue { - return nil, errors.New("redigo: ScanMap key not a bulk string value") - } - m[string(key)] = string(value) - } - return m, nil -} - -// IntMap is a helper that converts an array of strings (alternating key, value) -// into a map[string]int. The HGETALL commands return replies in this format. -// Requires an even number of values in result. -func IntMap(result interface{}, err error) (map[string]int, error) { - values, err := Values(result, err) - if err != nil { - return nil, err - } - if len(values)%2 != 0 { - return nil, errors.New("redigo: IntMap expects even number of values result") - } - m := make(map[string]int, len(values)/2) - for i := 0; i < len(values); i += 2 { - key, ok := values[i].([]byte) - if !ok { - return nil, errors.New("redigo: ScanMap key not a bulk string value") - } - value, err := Int(values[i+1], nil) - if err != nil { - return nil, err - } - m[string(key)] = value - } - return m, nil -} - -// Int64Map is a helper that converts an array of strings (alternating key, value) -// into a map[string]int64. The HGETALL commands return replies in this format. -// Requires an even number of values in result. -func Int64Map(result interface{}, err error) (map[string]int64, error) { - values, err := Values(result, err) - if err != nil { - return nil, err - } - if len(values)%2 != 0 { - return nil, errors.New("redigo: Int64Map expects even number of values result") - } - m := make(map[string]int64, len(values)/2) - for i := 0; i < len(values); i += 2 { - key, ok := values[i].([]byte) - if !ok { - return nil, errors.New("redigo: ScanMap key not a bulk string value") - } - value, err := Int64(values[i+1], nil) - if err != nil { - return nil, err - } - m[string(key)] = value - } - return m, nil -} - -// Positions is a helper that converts an array of positions (lat, long) -// into a [][2]float64. The GEOPOS command returns replies in this format. -func Positions(result interface{}, err error) ([]*[2]float64, error) { - values, err := Values(result, err) - if err != nil { - return nil, err - } - positions := make([]*[2]float64, len(values)) - for i := range values { - if values[i] == nil { - continue - } - p, ok := values[i].([]interface{}) - if !ok { - return nil, fmt.Errorf("redigo: unexpected element type for interface slice, got type %T", values[i]) - } - if len(p) != 2 { - return nil, fmt.Errorf("redigo: unexpected number of values for a member position, got %d", len(p)) - } - lat, err := Float64(p[0], nil) - if err != nil { - return nil, err - } - long, err := Float64(p[1], nil) - if err != nil { - return nil, err - } - positions[i] = &[2]float64{lat, long} - } - return positions, nil -} diff --git a/vendor/github.com/garyburd/redigo/redis/reply_test.go b/vendor/github.com/garyburd/redigo/redis/reply_test.go deleted file mode 100644 index 81a25a972..000000000 --- a/vendor/github.com/garyburd/redigo/redis/reply_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "fmt" - "reflect" - "testing" - - "github.com/garyburd/redigo/redis" -) - -type valueError struct { - v interface{} - err error -} - -func ve(v interface{}, err error) valueError { - return valueError{v, err} -} - -var replyTests = []struct { - name interface{} - actual valueError - expected valueError -}{ - { - "ints([v1, v2])", - ve(redis.Ints([]interface{}{[]byte("4"), []byte("5")}, nil)), - ve([]int{4, 5}, nil), - }, - { - "ints(nil)", - ve(redis.Ints(nil, nil)), - ve([]int(nil), redis.ErrNil), - }, - { - "strings([v1, v2])", - ve(redis.Strings([]interface{}{[]byte("v1"), []byte("v2")}, nil)), - ve([]string{"v1", "v2"}, nil), - }, - { - "strings(nil)", - ve(redis.Strings(nil, nil)), - ve([]string(nil), redis.ErrNil), - }, - { - "byteslices([v1, v2])", - ve(redis.ByteSlices([]interface{}{[]byte("v1"), []byte("v2")}, nil)), - ve([][]byte{[]byte("v1"), []byte("v2")}, nil), - }, - { - "byteslices(nil)", - ve(redis.ByteSlices(nil, nil)), - ve([][]byte(nil), redis.ErrNil), - }, - { - "values([v1, v2])", - ve(redis.Values([]interface{}{[]byte("v1"), []byte("v2")}, nil)), - ve([]interface{}{[]byte("v1"), []byte("v2")}, nil), - }, - { - "values(nil)", - ve(redis.Values(nil, nil)), - ve([]interface{}(nil), redis.ErrNil), - }, - { - "float64(1.0)", - ve(redis.Float64([]byte("1.0"), nil)), - ve(float64(1.0), nil), - }, - { - "float64(nil)", - ve(redis.Float64(nil, nil)), - ve(float64(0.0), redis.ErrNil), - }, - { - "uint64(1)", - ve(redis.Uint64(int64(1), nil)), - ve(uint64(1), nil), - }, - { - "uint64(-1)", - ve(redis.Uint64(int64(-1), nil)), - ve(uint64(0), redis.ErrNegativeInt), - }, - { - "positions([[1, 2], nil, [3, 4]])", - ve(redis.Positions([]interface{}{[]interface{}{[]byte("1"), []byte("2")}, nil, []interface{}{[]byte("3"), []byte("4")}}, nil)), - ve([]*[2]float64{{1.0, 2.0}, nil, {3.0, 4.0}}, nil), - }, -} - -func TestReply(t *testing.T) { - for _, rt := range replyTests { - if rt.actual.err != rt.expected.err { - t.Errorf("%s returned err %v, want %v", rt.name, rt.actual.err, rt.expected.err) - continue - } - if !reflect.DeepEqual(rt.actual.v, rt.expected.v) { - t.Errorf("%s=%+v, want %+v", rt.name, rt.actual.v, rt.expected.v) - } - } -} - -// dial wraps DialDefaultServer() with a more suitable function name for examples. -func dial() (redis.Conn, error) { - return redis.DialDefaultServer() -} - -func ExampleBool() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - c.Do("SET", "foo", 1) - exists, _ := redis.Bool(c.Do("EXISTS", "foo")) - fmt.Printf("%#v\n", exists) - // Output: - // true -} - -func ExampleInt() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - c.Do("SET", "k1", 1) - n, _ := redis.Int(c.Do("GET", "k1")) - fmt.Printf("%#v\n", n) - n, _ = redis.Int(c.Do("INCR", "k1")) - fmt.Printf("%#v\n", n) - // Output: - // 1 - // 2 -} - -func ExampleInts() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - c.Do("SADD", "set_with_integers", 4, 5, 6) - ints, _ := redis.Ints(c.Do("SMEMBERS", "set_with_integers")) - fmt.Printf("%#v\n", ints) - // Output: - // []int{4, 5, 6} -} - -func ExampleString() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - c.Do("SET", "hello", "world") - s, err := redis.String(c.Do("GET", "hello")) - fmt.Printf("%#v\n", s) - // Output: - // "world" -} diff --git a/vendor/github.com/garyburd/redigo/redis/scan.go b/vendor/github.com/garyburd/redigo/redis/scan.go deleted file mode 100644 index 1e8f92203..000000000 --- a/vendor/github.com/garyburd/redigo/redis/scan.go +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "sync" -) - -func ensureLen(d reflect.Value, n int) { - if n > d.Cap() { - d.Set(reflect.MakeSlice(d.Type(), n, n)) - } else { - d.SetLen(n) - } -} - -func cannotConvert(d reflect.Value, s interface{}) error { - var sname string - switch s.(type) { - case string: - sname = "Redis simple string" - case Error: - sname = "Redis error" - case int64: - sname = "Redis integer" - case []byte: - sname = "Redis bulk string" - case []interface{}: - sname = "Redis array" - default: - sname = reflect.TypeOf(s).String() - } - return fmt.Errorf("cannot convert from %s to %s", sname, d.Type()) -} - -func convertAssignBulkString(d reflect.Value, s []byte) (err error) { - switch d.Type().Kind() { - case reflect.Float32, reflect.Float64: - var x float64 - x, err = strconv.ParseFloat(string(s), d.Type().Bits()) - d.SetFloat(x) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - var x int64 - x, err = strconv.ParseInt(string(s), 10, d.Type().Bits()) - d.SetInt(x) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - var x uint64 - x, err = strconv.ParseUint(string(s), 10, d.Type().Bits()) - d.SetUint(x) - case reflect.Bool: - var x bool - x, err = strconv.ParseBool(string(s)) - d.SetBool(x) - case reflect.String: - d.SetString(string(s)) - case reflect.Slice: - if d.Type().Elem().Kind() != reflect.Uint8 { - err = cannotConvert(d, s) - } else { - d.SetBytes(s) - } - default: - err = cannotConvert(d, s) - } - return -} - -func convertAssignInt(d reflect.Value, s int64) (err error) { - switch d.Type().Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - d.SetInt(s) - if d.Int() != s { - err = strconv.ErrRange - d.SetInt(0) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - if s < 0 { - err = strconv.ErrRange - } else { - x := uint64(s) - d.SetUint(x) - if d.Uint() != x { - err = strconv.ErrRange - d.SetUint(0) - } - } - case reflect.Bool: - d.SetBool(s != 0) - default: - err = cannotConvert(d, s) - } - return -} - -func convertAssignValue(d reflect.Value, s interface{}) (err error) { - switch s := s.(type) { - case []byte: - err = convertAssignBulkString(d, s) - case int64: - err = convertAssignInt(d, s) - default: - err = cannotConvert(d, s) - } - return err -} - -func convertAssignArray(d reflect.Value, s []interface{}) error { - if d.Type().Kind() != reflect.Slice { - return cannotConvert(d, s) - } - ensureLen(d, len(s)) - for i := 0; i < len(s); i++ { - if err := convertAssignValue(d.Index(i), s[i]); err != nil { - return err - } - } - return nil -} - -func convertAssign(d interface{}, s interface{}) (err error) { - // Handle the most common destination types using type switches and - // fall back to reflection for all other types. - switch s := s.(type) { - case nil: - // ingore - case []byte: - switch d := d.(type) { - case *string: - *d = string(s) - case *int: - *d, err = strconv.Atoi(string(s)) - case *bool: - *d, err = strconv.ParseBool(string(s)) - case *[]byte: - *d = s - case *interface{}: - *d = s - case nil: - // skip value - default: - if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr { - err = cannotConvert(d, s) - } else { - err = convertAssignBulkString(d.Elem(), s) - } - } - case int64: - switch d := d.(type) { - case *int: - x := int(s) - if int64(x) != s { - err = strconv.ErrRange - x = 0 - } - *d = x - case *bool: - *d = s != 0 - case *interface{}: - *d = s - case nil: - // skip value - default: - if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr { - err = cannotConvert(d, s) - } else { - err = convertAssignInt(d.Elem(), s) - } - } - case string: - switch d := d.(type) { - case *string: - *d = s - case *interface{}: - *d = s - case nil: - // skip value - default: - err = cannotConvert(reflect.ValueOf(d), s) - } - case []interface{}: - switch d := d.(type) { - case *[]interface{}: - *d = s - case *interface{}: - *d = s - case nil: - // skip value - default: - if d := reflect.ValueOf(d); d.Type().Kind() != reflect.Ptr { - err = cannotConvert(d, s) - } else { - err = convertAssignArray(d.Elem(), s) - } - } - case Error: - err = s - default: - err = cannotConvert(reflect.ValueOf(d), s) - } - return -} - -// Scan copies from src to the values pointed at by dest. -// -// The values pointed at by dest must be an integer, float, boolean, string, -// []byte, interface{} or slices of these types. Scan uses the standard strconv -// package to convert bulk strings to numeric and boolean types. -// -// If a dest value is nil, then the corresponding src value is skipped. -// -// If a src element is nil, then the corresponding dest value is not modified. -// -// To enable easy use of Scan in a loop, Scan returns the slice of src -// following the copied values. -func Scan(src []interface{}, dest ...interface{}) ([]interface{}, error) { - if len(src) < len(dest) { - return nil, errors.New("redigo.Scan: array short") - } - var err error - for i, d := range dest { - err = convertAssign(d, src[i]) - if err != nil { - err = fmt.Errorf("redigo.Scan: cannot assign to dest %d: %v", i, err) - break - } - } - return src[len(dest):], err -} - -type fieldSpec struct { - name string - index []int - omitEmpty bool -} - -type structSpec struct { - m map[string]*fieldSpec - l []*fieldSpec -} - -func (ss *structSpec) fieldSpec(name []byte) *fieldSpec { - return ss.m[string(name)] -} - -func compileStructSpec(t reflect.Type, depth map[string]int, index []int, ss *structSpec) { - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - switch { - case f.PkgPath != "" && !f.Anonymous: - // Ignore unexported fields. - case f.Anonymous: - // TODO: Handle pointers. Requires change to decoder and - // protection against infinite recursion. - if f.Type.Kind() == reflect.Struct { - compileStructSpec(f.Type, depth, append(index, i), ss) - } - default: - fs := &fieldSpec{name: f.Name} - tag := f.Tag.Get("redis") - p := strings.Split(tag, ",") - if len(p) > 0 { - if p[0] == "-" { - continue - } - if len(p[0]) > 0 { - fs.name = p[0] - } - for _, s := range p[1:] { - switch s { - case "omitempty": - fs.omitEmpty = true - default: - panic(fmt.Errorf("redigo: unknown field tag %s for type %s", s, t.Name())) - } - } - } - d, found := depth[fs.name] - if !found { - d = 1 << 30 - } - switch { - case len(index) == d: - // At same depth, remove from result. - delete(ss.m, fs.name) - j := 0 - for i := 0; i < len(ss.l); i++ { - if fs.name != ss.l[i].name { - ss.l[j] = ss.l[i] - j += 1 - } - } - ss.l = ss.l[:j] - case len(index) < d: - fs.index = make([]int, len(index)+1) - copy(fs.index, index) - fs.index[len(index)] = i - depth[fs.name] = len(index) - ss.m[fs.name] = fs - ss.l = append(ss.l, fs) - } - } - } -} - -var ( - structSpecMutex sync.RWMutex - structSpecCache = make(map[reflect.Type]*structSpec) - defaultFieldSpec = &fieldSpec{} -) - -func structSpecForType(t reflect.Type) *structSpec { - - structSpecMutex.RLock() - ss, found := structSpecCache[t] - structSpecMutex.RUnlock() - if found { - return ss - } - - structSpecMutex.Lock() - defer structSpecMutex.Unlock() - ss, found = structSpecCache[t] - if found { - return ss - } - - ss = &structSpec{m: make(map[string]*fieldSpec)} - compileStructSpec(t, make(map[string]int), nil, ss) - structSpecCache[t] = ss - return ss -} - -var errScanStructValue = errors.New("redigo.ScanStruct: value must be non-nil pointer to a struct") - -// ScanStruct scans alternating names and values from src to a struct. The -// HGETALL and CONFIG GET commands return replies in this format. -// -// ScanStruct uses exported field names to match values in the response. Use -// 'redis' field tag to override the name: -// -// Field int `redis:"myName"` -// -// Fields with the tag redis:"-" are ignored. -// -// Integer, float, boolean, string and []byte fields are supported. Scan uses the -// standard strconv package to convert bulk string values to numeric and -// boolean types. -// -// If a src element is nil, then the corresponding field is not modified. -func ScanStruct(src []interface{}, dest interface{}) error { - d := reflect.ValueOf(dest) - if d.Kind() != reflect.Ptr || d.IsNil() { - return errScanStructValue - } - d = d.Elem() - if d.Kind() != reflect.Struct { - return errScanStructValue - } - ss := structSpecForType(d.Type()) - - if len(src)%2 != 0 { - return errors.New("redigo.ScanStruct: number of values not a multiple of 2") - } - - for i := 0; i < len(src); i += 2 { - s := src[i+1] - if s == nil { - continue - } - name, ok := src[i].([]byte) - if !ok { - return fmt.Errorf("redigo.ScanStruct: key %d not a bulk string value", i) - } - fs := ss.fieldSpec(name) - if fs == nil { - continue - } - if err := convertAssignValue(d.FieldByIndex(fs.index), s); err != nil { - return fmt.Errorf("redigo.ScanStruct: cannot assign field %s: %v", fs.name, err) - } - } - return nil -} - -var ( - errScanSliceValue = errors.New("redigo.ScanSlice: dest must be non-nil pointer to a struct") -) - -// ScanSlice scans src to the slice pointed to by dest. The elements the dest -// slice must be integer, float, boolean, string, struct or pointer to struct -// values. -// -// Struct fields must be integer, float, boolean or string values. All struct -// fields are used unless a subset is specified using fieldNames. -func ScanSlice(src []interface{}, dest interface{}, fieldNames ...string) error { - d := reflect.ValueOf(dest) - if d.Kind() != reflect.Ptr || d.IsNil() { - return errScanSliceValue - } - d = d.Elem() - if d.Kind() != reflect.Slice { - return errScanSliceValue - } - - isPtr := false - t := d.Type().Elem() - if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct { - isPtr = true - t = t.Elem() - } - - if t.Kind() != reflect.Struct { - ensureLen(d, len(src)) - for i, s := range src { - if s == nil { - continue - } - if err := convertAssignValue(d.Index(i), s); err != nil { - return fmt.Errorf("redigo.ScanSlice: cannot assign element %d: %v", i, err) - } - } - return nil - } - - ss := structSpecForType(t) - fss := ss.l - if len(fieldNames) > 0 { - fss = make([]*fieldSpec, len(fieldNames)) - for i, name := range fieldNames { - fss[i] = ss.m[name] - if fss[i] == nil { - return fmt.Errorf("redigo.ScanSlice: ScanSlice bad field name %s", name) - } - } - } - - if len(fss) == 0 { - return errors.New("redigo.ScanSlice: no struct fields") - } - - n := len(src) / len(fss) - if n*len(fss) != len(src) { - return errors.New("redigo.ScanSlice: length not a multiple of struct field count") - } - - ensureLen(d, n) - for i := 0; i < n; i++ { - d := d.Index(i) - if isPtr { - if d.IsNil() { - d.Set(reflect.New(t)) - } - d = d.Elem() - } - for j, fs := range fss { - s := src[i*len(fss)+j] - if s == nil { - continue - } - if err := convertAssignValue(d.FieldByIndex(fs.index), s); err != nil { - return fmt.Errorf("redigo.ScanSlice: cannot assign element %d to field %s: %v", i*len(fss)+j, fs.name, err) - } - } - } - return nil -} - -// Args is a helper for constructing command arguments from structured values. -type Args []interface{} - -// Add returns the result of appending value to args. -func (args Args) Add(value ...interface{}) Args { - return append(args, value...) -} - -// AddFlat returns the result of appending the flattened value of v to args. -// -// Maps are flattened by appending the alternating keys and map values to args. -// -// Slices are flattened by appending the slice elements to args. -// -// Structs are flattened by appending the alternating names and values of -// exported fields to args. If v is a nil struct pointer, then nothing is -// appended. The 'redis' field tag overrides struct field names. See ScanStruct -// for more information on the use of the 'redis' field tag. -// -// Other types are appended to args as is. -func (args Args) AddFlat(v interface{}) Args { - rv := reflect.ValueOf(v) - switch rv.Kind() { - case reflect.Struct: - args = flattenStruct(args, rv) - case reflect.Slice: - for i := 0; i < rv.Len(); i++ { - args = append(args, rv.Index(i).Interface()) - } - case reflect.Map: - for _, k := range rv.MapKeys() { - args = append(args, k.Interface(), rv.MapIndex(k).Interface()) - } - case reflect.Ptr: - if rv.Type().Elem().Kind() == reflect.Struct { - if !rv.IsNil() { - args = flattenStruct(args, rv.Elem()) - } - } else { - args = append(args, v) - } - default: - args = append(args, v) - } - return args -} - -func flattenStruct(args Args, v reflect.Value) Args { - ss := structSpecForType(v.Type()) - for _, fs := range ss.l { - fv := v.FieldByIndex(fs.index) - if fs.omitEmpty { - var empty = false - switch fv.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - empty = fv.Len() == 0 - case reflect.Bool: - empty = !fv.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - empty = fv.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - empty = fv.Uint() == 0 - case reflect.Float32, reflect.Float64: - empty = fv.Float() == 0 - case reflect.Interface, reflect.Ptr: - empty = fv.IsNil() - } - if empty { - continue - } - } - args = append(args, fs.name, fv.Interface()) - } - return args -} diff --git a/vendor/github.com/garyburd/redigo/redis/scan_test.go b/vendor/github.com/garyburd/redigo/redis/scan_test.go deleted file mode 100644 index d364dff42..000000000 --- a/vendor/github.com/garyburd/redigo/redis/scan_test.go +++ /dev/null @@ -1,440 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "fmt" - "math" - "reflect" - "testing" - - "github.com/garyburd/redigo/redis" -) - -var scanConversionTests = []struct { - src interface{} - dest interface{} -}{ - {[]byte("-inf"), math.Inf(-1)}, - {[]byte("+inf"), math.Inf(1)}, - {[]byte("0"), float64(0)}, - {[]byte("3.14159"), float64(3.14159)}, - {[]byte("3.14"), float32(3.14)}, - {[]byte("-100"), int(-100)}, - {[]byte("101"), int(101)}, - {int64(102), int(102)}, - {[]byte("103"), uint(103)}, - {int64(104), uint(104)}, - {[]byte("105"), int8(105)}, - {int64(106), int8(106)}, - {[]byte("107"), uint8(107)}, - {int64(108), uint8(108)}, - {[]byte("0"), false}, - {int64(0), false}, - {[]byte("f"), false}, - {[]byte("1"), true}, - {int64(1), true}, - {[]byte("t"), true}, - {"hello", "hello"}, - {[]byte("hello"), "hello"}, - {[]byte("world"), []byte("world")}, - {[]interface{}{[]byte("foo")}, []interface{}{[]byte("foo")}}, - {[]interface{}{[]byte("foo")}, []string{"foo"}}, - {[]interface{}{[]byte("hello"), []byte("world")}, []string{"hello", "world"}}, - {[]interface{}{[]byte("bar")}, [][]byte{[]byte("bar")}}, - {[]interface{}{[]byte("1")}, []int{1}}, - {[]interface{}{[]byte("1"), []byte("2")}, []int{1, 2}}, - {[]interface{}{[]byte("1"), []byte("2")}, []float64{1, 2}}, - {[]interface{}{[]byte("1")}, []byte{1}}, - {[]interface{}{[]byte("1")}, []bool{true}}, -} - -func TestScanConversion(t *testing.T) { - for _, tt := range scanConversionTests { - values := []interface{}{tt.src} - dest := reflect.New(reflect.TypeOf(tt.dest)) - values, err := redis.Scan(values, dest.Interface()) - if err != nil { - t.Errorf("Scan(%v) returned error %v", tt, err) - continue - } - if !reflect.DeepEqual(tt.dest, dest.Elem().Interface()) { - t.Errorf("Scan(%v) returned %v, want %v", tt, dest.Elem().Interface(), tt.dest) - } - } -} - -var scanConversionErrorTests = []struct { - src interface{} - dest interface{} -}{ - {[]byte("1234"), byte(0)}, - {int64(1234), byte(0)}, - {[]byte("-1"), byte(0)}, - {int64(-1), byte(0)}, - {[]byte("junk"), false}, - {redis.Error("blah"), false}, -} - -func TestScanConversionError(t *testing.T) { - for _, tt := range scanConversionErrorTests { - values := []interface{}{tt.src} - dest := reflect.New(reflect.TypeOf(tt.dest)) - values, err := redis.Scan(values, dest.Interface()) - if err == nil { - t.Errorf("Scan(%v) did not return error", tt) - } - } -} - -func ExampleScan() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - c.Send("HMSET", "album:1", "title", "Red", "rating", 5) - c.Send("HMSET", "album:2", "title", "Earthbound", "rating", 1) - c.Send("HMSET", "album:3", "title", "Beat") - c.Send("LPUSH", "albums", "1") - c.Send("LPUSH", "albums", "2") - c.Send("LPUSH", "albums", "3") - values, err := redis.Values(c.Do("SORT", "albums", - "BY", "album:*->rating", - "GET", "album:*->title", - "GET", "album:*->rating")) - if err != nil { - fmt.Println(err) - return - } - - for len(values) > 0 { - var title string - rating := -1 // initialize to illegal value to detect nil. - values, err = redis.Scan(values, &title, &rating) - if err != nil { - fmt.Println(err) - return - } - if rating == -1 { - fmt.Println(title, "not-rated") - } else { - fmt.Println(title, rating) - } - } - // Output: - // Beat not-rated - // Earthbound 1 - // Red 5 -} - -type s0 struct { - X int - Y int `redis:"y"` - Bt bool -} - -type s1 struct { - X int `redis:"-"` - I int `redis:"i"` - U uint `redis:"u"` - S string `redis:"s"` - P []byte `redis:"p"` - B bool `redis:"b"` - Bt bool - Bf bool - s0 -} - -var scanStructTests = []struct { - title string - reply []string - value interface{} -}{ - {"basic", - []string{"i", "-1234", "u", "5678", "s", "hello", "p", "world", "b", "t", "Bt", "1", "Bf", "0", "X", "123", "y", "456"}, - &s1{I: -1234, U: 5678, S: "hello", P: []byte("world"), B: true, Bt: true, Bf: false, s0: s0{X: 123, Y: 456}}, - }, -} - -func TestScanStruct(t *testing.T) { - for _, tt := range scanStructTests { - - var reply []interface{} - for _, v := range tt.reply { - reply = append(reply, []byte(v)) - } - - value := reflect.New(reflect.ValueOf(tt.value).Type().Elem()) - - if err := redis.ScanStruct(reply, value.Interface()); err != nil { - t.Fatalf("ScanStruct(%s) returned error %v", tt.title, err) - } - - if !reflect.DeepEqual(value.Interface(), tt.value) { - t.Fatalf("ScanStruct(%s) returned %v, want %v", tt.title, value.Interface(), tt.value) - } - } -} - -func TestBadScanStructArgs(t *testing.T) { - x := []interface{}{"A", "b"} - test := func(v interface{}) { - if err := redis.ScanStruct(x, v); err == nil { - t.Errorf("Expect error for ScanStruct(%T, %T)", x, v) - } - } - - test(nil) - - var v0 *struct{} - test(v0) - - var v1 int - test(&v1) - - x = x[:1] - v2 := struct{ A string }{} - test(&v2) -} - -var scanSliceTests = []struct { - src []interface{} - fieldNames []string - ok bool - dest interface{} -}{ - { - []interface{}{[]byte("1"), nil, []byte("-1")}, - nil, - true, - []int{1, 0, -1}, - }, - { - []interface{}{[]byte("1"), nil, []byte("2")}, - nil, - true, - []uint{1, 0, 2}, - }, - { - []interface{}{[]byte("-1")}, - nil, - false, - []uint{1}, - }, - { - []interface{}{[]byte("hello"), nil, []byte("world")}, - nil, - true, - [][]byte{[]byte("hello"), nil, []byte("world")}, - }, - { - []interface{}{[]byte("hello"), nil, []byte("world")}, - nil, - true, - []string{"hello", "", "world"}, - }, - { - []interface{}{[]byte("a1"), []byte("b1"), []byte("a2"), []byte("b2")}, - nil, - true, - []struct{ A, B string }{{"a1", "b1"}, {"a2", "b2"}}, - }, - { - []interface{}{[]byte("a1"), []byte("b1")}, - nil, - false, - []struct{ A, B, C string }{{"a1", "b1", ""}}, - }, - { - []interface{}{[]byte("a1"), []byte("b1"), []byte("a2"), []byte("b2")}, - nil, - true, - []*struct{ A, B string }{{"a1", "b1"}, {"a2", "b2"}}, - }, - { - []interface{}{[]byte("a1"), []byte("b1"), []byte("a2"), []byte("b2")}, - []string{"A", "B"}, - true, - []struct{ A, C, B string }{{"a1", "", "b1"}, {"a2", "", "b2"}}, - }, - { - []interface{}{[]byte("a1"), []byte("b1"), []byte("a2"), []byte("b2")}, - nil, - false, - []struct{}{}, - }, -} - -func TestScanSlice(t *testing.T) { - for _, tt := range scanSliceTests { - - typ := reflect.ValueOf(tt.dest).Type() - dest := reflect.New(typ) - - err := redis.ScanSlice(tt.src, dest.Interface(), tt.fieldNames...) - if tt.ok != (err == nil) { - t.Errorf("ScanSlice(%v, []%s, %v) returned error %v", tt.src, typ, tt.fieldNames, err) - continue - } - if tt.ok && !reflect.DeepEqual(dest.Elem().Interface(), tt.dest) { - t.Errorf("ScanSlice(src, []%s) returned %#v, want %#v", typ, dest.Elem().Interface(), tt.dest) - } - } -} - -func ExampleScanSlice() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - c.Send("HMSET", "album:1", "title", "Red", "rating", 5) - c.Send("HMSET", "album:2", "title", "Earthbound", "rating", 1) - c.Send("HMSET", "album:3", "title", "Beat", "rating", 4) - c.Send("LPUSH", "albums", "1") - c.Send("LPUSH", "albums", "2") - c.Send("LPUSH", "albums", "3") - values, err := redis.Values(c.Do("SORT", "albums", - "BY", "album:*->rating", - "GET", "album:*->title", - "GET", "album:*->rating")) - if err != nil { - fmt.Println(err) - return - } - - var albums []struct { - Title string - Rating int - } - if err := redis.ScanSlice(values, &albums); err != nil { - fmt.Println(err) - return - } - fmt.Printf("%v\n", albums) - // Output: - // [{Earthbound 1} {Beat 4} {Red 5}] -} - -var argsTests = []struct { - title string - actual redis.Args - expected redis.Args -}{ - {"struct ptr", - redis.Args{}.AddFlat(&struct { - I int `redis:"i"` - U uint `redis:"u"` - S string `redis:"s"` - P []byte `redis:"p"` - M map[string]string `redis:"m"` - Bt bool - Bf bool - }{ - -1234, 5678, "hello", []byte("world"), map[string]string{"hello": "world"}, true, false, - }), - redis.Args{"i", int(-1234), "u", uint(5678), "s", "hello", "p", []byte("world"), "m", map[string]string{"hello": "world"}, "Bt", true, "Bf", false}, - }, - {"struct", - redis.Args{}.AddFlat(struct{ I int }{123}), - redis.Args{"I", 123}, - }, - {"slice", - redis.Args{}.Add(1).AddFlat([]string{"a", "b", "c"}).Add(2), - redis.Args{1, "a", "b", "c", 2}, - }, - {"struct omitempty", - redis.Args{}.AddFlat(&struct { - I int `redis:"i,omitempty"` - U uint `redis:"u,omitempty"` - S string `redis:"s,omitempty"` - P []byte `redis:"p,omitempty"` - M map[string]string `redis:"m,omitempty"` - Bt bool `redis:"Bt,omitempty"` - Bf bool `redis:"Bf,omitempty"` - }{ - 0, 0, "", []byte{}, map[string]string{}, true, false, - }), - redis.Args{"Bt", true}, - }, -} - -func TestArgs(t *testing.T) { - for _, tt := range argsTests { - if !reflect.DeepEqual(tt.actual, tt.expected) { - t.Fatalf("%s is %v, want %v", tt.title, tt.actual, tt.expected) - } - } -} - -func ExampleArgs() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - var p1, p2 struct { - Title string `redis:"title"` - Author string `redis:"author"` - Body string `redis:"body"` - } - - p1.Title = "Example" - p1.Author = "Gary" - p1.Body = "Hello" - - if _, err := c.Do("HMSET", redis.Args{}.Add("id1").AddFlat(&p1)...); err != nil { - fmt.Println(err) - return - } - - m := map[string]string{ - "title": "Example2", - "author": "Steve", - "body": "Map", - } - - if _, err := c.Do("HMSET", redis.Args{}.Add("id2").AddFlat(m)...); err != nil { - fmt.Println(err) - return - } - - for _, id := range []string{"id1", "id2"} { - - v, err := redis.Values(c.Do("HGETALL", id)) - if err != nil { - fmt.Println(err) - return - } - - if err := redis.ScanStruct(v, &p2); err != nil { - fmt.Println(err) - return - } - - fmt.Printf("%+v\n", p2) - } - - // Output: - // {Title:Example Author:Gary Body:Hello} - // {Title:Example2 Author:Steve Body:Map} -} diff --git a/vendor/github.com/garyburd/redigo/redis/script.go b/vendor/github.com/garyburd/redigo/redis/script.go deleted file mode 100644 index 78605a90a..000000000 --- a/vendor/github.com/garyburd/redigo/redis/script.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "crypto/sha1" - "encoding/hex" - "io" - "strings" -) - -// Script encapsulates the source, hash and key count for a Lua script. See -// http://redis.io/commands/eval for information on scripts in Redis. -type Script struct { - keyCount int - src string - hash string -} - -// NewScript returns a new script object. If keyCount is greater than or equal -// to zero, then the count is automatically inserted in the EVAL command -// argument list. If keyCount is less than zero, then the application supplies -// the count as the first value in the keysAndArgs argument to the Do, Send and -// SendHash methods. -func NewScript(keyCount int, src string) *Script { - h := sha1.New() - io.WriteString(h, src) - return &Script{keyCount, src, hex.EncodeToString(h.Sum(nil))} -} - -func (s *Script) args(spec string, keysAndArgs []interface{}) []interface{} { - var args []interface{} - if s.keyCount < 0 { - args = make([]interface{}, 1+len(keysAndArgs)) - args[0] = spec - copy(args[1:], keysAndArgs) - } else { - args = make([]interface{}, 2+len(keysAndArgs)) - args[0] = spec - args[1] = s.keyCount - copy(args[2:], keysAndArgs) - } - return args -} - -// Do evaluates the script. Under the covers, Do optimistically evaluates the -// script using the EVALSHA command. If the command fails because the script is -// not loaded, then Do evaluates the script using the EVAL command (thus -// causing the script to load). -func (s *Script) Do(c Conn, keysAndArgs ...interface{}) (interface{}, error) { - v, err := c.Do("EVALSHA", s.args(s.hash, keysAndArgs)...) - if e, ok := err.(Error); ok && strings.HasPrefix(string(e), "NOSCRIPT ") { - v, err = c.Do("EVAL", s.args(s.src, keysAndArgs)...) - } - return v, err -} - -// SendHash evaluates the script without waiting for the reply. The script is -// evaluated with the EVALSHA command. The application must ensure that the -// script is loaded by a previous call to Send, Do or Load methods. -func (s *Script) SendHash(c Conn, keysAndArgs ...interface{}) error { - return c.Send("EVALSHA", s.args(s.hash, keysAndArgs)...) -} - -// Send evaluates the script without waiting for the reply. -func (s *Script) Send(c Conn, keysAndArgs ...interface{}) error { - return c.Send("EVAL", s.args(s.src, keysAndArgs)...) -} - -// Load loads the script without evaluating it. -func (s *Script) Load(c Conn) error { - _, err := c.Do("SCRIPT", "LOAD", s.src) - return err -} diff --git a/vendor/github.com/garyburd/redigo/redis/script_test.go b/vendor/github.com/garyburd/redigo/redis/script_test.go deleted file mode 100644 index af282415c..000000000 --- a/vendor/github.com/garyburd/redigo/redis/script_test.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "fmt" - "reflect" - "testing" - "time" - - "github.com/garyburd/redigo/redis" -) - -var ( - // These variables are declared at package level to remove distracting - // details from the examples. - c redis.Conn - reply interface{} - err error -) - -func ExampleScript() { - // Initialize a package-level variable with a script. - var getScript = redis.NewScript(1, `return redis.call('get', KEYS[1])`) - - // In a function, use the script Do method to evaluate the script. The Do - // method optimistically uses the EVALSHA command. If the script is not - // loaded, then the Do method falls back to the EVAL command. - reply, err = getScript.Do(c, "foo") -} - -func TestScript(t *testing.T) { - c, err := redis.DialDefaultServer() - if err != nil { - t.Fatalf("error connection to database, %v", err) - } - defer c.Close() - - // To test fall back in Do, we make script unique by adding comment with current time. - script := fmt.Sprintf("--%d\nreturn {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", time.Now().UnixNano()) - s := redis.NewScript(2, script) - reply := []interface{}{[]byte("key1"), []byte("key2"), []byte("arg1"), []byte("arg2")} - - v, err := s.Do(c, "key1", "key2", "arg1", "arg2") - if err != nil { - t.Errorf("s.Do(c, ...) returned %v", err) - } - - if !reflect.DeepEqual(v, reply) { - t.Errorf("s.Do(c, ..); = %v, want %v", v, reply) - } - - err = s.Load(c) - if err != nil { - t.Errorf("s.Load(c) returned %v", err) - } - - err = s.SendHash(c, "key1", "key2", "arg1", "arg2") - if err != nil { - t.Errorf("s.SendHash(c, ...) returned %v", err) - } - - err = c.Flush() - if err != nil { - t.Errorf("c.Flush() returned %v", err) - } - - v, err = c.Receive() - if !reflect.DeepEqual(v, reply) { - t.Errorf("s.SendHash(c, ..); c.Receive() = %v, want %v", v, reply) - } - - err = s.Send(c, "key1", "key2", "arg1", "arg2") - if err != nil { - t.Errorf("s.Send(c, ...) returned %v", err) - } - - err = c.Flush() - if err != nil { - t.Errorf("c.Flush() returned %v", err) - } - - v, err = c.Receive() - if !reflect.DeepEqual(v, reply) { - t.Errorf("s.Send(c, ..); c.Receive() = %v, want %v", v, reply) - } - -} diff --git a/vendor/github.com/garyburd/redigo/redis/test_test.go b/vendor/github.com/garyburd/redigo/redis/test_test.go deleted file mode 100644 index 7240fa1f3..000000000 --- a/vendor/github.com/garyburd/redigo/redis/test_test.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2012 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis - -import ( - "bufio" - "errors" - "flag" - "fmt" - "io" - "io/ioutil" - "os" - "os/exec" - "strconv" - "strings" - "sync" - "testing" - "time" -) - -func SetNowFunc(f func() time.Time) { - nowFunc = f -} - -var ( - ErrNegativeInt = errNegativeInt - - serverPath = flag.String("redis-server", "redis-server", "Path to redis server binary") - serverBasePort = flag.Int("redis-port", 16379, "Beginning of port range for test servers") - serverLogName = flag.String("redis-log", "", "Write Redis server logs to `filename`") - serverLog = ioutil.Discard - - defaultServerMu sync.Mutex - defaultServer *Server - defaultServerErr error -) - -type Server struct { - name string - cmd *exec.Cmd - done chan struct{} -} - -func NewServer(name string, args ...string) (*Server, error) { - s := &Server{ - name: name, - cmd: exec.Command(*serverPath, args...), - done: make(chan struct{}), - } - - r, err := s.cmd.StdoutPipe() - if err != nil { - return nil, err - } - - err = s.cmd.Start() - if err != nil { - return nil, err - } - - ready := make(chan error, 1) - go s.watch(r, ready) - - select { - case err = <-ready: - case <-time.After(time.Second * 10): - err = errors.New("timeout waiting for server to start") - } - - if err != nil { - s.Stop() - return nil, err - } - - return s, nil -} - -func (s *Server) watch(r io.Reader, ready chan error) { - fmt.Fprintf(serverLog, "%d START %s \n", s.cmd.Process.Pid, s.name) - var listening bool - var text string - scn := bufio.NewScanner(r) - for scn.Scan() { - text = scn.Text() - fmt.Fprintf(serverLog, "%s\n", text) - if !listening { - if strings.Contains(text, "The server is now ready to accept connections on port") { - listening = true - ready <- nil - } - } - } - if !listening { - ready <- fmt.Errorf("server exited: %s", text) - } - s.cmd.Wait() - fmt.Fprintf(serverLog, "%d STOP %s \n", s.cmd.Process.Pid, s.name) - close(s.done) -} - -func (s *Server) Stop() { - s.cmd.Process.Signal(os.Interrupt) - <-s.done -} - -// stopDefaultServer stops the server created by DialDefaultServer. -func stopDefaultServer() { - defaultServerMu.Lock() - defer defaultServerMu.Unlock() - if defaultServer != nil { - defaultServer.Stop() - defaultServer = nil - } -} - -// startDefaultServer starts the default server if not already running. -func startDefaultServer() error { - defaultServerMu.Lock() - defer defaultServerMu.Unlock() - if defaultServer != nil || defaultServerErr != nil { - return defaultServerErr - } - defaultServer, defaultServerErr = NewServer( - "default", - "--port", strconv.Itoa(*serverBasePort), - "--save", "", - "--appendonly", "no") - return defaultServerErr -} - -// DialDefaultServer starts the test server if not already started and dials a -// connection to the server. -func DialDefaultServer() (Conn, error) { - if err := startDefaultServer(); err != nil { - return nil, err - } - c, err := Dial("tcp", fmt.Sprintf(":%d", *serverBasePort), DialReadTimeout(1*time.Second), DialWriteTimeout(1*time.Second)) - if err != nil { - return nil, err - } - c.Do("FLUSHDB") - return c, nil -} - -func TestMain(m *testing.M) { - os.Exit(func() int { - flag.Parse() - - var f *os.File - if *serverLogName != "" { - var err error - f, err = os.OpenFile(*serverLogName, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600) - if err != nil { - fmt.Fprintf(os.Stderr, "Error opening redis-log: %v\n", err) - return 1 - } - defer f.Close() - serverLog = f - } - - defer stopDefaultServer() - - return m.Run() - }()) -} diff --git a/vendor/github.com/garyburd/redigo/redis/zpop_example_test.go b/vendor/github.com/garyburd/redigo/redis/zpop_example_test.go deleted file mode 100644 index 1d86ee6ce..000000000 --- a/vendor/github.com/garyburd/redigo/redis/zpop_example_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2013 Gary Burd -// -// Licensed under the Apache License, Version 2.0 (the "License"): you may -// not use this file except in compliance with the License. You may obtain -// a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations -// under the License. - -package redis_test - -import ( - "fmt" - "github.com/garyburd/redigo/redis" -) - -// zpop pops a value from the ZSET key using WATCH/MULTI/EXEC commands. -func zpop(c redis.Conn, key string) (result string, err error) { - - defer func() { - // Return connection to normal state on error. - if err != nil { - c.Do("DISCARD") - } - }() - - // Loop until transaction is successful. - for { - if _, err := c.Do("WATCH", key); err != nil { - return "", err - } - - members, err := redis.Strings(c.Do("ZRANGE", key, 0, 0)) - if err != nil { - return "", err - } - if len(members) != 1 { - return "", redis.ErrNil - } - - c.Send("MULTI") - c.Send("ZREM", key, members[0]) - queued, err := c.Do("EXEC") - if err != nil { - return "", err - } - - if queued != nil { - result = members[0] - break - } - } - - return result, nil -} - -// zpopScript pops a value from a ZSET. -var zpopScript = redis.NewScript(1, ` - local r = redis.call('ZRANGE', KEYS[1], 0, 0) - if r ~= nil then - r = r[1] - redis.call('ZREM', KEYS[1], r) - end - return r -`) - -// This example implements ZPOP as described at -// http://redis.io/topics/transactions using WATCH/MULTI/EXEC and scripting. -func Example_zpop() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - - // Add test data using a pipeline. - - for i, member := range []string{"red", "blue", "green"} { - c.Send("ZADD", "zset", i, member) - } - if _, err := c.Do(""); err != nil { - fmt.Println(err) - return - } - - // Pop using WATCH/MULTI/EXEC - - v, err := zpop(c, "zset") - if err != nil { - fmt.Println(err) - return - } - fmt.Println(v) - - // Pop using a script. - - v, err = redis.String(zpopScript.Do(c, "zset")) - if err != nil { - fmt.Println(err) - return - } - fmt.Println(v) - - // Output: - // red - // blue -} diff --git a/vendor/github.com/go-playground/locales/.gitignore b/vendor/github.com/go-playground/locales/.gitignore deleted file mode 100644 index daf913b1b..000000000 --- a/vendor/github.com/go-playground/locales/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/vendor/github.com/go-playground/locales/README.md b/vendor/github.com/go-playground/locales/README.md deleted file mode 100644 index 676b77da1..000000000 --- a/vendor/github.com/go-playground/locales/README.md +++ /dev/null @@ -1,173 +0,0 @@ -## locales - -![Project status](https://img.shields.io/badge/version-0.11.1-green.svg) -[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/locales/branches/master/badge.svg)](https://semaphoreci.com/joeybloggs/locales) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/locales)](https://goreportcard.com/report/github.com/go-playground/locales) -[![GoDoc](https://godoc.org/github.com/go-playground/locales?status.svg)](https://godoc.org/github.com/go-playground/locales) -![License](https://img.shields.io/dub/l/vibe-d.svg) -[![Gitter](https://badges.gitter.im/go-playground/locales.svg)](https://gitter.im/go-playground/locales?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Locales is a set of locales generated from the [Unicode CLDR Project](http://cldr.unicode.org/) which can be used independently or within -an i18n package; these were built for use with, but not exclusive to, [Universal Translator](https://github.com/go-playground/universal-translator). - -Features --------- -- [x] Rules generated from the latest [CLDR](http://cldr.unicode.org/index/downloads) data, v30.0.3 -- [x] Contains Cardinal, Ordinal and Range Plural Rules -- [x] Contains Month, Weekday and Timezone translations built in -- [x] Contains Date & Time formatting functions -- [x] Contains Number, Currency, Accounting and Percent formatting functions -- [x] Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere ) - -Full Tests --------------------- -I could sure use your help adding tests for every locale, it is a huge undertaking and I just don't have the free time to do it all at the moment; -any help would be **greatly appreciated!!!!** please see [issue](https://github.com/go-playground/locales/issues/1) for details. - -Installation ------------ - -Use go get - -```shell -go get github.com/go-playground/locales -``` - -NOTES --------- -You'll notice most return types are []byte, this is because most of the time the results will be concatenated with a larger body -of text and can avoid some allocations if already appending to a byte array, otherwise just cast as string. - -Usage -------- -```go -package main - -import ( - "fmt" - "time" - - "github.com/go-playground/locales/currency" - "github.com/go-playground/locales/en_CA" -) - -func main() { - - loc, _ := time.LoadLocation("America/Toronto") - datetime := time.Date(2016, 02, 03, 9, 0, 1, 0, loc) - - l := en_CA.New() - - // Dates - fmt.Println(l.FmtDateFull(datetime)) - fmt.Println(l.FmtDateLong(datetime)) - fmt.Println(l.FmtDateMedium(datetime)) - fmt.Println(l.FmtDateShort(datetime)) - - // Times - fmt.Println(l.FmtTimeFull(datetime)) - fmt.Println(l.FmtTimeLong(datetime)) - fmt.Println(l.FmtTimeMedium(datetime)) - fmt.Println(l.FmtTimeShort(datetime)) - - // Months Wide - fmt.Println(l.MonthWide(time.January)) - fmt.Println(l.MonthWide(time.February)) - fmt.Println(l.MonthWide(time.March)) - // ... - - // Months Abbreviated - fmt.Println(l.MonthAbbreviated(time.January)) - fmt.Println(l.MonthAbbreviated(time.February)) - fmt.Println(l.MonthAbbreviated(time.March)) - // ... - - // Months Narrow - fmt.Println(l.MonthNarrow(time.January)) - fmt.Println(l.MonthNarrow(time.February)) - fmt.Println(l.MonthNarrow(time.March)) - // ... - - // Weekdays Wide - fmt.Println(l.WeekdayWide(time.Sunday)) - fmt.Println(l.WeekdayWide(time.Monday)) - fmt.Println(l.WeekdayWide(time.Tuesday)) - // ... - - // Weekdays Abbreviated - fmt.Println(l.WeekdayAbbreviated(time.Sunday)) - fmt.Println(l.WeekdayAbbreviated(time.Monday)) - fmt.Println(l.WeekdayAbbreviated(time.Tuesday)) - // ... - - // Weekdays Short - fmt.Println(l.WeekdayShort(time.Sunday)) - fmt.Println(l.WeekdayShort(time.Monday)) - fmt.Println(l.WeekdayShort(time.Tuesday)) - // ... - - // Weekdays Narrow - fmt.Println(l.WeekdayNarrow(time.Sunday)) - fmt.Println(l.WeekdayNarrow(time.Monday)) - fmt.Println(l.WeekdayNarrow(time.Tuesday)) - // ... - - var f64 float64 - - f64 = -10356.4523 - - // Number - fmt.Println(l.FmtNumber(f64, 2)) - - // Currency - fmt.Println(l.FmtCurrency(f64, 2, currency.CAD)) - fmt.Println(l.FmtCurrency(f64, 2, currency.USD)) - - // Accounting - fmt.Println(l.FmtAccounting(f64, 2, currency.CAD)) - fmt.Println(l.FmtAccounting(f64, 2, currency.USD)) - - f64 = 78.12 - - // Percent - fmt.Println(l.FmtPercent(f64, 0)) - - // Plural Rules for locale, so you know what rules you must cover - fmt.Println(l.PluralsCardinal()) - fmt.Println(l.PluralsOrdinal()) - - // Cardinal Plural Rules - fmt.Println(l.CardinalPluralRule(1, 0)) - fmt.Println(l.CardinalPluralRule(1.0, 0)) - fmt.Println(l.CardinalPluralRule(1.0, 1)) - fmt.Println(l.CardinalPluralRule(3, 0)) - - // Ordinal Plural Rules - fmt.Println(l.OrdinalPluralRule(21, 0)) // 21st - fmt.Println(l.OrdinalPluralRule(22, 0)) // 22nd - fmt.Println(l.OrdinalPluralRule(33, 0)) // 33rd - fmt.Println(l.OrdinalPluralRule(34, 0)) // 34th - - // Range Plural Rules - fmt.Println(l.RangePluralRule(1, 0, 1, 0)) // 1-1 - fmt.Println(l.RangePluralRule(1, 0, 2, 0)) // 1-2 - fmt.Println(l.RangePluralRule(5, 0, 8, 0)) // 5-8 -} -``` - -NOTES: -------- -These rules were generated from the [Unicode CLDR Project](http://cldr.unicode.org/), if you encounter any issues -I strongly encourage contributing to the CLDR project to get the locale information corrected and the next time -these locales are regenerated the fix will come with. - -I do however realize that time constraints are often important and so there are two options: - -1. Create your own locale, copy, paste and modify, and ensure it complies with the `Translator` interface. -2. Add an exception in the locale generation code directly and once regenerated, fix will be in place. - -Please to not make fixes inside the locale files, they WILL get overwritten when the locales are regenerated. - -License ------- -Distributed under MIT License, please see license file in code for more details. diff --git a/vendor/github.com/go-playground/locales/cu/cu.go b/vendor/github.com/go-playground/locales/cu/cu.go deleted file mode 100644 index c9bca4218..000000000 --- a/vendor/github.com/go-playground/locales/cu/cu.go +++ /dev/null @@ -1,594 +0,0 @@ -package cu - -import ( - "math" - "strconv" - "time" - - "github.com/go-playground/locales" - "github.com/go-playground/locales/currency" -) - -type cu struct { - locale string - pluralsCardinal []locales.PluralRule - pluralsOrdinal []locales.PluralRule - pluralsRange []locales.PluralRule - decimal string - group string - minus string - percent string - percentSuffix string - perMille string - timeSeparator string - inifinity string - currencies []string // idx = enum of currency code - currencyPositiveSuffix string - currencyNegativeSuffix string - monthsAbbreviated []string - monthsNarrow []string - monthsWide []string - daysAbbreviated []string - daysNarrow []string - daysShort []string - daysWide []string - periodsAbbreviated []string - periodsNarrow []string - periodsShort []string - periodsWide []string - erasAbbreviated []string - erasNarrow []string - erasWide []string - timezones map[string]string -} - -// New returns a new instance of translator for the 'cu' locale -func New() locales.Translator { - return &cu{ - locale: "cu", - pluralsCardinal: nil, - pluralsOrdinal: nil, - pluralsRange: nil, - decimal: ",", - group: " ", - minus: "-", - percent: "%", - timeSeparator: ":", - inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "R$", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "€", "FIM", "FJD", "FKP", "FRF", "£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "₹", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JP¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "₸", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "₽", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "₴", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - percentSuffix: " ", - currencyPositiveSuffix: " ", - currencyNegativeSuffix: " ", - monthsAbbreviated: []string{"", "і҆аⷩ҇", "феⷡ҇", "маⷬ҇", "а҆пⷬ҇", "маꙵ", "і҆ꙋⷩ҇", "і҆ꙋⷧ҇", "а҆́ѵⷢ҇", "сеⷫ҇", "ѻ҆кⷮ", "ноеⷨ", "деⷦ҇"}, - monthsNarrow: []string{"", "І҆", "Ф", "М", "А҆", "М", "І҆", "І҆", "А҆", "С", "Ѻ҆", "Н", "Д"}, - monthsWide: []string{"", "і҆аннꙋа́рїа", "феврꙋа́рїа", "ма́рта", "а҆прі́ллїа", "ма́їа", "і҆ꙋ́нїа", "і҆ꙋ́лїа", "а҆́ѵгꙋста", "септе́мврїа", "ѻ҆ктѡ́врїа", "ное́мврїа", "деке́мврїа"}, - daysAbbreviated: []string{"ндⷧ҇ѧ", "пнⷣе", "втоⷬ҇", "срⷣе", "чеⷦ҇", "пѧⷦ҇", "сꙋⷠ҇"}, - daysNarrow: []string{"Н", "П", "В", "С", "Ч", "П", "С"}, - daysShort: []string{"ндⷧ҇ѧ", "пнⷣе", "втоⷬ҇", "срⷣе", "чеⷦ҇", "пѧⷦ҇", "сꙋⷠ҇"}, - daysWide: []string{"недѣ́лѧ", "понедѣ́льникъ", "вто́рникъ", "среда̀", "четверто́къ", "пѧто́къ", "сꙋббѡ́та"}, - periodsAbbreviated: []string{"ДП", "ПП"}, - periodsNarrow: []string{"ДП", "ПП"}, - periodsWide: []string{"ДП", "ПП"}, - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"пре́дъ р.\u00a0х.", "по р.\u00a0х."}, - timezones: map[string]string{"HNPM": "HNPM", "PDT": "тихоѻкеа́нское лѣ́тнее вре́мѧ", "NZDT": "NZDT", "MST": "MST", "ART": "ART", "WAT": "WAT", "HEPMX": "HEPMX", "HECU": "HECU", "AWDT": "AWDT", "HAST": "HAST", "IST": "IST", "WARST": "WARST", "CLT": "CLT", "HKST": "HKST", "HEEG": "HEEG", "TMT": "TMT", "EST": "восточноамерїка́нское зи́мнее вре́мѧ", "PST": "тихоѻкеа́нское зи́мнее вре́мѧ", "NZST": "NZST", "TMST": "TMST", "HNEG": "HNEG", "AKDT": "AKDT", "AEDT": "AEDT", "GYT": "GYT", "ADT": "а҆тланті́ческое лѣ́тнее вре́мѧ", "AWST": "AWST", "OEZ": "восточноєѵрѡпе́йское зи́мнее вре́мѧ", "ChST": "ChST", "HEPM": "HEPM", "CLST": "CLST", "HENOMX": "HENOMX", "HNT": "HNT", "AKST": "AKST", "HNCU": "HNCU", "MESZ": "среднеєѵрѡпе́йское лѣ́тнее вре́мѧ", "OESZ": "восточноєѵрѡпе́йское лѣ́тнее вре́мѧ", "UYT": "UYT", "LHDT": "LHDT", "CHAST": "CHAST", "BOT": "BOT", "ACDT": "ACDT", "HNPMX": "HNPMX", "CST": "среднеамерїка́нское зи́мнее вре́мѧ", "CHADT": "CHADT", "SGT": "SGT", "JDT": "JDT", "MDT": "MDT", "ACST": "ACST", "WITA": "WITA", "UYST": "UYST", "WIT": "WIT", "MYT": "MYT", "ARST": "ARST", "HNNOMX": "HNNOMX", "BT": "BT", "EDT": "восточноамерїка́нское лѣ́тнее вре́мѧ", "SRT": "SRT", "HADT": "HADT", "ACWDT": "ACWDT", "JST": "JST", "HNOG": "HNOG", "AST": "а҆тланті́ческое зи́мнее вре́мѧ", "WAST": "WAST", "WIB": "WIB", "MEZ": "среднеєѵрѡпе́йское зи́мнее вре́мѧ", "GFT": "GFT", "ACWST": "ACWST", "WART": "WART", "HEOG": "HEOG", "WESZ": "западноєѵрѡпе́йское лѣ́тнее вре́мѧ", "GMT": "сре́днее вре́мѧ по грі́нꙋичꙋ", "WEZ": "западноєѵрѡпе́йское зи́мнее вре́мѧ", "COT": "COT", "AEST": "AEST", "VET": "VET", "∅∅∅": "∅∅∅", "SAST": "SAST", "LHST": "LHST", "EAT": "EAT", "CDT": "среднеамерїка́нское лѣ́тнее вре́мѧ", "ECT": "ECT", "CAT": "CAT", "HKT": "HKT", "COST": "COST", "HAT": "HAT"}, - } -} - -// Locale returns the current translators string locale -func (cu *cu) Locale() string { - return cu.locale -} - -// PluralsCardinal returns the list of cardinal plural rules associated with 'cu' -func (cu *cu) PluralsCardinal() []locales.PluralRule { - return cu.pluralsCardinal -} - -// PluralsOrdinal returns the list of ordinal plural rules associated with 'cu' -func (cu *cu) PluralsOrdinal() []locales.PluralRule { - return cu.pluralsOrdinal -} - -// PluralsRange returns the list of range plural rules associated with 'cu' -func (cu *cu) PluralsRange() []locales.PluralRule { - return cu.pluralsRange -} - -// CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'cu' -func (cu *cu) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown -} - -// OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'cu' -func (cu *cu) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { - return locales.PluralRuleUnknown -} - -// RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'cu' -func (cu *cu) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule { - return locales.PluralRuleUnknown -} - -// MonthAbbreviated returns the locales abbreviated month given the 'month' provided -func (cu *cu) MonthAbbreviated(month time.Month) string { - return cu.monthsAbbreviated[month] -} - -// MonthsAbbreviated returns the locales abbreviated months -func (cu *cu) MonthsAbbreviated() []string { - return cu.monthsAbbreviated[1:] -} - -// MonthNarrow returns the locales narrow month given the 'month' provided -func (cu *cu) MonthNarrow(month time.Month) string { - return cu.monthsNarrow[month] -} - -// MonthsNarrow returns the locales narrow months -func (cu *cu) MonthsNarrow() []string { - return cu.monthsNarrow[1:] -} - -// MonthWide returns the locales wide month given the 'month' provided -func (cu *cu) MonthWide(month time.Month) string { - return cu.monthsWide[month] -} - -// MonthsWide returns the locales wide months -func (cu *cu) MonthsWide() []string { - return cu.monthsWide[1:] -} - -// WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -func (cu *cu) WeekdayAbbreviated(weekday time.Weekday) string { - return cu.daysAbbreviated[weekday] -} - -// WeekdaysAbbreviated returns the locales abbreviated weekdays -func (cu *cu) WeekdaysAbbreviated() []string { - return cu.daysAbbreviated -} - -// WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided -func (cu *cu) WeekdayNarrow(weekday time.Weekday) string { - return cu.daysNarrow[weekday] -} - -// WeekdaysNarrow returns the locales narrow weekdays -func (cu *cu) WeekdaysNarrow() []string { - return cu.daysNarrow -} - -// WeekdayShort returns the locales short weekday given the 'weekday' provided -func (cu *cu) WeekdayShort(weekday time.Weekday) string { - return cu.daysShort[weekday] -} - -// WeekdaysShort returns the locales short weekdays -func (cu *cu) WeekdaysShort() []string { - return cu.daysShort -} - -// WeekdayWide returns the locales wide weekday given the 'weekday' provided -func (cu *cu) WeekdayWide(weekday time.Weekday) string { - return cu.daysWide[weekday] -} - -// WeekdaysWide returns the locales wide weekdays -func (cu *cu) WeekdaysWide() []string { - return cu.daysWide -} - -// FmtNumber returns 'num' with digits/precision of 'v' for 'cu' and handles both Whole and Real numbers based on 'v' -func (cu *cu) FmtNumber(num float64, v uint64) string { - - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) - - for i := len(s) - 1; i >= 0; i-- { - - if s[i] == '.' { - b = append(b, cu.decimal[0]) - inWhole = true - continue - } - - if inWhole { - if count == 3 { - for j := len(cu.group) - 1; j >= 0; j-- { - b = append(b, cu.group[j]) - } - count = 1 - } else { - count++ - } - } - - b = append(b, s[i]) - } - - if num < 0 { - b = append(b, cu.minus[0]) - } - - // reverse - for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { - b[i], b[j] = b[j], b[i] - } - - return string(b) -} - -// FmtPercent returns 'num' with digits/precision of 'v' for 'cu' and handles both Whole and Real numbers based on 'v' -// NOTE: 'num' passed into FmtPercent is assumed to be in percent already -func (cu *cu) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - l := len(s) + 5 - b := make([]byte, 0, l) - - for i := len(s) - 1; i >= 0; i-- { - - if s[i] == '.' { - b = append(b, cu.decimal[0]) - continue - } - - b = append(b, s[i]) - } - - if num < 0 { - b = append(b, cu.minus[0]) - } - - // reverse - for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { - b[i], b[j] = b[j], b[i] - } - - b = append(b, cu.percentSuffix...) - - b = append(b, cu.percent...) - - return string(b) -} - -// FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'cu' -func (cu *cu) FmtCurrency(num float64, v uint64, currency currency.Type) string { - - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cu.currencies[currency] - l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) - - for i := len(s) - 1; i >= 0; i-- { - - if s[i] == '.' { - b = append(b, cu.decimal[0]) - inWhole = true - continue - } - - if inWhole { - if count == 3 { - for j := len(cu.group) - 1; j >= 0; j-- { - b = append(b, cu.group[j]) - } - count = 1 - } else { - count++ - } - } - - b = append(b, s[i]) - } - - if num < 0 { - b = append(b, cu.minus[0]) - } - - // reverse - for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { - b[i], b[j] = b[j], b[i] - } - - if int(v) < 2 { - - if v == 0 { - b = append(b, cu.decimal...) - } - - for i := 0; i < 2-int(v); i++ { - b = append(b, '0') - } - } - - b = append(b, cu.currencyPositiveSuffix...) - - b = append(b, symbol...) - - return string(b) -} - -// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cu' -// in accounting notation. -func (cu *cu) FmtAccounting(num float64, v uint64, currency currency.Type) string { - - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cu.currencies[currency] - l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) - - for i := len(s) - 1; i >= 0; i-- { - - if s[i] == '.' { - b = append(b, cu.decimal[0]) - inWhole = true - continue - } - - if inWhole { - if count == 3 { - for j := len(cu.group) - 1; j >= 0; j-- { - b = append(b, cu.group[j]) - } - count = 1 - } else { - count++ - } - } - - b = append(b, s[i]) - } - - if num < 0 { - - b = append(b, cu.minus[0]) - - } - - // reverse - for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { - b[i], b[j] = b[j], b[i] - } - - if int(v) < 2 { - - if v == 0 { - b = append(b, cu.decimal...) - } - - for i := 0; i < 2-int(v); i++ { - b = append(b, '0') - } - } - - if num < 0 { - b = append(b, cu.currencyNegativeSuffix...) - b = append(b, symbol...) - } else { - - b = append(b, cu.currencyPositiveSuffix...) - b = append(b, symbol...) - } - - return string(b) -} - -// FmtDateShort returns the short date representation of 't' for 'cu' -func (cu *cu) FmtDateShort(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { - b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } - - b = append(b, []byte{0x2e}...) - - if t.Month() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Month()), 10) - - b = append(b, []byte{0x2e}...) - - if t.Day() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Day()), 10) - - return string(b) -} - -// FmtDateMedium returns the medium date representation of 't' for 'cu' -func (cu *cu) FmtDateMedium(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { - b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } - - b = append(b, []byte{0x20}...) - b = append(b, cu.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - - return string(b) -} - -// FmtDateLong returns the long date representation of 't' for 'cu' -func (cu *cu) FmtDateLong(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { - b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } - - b = append(b, []byte{0x20}...) - b = append(b, cu.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - - return string(b) -} - -// FmtDateFull returns the full date representation of 't' for 'cu' -func (cu *cu) FmtDateFull(t time.Time) string { - - b := make([]byte, 0, 32) - - b = append(b, cu.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x20}...) - b = append(b, cu.monthsWide[t.Month()]...) - b = append(b, []byte{0x20, 0xd0, 0xbb}...) - b = append(b, []byte{0x2e, 0x20}...) - - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { - b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } - - b = append(b, []byte{0x2e}...) - - return string(b) -} - -// FmtTimeShort returns the short time representation of 't' for 'cu' -func (cu *cu) FmtTimeShort(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Hour() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, cu.timeSeparator...) - - if t.Minute() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Minute()), 10) - - return string(b) -} - -// FmtTimeMedium returns the medium time representation of 't' for 'cu' -func (cu *cu) FmtTimeMedium(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Hour() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, cu.timeSeparator...) - - if t.Minute() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Minute()), 10) - b = append(b, cu.timeSeparator...) - - if t.Second() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Second()), 10) - - return string(b) -} - -// FmtTimeLong returns the long time representation of 't' for 'cu' -func (cu *cu) FmtTimeLong(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Hour() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, cu.timeSeparator...) - - if t.Minute() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Minute()), 10) - b = append(b, cu.timeSeparator...) - - if t.Second() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) - - tz, _ := t.Zone() - b = append(b, tz...) - - return string(b) -} - -// FmtTimeFull returns the full time representation of 't' for 'cu' -func (cu *cu) FmtTimeFull(t time.Time) string { - - b := make([]byte, 0, 32) - - if t.Hour() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, cu.timeSeparator...) - - if t.Minute() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Minute()), 10) - b = append(b, cu.timeSeparator...) - - if t.Second() < 10 { - b = append(b, '0') - } - - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) - - tz, _ := t.Zone() - - if btz, ok := cu.timezones[tz]; ok { - b = append(b, btz...) - } else { - b = append(b, tz...) - } - - return string(b) -} diff --git a/vendor/github.com/go-playground/locales/cu/cu_test.go b/vendor/github.com/go-playground/locales/cu/cu_test.go deleted file mode 100644 index 91c734a40..000000000 --- a/vendor/github.com/go-playground/locales/cu/cu_test.go +++ /dev/null @@ -1,1120 +0,0 @@ -package cu - -import ( - "testing" - "time" - - "github.com/go-playground/locales" - "github.com/go-playground/locales/currency" -) - -func TestLocale(t *testing.T) { - - trans := New() - expected := "cu" - - if trans.Locale() != expected { - t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale()) - } -} - -func TestPluralsRange(t *testing.T) { - - trans := New() - - tests := []struct { - expected locales.PluralRule - }{ - // { - // expected: locales.PluralRuleOther, - // }, - } - - rules := trans.PluralsRange() - // expected := 1 - // if len(rules) != expected { - // t.Errorf("Expected '%d' Got '%d'", expected, len(rules)) - // } - - for _, tt := range tests { - - r := locales.PluralRuleUnknown - - for i := 0; i < len(rules); i++ { - if rules[i] == tt.expected { - r = rules[i] - break - } - } - if r == locales.PluralRuleUnknown { - t.Errorf("Expected '%s' Got '%s'", tt.expected, r) - } - } -} - -func TestPluralsOrdinal(t *testing.T) { - - trans := New() - - tests := []struct { - expected locales.PluralRule - }{ - // { - // expected: locales.PluralRuleOne, - // }, - // { - // expected: locales.PluralRuleTwo, - // }, - // { - // expected: locales.PluralRuleFew, - // }, - // { - // expected: locales.PluralRuleOther, - // }, - } - - rules := trans.PluralsOrdinal() - // expected := 4 - // if len(rules) != expected { - // t.Errorf("Expected '%d' Got '%d'", expected, len(rules)) - // } - - for _, tt := range tests { - - r := locales.PluralRuleUnknown - - for i := 0; i < len(rules); i++ { - if rules[i] == tt.expected { - r = rules[i] - break - } - } - if r == locales.PluralRuleUnknown { - t.Errorf("Expected '%s' Got '%s'", tt.expected, r) - } - } -} - -func TestPluralsCardinal(t *testing.T) { - - trans := New() - - tests := []struct { - expected locales.PluralRule - }{ - // { - // expected: locales.PluralRuleOne, - // }, - // { - // expected: locales.PluralRuleOther, - // }, - } - - rules := trans.PluralsCardinal() - // expected := 2 - // if len(rules) != expected { - // t.Errorf("Expected '%d' Got '%d'", expected, len(rules)) - // } - - for _, tt := range tests { - - r := locales.PluralRuleUnknown - - for i := 0; i < len(rules); i++ { - if rules[i] == tt.expected { - r = rules[i] - break - } - } - if r == locales.PluralRuleUnknown { - t.Errorf("Expected '%s' Got '%s'", tt.expected, r) - } - } -} - -func TestRangePlurals(t *testing.T) { - - trans := New() - - tests := []struct { - num1 float64 - v1 uint64 - num2 float64 - v2 uint64 - expected locales.PluralRule - }{ - // { - // num1: 1, - // v1: 1, - // num2: 2, - // v2: 2, - // expected: locales.PluralRuleOther, - // }, - } - - for _, tt := range tests { - rule := trans.RangePluralRule(tt.num1, tt.v1, tt.num2, tt.v2) - if rule != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, rule) - } - } -} - -func TestOrdinalPlurals(t *testing.T) { - - trans := New() - - tests := []struct { - num float64 - v uint64 - expected locales.PluralRule - }{ - // { - // num: 1, - // v: 0, - // expected: locales.PluralRuleOne, - // }, - // { - // num: 2, - // v: 0, - // expected: locales.PluralRuleTwo, - // }, - // { - // num: 3, - // v: 0, - // expected: locales.PluralRuleFew, - // }, - // { - // num: 4, - // v: 0, - // expected: locales.PluralRuleOther, - // }, - } - - for _, tt := range tests { - rule := trans.OrdinalPluralRule(tt.num, tt.v) - if rule != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, rule) - } - } -} - -func TestCardinalPlurals(t *testing.T) { - - trans := New() - - tests := []struct { - num float64 - v uint64 - expected locales.PluralRule - }{ - // { - // num: 1, - // v: 0, - // expected: locales.PluralRuleOne, - // }, - // { - // num: 4, - // v: 0, - // expected: locales.PluralRuleOther, - // }, - } - - for _, tt := range tests { - rule := trans.CardinalPluralRule(tt.num, tt.v) - if rule != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, rule) - } - } -} - -func TestDaysAbbreviated(t *testing.T) { - - trans := New() - days := trans.WeekdaysAbbreviated() - - for i, day := range days { - s := trans.WeekdayAbbreviated(time.Weekday(i)) - if s != day { - t.Errorf("Expected '%s' Got '%s'", day, s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 0, - // expected: "Sun", - // }, - // { - // idx: 1, - // expected: "Mon", - // }, - // { - // idx: 2, - // expected: "Tue", - // }, - // { - // idx: 3, - // expected: "Wed", - // }, - // { - // idx: 4, - // expected: "Thu", - // }, - // { - // idx: 5, - // expected: "Fri", - // }, - // { - // idx: 6, - // expected: "Sat", - // }, - } - - for _, tt := range tests { - s := trans.WeekdayAbbreviated(time.Weekday(tt.idx)) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestDaysNarrow(t *testing.T) { - - trans := New() - days := trans.WeekdaysNarrow() - - for i, day := range days { - s := trans.WeekdayNarrow(time.Weekday(i)) - if s != day { - t.Errorf("Expected '%s' Got '%s'", string(day), s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 0, - // expected: "S", - // }, - // { - // idx: 1, - // expected: "M", - // }, - // { - // idx: 2, - // expected: "T", - // }, - // { - // idx: 3, - // expected: "W", - // }, - // { - // idx: 4, - // expected: "T", - // }, - // { - // idx: 5, - // expected: "F", - // }, - // { - // idx: 6, - // expected: "S", - // }, - } - - for _, tt := range tests { - s := trans.WeekdayNarrow(time.Weekday(tt.idx)) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestDaysShort(t *testing.T) { - - trans := New() - days := trans.WeekdaysShort() - - for i, day := range days { - s := trans.WeekdayShort(time.Weekday(i)) - if s != day { - t.Errorf("Expected '%s' Got '%s'", day, s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 0, - // expected: "Su", - // }, - // { - // idx: 1, - // expected: "Mo", - // }, - // { - // idx: 2, - // expected: "Tu", - // }, - // { - // idx: 3, - // expected: "We", - // }, - // { - // idx: 4, - // expected: "Th", - // }, - // { - // idx: 5, - // expected: "Fr", - // }, - // { - // idx: 6, - // expected: "Sa", - // }, - } - - for _, tt := range tests { - s := trans.WeekdayShort(time.Weekday(tt.idx)) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestDaysWide(t *testing.T) { - - trans := New() - days := trans.WeekdaysWide() - - for i, day := range days { - s := trans.WeekdayWide(time.Weekday(i)) - if s != day { - t.Errorf("Expected '%s' Got '%s'", day, s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 0, - // expected: "Sunday", - // }, - // { - // idx: 1, - // expected: "Monday", - // }, - // { - // idx: 2, - // expected: "Tuesday", - // }, - // { - // idx: 3, - // expected: "Wednesday", - // }, - // { - // idx: 4, - // expected: "Thursday", - // }, - // { - // idx: 5, - // expected: "Friday", - // }, - // { - // idx: 6, - // expected: "Saturday", - // }, - } - - for _, tt := range tests { - s := trans.WeekdayWide(time.Weekday(tt.idx)) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestMonthsAbbreviated(t *testing.T) { - - trans := New() - months := trans.MonthsAbbreviated() - - for i, month := range months { - s := trans.MonthAbbreviated(time.Month(i + 1)) - if s != month { - t.Errorf("Expected '%s' Got '%s'", month, s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 1, - // expected: "Jan", - // }, - // { - // idx: 2, - // expected: "Feb", - // }, - // { - // idx: 3, - // expected: "Mar", - // }, - // { - // idx: 4, - // expected: "Apr", - // }, - // { - // idx: 5, - // expected: "May", - // }, - // { - // idx: 6, - // expected: "Jun", - // }, - // { - // idx: 7, - // expected: "Jul", - // }, - // { - // idx: 8, - // expected: "Aug", - // }, - // { - // idx: 9, - // expected: "Sep", - // }, - // { - // idx: 10, - // expected: "Oct", - // }, - // { - // idx: 11, - // expected: "Nov", - // }, - // { - // idx: 12, - // expected: "Dec", - // }, - } - - for _, tt := range tests { - s := trans.MonthAbbreviated(time.Month(tt.idx)) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestMonthsNarrow(t *testing.T) { - - trans := New() - months := trans.MonthsNarrow() - - for i, month := range months { - s := trans.MonthNarrow(time.Month(i + 1)) - if s != month { - t.Errorf("Expected '%s' Got '%s'", month, s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 1, - // expected: "J", - // }, - // { - // idx: 2, - // expected: "F", - // }, - // { - // idx: 3, - // expected: "M", - // }, - // { - // idx: 4, - // expected: "A", - // }, - // { - // idx: 5, - // expected: "M", - // }, - // { - // idx: 6, - // expected: "J", - // }, - // { - // idx: 7, - // expected: "J", - // }, - // { - // idx: 8, - // expected: "A", - // }, - // { - // idx: 9, - // expected: "S", - // }, - // { - // idx: 10, - // expected: "O", - // }, - // { - // idx: 11, - // expected: "N", - // }, - // { - // idx: 12, - // expected: "D", - // }, - } - - for _, tt := range tests { - s := trans.MonthNarrow(time.Month(tt.idx)) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestMonthsWide(t *testing.T) { - - trans := New() - months := trans.MonthsWide() - - for i, month := range months { - s := trans.MonthWide(time.Month(i + 1)) - if s != month { - t.Errorf("Expected '%s' Got '%s'", month, s) - } - } - - tests := []struct { - idx int - expected string - }{ - // { - // idx: 1, - // expected: "January", - // }, - // { - // idx: 2, - // expected: "February", - // }, - // { - // idx: 3, - // expected: "March", - // }, - // { - // idx: 4, - // expected: "April", - // }, - // { - // idx: 5, - // expected: "May", - // }, - // { - // idx: 6, - // expected: "June", - // }, - // { - // idx: 7, - // expected: "July", - // }, - // { - // idx: 8, - // expected: "August", - // }, - // { - // idx: 9, - // expected: "September", - // }, - // { - // idx: 10, - // expected: "October", - // }, - // { - // idx: 11, - // expected: "November", - // }, - // { - // idx: 12, - // expected: "December", - // }, - } - - for _, tt := range tests { - s := string(trans.MonthWide(time.Month(tt.idx))) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtTimeFull(t *testing.T) { - - // loc, err := time.LoadLocation("America/Toronto") - // if err != nil { - // t.Errorf("Expected '' Got '%s'", err) - // } - - // fixed := time.FixedZone("OTHER", -4) - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 5, 1, 0, loc), - // expected: "9:05:01 am Eastern Standard Time", - // }, - // { - // t: time.Date(2016, 02, 03, 20, 5, 1, 0, fixed), - // expected: "8:05:01 pm OTHER", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtTimeFull(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtTimeLong(t *testing.T) { - - // loc, err := time.LoadLocation("America/Toronto") - // if err != nil { - // t.Errorf("Expected '' Got '%s'", err) - // } - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 5, 1, 0, loc), - // expected: "9:05:01 am EST", - // }, - // { - // t: time.Date(2016, 02, 03, 20, 5, 1, 0, loc), - // expected: "8:05:01 pm EST", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtTimeLong(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtTimeMedium(t *testing.T) { - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 5, 1, 0, time.UTC), - // expected: "9:05:01 am", - // }, - // { - // t: time.Date(2016, 02, 03, 20, 5, 1, 0, time.UTC), - // expected: "8:05:01 pm", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtTimeMedium(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtTimeShort(t *testing.T) { - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 5, 1, 0, time.UTC), - // expected: "9:05 am", - // }, - // { - // t: time.Date(2016, 02, 03, 20, 5, 1, 0, time.UTC), - // expected: "8:05 pm", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtTimeShort(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtDateFull(t *testing.T) { - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC), - // expected: "Wednesday, February 3, 2016", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtDateFull(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtDateLong(t *testing.T) { - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC), - // expected: "February 3, 2016", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtDateLong(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtDateMedium(t *testing.T) { - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC), - // expected: "Feb 3, 2016", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtDateMedium(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtDateShort(t *testing.T) { - - tests := []struct { - t time.Time - expected string - }{ - // { - // t: time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC), - // expected: "2/3/16", - // }, - // { - // t: time.Date(-500, 02, 03, 9, 0, 1, 0, time.UTC), - // expected: "2/3/500", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtDateShort(tt.t) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtNumber(t *testing.T) { - - tests := []struct { - num float64 - v uint64 - expected string - }{ - // { - // num: 1123456.5643, - // v: 2, - // expected: "1,123,456.56", - // }, - // { - // num: 1123456.5643, - // v: 1, - // expected: "1,123,456.6", - // }, - // { - // num: 221123456.5643, - // v: 3, - // expected: "221,123,456.564", - // }, - // { - // num: -221123456.5643, - // v: 3, - // expected: "-221,123,456.564", - // }, - // { - // num: -221123456.5643, - // v: 3, - // expected: "-221,123,456.564", - // }, - // { - // num: 0, - // v: 2, - // expected: "0.00", - // }, - // { - // num: -0, - // v: 2, - // expected: "0.00", - // }, - // { - // num: -0, - // v: 2, - // expected: "0.00", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtNumber(tt.num, tt.v) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtCurrency(t *testing.T) { - - tests := []struct { - num float64 - v uint64 - currency currency.Type - expected string - }{ - // { - // num: 1123456.5643, - // v: 2, - // currency: currency.USD, - // expected: "$1,123,456.56", - // }, - // { - // num: 1123456.5643, - // v: 1, - // currency: currency.USD, - // expected: "$1,123,456.60", - // }, - // { - // num: 221123456.5643, - // v: 3, - // currency: currency.USD, - // expected: "$221,123,456.564", - // }, - // { - // num: -221123456.5643, - // v: 3, - // currency: currency.USD, - // expected: "-$221,123,456.564", - // }, - // { - // num: -221123456.5643, - // v: 3, - // currency: currency.CAD, - // expected: "-CAD 221,123,456.564", - // }, - // { - // num: 0, - // v: 2, - // currency: currency.USD, - // expected: "$0.00", - // }, - // { - // num: -0, - // v: 2, - // currency: currency.USD, - // expected: "$0.00", - // }, - // { - // num: -0, - // v: 2, - // currency: currency.CAD, - // expected: "CAD 0.00", - // }, - // { - // num: 1.23, - // v: 0, - // currency: currency.USD, - // expected: "$1.00", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtCurrency(tt.num, tt.v, tt.currency) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtAccounting(t *testing.T) { - - tests := []struct { - num float64 - v uint64 - currency currency.Type - expected string - }{ - // { - // num: 1123456.5643, - // v: 2, - // currency: currency.USD, - // expected: "$1,123,456.56", - // }, - // { - // num: 1123456.5643, - // v: 1, - // currency: currency.USD, - // expected: "$1,123,456.60", - // }, - // { - // num: 221123456.5643, - // v: 3, - // currency: currency.USD, - // expected: "$221,123,456.564", - // }, - // { - // num: -221123456.5643, - // v: 3, - // currency: currency.USD, - // expected: "($221,123,456.564)", - // }, - // { - // num: -221123456.5643, - // v: 3, - // currency: currency.CAD, - // expected: "(CAD 221,123,456.564)", - // }, - // { - // num: -0, - // v: 2, - // currency: currency.USD, - // expected: "$0.00", - // }, - // { - // num: -0, - // v: 2, - // currency: currency.CAD, - // expected: "CAD 0.00", - // }, - // { - // num: 1.23, - // v: 0, - // currency: currency.USD, - // expected: "$1.00", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtAccounting(tt.num, tt.v, tt.currency) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFmtPercent(t *testing.T) { - - tests := []struct { - num float64 - v uint64 - expected string - }{ - // { - // num: 15, - // v: 0, - // expected: "15%", - // }, - // { - // num: 15, - // v: 2, - // expected: "15.00%", - // }, - // { - // num: 434.45, - // v: 0, - // expected: "434%", - // }, - // { - // num: 34.4, - // v: 2, - // expected: "34.40%", - // }, - // { - // num: -34, - // v: 0, - // expected: "-34%", - // }, - } - - trans := New() - - for _, tt := range tests { - s := trans.FmtPercent(tt.num, tt.v) - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} diff --git a/vendor/github.com/go-playground/locales/currency/currency.go b/vendor/github.com/go-playground/locales/currency/currency.go deleted file mode 100644 index 6e75ec58c..000000000 --- a/vendor/github.com/go-playground/locales/currency/currency.go +++ /dev/null @@ -1,306 +0,0 @@ -package currency - -// Type is the currency type associated with the locales currency enum -type Type int - -// locale currencies -const ( - ADP Type = iota - AED - AFA - AFN - ALK - ALL - AMD - ANG - AOA - AOK - AON - AOR - ARA - ARL - ARM - ARP - ARS - ATS - AUD - AWG - AZM - AZN - BAD - BAM - BAN - BBD - BDT - BEC - BEF - BEL - BGL - BGM - BGN - BGO - BHD - BIF - BMD - BND - BOB - BOL - BOP - BOV - BRB - BRC - BRE - BRL - BRN - BRR - BRZ - BSD - BTN - BUK - BWP - BYB - BYN - BYR - BZD - CAD - CDF - CHE - CHF - CHW - CLE - CLF - CLP - CNX - CNY - COP - COU - CRC - CSD - CSK - CUC - CUP - CVE - CYP - CZK - DDM - DEM - DJF - DKK - DOP - DZD - ECS - ECV - EEK - EGP - ERN - ESA - ESB - ESP - ETB - EUR - FIM - FJD - FKP - FRF - GBP - GEK - GEL - GHC - GHS - GIP - GMD - GNF - GNS - GQE - GRD - GTQ - GWE - GWP - GYD - HKD - HNL - HRD - HRK - HTG - HUF - IDR - IEP - ILP - ILR - ILS - INR - IQD - IRR - ISJ - ISK - ITL - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRH - KRO - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LTL - LTT - LUC - LUF - LUL - LVL - LVR - LYD - MAD - MAF - MCF - MDC - MDL - MGA - MGF - MKD - MKN - MLF - MMK - MNT - MOP - MRO - MTL - MTP - MUR - MVP - MVR - MWK - MXN - MXP - MXV - MYR - MZE - MZM - MZN - NAD - NGN - NIC - NIO - NLG - NOK - NPR - NZD - OMR - PAB - PEI - PEN - PES - PGK - PHP - PKR - PLN - PLZ - PTE - PYG - QAR - RHD - ROL - RON - RSD - RUB - RUR - RWF - SAR - SBD - SCR - SDD - SDG - SDP - SEK - SGD - SHP - SIT - SKK - SLL - SOS - SRD - SRG - SSP - STD - SUR - SVC - SYP - SZL - THB - TJR - TJS - TMM - TMT - TND - TOP - TPE - TRL - TRY - TTD - TWD - TZS - UAH - UAK - UGS - UGX - USD - USN - USS - UYI - UYP - UYU - UZS - VEB - VEF - VND - VNN - VUV - WST - XAF - XAG - XAU - XBA - XBB - XBC - XBD - XCD - XDR - XEU - XFO - XFU - XOF - XPD - XPF - XPT - XRE - XSU - XTS - XUA - XXX - YDD - YER - YUD - YUM - YUN - YUR - ZAL - ZAR - ZMK - ZMW - ZRN - ZRZ - ZWD - ZWL - ZWR -) diff --git a/vendor/github.com/go-playground/locales/logo.png b/vendor/github.com/go-playground/locales/logo.png deleted file mode 100644 index 3038276e6873076ecd542099e95b25037b1c0c34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37360 zcmV(-K-|BHP)ysx*JK zMpBX=dbK}5gAy}y3R{{beYQe$t~_(EI9HY=983!yQ4BbH2t9fee6m7kr7b^x7%_4X zJ9`gfp(=T?K~s?>F>nbtbqz;?9&D*HLWLAVf)p1<2qIzzh`mlUaSo2aQfQ+xioj4u zi57RSK09+4J$n}=VG1>K6C+;`IdT#dKnQiRIYfOMa;!RRrZpi|42HT(K7kH5Z51D0 z2RV8bBU%zznI$e~3~;G9N{kpKWf73XRDQWdPL3KgZV)nR5J7tvJAVu-VG5JQScJDo zR+bL!Ta3IbT6ncoYNbC?j4!6pWoxTBl*n#=wPJ6nPG_V?T&y%kcr-zED1W(DRHZFT zhB7~qA6u3+V3JBCZ4gs{L}jKoF=`!luS|!&X@DUWZdUYba2WIU7L}XOvil!bU7wAXuO|PIN?OtwU_FF?ptGuGegAxjs8(G9yYG zg|%{%%2R#1JvUt~pwDwIP%5I+ft0_2vEYw`$yQ3QA)Db+A{7b_0054wNkl}YE}wrc9DS+rDCwcq-kLn z6*rr9Gievg)&9W#+|En4X(tdH=fj-$InQ~{3w3k;I<^V903k*-k%?L`+gy zD<80`%CcVCt7&b)>-AWo}M*k4L#h*SN=*WN=wOPGQCc(S19x{GH}}yZ*TGF ziK2LMaUoYPF2r$dT&q?u0Q}(MpEI#8)^7>wy*j~dU6yeGL|G)4Z!`D?6v$J?4GNiF zGNUM+N-|jqFSt^;^pX20u^KaC*wKL1)CJS$%Vk@iEmQRU!98y?czh5h263h#&UI8G~>;F&}3tQ$@xhmG@h5396##KW2c6&nD-->t* zzH&?cgu?c})WwUscng4f{a@;`oGHloVP3&K8 zYWaY-m3_Qz=Z77^NgMadOSSCt@E=Ps4GgQlTkY0kAe~EC|Lpg z0C`J&DPN2UyU7&Gu-tM7^CfvM>!_q$|F7zV-={;NRk*zX^&Xy|sN>Mfv~agPsrszZ zST{=H##(12j$1JtBfT5p%`HZ(R~kw8ecKQFg5WJ*x&2m`V}}Y*yZ+#L(7tQhrOc;? zl-q4QvB#(*`_Y3X_Vss0x8Fk3#a~Y$nt>$Qn2*D~V85{yB8iQ{r9&gU|I zev9S7uL8Gt)I|dF=Y>|QegWzPvP@{V3Nn!IR4VydvXh@BKI2xUMBh(6aBL~@%r!AuWVG?f=&mJDxzGOktCLsq`D9Be0N@V+ zw0ap7DLEZtMdX4AhRfVstkov-f;^PxlkxbXr%Y<&X1CewisGbJ`y`1>y^eD%RgLHX zYcVG7w{0ENyVVm($?-3NBx$ln5*EKMtyUbD4wv+JlvSVUD^3~+YL43}RqjpaZ>3ze_N$kOC+VOY{hW+5B@jP%seQ7^>9XbyLO_reD=`#sdf2i+$u9o?M zdc~#Q*=#JUW~0w|6Dzl8Ec<(uJGK{c1uP-ECFnFoEcE?p>b=X@zgJgrNs7N?y_(l62vH_2aOTu; zH1Wkuhrd?fG^jc{yVoI7S9+u_MCut_7!Id3v9PUUb&ldf@7>y_JFay%O|e@o7B~1R zR>f}jzhMAekSBme7+=8B<$4CP2M`qy9;PHYV6Jyi@gzzQxufnYeT4}(ia$$dqsPwU z5sO*J_umWFSAy&Qz_!oZ_MFx;KV|fIOpaJ^|IlRj`#mo`7L%L${sFWDr)GmSX15!x z-ju0rqgjo2_ERjgP*qK!X^q!LX;y>Hu?d|?f1KrU_f9eo=CJlH^$aSqrQQSef(+VI zC|ev?=iM66d@OdmUC?cIyVcDG)WLl$UUUh>iAb>R_igW2u?(N61L7?ic^SATn9E7n zNxqRMszu^JF zAl2kMNq7&8r$ZVW%4{j9Mn@?q+c73i$N&u<3-i9;kLlEE%cl5$T`V6CkTnyOJ+mDaOaDWQ*^ecn!U$EDGLmsW}B zARh3Q)rAo6JL!FggZ3F6jy>B;&&!jW5FMg-Pfri`&2I0*$r<%!@Z{{~#$u(6L5tIC z^ct$p<0cjz2bs`3+o&=gg zN0I9tG<<%Iswa`AOAJdUZZ^xs-z{*A5120pqimm1%e$$8lj2Rz-5n3_^+!xU`FD3; z?p{7vc6^8QYfHemZ=l>~d!hFs`#E}j$4Ogk{OLe2Q=08L;!#{n!QPLNUsaV8bX6T_ zoZeWG8?W;fL^?9qw}QvFOlz1NW~S4EBF|xQlOZ}B-97Er#?yIiJSVn3uGPB5yDgsX za>d8T9K^q@j<*wkQ>~J@2auzPFOmx}x0!EFdB9!yU9WwxvgjR&?#kfg)Re^ zU-wz6Z!-%j`#HxBkmxujd;G3VYpX;y0Xtz}E(t{V$~uW0lOc^)=|GS@GK+e7MHx=# z!*RE|?AE3ejI;Sv?ZxLMm2b0E0P-M#%6ch}d~Pk7{t#OF7gYEvW_6V_EC`1%sm z;p`;DqvO$3nU9KswqGY#rE*CRhZCi6Vg+4BzY4?O1Z^=|F|5~1w-IQ|ecyr0B;3%> z6NBS&$4u{pLhhSaJ04eT@6<#cQlX#RA=lns%xy$Iav8;|8b2CeW=l2{s^~`vfxD{}nt5yRf<*f`crJol5KDpU+ooq#9&8 zolytKS$vp#7S*yGSBhp|TzSfi1;>|pT8b=!z8&|j&*(e&+8TUqFrCtl8|%?a$FBL@ z{y>@BXE$djM^uFJTU_rioz{q{e5Fbf#|)xZ>^Gwk$Huc-c9m^sKiA@Euns4o_3#?h z5i=0rkge;=Umc~s?o7dWGHh16c;nOB7RtO!P^{%PB)h}wuHU|SgU1_E^|#l+Q}qdS zH#zt}!9}+!7OMbK0D7Km3rMzut~&X`M`exqrYM-~VVJwhgjJnk7U?*AzI_a9V$zJD zYHhE&WAk}!5pOwiZ;S039$dytin18|FPwW+$P$X}!sSCocO(=%2_8{qAMNLT)*Y5M ztEsG{FE zcd6Zz*ty+c+4me7W7MhL5el9=Tt?^XuMb_;vSwBV%E_{HLRF>yV3AH_j|HcTm^;>a zvC_jO>{*oxChK<3CbtTePO|dXP!_ATF7#edCex`hO``srW-Zsv6_-_5+@v|i8We%Y zyMIuG>bHs?7YPXYC-gp6qnLxi$pt8CqEy8~wN7FkrU^!Uudp5tkYr|StbYSr7gfDV zsM%*}B(Tv6Atx0*<3}nIIDfx$@1=y-X3vRdKeE41dk)V6r>|lW>)}zv|MC*Fy`WVDgB%|{yeSf>k=9~(Lk%M*Vv}w0f(3C@}$xW z=X;gp5Q-lcaybmN2}XLiG@bn1#U(Pt?#M*{@CI`K@ZrY~KmPdP15Q4?y(75}eD891 zC_7n)=49M0h?tLJO|BA$D3Dz}f!wJx7^$#1Y~R+{IWt^h(BQN*7k{Rg64=2xqpssD zn`W{H_xI(6YZSCPV+TC8tNs^9A%it&I(jN+PxAE94F2TRn(Smgm^H4&{6j33fOh zZjjt+-FdS%$#sj9&A8U=j_334usFvB82#hjhsQtOJig5p-xephIDsOb#>Knora0d; z5&SmI<#x`^b0pP@Q&HaT3K3^9*D>9aop88;9J?Or>4dJ6EzBUTMqjBY_GmR4Fe6FO z3~ldwf$o=IUERAW(~Wh{VsiKmmaF?;oDlu_3w%;_Zb7fRgLaG6Y~wF^?Tgs-~d>j&DCZN@>`>j_xTR{}t_f9U)W2S+R648V8hb{3Dmp813n?7e z6LF4tmd&OUt5Qilew8{x$Uy@An?-AlX{&(3EiElA<#AhfOL=T557!owu4yP~DebPa ztx)PswzAR!84X=8C4fe0x=1Ru)JJIjfz$+3Ov@v(L?jKOMvF@vC=8ABl}ra>#Kgob zYE1lL)E|Bqy)c%ACEK~@obP-O%4%vKqpYuMEaDb% z>Xe*wLNU)%FK*z7Jri6>qYAqoQ~6u3ywE}DD8MH{89OM0G^)dF;hsksFBVOkXtT0L zA)0_y?A`NfeW$BFX`cjk;gmBhQ?bvFCP#gkc*f;o0ClWv2_(_=U@$V0blZKCc3>Z- zBH*?Mrjtn*NIp28+w$lrc+K<-%I$&t#c9`?SWEITs|_o5YRdX)Clyr@1azy>;plKs zILBxE2xv?d84A5>{!r^s^r5BjTb85%_(J2Zgm{-@VQR0h$oiG zruagSqDUa91*Hjf5jbT!=~D(dN$Ax^u%=i_N2ScHLF4s8w)Nt}WP($HD+eob4+B3P z2EH?PEIFp0@qxWyt=$peI9dq>gRu@o0?Cm`BpwOQCWH9i=%n2qna56ySnw)tT9SZx z7W;3W%9&~C7}KMVF^|Hnz%@C&C$MdCP+=BOb8{&*LJl6^&o&ZZ4|lRKcdWUR5qED&dJGwX)i)6B?n$ zOosG;3l-6!Kd&dR7|)UkH5H9Iqee`1;=ypJmBx9KQkSgDkU6M&@Vi>>Nx#3cdf>G)y~J z&y#G)I3rK8{v8dNM(U#AD~htsQ86ORxE5|0tFhji;NKFrW=+J=$c#L1JJ;M3Mo_yeqOj zI*IXjLAHKtzljb9u;77UFc6Gj1l&oB<)$6oo{t240gG#7-W|uHxO+xnbWFQPvFn(8 z06vU5$U{urHQalQn-%>gb9(cFpCbKaOy_`aLnc}uni3iZLGy;BwGx#%B&?Pz`TT~< zFIEW7G%Cug1j7}YPEPZslA;&+91*slk5kMm7b`V6lCvX`*`#a40zeNW<2d^Ek(+jmJ02821OEzy2yukV2AJ!GIcxE4Ry$&BNVa08W#W3>t(6_>z^&514EIOeh48)L8Is~0v&gIH(NED?41y597-PtVe ztf&wb7hftBovGq@#uW{fb@gJ6a7rT=iAw}xLt+TXNf>nJ_2#p+1oW!jxIpLhY~ImD z)3g=0m8H?JDzsiy-{OUD>}momhezG8Bi!@ho?h3ew`JS6?XyoO?MX`{Ih#D(y!*>9 z+lTvccHUpd#|p+Dy$89$(8o`yZD0gi7RQifvXf1ZYH!*`dtl5$w6P=Kgt*4kqBS`k zZ87L|XlFX4PEgbw;V@nSjrSXf1d#yj8;QQY>e`_$saY=MD$1%SN@bU1&CUD<4__hV z);A6)J(s#KahiuakvBoOl!z)MwHkBvl!nWJ!}XfO2yB<)O8EN?dLu~@C>lNY(lkk7 z%>nDC$81b5fCsm>ZD!Jk+96JX>F(s=w?{|5h$UdRj7(eX(}C@~J3Bka`S;#<@4-$0 zs&(!CIG#W-fb9;T-S`X!lEL|TOC(^QwOb;}TLyyISCYV#&QNUdD#Y z8cn6pZ6c?m`rBi=tFajL1t5>Cl`71}b}+o5E}^8lt4sD`?W>%+@rl6-nShT&4y3zu z8==dP>3Wy1BO2Ja{(tAGGVi5@LkIAJwZ<;7?X>ZyThF6J~`Y z)dCX%APghL<^pjCuKBRackk|hcl*w*Z@=B1Y#ROVdfolx?VXeNj^BImX<_HkJrc05 zj6_zF$ys;A9uG$1zIf2h-uU^X9kUJ%=Y~_m(xIEDwiTcqN6i|B)e9EEdXumwL8`1& zMpfH^;0e_3JWWwVDArE2OAW1aF%rh2G&ZEFl#M;DktuGJb$6dB@|-KL@Kn@^M9re{ zhQ2{g5qM3txY(o6C^cf4CS(u*89P+chm7aXN)cmGdP*JDJM<|%kEnDhfBfDX$0tW? zAoA>p2jW0=7V%I26rcSc=fUTpc+l`3#xgzGV?*%LG};1-3g@H=8*c-DhDDXIB6tJT zr5tkcWhiB#^XZIIm1NVpA^G9I5_BDio#spM7E7oU-V+LUlO z4fsyEh|j4W6I6>PM6!tv%1n_lIQmi&c7>6|9Ca9}s2ai{ipE?0aO7Z*GreB;q7}Kubavrj@AubsZ=XzW9AwkkEC&9KH}c1afW4b6*s)YD zhzARg)~`io0r_Y>i}1b~@L*74Bok~L#RinfAsDTdZgXPfuCWdqal^+`jaeh0fc2EuRfs}21N(Wucufk-eWo4VJO@TRbITCj|;iwPI3 z1%1Yu%S>+Uj_#b?-A|{dJj<)ku0H$4Zl-X1=iueT&4a0Qb}4_nxpU{>zRwbAdjF<< z#WKHQ58~KI;_j8Wdln22EEd`Ybk;qCgE(Vx2Uwi%VY4XQ&o){M|Jww}ga41D8AfPS z?I8TRJ~BpuZRphiB&omMIA}Ds8;H;i5Lu+{;Ka8 zjzHW{*EtRfFB|KtmGEwu`yh75Nb^Gp74AB28zK&*j9pPZ%7bJ@@?b*5*6VF)Q!{j1 zrjWUp$=qZ1!h0^)^ufu4^won0X|z54$mY8{yE~t}a_9bsZ|~g7ZebR_Iyzcgiv%od zcaKu8;0m!87n4#^Z#FKMQfWtRskx*I$t7X%HQl4ee4k?0&e z=jqeVA`sR->zDR%cc6xa!o83J4WaIv= z{lK4_CvT$6wfO%!W{v%f2UphcLfC<~!^gFQ9AVd4mlB>&3+5|)&BSD)pGK6meIzMVeKuIEwv`uggJnf^Ohf13E{t)+ba?R@_D_&E3A)6YNu z^ysf&e*Ja-@XcUwWn?A(=IqFdeFdLEh?*oT)+27;G<=(x86f;=BnSLtv>3QV8w%H+ zhS|tl;Y{Msbd=PO>4$0_A}KXqfjUNz{&tn>s+15Cp{^G>!m)|2nu!<7#v7h~y1t}@ zgIzBwI#=H~F)+Ys7}xN)-P~#cU(A**htCpJGhxb^JvD-(;$%ZrQ4 zi_7cl>)HI$`X`4=U*>N^qOQ$Dy{)kpWn>KxJM1GEe0*giNtE0(ZFeEBvuW|dZB{1S zW`j3ysvg*c4_${NONQp=q;SVCrocl~p^!?alU})qyDl}io8dRr+z@k1U*ai;i_cUP z^AwGB^^GNEobK*tlurZUmG#XR_`C|vm|Q9y>{6A14n9m0=hcMKK^sxOns(03MF}Iq zCMOMp4C2KG-N<-p#u3eAavO!rwM?N<$lUt=+uM7)Ki#_XRXV-y`QejyKYM<4@fDQ4 zwY8OAPN&n^d_JGu-vG|<2iPmdmdS267~Rpz>8>BHS?qyP-@MB`13y#S(*oK69Tdic zFQ%}~i_5OH0`Gu&=sK-tX{?HN_#Gr9y2{)N8QX3oC>g| zXU$OB6#RcscMw^Kv*~O17!*%$4sSn5uWzm2`tIvzpMB-o)yEfC zS5f@(@_KrG=}X+UU-EC{ckGr~cYMSi4bSp6msiLj;2dNjDu$sapwhfG|r#9TaG%npBZ&Y*wR__7PL^>hj{! zhSJLC#F_~K`?Cb1649CKGA>W^Dn~F;<|(Z&;_&32b|L?&+{`hD&N})jI)!MX7MB9v zR3?{!M5FiFNgC)>ByvrE|@PjEy=b-Tkq=Zw-B>wiqn3eAY9GuJ=o(q0QQg?kxmfzA}X_tOpOcW>u!zq_>b<9Ej= z7Z0|+$A+(>7``SsB%8%S6Mug<@ z_U9@EFYy)QV*D)4_2>9iMUC~B&+v=OMM{oLSrRVcs=E3IjZ#=mB^Nc-+X^+f;%C7}i4*&k=@UQ!y7VZb!M;2H&tOT;d zwMPWun}j;R#Ggt87z6!nY_{I(@M>WRTQTe@u-SzaITqDjA+8{EBM`W%DN03v>$DGP zifYEMOpS9C7rKjh`~gKV3WZ=99;hm+;*^x*qhU-bn;N?!mlV~6Zs_}U3u*{Kf1g8Y zq;pmr5gNr)>`zieO;)XyO@7pLKdsJWG8;hn%*Izge3X0b?caV#FMsq00PWqomS2C} z+xbGXzP069U*BTez78Ubw&$~7qI4v2kSKQh2nIe7S-E>}XXCHKjeQ^%@n(GN~bst8Gk zv^}ON<(3z7J={vqAV(uB?<{{+R54s!RD8MnOgX1iQzkA`@I1V+=7(idax=-rt|zDj zJh*yJoj9WS#cr^YO)|G@n$Hd23R`dQppMU!KCx7lAjU0~Lv><~( zR)y4#fw}FPoUC%e?Fg^z+?p<}J=66#)ITdnb`Ybn|1SX6^|F z&1eSc=uzx}EzriYEwckj;no(|Elv)0PS#iq2J7g)*=n=vW(p~)kVGnWb#Wv6F%bd$ zL69v(G6ly$BNz&S4>b;g4Vqg3OqO|ZVwhnD1^PIVIbg8Uq%2<6ESr_LUMzQMhA&<; z)Xpoq+9Ao|YQF{-9GKxzyYJk1xGO0Q07&TG`2bdNVU1f_U+P?6`l_Kd79t@Yc&Icu zD7M*H4$R%_dFry)->(J86Uv+rQ1}ReP!JKs1Vzhn;K0ctArSPA36XVd#!f=APZ%wj z%%U>@qpM>uf?baWM&Yunu|TzziGgJ`PGTbb~05fO#S>Cx;DFzWV-e>SdLCJx8S}7zx{Zv{UQYY#S7-kNwt?-Tcxc@T!3r2Qs8377nzGH zE}xqZ#SaEJ2zbD;fq{At;{A10mGp5?Z9qgk;6j`a(4G!`4L**?F`=2EkOD&gjF6d1 zW`s0>XgGus$)eK=pj;(0QbdemLap=wn;Qu>uAAbmzLy_ODPtXjj z2lIsT1+B1C|4=caxpjATJ>o-Cd)I{@Z~f=>c3535La-0az;#tS-t&?Vg}s4`f>aV2 zd~A%bk3-})yi(XCC7~Q7%2Jodmx16euPg}I*0LZ7`~Xx?0dfXF$38%nb7a3LpWMP^ zeB6lw@^Q%e$T~k_fe$S*B!n1=_uI3V;ep#^>w>p;am3nStT65XKSz7)b)sUeQyi%n zM^f@$yq6``$>bqgGPJ9KL|34T?Z$8jBLp*nNlsvcCK5J+gph;~IzmMJ{MeBRad|LE z!NN;c9ut|O7`J%~u;~JdyF4XJjCU*y*3OG0J z44B5#e#xn9h)t8kN?T>XNz^XQgVUuFAf?cmJ|FnF%CDf@)h0n#Q%~z^UoXpp?p_-Z zP%D707NPw5p*%#a;bN; z2Tsue6a{-7FwR?TtZWWYx42_0tSDRdkQ{+w##p!(6xK!hve^fjG#WdM+!PnVgdhhk zE=Lr~q0>U?en>>X#|e2bO~URRFlKtNYSac9mSf{P7ss_P=3XqkP|n?6n=%HdYv)Zc z&p^Q6ZHIa0;dZ(b>F&mOZZkQrn$Z-#l9Fvq2PU7!x+xN z082&|oIuENO)P{(rW2Z=)FT`=B80IHA_2-CCn16W%4A_)xoJ-QXPa?;_K{9#?C&2m zDM!@mGPQ9eZR}C}eWSu)FkQRVbqgB%H7IizFW!Km2Cj833PATr_zk0A?x>V21vnaI zX29pL$w0}^IW&LhP-|XVUfKK$W4lf+hg}`+k89ugEl9nn))s$_y<2~7QXfN)D&!Qh zXe)_?( z<V}u8invj{s)^GKhDyeJdBx z15F*R@B2SBSw0!c}C!c-R)*O|2u#nh76OfxS zKncajV1S;c7*9$8B{bE^!`ssX>tt1eLQEk(^&sYU^*>3Jn61DZ}9 zP+MlWV3OwvBg8BO5{{W5H1~EDUAlDFtK*V)J@2HFUV8Z0;ZK{7eH#1H_liA`2kj*$5(lN6!%o1&CjZsBdUisW9tJ3Sp4k zJZLTtFqx-;cbK0q4;ULe0u0&5dAgv5T-4`x1_sbbpMimOVBqg*zN`mwy&+%Hlk=6V zb=PR6Od?gG7vwr9OQD^k;@a}Xua_a%KN#$kqet9n)=YU<)x*xs%jTV|xqZDQ{a8%Q zCvDdcx3#n!ON?obilGq;X{^FTRn zt*g9KFk9?NR*s%nU#f4lH6WONb#9R-SSOGs;93aq5a=9)AZGgsLy=H2!Uj|_4i+_3 zyCgg=pDpgXq*R;`Bjw^w+2g_?kHdOY!tmEXg}xjM^zGuOvUF*xKQACC4rpu(2*p=)S?{h?nJ~wwmd|x&@A_M z@h$~=dKMMce>XHYH`m|acDR4I?|O?*>0w&iXKlw~XrC6x96MZ?OLQTVLDwBd!5_{2 z+{MNx%_6!G>F=ojwEixyKK!m{RsG44{)(Ch=O^c;e)j)<>a)Yw zzwj%LE=?uwtWIVGlM16^aG8uuP_*x1WRP5O7^-b<(Wlu(MbUPE+1OfJVh&h=JQzo! zI1_Q3DVsLgSl}66j7WD;=s}?$S-cy80-8+ch&XVIL_$si1Og)D2z>-dZ~}Q}gudOS z{YC!;=wbbGwMO6f$MWLF!zUv*^b3aRq_o%5)MaV%TD9TEjVBK$z}XWMPr&V3fMaC& zNitQXET?ibsZw%?4@3kXjd%$<&8M|WVQ~XgB2I0b)j^zh4yp}Cn*GdE&~LRUd`SPow+4*`|gHqVR$=w@X_Oi6YY;hr3xNXL}?J20+TtEm8CF9r}LIQyWdSD+i^Z0Ip zh{57;(m5glB7lk?3Fx~R+MNDz;B949efHFprWaApu8fS_U!ttNxUgoJrH{9M1;ASD zduj0_7w$Zqm;tX(47^(0))&SvOY1*=Z`|{2R?cLsS~_jt?qF?+-R!Z|0fR}gx3Tnc zv87N*pfJV|8L6R7VJ8w`M@6-1AqdnqA5mgd-(kJEH(eAeM1&%=u?g60(a-&6^KyOk zvHF!+Jx8Hgm^IFuW(^O~QGMDlAOCJ6=x5$BXu;plC*bR0+`z=ZlZ7YaGPJ6rxjmZC zg^y84dQ~MLRg%$GZi9qd2@F*HSnc%MoI)o?Ezg(8%F04K_N|aa|M~KJ;lYU8V4JjbM8Sq z+i-V}Dy#5p=V&UZrl|I|7%I-5LUE!{d~p=Q9yTDmO$F#{B_~d>VUUdo>J$k2MkeRx z^u5xZ@*Ti3&@*a zn0|s*Hz;#Z-Pz+y@BS^7E?wsLr1b!umQ>jQaC919C6Tp$wXyM6Qa-4pK`sgFTAyxM zqf20m&9gk7VRCZy%%A&tHDB(p0JF3FOWr6c>4vkdySt?1_n%I`QF1yftK0uf$-UdR z=lW8EiK&q5(AbaeVK` zwXdsdVu25fLlEv3!bS}1Famw8RI$8r?%cUajY6R?r^6g4>>GO8JEdRg{rTtBOT2Hx zr(Q%1z9>|xwZ^rzsc|JBuWREV2~r;#n;+LgVMjy$`OMWDzb$QyFC=lf@4+bZOa}gj zI9Ewqfp<}D{GooN|4X{7^<_Rlv6ti1?rV*Z>|(`QJ#Tf2cmCA9Q~OV!^4||9YoGrc zZ)}5m8$5xMH_mP=DLGqm<;vOan>YP$-aOM`rqL69`byK&n~RGB1E~&FFDlj1+SwO4 zCwLjc*4fU%5>OkAGsa@eQ5$Q##byegQHLj!@u6fIA(Vx#f=3YsEkV$Su=M(>qAFh1 z$#ds;9V`6`p+dR5I<>qyq*U}j=(yC;vGREJk-}is=+flI1%pw$b_ckIrKEQcjlHim zY@q&zA_snlxPLe@`Vv~2tS5(is3Ephs)F!GOZ?LGqx&;6kH#h3*tFK##@ct@7Iz8} zv(l^>=GClroUAzo4nJSI4N0@-~&5Ot|!i)Me4|u$jypwSAfLEA;UFEiy=YwO-ZFZ3YBk9c=WLC0w5Qrp z9lX7>v#C|#ftXycz})6&-*6Ho5I}3+OgfH32qyRiGt!d_qkf+3Eln?NnLBm<`h(Sb3;XDv?N%%BAI%5@_-83ebk~>T@RGwG$Vw-qJSiT3FEP z{#Y<5hu1E7dCh&>aqq#?@6i9~pM^Sj+nZ<4g5Ccg_z|o=y92(TJqw=i2It?*I&<^P znKL)De(3)+)xtKnnOfxJbk4IV+Z$w(ILqzO-0d*dHh60W-qj6{PjPh2ZT=|g)2No_ z^y@M7QXjDS%8>m&PR7_^Yku>hp;K?Z#+B&Ms9CEa_iee(l||{MSG&#gBc) z?-{>y_2I<8KzsWPkhJTy+Tq2qmHK~~xc0Cn>nJ?#7ZE`q!4v^?6v3Kgk&i_*77q~? z1414GvI#^YY($PGd!~aJw}%aJlb914EH26#A><%Q0^=HD$W1U*KoLO!#qe6a-xk%` zw+s7&Z|`@`dC%o{eqVjQl*OV7cpP5yjq4%?557+E6f-?NJ)m?T)vEp5Z=w3_+wsI_ zToWg!k|OB-B;dRog z^%m>bS-ks6tc8~)3IV!0fnG>g(}z4yitqQPoLion17apFIR(%OA+ABPNDSN}9#5*| zm7x*SpFJ+QIl6TGvj5r9{@RAl+B**)jOE5OE;gcEJJoaIX=SKiT>8Vyqn(`#8SyW7 zd>q*E#es;7^!8n?Wp60POO>Xl>gDsJrMG^6dQc!AJg8(j7c)34*--N}c$g=X$t2jk z#K{BLR@_{Ncm+B%|IgP&S}94Me!a+JNK>6d02lK4QMLj48#W@wZQZ+-MCC(rl6=!_ z;Ok+uFmh5fndTmy6&)Q`m@t29h%(iCZECv2(-W$O1OYle>t4h`GKM$^k(MQv>K2)n znwP$Q<@n{kHiWm%*2k4`s=O-`NMaWoXCFUJeURJU9@p8{x%l=(MY`V>|9DIg#O1|w zv@Q0JOU66fuF7lce;dD3Cn-*1v4nhNFd{L9fru>@F=QY(oF2b|IJu7Db>abcCxGi< z!}y8ILvX@L&*}R^w@Q|WI0agf<>VLh6MdbjW|2lHTS==(_N&&}SeTeZ3E6CFrjW}P z(%5Viz%+FNw;`vu6eTx3^p17uXjKK%y<*D)_ z`nv0DC5pPbHiB+1X0@pM5PkYRE#GvYS@HQ?zKuKj=m&{t%|3JBAm zo_eIA%-t)1ax^gdf}F&}99!E>k(Q=wEDbjxs$1!Y2LwdLCdI}^Me*4o!mO;!LOMHv zoxtU*s|(b<%|GX8TBeFTa84MymSk`cdWZXg{onJuB%{}6iieEduCqct^(np179=wy{~ zCAH_2Wh|*&AlNI&AJKr^f`DI4sGPZ?@a_M(I^K2AbymM(?Fe>|=|^)6j#yKm)p}wM z#MU=5U{k;beLGV-QfRfE`B2|4^N&ZHP>}goJe*yu z?H|1|q34kHNf1` z+|tZo(}p)m&dyXMdd8&i@HC6(9gV}t#$FQ;mgub=xMj_5m z=pFVCJA^(!bTXCzYl}VKb)5R>c*FUg%iV2bJ$)FLscd?XSNRxCn#W(nv`3_>o?(M_ zQ{4Lpki@9c|CsSle^A+1qmY-Dw$}ArJyj!}tdZ|kyeU;4%vWM0qnO8Gh{Uk?AVgFc zJiJYd9l#+vl>(vTy<0?J7H*=!i1yUZ@GOtnJ67_dOWnm zCx$(8cnl4)yxzLw!{2=K<1cq^7D{@$D^*A1;`*AZ;+j-#zy5kW%K+#CUB@ZJB)Z?xm}8IZIlm+$$*K9Fua2M~-oh!PF@Pui*ekK)Aoj zbV`Qawce&fOvsALaS%e7`nMh}_m*$n$5+eusyP~srXYu3Pz~^W-$be}_BfesG_}R* zi%p;YkG|L1HlvxuQk}eFr6Lp~K{~M5FU{ zoz+8hA9N`Vk<>Z0+@=h*OwSF?wJ-=L*FK53&bOuVsR3q2tMyl}F)}hU+(@!=TW9yK z)oM&xJ^$qkn6uj!wQY~hTE~#AtOW49kSpX?bGa9qmy?}}TAGJ?h3cPsZxlV+?g86N zCW>ZM6$LB-kLBz#_|q>xb{wBQ|JLQYhFZm$)GMQ%ss#-FS5)OLl*hEkS1sh_rm6xD zRpf>4%d1fNEq=Oq>HP6$7ZtUF`cmcmhZ9S!1IlWp;2=*a6CcbM33x%GW60QHZn}_4 zq!U_((-HehNMB+1`;Q(?FE2m3Q6ReaX#QHkg&d(!2nWX-4t}I%W@Lbao`Igdsl5To zj*4tf-_lH)BXXc)59zW66$5

text

`) - }) - - md, _, err := client.Markdown(context.Background(), "# text #", &MarkdownOptions{ - Mode: "gfm", - Context: "google/go-github", - }) - if err != nil { - t.Errorf("Markdown returned error: %v", err) - } - - if want := "

text

"; want != md { - t.Errorf("Markdown returned %+v, want %+v", md, want) - } -} - -func TestListEmojis(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/emojis", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"+1": "+1.png"}`) - }) - - emoji, _, err := client.ListEmojis(context.Background()) - if err != nil { - t.Errorf("ListEmojis returned error: %v", err) - } - - want := map[string]string{"+1": "+1.png"} - if !reflect.DeepEqual(want, emoji) { - t.Errorf("ListEmojis returned %+v, want %+v", emoji, want) - } -} - -func TestListCodesOfConduct(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/codes_of_conduct", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeCodesOfConductPreview) - fmt.Fprint(w, `[{ - "key": "key", - "name": "name", - "url": "url"} - ]`) - }) - - cs, _, err := client.ListCodesOfConduct(context.Background()) - if err != nil { - t.Errorf("ListCodesOfConduct returned error: %v", err) - } - - want := []*CodeOfConduct{ - { - Key: String("key"), - Name: String("name"), - URL: String("url"), - }} - if !reflect.DeepEqual(want, cs) { - t.Errorf("ListCodesOfConduct returned %+v, want %+v", cs, want) - } -} - -func TestGetCodeOfConduct(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/codes_of_conduct/k", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeCodesOfConductPreview) - fmt.Fprint(w, `{ - "key": "key", - "name": "name", - "url": "url", - "body": "body"}`, - ) - }) - - coc, _, err := client.GetCodeOfConduct(context.Background(), "k") - if err != nil { - t.Errorf("ListCodesOfConduct returned error: %v", err) - } - - want := &CodeOfConduct{ - Key: String("key"), - Name: String("name"), - URL: String("url"), - Body: String("body"), - } - if !reflect.DeepEqual(want, coc) { - t.Errorf("GetCodeOfConductByKey returned %+v, want %+v", coc, want) - } -} - -func TestAPIMeta(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/meta", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"hooks":["h"], "git":["g"], "pages":["p"], "verifiable_password_authentication": true}`) - }) - - meta, _, err := client.APIMeta(context.Background()) - if err != nil { - t.Errorf("APIMeta returned error: %v", err) - } - - want := &APIMeta{ - Hooks: []string{"h"}, - Git: []string{"g"}, - Pages: []string{"p"}, - VerifiablePasswordAuthentication: Bool(true), - } - if !reflect.DeepEqual(want, meta) { - t.Errorf("APIMeta returned %+v, want %+v", meta, want) - } -} - -func TestOctocat(t *testing.T) { - setup() - defer teardown() - - input := "input" - output := "sample text" - - mux.HandleFunc("/octocat", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"s": input}) - w.Header().Set("Content-Type", "application/octocat-stream") - fmt.Fprint(w, output) - }) - - got, _, err := client.Octocat(context.Background(), input) - if err != nil { - t.Errorf("Octocat returned error: %v", err) - } - - if want := output; got != want { - t.Errorf("Octocat returned %+v, want %+v", got, want) - } -} - -func TestZen(t *testing.T) { - setup() - defer teardown() - - output := "sample text" - - mux.HandleFunc("/zen", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.Header().Set("Content-Type", "text/plain;charset=utf-8") - fmt.Fprint(w, output) - }) - - got, _, err := client.Zen(context.Background()) - if err != nil { - t.Errorf("Zen returned error: %v", err) - } - - if want := output; got != want { - t.Errorf("Zen returned %+v, want %+v", got, want) - } -} - -func TestListServiceHooks(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/hooks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{ - "name":"n", - "events":["e"], - "supported_events":["s"], - "schema":[ - ["a", "b"] - ] - }]`) - }) - - hooks, _, err := client.ListServiceHooks(context.Background()) - if err != nil { - t.Errorf("ListServiceHooks returned error: %v", err) - } - - want := []*ServiceHook{{ - Name: String("n"), - Events: []string{"e"}, - SupportedEvents: []string{"s"}, - Schema: [][]string{{"a", "b"}}, - }} - if !reflect.DeepEqual(hooks, want) { - t.Errorf("ListServiceHooks returned %+v, want %+v", hooks, want) - } -} diff --git a/vendor/github.com/google/go-github/github/orgs.go b/vendor/github.com/google/go-github/github/orgs.go index e6947c96c..3be91a3ee 100644 --- a/vendor/github.com/google/go-github/github/orgs.go +++ b/vendor/github.com/google/go-github/github/orgs.go @@ -19,30 +19,32 @@ type OrganizationsService service // Organization represents a GitHub organization account. type Organization struct { - Login *string `json:"login,omitempty"` - ID *int `json:"id,omitempty"` - AvatarURL *string `json:"avatar_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - Name *string `json:"name,omitempty"` - Company *string `json:"company,omitempty"` - Blog *string `json:"blog,omitempty"` - Location *string `json:"location,omitempty"` - Email *string `json:"email,omitempty"` - Description *string `json:"description,omitempty"` - PublicRepos *int `json:"public_repos,omitempty"` - PublicGists *int `json:"public_gists,omitempty"` - Followers *int `json:"followers,omitempty"` - Following *int `json:"following,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - TotalPrivateRepos *int `json:"total_private_repos,omitempty"` - OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` - PrivateGists *int `json:"private_gists,omitempty"` - DiskUsage *int `json:"disk_usage,omitempty"` - Collaborators *int `json:"collaborators,omitempty"` - BillingEmail *string `json:"billing_email,omitempty"` - Type *string `json:"type,omitempty"` - Plan *Plan `json:"plan,omitempty"` + Login *string `json:"login,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + AvatarURL *string `json:"avatar_url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + Name *string `json:"name,omitempty"` + Company *string `json:"company,omitempty"` + Blog *string `json:"blog,omitempty"` + Location *string `json:"location,omitempty"` + Email *string `json:"email,omitempty"` + Description *string `json:"description,omitempty"` + PublicRepos *int `json:"public_repos,omitempty"` + PublicGists *int `json:"public_gists,omitempty"` + Followers *int `json:"followers,omitempty"` + Following *int `json:"following,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + TotalPrivateRepos *int `json:"total_private_repos,omitempty"` + OwnedPrivateRepos *int `json:"owned_private_repos,omitempty"` + PrivateGists *int `json:"private_gists,omitempty"` + DiskUsage *int `json:"disk_usage,omitempty"` + Collaborators *int `json:"collaborators,omitempty"` + BillingEmail *string `json:"billing_email,omitempty"` + Type *string `json:"type,omitempty"` + Plan *Plan `json:"plan,omitempty"` + TwoFactorRequirementEnabled *bool `json:"two_factor_requirement_enabled,omitempty"` // API URLs URL *string `json:"url,omitempty"` @@ -74,8 +76,11 @@ func (p Plan) String() string { // OrganizationsService.ListAll method. type OrganizationsListOptions struct { // Since filters Organizations by ID. - Since int `url:"since,omitempty"` + Since int64 `url:"since,omitempty"` + // Note: Pagination is powered exclusively by the Since parameter, + // ListOptions.Page has no effect. + // ListOptions.PerPage controls an undocumented GitHub API parameter. ListOptions } @@ -157,7 +162,7 @@ func (s *OrganizationsService) Get(ctx context.Context, org string) (*Organizati // GetByID fetches an organization. // // Note: GetByID uses the undocumented GitHub API endpoint /organizations/:id. -func (s *OrganizationsService) GetByID(ctx context.Context, id int) (*Organization, *Response, error) { +func (s *OrganizationsService) GetByID(ctx context.Context, id int64) (*Organization, *Response, error) { u := fmt.Sprintf("organizations/%d", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/orgs_hooks.go b/vendor/github.com/google/go-github/github/orgs_hooks.go index 4fc692e0f..c4dc134c4 100644 --- a/vendor/github.com/google/go-github/github/orgs_hooks.go +++ b/vendor/github.com/google/go-github/github/orgs_hooks.go @@ -37,7 +37,7 @@ func (s *OrganizationsService) ListHooks(ctx context.Context, org string, opt *L // GetHook returns a single specified Hook. // // GitHub API docs: https://developer.github.com/v3/orgs/hooks/#get-single-hook -func (s *OrganizationsService) GetHook(ctx context.Context, org string, id int) (*Hook, *Response, error) { +func (s *OrganizationsService) GetHook(ctx context.Context, org string, id int64) (*Hook, *Response, error) { u := fmt.Sprintf("orgs/%v/hooks/%d", org, id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -51,10 +51,21 @@ func (s *OrganizationsService) GetHook(ctx context.Context, org string, id int) // CreateHook creates a Hook for the specified org. // Name and Config are required fields. // +// Note that only a subset of the hook fields are used and hook must +// not be nil. +// // GitHub API docs: https://developer.github.com/v3/orgs/hooks/#create-a-hook func (s *OrganizationsService) CreateHook(ctx context.Context, org string, hook *Hook) (*Hook, *Response, error) { u := fmt.Sprintf("orgs/%v/hooks", org) - req, err := s.client.NewRequest("POST", u, hook) + + hookReq := &createHookRequest{ + Name: hook.Name, + Events: hook.Events, + Active: hook.Active, + Config: hook.Config, + } + + req, err := s.client.NewRequest("POST", u, hookReq) if err != nil { return nil, nil, err } @@ -71,7 +82,7 @@ func (s *OrganizationsService) CreateHook(ctx context.Context, org string, hook // EditHook updates a specified Hook. // // GitHub API docs: https://developer.github.com/v3/orgs/hooks/#edit-a-hook -func (s *OrganizationsService) EditHook(ctx context.Context, org string, id int, hook *Hook) (*Hook, *Response, error) { +func (s *OrganizationsService) EditHook(ctx context.Context, org string, id int64, hook *Hook) (*Hook, *Response, error) { u := fmt.Sprintf("orgs/%v/hooks/%d", org, id) req, err := s.client.NewRequest("PATCH", u, hook) if err != nil { @@ -85,7 +96,7 @@ func (s *OrganizationsService) EditHook(ctx context.Context, org string, id int, // PingHook triggers a 'ping' event to be sent to the Hook. // // GitHub API docs: https://developer.github.com/v3/orgs/hooks/#ping-a-hook -func (s *OrganizationsService) PingHook(ctx context.Context, org string, id int) (*Response, error) { +func (s *OrganizationsService) PingHook(ctx context.Context, org string, id int64) (*Response, error) { u := fmt.Sprintf("orgs/%v/hooks/%d/pings", org, id) req, err := s.client.NewRequest("POST", u, nil) if err != nil { @@ -97,7 +108,7 @@ func (s *OrganizationsService) PingHook(ctx context.Context, org string, id int) // DeleteHook deletes a specified Hook. // // GitHub API docs: https://developer.github.com/v3/orgs/hooks/#delete-a-hook -func (s *OrganizationsService) DeleteHook(ctx context.Context, org string, id int) (*Response, error) { +func (s *OrganizationsService) DeleteHook(ctx context.Context, org string, id int64) (*Response, error) { u := fmt.Sprintf("orgs/%v/hooks/%d", org, id) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/orgs_hooks_test.go b/vendor/github.com/google/go-github/github/orgs_hooks_test.go deleted file mode 100644 index 69e75f9f4..000000000 --- a/vendor/github.com/google/go-github/github/orgs_hooks_test.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2015 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestOrganizationsService_ListHooks(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/hooks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - - hooks, _, err := client.Organizations.ListHooks(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListHooks returned error: %v", err) - } - - want := []*Hook{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(hooks, want) { - t.Errorf("Organizations.ListHooks returned %+v, want %+v", hooks, want) - } -} - -func TestOrganizationsService_ListHooks_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.ListHooks(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_GetHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/hooks/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - hook, _, err := client.Organizations.GetHook(context.Background(), "o", 1) - if err != nil { - t.Errorf("Organizations.GetHook returned error: %v", err) - } - - want := &Hook{ID: Int(1)} - if !reflect.DeepEqual(hook, want) { - t.Errorf("Organizations.GetHook returned %+v, want %+v", hook, want) - } -} - -func TestOrganizationsService_GetHook_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.GetHook(context.Background(), "%", 1) - testURLParseError(t, err) -} - -func TestOrganizationsService_EditHook(t *testing.T) { - setup() - defer teardown() - - input := &Hook{Name: String("t")} - - mux.HandleFunc("/orgs/o/hooks/1", func(w http.ResponseWriter, r *http.Request) { - v := new(Hook) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - hook, _, err := client.Organizations.EditHook(context.Background(), "o", 1, input) - if err != nil { - t.Errorf("Organizations.EditHook returned error: %v", err) - } - - want := &Hook{ID: Int(1)} - if !reflect.DeepEqual(hook, want) { - t.Errorf("Organizations.EditHook returned %+v, want %+v", hook, want) - } -} - -func TestOrganizationsService_EditHook_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.EditHook(context.Background(), "%", 1, nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_PingHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/hooks/1/pings", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - }) - - _, err := client.Organizations.PingHook(context.Background(), "o", 1) - if err != nil { - t.Errorf("Organizations.PingHook returned error: %v", err) - } -} - -func TestOrganizationsService_DeleteHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/hooks/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Organizations.DeleteHook(context.Background(), "o", 1) - if err != nil { - t.Errorf("Organizations.DeleteHook returned error: %v", err) - } -} - -func TestOrganizationsService_DeleteHook_invalidOrg(t *testing.T) { - _, err := client.Organizations.DeleteHook(context.Background(), "%", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/orgs_members.go b/vendor/github.com/google/go-github/github/orgs_members.go index d0ea6a985..d18435999 100644 --- a/vendor/github.com/google/go-github/github/orgs_members.go +++ b/vendor/github.com/google/go-github/github/orgs_members.go @@ -59,7 +59,7 @@ type ListMembersOptions struct { // Possible values are: // all - all members of the organization, regardless of role // admin - organization owners - // member - non-organization members + // member - non-owner organization members // // Default is "all". Role string `url:"role,omitempty"` @@ -297,3 +297,74 @@ func (s *OrganizationsService) ListPendingOrgInvitations(ctx context.Context, or } return pendingInvitations, resp, nil } + +// CreateOrgInvitationOptions specifies the parameters to the OrganizationService.Invite +// method. +type CreateOrgInvitationOptions struct { + // GitHub user ID for the person you are inviting. Not required if you provide Email. + InviteeID *int64 `json:"invitee_id,omitempty"` + // Email address of the person you are inviting, which can be an existing GitHub user. + // Not required if you provide InviteeID + Email *string `json:"email,omitempty"` + // Specify role for new member. Can be one of: + // * admin - Organization owners with full administrative rights to the + // organization and complete access to all repositories and teams. + // * direct_member - Non-owner organization members with ability to see + // other members and join teams by invitation. + // * billing_manager - Non-owner organization members with ability to + // manage the billing settings of your organization. + // Default is "direct_member". + Role *string `json:"role"` + TeamID []int64 `json:"team_ids"` +} + +// CreateOrgInvitation invites people to an organization by using their GitHub user ID or their email address. +// In order to create invitations in an organization, +// the authenticated user must be an organization owner. +// +// https://developer.github.com/v3/orgs/members/#create-organization-invitation +func (s *OrganizationsService) CreateOrgInvitation(ctx context.Context, org string, opt *CreateOrgInvitationOptions) (*Invitation, *Response, error) { + u := fmt.Sprintf("orgs/%v/invitations", org) + + req, err := s.client.NewRequest("POST", u, opt) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeOrganizationInvitationPreview) + + var invitation *Invitation + resp, err := s.client.Do(ctx, req, &invitation) + if err != nil { + return nil, resp, err + } + return invitation, resp, nil +} + +// ListOrgInvitationTeams lists all teams associated with an invitation. In order to see invitations in an organization, +// the authenticated user must be an organization owner. +// +// GitHub API docs: https://developer.github.com/v3/orgs/members/#list-organization-invitation-teams +func (s *OrganizationsService) ListOrgInvitationTeams(ctx context.Context, org, invitationID string, opt *ListOptions) ([]*Team, *Response, error) { + u := fmt.Sprintf("orgs/%v/invitations/%v/teams", org, invitationID) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeOrganizationInvitationPreview) + + var orgInvitationTeams []*Team + resp, err := s.client.Do(ctx, req, &orgInvitationTeams) + if err != nil { + return nil, resp, err + } + return orgInvitationTeams, resp, nil +} diff --git a/vendor/github.com/google/go-github/github/orgs_members_test.go b/vendor/github.com/google/go-github/github/orgs_members_test.go deleted file mode 100644 index 21fbeeaf3..000000000 --- a/vendor/github.com/google/go-github/github/orgs_members_test.go +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestOrganizationsService_ListMembers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/members", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "filter": "2fa_disabled", - "role": "admin", - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListMembersOptions{ - PublicOnly: false, - Filter: "2fa_disabled", - Role: "admin", - ListOptions: ListOptions{Page: 2}, - } - members, _, err := client.Organizations.ListMembers(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListMembers returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(members, want) { - t.Errorf("Organizations.ListMembers returned %+v, want %+v", members, want) - } -} - -func TestOrganizationsService_ListMembers_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.ListMembers(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_ListMembers_public(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/public_members", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListMembersOptions{PublicOnly: true} - members, _, err := client.Organizations.ListMembers(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListMembers returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(members, want) { - t.Errorf("Organizations.ListMembers returned %+v, want %+v", members, want) - } -} - -func TestOrganizationsService_IsMember(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - member, _, err := client.Organizations.IsMember(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.IsMember returned error: %v", err) - } - if want := true; member != want { - t.Errorf("Organizations.IsMember returned %+v, want %+v", member, want) - } -} - -// ensure that a 404 response is interpreted as "false" and not an error -func TestOrganizationsService_IsMember_notMember(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - member, _, err := client.Organizations.IsMember(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.IsMember returned error: %+v", err) - } - if want := false; member != want { - t.Errorf("Organizations.IsMember returned %+v, want %+v", member, want) - } -} - -// ensure that a 400 response is interpreted as an actual error, and not simply -// as "false" like the above case of a 404 -func TestOrganizationsService_IsMember_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Error(w, "BadRequest", http.StatusBadRequest) - }) - - member, _, err := client.Organizations.IsMember(context.Background(), "o", "u") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } - if want := false; member != want { - t.Errorf("Organizations.IsMember returned %+v, want %+v", member, want) - } -} - -func TestOrganizationsService_IsMember_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.IsMember(context.Background(), "%", "u") - testURLParseError(t, err) -} - -func TestOrganizationsService_IsPublicMember(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/public_members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - member, _, err := client.Organizations.IsPublicMember(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.IsPublicMember returned error: %v", err) - } - if want := true; member != want { - t.Errorf("Organizations.IsPublicMember returned %+v, want %+v", member, want) - } -} - -// ensure that a 404 response is interpreted as "false" and not an error -func TestOrganizationsService_IsPublicMember_notMember(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/public_members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - member, _, err := client.Organizations.IsPublicMember(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.IsPublicMember returned error: %v", err) - } - if want := false; member != want { - t.Errorf("Organizations.IsPublicMember returned %+v, want %+v", member, want) - } -} - -// ensure that a 400 response is interpreted as an actual error, and not simply -// as "false" like the above case of a 404 -func TestOrganizationsService_IsPublicMember_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/public_members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Error(w, "BadRequest", http.StatusBadRequest) - }) - - member, _, err := client.Organizations.IsPublicMember(context.Background(), "o", "u") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } - if want := false; member != want { - t.Errorf("Organizations.IsPublicMember returned %+v, want %+v", member, want) - } -} - -func TestOrganizationsService_IsPublicMember_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.IsPublicMember(context.Background(), "%", "u") - testURLParseError(t, err) -} - -func TestOrganizationsService_RemoveMember(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Organizations.RemoveMember(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.RemoveMember returned error: %v", err) - } -} - -func TestOrganizationsService_RemoveMember_invalidOrg(t *testing.T) { - _, err := client.Organizations.RemoveMember(context.Background(), "%", "u") - testURLParseError(t, err) -} - -func TestOrganizationsService_ListOrgMemberships(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/memberships/orgs", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "state": "active", - "page": "2", - }) - fmt.Fprint(w, `[{"url":"u"}]`) - }) - - opt := &ListOrgMembershipsOptions{ - State: "active", - ListOptions: ListOptions{Page: 2}, - } - memberships, _, err := client.Organizations.ListOrgMemberships(context.Background(), opt) - if err != nil { - t.Errorf("Organizations.ListOrgMemberships returned error: %v", err) - } - - want := []*Membership{{URL: String("u")}} - if !reflect.DeepEqual(memberships, want) { - t.Errorf("Organizations.ListOrgMemberships returned %+v, want %+v", memberships, want) - } -} - -func TestOrganizationsService_GetOrgMembership_AuthenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/memberships/orgs/o", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"url":"u"}`) - }) - - membership, _, err := client.Organizations.GetOrgMembership(context.Background(), "", "o") - if err != nil { - t.Errorf("Organizations.GetOrgMembership returned error: %v", err) - } - - want := &Membership{URL: String("u")} - if !reflect.DeepEqual(membership, want) { - t.Errorf("Organizations.GetOrgMembership returned %+v, want %+v", membership, want) - } -} - -func TestOrganizationsService_GetOrgMembership_SpecifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/memberships/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"url":"u"}`) - }) - - membership, _, err := client.Organizations.GetOrgMembership(context.Background(), "u", "o") - if err != nil { - t.Errorf("Organizations.GetOrgMembership returned error: %v", err) - } - - want := &Membership{URL: String("u")} - if !reflect.DeepEqual(membership, want) { - t.Errorf("Organizations.GetOrgMembership returned %+v, want %+v", membership, want) - } -} - -func TestOrganizationsService_EditOrgMembership_AuthenticatedUser(t *testing.T) { - setup() - defer teardown() - - input := &Membership{State: String("active")} - - mux.HandleFunc("/user/memberships/orgs/o", func(w http.ResponseWriter, r *http.Request) { - v := new(Membership) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"url":"u"}`) - }) - - membership, _, err := client.Organizations.EditOrgMembership(context.Background(), "", "o", input) - if err != nil { - t.Errorf("Organizations.EditOrgMembership returned error: %v", err) - } - - want := &Membership{URL: String("u")} - if !reflect.DeepEqual(membership, want) { - t.Errorf("Organizations.EditOrgMembership returned %+v, want %+v", membership, want) - } -} - -func TestOrganizationsService_EditOrgMembership_SpecifiedUser(t *testing.T) { - setup() - defer teardown() - - input := &Membership{State: String("active")} - - mux.HandleFunc("/orgs/o/memberships/u", func(w http.ResponseWriter, r *http.Request) { - v := new(Membership) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"url":"u"}`) - }) - - membership, _, err := client.Organizations.EditOrgMembership(context.Background(), "u", "o", input) - if err != nil { - t.Errorf("Organizations.EditOrgMembership returned error: %v", err) - } - - want := &Membership{URL: String("u")} - if !reflect.DeepEqual(membership, want) { - t.Errorf("Organizations.EditOrgMembership returned %+v, want %+v", membership, want) - } -} - -func TestOrganizationsService_RemoveOrgMembership(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/memberships/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.RemoveOrgMembership(context.Background(), "u", "o") - if err != nil { - t.Errorf("Organizations.RemoveOrgMembership returned error: %v", err) - } -} - -func TestOrganizationsService_ListPendingOrgInvitations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/invitations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "1"}) - fmt.Fprint(w, `[ - { - "id": 1, - "login": "monalisa", - "email": "octocat@github.com", - "role": "direct_member", - "created_at": "2017-01-21T00:00:00Z", - "inviter": { - "login": "other_user", - "id": 1, - "avatar_url": "https://github.com/images/error/other_user_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/other_user", - "html_url": "https://github.com/other_user", - "followers_url": "https://api.github.com/users/other_user/followers", - "following_url": "https://api.github.com/users/other_user/following/other_user", - "gists_url": "https://api.github.com/users/other_user/gists/gist_id", - "starred_url": "https://api.github.com/users/other_user/starred/owner/repo", - "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", - "organizations_url": "https://api.github.com/users/other_user/orgs", - "repos_url": "https://api.github.com/users/other_user/repos", - "events_url": "https://api.github.com/users/other_user/events/privacy", - "received_events_url": "https://api.github.com/users/other_user/received_events/privacy", - "type": "User", - "site_admin": false - } - } - ]`) - }) - - opt := &ListOptions{Page: 1} - invitations, _, err := client.Organizations.ListPendingOrgInvitations(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListPendingOrgInvitations returned error: %v", err) - } - - createdAt := time.Date(2017, 01, 21, 0, 0, 0, 0, time.UTC) - want := []*Invitation{ - { - ID: Int(1), - Login: String("monalisa"), - Email: String("octocat@github.com"), - Role: String("direct_member"), - CreatedAt: &createdAt, - Inviter: &User{ - Login: String("other_user"), - ID: Int(1), - AvatarURL: String("https://github.com/images/error/other_user_happy.gif"), - GravatarID: String(""), - URL: String("https://api.github.com/users/other_user"), - HTMLURL: String("https://github.com/other_user"), - FollowersURL: String("https://api.github.com/users/other_user/followers"), - FollowingURL: String("https://api.github.com/users/other_user/following/other_user"), - GistsURL: String("https://api.github.com/users/other_user/gists/gist_id"), - StarredURL: String("https://api.github.com/users/other_user/starred/owner/repo"), - SubscriptionsURL: String("https://api.github.com/users/other_user/subscriptions"), - OrganizationsURL: String("https://api.github.com/users/other_user/orgs"), - ReposURL: String("https://api.github.com/users/other_user/repos"), - EventsURL: String("https://api.github.com/users/other_user/events/privacy"), - ReceivedEventsURL: String("https://api.github.com/users/other_user/received_events/privacy"), - Type: String("User"), - SiteAdmin: Bool(false), - }, - }} - - if !reflect.DeepEqual(invitations, want) { - t.Errorf("Organizations.ListPendingOrgInvitations returned %+v, want %+v", invitations, want) - } -} diff --git a/vendor/github.com/google/go-github/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/github/orgs_outside_collaborators.go index e34f8653b..85ffd05f6 100644 --- a/vendor/github.com/google/go-github/github/orgs_outside_collaborators.go +++ b/vendor/github.com/google/go-github/github/orgs_outside_collaborators.go @@ -48,3 +48,34 @@ func (s *OrganizationsService) ListOutsideCollaborators(ctx context.Context, org return members, resp, nil } + +// RemoveOutsideCollaborator removes a user from the list of outside collaborators; +// consequently, removing them from all the organization's repositories. +// +// GitHub API docs: https://developer.github.com/v3/orgs/outside_collaborators/#remove-outside-collaborator +func (s *OrganizationsService) RemoveOutsideCollaborator(ctx context.Context, org string, user string) (*Response, error) { + u := fmt.Sprintf("orgs/%v/outside_collaborators/%v", org, user) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// ConvertMemberToOutsideCollaborator reduces the permission level of a member of the +// organization to that of an outside collaborator. Therefore, they will only +// have access to the repositories that their current team membership allows. +// Responses for converting a non-member or the last owner to an outside collaborator +// are listed in GitHub API docs. +// +// GitHub API docs: https://developer.github.com/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator +func (s *OrganizationsService) ConvertMemberToOutsideCollaborator(ctx context.Context, org string, user string) (*Response, error) { + u := fmt.Sprintf("orgs/%v/outside_collaborators/%v", org, user) + req, err := s.client.NewRequest("PUT", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/github/orgs_outside_collaborators_test.go b/vendor/github.com/google/go-github/github/orgs_outside_collaborators_test.go deleted file mode 100644 index 536006119..000000000 --- a/vendor/github.com/google/go-github/github/orgs_outside_collaborators_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestOrganizationsService_ListOutsideCollaborators(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/outside_collaborators", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "filter": "2fa_disabled", - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOutsideCollaboratorsOptions{ - Filter: "2fa_disabled", - ListOptions: ListOptions{Page: 2}, - } - members, _, err := client.Organizations.ListOutsideCollaborators(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListOutsideCollaborators returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(members, want) { - t.Errorf("Organizations.ListOutsideCollaborators returned %+v, want %+v", members, want) - } -} - -func TestOrganizationsService_ListOutsideCollaborators_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.ListOutsideCollaborators(context.Background(), "%", nil) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/orgs_projects_test.go b/vendor/github.com/google/go-github/github/orgs_projects_test.go deleted file mode 100644 index 533f69196..000000000 --- a/vendor/github.com/google/go-github/github/orgs_projects_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestOrganizationsService_ListProjects(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/projects", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - testFormValues(t, r, values{"state": "open", "page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ProjectListOptions{State: "open", ListOptions: ListOptions{Page: 2}} - projects, _, err := client.Organizations.ListProjects(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListProjects returned error: %v", err) - } - - want := []*Project{{ID: Int(1)}} - if !reflect.DeepEqual(projects, want) { - t.Errorf("Organizations.ListProjects returned %+v, want %+v", projects, want) - } -} - -func TestOrganizationsService_CreateProject(t *testing.T) { - setup() - defer teardown() - - input := &ProjectOptions{Name: "Project Name", Body: "Project body."} - - mux.HandleFunc("/orgs/o/projects", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - project, _, err := client.Organizations.CreateProject(context.Background(), "o", input) - if err != nil { - t.Errorf("Organizations.CreateProject returned error: %v", err) - } - - want := &Project{ID: Int(1)} - if !reflect.DeepEqual(project, want) { - t.Errorf("Organizations.CreateProject returned %+v, want %+v", project, want) - } -} diff --git a/vendor/github.com/google/go-github/github/orgs_teams_test.go b/vendor/github.com/google/go-github/github/orgs_teams_test.go deleted file mode 100644 index 04669866a..000000000 --- a/vendor/github.com/google/go-github/github/orgs_teams_test.go +++ /dev/null @@ -1,639 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "strings" - "testing" - "time" -) - -func TestOrganizationsService_ListTeams(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/teams", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - teams, _, err := client.Organizations.ListTeams(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListTeams returned error: %v", err) - } - - want := []*Team{{ID: Int(1)}} - if !reflect.DeepEqual(teams, want) { - t.Errorf("Organizations.ListTeams returned %+v, want %+v", teams, want) - } -} - -func TestOrganizationsService_ListTeams_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.ListTeams(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_GetTeam(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - fmt.Fprint(w, `{"id":1, "name":"n", "description": "d", "url":"u", "slug": "s", "permission":"p", "ldap_dn":"cn=n,ou=groups,dc=example,dc=com", "parent":null}`) - }) - - team, _, err := client.Organizations.GetTeam(context.Background(), 1) - if err != nil { - t.Errorf("Organizations.GetTeam returned error: %v", err) - } - - want := &Team{ID: Int(1), Name: String("n"), Description: String("d"), URL: String("u"), Slug: String("s"), Permission: String("p"), LDAPDN: String("cn=n,ou=groups,dc=example,dc=com")} - if !reflect.DeepEqual(team, want) { - t.Errorf("Organizations.GetTeam returned %+v, want %+v", team, want) - } -} - -func TestOrganizationService_GetTeam_nestedTeams(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - fmt.Fprint(w, `{"id":1, "name":"n", "description": "d", "url":"u", "slug": "s", "permission":"p", - "parent": {"id":2, "name":"n", "description": "d", "parent": null}}`) - }) - - team, _, err := client.Organizations.GetTeam(context.Background(), 1) - if err != nil { - t.Errorf("Organizations.GetTeam returned error: %v", err) - } - - want := &Team{ID: Int(1), Name: String("n"), Description: String("d"), URL: String("u"), Slug: String("s"), Permission: String("p"), - Parent: &Team{ID: Int(2), Name: String("n"), Description: String("d")}, - } - if !reflect.DeepEqual(team, want) { - t.Errorf("Organizations.GetTeam returned %+v, want %+v", team, want) - } -} - -func TestOrganizationsService_CreateTeam(t *testing.T) { - setup() - defer teardown() - - input := &NewTeam{Name: "n", Privacy: String("closed"), RepoNames: []string{"r"}} - - mux.HandleFunc("/orgs/o/teams", func(w http.ResponseWriter, r *http.Request) { - v := new(NewTeam) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - team, _, err := client.Organizations.CreateTeam(context.Background(), "o", input) - if err != nil { - t.Errorf("Organizations.CreateTeam returned error: %v", err) - } - - want := &Team{ID: Int(1)} - if !reflect.DeepEqual(team, want) { - t.Errorf("Organizations.CreateTeam returned %+v, want %+v", team, want) - } -} - -func TestOrganizationsService_CreateTeam_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.CreateTeam(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_EditTeam(t *testing.T) { - setup() - defer teardown() - - input := &NewTeam{Name: "n", Privacy: String("closed")} - - mux.HandleFunc("/teams/1", func(w http.ResponseWriter, r *http.Request) { - v := new(NewTeam) - json.NewDecoder(r.Body).Decode(v) - - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - team, _, err := client.Organizations.EditTeam(context.Background(), 1, input) - if err != nil { - t.Errorf("Organizations.EditTeam returned error: %v", err) - } - - want := &Team{ID: Int(1)} - if !reflect.DeepEqual(team, want) { - t.Errorf("Organizations.EditTeam returned %+v, want %+v", team, want) - } -} - -func TestOrganizationsService_DeleteTeam(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - }) - - _, err := client.Organizations.DeleteTeam(context.Background(), 1) - if err != nil { - t.Errorf("Organizations.DeleteTeam returned error: %v", err) - } -} - -func TestOrganizationsService_ListChildTeams(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/teams", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - teams, _, err := client.Organizations.ListChildTeams(context.Background(), 1, opt) - if err != nil { - t.Errorf("Organizations.ListTeams returned error: %v", err) - } - - want := []*Team{{ID: Int(2)}} - if !reflect.DeepEqual(teams, want) { - t.Errorf("Organizations.ListTeams returned %+v, want %+v", teams, want) - } -} - -func TestOrganizationsService_ListTeamMembers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/members", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testFormValues(t, r, values{"role": "member", "page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &OrganizationListTeamMembersOptions{Role: "member", ListOptions: ListOptions{Page: 2}} - members, _, err := client.Organizations.ListTeamMembers(context.Background(), 1, opt) - if err != nil { - t.Errorf("Organizations.ListTeamMembers returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(members, want) { - t.Errorf("Organizations.ListTeamMembers returned %+v, want %+v", members, want) - } -} - -func TestOrganizationsService_IsTeamMember_true(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - }) - - member, _, err := client.Organizations.IsTeamMember(context.Background(), 1, "u") - if err != nil { - t.Errorf("Organizations.IsTeamMember returned error: %v", err) - } - if want := true; member != want { - t.Errorf("Organizations.IsTeamMember returned %+v, want %+v", member, want) - } -} - -// ensure that a 404 response is interpreted as "false" and not an error -func TestOrganizationsService_IsTeamMember_false(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - member, _, err := client.Organizations.IsTeamMember(context.Background(), 1, "u") - if err != nil { - t.Errorf("Organizations.IsTeamMember returned error: %+v", err) - } - if want := false; member != want { - t.Errorf("Organizations.IsTeamMember returned %+v, want %+v", member, want) - } -} - -// ensure that a 400 response is interpreted as an actual error, and not simply -// as "false" like the above case of a 404 -func TestOrganizationsService_IsTeamMember_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Error(w, "BadRequest", http.StatusBadRequest) - }) - - member, _, err := client.Organizations.IsTeamMember(context.Background(), 1, "u") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } - if want := false; member != want { - t.Errorf("Organizations.IsTeamMember returned %+v, want %+v", member, want) - } -} - -func TestOrganizationsService_IsTeamMember_invalidUser(t *testing.T) { - _, _, err := client.Organizations.IsTeamMember(context.Background(), 1, "%") - testURLParseError(t, err) -} - -func TestOrganizationsService_PublicizeMembership(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/public_members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.PublicizeMembership(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.PublicizeMembership returned error: %v", err) - } -} - -func TestOrganizationsService_PublicizeMembership_invalidOrg(t *testing.T) { - _, err := client.Organizations.PublicizeMembership(context.Background(), "%", "u") - testURLParseError(t, err) -} - -func TestOrganizationsService_ConcealMembership(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/public_members/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.ConcealMembership(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.ConcealMembership returned error: %v", err) - } -} - -func TestOrganizationsService_ConcealMembership_invalidOrg(t *testing.T) { - _, err := client.Organizations.ConcealMembership(context.Background(), "%", "u") - testURLParseError(t, err) -} - -func TestOrganizationsService_ListTeamRepos(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/repos", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - acceptHeaders := []string{mediaTypeTopicsPreview, mediaTypeNestedTeamsPreview} - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - members, _, err := client.Organizations.ListTeamRepos(context.Background(), 1, opt) - if err != nil { - t.Errorf("Organizations.ListTeamRepos returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(members, want) { - t.Errorf("Organizations.ListTeamRepos returned %+v, want %+v", members, want) - } -} - -func TestOrganizationsService_IsTeamRepo_true(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - acceptHeaders := []string{mediaTypeOrgPermissionRepo, mediaTypeNestedTeamsPreview} - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - fmt.Fprint(w, `{"id":1}`) - }) - - repo, _, err := client.Organizations.IsTeamRepo(context.Background(), 1, "o", "r") - if err != nil { - t.Errorf("Organizations.IsTeamRepo returned error: %v", err) - } - - want := &Repository{ID: Int(1)} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Organizations.IsTeamRepo returned %+v, want %+v", repo, want) - } -} - -func TestOrganizationsService_IsTeamRepo_false(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - repo, resp, err := client.Organizations.IsTeamRepo(context.Background(), 1, "o", "r") - if err == nil { - t.Errorf("Expected HTTP 404 response") - } - if got, want := resp.Response.StatusCode, http.StatusNotFound; got != want { - t.Errorf("Organizations.IsTeamRepo returned status %d, want %d", got, want) - } - if repo != nil { - t.Errorf("Organizations.IsTeamRepo returned %+v, want nil", repo) - } -} - -func TestOrganizationsService_IsTeamRepo_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Error(w, "BadRequest", http.StatusBadRequest) - }) - - repo, resp, err := client.Organizations.IsTeamRepo(context.Background(), 1, "o", "r") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } - if got, want := resp.Response.StatusCode, http.StatusBadRequest; got != want { - t.Errorf("Organizations.IsTeamRepo returned status %d, want %d", got, want) - } - if repo != nil { - t.Errorf("Organizations.IsTeamRepo returned %+v, want nil", repo) - } -} - -func TestOrganizationsService_IsTeamRepo_invalidOwner(t *testing.T) { - _, _, err := client.Organizations.IsTeamRepo(context.Background(), 1, "%", "r") - testURLParseError(t, err) -} - -func TestOrganizationsService_AddTeamRepo(t *testing.T) { - setup() - defer teardown() - - opt := &OrganizationAddTeamRepoOptions{Permission: "admin"} - - mux.HandleFunc("/teams/1/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - v := new(OrganizationAddTeamRepoOptions) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, opt) { - t.Errorf("Request body = %+v, want %+v", v, opt) - } - - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.AddTeamRepo(context.Background(), 1, "o", "r", opt) - if err != nil { - t.Errorf("Organizations.AddTeamRepo returned error: %v", err) - } -} - -func TestOrganizationsService_AddTeamRepo_noAccess(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - w.WriteHeader(http.StatusUnprocessableEntity) - }) - - _, err := client.Organizations.AddTeamRepo(context.Background(), 1, "o", "r", nil) - if err == nil { - t.Errorf("Expcted error to be returned") - } -} - -func TestOrganizationsService_AddTeamRepo_invalidOwner(t *testing.T) { - _, err := client.Organizations.AddTeamRepo(context.Background(), 1, "%", "r", nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_RemoveTeamRepo(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.RemoveTeamRepo(context.Background(), 1, "o", "r") - if err != nil { - t.Errorf("Organizations.RemoveTeamRepo returned error: %v", err) - } -} - -func TestOrganizationsService_RemoveTeamRepo_invalidOwner(t *testing.T) { - _, err := client.Organizations.RemoveTeamRepo(context.Background(), 1, "%", "r") - testURLParseError(t, err) -} - -func TestOrganizationsService_GetTeamMembership(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/memberships/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - fmt.Fprint(w, `{"url":"u", "state":"active"}`) - }) - - membership, _, err := client.Organizations.GetTeamMembership(context.Background(), 1, "u") - if err != nil { - t.Errorf("Organizations.GetTeamMembership returned error: %v", err) - } - - want := &Membership{URL: String("u"), State: String("active")} - if !reflect.DeepEqual(membership, want) { - t.Errorf("Organizations.GetTeamMembership returned %+v, want %+v", membership, want) - } -} - -func TestOrganizationsService_AddTeamMembership(t *testing.T) { - setup() - defer teardown() - - opt := &OrganizationAddTeamMembershipOptions{Role: "maintainer"} - - mux.HandleFunc("/teams/1/memberships/u", func(w http.ResponseWriter, r *http.Request) { - v := new(OrganizationAddTeamMembershipOptions) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, opt) { - t.Errorf("Request body = %+v, want %+v", v, opt) - } - - fmt.Fprint(w, `{"url":"u", "state":"pending"}`) - }) - - membership, _, err := client.Organizations.AddTeamMembership(context.Background(), 1, "u", opt) - if err != nil { - t.Errorf("Organizations.AddTeamMembership returned error: %v", err) - } - - want := &Membership{URL: String("u"), State: String("pending")} - if !reflect.DeepEqual(membership, want) { - t.Errorf("Organizations.AddTeamMembership returned %+v, want %+v", membership, want) - } -} - -func TestOrganizationsService_RemoveTeamMembership(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/memberships/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.RemoveTeamMembership(context.Background(), 1, "u") - if err != nil { - t.Errorf("Organizations.RemoveTeamMembership returned error: %v", err) - } -} - -func TestOrganizationsService_ListUserTeams(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/teams", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testFormValues(t, r, values{"page": "1"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 1} - teams, _, err := client.Organizations.ListUserTeams(context.Background(), opt) - if err != nil { - t.Errorf("Organizations.ListUserTeams returned error: %v", err) - } - - want := []*Team{{ID: Int(1)}} - if !reflect.DeepEqual(teams, want) { - t.Errorf("Organizations.ListUserTeams returned %+v, want %+v", teams, want) - } -} - -func TestOrganizationsService_ListPendingTeamInvitations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/teams/1/invitations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "1"}) - fmt.Fprint(w, `[ - { - "id": 1, - "login": "monalisa", - "email": "octocat@github.com", - "role": "direct_member", - "created_at": "2017-01-21T00:00:00Z", - "inviter": { - "login": "other_user", - "id": 1, - "avatar_url": "https://github.com/images/error/other_user_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/other_user", - "html_url": "https://github.com/other_user", - "followers_url": "https://api.github.com/users/other_user/followers", - "following_url": "https://api.github.com/users/other_user/following/other_user", - "gists_url": "https://api.github.com/users/other_user/gists/gist_id", - "starred_url": "https://api.github.com/users/other_user/starred/owner/repo", - "subscriptions_url": "https://api.github.com/users/other_user/subscriptions", - "organizations_url": "https://api.github.com/users/other_user/orgs", - "repos_url": "https://api.github.com/users/other_user/repos", - "events_url": "https://api.github.com/users/other_user/events/privacy", - "received_events_url": "https://api.github.com/users/other_user/received_events/privacy", - "type": "User", - "site_admin": false - } - } - ]`) - }) - - opt := &ListOptions{Page: 1} - invitations, _, err := client.Organizations.ListPendingTeamInvitations(context.Background(), 1, opt) - if err != nil { - t.Errorf("Organizations.ListPendingTeamInvitations returned error: %v", err) - } - - createdAt := time.Date(2017, 01, 21, 0, 0, 0, 0, time.UTC) - want := []*Invitation{ - { - ID: Int(1), - Login: String("monalisa"), - Email: String("octocat@github.com"), - Role: String("direct_member"), - CreatedAt: &createdAt, - Inviter: &User{ - Login: String("other_user"), - ID: Int(1), - AvatarURL: String("https://github.com/images/error/other_user_happy.gif"), - GravatarID: String(""), - URL: String("https://api.github.com/users/other_user"), - HTMLURL: String("https://github.com/other_user"), - FollowersURL: String("https://api.github.com/users/other_user/followers"), - FollowingURL: String("https://api.github.com/users/other_user/following/other_user"), - GistsURL: String("https://api.github.com/users/other_user/gists/gist_id"), - StarredURL: String("https://api.github.com/users/other_user/starred/owner/repo"), - SubscriptionsURL: String("https://api.github.com/users/other_user/subscriptions"), - OrganizationsURL: String("https://api.github.com/users/other_user/orgs"), - ReposURL: String("https://api.github.com/users/other_user/repos"), - EventsURL: String("https://api.github.com/users/other_user/events/privacy"), - ReceivedEventsURL: String("https://api.github.com/users/other_user/received_events/privacy"), - Type: String("User"), - SiteAdmin: Bool(false), - }, - }} - - if !reflect.DeepEqual(invitations, want) { - t.Errorf("Organizations.ListPendingTeamInvitations returned %+v, want %+v", invitations, want) - } -} diff --git a/vendor/github.com/google/go-github/github/orgs_test.go b/vendor/github.com/google/go-github/github/orgs_test.go deleted file mode 100644 index 6e227e8e5..000000000 --- a/vendor/github.com/google/go-github/github/orgs_test.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestOrganizationsService_ListAll(t *testing.T) { - setup() - defer teardown() - - since := 1342004 - mux.HandleFunc("/organizations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"since": "1342004"}) - fmt.Fprint(w, `[{"id":4314092}]`) - }) - - opt := &OrganizationsListOptions{Since: since} - orgs, _, err := client.Organizations.ListAll(context.Background(), opt) - if err != nil { - t.Errorf("Organizations.ListAll returned error: %v", err) - } - - want := []*Organization{{ID: Int(4314092)}} - if !reflect.DeepEqual(orgs, want) { - t.Errorf("Organizations.ListAll returned %+v, want %+v", orgs, want) - } -} - -func TestOrganizationsService_List_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/orgs", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - orgs, _, err := client.Organizations.List(context.Background(), "", nil) - if err != nil { - t.Errorf("Organizations.List returned error: %v", err) - } - - want := []*Organization{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(orgs, want) { - t.Errorf("Organizations.List returned %+v, want %+v", orgs, want) - } -} - -func TestOrganizationsService_List_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/orgs", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - orgs, _, err := client.Organizations.List(context.Background(), "u", opt) - if err != nil { - t.Errorf("Organizations.List returned error: %v", err) - } - - want := []*Organization{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(orgs, want) { - t.Errorf("Organizations.List returned %+v, want %+v", orgs, want) - } -} - -func TestOrganizationsService_List_invalidUser(t *testing.T) { - _, _, err := client.Organizations.List(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestOrganizationsService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1, "login":"l", "url":"u", "avatar_url": "a", "location":"l"}`) - }) - - org, _, err := client.Organizations.Get(context.Background(), "o") - if err != nil { - t.Errorf("Organizations.Get returned error: %v", err) - } - - want := &Organization{ID: Int(1), Login: String("l"), URL: String("u"), AvatarURL: String("a"), Location: String("l")} - if !reflect.DeepEqual(org, want) { - t.Errorf("Organizations.Get returned %+v, want %+v", org, want) - } -} - -func TestOrganizationsService_Get_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.Get(context.Background(), "%") - testURLParseError(t, err) -} - -func TestOrganizationsService_GetByID(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/organizations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1, "login":"l", "url":"u", "avatar_url": "a", "location":"l"}`) - }) - - org, _, err := client.Organizations.GetByID(context.Background(), 1) - if err != nil { - t.Fatalf("Organizations.GetByID returned error: %v", err) - } - - want := &Organization{ID: Int(1), Login: String("l"), URL: String("u"), AvatarURL: String("a"), Location: String("l")} - if !reflect.DeepEqual(org, want) { - t.Errorf("Organizations.GetByID returned %+v, want %+v", org, want) - } -} - -func TestOrganizationsService_Edit(t *testing.T) { - setup() - defer teardown() - - input := &Organization{Login: String("l")} - - mux.HandleFunc("/orgs/o", func(w http.ResponseWriter, r *http.Request) { - v := new(Organization) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - org, _, err := client.Organizations.Edit(context.Background(), "o", input) - if err != nil { - t.Errorf("Organizations.Edit returned error: %v", err) - } - - want := &Organization{ID: Int(1)} - if !reflect.DeepEqual(org, want) { - t.Errorf("Organizations.Edit returned %+v, want %+v", org, want) - } -} - -func TestOrganizationsService_Edit_invalidOrg(t *testing.T) { - _, _, err := client.Organizations.Edit(context.Background(), "%", nil) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/orgs_users_blocking_test.go b/vendor/github.com/google/go-github/github/orgs_users_blocking_test.go deleted file mode 100644 index 53be507ef..000000000 --- a/vendor/github.com/google/go-github/github/orgs_users_blocking_test.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestOrganizationsService_ListBlockedUsers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/blocks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{ - "login": "octocat" - }]`) - }) - - opt := &ListOptions{Page: 2} - blockedUsers, _, err := client.Organizations.ListBlockedUsers(context.Background(), "o", opt) - if err != nil { - t.Errorf("Organizations.ListBlockedUsers returned error: %v", err) - } - - want := []*User{{Login: String("octocat")}} - if !reflect.DeepEqual(blockedUsers, want) { - t.Errorf("Organizations.ListBlockedUsers returned %+v, want %+v", blockedUsers, want) - } -} - -func TestOrganizationsService_IsBlocked(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/blocks/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - w.WriteHeader(http.StatusNoContent) - }) - - isBlocked, _, err := client.Organizations.IsBlocked(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.IsBlocked returned error: %v", err) - } - if want := true; isBlocked != want { - t.Errorf("Organizations.IsBlocked returned %+v, want %+v", isBlocked, want) - } -} - -func TestOrganizationsService_BlockUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/blocks/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.BlockUser(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.BlockUser returned error: %v", err) - } -} - -func TestOrganizationsService_UnblockUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/blocks/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Organizations.UnblockUser(context.Background(), "o", "u") - if err != nil { - t.Errorf("Organizations.UnblockUser returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/projects.go b/vendor/github.com/google/go-github/github/projects.go index a9b143df3..76ef1e0a3 100644 --- a/vendor/github.com/google/go-github/github/projects.go +++ b/vendor/github.com/google/go-github/github/projects.go @@ -18,14 +18,18 @@ type ProjectsService service // Project represents a GitHub Project. type Project struct { - ID *int `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - OwnerURL *string `json:"owner_url,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Number *int `json:"number,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` + ID *int64 `json:"id,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + ColumnsURL *string `json:"columns_url,omitempty"` + OwnerURL *string `json:"owner_url,omitempty"` + Name *string `json:"name,omitempty"` + Body *string `json:"body,omitempty"` + Number *int `json:"number,omitempty"` + State *string `json:"state,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + NodeID *string `json:"node_id,omitempty"` // The User object that generated the project. Creator *User `json:"creator,omitempty"` @@ -38,14 +42,14 @@ func (p Project) String() string { // GetProject gets a GitHub Project for a repo. // // GitHub API docs: https://developer.github.com/v3/projects/#get-a-project -func (s *ProjectsService) GetProject(ctx context.Context, id int) (*Project, *Response, error) { +func (s *ProjectsService) GetProject(ctx context.Context, id int64) (*Project, *Response, error) { u := fmt.Sprintf("projects/%v", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) project := &Project{} @@ -62,28 +66,37 @@ func (s *ProjectsService) GetProject(ctx context.Context, id int) (*Project, *Re // ProjectsService.UpdateProject methods. type ProjectOptions struct { // The name of the project. (Required for creation; optional for update.) - Name string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` // The body of the project. (Optional.) - Body string `json:"body,omitempty"` + Body *string `json:"body,omitempty"` // The following field(s) are only applicable for update. // They should be left with zero values for creation. // State of the project. Either "open" or "closed". (Optional.) - State string `json:"state,omitempty"` + State *string `json:"state,omitempty"` + // The permission level that all members of the project's organization + // will have on this project. + // Setting the organization permission is only available + // for organization projects. (Optional.) + OrganizationPermission *string `json:"organization_permission,omitempty"` + // Sets visibility of the project within the organization. + // Setting visibility is only available + // for organization projects.(Optional.) + Public *bool `json:"public,omitempty"` } // UpdateProject updates a repository project. // // GitHub API docs: https://developer.github.com/v3/projects/#update-a-project -func (s *ProjectsService) UpdateProject(ctx context.Context, id int, opt *ProjectOptions) (*Project, *Response, error) { +func (s *ProjectsService) UpdateProject(ctx context.Context, id int64, opt *ProjectOptions) (*Project, *Response, error) { u := fmt.Sprintf("projects/%v", id) req, err := s.client.NewRequest("PATCH", u, opt) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) project := &Project{} @@ -98,7 +111,7 @@ func (s *ProjectsService) UpdateProject(ctx context.Context, id int, opt *Projec // DeleteProject deletes a GitHub Project from a repository. // // GitHub API docs: https://developer.github.com/v3/projects/#delete-a-project -func (s *ProjectsService) DeleteProject(ctx context.Context, id int) (*Response, error) { +func (s *ProjectsService) DeleteProject(ctx context.Context, id int64) (*Response, error) { u := fmt.Sprintf("projects/%v", id) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -115,17 +128,20 @@ func (s *ProjectsService) DeleteProject(ctx context.Context, id int) (*Response, // // GitHub API docs: https://developer.github.com/v3/repos/projects/ type ProjectColumn struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name *string `json:"name,omitempty"` + URL *string `json:"url,omitempty"` ProjectURL *string `json:"project_url,omitempty"` + CardsURL *string `json:"cards_url,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` + NodeID *string `json:"node_id,omitempty"` } // ListProjectColumns lists the columns of a GitHub Project for a repo. // // GitHub API docs: https://developer.github.com/v3/projects/columns/#list-project-columns -func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int, opt *ListOptions) ([]*ProjectColumn, *Response, error) { +func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int64, opt *ListOptions) ([]*ProjectColumn, *Response, error) { u := fmt.Sprintf("projects/%v/columns", projectID) u, err := addOptions(u, opt) if err != nil { @@ -137,7 +153,7 @@ func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int, return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) columns := []*ProjectColumn{} @@ -152,14 +168,14 @@ func (s *ProjectsService) ListProjectColumns(ctx context.Context, projectID int, // GetProjectColumn gets a column of a GitHub Project for a repo. // // GitHub API docs: https://developer.github.com/v3/projects/columns/#get-a-project-column -func (s *ProjectsService) GetProjectColumn(ctx context.Context, id int) (*ProjectColumn, *Response, error) { +func (s *ProjectsService) GetProjectColumn(ctx context.Context, id int64) (*ProjectColumn, *Response, error) { u := fmt.Sprintf("projects/columns/%v", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) column := &ProjectColumn{} @@ -182,14 +198,14 @@ type ProjectColumnOptions struct { // CreateProjectColumn creates a column for the specified (by number) project. // // GitHub API docs: https://developer.github.com/v3/projects/columns/#create-a-project-column -func (s *ProjectsService) CreateProjectColumn(ctx context.Context, projectID int, opt *ProjectColumnOptions) (*ProjectColumn, *Response, error) { +func (s *ProjectsService) CreateProjectColumn(ctx context.Context, projectID int64, opt *ProjectColumnOptions) (*ProjectColumn, *Response, error) { u := fmt.Sprintf("projects/%v/columns", projectID) req, err := s.client.NewRequest("POST", u, opt) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) column := &ProjectColumn{} @@ -204,14 +220,14 @@ func (s *ProjectsService) CreateProjectColumn(ctx context.Context, projectID int // UpdateProjectColumn updates a column of a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/columns/#update-a-project-column -func (s *ProjectsService) UpdateProjectColumn(ctx context.Context, columnID int, opt *ProjectColumnOptions) (*ProjectColumn, *Response, error) { +func (s *ProjectsService) UpdateProjectColumn(ctx context.Context, columnID int64, opt *ProjectColumnOptions) (*ProjectColumn, *Response, error) { u := fmt.Sprintf("projects/columns/%v", columnID) req, err := s.client.NewRequest("PATCH", u, opt) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) column := &ProjectColumn{} @@ -226,7 +242,7 @@ func (s *ProjectsService) UpdateProjectColumn(ctx context.Context, columnID int, // DeleteProjectColumn deletes a column from a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/columns/#delete-a-project-column -func (s *ProjectsService) DeleteProjectColumn(ctx context.Context, columnID int) (*Response, error) { +func (s *ProjectsService) DeleteProjectColumn(ctx context.Context, columnID int64) (*Response, error) { u := fmt.Sprintf("projects/columns/%v", columnID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -250,7 +266,7 @@ type ProjectColumnMoveOptions struct { // MoveProjectColumn moves a column within a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/columns/#move-a-project-column -func (s *ProjectsService) MoveProjectColumn(ctx context.Context, columnID int, opt *ProjectColumnMoveOptions) (*Response, error) { +func (s *ProjectsService) MoveProjectColumn(ctx context.Context, columnID int64, opt *ProjectColumnMoveOptions) (*Response, error) { u := fmt.Sprintf("projects/columns/%v/moves", columnID) req, err := s.client.NewRequest("POST", u, opt) if err != nil { @@ -270,20 +286,32 @@ type ProjectCard struct { URL *string `json:"url,omitempty"` ColumnURL *string `json:"column_url,omitempty"` ContentURL *string `json:"content_url,omitempty"` - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Note *string `json:"note,omitempty"` Creator *User `json:"creator,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Archived *bool `json:"archived,omitempty"` // The following fields are only populated by Webhook events. - ColumnID *int `json:"column_id,omitempty"` + ColumnID *int64 `json:"column_id,omitempty"` +} + +// ProjectCardListOptions specifies the optional parameters to the +// ProjectsService.ListProjectCards method. +type ProjectCardListOptions struct { + // ArchivedState is used to list all, archived, or not_archived project cards. + // Defaults to not_archived when you omit this parameter. + ArchivedState *string `url:"archived_state,omitempty"` + + ListOptions } // ListProjectCards lists the cards in a column of a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#list-project-cards -func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int, opt *ListOptions) ([]*ProjectCard, *Response, error) { +func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int64, opt *ProjectCardListOptions) ([]*ProjectCard, *Response, error) { u := fmt.Sprintf("projects/columns/%v/cards", columnID) u, err := addOptions(u, opt) if err != nil { @@ -295,7 +323,7 @@ func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int, op return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) cards := []*ProjectCard{} @@ -310,14 +338,14 @@ func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int, op // GetProjectCard gets a card in a column of a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#get-a-project-card -func (s *ProjectsService) GetProjectCard(ctx context.Context, columnID int) (*ProjectCard, *Response, error) { +func (s *ProjectsService) GetProjectCard(ctx context.Context, columnID int64) (*ProjectCard, *Response, error) { u := fmt.Sprintf("projects/columns/cards/%v", columnID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) card := &ProjectCard{} @@ -337,22 +365,25 @@ type ProjectCardOptions struct { Note string `json:"note,omitempty"` // The ID (not Number) of the Issue to associate with this card. // Note and ContentID are mutually exclusive. - ContentID int `json:"content_id,omitempty"` + ContentID int64 `json:"content_id,omitempty"` // The type of content to associate with this card. Possible values are: "Issue". ContentType string `json:"content_type,omitempty"` + // Use true to archive a project card. + // Specify false if you need to restore a previously archived project card. + Archived *bool `json:"archived,omitempty"` } // CreateProjectCard creates a card in the specified column of a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#create-a-project-card -func (s *ProjectsService) CreateProjectCard(ctx context.Context, columnID int, opt *ProjectCardOptions) (*ProjectCard, *Response, error) { +func (s *ProjectsService) CreateProjectCard(ctx context.Context, columnID int64, opt *ProjectCardOptions) (*ProjectCard, *Response, error) { u := fmt.Sprintf("projects/columns/%v/cards", columnID) req, err := s.client.NewRequest("POST", u, opt) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) card := &ProjectCard{} @@ -367,14 +398,14 @@ func (s *ProjectsService) CreateProjectCard(ctx context.Context, columnID int, o // UpdateProjectCard updates a card of a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#update-a-project-card -func (s *ProjectsService) UpdateProjectCard(ctx context.Context, cardID int, opt *ProjectCardOptions) (*ProjectCard, *Response, error) { +func (s *ProjectsService) UpdateProjectCard(ctx context.Context, cardID int64, opt *ProjectCardOptions) (*ProjectCard, *Response, error) { u := fmt.Sprintf("projects/columns/cards/%v", cardID) req, err := s.client.NewRequest("PATCH", u, opt) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) card := &ProjectCard{} @@ -389,7 +420,7 @@ func (s *ProjectsService) UpdateProjectCard(ctx context.Context, cardID int, opt // DeleteProjectCard deletes a card from a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#delete-a-project-card -func (s *ProjectsService) DeleteProjectCard(ctx context.Context, cardID int) (*Response, error) { +func (s *ProjectsService) DeleteProjectCard(ctx context.Context, cardID int64) (*Response, error) { u := fmt.Sprintf("projects/columns/cards/%v", cardID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -411,13 +442,13 @@ type ProjectCardMoveOptions struct { // ColumnID is the ID of a column in the same project. Note that ColumnID // is required when using Position "after:" when that card is in // another column; otherwise it is optional. - ColumnID int `json:"column_id,omitempty"` + ColumnID int64 `json:"column_id,omitempty"` } // MoveProjectCard moves a card within a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#move-a-project-card -func (s *ProjectsService) MoveProjectCard(ctx context.Context, cardID int, opt *ProjectCardMoveOptions) (*Response, error) { +func (s *ProjectsService) MoveProjectCard(ctx context.Context, cardID int64, opt *ProjectCardMoveOptions) (*Response, error) { u := fmt.Sprintf("projects/columns/cards/%v/moves", cardID) req, err := s.client.NewRequest("POST", u, opt) if err != nil { diff --git a/vendor/github.com/google/go-github/github/projects_test.go b/vendor/github.com/google/go-github/github/projects_test.go deleted file mode 100644 index bf287e026..000000000 --- a/vendor/github.com/google/go-github/github/projects_test.go +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestProjectsService_UpdateProject(t *testing.T) { - setup() - defer teardown() - - input := &ProjectOptions{Name: "Project Name", Body: "Project body.", State: "open"} - - mux.HandleFunc("/projects/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - project, _, err := client.Projects.UpdateProject(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.UpdateProject returned error: %v", err) - } - - want := &Project{ID: Int(1)} - if !reflect.DeepEqual(project, want) { - t.Errorf("Projects.UpdateProject returned %+v, want %+v", project, want) - } -} - -func TestProjectsService_GetProject(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - project, _, err := client.Projects.GetProject(context.Background(), 1) - if err != nil { - t.Errorf("Projects.GetProject returned error: %v", err) - } - - want := &Project{ID: Int(1)} - if !reflect.DeepEqual(project, want) { - t.Errorf("Projects.GetProject returned %+v, want %+v", project, want) - } -} - -func TestProjectsService_DeleteProject(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - }) - - _, err := client.Projects.DeleteProject(context.Background(), 1) - if err != nil { - t.Errorf("Projects.DeleteProject returned error: %v", err) - } -} - -func TestProjectsService_ListProjectColumns(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/1/columns", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - columns, _, err := client.Projects.ListProjectColumns(context.Background(), 1, opt) - if err != nil { - t.Errorf("Projects.ListProjectColumns returned error: %v", err) - } - - want := []*ProjectColumn{{ID: Int(1)}} - if !reflect.DeepEqual(columns, want) { - t.Errorf("Projects.ListProjectColumns returned %+v, want %+v", columns, want) - } -} - -func TestProjectsService_GetProjectColumn(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/columns/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - column, _, err := client.Projects.GetProjectColumn(context.Background(), 1) - if err != nil { - t.Errorf("Projects.GetProjectColumn returned error: %v", err) - } - - want := &ProjectColumn{ID: Int(1)} - if !reflect.DeepEqual(column, want) { - t.Errorf("Projects.GetProjectColumn returned %+v, want %+v", column, want) - } -} - -func TestProjectsService_CreateProjectColumn(t *testing.T) { - setup() - defer teardown() - - input := &ProjectColumnOptions{Name: "Column Name"} - - mux.HandleFunc("/projects/1/columns", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectColumnOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - column, _, err := client.Projects.CreateProjectColumn(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.CreateProjectColumn returned error: %v", err) - } - - want := &ProjectColumn{ID: Int(1)} - if !reflect.DeepEqual(column, want) { - t.Errorf("Projects.CreateProjectColumn returned %+v, want %+v", column, want) - } -} - -func TestProjectsService_UpdateProjectColumn(t *testing.T) { - setup() - defer teardown() - - input := &ProjectColumnOptions{Name: "Column Name"} - - mux.HandleFunc("/projects/columns/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectColumnOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - column, _, err := client.Projects.UpdateProjectColumn(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.UpdateProjectColumn returned error: %v", err) - } - - want := &ProjectColumn{ID: Int(1)} - if !reflect.DeepEqual(column, want) { - t.Errorf("Projects.UpdateProjectColumn returned %+v, want %+v", column, want) - } -} - -func TestProjectsService_DeleteProjectColumn(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/columns/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - }) - - _, err := client.Projects.DeleteProjectColumn(context.Background(), 1) - if err != nil { - t.Errorf("Projects.DeleteProjectColumn returned error: %v", err) - } -} - -func TestProjectsService_MoveProjectColumn(t *testing.T) { - setup() - defer teardown() - - input := &ProjectColumnMoveOptions{Position: "after:12345"} - - mux.HandleFunc("/projects/columns/1/moves", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectColumnMoveOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - }) - - _, err := client.Projects.MoveProjectColumn(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.MoveProjectColumn returned error: %v", err) - } -} - -func TestProjectsService_ListProjectCards(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/columns/1/cards", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - cards, _, err := client.Projects.ListProjectCards(context.Background(), 1, opt) - if err != nil { - t.Errorf("Projects.ListProjectCards returned error: %v", err) - } - - want := []*ProjectCard{{ID: Int(1)}} - if !reflect.DeepEqual(cards, want) { - t.Errorf("Projects.ListProjectCards returned %+v, want %+v", cards, want) - } -} - -func TestProjectsService_GetProjectCard(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/columns/cards/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - card, _, err := client.Projects.GetProjectCard(context.Background(), 1) - if err != nil { - t.Errorf("Projects.GetProjectCard returned error: %v", err) - } - - want := &ProjectCard{ID: Int(1)} - if !reflect.DeepEqual(card, want) { - t.Errorf("Projects.GetProjectCard returned %+v, want %+v", card, want) - } -} - -func TestProjectsService_CreateProjectCard(t *testing.T) { - setup() - defer teardown() - - input := &ProjectCardOptions{ - ContentID: 12345, - ContentType: "Issue", - } - - mux.HandleFunc("/projects/columns/1/cards", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectCardOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - card, _, err := client.Projects.CreateProjectCard(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.CreateProjectCard returned error: %v", err) - } - - want := &ProjectCard{ID: Int(1)} - if !reflect.DeepEqual(card, want) { - t.Errorf("Projects.CreateProjectCard returned %+v, want %+v", card, want) - } -} - -func TestProjectsService_UpdateProjectCard(t *testing.T) { - setup() - defer teardown() - - input := &ProjectCardOptions{ - ContentID: 12345, - ContentType: "Issue", - } - - mux.HandleFunc("/projects/columns/cards/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectCardOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - card, _, err := client.Projects.UpdateProjectCard(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.UpdateProjectCard returned error: %v", err) - } - - want := &ProjectCard{ID: Int(1)} - if !reflect.DeepEqual(card, want) { - t.Errorf("Projects.UpdateProjectCard returned %+v, want %+v", card, want) - } -} - -func TestProjectsService_DeleteProjectCard(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/projects/columns/cards/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - }) - - _, err := client.Projects.DeleteProjectCard(context.Background(), 1) - if err != nil { - t.Errorf("Projects.DeleteProjectCard returned error: %v", err) - } -} - -func TestProjectsService_MoveProjectCard(t *testing.T) { - setup() - defer teardown() - - input := &ProjectCardMoveOptions{Position: "after:12345"} - - mux.HandleFunc("/projects/columns/cards/1/moves", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectCardMoveOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - }) - - _, err := client.Projects.MoveProjectCard(context.Background(), 1, input) - if err != nil { - t.Errorf("Projects.MoveProjectCard returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/pulls.go b/vendor/github.com/google/go-github/github/pulls.go index 6681c8b21..32655651e 100644 --- a/vendor/github.com/google/go-github/github/pulls.go +++ b/vendor/github.com/google/go-github/github/pulls.go @@ -9,6 +9,7 @@ import ( "bytes" "context" "fmt" + "strings" "time" ) @@ -20,7 +21,7 @@ type PullRequestsService service // PullRequest represents a GitHub pull request on a repository. type PullRequest struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Number *int `json:"number,omitempty"` State *string `json:"state,omitempty"` Title *string `json:"title,omitempty"` @@ -29,9 +30,11 @@ type PullRequest struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` ClosedAt *time.Time `json:"closed_at,omitempty"` MergedAt *time.Time `json:"merged_at,omitempty"` + Labels []*Label `json:"labels,omitempty"` User *User `json:"user,omitempty"` Merged *bool `json:"merged,omitempty"` Mergeable *bool `json:"mergeable,omitempty"` + MergeableState *string `json:"mergeable_state,omitempty"` MergedBy *User `json:"merged_by,omitempty"` MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` Comments *int `json:"comments,omitempty"` @@ -45,21 +48,48 @@ type PullRequest struct { StatusesURL *string `json:"statuses_url,omitempty"` DiffURL *string `json:"diff_url,omitempty"` PatchURL *string `json:"patch_url,omitempty"` + CommitsURL *string `json:"commits_url,omitempty"` + CommentsURL *string `json:"comments_url,omitempty"` ReviewCommentsURL *string `json:"review_comments_url,omitempty"` ReviewCommentURL *string `json:"review_comment_url,omitempty"` Assignee *User `json:"assignee,omitempty"` Assignees []*User `json:"assignees,omitempty"` Milestone *Milestone `json:"milestone,omitempty"` MaintainerCanModify *bool `json:"maintainer_can_modify,omitempty"` + AuthorAssociation *string `json:"author_association,omitempty"` + NodeID *string `json:"node_id,omitempty"` + RequestedReviewers []*User `json:"requested_reviewers,omitempty"` - Head *PullRequestBranch `json:"head,omitempty"` - Base *PullRequestBranch `json:"base,omitempty"` + Links *PRLinks `json:"_links,omitempty"` + Head *PullRequestBranch `json:"head,omitempty"` + Base *PullRequestBranch `json:"base,omitempty"` + + // ActiveLockReason is populated only when LockReason is provided while locking the pull request. + // Possible values are: "off-topic", "too heated", "resolved", and "spam". + ActiveLockReason *string `json:"active_lock_reason,omitempty"` } func (p PullRequest) String() string { return Stringify(p) } +// PRLink represents a single link object from Github pull request _links. +type PRLink struct { + HRef *string `json:"href,omitempty"` +} + +// PRLinks represents the "_links" object in a Github pull request. +type PRLinks struct { + Self *PRLink `json:"self,omitempty"` + HTML *PRLink `json:"html,omitempty"` + Issue *PRLink `json:"issue,omitempty"` + Comments *PRLink `json:"comments,omitempty"` + ReviewComments *PRLink `json:"review_comments,omitempty"` + ReviewComment *PRLink `json:"review_comment,omitempty"` + Commits *PRLink `json:"commits,omitempty"` + Statuses *PRLink `json:"statuses,omitempty"` +} + // PullRequestBranch represents a base or head branch in a GitHub pull request. type PullRequestBranch struct { Label *string `json:"label,omitempty"` @@ -110,6 +140,10 @@ func (s *PullRequestsService) List(ctx context.Context, owner string, repo strin return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + var pulls []*PullRequest resp, err := s.client.Do(ctx, req, &pulls) if err != nil { @@ -129,6 +163,10 @@ func (s *PullRequestsService) Get(ctx context.Context, owner string, repo string return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + pull := new(PullRequest) resp, err := s.client.Do(ctx, req, pull) if err != nil { @@ -184,6 +222,9 @@ func (s *PullRequestsService) Create(ctx context.Context, owner string, repo str return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + p := new(PullRequest) resp, err := s.client.Do(ctx, req, p) if err != nil { @@ -230,6 +271,10 @@ func (s *PullRequestsService) Edit(ctx context.Context, owner string, repo strin return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) + p := new(PullRequest) resp, err := s.client.Do(ctx, req, p) if err != nil { diff --git a/vendor/github.com/google/go-github/github/pulls_comments.go b/vendor/github.com/google/go-github/github/pulls_comments.go index bc0bc2d4a..f30677625 100644 --- a/vendor/github.com/google/go-github/github/pulls_comments.go +++ b/vendor/github.com/google/go-github/github/pulls_comments.go @@ -13,22 +13,26 @@ import ( // PullRequestComment represents a comment left on a pull request. type PullRequestComment struct { - ID *int `json:"id,omitempty"` - InReplyTo *int `json:"in_reply_to,omitempty"` - Body *string `json:"body,omitempty"` - Path *string `json:"path,omitempty"` - DiffHunk *string `json:"diff_hunk,omitempty"` - Position *int `json:"position,omitempty"` - OriginalPosition *int `json:"original_position,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - OriginalCommitID *string `json:"original_commit_id,omitempty"` - User *User `json:"user,omitempty"` - Reactions *Reactions `json:"reactions,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - PullRequestURL *string `json:"pull_request_url,omitempty"` + ID *int64 `json:"id,omitempty"` + InReplyTo *int64 `json:"in_reply_to_id,omitempty"` + Body *string `json:"body,omitempty"` + Path *string `json:"path,omitempty"` + DiffHunk *string `json:"diff_hunk,omitempty"` + PullRequestReviewID *int64 `json:"pull_request_review_id,omitempty"` + Position *int `json:"position,omitempty"` + OriginalPosition *int `json:"original_position,omitempty"` + CommitID *string `json:"commit_id,omitempty"` + OriginalCommitID *string `json:"original_commit_id,omitempty"` + User *User `json:"user,omitempty"` + Reactions *Reactions `json:"reactions,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // AuthorAssociation is the comment author's relationship to the pull request's repository. + // Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE". + AuthorAssociation *string `json:"author_association,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + PullRequestURL *string `json:"pull_request_url,omitempty"` } func (p PullRequestComment) String() string { @@ -87,8 +91,8 @@ func (s *PullRequestsService) ListComments(ctx context.Context, owner string, re // GetComment fetches the specified pull request comment. // // GitHub API docs: https://developer.github.com/v3/pulls/comments/#get-a-single-comment -func (s *PullRequestsService) GetComment(ctx context.Context, owner string, repo string, number int) (*PullRequestComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, number) +func (s *PullRequestsService) GetComment(ctx context.Context, owner string, repo string, commentID int64) (*PullRequestComment, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, commentID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err @@ -125,11 +129,38 @@ func (s *PullRequestsService) CreateComment(ctx context.Context, owner string, r return c, resp, nil } +// CreateCommentInReplyTo creates a new comment as a reply to an existing pull request comment. +// +// GitHub API docs: https://developer.github.com/v3/pulls/comments/#alternative-input +func (s *PullRequestsService) CreateCommentInReplyTo(ctx context.Context, owner string, repo string, number int, body string, commentID int64) (*PullRequestComment, *Response, error) { + comment := &struct { + Body string `json:"body,omitempty"` + InReplyTo int64 `json:"in_reply_to,omitempty"` + }{ + Body: body, + InReplyTo: commentID, + } + u := fmt.Sprintf("repos/%v/%v/pulls/%d/comments", owner, repo, number) + req, err := s.client.NewRequest("POST", u, comment) + if err != nil { + return nil, nil, err + } + + c := new(PullRequestComment) + resp, err := s.client.Do(ctx, req, c) + if err != nil { + return nil, resp, err + } + + return c, resp, nil +} + // EditComment updates a pull request comment. +// A non-nil comment.Body must be provided. Other comment fields should be left nil. // // GitHub API docs: https://developer.github.com/v3/pulls/comments/#edit-a-comment -func (s *PullRequestsService) EditComment(ctx context.Context, owner string, repo string, number int, comment *PullRequestComment) (*PullRequestComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, number) +func (s *PullRequestsService) EditComment(ctx context.Context, owner string, repo string, commentID int64, comment *PullRequestComment) (*PullRequestComment, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, commentID) req, err := s.client.NewRequest("PATCH", u, comment) if err != nil { return nil, nil, err @@ -147,8 +178,8 @@ func (s *PullRequestsService) EditComment(ctx context.Context, owner string, rep // DeleteComment deletes a pull request comment. // // GitHub API docs: https://developer.github.com/v3/pulls/comments/#delete-a-comment -func (s *PullRequestsService) DeleteComment(ctx context.Context, owner string, repo string, number int) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, number) +func (s *PullRequestsService) DeleteComment(ctx context.Context, owner string, repo string, commentID int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/pulls/comments/%d", owner, repo, commentID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { return nil, err diff --git a/vendor/github.com/google/go-github/github/pulls_comments_test.go b/vendor/github.com/google/go-github/github/pulls_comments_test.go deleted file mode 100644 index e35b04f7b..000000000 --- a/vendor/github.com/google/go-github/github/pulls_comments_test.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestPullRequestsService_ListComments_allPulls(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - testFormValues(t, r, values{ - "sort": "updated", - "direction": "desc", - "since": "2002-02-10T15:30:00Z", - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &PullRequestListCommentsOptions{ - Sort: "updated", - Direction: "desc", - Since: time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC), - ListOptions: ListOptions{Page: 2}, - } - pulls, _, err := client.PullRequests.ListComments(context.Background(), "o", "r", 0, opt) - if err != nil { - t.Errorf("PullRequests.ListComments returned error: %v", err) - } - - want := []*PullRequestComment{{ID: Int(1)}} - if !reflect.DeepEqual(pulls, want) { - t.Errorf("PullRequests.ListComments returned %+v, want %+v", pulls, want) - } -} - -func TestPullRequestsService_ListComments_specificPull(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `[{"id":1}]`) - }) - - pulls, _, err := client.PullRequests.ListComments(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("PullRequests.ListComments returned error: %v", err) - } - - want := []*PullRequestComment{{ID: Int(1)}} - if !reflect.DeepEqual(pulls, want) { - t.Errorf("PullRequests.ListComments returned %+v, want %+v", pulls, want) - } -} - -func TestPullRequestsService_ListComments_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.ListComments(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_GetComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/comments/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.PullRequests.GetComment(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("PullRequests.GetComment returned error: %v", err) - } - - want := &PullRequestComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("PullRequests.GetComment returned %+v, want %+v", comment, want) - } -} - -func TestPullRequestsService_GetComment_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.GetComment(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} - -func TestPullRequestsService_CreateComment(t *testing.T) { - setup() - defer teardown() - - input := &PullRequestComment{Body: String("b")} - - mux.HandleFunc("/repos/o/r/pulls/1/comments", func(w http.ResponseWriter, r *http.Request) { - v := new(PullRequestComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.PullRequests.CreateComment(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("PullRequests.CreateComment returned error: %v", err) - } - - want := &PullRequestComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("PullRequests.CreateComment returned %+v, want %+v", comment, want) - } -} - -func TestPullRequestsService_CreateComment_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.CreateComment(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_EditComment(t *testing.T) { - setup() - defer teardown() - - input := &PullRequestComment{Body: String("b")} - - mux.HandleFunc("/repos/o/r/pulls/comments/1", func(w http.ResponseWriter, r *http.Request) { - v := new(PullRequestComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.PullRequests.EditComment(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("PullRequests.EditComment returned error: %v", err) - } - - want := &PullRequestComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("PullRequests.EditComment returned %+v, want %+v", comment, want) - } -} - -func TestPullRequestsService_EditComment_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.EditComment(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_DeleteComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/comments/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.PullRequests.DeleteComment(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("PullRequests.DeleteComment returned error: %v", err) - } -} - -func TestPullRequestsService_DeleteComment_invalidOwner(t *testing.T) { - _, err := client.PullRequests.DeleteComment(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/pulls_reviewers.go b/vendor/github.com/google/go-github/github/pulls_reviewers.go index 15b47be31..a1d785315 100644 --- a/vendor/github.com/google/go-github/github/pulls_reviewers.go +++ b/vendor/github.com/google/go-github/github/pulls_reviewers.go @@ -32,9 +32,6 @@ func (s *PullRequestsService) RequestReviewers(ctx context.Context, owner, repo return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTeamReviewPreview) - r := new(PullRequest) resp, err := s.client.Do(ctx, req, r) if err != nil { @@ -59,9 +56,6 @@ func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo str return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTeamReviewPreview) - reviewers := new(Reviewers) resp, err := s.client.Do(ctx, req, reviewers) if err != nil { @@ -81,8 +75,5 @@ func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo s return nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeTeamReviewPreview) - return s.client.Do(ctx, req, nil) } diff --git a/vendor/github.com/google/go-github/github/pulls_reviewers_test.go b/vendor/github.com/google/go-github/github/pulls_reviewers_test.go deleted file mode 100644 index fddea6d08..000000000 --- a/vendor/github.com/google/go-github/github/pulls_reviewers_test.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRequestReviewers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/requested_reviewers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testBody(t, r, `{"reviewers":["octocat","googlebot"],"team_reviewers":["justice-league","injustice-league"]}`+"\n") - testHeader(t, r, "Accept", mediaTypeTeamReviewPreview) - fmt.Fprint(w, `{"number":1}`) - }) - - // This returns a PR, unmarshalling of which is tested elsewhere - pull, _, err := client.PullRequests.RequestReviewers(context.Background(), "o", "r", 1, ReviewersRequest{Reviewers: []string{"octocat", "googlebot"}, TeamReviewers: []string{"justice-league", "injustice-league"}}) - if err != nil { - t.Errorf("PullRequests.RequestReviewers returned error: %v", err) - } - want := &PullRequest{Number: Int(1)} - if !reflect.DeepEqual(pull, want) { - t.Errorf("PullRequests.RequestReviewers returned %+v, want %+v", pull, want) - } -} - -func TestRemoveReviewers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/requested_reviewers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeTeamReviewPreview) - testBody(t, r, `{"reviewers":["octocat","googlebot"],"team_reviewers":["justice-league"]}`+"\n") - }) - - _, err := client.PullRequests.RemoveReviewers(context.Background(), "o", "r", 1, ReviewersRequest{Reviewers: []string{"octocat", "googlebot"}, TeamReviewers: []string{"justice-league"}}) - if err != nil { - t.Errorf("PullRequests.RemoveReviewers returned error: %v", err) - } -} - -func TestListReviewers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/requested_reviewers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeTeamReviewPreview) - fmt.Fprint(w, `{"users":[{"login":"octocat","id":1}],"teams":[{"id":1,"name":"Justice League"}]}`) - }) - - reviewers, _, err := client.PullRequests.ListReviewers(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("PullRequests.ListReviewers returned error: %v", err) - } - - want := &Reviewers{ - Users: []*User{ - { - Login: String("octocat"), - ID: Int(1), - }, - }, - Teams: []*Team{ - { - ID: Int(1), - Name: String("Justice League"), - }, - }, - } - if !reflect.DeepEqual(reviewers, want) { - t.Errorf("PullRequests.ListReviewers returned %+v, want %+v", reviewers, want) - } -} - -func TestListReviewers_withOptions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/requested_reviewers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `{}`) - }) - - _, _, err := client.PullRequests.ListReviewers(context.Background(), "o", "r", 1, &ListOptions{Page: 2}) - if err != nil { - t.Errorf("PullRequests.ListReviewers returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/pulls_reviews.go b/vendor/github.com/google/go-github/github/pulls_reviews.go index 7d2acc414..57d3c635e 100644 --- a/vendor/github.com/google/go-github/github/pulls_reviews.go +++ b/vendor/github.com/google/go-github/github/pulls_reviews.go @@ -13,7 +13,7 @@ import ( // PullRequestReview represents a review of a pull request. type PullRequestReview struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` User *User `json:"user,omitempty"` Body *string `json:"body,omitempty"` SubmittedAt *time.Time `json:"submitted_at,omitempty"` @@ -94,7 +94,7 @@ func (s *PullRequestsService) ListReviews(ctx context.Context, owner, repo strin // Read more about it here - https://github.com/google/go-github/issues/540 // // GitHub API docs: https://developer.github.com/v3/pulls/reviews/#get-a-single-review -func (s *PullRequestsService) GetReview(ctx context.Context, owner, repo string, number, reviewID int) (*PullRequestReview, *Response, error) { +func (s *PullRequestsService) GetReview(ctx context.Context, owner, repo string, number int, reviewID int64) (*PullRequestReview, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d", owner, repo, number, reviewID) req, err := s.client.NewRequest("GET", u, nil) @@ -118,7 +118,7 @@ func (s *PullRequestsService) GetReview(ctx context.Context, owner, repo string, // Read more about it here - https://github.com/google/go-github/issues/540 // // GitHub API docs: https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review -func (s *PullRequestsService) DeletePendingReview(ctx context.Context, owner, repo string, number, reviewID int) (*PullRequestReview, *Response, error) { +func (s *PullRequestsService) DeletePendingReview(ctx context.Context, owner, repo string, number int, reviewID int64) (*PullRequestReview, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d", owner, repo, number, reviewID) req, err := s.client.NewRequest("DELETE", u, nil) @@ -142,7 +142,7 @@ func (s *PullRequestsService) DeletePendingReview(ctx context.Context, owner, re // Read more about it here - https://github.com/google/go-github/issues/540 // // GitHub API docs: https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review -func (s *PullRequestsService) ListReviewComments(ctx context.Context, owner, repo string, number, reviewID int, opt *ListOptions) ([]*PullRequestComment, *Response, error) { +func (s *PullRequestsService) ListReviewComments(ctx context.Context, owner, repo string, number int, reviewID int64, opt *ListOptions) ([]*PullRequestComment, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d/comments", owner, repo, number, reviewID) u, err := addOptions(u, opt) if err != nil { @@ -194,7 +194,7 @@ func (s *PullRequestsService) CreateReview(ctx context.Context, owner, repo stri // Read more about it here - https://github.com/google/go-github/issues/540 // // GitHub API docs: https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review -func (s *PullRequestsService) SubmitReview(ctx context.Context, owner, repo string, number, reviewID int, review *PullRequestReviewRequest) (*PullRequestReview, *Response, error) { +func (s *PullRequestsService) SubmitReview(ctx context.Context, owner, repo string, number int, reviewID int64, review *PullRequestReviewRequest) (*PullRequestReview, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d/events", owner, repo, number, reviewID) req, err := s.client.NewRequest("POST", u, review) @@ -218,7 +218,7 @@ func (s *PullRequestsService) SubmitReview(ctx context.Context, owner, repo stri // Read more about it here - https://github.com/google/go-github/issues/540 // // GitHub API docs: https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review -func (s *PullRequestsService) DismissReview(ctx context.Context, owner, repo string, number, reviewID int, review *PullRequestReviewDismissalRequest) (*PullRequestReview, *Response, error) { +func (s *PullRequestsService) DismissReview(ctx context.Context, owner, repo string, number int, reviewID int64, review *PullRequestReviewDismissalRequest) (*PullRequestReview, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/%d/reviews/%d/dismissals", owner, repo, number, reviewID) req, err := s.client.NewRequest("PUT", u, review) diff --git a/vendor/github.com/google/go-github/github/pulls_reviews_test.go b/vendor/github.com/google/go-github/github/pulls_reviews_test.go deleted file mode 100644 index b69d76adc..000000000 --- a/vendor/github.com/google/go-github/github/pulls_reviews_test.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestPullRequestsService_ListReviews(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/reviews", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - reviews, _, err := client.PullRequests.ListReviews(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("PullRequests.ListReviews returned error: %v", err) - } - - want := []*PullRequestReview{ - {ID: Int(1)}, - {ID: Int(2)}, - } - if !reflect.DeepEqual(reviews, want) { - t.Errorf("PullRequests.ListReviews returned %+v, want %+v", reviews, want) - } -} - -func TestPullRequestsService_ListReviews_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.ListReviews(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_GetReview(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/reviews/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - review, _, err := client.PullRequests.GetReview(context.Background(), "o", "r", 1, 1) - if err != nil { - t.Errorf("PullRequests.GetReview returned error: %v", err) - } - - want := &PullRequestReview{ID: Int(1)} - if !reflect.DeepEqual(review, want) { - t.Errorf("PullRequests.GetReview returned %+v, want %+v", review, want) - } -} - -func TestPullRequestsService_GetReview_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.GetReview(context.Background(), "%", "r", 1, 1) - testURLParseError(t, err) -} - -func TestPullRequestsService_DeletePendingReview(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/reviews/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - fmt.Fprint(w, `{"id":1}`) - }) - - review, _, err := client.PullRequests.DeletePendingReview(context.Background(), "o", "r", 1, 1) - if err != nil { - t.Errorf("PullRequests.DeletePendingReview returned error: %v", err) - } - - want := &PullRequestReview{ID: Int(1)} - if !reflect.DeepEqual(review, want) { - t.Errorf("PullRequests.DeletePendingReview returned %+v, want %+v", review, want) - } -} - -func TestPullRequestsService_DeletePendingReview_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.DeletePendingReview(context.Background(), "%", "r", 1, 1) - testURLParseError(t, err) -} - -func TestPullRequestsService_ListReviewComments(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/reviews/1/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - comments, _, err := client.PullRequests.ListReviewComments(context.Background(), "o", "r", 1, 1, nil) - if err != nil { - t.Errorf("PullRequests.ListReviewComments returned error: %v", err) - } - - want := []*PullRequestComment{ - {ID: Int(1)}, - {ID: Int(2)}, - } - if !reflect.DeepEqual(comments, want) { - t.Errorf("PullRequests.ListReviewComments returned %+v, want %+v", comments, want) - } -} - -func TestPullRequestsService_ListReviewComments_withOptions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/reviews/1/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[]`) - }) - - _, _, err := client.PullRequests.ListReviewComments(context.Background(), "o", "r", 1, 1, &ListOptions{Page: 2}) - if err != nil { - t.Errorf("PullRequests.ListReviewComments returned error: %v", err) - } -} - -func TestPullRequestsService_ListReviewComments_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.ListReviewComments(context.Background(), "%", "r", 1, 1, nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_CreateReview(t *testing.T) { - setup() - defer teardown() - - input := &PullRequestReviewRequest{ - CommitID: String("commit_id"), - Body: String("b"), - Event: String("APPROVE"), - } - - mux.HandleFunc("/repos/o/r/pulls/1/reviews", func(w http.ResponseWriter, r *http.Request) { - v := new(PullRequestReviewRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - review, _, err := client.PullRequests.CreateReview(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("PullRequests.CreateReview returned error: %v", err) - } - - want := &PullRequestReview{ID: Int(1)} - if !reflect.DeepEqual(review, want) { - t.Errorf("PullRequests.CreateReview returned %+v, want %+v", review, want) - } -} - -func TestPullRequestsService_CreateReview_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.CreateReview(context.Background(), "%", "r", 1, &PullRequestReviewRequest{}) - testURLParseError(t, err) -} - -func TestPullRequestsService_SubmitReview(t *testing.T) { - setup() - defer teardown() - - input := &PullRequestReviewRequest{ - Body: String("b"), - Event: String("APPROVE"), - } - - mux.HandleFunc("/repos/o/r/pulls/1/reviews/1/events", func(w http.ResponseWriter, r *http.Request) { - v := new(PullRequestReviewRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - review, _, err := client.PullRequests.SubmitReview(context.Background(), "o", "r", 1, 1, input) - if err != nil { - t.Errorf("PullRequests.SubmitReview returned error: %v", err) - } - - want := &PullRequestReview{ID: Int(1)} - if !reflect.DeepEqual(review, want) { - t.Errorf("PullRequests.SubmitReview returned %+v, want %+v", review, want) - } -} - -func TestPullRequestsService_SubmitReview_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.SubmitReview(context.Background(), "%", "r", 1, 1, &PullRequestReviewRequest{}) - testURLParseError(t, err) -} - -func TestPullRequestsService_DismissReview(t *testing.T) { - setup() - defer teardown() - - input := &PullRequestReviewDismissalRequest{Message: String("m")} - - mux.HandleFunc("/repos/o/r/pulls/1/reviews/1/dismissals", func(w http.ResponseWriter, r *http.Request) { - v := new(PullRequestReviewDismissalRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - review, _, err := client.PullRequests.DismissReview(context.Background(), "o", "r", 1, 1, input) - if err != nil { - t.Errorf("PullRequests.DismissReview returned error: %v", err) - } - - want := &PullRequestReview{ID: Int(1)} - if !reflect.DeepEqual(review, want) { - t.Errorf("PullRequests.DismissReview returned %+v, want %+v", review, want) - } -} - -func TestPullRequestsService_DismissReview_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.DismissReview(context.Background(), "%", "r", 1, 1, &PullRequestReviewDismissalRequest{}) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/pulls_test.go b/vendor/github.com/google/go-github/github/pulls_test.go deleted file mode 100644 index 89adf2394..000000000 --- a/vendor/github.com/google/go-github/github/pulls_test.go +++ /dev/null @@ -1,513 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "reflect" - "strings" - "testing" -) - -func TestPullRequestsService_List(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "state": "closed", - "head": "h", - "base": "b", - "sort": "created", - "direction": "desc", - "page": "2", - }) - fmt.Fprint(w, `[{"number":1}]`) - }) - - opt := &PullRequestListOptions{"closed", "h", "b", "created", "desc", ListOptions{Page: 2}} - pulls, _, err := client.PullRequests.List(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("PullRequests.List returned error: %v", err) - } - - want := []*PullRequest{{Number: Int(1)}} - if !reflect.DeepEqual(pulls, want) { - t.Errorf("PullRequests.List returned %+v, want %+v", pulls, want) - } -} - -func TestPullRequestsService_List_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.List(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"number":1}`) - }) - - pull, _, err := client.PullRequests.Get(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("PullRequests.Get returned error: %v", err) - } - - want := &PullRequest{Number: Int(1)} - if !reflect.DeepEqual(pull, want) { - t.Errorf("PullRequests.Get returned %+v, want %+v", pull, want) - } -} - -func TestPullRequestsService_GetRaw_diff(t *testing.T) { - setup() - defer teardown() - - const rawStr = "@@diff content" - - mux.HandleFunc("/repos/o/r/pulls/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeV3Diff) - fmt.Fprint(w, rawStr) - }) - - got, _, err := client.PullRequests.GetRaw(context.Background(), "o", "r", 1, RawOptions{Diff}) - if err != nil { - t.Fatalf("PullRequests.GetRaw returned error: %v", err) - } - want := rawStr - if got != want { - t.Errorf("PullRequests.GetRaw returned %s want %s", got, want) - } -} - -func TestPullRequestsService_GetRaw_patch(t *testing.T) { - setup() - defer teardown() - - const rawStr = "@@patch content" - - mux.HandleFunc("/repos/o/r/pulls/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeV3Patch) - fmt.Fprint(w, rawStr) - }) - - got, _, err := client.PullRequests.GetRaw(context.Background(), "o", "r", 1, RawOptions{Patch}) - if err != nil { - t.Fatalf("PullRequests.GetRaw returned error: %v", err) - } - want := rawStr - if got != want { - t.Errorf("PullRequests.GetRaw returned %s want %s", got, want) - } -} - -func TestPullRequestsService_GetRaw_invalid(t *testing.T) { - setup() - defer teardown() - - _, _, err := client.PullRequests.GetRaw(context.Background(), "o", "r", 1, RawOptions{100}) - if err == nil { - t.Fatal("PullRequests.GetRaw should return error") - } - if !strings.Contains(err.Error(), "unsupported raw type") { - t.Error("PullRequests.GetRaw should return unsupported raw type error") - } -} - -func TestPullRequestsService_Get_headAndBase(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"number":1,"head":{"ref":"r2","repo":{"id":2}},"base":{"ref":"r1","repo":{"id":1}}}`) - }) - - pull, _, err := client.PullRequests.Get(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("PullRequests.Get returned error: %v", err) - } - - want := &PullRequest{ - Number: Int(1), - Head: &PullRequestBranch{ - Ref: String("r2"), - Repo: &Repository{ID: Int(2)}, - }, - Base: &PullRequestBranch{ - Ref: String("r1"), - Repo: &Repository{ID: Int(1)}, - }, - } - if !reflect.DeepEqual(pull, want) { - t.Errorf("PullRequests.Get returned %+v, want %+v", pull, want) - } -} - -func TestPullRequestsService_Get_urlFields(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"number":1, - "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347", - "html_url": "https://github.com/octocat/Hello-World/pull/1347", - "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", - "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e", - "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", - "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", - "review_comments_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments", - "review_comment_url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}"}`) - }) - - pull, _, err := client.PullRequests.Get(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("PullRequests.Get returned error: %v", err) - } - - want := &PullRequest{ - Number: Int(1), - URL: String("https://api.github.com/repos/octocat/Hello-World/pulls/1347"), - HTMLURL: String("https://github.com/octocat/Hello-World/pull/1347"), - IssueURL: String("https://api.github.com/repos/octocat/Hello-World/issues/1347"), - StatusesURL: String("https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e"), - DiffURL: String("https://github.com/octocat/Hello-World/pull/1347.diff"), - PatchURL: String("https://github.com/octocat/Hello-World/pull/1347.patch"), - ReviewCommentsURL: String("https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments"), - ReviewCommentURL: String("https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}"), - } - - if !reflect.DeepEqual(pull, want) { - t.Errorf("PullRequests.Get returned %+v, want %+v", pull, want) - } -} - -func TestPullRequestsService_Get_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.Get(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} - -func TestPullRequestsService_Create(t *testing.T) { - setup() - defer teardown() - - input := &NewPullRequest{Title: String("t")} - - mux.HandleFunc("/repos/o/r/pulls", func(w http.ResponseWriter, r *http.Request) { - v := new(NewPullRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"number":1}`) - }) - - pull, _, err := client.PullRequests.Create(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("PullRequests.Create returned error: %v", err) - } - - want := &PullRequest{Number: Int(1)} - if !reflect.DeepEqual(pull, want) { - t.Errorf("PullRequests.Create returned %+v, want %+v", pull, want) - } -} - -func TestPullRequestsService_Create_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.Create(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestPullRequestsService_Edit(t *testing.T) { - setup() - defer teardown() - - tests := []struct { - input *PullRequest - sendResponse string - - wantUpdate string - want *PullRequest - }{ - { - input: &PullRequest{Title: String("t")}, - sendResponse: `{"number":1}`, - wantUpdate: `{"title":"t"}`, - want: &PullRequest{Number: Int(1)}, - }, - { - // base update - input: &PullRequest{Base: &PullRequestBranch{Ref: String("master")}}, - sendResponse: `{"number":1,"base":{"ref":"master"}}`, - wantUpdate: `{"base":"master"}`, - want: &PullRequest{ - Number: Int(1), - Base: &PullRequestBranch{Ref: String("master")}, - }, - }, - } - - for i, tt := range tests { - madeRequest := false - mux.HandleFunc(fmt.Sprintf("/repos/o/r/pulls/%v", i), func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testBody(t, r, tt.wantUpdate+"\n") - io.WriteString(w, tt.sendResponse) - madeRequest = true - }) - - pull, _, err := client.PullRequests.Edit(context.Background(), "o", "r", i, tt.input) - if err != nil { - t.Errorf("%d: PullRequests.Edit returned error: %v", i, err) - } - - if !reflect.DeepEqual(pull, tt.want) { - t.Errorf("%d: PullRequests.Edit returned %+v, want %+v", i, pull, tt.want) - } - - if !madeRequest { - t.Errorf("%d: PullRequest.Edit did not make the expected request", i) - } - } -} - -func TestPullRequestsService_Edit_invalidOwner(t *testing.T) { - _, _, err := client.PullRequests.Edit(context.Background(), "%", "r", 1, &PullRequest{}) - testURLParseError(t, err) -} - -func TestPullRequestsService_ListCommits(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, ` - [ - { - "sha": "3", - "parents": [ - { - "sha": "2" - } - ] - }, - { - "sha": "2", - "parents": [ - { - "sha": "1" - } - ] - } - ]`) - }) - - opt := &ListOptions{Page: 2} - commits, _, err := client.PullRequests.ListCommits(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("PullRequests.ListCommits returned error: %v", err) - } - - want := []*RepositoryCommit{ - { - SHA: String("3"), - Parents: []Commit{ - { - SHA: String("2"), - }, - }, - }, - { - SHA: String("2"), - Parents: []Commit{ - { - SHA: String("1"), - }, - }, - }, - } - if !reflect.DeepEqual(commits, want) { - t.Errorf("PullRequests.ListCommits returned %+v, want %+v", commits, want) - } -} - -func TestPullRequestsService_ListFiles(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/files", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, ` - [ - { - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "filename": "file1.txt", - "status": "added", - "additions": 103, - "deletions": 21, - "changes": 124, - "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test" - }, - { - "sha": "f61aebed695e2e4193db5e6dcb09b5b57875f334", - "filename": "file2.txt", - "status": "modified", - "additions": 5, - "deletions": 3, - "changes": 103, - "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test" - } - ]`) - }) - - opt := &ListOptions{Page: 2} - commitFiles, _, err := client.PullRequests.ListFiles(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("PullRequests.ListFiles returned error: %v", err) - } - - want := []*CommitFile{ - { - SHA: String("6dcb09b5b57875f334f61aebed695e2e4193db5e"), - Filename: String("file1.txt"), - Additions: Int(103), - Deletions: Int(21), - Changes: Int(124), - Status: String("added"), - Patch: String("@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"), - }, - { - SHA: String("f61aebed695e2e4193db5e6dcb09b5b57875f334"), - Filename: String("file2.txt"), - Additions: Int(5), - Deletions: Int(3), - Changes: Int(103), - Status: String("modified"), - Patch: String("@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"), - }, - } - - if !reflect.DeepEqual(commitFiles, want) { - t.Errorf("PullRequests.ListFiles returned %+v, want %+v", commitFiles, want) - } -} - -func TestPullRequestsService_IsMerged(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/merge", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - isMerged, _, err := client.PullRequests.IsMerged(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("PullRequests.IsMerged returned error: %v", err) - } - - want := true - if !reflect.DeepEqual(isMerged, want) { - t.Errorf("PullRequests.IsMerged returned %+v, want %+v", isMerged, want) - } -} - -func TestPullRequestsService_Merge(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/1/merge", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - fmt.Fprint(w, ` - { - "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", - "merged": true, - "message": "Pull Request successfully merged" - }`) - }) - - options := &PullRequestOptions{MergeMethod: "rebase"} - merge, _, err := client.PullRequests.Merge(context.Background(), "o", "r", 1, "merging pull request", options) - if err != nil { - t.Errorf("PullRequests.Merge returned error: %v", err) - } - - want := &PullRequestMergeResult{ - SHA: String("6dcb09b5b57875f334f61aebed695e2e4193db5e"), - Merged: Bool(true), - Message: String("Pull Request successfully merged"), - } - if !reflect.DeepEqual(merge, want) { - t.Errorf("PullRequests.Merge returned %+v, want %+v", merge, want) - } -} - -// Test that different merge options produce expected PUT requests. See issue https://github.com/google/go-github/issues/500. -func TestPullRequestsService_Merge_options(t *testing.T) { - setup() - defer teardown() - - tests := []struct { - options *PullRequestOptions - wantBody string - }{ - { - options: nil, - wantBody: `{"commit_message":"merging pull request"}`, - }, - { - options: &PullRequestOptions{}, - wantBody: `{"commit_message":"merging pull request"}`, - }, - { - options: &PullRequestOptions{MergeMethod: "rebase"}, - wantBody: `{"commit_message":"merging pull request","merge_method":"rebase"}`, - }, - { - options: &PullRequestOptions{SHA: "6dcb09b5b57875f334f61aebed695e2e4193db5e"}, - wantBody: `{"commit_message":"merging pull request","sha":"6dcb09b5b57875f334f61aebed695e2e4193db5e"}`, - }, - { - options: &PullRequestOptions{ - CommitTitle: "Extra detail", - SHA: "6dcb09b5b57875f334f61aebed695e2e4193db5e", - MergeMethod: "squash", - }, - wantBody: `{"commit_message":"merging pull request","commit_title":"Extra detail","merge_method":"squash","sha":"6dcb09b5b57875f334f61aebed695e2e4193db5e"}`, - }, - } - - for i, test := range tests { - madeRequest := false - mux.HandleFunc(fmt.Sprintf("/repos/o/r/pulls/%d/merge", i), func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - testBody(t, r, test.wantBody+"\n") - madeRequest = true - }) - _, _, _ = client.PullRequests.Merge(context.Background(), "o", "r", i, "merging pull request", test.options) - if !madeRequest { - t.Errorf("%d: PullRequests.Merge(%#v): expected request was not made", i, test.options) - } - } -} diff --git a/vendor/github.com/google/go-github/github/reactions.go b/vendor/github.com/google/go-github/github/reactions.go index 739413d71..ddc055cb1 100644 --- a/vendor/github.com/google/go-github/github/reactions.go +++ b/vendor/github.com/google/go-github/github/reactions.go @@ -19,8 +19,9 @@ type ReactionsService service // Reaction represents a GitHub reaction. type Reaction struct { // ID is the Reaction ID. - ID *int `json:"id,omitempty"` - User *User `json:"user,omitempty"` + ID *int64 `json:"id,omitempty"` + User *User `json:"user,omitempty"` + NodeID *string `json:"node_id,omitempty"` // Content is the type of reaction. // Possible values are: // "+1", "-1", "laugh", "confused", "heart", "hooray". @@ -46,7 +47,7 @@ func (r Reaction) String() string { // ListCommentReactions lists the reactions for a commit comment. // // GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment -func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo string, id int, opt *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo string, id int64, opt *ListOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions", owner, repo, id) u, err := addOptions(u, opt) if err != nil { @@ -58,7 +59,7 @@ func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) var m []*Reaction @@ -73,9 +74,10 @@ func (s *ReactionsService) ListCommentReactions(ctx context.Context, owner, repo // CreateCommentReaction creates a reaction for a commit comment. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment -func (s ReactionsService) CreateCommentReaction(ctx context.Context, owner, repo string, id int, content string) (*Reaction, *Response, error) { +func (s ReactionsService) CreateCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v/reactions", owner, repo, id) body := &Reaction{Content: String(content)} @@ -84,7 +86,7 @@ func (s ReactionsService) CreateCommentReaction(ctx context.Context, owner, repo return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) m := &Reaction{} @@ -111,7 +113,7 @@ func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo s return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) var m []*Reaction @@ -126,6 +128,7 @@ func (s *ReactionsService) ListIssueReactions(ctx context.Context, owner, repo s // CreateIssueReaction creates a reaction for an issue. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue func (s ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo string, number int, content string) (*Reaction, *Response, error) { @@ -137,7 +140,7 @@ func (s ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo s return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) m := &Reaction{} @@ -152,7 +155,7 @@ func (s ReactionsService) CreateIssueReaction(ctx context.Context, owner, repo s // ListIssueCommentReactions lists the reactions for an issue comment. // // GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment -func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, repo string, id int, opt *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, repo string, id int64, opt *ListOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions", owner, repo, id) u, err := addOptions(u, opt) if err != nil { @@ -164,7 +167,7 @@ func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) var m []*Reaction @@ -179,9 +182,10 @@ func (s *ReactionsService) ListIssueCommentReactions(ctx context.Context, owner, // CreateIssueCommentReaction creates a reaction for an issue comment. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment -func (s ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, repo string, id int, content string) (*Reaction, *Response, error) { +func (s ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/comments/%v/reactions", owner, repo, id) body := &Reaction{Content: String(content)} @@ -190,7 +194,7 @@ func (s ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) m := &Reaction{} @@ -205,7 +209,7 @@ func (s ReactionsService) CreateIssueCommentReaction(ctx context.Context, owner, // ListPullRequestCommentReactions lists the reactions for a pull request review comment. // // GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment -func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, owner, repo string, id int, opt *ListOptions) ([]*Reaction, *Response, error) { +func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, owner, repo string, id int64, opt *ListOptions) ([]*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions", owner, repo, id) u, err := addOptions(u, opt) if err != nil { @@ -217,7 +221,7 @@ func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeReactionsPreview) var m []*Reaction @@ -232,9 +236,10 @@ func (s *ReactionsService) ListPullRequestCommentReactions(ctx context.Context, // CreatePullRequestCommentReaction creates a reaction for a pull request review comment. // Note that if you have already created a reaction of type content, the // previously created reaction will be returned with Status: 200 OK. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". // // GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment -func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, owner, repo string, id int, content string) (*Reaction, *Response, error) { +func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, owner, repo string, id int64, content string) (*Reaction, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pulls/comments/%v/reactions", owner, repo, id) body := &Reaction{Content: String(content)} @@ -243,7 +248,104 @@ func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. + req.Header.Set("Accept", mediaTypeReactionsPreview) + + m := &Reaction{} + resp, err := s.client.Do(ctx, req, m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// ListTeamDiscussionReactions lists the reactions for a team discussion. +// +// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion +func (s *ReactionsService) ListTeamDiscussionReactions(ctx context.Context, teamID int64, discussionNumber int, opt *ListOptions) ([]*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + var m []*Reaction + resp, err := s.client.Do(ctx, req, &m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// CreateTeamDiscussionReaction creates a reaction for a team discussion. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". +// +// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion +func (s *ReactionsService) CreateTeamDiscussionReaction(ctx context.Context, teamID int64, discussionNumber int, content string) (*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/reactions", teamID, discussionNumber) + + body := &Reaction{Content: String(content)} + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + m := &Reaction{} + resp, err := s.client.Do(ctx, req, m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// ListTeamDiscussionCommentReactions lists the reactions for a team discussion comment. +// +// GitHub API docs: https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment +func (s *ReactionsService) ListTeamDiscussionCommentReactions(ctx context.Context, teamID int64, discussionNumber, commentNumber int, opt *ListOptions) ([]*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeReactionsPreview) + + var m []*Reaction + resp, err := s.client.Do(ctx, req, &m) + + return m, resp, nil +} + +// CreateTeamDiscussionCommentReaction creates a reaction for a team discussion comment. +// The content should have one of the following values: "+1", "-1", "laugh", "confused", "heart", "hooray". +// +// GitHub API docs: https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment +func (s *ReactionsService) CreateTeamDiscussionCommentReaction(ctx context.Context, teamID int64, discussionNumber, commentNumber int, content string) (*Reaction, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v/reactions", teamID, discussionNumber, commentNumber) + + body := &Reaction{Content: String(content)} + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + req.Header.Set("Accept", mediaTypeReactionsPreview) m := &Reaction{} @@ -258,7 +360,7 @@ func (s ReactionsService) CreatePullRequestCommentReaction(ctx context.Context, // DeleteReaction deletes a reaction. // // GitHub API docs: https://developer.github.com/v3/reaction/reactions/#delete-a-reaction-archive -func (s *ReactionsService) DeleteReaction(ctx context.Context, id int) (*Response, error) { +func (s *ReactionsService) DeleteReaction(ctx context.Context, id int64) (*Response, error) { u := fmt.Sprintf("reactions/%v", id) req, err := s.client.NewRequest("DELETE", u, nil) diff --git a/vendor/github.com/google/go-github/github/reactions_test.go b/vendor/github.com/google/go-github/github/reactions_test.go deleted file mode 100644 index 272529827..000000000 --- a/vendor/github.com/google/go-github/github/reactions_test.go +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "net/http" - "reflect" - "testing" -) - -func TestReactionsService_ListCommentReactions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/comments/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusOK) - w.Write([]byte(`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]`)) - }) - - got, _, err := client.Reactions.ListCommentReactions(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("ListCommentReactions returned error: %v", err) - } - if want := []*Reaction{{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")}}; !reflect.DeepEqual(got, want) { - t.Errorf("ListCommentReactions = %+v, want %+v", got, want) - } -} - -func TestReactionsService_CreateCommentReaction(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/comments/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"id":1,"user":{"login":"l","id":2},"content":"+1"}`)) - }) - - got, _, err := client.Reactions.CreateCommentReaction(context.Background(), "o", "r", 1, "+1") - if err != nil { - t.Errorf("CreateCommentReaction returned error: %v", err) - } - want := &Reaction{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")} - if !reflect.DeepEqual(got, want) { - t.Errorf("CreateCommentReaction = %+v, want %+v", got, want) - } -} - -func TestReactionsService_ListIssueReactions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusOK) - w.Write([]byte(`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]`)) - }) - - got, _, err := client.Reactions.ListIssueReactions(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("ListIssueReactions returned error: %v", err) - } - if want := []*Reaction{{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")}}; !reflect.DeepEqual(got, want) { - t.Errorf("ListIssueReactions = %+v, want %+v", got, want) - } -} - -func TestReactionsService_CreateIssueReaction(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"id":1,"user":{"login":"l","id":2},"content":"+1"}`)) - }) - - got, _, err := client.Reactions.CreateIssueReaction(context.Background(), "o", "r", 1, "+1") - if err != nil { - t.Errorf("CreateIssueReaction returned error: %v", err) - } - want := &Reaction{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")} - if !reflect.DeepEqual(got, want) { - t.Errorf("CreateIssueReaction = %+v, want %+v", got, want) - } -} - -func TestReactionsService_ListIssueCommentReactions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/comments/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusOK) - w.Write([]byte(`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]`)) - }) - - got, _, err := client.Reactions.ListIssueCommentReactions(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("ListIssueCommentReactions returned error: %v", err) - } - if want := []*Reaction{{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")}}; !reflect.DeepEqual(got, want) { - t.Errorf("ListIssueCommentReactions = %+v, want %+v", got, want) - } -} - -func TestReactionsService_CreateIssueCommentReaction(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/comments/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"id":1,"user":{"login":"l","id":2},"content":"+1"}`)) - }) - - got, _, err := client.Reactions.CreateIssueCommentReaction(context.Background(), "o", "r", 1, "+1") - if err != nil { - t.Errorf("CreateIssueCommentReaction returned error: %v", err) - } - want := &Reaction{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")} - if !reflect.DeepEqual(got, want) { - t.Errorf("CreateIssueCommentReaction = %+v, want %+v", got, want) - } -} - -func TestReactionsService_ListPullRequestCommentReactions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/comments/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusOK) - w.Write([]byte(`[{"id":1,"user":{"login":"l","id":2},"content":"+1"}]`)) - }) - - got, _, err := client.Reactions.ListPullRequestCommentReactions(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("ListPullRequestCommentReactions returned error: %v", err) - } - if want := []*Reaction{{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")}}; !reflect.DeepEqual(got, want) { - t.Errorf("ListPullRequestCommentReactions = %+v, want %+v", got, want) - } -} - -func TestReactionsService_CreatePullRequestCommentReaction(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pulls/comments/1/reactions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusCreated) - w.Write([]byte(`{"id":1,"user":{"login":"l","id":2},"content":"+1"}`)) - }) - - got, _, err := client.Reactions.CreatePullRequestCommentReaction(context.Background(), "o", "r", 1, "+1") - if err != nil { - t.Errorf("CreatePullRequestCommentReaction returned error: %v", err) - } - want := &Reaction{ID: Int(1), User: &User{Login: String("l"), ID: Int(2)}, Content: String("+1")} - if !reflect.DeepEqual(got, want) { - t.Errorf("CreatePullRequestCommentReaction = %+v, want %+v", got, want) - } -} - -func TestReactionsService_DeleteReaction(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/reactions/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Reactions.DeleteReaction(context.Background(), 1); err != nil { - t.Errorf("DeleteReaction returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/repos.go b/vendor/github.com/google/go-github/github/repos.go index 13daa7e92..e783ccbea 100644 --- a/vendor/github.com/google/go-github/github/repos.go +++ b/vendor/github.com/google/go-github/github/repos.go @@ -7,7 +7,6 @@ package github import ( "context" - "encoding/json" "fmt" "strings" ) @@ -20,7 +19,8 @@ type RepositoriesService service // Repository represents a GitHub repository. type Repository struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` Owner *User `json:"owner,omitempty"` Name *string `json:"name,omitempty"` FullName *string `json:"full_name,omitempty"` @@ -39,7 +39,7 @@ type Repository struct { SSHURL *string `json:"ssh_url,omitempty"` SVNURL *string `json:"svn_url,omitempty"` Language *string `json:"language,omitempty"` - Fork *bool `json:"fork"` + Fork *bool `json:"fork,omitempty"` ForksCount *int `json:"forks_count,omitempty"` NetworkCount *int `json:"network_count,omitempty"` OpenIssuesCount *int `json:"open_issues_count,omitempty"` @@ -56,21 +56,23 @@ type Repository struct { AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` Topics []string `json:"topics,omitempty"` + Archived *bool `json:"archived,omitempty"` // Only provided when using RepositoriesService.Get while in preview License *License `json:"license,omitempty"` // Additional mutable fields when creating and editing a repository - Private *bool `json:"private"` - HasIssues *bool `json:"has_issues"` - HasWiki *bool `json:"has_wiki"` - HasPages *bool `json:"has_pages"` - HasDownloads *bool `json:"has_downloads"` + Private *bool `json:"private,omitempty"` + HasIssues *bool `json:"has_issues,omitempty"` + HasWiki *bool `json:"has_wiki,omitempty"` + HasPages *bool `json:"has_pages,omitempty"` + HasProjects *bool `json:"has_projects,omitempty"` + HasDownloads *bool `json:"has_downloads,omitempty"` LicenseTemplate *string `json:"license_template,omitempty"` GitignoreTemplate *string `json:"gitignore_template,omitempty"` // Creating an organization repository. Required for non-owners. - TeamID *int `json:"team_id"` + TeamID *int64 `json:"team_id,omitempty"` // API URLs URL *string `json:"url,omitempty"` @@ -177,7 +179,7 @@ func (s *RepositoriesService) List(ctx context.Context, user string, opt *Reposi } // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} + acceptHeaders := []string{mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var repos []*Repository @@ -215,7 +217,7 @@ func (s *RepositoriesService) ListByOrg(ctx context.Context, org string, opt *Re } // TODO: remove custom Accept headers when APIs fully launch. - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} + acceptHeaders := []string{mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var repos []*Repository @@ -231,7 +233,7 @@ func (s *RepositoriesService) ListByOrg(ctx context.Context, org string, opt *Re // RepositoriesService.ListAll method. type RepositoryListAllOptions struct { // ID of the last repository seen - Since int `url:"since,omitempty"` + Since int64 `url:"since,omitempty"` } // ListAll lists all GitHub repositories in the order that they were created. @@ -257,10 +259,40 @@ func (s *RepositoriesService) ListAll(ctx context.Context, opt *RepositoryListAl return repos, resp, nil } +// createRepoRequest is a subset of Repository and is used internally +// by Create to pass only the known fields for the endpoint. +// +// See https://github.com/google/go-github/issues/1014 for more +// information. +type createRepoRequest struct { + // Name is required when creating a repo. + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Homepage *string `json:"homepage,omitempty"` + + Private *bool `json:"private,omitempty"` + HasIssues *bool `json:"has_issues,omitempty"` + HasProjects *bool `json:"has_projects,omitempty"` + HasWiki *bool `json:"has_wiki,omitempty"` + + // Creating an organization repository. Required for non-owners. + TeamID *int64 `json:"team_id,omitempty"` + + AutoInit *bool `json:"auto_init,omitempty"` + GitignoreTemplate *string `json:"gitignore_template,omitempty"` + LicenseTemplate *string `json:"license_template,omitempty"` + AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` + AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` + AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` +} + // Create a new repository. If an organization is specified, the new // repository will be created under that org. If the empty string is // specified, it will be created for the authenticated user. // +// Note that only a subset of the repo fields are used and repo must +// not be nil. +// // GitHub API docs: https://developer.github.com/v3/repos/#create func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repository) (*Repository, *Response, error) { var u string @@ -270,7 +302,24 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo u = "user/repos" } - req, err := s.client.NewRequest("POST", u, repo) + repoReq := &createRepoRequest{ + Name: repo.Name, + Description: repo.Description, + Homepage: repo.Homepage, + Private: repo.Private, + HasIssues: repo.HasIssues, + HasProjects: repo.HasProjects, + HasWiki: repo.HasWiki, + TeamID: repo.TeamID, + AutoInit: repo.AutoInit, + GitignoreTemplate: repo.GitignoreTemplate, + LicenseTemplate: repo.LicenseTemplate, + AllowSquashMerge: repo.AllowSquashMerge, + AllowMergeCommit: repo.AllowMergeCommit, + AllowRebaseMerge: repo.AllowRebaseMerge, + } + + req, err := s.client.NewRequest("POST", u, repoReq) if err != nil { return nil, nil, err } @@ -296,7 +345,7 @@ func (s *RepositoriesService) Get(ctx context.Context, owner, repo string) (*Rep // TODO: remove custom Accept header when the license support fully launches // https://developer.github.com/v3/licenses/#get-a-repositorys-license - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} + acceptHeaders := []string{mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) repository := new(Repository) @@ -333,17 +382,13 @@ func (s *RepositoriesService) GetCodeOfConduct(ctx context.Context, owner, repo // GetByID fetches a repository. // // Note: GetByID uses the undocumented GitHub API endpoint /repositories/:id. -func (s *RepositoriesService) GetByID(ctx context.Context, id int) (*Repository, *Response, error) { +func (s *RepositoriesService) GetByID(ctx context.Context, id int64) (*Repository, *Response, error) { u := fmt.Sprintf("repositories/%d", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err } - // TODO: remove custom Accept header when the license support fully launches - // https://developer.github.com/v3/licenses/#get-a-repositorys-license - req.Header.Set("Accept", mediaTypeLicensesPreview) - repository := new(Repository) resp, err := s.client.Do(ctx, req, repository) if err != nil { @@ -388,7 +433,7 @@ func (s *RepositoriesService) Delete(ctx context.Context, owner, repo string) (* // Contributor represents a repository contributor type Contributor struct { Login *string `json:"login,omitempty"` - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` AvatarURL *string `json:"avatar_url,omitempty"` GravatarID *string `json:"gravatar_id,omitempty"` URL *string `json:"url,omitempty"` @@ -403,7 +448,7 @@ type Contributor struct { EventsURL *string `json:"events_url,omitempty"` ReceivedEventsURL *string `json:"received_events_url,omitempty"` Type *string `json:"type,omitempty"` - SiteAdmin *bool `json:"site_admin"` + SiteAdmin *bool `json:"site_admin,omitempty"` Contributions *int `json:"contributions,omitempty"` } @@ -556,6 +601,12 @@ type RequiredStatusChecks struct { Contexts []string `json:"contexts"` } +// RequiredStatusChecksRequest represents a request to edit a protected branch's status checks. +type RequiredStatusChecksRequest struct { + Strict *bool `json:"strict,omitempty"` + Contexts []string `json:"contexts,omitempty"` +} + // PullRequestReviewsEnforcement represents the pull request reviews enforcement of a protected branch. type PullRequestReviewsEnforcement struct { // Specifies which users and teams can dismiss pull request reviews. @@ -564,45 +615,26 @@ type PullRequestReviewsEnforcement struct { DismissStaleReviews bool `json:"dismiss_stale_reviews"` // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. RequireCodeOwnerReviews bool `json:"require_code_owner_reviews"` + // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. + // Valid values are 1-6. + RequiredApprovingReviewCount int `json:"required_approving_review_count"` } // PullRequestReviewsEnforcementRequest represents request to set the pull request review // enforcement of a protected branch. It is separate from PullRequestReviewsEnforcement above // because the request structure is different from the response structure. type PullRequestReviewsEnforcementRequest struct { - // Specifies which users and teams should be allowed to dismiss pull request reviews. Can be nil to disable the restrictions. - DismissalRestrictionsRequest *DismissalRestrictionsRequest `json:"dismissal_restrictions"` + // Specifies which users and teams should be allowed to dismiss pull request reviews. + // User and team dismissal restrictions are only available for + // organization-owned repositories. Must be nil for personal repositories. + DismissalRestrictionsRequest *DismissalRestrictionsRequest `json:"dismissal_restrictions,omitempty"` // Specifies if approved reviews can be dismissed automatically, when a new commit is pushed. (Required) DismissStaleReviews bool `json:"dismiss_stale_reviews"` // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. RequireCodeOwnerReviews bool `json:"require_code_owner_reviews"` -} - -// MarshalJSON implements the json.Marshaler interface. -// Converts nil value of PullRequestReviewsEnforcementRequest.DismissalRestrictionsRequest to empty array -func (req PullRequestReviewsEnforcementRequest) MarshalJSON() ([]byte, error) { - if req.DismissalRestrictionsRequest == nil { - newReq := struct { - R []interface{} `json:"dismissal_restrictions"` - D bool `json:"dismiss_stale_reviews"` - O bool `json:"require_code_owner_reviews"` - }{ - R: []interface{}{}, - D: req.DismissStaleReviews, - O: req.RequireCodeOwnerReviews, - } - return json.Marshal(newReq) - } - newReq := struct { - R *DismissalRestrictionsRequest `json:"dismissal_restrictions"` - D bool `json:"dismiss_stale_reviews"` - O bool `json:"require_code_owner_reviews"` - }{ - R: req.DismissalRestrictionsRequest, - D: req.DismissStaleReviews, - O: req.RequireCodeOwnerReviews, - } - return json.Marshal(newReq) + // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. + // Valid values are 1-6. + RequiredApprovingReviewCount int `json:"required_approving_review_count"` } // PullRequestReviewsEnforcementUpdate represents request to patch the pull request review @@ -615,6 +647,9 @@ type PullRequestReviewsEnforcementUpdate struct { DismissStaleReviews *bool `json:"dismiss_stale_reviews,omitempty"` // RequireCodeOwnerReviews specifies if an approved review is required in pull requests including files with a designated code owner. RequireCodeOwnerReviews bool `json:"require_code_owner_reviews,omitempty"` + // RequiredApprovingReviewCount specifies the number of approvals required before the pull request can be merged. + // Valid values are 1 - 6. + RequiredApprovingReviewCount int `json:"required_approving_review_count"` } // AdminEnforcement represents the configuration to enforce required status checks for repository administrators. @@ -655,11 +690,12 @@ type DismissalRestrictions struct { // restriction to allows only specific users or teams to dimiss pull request reviews. It is // separate from DismissalRestrictions above because the request structure is // different from the response structure. +// Note: Both Users and Teams must be nil, or both must be non-nil. type DismissalRestrictionsRequest struct { - // The list of user logins who can dismiss pull request reviews. (Required; use []string{} instead of nil for empty list.) - Users []string `json:"users"` - // The list of team slugs which can dismiss pull request reviews. (Required; use []string{} instead of nil for empty list.) - Teams []string `json:"teams"` + // The list of user logins who can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) + Users *[]string `json:"users,omitempty"` + // The list of team slugs which can dismiss pull request reviews. (Required; use nil to disable dismissal_restrictions or &[]string{} otherwise.) + Teams *[]string `json:"teams,omitempty"` } // ListBranches lists branches for the specified repository. @@ -678,7 +714,7 @@ func (s *RepositoriesService) ListBranches(ctx context.Context, owner string, re } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) var branches []*Branch resp, err := s.client.Do(ctx, req, &branches) @@ -700,7 +736,7 @@ func (s *RepositoriesService) GetBranch(ctx context.Context, owner, repo, branch } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) b := new(Branch) resp, err := s.client.Do(ctx, req, b) @@ -722,7 +758,7 @@ func (s *RepositoriesService) GetBranchProtection(ctx context.Context, owner, re } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) p := new(Protection) resp, err := s.client.Do(ctx, req, p) @@ -744,7 +780,7 @@ func (s *RepositoriesService) GetRequiredStatusChecks(ctx context.Context, owner } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) p := new(RequiredStatusChecks) resp, err := s.client.Do(ctx, req, p) @@ -766,7 +802,7 @@ func (s *RepositoriesService) ListRequiredStatusChecksContexts(ctx context.Conte } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) resp, err = s.client.Do(ctx, req, &contexts) if err != nil { @@ -787,7 +823,7 @@ func (s *RepositoriesService) UpdateBranchProtection(ctx context.Context, owner, } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) p := new(Protection) resp, err := s.client.Do(ctx, req, p) @@ -809,11 +845,30 @@ func (s *RepositoriesService) RemoveBranchProtection(ctx context.Context, owner, } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) return s.client.Do(ctx, req, nil) } +// UpdateRequiredStatusChecks updates the required status checks for a given protected branch. +// +// GitHub API docs: https://developer.github.com/v3/repos/branches/#update-required-status-checks-of-protected-branch +func (s *RepositoriesService) UpdateRequiredStatusChecks(ctx context.Context, owner, repo, branch string, sreq *RequiredStatusChecksRequest) (*RequiredStatusChecks, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_status_checks", owner, repo, branch) + req, err := s.client.NewRequest("PATCH", u, sreq) + if err != nil { + return nil, nil, err + } + + sc := new(RequiredStatusChecks) + resp, err := s.client.Do(ctx, req, sc) + if err != nil { + return nil, resp, err + } + + return sc, resp, nil +} + // License gets the contents of a repository's license if one is detected. // // GitHub API docs: https://developer.github.com/v3/licenses/#get-the-contents-of-a-repositorys-license @@ -844,7 +899,7 @@ func (s *RepositoriesService) GetPullRequestReviewEnforcement(ctx context.Contex } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) r := new(PullRequestReviewsEnforcement) resp, err := s.client.Do(ctx, req, r) @@ -867,7 +922,7 @@ func (s *RepositoriesService) UpdatePullRequestReviewEnforcement(ctx context.Con } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) r := new(PullRequestReviewsEnforcement) resp, err := s.client.Do(ctx, req, r) @@ -895,7 +950,7 @@ func (s *RepositoriesService) DisableDismissalRestrictions(ctx context.Context, } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) r := new(PullRequestReviewsEnforcement) resp, err := s.client.Do(ctx, req, r) @@ -917,7 +972,7 @@ func (s *RepositoriesService) RemovePullRequestReviewEnforcement(ctx context.Con } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) return s.client.Do(ctx, req, nil) } @@ -933,7 +988,7 @@ func (s *RepositoriesService) GetAdminEnforcement(ctx context.Context, owner, re } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) r := new(AdminEnforcement) resp, err := s.client.Do(ctx, req, r) @@ -956,7 +1011,7 @@ func (s *RepositoriesService) AddAdminEnforcement(ctx context.Context, owner, re } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) r := new(AdminEnforcement) resp, err := s.client.Do(ctx, req, r) @@ -978,20 +1033,20 @@ func (s *RepositoriesService) RemoveAdminEnforcement(ctx context.Context, owner, } // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeProtectedBranchesPreview) + req.Header.Set("Accept", mediaTypeRequiredApprovingReviewsPreview) return s.client.Do(ctx, req, nil) } -// Topics represents a collection of repository topics. -type Topics struct { - Names []string `json:"names,omitempty"` +// repositoryTopics represents a collection of repository topics. +type repositoryTopics struct { + Names []string `json:"names"` } // ListAllTopics lists topics for a repository. // // GitHub API docs: https://developer.github.com/v3/repos/#list-all-topics-for-a-repository -func (s *RepositoriesService) ListAllTopics(ctx context.Context, owner, repo string) (*Topics, *Response, error) { +func (s *RepositoriesService) ListAllTopics(ctx context.Context, owner, repo string) ([]string, *Response, error) { u := fmt.Sprintf("repos/%v/%v/topics", owner, repo) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -1001,21 +1056,27 @@ func (s *RepositoriesService) ListAllTopics(ctx context.Context, owner, repo str // TODO: remove custom Accept header when this API fully launches. req.Header.Set("Accept", mediaTypeTopicsPreview) - topics := new(Topics) + topics := new(repositoryTopics) resp, err := s.client.Do(ctx, req, topics) if err != nil { return nil, resp, err } - return topics, resp, nil + return topics.Names, resp, nil } // ReplaceAllTopics replaces topics for a repository. // // GitHub API docs: https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository -func (s *RepositoriesService) ReplaceAllTopics(ctx context.Context, owner, repo string, topics *Topics) (*Topics, *Response, error) { +func (s *RepositoriesService) ReplaceAllTopics(ctx context.Context, owner, repo string, topics []string) ([]string, *Response, error) { u := fmt.Sprintf("repos/%v/%v/topics", owner, repo) - req, err := s.client.NewRequest("PUT", u, topics) + t := &repositoryTopics{ + Names: topics, + } + if t.Names == nil { + t.Names = []string{} + } + req, err := s.client.NewRequest("PUT", u, t) if err != nil { return nil, nil, err } @@ -1023,11 +1084,46 @@ func (s *RepositoriesService) ReplaceAllTopics(ctx context.Context, owner, repo // TODO: remove custom Accept header when this API fully launches. req.Header.Set("Accept", mediaTypeTopicsPreview) - t := new(Topics) + t = new(repositoryTopics) resp, err := s.client.Do(ctx, req, t) if err != nil { return nil, resp, err } - return t, resp, nil + return t.Names, resp, nil +} + +// TransferRequest represents a request to transfer a repository. +type TransferRequest struct { + NewOwner string `json:"new_owner"` + TeamID []int64 `json:"team_ids,omitempty"` +} + +// Transfer transfers a repository from one account or organization to another. +// +// This method might return an *AcceptedError and a status code of +// 202. This is because this is the status that GitHub returns to signify that +// it has now scheduled the transfer of the repository in a background task. +// A follow up request, after a delay of a second or so, should result +// in a successful request. +// +// GitHub API docs: https://developer.github.com/v3/repos/#transfer-a-repository +func (s *RepositoriesService) Transfer(ctx context.Context, owner, repo string, transfer TransferRequest) (*Repository, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/transfer", owner, repo) + + req, err := s.client.NewRequest("POST", u, &transfer) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeRepositoryTransferPreview) + + r := new(Repository) + resp, err := s.client.Do(ctx, req, r) + if err != nil { + return nil, resp, err + } + + return r, resp, nil } diff --git a/vendor/github.com/google/go-github/github/repos_collaborators_test.go b/vendor/github.com/google/go-github/github/repos_collaborators_test.go deleted file mode 100644 index 4f3d47707..000000000 --- a/vendor/github.com/google/go-github/github/repos_collaborators_test.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListCollaborators(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/collaborators", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprintf(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListCollaboratorsOptions{ - ListOptions: ListOptions{Page: 2}, - } - users, _, err := client.Repositories.ListCollaborators(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListCollaborators returned error: %v", err) - } - - want := []*User{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Repositori es.ListCollaborators returned %+v, want %+v", users, want) - } -} - -func TestRepositoriesService_ListCollaborators_withAffiliation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/collaborators", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"affiliation": "all", "page": "2"}) - fmt.Fprintf(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListCollaboratorsOptions{ - ListOptions: ListOptions{Page: 2}, - Affiliation: "all", - } - users, _, err := client.Repositories.ListCollaborators(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListCollaborators returned error: %v", err) - } - - want := []*User{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Repositories.ListCollaborators returned %+v, want %+v", users, want) - } -} - -func TestRepositoriesService_ListCollaborators_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListCollaborators(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_IsCollaborator_True(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/collaborators/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - isCollab, _, err := client.Repositories.IsCollaborator(context.Background(), "o", "r", "u") - if err != nil { - t.Errorf("Repositories.IsCollaborator returned error: %v", err) - } - - if !isCollab { - t.Errorf("Repositories.IsCollaborator returned false, want true") - } -} - -func TestRepositoriesService_IsCollaborator_False(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/collaborators/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - isCollab, _, err := client.Repositories.IsCollaborator(context.Background(), "o", "r", "u") - if err != nil { - t.Errorf("Repositories.IsCollaborator returned error: %v", err) - } - - if isCollab { - t.Errorf("Repositories.IsCollaborator returned true, want false") - } -} - -func TestRepositoriesService_IsCollaborator_invalidUser(t *testing.T) { - _, _, err := client.Repositories.IsCollaborator(context.Background(), "%", "%", "%") - testURLParseError(t, err) -} - -func TestRepositoryService_GetPermissionLevel(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/collaborators/u/permission", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprintf(w, `{"permission":"admin","user":{"login":"u"}}`) - }) - - rpl, _, err := client.Repositories.GetPermissionLevel(context.Background(), "o", "r", "u") - if err != nil { - t.Errorf("Repositories.GetPermissionLevel returned error: %v", err) - } - - want := &RepositoryPermissionLevel{ - Permission: String("admin"), - User: &User{ - Login: String("u"), - }, - } - - if !reflect.DeepEqual(rpl, want) { - t.Errorf("Repositories.GetPermissionLevel returned %+v, want %+v", rpl, want) - } -} - -func TestRepositoriesService_AddCollaborator(t *testing.T) { - setup() - defer teardown() - - opt := &RepositoryAddCollaboratorOptions{Permission: "admin"} - - mux.HandleFunc("/repos/o/r/collaborators/u", func(w http.ResponseWriter, r *http.Request) { - v := new(RepositoryAddCollaboratorOptions) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - if !reflect.DeepEqual(v, opt) { - t.Errorf("Request body = %+v, want %+v", v, opt) - } - - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Repositories.AddCollaborator(context.Background(), "o", "r", "u", opt) - if err != nil { - t.Errorf("Repositories.AddCollaborator returned error: %v", err) - } -} - -func TestRepositoriesService_AddCollaborator_invalidUser(t *testing.T) { - _, err := client.Repositories.AddCollaborator(context.Background(), "%", "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_RemoveCollaborator(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/collaborators/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Repositories.RemoveCollaborator(context.Background(), "o", "r", "u") - if err != nil { - t.Errorf("Repositories.RemoveCollaborator returned error: %v", err) - } -} - -func TestRepositoriesService_RemoveCollaborator_invalidUser(t *testing.T) { - _, err := client.Repositories.RemoveCollaborator(context.Background(), "%", "%", "%") - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/repos_comments.go b/vendor/github.com/google/go-github/github/repos_comments.go index 4830ee220..fa2377d40 100644 --- a/vendor/github.com/google/go-github/github/repos_comments.go +++ b/vendor/github.com/google/go-github/github/repos_comments.go @@ -15,7 +15,7 @@ import ( type RepositoryComment struct { HTMLURL *string `json:"html_url,omitempty"` URL *string `json:"url,omitempty"` - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` CommitID *string `json:"commit_id,omitempty"` User *User `json:"user,omitempty"` Reactions *Reactions `json:"reactions,omitempty"` @@ -110,7 +110,7 @@ func (s *RepositoriesService) CreateComment(ctx context.Context, owner, repo, sh // GetComment gets a single comment from a repository. // // GitHub API docs: https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment -func (s *RepositoriesService) GetComment(ctx context.Context, owner, repo string, id int) (*RepositoryComment, *Response, error) { +func (s *RepositoriesService) GetComment(ctx context.Context, owner, repo string, id int64) (*RepositoryComment, *Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -132,7 +132,7 @@ func (s *RepositoriesService) GetComment(ctx context.Context, owner, repo string // UpdateComment updates the body of a single comment. // // GitHub API docs: https://developer.github.com/v3/repos/comments/#update-a-commit-comment -func (s *RepositoriesService) UpdateComment(ctx context.Context, owner, repo string, id int, comment *RepositoryComment) (*RepositoryComment, *Response, error) { +func (s *RepositoriesService) UpdateComment(ctx context.Context, owner, repo string, id int64, comment *RepositoryComment) (*RepositoryComment, *Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id) req, err := s.client.NewRequest("PATCH", u, comment) if err != nil { @@ -151,7 +151,7 @@ func (s *RepositoriesService) UpdateComment(ctx context.Context, owner, repo str // DeleteComment deletes a single comment from a repository. // // GitHub API docs: https://developer.github.com/v3/repos/comments/#delete-a-commit-comment -func (s *RepositoriesService) DeleteComment(ctx context.Context, owner, repo string, id int) (*Response, error) { +func (s *RepositoriesService) DeleteComment(ctx context.Context, owner, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/repos_comments_test.go b/vendor/github.com/google/go-github/github/repos_comments_test.go deleted file mode 100644 index 249a37a36..000000000 --- a/vendor/github.com/google/go-github/github/repos_comments_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListComments(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - comments, _, err := client.Repositories.ListComments(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListComments returned error: %v", err) - } - - want := []*RepositoryComment{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(comments, want) { - t.Errorf("Repositories.ListComments returned %+v, want %+v", comments, want) - } -} - -func TestRepositoriesService_ListComments_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListComments(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_ListCommitComments(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/commits/s/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - comments, _, err := client.Repositories.ListCommitComments(context.Background(), "o", "r", "s", opt) - if err != nil { - t.Errorf("Repositories.ListCommitComments returned error: %v", err) - } - - want := []*RepositoryComment{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(comments, want) { - t.Errorf("Repositories.ListCommitComments returned %+v, want %+v", comments, want) - } -} - -func TestRepositoriesService_ListCommitComments_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListCommitComments(context.Background(), "%", "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_CreateComment(t *testing.T) { - setup() - defer teardown() - - input := &RepositoryComment{Body: String("b")} - - mux.HandleFunc("/repos/o/r/commits/s/comments", func(w http.ResponseWriter, r *http.Request) { - v := new(RepositoryComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Repositories.CreateComment(context.Background(), "o", "r", "s", input) - if err != nil { - t.Errorf("Repositories.CreateComment returned error: %v", err) - } - - want := &RepositoryComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Repositories.CreateComment returned %+v, want %+v", comment, want) - } -} - -func TestRepositoriesService_CreateComment_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.CreateComment(context.Background(), "%", "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_GetComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/comments/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Repositories.GetComment(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.GetComment returned error: %v", err) - } - - want := &RepositoryComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Repositories.GetComment returned %+v, want %+v", comment, want) - } -} - -func TestRepositoriesService_GetComment_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.GetComment(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} - -func TestRepositoriesService_UpdateComment(t *testing.T) { - setup() - defer teardown() - - input := &RepositoryComment{Body: String("b")} - - mux.HandleFunc("/repos/o/r/comments/1", func(w http.ResponseWriter, r *http.Request) { - v := new(RepositoryComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Repositories.UpdateComment(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Repositories.UpdateComment returned error: %v", err) - } - - want := &RepositoryComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Repositories.UpdateComment returned %+v, want %+v", comment, want) - } -} - -func TestRepositoriesService_UpdateComment_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.UpdateComment(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_DeleteComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/comments/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Repositories.DeleteComment(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DeleteComment returned error: %v", err) - } -} - -func TestRepositoriesService_DeleteComment_invalidOwner(t *testing.T) { - _, err := client.Repositories.DeleteComment(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/repos_commits.go b/vendor/github.com/google/go-github/github/repos_commits.go index 048473734..04faa3ea9 100644 --- a/vendor/github.com/google/go-github/github/repos_commits.go +++ b/vendor/github.com/google/go-github/github/repos_commits.go @@ -218,7 +218,7 @@ func (s *RepositoriesService) GetCommitSHA1(ctx context.Context, owner, repo, re // CompareCommits compares a range of commits with each other. // todo: support media formats - https://github.com/google/go-github/issues/6 // -// GitHub API docs: https://developer.github.com/v3/repos/commits/index.html#compare-two-commits +// GitHub API docs: https://developer.github.com/v3/repos/commits/#compare-two-commits func (s *RepositoriesService) CompareCommits(ctx context.Context, owner, repo string, base, head string) (*CommitsComparison, *Response, error) { u := fmt.Sprintf("repos/%v/%v/compare/%v...%v", owner, repo, base, head) diff --git a/vendor/github.com/google/go-github/github/repos_commits_test.go b/vendor/github.com/google/go-github/github/repos_commits_test.go deleted file mode 100644 index 1d5f5ec93..000000000 --- a/vendor/github.com/google/go-github/github/repos_commits_test.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "strings" - "testing" - "time" -) - -func TestRepositoriesService_ListCommits(t *testing.T) { - setup() - defer teardown() - - // given - mux.HandleFunc("/repos/o/r/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - testFormValues(t, r, - values{ - "sha": "s", - "path": "p", - "author": "a", - "since": "2013-08-01T00:00:00Z", - "until": "2013-09-03T00:00:00Z", - }) - fmt.Fprintf(w, `[{"sha": "s"}]`) - }) - - opt := &CommitsListOptions{ - SHA: "s", - Path: "p", - Author: "a", - Since: time.Date(2013, time.August, 1, 0, 0, 0, 0, time.UTC), - Until: time.Date(2013, time.September, 3, 0, 0, 0, 0, time.UTC), - } - commits, _, err := client.Repositories.ListCommits(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListCommits returned error: %v", err) - } - - want := []*RepositoryCommit{{SHA: String("s")}} - if !reflect.DeepEqual(commits, want) { - t.Errorf("Repositories.ListCommits returned %+v, want %+v", commits, want) - } -} - -func TestRepositoriesService_GetCommit(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/commits/s", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - fmt.Fprintf(w, `{ - "sha": "s", - "commit": { "message": "m" }, - "author": { "login": "l" }, - "committer": { "login": "l" }, - "parents": [ { "sha": "s" } ], - "stats": { "additions": 104, "deletions": 4, "total": 108 }, - "files": [ - { - "filename": "f", - "additions": 10, - "deletions": 2, - "changes": 12, - "status": "s", - "patch": "p", - "blob_url": "b", - "raw_url": "r", - "contents_url": "c" - } - ] - }`) - }) - - commit, _, err := client.Repositories.GetCommit(context.Background(), "o", "r", "s") - if err != nil { - t.Errorf("Repositories.GetCommit returned error: %v", err) - } - - want := &RepositoryCommit{ - SHA: String("s"), - Commit: &Commit{ - Message: String("m"), - }, - Author: &User{ - Login: String("l"), - }, - Committer: &User{ - Login: String("l"), - }, - Parents: []Commit{ - { - SHA: String("s"), - }, - }, - Stats: &CommitStats{ - Additions: Int(104), - Deletions: Int(4), - Total: Int(108), - }, - Files: []CommitFile{ - { - Filename: String("f"), - Additions: Int(10), - Deletions: Int(2), - Changes: Int(12), - Status: String("s"), - Patch: String("p"), - BlobURL: String("b"), - RawURL: String("r"), - ContentsURL: String("c"), - }, - }, - } - if !reflect.DeepEqual(commit, want) { - t.Errorf("Repositories.GetCommit returned \n%+v, want \n%+v", commit, want) - } -} - -func TestRepositoriesService_GetCommitRaw_diff(t *testing.T) { - setup() - defer teardown() - - const rawStr = "@@diff content" - - mux.HandleFunc("/repos/o/r/commits/s", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeV3Diff) - fmt.Fprint(w, rawStr) - }) - - got, _, err := client.Repositories.GetCommitRaw(context.Background(), "o", "r", "s", RawOptions{Type: Diff}) - if err != nil { - t.Fatalf("Repositories.GetCommitRaw returned error: %v", err) - } - want := rawStr - if got != want { - t.Errorf("Repositories.GetCommitRaw returned %s want %s", got, want) - } -} - -func TestRepositoriesService_GetCommitRaw_patch(t *testing.T) { - setup() - defer teardown() - - const rawStr = "@@patch content" - - mux.HandleFunc("/repos/o/r/commits/s", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeV3Patch) - fmt.Fprint(w, rawStr) - }) - - got, _, err := client.Repositories.GetCommitRaw(context.Background(), "o", "r", "s", RawOptions{Type: Patch}) - if err != nil { - t.Fatalf("Repositories.GetCommitRaw returned error: %v", err) - } - want := rawStr - if got != want { - t.Errorf("Repositories.GetCommitRaw returned %s want %s", got, want) - } -} - -func TestRepositoriesService_GetCommitRaw_invalid(t *testing.T) { - setup() - defer teardown() - - _, _, err := client.Repositories.GetCommitRaw(context.Background(), "o", "r", "s", RawOptions{100}) - if err == nil { - t.Fatal("Repositories.GetCommitRaw should return error") - } - if !strings.Contains(err.Error(), "unsupported raw type") { - t.Error("Repositories.GetCommitRaw should return unsupported raw type error") - } -} - -func TestRepositoriesService_GetCommitSHA1(t *testing.T) { - setup() - defer teardown() - const sha1 = "01234abcde" - - mux.HandleFunc("/repos/o/r/commits/master", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeV3SHA) - - fmt.Fprintf(w, sha1) - }) - - got, _, err := client.Repositories.GetCommitSHA1(context.Background(), "o", "r", "master", "") - if err != nil { - t.Errorf("Repositories.GetCommitSHA1 returned error: %v", err) - } - - want := sha1 - if got != want { - t.Errorf("Repositories.GetCommitSHA1 = %v, want %v", got, want) - } - - mux.HandleFunc("/repos/o/r/commits/tag", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeV3SHA) - testHeader(t, r, "If-None-Match", `"`+sha1+`"`) - - w.WriteHeader(http.StatusNotModified) - }) - - got, _, err = client.Repositories.GetCommitSHA1(context.Background(), "o", "r", "tag", sha1) - if err == nil { - t.Errorf("Expected HTTP 304 response") - } - - want = "" - if got != want { - t.Errorf("Repositories.GetCommitSHA1 = %v, want %v", got, want) - } -} - -func TestRepositoriesService_CompareCommits(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/compare/b...h", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprintf(w, `{ - "base_commit": { - "sha": "s", - "commit": { - "author": { "name": "n" }, - "committer": { "name": "n" }, - "message": "m", - "tree": { "sha": "t" } - }, - "author": { "login": "l" }, - "committer": { "login": "l" }, - "parents": [ { "sha": "s" } ] - }, - "status": "s", - "ahead_by": 1, - "behind_by": 2, - "total_commits": 1, - "commits": [ - { - "sha": "s", - "commit": { "author": { "name": "n" } }, - "author": { "login": "l" }, - "committer": { "login": "l" }, - "parents": [ { "sha": "s" } ] - } - ], - "files": [ { "filename": "f" } ], - "html_url": "https://github.com/o/r/compare/b...h", - "permalink_url": "https://github.com/o/r/compare/o:bbcd538c8e72b8c175046e27cc8f907076331401...o:0328041d1152db8ae77652d1618a02e57f745f17", - "diff_url": "https://github.com/o/r/compare/b...h.diff", - "patch_url": "https://github.com/o/r/compare/b...h.patch", - "url": "https://api.github.com/repos/o/r/compare/b...h" - }`) - }) - - got, _, err := client.Repositories.CompareCommits(context.Background(), "o", "r", "b", "h") - if err != nil { - t.Errorf("Repositories.CompareCommits returned error: %v", err) - } - - want := &CommitsComparison{ - BaseCommit: &RepositoryCommit{ - SHA: String("s"), - Commit: &Commit{ - Author: &CommitAuthor{Name: String("n")}, - Committer: &CommitAuthor{Name: String("n")}, - Message: String("m"), - Tree: &Tree{SHA: String("t")}, - }, - Author: &User{Login: String("l")}, - Committer: &User{Login: String("l")}, - Parents: []Commit{ - { - SHA: String("s"), - }, - }, - }, - Status: String("s"), - AheadBy: Int(1), - BehindBy: Int(2), - TotalCommits: Int(1), - Commits: []RepositoryCommit{ - { - SHA: String("s"), - Commit: &Commit{ - Author: &CommitAuthor{Name: String("n")}, - }, - Author: &User{Login: String("l")}, - Committer: &User{Login: String("l")}, - Parents: []Commit{ - { - SHA: String("s"), - }, - }, - }, - }, - Files: []CommitFile{ - { - Filename: String("f"), - }, - }, - HTMLURL: String("https://github.com/o/r/compare/b...h"), - PermalinkURL: String("https://github.com/o/r/compare/o:bbcd538c8e72b8c175046e27cc8f907076331401...o:0328041d1152db8ae77652d1618a02e57f745f17"), - DiffURL: String("https://github.com/o/r/compare/b...h.diff"), - PatchURL: String("https://github.com/o/r/compare/b...h.patch"), - URL: String("https://api.github.com/repos/o/r/compare/b...h"), - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.CompareCommits returned \n%+v, want \n%+v", got, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_community_health.go b/vendor/github.com/google/go-github/github/repos_community_health.go index b5c75d6f5..73d1d573b 100644 --- a/vendor/github.com/google/go-github/github/repos_community_health.go +++ b/vendor/github.com/google/go-github/github/repos_community_health.go @@ -21,10 +21,12 @@ type Metric struct { // CommunityHealthFiles represents the different files in the community health metrics response. type CommunityHealthFiles struct { - CodeOfConduct *Metric `json:"code_of_conduct"` - Contributing *Metric `json:"contributing"` - License *Metric `json:"license"` - Readme *Metric `json:"readme"` + CodeOfConduct *Metric `json:"code_of_conduct"` + Contributing *Metric `json:"contributing"` + IssueTemplate *Metric `json:"issue_template"` + PullRequestTemplate *Metric `json:"pull_request_template"` + License *Metric `json:"license"` + Readme *Metric `json:"readme"` } // CommunityHealthMetrics represents a response containing the community metrics of a repository. diff --git a/vendor/github.com/google/go-github/github/repos_community_health_test.go b/vendor/github.com/google/go-github/github/repos_community_health_test.go deleted file mode 100644 index a90c8c038..000000000 --- a/vendor/github.com/google/go-github/github/repos_community_health_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestRepositoriesService_GetCommunityHealthMetrics(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/community/profile", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeRepositoryCommunityHealthMetricsPreview) - fmt.Fprintf(w, `{ - "health_percentage": 100, - "files": { - "code_of_conduct": { - "name": "Contributor Covenant", - "key": "contributor_covenant", - "url": null, - "html_url": "https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md" - }, - "contributing": { - "url": "https://api.github.com/repos/octocat/Hello-World/contents/CONTRIBUTING", - "html_url": "https://github.com/octocat/Hello-World/blob/master/CONTRIBUTING" - }, - "license": { - "name": "MIT License", - "key": "mit", - "url": "https://api.github.com/licenses/mit", - "html_url": "https://github.com/octocat/Hello-World/blob/master/LICENSE" - }, - "readme": { - "url": "https://api.github.com/repos/octocat/Hello-World/contents/README.md", - "html_url": "https://github.com/octocat/Hello-World/blob/master/README.md" - } - }, - "updated_at": "2017-02-28T00:00:00Z" - }`) - }) - - got, _, err := client.Repositories.GetCommunityHealthMetrics(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.GetCommunityHealthMetrics returned error: %v", err) - } - - updatedAt := time.Date(2017, 02, 28, 0, 0, 0, 0, time.UTC) - want := &CommunityHealthMetrics{ - HealthPercentage: Int(100), - UpdatedAt: &updatedAt, - Files: &CommunityHealthFiles{ - CodeOfConduct: &Metric{ - Name: String("Contributor Covenant"), - Key: String("contributor_covenant"), - HTMLURL: String("https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md"), - }, - Contributing: &Metric{ - URL: String("https://api.github.com/repos/octocat/Hello-World/contents/CONTRIBUTING"), - HTMLURL: String("https://github.com/octocat/Hello-World/blob/master/CONTRIBUTING"), - }, - License: &Metric{ - Name: String("MIT License"), - Key: String("mit"), - URL: String("https://api.github.com/licenses/mit"), - HTMLURL: String("https://github.com/octocat/Hello-World/blob/master/LICENSE"), - }, - Readme: &Metric{ - URL: String("https://api.github.com/repos/octocat/Hello-World/contents/README.md"), - HTMLURL: String("https://github.com/octocat/Hello-World/blob/master/README.md"), - }, - }, - } - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.GetCommunityHealthMetrics:\ngot:\n%v\nwant:\n%v", Stringify(got), Stringify(want)) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_contents_test.go b/vendor/github.com/google/go-github/github/repos_contents_test.go deleted file mode 100644 index 770098e8c..000000000 --- a/vendor/github.com/google/go-github/github/repos_contents_test.go +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "io/ioutil" - "net/http" - "reflect" - "testing" -) - -func TestRepositoryContent_GetContent(t *testing.T) { - tests := []struct { - encoding, content *string // input encoding and content - want string // desired output - wantErr bool // whether an error is expected - }{ - { - encoding: String(""), - content: String("hello"), - want: "hello", - wantErr: false, - }, - { - encoding: nil, - content: String("hello"), - want: "hello", - wantErr: false, - }, - { - encoding: nil, - content: nil, - want: "", - wantErr: false, - }, - { - encoding: String("base64"), - content: String("aGVsbG8="), - want: "hello", - wantErr: false, - }, - { - encoding: String("bad"), - content: String("aGVsbG8="), - want: "", - wantErr: true, - }, - } - - for _, tt := range tests { - r := RepositoryContent{Encoding: tt.encoding, Content: tt.content} - got, err := r.GetContent() - if err != nil && !tt.wantErr { - t.Errorf("RepositoryContent(%q, %q) returned unexpected error: %v", tt.encoding, tt.content, err) - } - if err == nil && tt.wantErr { - t.Errorf("RepositoryContent(%q, %q) did not return unexpected error", tt.encoding, tt.content) - } - if want := tt.want; got != want { - t.Errorf("RepositoryContent.GetContent returned %+v, want %+v", got, want) - } - } -} - -func TestRepositoriesService_GetReadme(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/readme", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "size": 5362, - "name": "README.md", - "path": "README.md" - }`) - }) - readme, _, err := client.Repositories.GetReadme(context.Background(), "o", "r", &RepositoryContentGetOptions{}) - if err != nil { - t.Errorf("Repositories.GetReadme returned error: %v", err) - } - want := &RepositoryContent{Type: String("file"), Name: String("README.md"), Size: Int(5362), Encoding: String("base64"), Path: String("README.md")} - if !reflect.DeepEqual(readme, want) { - t.Errorf("Repositories.GetReadme returned %+v, want %+v", readme, want) - } -} - -func TestRepositoriesService_DownloadContents_Success(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/d", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{ - "type": "file", - "name": "f", - "download_url": "`+server.URL+baseURLPath+`/download/f" - }]`) - }) - mux.HandleFunc("/download/f", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, "foo") - }) - - r, err := client.Repositories.DownloadContents(context.Background(), "o", "r", "d/f", nil) - if err != nil { - t.Errorf("Repositories.DownloadContents returned error: %v", err) - } - - bytes, err := ioutil.ReadAll(r) - if err != nil { - t.Errorf("Error reading response body: %v", err) - } - r.Close() - - if got, want := string(bytes), "foo"; got != want { - t.Errorf("Repositories.DownloadContents returned %v, want %v", got, want) - } -} - -func TestRepositoriesService_DownloadContents_NoDownloadURL(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/d", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{ - "type": "file", - "name": "f", - }]`) - }) - - _, err := client.Repositories.DownloadContents(context.Background(), "o", "r", "d/f", nil) - if err == nil { - t.Errorf("Repositories.DownloadContents did not return expected error") - } -} - -func TestRepositoriesService_DownloadContents_NoFile(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/d", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[]`) - }) - - _, err := client.Repositories.DownloadContents(context.Background(), "o", "r", "d/f", nil) - if err == nil { - t.Errorf("Repositories.DownloadContents did not return expected error") - } -} - -func TestRepositoriesService_GetContents_File(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/p", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{ - "type": "file", - "encoding": "base64", - "size": 20678, - "name": "LICENSE", - "path": "LICENSE" - }`) - }) - fileContents, _, _, err := client.Repositories.GetContents(context.Background(), "o", "r", "p", &RepositoryContentGetOptions{}) - if err != nil { - t.Errorf("Repositories.GetContents returned error: %v", err) - } - want := &RepositoryContent{Type: String("file"), Name: String("LICENSE"), Size: Int(20678), Encoding: String("base64"), Path: String("LICENSE")} - if !reflect.DeepEqual(fileContents, want) { - t.Errorf("Repositories.GetContents returned %+v, want %+v", fileContents, want) - } -} - -func TestRepositoriesService_GetContents_FilenameNeedsEscape(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/p#?%/中.go", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{}`) - }) - _, _, _, err := client.Repositories.GetContents(context.Background(), "o", "r", "p#?%/中.go", &RepositoryContentGetOptions{}) - if err != nil { - t.Fatalf("Repositories.GetContents returned error: %v", err) - } -} - -func TestRepositoriesService_GetContents_DirectoryWithSpaces(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/some directory/file.go", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{}`) - }) - _, _, _, err := client.Repositories.GetContents(context.Background(), "o", "r", "some directory/file.go", &RepositoryContentGetOptions{}) - if err != nil { - t.Fatalf("Repositories.GetContents returned error: %v", err) - } -} - -func TestRepositoriesService_GetContents_DirectoryWithPlusChars(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/some directory+name/file.go", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{}`) - }) - _, _, _, err := client.Repositories.GetContents(context.Background(), "o", "r", "some directory+name/file.go", &RepositoryContentGetOptions{}) - if err != nil { - t.Fatalf("Repositories.GetContents returned error: %v", err) - } -} - -func TestRepositoriesService_GetContents_Directory(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/p", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{ - "type": "dir", - "name": "lib", - "path": "lib" - }, - { - "type": "file", - "size": 20678, - "name": "LICENSE", - "path": "LICENSE" - }]`) - }) - _, directoryContents, _, err := client.Repositories.GetContents(context.Background(), "o", "r", "p", &RepositoryContentGetOptions{}) - if err != nil { - t.Errorf("Repositories.GetContents returned error: %v", err) - } - want := []*RepositoryContent{{Type: String("dir"), Name: String("lib"), Path: String("lib")}, - {Type: String("file"), Name: String("LICENSE"), Size: Int(20678), Path: String("LICENSE")}} - if !reflect.DeepEqual(directoryContents, want) { - t.Errorf("Repositories.GetContents_Directory returned %+v, want %+v", directoryContents, want) - } -} - -func TestRepositoriesService_CreateFile(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/p", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - fmt.Fprint(w, `{ - "content":{ - "name":"p" - }, - "commit":{ - "message":"m", - "sha":"f5f369044773ff9c6383c087466d12adb6fa0828" - } - }`) - }) - message := "m" - content := []byte("c") - repositoryContentsOptions := &RepositoryContentFileOptions{ - Message: &message, - Content: content, - Committer: &CommitAuthor{Name: String("n"), Email: String("e")}, - } - createResponse, _, err := client.Repositories.CreateFile(context.Background(), "o", "r", "p", repositoryContentsOptions) - if err != nil { - t.Errorf("Repositories.CreateFile returned error: %v", err) - } - want := &RepositoryContentResponse{ - Content: &RepositoryContent{Name: String("p")}, - Commit: Commit{ - Message: String("m"), - SHA: String("f5f369044773ff9c6383c087466d12adb6fa0828"), - }, - } - if !reflect.DeepEqual(createResponse, want) { - t.Errorf("Repositories.CreateFile returned %+v, want %+v", createResponse, want) - } -} - -func TestRepositoriesService_UpdateFile(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/p", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - fmt.Fprint(w, `{ - "content":{ - "name":"p" - }, - "commit":{ - "message":"m", - "sha":"f5f369044773ff9c6383c087466d12adb6fa0828" - } - }`) - }) - message := "m" - content := []byte("c") - sha := "f5f369044773ff9c6383c087466d12adb6fa0828" - repositoryContentsOptions := &RepositoryContentFileOptions{ - Message: &message, - Content: content, - SHA: &sha, - Committer: &CommitAuthor{Name: String("n"), Email: String("e")}, - } - updateResponse, _, err := client.Repositories.UpdateFile(context.Background(), "o", "r", "p", repositoryContentsOptions) - if err != nil { - t.Errorf("Repositories.UpdateFile returned error: %v", err) - } - want := &RepositoryContentResponse{ - Content: &RepositoryContent{Name: String("p")}, - Commit: Commit{ - Message: String("m"), - SHA: String("f5f369044773ff9c6383c087466d12adb6fa0828"), - }, - } - if !reflect.DeepEqual(updateResponse, want) { - t.Errorf("Repositories.UpdateFile returned %+v, want %+v", updateResponse, want) - } -} - -func TestRepositoriesService_DeleteFile(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/contents/p", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - fmt.Fprint(w, `{ - "content": null, - "commit":{ - "message":"m", - "sha":"f5f369044773ff9c6383c087466d12adb6fa0828" - } - }`) - }) - message := "m" - sha := "f5f369044773ff9c6383c087466d12adb6fa0828" - repositoryContentsOptions := &RepositoryContentFileOptions{ - Message: &message, - SHA: &sha, - Committer: &CommitAuthor{Name: String("n"), Email: String("e")}, - } - deleteResponse, _, err := client.Repositories.DeleteFile(context.Background(), "o", "r", "p", repositoryContentsOptions) - if err != nil { - t.Errorf("Repositories.DeleteFile returned error: %v", err) - } - want := &RepositoryContentResponse{ - Content: nil, - Commit: Commit{ - Message: String("m"), - SHA: String("f5f369044773ff9c6383c087466d12adb6fa0828"), - }, - } - if !reflect.DeepEqual(deleteResponse, want) { - t.Errorf("Repositories.DeleteFile returned %+v, want %+v", deleteResponse, want) - } -} - -func TestRepositoriesService_GetArchiveLink(t *testing.T) { - setup() - defer teardown() - mux.HandleFunc("/repos/o/r/tarball", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Redirect(w, r, "http://github.com/a", http.StatusFound) - }) - url, resp, err := client.Repositories.GetArchiveLink(context.Background(), "o", "r", Tarball, &RepositoryContentGetOptions{}) - if err != nil { - t.Errorf("Repositories.GetArchiveLink returned error: %v", err) - } - if resp.StatusCode != http.StatusFound { - t.Errorf("Repositories.GetArchiveLink returned status: %d, want %d", resp.StatusCode, http.StatusFound) - } - want := "http://github.com/a" - if url.String() != want { - t.Errorf("Repositories.GetArchiveLink returned %+v, want %+v", url.String(), want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_deployments.go b/vendor/github.com/google/go-github/github/repos_deployments.go index ec0e84215..794c3232e 100644 --- a/vendor/github.com/google/go-github/github/repos_deployments.go +++ b/vendor/github.com/google/go-github/github/repos_deployments.go @@ -14,7 +14,7 @@ import ( // Deployment represents a deployment in a repo type Deployment struct { URL *string `json:"url,omitempty"` - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` SHA *string `json:"sha,omitempty"` Ref *string `json:"ref,omitempty"` Task *string `json:"task,omitempty"` @@ -26,6 +26,7 @@ type Deployment struct { UpdatedAt *Timestamp `json:"updated_at,omitempty"` StatusesURL *string `json:"statuses_url,omitempty"` RepositoryURL *string `json:"repository_url,omitempty"` + NodeID *string `json:"node_id,omitempty"` } // DeploymentRequest represents a deployment request @@ -86,7 +87,7 @@ func (s *RepositoriesService) ListDeployments(ctx context.Context, owner, repo s // GetDeployment returns a single deployment of a repository. // // GitHub API docs: https://developer.github.com/v3/repos/deployments/#get-a-single-deployment -func (s *RepositoriesService) GetDeployment(ctx context.Context, owner, repo string, deploymentID int) (*Deployment, *Response, error) { +func (s *RepositoriesService) GetDeployment(ctx context.Context, owner, repo string, deploymentID int64) (*Deployment, *Response, error) { u := fmt.Sprintf("repos/%v/%v/deployments/%v", owner, repo, deploymentID) req, err := s.client.NewRequest("GET", u, nil) @@ -114,7 +115,7 @@ func (s *RepositoriesService) CreateDeployment(ctx context.Context, owner, repo return nil, nil, err } - // TODO: remove custom Accept header when deployment support fully launches + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeDeploymentStatusPreview) d := new(Deployment) @@ -129,7 +130,7 @@ func (s *RepositoriesService) CreateDeployment(ctx context.Context, owner, repo // DeploymentStatus represents the status of a // particular deployment. type DeploymentStatus struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` // State is the deployment state. // Possible values are: "pending", "success", "failure", "error", "inactive". State *string `json:"state,omitempty"` @@ -140,6 +141,7 @@ type DeploymentStatus struct { UpdatedAt *Timestamp `json:"updated_at,omitempty"` DeploymentURL *string `json:"deployment_url,omitempty"` RepositoryURL *string `json:"repository_url,omitempty"` + NodeID *string `json:"node_id,omitempty"` } // DeploymentStatusRequest represents a deployment request @@ -154,7 +156,7 @@ type DeploymentStatusRequest struct { // ListDeploymentStatuses lists the statuses of a given deployment of a repository. // // GitHub API docs: https://developer.github.com/v3/repos/deployments/#list-deployment-statuses -func (s *RepositoriesService) ListDeploymentStatuses(ctx context.Context, owner, repo string, deployment int, opt *ListOptions) ([]*DeploymentStatus, *Response, error) { +func (s *RepositoriesService) ListDeploymentStatuses(ctx context.Context, owner, repo string, deployment int64, opt *ListOptions) ([]*DeploymentStatus, *Response, error) { u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses", owner, repo, deployment) u, err := addOptions(u, opt) if err != nil { @@ -178,7 +180,7 @@ func (s *RepositoriesService) ListDeploymentStatuses(ctx context.Context, owner, // GetDeploymentStatus returns a single deployment status of a repository. // // GitHub API docs: https://developer.github.com/v3/repos/deployments/#get-a-single-deployment-status -func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, repo string, deploymentID, deploymentStatusID int) (*DeploymentStatus, *Response, error) { +func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, repo string, deploymentID, deploymentStatusID int64) (*DeploymentStatus, *Response, error) { u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses/%v", owner, repo, deploymentID, deploymentStatusID) req, err := s.client.NewRequest("GET", u, nil) @@ -186,7 +188,7 @@ func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, re return nil, nil, err } - // TODO: remove custom Accept header when deployment support fully launches + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeDeploymentStatusPreview) d := new(DeploymentStatus) @@ -201,7 +203,7 @@ func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, re // CreateDeploymentStatus creates a new status for a deployment. // // GitHub API docs: https://developer.github.com/v3/repos/deployments/#create-a-deployment-status -func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner, repo string, deployment int, request *DeploymentStatusRequest) (*DeploymentStatus, *Response, error) { +func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner, repo string, deployment int64, request *DeploymentStatusRequest) (*DeploymentStatus, *Response, error) { u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses", owner, repo, deployment) req, err := s.client.NewRequest("POST", u, request) @@ -209,7 +211,7 @@ func (s *RepositoriesService) CreateDeploymentStatus(ctx context.Context, owner, return nil, nil, err } - // TODO: remove custom Accept header when deployment support fully launches + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeDeploymentStatusPreview) d := new(DeploymentStatus) diff --git a/vendor/github.com/google/go-github/github/repos_deployments_test.go b/vendor/github.com/google/go-github/github/repos_deployments_test.go deleted file mode 100644 index 9fa44b2ba..000000000 --- a/vendor/github.com/google/go-github/github/repos_deployments_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListDeployments(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/deployments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"environment": "test"}) - fmt.Fprint(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &DeploymentsListOptions{Environment: "test"} - deployments, _, err := client.Repositories.ListDeployments(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListDeployments returned error: %v", err) - } - - want := []*Deployment{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(deployments, want) { - t.Errorf("Repositories.ListDeployments returned %+v, want %+v", deployments, want) - } -} - -func TestRepositoriesService_GetDeployment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/deployments/3", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":3}`) - }) - - deployment, _, err := client.Repositories.GetDeployment(context.Background(), "o", "r", 3) - if err != nil { - t.Errorf("Repositories.GetDeployment returned error: %v", err) - } - - want := &Deployment{ID: Int(3)} - - if !reflect.DeepEqual(deployment, want) { - t.Errorf("Repositories.GetDeployment returned %+v, want %+v", deployment, want) - } -} - -func TestRepositoriesService_CreateDeployment(t *testing.T) { - setup() - defer teardown() - - input := &DeploymentRequest{Ref: String("1111"), Task: String("deploy"), TransientEnvironment: Bool(true)} - - mux.HandleFunc("/repos/o/r/deployments", func(w http.ResponseWriter, r *http.Request) { - v := new(DeploymentRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeDeploymentStatusPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ref": "1111", "task": "deploy"}`) - }) - - deployment, _, err := client.Repositories.CreateDeployment(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.CreateDeployment returned error: %v", err) - } - - want := &Deployment{Ref: String("1111"), Task: String("deploy")} - if !reflect.DeepEqual(deployment, want) { - t.Errorf("Repositories.CreateDeployment returned %+v, want %+v", deployment, want) - } -} - -func TestRepositoriesService_ListDeploymentStatuses(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/deployments/1/statuses", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - statutses, _, err := client.Repositories.ListDeploymentStatuses(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("Repositories.ListDeploymentStatuses returned error: %v", err) - } - - want := []*DeploymentStatus{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(statutses, want) { - t.Errorf("Repositories.ListDeploymentStatuses returned %+v, want %+v", statutses, want) - } -} - -func TestRepositoriesService_GetDeploymentStatus(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/deployments/3/statuses/4", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeDeploymentStatusPreview) - fmt.Fprint(w, `{"id":4}`) - }) - - deploymentStatus, _, err := client.Repositories.GetDeploymentStatus(context.Background(), "o", "r", 3, 4) - if err != nil { - t.Errorf("Repositories.GetDeploymentStatus returned error: %v", err) - } - - want := &DeploymentStatus{ID: Int(4)} - if !reflect.DeepEqual(deploymentStatus, want) { - t.Errorf("Repositories.GetDeploymentStatus returned %+v, want %+v", deploymentStatus, want) - } -} - -func TestRepositoriesService_CreateDeploymentStatus(t *testing.T) { - setup() - defer teardown() - - input := &DeploymentStatusRequest{State: String("inactive"), Description: String("deploy"), AutoInactive: Bool(false)} - - mux.HandleFunc("/repos/o/r/deployments/1/statuses", func(w http.ResponseWriter, r *http.Request) { - v := new(DeploymentStatusRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeDeploymentStatusPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"state": "inactive", "description": "deploy"}`) - }) - - deploymentStatus, _, err := client.Repositories.CreateDeploymentStatus(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Repositories.CreateDeploymentStatus returned error: %v", err) - } - - want := &DeploymentStatus{State: String("inactive"), Description: String("deploy")} - if !reflect.DeepEqual(deploymentStatus, want) { - t.Errorf("Repositories.CreateDeploymentStatus returned %+v, want %+v", deploymentStatus, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_forks.go b/vendor/github.com/google/go-github/github/repos_forks.go index 4ca19a42d..d0bff5447 100644 --- a/vendor/github.com/google/go-github/github/repos_forks.go +++ b/vendor/github.com/google/go-github/github/repos_forks.go @@ -58,7 +58,8 @@ type RepositoryCreateForkOptions struct { // // This method might return an *AcceptedError and a status code of // 202. This is because this is the status that GitHub returns to signify that -// it is now computing creating the fork in a background task. +// it is now computing creating the fork in a background task. In this event, +// the Repository value will be returned, which includes the details about the pending fork. // A follow up request, after a delay of a second or so, should result // in a successful request. // @@ -77,6 +78,9 @@ func (s *RepositoriesService) CreateFork(ctx context.Context, owner, repo string fork := new(Repository) resp, err := s.client.Do(ctx, req, fork) + if _, ok := err.(*AcceptedError); ok { + return fork, resp, err + } if err != nil { return nil, resp, err } diff --git a/vendor/github.com/google/go-github/github/repos_forks_test.go b/vendor/github.com/google/go-github/github/repos_forks_test.go deleted file mode 100644 index f9cf1e3a3..000000000 --- a/vendor/github.com/google/go-github/github/repos_forks_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListForks(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/forks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeTopicsPreview) - testFormValues(t, r, values{ - "sort": "newest", - "page": "3", - }) - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - opt := &RepositoryListForksOptions{ - Sort: "newest", - ListOptions: ListOptions{Page: 3}, - } - repos, _, err := client.Repositories.ListForks(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListForks returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Repositories.ListForks returned %+v, want %+v", repos, want) - } -} - -func TestRepositoriesService_ListForks_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListForks(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_CreateFork(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/forks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testFormValues(t, r, values{"organization": "o"}) - fmt.Fprint(w, `{"id":1}`) - }) - - opt := &RepositoryCreateForkOptions{Organization: "o"} - repo, _, err := client.Repositories.CreateFork(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.CreateFork returned error: %v", err) - } - - want := &Repository{ID: Int(1)} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Repositories.CreateFork returned %+v, want %+v", repo, want) - } -} - -func TestRepositoriesService_CreateFork_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.CreateFork(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/repos_hooks.go b/vendor/github.com/google/go-github/github/repos_hooks.go index 67ce96ac3..564f5e576 100644 --- a/vendor/github.com/google/go-github/github/repos_hooks.go +++ b/vendor/github.com/google/go-github/github/repos_hooks.go @@ -69,27 +69,55 @@ func (w WebHookAuthor) String() string { // Hook represents a GitHub (web and service) hook for a repository. type Hook struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - Events []string `json:"events,omitempty"` - Active *bool `json:"active,omitempty"` - Config map[string]interface{} `json:"config,omitempty"` - ID *int `json:"id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + URL *string `json:"url,omitempty"` + ID *int64 `json:"id,omitempty"` + + // Only the following fields are used when creating a hook. + // Name and Config are required. + Name *string `json:"name,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Events []string `json:"events,omitempty"` + Active *bool `json:"active,omitempty"` } func (h Hook) String() string { return Stringify(h) } +// createHookRequest is a subset of Hook and is used internally +// by CreateHook to pass only the known fields for the endpoint. +// +// See https://github.com/google/go-github/issues/1015 for more +// information. +type createHookRequest struct { + // Name and Config are required. + // Name must be passed as "web". + Name *string `json:"name,omitempty"` + Config map[string]interface{} `json:"config,omitempty"` + Events []string `json:"events,omitempty"` + Active *bool `json:"active,omitempty"` +} + // CreateHook creates a Hook for the specified repository. // Name and Config are required fields. // +// Note that only a subset of the hook fields are used and hook must +// not be nil. +// // GitHub API docs: https://developer.github.com/v3/repos/hooks/#create-a-hook func (s *RepositoriesService) CreateHook(ctx context.Context, owner, repo string, hook *Hook) (*Hook, *Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo) - req, err := s.client.NewRequest("POST", u, hook) + + hookReq := &createHookRequest{ + Name: hook.Name, + Events: hook.Events, + Active: hook.Active, + Config: hook.Config, + } + + req, err := s.client.NewRequest("POST", u, hookReq) if err != nil { return nil, nil, err } @@ -130,21 +158,25 @@ func (s *RepositoriesService) ListHooks(ctx context.Context, owner, repo string, // GetHook returns a single specified Hook. // // GitHub API docs: https://developer.github.com/v3/repos/hooks/#get-single-hook -func (s *RepositoriesService) GetHook(ctx context.Context, owner, repo string, id int) (*Hook, *Response, error) { +func (s *RepositoriesService) GetHook(ctx context.Context, owner, repo string, id int64) (*Hook, *Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err } - hook := new(Hook) - resp, err := s.client.Do(ctx, req, hook) - return hook, resp, err + h := new(Hook) + resp, err := s.client.Do(ctx, req, h) + if err != nil { + return nil, resp, err + } + + return h, resp, nil } // EditHook updates a specified Hook. // // GitHub API docs: https://developer.github.com/v3/repos/hooks/#edit-a-hook -func (s *RepositoriesService) EditHook(ctx context.Context, owner, repo string, id int, hook *Hook) (*Hook, *Response, error) { +func (s *RepositoriesService) EditHook(ctx context.Context, owner, repo string, id int64, hook *Hook) (*Hook, *Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id) req, err := s.client.NewRequest("PATCH", u, hook) if err != nil { @@ -152,13 +184,17 @@ func (s *RepositoriesService) EditHook(ctx context.Context, owner, repo string, } h := new(Hook) resp, err := s.client.Do(ctx, req, h) - return h, resp, err + if err != nil { + return nil, resp, err + } + + return h, resp, nil } // DeleteHook deletes a specified Hook. // // GitHub API docs: https://developer.github.com/v3/repos/hooks/#delete-a-hook -func (s *RepositoriesService) DeleteHook(ctx context.Context, owner, repo string, id int) (*Response, error) { +func (s *RepositoriesService) DeleteHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -170,7 +206,7 @@ func (s *RepositoriesService) DeleteHook(ctx context.Context, owner, repo string // PingHook triggers a 'ping' event to be sent to the Hook. // // GitHub API docs: https://developer.github.com/v3/repos/hooks/#ping-a-hook -func (s *RepositoriesService) PingHook(ctx context.Context, owner, repo string, id int) (*Response, error) { +func (s *RepositoriesService) PingHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks/%d/pings", owner, repo, id) req, err := s.client.NewRequest("POST", u, nil) if err != nil { @@ -182,7 +218,7 @@ func (s *RepositoriesService) PingHook(ctx context.Context, owner, repo string, // TestHook triggers a test Hook by github. // // GitHub API docs: https://developer.github.com/v3/repos/hooks/#test-a-push-hook -func (s *RepositoriesService) TestHook(ctx context.Context, owner, repo string, id int) (*Response, error) { +func (s *RepositoriesService) TestHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/hooks/%d/tests", owner, repo, id) req, err := s.client.NewRequest("POST", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/repos_hooks_test.go b/vendor/github.com/google/go-github/github/repos_hooks_test.go deleted file mode 100644 index 364f4583f..000000000 --- a/vendor/github.com/google/go-github/github/repos_hooks_test.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_CreateHook(t *testing.T) { - setup() - defer teardown() - - input := &Hook{Name: String("t")} - - mux.HandleFunc("/repos/o/r/hooks", func(w http.ResponseWriter, r *http.Request) { - v := new(Hook) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - hook, _, err := client.Repositories.CreateHook(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.CreateHook returned error: %v", err) - } - - want := &Hook{ID: Int(1)} - if !reflect.DeepEqual(hook, want) { - t.Errorf("Repositories.CreateHook returned %+v, want %+v", hook, want) - } -} - -func TestRepositoriesService_CreateHook_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.CreateHook(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_ListHooks(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/hooks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - - hooks, _, err := client.Repositories.ListHooks(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListHooks returned error: %v", err) - } - - want := []*Hook{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(hooks, want) { - t.Errorf("Repositories.ListHooks returned %+v, want %+v", hooks, want) - } -} - -func TestRepositoriesService_ListHooks_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListHooks(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_GetHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/hooks/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - hook, _, err := client.Repositories.GetHook(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.GetHook returned error: %v", err) - } - - want := &Hook{ID: Int(1)} - if !reflect.DeepEqual(hook, want) { - t.Errorf("Repositories.GetHook returned %+v, want %+v", hook, want) - } -} - -func TestRepositoriesService_GetHook_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.GetHook(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} - -func TestRepositoriesService_EditHook(t *testing.T) { - setup() - defer teardown() - - input := &Hook{Name: String("t")} - - mux.HandleFunc("/repos/o/r/hooks/1", func(w http.ResponseWriter, r *http.Request) { - v := new(Hook) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - hook, _, err := client.Repositories.EditHook(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Repositories.EditHook returned error: %v", err) - } - - want := &Hook{ID: Int(1)} - if !reflect.DeepEqual(hook, want) { - t.Errorf("Repositories.EditHook returned %+v, want %+v", hook, want) - } -} - -func TestRepositoriesService_EditHook_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.EditHook(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_DeleteHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/hooks/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Repositories.DeleteHook(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DeleteHook returned error: %v", err) - } -} - -func TestRepositoriesService_DeleteHook_invalidOwner(t *testing.T) { - _, err := client.Repositories.DeleteHook(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} - -func TestRepositoriesService_PingHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/hooks/1/pings", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - }) - - _, err := client.Repositories.PingHook(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.PingHook returned error: %v", err) - } -} - -func TestRepositoriesService_TestHook(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/hooks/1/tests", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - }) - - _, err := client.Repositories.TestHook(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.TestHook returned error: %v", err) - } -} - -func TestRepositoriesService_TestHook_invalidOwner(t *testing.T) { - _, err := client.Repositories.TestHook(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/repos_invitations.go b/vendor/github.com/google/go-github/github/repos_invitations.go index 0a2b7c198..34bf3830f 100644 --- a/vendor/github.com/google/go-github/github/repos_invitations.go +++ b/vendor/github.com/google/go-github/github/repos_invitations.go @@ -12,7 +12,7 @@ import ( // RepositoryInvitation represents an invitation to collaborate on a repo. type RepositoryInvitation struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Repo *Repository `json:"repository,omitempty"` Invitee *User `json:"invitee,omitempty"` Inviter *User `json:"inviter,omitempty"` @@ -55,7 +55,7 @@ func (s *RepositoriesService) ListInvitations(ctx context.Context, owner, repo s // DeleteInvitation deletes a repository invitation. // // GitHub API docs: https://developer.github.com/v3/repos/invitations/#delete-a-repository-invitation -func (s *RepositoriesService) DeleteInvitation(ctx context.Context, owner, repo string, invitationID int) (*Response, error) { +func (s *RepositoriesService) DeleteInvitation(ctx context.Context, owner, repo string, invitationID int64) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/invitations/%v", owner, repo, invitationID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -75,7 +75,7 @@ func (s *RepositoriesService) DeleteInvitation(ctx context.Context, owner, repo // on the repository. Possible values are: "read", "write", "admin". // // GitHub API docs: https://developer.github.com/v3/repos/invitations/#update-a-repository-invitation -func (s *RepositoriesService) UpdateInvitation(ctx context.Context, owner, repo string, invitationID int, permissions string) (*RepositoryInvitation, *Response, error) { +func (s *RepositoriesService) UpdateInvitation(ctx context.Context, owner, repo string, invitationID int64, permissions string) (*RepositoryInvitation, *Response, error) { opts := &struct { Permissions string `json:"permissions"` }{Permissions: permissions} diff --git a/vendor/github.com/google/go-github/github/repos_invitations_test.go b/vendor/github.com/google/go-github/github/repos_invitations_test.go deleted file mode 100644 index 01ac66657..000000000 --- a/vendor/github.com/google/go-github/github/repos_invitations_test.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListInvitations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/invitations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprintf(w, `[{"id":1}, {"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - got, _, err := client.Repositories.ListInvitations(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListInvitations returned error: %v", err) - } - - want := []*RepositoryInvitation{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.ListInvitations = %+v, want %+v", got, want) - } -} - -func TestRepositoriesService_DeleteInvitation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/invitations/2", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Repositories.DeleteInvitation(context.Background(), "o", "r", 2) - if err != nil { - t.Errorf("Repositories.DeleteInvitation returned error: %v", err) - } -} - -func TestRepositoriesService_UpdateInvitation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/invitations/2", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - fmt.Fprintf(w, `{"id":1}`) - }) - - got, _, err := client.Repositories.UpdateInvitation(context.Background(), "o", "r", 2, "write") - if err != nil { - t.Errorf("Repositories.UpdateInvitation returned error: %v", err) - } - - want := &RepositoryInvitation{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.UpdateInvitation = %+v, want %+v", got, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_keys.go b/vendor/github.com/google/go-github/github/repos_keys.go index f5a865813..b484f8444 100644 --- a/vendor/github.com/google/go-github/github/repos_keys.go +++ b/vendor/github.com/google/go-github/github/repos_keys.go @@ -39,7 +39,7 @@ func (s *RepositoriesService) ListKeys(ctx context.Context, owner string, repo s // GetKey fetches a single deploy key. // // GitHub API docs: https://developer.github.com/v3/repos/keys/#get -func (s *RepositoriesService) GetKey(ctx context.Context, owner string, repo string, id int) (*Key, *Response, error) { +func (s *RepositoriesService) GetKey(ctx context.Context, owner string, repo string, id int64) (*Key, *Response, error) { u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) @@ -79,7 +79,7 @@ func (s *RepositoriesService) CreateKey(ctx context.Context, owner string, repo // EditKey edits a deploy key. // // GitHub API docs: https://developer.github.com/v3/repos/keys/#edit -func (s *RepositoriesService) EditKey(ctx context.Context, owner string, repo string, id int, key *Key) (*Key, *Response, error) { +func (s *RepositoriesService) EditKey(ctx context.Context, owner string, repo string, id int64, key *Key) (*Key, *Response, error) { u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id) req, err := s.client.NewRequest("PATCH", u, key) @@ -99,7 +99,7 @@ func (s *RepositoriesService) EditKey(ctx context.Context, owner string, repo st // DeleteKey deletes a deploy key. // // GitHub API docs: https://developer.github.com/v3/repos/keys/#delete -func (s *RepositoriesService) DeleteKey(ctx context.Context, owner string, repo string, id int) (*Response, error) { +func (s *RepositoriesService) DeleteKey(ctx context.Context, owner string, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id) req, err := s.client.NewRequest("DELETE", u, nil) diff --git a/vendor/github.com/google/go-github/github/repos_keys_test.go b/vendor/github.com/google/go-github/github/repos_keys_test.go deleted file mode 100644 index 2ef04fdcb..000000000 --- a/vendor/github.com/google/go-github/github/repos_keys_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListKeys(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/keys", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - keys, _, err := client.Repositories.ListKeys(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListKeys returned error: %v", err) - } - - want := []*Key{{ID: Int(1)}} - if !reflect.DeepEqual(keys, want) { - t.Errorf("Repositories.ListKeys returned %+v, want %+v", keys, want) - } -} - -func TestRepositoriesService_ListKeys_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListKeys(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_GetKey(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/keys/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - key, _, err := client.Repositories.GetKey(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.GetKey returned error: %v", err) - } - - want := &Key{ID: Int(1)} - if !reflect.DeepEqual(key, want) { - t.Errorf("Repositories.GetKey returned %+v, want %+v", key, want) - } -} - -func TestRepositoriesService_GetKey_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.GetKey(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} - -func TestRepositoriesService_CreateKey(t *testing.T) { - setup() - defer teardown() - - input := &Key{Key: String("k"), Title: String("t")} - - mux.HandleFunc("/repos/o/r/keys", func(w http.ResponseWriter, r *http.Request) { - v := new(Key) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - key, _, err := client.Repositories.CreateKey(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.GetKey returned error: %v", err) - } - - want := &Key{ID: Int(1)} - if !reflect.DeepEqual(key, want) { - t.Errorf("Repositories.GetKey returned %+v, want %+v", key, want) - } -} - -func TestRepositoriesService_CreateKey_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.CreateKey(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_EditKey(t *testing.T) { - setup() - defer teardown() - - input := &Key{Key: String("k"), Title: String("t")} - - mux.HandleFunc("/repos/o/r/keys/1", func(w http.ResponseWriter, r *http.Request) { - v := new(Key) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - key, _, err := client.Repositories.EditKey(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Repositories.EditKey returned error: %v", err) - } - - want := &Key{ID: Int(1)} - if !reflect.DeepEqual(key, want) { - t.Errorf("Repositories.EditKey returned %+v, want %+v", key, want) - } -} - -func TestRepositoriesService_EditKey_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.EditKey(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_DeleteKey(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/keys/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Repositories.DeleteKey(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DeleteKey returned error: %v", err) - } -} - -func TestRepositoriesService_DeleteKey_invalidOwner(t *testing.T) { - _, err := client.Repositories.DeleteKey(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/repos_merging_test.go b/vendor/github.com/google/go-github/github/repos_merging_test.go deleted file mode 100644 index e2e264fd6..000000000 --- a/vendor/github.com/google/go-github/github/repos_merging_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_Merge(t *testing.T) { - setup() - defer teardown() - - input := &RepositoryMergeRequest{ - Base: String("b"), - Head: String("h"), - CommitMessage: String("c"), - } - - mux.HandleFunc("/repos/o/r/merges", func(w http.ResponseWriter, r *http.Request) { - v := new(RepositoryMergeRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"sha":"s"}`) - }) - - commit, _, err := client.Repositories.Merge(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.Merge returned error: %v", err) - } - - want := &RepositoryCommit{SHA: String("s")} - if !reflect.DeepEqual(commit, want) { - t.Errorf("Repositories.Merge returned %+v, want %+v", commit, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_pages.go b/vendor/github.com/google/go-github/github/repos_pages.go index 075f5742d..94a95f2b8 100644 --- a/vendor/github.com/google/go-github/github/repos_pages.go +++ b/vendor/github.com/google/go-github/github/repos_pages.go @@ -104,7 +104,7 @@ func (s *RepositoriesService) GetLatestPagesBuild(ctx context.Context, owner, re // GetPageBuild fetches the specific build information for a GitHub pages site. // // GitHub API docs: https://developer.github.com/v3/repos/pages/#list-a-specific-pages-build -func (s *RepositoriesService) GetPageBuild(ctx context.Context, owner, repo string, id int) (*PagesBuild, *Response, error) { +func (s *RepositoriesService) GetPageBuild(ctx context.Context, owner, repo string, id int64) (*PagesBuild, *Response, error) { u := fmt.Sprintf("repos/%v/%v/pages/builds/%v", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/repos_pages_test.go b/vendor/github.com/google/go-github/github/repos_pages_test.go deleted file mode 100644 index c9e19a1f5..000000000 --- a/vendor/github.com/google/go-github/github/repos_pages_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_GetPagesInfo(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pages", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypePagesPreview) - fmt.Fprint(w, `{"url":"u","status":"s","cname":"c","custom_404":false,"html_url":"h"}`) - }) - - page, _, err := client.Repositories.GetPagesInfo(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.GetPagesInfo returned error: %v", err) - } - - want := &Pages{URL: String("u"), Status: String("s"), CNAME: String("c"), Custom404: Bool(false), HTMLURL: String("h")} - if !reflect.DeepEqual(page, want) { - t.Errorf("Repositories.GetPagesInfo returned %+v, want %+v", page, want) - } -} - -func TestRepositoriesService_ListPagesBuilds(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pages/builds", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"url":"u","status":"s","commit":"c"}]`) - }) - - pages, _, err := client.Repositories.ListPagesBuilds(context.Background(), "o", "r", nil) - if err != nil { - t.Errorf("Repositories.ListPagesBuilds returned error: %v", err) - } - - want := []*PagesBuild{{URL: String("u"), Status: String("s"), Commit: String("c")}} - if !reflect.DeepEqual(pages, want) { - t.Errorf("Repositories.ListPagesBuilds returned %+v, want %+v", pages, want) - } -} - -func TestRepositoriesService_ListPagesBuilds_withOptions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pages/builds", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[]`) - }) - - _, _, err := client.Repositories.ListPagesBuilds(context.Background(), "o", "r", &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Repositories.ListPagesBuilds returned error: %v", err) - } -} - -func TestRepositoriesService_GetLatestPagesBuild(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pages/builds/latest", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"url":"u","status":"s","commit":"c"}`) - }) - - build, _, err := client.Repositories.GetLatestPagesBuild(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.GetLatestPagesBuild returned error: %v", err) - } - - want := &PagesBuild{URL: String("u"), Status: String("s"), Commit: String("c")} - if !reflect.DeepEqual(build, want) { - t.Errorf("Repositories.GetLatestPagesBuild returned %+v, want %+v", build, want) - } -} - -func TestRepositoriesService_GetPageBuild(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pages/builds/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"url":"u","status":"s","commit":"c"}`) - }) - - build, _, err := client.Repositories.GetPageBuild(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.GetPageBuild returned error: %v", err) - } - - want := &PagesBuild{URL: String("u"), Status: String("s"), Commit: String("c")} - if !reflect.DeepEqual(build, want) { - t.Errorf("Repositories.GetPageBuild returned %+v, want %+v", build, want) - } -} - -func TestRepositoriesService_RequestPageBuild(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/pages/builds", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypePagesPreview) - fmt.Fprint(w, `{"url":"u","status":"s"}`) - }) - - build, _, err := client.Repositories.RequestPageBuild(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.RequestPageBuild returned error: %v", err) - } - - want := &PagesBuild{URL: String("u"), Status: String("s")} - if !reflect.DeepEqual(build, want) { - t.Errorf("Repositories.RequestPageBuild returned %+v, want %+v", build, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/github/repos_prereceive_hooks.go new file mode 100644 index 000000000..cab09f747 --- /dev/null +++ b/vendor/github.com/google/go-github/github/repos_prereceive_hooks.go @@ -0,0 +1,110 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// PreReceiveHook represents a GitHub pre-receive hook for a repository. +type PreReceiveHook struct { + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Enforcement *string `json:"enforcement,omitempty"` + ConfigURL *string `json:"configuration_url,omitempty"` +} + +func (p PreReceiveHook) String() string { + return Stringify(p) +} + +// ListPreReceiveHooks lists all pre-receive hooks for the specified repository. +// +// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#list-pre-receive-hooks +func (s *RepositoriesService) ListPreReceiveHooks(ctx context.Context, owner, repo string, opt *ListOptions) ([]*PreReceiveHook, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks", owner, repo) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) + + var hooks []*PreReceiveHook + resp, err := s.client.Do(ctx, req, &hooks) + if err != nil { + return nil, resp, err + } + + return hooks, resp, nil +} + +// GetPreReceiveHook returns a single specified pre-receive hook. +// +// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#get-a-single-pre-receive-hook +func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo string, id int64) (*PreReceiveHook, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) + + h := new(PreReceiveHook) + resp, err := s.client.Do(ctx, req, h) + if err != nil { + return nil, resp, err + } + + return h, resp, nil +} + +// UpdatePreReceiveHook updates a specified pre-receive hook. +// +// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#update-pre-receive-hook-enforcement +func (s *RepositoriesService) UpdatePreReceiveHook(ctx context.Context, owner, repo string, id int64, hook *PreReceiveHook) (*PreReceiveHook, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id) + req, err := s.client.NewRequest("PATCH", u, hook) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) + + h := new(PreReceiveHook) + resp, err := s.client.Do(ctx, req, h) + if err != nil { + return nil, resp, err + } + + return h, resp, nil +} + +// DeletePreReceiveHook deletes a specified pre-receive hook. +// +// GitHub API docs: https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/#remove-enforcement-overrides-for-a-pre-receive-hook +func (s *RepositoriesService) DeletePreReceiveHook(ctx context.Context, owner, repo string, id int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypePreReceiveHooksPreview) + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/github/repos_projects.go b/vendor/github.com/google/go-github/github/repos_projects.go index 770ffc76f..d6486d293 100644 --- a/vendor/github.com/google/go-github/github/repos_projects.go +++ b/vendor/github.com/google/go-github/github/repos_projects.go @@ -34,7 +34,7 @@ func (s *RepositoriesService) ListProjects(ctx context.Context, owner, repo stri return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) var projects []*Project @@ -56,7 +56,7 @@ func (s *RepositoriesService) CreateProject(ctx context.Context, owner, repo str return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeProjectsPreview) project := &Project{} diff --git a/vendor/github.com/google/go-github/github/repos_projects_test.go b/vendor/github.com/google/go-github/github/repos_projects_test.go deleted file mode 100644 index 57dbdd1b3..000000000 --- a/vendor/github.com/google/go-github/github/repos_projects_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListProjects(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/projects", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ProjectListOptions{ListOptions: ListOptions{Page: 2}} - projects, _, err := client.Repositories.ListProjects(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListProjects returned error: %v", err) - } - - want := []*Project{{ID: Int(1)}} - if !reflect.DeepEqual(projects, want) { - t.Errorf("Repositories.ListProjects returned %+v, want %+v", projects, want) - } -} - -func TestRepositoriesService_CreateProject(t *testing.T) { - setup() - defer teardown() - - input := &ProjectOptions{Name: "Project Name", Body: "Project body."} - - mux.HandleFunc("/repos/o/r/projects", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProjectsPreview) - - v := &ProjectOptions{} - json.NewDecoder(r.Body).Decode(v) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - project, _, err := client.Repositories.CreateProject(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.CreateProject returned error: %v", err) - } - - want := &Project{ID: Int(1)} - if !reflect.DeepEqual(project, want) { - t.Errorf("Repositories.CreateProject returned %+v, want %+v", project, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_releases.go b/vendor/github.com/google/go-github/github/repos_releases.go index 1ee7ecf99..bf58743eb 100644 --- a/vendor/github.com/google/go-github/github/repos_releases.go +++ b/vendor/github.com/google/go-github/github/repos_releases.go @@ -19,23 +19,26 @@ import ( // RepositoryRelease represents a GitHub release in a repository. type RepositoryRelease struct { - ID *int `json:"id,omitempty"` - TagName *string `json:"tag_name,omitempty"` - TargetCommitish *string `json:"target_commitish,omitempty"` - Name *string `json:"name,omitempty"` - Body *string `json:"body,omitempty"` - Draft *bool `json:"draft,omitempty"` - Prerelease *bool `json:"prerelease,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PublishedAt *Timestamp `json:"published_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - AssetsURL *string `json:"assets_url,omitempty"` - Assets []ReleaseAsset `json:"assets,omitempty"` - UploadURL *string `json:"upload_url,omitempty"` - ZipballURL *string `json:"zipball_url,omitempty"` - TarballURL *string `json:"tarball_url,omitempty"` - Author *User `json:"author,omitempty"` + TagName *string `json:"tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + Name *string `json:"name,omitempty"` + Body *string `json:"body,omitempty"` + Draft *bool `json:"draft,omitempty"` + Prerelease *bool `json:"prerelease,omitempty"` + + // The following fields are not used in CreateRelease or EditRelease: + ID *int64 `json:"id,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + PublishedAt *Timestamp `json:"published_at,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + AssetsURL *string `json:"assets_url,omitempty"` + Assets []ReleaseAsset `json:"assets,omitempty"` + UploadURL *string `json:"upload_url,omitempty"` + ZipballURL *string `json:"zipball_url,omitempty"` + TarballURL *string `json:"tarball_url,omitempty"` + Author *User `json:"author,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (r RepositoryRelease) String() string { @@ -44,7 +47,7 @@ func (r RepositoryRelease) String() string { // ReleaseAsset represents a GitHub release asset in a repository. type ReleaseAsset struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` Name *string `json:"name,omitempty"` Label *string `json:"label,omitempty"` @@ -56,6 +59,7 @@ type ReleaseAsset struct { UpdatedAt *Timestamp `json:"updated_at,omitempty"` BrowserDownloadURL *string `json:"browser_download_url,omitempty"` Uploader *User `json:"uploader,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (r ReleaseAsset) String() string { @@ -88,7 +92,7 @@ func (s *RepositoriesService) ListReleases(ctx context.Context, owner, repo stri // GetRelease fetches a single release. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release -func (s *RepositoriesService) GetRelease(ctx context.Context, owner, repo string, id int) (*RepositoryRelease, *Response, error) { +func (s *RepositoriesService) GetRelease(ctx context.Context, owner, repo string, id int64) (*RepositoryRelease, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) return s.getSingleRelease(ctx, u) } @@ -123,13 +127,40 @@ func (s *RepositoriesService) getSingleRelease(ctx context.Context, url string) return release, resp, nil } +// repositoryReleaseRequest is a subset of RepositoryRelease and +// is used internally by CreateRelease and EditRelease to pass +// only the known fields for these endpoints. +// +// See https://github.com/google/go-github/issues/992 for more +// information. +type repositoryReleaseRequest struct { + TagName *string `json:"tag_name,omitempty"` + TargetCommitish *string `json:"target_commitish,omitempty"` + Name *string `json:"name,omitempty"` + Body *string `json:"body,omitempty"` + Draft *bool `json:"draft,omitempty"` + Prerelease *bool `json:"prerelease,omitempty"` +} + // CreateRelease adds a new release for a repository. // +// Note that only a subset of the release fields are used. +// See RepositoryRelease for more information. +// // GitHub API docs: https://developer.github.com/v3/repos/releases/#create-a-release func (s *RepositoriesService) CreateRelease(ctx context.Context, owner, repo string, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases", owner, repo) - req, err := s.client.NewRequest("POST", u, release) + releaseReq := &repositoryReleaseRequest{ + TagName: release.TagName, + TargetCommitish: release.TargetCommitish, + Name: release.Name, + Body: release.Body, + Draft: release.Draft, + Prerelease: release.Prerelease, + } + + req, err := s.client.NewRequest("POST", u, releaseReq) if err != nil { return nil, nil, err } @@ -144,11 +175,23 @@ func (s *RepositoriesService) CreateRelease(ctx context.Context, owner, repo str // EditRelease edits a repository release. // +// Note that only a subset of the release fields are used. +// See RepositoryRelease for more information. +// // GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release -func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo string, id int, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { +func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo string, id int64, release *RepositoryRelease) (*RepositoryRelease, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) - req, err := s.client.NewRequest("PATCH", u, release) + releaseReq := &repositoryReleaseRequest{ + TagName: release.TagName, + TargetCommitish: release.TargetCommitish, + Name: release.Name, + Body: release.Body, + Draft: release.Draft, + Prerelease: release.Prerelease, + } + + req, err := s.client.NewRequest("PATCH", u, releaseReq) if err != nil { return nil, nil, err } @@ -164,7 +207,7 @@ func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo strin // DeleteRelease delete a single release from a repository. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#delete-a-release -func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo string, id int) (*Response, error) { +func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id) req, err := s.client.NewRequest("DELETE", u, nil) @@ -177,7 +220,7 @@ func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo str // ListReleaseAssets lists the release's assets. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#list-assets-for-a-release -func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo string, id int, opt *ListOptions) ([]*ReleaseAsset, *Response, error) { +func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo string, id int64, opt *ListOptions) ([]*ReleaseAsset, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id) u, err := addOptions(u, opt) if err != nil { @@ -200,7 +243,7 @@ func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo // GetReleaseAsset fetches a single release asset. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release-asset -func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo string, id int) (*ReleaseAsset, *Response, error) { +func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo string, id int64) (*ReleaseAsset, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) @@ -224,7 +267,7 @@ func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo s // of the io.ReadCloser. Exactly one of rc and redirectURL will be zero. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release-asset -func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, repo string, id int) (rc io.ReadCloser, redirectURL string, err error) { +func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, repo string, id int64) (rc io.ReadCloser, redirectURL string, err error) { u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) @@ -264,7 +307,7 @@ func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, r // EditReleaseAsset edits a repository release asset. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release-asset -func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo string, id int, release *ReleaseAsset) (*ReleaseAsset, *Response, error) { +func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo string, id int64, release *ReleaseAsset) (*ReleaseAsset, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) req, err := s.client.NewRequest("PATCH", u, release) @@ -283,7 +326,7 @@ func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo // DeleteReleaseAsset delete a single release asset from a repository. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#delete-a-release-asset -func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, repo string, id int) (*Response, error) { +func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, repo string, id int64) (*Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id) req, err := s.client.NewRequest("DELETE", u, nil) @@ -297,7 +340,7 @@ func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, rep // To upload assets that cannot be represented by an os.File, call NewUploadRequest directly. // // GitHub API docs: https://developer.github.com/v3/repos/releases/#upload-a-release-asset -func (s *RepositoriesService) UploadReleaseAsset(ctx context.Context, owner, repo string, id int, opt *UploadOptions, file *os.File) (*ReleaseAsset, *Response, error) { +func (s *RepositoriesService) UploadReleaseAsset(ctx context.Context, owner, repo string, id int64, opt *UploadOptions, file *os.File) (*ReleaseAsset, *Response, error) { u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id) u, err := addOptions(u, opt) if err != nil { diff --git a/vendor/github.com/google/go-github/github/repos_releases_test.go b/vendor/github.com/google/go-github/github/repos_releases_test.go deleted file mode 100644 index 9a2c4c8af..000000000 --- a/vendor/github.com/google/go-github/github/repos_releases_test.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "os" - "reflect" - "strings" - "testing" -) - -func TestRepositoriesService_ListReleases(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - releases, _, err := client.Repositories.ListReleases(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListReleases returned error: %v", err) - } - want := []*RepositoryRelease{{ID: Int(1)}} - if !reflect.DeepEqual(releases, want) { - t.Errorf("Repositories.ListReleases returned %+v, want %+v", releases, want) - } -} - -func TestRepositoriesService_GetRelease(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1,"author":{"login":"l"}}`) - }) - - release, resp, err := client.Repositories.GetRelease(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.GetRelease returned error: %v\n%v", err, resp.Body) - } - - want := &RepositoryRelease{ID: Int(1), Author: &User{Login: String("l")}} - if !reflect.DeepEqual(release, want) { - t.Errorf("Repositories.GetRelease returned %+v, want %+v", release, want) - } -} - -func TestRepositoriesService_GetLatestRelease(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/latest", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":3}`) - }) - - release, resp, err := client.Repositories.GetLatestRelease(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.GetLatestRelease returned error: %v\n%v", err, resp.Body) - } - - want := &RepositoryRelease{ID: Int(3)} - if !reflect.DeepEqual(release, want) { - t.Errorf("Repositories.GetLatestRelease returned %+v, want %+v", release, want) - } -} - -func TestRepositoriesService_GetReleaseByTag(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/tags/foo", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":13}`) - }) - - release, resp, err := client.Repositories.GetReleaseByTag(context.Background(), "o", "r", "foo") - if err != nil { - t.Errorf("Repositories.GetReleaseByTag returned error: %v\n%v", err, resp.Body) - } - - want := &RepositoryRelease{ID: Int(13)} - if !reflect.DeepEqual(release, want) { - t.Errorf("Repositories.GetReleaseByTag returned %+v, want %+v", release, want) - } -} - -func TestRepositoriesService_CreateRelease(t *testing.T) { - setup() - defer teardown() - - input := &RepositoryRelease{Name: String("v1.0")} - - mux.HandleFunc("/repos/o/r/releases", func(w http.ResponseWriter, r *http.Request) { - v := new(RepositoryRelease) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1}`) - }) - - release, _, err := client.Repositories.CreateRelease(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.CreateRelease returned error: %v", err) - } - - want := &RepositoryRelease{ID: Int(1)} - if !reflect.DeepEqual(release, want) { - t.Errorf("Repositories.CreateRelease returned %+v, want %+v", release, want) - } -} - -func TestRepositoriesService_EditRelease(t *testing.T) { - setup() - defer teardown() - - input := &RepositoryRelease{Name: String("n")} - - mux.HandleFunc("/repos/o/r/releases/1", func(w http.ResponseWriter, r *http.Request) { - v := new(RepositoryRelease) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1}`) - }) - - release, _, err := client.Repositories.EditRelease(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Repositories.EditRelease returned error: %v", err) - } - want := &RepositoryRelease{ID: Int(1)} - if !reflect.DeepEqual(release, want) { - t.Errorf("Repositories.EditRelease returned = %+v, want %+v", release, want) - } -} - -func TestRepositoriesService_DeleteRelease(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Repositories.DeleteRelease(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DeleteRelease returned error: %v", err) - } -} - -func TestRepositoriesService_ListReleaseAssets(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/1/assets", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - assets, _, err := client.Repositories.ListReleaseAssets(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("Repositories.ListReleaseAssets returned error: %v", err) - } - want := []*ReleaseAsset{{ID: Int(1)}} - if !reflect.DeepEqual(assets, want) { - t.Errorf("Repositories.ListReleaseAssets returned %+v, want %+v", assets, want) - } -} - -func TestRepositoriesService_GetReleaseAsset(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/assets/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - asset, _, err := client.Repositories.GetReleaseAsset(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.GetReleaseAsset returned error: %v", err) - } - want := &ReleaseAsset{ID: Int(1)} - if !reflect.DeepEqual(asset, want) { - t.Errorf("Repositories.GetReleaseAsset returned %+v, want %+v", asset, want) - } -} - -func TestRepositoriesService_DownloadReleaseAsset_Stream(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/assets/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", defaultMediaType) - w.Header().Set("Content-Type", "application/octet-stream") - w.Header().Set("Content-Disposition", "attachment; filename=hello-world.txt") - fmt.Fprint(w, "Hello World") - }) - - reader, _, err := client.Repositories.DownloadReleaseAsset(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DownloadReleaseAsset returned error: %v", err) - } - want := []byte("Hello World") - content, err := ioutil.ReadAll(reader) - if err != nil { - t.Errorf("Repositories.DownloadReleaseAsset returned bad reader: %v", err) - } - if !bytes.Equal(want, content) { - t.Errorf("Repositories.DownloadReleaseAsset returned %+v, want %+v", content, want) - } -} - -func TestRepositoriesService_DownloadReleaseAsset_Redirect(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/assets/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", defaultMediaType) - http.Redirect(w, r, "/yo", http.StatusFound) - }) - - _, got, err := client.Repositories.DownloadReleaseAsset(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DownloadReleaseAsset returned error: %v", err) - } - want := "/yo" - if !strings.HasSuffix(got, want) { - t.Errorf("Repositories.DownloadReleaseAsset returned %+v, want %+v", got, want) - } -} - -func TestRepositoriesService_DownloadReleaseAsset_APIError(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/assets/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", defaultMediaType) - w.WriteHeader(http.StatusNotFound) - fmt.Fprint(w, `{"message":"Not Found","documentation_url":"https://developer.github.com/v3"}`) - }) - - resp, loc, err := client.Repositories.DownloadReleaseAsset(context.Background(), "o", "r", 1) - if err == nil { - t.Error("Repositories.DownloadReleaseAsset did not return an error") - } - - if resp != nil { - resp.Close() - t.Error("Repositories.DownloadReleaseAsset returned stream, want nil") - } - - if loc != "" { - t.Errorf(`Repositories.DownloadReleaseAsset returned "%s", want empty ""`, loc) - } -} - -func TestRepositoriesService_EditReleaseAsset(t *testing.T) { - setup() - defer teardown() - - input := &ReleaseAsset{Name: String("n")} - - mux.HandleFunc("/repos/o/r/releases/assets/1", func(w http.ResponseWriter, r *http.Request) { - v := new(ReleaseAsset) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1}`) - }) - - asset, _, err := client.Repositories.EditReleaseAsset(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Repositories.EditReleaseAsset returned error: %v", err) - } - want := &ReleaseAsset{ID: Int(1)} - if !reflect.DeepEqual(asset, want) { - t.Errorf("Repositories.EditReleaseAsset returned = %+v, want %+v", asset, want) - } -} - -func TestRepositoriesService_DeleteReleaseAsset(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/assets/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Repositories.DeleteReleaseAsset(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Repositories.DeleteReleaseAsset returned error: %v", err) - } -} - -func TestRepositoriesService_UploadReleaseAsset(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/releases/1/assets", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Content-Type", "text/plain; charset=utf-8") - testHeader(t, r, "Content-Length", "12") - testFormValues(t, r, values{"name": "n"}) - testBody(t, r, "Upload me !\n") - - fmt.Fprintf(w, `{"id":1}`) - }) - - file, dir, err := openTestFile("upload.txt", "Upload me !\n") - if err != nil { - t.Fatalf("Unable to create temp file: %v", err) - } - defer os.RemoveAll(dir) - - opt := &UploadOptions{Name: "n"} - asset, _, err := client.Repositories.UploadReleaseAsset(context.Background(), "o", "r", 1, opt, file) - if err != nil { - t.Errorf("Repositories.UploadReleaseAssert returned error: %v", err) - } - want := &ReleaseAsset{ID: Int(1)} - if !reflect.DeepEqual(asset, want) { - t.Errorf("Repositories.UploadReleaseAssert returned %+v, want %+v", asset, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_stats.go b/vendor/github.com/google/go-github/github/repos_stats.go index 30fc7bd34..bb355aead 100644 --- a/vendor/github.com/google/go-github/github/repos_stats.go +++ b/vendor/github.com/google/go-github/github/repos_stats.go @@ -182,7 +182,7 @@ func (s *RepositoriesService) ListParticipation(ctx context.Context, owner, repo } // PunchCard represents the number of commits made during a given hour of a -// day of thew eek. +// day of the week. type PunchCard struct { Day *int // Day of the week (0-6: =Sunday - Saturday). Hour *int // Hour of day (0-23). diff --git a/vendor/github.com/google/go-github/github/repos_stats_test.go b/vendor/github.com/google/go-github/github/repos_stats_test.go deleted file mode 100644 index 1da94d013..000000000 --- a/vendor/github.com/google/go-github/github/repos_stats_test.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestRepositoriesService_ListContributorsStats(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/stats/contributors", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - fmt.Fprint(w, ` -[ - { - "author": { - "id": 1 - }, - "total": 135, - "weeks": [ - { - "w": 1367712000, - "a": 6898, - "d": 77, - "c": 10 - } - ] - } -] -`) - }) - - stats, _, err := client.Repositories.ListContributorsStats(context.Background(), "o", "r") - if err != nil { - t.Errorf("RepositoriesService.ListContributorsStats returned error: %v", err) - } - - want := []*ContributorStats{ - { - Author: &Contributor{ - ID: Int(1), - }, - Total: Int(135), - Weeks: []WeeklyStats{ - { - Week: &Timestamp{time.Date(2013, 05, 05, 00, 00, 00, 0, time.UTC).Local()}, - Additions: Int(6898), - Deletions: Int(77), - Commits: Int(10), - }, - }, - }, - } - - if !reflect.DeepEqual(stats, want) { - t.Errorf("RepositoriesService.ListContributorsStats returned %+v, want %+v", stats, want) - } -} - -func TestRepositoriesService_ListCommitActivity(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/stats/commit_activity", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - fmt.Fprint(w, ` -[ - { - "days": [0, 3, 26, 20, 39, 1, 0], - "total": 89, - "week": 1336280400 - } -] -`) - }) - - activity, _, err := client.Repositories.ListCommitActivity(context.Background(), "o", "r") - if err != nil { - t.Errorf("RepositoriesService.ListCommitActivity returned error: %v", err) - } - - want := []*WeeklyCommitActivity{ - { - Days: []int{0, 3, 26, 20, 39, 1, 0}, - Total: Int(89), - Week: &Timestamp{time.Date(2012, 05, 06, 05, 00, 00, 0, time.UTC).Local()}, - }, - } - - if !reflect.DeepEqual(activity, want) { - t.Errorf("RepositoriesService.ListCommitActivity returned %+v, want %+v", activity, want) - } -} - -func TestRepositoriesService_ListCodeFrequency(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/stats/code_frequency", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - fmt.Fprint(w, `[[1302998400, 1124, -435]]`) - }) - - code, _, err := client.Repositories.ListCodeFrequency(context.Background(), "o", "r") - if err != nil { - t.Errorf("RepositoriesService.ListCodeFrequency returned error: %v", err) - } - - want := []*WeeklyStats{{ - Week: &Timestamp{time.Date(2011, 04, 17, 00, 00, 00, 0, time.UTC).Local()}, - Additions: Int(1124), - Deletions: Int(-435), - }} - - if !reflect.DeepEqual(code, want) { - t.Errorf("RepositoriesService.ListCodeFrequency returned %+v, want %+v", code, want) - } -} - -func TestRepositoriesService_Participation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/stats/participation", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - fmt.Fprint(w, ` -{ - "all": [ - 11,21,15,2,8,1,8,23,17,21,11,10,33, - 91,38,34,22,23,32,3,43,87,71,18,13,5, - 13,16,66,27,12,45,110,117,13,8,18,9,19, - 26,39,12,20,31,46,91,45,10,24,9,29,7 - ], - "owner": [ - 3,2,3,0,2,0,5,14,7,9,1,5,0, - 48,19,2,0,1,10,2,23,40,35,8,8,2, - 10,6,30,0,2,9,53,104,3,3,10,4,7, - 11,21,4,4,22,26,63,11,2,14,1,10,3 - ] -} -`) - }) - - participation, _, err := client.Repositories.ListParticipation(context.Background(), "o", "r") - if err != nil { - t.Errorf("RepositoriesService.ListParticipation returned error: %v", err) - } - - want := &RepositoryParticipation{ - All: []int{ - 11, 21, 15, 2, 8, 1, 8, 23, 17, 21, 11, 10, 33, - 91, 38, 34, 22, 23, 32, 3, 43, 87, 71, 18, 13, 5, - 13, 16, 66, 27, 12, 45, 110, 117, 13, 8, 18, 9, 19, - 26, 39, 12, 20, 31, 46, 91, 45, 10, 24, 9, 29, 7, - }, - Owner: []int{ - 3, 2, 3, 0, 2, 0, 5, 14, 7, 9, 1, 5, 0, - 48, 19, 2, 0, 1, 10, 2, 23, 40, 35, 8, 8, 2, - 10, 6, 30, 0, 2, 9, 53, 104, 3, 3, 10, 4, 7, - 11, 21, 4, 4, 22, 26, 63, 11, 2, 14, 1, 10, 3, - }, - } - - if !reflect.DeepEqual(participation, want) { - t.Errorf("RepositoriesService.ListParticipation returned %+v, want %+v", participation, want) - } -} - -func TestRepositoriesService_ListPunchCard(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/stats/punch_card", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - fmt.Fprint(w, `[ - [0, 0, 5], - [0, 1, 43], - [0, 2, 21] - ]`) - }) - - card, _, err := client.Repositories.ListPunchCard(context.Background(), "o", "r") - if err != nil { - t.Errorf("RepositoriesService.ListPunchCard returned error: %v", err) - } - - want := []*PunchCard{ - {Day: Int(0), Hour: Int(0), Commits: Int(5)}, - {Day: Int(0), Hour: Int(1), Commits: Int(43)}, - {Day: Int(0), Hour: Int(2), Commits: Int(21)}, - } - - if !reflect.DeepEqual(card, want) { - t.Errorf("RepositoriesService.ListPunchCard returned %+v, want %+v", card, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_statuses.go b/vendor/github.com/google/go-github/github/repos_statuses.go index 6db501076..f94fdc858 100644 --- a/vendor/github.com/google/go-github/github/repos_statuses.go +++ b/vendor/github.com/google/go-github/github/repos_statuses.go @@ -13,7 +13,7 @@ import ( // RepoStatus represents the status of a repository at a particular reference. type RepoStatus struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` // State is the current state of the repository. Possible values are: diff --git a/vendor/github.com/google/go-github/github/repos_statuses_test.go b/vendor/github.com/google/go-github/github/repos_statuses_test.go deleted file mode 100644 index 8e6c9378d..000000000 --- a/vendor/github.com/google/go-github/github/repos_statuses_test.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestRepositoriesService_ListStatuses(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/commits/r/statuses", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - statuses, _, err := client.Repositories.ListStatuses(context.Background(), "o", "r", "r", opt) - if err != nil { - t.Errorf("Repositories.ListStatuses returned error: %v", err) - } - - want := []*RepoStatus{{ID: Int(1)}} - if !reflect.DeepEqual(statuses, want) { - t.Errorf("Repositories.ListStatuses returned %+v, want %+v", statuses, want) - } -} - -func TestRepositoriesService_ListStatuses_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListStatuses(context.Background(), "%", "r", "r", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_CreateStatus(t *testing.T) { - setup() - defer teardown() - - input := &RepoStatus{State: String("s"), TargetURL: String("t"), Description: String("d")} - - mux.HandleFunc("/repos/o/r/statuses/r", func(w http.ResponseWriter, r *http.Request) { - v := new(RepoStatus) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1}`) - }) - - status, _, err := client.Repositories.CreateStatus(context.Background(), "o", "r", "r", input) - if err != nil { - t.Errorf("Repositories.CreateStatus returned error: %v", err) - } - - want := &RepoStatus{ID: Int(1)} - if !reflect.DeepEqual(status, want) { - t.Errorf("Repositories.CreateStatus returned %+v, want %+v", status, want) - } -} - -func TestRepositoriesService_CreateStatus_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.CreateStatus(context.Background(), "%", "r", "r", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_GetCombinedStatus(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/commits/r/status", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `{"state":"success", "statuses":[{"id":1}]}`) - }) - - opt := &ListOptions{Page: 2} - status, _, err := client.Repositories.GetCombinedStatus(context.Background(), "o", "r", "r", opt) - if err != nil { - t.Errorf("Repositories.GetCombinedStatus returned error: %v", err) - } - - want := &CombinedStatus{State: String("success"), Statuses: []RepoStatus{{ID: Int(1)}}} - if !reflect.DeepEqual(status, want) { - t.Errorf("Repositories.GetCombinedStatus returned %+v, want %+v", status, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_test.go b/vendor/github.com/google/go-github/github/repos_test.go deleted file mode 100644 index 9e522c82c..000000000 --- a/vendor/github.com/google/go-github/github/repos_test.go +++ /dev/null @@ -1,978 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "strings" - "testing" -) - -func TestRepositoriesService_List_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} - mux.HandleFunc("/user/repos", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - repos, _, err := client.Repositories.List(context.Background(), "", nil) - if err != nil { - t.Errorf("Repositories.List returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Repositories.List returned %+v, want %+v", repos, want) - } -} - -func TestRepositoriesService_List_specifiedUser(t *testing.T) { - setup() - defer teardown() - - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} - mux.HandleFunc("/users/u/repos", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - testFormValues(t, r, values{ - "visibility": "public", - "affiliation": "owner,collaborator", - "sort": "created", - "direction": "asc", - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &RepositoryListOptions{ - Visibility: "public", - Affiliation: "owner,collaborator", - Sort: "created", - Direction: "asc", - ListOptions: ListOptions{Page: 2}, - } - repos, _, err := client.Repositories.List(context.Background(), "u", opt) - if err != nil { - t.Errorf("Repositories.List returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Repositories.List returned %+v, want %+v", repos, want) - } -} - -func TestRepositoriesService_List_specifiedUser_type(t *testing.T) { - setup() - defer teardown() - - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} - mux.HandleFunc("/users/u/repos", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - testFormValues(t, r, values{ - "type": "owner", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &RepositoryListOptions{ - Type: "owner", - } - repos, _, err := client.Repositories.List(context.Background(), "u", opt) - if err != nil { - t.Errorf("Repositories.List returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Repositories.List returned %+v, want %+v", repos, want) - } -} - -func TestRepositoriesService_List_invalidUser(t *testing.T) { - _, _, err := client.Repositories.List(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_ListByOrg(t *testing.T) { - setup() - defer teardown() - - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} - mux.HandleFunc("/orgs/o/repos", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - testFormValues(t, r, values{ - "type": "forks", - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &RepositoryListByOrgOptions{"forks", ListOptions{Page: 2}} - repos, _, err := client.Repositories.ListByOrg(context.Background(), "o", opt) - if err != nil { - t.Errorf("Repositories.ListByOrg returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Repositories.ListByOrg returned %+v, want %+v", repos, want) - } -} - -func TestRepositoriesService_ListByOrg_invalidOrg(t *testing.T) { - _, _, err := client.Repositories.ListByOrg(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_ListAll(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repositories", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "since": "1", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &RepositoryListAllOptions{1} - repos, _, err := client.Repositories.ListAll(context.Background(), opt) - if err != nil { - t.Errorf("Repositories.ListAll returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Repositories.ListAll returned %+v, want %+v", repos, want) - } -} - -func TestRepositoriesService_Create_user(t *testing.T) { - setup() - defer teardown() - - input := &Repository{Name: String("n")} - - mux.HandleFunc("/user/repos", func(w http.ResponseWriter, r *http.Request) { - v := new(Repository) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - repo, _, err := client.Repositories.Create(context.Background(), "", input) - if err != nil { - t.Errorf("Repositories.Create returned error: %v", err) - } - - want := &Repository{ID: Int(1)} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Repositories.Create returned %+v, want %+v", repo, want) - } -} - -func TestRepositoriesService_Create_org(t *testing.T) { - setup() - defer teardown() - - input := &Repository{Name: String("n")} - - mux.HandleFunc("/orgs/o/repos", func(w http.ResponseWriter, r *http.Request) { - v := new(Repository) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - repo, _, err := client.Repositories.Create(context.Background(), "o", input) - if err != nil { - t.Errorf("Repositories.Create returned error: %v", err) - } - - want := &Repository{ID: Int(1)} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Repositories.Create returned %+v, want %+v", repo, want) - } -} - -func TestRepositoriesService_Create_invalidOrg(t *testing.T) { - _, _, err := client.Repositories.Create(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_Get(t *testing.T) { - setup() - defer teardown() - - acceptHeaders := []string{mediaTypeLicensesPreview, mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} - mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", strings.Join(acceptHeaders, ", ")) - fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"}}`) - }) - - repo, _, err := client.Repositories.Get(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.Get returned error: %v", err) - } - - want := &Repository{ID: Int(1), Name: String("n"), Description: String("d"), Owner: &User{Login: String("l")}, License: &License{Key: String("mit")}} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Repositories.Get returned %+v, want %+v", repo, want) - } -} - -func TestRepositoriesService_GetCodeOfConduct(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/community/code_of_conduct", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeCodesOfConductPreview) - fmt.Fprint(w, `{ - "key": "key", - "name": "name", - "url": "url", - "body": "body"}`, - ) - }) - - coc, _, err := client.Repositories.GetCodeOfConduct(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.GetCodeOfConduct returned error: %v", err) - } - - want := &CodeOfConduct{ - Key: String("key"), - Name: String("name"), - URL: String("url"), - Body: String("body"), - } - - if !reflect.DeepEqual(coc, want) { - t.Errorf("Repositories.Get returned %+v, want %+v", coc, want) - } -} - -func TestRepositoriesService_GetByID(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repositories/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeLicensesPreview) - fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"}}`) - }) - - repo, _, err := client.Repositories.GetByID(context.Background(), 1) - if err != nil { - t.Fatalf("Repositories.GetByID returned error: %v", err) - } - - want := &Repository{ID: Int(1), Name: String("n"), Description: String("d"), Owner: &User{Login: String("l")}, License: &License{Key: String("mit")}} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Repositories.GetByID returned %+v, want %+v", repo, want) - } -} - -func TestRepositoriesService_Edit(t *testing.T) { - setup() - defer teardown() - - i := true - input := &Repository{HasIssues: &i} - - mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - v := new(Repository) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1}`) - }) - - repo, _, err := client.Repositories.Edit(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Repositories.Edit returned error: %v", err) - } - - want := &Repository{ID: Int(1)} - if !reflect.DeepEqual(repo, want) { - t.Errorf("Repositories.Edit returned %+v, want %+v", repo, want) - } -} - -func TestRepositoriesService_Delete(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Repositories.Delete(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.Delete returned error: %v", err) - } -} - -func TestRepositoriesService_Get_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.Get(context.Background(), "%", "r") - testURLParseError(t, err) -} - -func TestRepositoriesService_Edit_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.Edit(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestRepositoriesService_ListContributors(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/contributors", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "anon": "true", - "page": "2", - }) - fmt.Fprint(w, `[{"contributions":42}]`) - }) - - opts := &ListContributorsOptions{Anon: "true", ListOptions: ListOptions{Page: 2}} - contributors, _, err := client.Repositories.ListContributors(context.Background(), "o", "r", opts) - if err != nil { - t.Errorf("Repositories.ListContributors returned error: %v", err) - } - - want := []*Contributor{{Contributions: Int(42)}} - if !reflect.DeepEqual(contributors, want) { - t.Errorf("Repositories.ListContributors returned %+v, want %+v", contributors, want) - } -} - -func TestRepositoriesService_ListLanguages(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/languages", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"go":1}`) - }) - - languages, _, err := client.Repositories.ListLanguages(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.ListLanguages returned error: %v", err) - } - - want := map[string]int{"go": 1} - if !reflect.DeepEqual(languages, want) { - t.Errorf("Repositories.ListLanguages returned %+v, want %+v", languages, want) - } -} - -func TestRepositoriesService_ListTeams(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/teams", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeNestedTeamsPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - teams, _, err := client.Repositories.ListTeams(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListTeams returned error: %v", err) - } - - want := []*Team{{ID: Int(1)}} - if !reflect.DeepEqual(teams, want) { - t.Errorf("Repositories.ListTeams returned %+v, want %+v", teams, want) - } -} - -func TestRepositoriesService_ListTags(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/tags", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"name":"n", "commit" : {"sha" : "s", "url" : "u"}, "zipball_url": "z", "tarball_url": "t"}]`) - }) - - opt := &ListOptions{Page: 2} - tags, _, err := client.Repositories.ListTags(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListTags returned error: %v", err) - } - - want := []*RepositoryTag{ - { - Name: String("n"), - Commit: &Commit{ - SHA: String("s"), - URL: String("u"), - }, - ZipballURL: String("z"), - TarballURL: String("t"), - }, - } - if !reflect.DeepEqual(tags, want) { - t.Errorf("Repositories.ListTags returned %+v, want %+v", tags, want) - } -} - -func TestRepositoriesService_ListBranches(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"name":"master", "commit" : {"sha" : "a57781", "url" : "https://api.github.com/repos/o/r/commits/a57781"}}]`) - }) - - opt := &ListOptions{Page: 2} - branches, _, err := client.Repositories.ListBranches(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Repositories.ListBranches returned error: %v", err) - } - - want := []*Branch{{Name: String("master"), Commit: &RepositoryCommit{SHA: String("a57781"), URL: String("https://api.github.com/repos/o/r/commits/a57781")}}} - if !reflect.DeepEqual(branches, want) { - t.Errorf("Repositories.ListBranches returned %+v, want %+v", branches, want) - } -} - -func TestRepositoriesService_GetBranch(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprint(w, `{"name":"n", "commit":{"sha":"s","commit":{"message":"m"}}, "protected":true}`) - }) - - branch, _, err := client.Repositories.GetBranch(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.GetBranch returned error: %v", err) - } - - want := &Branch{ - Name: String("n"), - Commit: &RepositoryCommit{ - SHA: String("s"), - Commit: &Commit{ - Message: String("m"), - }, - }, - Protected: Bool(true), - } - - if !reflect.DeepEqual(branch, want) { - t.Errorf("Repositories.GetBranch returned %+v, want %+v", branch, want) - } -} - -func TestRepositoriesService_GetBranchProtection(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection", func(w http.ResponseWriter, r *http.Request) { - v := new(ProtectionRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprintf(w, `{"required_status_checks":{"strict":true,"contexts":["continuous-integration"]},"required_pull_request_reviews":{"dismissal_restrictions":{"users":[{"id":3,"login":"u"}],"teams":[{"id":4,"slug":"t"}]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true},"enforce_admins":{"url":"/repos/o/r/branches/b/protection/enforce_admins","enabled":true},"restrictions":{"users":[{"id":1,"login":"u"}],"teams":[{"id":2,"slug":"t"}]}}`) - }) - - protection, _, err := client.Repositories.GetBranchProtection(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.GetBranchProtection returned error: %v", err) - } - - want := &Protection{ - RequiredStatusChecks: &RequiredStatusChecks{ - Strict: true, - Contexts: []string{"continuous-integration"}, - }, - RequiredPullRequestReviews: &PullRequestReviewsEnforcement{ - DismissStaleReviews: true, - DismissalRestrictions: DismissalRestrictions{ - Users: []*User{ - {Login: String("u"), ID: Int(3)}, - }, - Teams: []*Team{ - {Slug: String("t"), ID: Int(4)}, - }, - }, - RequireCodeOwnerReviews: true, - }, - EnforceAdmins: &AdminEnforcement{ - URL: String("/repos/o/r/branches/b/protection/enforce_admins"), - Enabled: true, - }, - Restrictions: &BranchRestrictions{ - Users: []*User{ - {Login: String("u"), ID: Int(1)}, - }, - Teams: []*Team{ - {Slug: String("t"), ID: Int(2)}, - }, - }, - } - if !reflect.DeepEqual(protection, want) { - t.Errorf("Repositories.GetBranchProtection returned %+v, want %+v", protection, want) - } -} - -func TestRepositoriesService_UpdateBranchProtection(t *testing.T) { - setup() - defer teardown() - - input := &ProtectionRequest{ - RequiredStatusChecks: &RequiredStatusChecks{ - Strict: true, - Contexts: []string{"continuous-integration"}, - }, - RequiredPullRequestReviews: &PullRequestReviewsEnforcementRequest{ - DismissStaleReviews: true, - DismissalRestrictionsRequest: &DismissalRestrictionsRequest{ - Users: []string{"uu"}, - Teams: []string{"tt"}, - }, - }, - Restrictions: &BranchRestrictionsRequest{ - Users: []string{"u"}, - Teams: []string{"t"}, - }, - } - - mux.HandleFunc("/repos/o/r/branches/b/protection", func(w http.ResponseWriter, r *http.Request) { - v := new(ProtectionRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprintf(w, `{"required_status_checks":{"strict":true,"contexts":["continuous-integration"]},"required_pull_request_reviews":{"dismissal_restrictions":{"users":[{"id":3,"login":"uu"}],"teams":[{"id":4,"slug":"tt"}]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true},"restrictions":{"users":[{"id":1,"login":"u"}],"teams":[{"id":2,"slug":"t"}]}}`) - }) - - protection, _, err := client.Repositories.UpdateBranchProtection(context.Background(), "o", "r", "b", input) - if err != nil { - t.Errorf("Repositories.UpdateBranchProtection returned error: %v", err) - } - - want := &Protection{ - RequiredStatusChecks: &RequiredStatusChecks{ - Strict: true, - Contexts: []string{"continuous-integration"}, - }, - RequiredPullRequestReviews: &PullRequestReviewsEnforcement{ - DismissStaleReviews: true, - DismissalRestrictions: DismissalRestrictions{ - Users: []*User{ - {Login: String("uu"), ID: Int(3)}, - }, - Teams: []*Team{ - {Slug: String("tt"), ID: Int(4)}, - }, - }, - RequireCodeOwnerReviews: true, - }, - Restrictions: &BranchRestrictions{ - Users: []*User{ - {Login: String("u"), ID: Int(1)}, - }, - Teams: []*Team{ - {Slug: String("t"), ID: Int(2)}, - }, - }, - } - if !reflect.DeepEqual(protection, want) { - t.Errorf("Repositories.UpdateBranchProtection returned %+v, want %+v", protection, want) - } -} - -func TestRepositoriesService_RemoveBranchProtection(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Repositories.RemoveBranchProtection(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.RemoveBranchProtection returned error: %v", err) - } -} - -func TestRepositoriesService_ListLanguages_invalidOwner(t *testing.T) { - _, _, err := client.Repositories.ListLanguages(context.Background(), "%", "%") - testURLParseError(t, err) -} - -func TestRepositoriesService_License(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/license", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"name": "LICENSE", "path": "LICENSE", "license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","featured":true}}`) - }) - - got, _, err := client.Repositories.License(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.License returned error: %v", err) - } - - want := &RepositoryLicense{ - Name: String("LICENSE"), - Path: String("LICENSE"), - License: &License{ - Name: String("MIT License"), - Key: String("mit"), - SPDXID: String("MIT"), - URL: String("https://api.github.com/licenses/mit"), - Featured: Bool(true), - }, - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.License returned %+v, want %+v", got, want) - } -} - -func TestRepositoriesService_GetRequiredStatusChecks(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/required_status_checks", func(w http.ResponseWriter, r *http.Request) { - v := new(ProtectionRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprint(w, `{"strict": true,"contexts": ["x","y","z"]}`) - }) - - checks, _, err := client.Repositories.GetRequiredStatusChecks(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.GetRequiredStatusChecks returned error: %v", err) - } - - want := &RequiredStatusChecks{ - Strict: true, - Contexts: []string{"x", "y", "z"}, - } - if !reflect.DeepEqual(checks, want) { - t.Errorf("Repositories.GetRequiredStatusChecks returned %+v, want %+v", checks, want) - } -} - -func TestRepositoriesService_ListRequiredStatusChecksContexts(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/required_status_checks/contexts", func(w http.ResponseWriter, r *http.Request) { - v := new(ProtectionRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprint(w, `["x", "y", "z"]`) - }) - - contexts, _, err := client.Repositories.ListRequiredStatusChecksContexts(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.ListRequiredStatusChecksContexts returned error: %v", err) - } - - want := []string{"x", "y", "z"} - if !reflect.DeepEqual(contexts, want) { - t.Errorf("Repositories.ListRequiredStatusChecksContexts returned %+v, want %+v", contexts, want) - } -} - -func TestRepositoriesService_GetPullRequestReviewEnforcement(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/required_pull_request_reviews", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprintf(w, `{"dismissal_restrictions":{"users":[{"id":1,"login":"u"}],"teams":[{"id":2,"slug":"t"}]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true}`) - }) - - enforcement, _, err := client.Repositories.GetPullRequestReviewEnforcement(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.GetPullRequestReviewEnforcement returned error: %v", err) - } - - want := &PullRequestReviewsEnforcement{ - DismissStaleReviews: true, - DismissalRestrictions: DismissalRestrictions{ - Users: []*User{ - {Login: String("u"), ID: Int(1)}, - }, - Teams: []*Team{ - {Slug: String("t"), ID: Int(2)}, - }, - }, - RequireCodeOwnerReviews: true, - } - - if !reflect.DeepEqual(enforcement, want) { - t.Errorf("Repositories.GetPullRequestReviewEnforcement returned %+v, want %+v", enforcement, want) - } -} - -func TestRepositoriesService_UpdatePullRequestReviewEnforcement(t *testing.T) { - setup() - defer teardown() - - input := &PullRequestReviewsEnforcementUpdate{ - DismissalRestrictionsRequest: &DismissalRestrictionsRequest{ - Users: []string{"u"}, - Teams: []string{"t"}, - }, - } - - mux.HandleFunc("/repos/o/r/branches/b/protection/required_pull_request_reviews", func(w http.ResponseWriter, r *http.Request) { - v := new(PullRequestReviewsEnforcementUpdate) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprintf(w, `{"dismissal_restrictions":{"users":[{"id":1,"login":"u"}],"teams":[{"id":2,"slug":"t"}]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true}`) - }) - - enforcement, _, err := client.Repositories.UpdatePullRequestReviewEnforcement(context.Background(), "o", "r", "b", input) - if err != nil { - t.Errorf("Repositories.UpdatePullRequestReviewEnforcement returned error: %v", err) - } - - want := &PullRequestReviewsEnforcement{ - DismissStaleReviews: true, - DismissalRestrictions: DismissalRestrictions{ - Users: []*User{ - {Login: String("u"), ID: Int(1)}, - }, - Teams: []*Team{ - {Slug: String("t"), ID: Int(2)}, - }, - }, - RequireCodeOwnerReviews: true, - } - if !reflect.DeepEqual(enforcement, want) { - t.Errorf("Repositories.UpdatePullRequestReviewEnforcement returned %+v, want %+v", enforcement, want) - } -} - -func TestRepositoriesService_DisableDismissalRestrictions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/required_pull_request_reviews", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - testBody(t, r, `{"dismissal_restrictions":[]}`+"\n") - fmt.Fprintf(w, `{"dismissal_restrictions":{"users":[],"teams":[]},"dismiss_stale_reviews":true,"require_code_owner_reviews":true}`) - }) - - enforcement, _, err := client.Repositories.DisableDismissalRestrictions(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.DisableDismissalRestrictions returned error: %v", err) - } - - want := &PullRequestReviewsEnforcement{ - DismissStaleReviews: true, - DismissalRestrictions: DismissalRestrictions{ - Users: []*User{}, - Teams: []*Team{}, - }, - RequireCodeOwnerReviews: true, - } - if !reflect.DeepEqual(enforcement, want) { - t.Errorf("Repositories.DisableDismissalRestrictions returned %+v, want %+v", enforcement, want) - } -} - -func TestRepositoriesService_RemovePullRequestReviewEnforcement(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/required_pull_request_reviews", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Repositories.RemovePullRequestReviewEnforcement(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.RemovePullRequestReviewEnforcement returned error: %v", err) - } -} - -func TestRepositoriesService_GetAdminEnforcement(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/enforce_admins", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprintf(w, `{"url":"/repos/o/r/branches/b/protection/enforce_admins","enabled":true}`) - }) - - enforcement, _, err := client.Repositories.GetAdminEnforcement(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.GetAdminEnforcement returned error: %v", err) - } - - want := &AdminEnforcement{ - URL: String("/repos/o/r/branches/b/protection/enforce_admins"), - Enabled: true, - } - - if !reflect.DeepEqual(enforcement, want) { - t.Errorf("Repositories.GetAdminEnforcement returned %+v, want %+v", enforcement, want) - } -} - -func TestRepositoriesService_AddAdminEnforcement(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/enforce_admins", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - fmt.Fprintf(w, `{"url":"/repos/o/r/branches/b/protection/enforce_admins","enabled":true}`) - }) - - enforcement, _, err := client.Repositories.AddAdminEnforcement(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.AddAdminEnforcement returned error: %v", err) - } - - want := &AdminEnforcement{ - URL: String("/repos/o/r/branches/b/protection/enforce_admins"), - Enabled: true, - } - if !reflect.DeepEqual(enforcement, want) { - t.Errorf("Repositories.AddAdminEnforcement returned %+v, want %+v", enforcement, want) - } -} - -func TestRepositoriesService_RemoveAdminEnforcement(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/branches/b/protection/enforce_admins", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeProtectedBranchesPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Repositories.RemoveAdminEnforcement(context.Background(), "o", "r", "b") - if err != nil { - t.Errorf("Repositories.RemoveAdminEnforcement returned error: %v", err) - } -} - -func TestPullRequestReviewsEnforcementRequest_MarshalJSON_nilDismissalRestirctions(t *testing.T) { - req := PullRequestReviewsEnforcementRequest{} - - json, err := json.Marshal(req) - if err != nil { - t.Errorf("PullRequestReviewsEnforcementRequest.MarshalJSON returned error: %v", err) - } - - want := `{"dismissal_restrictions":[],"dismiss_stale_reviews":false,"require_code_owner_reviews":false}` - if want != string(json) { - t.Errorf("PullRequestReviewsEnforcementRequest.MarshalJSON returned %+v, want %+v", string(json), want) - } -} - -func TestRepositoriesService_ListAllTopics(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/topics", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeTopicsPreview) - fmt.Fprint(w, `{"names":["go", "go-github", "github"]}`) - }) - - got, _, err := client.Repositories.ListAllTopics(context.Background(), "o", "r") - if err != nil { - t.Fatalf("Repositories.ListAllTopics returned error: %v", err) - } - - want := &Topics{Names: []string{"go", "go-github", "github"}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.ListAllTopics returned %+v, want %+v", got, want) - } -} - -func TestRepositoriesService_ReplaceAllTopics(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/topics", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - testHeader(t, r, "Accept", mediaTypeTopicsPreview) - fmt.Fprint(w, `{"names":["go", "go-github", "github"]}`) - }) - - got, _, err := client.Repositories.ReplaceAllTopics(context.Background(), "o", "r", &Topics{Names: []string{"go", "go-github", "github"}}) - if err != nil { - t.Fatalf("Repositories.ReplaceAllTopics returned error: %v", err) - } - - want := &Topics{Names: []string{"go", "go-github", "github"}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Repositories.ReplaceAllTopics returned %+v, want %+v", got, want) - } -} diff --git a/vendor/github.com/google/go-github/github/repos_traffic_test.go b/vendor/github.com/google/go-github/github/repos_traffic_test.go deleted file mode 100644 index c425f5cd5..000000000 --- a/vendor/github.com/google/go-github/github/repos_traffic_test.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestRepositoriesService_ListTrafficReferrers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/traffic/popular/referrers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprintf(w, `[{ - "referrer": "Google", - "count": 4, - "uniques": 3 - }]`) - }) - referrers, _, err := client.Repositories.ListTrafficReferrers(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.ListPaths returned error: %+v", err) - } - - want := []*TrafficReferrer{{ - Referrer: String("Google"), - Count: Int(4), - Uniques: Int(3), - }} - if !reflect.DeepEqual(referrers, want) { - t.Errorf("Repositories.ListReferrers returned %+v, want %+v", referrers, want) - } - -} - -func TestRepositoriesService_ListTrafficPaths(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/traffic/popular/paths", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprintf(w, `[{ - "path": "/github/hubot", - "title": "github/hubot: A customizable life embetterment robot.", - "count": 3542, - "uniques": 2225 - }]`) - }) - paths, _, err := client.Repositories.ListTrafficPaths(context.Background(), "o", "r") - if err != nil { - t.Errorf("Repositories.ListPaths returned error: %+v", err) - } - - want := []*TrafficPath{{ - Path: String("/github/hubot"), - Title: String("github/hubot: A customizable life embetterment robot."), - Count: Int(3542), - Uniques: Int(2225), - }} - if !reflect.DeepEqual(paths, want) { - t.Errorf("Repositories.ListPaths returned %+v, want %+v", paths, want) - } - -} - -func TestRepositoriesService_ListTrafficViews(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/traffic/views", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprintf(w, `{"count": 7, - "uniques": 6, - "views": [{ - "timestamp": "2016-05-31T16:00:00.000Z", - "count": 7, - "uniques": 6 - }]}`) - }) - - views, _, err := client.Repositories.ListTrafficViews(context.Background(), "o", "r", nil) - if err != nil { - t.Errorf("Repositories.ListPaths returned error: %+v", err) - } - - want := &TrafficViews{ - Views: []*TrafficData{{ - Timestamp: &Timestamp{time.Date(2016, time.May, 31, 16, 0, 0, 0, time.UTC)}, - Count: Int(7), - Uniques: Int(6), - }}, - Count: Int(7), - Uniques: Int(6), - } - - if !reflect.DeepEqual(views, want) { - t.Errorf("Repositories.ListViews returned %+v, want %+v", views, want) - } - -} - -func TestRepositoriesService_ListTrafficClones(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/traffic/clones", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprintf(w, `{"count": 7, - "uniques": 6, - "clones": [{ - "timestamp": "2016-05-31T16:00:00.00Z", - "count": 7, - "uniques": 6 - }]}`) - }) - - clones, _, err := client.Repositories.ListTrafficClones(context.Background(), "o", "r", nil) - if err != nil { - t.Errorf("Repositories.ListPaths returned error: %+v", err) - } - - want := &TrafficClones{ - Clones: []*TrafficData{{ - Timestamp: &Timestamp{time.Date(2016, time.May, 31, 16, 0, 0, 0, time.UTC)}, - Count: Int(7), - Uniques: Int(6), - }}, - Count: Int(7), - Uniques: Int(6), - } - - if !reflect.DeepEqual(clones, want) { - t.Errorf("Repositories.ListViews returned %+v, want %+v", clones, want) - } - -} diff --git a/vendor/github.com/google/go-github/github/search.go b/vendor/github.com/google/go-github/github/search.go index a59735202..abaf5e1f0 100644 --- a/vendor/github.com/google/go-github/github/search.go +++ b/vendor/github.com/google/go-github/github/search.go @@ -8,6 +8,9 @@ package github import ( "context" "fmt" + "net/url" + "strconv" + "strings" qs "github.com/google/go-querystring/query" ) @@ -48,6 +51,12 @@ type SearchOptions struct { ListOptions } +// Common search parameters. +type searchParameters struct { + Query string + RepositoryID *int64 // Sent if non-nil. +} + // RepositoriesSearchResult represents the result of a repositories search. type RepositoriesSearchResult struct { Total *int `json:"total_count,omitempty"` @@ -60,7 +69,7 @@ type RepositoriesSearchResult struct { // GitHub API docs: https://developer.github.com/v3/search/#search-repositories func (s *SearchService) Repositories(ctx context.Context, query string, opt *SearchOptions) (*RepositoriesSearchResult, *Response, error) { result := new(RepositoriesSearchResult) - resp, err := s.search(ctx, "repositories", query, opt, result) + resp, err := s.search(ctx, "repositories", &searchParameters{Query: query}, opt, result) return result, resp, err } @@ -91,7 +100,7 @@ type CommitResult struct { // GitHub API docs: https://developer.github.com/v3/search/#search-commits func (s *SearchService) Commits(ctx context.Context, query string, opt *SearchOptions) (*CommitsSearchResult, *Response, error) { result := new(CommitsSearchResult) - resp, err := s.search(ctx, "commits", query, opt, result) + resp, err := s.search(ctx, "commits", &searchParameters{Query: query}, opt, result) return result, resp, err } @@ -107,7 +116,7 @@ type IssuesSearchResult struct { // GitHub API docs: https://developer.github.com/v3/search/#search-issues func (s *SearchService) Issues(ctx context.Context, query string, opt *SearchOptions) (*IssuesSearchResult, *Response, error) { result := new(IssuesSearchResult) - resp, err := s.search(ctx, "issues", query, opt, result) + resp, err := s.search(ctx, "issues", &searchParameters{Query: query}, opt, result) return result, resp, err } @@ -123,7 +132,7 @@ type UsersSearchResult struct { // GitHub API docs: https://developer.github.com/v3/search/#search-users func (s *SearchService) Users(ctx context.Context, query string, opt *SearchOptions) (*UsersSearchResult, *Response, error) { result := new(UsersSearchResult) - resp, err := s.search(ctx, "users", query, opt, result) + resp, err := s.search(ctx, "users", &searchParameters{Query: query}, opt, result) return result, resp, err } @@ -172,19 +181,57 @@ func (c CodeResult) String() string { // GitHub API docs: https://developer.github.com/v3/search/#search-code func (s *SearchService) Code(ctx context.Context, query string, opt *SearchOptions) (*CodeSearchResult, *Response, error) { result := new(CodeSearchResult) - resp, err := s.search(ctx, "code", query, opt, result) + resp, err := s.search(ctx, "code", &searchParameters{Query: query}, opt, result) + return result, resp, err +} + +// LabelsSearchResult represents the result of a code search. +type LabelsSearchResult struct { + Total *int `json:"total_count,omitempty"` + IncompleteResults *bool `json:"incomplete_results,omitempty"` + Labels []*LabelResult `json:"items,omitempty"` +} + +// LabelResult represents a single search result. +type LabelResult struct { + ID *int64 `json:"id,omitempty"` + URL *string `json:"url,omitempty"` + Name *string `json:"name,omitempty"` + Color *string `json:"color,omitempty"` + Default *bool `json:"default,omitempty"` + Description *string `json:"description,omitempty"` + Score *float64 `json:"score,omitempty"` +} + +func (l LabelResult) String() string { + return Stringify(l) +} + +// Labels searches labels in the repository with ID repoID via various criteria. +// +// GitHub API docs: https://developer.github.com/v3/search/#search-labels +func (s *SearchService) Labels(ctx context.Context, repoID int64, query string, opt *SearchOptions) (*LabelsSearchResult, *Response, error) { + result := new(LabelsSearchResult) + resp, err := s.search(ctx, "labels", &searchParameters{RepositoryID: &repoID, Query: query}, opt, result) return result, resp, err } // Helper function that executes search queries against different -// GitHub search types (repositories, commits, code, issues, users) -func (s *SearchService) search(ctx context.Context, searchType string, query string, opt *SearchOptions, result interface{}) (*Response, error) { +// GitHub search types (repositories, commits, code, issues, users, labels) +func (s *SearchService) search(ctx context.Context, searchType string, parameters *searchParameters, opt *SearchOptions, result interface{}) (*Response, error) { params, err := qs.Values(opt) if err != nil { return nil, err } - params.Set("q", query) - u := fmt.Sprintf("search/%s?%s", searchType, params.Encode()) + q := strings.Replace(parameters.Query, " ", "+", -1) + if parameters.RepositoryID != nil { + params.Set("repository_id", strconv.FormatInt(*parameters.RepositoryID, 10)) + } + query := "q=" + url.PathEscape(q) + if v := params.Encode(); v != "" { + query = query + "&" + v + } + u := fmt.Sprintf("search/%s?%s", searchType, query) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -200,6 +247,10 @@ func (s *SearchService) search(ctx context.Context, searchType string, query str // Accept header for search repositories based on topics preview endpoint // TODO: remove custom Accept header when this API fully launches. req.Header.Set("Accept", mediaTypeTopicsPreview) + case searchType == "labels": + // Accept header for search labels based on label description preview endpoint. + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) case opt != nil && opt.TextMatch: // Accept header defaults to "application/vnd.github.v3+json" // We change it here to fetch back text-match metadata diff --git a/vendor/github.com/google/go-github/github/search_test.go b/vendor/github.com/google/go-github/github/search_test.go deleted file mode 100644 index 1276e01d8..000000000 --- a/vendor/github.com/google/go-github/github/search_test.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - - "testing" -) - -func TestSearchService_Repositories(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/repositories", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "q": "blah", - "sort": "forks", - "order": "desc", - "page": "2", - "per_page": "2", - }) - - fmt.Fprint(w, `{"total_count": 4, "incomplete_results": false, "items": [{"id":1},{"id":2}]}`) - }) - - opts := &SearchOptions{Sort: "forks", Order: "desc", ListOptions: ListOptions{Page: 2, PerPage: 2}} - result, _, err := client.Search.Repositories(context.Background(), "blah", opts) - if err != nil { - t.Errorf("Search.Repositories returned error: %v", err) - } - - want := &RepositoriesSearchResult{ - Total: Int(4), - IncompleteResults: Bool(false), - Repositories: []Repository{{ID: Int(1)}, {ID: Int(2)}}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Repositories returned %+v, want %+v", result, want) - } -} - -func TestSearchService_Commits(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "q": "blah", - "sort": "author-date", - "order": "desc", - }) - - fmt.Fprint(w, `{"total_count": 4, "incomplete_results": false, "items": [{"sha":"random_hash1"},{"sha":"random_hash2"}]}`) - }) - - opts := &SearchOptions{Sort: "author-date", Order: "desc"} - result, _, err := client.Search.Commits(context.Background(), "blah", opts) - if err != nil { - t.Errorf("Search.Commits returned error: %v", err) - } - - want := &CommitsSearchResult{ - Total: Int(4), - IncompleteResults: Bool(false), - Commits: []*CommitResult{{SHA: String("random_hash1")}, {SHA: String("random_hash2")}}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Commits returned %+v, want %+v", result, want) - } -} - -func TestSearchService_Issues(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/issues", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "q": "blah", - "sort": "forks", - "order": "desc", - "page": "2", - "per_page": "2", - }) - - fmt.Fprint(w, `{"total_count": 4, "incomplete_results": true, "items": [{"number":1},{"number":2}]}`) - }) - - opts := &SearchOptions{Sort: "forks", Order: "desc", ListOptions: ListOptions{Page: 2, PerPage: 2}} - result, _, err := client.Search.Issues(context.Background(), "blah", opts) - if err != nil { - t.Errorf("Search.Issues returned error: %v", err) - } - - want := &IssuesSearchResult{ - Total: Int(4), - IncompleteResults: Bool(true), - Issues: []Issue{{Number: Int(1)}, {Number: Int(2)}}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Issues returned %+v, want %+v", result, want) - } -} - -func TestSearchService_Issues_withQualifiers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/issues", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "q": "gopher is:issue label:bug language:go", - }) - - fmt.Fprint(w, `{"total_count": 4, "incomplete_results": true, "items": [{"number":1},{"number":2}]}`) - }) - - opts := &SearchOptions{} - result, _, err := client.Search.Issues(context.Background(), "gopher is:issue label:bug language:go", opts) - if err != nil { - t.Errorf("Search.Issues returned error: %v", err) - } - - want := &IssuesSearchResult{ - Total: Int(4), - IncompleteResults: Bool(true), - Issues: []Issue{{Number: Int(1)}, {Number: Int(2)}}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Issues returned %+v, want %+v", result, want) - } -} - -func TestSearchService_Users(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/users", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "q": "blah", - "sort": "forks", - "order": "desc", - "page": "2", - "per_page": "2", - }) - - fmt.Fprint(w, `{"total_count": 4, "incomplete_results": false, "items": [{"id":1},{"id":2}]}`) - }) - - opts := &SearchOptions{Sort: "forks", Order: "desc", ListOptions: ListOptions{Page: 2, PerPage: 2}} - result, _, err := client.Search.Users(context.Background(), "blah", opts) - if err != nil { - t.Errorf("Search.Issues returned error: %v", err) - } - - want := &UsersSearchResult{ - Total: Int(4), - IncompleteResults: Bool(false), - Users: []User{{ID: Int(1)}, {ID: Int(2)}}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Users returned %+v, want %+v", result, want) - } -} - -func TestSearchService_Code(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/code", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "q": "blah", - "sort": "forks", - "order": "desc", - "page": "2", - "per_page": "2", - }) - - fmt.Fprint(w, `{"total_count": 4, "incomplete_results": false, "items": [{"name":"1"},{"name":"2"}]}`) - }) - - opts := &SearchOptions{Sort: "forks", Order: "desc", ListOptions: ListOptions{Page: 2, PerPage: 2}} - result, _, err := client.Search.Code(context.Background(), "blah", opts) - if err != nil { - t.Errorf("Search.Code returned error: %v", err) - } - - want := &CodeSearchResult{ - Total: Int(4), - IncompleteResults: Bool(false), - CodeResults: []CodeResult{{Name: String("1")}, {Name: String("2")}}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Code returned %+v, want %+v", result, want) - } -} - -func TestSearchService_CodeTextMatch(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/search/code", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - textMatchResponse := ` - { - "total_count": 1, - "incomplete_results": false, - "items": [ - { - "name":"gopher1", - "text_matches": [ - { - "fragment": "I'm afraid my friend what you have found\nIs a gopher who lives to feed", - "matches": [ - { - "text": "gopher", - "indices": [ - 14, - 21 - ] - } - ] - } - ] - } - ] - } - ` - - fmt.Fprint(w, textMatchResponse) - }) - - opts := &SearchOptions{Sort: "forks", Order: "desc", ListOptions: ListOptions{Page: 2, PerPage: 2}, TextMatch: true} - result, _, err := client.Search.Code(context.Background(), "blah", opts) - if err != nil { - t.Errorf("Search.Code returned error: %v", err) - } - - wantedCodeResult := CodeResult{ - Name: String("gopher1"), - TextMatches: []TextMatch{{ - Fragment: String("I'm afraid my friend what you have found\nIs a gopher who lives to feed"), - Matches: []Match{{Text: String("gopher"), Indices: []int{14, 21}}}, - }, - }, - } - - want := &CodeSearchResult{ - Total: Int(1), - IncompleteResults: Bool(false), - CodeResults: []CodeResult{wantedCodeResult}, - } - if !reflect.DeepEqual(result, want) { - t.Errorf("Search.Code returned %+v, want %+v", result, want) - } -} diff --git a/vendor/github.com/google/go-github/github/strings_test.go b/vendor/github.com/google/go-github/github/strings_test.go deleted file mode 100644 index 6af88acd3..000000000 --- a/vendor/github.com/google/go-github/github/strings_test.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "fmt" - "testing" - "time" -) - -func TestStringify(t *testing.T) { - var nilPointer *string - - var tests = []struct { - in interface{} - out string - }{ - // basic types - {"foo", `"foo"`}, - {123, `123`}, - {1.5, `1.5`}, - {false, `false`}, - { - []string{"a", "b"}, - `["a" "b"]`, - }, - { - struct { - A []string - }{nil}, - // nil slice is skipped - `{}`, - }, - { - struct { - A string - }{"foo"}, - // structs not of a named type get no prefix - `{A:"foo"}`, - }, - - // pointers - {nilPointer, ``}, - {String("foo"), `"foo"`}, - {Int(123), `123`}, - {Bool(false), `false`}, - { - []*string{String("a"), String("b")}, - `["a" "b"]`, - }, - - // actual GitHub structs - { - Timestamp{time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC)}, - `github.Timestamp{2006-01-02 15:04:05 +0000 UTC}`, - }, - { - &Timestamp{time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC)}, - `github.Timestamp{2006-01-02 15:04:05 +0000 UTC}`, - }, - { - User{ID: Int(123), Name: String("n")}, - `github.User{ID:123, Name:"n"}`, - }, - { - Repository{Owner: &User{ID: Int(123)}}, - `github.Repository{Owner:github.User{ID:123}}`, - }, - } - - for i, tt := range tests { - s := Stringify(tt.in) - if s != tt.out { - t.Errorf("%d. Stringify(%q) => %q, want %q", i, tt.in, s, tt.out) - } - } -} - -// Directly test the String() methods on various GitHub types. We don't do an -// exaustive test of all the various field types, since TestStringify() above -// takes care of that. Rather, we just make sure that Stringify() is being -// used to build the strings, which we do by verifying that pointers are -// stringified as their underlying value. -func TestString(t *testing.T) { - var tests = []struct { - in interface{} - out string - }{ - {CodeResult{Name: String("n")}, `github.CodeResult{Name:"n"}`}, - {CommitAuthor{Name: String("n")}, `github.CommitAuthor{Name:"n"}`}, - {CommitFile{SHA: String("s")}, `github.CommitFile{SHA:"s"}`}, - {CommitStats{Total: Int(1)}, `github.CommitStats{Total:1}`}, - {CommitsComparison{TotalCommits: Int(1)}, `github.CommitsComparison{TotalCommits:1}`}, - {Commit{SHA: String("s")}, `github.Commit{SHA:"s"}`}, - {Event{ID: String("1")}, `github.Event{ID:"1"}`}, - {GistComment{ID: Int(1)}, `github.GistComment{ID:1}`}, - {GistFile{Size: Int(1)}, `github.GistFile{Size:1}`}, - {Gist{ID: String("1")}, `github.Gist{ID:"1", Files:map[]}`}, - {GitObject{SHA: String("s")}, `github.GitObject{SHA:"s"}`}, - {Gitignore{Name: String("n")}, `github.Gitignore{Name:"n"}`}, - {Hook{ID: Int(1)}, `github.Hook{Config:map[], ID:1}`}, - {IssueComment{ID: Int(1)}, `github.IssueComment{ID:1}`}, - {Issue{Number: Int(1)}, `github.Issue{Number:1}`}, - {Key{ID: Int(1)}, `github.Key{ID:1}`}, - {Label{ID: Int(1), Name: String("l")}, `github.Label{ID:1, Name:"l"}`}, - {Organization{ID: Int(1)}, `github.Organization{ID:1}`}, - {PullRequestComment{ID: Int(1)}, `github.PullRequestComment{ID:1}`}, - {PullRequest{Number: Int(1)}, `github.PullRequest{Number:1}`}, - {PullRequestReview{ID: Int(1)}, `github.PullRequestReview{ID:1}`}, - {DraftReviewComment{Position: Int(1)}, `github.DraftReviewComment{Position:1}`}, - {PullRequestReviewRequest{Body: String("r")}, `github.PullRequestReviewRequest{Body:"r"}`}, - {PullRequestReviewDismissalRequest{Message: String("r")}, `github.PullRequestReviewDismissalRequest{Message:"r"}`}, - {PushEventCommit{SHA: String("s")}, `github.PushEventCommit{SHA:"s"}`}, - {PushEvent{PushID: Int(1)}, `github.PushEvent{PushID:1}`}, - {Reference{Ref: String("r")}, `github.Reference{Ref:"r"}`}, - {ReleaseAsset{ID: Int(1)}, `github.ReleaseAsset{ID:1}`}, - {RepoStatus{ID: Int(1)}, `github.RepoStatus{ID:1}`}, - {RepositoryComment{ID: Int(1)}, `github.RepositoryComment{ID:1}`}, - {RepositoryCommit{SHA: String("s")}, `github.RepositoryCommit{SHA:"s"}`}, - {RepositoryContent{Name: String("n")}, `github.RepositoryContent{Name:"n"}`}, - {RepositoryRelease{ID: Int(1)}, `github.RepositoryRelease{ID:1}`}, - {Repository{ID: Int(1)}, `github.Repository{ID:1}`}, - {Team{ID: Int(1)}, `github.Team{ID:1}`}, - {TreeEntry{SHA: String("s")}, `github.TreeEntry{SHA:"s"}`}, - {Tree{SHA: String("s")}, `github.Tree{SHA:"s"}`}, - {User{ID: Int(1)}, `github.User{ID:1}`}, - {WebHookAuthor{Name: String("n")}, `github.WebHookAuthor{Name:"n"}`}, - {WebHookCommit{ID: String("1")}, `github.WebHookCommit{ID:"1"}`}, - {WebHookPayload{Ref: String("r")}, `github.WebHookPayload{Ref:"r"}`}, - } - - for i, tt := range tests { - s := tt.in.(fmt.Stringer).String() - if s != tt.out { - t.Errorf("%d. String() => %q, want %q", i, tt.in, tt.out) - } - } -} diff --git a/vendor/github.com/google/go-github/github/orgs_teams.go b/vendor/github.com/google/go-github/github/teams.go similarity index 50% rename from vendor/github.com/google/go-github/github/orgs_teams.go rename to vendor/github.com/google/go-github/github/teams.go index 8a209d93f..c3773e00e 100644 --- a/vendor/github.com/google/go-github/github/orgs_teams.go +++ b/vendor/github.com/google/go-github/github/teams.go @@ -1,4 +1,4 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. +// Copyright 2018 The go-github AUTHORS. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -12,10 +12,16 @@ import ( "time" ) +// TeamsService provides access to the team-related functions +// in the GitHub API. +// +// GitHub API docs: https://developer.github.com/v3/teams/ +type TeamsService service + // Team represents a team within a GitHub organization. Teams are used to // manage access to an organization's repositories. type Team struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` @@ -49,13 +55,15 @@ func (t Team) String() string { // Invitation represents a team member's invitation status. type Invitation struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Login *string `json:"login,omitempty"` Email *string `json:"email,omitempty"` // Role can be one of the values - 'direct_member', 'admin', 'billing_manager', 'hiring_manager', or 'reinstate'. - Role *string `json:"role,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - Inviter *User `json:"inviter,omitempty"` + Role *string `json:"role,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Inviter *User `json:"inviter,omitempty"` + TeamCount *int `json:"team_count,omitempty"` + InvitationTeamURL *string `json:"invitation_team_url,omitempty"` } func (i Invitation) String() string { @@ -64,8 +72,8 @@ func (i Invitation) String() string { // ListTeams lists all of the teams for an organization. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-teams -func (s *OrganizationsService) ListTeams(ctx context.Context, org string, opt *ListOptions) ([]*Team, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#list-teams +func (s *TeamsService) ListTeams(ctx context.Context, org string, opt *ListOptions) ([]*Team, *Response, error) { u := fmt.Sprintf("orgs/%v/teams", org) u, err := addOptions(u, opt) if err != nil { @@ -91,8 +99,8 @@ func (s *OrganizationsService) ListTeams(ctx context.Context, org string, opt *L // GetTeam fetches a team by ID. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team -func (s *OrganizationsService) GetTeam(ctx context.Context, team int) (*Team, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#get-team +func (s *TeamsService) GetTeam(ctx context.Context, team int64) (*Team, *Response, error) { u := fmt.Sprintf("teams/%v", team) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -117,7 +125,7 @@ type NewTeam struct { Description *string `json:"description,omitempty"` Maintainers []string `json:"maintainers,omitempty"` RepoNames []string `json:"repo_names,omitempty"` - ParentTeamID *int `json:"parent_team_id,omitempty"` + ParentTeamID *int64 `json:"parent_team_id,omitempty"` // Deprecated: Permission is deprecated when creating or editing a team in an org // using the new GitHub permission model. It no longer identifies the @@ -144,8 +152,8 @@ func (s NewTeam) String() string { // CreateTeam creates a new team within an organization. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#create-team -func (s *OrganizationsService) CreateTeam(ctx context.Context, org string, team *NewTeam) (*Team, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#create-team +func (s *TeamsService) CreateTeam(ctx context.Context, org string, team NewTeam) (*Team, *Response, error) { u := fmt.Sprintf("orgs/%v/teams", org) req, err := s.client.NewRequest("POST", u, team) if err != nil { @@ -166,8 +174,8 @@ func (s *OrganizationsService) CreateTeam(ctx context.Context, org string, team // EditTeam edits a team. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#edit-team -func (s *OrganizationsService) EditTeam(ctx context.Context, id int, team *NewTeam) (*Team, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#edit-team +func (s *TeamsService) EditTeam(ctx context.Context, id int64, team NewTeam) (*Team, *Response, error) { u := fmt.Sprintf("teams/%v", id) req, err := s.client.NewRequest("PATCH", u, team) if err != nil { @@ -188,8 +196,8 @@ func (s *OrganizationsService) EditTeam(ctx context.Context, id int, team *NewTe // DeleteTeam deletes a team. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#delete-team -func (s *OrganizationsService) DeleteTeam(ctx context.Context, team int) (*Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#delete-team +func (s *TeamsService) DeleteTeam(ctx context.Context, team int64) (*Response, error) { u := fmt.Sprintf("teams/%v", team) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -201,20 +209,10 @@ func (s *OrganizationsService) DeleteTeam(ctx context.Context, team int) (*Respo return s.client.Do(ctx, req, nil) } -// OrganizationListTeamMembersOptions specifies the optional parameters to the -// OrganizationsService.ListTeamMembers method. -type OrganizationListTeamMembersOptions struct { - // Role filters members returned by their role in the team. Possible - // values are "all", "member", "maintainer". Default is "all". - Role string `url:"role,omitempty"` - - ListOptions -} - // ListChildTeams lists child teams for a team. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-child-teams -func (s *OrganizationsService) ListChildTeams(ctx context.Context, teamID int, opt *ListOptions) ([]*Team, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#list-child-teams +func (s *TeamsService) ListChildTeams(ctx context.Context, teamID int64, opt *ListOptions) ([]*Team, *Response, error) { u := fmt.Sprintf("teams/%v/teams", teamID) u, err := addOptions(u, opt) if err != nil { @@ -237,55 +235,10 @@ func (s *OrganizationsService) ListChildTeams(ctx context.Context, teamID int, o return teams, resp, nil } -// ListTeamMembers lists all of the users who are members of the specified -// team. -// -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-team-members -func (s *OrganizationsService) ListTeamMembers(ctx context.Context, team int, opt *OrganizationListTeamMembersOptions) ([]*User, *Response, error) { - u := fmt.Sprintf("teams/%v/members", team) - u, err := addOptions(u, opt) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeNestedTeamsPreview) - - var members []*User - resp, err := s.client.Do(ctx, req, &members) - if err != nil { - return nil, resp, err - } - - return members, resp, nil -} - -// IsTeamMember checks if a user is a member of the specified team. -// -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team-member -// -// Deprecated: This API has been marked as deprecated in the Github API docs, -// OrganizationsService.GetTeamMembership method should be used instead. -func (s *OrganizationsService) IsTeamMember(ctx context.Context, team int, user string) (bool, *Response, error) { - u := fmt.Sprintf("teams/%v/members/%v", team, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return false, nil, err - } - - resp, err := s.client.Do(ctx, req, nil) - member, err := parseBoolResponse(err) - return member, resp, err -} - // ListTeamRepos lists the repositories that the specified team has access to. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-team-repos -func (s *OrganizationsService) ListTeamRepos(ctx context.Context, team int, opt *ListOptions) ([]*Repository, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#list-team-repos +func (s *TeamsService) ListTeamRepos(ctx context.Context, team int64, opt *ListOptions) ([]*Repository, *Response, error) { u := fmt.Sprintf("teams/%v/repos", team) u, err := addOptions(u, opt) if err != nil { @@ -314,8 +267,8 @@ func (s *OrganizationsService) ListTeamRepos(ctx context.Context, team int, opt // repository is managed by team, a Repository is returned which includes the // permissions team has for that repo. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#check-if-a-team-manages-a-repository -func (s *OrganizationsService) IsTeamRepo(ctx context.Context, team int, owner string, repo string) (*Repository, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository +func (s *TeamsService) IsTeamRepo(ctx context.Context, team int64, owner string, repo string) (*Repository, *Response, error) { u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -334,9 +287,9 @@ func (s *OrganizationsService) IsTeamRepo(ctx context.Context, team int, owner s return repository, resp, nil } -// OrganizationAddTeamRepoOptions specifies the optional parameters to the -// OrganizationsService.AddTeamRepo method. -type OrganizationAddTeamRepoOptions struct { +// TeamAddTeamRepoOptions specifies the optional parameters to the +// TeamsService.AddTeamRepo method. +type TeamAddTeamRepoOptions struct { // Permission specifies the permission to grant the team on this repository. // Possible values are: // pull - team members can pull, but not push to or administer this repository @@ -351,8 +304,8 @@ type OrganizationAddTeamRepoOptions struct { // specified repository must be owned by the organization to which the team // belongs, or a direct fork of a repository owned by the organization. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#add-team-repo -func (s *OrganizationsService) AddTeamRepo(ctx context.Context, team int, owner string, repo string, opt *OrganizationAddTeamRepoOptions) (*Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#add-team-repo +func (s *TeamsService) AddTeamRepo(ctx context.Context, team int64, owner string, repo string, opt *TeamAddTeamRepoOptions) (*Response, error) { u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo) req, err := s.client.NewRequest("PUT", u, opt) if err != nil { @@ -366,8 +319,8 @@ func (s *OrganizationsService) AddTeamRepo(ctx context.Context, team int, owner // team. Note that this does not delete the repository, it just removes it // from the team. // -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#remove-team-repo -func (s *OrganizationsService) RemoveTeamRepo(ctx context.Context, team int, owner string, repo string) (*Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#remove-team-repo +func (s *TeamsService) RemoveTeamRepo(ctx context.Context, team int64, owner string, repo string) (*Response, error) { u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { @@ -378,8 +331,8 @@ func (s *OrganizationsService) RemoveTeamRepo(ctx context.Context, team int, own } // ListUserTeams lists a user's teams -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-user-teams -func (s *OrganizationsService) ListUserTeams(ctx context.Context, opt *ListOptions) ([]*Team, *Response, error) { +// GitHub API docs: https://developer.github.com/v3/teams/#list-user-teams +func (s *TeamsService) ListUserTeams(ctx context.Context, opt *ListOptions) ([]*Team, *Response, error) { u := "user/teams" u, err := addOptions(u, opt) if err != nil { @@ -402,111 +355,3 @@ func (s *OrganizationsService) ListUserTeams(ctx context.Context, opt *ListOptio return teams, resp, nil } - -// GetTeamMembership returns the membership status for a user in a team. -// -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team-membership -func (s *OrganizationsService) GetTeamMembership(ctx context.Context, team int, user string) (*Membership, *Response, error) { - u := fmt.Sprintf("teams/%v/memberships/%v", team, user) - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - req.Header.Set("Accept", mediaTypeNestedTeamsPreview) - - t := new(Membership) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// OrganizationAddTeamMembershipOptions does stuff specifies the optional -// parameters to the OrganizationsService.AddTeamMembership method. -type OrganizationAddTeamMembershipOptions struct { - // Role specifies the role the user should have in the team. Possible - // values are: - // member - a normal member of the team - // maintainer - a team maintainer. Able to add/remove other team - // members, promote other team members to team - // maintainer, and edit the team’s name and description - // - // Default value is "member". - Role string `json:"role,omitempty"` -} - -// AddTeamMembership adds or invites a user to a team. -// -// In order to add a membership between a user and a team, the authenticated -// user must have 'admin' permissions to the team or be an owner of the -// organization that the team is associated with. -// -// If the user is already a part of the team's organization (meaning they're on -// at least one other team in the organization), this endpoint will add the -// user to the team. -// -// If the user is completely unaffiliated with the team's organization (meaning -// they're on none of the organization's teams), this endpoint will send an -// invitation to the user via email. This newly-created membership will be in -// the "pending" state until the user accepts the invitation, at which point -// the membership will transition to the "active" state and the user will be -// added as a member of the team. -// -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#add-team-membership -func (s *OrganizationsService) AddTeamMembership(ctx context.Context, team int, user string, opt *OrganizationAddTeamMembershipOptions) (*Membership, *Response, error) { - u := fmt.Sprintf("teams/%v/memberships/%v", team, user) - req, err := s.client.NewRequest("PUT", u, opt) - if err != nil { - return nil, nil, err - } - - t := new(Membership) - resp, err := s.client.Do(ctx, req, t) - if err != nil { - return nil, resp, err - } - - return t, resp, nil -} - -// RemoveTeamMembership removes a user from a team. -// -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#remove-team-membership -func (s *OrganizationsService) RemoveTeamMembership(ctx context.Context, team int, user string) (*Response, error) { - u := fmt.Sprintf("teams/%v/memberships/%v", team, user) - req, err := s.client.NewRequest("DELETE", u, nil) - if err != nil { - return nil, err - } - - return s.client.Do(ctx, req, nil) -} - -// ListPendingTeamInvitations get pending invitaion list in team. -// Warning: The API may change without advance notice during the preview period. -// Preview features are not supported for production use. -// -// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-pending-team-invitations -func (s *OrganizationsService) ListPendingTeamInvitations(ctx context.Context, team int, opt *ListOptions) ([]*Invitation, *Response, error) { - u := fmt.Sprintf("teams/%v/invitations", team) - u, err := addOptions(u, opt) - if err != nil { - return nil, nil, err - } - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - var pendingInvitations []*Invitation - resp, err := s.client.Do(ctx, req, &pendingInvitations) - if err != nil { - return nil, resp, err - } - - return pendingInvitations, resp, nil -} diff --git a/vendor/github.com/google/go-github/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/github/teams_discussion_comments.go new file mode 100644 index 000000000..a0206b9c9 --- /dev/null +++ b/vendor/github.com/google/go-github/github/teams_discussion_comments.go @@ -0,0 +1,155 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// DiscussionComment represents a GitHub dicussion in a team. +type DiscussionComment struct { + Author *User `json:"author,omitempty"` + Body *string `json:"body,omitempty"` + BodyHTML *string `json:"body_html,omitempty"` + BodyVersion *string `json:"body_version,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + LastEditedAt *Timestamp `json:"last_edited_at,omitempty"` + DiscussionURL *string `json:"discussion_url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Number *int `json:"number,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + URL *string `json:"url,omitempty"` + Reactions *Reactions `json:"reactions,omitempty"` +} + +func (c DiscussionComment) String() string { + return Stringify(c) +} + +// DiscussionCommentListOptions specifies optional parameters to the +// TeamServices.ListComments method. +type DiscussionCommentListOptions struct { + // Sorts the discussion comments by the date they were created. + // Accepted values are asc and desc. Default is desc. + Direction string `url:"direction,omitempty"` +} + +// ListComments lists all comments on a team discussion. +// Authenticated user must grant read:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#list-comments +func (s *TeamsService) ListComments(ctx context.Context, teamID int64, discussionNumber int, options *DiscussionCommentListOptions) ([]*DiscussionComment, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments", teamID, discussionNumber) + u, err := addOptions(u, options) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + var comments []*DiscussionComment + resp, err := s.client.Do(ctx, req, &comments) + if err != nil { + return nil, resp, err + } + + return comments, resp, nil +} + +// GetComment gets a specific comment on a team discussion. +// Authenticated user must grant read:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment +func (s *TeamsService) GetComment(ctx context.Context, teamID int64, discussionNumber, commentNumber int) (*DiscussionComment, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v", teamID, discussionNumber, commentNumber) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + discussionComment := &DiscussionComment{} + resp, err := s.client.Do(ctx, req, discussionComment) + if err != nil { + return nil, resp, err + } + + return discussionComment, resp, nil +} + +// CreateComment creates a new discussion post on a team discussion. +// Authenticated user must grant write:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#create-a-comment +func (s *TeamsService) CreateComment(ctx context.Context, teamID int64, discsusionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments", teamID, discsusionNumber) + req, err := s.client.NewRequest("POST", u, comment) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + discussionComment := &DiscussionComment{} + resp, err := s.client.Do(ctx, req, discussionComment) + if err != nil { + return nil, resp, err + } + + return discussionComment, resp, nil +} + +// EditComment edits the body text of a discussion comment. +// Authenticated user must grant write:discussion scope. +// User is allowed to edit body of a comment only. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment +func (s *TeamsService) EditComment(ctx context.Context, teamID int64, discussionNumber, commentNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v", teamID, discussionNumber, commentNumber) + req, err := s.client.NewRequest("PATCH", u, comment) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + discussionComment := &DiscussionComment{} + resp, err := s.client.Do(ctx, req, discussionComment) + if err != nil { + return nil, resp, err + } + + return discussionComment, resp, nil +} + +// DeleteComment deletes a comment on a team discussion. +// Authenticated user must grant write:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment +func (s *TeamsService) DeleteComment(ctx context.Context, teamID int64, discussionNumber, commentNumber int) (*Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v/comments/%v", teamID, discussionNumber, commentNumber) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/github/teams_discussions.go b/vendor/github.com/google/go-github/github/teams_discussions.go new file mode 100644 index 000000000..f491c9d1d --- /dev/null +++ b/vendor/github.com/google/go-github/github/teams_discussions.go @@ -0,0 +1,160 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// TeamDiscussion represents a GitHub dicussion in a team. +type TeamDiscussion struct { + Author *User `json:"author,omitempty"` + Body *string `json:"body,omitempty"` + BodyHTML *string `json:"body_html,omitempty"` + BodyVersion *string `json:"body_version,omitempty"` + CommentsCount *int `json:"comments_count,omitempty"` + CommentsURL *string `json:"comments_url,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + LastEditedAt *Timestamp `json:"last_edited_at,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Number *int `json:"number,omitempty"` + Pinned *bool `json:"pinned,omitempty"` + Private *bool `json:"private,omitempty"` + TeamURL *string `json:"team_url,omitempty"` + Title *string `json:"title,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + URL *string `json:"url,omitempty"` + Reactions *Reactions `json:"reactions,omitempty"` +} + +func (d TeamDiscussion) String() string { + return Stringify(d) +} + +// DiscussionListOptions specifies optional parameters to the +// TeamServices.ListDiscussions method. +type DiscussionListOptions struct { + // Sorts the discussion by the date they were created. + // Accepted values are asc and desc. Default is desc. + Direction string `url:"direction,omitempty"` +} + +// ListDiscussions lists all discussions on team's page. +// Authenticated user must grant read:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussions/#list-discussions +func (s *TeamsService) ListDiscussions(ctx context.Context, teamID int64, options *DiscussionListOptions) ([]*TeamDiscussion, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions", teamID) + u, err := addOptions(u, options) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + var teamDiscussions []*TeamDiscussion + resp, err := s.client.Do(ctx, req, &teamDiscussions) + if err != nil { + return nil, resp, err + } + + return teamDiscussions, resp, nil +} + +// GetDiscussion gets a specific discussion on a team's page. +// Authenticated user must grant read:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussions/#get-a-single-discussion +func (s *TeamsService) GetDiscussion(ctx context.Context, teamID int64, discussionNumber int) (*TeamDiscussion, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v", teamID, discussionNumber) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + teamDiscussion := &TeamDiscussion{} + resp, err := s.client.Do(ctx, req, teamDiscussion) + if err != nil { + return nil, resp, err + } + + return teamDiscussion, resp, nil +} + +// CreateDiscussion creates a new discussion post on a team's page. +// Authenticated user must grant write:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussions/#create-a-discussion +func (s *TeamsService) CreateDiscussion(ctx context.Context, teamID int64, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions", teamID) + req, err := s.client.NewRequest("POST", u, discussion) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + teamDiscussion := &TeamDiscussion{} + resp, err := s.client.Do(ctx, req, teamDiscussion) + if err != nil { + return nil, resp, err + } + + return teamDiscussion, resp, nil +} + +// EditDiscussion edits the title and body text of a discussion post. +// Authenticated user must grant write:discussion scope. +// User is allowed to change Title and Body of a discussion only. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussions/#edit-a-discussion +func (s *TeamsService) EditDiscussion(ctx context.Context, teamID int64, discussionNumber int, discussion TeamDiscussion) (*TeamDiscussion, *Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v", teamID, discussionNumber) + req, err := s.client.NewRequest("PATCH", u, discussion) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + teamDiscussion := &TeamDiscussion{} + resp, err := s.client.Do(ctx, req, teamDiscussion) + if err != nil { + return nil, resp, err + } + + return teamDiscussion, resp, nil +} + +// DeleteDiscussion deletes a discussion from team's page. +// Authenticated user must grant write:discussion scope. +// +// GitHub API docs: https://developer.github.com/v3/teams/discussions/#delete-a-discussion +func (s *TeamsService) DeleteDiscussion(ctx context.Context, teamID int64, discussionNumber int) (*Response, error) { + u := fmt.Sprintf("teams/%v/discussions/%v", teamID, discussionNumber) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamDiscussionsPreview) + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/github/teams_members.go b/vendor/github.com/google/go-github/github/teams_members.go new file mode 100644 index 000000000..d5cfa0dc7 --- /dev/null +++ b/vendor/github.com/google/go-github/github/teams_members.go @@ -0,0 +1,174 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// TeamListTeamMembersOptions specifies the optional parameters to the +// TeamsService.ListTeamMembers method. +type TeamListTeamMembersOptions struct { + // Role filters members returned by their role in the team. Possible + // values are "all", "member", "maintainer". Default is "all". + Role string `url:"role,omitempty"` + + ListOptions +} + +// ListTeamMembers lists all of the users who are members of the specified +// team. +// +// GitHub API docs: https://developer.github.com/v3/teams/members/#list-team-members +func (s *TeamsService) ListTeamMembers(ctx context.Context, team int64, opt *TeamListTeamMembersOptions) ([]*User, *Response, error) { + u := fmt.Sprintf("teams/%v/members", team) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeNestedTeamsPreview) + + var members []*User + resp, err := s.client.Do(ctx, req, &members) + if err != nil { + return nil, resp, err + } + + return members, resp, nil +} + +// IsTeamMember checks if a user is a member of the specified team. +// +// GitHub API docs: https://developer.github.com/v3/teams/members/#get-team-member +// +// Deprecated: This API has been marked as deprecated in the Github API docs, +// TeamsService.GetTeamMembership method should be used instead. +func (s *TeamsService) IsTeamMember(ctx context.Context, team int64, user string) (bool, *Response, error) { + u := fmt.Sprintf("teams/%v/members/%v", team, user) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return false, nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + member, err := parseBoolResponse(err) + return member, resp, err +} + +// GetTeamMembership returns the membership status for a user in a team. +// +// GitHub API docs: https://developer.github.com/v3/teams/members/#get-team-membership +func (s *TeamsService) GetTeamMembership(ctx context.Context, team int64, user string) (*Membership, *Response, error) { + u := fmt.Sprintf("teams/%v/memberships/%v", team, user) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeNestedTeamsPreview) + + t := new(Membership) + resp, err := s.client.Do(ctx, req, t) + if err != nil { + return nil, resp, err + } + + return t, resp, nil +} + +// TeamAddTeamMembershipOptions specifies the optional +// parameters to the TeamsService.AddTeamMembership method. +type TeamAddTeamMembershipOptions struct { + // Role specifies the role the user should have in the team. Possible + // values are: + // member - a normal member of the team + // maintainer - a team maintainer. Able to add/remove other team + // members, promote other team members to team + // maintainer, and edit the team’s name and description + // + // Default value is "member". + Role string `json:"role,omitempty"` +} + +// AddTeamMembership adds or invites a user to a team. +// +// In order to add a membership between a user and a team, the authenticated +// user must have 'admin' permissions to the team or be an owner of the +// organization that the team is associated with. +// +// If the user is already a part of the team's organization (meaning they're on +// at least one other team in the organization), this endpoint will add the +// user to the team. +// +// If the user is completely unaffiliated with the team's organization (meaning +// they're on none of the organization's teams), this endpoint will send an +// invitation to the user via email. This newly-created membership will be in +// the "pending" state until the user accepts the invitation, at which point +// the membership will transition to the "active" state and the user will be +// added as a member of the team. +// +// GitHub API docs: https://developer.github.com/v3/teams/members/#add-or-update-team-membership +func (s *TeamsService) AddTeamMembership(ctx context.Context, team int64, user string, opt *TeamAddTeamMembershipOptions) (*Membership, *Response, error) { + u := fmt.Sprintf("teams/%v/memberships/%v", team, user) + req, err := s.client.NewRequest("PUT", u, opt) + if err != nil { + return nil, nil, err + } + + t := new(Membership) + resp, err := s.client.Do(ctx, req, t) + if err != nil { + return nil, resp, err + } + + return t, resp, nil +} + +// RemoveTeamMembership removes a user from a team. +// +// GitHub API docs: https://developer.github.com/v3/teams/members/#remove-team-membership +func (s *TeamsService) RemoveTeamMembership(ctx context.Context, team int64, user string) (*Response, error) { + u := fmt.Sprintf("teams/%v/memberships/%v", team, user) + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// ListPendingTeamInvitations get pending invitaion list in team. +// Warning: The API may change without advance notice during the preview period. +// Preview features are not supported for production use. +// +// GitHub API docs: https://developer.github.com/v3/teams/members/#list-pending-team-invitations +func (s *TeamsService) ListPendingTeamInvitations(ctx context.Context, team int64, opt *ListOptions) ([]*Invitation, *Response, error) { + u := fmt.Sprintf("teams/%v/invitations", team) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var pendingInvitations []*Invitation + resp, err := s.client.Do(ctx, req, &pendingInvitations) + if err != nil { + return nil, resp, err + } + + return pendingInvitations, resp, nil +} diff --git a/vendor/github.com/google/go-github/github/timestamp.go b/vendor/github.com/google/go-github/github/timestamp.go index a1c1554a3..90929d575 100644 --- a/vendor/github.com/google/go-github/github/timestamp.go +++ b/vendor/github.com/google/go-github/github/timestamp.go @@ -28,9 +28,9 @@ func (t *Timestamp) UnmarshalJSON(data []byte) (err error) { str := string(data) i, err := strconv.ParseInt(str, 10, 64) if err == nil { - (*t).Time = time.Unix(i, 0) + t.Time = time.Unix(i, 0) } else { - (*t).Time, err = time.Parse(`"`+time.RFC3339+`"`, str) + t.Time, err = time.Parse(`"`+time.RFC3339+`"`, str) } return } diff --git a/vendor/github.com/google/go-github/github/timestamp_test.go b/vendor/github.com/google/go-github/github/timestamp_test.go deleted file mode 100644 index ea7fa0eb5..000000000 --- a/vendor/github.com/google/go-github/github/timestamp_test.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "encoding/json" - "fmt" - "testing" - "time" -) - -const ( - emptyTimeStr = `"0001-01-01T00:00:00Z"` - referenceTimeStr = `"2006-01-02T15:04:05Z"` - referenceTimeStrFractional = `"2006-01-02T15:04:05.000Z"` // This format was returned by the Projects API before October 1, 2017. - referenceUnixTimeStr = `1136214245` -) - -var ( - referenceTime = time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC) - unixOrigin = time.Unix(0, 0).In(time.UTC) -) - -func TestTimestamp_Marshal(t *testing.T) { - testCases := []struct { - desc string - data Timestamp - want string - wantErr bool - equal bool - }{ - {"Reference", Timestamp{referenceTime}, referenceTimeStr, false, true}, - {"Empty", Timestamp{}, emptyTimeStr, false, true}, - {"Mismatch", Timestamp{}, referenceTimeStr, false, false}, - } - for _, tc := range testCases { - out, err := json.Marshal(tc.data) - if gotErr := err != nil; gotErr != tc.wantErr { - t.Errorf("%s: gotErr=%v, wantErr=%v, err=%v", tc.desc, gotErr, tc.wantErr, err) - } - got := string(out) - equal := got == tc.want - if (got == tc.want) != tc.equal { - t.Errorf("%s: got=%s, want=%s, equal=%v, want=%v", tc.desc, got, tc.want, equal, tc.equal) - } - } -} - -func TestTimestamp_Unmarshal(t *testing.T) { - testCases := []struct { - desc string - data string - want Timestamp - wantErr bool - equal bool - }{ - {"Reference", referenceTimeStr, Timestamp{referenceTime}, false, true}, - {"ReferenceUnix", referenceUnixTimeStr, Timestamp{referenceTime}, false, true}, - {"ReferenceFractional", referenceTimeStrFractional, Timestamp{referenceTime}, false, true}, - {"Empty", emptyTimeStr, Timestamp{}, false, true}, - {"UnixStart", `0`, Timestamp{unixOrigin}, false, true}, - {"Mismatch", referenceTimeStr, Timestamp{}, false, false}, - {"MismatchUnix", `0`, Timestamp{}, false, false}, - {"Invalid", `"asdf"`, Timestamp{referenceTime}, true, false}, - } - for _, tc := range testCases { - var got Timestamp - err := json.Unmarshal([]byte(tc.data), &got) - if gotErr := err != nil; gotErr != tc.wantErr { - t.Errorf("%s: gotErr=%v, wantErr=%v, err=%v", tc.desc, gotErr, tc.wantErr, err) - continue - } - equal := got.Equal(tc.want) - if equal != tc.equal { - t.Errorf("%s: got=%#v, want=%#v, equal=%v, want=%v", tc.desc, got, tc.want, equal, tc.equal) - } - } -} - -func TestTimstamp_MarshalReflexivity(t *testing.T) { - testCases := []struct { - desc string - data Timestamp - }{ - {"Reference", Timestamp{referenceTime}}, - {"Empty", Timestamp{}}, - } - for _, tc := range testCases { - data, err := json.Marshal(tc.data) - if err != nil { - t.Errorf("%s: Marshal err=%v", tc.desc, err) - } - var got Timestamp - err = json.Unmarshal(data, &got) - if err != nil { - t.Errorf("%s: Unmarshal err=%v", tc.desc, err) - } - if !got.Equal(tc.data) { - t.Errorf("%s: %+v != %+v", tc.desc, got, data) - } - } -} - -type WrappedTimestamp struct { - A int - Time Timestamp -} - -func TestWrappedTimstamp_Marshal(t *testing.T) { - testCases := []struct { - desc string - data WrappedTimestamp - want string - wantErr bool - equal bool - }{ - {"Reference", WrappedTimestamp{0, Timestamp{referenceTime}}, fmt.Sprintf(`{"A":0,"Time":%s}`, referenceTimeStr), false, true}, - {"Empty", WrappedTimestamp{}, fmt.Sprintf(`{"A":0,"Time":%s}`, emptyTimeStr), false, true}, - {"Mismatch", WrappedTimestamp{}, fmt.Sprintf(`{"A":0,"Time":%s}`, referenceTimeStr), false, false}, - } - for _, tc := range testCases { - out, err := json.Marshal(tc.data) - if gotErr := err != nil; gotErr != tc.wantErr { - t.Errorf("%s: gotErr=%v, wantErr=%v, err=%v", tc.desc, gotErr, tc.wantErr, err) - } - got := string(out) - equal := got == tc.want - if equal != tc.equal { - t.Errorf("%s: got=%s, want=%s, equal=%v, want=%v", tc.desc, got, tc.want, equal, tc.equal) - } - } -} - -func TestWrappedTimstamp_Unmarshal(t *testing.T) { - testCases := []struct { - desc string - data string - want WrappedTimestamp - wantErr bool - equal bool - }{ - {"Reference", referenceTimeStr, WrappedTimestamp{0, Timestamp{referenceTime}}, false, true}, - {"ReferenceUnix", referenceUnixTimeStr, WrappedTimestamp{0, Timestamp{referenceTime}}, false, true}, - {"Empty", emptyTimeStr, WrappedTimestamp{0, Timestamp{}}, false, true}, - {"UnixStart", `0`, WrappedTimestamp{0, Timestamp{unixOrigin}}, false, true}, - {"Mismatch", referenceTimeStr, WrappedTimestamp{0, Timestamp{}}, false, false}, - {"MismatchUnix", `0`, WrappedTimestamp{0, Timestamp{}}, false, false}, - {"Invalid", `"asdf"`, WrappedTimestamp{0, Timestamp{referenceTime}}, true, false}, - } - for _, tc := range testCases { - var got Timestamp - err := json.Unmarshal([]byte(tc.data), &got) - if gotErr := err != nil; gotErr != tc.wantErr { - t.Errorf("%s: gotErr=%v, wantErr=%v, err=%v", tc.desc, gotErr, tc.wantErr, err) - continue - } - equal := got.Time.Equal(tc.want.Time.Time) - if equal != tc.equal { - t.Errorf("%s: got=%#v, want=%#v, equal=%v, want=%v", tc.desc, got, tc.want, equal, tc.equal) - } - } -} - -func TestWrappedTimstamp_MarshalReflexivity(t *testing.T) { - testCases := []struct { - desc string - data WrappedTimestamp - }{ - {"Reference", WrappedTimestamp{0, Timestamp{referenceTime}}}, - {"Empty", WrappedTimestamp{0, Timestamp{}}}, - } - for _, tc := range testCases { - bytes, err := json.Marshal(tc.data) - if err != nil { - t.Errorf("%s: Marshal err=%v", tc.desc, err) - } - var got WrappedTimestamp - err = json.Unmarshal(bytes, &got) - if err != nil { - t.Errorf("%s: Unmarshal err=%v", tc.desc, err) - } - if !got.Time.Equal(tc.data.Time) { - t.Errorf("%s: %+v != %+v", tc.desc, got, tc.data) - } - } -} diff --git a/vendor/github.com/google/go-github/github/users.go b/vendor/github.com/google/go-github/github/users.go index 83cfb45b5..f164d559e 100644 --- a/vendor/github.com/google/go-github/github/users.go +++ b/vendor/github.com/google/go-github/github/users.go @@ -19,7 +19,8 @@ type UsersService service // User represents a GitHub user. type User struct { Login *string `json:"login,omitempty"` - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` AvatarURL *string `json:"avatar_url,omitempty"` HTMLURL *string `json:"html_url,omitempty"` GravatarID *string `json:"gravatar_id,omitempty"` @@ -99,7 +100,7 @@ func (s *UsersService) Get(ctx context.Context, user string) (*User, *Response, // GetByID fetches a user. // // Note: GetByID uses the undocumented GitHub API endpoint /user/:id. -func (s *UsersService) GetByID(ctx context.Context, id int) (*User, *Response, error) { +func (s *UsersService) GetByID(ctx context.Context, id int64) (*User, *Response, error) { u := fmt.Sprintf("user/%d", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -134,12 +135,65 @@ func (s *UsersService) Edit(ctx context.Context, user *User) (*User, *Response, return uResp, resp, nil } +// HovercardOptions specifies optional parameters to the UsersService.GetHovercard +// method. +type HovercardOptions struct { + // SubjectType specifies the additional information to be received about the hovercard. + // Possible values are: organization, repository, issue, pull_request. (Required when using subject_id.) + SubjectType string `url:"subject_type"` + + // SubjectID specifies the ID for the SubjectType. (Required when using subject_type.) + SubjectID string `url:"subject_id"` +} + +// Hovercard represents hovercard information about a user. +type Hovercard struct { + Contexts []*UserContext `json:"contexts,omitempty"` +} + +// UserContext represents the contextual information about user. +type UserContext struct { + Message *string `json:"message,omitempty"` + Octicon *string `json:"octicon,omitempty"` +} + +// GetHovercard fetches contextual information about user. It requires authentication +// via Basic Auth or via OAuth with the repo scope. +// +// GitHub API docs: https://developer.github.com/v3/users/#get-contextual-information-about-a-user +func (s *UsersService) GetHovercard(ctx context.Context, user string, opt *HovercardOptions) (*Hovercard, *Response, error) { + u := fmt.Sprintf("users/%v/hovercard", user) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeHovercardPreview) + + hc := new(Hovercard) + resp, err := s.client.Do(ctx, req, hc) + if err != nil { + return nil, resp, err + } + + return hc, resp, nil +} + // UserListOptions specifies optional parameters to the UsersService.ListAll // method. type UserListOptions struct { // ID of the last user seen - Since int `url:"since,omitempty"` + Since int64 `url:"since,omitempty"` + // Note: Pagination is powered exclusively by the Since parameter, + // ListOptions.Page has no effect. + // ListOptions.PerPage controls an undocumented GitHub API parameter. ListOptions } @@ -199,7 +253,7 @@ func (s *UsersService) ListInvitations(ctx context.Context, opt *ListOptions) ([ // authenticated user. // // GitHub API docs: https://developer.github.com/v3/repos/invitations/#accept-a-repository-invitation -func (s *UsersService) AcceptInvitation(ctx context.Context, invitationID int) (*Response, error) { +func (s *UsersService) AcceptInvitation(ctx context.Context, invitationID int64) (*Response, error) { u := fmt.Sprintf("user/repository_invitations/%v", invitationID) req, err := s.client.NewRequest("PATCH", u, nil) if err != nil { @@ -216,7 +270,7 @@ func (s *UsersService) AcceptInvitation(ctx context.Context, invitationID int) ( // authenticated user. // // GitHub API docs: https://developer.github.com/v3/repos/invitations/#decline-a-repository-invitation -func (s *UsersService) DeclineInvitation(ctx context.Context, invitationID int) (*Response, error) { +func (s *UsersService) DeclineInvitation(ctx context.Context, invitationID int64) (*Response, error) { u := fmt.Sprintf("user/repository_invitations/%v", invitationID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/users_administration_test.go b/vendor/github.com/google/go-github/github/users_administration_test.go deleted file mode 100644 index 8f02b88ce..000000000 --- a/vendor/github.com/google/go-github/github/users_administration_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "net/http" - "testing" -) - -func TestUsersService_PromoteSiteAdmin(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/site_admin", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Users.PromoteSiteAdmin(context.Background(), "u") - if err != nil { - t.Errorf("Users.PromoteSiteAdmin returned error: %v", err) - } -} - -func TestUsersService_DemoteSiteAdmin(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/site_admin", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Users.DemoteSiteAdmin(context.Background(), "u") - if err != nil { - t.Errorf("Users.DemoteSiteAdmin returned error: %v", err) - } -} - -func TestUsersService_Suspend(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/suspended", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Users.Suspend(context.Background(), "u") - if err != nil { - t.Errorf("Users.Suspend returned error: %v", err) - } -} - -func TestUsersService_Unsuspend(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/suspended", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Users.Unsuspend(context.Background(), "u") - if err != nil { - t.Errorf("Users.Unsuspend returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/users_blocking_test.go b/vendor/github.com/google/go-github/github/users_blocking_test.go deleted file mode 100644 index ea7a8abdc..000000000 --- a/vendor/github.com/google/go-github/github/users_blocking_test.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2017 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestUsersService_ListBlockedUsers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/blocks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{ - "login": "octocat" - }]`) - }) - - opt := &ListOptions{Page: 2} - blockedUsers, _, err := client.Users.ListBlockedUsers(context.Background(), opt) - if err != nil { - t.Errorf("Users.ListBlockedUsers returned error: %v", err) - } - - want := []*User{{Login: String("octocat")}} - if !reflect.DeepEqual(blockedUsers, want) { - t.Errorf("Users.ListBlockedUsers returned %+v, want %+v", blockedUsers, want) - } -} - -func TestUsersService_IsBlocked(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/blocks/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - w.WriteHeader(http.StatusNoContent) - }) - - isBlocked, _, err := client.Users.IsBlocked(context.Background(), "u") - if err != nil { - t.Errorf("Users.IsBlocked returned error: %v", err) - } - if want := true; isBlocked != want { - t.Errorf("Users.IsBlocked returned %+v, want %+v", isBlocked, want) - } -} - -func TestUsersService_BlockUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/blocks/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Users.BlockUser(context.Background(), "u") - if err != nil { - t.Errorf("Users.BlockUser returned error: %v", err) - } -} - -func TestUsersService_UnblockUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/blocks/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeBlockUsersPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Users.UnblockUser(context.Background(), "u") - if err != nil { - t.Errorf("Users.UnblockUser returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/users_emails_test.go b/vendor/github.com/google/go-github/github/users_emails_test.go deleted file mode 100644 index 3f8176a00..000000000 --- a/vendor/github.com/google/go-github/github/users_emails_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestUsersService_ListEmails(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/emails", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{ - "email": "user@example.com", - "verified": false, - "primary": true - }]`) - }) - - opt := &ListOptions{Page: 2} - emails, _, err := client.Users.ListEmails(context.Background(), opt) - if err != nil { - t.Errorf("Users.ListEmails returned error: %v", err) - } - - want := []*UserEmail{{Email: String("user@example.com"), Verified: Bool(false), Primary: Bool(true)}} - if !reflect.DeepEqual(emails, want) { - t.Errorf("Users.ListEmails returned %+v, want %+v", emails, want) - } -} - -func TestUsersService_AddEmails(t *testing.T) { - setup() - defer teardown() - - input := []string{"new@example.com"} - - mux.HandleFunc("/user/emails", func(w http.ResponseWriter, r *http.Request) { - var v []string - json.NewDecoder(r.Body).Decode(&v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `[{"email":"old@example.com"}, {"email":"new@example.com"}]`) - }) - - emails, _, err := client.Users.AddEmails(context.Background(), input) - if err != nil { - t.Errorf("Users.AddEmails returned error: %v", err) - } - - want := []*UserEmail{ - {Email: String("old@example.com")}, - {Email: String("new@example.com")}, - } - if !reflect.DeepEqual(emails, want) { - t.Errorf("Users.AddEmails returned %+v, want %+v", emails, want) - } -} - -func TestUsersService_DeleteEmails(t *testing.T) { - setup() - defer teardown() - - input := []string{"user@example.com"} - - mux.HandleFunc("/user/emails", func(w http.ResponseWriter, r *http.Request) { - var v []string - json.NewDecoder(r.Body).Decode(&v) - - testMethod(t, r, "DELETE") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - }) - - _, err := client.Users.DeleteEmails(context.Background(), input) - if err != nil { - t.Errorf("Users.DeleteEmails returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/users_followers_test.go b/vendor/github.com/google/go-github/github/users_followers_test.go deleted file mode 100644 index 688af2c44..000000000 --- a/vendor/github.com/google/go-github/github/users_followers_test.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestUsersService_ListFollowers_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/followers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - users, _, err := client.Users.ListFollowers(context.Background(), "", opt) - if err != nil { - t.Errorf("Users.ListFollowers returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Users.ListFollowers returned %+v, want %+v", users, want) - } -} - -func TestUsersService_ListFollowers_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/followers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":1}]`) - }) - - users, _, err := client.Users.ListFollowers(context.Background(), "u", nil) - if err != nil { - t.Errorf("Users.ListFollowers returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Users.ListFollowers returned %+v, want %+v", users, want) - } -} - -func TestUsersService_ListFollowers_invalidUser(t *testing.T) { - _, _, err := client.Users.ListFollowers(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestUsersService_ListFollowing_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/following", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opts := &ListOptions{Page: 2} - users, _, err := client.Users.ListFollowing(context.Background(), "", opts) - if err != nil { - t.Errorf("Users.ListFollowing returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Users.ListFollowing returned %+v, want %+v", users, want) - } -} - -func TestUsersService_ListFollowing_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/following", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":1}]`) - }) - - users, _, err := client.Users.ListFollowing(context.Background(), "u", nil) - if err != nil { - t.Errorf("Users.ListFollowing returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Users.ListFollowing returned %+v, want %+v", users, want) - } -} - -func TestUsersService_ListFollowing_invalidUser(t *testing.T) { - _, _, err := client.Users.ListFollowing(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestUsersService_IsFollowing_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/following/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - following, _, err := client.Users.IsFollowing(context.Background(), "", "t") - if err != nil { - t.Errorf("Users.IsFollowing returned error: %v", err) - } - if want := true; following != want { - t.Errorf("Users.IsFollowing returned %+v, want %+v", following, want) - } -} - -func TestUsersService_IsFollowing_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/following/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - following, _, err := client.Users.IsFollowing(context.Background(), "u", "t") - if err != nil { - t.Errorf("Users.IsFollowing returned error: %v", err) - } - if want := true; following != want { - t.Errorf("Users.IsFollowing returned %+v, want %+v", following, want) - } -} - -func TestUsersService_IsFollowing_false(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/following/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - following, _, err := client.Users.IsFollowing(context.Background(), "u", "t") - if err != nil { - t.Errorf("Users.IsFollowing returned error: %v", err) - } - if want := false; following != want { - t.Errorf("Users.IsFollowing returned %+v, want %+v", following, want) - } -} - -func TestUsersService_IsFollowing_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/following/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Error(w, "BadRequest", http.StatusBadRequest) - }) - - following, _, err := client.Users.IsFollowing(context.Background(), "u", "t") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } - if want := false; following != want { - t.Errorf("Users.IsFollowing returned %+v, want %+v", following, want) - } -} - -func TestUsersService_IsFollowing_invalidUser(t *testing.T) { - _, _, err := client.Users.IsFollowing(context.Background(), "%", "%") - testURLParseError(t, err) -} - -func TestUsersService_Follow(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/following/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - }) - - _, err := client.Users.Follow(context.Background(), "u") - if err != nil { - t.Errorf("Users.Follow returned error: %v", err) - } -} - -func TestUsersService_Follow_invalidUser(t *testing.T) { - _, err := client.Users.Follow(context.Background(), "%") - testURLParseError(t, err) -} - -func TestUsersService_Unfollow(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/following/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Users.Unfollow(context.Background(), "u") - if err != nil { - t.Errorf("Users.Follow returned error: %v", err) - } -} - -func TestUsersService_Unfollow_invalidUser(t *testing.T) { - _, err := client.Users.Unfollow(context.Background(), "%") - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/users_gpg_keys.go b/vendor/github.com/google/go-github/github/users_gpg_keys.go index 3e95fb446..d8bbc5201 100644 --- a/vendor/github.com/google/go-github/github/users_gpg_keys.go +++ b/vendor/github.com/google/go-github/github/users_gpg_keys.go @@ -15,8 +15,8 @@ import ( // // https://developer.github.com/changes/2016-04-04-git-signing-api-preview/ type GPGKey struct { - ID *int `json:"id,omitempty"` - PrimaryKeyID *int `json:"primary_key_id,omitempty"` + ID *int64 `json:"id,omitempty"` + PrimaryKeyID *int64 `json:"primary_key_id,omitempty"` KeyID *string `json:"key_id,omitempty"` PublicKey *string `json:"public_key,omitempty"` Emails []GPGEmail `json:"emails,omitempty"` @@ -78,7 +78,7 @@ func (s *UsersService) ListGPGKeys(ctx context.Context, user string, opt *ListOp // via Basic Auth or via OAuth with at least read:gpg_key scope. // // GitHub API docs: https://developer.github.com/v3/users/gpg_keys/#get-a-single-gpg-key -func (s *UsersService) GetGPGKey(ctx context.Context, id int) (*GPGKey, *Response, error) { +func (s *UsersService) GetGPGKey(ctx context.Context, id int64) (*GPGKey, *Response, error) { u := fmt.Sprintf("user/gpg_keys/%v", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -126,7 +126,7 @@ func (s *UsersService) CreateGPGKey(ctx context.Context, armoredPublicKey string // via OAuth with at least admin:gpg_key scope. // // GitHub API docs: https://developer.github.com/v3/users/gpg_keys/#delete-a-gpg-key -func (s *UsersService) DeleteGPGKey(ctx context.Context, id int) (*Response, error) { +func (s *UsersService) DeleteGPGKey(ctx context.Context, id int64) (*Response, error) { u := fmt.Sprintf("user/gpg_keys/%v", id) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/users_gpg_keys_test.go b/vendor/github.com/google/go-github/github/users_gpg_keys_test.go deleted file mode 100644 index f4180df98..000000000 --- a/vendor/github.com/google/go-github/github/users_gpg_keys_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestUsersService_ListGPGKeys_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/gpg_keys", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1,"primary_key_id":2}]`) - }) - - opt := &ListOptions{Page: 2} - keys, _, err := client.Users.ListGPGKeys(context.Background(), "", opt) - if err != nil { - t.Errorf("Users.ListGPGKeys returned error: %v", err) - } - - want := []*GPGKey{{ID: Int(1), PrimaryKeyID: Int(2)}} - if !reflect.DeepEqual(keys, want) { - t.Errorf("Users.ListGPGKeys = %+v, want %+v", keys, want) - } -} - -func TestUsersService_ListGPGKeys_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/gpg_keys", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - fmt.Fprint(w, `[{"id":1,"primary_key_id":2}]`) - }) - - keys, _, err := client.Users.ListGPGKeys(context.Background(), "u", nil) - if err != nil { - t.Errorf("Users.ListGPGKeys returned error: %v", err) - } - - want := []*GPGKey{{ID: Int(1), PrimaryKeyID: Int(2)}} - if !reflect.DeepEqual(keys, want) { - t.Errorf("Users.ListGPGKeys = %+v, want %+v", keys, want) - } -} - -func TestUsersService_ListGPGKeys_invalidUser(t *testing.T) { - _, _, err := client.Users.ListGPGKeys(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestUsersService_GetGPGKey(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/gpg_keys/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - key, _, err := client.Users.GetGPGKey(context.Background(), 1) - if err != nil { - t.Errorf("Users.GetGPGKey returned error: %v", err) - } - - want := &GPGKey{ID: Int(1)} - if !reflect.DeepEqual(key, want) { - t.Errorf("Users.GetGPGKey = %+v, want %+v", key, want) - } -} - -func TestUsersService_CreateGPGKey(t *testing.T) { - setup() - defer teardown() - - input := ` ------BEGIN PGP PUBLIC KEY BLOCK----- -Comment: GPGTools - https://gpgtools.org - -mQINBFcEd9kBEACo54TDbGhKlXKWMvJgecEUKPPcv7XdnpKdGb3LRw5MvFwT0V0f -... -=tqfb ------END PGP PUBLIC KEY BLOCK-----` - - mux.HandleFunc("/user/gpg_keys", func(w http.ResponseWriter, r *http.Request) { - var gpgKey struct { - ArmoredPublicKey *string `json:"armored_public_key,omitempty"` - } - json.NewDecoder(r.Body).Decode(&gpgKey) - - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - if gpgKey.ArmoredPublicKey == nil || *gpgKey.ArmoredPublicKey != input { - t.Errorf("gpgKey = %+v, want %q", gpgKey, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - gpgKey, _, err := client.Users.CreateGPGKey(context.Background(), input) - if err != nil { - t.Errorf("Users.GetGPGKey returned error: %v", err) - } - - want := &GPGKey{ID: Int(1)} - if !reflect.DeepEqual(gpgKey, want) { - t.Errorf("Users.GetGPGKey = %+v, want %+v", gpgKey, want) - } -} - -func TestUsersService_DeleteGPGKey(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/gpg_keys/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - }) - - _, err := client.Users.DeleteGPGKey(context.Background(), 1) - if err != nil { - t.Errorf("Users.DeleteGPGKey returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/users_keys.go b/vendor/github.com/google/go-github/github/users_keys.go index 97ed4b861..ddc832a1e 100644 --- a/vendor/github.com/google/go-github/github/users_keys.go +++ b/vendor/github.com/google/go-github/github/users_keys.go @@ -12,7 +12,7 @@ import ( // Key represents a public SSH key used to authenticate a user or deploy script. type Key struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Key *string `json:"key,omitempty"` URL *string `json:"url,omitempty"` Title *string `json:"title,omitempty"` @@ -56,7 +56,7 @@ func (s *UsersService) ListKeys(ctx context.Context, user string, opt *ListOptio // GetKey fetches a single public key. // // GitHub API docs: https://developer.github.com/v3/users/keys/#get-a-single-public-key -func (s *UsersService) GetKey(ctx context.Context, id int) (*Key, *Response, error) { +func (s *UsersService) GetKey(ctx context.Context, id int64) (*Key, *Response, error) { u := fmt.Sprintf("user/keys/%v", id) req, err := s.client.NewRequest("GET", u, nil) @@ -96,7 +96,7 @@ func (s *UsersService) CreateKey(ctx context.Context, key *Key) (*Key, *Response // DeleteKey deletes a public key. // // GitHub API docs: https://developer.github.com/v3/users/keys/#delete-a-public-key -func (s *UsersService) DeleteKey(ctx context.Context, id int) (*Response, error) { +func (s *UsersService) DeleteKey(ctx context.Context, id int64) (*Response, error) { u := fmt.Sprintf("user/keys/%v", id) req, err := s.client.NewRequest("DELETE", u, nil) diff --git a/vendor/github.com/google/go-github/github/users_keys_test.go b/vendor/github.com/google/go-github/github/users_keys_test.go deleted file mode 100644 index 8554c50cd..000000000 --- a/vendor/github.com/google/go-github/github/users_keys_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestUsersService_ListKeys_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/keys", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - keys, _, err := client.Users.ListKeys(context.Background(), "", opt) - if err != nil { - t.Errorf("Users.ListKeys returned error: %v", err) - } - - want := []*Key{{ID: Int(1)}} - if !reflect.DeepEqual(keys, want) { - t.Errorf("Users.ListKeys returned %+v, want %+v", keys, want) - } -} - -func TestUsersService_ListKeys_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/keys", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":1}]`) - }) - - keys, _, err := client.Users.ListKeys(context.Background(), "u", nil) - if err != nil { - t.Errorf("Users.ListKeys returned error: %v", err) - } - - want := []*Key{{ID: Int(1)}} - if !reflect.DeepEqual(keys, want) { - t.Errorf("Users.ListKeys returned %+v, want %+v", keys, want) - } -} - -func TestUsersService_ListKeys_invalidUser(t *testing.T) { - _, _, err := client.Users.ListKeys(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestUsersService_GetKey(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/keys/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - key, _, err := client.Users.GetKey(context.Background(), 1) - if err != nil { - t.Errorf("Users.GetKey returned error: %v", err) - } - - want := &Key{ID: Int(1)} - if !reflect.DeepEqual(key, want) { - t.Errorf("Users.GetKey returned %+v, want %+v", key, want) - } -} - -func TestUsersService_CreateKey(t *testing.T) { - setup() - defer teardown() - - input := &Key{Key: String("k"), Title: String("t")} - - mux.HandleFunc("/user/keys", func(w http.ResponseWriter, r *http.Request) { - v := new(Key) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - key, _, err := client.Users.CreateKey(context.Background(), input) - if err != nil { - t.Errorf("Users.GetKey returned error: %v", err) - } - - want := &Key{ID: Int(1)} - if !reflect.DeepEqual(key, want) { - t.Errorf("Users.GetKey returned %+v, want %+v", key, want) - } -} - -func TestUsersService_DeleteKey(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/keys/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Users.DeleteKey(context.Background(), 1) - if err != nil { - t.Errorf("Users.DeleteKey returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/users_test.go b/vendor/github.com/google/go-github/github/users_test.go deleted file mode 100644 index 34c239a66..000000000 --- a/vendor/github.com/google/go-github/github/users_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestUser_marshall(t *testing.T) { - testJSONMarshal(t, &User{}, "{}") - - u := &User{ - Login: String("l"), - ID: Int(1), - URL: String("u"), - AvatarURL: String("a"), - GravatarID: String("g"), - Name: String("n"), - Company: String("c"), - Blog: String("b"), - Location: String("l"), - Email: String("e"), - Hireable: Bool(true), - PublicRepos: Int(1), - Followers: Int(1), - Following: Int(1), - CreatedAt: &Timestamp{referenceTime}, - SuspendedAt: &Timestamp{referenceTime}, - } - want := `{ - "login": "l", - "id": 1, - "avatar_url": "a", - "gravatar_id": "g", - "name": "n", - "company": "c", - "blog": "b", - "location": "l", - "email": "e", - "hireable": true, - "public_repos": 1, - "followers": 1, - "following": 1, - "created_at": ` + referenceTimeStr + `, - "suspended_at": ` + referenceTimeStr + `, - "url": "u" - }` - testJSONMarshal(t, u, want) -} - -func TestUsersService_Get_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - user, _, err := client.Users.Get(context.Background(), "") - if err != nil { - t.Errorf("Users.Get returned error: %v", err) - } - - want := &User{ID: Int(1)} - if !reflect.DeepEqual(user, want) { - t.Errorf("Users.Get returned %+v, want %+v", user, want) - } -} - -func TestUsersService_Get_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - user, _, err := client.Users.Get(context.Background(), "u") - if err != nil { - t.Errorf("Users.Get returned error: %v", err) - } - - want := &User{ID: Int(1)} - if !reflect.DeepEqual(user, want) { - t.Errorf("Users.Get returned %+v, want %+v", user, want) - } -} - -func TestUsersService_Get_invalidUser(t *testing.T) { - _, _, err := client.Users.Get(context.Background(), "%") - testURLParseError(t, err) -} - -func TestUsersService_GetByID(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - user, _, err := client.Users.GetByID(context.Background(), 1) - if err != nil { - t.Fatalf("Users.GetByID returned error: %v", err) - } - - want := &User{ID: Int(1)} - if !reflect.DeepEqual(user, want) { - t.Errorf("Users.GetByID returned %+v, want %+v", user, want) - } -} - -func TestUsersService_Edit(t *testing.T) { - setup() - defer teardown() - - input := &User{Name: String("n")} - - mux.HandleFunc("/user", func(w http.ResponseWriter, r *http.Request) { - v := new(User) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - user, _, err := client.Users.Edit(context.Background(), input) - if err != nil { - t.Errorf("Users.Edit returned error: %v", err) - } - - want := &User{ID: Int(1)} - if !reflect.DeepEqual(user, want) { - t.Errorf("Users.Edit returned %+v, want %+v", user, want) - } -} - -func TestUsersService_ListAll(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"since": "1", "page": "2"}) - fmt.Fprint(w, `[{"id":2}]`) - }) - - opt := &UserListOptions{1, ListOptions{Page: 2}} - users, _, err := client.Users.ListAll(context.Background(), opt) - if err != nil { - t.Errorf("Users.Get returned error: %v", err) - } - - want := []*User{{ID: Int(2)}} - if !reflect.DeepEqual(users, want) { - t.Errorf("Users.ListAll returned %+v, want %+v", users, want) - } -} - -func TestUsersService_ListInvitations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/repository_invitations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - fmt.Fprintf(w, `[{"id":1}, {"id":2}]`) - }) - - got, _, err := client.Users.ListInvitations(context.Background(), nil) - if err != nil { - t.Errorf("Users.ListInvitations returned error: %v", err) - } - - want := []*RepositoryInvitation{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Users.ListInvitations = %+v, want %+v", got, want) - } -} - -func TestUsersService_ListInvitations_withOptions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/repository_invitations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - fmt.Fprintf(w, `[{"id":1}, {"id":2}]`) - }) - - _, _, err := client.Users.ListInvitations(context.Background(), &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Users.ListInvitations returned error: %v", err) - } -} -func TestUsersService_AcceptInvitation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/repository_invitations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Users.AcceptInvitation(context.Background(), 1); err != nil { - t.Errorf("Users.AcceptInvitation returned error: %v", err) - } -} - -func TestUsersService_DeclineInvitation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/repository_invitations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeRepositoryInvitationsPreview) - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Users.DeclineInvitation(context.Background(), 1); err != nil { - t.Errorf("Users.DeclineInvitation returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/with_appengine.go b/vendor/github.com/google/go-github/github/with_appengine.go index 87a228ad7..59ce26b2e 100644 --- a/vendor/github.com/google/go-github/github/with_appengine.go +++ b/vendor/github.com/google/go-github/github/with_appengine.go @@ -6,11 +6,6 @@ // +build appengine // This file provides glue for making github work on App Engine. -// In order to get the entire github package to compile with -// Go 1.6, you will need to rewrite all the import "context" lines. -// Fortunately, this is easy with "gofmt": -// -// gofmt -w -r '"context" -> "golang.org/x/net/context"' *.go package github diff --git a/vendor/github.com/google/go-querystring/.gitignore b/vendor/github.com/google/go-querystring/.gitignore deleted file mode 100644 index 9ed3b07ce..000000000 --- a/vendor/github.com/google/go-querystring/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.test diff --git a/vendor/github.com/google/go-querystring/CONTRIBUTING.md b/vendor/github.com/google/go-querystring/CONTRIBUTING.md deleted file mode 100644 index 51cf5cd1a..000000000 --- a/vendor/github.com/google/go-querystring/CONTRIBUTING.md +++ /dev/null @@ -1,67 +0,0 @@ -# How to contribute # - -We'd love to accept your patches and contributions to this project. There are -a just a few small guidelines you need to follow. - - -## Contributor License Agreement ## - -Contributions to any Google project must be accompanied by a Contributor -License Agreement. This is not a copyright **assignment**, it simply gives -Google permission to use and redistribute your contributions as part of the -project. - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an [individual - CLA][]. - - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a [corporate CLA][]. - -You generally only need to submit a CLA once, so if you've already submitted -one (even if it was for a different project), you probably don't need to do it -again. - -[individual CLA]: https://developers.google.com/open-source/cla/individual -[corporate CLA]: https://developers.google.com/open-source/cla/corporate - - -## Submitting a patch ## - - 1. It's generally best to start by opening a new issue describing the bug or - feature you're intending to fix. Even if you think it's relatively minor, - it's helpful to know what people are working on. Mention in the initial - issue that you are planning to work on that bug or feature so that it can - be assigned to you. - - 1. Follow the normal process of [forking][] the project, and setup a new - branch to work in. It's important that each group of changes be done in - separate branches in order to ensure that a pull request only includes the - commits related to that bug or feature. - - 1. Go makes it very simple to ensure properly formatted code, so always run - `go fmt` on your code before committing it. You should also run - [golint][] over your code. As noted in the [golint readme][], it's not - strictly necessary that your code be completely "lint-free", but this will - help you find common style issues. - - 1. Any significant changes should almost always be accompanied by tests. The - project already has good test coverage, so look at some of the existing - tests if you're unsure how to go about it. [gocov][] and [gocov-html][] - are invaluable tools for seeing which parts of your code aren't being - exercised by your tests. - - 1. Do your best to have [well-formed commit messages][] for each change. - This provides consistency throughout the project, and ensures that commit - messages are able to be formatted properly by various git tools. - - 1. Finally, push the commits to your fork and submit a [pull request][]. - -[forking]: https://help.github.com/articles/fork-a-repo -[golint]: https://github.com/golang/lint -[golint readme]: https://github.com/golang/lint/blob/master/README -[gocov]: https://github.com/axw/gocov -[gocov-html]: https://github.com/matm/gocov-html -[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html -[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits -[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/vendor/github.com/google/go-querystring/README.md b/vendor/github.com/google/go-querystring/README.md deleted file mode 100644 index 03e937034..000000000 --- a/vendor/github.com/google/go-querystring/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# go-querystring # - -go-querystring is Go library for encoding structs into URL query parameters. - - -**Documentation:** -**Build Status:** [![Build Status](https://drone.io/github.com/google/go-querystring/status.png)](https://drone.io/github.com/google/go-querystring/latest) - -## Usage ## - -```go -import "github.com/google/go-querystring/query" -``` - -go-querystring is designed to assist in scenarios where you want to construct a -URL using a struct that represents the URL query parameters. You might do this -to enforce the type safety of your parameters, for example, as is done in the -[go-github][] library. - -The query package exports a single `Values()` function. A simple example: - -```go -type Options struct { - Query string `url:"q"` - ShowAll bool `url:"all"` - Page int `url:"page"` -} - -opt := Options{ "foo", true, 2 } -v, _ := query.Values(opt) -fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2" -``` - -[go-github]: https://github.com/google/go-github/commit/994f6f8405f052a117d2d0b500054341048fbb08 - -## License ## - -This library is distributed under the BSD-style license found in the [LICENSE](./LICENSE) -file. diff --git a/vendor/github.com/google/go-querystring/query/encode_test.go b/vendor/github.com/google/go-querystring/query/encode_test.go deleted file mode 100644 index 0f26a7750..000000000 --- a/vendor/github.com/google/go-querystring/query/encode_test.go +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package query - -import ( - "fmt" - "net/url" - "reflect" - "testing" - "time" -) - -type Nested struct { - A SubNested `url:"a"` - B *SubNested `url:"b"` - Ptr *SubNested `url:"ptr,omitempty"` -} - -type SubNested struct { - Value string `url:"value"` -} - -func TestValues_types(t *testing.T) { - str := "string" - strPtr := &str - timeVal := time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC) - - tests := []struct { - in interface{} - want url.Values - }{ - { - // basic primitives - struct { - A string - B int - C uint - D float32 - E bool - }{}, - url.Values{ - "A": {""}, - "B": {"0"}, - "C": {"0"}, - "D": {"0"}, - "E": {"false"}, - }, - }, - { - // pointers - struct { - A *string - B *int - C **string - D *time.Time - }{ - A: strPtr, - C: &strPtr, - D: &timeVal, - }, - url.Values{ - "A": {str}, - "B": {""}, - "C": {str}, - "D": {"2000-01-01T12:34:56Z"}, - }, - }, - { - // slices and arrays - struct { - A []string - B []string `url:",comma"` - C []string `url:",space"` - D [2]string - E [2]string `url:",comma"` - F [2]string `url:",space"` - G []*string `url:",space"` - H []bool `url:",int,space"` - I []string `url:",brackets"` - J []string `url:",semicolon"` - K []string `url:",numbered"` - }{ - A: []string{"a", "b"}, - B: []string{"a", "b"}, - C: []string{"a", "b"}, - D: [2]string{"a", "b"}, - E: [2]string{"a", "b"}, - F: [2]string{"a", "b"}, - G: []*string{&str, &str}, - H: []bool{true, false}, - I: []string{"a", "b"}, - J: []string{"a", "b"}, - K: []string{"a", "b"}, - }, - url.Values{ - "A": {"a", "b"}, - "B": {"a,b"}, - "C": {"a b"}, - "D": {"a", "b"}, - "E": {"a,b"}, - "F": {"a b"}, - "G": {"string string"}, - "H": {"1 0"}, - "I[]": {"a", "b"}, - "J": {"a;b"}, - "K0": {"a"}, - "K1": {"b"}, - }, - }, - { - // other types - struct { - A time.Time - B time.Time `url:",unix"` - C bool `url:",int"` - D bool `url:",int"` - }{ - A: time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC), - B: time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC), - C: true, - D: false, - }, - url.Values{ - "A": {"2000-01-01T12:34:56Z"}, - "B": {"946730096"}, - "C": {"1"}, - "D": {"0"}, - }, - }, - { - struct { - Nest Nested `url:"nest"` - }{ - Nested{ - A: SubNested{ - Value: "that", - }, - }, - }, - url.Values{ - "nest[a][value]": {"that"}, - "nest[b]": {""}, - }, - }, - { - struct { - Nest Nested `url:"nest"` - }{ - Nested{ - Ptr: &SubNested{ - Value: "that", - }, - }, - }, - url.Values{ - "nest[a][value]": {""}, - "nest[b]": {""}, - "nest[ptr][value]": {"that"}, - }, - }, - { - nil, - url.Values{}, - }, - } - - for i, tt := range tests { - v, err := Values(tt.in) - if err != nil { - t.Errorf("%d. Values(%q) returned error: %v", i, tt.in, err) - } - - if !reflect.DeepEqual(tt.want, v) { - t.Errorf("%d. Values(%q) returned %v, want %v", i, tt.in, v, tt.want) - } - } -} - -func TestValues_omitEmpty(t *testing.T) { - str := "" - s := struct { - a string - A string - B string `url:",omitempty"` - C string `url:"-"` - D string `url:"omitempty"` // actually named omitempty, not an option - E *string `url:",omitempty"` - }{E: &str} - - v, err := Values(s) - if err != nil { - t.Errorf("Values(%q) returned error: %v", s, err) - } - - want := url.Values{ - "A": {""}, - "omitempty": {""}, - "E": {""}, // E is included because the pointer is not empty, even though the string being pointed to is - } - if !reflect.DeepEqual(want, v) { - t.Errorf("Values(%q) returned %v, want %v", s, v, want) - } -} - -type A struct { - B -} - -type B struct { - C string -} - -type D struct { - B - C string -} - -type e struct { - B - C string -} - -type F struct { - e -} - -func TestValues_embeddedStructs(t *testing.T) { - tests := []struct { - in interface{} - want url.Values - }{ - { - A{B{C: "foo"}}, - url.Values{"C": {"foo"}}, - }, - { - D{B: B{C: "bar"}, C: "foo"}, - url.Values{"C": {"foo", "bar"}}, - }, - { - F{e{B: B{C: "bar"}, C: "foo"}}, // With unexported embed - url.Values{"C": {"foo", "bar"}}, - }, - } - - for i, tt := range tests { - v, err := Values(tt.in) - if err != nil { - t.Errorf("%d. Values(%q) returned error: %v", i, tt.in, err) - } - - if !reflect.DeepEqual(tt.want, v) { - t.Errorf("%d. Values(%q) returned %v, want %v", i, tt.in, v, tt.want) - } - } -} - -func TestValues_invalidInput(t *testing.T) { - _, err := Values("") - if err == nil { - t.Errorf("expected Values() to return an error on invalid input") - } -} - -type EncodedArgs []string - -func (m EncodedArgs) EncodeValues(key string, v *url.Values) error { - for i, arg := range m { - v.Set(fmt.Sprintf("%s.%d", key, i), arg) - } - return nil -} - -func TestValues_Marshaler(t *testing.T) { - s := struct { - Args EncodedArgs `url:"arg"` - }{[]string{"a", "b", "c"}} - v, err := Values(s) - if err != nil { - t.Errorf("Values(%q) returned error: %v", s, err) - } - - want := url.Values{ - "arg.0": {"a"}, - "arg.1": {"b"}, - "arg.2": {"c"}, - } - if !reflect.DeepEqual(want, v) { - t.Errorf("Values(%q) returned %v, want %v", s, v, want) - } -} - -func TestValues_MarshalerWithNilPointer(t *testing.T) { - s := struct { - Args *EncodedArgs `url:"arg"` - }{} - v, err := Values(s) - if err != nil { - t.Errorf("Values(%q) returned error: %v", s, err) - } - - want := url.Values{} - if !reflect.DeepEqual(want, v) { - t.Errorf("Values(%q) returned %v, want %v", s, v, want) - } -} - -func TestTagParsing(t *testing.T) { - name, opts := parseTag("field,foobar,foo") - if name != "field" { - t.Fatalf("name = %q, want field", name) - } - for _, tt := range []struct { - opt string - want bool - }{ - {"foobar", true}, - {"foo", true}, - {"bar", false}, - {"field", false}, - } { - if opts.Contains(tt.opt) != tt.want { - t.Errorf("Contains(%q) = %v", tt.opt, !tt.want) - } - } -} diff --git a/vendor/github.com/gorilla/context/.travis.yml b/vendor/github.com/gorilla/context/.travis.yml deleted file mode 100644 index faca4dad3..000000000 --- a/vendor/github.com/gorilla/context/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: go -sudo: false - -matrix: - include: - - go: 1.3 - - go: 1.4 - - go: 1.5 - - go: 1.6 - - go: tip - -install: - - go get golang.org/x/tools/cmd/vet - -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d .) - - go tool vet . - - go test -v -race ./... diff --git a/vendor/github.com/gorilla/context/LICENSE b/vendor/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb8728..000000000 --- a/vendor/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/context/README.md b/vendor/github.com/gorilla/context/README.md deleted file mode 100644 index c60a31b05..000000000 --- a/vendor/github.com/gorilla/context/README.md +++ /dev/null @@ -1,7 +0,0 @@ -context -======= -[![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) - -gorilla/context is a general purpose registry for global request variables. - -Read the full documentation here: http://www.gorillatoolkit.org/pkg/context diff --git a/vendor/github.com/gorilla/context/context.go b/vendor/github.com/gorilla/context/context.go deleted file mode 100644 index 81cb128b1..000000000 --- a/vendor/github.com/gorilla/context/context.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package context - -import ( - "net/http" - "sync" - "time" -) - -var ( - mutex sync.RWMutex - data = make(map[*http.Request]map[interface{}]interface{}) - datat = make(map[*http.Request]int64) -) - -// Set stores a value for a given key in a given request. -func Set(r *http.Request, key, val interface{}) { - mutex.Lock() - if data[r] == nil { - data[r] = make(map[interface{}]interface{}) - datat[r] = time.Now().Unix() - } - data[r][key] = val - mutex.Unlock() -} - -// Get returns a value stored for a given key in a given request. -func Get(r *http.Request, key interface{}) interface{} { - mutex.RLock() - if ctx := data[r]; ctx != nil { - value := ctx[key] - mutex.RUnlock() - return value - } - mutex.RUnlock() - return nil -} - -// GetOk returns stored value and presence state like multi-value return of map access. -func GetOk(r *http.Request, key interface{}) (interface{}, bool) { - mutex.RLock() - if _, ok := data[r]; ok { - value, ok := data[r][key] - mutex.RUnlock() - return value, ok - } - mutex.RUnlock() - return nil, false -} - -// GetAll returns all stored values for the request as a map. Nil is returned for invalid requests. -func GetAll(r *http.Request) map[interface{}]interface{} { - mutex.RLock() - if context, ok := data[r]; ok { - result := make(map[interface{}]interface{}, len(context)) - for k, v := range context { - result[k] = v - } - mutex.RUnlock() - return result - } - mutex.RUnlock() - return nil -} - -// GetAllOk returns all stored values for the request as a map and a boolean value that indicates if -// the request was registered. -func GetAllOk(r *http.Request) (map[interface{}]interface{}, bool) { - mutex.RLock() - context, ok := data[r] - result := make(map[interface{}]interface{}, len(context)) - for k, v := range context { - result[k] = v - } - mutex.RUnlock() - return result, ok -} - -// Delete removes a value stored for a given key in a given request. -func Delete(r *http.Request, key interface{}) { - mutex.Lock() - if data[r] != nil { - delete(data[r], key) - } - mutex.Unlock() -} - -// Clear removes all values stored for a given request. -// -// This is usually called by a handler wrapper to clean up request -// variables at the end of a request lifetime. See ClearHandler(). -func Clear(r *http.Request) { - mutex.Lock() - clear(r) - mutex.Unlock() -} - -// clear is Clear without the lock. -func clear(r *http.Request) { - delete(data, r) - delete(datat, r) -} - -// Purge removes request data stored for longer than maxAge, in seconds. -// It returns the amount of requests removed. -// -// If maxAge <= 0, all request data is removed. -// -// This is only used for sanity check: in case context cleaning was not -// properly set some request data can be kept forever, consuming an increasing -// amount of memory. In case this is detected, Purge() must be called -// periodically until the problem is fixed. -func Purge(maxAge int) int { - mutex.Lock() - count := 0 - if maxAge <= 0 { - count = len(data) - data = make(map[*http.Request]map[interface{}]interface{}) - datat = make(map[*http.Request]int64) - } else { - min := time.Now().Unix() - int64(maxAge) - for r := range data { - if datat[r] < min { - clear(r) - count++ - } - } - } - mutex.Unlock() - return count -} - -// ClearHandler wraps an http.Handler and clears request values at the end -// of a request lifetime. -func ClearHandler(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer Clear(r) - h.ServeHTTP(w, r) - }) -} diff --git a/vendor/github.com/gorilla/context/context_test.go b/vendor/github.com/gorilla/context/context_test.go deleted file mode 100644 index 9814c501e..000000000 --- a/vendor/github.com/gorilla/context/context_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package context - -import ( - "net/http" - "testing" -) - -type keyType int - -const ( - key1 keyType = iota - key2 -) - -func TestContext(t *testing.T) { - assertEqual := func(val interface{}, exp interface{}) { - if val != exp { - t.Errorf("Expected %v, got %v.", exp, val) - } - } - - r, _ := http.NewRequest("GET", "http://localhost:8080/", nil) - emptyR, _ := http.NewRequest("GET", "http://localhost:8080/", nil) - - // Get() - assertEqual(Get(r, key1), nil) - - // Set() - Set(r, key1, "1") - assertEqual(Get(r, key1), "1") - assertEqual(len(data[r]), 1) - - Set(r, key2, "2") - assertEqual(Get(r, key2), "2") - assertEqual(len(data[r]), 2) - - //GetOk - value, ok := GetOk(r, key1) - assertEqual(value, "1") - assertEqual(ok, true) - - value, ok = GetOk(r, "not exists") - assertEqual(value, nil) - assertEqual(ok, false) - - Set(r, "nil value", nil) - value, ok = GetOk(r, "nil value") - assertEqual(value, nil) - assertEqual(ok, true) - - // GetAll() - values := GetAll(r) - assertEqual(len(values), 3) - - // GetAll() for empty request - values = GetAll(emptyR) - if values != nil { - t.Error("GetAll didn't return nil value for invalid request") - } - - // GetAllOk() - values, ok = GetAllOk(r) - assertEqual(len(values), 3) - assertEqual(ok, true) - - // GetAllOk() for empty request - values, ok = GetAllOk(emptyR) - assertEqual(value, nil) - assertEqual(ok, false) - - // Delete() - Delete(r, key1) - assertEqual(Get(r, key1), nil) - assertEqual(len(data[r]), 2) - - Delete(r, key2) - assertEqual(Get(r, key2), nil) - assertEqual(len(data[r]), 1) - - // Clear() - Clear(r) - assertEqual(len(data), 0) -} - -func parallelReader(r *http.Request, key string, iterations int, wait, done chan struct{}) { - <-wait - for i := 0; i < iterations; i++ { - Get(r, key) - } - done <- struct{}{} - -} - -func parallelWriter(r *http.Request, key, value string, iterations int, wait, done chan struct{}) { - <-wait - for i := 0; i < iterations; i++ { - Set(r, key, value) - } - done <- struct{}{} - -} - -func benchmarkMutex(b *testing.B, numReaders, numWriters, iterations int) { - - b.StopTimer() - r, _ := http.NewRequest("GET", "http://localhost:8080/", nil) - done := make(chan struct{}) - b.StartTimer() - - for i := 0; i < b.N; i++ { - wait := make(chan struct{}) - - for i := 0; i < numReaders; i++ { - go parallelReader(r, "test", iterations, wait, done) - } - - for i := 0; i < numWriters; i++ { - go parallelWriter(r, "test", "123", iterations, wait, done) - } - - close(wait) - - for i := 0; i < numReaders+numWriters; i++ { - <-done - } - - } - -} - -func BenchmarkMutexSameReadWrite1(b *testing.B) { - benchmarkMutex(b, 1, 1, 32) -} -func BenchmarkMutexSameReadWrite2(b *testing.B) { - benchmarkMutex(b, 2, 2, 32) -} -func BenchmarkMutexSameReadWrite4(b *testing.B) { - benchmarkMutex(b, 4, 4, 32) -} -func BenchmarkMutex1(b *testing.B) { - benchmarkMutex(b, 2, 8, 32) -} -func BenchmarkMutex2(b *testing.B) { - benchmarkMutex(b, 16, 4, 64) -} -func BenchmarkMutex3(b *testing.B) { - benchmarkMutex(b, 1, 2, 128) -} -func BenchmarkMutex4(b *testing.B) { - benchmarkMutex(b, 128, 32, 256) -} -func BenchmarkMutex5(b *testing.B) { - benchmarkMutex(b, 1024, 2048, 64) -} -func BenchmarkMutex6(b *testing.B) { - benchmarkMutex(b, 2048, 1024, 512) -} diff --git a/vendor/github.com/gorilla/context/doc.go b/vendor/github.com/gorilla/context/doc.go deleted file mode 100644 index 73c740031..000000000 --- a/vendor/github.com/gorilla/context/doc.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package context stores values shared during a request lifetime. - -For example, a router can set variables extracted from the URL and later -application handlers can access those values, or it can be used to store -sessions values to be saved at the end of a request. There are several -others common uses. - -The idea was posted by Brad Fitzpatrick to the go-nuts mailing list: - - http://groups.google.com/group/golang-nuts/msg/e2d679d303aa5d53 - -Here's the basic usage: first define the keys that you will need. The key -type is interface{} so a key can be of any type that supports equality. -Here we define a key using a custom int type to avoid name collisions: - - package foo - - import ( - "github.com/gorilla/context" - ) - - type key int - - const MyKey key = 0 - -Then set a variable. Variables are bound to an http.Request object, so you -need a request instance to set a value: - - context.Set(r, MyKey, "bar") - -The application can later access the variable using the same key you provided: - - func MyHandler(w http.ResponseWriter, r *http.Request) { - // val is "bar". - val := context.Get(r, foo.MyKey) - - // returns ("bar", true) - val, ok := context.GetOk(r, foo.MyKey) - // ... - } - -And that's all about the basic usage. We discuss some other ideas below. - -Any type can be stored in the context. To enforce a given type, make the key -private and wrap Get() and Set() to accept and return values of a specific -type: - - type key int - - const mykey key = 0 - - // GetMyKey returns a value for this package from the request values. - func GetMyKey(r *http.Request) SomeType { - if rv := context.Get(r, mykey); rv != nil { - return rv.(SomeType) - } - return nil - } - - // SetMyKey sets a value for this package in the request values. - func SetMyKey(r *http.Request, val SomeType) { - context.Set(r, mykey, val) - } - -Variables must be cleared at the end of a request, to remove all values -that were stored. This can be done in an http.Handler, after a request was -served. Just call Clear() passing the request: - - context.Clear(r) - -...or use ClearHandler(), which conveniently wraps an http.Handler to clear -variables at the end of a request lifetime. - -The Routers from the packages gorilla/mux and gorilla/pat call Clear() -so if you are using either of them you don't need to clear the context manually. -*/ -package context diff --git a/vendor/github.com/gorilla/securecookie/.travis.yml b/vendor/github.com/gorilla/securecookie/.travis.yml deleted file mode 100644 index 24882fc7b..000000000 --- a/vendor/github.com/gorilla/securecookie/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go -sudo: false - -matrix: - include: - - go: 1.3 - - go: 1.4 - - go: 1.5 - - go: 1.6 - - go: tip - allow_failures: - - go: tip - -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d .) - - go vet $(go list ./... | grep -v /vendor/) - - go test -v -race ./... diff --git a/vendor/github.com/gorilla/securecookie/LICENSE b/vendor/github.com/gorilla/securecookie/LICENSE deleted file mode 100644 index 0e5fb8728..000000000 --- a/vendor/github.com/gorilla/securecookie/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/securecookie/README.md b/vendor/github.com/gorilla/securecookie/README.md deleted file mode 100644 index 5ed299e5a..000000000 --- a/vendor/github.com/gorilla/securecookie/README.md +++ /dev/null @@ -1,76 +0,0 @@ -securecookie -============ -[![GoDoc](https://godoc.org/github.com/gorilla/securecookie?status.svg)](https://godoc.org/github.com/gorilla/securecookie) [![Build Status](https://travis-ci.org/gorilla/securecookie.png?branch=master)](https://travis-ci.org/gorilla/securecookie) - -securecookie encodes and decodes authenticated and optionally encrypted -cookie values. - -Secure cookies can't be forged, because their values are validated using HMAC. -When encrypted, the content is also inaccessible to malicious eyes. It is still -recommended that sensitive data not be stored in cookies, and that HTTPS be used -to prevent cookie [replay attacks](https://en.wikipedia.org/wiki/Replay_attack). - -## Examples - -To use it, first create a new SecureCookie instance: - -```go -// Hash keys should be at least 32 bytes long -var hashKey = []byte("very-secret") -// Block keys should be 16 bytes (AES-128) or 32 bytes (AES-256) long. -// Shorter keys may weaken the encryption used. -var blockKey = []byte("a-lot-secret") -var s = securecookie.New(hashKey, blockKey) -``` - -The hashKey is required, used to authenticate the cookie value using HMAC. -It is recommended to use a key with 32 or 64 bytes. - -The blockKey is optional, used to encrypt the cookie value -- set it to nil -to not use encryption. If set, the length must correspond to the block size -of the encryption algorithm. For AES, used by default, valid lengths are -16, 24, or 32 bytes to select AES-128, AES-192, or AES-256. - -Strong keys can be created using the convenience function GenerateRandomKey(). - -Once a SecureCookie instance is set, use it to encode a cookie value: - -```go -func SetCookieHandler(w http.ResponseWriter, r *http.Request) { - value := map[string]string{ - "foo": "bar", - } - if encoded, err := s.Encode("cookie-name", value); err == nil { - cookie := &http.Cookie{ - Name: "cookie-name", - Value: encoded, - Path: "/", - } - http.SetCookie(w, cookie) - } -} -``` - -Later, use the same SecureCookie instance to decode and validate a cookie -value: - -```go -func ReadCookieHandler(w http.ResponseWriter, r *http.Request) { - if cookie, err := r.Cookie("cookie-name"); err == nil { - value := make(map[string]string) - if err = s2.Decode("cookie-name", cookie.Value, &value); err == nil { - fmt.Fprintf(w, "The value of foo is %q", value["foo"]) - } - } -} -``` - -We stored a map[string]string, but secure cookies can hold any value that -can be encoded using `encoding/gob`. To store custom types, they must be -registered first using gob.Register(). For basic types this is not needed; -it works out of the box. An optional JSON encoder that uses `encoding/json` is -available for types compatible with JSON. - -## License - -BSD licensed. See the LICENSE file for details. diff --git a/vendor/github.com/gorilla/securecookie/doc.go b/vendor/github.com/gorilla/securecookie/doc.go deleted file mode 100644 index ae89408d9..000000000 --- a/vendor/github.com/gorilla/securecookie/doc.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package securecookie encodes and decodes authenticated and optionally -encrypted cookie values. - -Secure cookies can't be forged, because their values are validated using HMAC. -When encrypted, the content is also inaccessible to malicious eyes. - -To use it, first create a new SecureCookie instance: - - var hashKey = []byte("very-secret") - var blockKey = []byte("a-lot-secret") - var s = securecookie.New(hashKey, blockKey) - -The hashKey is required, used to authenticate the cookie value using HMAC. -It is recommended to use a key with 32 or 64 bytes. - -The blockKey is optional, used to encrypt the cookie value -- set it to nil -to not use encryption. If set, the length must correspond to the block size -of the encryption algorithm. For AES, used by default, valid lengths are -16, 24, or 32 bytes to select AES-128, AES-192, or AES-256. - -Strong keys can be created using the convenience function GenerateRandomKey(). - -Once a SecureCookie instance is set, use it to encode a cookie value: - - func SetCookieHandler(w http.ResponseWriter, r *http.Request) { - value := map[string]string{ - "foo": "bar", - } - if encoded, err := s.Encode("cookie-name", value); err == nil { - cookie := &http.Cookie{ - Name: "cookie-name", - Value: encoded, - Path: "/", - } - http.SetCookie(w, cookie) - } - } - -Later, use the same SecureCookie instance to decode and validate a cookie -value: - - func ReadCookieHandler(w http.ResponseWriter, r *http.Request) { - if cookie, err := r.Cookie("cookie-name"); err == nil { - value := make(map[string]string) - if err = s2.Decode("cookie-name", cookie.Value, &value); err == nil { - fmt.Fprintf(w, "The value of foo is %q", value["foo"]) - } - } - } - -We stored a map[string]string, but secure cookies can hold any value that -can be encoded using encoding/gob. To store custom types, they must be -registered first using gob.Register(). For basic types this is not needed; -it works out of the box. -*/ -package securecookie diff --git a/vendor/github.com/gorilla/securecookie/fuzz.go b/vendor/github.com/gorilla/securecookie/fuzz.go deleted file mode 100644 index e4d0534e4..000000000 --- a/vendor/github.com/gorilla/securecookie/fuzz.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build gofuzz - -package securecookie - -var hashKey = []byte("very-secret12345") -var blockKey = []byte("a-lot-secret1234") -var s = New(hashKey, blockKey) - -type Cookie struct { - B bool - I int - S string -} - -func Fuzz(data []byte) int { - datas := string(data) - var c Cookie - if err := s.Decode("fuzz", datas, &c); err != nil { - return 0 - } - if _, err := s.Encode("fuzz", c); err != nil { - panic(err) - } - return 1 -} diff --git a/vendor/github.com/gorilla/securecookie/securecookie.go b/vendor/github.com/gorilla/securecookie/securecookie.go deleted file mode 100644 index 83dd606ac..000000000 --- a/vendor/github.com/gorilla/securecookie/securecookie.go +++ /dev/null @@ -1,646 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package securecookie - -import ( - "bytes" - "crypto/aes" - "crypto/cipher" - "crypto/hmac" - "crypto/rand" - "crypto/sha256" - "crypto/subtle" - "encoding/base64" - "encoding/gob" - "encoding/json" - "fmt" - "hash" - "io" - "strconv" - "strings" - "time" -) - -// Error is the interface of all errors returned by functions in this library. -type Error interface { - error - - // IsUsage returns true for errors indicating the client code probably - // uses this library incorrectly. For example, the client may have - // failed to provide a valid hash key, or may have failed to configure - // the Serializer adequately for encoding value. - IsUsage() bool - - // IsDecode returns true for errors indicating that a cookie could not - // be decoded and validated. Since cookies are usually untrusted - // user-provided input, errors of this type should be expected. - // Usually, the proper action is simply to reject the request. - IsDecode() bool - - // IsInternal returns true for unexpected errors occurring in the - // securecookie implementation. - IsInternal() bool - - // Cause, if it returns a non-nil value, indicates that this error was - // propagated from some underlying library. If this method returns nil, - // this error was raised directly by this library. - // - // Cause is provided principally for debugging/logging purposes; it is - // rare that application logic should perform meaningfully different - // logic based on Cause. See, for example, the caveats described on - // (MultiError).Cause(). - Cause() error -} - -// errorType is a bitmask giving the error type(s) of an cookieError value. -type errorType int - -const ( - usageError = errorType(1 << iota) - decodeError - internalError -) - -type cookieError struct { - typ errorType - msg string - cause error -} - -func (e cookieError) IsUsage() bool { return (e.typ & usageError) != 0 } -func (e cookieError) IsDecode() bool { return (e.typ & decodeError) != 0 } -func (e cookieError) IsInternal() bool { return (e.typ & internalError) != 0 } - -func (e cookieError) Cause() error { return e.cause } - -func (e cookieError) Error() string { - parts := []string{"securecookie: "} - if e.msg == "" { - parts = append(parts, "error") - } else { - parts = append(parts, e.msg) - } - if c := e.Cause(); c != nil { - parts = append(parts, " - caused by: ", c.Error()) - } - return strings.Join(parts, "") -} - -var ( - errGeneratingIV = cookieError{typ: internalError, msg: "failed to generate random iv"} - - errNoCodecs = cookieError{typ: usageError, msg: "no codecs provided"} - errHashKeyNotSet = cookieError{typ: usageError, msg: "hash key is not set"} - errBlockKeyNotSet = cookieError{typ: usageError, msg: "block key is not set"} - errEncodedValueTooLong = cookieError{typ: usageError, msg: "the value is too long"} - - errValueToDecodeTooLong = cookieError{typ: decodeError, msg: "the value is too long"} - errTimestampInvalid = cookieError{typ: decodeError, msg: "invalid timestamp"} - errTimestampTooNew = cookieError{typ: decodeError, msg: "timestamp is too new"} - errTimestampExpired = cookieError{typ: decodeError, msg: "expired timestamp"} - errDecryptionFailed = cookieError{typ: decodeError, msg: "the value could not be decrypted"} - errValueNotByte = cookieError{typ: decodeError, msg: "value not a []byte."} - - // ErrMacInvalid indicates that cookie decoding failed because the HMAC - // could not be extracted and verified. Direct use of this error - // variable is deprecated; it is public only for legacy compatibility, - // and may be privatized in the future, as it is rarely useful to - // distinguish between this error and other Error implementations. - ErrMacInvalid = cookieError{typ: decodeError, msg: "the value is not valid"} -) - -// Codec defines an interface to encode and decode cookie values. -type Codec interface { - Encode(name string, value interface{}) (string, error) - Decode(name, value string, dst interface{}) error -} - -// New returns a new SecureCookie. -// -// hashKey is required, used to authenticate values using HMAC. Create it using -// GenerateRandomKey(). It is recommended to use a key with 32 or 64 bytes. -// -// blockKey is optional, used to encrypt values. Create it using -// GenerateRandomKey(). The key length must correspond to the block size -// of the encryption algorithm. For AES, used by default, valid lengths are -// 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256. -// The default encoder used for cookie serialization is encoding/gob. -// -// Note that keys created using GenerateRandomKey() are not automatically -// persisted. New keys will be created when the application is restarted, and -// previously issued cookies will not be able to be decoded. -func New(hashKey, blockKey []byte) *SecureCookie { - s := &SecureCookie{ - hashKey: hashKey, - blockKey: blockKey, - hashFunc: sha256.New, - maxAge: 86400 * 30, - maxLength: 4096, - sz: GobEncoder{}, - } - if hashKey == nil { - s.err = errHashKeyNotSet - } - if blockKey != nil { - s.BlockFunc(aes.NewCipher) - } - return s -} - -// SecureCookie encodes and decodes authenticated and optionally encrypted -// cookie values. -type SecureCookie struct { - hashKey []byte - hashFunc func() hash.Hash - blockKey []byte - block cipher.Block - maxLength int - maxAge int64 - minAge int64 - err error - sz Serializer - // For testing purposes, the function that returns the current timestamp. - // If not set, it will use time.Now().UTC().Unix(). - timeFunc func() int64 -} - -// Serializer provides an interface for providing custom serializers for cookie -// values. -type Serializer interface { - Serialize(src interface{}) ([]byte, error) - Deserialize(src []byte, dst interface{}) error -} - -// GobEncoder encodes cookie values using encoding/gob. This is the simplest -// encoder and can handle complex types via gob.Register. -type GobEncoder struct{} - -// JSONEncoder encodes cookie values using encoding/json. Users who wish to -// encode complex types need to satisfy the json.Marshaller and -// json.Unmarshaller interfaces. -type JSONEncoder struct{} - -// NopEncoder does not encode cookie values, and instead simply accepts a []byte -// (as an interface{}) and returns a []byte. This is particularly useful when -// you encoding an object upstream and do not wish to re-encode it. -type NopEncoder struct{} - -// MaxLength restricts the maximum length, in bytes, for the cookie value. -// -// Default is 4096, which is the maximum value accepted by Internet Explorer. -func (s *SecureCookie) MaxLength(value int) *SecureCookie { - s.maxLength = value - return s -} - -// MaxAge restricts the maximum age, in seconds, for the cookie value. -// -// Default is 86400 * 30. Set it to 0 for no restriction. -func (s *SecureCookie) MaxAge(value int) *SecureCookie { - s.maxAge = int64(value) - return s -} - -// MinAge restricts the minimum age, in seconds, for the cookie value. -// -// Default is 0 (no restriction). -func (s *SecureCookie) MinAge(value int) *SecureCookie { - s.minAge = int64(value) - return s -} - -// HashFunc sets the hash function used to create HMAC. -// -// Default is crypto/sha256.New. -func (s *SecureCookie) HashFunc(f func() hash.Hash) *SecureCookie { - s.hashFunc = f - return s -} - -// BlockFunc sets the encryption function used to create a cipher.Block. -// -// Default is crypto/aes.New. -func (s *SecureCookie) BlockFunc(f func([]byte) (cipher.Block, error)) *SecureCookie { - if s.blockKey == nil { - s.err = errBlockKeyNotSet - } else if block, err := f(s.blockKey); err == nil { - s.block = block - } else { - s.err = cookieError{cause: err, typ: usageError} - } - return s -} - -// Encoding sets the encoding/serialization method for cookies. -// -// Default is encoding/gob. To encode special structures using encoding/gob, -// they must be registered first using gob.Register(). -func (s *SecureCookie) SetSerializer(sz Serializer) *SecureCookie { - s.sz = sz - - return s -} - -// Encode encodes a cookie value. -// -// It serializes, optionally encrypts, signs with a message authentication code, -// and finally encodes the value. -// -// The name argument is the cookie name. It is stored with the encoded value. -// The value argument is the value to be encoded. It can be any value that can -// be encoded using the currently selected serializer; see SetSerializer(). -// -// It is the client's responsibility to ensure that value, when encoded using -// the current serialization/encryption settings on s and then base64-encoded, -// is shorter than the maximum permissible length. -func (s *SecureCookie) Encode(name string, value interface{}) (string, error) { - if s.err != nil { - return "", s.err - } - if s.hashKey == nil { - s.err = errHashKeyNotSet - return "", s.err - } - var err error - var b []byte - // 1. Serialize. - if b, err = s.sz.Serialize(value); err != nil { - return "", cookieError{cause: err, typ: usageError} - } - // 2. Encrypt (optional). - if s.block != nil { - if b, err = encrypt(s.block, b); err != nil { - return "", cookieError{cause: err, typ: usageError} - } - } - b = encode(b) - // 3. Create MAC for "name|date|value". Extra pipe to be used later. - b = []byte(fmt.Sprintf("%s|%d|%s|", name, s.timestamp(), b)) - mac := createMac(hmac.New(s.hashFunc, s.hashKey), b[:len(b)-1]) - // Append mac, remove name. - b = append(b, mac...)[len(name)+1:] - // 4. Encode to base64. - b = encode(b) - // 5. Check length. - if s.maxLength != 0 && len(b) > s.maxLength { - return "", errEncodedValueTooLong - } - // Done. - return string(b), nil -} - -// Decode decodes a cookie value. -// -// It decodes, verifies a message authentication code, optionally decrypts and -// finally deserializes the value. -// -// The name argument is the cookie name. It must be the same name used when -// it was stored. The value argument is the encoded cookie value. The dst -// argument is where the cookie will be decoded. It must be a pointer. -func (s *SecureCookie) Decode(name, value string, dst interface{}) error { - if s.err != nil { - return s.err - } - if s.hashKey == nil { - s.err = errHashKeyNotSet - return s.err - } - // 1. Check length. - if s.maxLength != 0 && len(value) > s.maxLength { - return errValueToDecodeTooLong - } - // 2. Decode from base64. - b, err := decode([]byte(value)) - if err != nil { - return err - } - // 3. Verify MAC. Value is "date|value|mac". - parts := bytes.SplitN(b, []byte("|"), 3) - if len(parts) != 3 { - return ErrMacInvalid - } - h := hmac.New(s.hashFunc, s.hashKey) - b = append([]byte(name+"|"), b[:len(b)-len(parts[2])-1]...) - if err = verifyMac(h, b, parts[2]); err != nil { - return err - } - // 4. Verify date ranges. - var t1 int64 - if t1, err = strconv.ParseInt(string(parts[0]), 10, 64); err != nil { - return errTimestampInvalid - } - t2 := s.timestamp() - if s.minAge != 0 && t1 > t2-s.minAge { - return errTimestampTooNew - } - if s.maxAge != 0 && t1 < t2-s.maxAge { - return errTimestampExpired - } - // 5. Decrypt (optional). - b, err = decode(parts[1]) - if err != nil { - return err - } - if s.block != nil { - if b, err = decrypt(s.block, b); err != nil { - return err - } - } - // 6. Deserialize. - if err = s.sz.Deserialize(b, dst); err != nil { - return cookieError{cause: err, typ: decodeError} - } - // Done. - return nil -} - -// timestamp returns the current timestamp, in seconds. -// -// For testing purposes, the function that generates the timestamp can be -// overridden. If not set, it will return time.Now().UTC().Unix(). -func (s *SecureCookie) timestamp() int64 { - if s.timeFunc == nil { - return time.Now().UTC().Unix() - } - return s.timeFunc() -} - -// Authentication ------------------------------------------------------------- - -// createMac creates a message authentication code (MAC). -func createMac(h hash.Hash, value []byte) []byte { - h.Write(value) - return h.Sum(nil) -} - -// verifyMac verifies that a message authentication code (MAC) is valid. -func verifyMac(h hash.Hash, value []byte, mac []byte) error { - mac2 := createMac(h, value) - // Check that both MACs are of equal length, as subtle.ConstantTimeCompare - // does not do this prior to Go 1.4. - if len(mac) == len(mac2) && subtle.ConstantTimeCompare(mac, mac2) == 1 { - return nil - } - return ErrMacInvalid -} - -// Encryption ----------------------------------------------------------------- - -// encrypt encrypts a value using the given block in counter mode. -// -// A random initialization vector (http://goo.gl/zF67k) with the length of the -// block size is prepended to the resulting ciphertext. -func encrypt(block cipher.Block, value []byte) ([]byte, error) { - iv := GenerateRandomKey(block.BlockSize()) - if iv == nil { - return nil, errGeneratingIV - } - // Encrypt it. - stream := cipher.NewCTR(block, iv) - stream.XORKeyStream(value, value) - // Return iv + ciphertext. - return append(iv, value...), nil -} - -// decrypt decrypts a value using the given block in counter mode. -// -// The value to be decrypted must be prepended by a initialization vector -// (http://goo.gl/zF67k) with the length of the block size. -func decrypt(block cipher.Block, value []byte) ([]byte, error) { - size := block.BlockSize() - if len(value) > size { - // Extract iv. - iv := value[:size] - // Extract ciphertext. - value = value[size:] - // Decrypt it. - stream := cipher.NewCTR(block, iv) - stream.XORKeyStream(value, value) - return value, nil - } - return nil, errDecryptionFailed -} - -// Serialization -------------------------------------------------------------- - -// Serialize encodes a value using gob. -func (e GobEncoder) Serialize(src interface{}) ([]byte, error) { - buf := new(bytes.Buffer) - enc := gob.NewEncoder(buf) - if err := enc.Encode(src); err != nil { - return nil, cookieError{cause: err, typ: usageError} - } - return buf.Bytes(), nil -} - -// Deserialize decodes a value using gob. -func (e GobEncoder) Deserialize(src []byte, dst interface{}) error { - dec := gob.NewDecoder(bytes.NewBuffer(src)) - if err := dec.Decode(dst); err != nil { - return cookieError{cause: err, typ: decodeError} - } - return nil -} - -// Serialize encodes a value using encoding/json. -func (e JSONEncoder) Serialize(src interface{}) ([]byte, error) { - buf := new(bytes.Buffer) - enc := json.NewEncoder(buf) - if err := enc.Encode(src); err != nil { - return nil, cookieError{cause: err, typ: usageError} - } - return buf.Bytes(), nil -} - -// Deserialize decodes a value using encoding/json. -func (e JSONEncoder) Deserialize(src []byte, dst interface{}) error { - dec := json.NewDecoder(bytes.NewReader(src)) - if err := dec.Decode(dst); err != nil { - return cookieError{cause: err, typ: decodeError} - } - return nil -} - -// Serialize passes a []byte through as-is. -func (e NopEncoder) Serialize(src interface{}) ([]byte, error) { - if b, ok := src.([]byte); ok { - return b, nil - } - - return nil, errValueNotByte -} - -// Deserialize passes a []byte through as-is. -func (e NopEncoder) Deserialize(src []byte, dst interface{}) error { - if _, ok := dst.([]byte); ok { - dst = src - return nil - } - - return errValueNotByte -} - -// Encoding ------------------------------------------------------------------- - -// encode encodes a value using base64. -func encode(value []byte) []byte { - encoded := make([]byte, base64.URLEncoding.EncodedLen(len(value))) - base64.URLEncoding.Encode(encoded, value) - return encoded -} - -// decode decodes a cookie using base64. -func decode(value []byte) ([]byte, error) { - decoded := make([]byte, base64.URLEncoding.DecodedLen(len(value))) - b, err := base64.URLEncoding.Decode(decoded, value) - if err != nil { - return nil, cookieError{cause: err, typ: decodeError, msg: "base64 decode failed"} - } - return decoded[:b], nil -} - -// Helpers -------------------------------------------------------------------- - -// GenerateRandomKey creates a random key with the given length in bytes. -// On failure, returns nil. -// -// Callers should explicitly check for the possibility of a nil return, treat -// it as a failure of the system random number generator, and not continue. -func GenerateRandomKey(length int) []byte { - k := make([]byte, length) - if _, err := io.ReadFull(rand.Reader, k); err != nil { - return nil - } - return k -} - -// CodecsFromPairs returns a slice of SecureCookie instances. -// -// It is a convenience function to create a list of codecs for key rotation. Note -// that the generated Codecs will have the default options applied: callers -// should iterate over each Codec and type-assert the underlying *SecureCookie to -// change these. -// -// Example: -// -// codecs := securecookie.CodecsFromPairs( -// []byte("new-hash-key"), -// []byte("new-block-key"), -// []byte("old-hash-key"), -// []byte("old-block-key"), -// ) -// -// // Modify each instance. -// for _, s := range codecs { -// if cookie, ok := s.(*securecookie.SecureCookie); ok { -// cookie.MaxAge(86400 * 7) -// cookie.SetSerializer(securecookie.JSONEncoder{}) -// cookie.HashFunc(sha512.New512_256) -// } -// } -// -func CodecsFromPairs(keyPairs ...[]byte) []Codec { - codecs := make([]Codec, len(keyPairs)/2+len(keyPairs)%2) - for i := 0; i < len(keyPairs); i += 2 { - var blockKey []byte - if i+1 < len(keyPairs) { - blockKey = keyPairs[i+1] - } - codecs[i/2] = New(keyPairs[i], blockKey) - } - return codecs -} - -// EncodeMulti encodes a cookie value using a group of codecs. -// -// The codecs are tried in order. Multiple codecs are accepted to allow -// key rotation. -// -// On error, may return a MultiError. -func EncodeMulti(name string, value interface{}, codecs ...Codec) (string, error) { - if len(codecs) == 0 { - return "", errNoCodecs - } - - var errors MultiError - for _, codec := range codecs { - encoded, err := codec.Encode(name, value) - if err == nil { - return encoded, nil - } - errors = append(errors, err) - } - return "", errors -} - -// DecodeMulti decodes a cookie value using a group of codecs. -// -// The codecs are tried in order. Multiple codecs are accepted to allow -// key rotation. -// -// On error, may return a MultiError. -func DecodeMulti(name string, value string, dst interface{}, codecs ...Codec) error { - if len(codecs) == 0 { - return errNoCodecs - } - - var errors MultiError - for _, codec := range codecs { - err := codec.Decode(name, value, dst) - if err == nil { - return nil - } - errors = append(errors, err) - } - return errors -} - -// MultiError groups multiple errors. -type MultiError []error - -func (m MultiError) IsUsage() bool { return m.any(func(e Error) bool { return e.IsUsage() }) } -func (m MultiError) IsDecode() bool { return m.any(func(e Error) bool { return e.IsDecode() }) } -func (m MultiError) IsInternal() bool { return m.any(func(e Error) bool { return e.IsInternal() }) } - -// Cause returns nil for MultiError; there is no unique underlying cause in the -// general case. -// -// Note: we could conceivably return a non-nil Cause only when there is exactly -// one child error with a Cause. However, it would be brittle for client code -// to rely on the arity of causes inside a MultiError, so we have opted not to -// provide this functionality. Clients which really wish to access the Causes -// of the underlying errors are free to iterate through the errors themselves. -func (m MultiError) Cause() error { return nil } - -func (m MultiError) Error() string { - s, n := "", 0 - for _, e := range m { - if e != nil { - if n == 0 { - s = e.Error() - } - n++ - } - } - switch n { - case 0: - return "(0 errors)" - case 1: - return s - case 2: - return s + " (and 1 other error)" - } - return fmt.Sprintf("%s (and %d other errors)", s, n-1) -} - -// any returns true if any element of m is an Error for which pred returns true. -func (m MultiError) any(pred func(Error) bool) bool { - for _, e := range m { - if ourErr, ok := e.(Error); ok && pred(ourErr) { - return true - } - } - return false -} diff --git a/vendor/github.com/gorilla/securecookie/securecookie_test.go b/vendor/github.com/gorilla/securecookie/securecookie_test.go deleted file mode 100644 index 33ce4fc2b..000000000 --- a/vendor/github.com/gorilla/securecookie/securecookie_test.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package securecookie - -import ( - "crypto/aes" - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "fmt" - "reflect" - "strings" - "testing" -) - -// Asserts that cookieError and MultiError are Error implementations. -var _ Error = cookieError{} -var _ Error = MultiError{} - -var testCookies = []interface{}{ - map[string]string{"foo": "bar"}, - map[string]string{"baz": "ding"}, -} - -var testStrings = []string{"foo", "bar", "baz"} - -func TestSecureCookie(t *testing.T) { - // TODO test too old / too new timestamps - s1 := New([]byte("12345"), []byte("1234567890123456")) - s2 := New([]byte("54321"), []byte("6543210987654321")) - value := map[string]interface{}{ - "foo": "bar", - "baz": 128, - } - - for i := 0; i < 50; i++ { - // Running this multiple times to check if any special character - // breaks encoding/decoding. - encoded, err1 := s1.Encode("sid", value) - if err1 != nil { - t.Error(err1) - continue - } - dst := make(map[string]interface{}) - err2 := s1.Decode("sid", encoded, &dst) - if err2 != nil { - t.Fatalf("%v: %v", err2, encoded) - } - if !reflect.DeepEqual(dst, value) { - t.Fatalf("Expected %v, got %v.", value, dst) - } - dst2 := make(map[string]interface{}) - err3 := s2.Decode("sid", encoded, &dst2) - if err3 == nil { - t.Fatalf("Expected failure decoding.") - } - err4, ok := err3.(Error) - if !ok { - t.Fatalf("Expected error to implement Error, got: %#v", err3) - } - if !err4.IsDecode() { - t.Fatalf("Expected DecodeError, got: %#v", err4) - } - - // Test other error type flags. - if err4.IsUsage() { - t.Fatalf("Expected IsUsage() == false, got: %#v", err4) - } - if err4.IsInternal() { - t.Fatalf("Expected IsInternal() == false, got: %#v", err4) - } - } -} - -func TestSecureCookieNilKey(t *testing.T) { - s1 := New(nil, nil) - value := map[string]interface{}{ - "foo": "bar", - "baz": 128, - } - _, err := s1.Encode("sid", value) - if err != errHashKeyNotSet { - t.Fatal("Wrong error returned:", err) - } -} - -func TestDecodeInvalid(t *testing.T) { - // List of invalid cookies, which must not be accepted, base64-decoded - // (they will be encoded before passing to Decode). - invalidCookies := []string{ - "", - " ", - "\n", - "||", - "|||", - "cookie", - } - s := New([]byte("12345"), nil) - var dst string - for i, v := range invalidCookies { - for _, enc := range []*base64.Encoding{ - base64.StdEncoding, - base64.URLEncoding, - } { - err := s.Decode("name", enc.EncodeToString([]byte(v)), &dst) - if err == nil { - t.Fatalf("%d: expected failure decoding", i) - } - err2, ok := err.(Error) - if !ok || !err2.IsDecode() { - t.Fatalf("%d: Expected IsDecode(), got: %#v", i, err) - } - } - } -} - -func TestAuthentication(t *testing.T) { - hash := hmac.New(sha256.New, []byte("secret-key")) - for _, value := range testStrings { - hash.Reset() - signed := createMac(hash, []byte(value)) - hash.Reset() - err := verifyMac(hash, []byte(value), signed) - if err != nil { - t.Error(err) - } - } -} - -func TestEncryption(t *testing.T) { - block, err := aes.NewCipher([]byte("1234567890123456")) - if err != nil { - t.Fatalf("Block could not be created") - } - var encrypted, decrypted []byte - for _, value := range testStrings { - if encrypted, err = encrypt(block, []byte(value)); err != nil { - t.Error(err) - } else { - if decrypted, err = decrypt(block, encrypted); err != nil { - t.Error(err) - } - if string(decrypted) != value { - t.Errorf("Expected %v, got %v.", value, string(decrypted)) - } - } - } -} - -func TestGobSerialization(t *testing.T) { - var ( - sz GobEncoder - serialized []byte - deserialized map[string]string - err error - ) - for _, value := range testCookies { - if serialized, err = sz.Serialize(value); err != nil { - t.Error(err) - } else { - deserialized = make(map[string]string) - if err = sz.Deserialize(serialized, &deserialized); err != nil { - t.Error(err) - } - if fmt.Sprintf("%v", deserialized) != fmt.Sprintf("%v", value) { - t.Errorf("Expected %v, got %v.", value, deserialized) - } - } - } -} - -func TestJSONSerialization(t *testing.T) { - var ( - sz JSONEncoder - serialized []byte - deserialized map[string]string - err error - ) - for _, value := range testCookies { - if serialized, err = sz.Serialize(value); err != nil { - t.Error(err) - } else { - deserialized = make(map[string]string) - if err = sz.Deserialize(serialized, &deserialized); err != nil { - t.Error(err) - } - if fmt.Sprintf("%v", deserialized) != fmt.Sprintf("%v", value) { - t.Errorf("Expected %v, got %v.", value, deserialized) - } - } - } -} - -func TestEncoding(t *testing.T) { - for _, value := range testStrings { - encoded := encode([]byte(value)) - decoded, err := decode(encoded) - if err != nil { - t.Error(err) - } else if string(decoded) != value { - t.Errorf("Expected %v, got %s.", value, string(decoded)) - } - } -} - -func TestMultiError(t *testing.T) { - s1, s2 := New(nil, nil), New(nil, nil) - _, err := EncodeMulti("sid", "value", s1, s2) - if len(err.(MultiError)) != 2 { - t.Errorf("Expected 2 errors, got %s.", err) - } else { - if strings.Index(err.Error(), "hash key is not set") == -1 { - t.Errorf("Expected missing hash key error, got %s.", err.Error()) - } - ourErr, ok := err.(Error) - if !ok || !ourErr.IsUsage() { - t.Fatalf("Expected error to be a usage error; got %#v", err) - } - if ourErr.IsDecode() { - t.Errorf("Expected error NOT to be a decode error; got %#v", ourErr) - } - if ourErr.IsInternal() { - t.Errorf("Expected error NOT to be an internal error; got %#v", ourErr) - } - } -} - -func TestMultiNoCodecs(t *testing.T) { - _, err := EncodeMulti("foo", "bar") - if err != errNoCodecs { - t.Errorf("EncodeMulti: bad value for error, got: %v", err) - } - - var dst []byte - err = DecodeMulti("foo", "bar", &dst) - if err != errNoCodecs { - t.Errorf("DecodeMulti: bad value for error, got: %v", err) - } -} - -func TestMissingKey(t *testing.T) { - s1 := New(nil, nil) - - var dst []byte - err := s1.Decode("sid", "value", &dst) - if err != errHashKeyNotSet { - t.Fatalf("Expected %#v, got %#v", errHashKeyNotSet, err) - } - if err2, ok := err.(Error); !ok || !err2.IsUsage() { - t.Errorf("Expected missing hash key to be IsUsage(); was %#v", err) - } -} - -// ---------------------------------------------------------------------------- - -type FooBar struct { - Foo int - Bar string -} - -func TestCustomType(t *testing.T) { - s1 := New([]byte("12345"), []byte("1234567890123456")) - // Type is not registered in gob. (!!!) - src := &FooBar{42, "bar"} - encoded, _ := s1.Encode("sid", src) - - dst := &FooBar{} - _ = s1.Decode("sid", encoded, dst) - if dst.Foo != 42 || dst.Bar != "bar" { - t.Fatalf("Expected %#v, got %#v", src, dst) - } -} diff --git a/vendor/github.com/gorilla/sessions/.travis.yml b/vendor/github.com/gorilla/sessions/.travis.yml deleted file mode 100644 index db17dd3eb..000000000 --- a/vendor/github.com/gorilla/sessions/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: go -sudo: false - -matrix: - include: - - go: 1.3 - - go: 1.4 - - go: 1.5 - - go: 1.6 - - go: 1.7 - - go: tip - allow_failures: - - go: tip - -install: - - # skip - -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d .) - - go vet $(go list ./... | grep -v /vendor/) - - go test -v -race ./... diff --git a/vendor/github.com/gorilla/sessions/LICENSE b/vendor/github.com/gorilla/sessions/LICENSE deleted file mode 100644 index 0e5fb8728..000000000 --- a/vendor/github.com/gorilla/sessions/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/sessions/README.md b/vendor/github.com/gorilla/sessions/README.md deleted file mode 100644 index 65e5e1b36..000000000 --- a/vendor/github.com/gorilla/sessions/README.md +++ /dev/null @@ -1,79 +0,0 @@ -sessions -======== -[![GoDoc](https://godoc.org/github.com/gorilla/sessions?status.svg)](https://godoc.org/github.com/gorilla/sessions) [![Build Status](https://travis-ci.org/gorilla/sessions.png?branch=master)](https://travis-ci.org/gorilla/sessions) - -gorilla/sessions provides cookie and filesystem sessions and infrastructure for -custom session backends. - -The key features are: - -* Simple API: use it as an easy way to set signed (and optionally - encrypted) cookies. -* Built-in backends to store sessions in cookies or the filesystem. -* Flash messages: session values that last until read. -* Convenient way to switch session persistency (aka "remember me") and set - other attributes. -* Mechanism to rotate authentication and encryption keys. -* Multiple sessions per request, even using different backends. -* Interfaces and infrastructure for custom session backends: sessions from - different stores can be retrieved and batch-saved using a common API. - -Let's start with an example that shows the sessions API in a nutshell: - -```go - import ( - "net/http" - "github.com/gorilla/sessions" - ) - - var store = sessions.NewCookieStore([]byte("something-very-secret")) - - func MyHandler(w http.ResponseWriter, r *http.Request) { - // Get a session. We're ignoring the error resulted from decoding an - // existing session: Get() always returns a session, even if empty. - session, _ := store.Get(r, "session-name") - // Set some session values. - session.Values["foo"] = "bar" - session.Values[42] = 43 - // Save it before we write to the response/return from the handler. - session.Save(r, w) - } -``` - -First we initialize a session store calling `NewCookieStore()` and passing a -secret key used to authenticate the session. Inside the handler, we call -`store.Get()` to retrieve an existing session or a new one. Then we set some -session values in session.Values, which is a `map[interface{}]interface{}`. -And finally we call `session.Save()` to save the session in the response. - -Important Note: If you aren't using gorilla/mux, you need to wrap your handlers -with -[`context.ClearHandler`](http://www.gorillatoolkit.org/pkg/context#ClearHandler) -as or else you will leak memory! An easy way to do this is to wrap the top-level -mux when calling http.ListenAndServe: - -More examples are available [on the Gorilla -website](http://www.gorillatoolkit.org/pkg/sessions). - -## Store Implementations - -Other implementations of the `sessions.Store` interface: - -* [github.com/starJammer/gorilla-sessions-arangodb](https://github.com/starJammer/gorilla-sessions-arangodb) - ArangoDB -* [github.com/yosssi/boltstore](https://github.com/yosssi/boltstore) - Bolt -* [github.com/srinathgs/couchbasestore](https://github.com/srinathgs/couchbasestore) - Couchbase -* [github.com/denizeren/dynamostore](https://github.com/denizeren/dynamostore) - Dynamodb on AWS -* [github.com/bradleypeabody/gorilla-sessions-memcache](https://github.com/bradleypeabody/gorilla-sessions-memcache) - Memcache -* [github.com/dsoprea/go-appengine-sessioncascade](https://github.com/dsoprea/go-appengine-sessioncascade) - Memcache/Datastore/Context in AppEngine -* [github.com/kidstuff/mongostore](https://github.com/kidstuff/mongostore) - MongoDB -* [github.com/srinathgs/mysqlstore](https://github.com/srinathgs/mysqlstore) - MySQL -* [github.com/antonlindstrom/pgstore](https://github.com/antonlindstrom/pgstore) - PostgreSQL -* [github.com/boj/redistore](https://github.com/boj/redistore) - Redis -* [github.com/boj/rethinkstore](https://github.com/boj/rethinkstore) - RethinkDB -* [github.com/boj/riakstore](https://github.com/boj/riakstore) - Riak -* [github.com/michaeljs1990/sqlitestore](https://github.com/michaeljs1990/sqlitestore) - SQLite -* [github.com/wader/gormstore](https://github.com/wader/gormstore) - GORM (MySQL, PostgreSQL, SQLite) - -## License - -BSD licensed. See the LICENSE file for details. diff --git a/vendor/github.com/gorilla/sessions/doc.go b/vendor/github.com/gorilla/sessions/doc.go deleted file mode 100644 index 668e05e45..000000000 --- a/vendor/github.com/gorilla/sessions/doc.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package sessions provides cookie and filesystem sessions and -infrastructure for custom session backends. - -The key features are: - - * Simple API: use it as an easy way to set signed (and optionally - encrypted) cookies. - * Built-in backends to store sessions in cookies or the filesystem. - * Flash messages: session values that last until read. - * Convenient way to switch session persistency (aka "remember me") and set - other attributes. - * Mechanism to rotate authentication and encryption keys. - * Multiple sessions per request, even using different backends. - * Interfaces and infrastructure for custom session backends: sessions from - different stores can be retrieved and batch-saved using a common API. - -Let's start with an example that shows the sessions API in a nutshell: - - import ( - "net/http" - "github.com/gorilla/sessions" - ) - - var store = sessions.NewCookieStore([]byte("something-very-secret")) - - func MyHandler(w http.ResponseWriter, r *http.Request) { - // Get a session. We're ignoring the error resulted from decoding an - // existing session: Get() always returns a session, even if empty. - session, err := store.Get(r, "session-name") - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - // Set some session values. - session.Values["foo"] = "bar" - session.Values[42] = 43 - // Save it before we write to the response/return from the handler. - session.Save(r, w) - } - -First we initialize a session store calling NewCookieStore() and passing a -secret key used to authenticate the session. Inside the handler, we call -store.Get() to retrieve an existing session or a new one. Then we set some -session values in session.Values, which is a map[interface{}]interface{}. -And finally we call session.Save() to save the session in the response. - -Note that in production code, we should check for errors when calling -session.Save(r, w), and either display an error message or otherwise handle it. - -Save must be called before writing to the response, otherwise the session -cookie will not be sent to the client. - -Important Note: If you aren't using gorilla/mux, you need to wrap your handlers -with context.ClearHandler as or else you will leak memory! An easy way to do this -is to wrap the top-level mux when calling http.ListenAndServe: - - http.ListenAndServe(":8080", context.ClearHandler(http.DefaultServeMux)) - -The ClearHandler function is provided by the gorilla/context package. - -That's all you need to know for the basic usage. Let's take a look at other -options, starting with flash messages. - -Flash messages are session values that last until read. The term appeared with -Ruby On Rails a few years back. When we request a flash message, it is removed -from the session. To add a flash, call session.AddFlash(), and to get all -flashes, call session.Flashes(). Here is an example: - - func MyHandler(w http.ResponseWriter, r *http.Request) { - // Get a session. - session, err := store.Get(r, "session-name") - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - // Get the previously flashes, if any. - if flashes := session.Flashes(); len(flashes) > 0 { - // Use the flash values. - } else { - // Set a new flash. - session.AddFlash("Hello, flash messages world!") - } - session.Save(r, w) - } - -Flash messages are useful to set information to be read after a redirection, -like after form submissions. - -There may also be cases where you want to store a complex datatype within a -session, such as a struct. Sessions are serialised using the encoding/gob package, -so it is easy to register new datatypes for storage in sessions: - - import( - "encoding/gob" - "github.com/gorilla/sessions" - ) - - type Person struct { - FirstName string - LastName string - Email string - Age int - } - - type M map[string]interface{} - - func init() { - - gob.Register(&Person{}) - gob.Register(&M{}) - } - -As it's not possible to pass a raw type as a parameter to a function, gob.Register() -relies on us passing it a value of the desired type. In the example above we've passed -it a pointer to a struct and a pointer to a custom type representing a -map[string]interface. (We could have passed non-pointer values if we wished.) This will -then allow us to serialise/deserialise values of those types to and from our sessions. - -Note that because session values are stored in a map[string]interface{}, there's -a need to type-assert data when retrieving it. We'll use the Person struct we registered above: - - func MyHandler(w http.ResponseWriter, r *http.Request) { - session, err := store.Get(r, "session-name") - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - // Retrieve our struct and type-assert it - val := session.Values["person"] - var person = &Person{} - if person, ok := val.(*Person); !ok { - // Handle the case that it's not an expected type - } - - // Now we can use our person object - } - -By default, session cookies last for a month. This is probably too long for -some cases, but it is easy to change this and other attributes during -runtime. Sessions can be configured individually or the store can be -configured and then all sessions saved using it will use that configuration. -We access session.Options or store.Options to set a new configuration. The -fields are basically a subset of http.Cookie fields. Let's change the -maximum age of a session to one week: - - session.Options = &sessions.Options{ - Path: "/", - MaxAge: 86400 * 7, - HttpOnly: true, - } - -Sometimes we may want to change authentication and/or encryption keys without -breaking existing sessions. The CookieStore supports key rotation, and to use -it you just need to set multiple authentication and encryption keys, in pairs, -to be tested in order: - - var store = sessions.NewCookieStore( - []byte("new-authentication-key"), - []byte("new-encryption-key"), - []byte("old-authentication-key"), - []byte("old-encryption-key"), - ) - -New sessions will be saved using the first pair. Old sessions can still be -read because the first pair will fail, and the second will be tested. This -makes it easy to "rotate" secret keys and still be able to validate existing -sessions. Note: for all pairs the encryption key is optional; set it to nil -or omit it and and encryption won't be used. - -Multiple sessions can be used in the same request, even with different -session backends. When this happens, calling Save() on each session -individually would be cumbersome, so we have a way to save all sessions -at once: it's sessions.Save(). Here's an example: - - var store = sessions.NewCookieStore([]byte("something-very-secret")) - - func MyHandler(w http.ResponseWriter, r *http.Request) { - // Get a session and set a value. - session1, _ := store.Get(r, "session-one") - session1.Values["foo"] = "bar" - // Get another session and set another value. - session2, _ := store.Get(r, "session-two") - session2.Values[42] = 43 - // Save all sessions. - sessions.Save(r, w) - } - -This is possible because when we call Get() from a session store, it adds the -session to a common registry. Save() uses it to save all registered sessions. -*/ -package sessions diff --git a/vendor/github.com/gorilla/sessions/lex.go b/vendor/github.com/gorilla/sessions/lex.go deleted file mode 100644 index 4bbbe1096..000000000 --- a/vendor/github.com/gorilla/sessions/lex.go +++ /dev/null @@ -1,102 +0,0 @@ -// This file contains code adapted from the Go standard library -// https://github.com/golang/go/blob/39ad0fd0789872f9469167be7fe9578625ff246e/src/net/http/lex.go - -package sessions - -import "strings" - -var isTokenTable = [127]bool{ - '!': true, - '#': true, - '$': true, - '%': true, - '&': true, - '\'': true, - '*': true, - '+': true, - '-': true, - '.': true, - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - '5': true, - '6': true, - '7': true, - '8': true, - '9': true, - 'A': true, - 'B': true, - 'C': true, - 'D': true, - 'E': true, - 'F': true, - 'G': true, - 'H': true, - 'I': true, - 'J': true, - 'K': true, - 'L': true, - 'M': true, - 'N': true, - 'O': true, - 'P': true, - 'Q': true, - 'R': true, - 'S': true, - 'T': true, - 'U': true, - 'W': true, - 'V': true, - 'X': true, - 'Y': true, - 'Z': true, - '^': true, - '_': true, - '`': true, - 'a': true, - 'b': true, - 'c': true, - 'd': true, - 'e': true, - 'f': true, - 'g': true, - 'h': true, - 'i': true, - 'j': true, - 'k': true, - 'l': true, - 'm': true, - 'n': true, - 'o': true, - 'p': true, - 'q': true, - 'r': true, - 's': true, - 't': true, - 'u': true, - 'v': true, - 'w': true, - 'x': true, - 'y': true, - 'z': true, - '|': true, - '~': true, -} - -func isToken(r rune) bool { - i := int(r) - return i < len(isTokenTable) && isTokenTable[i] -} - -func isNotToken(r rune) bool { - return !isToken(r) -} - -func isCookieNameValid(raw string) bool { - if raw == "" { - return false - } - return strings.IndexFunc(raw, isNotToken) < 0 -} diff --git a/vendor/github.com/gorilla/sessions/sessions.go b/vendor/github.com/gorilla/sessions/sessions.go deleted file mode 100644 index fe0d2bc8f..000000000 --- a/vendor/github.com/gorilla/sessions/sessions.go +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sessions - -import ( - "encoding/gob" - "fmt" - "net/http" - "time" - - "github.com/gorilla/context" -) - -// Default flashes key. -const flashesKey = "_flash" - -// Options -------------------------------------------------------------------- - -// Options stores configuration for a session or session store. -// -// Fields are a subset of http.Cookie fields. -type Options struct { - Path string - Domain string - // MaxAge=0 means no 'Max-Age' attribute specified. - // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'. - // MaxAge>0 means Max-Age attribute present and given in seconds. - MaxAge int - Secure bool - HttpOnly bool -} - -// Session -------------------------------------------------------------------- - -// NewSession is called by session stores to create a new session instance. -func NewSession(store Store, name string) *Session { - return &Session{ - Values: make(map[interface{}]interface{}), - store: store, - name: name, - } -} - -// Session stores the values and optional configuration for a session. -type Session struct { - // The ID of the session, generated by stores. It should not be used for - // user data. - ID string - // Values contains the user-data for the session. - Values map[interface{}]interface{} - Options *Options - IsNew bool - store Store - name string -} - -// Flashes returns a slice of flash messages from the session. -// -// A single variadic argument is accepted, and it is optional: it defines -// the flash key. If not defined "_flash" is used by default. -func (s *Session) Flashes(vars ...string) []interface{} { - var flashes []interface{} - key := flashesKey - if len(vars) > 0 { - key = vars[0] - } - if v, ok := s.Values[key]; ok { - // Drop the flashes and return it. - delete(s.Values, key) - flashes = v.([]interface{}) - } - return flashes -} - -// AddFlash adds a flash message to the session. -// -// A single variadic argument is accepted, and it is optional: it defines -// the flash key. If not defined "_flash" is used by default. -func (s *Session) AddFlash(value interface{}, vars ...string) { - key := flashesKey - if len(vars) > 0 { - key = vars[0] - } - var flashes []interface{} - if v, ok := s.Values[key]; ok { - flashes = v.([]interface{}) - } - s.Values[key] = append(flashes, value) -} - -// Save is a convenience method to save this session. It is the same as calling -// store.Save(request, response, session). You should call Save before writing to -// the response or returning from the handler. -func (s *Session) Save(r *http.Request, w http.ResponseWriter) error { - return s.store.Save(r, w, s) -} - -// Name returns the name used to register the session. -func (s *Session) Name() string { - return s.name -} - -// Store returns the session store used to register the session. -func (s *Session) Store() Store { - return s.store -} - -// Registry ------------------------------------------------------------------- - -// sessionInfo stores a session tracked by the registry. -type sessionInfo struct { - s *Session - e error -} - -// contextKey is the type used to store the registry in the context. -type contextKey int - -// registryKey is the key used to store the registry in the context. -const registryKey contextKey = 0 - -// GetRegistry returns a registry instance for the current request. -func GetRegistry(r *http.Request) *Registry { - registry := context.Get(r, registryKey) - if registry != nil { - return registry.(*Registry) - } - newRegistry := &Registry{ - request: r, - sessions: make(map[string]sessionInfo), - } - context.Set(r, registryKey, newRegistry) - return newRegistry -} - -// Registry stores sessions used during a request. -type Registry struct { - request *http.Request - sessions map[string]sessionInfo -} - -// Get registers and returns a session for the given name and session store. -// -// It returns a new session if there are no sessions registered for the name. -func (s *Registry) Get(store Store, name string) (session *Session, err error) { - if !isCookieNameValid(name) { - return nil, fmt.Errorf("sessions: invalid character in cookie name: %s", name) - } - if info, ok := s.sessions[name]; ok { - session, err = info.s, info.e - } else { - session, err = store.New(s.request, name) - session.name = name - s.sessions[name] = sessionInfo{s: session, e: err} - } - session.store = store - return -} - -// Save saves all sessions registered for the current request. -func (s *Registry) Save(w http.ResponseWriter) error { - var errMulti MultiError - for name, info := range s.sessions { - session := info.s - if session.store == nil { - errMulti = append(errMulti, fmt.Errorf( - "sessions: missing store for session %q", name)) - } else if err := session.store.Save(s.request, w, session); err != nil { - errMulti = append(errMulti, fmt.Errorf( - "sessions: error saving session %q -- %v", name, err)) - } - } - if errMulti != nil { - return errMulti - } - return nil -} - -// Helpers -------------------------------------------------------------------- - -func init() { - gob.Register([]interface{}{}) -} - -// Save saves all sessions used during the current request. -func Save(r *http.Request, w http.ResponseWriter) error { - return GetRegistry(r).Save(w) -} - -// NewCookie returns an http.Cookie with the options set. It also sets -// the Expires field calculated based on the MaxAge value, for Internet -// Explorer compatibility. -func NewCookie(name, value string, options *Options) *http.Cookie { - cookie := &http.Cookie{ - Name: name, - Value: value, - Path: options.Path, - Domain: options.Domain, - MaxAge: options.MaxAge, - Secure: options.Secure, - HttpOnly: options.HttpOnly, - } - if options.MaxAge > 0 { - d := time.Duration(options.MaxAge) * time.Second - cookie.Expires = time.Now().Add(d) - } else if options.MaxAge < 0 { - // Set it to the past to expire now. - cookie.Expires = time.Unix(1, 0) - } - return cookie -} - -// Error ---------------------------------------------------------------------- - -// MultiError stores multiple errors. -// -// Borrowed from the App Engine SDK. -type MultiError []error - -func (m MultiError) Error() string { - s, n := "", 0 - for _, e := range m { - if e != nil { - if n == 0 { - s = e.Error() - } - n++ - } - } - switch n { - case 0: - return "(0 errors)" - case 1: - return s - case 2: - return s + " (and 1 other error)" - } - return fmt.Sprintf("%s (and %d other errors)", s, n-1) -} diff --git a/vendor/github.com/gorilla/sessions/sessions_test.go b/vendor/github.com/gorilla/sessions/sessions_test.go deleted file mode 100644 index c166b05b9..000000000 --- a/vendor/github.com/gorilla/sessions/sessions_test.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sessions - -import ( - "bytes" - "encoding/gob" - "net/http" - "net/http/httptest" - "testing" -) - -// NewRecorder returns an initialized ResponseRecorder. -func NewRecorder() *httptest.ResponseRecorder { - return &httptest.ResponseRecorder{ - HeaderMap: make(http.Header), - Body: new(bytes.Buffer), - } -} - -// DefaultRemoteAddr is the default remote address to return in RemoteAddr if -// an explicit DefaultRemoteAddr isn't set on ResponseRecorder. -const DefaultRemoteAddr = "1.2.3.4" - -// ---------------------------------------------------------------------------- - -type FlashMessage struct { - Type int - Message string -} - -func TestFlashes(t *testing.T) { - var req *http.Request - var rsp *httptest.ResponseRecorder - var hdr http.Header - var err error - var ok bool - var cookies []string - var session *Session - var flashes []interface{} - - store := NewCookieStore([]byte("secret-key")) - - // Round 1 ---------------------------------------------------------------- - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Get a flash. - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected empty flashes; Got %v", flashes) - } - // Add some flashes. - session.AddFlash("foo") - session.AddFlash("bar") - // Custom key. - session.AddFlash("baz", "custom_key") - // Save. - if err = Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - hdr = rsp.Header() - cookies, ok = hdr["Set-Cookie"] - if !ok || len(cookies) != 1 { - t.Fatal("No cookies. Header:", hdr) - } - - if _, err = store.Get(req, "session:key"); err.Error() != "sessions: invalid character in cookie name: session:key" { - t.Fatalf("Expected error due to invalid cookie name") - } - - // Round 2 ---------------------------------------------------------------- - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - req.Header.Add("Cookie", cookies[0]) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Check all saved values. - flashes = session.Flashes() - if len(flashes) != 2 { - t.Fatalf("Expected flashes; Got %v", flashes) - } - if flashes[0] != "foo" || flashes[1] != "bar" { - t.Errorf("Expected foo,bar; Got %v", flashes) - } - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected dumped flashes; Got %v", flashes) - } - // Custom key. - flashes = session.Flashes("custom_key") - if len(flashes) != 1 { - t.Errorf("Expected flashes; Got %v", flashes) - } else if flashes[0] != "baz" { - t.Errorf("Expected baz; Got %v", flashes) - } - flashes = session.Flashes("custom_key") - if len(flashes) != 0 { - t.Errorf("Expected dumped flashes; Got %v", flashes) - } - - // Round 3 ---------------------------------------------------------------- - // Custom type - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Get a flash. - flashes = session.Flashes() - if len(flashes) != 0 { - t.Errorf("Expected empty flashes; Got %v", flashes) - } - // Add some flashes. - session.AddFlash(&FlashMessage{42, "foo"}) - // Save. - if err = Save(req, rsp); err != nil { - t.Fatalf("Error saving session: %v", err) - } - hdr = rsp.Header() - cookies, ok = hdr["Set-Cookie"] - if !ok || len(cookies) != 1 { - t.Fatal("No cookies. Header:", hdr) - } - - // Round 4 ---------------------------------------------------------------- - // Custom type - - req, _ = http.NewRequest("GET", "http://localhost:8080/", nil) - req.Header.Add("Cookie", cookies[0]) - rsp = NewRecorder() - // Get a session. - if session, err = store.Get(req, "session-key"); err != nil { - t.Fatalf("Error getting session: %v", err) - } - // Check all saved values. - flashes = session.Flashes() - if len(flashes) != 1 { - t.Fatalf("Expected flashes; Got %v", flashes) - } - custom := flashes[0].(FlashMessage) - if custom.Type != 42 || custom.Message != "foo" { - t.Errorf("Expected %#v, got %#v", FlashMessage{42, "foo"}, custom) - } -} - -func init() { - gob.Register(FlashMessage{}) -} diff --git a/vendor/github.com/gorilla/sessions/store.go b/vendor/github.com/gorilla/sessions/store.go deleted file mode 100644 index 4ff6b6c32..000000000 --- a/vendor/github.com/gorilla/sessions/store.go +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2012 The Gorilla Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sessions - -import ( - "encoding/base32" - "io/ioutil" - "net/http" - "os" - "path/filepath" - "strings" - "sync" - - "github.com/gorilla/securecookie" -) - -// Store is an interface for custom session stores. -// -// See CookieStore and FilesystemStore for examples. -type Store interface { - // Get should return a cached session. - Get(r *http.Request, name string) (*Session, error) - - // New should create and return a new session. - // - // Note that New should never return a nil session, even in the case of - // an error if using the Registry infrastructure to cache the session. - New(r *http.Request, name string) (*Session, error) - - // Save should persist session to the underlying store implementation. - Save(r *http.Request, w http.ResponseWriter, s *Session) error -} - -// CookieStore ---------------------------------------------------------------- - -// NewCookieStore returns a new CookieStore. -// -// Keys are defined in pairs to allow key rotation, but the common case is -// to set a single authentication key and optionally an encryption key. -// -// The first key in a pair is used for authentication and the second for -// encryption. The encryption key can be set to nil or omitted in the last -// pair, but the authentication key is required in all pairs. -// -// It is recommended to use an authentication key with 32 or 64 bytes. -// The encryption key, if set, must be either 16, 24, or 32 bytes to select -// AES-128, AES-192, or AES-256 modes. -// -// Use the convenience function securecookie.GenerateRandomKey() to create -// strong keys. -func NewCookieStore(keyPairs ...[]byte) *CookieStore { - cs := &CookieStore{ - Codecs: securecookie.CodecsFromPairs(keyPairs...), - Options: &Options{ - Path: "/", - MaxAge: 86400 * 30, - }, - } - - cs.MaxAge(cs.Options.MaxAge) - return cs -} - -// CookieStore stores sessions using secure cookies. -type CookieStore struct { - Codecs []securecookie.Codec - Options *Options // default configuration -} - -// Get returns a session for the given name after adding it to the registry. -// -// It returns a new session if the sessions doesn't exist. Access IsNew on -// the session to check if it is an existing session or a new one. -// -// It returns a new session and an error if the session exists but could -// not be decoded. -func (s *CookieStore) Get(r *http.Request, name string) (*Session, error) { - return GetRegistry(r).Get(s, name) -} - -// New returns a session for the given name without adding it to the registry. -// -// The difference between New() and Get() is that calling New() twice will -// decode the session data twice, while Get() registers and reuses the same -// decoded session after the first call. -func (s *CookieStore) New(r *http.Request, name string) (*Session, error) { - session := NewSession(s, name) - opts := *s.Options - session.Options = &opts - session.IsNew = true - var err error - if c, errCookie := r.Cookie(name); errCookie == nil { - err = securecookie.DecodeMulti(name, c.Value, &session.Values, - s.Codecs...) - if err == nil { - session.IsNew = false - } - } - return session, err -} - -// Save adds a single session to the response. -func (s *CookieStore) Save(r *http.Request, w http.ResponseWriter, - session *Session) error { - encoded, err := securecookie.EncodeMulti(session.Name(), session.Values, - s.Codecs...) - if err != nil { - return err - } - http.SetCookie(w, NewCookie(session.Name(), encoded, session.Options)) - return nil -} - -// MaxAge sets the maximum age for the store and the underlying cookie -// implementation. Individual sessions can be deleted by setting Options.MaxAge -// = -1 for that session. -func (s *CookieStore) MaxAge(age int) { - s.Options.MaxAge = age - - // Set the maxAge for each securecookie instance. - for _, codec := range s.Codecs { - if sc, ok := codec.(*securecookie.SecureCookie); ok { - sc.MaxAge(age) - } - } -} - -// FilesystemStore ------------------------------------------------------------ - -var fileMutex sync.RWMutex - -// NewFilesystemStore returns a new FilesystemStore. -// -// The path argument is the directory where sessions will be saved. If empty -// it will use os.TempDir(). -// -// See NewCookieStore() for a description of the other parameters. -func NewFilesystemStore(path string, keyPairs ...[]byte) *FilesystemStore { - if path == "" { - path = os.TempDir() - } - fs := &FilesystemStore{ - Codecs: securecookie.CodecsFromPairs(keyPairs...), - Options: &Options{ - Path: "/", - MaxAge: 86400 * 30, - }, - path: path, - } - - fs.MaxAge(fs.Options.MaxAge) - return fs -} - -// FilesystemStore stores sessions in the filesystem. -// -// It also serves as a reference for custom stores. -// -// This store is still experimental and not well tested. Feedback is welcome. -type FilesystemStore struct { - Codecs []securecookie.Codec - Options *Options // default configuration - path string -} - -// MaxLength restricts the maximum length of new sessions to l. -// If l is 0 there is no limit to the size of a session, use with caution. -// The default for a new FilesystemStore is 4096. -func (s *FilesystemStore) MaxLength(l int) { - for _, c := range s.Codecs { - if codec, ok := c.(*securecookie.SecureCookie); ok { - codec.MaxLength(l) - } - } -} - -// Get returns a session for the given name after adding it to the registry. -// -// See CookieStore.Get(). -func (s *FilesystemStore) Get(r *http.Request, name string) (*Session, error) { - return GetRegistry(r).Get(s, name) -} - -// New returns a session for the given name without adding it to the registry. -// -// See CookieStore.New(). -func (s *FilesystemStore) New(r *http.Request, name string) (*Session, error) { - session := NewSession(s, name) - opts := *s.Options - session.Options = &opts - session.IsNew = true - var err error - if c, errCookie := r.Cookie(name); errCookie == nil { - err = securecookie.DecodeMulti(name, c.Value, &session.ID, s.Codecs...) - if err == nil { - err = s.load(session) - if err == nil { - session.IsNew = false - } - } - } - return session, err -} - -// Save adds a single session to the response. -// -// If the Options.MaxAge of the session is <= 0 then the session file will be -// deleted from the store path. With this process it enforces the properly -// session cookie handling so no need to trust in the cookie management in the -// web browser. -func (s *FilesystemStore) Save(r *http.Request, w http.ResponseWriter, - session *Session) error { - // Delete if max-age is <= 0 - if session.Options.MaxAge <= 0 { - if err := s.erase(session); err != nil { - return err - } - http.SetCookie(w, NewCookie(session.Name(), "", session.Options)) - return nil - } - - if session.ID == "" { - // Because the ID is used in the filename, encode it to - // use alphanumeric characters only. - session.ID = strings.TrimRight( - base32.StdEncoding.EncodeToString( - securecookie.GenerateRandomKey(32)), "=") - } - if err := s.save(session); err != nil { - return err - } - encoded, err := securecookie.EncodeMulti(session.Name(), session.ID, - s.Codecs...) - if err != nil { - return err - } - http.SetCookie(w, NewCookie(session.Name(), encoded, session.Options)) - return nil -} - -// MaxAge sets the maximum age for the store and the underlying cookie -// implementation. Individual sessions can be deleted by setting Options.MaxAge -// = -1 for that session. -func (s *FilesystemStore) MaxAge(age int) { - s.Options.MaxAge = age - - // Set the maxAge for each securecookie instance. - for _, codec := range s.Codecs { - if sc, ok := codec.(*securecookie.SecureCookie); ok { - sc.MaxAge(age) - } - } -} - -// save writes encoded session.Values to a file. -func (s *FilesystemStore) save(session *Session) error { - encoded, err := securecookie.EncodeMulti(session.Name(), session.Values, - s.Codecs...) - if err != nil { - return err - } - filename := filepath.Join(s.path, "session_"+session.ID) - fileMutex.Lock() - defer fileMutex.Unlock() - return ioutil.WriteFile(filename, []byte(encoded), 0600) -} - -// load reads a file and decodes its content into session.Values. -func (s *FilesystemStore) load(session *Session) error { - filename := filepath.Join(s.path, "session_"+session.ID) - fileMutex.RLock() - defer fileMutex.RUnlock() - fdata, err := ioutil.ReadFile(filename) - if err != nil { - return err - } - if err = securecookie.DecodeMulti(session.Name(), string(fdata), - &session.Values, s.Codecs...); err != nil { - return err - } - return nil -} - -// delete session file -func (s *FilesystemStore) erase(session *Session) error { - filename := filepath.Join(s.path, "session_"+session.ID) - - fileMutex.RLock() - defer fileMutex.RUnlock() - - err := os.Remove(filename) - return err -} diff --git a/vendor/github.com/gorilla/sessions/store_test.go b/vendor/github.com/gorilla/sessions/store_test.go deleted file mode 100644 index bfc53fa1e..000000000 --- a/vendor/github.com/gorilla/sessions/store_test.go +++ /dev/null @@ -1,125 +0,0 @@ -package sessions - -import ( - "encoding/base64" - "net/http" - "net/http/httptest" - "testing" -) - -// Test for GH-8 for CookieStore -func TestGH8CookieStore(t *testing.T) { - originalPath := "/" - store := NewCookieStore() - store.Options.Path = originalPath - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - - session, err := store.New(req, "hello") - if err != nil { - t.Fatal("failed to create session", err) - } - - store.Options.Path = "/foo" - if session.Options.Path != originalPath { - t.Fatalf("bad session path: got %q, want %q", session.Options.Path, originalPath) - } -} - -// Test for GH-8 for FilesystemStore -func TestGH8FilesystemStore(t *testing.T) { - originalPath := "/" - store := NewFilesystemStore("") - store.Options.Path = originalPath - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - - session, err := store.New(req, "hello") - if err != nil { - t.Fatal("failed to create session", err) - } - - store.Options.Path = "/foo" - if session.Options.Path != originalPath { - t.Fatalf("bad session path: got %q, want %q", session.Options.Path, originalPath) - } -} - -// Test for GH-2. -func TestGH2MaxLength(t *testing.T) { - store := NewFilesystemStore("", []byte("some key")) - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - w := httptest.NewRecorder() - - session, err := store.New(req, "my session") - session.Values["big"] = make([]byte, base64.StdEncoding.DecodedLen(4096*2)) - err = session.Save(req, w) - if err == nil { - t.Fatal("expected an error, got nil") - } - - store.MaxLength(4096 * 3) // A bit more than the value size to account for encoding overhead. - err = session.Save(req, w) - if err != nil { - t.Fatal("failed to Save:", err) - } -} - -// Test delete filesystem store with max-age: -1 -func TestGH8FilesystemStoreDelete(t *testing.T) { - store := NewFilesystemStore("", []byte("some key")) - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - w := httptest.NewRecorder() - - session, err := store.New(req, "hello") - if err != nil { - t.Fatal("failed to create session", err) - } - - err = session.Save(req, w) - if err != nil { - t.Fatal("failed to save session", err) - } - - session.Options.MaxAge = -1 - err = session.Save(req, w) - if err != nil { - t.Fatal("failed to delete session", err) - } -} - -// Test delete filesystem store with max-age: 0 -func TestGH8FilesystemStoreDelete2(t *testing.T) { - store := NewFilesystemStore("", []byte("some key")) - req, err := http.NewRequest("GET", "http://www.example.com", nil) - if err != nil { - t.Fatal("failed to create request", err) - } - w := httptest.NewRecorder() - - session, err := store.New(req, "hello") - if err != nil { - t.Fatal("failed to create session", err) - } - - err = session.Save(req, w) - if err != nil { - t.Fatal("failed to save session", err) - } - - session.Options.MaxAge = 0 - err = session.Save(req, w) - if err != nil { - t.Fatal("failed to delete session", err) - } -} diff --git a/vendor/github.com/hashicorp/golang-lru/2q.go b/vendor/github.com/hashicorp/golang-lru/2q.go new file mode 100644 index 000000000..e474cd075 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/2q.go @@ -0,0 +1,223 @@ +package lru + +import ( + "fmt" + "sync" + + "github.com/hashicorp/golang-lru/simplelru" +) + +const ( + // Default2QRecentRatio is the ratio of the 2Q cache dedicated + // to recently added entries that have only been accessed once. + Default2QRecentRatio = 0.25 + + // Default2QGhostEntries is the default ratio of ghost + // entries kept to track entries recently evicted + Default2QGhostEntries = 0.50 +) + +// TwoQueueCache is a thread-safe fixed size 2Q cache. +// 2Q is an enhancement over the standard LRU cache +// in that it tracks both frequently and recently used +// entries separately. This avoids a burst in access to new +// entries from evicting frequently used entries. It adds some +// additional tracking overhead to the standard LRU cache, and is +// computationally about 2x the cost, and adds some metadata over +// head. The ARCCache is similar, but does not require setting any +// parameters. +type TwoQueueCache struct { + size int + recentSize int + + recent simplelru.LRUCache + frequent simplelru.LRUCache + recentEvict simplelru.LRUCache + lock sync.RWMutex +} + +// New2Q creates a new TwoQueueCache using the default +// values for the parameters. +func New2Q(size int) (*TwoQueueCache, error) { + return New2QParams(size, Default2QRecentRatio, Default2QGhostEntries) +} + +// New2QParams creates a new TwoQueueCache using the provided +// parameter values. +func New2QParams(size int, recentRatio float64, ghostRatio float64) (*TwoQueueCache, error) { + if size <= 0 { + return nil, fmt.Errorf("invalid size") + } + if recentRatio < 0.0 || recentRatio > 1.0 { + return nil, fmt.Errorf("invalid recent ratio") + } + if ghostRatio < 0.0 || ghostRatio > 1.0 { + return nil, fmt.Errorf("invalid ghost ratio") + } + + // Determine the sub-sizes + recentSize := int(float64(size) * recentRatio) + evictSize := int(float64(size) * ghostRatio) + + // Allocate the LRUs + recent, err := simplelru.NewLRU(size, nil) + if err != nil { + return nil, err + } + frequent, err := simplelru.NewLRU(size, nil) + if err != nil { + return nil, err + } + recentEvict, err := simplelru.NewLRU(evictSize, nil) + if err != nil { + return nil, err + } + + // Initialize the cache + c := &TwoQueueCache{ + size: size, + recentSize: recentSize, + recent: recent, + frequent: frequent, + recentEvict: recentEvict, + } + return c, nil +} + +// Get looks up a key's value from the cache. +func (c *TwoQueueCache) Get(key interface{}) (value interface{}, ok bool) { + c.lock.Lock() + defer c.lock.Unlock() + + // Check if this is a frequent value + if val, ok := c.frequent.Get(key); ok { + return val, ok + } + + // If the value is contained in recent, then we + // promote it to frequent + if val, ok := c.recent.Peek(key); ok { + c.recent.Remove(key) + c.frequent.Add(key, val) + return val, ok + } + + // No hit + return nil, false +} + +// Add adds a value to the cache. +func (c *TwoQueueCache) Add(key, value interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + + // Check if the value is frequently used already, + // and just update the value + if c.frequent.Contains(key) { + c.frequent.Add(key, value) + return + } + + // Check if the value is recently used, and promote + // the value into the frequent list + if c.recent.Contains(key) { + c.recent.Remove(key) + c.frequent.Add(key, value) + return + } + + // If the value was recently evicted, add it to the + // frequently used list + if c.recentEvict.Contains(key) { + c.ensureSpace(true) + c.recentEvict.Remove(key) + c.frequent.Add(key, value) + return + } + + // Add to the recently seen list + c.ensureSpace(false) + c.recent.Add(key, value) + return +} + +// ensureSpace is used to ensure we have space in the cache +func (c *TwoQueueCache) ensureSpace(recentEvict bool) { + // If we have space, nothing to do + recentLen := c.recent.Len() + freqLen := c.frequent.Len() + if recentLen+freqLen < c.size { + return + } + + // If the recent buffer is larger than + // the target, evict from there + if recentLen > 0 && (recentLen > c.recentSize || (recentLen == c.recentSize && !recentEvict)) { + k, _, _ := c.recent.RemoveOldest() + c.recentEvict.Add(k, nil) + return + } + + // Remove from the frequent list otherwise + c.frequent.RemoveOldest() +} + +// Len returns the number of items in the cache. +func (c *TwoQueueCache) Len() int { + c.lock.RLock() + defer c.lock.RUnlock() + return c.recent.Len() + c.frequent.Len() +} + +// Keys returns a slice of the keys in the cache. +// The frequently used keys are first in the returned slice. +func (c *TwoQueueCache) Keys() []interface{} { + c.lock.RLock() + defer c.lock.RUnlock() + k1 := c.frequent.Keys() + k2 := c.recent.Keys() + return append(k1, k2...) +} + +// Remove removes the provided key from the cache. +func (c *TwoQueueCache) Remove(key interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + if c.frequent.Remove(key) { + return + } + if c.recent.Remove(key) { + return + } + if c.recentEvict.Remove(key) { + return + } +} + +// Purge is used to completely clear the cache. +func (c *TwoQueueCache) Purge() { + c.lock.Lock() + defer c.lock.Unlock() + c.recent.Purge() + c.frequent.Purge() + c.recentEvict.Purge() +} + +// Contains is used to check if the cache contains a key +// without updating recency or frequency. +func (c *TwoQueueCache) Contains(key interface{}) bool { + c.lock.RLock() + defer c.lock.RUnlock() + return c.frequent.Contains(key) || c.recent.Contains(key) +} + +// Peek is used to inspect the cache value of a key +// without updating recency or frequency. +func (c *TwoQueueCache) Peek(key interface{}) (value interface{}, ok bool) { + c.lock.RLock() + defer c.lock.RUnlock() + if val, ok := c.frequent.Peek(key); ok { + return val, ok + } + return c.recent.Peek(key) +} diff --git a/vendor/github.com/hashicorp/hcl/LICENSE b/vendor/github.com/hashicorp/golang-lru/LICENSE similarity index 50% rename from vendor/github.com/hashicorp/hcl/LICENSE rename to vendor/github.com/hashicorp/golang-lru/LICENSE index c33dcc7c9..be2cc4dfb 100644 --- a/vendor/github.com/hashicorp/hcl/LICENSE +++ b/vendor/github.com/hashicorp/golang-lru/LICENSE @@ -2,89 +2,89 @@ Mozilla Public License, version 2.0 1. Definitions -1.1. “Contributor” +1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. -1.2. “Contributor Version” +1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. + Contributor and that particular Contributor's Contribution. -1.3. “Contribution” +1.3. "Contribution" means Covered Software of a particular Contributor. -1.4. “Covered Software” +1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. -1.5. “Incompatible With Secondary Licenses” +1.5. "Incompatible With Secondary Licenses" means a. that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. -1.6. “Executable Form” +1.6. "Executable Form" means any form of the work other than Source Code Form. -1.7. “Larger Work” +1.7. "Larger Work" - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. -1.8. “License” +1.8. "License" means this document. -1.9. “Licensable” +1.9. "Licensable" - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. -1.10. “Modifications” +1.10. "Modifications" means any of the following: - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or b. any new file in Source Code Form that contains any Covered Software. -1.11. “Patent Claims” of a Contributor +1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. -1.12. “Secondary License” +1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. -1.13. “Source Code Form” +1.13. "Source Code Form" means the form of the work preferred for making modifications. -1.14. “You” (or “Your”) +1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is + License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause + definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. @@ -100,57 +100,59 @@ Mozilla Public License, version 2.0 a. under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. 2.2. Effective Date - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. 2.3. Limitations on Grant Scope - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: a. for any code that a Contributor has removed from Covered Software; or - b. for infringements caused by: (i) Your and any other third party’s + b. for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). 2.4. Subsequent Licenses No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). 2.5. Representation - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. 2.6. Fair Use - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. 2.7. Conditions @@ -163,11 +165,12 @@ Mozilla Public License, version 2.0 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. 3.2. Distribution of Executable Form @@ -179,39 +182,40 @@ Mozilla Public License, version 2.0 reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. 3.3. Distribution of a Larger Work You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). 3.4. Notices - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. 3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any @@ -220,14 +224,14 @@ Mozilla Public License, version 2.0 4. Inability to Comply Due to Statute or Regulation If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. 5. Termination @@ -235,21 +239,22 @@ Mozilla Public License, version 2.0 fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. 5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been @@ -258,16 +263,16 @@ Mozilla Public License, version 2.0 6. Disclaimer of Warranty - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. 7. Limitation of Liability @@ -279,27 +284,29 @@ Mozilla Public License, version 2.0 goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. 8. Litigation - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. 9. Miscellaneous - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. 10. Versions of the License @@ -313,23 +320,24 @@ Mozilla Public License, version 2.0 10.2. Effect of New Versions - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license steward. 10.3. Modified Versions If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. Exhibit A - Source Code Form License Notice @@ -340,15 +348,15 @@ Exhibit A - Source Code Form License Notice obtain one at http://mozilla.org/MPL/2.0/. -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. You may add additional accurate notices of copyright ownership. -Exhibit B - “Incompatible With Secondary Licenses” Notice +Exhibit B - "Incompatible With Secondary Licenses" Notice - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/golang-lru/arc.go b/vendor/github.com/hashicorp/golang-lru/arc.go new file mode 100644 index 000000000..555225a21 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/arc.go @@ -0,0 +1,257 @@ +package lru + +import ( + "sync" + + "github.com/hashicorp/golang-lru/simplelru" +) + +// ARCCache is a thread-safe fixed size Adaptive Replacement Cache (ARC). +// ARC is an enhancement over the standard LRU cache in that tracks both +// frequency and recency of use. This avoids a burst in access to new +// entries from evicting the frequently used older entries. It adds some +// additional tracking overhead to a standard LRU cache, computationally +// it is roughly 2x the cost, and the extra memory overhead is linear +// with the size of the cache. ARC has been patented by IBM, but is +// similar to the TwoQueueCache (2Q) which requires setting parameters. +type ARCCache struct { + size int // Size is the total capacity of the cache + p int // P is the dynamic preference towards T1 or T2 + + t1 simplelru.LRUCache // T1 is the LRU for recently accessed items + b1 simplelru.LRUCache // B1 is the LRU for evictions from t1 + + t2 simplelru.LRUCache // T2 is the LRU for frequently accessed items + b2 simplelru.LRUCache // B2 is the LRU for evictions from t2 + + lock sync.RWMutex +} + +// NewARC creates an ARC of the given size +func NewARC(size int) (*ARCCache, error) { + // Create the sub LRUs + b1, err := simplelru.NewLRU(size, nil) + if err != nil { + return nil, err + } + b2, err := simplelru.NewLRU(size, nil) + if err != nil { + return nil, err + } + t1, err := simplelru.NewLRU(size, nil) + if err != nil { + return nil, err + } + t2, err := simplelru.NewLRU(size, nil) + if err != nil { + return nil, err + } + + // Initialize the ARC + c := &ARCCache{ + size: size, + p: 0, + t1: t1, + b1: b1, + t2: t2, + b2: b2, + } + return c, nil +} + +// Get looks up a key's value from the cache. +func (c *ARCCache) Get(key interface{}) (value interface{}, ok bool) { + c.lock.Lock() + defer c.lock.Unlock() + + // If the value is contained in T1 (recent), then + // promote it to T2 (frequent) + if val, ok := c.t1.Peek(key); ok { + c.t1.Remove(key) + c.t2.Add(key, val) + return val, ok + } + + // Check if the value is contained in T2 (frequent) + if val, ok := c.t2.Get(key); ok { + return val, ok + } + + // No hit + return nil, false +} + +// Add adds a value to the cache. +func (c *ARCCache) Add(key, value interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + + // Check if the value is contained in T1 (recent), and potentially + // promote it to frequent T2 + if c.t1.Contains(key) { + c.t1.Remove(key) + c.t2.Add(key, value) + return + } + + // Check if the value is already in T2 (frequent) and update it + if c.t2.Contains(key) { + c.t2.Add(key, value) + return + } + + // Check if this value was recently evicted as part of the + // recently used list + if c.b1.Contains(key) { + // T1 set is too small, increase P appropriately + delta := 1 + b1Len := c.b1.Len() + b2Len := c.b2.Len() + if b2Len > b1Len { + delta = b2Len / b1Len + } + if c.p+delta >= c.size { + c.p = c.size + } else { + c.p += delta + } + + // Potentially need to make room in the cache + if c.t1.Len()+c.t2.Len() >= c.size { + c.replace(false) + } + + // Remove from B1 + c.b1.Remove(key) + + // Add the key to the frequently used list + c.t2.Add(key, value) + return + } + + // Check if this value was recently evicted as part of the + // frequently used list + if c.b2.Contains(key) { + // T2 set is too small, decrease P appropriately + delta := 1 + b1Len := c.b1.Len() + b2Len := c.b2.Len() + if b1Len > b2Len { + delta = b1Len / b2Len + } + if delta >= c.p { + c.p = 0 + } else { + c.p -= delta + } + + // Potentially need to make room in the cache + if c.t1.Len()+c.t2.Len() >= c.size { + c.replace(true) + } + + // Remove from B2 + c.b2.Remove(key) + + // Add the key to the frequently used list + c.t2.Add(key, value) + return + } + + // Potentially need to make room in the cache + if c.t1.Len()+c.t2.Len() >= c.size { + c.replace(false) + } + + // Keep the size of the ghost buffers trim + if c.b1.Len() > c.size-c.p { + c.b1.RemoveOldest() + } + if c.b2.Len() > c.p { + c.b2.RemoveOldest() + } + + // Add to the recently seen list + c.t1.Add(key, value) + return +} + +// replace is used to adaptively evict from either T1 or T2 +// based on the current learned value of P +func (c *ARCCache) replace(b2ContainsKey bool) { + t1Len := c.t1.Len() + if t1Len > 0 && (t1Len > c.p || (t1Len == c.p && b2ContainsKey)) { + k, _, ok := c.t1.RemoveOldest() + if ok { + c.b1.Add(k, nil) + } + } else { + k, _, ok := c.t2.RemoveOldest() + if ok { + c.b2.Add(k, nil) + } + } +} + +// Len returns the number of cached entries +func (c *ARCCache) Len() int { + c.lock.RLock() + defer c.lock.RUnlock() + return c.t1.Len() + c.t2.Len() +} + +// Keys returns all the cached keys +func (c *ARCCache) Keys() []interface{} { + c.lock.RLock() + defer c.lock.RUnlock() + k1 := c.t1.Keys() + k2 := c.t2.Keys() + return append(k1, k2...) +} + +// Remove is used to purge a key from the cache +func (c *ARCCache) Remove(key interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + if c.t1.Remove(key) { + return + } + if c.t2.Remove(key) { + return + } + if c.b1.Remove(key) { + return + } + if c.b2.Remove(key) { + return + } +} + +// Purge is used to clear the cache +func (c *ARCCache) Purge() { + c.lock.Lock() + defer c.lock.Unlock() + c.t1.Purge() + c.t2.Purge() + c.b1.Purge() + c.b2.Purge() +} + +// Contains is used to check if the cache contains a key +// without updating recency or frequency. +func (c *ARCCache) Contains(key interface{}) bool { + c.lock.RLock() + defer c.lock.RUnlock() + return c.t1.Contains(key) || c.t2.Contains(key) +} + +// Peek is used to inspect the cache value of a key +// without updating recency or frequency. +func (c *ARCCache) Peek(key interface{}) (value interface{}, ok bool) { + c.lock.RLock() + defer c.lock.RUnlock() + if val, ok := c.t1.Peek(key); ok { + return val, ok + } + return c.t2.Peek(key) +} diff --git a/vendor/github.com/hashicorp/golang-lru/doc.go b/vendor/github.com/hashicorp/golang-lru/doc.go new file mode 100644 index 000000000..2547df979 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/doc.go @@ -0,0 +1,21 @@ +// Package lru provides three different LRU caches of varying sophistication. +// +// Cache is a simple LRU cache. It is based on the +// LRU implementation in groupcache: +// https://github.com/golang/groupcache/tree/master/lru +// +// TwoQueueCache tracks frequently used and recently used entries separately. +// This avoids a burst of accesses from taking out frequently used entries, +// at the cost of about 2x computational overhead and some extra bookkeeping. +// +// ARCCache is an adaptive replacement cache. It tracks recent evictions as +// well as recent usage in both the frequent and recent caches. Its +// computational overhead is comparable to TwoQueueCache, but the memory +// overhead is linear with the size of the cache. +// +// ARC has been patented by IBM, so do not use it if that is problematic for +// your program. +// +// All caches in this package take locks while operating, and are therefore +// thread-safe for consumers. +package lru diff --git a/vendor/github.com/hashicorp/golang-lru/lru.go b/vendor/github.com/hashicorp/golang-lru/lru.go new file mode 100644 index 000000000..c8d9b0a23 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/lru.go @@ -0,0 +1,110 @@ +package lru + +import ( + "sync" + + "github.com/hashicorp/golang-lru/simplelru" +) + +// Cache is a thread-safe fixed size LRU cache. +type Cache struct { + lru simplelru.LRUCache + lock sync.RWMutex +} + +// New creates an LRU of the given size. +func New(size int) (*Cache, error) { + return NewWithEvict(size, nil) +} + +// NewWithEvict constructs a fixed size cache with the given eviction +// callback. +func NewWithEvict(size int, onEvicted func(key interface{}, value interface{})) (*Cache, error) { + lru, err := simplelru.NewLRU(size, simplelru.EvictCallback(onEvicted)) + if err != nil { + return nil, err + } + c := &Cache{ + lru: lru, + } + return c, nil +} + +// Purge is used to completely clear the cache. +func (c *Cache) Purge() { + c.lock.Lock() + c.lru.Purge() + c.lock.Unlock() +} + +// Add adds a value to the cache. Returns true if an eviction occurred. +func (c *Cache) Add(key, value interface{}) (evicted bool) { + c.lock.Lock() + defer c.lock.Unlock() + return c.lru.Add(key, value) +} + +// Get looks up a key's value from the cache. +func (c *Cache) Get(key interface{}) (value interface{}, ok bool) { + c.lock.Lock() + defer c.lock.Unlock() + return c.lru.Get(key) +} + +// Contains checks if a key is in the cache, without updating the +// recent-ness or deleting it for being stale. +func (c *Cache) Contains(key interface{}) bool { + c.lock.RLock() + defer c.lock.RUnlock() + return c.lru.Contains(key) +} + +// Peek returns the key value (or undefined if not found) without updating +// the "recently used"-ness of the key. +func (c *Cache) Peek(key interface{}) (value interface{}, ok bool) { + c.lock.RLock() + defer c.lock.RUnlock() + return c.lru.Peek(key) +} + +// ContainsOrAdd checks if a key is in the cache without updating the +// recent-ness or deleting it for being stale, and if not, adds the value. +// Returns whether found and whether an eviction occurred. +func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) { + c.lock.Lock() + defer c.lock.Unlock() + + if c.lru.Contains(key) { + return true, false + } + evicted = c.lru.Add(key, value) + return false, evicted +} + +// Remove removes the provided key from the cache. +func (c *Cache) Remove(key interface{}) { + c.lock.Lock() + c.lru.Remove(key) + c.lock.Unlock() +} + +// RemoveOldest removes the oldest item from the cache. +func (c *Cache) RemoveOldest() { + c.lock.Lock() + c.lru.RemoveOldest() + c.lock.Unlock() +} + +// Keys returns a slice of the keys in the cache, from oldest to newest. +func (c *Cache) Keys() []interface{} { + c.lock.RLock() + defer c.lock.RUnlock() + return c.lru.Keys() +} + +// Len returns the number of items in the cache. +func (c *Cache) Len() int { + c.lock.RLock() + defer c.lock.RUnlock() + return c.lru.Len() +} diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go new file mode 100644 index 000000000..5673773b2 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go @@ -0,0 +1,161 @@ +package simplelru + +import ( + "container/list" + "errors" +) + +// EvictCallback is used to get a callback when a cache entry is evicted +type EvictCallback func(key interface{}, value interface{}) + +// LRU implements a non-thread safe fixed size LRU cache +type LRU struct { + size int + evictList *list.List + items map[interface{}]*list.Element + onEvict EvictCallback +} + +// entry is used to hold a value in the evictList +type entry struct { + key interface{} + value interface{} +} + +// NewLRU constructs an LRU of the given size +func NewLRU(size int, onEvict EvictCallback) (*LRU, error) { + if size <= 0 { + return nil, errors.New("Must provide a positive size") + } + c := &LRU{ + size: size, + evictList: list.New(), + items: make(map[interface{}]*list.Element), + onEvict: onEvict, + } + return c, nil +} + +// Purge is used to completely clear the cache. +func (c *LRU) Purge() { + for k, v := range c.items { + if c.onEvict != nil { + c.onEvict(k, v.Value.(*entry).value) + } + delete(c.items, k) + } + c.evictList.Init() +} + +// Add adds a value to the cache. Returns true if an eviction occurred. +func (c *LRU) Add(key, value interface{}) (evicted bool) { + // Check for existing item + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + ent.Value.(*entry).value = value + return false + } + + // Add new item + ent := &entry{key, value} + entry := c.evictList.PushFront(ent) + c.items[key] = entry + + evict := c.evictList.Len() > c.size + // Verify size not exceeded + if evict { + c.removeOldest() + } + return evict +} + +// Get looks up a key's value from the cache. +func (c *LRU) Get(key interface{}) (value interface{}, ok bool) { + if ent, ok := c.items[key]; ok { + c.evictList.MoveToFront(ent) + return ent.Value.(*entry).value, true + } + return +} + +// Contains checks if a key is in the cache, without updating the recent-ness +// or deleting it for being stale. +func (c *LRU) Contains(key interface{}) (ok bool) { + _, ok = c.items[key] + return ok +} + +// Peek returns the key value (or undefined if not found) without updating +// the "recently used"-ness of the key. +func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) { + var ent *list.Element + if ent, ok = c.items[key]; ok { + return ent.Value.(*entry).value, true + } + return nil, ok +} + +// Remove removes the provided key from the cache, returning if the +// key was contained. +func (c *LRU) Remove(key interface{}) (present bool) { + if ent, ok := c.items[key]; ok { + c.removeElement(ent) + return true + } + return false +} + +// RemoveOldest removes the oldest item from the cache. +func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) { + ent := c.evictList.Back() + if ent != nil { + c.removeElement(ent) + kv := ent.Value.(*entry) + return kv.key, kv.value, true + } + return nil, nil, false +} + +// GetOldest returns the oldest entry +func (c *LRU) GetOldest() (key interface{}, value interface{}, ok bool) { + ent := c.evictList.Back() + if ent != nil { + kv := ent.Value.(*entry) + return kv.key, kv.value, true + } + return nil, nil, false +} + +// Keys returns a slice of the keys in the cache, from oldest to newest. +func (c *LRU) Keys() []interface{} { + keys := make([]interface{}, len(c.items)) + i := 0 + for ent := c.evictList.Back(); ent != nil; ent = ent.Prev() { + keys[i] = ent.Value.(*entry).key + i++ + } + return keys +} + +// Len returns the number of items in the cache. +func (c *LRU) Len() int { + return c.evictList.Len() +} + +// removeOldest removes the oldest item from the cache. +func (c *LRU) removeOldest() { + ent := c.evictList.Back() + if ent != nil { + c.removeElement(ent) + } +} + +// removeElement is used to remove a given list element from the cache +func (c *LRU) removeElement(e *list.Element) { + c.evictList.Remove(e) + kv := e.Value.(*entry) + delete(c.items, kv.key) + if c.onEvict != nil { + c.onEvict(kv.key, kv.value) + } +} diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go new file mode 100644 index 000000000..74c707744 --- /dev/null +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -0,0 +1,36 @@ +package simplelru + +// LRUCache is the interface for simple LRU cache. +type LRUCache interface { + // Adds a value to the cache, returns true if an eviction occurred and + // updates the "recently used"-ness of the key. + Add(key, value interface{}) bool + + // Returns key's value from the cache and + // updates the "recently used"-ness of the key. #value, isFound + Get(key interface{}) (value interface{}, ok bool) + + // Check if a key exsists in cache without updating the recent-ness. + Contains(key interface{}) (ok bool) + + // Returns key's value without updating the "recently used"-ness of the key. + Peek(key interface{}) (value interface{}, ok bool) + + // Removes a key from the cache. + Remove(key interface{}) bool + + // Removes the oldest entry from cache. + RemoveOldest() (interface{}, interface{}, bool) + + // Returns the oldest entry from the cache. #key, value, isFound + GetOldest() (interface{}, interface{}, bool) + + // Returns a slice of the keys in the cache, from oldest to newest. + Keys() []interface{} + + // Returns the number of items in the cache. + Len() int + + // Clear all cache entries + Purge() +} diff --git a/vendor/github.com/hashicorp/hcl/.gitignore b/vendor/github.com/hashicorp/hcl/.gitignore deleted file mode 100644 index 15586a2b5..000000000 --- a/vendor/github.com/hashicorp/hcl/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -y.output - -# ignore intellij files -.idea -*.iml -*.ipr -*.iws - -*.test diff --git a/vendor/github.com/hashicorp/hcl/.travis.yml b/vendor/github.com/hashicorp/hcl/.travis.yml deleted file mode 100644 index 3f83d9023..000000000 --- a/vendor/github.com/hashicorp/hcl/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false - -language: go - -go: - - 1.8 - -branches: - only: - - master - -script: make test diff --git a/vendor/github.com/hashicorp/hcl/Makefile b/vendor/github.com/hashicorp/hcl/Makefile deleted file mode 100644 index 84fd743f5..000000000 --- a/vendor/github.com/hashicorp/hcl/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -TEST?=./... - -default: test - -fmt: generate - go fmt ./... - -test: generate - go get -t ./... - go test $(TEST) $(TESTARGS) - -generate: - go generate ./... - -updatedeps: - go get -u golang.org/x/tools/cmd/stringer - -.PHONY: default generate test updatedeps diff --git a/vendor/github.com/hashicorp/hcl/README.md b/vendor/github.com/hashicorp/hcl/README.md deleted file mode 100644 index c8223326d..000000000 --- a/vendor/github.com/hashicorp/hcl/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# HCL - -[![GoDoc](https://godoc.org/github.com/hashicorp/hcl?status.png)](https://godoc.org/github.com/hashicorp/hcl) [![Build Status](https://travis-ci.org/hashicorp/hcl.svg?branch=master)](https://travis-ci.org/hashicorp/hcl) - -HCL (HashiCorp Configuration Language) is a configuration language built -by HashiCorp. The goal of HCL is to build a structured configuration language -that is both human and machine friendly for use with command-line tools, but -specifically targeted towards DevOps tools, servers, etc. - -HCL is also fully JSON compatible. That is, JSON can be used as completely -valid input to a system expecting HCL. This helps makes systems -interoperable with other systems. - -HCL is heavily inspired by -[libucl](https://github.com/vstakhov/libucl), -nginx configuration, and others similar. - -## Why? - -A common question when viewing HCL is to ask the question: why not -JSON, YAML, etc.? - -Prior to HCL, the tools we built at [HashiCorp](http://www.hashicorp.com) -used a variety of configuration languages from full programming languages -such as Ruby to complete data structure languages such as JSON. What we -learned is that some people wanted human-friendly configuration languages -and some people wanted machine-friendly languages. - -JSON fits a nice balance in this, but is fairly verbose and most -importantly doesn't support comments. With YAML, we found that beginners -had a really hard time determining what the actual structure was, and -ended up guessing more often than not whether to use a hyphen, colon, etc. -in order to represent some configuration key. - -Full programming languages such as Ruby enable complex behavior -a configuration language shouldn't usually allow, and also forces -people to learn some set of Ruby. - -Because of this, we decided to create our own configuration language -that is JSON-compatible. Our configuration language (HCL) is designed -to be written and modified by humans. The API for HCL allows JSON -as an input so that it is also machine-friendly (machines can generate -JSON instead of trying to generate HCL). - -Our goal with HCL is not to alienate other configuration languages. -It is instead to provide HCL as a specialized language for our tools, -and JSON as the interoperability layer. - -## Syntax - -For a complete grammar, please see the parser itself. A high-level overview -of the syntax and grammar is listed here. - - * Single line comments start with `#` or `//` - - * Multi-line comments are wrapped in `/*` and `*/`. Nested block comments - are not allowed. A multi-line comment (also known as a block comment) - terminates at the first `*/` found. - - * Values are assigned with the syntax `key = value` (whitespace doesn't - matter). The value can be any primitive: a string, number, boolean, - object, or list. - - * Strings are double-quoted and can contain any UTF-8 characters. - Example: `"Hello, World"` - - * Multi-line strings start with `<- - echo %Path% - - go version - - go env - - go get -t ./... - -build_script: -- cmd: go test -v ./... diff --git a/vendor/github.com/hashicorp/hcl/decoder.go b/vendor/github.com/hashicorp/hcl/decoder.go deleted file mode 100644 index b88f322a8..000000000 --- a/vendor/github.com/hashicorp/hcl/decoder.go +++ /dev/null @@ -1,724 +0,0 @@ -package hcl - -import ( - "errors" - "fmt" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/parser" - "github.com/hashicorp/hcl/hcl/token" -) - -// This is the tag to use with structures to have settings for HCL -const tagName = "hcl" - -var ( - // nodeType holds a reference to the type of ast.Node - nodeType reflect.Type = findNodeType() -) - -// Unmarshal accepts a byte slice as input and writes the -// data to the value pointed to by v. -func Unmarshal(bs []byte, v interface{}) error { - root, err := parse(bs) - if err != nil { - return err - } - - return DecodeObject(v, root) -} - -// Decode reads the given input and decodes it into the structure -// given by `out`. -func Decode(out interface{}, in string) error { - obj, err := Parse(in) - if err != nil { - return err - } - - return DecodeObject(out, obj) -} - -// DecodeObject is a lower-level version of Decode. It decodes a -// raw Object into the given output. -func DecodeObject(out interface{}, n ast.Node) error { - val := reflect.ValueOf(out) - if val.Kind() != reflect.Ptr { - return errors.New("result must be a pointer") - } - - // If we have the file, we really decode the root node - if f, ok := n.(*ast.File); ok { - n = f.Node - } - - var d decoder - return d.decode("root", n, val.Elem()) -} - -type decoder struct { - stack []reflect.Kind -} - -func (d *decoder) decode(name string, node ast.Node, result reflect.Value) error { - k := result - - // If we have an interface with a valid value, we use that - // for the check. - if result.Kind() == reflect.Interface { - elem := result.Elem() - if elem.IsValid() { - k = elem - } - } - - // Push current onto stack unless it is an interface. - if k.Kind() != reflect.Interface { - d.stack = append(d.stack, k.Kind()) - - // Schedule a pop - defer func() { - d.stack = d.stack[:len(d.stack)-1] - }() - } - - switch k.Kind() { - case reflect.Bool: - return d.decodeBool(name, node, result) - case reflect.Float32, reflect.Float64: - return d.decodeFloat(name, node, result) - case reflect.Int, reflect.Int32, reflect.Int64: - return d.decodeInt(name, node, result) - case reflect.Interface: - // When we see an interface, we make our own thing - return d.decodeInterface(name, node, result) - case reflect.Map: - return d.decodeMap(name, node, result) - case reflect.Ptr: - return d.decodePtr(name, node, result) - case reflect.Slice: - return d.decodeSlice(name, node, result) - case reflect.String: - return d.decodeString(name, node, result) - case reflect.Struct: - return d.decodeStruct(name, node, result) - default: - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown kind to decode into: %s", name, k.Kind()), - } - } -} - -func (d *decoder) decodeBool(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - if n.Token.Type == token.BOOL { - v, err := strconv.ParseBool(n.Token.Text) - if err != nil { - return err - } - - result.Set(reflect.ValueOf(v)) - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type %T", name, node), - } -} - -func (d *decoder) decodeFloat(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - if n.Token.Type == token.FLOAT || n.Token.Type == token.NUMBER { - v, err := strconv.ParseFloat(n.Token.Text, 64) - if err != nil { - return err - } - - result.Set(reflect.ValueOf(v).Convert(result.Type())) - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type %T", name, node), - } -} - -func (d *decoder) decodeInt(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - switch n.Token.Type { - case token.NUMBER: - v, err := strconv.ParseInt(n.Token.Text, 0, 0) - if err != nil { - return err - } - - if result.Kind() == reflect.Interface { - result.Set(reflect.ValueOf(int(v))) - } else { - result.SetInt(v) - } - return nil - case token.STRING: - v, err := strconv.ParseInt(n.Token.Value().(string), 0, 0) - if err != nil { - return err - } - - if result.Kind() == reflect.Interface { - result.Set(reflect.ValueOf(int(v))) - } else { - result.SetInt(v) - } - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type %T", name, node), - } -} - -func (d *decoder) decodeInterface(name string, node ast.Node, result reflect.Value) error { - // When we see an ast.Node, we retain the value to enable deferred decoding. - // Very useful in situations where we want to preserve ast.Node information - // like Pos - if result.Type() == nodeType && result.CanSet() { - result.Set(reflect.ValueOf(node)) - return nil - } - - var set reflect.Value - redecode := true - - // For testing types, ObjectType should just be treated as a list. We - // set this to a temporary var because we want to pass in the real node. - testNode := node - if ot, ok := node.(*ast.ObjectType); ok { - testNode = ot.List - } - - switch n := testNode.(type) { - case *ast.ObjectList: - // If we're at the root or we're directly within a slice, then we - // decode objects into map[string]interface{}, otherwise we decode - // them into lists. - if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice { - var temp map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeMap( - reflect.MapOf( - reflect.TypeOf(""), - tempVal.Type().Elem())) - - set = result - } else { - var temp []map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeSlice( - reflect.SliceOf(tempVal.Type().Elem()), 0, len(n.Items)) - set = result - } - case *ast.ObjectType: - // If we're at the root or we're directly within a slice, then we - // decode objects into map[string]interface{}, otherwise we decode - // them into lists. - if len(d.stack) == 0 || d.stack[len(d.stack)-1] == reflect.Slice { - var temp map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeMap( - reflect.MapOf( - reflect.TypeOf(""), - tempVal.Type().Elem())) - - set = result - } else { - var temp []map[string]interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeSlice( - reflect.SliceOf(tempVal.Type().Elem()), 0, 1) - set = result - } - case *ast.ListType: - var temp []interface{} - tempVal := reflect.ValueOf(temp) - result := reflect.MakeSlice( - reflect.SliceOf(tempVal.Type().Elem()), 0, 0) - set = result - case *ast.LiteralType: - switch n.Token.Type { - case token.BOOL: - var result bool - set = reflect.Indirect(reflect.New(reflect.TypeOf(result))) - case token.FLOAT: - var result float64 - set = reflect.Indirect(reflect.New(reflect.TypeOf(result))) - case token.NUMBER: - var result int - set = reflect.Indirect(reflect.New(reflect.TypeOf(result))) - case token.STRING, token.HEREDOC: - set = reflect.Indirect(reflect.New(reflect.TypeOf(""))) - default: - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: cannot decode into interface: %T", name, node), - } - } - default: - return fmt.Errorf( - "%s: cannot decode into interface: %T", - name, node) - } - - // Set the result to what its supposed to be, then reset - // result so we don't reflect into this method anymore. - result.Set(set) - - if redecode { - // Revisit the node so that we can use the newly instantiated - // thing and populate it. - if err := d.decode(name, node, result); err != nil { - return err - } - } - - return nil -} - -func (d *decoder) decodeMap(name string, node ast.Node, result reflect.Value) error { - if item, ok := node.(*ast.ObjectItem); ok { - node = &ast.ObjectList{Items: []*ast.ObjectItem{item}} - } - - if ot, ok := node.(*ast.ObjectType); ok { - node = ot.List - } - - n, ok := node.(*ast.ObjectList) - if !ok { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: not an object type for map (%T)", name, node), - } - } - - // If we have an interface, then we can address the interface, - // but not the slice itself, so get the element but set the interface - set := result - if result.Kind() == reflect.Interface { - result = result.Elem() - } - - resultType := result.Type() - resultElemType := resultType.Elem() - resultKeyType := resultType.Key() - if resultKeyType.Kind() != reflect.String { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: map must have string keys", name), - } - } - - // Make a map if it is nil - resultMap := result - if result.IsNil() { - resultMap = reflect.MakeMap( - reflect.MapOf(resultKeyType, resultElemType)) - } - - // Go through each element and decode it. - done := make(map[string]struct{}) - for _, item := range n.Items { - if item.Val == nil { - continue - } - - // github.com/hashicorp/terraform/issue/5740 - if len(item.Keys) == 0 { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: map must have string keys", name), - } - } - - // Get the key we're dealing with, which is the first item - keyStr := item.Keys[0].Token.Value().(string) - - // If we've already processed this key, then ignore it - if _, ok := done[keyStr]; ok { - continue - } - - // Determine the value. If we have more than one key, then we - // get the objectlist of only these keys. - itemVal := item.Val - if len(item.Keys) > 1 { - itemVal = n.Filter(keyStr) - done[keyStr] = struct{}{} - } - - // Make the field name - fieldName := fmt.Sprintf("%s.%s", name, keyStr) - - // Get the key/value as reflection values - key := reflect.ValueOf(keyStr) - val := reflect.Indirect(reflect.New(resultElemType)) - - // If we have a pre-existing value in the map, use that - oldVal := resultMap.MapIndex(key) - if oldVal.IsValid() { - val.Set(oldVal) - } - - // Decode! - if err := d.decode(fieldName, itemVal, val); err != nil { - return err - } - - // Set the value on the map - resultMap.SetMapIndex(key, val) - } - - // Set the final map if we can - set.Set(resultMap) - return nil -} - -func (d *decoder) decodePtr(name string, node ast.Node, result reflect.Value) error { - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - resultType := result.Type() - resultElemType := resultType.Elem() - val := reflect.New(resultElemType) - if err := d.decode(name, node, reflect.Indirect(val)); err != nil { - return err - } - - result.Set(val) - return nil -} - -func (d *decoder) decodeSlice(name string, node ast.Node, result reflect.Value) error { - // If we have an interface, then we can address the interface, - // but not the slice itself, so get the element but set the interface - set := result - if result.Kind() == reflect.Interface { - result = result.Elem() - } - // Create the slice if it isn't nil - resultType := result.Type() - resultElemType := resultType.Elem() - if result.IsNil() { - resultSliceType := reflect.SliceOf(resultElemType) - result = reflect.MakeSlice( - resultSliceType, 0, 0) - } - - // Figure out the items we'll be copying into the slice - var items []ast.Node - switch n := node.(type) { - case *ast.ObjectList: - items = make([]ast.Node, len(n.Items)) - for i, item := range n.Items { - items[i] = item - } - case *ast.ObjectType: - items = []ast.Node{n} - case *ast.ListType: - items = n.List - default: - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("unknown slice type: %T", node), - } - } - - for i, item := range items { - fieldName := fmt.Sprintf("%s[%d]", name, i) - - // Decode - val := reflect.Indirect(reflect.New(resultElemType)) - - // if item is an object that was decoded from ambiguous JSON and - // flattened, make sure it's expanded if it needs to decode into a - // defined structure. - item := expandObject(item, val) - - if err := d.decode(fieldName, item, val); err != nil { - return err - } - - // Append it onto the slice - result = reflect.Append(result, val) - } - - set.Set(result) - return nil -} - -// expandObject detects if an ambiguous JSON object was flattened to a List which -// should be decoded into a struct, and expands the ast to properly deocode. -func expandObject(node ast.Node, result reflect.Value) ast.Node { - item, ok := node.(*ast.ObjectItem) - if !ok { - return node - } - - elemType := result.Type() - - // our target type must be a struct - switch elemType.Kind() { - case reflect.Ptr: - switch elemType.Elem().Kind() { - case reflect.Struct: - //OK - default: - return node - } - case reflect.Struct: - //OK - default: - return node - } - - // A list value will have a key and field name. If it had more fields, - // it wouldn't have been flattened. - if len(item.Keys) != 2 { - return node - } - - keyToken := item.Keys[0].Token - item.Keys = item.Keys[1:] - - // we need to un-flatten the ast enough to decode - newNode := &ast.ObjectItem{ - Keys: []*ast.ObjectKey{ - &ast.ObjectKey{ - Token: keyToken, - }, - }, - Val: &ast.ObjectType{ - List: &ast.ObjectList{ - Items: []*ast.ObjectItem{item}, - }, - }, - } - - return newNode -} - -func (d *decoder) decodeString(name string, node ast.Node, result reflect.Value) error { - switch n := node.(type) { - case *ast.LiteralType: - switch n.Token.Type { - case token.NUMBER: - result.Set(reflect.ValueOf(n.Token.Text).Convert(result.Type())) - return nil - case token.STRING, token.HEREDOC: - result.Set(reflect.ValueOf(n.Token.Value()).Convert(result.Type())) - return nil - } - } - - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unknown type for string %T", name, node), - } -} - -func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value) error { - var item *ast.ObjectItem - if it, ok := node.(*ast.ObjectItem); ok { - item = it - node = it.Val - } - - if ot, ok := node.(*ast.ObjectType); ok { - node = ot.List - } - - // Handle the special case where the object itself is a literal. Previously - // the yacc parser would always ensure top-level elements were arrays. The new - // parser does not make the same guarantees, thus we need to convert any - // top-level literal elements into a list. - if _, ok := node.(*ast.LiteralType); ok && item != nil { - node = &ast.ObjectList{Items: []*ast.ObjectItem{item}} - } - - list, ok := node.(*ast.ObjectList) - if !ok { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: not an object type for struct (%T)", name, node), - } - } - - // This slice will keep track of all the structs we'll be decoding. - // There can be more than one struct if there are embedded structs - // that are squashed. - structs := make([]reflect.Value, 1, 5) - structs[0] = result - - // Compile the list of all the fields that we're going to be decoding - // from all the structs. - fields := make(map[*reflect.StructField]reflect.Value) - for len(structs) > 0 { - structVal := structs[0] - structs = structs[1:] - - structType := structVal.Type() - for i := 0; i < structType.NumField(); i++ { - fieldType := structType.Field(i) - tagParts := strings.Split(fieldType.Tag.Get(tagName), ",") - - // Ignore fields with tag name "-" - if tagParts[0] == "-" { - continue - } - - if fieldType.Anonymous { - fieldKind := fieldType.Type.Kind() - if fieldKind != reflect.Struct { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: unsupported type to struct: %s", - fieldType.Name, fieldKind), - } - } - - // We have an embedded field. We "squash" the fields down - // if specified in the tag. - squash := false - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break - } - } - - if squash { - structs = append( - structs, result.FieldByName(fieldType.Name)) - continue - } - } - - // Normal struct field, store it away - fields[&fieldType] = structVal.Field(i) - } - } - - usedKeys := make(map[string]struct{}) - decodedFields := make([]string, 0, len(fields)) - decodedFieldsVal := make([]reflect.Value, 0) - unusedKeysVal := make([]reflect.Value, 0) - for fieldType, field := range fields { - if !field.IsValid() { - // This should never happen - panic("field is not valid") - } - - // If we can't set the field, then it is unexported or something, - // and we just continue onwards. - if !field.CanSet() { - continue - } - - fieldName := fieldType.Name - - tagValue := fieldType.Tag.Get(tagName) - tagParts := strings.SplitN(tagValue, ",", 2) - if len(tagParts) >= 2 { - switch tagParts[1] { - case "decodedFields": - decodedFieldsVal = append(decodedFieldsVal, field) - continue - case "key": - if item == nil { - return &parser.PosError{ - Pos: node.Pos(), - Err: fmt.Errorf("%s: %s asked for 'key', impossible", - name, fieldName), - } - } - - field.SetString(item.Keys[0].Token.Value().(string)) - continue - case "unusedKeys": - unusedKeysVal = append(unusedKeysVal, field) - continue - } - } - - if tagParts[0] != "" { - fieldName = tagParts[0] - } - - // Determine the element we'll use to decode. If it is a single - // match (only object with the field), then we decode it exactly. - // If it is a prefix match, then we decode the matches. - filter := list.Filter(fieldName) - - prefixMatches := filter.Children() - matches := filter.Elem() - if len(matches.Items) == 0 && len(prefixMatches.Items) == 0 { - continue - } - - // Track the used key - usedKeys[fieldName] = struct{}{} - - // Create the field name and decode. We range over the elements - // because we actually want the value. - fieldName = fmt.Sprintf("%s.%s", name, fieldName) - if len(prefixMatches.Items) > 0 { - if err := d.decode(fieldName, prefixMatches, field); err != nil { - return err - } - } - for _, match := range matches.Items { - var decodeNode ast.Node = match.Val - if ot, ok := decodeNode.(*ast.ObjectType); ok { - decodeNode = &ast.ObjectList{Items: ot.List.Items} - } - - if err := d.decode(fieldName, decodeNode, field); err != nil { - return err - } - } - - decodedFields = append(decodedFields, fieldType.Name) - } - - if len(decodedFieldsVal) > 0 { - // Sort it so that it is deterministic - sort.Strings(decodedFields) - - for _, v := range decodedFieldsVal { - v.Set(reflect.ValueOf(decodedFields)) - } - } - - return nil -} - -// findNodeType returns the type of ast.Node -func findNodeType() reflect.Type { - var nodeContainer struct { - Node ast.Node - } - value := reflect.ValueOf(nodeContainer).FieldByName("Node") - return value.Type() -} diff --git a/vendor/github.com/hashicorp/hcl/decoder_test.go b/vendor/github.com/hashicorp/hcl/decoder_test.go deleted file mode 100644 index 8682f470e..000000000 --- a/vendor/github.com/hashicorp/hcl/decoder_test.go +++ /dev/null @@ -1,1203 +0,0 @@ -package hcl - -import ( - "io/ioutil" - "path/filepath" - "reflect" - "testing" - "time" - - "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/hcl/hcl/ast" -) - -func TestDecode_interface(t *testing.T) { - cases := []struct { - File string - Err bool - Out interface{} - }{ - { - "basic.hcl", - false, - map[string]interface{}{ - "foo": "bar", - "bar": "${file(\"bing/bong.txt\")}", - }, - }, - { - "basic_squish.hcl", - false, - map[string]interface{}{ - "foo": "bar", - "bar": "${file(\"bing/bong.txt\")}", - "foo-bar": "baz", - }, - }, - { - "empty.hcl", - false, - map[string]interface{}{ - "resource": []map[string]interface{}{ - map[string]interface{}{ - "foo": []map[string]interface{}{ - map[string]interface{}{}, - }, - }, - }, - }, - }, - { - "tfvars.hcl", - false, - map[string]interface{}{ - "regularvar": "Should work", - "map.key1": "Value", - "map.key2": "Other value", - }, - }, - { - "escape.hcl", - false, - map[string]interface{}{ - "foo": "bar\"baz\\n", - "qux": "back\\slash", - "bar": "new\nline", - "qax": `slash\:colon`, - "nested": `${HH\\:mm\\:ss}`, - "nestedquotes": `${"\"stringwrappedinquotes\""}`, - }, - }, - { - "float.hcl", - false, - map[string]interface{}{ - "a": 1.02, - "b": 2, - }, - }, - { - "multiline_bad.hcl", - true, - nil, - }, - { - "multiline_literal.hcl", - true, - nil, - }, - { - "multiline_literal_with_hil.hcl", - false, - map[string]interface{}{"multiline_literal_with_hil": "${hello\n world}"}, - }, - { - "multiline_no_marker.hcl", - true, - nil, - }, - { - "multiline.hcl", - false, - map[string]interface{}{"foo": "bar\nbaz\n"}, - }, - { - "multiline_indented.hcl", - false, - map[string]interface{}{"foo": " bar\n baz\n"}, - }, - { - "multiline_no_hanging_indent.hcl", - false, - map[string]interface{}{"foo": " baz\n bar\n foo\n"}, - }, - { - "multiline_no_eof.hcl", - false, - map[string]interface{}{"foo": "bar\nbaz\n", "key": "value"}, - }, - { - "multiline.json", - false, - map[string]interface{}{"foo": "bar\nbaz"}, - }, - { - "null_strings.json", - false, - map[string]interface{}{ - "module": []map[string]interface{}{ - map[string]interface{}{ - "app": []map[string]interface{}{ - map[string]interface{}{"foo": ""}, - }, - }, - }, - }, - }, - { - "scientific.json", - false, - map[string]interface{}{ - "a": 1e-10, - "b": 1e+10, - "c": 1e10, - "d": 1.2e-10, - "e": 1.2e+10, - "f": 1.2e10, - }, - }, - { - "scientific.hcl", - false, - map[string]interface{}{ - "a": 1e-10, - "b": 1e+10, - "c": 1e10, - "d": 1.2e-10, - "e": 1.2e+10, - "f": 1.2e10, - }, - }, - { - "terraform_heroku.hcl", - false, - map[string]interface{}{ - "name": "terraform-test-app", - "config_vars": []map[string]interface{}{ - map[string]interface{}{ - "FOO": "bar", - }, - }, - }, - }, - { - "structure_multi.hcl", - false, - map[string]interface{}{ - "foo": []map[string]interface{}{ - map[string]interface{}{ - "baz": []map[string]interface{}{ - map[string]interface{}{"key": 7}, - }, - }, - map[string]interface{}{ - "bar": []map[string]interface{}{ - map[string]interface{}{"key": 12}, - }, - }, - }, - }, - }, - { - "structure_multi.json", - false, - map[string]interface{}{ - "foo": []map[string]interface{}{ - map[string]interface{}{ - "baz": []map[string]interface{}{ - map[string]interface{}{"key": 7}, - }, - }, - map[string]interface{}{ - "bar": []map[string]interface{}{ - map[string]interface{}{"key": 12}, - }, - }, - }, - }, - }, - { - "list_of_lists.hcl", - false, - map[string]interface{}{ - "foo": []interface{}{ - []interface{}{"foo"}, - []interface{}{"bar"}, - }, - }, - }, - { - "list_of_maps.hcl", - false, - map[string]interface{}{ - "foo": []interface{}{ - map[string]interface{}{"somekey1": "someval1"}, - map[string]interface{}{"somekey2": "someval2", "someextrakey": "someextraval"}, - }, - }, - }, - { - "assign_deep.hcl", - false, - map[string]interface{}{ - "resource": []interface{}{ - map[string]interface{}{ - "foo": []interface{}{ - map[string]interface{}{ - "bar": []map[string]interface{}{ - map[string]interface{}{}}}}}}}, - }, - { - "structure_list.hcl", - false, - map[string]interface{}{ - "foo": []map[string]interface{}{ - map[string]interface{}{ - "key": 7, - }, - map[string]interface{}{ - "key": 12, - }, - }, - }, - }, - { - "structure_list.json", - false, - map[string]interface{}{ - "foo": []map[string]interface{}{ - map[string]interface{}{ - "key": 7, - }, - map[string]interface{}{ - "key": 12, - }, - }, - }, - }, - { - "structure_list_deep.json", - false, - map[string]interface{}{ - "bar": []map[string]interface{}{ - map[string]interface{}{ - "foo": []map[string]interface{}{ - map[string]interface{}{ - "name": "terraform_example", - "ingress": []map[string]interface{}{ - map[string]interface{}{ - "from_port": 22, - }, - map[string]interface{}{ - "from_port": 80, - }, - }, - }, - }, - }, - }, - }, - }, - - { - "structure_list_empty.json", - false, - map[string]interface{}{ - "foo": []interface{}{}, - }, - }, - - { - "nested_block_comment.hcl", - false, - map[string]interface{}{ - "bar": "value", - }, - }, - - { - "unterminated_block_comment.hcl", - true, - nil, - }, - - { - "unterminated_brace.hcl", - true, - nil, - }, - - { - "nested_provider_bad.hcl", - true, - nil, - }, - - { - "object_list.json", - false, - map[string]interface{}{ - "resource": []map[string]interface{}{ - map[string]interface{}{ - "aws_instance": []map[string]interface{}{ - map[string]interface{}{ - "db": []map[string]interface{}{ - map[string]interface{}{ - "vpc": "foo", - "provisioner": []map[string]interface{}{ - map[string]interface{}{ - "file": []map[string]interface{}{ - map[string]interface{}{ - "source": "foo", - "destination": "bar", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - - // Terraform GH-8295 sanity test that basic decoding into - // interface{} works. - { - "terraform_variable_invalid.json", - false, - map[string]interface{}{ - "variable": []map[string]interface{}{ - map[string]interface{}{ - "whatever": "abc123", - }, - }, - }, - }, - - { - "interpolate.json", - false, - map[string]interface{}{ - "default": `${replace("europe-west", "-", " ")}`, - }, - }, - - { - "block_assign.hcl", - true, - nil, - }, - - { - "escape_backslash.hcl", - false, - map[string]interface{}{ - "output": []map[string]interface{}{ - map[string]interface{}{ - "one": `${replace(var.sub_domain, ".", "\\.")}`, - "two": `${replace(var.sub_domain, ".", "\\\\.")}`, - "many": `${replace(var.sub_domain, ".", "\\\\\\\\.")}`, - }, - }, - }, - }, - - { - "git_crypt.hcl", - true, - nil, - }, - - { - "object_with_bool.hcl", - false, - map[string]interface{}{ - "path": []map[string]interface{}{ - map[string]interface{}{ - "policy": "write", - "permissions": []map[string]interface{}{ - map[string]interface{}{ - "bool": []interface{}{false}, - }, - }, - }, - }, - }, - }, - } - - for _, tc := range cases { - t.Run(tc.File, func(t *testing.T) { - d, err := ioutil.ReadFile(filepath.Join(fixtureDir, tc.File)) - if err != nil { - t.Fatalf("err: %s", err) - } - - var out interface{} - err = Decode(&out, string(d)) - if (err != nil) != tc.Err { - t.Fatalf("Input: %s\n\nError: %s", tc.File, err) - } - - if !reflect.DeepEqual(out, tc.Out) { - t.Fatalf("Input: %s. Actual, Expected.\n\n%#v\n\n%#v", tc.File, out, tc.Out) - } - - var v interface{} - err = Unmarshal(d, &v) - if (err != nil) != tc.Err { - t.Fatalf("Input: %s\n\nError: %s", tc.File, err) - } - - if !reflect.DeepEqual(v, tc.Out) { - t.Fatalf("Input: %s. Actual, Expected.\n\n%#v\n\n%#v", tc.File, out, tc.Out) - } - }) - } -} - -func TestDecode_interfaceInline(t *testing.T) { - cases := []struct { - Value string - Err bool - Out interface{} - }{ - {"t t e{{}}", true, nil}, - {"t=0t d {}", true, map[string]interface{}{"t": 0}}, - {"v=0E0v d{}", true, map[string]interface{}{"v": float64(0)}}, - } - - for _, tc := range cases { - t.Logf("Testing: %q", tc.Value) - - var out interface{} - err := Decode(&out, tc.Value) - if (err != nil) != tc.Err { - t.Fatalf("Input: %q\n\nError: %s", tc.Value, err) - } - - if !reflect.DeepEqual(out, tc.Out) { - t.Fatalf("Input: %q. Actual, Expected.\n\n%#v\n\n%#v", tc.Value, out, tc.Out) - } - - var v interface{} - err = Unmarshal([]byte(tc.Value), &v) - if (err != nil) != tc.Err { - t.Fatalf("Input: %q\n\nError: %s", tc.Value, err) - } - - if !reflect.DeepEqual(v, tc.Out) { - t.Fatalf("Input: %q. Actual, Expected.\n\n%#v\n\n%#v", tc.Value, out, tc.Out) - } - } -} - -func TestDecode_equal(t *testing.T) { - cases := []struct { - One, Two string - }{ - { - "basic.hcl", - "basic.json", - }, - { - "float.hcl", - "float.json", - }, - /* - { - "structure.hcl", - "structure.json", - }, - */ - { - "structure.hcl", - "structure_flat.json", - }, - { - "terraform_heroku.hcl", - "terraform_heroku.json", - }, - } - - for _, tc := range cases { - p1 := filepath.Join(fixtureDir, tc.One) - p2 := filepath.Join(fixtureDir, tc.Two) - - d1, err := ioutil.ReadFile(p1) - if err != nil { - t.Fatalf("err: %s", err) - } - - d2, err := ioutil.ReadFile(p2) - if err != nil { - t.Fatalf("err: %s", err) - } - - var i1, i2 interface{} - err = Decode(&i1, string(d1)) - if err != nil { - t.Fatalf("err: %s", err) - } - - err = Decode(&i2, string(d2)) - if err != nil { - t.Fatalf("err: %s", err) - } - - if !reflect.DeepEqual(i1, i2) { - t.Fatalf( - "%s != %s\n\n%#v\n\n%#v", - tc.One, tc.Two, - i1, i2) - } - } -} - -func TestDecode_flatMap(t *testing.T) { - var val map[string]map[string]string - - err := Decode(&val, testReadFile(t, "structure_flatmap.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - expected := map[string]map[string]string{ - "foo": map[string]string{ - "foo": "bar", - "key": "7", - }, - } - - if !reflect.DeepEqual(val, expected) { - t.Fatalf("Actual: %#v\n\nExpected: %#v", val, expected) - } -} - -func TestDecode_structure(t *testing.T) { - type Embedded interface{} - - type V struct { - Embedded `hcl:"-"` - Key int - Foo string - } - - var actual V - - err := Decode(&actual, testReadFile(t, "flat.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - expected := V{ - Key: 7, - Foo: "bar", - } - - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("Actual: %#v\n\nExpected: %#v", actual, expected) - } -} - -func TestDecode_structurePtr(t *testing.T) { - type V struct { - Key int - Foo string - } - - var actual *V - - err := Decode(&actual, testReadFile(t, "flat.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - expected := &V{ - Key: 7, - Foo: "bar", - } - - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("Actual: %#v\n\nExpected: %#v", actual, expected) - } -} - -func TestDecode_structureArray(t *testing.T) { - // This test is extracted from a failure in Consul (consul.io), - // hence the interesting structure naming. - - type KeyPolicyType string - - type KeyPolicy struct { - Prefix string `hcl:",key"` - Policy KeyPolicyType - } - - type Policy struct { - Keys []KeyPolicy `hcl:"key,expand"` - } - - expected := Policy{ - Keys: []KeyPolicy{ - KeyPolicy{ - Prefix: "", - Policy: "read", - }, - KeyPolicy{ - Prefix: "foo/", - Policy: "write", - }, - KeyPolicy{ - Prefix: "foo/bar/", - Policy: "read", - }, - KeyPolicy{ - Prefix: "foo/bar/baz", - Policy: "deny", - }, - }, - } - - files := []string{ - "decode_policy.hcl", - "decode_policy.json", - } - - for _, f := range files { - var actual Policy - - err := Decode(&actual, testReadFile(t, f)) - if err != nil { - t.Fatalf("Input: %s\n\nerr: %s", f, err) - } - - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("Input: %s\n\nActual: %#v\n\nExpected: %#v", f, actual, expected) - } - } -} - -func TestDecode_sliceExpand(t *testing.T) { - type testInner struct { - Name string `hcl:",key"` - Key string - } - - type testStruct struct { - Services []testInner `hcl:"service,expand"` - } - - expected := testStruct{ - Services: []testInner{ - testInner{ - Name: "my-service-0", - Key: "value", - }, - testInner{ - Name: "my-service-1", - Key: "value", - }, - }, - } - - files := []string{ - "slice_expand.hcl", - } - - for _, f := range files { - t.Logf("Testing: %s", f) - - var actual testStruct - err := Decode(&actual, testReadFile(t, f)) - if err != nil { - t.Fatalf("Input: %s\n\nerr: %s", f, err) - } - - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("Input: %s\n\nActual: %#v\n\nExpected: %#v", f, actual, expected) - } - } -} - -func TestDecode_structureMap(t *testing.T) { - // This test is extracted from a failure in Terraform (terraform.io), - // hence the interesting structure naming. - - type hclVariable struct { - Default interface{} - Description string - Fields []string `hcl:",decodedFields"` - } - - type rawConfig struct { - Variable map[string]hclVariable - } - - expected := rawConfig{ - Variable: map[string]hclVariable{ - "foo": hclVariable{ - Default: "bar", - Description: "bar", - Fields: []string{"Default", "Description"}, - }, - - "amis": hclVariable{ - Default: []map[string]interface{}{ - map[string]interface{}{ - "east": "foo", - }, - }, - Fields: []string{"Default"}, - }, - }, - } - - files := []string{ - "decode_tf_variable.hcl", - "decode_tf_variable.json", - } - - for _, f := range files { - t.Logf("Testing: %s", f) - - var actual rawConfig - err := Decode(&actual, testReadFile(t, f)) - if err != nil { - t.Fatalf("Input: %s\n\nerr: %s", f, err) - } - - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("Input: %s\n\nActual: %#v\n\nExpected: %#v", f, actual, expected) - } - } -} - -func TestDecode_structureMapInvalid(t *testing.T) { - // Terraform GH-8295 - - type hclVariable struct { - Default interface{} - Description string - Fields []string `hcl:",decodedFields"` - } - - type rawConfig struct { - Variable map[string]*hclVariable - } - - var actual rawConfig - err := Decode(&actual, testReadFile(t, "terraform_variable_invalid.json")) - if err == nil { - t.Fatal("expected error") - } -} - -func TestDecode_interfaceNonPointer(t *testing.T) { - var value interface{} - err := Decode(value, testReadFile(t, "basic_int_string.hcl")) - if err == nil { - t.Fatal("should error") - } -} - -func TestDecode_intString(t *testing.T) { - var value struct { - Count int - } - - err := Decode(&value, testReadFile(t, "basic_int_string.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - if value.Count != 3 { - t.Fatalf("bad: %#v", value.Count) - } -} - -func TestDecode_float32(t *testing.T) { - var value struct { - A float32 `hcl:"a"` - B float32 `hcl:"b"` - } - - err := Decode(&value, testReadFile(t, "float.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - if got, want := value.A, float32(1.02); got != want { - t.Fatalf("wrong result %#v; want %#v", got, want) - } - if got, want := value.B, float32(2); got != want { - t.Fatalf("wrong result %#v; want %#v", got, want) - } -} - -func TestDecode_float64(t *testing.T) { - var value struct { - A float64 `hcl:"a"` - B float64 `hcl:"b"` - } - - err := Decode(&value, testReadFile(t, "float.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - if got, want := value.A, float64(1.02); got != want { - t.Fatalf("wrong result %#v; want %#v", got, want) - } - if got, want := value.B, float64(2); got != want { - t.Fatalf("wrong result %#v; want %#v", got, want) - } -} - -func TestDecode_intStringAliased(t *testing.T) { - var value struct { - Count time.Duration - } - - err := Decode(&value, testReadFile(t, "basic_int_string.hcl")) - if err != nil { - t.Fatalf("err: %s", err) - } - - if value.Count != time.Duration(3) { - t.Fatalf("bad: %#v", value.Count) - } -} - -func TestDecode_Node(t *testing.T) { - // given - var value struct { - Content ast.Node - Nested struct { - Content ast.Node - } - } - - content := ` -content { - hello = "world" -} -` - - // when - err := Decode(&value, content) - - // then - if err != nil { - t.Errorf("unable to decode content, %v", err) - return - } - - // verify ast.Node can be decoded later - var v map[string]interface{} - err = DecodeObject(&v, value.Content) - if err != nil { - t.Errorf("unable to decode content, %v", err) - return - } - - if v["hello"] != "world" { - t.Errorf("expected mapping to be returned") - } -} - -func TestDecode_NestedNode(t *testing.T) { - // given - var value struct { - Nested struct { - Content ast.Node - } - } - - content := ` -nested "content" { - hello = "world" -} -` - - // when - err := Decode(&value, content) - - // then - if err != nil { - t.Errorf("unable to decode content, %v", err) - return - } - - // verify ast.Node can be decoded later - var v map[string]interface{} - err = DecodeObject(&v, value.Nested.Content) - if err != nil { - t.Errorf("unable to decode content, %v", err) - return - } - - if v["hello"] != "world" { - t.Errorf("expected mapping to be returned") - } -} - -// https://github.com/hashicorp/hcl/issues/60 -func TestDecode_topLevelKeys(t *testing.T) { - type Template struct { - Source string - } - - templates := struct { - Templates []*Template `hcl:"template"` - }{} - - err := Decode(&templates, ` - template { - source = "blah" - } - - template { - source = "blahblah" - }`) - - if err != nil { - t.Fatal(err) - } - - if templates.Templates[0].Source != "blah" { - t.Errorf("bad source: %s", templates.Templates[0].Source) - } - - if templates.Templates[1].Source != "blahblah" { - t.Errorf("bad source: %s", templates.Templates[1].Source) - } -} - -func TestDecode_flattenedJSON(t *testing.T) { - // make sure we can also correctly extract a Name key too - type V struct { - Name string `hcl:",key"` - Description string - Default map[string]string - } - type Vars struct { - Variable []*V - } - - cases := []struct { - JSON string - Out interface{} - Expected interface{} - }{ - { // Nested object, no sibling keys - JSON: ` -{ - "var_name": { - "default": { - "key1": "a", - "key2": "b" - } - } -} - `, - Out: &[]*V{}, - Expected: &[]*V{ - &V{ - Name: "var_name", - Default: map[string]string{"key1": "a", "key2": "b"}, - }, - }, - }, - - { // Nested object with a sibling key (this worked previously) - JSON: ` -{ - "var_name": { - "description": "Described", - "default": { - "key1": "a", - "key2": "b" - } - } -} - `, - Out: &[]*V{}, - Expected: &[]*V{ - &V{ - Name: "var_name", - Description: "Described", - Default: map[string]string{"key1": "a", "key2": "b"}, - }, - }, - }, - - { // Multiple nested objects, one with a sibling key - JSON: ` -{ - "variable": { - "var_1": { - "default": { - "key1": "a", - "key2": "b" - } - }, - "var_2": { - "description": "Described", - "default": { - "key1": "a", - "key2": "b" - } - } - } -} - `, - Out: &Vars{}, - Expected: &Vars{ - Variable: []*V{ - &V{ - Name: "var_1", - Default: map[string]string{"key1": "a", "key2": "b"}, - }, - &V{ - Name: "var_2", - Description: "Described", - Default: map[string]string{"key1": "a", "key2": "b"}, - }, - }, - }, - }, - - { // Nested object to maps - JSON: ` -{ - "variable": { - "var_name": { - "description": "Described", - "default": { - "key1": "a", - "key2": "b" - } - } - } -} - `, - Out: &[]map[string]interface{}{}, - Expected: &[]map[string]interface{}{ - { - "variable": []map[string]interface{}{ - { - "var_name": []map[string]interface{}{ - { - "description": "Described", - "default": []map[string]interface{}{ - { - "key1": "a", - "key2": "b", - }, - }, - }, - }, - }, - }, - }, - }, - }, - - { // Nested object to maps without a sibling key should decode the same as above - JSON: ` -{ - "variable": { - "var_name": { - "default": { - "key1": "a", - "key2": "b" - } - } - } -} - `, - Out: &[]map[string]interface{}{}, - Expected: &[]map[string]interface{}{ - { - "variable": []map[string]interface{}{ - { - "var_name": []map[string]interface{}{ - { - "default": []map[string]interface{}{ - { - "key1": "a", - "key2": "b", - }, - }, - }, - }, - }, - }, - }, - }, - }, - - { // Nested objects, one with a sibling key, and one without - JSON: ` -{ - "variable": { - "var_1": { - "default": { - "key1": "a", - "key2": "b" - } - }, - "var_2": { - "description": "Described", - "default": { - "key1": "a", - "key2": "b" - } - } - } -} - `, - Out: &[]map[string]interface{}{}, - Expected: &[]map[string]interface{}{ - { - "variable": []map[string]interface{}{ - { - "var_1": []map[string]interface{}{ - { - "default": []map[string]interface{}{ - { - "key1": "a", - "key2": "b", - }, - }, - }, - }, - }, - }, - }, - { - "variable": []map[string]interface{}{ - { - "var_2": []map[string]interface{}{ - { - "description": "Described", - "default": []map[string]interface{}{ - { - "key1": "a", - "key2": "b", - }, - }, - }, - }, - }, - }, - }, - }, - }, - } - - for i, tc := range cases { - err := Decode(tc.Out, tc.JSON) - if err != nil { - t.Fatalf("[%d] err: %s", i, err) - } - - if !reflect.DeepEqual(tc.Out, tc.Expected) { - t.Fatalf("[%d]\ngot: %s\nexpected: %s\n", i, spew.Sdump(tc.Out), spew.Sdump(tc.Expected)) - } - } -} diff --git a/vendor/github.com/hashicorp/hcl/hcl.go b/vendor/github.com/hashicorp/hcl/hcl.go deleted file mode 100644 index 575a20b50..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl.go +++ /dev/null @@ -1,11 +0,0 @@ -// Package hcl decodes HCL into usable Go structures. -// -// hcl input can come in either pure HCL format or JSON format. -// It can be parsed into an AST, and then decoded into a structure, -// or it can be decoded directly from a string into a structure. -// -// If you choose to parse HCL into a raw AST, the benefit is that you -// can write custom visitor implementations to implement custom -// semantic checks. By default, HCL does not perform any semantic -// checks. -package hcl diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go deleted file mode 100644 index 6e5ef654b..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast.go +++ /dev/null @@ -1,219 +0,0 @@ -// Package ast declares the types used to represent syntax trees for HCL -// (HashiCorp Configuration Language) -package ast - -import ( - "fmt" - "strings" - - "github.com/hashicorp/hcl/hcl/token" -) - -// Node is an element in the abstract syntax tree. -type Node interface { - node() - Pos() token.Pos -} - -func (File) node() {} -func (ObjectList) node() {} -func (ObjectKey) node() {} -func (ObjectItem) node() {} -func (Comment) node() {} -func (CommentGroup) node() {} -func (ObjectType) node() {} -func (LiteralType) node() {} -func (ListType) node() {} - -// File represents a single HCL file -type File struct { - Node Node // usually a *ObjectList - Comments []*CommentGroup // list of all comments in the source -} - -func (f *File) Pos() token.Pos { - return f.Node.Pos() -} - -// ObjectList represents a list of ObjectItems. An HCL file itself is an -// ObjectList. -type ObjectList struct { - Items []*ObjectItem -} - -func (o *ObjectList) Add(item *ObjectItem) { - o.Items = append(o.Items, item) -} - -// Filter filters out the objects with the given key list as a prefix. -// -// The returned list of objects contain ObjectItems where the keys have -// this prefix already stripped off. This might result in objects with -// zero-length key lists if they have no children. -// -// If no matches are found, an empty ObjectList (non-nil) is returned. -func (o *ObjectList) Filter(keys ...string) *ObjectList { - var result ObjectList - for _, item := range o.Items { - // If there aren't enough keys, then ignore this - if len(item.Keys) < len(keys) { - continue - } - - match := true - for i, key := range item.Keys[:len(keys)] { - key := key.Token.Value().(string) - if key != keys[i] && !strings.EqualFold(key, keys[i]) { - match = false - break - } - } - if !match { - continue - } - - // Strip off the prefix from the children - newItem := *item - newItem.Keys = newItem.Keys[len(keys):] - result.Add(&newItem) - } - - return &result -} - -// Children returns further nested objects (key length > 0) within this -// ObjectList. This should be used with Filter to get at child items. -func (o *ObjectList) Children() *ObjectList { - var result ObjectList - for _, item := range o.Items { - if len(item.Keys) > 0 { - result.Add(item) - } - } - - return &result -} - -// Elem returns items in the list that are direct element assignments -// (key length == 0). This should be used with Filter to get at elements. -func (o *ObjectList) Elem() *ObjectList { - var result ObjectList - for _, item := range o.Items { - if len(item.Keys) == 0 { - result.Add(item) - } - } - - return &result -} - -func (o *ObjectList) Pos() token.Pos { - // always returns the uninitiliazed position - return o.Items[0].Pos() -} - -// ObjectItem represents a HCL Object Item. An item is represented with a key -// (or keys). It can be an assignment or an object (both normal and nested) -type ObjectItem struct { - // keys is only one length long if it's of type assignment. If it's a - // nested object it can be larger than one. In that case "assign" is - // invalid as there is no assignments for a nested object. - Keys []*ObjectKey - - // assign contains the position of "=", if any - Assign token.Pos - - // val is the item itself. It can be an object,list, number, bool or a - // string. If key length is larger than one, val can be only of type - // Object. - Val Node - - LeadComment *CommentGroup // associated lead comment - LineComment *CommentGroup // associated line comment -} - -func (o *ObjectItem) Pos() token.Pos { - // I'm not entirely sure what causes this, but removing this causes - // a test failure. We should investigate at some point. - if len(o.Keys) == 0 { - return token.Pos{} - } - - return o.Keys[0].Pos() -} - -// ObjectKeys are either an identifier or of type string. -type ObjectKey struct { - Token token.Token -} - -func (o *ObjectKey) Pos() token.Pos { - return o.Token.Pos -} - -// LiteralType represents a literal of basic type. Valid types are: -// token.NUMBER, token.FLOAT, token.BOOL and token.STRING -type LiteralType struct { - Token token.Token - - // comment types, only used when in a list - LeadComment *CommentGroup - LineComment *CommentGroup -} - -func (l *LiteralType) Pos() token.Pos { - return l.Token.Pos -} - -// ListStatement represents a HCL List type -type ListType struct { - Lbrack token.Pos // position of "[" - Rbrack token.Pos // position of "]" - List []Node // the elements in lexical order -} - -func (l *ListType) Pos() token.Pos { - return l.Lbrack -} - -func (l *ListType) Add(node Node) { - l.List = append(l.List, node) -} - -// ObjectType represents a HCL Object Type -type ObjectType struct { - Lbrace token.Pos // position of "{" - Rbrace token.Pos // position of "}" - List *ObjectList // the nodes in lexical order -} - -func (o *ObjectType) Pos() token.Pos { - return o.Lbrace -} - -// Comment node represents a single //, # style or /*- style commment -type Comment struct { - Start token.Pos // position of / or # - Text string -} - -func (c *Comment) Pos() token.Pos { - return c.Start -} - -// CommentGroup node represents a sequence of comments with no other tokens and -// no empty lines between. -type CommentGroup struct { - List []*Comment // len(List) > 0 -} - -func (c *CommentGroup) Pos() token.Pos { - return c.List[0].Pos() -} - -//------------------------------------------------------------------- -// GoStringer -//------------------------------------------------------------------- - -func (o *ObjectKey) GoString() string { return fmt.Sprintf("*%#v", *o) } -func (o *ObjectList) GoString() string { return fmt.Sprintf("*%#v", *o) } diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go b/vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go deleted file mode 100644 index 942256cad..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/ast/ast_test.go +++ /dev/null @@ -1,200 +0,0 @@ -package ast - -import ( - "reflect" - "strings" - "testing" - - "github.com/hashicorp/hcl/hcl/token" -) - -func TestObjectListFilter(t *testing.T) { - var cases = []struct { - Filter []string - Input []*ObjectItem - Output []*ObjectItem - }{ - { - []string{"foo"}, - []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{ - Token: token.Token{Type: token.STRING, Text: `"foo"`}, - }, - }, - }, - }, - []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{}, - }, - }, - }, - - { - []string{"foo"}, - []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}}, - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}}, - }, - }, - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"baz"`}}, - }, - }, - }, - []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}}, - }, - }, - }, - }, - } - - for _, tc := range cases { - input := &ObjectList{Items: tc.Input} - expected := &ObjectList{Items: tc.Output} - if actual := input.Filter(tc.Filter...); !reflect.DeepEqual(actual, expected) { - t.Fatalf("in order: input, expected, actual\n\n%#v\n\n%#v\n\n%#v", input, expected, actual) - } - } -} - -func TestWalk(t *testing.T) { - items := []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}}, - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}}, - }, - Val: &LiteralType{Token: token.Token{Type: token.STRING, Text: `"example"`}}, - }, - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"baz"`}}, - }, - }, - } - - node := &ObjectList{Items: items} - - order := []string{ - "*ast.ObjectList", - "*ast.ObjectItem", - "*ast.ObjectKey", - "*ast.ObjectKey", - "*ast.LiteralType", - "*ast.ObjectItem", - "*ast.ObjectKey", - } - count := 0 - - Walk(node, func(n Node) (Node, bool) { - if n == nil { - return n, false - } - - typeName := reflect.TypeOf(n).String() - if order[count] != typeName { - t.Errorf("expected '%s' got: '%s'", order[count], typeName) - } - count++ - return n, true - }) -} - -func TestWalkEquality(t *testing.T) { - items := []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}}, - }, - }, - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}}, - }, - }, - } - - node := &ObjectList{Items: items} - - rewritten := Walk(node, func(n Node) (Node, bool) { return n, true }) - - newNode, ok := rewritten.(*ObjectList) - if !ok { - t.Fatalf("expected Objectlist, got %T", rewritten) - } - - if !reflect.DeepEqual(node, newNode) { - t.Fatal("rewritten node is not equal to the given node") - } - - if len(newNode.Items) != 2 { - t.Error("expected newNode length 2, got: %d", len(newNode.Items)) - } - - expected := []string{ - `"foo"`, - `"bar"`, - } - - for i, item := range newNode.Items { - if len(item.Keys) != 1 { - t.Error("expected keys newNode length 1, got: %d", len(item.Keys)) - } - - if item.Keys[0].Token.Text != expected[i] { - t.Errorf("expected key %s, got %s", expected[i], item.Keys[0].Token.Text) - } - - if item.Val != nil { - t.Errorf("expected item value should be nil") - } - } -} - -func TestWalkRewrite(t *testing.T) { - items := []*ObjectItem{ - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"foo"`}}, - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"bar"`}}, - }, - }, - &ObjectItem{ - Keys: []*ObjectKey{ - &ObjectKey{Token: token.Token{Type: token.STRING, Text: `"baz"`}}, - }, - }, - } - - node := &ObjectList{Items: items} - - suffix := "_example" - node = Walk(node, func(n Node) (Node, bool) { - switch i := n.(type) { - case *ObjectKey: - i.Token.Text = i.Token.Text + suffix - n = i - } - return n, true - }).(*ObjectList) - - Walk(node, func(n Node) (Node, bool) { - switch i := n.(type) { - case *ObjectKey: - if !strings.HasSuffix(i.Token.Text, suffix) { - t.Errorf("Token '%s' should have suffix: %s", i.Token.Text, suffix) - } - } - return n, true - }) - -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go b/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go deleted file mode 100644 index ba07ad42b..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/ast/walk.go +++ /dev/null @@ -1,52 +0,0 @@ -package ast - -import "fmt" - -// WalkFunc describes a function to be called for each node during a Walk. The -// returned node can be used to rewrite the AST. Walking stops the returned -// bool is false. -type WalkFunc func(Node) (Node, bool) - -// Walk traverses an AST in depth-first order: It starts by calling fn(node); -// node must not be nil. If fn returns true, Walk invokes fn recursively for -// each of the non-nil children of node, followed by a call of fn(nil). The -// returned node of fn can be used to rewrite the passed node to fn. -func Walk(node Node, fn WalkFunc) Node { - rewritten, ok := fn(node) - if !ok { - return rewritten - } - - switch n := node.(type) { - case *File: - n.Node = Walk(n.Node, fn) - case *ObjectList: - for i, item := range n.Items { - n.Items[i] = Walk(item, fn).(*ObjectItem) - } - case *ObjectKey: - // nothing to do - case *ObjectItem: - for i, k := range n.Keys { - n.Keys[i] = Walk(k, fn).(*ObjectKey) - } - - if n.Val != nil { - n.Val = Walk(n.Val, fn) - } - case *LiteralType: - // nothing to do - case *ListType: - for i, l := range n.List { - n.List[i] = Walk(l, fn) - } - case *ObjectType: - n.List = Walk(n.List, fn).(*ObjectList) - default: - // should we panic here? - fmt.Printf("unknown type: %T\n", n) - } - - fn(nil) - return rewritten -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error.go deleted file mode 100644 index 5c99381df..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/error.go +++ /dev/null @@ -1,17 +0,0 @@ -package parser - -import ( - "fmt" - - "github.com/hashicorp/hcl/hcl/token" -) - -// PosError is a parse error that contains a position. -type PosError struct { - Pos token.Pos - Err error -} - -func (e *PosError) Error() string { - return fmt.Sprintf("At %s: %s", e.Pos, e.Err) -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go b/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go deleted file mode 100644 index 32399fec5..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package parser - -import ( - "testing" -) - -func TestPosError_impl(t *testing.T) { - var _ error = new(PosError) -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go deleted file mode 100644 index 098e1bc49..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go +++ /dev/null @@ -1,526 +0,0 @@ -// Package parser implements a parser for HCL (HashiCorp Configuration -// Language) -package parser - -import ( - "bytes" - "errors" - "fmt" - "strings" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/scanner" - "github.com/hashicorp/hcl/hcl/token" -) - -type Parser struct { - sc *scanner.Scanner - - // Last read token - tok token.Token - commaPrev token.Token - - comments []*ast.CommentGroup - leadComment *ast.CommentGroup // last lead comment - lineComment *ast.CommentGroup // last line comment - - enableTrace bool - indent int - n int // buffer size (max = 1) -} - -func newParser(src []byte) *Parser { - return &Parser{ - sc: scanner.New(src), - } -} - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func Parse(src []byte) (*ast.File, error) { - // normalize all line endings - // since the scanner and output only work with "\n" line endings, we may - // end up with dangling "\r" characters in the parsed data. - src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1) - - p := newParser(src) - return p.Parse() -} - -var errEofToken = errors.New("EOF token found") - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func (p *Parser) Parse() (*ast.File, error) { - f := &ast.File{} - var err, scerr error - p.sc.Error = func(pos token.Pos, msg string) { - scerr = &PosError{Pos: pos, Err: errors.New(msg)} - } - - f.Node, err = p.objectList(false) - if scerr != nil { - return nil, scerr - } - if err != nil { - return nil, err - } - - f.Comments = p.comments - return f, nil -} - -// objectList parses a list of items within an object (generally k/v pairs). -// The parameter" obj" tells this whether to we are within an object (braces: -// '{', '}') or just at the top level. If we're within an object, we end -// at an RBRACE. -func (p *Parser) objectList(obj bool) (*ast.ObjectList, error) { - defer un(trace(p, "ParseObjectList")) - node := &ast.ObjectList{} - - for { - if obj { - tok := p.scan() - p.unscan() - if tok.Type == token.RBRACE { - break - } - } - - n, err := p.objectItem() - if err == errEofToken { - break // we are finished - } - - // we don't return a nil node, because might want to use already - // collected items. - if err != nil { - return node, err - } - - node.Add(n) - - // object lists can be optionally comma-delimited e.g. when a list of maps - // is being expressed, so a comma is allowed here - it's simply consumed - tok := p.scan() - if tok.Type != token.COMMA { - p.unscan() - } - } - return node, nil -} - -func (p *Parser) consumeComment() (comment *ast.Comment, endline int) { - endline = p.tok.Pos.Line - - // count the endline if it's multiline comment, ie starting with /* - if len(p.tok.Text) > 1 && p.tok.Text[1] == '*' { - // don't use range here - no need to decode Unicode code points - for i := 0; i < len(p.tok.Text); i++ { - if p.tok.Text[i] == '\n' { - endline++ - } - } - } - - comment = &ast.Comment{Start: p.tok.Pos, Text: p.tok.Text} - p.tok = p.sc.Scan() - return -} - -func (p *Parser) consumeCommentGroup(n int) (comments *ast.CommentGroup, endline int) { - var list []*ast.Comment - endline = p.tok.Pos.Line - - for p.tok.Type == token.COMMENT && p.tok.Pos.Line <= endline+n { - var comment *ast.Comment - comment, endline = p.consumeComment() - list = append(list, comment) - } - - // add comment group to the comments list - comments = &ast.CommentGroup{List: list} - p.comments = append(p.comments, comments) - - return -} - -// objectItem parses a single object item -func (p *Parser) objectItem() (*ast.ObjectItem, error) { - defer un(trace(p, "ParseObjectItem")) - - keys, err := p.objectKey() - if len(keys) > 0 && err == errEofToken { - // We ignore eof token here since it is an error if we didn't - // receive a value (but we did receive a key) for the item. - err = nil - } - if len(keys) > 0 && err != nil && p.tok.Type == token.RBRACE { - // This is a strange boolean statement, but what it means is: - // We have keys with no value, and we're likely in an object - // (since RBrace ends an object). For this, we set err to nil so - // we continue and get the error below of having the wrong value - // type. - err = nil - - // Reset the token type so we don't think it completed fine. See - // objectType which uses p.tok.Type to check if we're done with - // the object. - p.tok.Type = token.EOF - } - if err != nil { - return nil, err - } - - o := &ast.ObjectItem{ - Keys: keys, - } - - if p.leadComment != nil { - o.LeadComment = p.leadComment - p.leadComment = nil - } - - switch p.tok.Type { - case token.ASSIGN: - o.Assign = p.tok.Pos - o.Val, err = p.object() - if err != nil { - return nil, err - } - case token.LBRACE: - o.Val, err = p.objectType() - if err != nil { - return nil, err - } - default: - keyStr := make([]string, 0, len(keys)) - for _, k := range keys { - keyStr = append(keyStr, k.Token.Text) - } - - return nil, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf( - "key '%s' expected start of object ('{') or assignment ('=')", - strings.Join(keyStr, " ")), - } - } - - // do a look-ahead for line comment - p.scan() - if len(keys) > 0 && o.Val.Pos().Line == keys[0].Pos().Line && p.lineComment != nil { - o.LineComment = p.lineComment - p.lineComment = nil - } - p.unscan() - return o, nil -} - -// objectKey parses an object key and returns a ObjectKey AST -func (p *Parser) objectKey() ([]*ast.ObjectKey, error) { - keyCount := 0 - keys := make([]*ast.ObjectKey, 0) - - for { - tok := p.scan() - switch tok.Type { - case token.EOF: - // It is very important to also return the keys here as well as - // the error. This is because we need to be able to tell if we - // did parse keys prior to finding the EOF, or if we just found - // a bare EOF. - return keys, errEofToken - case token.ASSIGN: - // assignment or object only, but not nested objects. this is not - // allowed: `foo bar = {}` - if keyCount > 1 { - return nil, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("nested object expected: LBRACE got: %s", p.tok.Type), - } - } - - if keyCount == 0 { - return nil, &PosError{ - Pos: p.tok.Pos, - Err: errors.New("no object keys found!"), - } - } - - return keys, nil - case token.LBRACE: - var err error - - // If we have no keys, then it is a syntax error. i.e. {{}} is not - // allowed. - if len(keys) == 0 { - err = &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("expected: IDENT | STRING got: %s", p.tok.Type), - } - } - - // object - return keys, err - case token.IDENT, token.STRING: - keyCount++ - keys = append(keys, &ast.ObjectKey{Token: p.tok}) - case token.ILLEGAL: - return keys, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("illegal character"), - } - default: - return keys, &PosError{ - Pos: p.tok.Pos, - Err: fmt.Errorf("expected: IDENT | STRING | ASSIGN | LBRACE got: %s", p.tok.Type), - } - } - } -} - -// object parses any type of object, such as number, bool, string, object or -// list. -func (p *Parser) object() (ast.Node, error) { - defer un(trace(p, "ParseType")) - tok := p.scan() - - switch tok.Type { - case token.NUMBER, token.FLOAT, token.BOOL, token.STRING, token.HEREDOC: - return p.literalType() - case token.LBRACE: - return p.objectType() - case token.LBRACK: - return p.listType() - case token.COMMENT: - // implement comment - case token.EOF: - return nil, errEofToken - } - - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf("Unknown token: %+v", tok), - } -} - -// objectType parses an object type and returns a ObjectType AST -func (p *Parser) objectType() (*ast.ObjectType, error) { - defer un(trace(p, "ParseObjectType")) - - // we assume that the currently scanned token is a LBRACE - o := &ast.ObjectType{ - Lbrace: p.tok.Pos, - } - - l, err := p.objectList(true) - - // if we hit RBRACE, we are good to go (means we parsed all Items), if it's - // not a RBRACE, it's an syntax error and we just return it. - if err != nil && p.tok.Type != token.RBRACE { - return nil, err - } - - // No error, scan and expect the ending to be a brace - if tok := p.scan(); tok.Type != token.RBRACE { - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf("object expected closing RBRACE got: %s", tok.Type), - } - } - - o.List = l - o.Rbrace = p.tok.Pos // advanced via parseObjectList - return o, nil -} - -// listType parses a list type and returns a ListType AST -func (p *Parser) listType() (*ast.ListType, error) { - defer un(trace(p, "ParseListType")) - - // we assume that the currently scanned token is a LBRACK - l := &ast.ListType{ - Lbrack: p.tok.Pos, - } - - needComma := false - for { - tok := p.scan() - if needComma { - switch tok.Type { - case token.COMMA, token.RBRACK: - default: - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf( - "error parsing list, expected comma or list end, got: %s", - tok.Type), - } - } - } - switch tok.Type { - case token.BOOL, token.NUMBER, token.FLOAT, token.STRING, token.HEREDOC: - node, err := p.literalType() - if err != nil { - return nil, err - } - - // If there is a lead comment, apply it - if p.leadComment != nil { - node.LeadComment = p.leadComment - p.leadComment = nil - } - - l.Add(node) - needComma = true - case token.COMMA: - // get next list item or we are at the end - // do a look-ahead for line comment - p.scan() - if p.lineComment != nil && len(l.List) > 0 { - lit, ok := l.List[len(l.List)-1].(*ast.LiteralType) - if ok { - lit.LineComment = p.lineComment - l.List[len(l.List)-1] = lit - p.lineComment = nil - } - } - p.unscan() - - needComma = false - continue - case token.LBRACE: - // Looks like a nested object, so parse it out - node, err := p.objectType() - if err != nil { - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf( - "error while trying to parse object within list: %s", err), - } - } - l.Add(node) - needComma = true - case token.LBRACK: - node, err := p.listType() - if err != nil { - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf( - "error while trying to parse list within list: %s", err), - } - } - l.Add(node) - case token.RBRACK: - // finished - l.Rbrack = p.tok.Pos - return l, nil - default: - return nil, &PosError{ - Pos: tok.Pos, - Err: fmt.Errorf("unexpected token while parsing list: %s", tok.Type), - } - } - } -} - -// literalType parses a literal type and returns a LiteralType AST -func (p *Parser) literalType() (*ast.LiteralType, error) { - defer un(trace(p, "ParseLiteral")) - - return &ast.LiteralType{ - Token: p.tok, - }, nil -} - -// scan returns the next token from the underlying scanner. If a token has -// been unscanned then read that instead. In the process, it collects any -// comment groups encountered, and remembers the last lead and line comments. -func (p *Parser) scan() token.Token { - // If we have a token on the buffer, then return it. - if p.n != 0 { - p.n = 0 - return p.tok - } - - // Otherwise read the next token from the scanner and Save it to the buffer - // in case we unscan later. - prev := p.tok - p.tok = p.sc.Scan() - - if p.tok.Type == token.COMMENT { - var comment *ast.CommentGroup - var endline int - - // fmt.Printf("p.tok.Pos.Line = %+v prev: %d endline %d \n", - // p.tok.Pos.Line, prev.Pos.Line, endline) - if p.tok.Pos.Line == prev.Pos.Line { - // The comment is on same line as the previous token; it - // cannot be a lead comment but may be a line comment. - comment, endline = p.consumeCommentGroup(0) - if p.tok.Pos.Line != endline { - // The next token is on a different line, thus - // the last comment group is a line comment. - p.lineComment = comment - } - } - - // consume successor comments, if any - endline = -1 - for p.tok.Type == token.COMMENT { - comment, endline = p.consumeCommentGroup(1) - } - - if endline+1 == p.tok.Pos.Line && p.tok.Type != token.RBRACE { - switch p.tok.Type { - case token.RBRACE, token.RBRACK: - // Do not count for these cases - default: - // The next token is following on the line immediately after the - // comment group, thus the last comment group is a lead comment. - p.leadComment = comment - } - } - - } - - return p.tok -} - -// unscan pushes the previously read token back onto the buffer. -func (p *Parser) unscan() { - p.n = 1 -} - -// ---------------------------------------------------------------------------- -// Parsing support - -func (p *Parser) printTrace(a ...interface{}) { - if !p.enableTrace { - return - } - - const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " - const n = len(dots) - fmt.Printf("%5d:%3d: ", p.tok.Pos.Line, p.tok.Pos.Column) - - i := 2 * p.indent - for i > n { - fmt.Print(dots) - i -= n - } - // i <= n - fmt.Print(dots[0:i]) - fmt.Println(a...) -} - -func trace(p *Parser, msg string) *Parser { - p.printTrace(msg, "(") - p.indent++ - return p -} - -// Usage pattern: defer un(trace(p, "...")) -func un(p *Parser) { - p.indent-- - p.printTrace(")") -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go deleted file mode 100644 index 270212207..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser_test.go +++ /dev/null @@ -1,575 +0,0 @@ -package parser - -import ( - "fmt" - "io/ioutil" - "path/filepath" - "reflect" - "runtime" - "strings" - "testing" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/token" -) - -func TestType(t *testing.T) { - var literals = []struct { - typ token.Type - src string - }{ - {token.STRING, `foo = "foo"`}, - {token.NUMBER, `foo = 123`}, - {token.NUMBER, `foo = -29`}, - {token.FLOAT, `foo = 123.12`}, - {token.FLOAT, `foo = -123.12`}, - {token.BOOL, `foo = true`}, - {token.HEREDOC, "foo = < 0 { - s.err("unexpected null character (0x00)") - return eof - } - - // debug - // fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column) - return ch -} - -// unread unreads the previous read Rune and updates the source position -func (s *Scanner) unread() { - if err := s.buf.UnreadRune(); err != nil { - panic(err) // this is user fault, we should catch it - } - s.srcPos = s.prevPos // put back last position -} - -// peek returns the next rune without advancing the reader. -func (s *Scanner) peek() rune { - peek, _, err := s.buf.ReadRune() - if err != nil { - return eof - } - - s.buf.UnreadRune() - return peek -} - -// Scan scans the next token and returns the token. -func (s *Scanner) Scan() token.Token { - ch := s.next() - - // skip white space - for isWhitespace(ch) { - ch = s.next() - } - - var tok token.Type - - // token text markings - s.tokStart = s.srcPos.Offset - s.lastCharLen - - // token position, initial next() is moving the offset by one(size of rune - // actually), though we are interested with the starting point - s.tokPos.Offset = s.srcPos.Offset - s.lastCharLen - if s.srcPos.Column > 0 { - // common case: last character was not a '\n' - s.tokPos.Line = s.srcPos.Line - s.tokPos.Column = s.srcPos.Column - } else { - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - s.tokPos.Line = s.srcPos.Line - 1 - s.tokPos.Column = s.lastLineLen - } - - switch { - case isLetter(ch): - tok = token.IDENT - lit := s.scanIdentifier() - if lit == "true" || lit == "false" { - tok = token.BOOL - } - case isDecimal(ch): - tok = s.scanNumber(ch) - default: - switch ch { - case eof: - tok = token.EOF - case '"': - tok = token.STRING - s.scanString() - case '#', '/': - tok = token.COMMENT - s.scanComment(ch) - case '.': - tok = token.PERIOD - ch = s.peek() - if isDecimal(ch) { - tok = token.FLOAT - ch = s.scanMantissa(ch) - ch = s.scanExponent(ch) - } - case '<': - tok = token.HEREDOC - s.scanHeredoc() - case '[': - tok = token.LBRACK - case ']': - tok = token.RBRACK - case '{': - tok = token.LBRACE - case '}': - tok = token.RBRACE - case ',': - tok = token.COMMA - case '=': - tok = token.ASSIGN - case '+': - tok = token.ADD - case '-': - if isDecimal(s.peek()) { - ch := s.next() - tok = s.scanNumber(ch) - } else { - tok = token.SUB - } - default: - s.err("illegal char") - } - } - - // finish token ending - s.tokEnd = s.srcPos.Offset - - // create token literal - var tokenText string - if s.tokStart >= 0 { - tokenText = string(s.src[s.tokStart:s.tokEnd]) - } - s.tokStart = s.tokEnd // ensure idempotency of tokenText() call - - return token.Token{ - Type: tok, - Pos: s.tokPos, - Text: tokenText, - } -} - -func (s *Scanner) scanComment(ch rune) { - // single line comments - if ch == '#' || (ch == '/' && s.peek() != '*') { - if ch == '/' && s.peek() != '/' { - s.err("expected '/' for comment") - return - } - - ch = s.next() - for ch != '\n' && ch >= 0 && ch != eof { - ch = s.next() - } - if ch != eof && ch >= 0 { - s.unread() - } - return - } - - // be sure we get the character after /* This allows us to find comment's - // that are not erminated - if ch == '/' { - s.next() - ch = s.next() // read character after "/*" - } - - // look for /* - style comments - for { - if ch < 0 || ch == eof { - s.err("comment not terminated") - break - } - - ch0 := ch - ch = s.next() - if ch0 == '*' && ch == '/' { - break - } - } -} - -// scanNumber scans a HCL number definition starting with the given rune -func (s *Scanner) scanNumber(ch rune) token.Type { - if ch == '0' { - // check for hexadecimal, octal or float - ch = s.next() - if ch == 'x' || ch == 'X' { - // hexadecimal - ch = s.next() - found := false - for isHexadecimal(ch) { - ch = s.next() - found = true - } - - if !found { - s.err("illegal hexadecimal number") - } - - if ch != eof { - s.unread() - } - - return token.NUMBER - } - - // now it's either something like: 0421(octal) or 0.1231(float) - illegalOctal := false - for isDecimal(ch) { - ch = s.next() - if ch == '8' || ch == '9' { - // this is just a possibility. For example 0159 is illegal, but - // 0159.23 is valid. So we mark a possible illegal octal. If - // the next character is not a period, we'll print the error. - illegalOctal = true - } - } - - if ch == 'e' || ch == 'E' { - ch = s.scanExponent(ch) - return token.FLOAT - } - - if ch == '.' { - ch = s.scanFraction(ch) - - if ch == 'e' || ch == 'E' { - ch = s.next() - ch = s.scanExponent(ch) - } - return token.FLOAT - } - - if illegalOctal { - s.err("illegal octal number") - } - - if ch != eof { - s.unread() - } - return token.NUMBER - } - - s.scanMantissa(ch) - ch = s.next() // seek forward - if ch == 'e' || ch == 'E' { - ch = s.scanExponent(ch) - return token.FLOAT - } - - if ch == '.' { - ch = s.scanFraction(ch) - if ch == 'e' || ch == 'E' { - ch = s.next() - ch = s.scanExponent(ch) - } - return token.FLOAT - } - - if ch != eof { - s.unread() - } - return token.NUMBER -} - -// scanMantissa scans the mantissa begining from the rune. It returns the next -// non decimal rune. It's used to determine wheter it's a fraction or exponent. -func (s *Scanner) scanMantissa(ch rune) rune { - scanned := false - for isDecimal(ch) { - ch = s.next() - scanned = true - } - - if scanned && ch != eof { - s.unread() - } - return ch -} - -// scanFraction scans the fraction after the '.' rune -func (s *Scanner) scanFraction(ch rune) rune { - if ch == '.' { - ch = s.peek() // we peek just to see if we can move forward - ch = s.scanMantissa(ch) - } - return ch -} - -// scanExponent scans the remaining parts of an exponent after the 'e' or 'E' -// rune. -func (s *Scanner) scanExponent(ch rune) rune { - if ch == 'e' || ch == 'E' { - ch = s.next() - if ch == '-' || ch == '+' { - ch = s.next() - } - ch = s.scanMantissa(ch) - } - return ch -} - -// scanHeredoc scans a heredoc string -func (s *Scanner) scanHeredoc() { - // Scan the second '<' in example: '<= len(identBytes) && identRegexp.Match(s.src[lineStart:s.srcPos.Offset-s.lastCharLen]) { - break - } - - // Not an anchor match, record the start of a new line - lineStart = s.srcPos.Offset - } - - if ch == eof { - s.err("heredoc not terminated") - return - } - } - - return -} - -// scanString scans a quoted string -func (s *Scanner) scanString() { - braces := 0 - for { - // '"' opening already consumed - // read character after quote - ch := s.next() - - if (ch == '\n' && braces == 0) || ch < 0 || ch == eof { - s.err("literal not terminated") - return - } - - if ch == '"' && braces == 0 { - break - } - - // If we're going into a ${} then we can ignore quotes for awhile - if braces == 0 && ch == '$' && s.peek() == '{' { - braces++ - s.next() - } else if braces > 0 && ch == '{' { - braces++ - } - if braces > 0 && ch == '}' { - braces-- - } - - if ch == '\\' { - s.scanEscape() - } - } - - return -} - -// scanEscape scans an escape sequence -func (s *Scanner) scanEscape() rune { - // http://en.cppreference.com/w/cpp/language/escape - ch := s.next() // read character after '/' - switch ch { - case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', '"': - // nothing to do - case '0', '1', '2', '3', '4', '5', '6', '7': - // octal notation - ch = s.scanDigits(ch, 8, 3) - case 'x': - // hexademical notation - ch = s.scanDigits(s.next(), 16, 2) - case 'u': - // universal character name - ch = s.scanDigits(s.next(), 16, 4) - case 'U': - // universal character name - ch = s.scanDigits(s.next(), 16, 8) - default: - s.err("illegal char escape") - } - return ch -} - -// scanDigits scans a rune with the given base for n times. For example an -// octal notation \184 would yield in scanDigits(ch, 8, 3) -func (s *Scanner) scanDigits(ch rune, base, n int) rune { - start := n - for n > 0 && digitVal(ch) < base { - ch = s.next() - if ch == eof { - // If we see an EOF, we halt any more scanning of digits - // immediately. - break - } - - n-- - } - if n > 0 { - s.err("illegal char escape") - } - - if n != start { - // we scanned all digits, put the last non digit char back, - // only if we read anything at all - s.unread() - } - - return ch -} - -// scanIdentifier scans an identifier and returns the literal string -func (s *Scanner) scanIdentifier() string { - offs := s.srcPos.Offset - s.lastCharLen - ch := s.next() - for isLetter(ch) || isDigit(ch) || ch == '-' || ch == '.' { - ch = s.next() - } - - if ch != eof { - s.unread() // we got identifier, put back latest char - } - - return string(s.src[offs:s.srcPos.Offset]) -} - -// recentPosition returns the position of the character immediately after the -// character or token returned by the last call to Scan. -func (s *Scanner) recentPosition() (pos token.Pos) { - pos.Offset = s.srcPos.Offset - s.lastCharLen - switch { - case s.srcPos.Column > 0: - // common case: last character was not a '\n' - pos.Line = s.srcPos.Line - pos.Column = s.srcPos.Column - case s.lastLineLen > 0: - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - pos.Line = s.srcPos.Line - 1 - pos.Column = s.lastLineLen - default: - // at the beginning of the source - pos.Line = 1 - pos.Column = 1 - } - return -} - -// err prints the error of any scanning to s.Error function. If the function is -// not defined, by default it prints them to os.Stderr -func (s *Scanner) err(msg string) { - s.ErrorCount++ - pos := s.recentPosition() - - if s.Error != nil { - s.Error(pos, msg) - return - } - - fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg) -} - -// isHexadecimal returns true if the given rune is a letter -func isLetter(ch rune) bool { - return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch) -} - -// isDigit returns true if the given rune is a decimal digit -func isDigit(ch rune) bool { - return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch) -} - -// isDecimal returns true if the given rune is a decimal number -func isDecimal(ch rune) bool { - return '0' <= ch && ch <= '9' -} - -// isHexadecimal returns true if the given rune is an hexadecimal number -func isHexadecimal(ch rune) bool { - return '0' <= ch && ch <= '9' || 'a' <= ch && ch <= 'f' || 'A' <= ch && ch <= 'F' -} - -// isWhitespace returns true if the rune is a space, tab, newline or carriage return -func isWhitespace(ch rune) bool { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' -} - -// digitVal returns the integer value of a given octal,decimal or hexadecimal rune -func digitVal(ch rune) int { - switch { - case '0' <= ch && ch <= '9': - return int(ch - '0') - case 'a' <= ch && ch <= 'f': - return int(ch - 'a' + 10) - case 'A' <= ch && ch <= 'F': - return int(ch - 'A' + 10) - } - return 16 // larger than any legal digit val -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go b/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go deleted file mode 100644 index 4f2c9cbe0..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/scanner/scanner_test.go +++ /dev/null @@ -1,591 +0,0 @@ -package scanner - -import ( - "bytes" - "fmt" - "testing" - - "strings" - - "github.com/hashicorp/hcl/hcl/token" -) - -var f100 = strings.Repeat("f", 100) - -type tokenPair struct { - tok token.Type - text string -} - -var tokenLists = map[string][]tokenPair{ - "comment": []tokenPair{ - {token.COMMENT, "//"}, - {token.COMMENT, "////"}, - {token.COMMENT, "// comment"}, - {token.COMMENT, "// /* comment */"}, - {token.COMMENT, "// // comment //"}, - {token.COMMENT, "//" + f100}, - {token.COMMENT, "#"}, - {token.COMMENT, "##"}, - {token.COMMENT, "# comment"}, - {token.COMMENT, "# /* comment */"}, - {token.COMMENT, "# # comment #"}, - {token.COMMENT, "#" + f100}, - {token.COMMENT, "/**/"}, - {token.COMMENT, "/***/"}, - {token.COMMENT, "/* comment */"}, - {token.COMMENT, "/* // comment */"}, - {token.COMMENT, "/* /* comment */"}, - {token.COMMENT, "/*\n comment\n*/"}, - {token.COMMENT, "/*" + f100 + "*/"}, - }, - "operator": []tokenPair{ - {token.LBRACK, "["}, - {token.LBRACE, "{"}, - {token.COMMA, ","}, - {token.PERIOD, "."}, - {token.RBRACK, "]"}, - {token.RBRACE, "}"}, - {token.ASSIGN, "="}, - {token.ADD, "+"}, - {token.SUB, "-"}, - }, - "bool": []tokenPair{ - {token.BOOL, "true"}, - {token.BOOL, "false"}, - }, - "ident": []tokenPair{ - {token.IDENT, "a"}, - {token.IDENT, "a0"}, - {token.IDENT, "foobar"}, - {token.IDENT, "foo-bar"}, - {token.IDENT, "abc123"}, - {token.IDENT, "LGTM"}, - {token.IDENT, "_"}, - {token.IDENT, "_abc123"}, - {token.IDENT, "abc123_"}, - {token.IDENT, "_abc_123_"}, - {token.IDENT, "_äöü"}, - {token.IDENT, "_本"}, - {token.IDENT, "äöü"}, - {token.IDENT, "本"}, - {token.IDENT, "a۰۱۸"}, - {token.IDENT, "foo६४"}, - {token.IDENT, "bar9876"}, - }, - "heredoc": []tokenPair{ - {token.HEREDOC, "< 0 for %q", s.ErrorCount, src) - } -} - -func testTokenList(t *testing.T, tokenList []tokenPair) { - // create artifical source code - buf := new(bytes.Buffer) - for _, ident := range tokenList { - fmt.Fprintf(buf, "%s\n", ident.text) - } - - s := New(buf.Bytes()) - for _, ident := range tokenList { - tok := s.Scan() - if tok.Type != ident.tok { - t.Errorf("tok = %q want %q for %q\n", tok, ident.tok, ident.text) - } - - if tok.Text != ident.text { - t.Errorf("text = %q want %q", tok.String(), ident.text) - } - - } -} - -func countNewlines(s string) int { - n := 0 - for _, ch := range s { - if ch == '\n' { - n++ - } - } - return n -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go b/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go deleted file mode 100644 index 5f981eaa2..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote.go +++ /dev/null @@ -1,241 +0,0 @@ -package strconv - -import ( - "errors" - "unicode/utf8" -) - -// ErrSyntax indicates that a value does not have the right syntax for the target type. -var ErrSyntax = errors.New("invalid syntax") - -// Unquote interprets s as a single-quoted, double-quoted, -// or backquoted Go string literal, returning the string value -// that s quotes. (If s is single-quoted, it would be a Go -// character literal; Unquote returns the corresponding -// one-character string.) -func Unquote(s string) (t string, err error) { - n := len(s) - if n < 2 { - return "", ErrSyntax - } - quote := s[0] - if quote != s[n-1] { - return "", ErrSyntax - } - s = s[1 : n-1] - - if quote != '"' { - return "", ErrSyntax - } - if !contains(s, '$') && !contains(s, '{') && contains(s, '\n') { - return "", ErrSyntax - } - - // Is it trivial? Avoid allocation. - if !contains(s, '\\') && !contains(s, quote) && !contains(s, '$') { - switch quote { - case '"': - return s, nil - case '\'': - r, size := utf8.DecodeRuneInString(s) - if size == len(s) && (r != utf8.RuneError || size != 1) { - return s, nil - } - } - } - - var runeTmp [utf8.UTFMax]byte - buf := make([]byte, 0, 3*len(s)/2) // Try to avoid more allocations. - for len(s) > 0 { - // If we're starting a '${}' then let it through un-unquoted. - // Specifically: we don't unquote any characters within the `${}` - // section. - if s[0] == '$' && len(s) > 1 && s[1] == '{' { - buf = append(buf, '$', '{') - s = s[2:] - - // Continue reading until we find the closing brace, copying as-is - braces := 1 - for len(s) > 0 && braces > 0 { - r, size := utf8.DecodeRuneInString(s) - if r == utf8.RuneError { - return "", ErrSyntax - } - - s = s[size:] - - n := utf8.EncodeRune(runeTmp[:], r) - buf = append(buf, runeTmp[:n]...) - - switch r { - case '{': - braces++ - case '}': - braces-- - } - } - if braces != 0 { - return "", ErrSyntax - } - if len(s) == 0 { - // If there's no string left, we're done! - break - } else { - // If there's more left, we need to pop back up to the top of the loop - // in case there's another interpolation in this string. - continue - } - } - - if s[0] == '\n' { - return "", ErrSyntax - } - - c, multibyte, ss, err := unquoteChar(s, quote) - if err != nil { - return "", err - } - s = ss - if c < utf8.RuneSelf || !multibyte { - buf = append(buf, byte(c)) - } else { - n := utf8.EncodeRune(runeTmp[:], c) - buf = append(buf, runeTmp[:n]...) - } - if quote == '\'' && len(s) != 0 { - // single-quoted must be single character - return "", ErrSyntax - } - } - return string(buf), nil -} - -// contains reports whether the string contains the byte c. -func contains(s string, c byte) bool { - for i := 0; i < len(s); i++ { - if s[i] == c { - return true - } - } - return false -} - -func unhex(b byte) (v rune, ok bool) { - c := rune(b) - switch { - case '0' <= c && c <= '9': - return c - '0', true - case 'a' <= c && c <= 'f': - return c - 'a' + 10, true - case 'A' <= c && c <= 'F': - return c - 'A' + 10, true - } - return -} - -func unquoteChar(s string, quote byte) (value rune, multibyte bool, tail string, err error) { - // easy cases - switch c := s[0]; { - case c == quote && (quote == '\'' || quote == '"'): - err = ErrSyntax - return - case c >= utf8.RuneSelf: - r, size := utf8.DecodeRuneInString(s) - return r, true, s[size:], nil - case c != '\\': - return rune(s[0]), false, s[1:], nil - } - - // hard case: c is backslash - if len(s) <= 1 { - err = ErrSyntax - return - } - c := s[1] - s = s[2:] - - switch c { - case 'a': - value = '\a' - case 'b': - value = '\b' - case 'f': - value = '\f' - case 'n': - value = '\n' - case 'r': - value = '\r' - case 't': - value = '\t' - case 'v': - value = '\v' - case 'x', 'u', 'U': - n := 0 - switch c { - case 'x': - n = 2 - case 'u': - n = 4 - case 'U': - n = 8 - } - var v rune - if len(s) < n { - err = ErrSyntax - return - } - for j := 0; j < n; j++ { - x, ok := unhex(s[j]) - if !ok { - err = ErrSyntax - return - } - v = v<<4 | x - } - s = s[n:] - if c == 'x' { - // single-byte string, possibly not UTF-8 - value = v - break - } - if v > utf8.MaxRune { - err = ErrSyntax - return - } - value = v - multibyte = true - case '0', '1', '2', '3', '4', '5', '6', '7': - v := rune(c) - '0' - if len(s) < 2 { - err = ErrSyntax - return - } - for j := 0; j < 2; j++ { // one digit already; two more - x := rune(s[j]) - '0' - if x < 0 || x > 7 { - err = ErrSyntax - return - } - v = (v << 3) | x - } - s = s[2:] - if v > 255 { - err = ErrSyntax - return - } - value = v - case '\\': - value = '\\' - case '\'', '"': - if c != quote { - err = ErrSyntax - return - } - value = rune(c) - default: - err = ErrSyntax - return - } - tail = s - return -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go b/vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go deleted file mode 100644 index 65be375d9..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/strconv/quote_test.go +++ /dev/null @@ -1,96 +0,0 @@ -package strconv - -import "testing" - -type quoteTest struct { - in string - out string - ascii string -} - -var quotetests = []quoteTest{ - {"\a\b\f\r\n\t\v", `"\a\b\f\r\n\t\v"`, `"\a\b\f\r\n\t\v"`}, - {"\\", `"\\"`, `"\\"`}, - {"abc\xffdef", `"abc\xffdef"`, `"abc\xffdef"`}, - {"\u263a", `"☺"`, `"\u263a"`}, - {"\U0010ffff", `"\U0010ffff"`, `"\U0010ffff"`}, - {"\x04", `"\x04"`, `"\x04"`}, -} - -type unQuoteTest struct { - in string - out string -} - -var unquotetests = []unQuoteTest{ - {`""`, ""}, - {`"a"`, "a"}, - {`"abc"`, "abc"}, - {`"☺"`, "☺"}, - {`"hello world"`, "hello world"}, - {`"\xFF"`, "\xFF"}, - {`"\377"`, "\377"}, - {`"\u1234"`, "\u1234"}, - {`"\U00010111"`, "\U00010111"}, - {`"\U0001011111"`, "\U0001011111"}, - {`"\a\b\f\n\r\t\v\\\""`, "\a\b\f\n\r\t\v\\\""}, - {`"'"`, "'"}, - {`"${file("foo")}"`, `${file("foo")}`}, - {`"${file("\"foo\"")}"`, `${file("\"foo\"")}`}, - {`"echo ${var.region}${element(split(",",var.zones),0)}"`, - `echo ${var.region}${element(split(",",var.zones),0)}`}, - {`"${HH\\:mm\\:ss}"`, `${HH\\:mm\\:ss}`}, - {`"${\n}"`, `${\n}`}, -} - -var misquoted = []string{ - ``, - `"`, - `"a`, - `"'`, - `b"`, - `"\"`, - `"\9"`, - `"\19"`, - `"\129"`, - `'\'`, - `'\9'`, - `'\19'`, - `'\129'`, - `'ab'`, - `"\x1!"`, - `"\U12345678"`, - `"\z"`, - "`", - "`xxx", - "`\"", - `"\'"`, - `'\"'`, - "\"\n\"", - "\"\\n\n\"", - "'\n'", - `"${"`, - `"${foo{}"`, - "\"${foo}\n\"", -} - -func TestUnquote(t *testing.T) { - for _, tt := range unquotetests { - if out, err := Unquote(tt.in); err != nil || out != tt.out { - t.Errorf("Unquote(%#q) = %q, %v want %q, nil", tt.in, out, err, tt.out) - } - } - - // run the quote tests too, backward - for _, tt := range quotetests { - if in, err := Unquote(tt.out); in != tt.in { - t.Errorf("Unquote(%#q) = %q, %v, want %q, nil", tt.out, in, err, tt.in) - } - } - - for _, s := range misquoted { - if out, err := Unquote(s); out != "" || err != ErrSyntax { - t.Errorf("Unquote(%#q) = %q, %v want %q, %v", s, out, err, "", ErrSyntax) - } - } -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/position.go b/vendor/github.com/hashicorp/hcl/hcl/token/position.go deleted file mode 100644 index 59c1bb72d..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/token/position.go +++ /dev/null @@ -1,46 +0,0 @@ -package token - -import "fmt" - -// Pos describes an arbitrary source position -// including the file, line, and column location. -// A Position is valid if the line number is > 0. -type Pos struct { - Filename string // filename, if any - Offset int // offset, starting at 0 - Line int // line number, starting at 1 - Column int // column number, starting at 1 (character count) -} - -// IsValid returns true if the position is valid. -func (p *Pos) IsValid() bool { return p.Line > 0 } - -// String returns a string in one of several forms: -// -// file:line:column valid position with file name -// line:column valid position without file name -// file invalid position with file name -// - invalid position without file name -func (p Pos) String() string { - s := p.Filename - if p.IsValid() { - if s != "" { - s += ":" - } - s += fmt.Sprintf("%d:%d", p.Line, p.Column) - } - if s == "" { - s = "-" - } - return s -} - -// Before reports whether the position p is before u. -func (p Pos) Before(u Pos) bool { - return u.Offset > p.Offset || u.Line > p.Line -} - -// After reports whether the position p is after u. -func (p Pos) After(u Pos) bool { - return u.Offset < p.Offset || u.Line < p.Line -} diff --git a/vendor/github.com/hashicorp/hcl/hcl/token/token.go b/vendor/github.com/hashicorp/hcl/hcl/token/token.go deleted file mode 100644 index e37c0664e..000000000 --- a/vendor/github.com/hashicorp/hcl/hcl/token/token.go +++ /dev/null @@ -1,219 +0,0 @@ -// Package token defines constants representing the lexical tokens for HCL -// (HashiCorp Configuration Language) -package token - -import ( - "fmt" - "strconv" - "strings" - - hclstrconv "github.com/hashicorp/hcl/hcl/strconv" -) - -// Token defines a single HCL token which can be obtained via the Scanner -type Token struct { - Type Type - Pos Pos - Text string - JSON bool -} - -// Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language) -type Type int - -const ( - // Special tokens - ILLEGAL Type = iota - EOF - COMMENT - - identifier_beg - IDENT // literals - literal_beg - NUMBER // 12345 - FLOAT // 123.45 - BOOL // true,false - STRING // "abc" - HEREDOC // < 0 { - // Pop the current item - n := len(frontier) - item := frontier[n-1] - frontier = frontier[:n-1] - - switch v := item.Val.(type) { - case *ast.ObjectType: - items, frontier = flattenObjectType(v, item, items, frontier) - case *ast.ListType: - items, frontier = flattenListType(v, item, items, frontier) - default: - items = append(items, item) - } - } - - // Reverse the list since the frontier model runs things backwards - for i := len(items)/2 - 1; i >= 0; i-- { - opp := len(items) - 1 - i - items[i], items[opp] = items[opp], items[i] - } - - // Done! Set the original items - list.Items = items - return n, true - }) -} - -func flattenListType( - ot *ast.ListType, - item *ast.ObjectItem, - items []*ast.ObjectItem, - frontier []*ast.ObjectItem) ([]*ast.ObjectItem, []*ast.ObjectItem) { - // If the list is empty, keep the original list - if len(ot.List) == 0 { - items = append(items, item) - return items, frontier - } - - // All the elements of this object must also be objects! - for _, subitem := range ot.List { - if _, ok := subitem.(*ast.ObjectType); !ok { - items = append(items, item) - return items, frontier - } - } - - // Great! We have a match go through all the items and flatten - for _, elem := range ot.List { - // Add it to the frontier so that we can recurse - frontier = append(frontier, &ast.ObjectItem{ - Keys: item.Keys, - Assign: item.Assign, - Val: elem, - LeadComment: item.LeadComment, - LineComment: item.LineComment, - }) - } - - return items, frontier -} - -func flattenObjectType( - ot *ast.ObjectType, - item *ast.ObjectItem, - items []*ast.ObjectItem, - frontier []*ast.ObjectItem) ([]*ast.ObjectItem, []*ast.ObjectItem) { - // If the list has no items we do not have to flatten anything - if ot.List.Items == nil { - items = append(items, item) - return items, frontier - } - - // All the elements of this object must also be objects! - for _, subitem := range ot.List.Items { - if _, ok := subitem.Val.(*ast.ObjectType); !ok { - items = append(items, item) - return items, frontier - } - } - - // Great! We have a match go through all the items and flatten - for _, subitem := range ot.List.Items { - // Copy the new key - keys := make([]*ast.ObjectKey, len(item.Keys)+len(subitem.Keys)) - copy(keys, item.Keys) - copy(keys[len(item.Keys):], subitem.Keys) - - // Add it to the frontier so that we can recurse - frontier = append(frontier, &ast.ObjectItem{ - Keys: keys, - Assign: item.Assign, - Val: subitem.Val, - LeadComment: item.LeadComment, - LineComment: item.LineComment, - }) - } - - return items, frontier -} diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser.go b/vendor/github.com/hashicorp/hcl/json/parser/parser.go deleted file mode 100644 index 125a5f072..000000000 --- a/vendor/github.com/hashicorp/hcl/json/parser/parser.go +++ /dev/null @@ -1,313 +0,0 @@ -package parser - -import ( - "errors" - "fmt" - - "github.com/hashicorp/hcl/hcl/ast" - hcltoken "github.com/hashicorp/hcl/hcl/token" - "github.com/hashicorp/hcl/json/scanner" - "github.com/hashicorp/hcl/json/token" -) - -type Parser struct { - sc *scanner.Scanner - - // Last read token - tok token.Token - commaPrev token.Token - - enableTrace bool - indent int - n int // buffer size (max = 1) -} - -func newParser(src []byte) *Parser { - return &Parser{ - sc: scanner.New(src), - } -} - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func Parse(src []byte) (*ast.File, error) { - p := newParser(src) - return p.Parse() -} - -var errEofToken = errors.New("EOF token found") - -// Parse returns the fully parsed source and returns the abstract syntax tree. -func (p *Parser) Parse() (*ast.File, error) { - f := &ast.File{} - var err, scerr error - p.sc.Error = func(pos token.Pos, msg string) { - scerr = fmt.Errorf("%s: %s", pos, msg) - } - - // The root must be an object in JSON - object, err := p.object() - if scerr != nil { - return nil, scerr - } - if err != nil { - return nil, err - } - - // We make our final node an object list so it is more HCL compatible - f.Node = object.List - - // Flatten it, which finds patterns and turns them into more HCL-like - // AST trees. - flattenObjects(f.Node) - - return f, nil -} - -func (p *Parser) objectList() (*ast.ObjectList, error) { - defer un(trace(p, "ParseObjectList")) - node := &ast.ObjectList{} - - for { - n, err := p.objectItem() - if err == errEofToken { - break // we are finished - } - - // we don't return a nil node, because might want to use already - // collected items. - if err != nil { - return node, err - } - - node.Add(n) - - // Check for a followup comma. If it isn't a comma, then we're done - if tok := p.scan(); tok.Type != token.COMMA { - break - } - } - - return node, nil -} - -// objectItem parses a single object item -func (p *Parser) objectItem() (*ast.ObjectItem, error) { - defer un(trace(p, "ParseObjectItem")) - - keys, err := p.objectKey() - if err != nil { - return nil, err - } - - o := &ast.ObjectItem{ - Keys: keys, - } - - switch p.tok.Type { - case token.COLON: - pos := p.tok.Pos - o.Assign = hcltoken.Pos{ - Filename: pos.Filename, - Offset: pos.Offset, - Line: pos.Line, - Column: pos.Column, - } - - o.Val, err = p.objectValue() - if err != nil { - return nil, err - } - } - - return o, nil -} - -// objectKey parses an object key and returns a ObjectKey AST -func (p *Parser) objectKey() ([]*ast.ObjectKey, error) { - keyCount := 0 - keys := make([]*ast.ObjectKey, 0) - - for { - tok := p.scan() - switch tok.Type { - case token.EOF: - return nil, errEofToken - case token.STRING: - keyCount++ - keys = append(keys, &ast.ObjectKey{ - Token: p.tok.HCLToken(), - }) - case token.COLON: - // If we have a zero keycount it means that we never got - // an object key, i.e. `{ :`. This is a syntax error. - if keyCount == 0 { - return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type) - } - - // Done - return keys, nil - case token.ILLEGAL: - return nil, errors.New("illegal") - default: - return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type) - } - } -} - -// object parses any type of object, such as number, bool, string, object or -// list. -func (p *Parser) objectValue() (ast.Node, error) { - defer un(trace(p, "ParseObjectValue")) - tok := p.scan() - - switch tok.Type { - case token.NUMBER, token.FLOAT, token.BOOL, token.NULL, token.STRING: - return p.literalType() - case token.LBRACE: - return p.objectType() - case token.LBRACK: - return p.listType() - case token.EOF: - return nil, errEofToken - } - - return nil, fmt.Errorf("Expected object value, got unknown token: %+v", tok) -} - -// object parses any type of object, such as number, bool, string, object or -// list. -func (p *Parser) object() (*ast.ObjectType, error) { - defer un(trace(p, "ParseType")) - tok := p.scan() - - switch tok.Type { - case token.LBRACE: - return p.objectType() - case token.EOF: - return nil, errEofToken - } - - return nil, fmt.Errorf("Expected object, got unknown token: %+v", tok) -} - -// objectType parses an object type and returns a ObjectType AST -func (p *Parser) objectType() (*ast.ObjectType, error) { - defer un(trace(p, "ParseObjectType")) - - // we assume that the currently scanned token is a LBRACE - o := &ast.ObjectType{} - - l, err := p.objectList() - - // if we hit RBRACE, we are good to go (means we parsed all Items), if it's - // not a RBRACE, it's an syntax error and we just return it. - if err != nil && p.tok.Type != token.RBRACE { - return nil, err - } - - o.List = l - return o, nil -} - -// listType parses a list type and returns a ListType AST -func (p *Parser) listType() (*ast.ListType, error) { - defer un(trace(p, "ParseListType")) - - // we assume that the currently scanned token is a LBRACK - l := &ast.ListType{} - - for { - tok := p.scan() - switch tok.Type { - case token.NUMBER, token.FLOAT, token.STRING: - node, err := p.literalType() - if err != nil { - return nil, err - } - - l.Add(node) - case token.COMMA: - continue - case token.LBRACE: - node, err := p.objectType() - if err != nil { - return nil, err - } - - l.Add(node) - case token.BOOL: - // TODO(arslan) should we support? not supported by HCL yet - case token.LBRACK: - // TODO(arslan) should we support nested lists? Even though it's - // written in README of HCL, it's not a part of the grammar - // (not defined in parse.y) - case token.RBRACK: - // finished - return l, nil - default: - return nil, fmt.Errorf("unexpected token while parsing list: %s", tok.Type) - } - - } -} - -// literalType parses a literal type and returns a LiteralType AST -func (p *Parser) literalType() (*ast.LiteralType, error) { - defer un(trace(p, "ParseLiteral")) - - return &ast.LiteralType{ - Token: p.tok.HCLToken(), - }, nil -} - -// scan returns the next token from the underlying scanner. If a token has -// been unscanned then read that instead. -func (p *Parser) scan() token.Token { - // If we have a token on the buffer, then return it. - if p.n != 0 { - p.n = 0 - return p.tok - } - - p.tok = p.sc.Scan() - return p.tok -} - -// unscan pushes the previously read token back onto the buffer. -func (p *Parser) unscan() { - p.n = 1 -} - -// ---------------------------------------------------------------------------- -// Parsing support - -func (p *Parser) printTrace(a ...interface{}) { - if !p.enableTrace { - return - } - - const dots = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " - const n = len(dots) - fmt.Printf("%5d:%3d: ", p.tok.Pos.Line, p.tok.Pos.Column) - - i := 2 * p.indent - for i > n { - fmt.Print(dots) - i -= n - } - // i <= n - fmt.Print(dots[0:i]) - fmt.Println(a...) -} - -func trace(p *Parser, msg string) *Parser { - p.printTrace(msg, "(") - p.indent++ - return p -} - -// Usage pattern: defer un(trace(p, "...")) -func un(p *Parser) { - p.indent-- - p.printTrace(")") -} diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser_test.go b/vendor/github.com/hashicorp/hcl/json/parser/parser_test.go deleted file mode 100644 index e0cebf50a..000000000 --- a/vendor/github.com/hashicorp/hcl/json/parser/parser_test.go +++ /dev/null @@ -1,384 +0,0 @@ -package parser - -import ( - "fmt" - "io/ioutil" - "path/filepath" - "reflect" - "runtime" - "testing" - - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/token" -) - -func TestType(t *testing.T) { - var literals = []struct { - typ token.Type - src string - }{ - {token.STRING, `"foo": "bar"`}, - {token.NUMBER, `"foo": 123`}, - {token.FLOAT, `"foo": 123.12`}, - {token.FLOAT, `"foo": -123.12`}, - {token.BOOL, `"foo": true`}, - {token.STRING, `"foo": null`}, - } - - for _, l := range literals { - t.Logf("Testing: %s", l.src) - - p := newParser([]byte(l.src)) - item, err := p.objectItem() - if err != nil { - t.Error(err) - } - - lit, ok := item.Val.(*ast.LiteralType) - if !ok { - t.Errorf("node should be of type LiteralType, got: %T", item.Val) - } - - if lit.Token.Type != l.typ { - t.Errorf("want: %s, got: %s", l.typ, lit.Token.Type) - } - } -} - -func TestListType(t *testing.T) { - var literals = []struct { - src string - tokens []token.Type - }{ - { - `"foo": ["123", 123]`, - []token.Type{token.STRING, token.NUMBER}, - }, - { - `"foo": [123, "123",]`, - []token.Type{token.NUMBER, token.STRING}, - }, - { - `"foo": []`, - []token.Type{}, - }, - { - `"foo": ["123", 123]`, - []token.Type{token.STRING, token.NUMBER}, - }, - { - `"foo": ["123", {}]`, - []token.Type{token.STRING, token.LBRACE}, - }, - } - - for _, l := range literals { - t.Logf("Testing: %s", l.src) - - p := newParser([]byte(l.src)) - item, err := p.objectItem() - if err != nil { - t.Error(err) - } - - list, ok := item.Val.(*ast.ListType) - if !ok { - t.Errorf("node should be of type LiteralType, got: %T", item.Val) - } - - tokens := []token.Type{} - for _, li := range list.List { - switch v := li.(type) { - case *ast.LiteralType: - tokens = append(tokens, v.Token.Type) - case *ast.ObjectType: - tokens = append(tokens, token.LBRACE) - } - } - - equals(t, l.tokens, tokens) - } -} - -func TestObjectType(t *testing.T) { - var literals = []struct { - src string - nodeType []ast.Node - itemLen int - }{ - { - `"foo": {}`, - nil, - 0, - }, - { - `"foo": { - "bar": "fatih" - }`, - []ast.Node{&ast.LiteralType{}}, - 1, - }, - { - `"foo": { - "bar": "fatih", - "baz": ["arslan"] - }`, - []ast.Node{ - &ast.LiteralType{}, - &ast.ListType{}, - }, - 2, - }, - { - `"foo": { - "bar": {} - }`, - []ast.Node{ - &ast.ObjectType{}, - }, - 1, - }, - { - `"foo": { - "bar": {}, - "foo": true - }`, - []ast.Node{ - &ast.ObjectType{}, - &ast.LiteralType{}, - }, - 2, - }, - } - - for _, l := range literals { - t.Logf("Testing:\n%s\n", l.src) - - p := newParser([]byte(l.src)) - // p.enableTrace = true - item, err := p.objectItem() - if err != nil { - t.Error(err) - } - - // we know that the ObjectKey name is foo for all cases, what matters - // is the object - obj, ok := item.Val.(*ast.ObjectType) - if !ok { - t.Errorf("node should be of type LiteralType, got: %T", item.Val) - } - - // check if the total length of items are correct - equals(t, l.itemLen, len(obj.List.Items)) - - // check if the types are correct - for i, item := range obj.List.Items { - equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val)) - } - } -} - -func TestFlattenObjects(t *testing.T) { - var literals = []struct { - src string - nodeType []ast.Node - itemLen int - }{ - { - `{ - "foo": [ - { - "foo": "svh", - "bar": "fatih" - } - ] - }`, - []ast.Node{ - &ast.ObjectType{}, - &ast.LiteralType{}, - &ast.LiteralType{}, - }, - 3, - }, - { - `{ - "variable": { - "foo": {} - } - }`, - []ast.Node{ - &ast.ObjectType{}, - }, - 1, - }, - { - `{ - "empty": [] - }`, - []ast.Node{ - &ast.ListType{}, - }, - 1, - }, - { - `{ - "basic": [1, 2, 3] - }`, - []ast.Node{ - &ast.ListType{}, - }, - 1, - }, - } - - for _, l := range literals { - t.Logf("Testing:\n%s\n", l.src) - - f, err := Parse([]byte(l.src)) - if err != nil { - t.Error(err) - } - - // the first object is always an ObjectList so just assert that one - // so we can use it as such - obj, ok := f.Node.(*ast.ObjectList) - if !ok { - t.Errorf("node should be *ast.ObjectList, got: %T", f.Node) - } - - // check if the types are correct - var i int - for _, item := range obj.Items { - equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val)) - i++ - - if obj, ok := item.Val.(*ast.ObjectType); ok { - for _, item := range obj.List.Items { - equals(t, reflect.TypeOf(l.nodeType[i]), reflect.TypeOf(item.Val)) - i++ - } - } - } - - // check if the number of items is correct - equals(t, l.itemLen, i) - - } -} - -func TestObjectKey(t *testing.T) { - keys := []struct { - exp []token.Type - src string - }{ - {[]token.Type{token.STRING}, `"foo": {}`}, - } - - for _, k := range keys { - p := newParser([]byte(k.src)) - keys, err := p.objectKey() - if err != nil { - t.Fatal(err) - } - - tokens := []token.Type{} - for _, o := range keys { - tokens = append(tokens, o.Token.Type) - } - - equals(t, k.exp, tokens) - } - - errKeys := []struct { - src string - }{ - {`foo 12 {}`}, - {`foo bar = {}`}, - {`foo []`}, - {`12 {}`}, - } - - for _, k := range errKeys { - p := newParser([]byte(k.src)) - _, err := p.objectKey() - if err == nil { - t.Errorf("case '%s' should give an error", k.src) - } - } -} - -// Official HCL tests -func TestParse(t *testing.T) { - cases := []struct { - Name string - Err bool - }{ - { - "array.json", - false, - }, - { - "basic.json", - false, - }, - { - "object.json", - false, - }, - { - "types.json", - false, - }, - { - "bad_input_128.json", - true, - }, - { - "bad_input_tf_8110.json", - true, - }, - { - "good_input_tf_8110.json", - false, - }, - } - - const fixtureDir = "./test-fixtures" - - for _, tc := range cases { - d, err := ioutil.ReadFile(filepath.Join(fixtureDir, tc.Name)) - if err != nil { - t.Fatalf("err: %s", err) - } - - _, err = Parse(d) - if (err != nil) != tc.Err { - t.Fatalf("Input: %s\n\nError: %s", tc.Name, err) - } - } -} - -func TestParse_inline(t *testing.T) { - cases := []struct { - Value string - Err bool - }{ - {"{:{", true}, - } - - for _, tc := range cases { - _, err := Parse([]byte(tc.Value)) - if (err != nil) != tc.Err { - t.Fatalf("Input: %q\n\nError: %s", tc.Value, err) - } - } -} - -// equals fails the test if exp is not equal to act. -func equals(tb testing.TB, exp, act interface{}) { - if !reflect.DeepEqual(exp, act) { - _, file, line, _ := runtime.Caller(1) - fmt.Printf("\033[31m%s:%d:\n\n\texp: %s\n\n\tgot: %s\033[39m\n\n", filepath.Base(file), line, exp, act) - tb.FailNow() - } -} diff --git a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go b/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go deleted file mode 100644 index dd5c72bb3..000000000 --- a/vendor/github.com/hashicorp/hcl/json/scanner/scanner.go +++ /dev/null @@ -1,451 +0,0 @@ -package scanner - -import ( - "bytes" - "fmt" - "os" - "unicode" - "unicode/utf8" - - "github.com/hashicorp/hcl/json/token" -) - -// eof represents a marker rune for the end of the reader. -const eof = rune(0) - -// Scanner defines a lexical scanner -type Scanner struct { - buf *bytes.Buffer // Source buffer for advancing and scanning - src []byte // Source buffer for immutable access - - // Source Position - srcPos token.Pos // current position - prevPos token.Pos // previous position, used for peek() method - - lastCharLen int // length of last character in bytes - lastLineLen int // length of last line in characters (for correct column reporting) - - tokStart int // token text start position - tokEnd int // token text end position - - // Error is called for each error encountered. If no Error - // function is set, the error is reported to os.Stderr. - Error func(pos token.Pos, msg string) - - // ErrorCount is incremented by one for each error encountered. - ErrorCount int - - // tokPos is the start position of most recently scanned token; set by - // Scan. The Filename field is always left untouched by the Scanner. If - // an error is reported (via Error) and Position is invalid, the scanner is - // not inside a token. - tokPos token.Pos -} - -// New creates and initializes a new instance of Scanner using src as -// its source content. -func New(src []byte) *Scanner { - // even though we accept a src, we read from a io.Reader compatible type - // (*bytes.Buffer). So in the future we might easily change it to streaming - // read. - b := bytes.NewBuffer(src) - s := &Scanner{ - buf: b, - src: src, - } - - // srcPosition always starts with 1 - s.srcPos.Line = 1 - return s -} - -// next reads the next rune from the bufferred reader. Returns the rune(0) if -// an error occurs (or io.EOF is returned). -func (s *Scanner) next() rune { - ch, size, err := s.buf.ReadRune() - if err != nil { - // advance for error reporting - s.srcPos.Column++ - s.srcPos.Offset += size - s.lastCharLen = size - return eof - } - - if ch == utf8.RuneError && size == 1 { - s.srcPos.Column++ - s.srcPos.Offset += size - s.lastCharLen = size - s.err("illegal UTF-8 encoding") - return ch - } - - // remember last position - s.prevPos = s.srcPos - - s.srcPos.Column++ - s.lastCharLen = size - s.srcPos.Offset += size - - if ch == '\n' { - s.srcPos.Line++ - s.lastLineLen = s.srcPos.Column - s.srcPos.Column = 0 - } - - // debug - // fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column) - return ch -} - -// unread unreads the previous read Rune and updates the source position -func (s *Scanner) unread() { - if err := s.buf.UnreadRune(); err != nil { - panic(err) // this is user fault, we should catch it - } - s.srcPos = s.prevPos // put back last position -} - -// peek returns the next rune without advancing the reader. -func (s *Scanner) peek() rune { - peek, _, err := s.buf.ReadRune() - if err != nil { - return eof - } - - s.buf.UnreadRune() - return peek -} - -// Scan scans the next token and returns the token. -func (s *Scanner) Scan() token.Token { - ch := s.next() - - // skip white space - for isWhitespace(ch) { - ch = s.next() - } - - var tok token.Type - - // token text markings - s.tokStart = s.srcPos.Offset - s.lastCharLen - - // token position, initial next() is moving the offset by one(size of rune - // actually), though we are interested with the starting point - s.tokPos.Offset = s.srcPos.Offset - s.lastCharLen - if s.srcPos.Column > 0 { - // common case: last character was not a '\n' - s.tokPos.Line = s.srcPos.Line - s.tokPos.Column = s.srcPos.Column - } else { - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - s.tokPos.Line = s.srcPos.Line - 1 - s.tokPos.Column = s.lastLineLen - } - - switch { - case isLetter(ch): - lit := s.scanIdentifier() - if lit == "true" || lit == "false" { - tok = token.BOOL - } else if lit == "null" { - tok = token.NULL - } else { - s.err("illegal char") - } - case isDecimal(ch): - tok = s.scanNumber(ch) - default: - switch ch { - case eof: - tok = token.EOF - case '"': - tok = token.STRING - s.scanString() - case '.': - tok = token.PERIOD - ch = s.peek() - if isDecimal(ch) { - tok = token.FLOAT - ch = s.scanMantissa(ch) - ch = s.scanExponent(ch) - } - case '[': - tok = token.LBRACK - case ']': - tok = token.RBRACK - case '{': - tok = token.LBRACE - case '}': - tok = token.RBRACE - case ',': - tok = token.COMMA - case ':': - tok = token.COLON - case '-': - if isDecimal(s.peek()) { - ch := s.next() - tok = s.scanNumber(ch) - } else { - s.err("illegal char") - } - default: - s.err("illegal char: " + string(ch)) - } - } - - // finish token ending - s.tokEnd = s.srcPos.Offset - - // create token literal - var tokenText string - if s.tokStart >= 0 { - tokenText = string(s.src[s.tokStart:s.tokEnd]) - } - s.tokStart = s.tokEnd // ensure idempotency of tokenText() call - - return token.Token{ - Type: tok, - Pos: s.tokPos, - Text: tokenText, - } -} - -// scanNumber scans a HCL number definition starting with the given rune -func (s *Scanner) scanNumber(ch rune) token.Type { - zero := ch == '0' - pos := s.srcPos - - s.scanMantissa(ch) - ch = s.next() // seek forward - if ch == 'e' || ch == 'E' { - ch = s.scanExponent(ch) - return token.FLOAT - } - - if ch == '.' { - ch = s.scanFraction(ch) - if ch == 'e' || ch == 'E' { - ch = s.next() - ch = s.scanExponent(ch) - } - return token.FLOAT - } - - if ch != eof { - s.unread() - } - - // If we have a larger number and this is zero, error - if zero && pos != s.srcPos { - s.err("numbers cannot start with 0") - } - - return token.NUMBER -} - -// scanMantissa scans the mantissa begining from the rune. It returns the next -// non decimal rune. It's used to determine wheter it's a fraction or exponent. -func (s *Scanner) scanMantissa(ch rune) rune { - scanned := false - for isDecimal(ch) { - ch = s.next() - scanned = true - } - - if scanned && ch != eof { - s.unread() - } - return ch -} - -// scanFraction scans the fraction after the '.' rune -func (s *Scanner) scanFraction(ch rune) rune { - if ch == '.' { - ch = s.peek() // we peek just to see if we can move forward - ch = s.scanMantissa(ch) - } - return ch -} - -// scanExponent scans the remaining parts of an exponent after the 'e' or 'E' -// rune. -func (s *Scanner) scanExponent(ch rune) rune { - if ch == 'e' || ch == 'E' { - ch = s.next() - if ch == '-' || ch == '+' { - ch = s.next() - } - ch = s.scanMantissa(ch) - } - return ch -} - -// scanString scans a quoted string -func (s *Scanner) scanString() { - braces := 0 - for { - // '"' opening already consumed - // read character after quote - ch := s.next() - - if ch == '\n' || ch < 0 || ch == eof { - s.err("literal not terminated") - return - } - - if ch == '"' { - break - } - - // If we're going into a ${} then we can ignore quotes for awhile - if braces == 0 && ch == '$' && s.peek() == '{' { - braces++ - s.next() - } else if braces > 0 && ch == '{' { - braces++ - } - if braces > 0 && ch == '}' { - braces-- - } - - if ch == '\\' { - s.scanEscape() - } - } - - return -} - -// scanEscape scans an escape sequence -func (s *Scanner) scanEscape() rune { - // http://en.cppreference.com/w/cpp/language/escape - ch := s.next() // read character after '/' - switch ch { - case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', '"': - // nothing to do - case '0', '1', '2', '3', '4', '5', '6', '7': - // octal notation - ch = s.scanDigits(ch, 8, 3) - case 'x': - // hexademical notation - ch = s.scanDigits(s.next(), 16, 2) - case 'u': - // universal character name - ch = s.scanDigits(s.next(), 16, 4) - case 'U': - // universal character name - ch = s.scanDigits(s.next(), 16, 8) - default: - s.err("illegal char escape") - } - return ch -} - -// scanDigits scans a rune with the given base for n times. For example an -// octal notation \184 would yield in scanDigits(ch, 8, 3) -func (s *Scanner) scanDigits(ch rune, base, n int) rune { - for n > 0 && digitVal(ch) < base { - ch = s.next() - n-- - } - if n > 0 { - s.err("illegal char escape") - } - - // we scanned all digits, put the last non digit char back - s.unread() - return ch -} - -// scanIdentifier scans an identifier and returns the literal string -func (s *Scanner) scanIdentifier() string { - offs := s.srcPos.Offset - s.lastCharLen - ch := s.next() - for isLetter(ch) || isDigit(ch) || ch == '-' { - ch = s.next() - } - - if ch != eof { - s.unread() // we got identifier, put back latest char - } - - return string(s.src[offs:s.srcPos.Offset]) -} - -// recentPosition returns the position of the character immediately after the -// character or token returned by the last call to Scan. -func (s *Scanner) recentPosition() (pos token.Pos) { - pos.Offset = s.srcPos.Offset - s.lastCharLen - switch { - case s.srcPos.Column > 0: - // common case: last character was not a '\n' - pos.Line = s.srcPos.Line - pos.Column = s.srcPos.Column - case s.lastLineLen > 0: - // last character was a '\n' - // (we cannot be at the beginning of the source - // since we have called next() at least once) - pos.Line = s.srcPos.Line - 1 - pos.Column = s.lastLineLen - default: - // at the beginning of the source - pos.Line = 1 - pos.Column = 1 - } - return -} - -// err prints the error of any scanning to s.Error function. If the function is -// not defined, by default it prints them to os.Stderr -func (s *Scanner) err(msg string) { - s.ErrorCount++ - pos := s.recentPosition() - - if s.Error != nil { - s.Error(pos, msg) - return - } - - fmt.Fprintf(os.Stderr, "%s: %s\n", pos, msg) -} - -// isHexadecimal returns true if the given rune is a letter -func isLetter(ch rune) bool { - return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch) -} - -// isHexadecimal returns true if the given rune is a decimal digit -func isDigit(ch rune) bool { - return '0' <= ch && ch <= '9' || ch >= 0x80 && unicode.IsDigit(ch) -} - -// isHexadecimal returns true if the given rune is a decimal number -func isDecimal(ch rune) bool { - return '0' <= ch && ch <= '9' -} - -// isHexadecimal returns true if the given rune is an hexadecimal number -func isHexadecimal(ch rune) bool { - return '0' <= ch && ch <= '9' || 'a' <= ch && ch <= 'f' || 'A' <= ch && ch <= 'F' -} - -// isWhitespace returns true if the rune is a space, tab, newline or carriage return -func isWhitespace(ch rune) bool { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' -} - -// digitVal returns the integer value of a given octal,decimal or hexadecimal rune -func digitVal(ch rune) int { - switch { - case '0' <= ch && ch <= '9': - return int(ch - '0') - case 'a' <= ch && ch <= 'f': - return int(ch - 'a' + 10) - case 'A' <= ch && ch <= 'F': - return int(ch - 'A' + 10) - } - return 16 // larger than any legal digit val -} diff --git a/vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go b/vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go deleted file mode 100644 index 3033a5797..000000000 --- a/vendor/github.com/hashicorp/hcl/json/scanner/scanner_test.go +++ /dev/null @@ -1,362 +0,0 @@ -package scanner - -import ( - "bytes" - "fmt" - "testing" - - "github.com/hashicorp/hcl/json/token" -) - -var f100 = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" - -type tokenPair struct { - tok token.Type - text string -} - -var tokenLists = map[string][]tokenPair{ - "operator": []tokenPair{ - {token.LBRACK, "["}, - {token.LBRACE, "{"}, - {token.COMMA, ","}, - {token.PERIOD, "."}, - {token.RBRACK, "]"}, - {token.RBRACE, "}"}, - }, - "bool": []tokenPair{ - {token.BOOL, "true"}, - {token.BOOL, "false"}, - }, - "string": []tokenPair{ - {token.STRING, `" "`}, - {token.STRING, `"a"`}, - {token.STRING, `"本"`}, - {token.STRING, `"${file(\"foo\")}"`}, - {token.STRING, `"\a"`}, - {token.STRING, `"\b"`}, - {token.STRING, `"\f"`}, - {token.STRING, `"\n"`}, - {token.STRING, `"\r"`}, - {token.STRING, `"\t"`}, - {token.STRING, `"\v"`}, - {token.STRING, `"\""`}, - {token.STRING, `"\000"`}, - {token.STRING, `"\777"`}, - {token.STRING, `"\x00"`}, - {token.STRING, `"\xff"`}, - {token.STRING, `"\u0000"`}, - {token.STRING, `"\ufA16"`}, - {token.STRING, `"\U00000000"`}, - {token.STRING, `"\U0000ffAB"`}, - {token.STRING, `"` + f100 + `"`}, - }, - "number": []tokenPair{ - {token.NUMBER, "0"}, - {token.NUMBER, "1"}, - {token.NUMBER, "9"}, - {token.NUMBER, "42"}, - {token.NUMBER, "1234567890"}, - {token.NUMBER, "-0"}, - {token.NUMBER, "-1"}, - {token.NUMBER, "-9"}, - {token.NUMBER, "-42"}, - {token.NUMBER, "-1234567890"}, - }, - "float": []tokenPair{ - {token.FLOAT, "0."}, - {token.FLOAT, "1."}, - {token.FLOAT, "42."}, - {token.FLOAT, "01234567890."}, - {token.FLOAT, ".0"}, - {token.FLOAT, ".1"}, - {token.FLOAT, ".42"}, - {token.FLOAT, ".0123456789"}, - {token.FLOAT, "0.0"}, - {token.FLOAT, "1.0"}, - {token.FLOAT, "42.0"}, - {token.FLOAT, "01234567890.0"}, - {token.FLOAT, "0e0"}, - {token.FLOAT, "1e0"}, - {token.FLOAT, "42e0"}, - {token.FLOAT, "01234567890e0"}, - {token.FLOAT, "0E0"}, - {token.FLOAT, "1E0"}, - {token.FLOAT, "42E0"}, - {token.FLOAT, "01234567890E0"}, - {token.FLOAT, "0e+10"}, - {token.FLOAT, "1e-10"}, - {token.FLOAT, "42e+10"}, - {token.FLOAT, "01234567890e-10"}, - {token.FLOAT, "0E+10"}, - {token.FLOAT, "1E-10"}, - {token.FLOAT, "42E+10"}, - {token.FLOAT, "01234567890E-10"}, - {token.FLOAT, "01.8e0"}, - {token.FLOAT, "1.4e0"}, - {token.FLOAT, "42.2e0"}, - {token.FLOAT, "01234567890.12e0"}, - {token.FLOAT, "0.E0"}, - {token.FLOAT, "1.12E0"}, - {token.FLOAT, "42.123E0"}, - {token.FLOAT, "01234567890.213E0"}, - {token.FLOAT, "0.2e+10"}, - {token.FLOAT, "1.2e-10"}, - {token.FLOAT, "42.54e+10"}, - {token.FLOAT, "01234567890.98e-10"}, - {token.FLOAT, "0.1E+10"}, - {token.FLOAT, "1.1E-10"}, - {token.FLOAT, "42.1E+10"}, - {token.FLOAT, "01234567890.1E-10"}, - {token.FLOAT, "-0.0"}, - {token.FLOAT, "-1.0"}, - {token.FLOAT, "-42.0"}, - {token.FLOAT, "-01234567890.0"}, - {token.FLOAT, "-0e0"}, - {token.FLOAT, "-1e0"}, - {token.FLOAT, "-42e0"}, - {token.FLOAT, "-01234567890e0"}, - {token.FLOAT, "-0E0"}, - {token.FLOAT, "-1E0"}, - {token.FLOAT, "-42E0"}, - {token.FLOAT, "-01234567890E0"}, - {token.FLOAT, "-0e+10"}, - {token.FLOAT, "-1e-10"}, - {token.FLOAT, "-42e+10"}, - {token.FLOAT, "-01234567890e-10"}, - {token.FLOAT, "-0E+10"}, - {token.FLOAT, "-1E-10"}, - {token.FLOAT, "-42E+10"}, - {token.FLOAT, "-01234567890E-10"}, - {token.FLOAT, "-01.8e0"}, - {token.FLOAT, "-1.4e0"}, - {token.FLOAT, "-42.2e0"}, - {token.FLOAT, "-01234567890.12e0"}, - {token.FLOAT, "-0.E0"}, - {token.FLOAT, "-1.12E0"}, - {token.FLOAT, "-42.123E0"}, - {token.FLOAT, "-01234567890.213E0"}, - {token.FLOAT, "-0.2e+10"}, - {token.FLOAT, "-1.2e-10"}, - {token.FLOAT, "-42.54e+10"}, - {token.FLOAT, "-01234567890.98e-10"}, - {token.FLOAT, "-0.1E+10"}, - {token.FLOAT, "-1.1E-10"}, - {token.FLOAT, "-42.1E+10"}, - {token.FLOAT, "-01234567890.1E-10"}, - }, -} - -var orderedTokenLists = []string{ - "comment", - "operator", - "bool", - "string", - "number", - "float", -} - -func TestPosition(t *testing.T) { - // create artifical source code - buf := new(bytes.Buffer) - - for _, listName := range orderedTokenLists { - for _, ident := range tokenLists[listName] { - fmt.Fprintf(buf, "\t\t\t\t%s\n", ident.text) - } - } - - s := New(buf.Bytes()) - - pos := token.Pos{"", 4, 1, 5} - s.Scan() - for _, listName := range orderedTokenLists { - - for _, k := range tokenLists[listName] { - curPos := s.tokPos - // fmt.Printf("[%q] s = %+v:%+v\n", k.text, curPos.Offset, curPos.Column) - - if curPos.Offset != pos.Offset { - t.Fatalf("offset = %d, want %d for %q", curPos.Offset, pos.Offset, k.text) - } - if curPos.Line != pos.Line { - t.Fatalf("line = %d, want %d for %q", curPos.Line, pos.Line, k.text) - } - if curPos.Column != pos.Column { - t.Fatalf("column = %d, want %d for %q", curPos.Column, pos.Column, k.text) - } - pos.Offset += 4 + len(k.text) + 1 // 4 tabs + token bytes + newline - pos.Line += countNewlines(k.text) + 1 // each token is on a new line - - s.Error = func(pos token.Pos, msg string) { - t.Errorf("error %q for %q", msg, k.text) - } - - s.Scan() - } - } - // make sure there were no token-internal errors reported by scanner - if s.ErrorCount != 0 { - t.Errorf("%d errors", s.ErrorCount) - } -} - -func TestComment(t *testing.T) { - testTokenList(t, tokenLists["comment"]) -} - -func TestOperator(t *testing.T) { - testTokenList(t, tokenLists["operator"]) -} - -func TestBool(t *testing.T) { - testTokenList(t, tokenLists["bool"]) -} - -func TestIdent(t *testing.T) { - testTokenList(t, tokenLists["ident"]) -} - -func TestString(t *testing.T) { - testTokenList(t, tokenLists["string"]) -} - -func TestNumber(t *testing.T) { - testTokenList(t, tokenLists["number"]) -} - -func TestFloat(t *testing.T) { - testTokenList(t, tokenLists["float"]) -} - -func TestRealExample(t *testing.T) { - complexReal := ` -{ - "variable": { - "foo": { - "default": "bar", - "description": "bar", - "depends_on": ["something"] - } - } -}` - - literals := []struct { - tokenType token.Type - literal string - }{ - {token.LBRACE, `{`}, - {token.STRING, `"variable"`}, - {token.COLON, `:`}, - {token.LBRACE, `{`}, - {token.STRING, `"foo"`}, - {token.COLON, `:`}, - {token.LBRACE, `{`}, - {token.STRING, `"default"`}, - {token.COLON, `:`}, - {token.STRING, `"bar"`}, - {token.COMMA, `,`}, - {token.STRING, `"description"`}, - {token.COLON, `:`}, - {token.STRING, `"bar"`}, - {token.COMMA, `,`}, - {token.STRING, `"depends_on"`}, - {token.COLON, `:`}, - {token.LBRACK, `[`}, - {token.STRING, `"something"`}, - {token.RBRACK, `]`}, - {token.RBRACE, `}`}, - {token.RBRACE, `}`}, - {token.RBRACE, `}`}, - {token.EOF, ``}, - } - - s := New([]byte(complexReal)) - for _, l := range literals { - tok := s.Scan() - if l.tokenType != tok.Type { - t.Errorf("got: %s want %s for %s\n", tok, l.tokenType, tok.String()) - } - - if l.literal != tok.Text { - t.Errorf("got: %s want %s\n", tok, l.literal) - } - } - -} - -func TestError(t *testing.T) { - testError(t, "\x80", "1:1", "illegal UTF-8 encoding", token.ILLEGAL) - testError(t, "\xff", "1:1", "illegal UTF-8 encoding", token.ILLEGAL) - - testError(t, `"ab`+"\x80", "1:4", "illegal UTF-8 encoding", token.STRING) - testError(t, `"abc`+"\xff", "1:5", "illegal UTF-8 encoding", token.STRING) - - testError(t, `01238`, "1:7", "numbers cannot start with 0", token.NUMBER) - testError(t, `01238123`, "1:10", "numbers cannot start with 0", token.NUMBER) - testError(t, `'aa'`, "1:1", "illegal char: '", token.ILLEGAL) - - testError(t, `"`, "1:2", "literal not terminated", token.STRING) - testError(t, `"abc`, "1:5", "literal not terminated", token.STRING) - testError(t, `"abc`+"\n", "1:5", "literal not terminated", token.STRING) -} - -func testError(t *testing.T, src, pos, msg string, tok token.Type) { - s := New([]byte(src)) - - errorCalled := false - s.Error = func(p token.Pos, m string) { - if !errorCalled { - if pos != p.String() { - t.Errorf("pos = %q, want %q for %q", p, pos, src) - } - - if m != msg { - t.Errorf("msg = %q, want %q for %q", m, msg, src) - } - errorCalled = true - } - } - - tk := s.Scan() - if tk.Type != tok { - t.Errorf("tok = %s, want %s for %q", tk, tok, src) - } - if !errorCalled { - t.Errorf("error handler not called for %q", src) - } - if s.ErrorCount == 0 { - t.Errorf("count = %d, want > 0 for %q", s.ErrorCount, src) - } -} - -func testTokenList(t *testing.T, tokenList []tokenPair) { - // create artifical source code - buf := new(bytes.Buffer) - for _, ident := range tokenList { - fmt.Fprintf(buf, "%s\n", ident.text) - } - - s := New(buf.Bytes()) - for _, ident := range tokenList { - tok := s.Scan() - if tok.Type != ident.tok { - t.Errorf("tok = %q want %q for %q\n", tok, ident.tok, ident.text) - } - - if tok.Text != ident.text { - t.Errorf("text = %q want %q", tok.String(), ident.text) - } - - } -} - -func countNewlines(s string) int { - n := 0 - for _, ch := range s { - if ch == '\n' { - n++ - } - } - return n -} diff --git a/vendor/github.com/hashicorp/hcl/json/token/position.go b/vendor/github.com/hashicorp/hcl/json/token/position.go deleted file mode 100644 index 59c1bb72d..000000000 --- a/vendor/github.com/hashicorp/hcl/json/token/position.go +++ /dev/null @@ -1,46 +0,0 @@ -package token - -import "fmt" - -// Pos describes an arbitrary source position -// including the file, line, and column location. -// A Position is valid if the line number is > 0. -type Pos struct { - Filename string // filename, if any - Offset int // offset, starting at 0 - Line int // line number, starting at 1 - Column int // column number, starting at 1 (character count) -} - -// IsValid returns true if the position is valid. -func (p *Pos) IsValid() bool { return p.Line > 0 } - -// String returns a string in one of several forms: -// -// file:line:column valid position with file name -// line:column valid position without file name -// file invalid position with file name -// - invalid position without file name -func (p Pos) String() string { - s := p.Filename - if p.IsValid() { - if s != "" { - s += ":" - } - s += fmt.Sprintf("%d:%d", p.Line, p.Column) - } - if s == "" { - s = "-" - } - return s -} - -// Before reports whether the position p is before u. -func (p Pos) Before(u Pos) bool { - return u.Offset > p.Offset || u.Line > p.Line -} - -// After reports whether the position p is after u. -func (p Pos) After(u Pos) bool { - return u.Offset < p.Offset || u.Line < p.Line -} diff --git a/vendor/github.com/hashicorp/hcl/json/token/token.go b/vendor/github.com/hashicorp/hcl/json/token/token.go deleted file mode 100644 index 95a0c3eee..000000000 --- a/vendor/github.com/hashicorp/hcl/json/token/token.go +++ /dev/null @@ -1,118 +0,0 @@ -package token - -import ( - "fmt" - "strconv" - - hcltoken "github.com/hashicorp/hcl/hcl/token" -) - -// Token defines a single HCL token which can be obtained via the Scanner -type Token struct { - Type Type - Pos Pos - Text string -} - -// Type is the set of lexical tokens of the HCL (HashiCorp Configuration Language) -type Type int - -const ( - // Special tokens - ILLEGAL Type = iota - EOF - - identifier_beg - literal_beg - NUMBER // 12345 - FLOAT // 123.45 - BOOL // true,false - STRING // "abc" - NULL // null - literal_end - identifier_end - - operator_beg - LBRACK // [ - LBRACE // { - COMMA // , - PERIOD // . - COLON // : - - RBRACK // ] - RBRACE // } - - operator_end -) - -var tokens = [...]string{ - ILLEGAL: "ILLEGAL", - - EOF: "EOF", - - NUMBER: "NUMBER", - FLOAT: "FLOAT", - BOOL: "BOOL", - STRING: "STRING", - NULL: "NULL", - - LBRACK: "LBRACK", - LBRACE: "LBRACE", - COMMA: "COMMA", - PERIOD: "PERIOD", - COLON: "COLON", - - RBRACK: "RBRACK", - RBRACE: "RBRACE", -} - -// String returns the string corresponding to the token tok. -func (t Type) String() string { - s := "" - if 0 <= t && t < Type(len(tokens)) { - s = tokens[t] - } - if s == "" { - s = "token(" + strconv.Itoa(int(t)) + ")" - } - return s -} - -// IsIdentifier returns true for tokens corresponding to identifiers and basic -// type literals; it returns false otherwise. -func (t Type) IsIdentifier() bool { return identifier_beg < t && t < identifier_end } - -// IsLiteral returns true for tokens corresponding to basic type literals; it -// returns false otherwise. -func (t Type) IsLiteral() bool { return literal_beg < t && t < literal_end } - -// IsOperator returns true for tokens corresponding to operators and -// delimiters; it returns false otherwise. -func (t Type) IsOperator() bool { return operator_beg < t && t < operator_end } - -// String returns the token's literal text. Note that this is only -// applicable for certain token types, such as token.IDENT, -// token.STRING, etc.. -func (t Token) String() string { - return fmt.Sprintf("%s %s %s", t.Pos.String(), t.Type.String(), t.Text) -} - -// HCLToken converts this token to an HCL token. -// -// The token type must be a literal type or this will panic. -func (t Token) HCLToken() hcltoken.Token { - switch t.Type { - case BOOL: - return hcltoken.Token{Type: hcltoken.BOOL, Text: t.Text} - case FLOAT: - return hcltoken.Token{Type: hcltoken.FLOAT, Text: t.Text} - case NULL: - return hcltoken.Token{Type: hcltoken.STRING, Text: ""} - case NUMBER: - return hcltoken.Token{Type: hcltoken.NUMBER, Text: t.Text} - case STRING: - return hcltoken.Token{Type: hcltoken.STRING, Text: t.Text, JSON: true} - default: - panic(fmt.Sprintf("unimplemented HCLToken for type: %s", t.Type)) - } -} diff --git a/vendor/github.com/hashicorp/hcl/json/token/token_test.go b/vendor/github.com/hashicorp/hcl/json/token/token_test.go deleted file mode 100644 index a83fdd55b..000000000 --- a/vendor/github.com/hashicorp/hcl/json/token/token_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package token - -import ( - "testing" -) - -func TestTypeString(t *testing.T) { - var tokens = []struct { - tt Type - str string - }{ - {ILLEGAL, "ILLEGAL"}, - {EOF, "EOF"}, - {NUMBER, "NUMBER"}, - {FLOAT, "FLOAT"}, - {BOOL, "BOOL"}, - {STRING, "STRING"}, - {NULL, "NULL"}, - {LBRACK, "LBRACK"}, - {LBRACE, "LBRACE"}, - {COMMA, "COMMA"}, - {PERIOD, "PERIOD"}, - {RBRACK, "RBRACK"}, - {RBRACE, "RBRACE"}, - } - - for _, token := range tokens { - if token.tt.String() != token.str { - t.Errorf("want: %q got:%q\n", token.str, token.tt) - - } - } - -} diff --git a/vendor/github.com/hashicorp/hcl/lex.go b/vendor/github.com/hashicorp/hcl/lex.go deleted file mode 100644 index d9993c292..000000000 --- a/vendor/github.com/hashicorp/hcl/lex.go +++ /dev/null @@ -1,38 +0,0 @@ -package hcl - -import ( - "unicode" - "unicode/utf8" -) - -type lexModeValue byte - -const ( - lexModeUnknown lexModeValue = iota - lexModeHcl - lexModeJson -) - -// lexMode returns whether we're going to be parsing in JSON -// mode or HCL mode. -func lexMode(v []byte) lexModeValue { - var ( - r rune - w int - offset int - ) - - for { - r, w = utf8.DecodeRune(v[offset:]) - offset += w - if unicode.IsSpace(r) { - continue - } - if r == '{' { - return lexModeJson - } - break - } - - return lexModeHcl -} diff --git a/vendor/github.com/hashicorp/hcl/lex_test.go b/vendor/github.com/hashicorp/hcl/lex_test.go deleted file mode 100644 index 806276444..000000000 --- a/vendor/github.com/hashicorp/hcl/lex_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package hcl - -import ( - "testing" -) - -func TestLexMode(t *testing.T) { - cases := []struct { - Input string - Mode lexModeValue - }{ - { - "", - lexModeHcl, - }, - { - "foo", - lexModeHcl, - }, - { - "{}", - lexModeJson, - }, - { - " {}", - lexModeJson, - }, - } - - for i, tc := range cases { - actual := lexMode([]byte(tc.Input)) - - if actual != tc.Mode { - t.Fatalf("%d: %#v", i, actual) - } - } -} diff --git a/vendor/github.com/hashicorp/hcl/parse.go b/vendor/github.com/hashicorp/hcl/parse.go deleted file mode 100644 index 1fca53c4c..000000000 --- a/vendor/github.com/hashicorp/hcl/parse.go +++ /dev/null @@ -1,39 +0,0 @@ -package hcl - -import ( - "fmt" - - "github.com/hashicorp/hcl/hcl/ast" - hclParser "github.com/hashicorp/hcl/hcl/parser" - jsonParser "github.com/hashicorp/hcl/json/parser" -) - -// ParseBytes accepts as input byte slice and returns ast tree. -// -// Input can be either JSON or HCL -func ParseBytes(in []byte) (*ast.File, error) { - return parse(in) -} - -// ParseString accepts input as a string and returns ast tree. -func ParseString(input string) (*ast.File, error) { - return parse([]byte(input)) -} - -func parse(in []byte) (*ast.File, error) { - switch lexMode(in) { - case lexModeHcl: - return hclParser.Parse(in) - case lexModeJson: - return jsonParser.Parse(in) - } - - return nil, fmt.Errorf("unknown config format") -} - -// Parse parses the given input and returns the root object. -// -// The input format can be either HCL or JSON. -func Parse(input string) (*ast.File, error) { - return parse([]byte(input)) -} diff --git a/vendor/github.com/inconshreveable/mousetrap/README.md b/vendor/github.com/inconshreveable/mousetrap/README.md deleted file mode 100644 index 7a950d177..000000000 --- a/vendor/github.com/inconshreveable/mousetrap/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# mousetrap - -mousetrap is a tiny library that answers a single question. - -On a Windows machine, was the process invoked by someone double clicking on -the executable file while browsing in explorer? - -### Motivation - -Windows developers unfamiliar with command line tools will often "double-click" -the executable for a tool. Because most CLI tools print the help and then exit -when invoked without arguments, this is often very frustrating for those users. - -mousetrap provides a way to detect these invocations so that you can provide -more helpful behavior and instructions on how to run the CLI tool. To see what -this looks like, both from an organizational and a technical perspective, see -https://inconshreveable.com/09-09-2014/sweat-the-small-stuff/ - -### The interface - -The library exposes a single interface: - - func StartedByExplorer() (bool) diff --git a/vendor/github.com/ipfans/echo-session/.gitignore b/vendor/github.com/ipfans/echo-session/.gitignore deleted file mode 100644 index 15abbfee6..000000000 --- a/vendor/github.com/ipfans/echo-session/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -# IDE artifacts -.idea/ -*.iml diff --git a/vendor/github.com/ipfans/echo-session/README.md b/vendor/github.com/ipfans/echo-session/README.md deleted file mode 100644 index a39926b34..000000000 --- a/vendor/github.com/ipfans/echo-session/README.md +++ /dev/null @@ -1,57 +0,0 @@ -echo-session -====== - -[![Go Report Card](https://goreportcard.com/badge/github.com/ipfans/echo-session)](https://goreportcard.com/report/github.com/ipfans/echo-session) [![GoDoc](http://godoc.org/github.com/ipfans/echo-session?status.svg)](http://godoc.org/github.com/ipfans/echo-session) - -Middleware echo-session is a session support for [echo](https://github.com/labstack/echo/). - -**This version is working with echo v3. Please checkout v2 branch if you want use session with echo v2.** - -### Installation - - go get github.com/ipfans/echo-session - -## Example - -```go -package main - -import ( - "github.com/ipfans/echo-session" - "github.com/labstack/echo" - "github.com/labstack/echo/middleware" -) - -func main() { - serv := echo.New() - serv.Use(middleware.Logger()) - serv.Use(middleware.Recover()) - store, err := session.NewRedisStore(32, "tcp", "localhost:6379", "", []byte("secret")) - if err != nil { - panic(err) - } - serv.Use(session.Sessions("GSESSION", store)) - serv.GET("/", func(ctx echo.Context) error { - session := session.Default(ctx) - var count int - v := session.Get("count") - if v == nil { - count = 0 - } else { - count = v.(int) - count += 1 - } - session.Set("count", count) - session.Save() - ctx.JSON(200, map[string]interface{}{ - "visit": count, - }) - return nil - }) - serv.Start(":8081") -} -``` - -## License - -This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text. diff --git a/vendor/github.com/ipfans/echo-session/cookie_store.go b/vendor/github.com/ipfans/echo-session/cookie_store.go deleted file mode 100644 index fe1389d34..000000000 --- a/vendor/github.com/ipfans/echo-session/cookie_store.go +++ /dev/null @@ -1,40 +0,0 @@ -package session - -import ( - "github.com/gorilla/sessions" -) - -type CookieStore interface { - Store -} - -// Keys are defined in pairs to allow key rotation, but the common case is to set a single -// authentication key and optionally an encryption key. -// -// The first key in a pair is used for authentication and the second for encryption. The -// encryption key can be set to nil or omitted in the last pair, but the authentication key -// is required in all pairs. -// -// It is recommended to use an authentication key with 32 or 64 bytes. The encryption key, -// if set, must be either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256 modes. -func NewCookieStore(keyPairs ...[]byte) CookieStore { - return &cookieStore{sessions.NewCookieStore(keyPairs...)} -} - -type cookieStore struct { - *sessions.CookieStore -} - -func (c *cookieStore) Options(options Options) { - c.CookieStore.Options = &sessions.Options{ - Path: options.Path, - Domain: options.Domain, - MaxAge: options.MaxAge, - Secure: options.Secure, - HttpOnly: options.HttpOnly, - } -} - -func (c *cookieStore) MaxAge(age int) { - c.CookieStore.MaxAge(age) -} diff --git a/vendor/github.com/ipfans/echo-session/filesystem_store.go b/vendor/github.com/ipfans/echo-session/filesystem_store.go deleted file mode 100644 index 21ac7b2bf..000000000 --- a/vendor/github.com/ipfans/echo-session/filesystem_store.go +++ /dev/null @@ -1,54 +0,0 @@ -package session - -import ( - "github.com/gorilla/sessions" -) - -type FileSystemStore interface { - Store - MaxLength(int) -} - -// The path argument is the directory where sessions will be saved. If empty -// it will use os.TempDir(). -// -// Keys are defined in pairs to allow key rotation, but the common case is to set a single -// authentication key and optionally an encryption key. -// -// The first key in a pair is used for authentication and the second for encryption. The -// encryption key can be set to nil or omitted in the last pair, but the authentication key -// is required in all pairs. -// -// It is recommended to use an authentication key with 32 or 64 bytes. The encryption key, -// if set, must be either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256 modes. -func NewFileSystemStoreStore(path string, keyPairs ...[]byte) FileSystemStore { - return &filesystemStore{sessions.NewFilesystemStore(path, keyPairs...)} -} - -type filesystemStore struct { - *sessions.FilesystemStore -} - -func (s *filesystemStore) Options(options Options) { - s.FilesystemStore.Options = &sessions.Options{ - Path: options.Path, - Domain: options.Domain, - MaxAge: options.MaxAge, - Secure: options.Secure, - HttpOnly: options.HttpOnly, - } -} - -// MaxAge sets the maximum age for the store and the underlying cookie -// implementation. Individual sessions can be deleted by setting Options.MaxAge -// = -1 for that session. -func (s *filesystemStore) MaxAge(age int) { - s.FilesystemStore.MaxAge(age) -} - -// MaxLength restricts the maximum length of new sessions to l. -// If l is 0 there is no limit to the size of a session, use with caution. -// The default for a new FilesystemStore is 4096. -func (s *filesystemStore) MaxLength(l int) { - s.FilesystemStore.MaxLength(l) -} diff --git a/vendor/github.com/ipfans/echo-session/postgres_store.go b/vendor/github.com/ipfans/echo-session/postgres_store.go deleted file mode 100644 index 3f0c20aaa..000000000 --- a/vendor/github.com/ipfans/echo-session/postgres_store.go +++ /dev/null @@ -1,36 +0,0 @@ -package session - -import ( - "github.com/antonlindstrom/pgstore" - "github.com/gorilla/sessions" -) - -type PostgresStore interface { - Store -} - -func NewPostgresStore(dbURL string, keyPairs ...[]byte) (PostgresStore, error) { - store, err := pgstore.NewPGStore(dbURL, keyPairs...) - if err != nil { - return nil, err - } - return &postgresStore{store}, nil -} - -type postgresStore struct { - *pgstore.PGStore -} - -func (p *postgresStore) Options(options Options) { - p.PGStore.Options = &sessions.Options{ - Path: options.Path, - Domain: options.Domain, - MaxAge: options.MaxAge, - Secure: options.Secure, - HttpOnly: options.HttpOnly, - } -} - -func (p *postgresStore) MaxAge(age int) { - p.PGStore.MaxAge(age) -} diff --git a/vendor/github.com/ipfans/echo-session/redis_store.go b/vendor/github.com/ipfans/echo-session/redis_store.go deleted file mode 100644 index 3084c1654..000000000 --- a/vendor/github.com/ipfans/echo-session/redis_store.go +++ /dev/null @@ -1,78 +0,0 @@ -package session - -import ( - "github.com/boj/redistore" - "github.com/garyburd/redigo/redis" - "github.com/gorilla/sessions" -) - -type RedisStore interface { - Store -} - -// size: maximum number of idle connections. -// network: tcp or udp -// address: host:port -// password: redis-password -// Keys are defined in pairs to allow key rotation, but the common case is to set a single -// authentication key and optionally an encryption key. -// -// The first key in a pair is used for authentication and the second for encryption. The -// encryption key can be set to nil or omitted in the last pair, but the authentication key -// is required in all pairs. -// -// It is recommended to use an authentication key with 32 or 64 bytes. The encryption key, -// if set, must be either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256 modes. -func NewRedisStore(size int, network, address, password string, keyPairs ...[]byte) (RedisStore, error) { - store, err := redistore.NewRediStore(size, network, address, password, keyPairs...) - if err != nil { - return nil, err - } - return &redisStore{store}, nil -} - -// pool: redis pool connections -// Keys are defined in pairs to allow key rotation, but the common case is to set a single -// authentication key and optionally an encryption key. -// -// The first key in a pair is used for authentication and the second for encryption. The -// encryption key can be set to nil or omitted in the last pair, but the authentication key -// is required in all pairs. -// -// It is recommended to use an authentication key with 32 or 64 bytes. The encryption key, -// if set, must be either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256 modes. -func NewRedisStoreWithPool(pool *redis.Pool, keyPairs ...[]byte) (RedisStore, error) { - store, err := redistore.NewRediStoreWithPool(pool, keyPairs...) - if err != nil { - return nil, err - } - return &redisStore{store}, nil -} - -type redisStore struct { - *redistore.RediStore -} - -func (c *redisStore) Options(options Options) { - c.RediStore.Options = &sessions.Options{ - Path: options.Path, - Domain: options.Domain, - MaxAge: options.MaxAge, - Secure: options.Secure, - HttpOnly: options.HttpOnly, - } -} - -// MaxAge restricts the maximum age, in seconds, of the session record -// both in database and a browser. This is to change session storage configuration. -// If you want just to remove session use your session `s` object and change it's -// `Options.MaxAge` to -1, as specified in -// http://godoc.org/github.com/gorilla/sessions#Options -// -// Default is the one provided by github.com/boj/redistore package value - `sessionExpire`. -// Set it to 0 for no restriction. -// Because we use `MaxAge` also in SecureCookie crypting algorithm you should -// use this function to change `MaxAge` value. -func (c *redisStore) MaxAge(age int) { - c.RediStore.SetMaxAge(age) -} diff --git a/vendor/github.com/ipfans/echo-session/session.go b/vendor/github.com/ipfans/echo-session/session.go deleted file mode 100644 index 25058c643..000000000 --- a/vendor/github.com/ipfans/echo-session/session.go +++ /dev/null @@ -1,157 +0,0 @@ -package session - -import ( - "log" - "net/http" - - "github.com/gorilla/context" - "github.com/gorilla/sessions" - "github.com/labstack/echo" -) - -const ( - DefaultKey = "session_key" - errorFormat = "[sessions] ERROR! %s\n" -) - -type Store interface { - sessions.Store - Options(Options) - MaxAge(int) -} - -// Options stores configuration for a session or session store. -// Fields are a subset of http.Cookie fields. -type Options struct { - Path string - Domain string - // MaxAge=0 means no 'Max-Age' attribute specified. - // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'. - // MaxAge>0 means Max-Age attribute present and given in seconds. - MaxAge int - Secure bool - HttpOnly bool -} - -// Wraps thinly gorilla-session methods. - -// Session stores the values and optional configuration for a session. -type Session interface { - // Get returns the session value associated to the given key. - Get(key interface{}) interface{} - // Set sets the session value associated to the given key. - Set(key interface{}, val interface{}) - // Delete removes the session value associated to the given key. - Delete(key interface{}) - // Clear deletes all values in the session. - Clear() - // AddFlash adds a flash message to the session. - // A single variadic argument is accepted, and it is optional: it defines the flash key. - // If not defined "_flash" is used by default. - AddFlash(value interface{}, vars ...string) - // Flashes returns a slice of flash messages from the session. - // A single variadic argument is accepted, and it is optional: it defines the flash key. - // If not defined "_flash" is used by default. - Flashes(vars ...string) []interface{} - // Options sets confuguration for a session. - Options(Options) - // Save saves all sessions used during the current request. - Save() error -} - -func Sessions(name string, store Store) echo.MiddlewareFunc { - return func(h echo.HandlerFunc) echo.HandlerFunc { - return func(ctx echo.Context) error { - rq := ctx.Request() - rs := ctx.Response() - s := &session{name, rq, store, nil, false, rs.Writer} - ctx.Set(DefaultKey, s) - defer context.Clear(rq) - return h(ctx) - } - } -} - -type session struct { - name string - request *http.Request - store Store - session *sessions.Session - written bool - writer http.ResponseWriter -} - -func (s *session) Get(key interface{}) interface{} { - return s.Session().Values[key] -} - -func (s *session) Set(key interface{}, val interface{}) { - s.Session().Values[key] = val - s.written = true -} - -func (s *session) Delete(key interface{}) { - delete(s.Session().Values, key) - s.written = true -} - -func (s *session) Clear() { - for key := range s.Session().Values { - s.Delete(key) - } -} - -func (s *session) AddFlash(value interface{}, vars ...string) { - s.Session().AddFlash(value, vars...) - s.written = true -} - -func (s *session) Flashes(vars ...string) []interface{} { - s.written = true - return s.Session().Flashes(vars...) -} - -func (s *session) Options(options Options) { - s.Session().Options = &sessions.Options{ - Path: options.Path, - Domain: options.Domain, - MaxAge: options.MaxAge, - Secure: options.Secure, - HttpOnly: options.HttpOnly, - } -} - -func (s *session) Save() error { - if s.Written() { - e := s.Session().Save(s.request, s.writer) - if e == nil { - s.written = false - } - return e - } - return nil -} - -func (s *session) Session() *sessions.Session { - if s.session == nil { - var err error - s.session, err = s.store.Get(s.request, s.name) - if err != nil { - log.Printf(errorFormat, err) - } - } - return s.session -} - -func (s *session) Written() bool { - return s.written -} - -// shortcut to get session -func Default(ctx echo.Context) Session { - session := ctx.Get(DefaultKey) - if session == nil { - return nil - } - return ctx.Get(DefaultKey).(Session) -} diff --git a/vendor/github.com/jmoiron/sqlx/.gitignore b/vendor/github.com/jmoiron/sqlx/.gitignore deleted file mode 100644 index 529841cf1..000000000 --- a/vendor/github.com/jmoiron/sqlx/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -tags -environ diff --git a/vendor/github.com/jmoiron/sqlx/LICENSE b/vendor/github.com/jmoiron/sqlx/LICENSE deleted file mode 100644 index 0d31edfa7..000000000 --- a/vendor/github.com/jmoiron/sqlx/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ - Copyright (c) 2013, Jason Moiron - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - diff --git a/vendor/github.com/jmoiron/sqlx/README.md b/vendor/github.com/jmoiron/sqlx/README.md deleted file mode 100644 index 5c1bb3cb9..000000000 --- a/vendor/github.com/jmoiron/sqlx/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# sqlx - -[![Build Status](https://drone.io/github.com/jmoiron/sqlx/status.png)](https://drone.io/github.com/jmoiron/sqlx/latest) [![Godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/jmoiron/sqlx) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/jmoiron/sqlx/master/LICENSE) - -sqlx is a library which provides a set of extensions on go's standard -`database/sql` library. The sqlx versions of `sql.DB`, `sql.TX`, `sql.Stmt`, -et al. all leave the underlying interfaces untouched, so that their interfaces -are a superset on the standard ones. This makes it relatively painless to -integrate existing codebases using database/sql with sqlx. - -Major additional concepts are: - -* Marshal rows into structs (with embedded struct support), maps, and slices -* Named parameter support including prepared statements -* `Get` and `Select` to go quickly from query to struct/slice - -In addition to the [godoc API documentation](http://godoc.org/github.com/jmoiron/sqlx), -there is also some [standard documentation](http://jmoiron.github.io/sqlx/) that -explains how to use `database/sql` along with sqlx. - -## Recent Changes - -* sqlx/types.JsonText has been renamed to JSONText to follow Go naming conventions. - -This breaks backwards compatibility, but it's in a way that is trivially fixable -(`s/JsonText/JSONText/g`). The `types` package is both experimental and not in -active development currently. - -* Using Go 1.6 and below with `types.JSONText` and `types.GzippedText` can be _potentially unsafe_, **especially** when used with common auto-scan sqlx idioms like `Select` and `Get`. See [golang bug #13905](https://github.com/golang/go/issues/13905). - -### Backwards Compatibility - -There is no Go1-like promise of absolute stability, but I take the issue seriously -and will maintain the library in a compatible state unless vital bugs prevent me -from doing so. Since [#59](https://github.com/jmoiron/sqlx/issues/59) and -[#60](https://github.com/jmoiron/sqlx/issues/60) necessitated breaking behavior, -a wider API cleanup was done at the time of fixing. It's possible this will happen -in future; if it does, a git tag will be provided for users requiring the old -behavior to continue to use it until such a time as they can migrate. - -## install - - go get github.com/jmoiron/sqlx - -## issues - -Row headers can be ambiguous (`SELECT 1 AS a, 2 AS a`), and the result of -`Columns()` does not fully qualify column names in queries like: - -```sql -SELECT a.id, a.name, b.id, b.name FROM foos AS a JOIN foos AS b ON a.parent = b.id; -``` - -making a struct or map destination ambiguous. Use `AS` in your queries -to give columns distinct names, `rows.Scan` to scan them manually, or -`SliceScan` to get a slice of results. - -## usage - -Below is an example which shows some common use cases for sqlx. Check -[sqlx_test.go](https://github.com/jmoiron/sqlx/blob/master/sqlx_test.go) for more -usage. - - -```go -package main - -import ( - _ "github.com/lib/pq" - "database/sql" - "github.com/jmoiron/sqlx" - "log" -) - -var schema = ` -CREATE TABLE person ( - first_name text, - last_name text, - email text -); - -CREATE TABLE place ( - country text, - city text NULL, - telcode integer -)` - -type Person struct { - FirstName string `db:"first_name"` - LastName string `db:"last_name"` - Email string -} - -type Place struct { - Country string - City sql.NullString - TelCode int -} - -func main() { - // this Pings the database trying to connect, panics on error - // use sqlx.Open() for sql.Open() semantics - db, err := sqlx.Connect("postgres", "user=foo dbname=bar sslmode=disable") - if err != nil { - log.Fatalln(err) - } - - // exec the schema or fail; multi-statement Exec behavior varies between - // database drivers; pq will exec them all, sqlite3 won't, ymmv - db.MustExec(schema) - - tx := db.MustBegin() - tx.MustExec("INSERT INTO person (first_name, last_name, email) VALUES ($1, $2, $3)", "Jason", "Moiron", "jmoiron@jmoiron.net") - tx.MustExec("INSERT INTO person (first_name, last_name, email) VALUES ($1, $2, $3)", "John", "Doe", "johndoeDNE@gmail.net") - tx.MustExec("INSERT INTO place (country, city, telcode) VALUES ($1, $2, $3)", "United States", "New York", "1") - tx.MustExec("INSERT INTO place (country, telcode) VALUES ($1, $2)", "Hong Kong", "852") - tx.MustExec("INSERT INTO place (country, telcode) VALUES ($1, $2)", "Singapore", "65") - // Named queries can use structs, so if you have an existing struct (i.e. person := &Person{}) that you have populated, you can pass it in as &person - tx.NamedExec("INSERT INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", &Person{"Jane", "Citizen", "jane.citzen@example.com"}) - tx.Commit() - - // Query the database, storing results in a []Person (wrapped in []interface{}) - people := []Person{} - db.Select(&people, "SELECT * FROM person ORDER BY first_name ASC") - jason, john := people[0], people[1] - - fmt.Printf("%#v\n%#v", jason, john) - // Person{FirstName:"Jason", LastName:"Moiron", Email:"jmoiron@jmoiron.net"} - // Person{FirstName:"John", LastName:"Doe", Email:"johndoeDNE@gmail.net"} - - // You can also get a single result, a la QueryRow - jason = Person{} - err = db.Get(&jason, "SELECT * FROM person WHERE first_name=$1", "Jason") - fmt.Printf("%#v\n", jason) - // Person{FirstName:"Jason", LastName:"Moiron", Email:"jmoiron@jmoiron.net"} - - // if you have null fields and use SELECT *, you must use sql.Null* in your struct - places := []Place{} - err = db.Select(&places, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - fmt.Println(err) - return - } - usa, singsing, honkers := places[0], places[1], places[2] - - fmt.Printf("%#v\n%#v\n%#v\n", usa, singsing, honkers) - // Place{Country:"United States", City:sql.NullString{String:"New York", Valid:true}, TelCode:1} - // Place{Country:"Singapore", City:sql.NullString{String:"", Valid:false}, TelCode:65} - // Place{Country:"Hong Kong", City:sql.NullString{String:"", Valid:false}, TelCode:852} - - // Loop through rows using only one struct - place := Place{} - rows, err := db.Queryx("SELECT * FROM place") - for rows.Next() { - err := rows.StructScan(&place) - if err != nil { - log.Fatalln(err) - } - fmt.Printf("%#v\n", place) - } - // Place{Country:"United States", City:sql.NullString{String:"New York", Valid:true}, TelCode:1} - // Place{Country:"Hong Kong", City:sql.NullString{String:"", Valid:false}, TelCode:852} - // Place{Country:"Singapore", City:sql.NullString{String:"", Valid:false}, TelCode:65} - - // Named queries, using `:name` as the bindvar. Automatic bindvar support - // which takes into account the dbtype based on the driverName on sqlx.Open/Connect - _, err = db.NamedExec(`INSERT INTO person (first_name,last_name,email) VALUES (:first,:last,:email)`, - map[string]interface{}{ - "first": "Bin", - "last": "Smuth", - "email": "bensmith@allblacks.nz", - }) - - // Selects Mr. Smith from the database - rows, err = db.NamedQuery(`SELECT * FROM person WHERE first_name=:fn`, map[string]interface{}{"fn": "Bin"}) - - // Named queries can also use structs. Their bind names follow the same rules - // as the name -> db mapping, so struct fields are lowercased and the `db` tag - // is taken into consideration. - rows, err = db.NamedQuery(`SELECT * FROM person WHERE first_name=:first_name`, jason) -} -``` - diff --git a/vendor/github.com/jmoiron/sqlx/bind.go b/vendor/github.com/jmoiron/sqlx/bind.go deleted file mode 100644 index 10f7bdf84..000000000 --- a/vendor/github.com/jmoiron/sqlx/bind.go +++ /dev/null @@ -1,207 +0,0 @@ -package sqlx - -import ( - "bytes" - "errors" - "reflect" - "strconv" - "strings" - - "github.com/jmoiron/sqlx/reflectx" -) - -// Bindvar types supported by Rebind, BindMap and BindStruct. -const ( - UNKNOWN = iota - QUESTION - DOLLAR - NAMED -) - -// BindType returns the bindtype for a given database given a drivername. -func BindType(driverName string) int { - switch driverName { - case "postgres", "pgx": - return DOLLAR - case "mysql": - return QUESTION - case "sqlite3": - return QUESTION - case "oci8", "ora", "goracle": - return NAMED - } - return UNKNOWN -} - -// FIXME: this should be able to be tolerant of escaped ?'s in queries without -// losing much speed, and should be to avoid confusion. - -// Rebind a query from the default bindtype (QUESTION) to the target bindtype. -func Rebind(bindType int, query string) string { - switch bindType { - case QUESTION, UNKNOWN: - return query - } - - // Add space enough for 10 params before we have to allocate - rqb := make([]byte, 0, len(query)+10) - - var i, j int - - for i = strings.Index(query, "?"); i != -1; i = strings.Index(query, "?") { - rqb = append(rqb, query[:i]...) - - switch bindType { - case DOLLAR: - rqb = append(rqb, '$') - case NAMED: - rqb = append(rqb, ':', 'a', 'r', 'g') - } - - j++ - rqb = strconv.AppendInt(rqb, int64(j), 10) - - query = query[i+1:] - } - - return string(append(rqb, query...)) -} - -// Experimental implementation of Rebind which uses a bytes.Buffer. The code is -// much simpler and should be more resistant to odd unicode, but it is twice as -// slow. Kept here for benchmarking purposes and to possibly replace Rebind if -// problems arise with its somewhat naive handling of unicode. -func rebindBuff(bindType int, query string) string { - if bindType != DOLLAR { - return query - } - - b := make([]byte, 0, len(query)) - rqb := bytes.NewBuffer(b) - j := 1 - for _, r := range query { - if r == '?' { - rqb.WriteRune('$') - rqb.WriteString(strconv.Itoa(j)) - j++ - } else { - rqb.WriteRune(r) - } - } - - return rqb.String() -} - -// In expands slice values in args, returning the modified query string -// and a new arg list that can be executed by a database. The `query` should -// use the `?` bindVar. The return value uses the `?` bindVar. -func In(query string, args ...interface{}) (string, []interface{}, error) { - // argMeta stores reflect.Value and length for slices and - // the value itself for non-slice arguments - type argMeta struct { - v reflect.Value - i interface{} - length int - } - - var flatArgsCount int - var anySlices bool - - meta := make([]argMeta, len(args)) - - for i, arg := range args { - v := reflect.ValueOf(arg) - t := reflectx.Deref(v.Type()) - - if t.Kind() == reflect.Slice { - meta[i].length = v.Len() - meta[i].v = v - - anySlices = true - flatArgsCount += meta[i].length - - if meta[i].length == 0 { - return "", nil, errors.New("empty slice passed to 'in' query") - } - } else { - meta[i].i = arg - flatArgsCount++ - } - } - - // don't do any parsing if there aren't any slices; note that this means - // some errors that we might have caught below will not be returned. - if !anySlices { - return query, args, nil - } - - newArgs := make([]interface{}, 0, flatArgsCount) - buf := bytes.NewBuffer(make([]byte, 0, len(query)+len(", ?")*flatArgsCount)) - - var arg, offset int - - for i := strings.IndexByte(query[offset:], '?'); i != -1; i = strings.IndexByte(query[offset:], '?') { - if arg >= len(meta) { - // if an argument wasn't passed, lets return an error; this is - // not actually how database/sql Exec/Query works, but since we are - // creating an argument list programmatically, we want to be able - // to catch these programmer errors earlier. - return "", nil, errors.New("number of bindVars exceeds arguments") - } - - argMeta := meta[arg] - arg++ - - // not a slice, continue. - // our questionmark will either be written before the next expansion - // of a slice or after the loop when writing the rest of the query - if argMeta.length == 0 { - offset = offset + i + 1 - newArgs = append(newArgs, argMeta.i) - continue - } - - // write everything up to and including our ? character - buf.WriteString(query[:offset+i+1]) - - for si := 1; si < argMeta.length; si++ { - buf.WriteString(", ?") - } - - newArgs = appendReflectSlice(newArgs, argMeta.v, argMeta.length) - - // slice the query and reset the offset. this avoids some bookkeeping for - // the write after the loop - query = query[offset+i+1:] - offset = 0 - } - - buf.WriteString(query) - - if arg < len(meta) { - return "", nil, errors.New("number of bindVars less than number arguments") - } - - return buf.String(), newArgs, nil -} - -func appendReflectSlice(args []interface{}, v reflect.Value, vlen int) []interface{} { - switch val := v.Interface().(type) { - case []interface{}: - args = append(args, val...) - case []int: - for i := range val { - args = append(args, val[i]) - } - case []string: - for i := range val { - args = append(args, val[i]) - } - default: - for si := 0; si < vlen; si++ { - args = append(args, v.Index(si).Interface()) - } - } - - return args -} diff --git a/vendor/github.com/jmoiron/sqlx/doc.go b/vendor/github.com/jmoiron/sqlx/doc.go deleted file mode 100644 index e2b4e60b2..000000000 --- a/vendor/github.com/jmoiron/sqlx/doc.go +++ /dev/null @@ -1,12 +0,0 @@ -// Package sqlx provides general purpose extensions to database/sql. -// -// It is intended to seamlessly wrap database/sql and provide convenience -// methods which are useful in the development of database driven applications. -// None of the underlying database/sql methods are changed. Instead all extended -// behavior is implemented through new methods defined on wrapper types. -// -// Additions include scanning into structs, named query support, rebinding -// queries for different drivers, convenient shorthands for common error handling -// and more. -// -package sqlx diff --git a/vendor/github.com/jmoiron/sqlx/named.go b/vendor/github.com/jmoiron/sqlx/named.go deleted file mode 100644 index dd899d351..000000000 --- a/vendor/github.com/jmoiron/sqlx/named.go +++ /dev/null @@ -1,344 +0,0 @@ -package sqlx - -// Named Query Support -// -// * BindMap - bind query bindvars to map/struct args -// * NamedExec, NamedQuery - named query w/ struct or map -// * NamedStmt - a pre-compiled named query which is a prepared statement -// -// Internal Interfaces: -// -// * compileNamedQuery - rebind a named query, returning a query and list of names -// * bindArgs, bindMapArgs, bindAnyArgs - given a list of names, return an arglist -// -import ( - "database/sql" - "errors" - "fmt" - "reflect" - "strconv" - "unicode" - - "github.com/jmoiron/sqlx/reflectx" -) - -// NamedStmt is a prepared statement that executes named queries. Prepare it -// how you would execute a NamedQuery, but pass in a struct or map when executing. -type NamedStmt struct { - Params []string - QueryString string - Stmt *Stmt -} - -// Close closes the named statement. -func (n *NamedStmt) Close() error { - return n.Stmt.Close() -} - -// Exec executes a named statement using the struct passed. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) Exec(arg interface{}) (sql.Result, error) { - args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) - if err != nil { - return *new(sql.Result), err - } - return n.Stmt.Exec(args...) -} - -// Query executes a named statement using the struct argument, returning rows. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) Query(arg interface{}) (*sql.Rows, error) { - args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) - if err != nil { - return nil, err - } - return n.Stmt.Query(args...) -} - -// QueryRow executes a named statement against the database. Because sqlx cannot -// create a *sql.Row with an error condition pre-set for binding errors, sqlx -// returns a *sqlx.Row instead. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) QueryRow(arg interface{}) *Row { - args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) - if err != nil { - return &Row{err: err} - } - return n.Stmt.QueryRowx(args...) -} - -// MustExec execs a NamedStmt, panicing on error -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) MustExec(arg interface{}) sql.Result { - res, err := n.Exec(arg) - if err != nil { - panic(err) - } - return res -} - -// Queryx using this NamedStmt -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) Queryx(arg interface{}) (*Rows, error) { - r, err := n.Query(arg) - if err != nil { - return nil, err - } - return &Rows{Rows: r, Mapper: n.Stmt.Mapper, unsafe: isUnsafe(n)}, err -} - -// QueryRowx this NamedStmt. Because of limitations with QueryRow, this is -// an alias for QueryRow. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) QueryRowx(arg interface{}) *Row { - return n.QueryRow(arg) -} - -// Select using this NamedStmt -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) Select(dest interface{}, arg interface{}) error { - rows, err := n.Queryx(arg) - if err != nil { - return err - } - // if something happens here, we want to make sure the rows are Closed - defer rows.Close() - return scanAll(rows, dest, false) -} - -// Get using this NamedStmt -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) Get(dest interface{}, arg interface{}) error { - r := n.QueryRowx(arg) - return r.scanAny(dest, false) -} - -// Unsafe creates an unsafe version of the NamedStmt -func (n *NamedStmt) Unsafe() *NamedStmt { - r := &NamedStmt{Params: n.Params, Stmt: n.Stmt, QueryString: n.QueryString} - r.Stmt.unsafe = true - return r -} - -// A union interface of preparer and binder, required to be able to prepare -// named statements (as the bindtype must be determined). -type namedPreparer interface { - Preparer - binder -} - -func prepareNamed(p namedPreparer, query string) (*NamedStmt, error) { - bindType := BindType(p.DriverName()) - q, args, err := compileNamedQuery([]byte(query), bindType) - if err != nil { - return nil, err - } - stmt, err := Preparex(p, q) - if err != nil { - return nil, err - } - return &NamedStmt{ - QueryString: q, - Params: args, - Stmt: stmt, - }, nil -} - -func bindAnyArgs(names []string, arg interface{}, m *reflectx.Mapper) ([]interface{}, error) { - if maparg, ok := arg.(map[string]interface{}); ok { - return bindMapArgs(names, maparg) - } - return bindArgs(names, arg, m) -} - -// private interface to generate a list of interfaces from a given struct -// type, given a list of names to pull out of the struct. Used by public -// BindStruct interface. -func bindArgs(names []string, arg interface{}, m *reflectx.Mapper) ([]interface{}, error) { - arglist := make([]interface{}, 0, len(names)) - - // grab the indirected value of arg - v := reflect.ValueOf(arg) - for v = reflect.ValueOf(arg); v.Kind() == reflect.Ptr; { - v = v.Elem() - } - - fields := m.TraversalsByName(v.Type(), names) - for i, t := range fields { - if len(t) == 0 { - return arglist, fmt.Errorf("could not find name %s in %#v", names[i], arg) - } - val := reflectx.FieldByIndexesReadOnly(v, t) - arglist = append(arglist, val.Interface()) - } - - return arglist, nil -} - -// like bindArgs, but for maps. -func bindMapArgs(names []string, arg map[string]interface{}) ([]interface{}, error) { - arglist := make([]interface{}, 0, len(names)) - - for _, name := range names { - val, ok := arg[name] - if !ok { - return arglist, fmt.Errorf("could not find name %s in %#v", name, arg) - } - arglist = append(arglist, val) - } - return arglist, nil -} - -// bindStruct binds a named parameter query with fields from a struct argument. -// The rules for binding field names to parameter names follow the same -// conventions as for StructScan, including obeying the `db` struct tags. -func bindStruct(bindType int, query string, arg interface{}, m *reflectx.Mapper) (string, []interface{}, error) { - bound, names, err := compileNamedQuery([]byte(query), bindType) - if err != nil { - return "", []interface{}{}, err - } - - arglist, err := bindArgs(names, arg, m) - if err != nil { - return "", []interface{}{}, err - } - - return bound, arglist, nil -} - -// bindMap binds a named parameter query with a map of arguments. -func bindMap(bindType int, query string, args map[string]interface{}) (string, []interface{}, error) { - bound, names, err := compileNamedQuery([]byte(query), bindType) - if err != nil { - return "", []interface{}{}, err - } - - arglist, err := bindMapArgs(names, args) - return bound, arglist, err -} - -// -- Compilation of Named Queries - -// Allow digits and letters in bind params; additionally runes are -// checked against underscores, meaning that bind params can have be -// alphanumeric with underscores. Mind the difference between unicode -// digits and numbers, where '5' is a digit but '五' is not. -var allowedBindRunes = []*unicode.RangeTable{unicode.Letter, unicode.Digit} - -// FIXME: this function isn't safe for unicode named params, as a failing test -// can testify. This is not a regression but a failure of the original code -// as well. It should be modified to range over runes in a string rather than -// bytes, even though this is less convenient and slower. Hopefully the -// addition of the prepared NamedStmt (which will only do this once) will make -// up for the slightly slower ad-hoc NamedExec/NamedQuery. - -// compile a NamedQuery into an unbound query (using the '?' bindvar) and -// a list of names. -func compileNamedQuery(qs []byte, bindType int) (query string, names []string, err error) { - names = make([]string, 0, 10) - rebound := make([]byte, 0, len(qs)) - - inName := false - last := len(qs) - 1 - currentVar := 1 - name := make([]byte, 0, 10) - - for i, b := range qs { - // a ':' while we're in a name is an error - if b == ':' { - // if this is the second ':' in a '::' escape sequence, append a ':' - if inName && i > 0 && qs[i-1] == ':' { - rebound = append(rebound, ':') - inName = false - continue - } else if inName { - err = errors.New("unexpected `:` while reading named param at " + strconv.Itoa(i)) - return query, names, err - } - inName = true - name = []byte{} - // if we're in a name, and this is an allowed character, continue - } else if inName && (unicode.IsOneOf(allowedBindRunes, rune(b)) || b == '_' || b == '.') && i != last { - // append the byte to the name if we are in a name and not on the last byte - name = append(name, b) - // if we're in a name and it's not an allowed character, the name is done - } else if inName { - inName = false - // if this is the final byte of the string and it is part of the name, then - // make sure to add it to the name - if i == last && unicode.IsOneOf(allowedBindRunes, rune(b)) { - name = append(name, b) - } - // add the string representation to the names list - names = append(names, string(name)) - // add a proper bindvar for the bindType - switch bindType { - // oracle only supports named type bind vars even for positional - case NAMED: - rebound = append(rebound, ':') - rebound = append(rebound, name...) - case QUESTION, UNKNOWN: - rebound = append(rebound, '?') - case DOLLAR: - rebound = append(rebound, '$') - for _, b := range strconv.Itoa(currentVar) { - rebound = append(rebound, byte(b)) - } - currentVar++ - } - // add this byte to string unless it was not part of the name - if i != last { - rebound = append(rebound, b) - } else if !unicode.IsOneOf(allowedBindRunes, rune(b)) { - rebound = append(rebound, b) - } - } else { - // this is a normal byte and should just go onto the rebound query - rebound = append(rebound, b) - } - } - - return string(rebound), names, err -} - -// BindNamed binds a struct or a map to a query with named parameters. -// DEPRECATED: use sqlx.Named` instead of this, it may be removed in future. -func BindNamed(bindType int, query string, arg interface{}) (string, []interface{}, error) { - return bindNamedMapper(bindType, query, arg, mapper()) -} - -// Named takes a query using named parameters and an argument and -// returns a new query with a list of args that can be executed by -// a database. The return value uses the `?` bindvar. -func Named(query string, arg interface{}) (string, []interface{}, error) { - return bindNamedMapper(QUESTION, query, arg, mapper()) -} - -func bindNamedMapper(bindType int, query string, arg interface{}, m *reflectx.Mapper) (string, []interface{}, error) { - if maparg, ok := arg.(map[string]interface{}); ok { - return bindMap(bindType, query, maparg) - } - return bindStruct(bindType, query, arg, m) -} - -// NamedQuery binds a named query and then runs Query on the result using the -// provided Ext (sqlx.Tx, sqlx.Db). It works with both structs and with -// map[string]interface{} types. -func NamedQuery(e Ext, query string, arg interface{}) (*Rows, error) { - q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) - if err != nil { - return nil, err - } - return e.Queryx(q, args...) -} - -// NamedExec uses BindStruct to get a query executable by the driver and -// then runs Exec on the result. Returns an error from the binding -// or the query excution itself. -func NamedExec(e Ext, query string, arg interface{}) (sql.Result, error) { - q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) - if err != nil { - return nil, err - } - return e.Exec(q, args...) -} diff --git a/vendor/github.com/jmoiron/sqlx/named_context.go b/vendor/github.com/jmoiron/sqlx/named_context.go deleted file mode 100644 index 9405007e2..000000000 --- a/vendor/github.com/jmoiron/sqlx/named_context.go +++ /dev/null @@ -1,132 +0,0 @@ -// +build go1.8 - -package sqlx - -import ( - "context" - "database/sql" -) - -// A union interface of contextPreparer and binder, required to be able to -// prepare named statements with context (as the bindtype must be determined). -type namedPreparerContext interface { - PreparerContext - binder -} - -func prepareNamedContext(ctx context.Context, p namedPreparerContext, query string) (*NamedStmt, error) { - bindType := BindType(p.DriverName()) - q, args, err := compileNamedQuery([]byte(query), bindType) - if err != nil { - return nil, err - } - stmt, err := PreparexContext(ctx, p, q) - if err != nil { - return nil, err - } - return &NamedStmt{ - QueryString: q, - Params: args, - Stmt: stmt, - }, nil -} - -// ExecContext executes a named statement using the struct passed. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) ExecContext(ctx context.Context, arg interface{}) (sql.Result, error) { - args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) - if err != nil { - return *new(sql.Result), err - } - return n.Stmt.ExecContext(ctx, args...) -} - -// QueryContext executes a named statement using the struct argument, returning rows. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) QueryContext(ctx context.Context, arg interface{}) (*sql.Rows, error) { - args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) - if err != nil { - return nil, err - } - return n.Stmt.QueryContext(ctx, args...) -} - -// QueryRowContext executes a named statement against the database. Because sqlx cannot -// create a *sql.Row with an error condition pre-set for binding errors, sqlx -// returns a *sqlx.Row instead. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) QueryRowContext(ctx context.Context, arg interface{}) *Row { - args, err := bindAnyArgs(n.Params, arg, n.Stmt.Mapper) - if err != nil { - return &Row{err: err} - } - return n.Stmt.QueryRowxContext(ctx, args...) -} - -// MustExecContext execs a NamedStmt, panicing on error -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) MustExecContext(ctx context.Context, arg interface{}) sql.Result { - res, err := n.ExecContext(ctx, arg) - if err != nil { - panic(err) - } - return res -} - -// QueryxContext using this NamedStmt -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) QueryxContext(ctx context.Context, arg interface{}) (*Rows, error) { - r, err := n.QueryContext(ctx, arg) - if err != nil { - return nil, err - } - return &Rows{Rows: r, Mapper: n.Stmt.Mapper, unsafe: isUnsafe(n)}, err -} - -// QueryRowxContext this NamedStmt. Because of limitations with QueryRow, this is -// an alias for QueryRow. -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) QueryRowxContext(ctx context.Context, arg interface{}) *Row { - return n.QueryRowContext(ctx, arg) -} - -// SelectContext using this NamedStmt -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) SelectContext(ctx context.Context, dest interface{}, arg interface{}) error { - rows, err := n.QueryxContext(ctx, arg) - if err != nil { - return err - } - // if something happens here, we want to make sure the rows are Closed - defer rows.Close() - return scanAll(rows, dest, false) -} - -// GetContext using this NamedStmt -// Any named placeholder parameters are replaced with fields from arg. -func (n *NamedStmt) GetContext(ctx context.Context, dest interface{}, arg interface{}) error { - r := n.QueryRowxContext(ctx, arg) - return r.scanAny(dest, false) -} - -// NamedQueryContext binds a named query and then runs Query on the result using the -// provided Ext (sqlx.Tx, sqlx.Db). It works with both structs and with -// map[string]interface{} types. -func NamedQueryContext(ctx context.Context, e ExtContext, query string, arg interface{}) (*Rows, error) { - q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) - if err != nil { - return nil, err - } - return e.QueryxContext(ctx, q, args...) -} - -// NamedExecContext uses BindStruct to get a query executable by the driver and -// then runs Exec on the result. Returns an error from the binding -// or the query excution itself. -func NamedExecContext(ctx context.Context, e ExtContext, query string, arg interface{}) (sql.Result, error) { - q, args, err := bindNamedMapper(BindType(e.DriverName()), query, arg, mapperFor(e)) - if err != nil { - return nil, err - } - return e.ExecContext(ctx, q, args...) -} diff --git a/vendor/github.com/jmoiron/sqlx/named_context_test.go b/vendor/github.com/jmoiron/sqlx/named_context_test.go deleted file mode 100644 index 87e94ac22..000000000 --- a/vendor/github.com/jmoiron/sqlx/named_context_test.go +++ /dev/null @@ -1,136 +0,0 @@ -// +build go1.8 - -package sqlx - -import ( - "context" - "database/sql" - "testing" -) - -func TestNamedContextQueries(t *testing.T) { - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - test := Test{t} - var ns *NamedStmt - var err error - - ctx := context.Background() - - // Check that invalid preparations fail - ns, err = db.PrepareNamedContext(ctx, "SELECT * FROM person WHERE first_name=:first:name") - if err == nil { - t.Error("Expected an error with invalid prepared statement.") - } - - ns, err = db.PrepareNamedContext(ctx, "invalid sql") - if err == nil { - t.Error("Expected an error with invalid prepared statement.") - } - - // Check closing works as anticipated - ns, err = db.PrepareNamedContext(ctx, "SELECT * FROM person WHERE first_name=:first_name") - test.Error(err) - err = ns.Close() - test.Error(err) - - ns, err = db.PrepareNamedContext(ctx, ` - SELECT first_name, last_name, email - FROM person WHERE first_name=:first_name AND email=:email`) - test.Error(err) - - // test Queryx w/ uses Query - p := Person{FirstName: "Jason", LastName: "Moiron", Email: "jmoiron@jmoiron.net"} - - rows, err := ns.QueryxContext(ctx, p) - test.Error(err) - for rows.Next() { - var p2 Person - rows.StructScan(&p2) - if p.FirstName != p2.FirstName { - t.Errorf("got %s, expected %s", p.FirstName, p2.FirstName) - } - if p.LastName != p2.LastName { - t.Errorf("got %s, expected %s", p.LastName, p2.LastName) - } - if p.Email != p2.Email { - t.Errorf("got %s, expected %s", p.Email, p2.Email) - } - } - - // test Select - people := make([]Person, 0, 5) - err = ns.SelectContext(ctx, &people, p) - test.Error(err) - - if len(people) != 1 { - t.Errorf("got %d results, expected %d", len(people), 1) - } - if p.FirstName != people[0].FirstName { - t.Errorf("got %s, expected %s", p.FirstName, people[0].FirstName) - } - if p.LastName != people[0].LastName { - t.Errorf("got %s, expected %s", p.LastName, people[0].LastName) - } - if p.Email != people[0].Email { - t.Errorf("got %s, expected %s", p.Email, people[0].Email) - } - - // test Exec - ns, err = db.PrepareNamedContext(ctx, ` - INSERT INTO person (first_name, last_name, email) - VALUES (:first_name, :last_name, :email)`) - test.Error(err) - - js := Person{ - FirstName: "Julien", - LastName: "Savea", - Email: "jsavea@ab.co.nz", - } - _, err = ns.ExecContext(ctx, js) - test.Error(err) - - // Make sure we can pull him out again - p2 := Person{} - db.GetContext(ctx, &p2, db.Rebind("SELECT * FROM person WHERE email=?"), js.Email) - if p2.Email != js.Email { - t.Errorf("expected %s, got %s", js.Email, p2.Email) - } - - // test Txn NamedStmts - tx := db.MustBeginTx(ctx, nil) - txns := tx.NamedStmtContext(ctx, ns) - - // We're going to add Steven in this txn - sl := Person{ - FirstName: "Steven", - LastName: "Luatua", - Email: "sluatua@ab.co.nz", - } - - _, err = txns.ExecContext(ctx, sl) - test.Error(err) - // then rollback... - tx.Rollback() - // looking for Steven after a rollback should fail - err = db.GetContext(ctx, &p2, db.Rebind("SELECT * FROM person WHERE email=?"), sl.Email) - if err != sql.ErrNoRows { - t.Errorf("expected no rows error, got %v", err) - } - - // now do the same, but commit - tx = db.MustBeginTx(ctx, nil) - txns = tx.NamedStmtContext(ctx, ns) - _, err = txns.ExecContext(ctx, sl) - test.Error(err) - tx.Commit() - - // looking for Steven after a Commit should succeed - err = db.GetContext(ctx, &p2, db.Rebind("SELECT * FROM person WHERE email=?"), sl.Email) - test.Error(err) - if p2.Email != sl.Email { - t.Errorf("expected %s, got %s", sl.Email, p2.Email) - } - - }) -} diff --git a/vendor/github.com/jmoiron/sqlx/named_test.go b/vendor/github.com/jmoiron/sqlx/named_test.go deleted file mode 100644 index d3459a86f..000000000 --- a/vendor/github.com/jmoiron/sqlx/named_test.go +++ /dev/null @@ -1,227 +0,0 @@ -package sqlx - -import ( - "database/sql" - "testing" -) - -func TestCompileQuery(t *testing.T) { - table := []struct { - Q, R, D, N string - V []string - }{ - // basic test for named parameters, invalid char ',' terminating - { - Q: `INSERT INTO foo (a,b,c,d) VALUES (:name, :age, :first, :last)`, - R: `INSERT INTO foo (a,b,c,d) VALUES (?, ?, ?, ?)`, - D: `INSERT INTO foo (a,b,c,d) VALUES ($1, $2, $3, $4)`, - N: `INSERT INTO foo (a,b,c,d) VALUES (:name, :age, :first, :last)`, - V: []string{"name", "age", "first", "last"}, - }, - // This query tests a named parameter ending the string as well as numbers - { - Q: `SELECT * FROM a WHERE first_name=:name1 AND last_name=:name2`, - R: `SELECT * FROM a WHERE first_name=? AND last_name=?`, - D: `SELECT * FROM a WHERE first_name=$1 AND last_name=$2`, - N: `SELECT * FROM a WHERE first_name=:name1 AND last_name=:name2`, - V: []string{"name1", "name2"}, - }, - { - Q: `SELECT "::foo" FROM a WHERE first_name=:name1 AND last_name=:name2`, - R: `SELECT ":foo" FROM a WHERE first_name=? AND last_name=?`, - D: `SELECT ":foo" FROM a WHERE first_name=$1 AND last_name=$2`, - N: `SELECT ":foo" FROM a WHERE first_name=:name1 AND last_name=:name2`, - V: []string{"name1", "name2"}, - }, - { - Q: `SELECT 'a::b::c' || first_name, '::::ABC::_::' FROM person WHERE first_name=:first_name AND last_name=:last_name`, - R: `SELECT 'a:b:c' || first_name, '::ABC:_:' FROM person WHERE first_name=? AND last_name=?`, - D: `SELECT 'a:b:c' || first_name, '::ABC:_:' FROM person WHERE first_name=$1 AND last_name=$2`, - N: `SELECT 'a:b:c' || first_name, '::ABC:_:' FROM person WHERE first_name=:first_name AND last_name=:last_name`, - V: []string{"first_name", "last_name"}, - }, - /* This unicode awareness test sadly fails, because of our byte-wise worldview. - * We could certainly iterate by Rune instead, though it's a great deal slower, - * it's probably the RightWay(tm) - { - Q: `INSERT INTO foo (a,b,c,d) VALUES (:あ, :b, :キコ, :名前)`, - R: `INSERT INTO foo (a,b,c,d) VALUES (?, ?, ?, ?)`, - D: `INSERT INTO foo (a,b,c,d) VALUES ($1, $2, $3, $4)`, - N: []string{"name", "age", "first", "last"}, - }, - */ - } - - for _, test := range table { - qr, names, err := compileNamedQuery([]byte(test.Q), QUESTION) - if err != nil { - t.Error(err) - } - if qr != test.R { - t.Errorf("expected %s, got %s", test.R, qr) - } - if len(names) != len(test.V) { - t.Errorf("expected %#v, got %#v", test.V, names) - } else { - for i, name := range names { - if name != test.V[i] { - t.Errorf("expected %dth name to be %s, got %s", i+1, test.V[i], name) - } - } - } - qd, _, _ := compileNamedQuery([]byte(test.Q), DOLLAR) - if qd != test.D { - t.Errorf("\nexpected: `%s`\ngot: `%s`", test.D, qd) - } - - qq, _, _ := compileNamedQuery([]byte(test.Q), NAMED) - if qq != test.N { - t.Errorf("\nexpected: `%s`\ngot: `%s`\n(len: %d vs %d)", test.N, qq, len(test.N), len(qq)) - } - } -} - -type Test struct { - t *testing.T -} - -func (t Test) Error(err error, msg ...interface{}) { - if err != nil { - if len(msg) == 0 { - t.t.Error(err) - } else { - t.t.Error(msg...) - } - } -} - -func (t Test) Errorf(err error, format string, args ...interface{}) { - if err != nil { - t.t.Errorf(format, args...) - } -} - -func TestNamedQueries(t *testing.T) { - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - test := Test{t} - var ns *NamedStmt - var err error - - // Check that invalid preparations fail - ns, err = db.PrepareNamed("SELECT * FROM person WHERE first_name=:first:name") - if err == nil { - t.Error("Expected an error with invalid prepared statement.") - } - - ns, err = db.PrepareNamed("invalid sql") - if err == nil { - t.Error("Expected an error with invalid prepared statement.") - } - - // Check closing works as anticipated - ns, err = db.PrepareNamed("SELECT * FROM person WHERE first_name=:first_name") - test.Error(err) - err = ns.Close() - test.Error(err) - - ns, err = db.PrepareNamed(` - SELECT first_name, last_name, email - FROM person WHERE first_name=:first_name AND email=:email`) - test.Error(err) - - // test Queryx w/ uses Query - p := Person{FirstName: "Jason", LastName: "Moiron", Email: "jmoiron@jmoiron.net"} - - rows, err := ns.Queryx(p) - test.Error(err) - for rows.Next() { - var p2 Person - rows.StructScan(&p2) - if p.FirstName != p2.FirstName { - t.Errorf("got %s, expected %s", p.FirstName, p2.FirstName) - } - if p.LastName != p2.LastName { - t.Errorf("got %s, expected %s", p.LastName, p2.LastName) - } - if p.Email != p2.Email { - t.Errorf("got %s, expected %s", p.Email, p2.Email) - } - } - - // test Select - people := make([]Person, 0, 5) - err = ns.Select(&people, p) - test.Error(err) - - if len(people) != 1 { - t.Errorf("got %d results, expected %d", len(people), 1) - } - if p.FirstName != people[0].FirstName { - t.Errorf("got %s, expected %s", p.FirstName, people[0].FirstName) - } - if p.LastName != people[0].LastName { - t.Errorf("got %s, expected %s", p.LastName, people[0].LastName) - } - if p.Email != people[0].Email { - t.Errorf("got %s, expected %s", p.Email, people[0].Email) - } - - // test Exec - ns, err = db.PrepareNamed(` - INSERT INTO person (first_name, last_name, email) - VALUES (:first_name, :last_name, :email)`) - test.Error(err) - - js := Person{ - FirstName: "Julien", - LastName: "Savea", - Email: "jsavea@ab.co.nz", - } - _, err = ns.Exec(js) - test.Error(err) - - // Make sure we can pull him out again - p2 := Person{} - db.Get(&p2, db.Rebind("SELECT * FROM person WHERE email=?"), js.Email) - if p2.Email != js.Email { - t.Errorf("expected %s, got %s", js.Email, p2.Email) - } - - // test Txn NamedStmts - tx := db.MustBegin() - txns := tx.NamedStmt(ns) - - // We're going to add Steven in this txn - sl := Person{ - FirstName: "Steven", - LastName: "Luatua", - Email: "sluatua@ab.co.nz", - } - - _, err = txns.Exec(sl) - test.Error(err) - // then rollback... - tx.Rollback() - // looking for Steven after a rollback should fail - err = db.Get(&p2, db.Rebind("SELECT * FROM person WHERE email=?"), sl.Email) - if err != sql.ErrNoRows { - t.Errorf("expected no rows error, got %v", err) - } - - // now do the same, but commit - tx = db.MustBegin() - txns = tx.NamedStmt(ns) - _, err = txns.Exec(sl) - test.Error(err) - tx.Commit() - - // looking for Steven after a Commit should succeed - err = db.Get(&p2, db.Rebind("SELECT * FROM person WHERE email=?"), sl.Email) - test.Error(err) - if p2.Email != sl.Email { - t.Errorf("expected %s, got %s", sl.Email, p2.Email) - } - - }) -} diff --git a/vendor/github.com/jmoiron/sqlx/reflectx/README.md b/vendor/github.com/jmoiron/sqlx/reflectx/README.md deleted file mode 100644 index f01d3d1f0..000000000 --- a/vendor/github.com/jmoiron/sqlx/reflectx/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# reflectx - -The sqlx package has special reflect needs. In particular, it needs to: - -* be able to map a name to a field -* understand embedded structs -* understand mapping names to fields by a particular tag -* user specified name -> field mapping functions - -These behaviors mimic the behaviors by the standard library marshallers and also the -behavior of standard Go accessors. - -The first two are amply taken care of by `Reflect.Value.FieldByName`, and the third is -addressed by `Reflect.Value.FieldByNameFunc`, but these don't quite understand struct -tags in the ways that are vital to most marshallers, and they are slow. - -This reflectx package extends reflect to achieve these goals. diff --git a/vendor/github.com/jmoiron/sqlx/reflectx/reflect.go b/vendor/github.com/jmoiron/sqlx/reflectx/reflect.go deleted file mode 100644 index f2802b80b..000000000 --- a/vendor/github.com/jmoiron/sqlx/reflectx/reflect.go +++ /dev/null @@ -1,422 +0,0 @@ -// Package reflectx implements extensions to the standard reflect lib suitable -// for implementing marshalling and unmarshalling packages. The main Mapper type -// allows for Go-compatible named attribute access, including accessing embedded -// struct attributes and the ability to use functions and struct tags to -// customize field names. -// -package reflectx - -import ( - "reflect" - "runtime" - "strings" - "sync" -) - -// A FieldInfo is metadata for a struct field. -type FieldInfo struct { - Index []int - Path string - Field reflect.StructField - Zero reflect.Value - Name string - Options map[string]string - Embedded bool - Children []*FieldInfo - Parent *FieldInfo -} - -// A StructMap is an index of field metadata for a struct. -type StructMap struct { - Tree *FieldInfo - Index []*FieldInfo - Paths map[string]*FieldInfo - Names map[string]*FieldInfo -} - -// GetByPath returns a *FieldInfo for a given string path. -func (f StructMap) GetByPath(path string) *FieldInfo { - return f.Paths[path] -} - -// GetByTraversal returns a *FieldInfo for a given integer path. It is -// analogous to reflect.FieldByIndex, but using the cached traversal -// rather than re-executing the reflect machinery each time. -func (f StructMap) GetByTraversal(index []int) *FieldInfo { - if len(index) == 0 { - return nil - } - - tree := f.Tree - for _, i := range index { - if i >= len(tree.Children) || tree.Children[i] == nil { - return nil - } - tree = tree.Children[i] - } - return tree -} - -// Mapper is a general purpose mapper of names to struct fields. A Mapper -// behaves like most marshallers in the standard library, obeying a field tag -// for name mapping but also providing a basic transform function. -type Mapper struct { - cache map[reflect.Type]*StructMap - tagName string - tagMapFunc func(string) string - mapFunc func(string) string - mutex sync.Mutex -} - -// NewMapper returns a new mapper using the tagName as its struct field tag. -// If tagName is the empty string, it is ignored. -func NewMapper(tagName string) *Mapper { - return &Mapper{ - cache: make(map[reflect.Type]*StructMap), - tagName: tagName, - } -} - -// NewMapperTagFunc returns a new mapper which contains a mapper for field names -// AND a mapper for tag values. This is useful for tags like json which can -// have values like "name,omitempty". -func NewMapperTagFunc(tagName string, mapFunc, tagMapFunc func(string) string) *Mapper { - return &Mapper{ - cache: make(map[reflect.Type]*StructMap), - tagName: tagName, - mapFunc: mapFunc, - tagMapFunc: tagMapFunc, - } -} - -// NewMapperFunc returns a new mapper which optionally obeys a field tag and -// a struct field name mapper func given by f. Tags will take precedence, but -// for any other field, the mapped name will be f(field.Name) -func NewMapperFunc(tagName string, f func(string) string) *Mapper { - return &Mapper{ - cache: make(map[reflect.Type]*StructMap), - tagName: tagName, - mapFunc: f, - } -} - -// TypeMap returns a mapping of field strings to int slices representing -// the traversal down the struct to reach the field. -func (m *Mapper) TypeMap(t reflect.Type) *StructMap { - m.mutex.Lock() - mapping, ok := m.cache[t] - if !ok { - mapping = getMapping(t, m.tagName, m.mapFunc, m.tagMapFunc) - m.cache[t] = mapping - } - m.mutex.Unlock() - return mapping -} - -// FieldMap returns the mapper's mapping of field names to reflect values. Panics -// if v's Kind is not Struct, or v is not Indirectable to a struct kind. -func (m *Mapper) FieldMap(v reflect.Value) map[string]reflect.Value { - v = reflect.Indirect(v) - mustBe(v, reflect.Struct) - - r := map[string]reflect.Value{} - tm := m.TypeMap(v.Type()) - for tagName, fi := range tm.Names { - r[tagName] = FieldByIndexes(v, fi.Index) - } - return r -} - -// FieldByName returns a field by its mapped name as a reflect.Value. -// Panics if v's Kind is not Struct or v is not Indirectable to a struct Kind. -// Returns zero Value if the name is not found. -func (m *Mapper) FieldByName(v reflect.Value, name string) reflect.Value { - v = reflect.Indirect(v) - mustBe(v, reflect.Struct) - - tm := m.TypeMap(v.Type()) - fi, ok := tm.Names[name] - if !ok { - return v - } - return FieldByIndexes(v, fi.Index) -} - -// FieldsByName returns a slice of values corresponding to the slice of names -// for the value. Panics if v's Kind is not Struct or v is not Indirectable -// to a struct Kind. Returns zero Value for each name not found. -func (m *Mapper) FieldsByName(v reflect.Value, names []string) []reflect.Value { - v = reflect.Indirect(v) - mustBe(v, reflect.Struct) - - tm := m.TypeMap(v.Type()) - vals := make([]reflect.Value, 0, len(names)) - for _, name := range names { - fi, ok := tm.Names[name] - if !ok { - vals = append(vals, *new(reflect.Value)) - } else { - vals = append(vals, FieldByIndexes(v, fi.Index)) - } - } - return vals -} - -// TraversalsByName returns a slice of int slices which represent the struct -// traversals for each mapped name. Panics if t is not a struct or Indirectable -// to a struct. Returns empty int slice for each name not found. -func (m *Mapper) TraversalsByName(t reflect.Type, names []string) [][]int { - t = Deref(t) - mustBe(t, reflect.Struct) - tm := m.TypeMap(t) - - r := make([][]int, 0, len(names)) - for _, name := range names { - fi, ok := tm.Names[name] - if !ok { - r = append(r, []int{}) - } else { - r = append(r, fi.Index) - } - } - return r -} - -// FieldByIndexes returns a value for the field given by the struct traversal -// for the given value. -func FieldByIndexes(v reflect.Value, indexes []int) reflect.Value { - for _, i := range indexes { - v = reflect.Indirect(v).Field(i) - // if this is a pointer and it's nil, allocate a new value and set it - if v.Kind() == reflect.Ptr && v.IsNil() { - alloc := reflect.New(Deref(v.Type())) - v.Set(alloc) - } - if v.Kind() == reflect.Map && v.IsNil() { - v.Set(reflect.MakeMap(v.Type())) - } - } - return v -} - -// FieldByIndexesReadOnly returns a value for a particular struct traversal, -// but is not concerned with allocating nil pointers because the value is -// going to be used for reading and not setting. -func FieldByIndexesReadOnly(v reflect.Value, indexes []int) reflect.Value { - for _, i := range indexes { - v = reflect.Indirect(v).Field(i) - } - return v -} - -// Deref is Indirect for reflect.Types -func Deref(t reflect.Type) reflect.Type { - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - return t -} - -// -- helpers & utilities -- - -type kinder interface { - Kind() reflect.Kind -} - -// mustBe checks a value against a kind, panicing with a reflect.ValueError -// if the kind isn't that which is required. -func mustBe(v kinder, expected reflect.Kind) { - if k := v.Kind(); k != expected { - panic(&reflect.ValueError{Method: methodName(), Kind: k}) - } -} - -// methodName returns the caller of the function calling methodName -func methodName() string { - pc, _, _, _ := runtime.Caller(2) - f := runtime.FuncForPC(pc) - if f == nil { - return "unknown method" - } - return f.Name() -} - -type typeQueue struct { - t reflect.Type - fi *FieldInfo - pp string // Parent path -} - -// A copying append that creates a new slice each time. -func apnd(is []int, i int) []int { - x := make([]int, len(is)+1) - for p, n := range is { - x[p] = n - } - x[len(x)-1] = i - return x -} - -type mapf func(string) string - -// parseName parses the tag and the target name for the given field using -// the tagName (eg 'json' for `json:"foo"` tags), mapFunc for mapping the -// field's name to a target name, and tagMapFunc for mapping the tag to -// a target name. -func parseName(field reflect.StructField, tagName string, mapFunc, tagMapFunc mapf) (tag, fieldName string) { - // first, set the fieldName to the field's name - fieldName = field.Name - // if a mapFunc is set, use that to override the fieldName - if mapFunc != nil { - fieldName = mapFunc(fieldName) - } - - // if there's no tag to look for, return the field name - if tagName == "" { - return "", fieldName - } - - // if this tag is not set using the normal convention in the tag, - // then return the fieldname.. this check is done because according - // to the reflect documentation: - // If the tag does not have the conventional format, - // the value returned by Get is unspecified. - // which doesn't sound great. - if !strings.Contains(string(field.Tag), tagName+":") { - return "", fieldName - } - - // at this point we're fairly sure that we have a tag, so lets pull it out - tag = field.Tag.Get(tagName) - - // if we have a mapper function, call it on the whole tag - // XXX: this is a change from the old version, which pulled out the name - // before the tagMapFunc could be run, but I think this is the right way - if tagMapFunc != nil { - tag = tagMapFunc(tag) - } - - // finally, split the options from the name - parts := strings.Split(tag, ",") - fieldName = parts[0] - - return tag, fieldName -} - -// parseOptions parses options out of a tag string, skipping the name -func parseOptions(tag string) map[string]string { - parts := strings.Split(tag, ",") - options := make(map[string]string, len(parts)) - if len(parts) > 1 { - for _, opt := range parts[1:] { - // short circuit potentially expensive split op - if strings.Contains(opt, "=") { - kv := strings.Split(opt, "=") - options[kv[0]] = kv[1] - continue - } - options[opt] = "" - } - } - return options -} - -// getMapping returns a mapping for the t type, using the tagName, mapFunc and -// tagMapFunc to determine the canonical names of fields. -func getMapping(t reflect.Type, tagName string, mapFunc, tagMapFunc mapf) *StructMap { - m := []*FieldInfo{} - - root := &FieldInfo{} - queue := []typeQueue{} - queue = append(queue, typeQueue{Deref(t), root, ""}) - -QueueLoop: - for len(queue) != 0 { - // pop the first item off of the queue - tq := queue[0] - queue = queue[1:] - - // ignore recursive field - for p := tq.fi.Parent; p != nil; p = p.Parent { - if tq.fi.Field.Type == p.Field.Type { - continue QueueLoop - } - } - - nChildren := 0 - if tq.t.Kind() == reflect.Struct { - nChildren = tq.t.NumField() - } - tq.fi.Children = make([]*FieldInfo, nChildren) - - // iterate through all of its fields - for fieldPos := 0; fieldPos < nChildren; fieldPos++ { - - f := tq.t.Field(fieldPos) - - // parse the tag and the target name using the mapping options for this field - tag, name := parseName(f, tagName, mapFunc, tagMapFunc) - - // if the name is "-", disabled via a tag, skip it - if name == "-" { - continue - } - - fi := FieldInfo{ - Field: f, - Name: name, - Zero: reflect.New(f.Type).Elem(), - Options: parseOptions(tag), - } - - // if the path is empty this path is just the name - if tq.pp == "" { - fi.Path = fi.Name - } else { - fi.Path = tq.pp + "." + fi.Name - } - - // skip unexported fields - if len(f.PkgPath) != 0 && !f.Anonymous { - continue - } - - // bfs search of anonymous embedded structs - if f.Anonymous { - pp := tq.pp - if tag != "" { - pp = fi.Path - } - - fi.Embedded = true - fi.Index = apnd(tq.fi.Index, fieldPos) - nChildren := 0 - ft := Deref(f.Type) - if ft.Kind() == reflect.Struct { - nChildren = ft.NumField() - } - fi.Children = make([]*FieldInfo, nChildren) - queue = append(queue, typeQueue{Deref(f.Type), &fi, pp}) - } else if fi.Zero.Kind() == reflect.Struct || (fi.Zero.Kind() == reflect.Ptr && fi.Zero.Type().Elem().Kind() == reflect.Struct) { - fi.Index = apnd(tq.fi.Index, fieldPos) - fi.Children = make([]*FieldInfo, Deref(f.Type).NumField()) - queue = append(queue, typeQueue{Deref(f.Type), &fi, fi.Path}) - } - - fi.Index = apnd(tq.fi.Index, fieldPos) - fi.Parent = tq.fi - tq.fi.Children[fieldPos] = &fi - m = append(m, &fi) - } - } - - flds := &StructMap{Index: m, Tree: root, Paths: map[string]*FieldInfo{}, Names: map[string]*FieldInfo{}} - for _, fi := range flds.Index { - flds.Paths[fi.Path] = fi - if fi.Name != "" && !fi.Embedded { - flds.Names[fi.Path] = fi - } - } - - return flds -} diff --git a/vendor/github.com/jmoiron/sqlx/reflectx/reflect_test.go b/vendor/github.com/jmoiron/sqlx/reflectx/reflect_test.go deleted file mode 100644 index b702f9cd1..000000000 --- a/vendor/github.com/jmoiron/sqlx/reflectx/reflect_test.go +++ /dev/null @@ -1,905 +0,0 @@ -package reflectx - -import ( - "reflect" - "strings" - "testing" -) - -func ival(v reflect.Value) int { - return v.Interface().(int) -} - -func TestBasic(t *testing.T) { - type Foo struct { - A int - B int - C int - } - - f := Foo{1, 2, 3} - fv := reflect.ValueOf(f) - m := NewMapperFunc("", func(s string) string { return s }) - - v := m.FieldByName(fv, "A") - if ival(v) != f.A { - t.Errorf("Expecting %d, got %d", ival(v), f.A) - } - v = m.FieldByName(fv, "B") - if ival(v) != f.B { - t.Errorf("Expecting %d, got %d", f.B, ival(v)) - } - v = m.FieldByName(fv, "C") - if ival(v) != f.C { - t.Errorf("Expecting %d, got %d", f.C, ival(v)) - } -} - -func TestBasicEmbedded(t *testing.T) { - type Foo struct { - A int - } - - type Bar struct { - Foo // `db:""` is implied for an embedded struct - B int - C int `db:"-"` - } - - type Baz struct { - A int - Bar `db:"Bar"` - } - - m := NewMapperFunc("db", func(s string) string { return s }) - - z := Baz{} - z.A = 1 - z.B = 2 - z.C = 4 - z.Bar.Foo.A = 3 - - zv := reflect.ValueOf(z) - fields := m.TypeMap(reflect.TypeOf(z)) - - if len(fields.Index) != 5 { - t.Errorf("Expecting 5 fields") - } - - // for _, fi := range fields.Index { - // log.Println(fi) - // } - - v := m.FieldByName(zv, "A") - if ival(v) != z.A { - t.Errorf("Expecting %d, got %d", z.A, ival(v)) - } - v = m.FieldByName(zv, "Bar.B") - if ival(v) != z.Bar.B { - t.Errorf("Expecting %d, got %d", z.Bar.B, ival(v)) - } - v = m.FieldByName(zv, "Bar.A") - if ival(v) != z.Bar.Foo.A { - t.Errorf("Expecting %d, got %d", z.Bar.Foo.A, ival(v)) - } - v = m.FieldByName(zv, "Bar.C") - if _, ok := v.Interface().(int); ok { - t.Errorf("Expecting Bar.C to not exist") - } - - fi := fields.GetByPath("Bar.C") - if fi != nil { - t.Errorf("Bar.C should not exist") - } -} - -func TestEmbeddedSimple(t *testing.T) { - type UUID [16]byte - type MyID struct { - UUID - } - type Item struct { - ID MyID - } - z := Item{} - - m := NewMapper("db") - m.TypeMap(reflect.TypeOf(z)) -} - -func TestBasicEmbeddedWithTags(t *testing.T) { - type Foo struct { - A int `db:"a"` - } - - type Bar struct { - Foo // `db:""` is implied for an embedded struct - B int `db:"b"` - } - - type Baz struct { - A int `db:"a"` - Bar // `db:""` is implied for an embedded struct - } - - m := NewMapper("db") - - z := Baz{} - z.A = 1 - z.B = 2 - z.Bar.Foo.A = 3 - - zv := reflect.ValueOf(z) - fields := m.TypeMap(reflect.TypeOf(z)) - - if len(fields.Index) != 5 { - t.Errorf("Expecting 5 fields") - } - - // for _, fi := range fields.index { - // log.Println(fi) - // } - - v := m.FieldByName(zv, "a") - if ival(v) != z.Bar.Foo.A { // the dominant field - t.Errorf("Expecting %d, got %d", z.Bar.Foo.A, ival(v)) - } - v = m.FieldByName(zv, "b") - if ival(v) != z.B { - t.Errorf("Expecting %d, got %d", z.B, ival(v)) - } -} - -func TestFlatTags(t *testing.T) { - m := NewMapper("db") - - type Asset struct { - Title string `db:"title"` - } - type Post struct { - Author string `db:"author,required"` - Asset Asset `db:""` - } - // Post columns: (author title) - - post := Post{Author: "Joe", Asset: Asset{Title: "Hello"}} - pv := reflect.ValueOf(post) - - v := m.FieldByName(pv, "author") - if v.Interface().(string) != post.Author { - t.Errorf("Expecting %s, got %s", post.Author, v.Interface().(string)) - } - v = m.FieldByName(pv, "title") - if v.Interface().(string) != post.Asset.Title { - t.Errorf("Expecting %s, got %s", post.Asset.Title, v.Interface().(string)) - } -} - -func TestNestedStruct(t *testing.T) { - m := NewMapper("db") - - type Details struct { - Active bool `db:"active"` - } - type Asset struct { - Title string `db:"title"` - Details Details `db:"details"` - } - type Post struct { - Author string `db:"author,required"` - Asset `db:"asset"` - } - // Post columns: (author asset.title asset.details.active) - - post := Post{ - Author: "Joe", - Asset: Asset{Title: "Hello", Details: Details{Active: true}}, - } - pv := reflect.ValueOf(post) - - v := m.FieldByName(pv, "author") - if v.Interface().(string) != post.Author { - t.Errorf("Expecting %s, got %s", post.Author, v.Interface().(string)) - } - v = m.FieldByName(pv, "title") - if _, ok := v.Interface().(string); ok { - t.Errorf("Expecting field to not exist") - } - v = m.FieldByName(pv, "asset.title") - if v.Interface().(string) != post.Asset.Title { - t.Errorf("Expecting %s, got %s", post.Asset.Title, v.Interface().(string)) - } - v = m.FieldByName(pv, "asset.details.active") - if v.Interface().(bool) != post.Asset.Details.Active { - t.Errorf("Expecting %v, got %v", post.Asset.Details.Active, v.Interface().(bool)) - } -} - -func TestInlineStruct(t *testing.T) { - m := NewMapperTagFunc("db", strings.ToLower, nil) - - type Employee struct { - Name string - ID int - } - type Boss Employee - type person struct { - Employee `db:"employee"` - Boss `db:"boss"` - } - // employees columns: (employee.name employee.id boss.name boss.id) - - em := person{Employee: Employee{Name: "Joe", ID: 2}, Boss: Boss{Name: "Dick", ID: 1}} - ev := reflect.ValueOf(em) - - fields := m.TypeMap(reflect.TypeOf(em)) - if len(fields.Index) != 6 { - t.Errorf("Expecting 6 fields") - } - - v := m.FieldByName(ev, "employee.name") - if v.Interface().(string) != em.Employee.Name { - t.Errorf("Expecting %s, got %s", em.Employee.Name, v.Interface().(string)) - } - v = m.FieldByName(ev, "boss.id") - if ival(v) != em.Boss.ID { - t.Errorf("Expecting %v, got %v", em.Boss.ID, ival(v)) - } -} - -func TestRecursiveStruct(t *testing.T) { - type Person struct { - Parent *Person - } - m := NewMapperFunc("db", strings.ToLower) - var p *Person - m.TypeMap(reflect.TypeOf(p)) -} - -func TestFieldsEmbedded(t *testing.T) { - m := NewMapper("db") - - type Person struct { - Name string `db:"name,size=64"` - } - type Place struct { - Name string `db:"name"` - } - type Article struct { - Title string `db:"title"` - } - type PP struct { - Person `db:"person,required"` - Place `db:",someflag"` - Article `db:",required"` - } - // PP columns: (person.name name title) - - pp := PP{} - pp.Person.Name = "Peter" - pp.Place.Name = "Toronto" - pp.Article.Title = "Best city ever" - - fields := m.TypeMap(reflect.TypeOf(pp)) - // for i, f := range fields { - // log.Println(i, f) - // } - - ppv := reflect.ValueOf(pp) - - v := m.FieldByName(ppv, "person.name") - if v.Interface().(string) != pp.Person.Name { - t.Errorf("Expecting %s, got %s", pp.Person.Name, v.Interface().(string)) - } - - v = m.FieldByName(ppv, "name") - if v.Interface().(string) != pp.Place.Name { - t.Errorf("Expecting %s, got %s", pp.Place.Name, v.Interface().(string)) - } - - v = m.FieldByName(ppv, "title") - if v.Interface().(string) != pp.Article.Title { - t.Errorf("Expecting %s, got %s", pp.Article.Title, v.Interface().(string)) - } - - fi := fields.GetByPath("person") - if _, ok := fi.Options["required"]; !ok { - t.Errorf("Expecting required option to be set") - } - if !fi.Embedded { - t.Errorf("Expecting field to be embedded") - } - if len(fi.Index) != 1 || fi.Index[0] != 0 { - t.Errorf("Expecting index to be [0]") - } - - fi = fields.GetByPath("person.name") - if fi == nil { - t.Errorf("Expecting person.name to exist") - } - if fi.Path != "person.name" { - t.Errorf("Expecting %s, got %s", "person.name", fi.Path) - } - if fi.Options["size"] != "64" { - t.Errorf("Expecting %s, got %s", "64", fi.Options["size"]) - } - - fi = fields.GetByTraversal([]int{1, 0}) - if fi == nil { - t.Errorf("Expecting traveral to exist") - } - if fi.Path != "name" { - t.Errorf("Expecting %s, got %s", "name", fi.Path) - } - - fi = fields.GetByTraversal([]int{2}) - if fi == nil { - t.Errorf("Expecting traversal to exist") - } - if _, ok := fi.Options["required"]; !ok { - t.Errorf("Expecting required option to be set") - } - - trs := m.TraversalsByName(reflect.TypeOf(pp), []string{"person.name", "name", "title"}) - if !reflect.DeepEqual(trs, [][]int{{0, 0}, {1, 0}, {2, 0}}) { - t.Errorf("Expecting traversal: %v", trs) - } -} - -func TestPtrFields(t *testing.T) { - m := NewMapperTagFunc("db", strings.ToLower, nil) - type Asset struct { - Title string - } - type Post struct { - *Asset `db:"asset"` - Author string - } - - post := &Post{Author: "Joe", Asset: &Asset{Title: "Hiyo"}} - pv := reflect.ValueOf(post) - - fields := m.TypeMap(reflect.TypeOf(post)) - if len(fields.Index) != 3 { - t.Errorf("Expecting 3 fields") - } - - v := m.FieldByName(pv, "asset.title") - if v.Interface().(string) != post.Asset.Title { - t.Errorf("Expecting %s, got %s", post.Asset.Title, v.Interface().(string)) - } - v = m.FieldByName(pv, "author") - if v.Interface().(string) != post.Author { - t.Errorf("Expecting %s, got %s", post.Author, v.Interface().(string)) - } -} - -func TestNamedPtrFields(t *testing.T) { - m := NewMapperTagFunc("db", strings.ToLower, nil) - - type User struct { - Name string - } - - type Asset struct { - Title string - - Owner *User `db:"owner"` - } - type Post struct { - Author string - - Asset1 *Asset `db:"asset1"` - Asset2 *Asset `db:"asset2"` - } - - post := &Post{Author: "Joe", Asset1: &Asset{Title: "Hiyo", Owner: &User{"Username"}}} // Let Asset2 be nil - pv := reflect.ValueOf(post) - - fields := m.TypeMap(reflect.TypeOf(post)) - if len(fields.Index) != 9 { - t.Errorf("Expecting 9 fields") - } - - v := m.FieldByName(pv, "asset1.title") - if v.Interface().(string) != post.Asset1.Title { - t.Errorf("Expecting %s, got %s", post.Asset1.Title, v.Interface().(string)) - } - v = m.FieldByName(pv, "asset1.owner.name") - if v.Interface().(string) != post.Asset1.Owner.Name { - t.Errorf("Expecting %s, got %s", post.Asset1.Owner.Name, v.Interface().(string)) - } - v = m.FieldByName(pv, "asset2.title") - if v.Interface().(string) != post.Asset2.Title { - t.Errorf("Expecting %s, got %s", post.Asset2.Title, v.Interface().(string)) - } - v = m.FieldByName(pv, "asset2.owner.name") - if v.Interface().(string) != post.Asset2.Owner.Name { - t.Errorf("Expecting %s, got %s", post.Asset2.Owner.Name, v.Interface().(string)) - } - v = m.FieldByName(pv, "author") - if v.Interface().(string) != post.Author { - t.Errorf("Expecting %s, got %s", post.Author, v.Interface().(string)) - } -} - -func TestFieldMap(t *testing.T) { - type Foo struct { - A int - B int - C int - } - - f := Foo{1, 2, 3} - m := NewMapperFunc("db", strings.ToLower) - - fm := m.FieldMap(reflect.ValueOf(f)) - - if len(fm) != 3 { - t.Errorf("Expecting %d keys, got %d", 3, len(fm)) - } - if fm["a"].Interface().(int) != 1 { - t.Errorf("Expecting %d, got %d", 1, ival(fm["a"])) - } - if fm["b"].Interface().(int) != 2 { - t.Errorf("Expecting %d, got %d", 2, ival(fm["b"])) - } - if fm["c"].Interface().(int) != 3 { - t.Errorf("Expecting %d, got %d", 3, ival(fm["c"])) - } -} - -func TestTagNameMapping(t *testing.T) { - type Strategy struct { - StrategyID string `protobuf:"bytes,1,opt,name=strategy_id" json:"strategy_id,omitempty"` - StrategyName string - } - - m := NewMapperTagFunc("json", strings.ToUpper, func(value string) string { - if strings.Contains(value, ",") { - return strings.Split(value, ",")[0] - } - return value - }) - strategy := Strategy{"1", "Alpah"} - mapping := m.TypeMap(reflect.TypeOf(strategy)) - - for _, key := range []string{"strategy_id", "STRATEGYNAME"} { - if fi := mapping.GetByPath(key); fi == nil { - t.Errorf("Expecting to find key %s in mapping but did not.", key) - } - } -} - -func TestMapping(t *testing.T) { - type Person struct { - ID int - Name string - WearsGlasses bool `db:"wears_glasses"` - } - - m := NewMapperFunc("db", strings.ToLower) - p := Person{1, "Jason", true} - mapping := m.TypeMap(reflect.TypeOf(p)) - - for _, key := range []string{"id", "name", "wears_glasses"} { - if fi := mapping.GetByPath(key); fi == nil { - t.Errorf("Expecting to find key %s in mapping but did not.", key) - } - } - - type SportsPerson struct { - Weight int - Age int - Person - } - s := SportsPerson{Weight: 100, Age: 30, Person: p} - mapping = m.TypeMap(reflect.TypeOf(s)) - for _, key := range []string{"id", "name", "wears_glasses", "weight", "age"} { - if fi := mapping.GetByPath(key); fi == nil { - t.Errorf("Expecting to find key %s in mapping but did not.", key) - } - } - - type RugbyPlayer struct { - Position int - IsIntense bool `db:"is_intense"` - IsAllBlack bool `db:"-"` - SportsPerson - } - r := RugbyPlayer{12, true, false, s} - mapping = m.TypeMap(reflect.TypeOf(r)) - for _, key := range []string{"id", "name", "wears_glasses", "weight", "age", "position", "is_intense"} { - if fi := mapping.GetByPath(key); fi == nil { - t.Errorf("Expecting to find key %s in mapping but did not.", key) - } - } - - if fi := mapping.GetByPath("isallblack"); fi != nil { - t.Errorf("Expecting to ignore `IsAllBlack` field") - } -} - -func TestGetByTraversal(t *testing.T) { - type C struct { - C0 int - C1 int - } - type B struct { - B0 string - B1 *C - } - type A struct { - A0 int - A1 B - } - - testCases := []struct { - Index []int - ExpectedName string - ExpectNil bool - }{ - { - Index: []int{0}, - ExpectedName: "A0", - }, - { - Index: []int{1, 0}, - ExpectedName: "B0", - }, - { - Index: []int{1, 1, 1}, - ExpectedName: "C1", - }, - { - Index: []int{3, 4, 5}, - ExpectNil: true, - }, - { - Index: []int{}, - ExpectNil: true, - }, - { - Index: nil, - ExpectNil: true, - }, - } - - m := NewMapperFunc("db", func(n string) string { return n }) - tm := m.TypeMap(reflect.TypeOf(A{})) - - for i, tc := range testCases { - fi := tm.GetByTraversal(tc.Index) - if tc.ExpectNil { - if fi != nil { - t.Errorf("%d: expected nil, got %v", i, fi) - } - continue - } - - if fi == nil { - t.Errorf("%d: expected %s, got nil", i, tc.ExpectedName) - continue - } - - if fi.Name != tc.ExpectedName { - t.Errorf("%d: expected %s, got %s", i, tc.ExpectedName, fi.Name) - } - } -} - -// TestMapperMethodsByName tests Mapper methods FieldByName and TraversalsByName -func TestMapperMethodsByName(t *testing.T) { - type C struct { - C0 string - C1 int - } - type B struct { - B0 *C `db:"B0"` - B1 C `db:"B1"` - B2 string `db:"B2"` - } - type A struct { - A0 *B `db:"A0"` - B `db:"A1"` - A2 int - a3 int - } - - val := &A{ - A0: &B{ - B0: &C{C0: "0", C1: 1}, - B1: C{C0: "2", C1: 3}, - B2: "4", - }, - B: B{ - B0: nil, - B1: C{C0: "5", C1: 6}, - B2: "7", - }, - A2: 8, - } - - testCases := []struct { - Name string - ExpectInvalid bool - ExpectedValue interface{} - ExpectedIndexes []int - }{ - { - Name: "A0.B0.C0", - ExpectedValue: "0", - ExpectedIndexes: []int{0, 0, 0}, - }, - { - Name: "A0.B0.C1", - ExpectedValue: 1, - ExpectedIndexes: []int{0, 0, 1}, - }, - { - Name: "A0.B1.C0", - ExpectedValue: "2", - ExpectedIndexes: []int{0, 1, 0}, - }, - { - Name: "A0.B1.C1", - ExpectedValue: 3, - ExpectedIndexes: []int{0, 1, 1}, - }, - { - Name: "A0.B2", - ExpectedValue: "4", - ExpectedIndexes: []int{0, 2}, - }, - { - Name: "A1.B0.C0", - ExpectedValue: "", - ExpectedIndexes: []int{1, 0, 0}, - }, - { - Name: "A1.B0.C1", - ExpectedValue: 0, - ExpectedIndexes: []int{1, 0, 1}, - }, - { - Name: "A1.B1.C0", - ExpectedValue: "5", - ExpectedIndexes: []int{1, 1, 0}, - }, - { - Name: "A1.B1.C1", - ExpectedValue: 6, - ExpectedIndexes: []int{1, 1, 1}, - }, - { - Name: "A1.B2", - ExpectedValue: "7", - ExpectedIndexes: []int{1, 2}, - }, - { - Name: "A2", - ExpectedValue: 8, - ExpectedIndexes: []int{2}, - }, - { - Name: "XYZ", - ExpectInvalid: true, - ExpectedIndexes: []int{}, - }, - { - Name: "a3", - ExpectInvalid: true, - ExpectedIndexes: []int{}, - }, - } - - // build the names array from the test cases - names := make([]string, len(testCases)) - for i, tc := range testCases { - names[i] = tc.Name - } - m := NewMapperFunc("db", func(n string) string { return n }) - v := reflect.ValueOf(val) - values := m.FieldsByName(v, names) - if len(values) != len(testCases) { - t.Errorf("expected %d values, got %d", len(testCases), len(values)) - t.FailNow() - } - indexes := m.TraversalsByName(v.Type(), names) - if len(indexes) != len(testCases) { - t.Errorf("expected %d traversals, got %d", len(testCases), len(indexes)) - t.FailNow() - } - for i, val := range values { - tc := testCases[i] - traversal := indexes[i] - if !reflect.DeepEqual(tc.ExpectedIndexes, traversal) { - t.Errorf("expected %v, got %v", tc.ExpectedIndexes, traversal) - t.FailNow() - } - val = reflect.Indirect(val) - if tc.ExpectInvalid { - if val.IsValid() { - t.Errorf("%d: expected zero value, got %v", i, val) - } - continue - } - if !val.IsValid() { - t.Errorf("%d: expected valid value, got %v", i, val) - continue - } - actualValue := reflect.Indirect(val).Interface() - if !reflect.DeepEqual(tc.ExpectedValue, actualValue) { - t.Errorf("%d: expected %v, got %v", i, tc.ExpectedValue, actualValue) - } - } -} - -func TestFieldByIndexes(t *testing.T) { - type C struct { - C0 bool - C1 string - C2 int - C3 map[string]int - } - type B struct { - B1 C - B2 *C - } - type A struct { - A1 B - A2 *B - } - testCases := []struct { - value interface{} - indexes []int - expectedValue interface{} - readOnly bool - }{ - { - value: A{ - A1: B{B1: C{C0: true}}, - }, - indexes: []int{0, 0, 0}, - expectedValue: true, - readOnly: true, - }, - { - value: A{ - A2: &B{B2: &C{C1: "answer"}}, - }, - indexes: []int{1, 1, 1}, - expectedValue: "answer", - readOnly: true, - }, - { - value: &A{}, - indexes: []int{1, 1, 3}, - expectedValue: map[string]int{}, - }, - } - - for i, tc := range testCases { - checkResults := func(v reflect.Value) { - if tc.expectedValue == nil { - if !v.IsNil() { - t.Errorf("%d: expected nil, actual %v", i, v.Interface()) - } - } else { - if !reflect.DeepEqual(tc.expectedValue, v.Interface()) { - t.Errorf("%d: expected %v, actual %v", i, tc.expectedValue, v.Interface()) - } - } - } - - checkResults(FieldByIndexes(reflect.ValueOf(tc.value), tc.indexes)) - if tc.readOnly { - checkResults(FieldByIndexesReadOnly(reflect.ValueOf(tc.value), tc.indexes)) - } - } -} - -func TestMustBe(t *testing.T) { - typ := reflect.TypeOf(E1{}) - mustBe(typ, reflect.Struct) - - defer func() { - if r := recover(); r != nil { - valueErr, ok := r.(*reflect.ValueError) - if !ok { - t.Errorf("unexpected Method: %s", valueErr.Method) - t.Error("expected panic with *reflect.ValueError") - return - } - if valueErr.Method != "github.com/jmoiron/sqlx/reflectx.TestMustBe" { - } - if valueErr.Kind != reflect.String { - t.Errorf("unexpected Kind: %s", valueErr.Kind) - } - } else { - t.Error("expected panic") - } - }() - - typ = reflect.TypeOf("string") - mustBe(typ, reflect.Struct) - t.Error("got here, didn't expect to") -} - -type E1 struct { - A int -} -type E2 struct { - E1 - B int -} -type E3 struct { - E2 - C int -} -type E4 struct { - E3 - D int -} - -func BenchmarkFieldNameL1(b *testing.B) { - e4 := E4{D: 1} - for i := 0; i < b.N; i++ { - v := reflect.ValueOf(e4) - f := v.FieldByName("D") - if f.Interface().(int) != 1 { - b.Fatal("Wrong value.") - } - } -} - -func BenchmarkFieldNameL4(b *testing.B) { - e4 := E4{} - e4.A = 1 - for i := 0; i < b.N; i++ { - v := reflect.ValueOf(e4) - f := v.FieldByName("A") - if f.Interface().(int) != 1 { - b.Fatal("Wrong value.") - } - } -} - -func BenchmarkFieldPosL1(b *testing.B) { - e4 := E4{D: 1} - for i := 0; i < b.N; i++ { - v := reflect.ValueOf(e4) - f := v.Field(1) - if f.Interface().(int) != 1 { - b.Fatal("Wrong value.") - } - } -} - -func BenchmarkFieldPosL4(b *testing.B) { - e4 := E4{} - e4.A = 1 - for i := 0; i < b.N; i++ { - v := reflect.ValueOf(e4) - f := v.Field(0) - f = f.Field(0) - f = f.Field(0) - f = f.Field(0) - if f.Interface().(int) != 1 { - b.Fatal("Wrong value.") - } - } -} - -func BenchmarkFieldByIndexL4(b *testing.B) { - e4 := E4{} - e4.A = 1 - idx := []int{0, 0, 0, 0} - for i := 0; i < b.N; i++ { - v := reflect.ValueOf(e4) - f := FieldByIndexes(v, idx) - if f.Interface().(int) != 1 { - b.Fatal("Wrong value.") - } - } -} diff --git a/vendor/github.com/jmoiron/sqlx/sqlx.go b/vendor/github.com/jmoiron/sqlx/sqlx.go deleted file mode 100644 index 4859d5ac8..000000000 --- a/vendor/github.com/jmoiron/sqlx/sqlx.go +++ /dev/null @@ -1,1035 +0,0 @@ -package sqlx - -import ( - "database/sql" - "database/sql/driver" - "errors" - "fmt" - - "io/ioutil" - "path/filepath" - "reflect" - "strings" - "sync" - - "github.com/jmoiron/sqlx/reflectx" -) - -// Although the NameMapper is convenient, in practice it should not -// be relied on except for application code. If you are writing a library -// that uses sqlx, you should be aware that the name mappings you expect -// can be overridden by your user's application. - -// NameMapper is used to map column names to struct field names. By default, -// it uses strings.ToLower to lowercase struct field names. It can be set -// to whatever you want, but it is encouraged to be set before sqlx is used -// as name-to-field mappings are cached after first use on a type. -var NameMapper = strings.ToLower -var origMapper = reflect.ValueOf(NameMapper) - -// Rather than creating on init, this is created when necessary so that -// importers have time to customize the NameMapper. -var mpr *reflectx.Mapper - -// mprMu protects mpr. -var mprMu sync.Mutex - -// mapper returns a valid mapper using the configured NameMapper func. -func mapper() *reflectx.Mapper { - mprMu.Lock() - defer mprMu.Unlock() - - if mpr == nil { - mpr = reflectx.NewMapperFunc("db", NameMapper) - } else if origMapper != reflect.ValueOf(NameMapper) { - // if NameMapper has changed, create a new mapper - mpr = reflectx.NewMapperFunc("db", NameMapper) - origMapper = reflect.ValueOf(NameMapper) - } - return mpr -} - -// isScannable takes the reflect.Type and the actual dest value and returns -// whether or not it's Scannable. Something is scannable if: -// * it is not a struct -// * it implements sql.Scanner -// * it has no exported fields -func isScannable(t reflect.Type) bool { - if reflect.PtrTo(t).Implements(_scannerInterface) { - return true - } - if t.Kind() != reflect.Struct { - return true - } - - // it's not important that we use the right mapper for this particular object, - // we're only concerned on how many exported fields this struct has - m := mapper() - if len(m.TypeMap(t).Index) == 0 { - return true - } - return false -} - -// ColScanner is an interface used by MapScan and SliceScan -type ColScanner interface { - Columns() ([]string, error) - Scan(dest ...interface{}) error - Err() error -} - -// Queryer is an interface used by Get and Select -type Queryer interface { - Query(query string, args ...interface{}) (*sql.Rows, error) - Queryx(query string, args ...interface{}) (*Rows, error) - QueryRowx(query string, args ...interface{}) *Row -} - -// Execer is an interface used by MustExec and LoadFile -type Execer interface { - Exec(query string, args ...interface{}) (sql.Result, error) -} - -// Binder is an interface for something which can bind queries (Tx, DB) -type binder interface { - DriverName() string - Rebind(string) string - BindNamed(string, interface{}) (string, []interface{}, error) -} - -// Ext is a union interface which can bind, query, and exec, used by -// NamedQuery and NamedExec. -type Ext interface { - binder - Queryer - Execer -} - -// Preparer is an interface used by Preparex. -type Preparer interface { - Prepare(query string) (*sql.Stmt, error) -} - -// determine if any of our extensions are unsafe -func isUnsafe(i interface{}) bool { - switch v := i.(type) { - case Row: - return v.unsafe - case *Row: - return v.unsafe - case Rows: - return v.unsafe - case *Rows: - return v.unsafe - case NamedStmt: - return v.Stmt.unsafe - case *NamedStmt: - return v.Stmt.unsafe - case Stmt: - return v.unsafe - case *Stmt: - return v.unsafe - case qStmt: - return v.unsafe - case *qStmt: - return v.unsafe - case DB: - return v.unsafe - case *DB: - return v.unsafe - case Tx: - return v.unsafe - case *Tx: - return v.unsafe - case sql.Rows, *sql.Rows: - return false - default: - return false - } -} - -func mapperFor(i interface{}) *reflectx.Mapper { - switch i.(type) { - case DB: - return i.(DB).Mapper - case *DB: - return i.(*DB).Mapper - case Tx: - return i.(Tx).Mapper - case *Tx: - return i.(*Tx).Mapper - default: - return mapper() - } -} - -var _scannerInterface = reflect.TypeOf((*sql.Scanner)(nil)).Elem() -var _valuerInterface = reflect.TypeOf((*driver.Valuer)(nil)).Elem() - -// Row is a reimplementation of sql.Row in order to gain access to the underlying -// sql.Rows.Columns() data, necessary for StructScan. -type Row struct { - err error - unsafe bool - rows *sql.Rows - Mapper *reflectx.Mapper -} - -// Scan is a fixed implementation of sql.Row.Scan, which does not discard the -// underlying error from the internal rows object if it exists. -func (r *Row) Scan(dest ...interface{}) error { - if r.err != nil { - return r.err - } - - // TODO(bradfitz): for now we need to defensively clone all - // []byte that the driver returned (not permitting - // *RawBytes in Rows.Scan), since we're about to close - // the Rows in our defer, when we return from this function. - // the contract with the driver.Next(...) interface is that it - // can return slices into read-only temporary memory that's - // only valid until the next Scan/Close. But the TODO is that - // for a lot of drivers, this copy will be unnecessary. We - // should provide an optional interface for drivers to - // implement to say, "don't worry, the []bytes that I return - // from Next will not be modified again." (for instance, if - // they were obtained from the network anyway) But for now we - // don't care. - defer r.rows.Close() - for _, dp := range dest { - if _, ok := dp.(*sql.RawBytes); ok { - return errors.New("sql: RawBytes isn't allowed on Row.Scan") - } - } - - if !r.rows.Next() { - if err := r.rows.Err(); err != nil { - return err - } - return sql.ErrNoRows - } - err := r.rows.Scan(dest...) - if err != nil { - return err - } - // Make sure the query can be processed to completion with no errors. - if err := r.rows.Close(); err != nil { - return err - } - return nil -} - -// Columns returns the underlying sql.Rows.Columns(), or the deferred error usually -// returned by Row.Scan() -func (r *Row) Columns() ([]string, error) { - if r.err != nil { - return []string{}, r.err - } - return r.rows.Columns() -} - -// Err returns the error encountered while scanning. -func (r *Row) Err() error { - return r.err -} - -// DB is a wrapper around sql.DB which keeps track of the driverName upon Open, -// used mostly to automatically bind named queries using the right bindvars. -type DB struct { - *sql.DB - driverName string - unsafe bool - Mapper *reflectx.Mapper -} - -// NewDb returns a new sqlx DB wrapper for a pre-existing *sql.DB. The -// driverName of the original database is required for named query support. -func NewDb(db *sql.DB, driverName string) *DB { - return &DB{DB: db, driverName: driverName, Mapper: mapper()} -} - -// DriverName returns the driverName passed to the Open function for this DB. -func (db *DB) DriverName() string { - return db.driverName -} - -// Open is the same as sql.Open, but returns an *sqlx.DB instead. -func Open(driverName, dataSourceName string) (*DB, error) { - db, err := sql.Open(driverName, dataSourceName) - if err != nil { - return nil, err - } - return &DB{DB: db, driverName: driverName, Mapper: mapper()}, err -} - -// MustOpen is the same as sql.Open, but returns an *sqlx.DB instead and panics on error. -func MustOpen(driverName, dataSourceName string) *DB { - db, err := Open(driverName, dataSourceName) - if err != nil { - panic(err) - } - return db -} - -// MapperFunc sets a new mapper for this db using the default sqlx struct tag -// and the provided mapper function. -func (db *DB) MapperFunc(mf func(string) string) { - db.Mapper = reflectx.NewMapperFunc("db", mf) -} - -// Rebind transforms a query from QUESTION to the DB driver's bindvar type. -func (db *DB) Rebind(query string) string { - return Rebind(BindType(db.driverName), query) -} - -// Unsafe returns a version of DB which will silently succeed to scan when -// columns in the SQL result have no fields in the destination struct. -// sqlx.Stmt and sqlx.Tx which are created from this DB will inherit its -// safety behavior. -func (db *DB) Unsafe() *DB { - return &DB{DB: db.DB, driverName: db.driverName, unsafe: true, Mapper: db.Mapper} -} - -// BindNamed binds a query using the DB driver's bindvar type. -func (db *DB) BindNamed(query string, arg interface{}) (string, []interface{}, error) { - return bindNamedMapper(BindType(db.driverName), query, arg, db.Mapper) -} - -// NamedQuery using this DB. -// Any named placeholder parameters are replaced with fields from arg. -func (db *DB) NamedQuery(query string, arg interface{}) (*Rows, error) { - return NamedQuery(db, query, arg) -} - -// NamedExec using this DB. -// Any named placeholder parameters are replaced with fields from arg. -func (db *DB) NamedExec(query string, arg interface{}) (sql.Result, error) { - return NamedExec(db, query, arg) -} - -// Select using this DB. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) Select(dest interface{}, query string, args ...interface{}) error { - return Select(db, dest, query, args...) -} - -// Get using this DB. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func (db *DB) Get(dest interface{}, query string, args ...interface{}) error { - return Get(db, dest, query, args...) -} - -// MustBegin starts a transaction, and panics on error. Returns an *sqlx.Tx instead -// of an *sql.Tx. -func (db *DB) MustBegin() *Tx { - tx, err := db.Beginx() - if err != nil { - panic(err) - } - return tx -} - -// Beginx begins a transaction and returns an *sqlx.Tx instead of an *sql.Tx. -func (db *DB) Beginx() (*Tx, error) { - tx, err := db.DB.Begin() - if err != nil { - return nil, err - } - return &Tx{Tx: tx, driverName: db.driverName, unsafe: db.unsafe, Mapper: db.Mapper}, err -} - -// Queryx queries the database and returns an *sqlx.Rows. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) Queryx(query string, args ...interface{}) (*Rows, error) { - r, err := db.DB.Query(query, args...) - if err != nil { - return nil, err - } - return &Rows{Rows: r, unsafe: db.unsafe, Mapper: db.Mapper}, err -} - -// QueryRowx queries the database and returns an *sqlx.Row. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) QueryRowx(query string, args ...interface{}) *Row { - rows, err := db.DB.Query(query, args...) - return &Row{rows: rows, err: err, unsafe: db.unsafe, Mapper: db.Mapper} -} - -// MustExec (panic) runs MustExec using this database. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) MustExec(query string, args ...interface{}) sql.Result { - return MustExec(db, query, args...) -} - -// Preparex returns an sqlx.Stmt instead of a sql.Stmt -func (db *DB) Preparex(query string) (*Stmt, error) { - return Preparex(db, query) -} - -// PrepareNamed returns an sqlx.NamedStmt -func (db *DB) PrepareNamed(query string) (*NamedStmt, error) { - return prepareNamed(db, query) -} - -// Tx is an sqlx wrapper around sql.Tx with extra functionality -type Tx struct { - *sql.Tx - driverName string - unsafe bool - Mapper *reflectx.Mapper -} - -// DriverName returns the driverName used by the DB which began this transaction. -func (tx *Tx) DriverName() string { - return tx.driverName -} - -// Rebind a query within a transaction's bindvar type. -func (tx *Tx) Rebind(query string) string { - return Rebind(BindType(tx.driverName), query) -} - -// Unsafe returns a version of Tx which will silently succeed to scan when -// columns in the SQL result have no fields in the destination struct. -func (tx *Tx) Unsafe() *Tx { - return &Tx{Tx: tx.Tx, driverName: tx.driverName, unsafe: true, Mapper: tx.Mapper} -} - -// BindNamed binds a query within a transaction's bindvar type. -func (tx *Tx) BindNamed(query string, arg interface{}) (string, []interface{}, error) { - return bindNamedMapper(BindType(tx.driverName), query, arg, tx.Mapper) -} - -// NamedQuery within a transaction. -// Any named placeholder parameters are replaced with fields from arg. -func (tx *Tx) NamedQuery(query string, arg interface{}) (*Rows, error) { - return NamedQuery(tx, query, arg) -} - -// NamedExec a named query within a transaction. -// Any named placeholder parameters are replaced with fields from arg. -func (tx *Tx) NamedExec(query string, arg interface{}) (sql.Result, error) { - return NamedExec(tx, query, arg) -} - -// Select within a transaction. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) Select(dest interface{}, query string, args ...interface{}) error { - return Select(tx, dest, query, args...) -} - -// Queryx within a transaction. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) Queryx(query string, args ...interface{}) (*Rows, error) { - r, err := tx.Tx.Query(query, args...) - if err != nil { - return nil, err - } - return &Rows{Rows: r, unsafe: tx.unsafe, Mapper: tx.Mapper}, err -} - -// QueryRowx within a transaction. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) QueryRowx(query string, args ...interface{}) *Row { - rows, err := tx.Tx.Query(query, args...) - return &Row{rows: rows, err: err, unsafe: tx.unsafe, Mapper: tx.Mapper} -} - -// Get within a transaction. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func (tx *Tx) Get(dest interface{}, query string, args ...interface{}) error { - return Get(tx, dest, query, args...) -} - -// MustExec runs MustExec within a transaction. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) MustExec(query string, args ...interface{}) sql.Result { - return MustExec(tx, query, args...) -} - -// Preparex a statement within a transaction. -func (tx *Tx) Preparex(query string) (*Stmt, error) { - return Preparex(tx, query) -} - -// Stmtx returns a version of the prepared statement which runs within a transaction. Provided -// stmt can be either *sql.Stmt or *sqlx.Stmt. -func (tx *Tx) Stmtx(stmt interface{}) *Stmt { - var s *sql.Stmt - switch v := stmt.(type) { - case Stmt: - s = v.Stmt - case *Stmt: - s = v.Stmt - case sql.Stmt: - s = &v - case *sql.Stmt: - s = v - default: - panic(fmt.Sprintf("non-statement type %v passed to Stmtx", reflect.ValueOf(stmt).Type())) - } - return &Stmt{Stmt: tx.Stmt(s), Mapper: tx.Mapper} -} - -// NamedStmt returns a version of the prepared statement which runs within a transaction. -func (tx *Tx) NamedStmt(stmt *NamedStmt) *NamedStmt { - return &NamedStmt{ - QueryString: stmt.QueryString, - Params: stmt.Params, - Stmt: tx.Stmtx(stmt.Stmt), - } -} - -// PrepareNamed returns an sqlx.NamedStmt -func (tx *Tx) PrepareNamed(query string) (*NamedStmt, error) { - return prepareNamed(tx, query) -} - -// Stmt is an sqlx wrapper around sql.Stmt with extra functionality -type Stmt struct { - *sql.Stmt - unsafe bool - Mapper *reflectx.Mapper -} - -// Unsafe returns a version of Stmt which will silently succeed to scan when -// columns in the SQL result have no fields in the destination struct. -func (s *Stmt) Unsafe() *Stmt { - return &Stmt{Stmt: s.Stmt, unsafe: true, Mapper: s.Mapper} -} - -// Select using the prepared statement. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) Select(dest interface{}, args ...interface{}) error { - return Select(&qStmt{s}, dest, "", args...) -} - -// Get using the prepared statement. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func (s *Stmt) Get(dest interface{}, args ...interface{}) error { - return Get(&qStmt{s}, dest, "", args...) -} - -// MustExec (panic) using this statement. Note that the query portion of the error -// output will be blank, as Stmt does not expose its query. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) MustExec(args ...interface{}) sql.Result { - return MustExec(&qStmt{s}, "", args...) -} - -// QueryRowx using this statement. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) QueryRowx(args ...interface{}) *Row { - qs := &qStmt{s} - return qs.QueryRowx("", args...) -} - -// Queryx using this statement. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) Queryx(args ...interface{}) (*Rows, error) { - qs := &qStmt{s} - return qs.Queryx("", args...) -} - -// qStmt is an unexposed wrapper which lets you use a Stmt as a Queryer & Execer by -// implementing those interfaces and ignoring the `query` argument. -type qStmt struct{ *Stmt } - -func (q *qStmt) Query(query string, args ...interface{}) (*sql.Rows, error) { - return q.Stmt.Query(args...) -} - -func (q *qStmt) Queryx(query string, args ...interface{}) (*Rows, error) { - r, err := q.Stmt.Query(args...) - if err != nil { - return nil, err - } - return &Rows{Rows: r, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper}, err -} - -func (q *qStmt) QueryRowx(query string, args ...interface{}) *Row { - rows, err := q.Stmt.Query(args...) - return &Row{rows: rows, err: err, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper} -} - -func (q *qStmt) Exec(query string, args ...interface{}) (sql.Result, error) { - return q.Stmt.Exec(args...) -} - -// Rows is a wrapper around sql.Rows which caches costly reflect operations -// during a looped StructScan -type Rows struct { - *sql.Rows - unsafe bool - Mapper *reflectx.Mapper - // these fields cache memory use for a rows during iteration w/ structScan - started bool - fields [][]int - values []interface{} -} - -// SliceScan using this Rows. -func (r *Rows) SliceScan() ([]interface{}, error) { - return SliceScan(r) -} - -// MapScan using this Rows. -func (r *Rows) MapScan(dest map[string]interface{}) error { - return MapScan(r, dest) -} - -// StructScan is like sql.Rows.Scan, but scans a single Row into a single Struct. -// Use this and iterate over Rows manually when the memory load of Select() might be -// prohibitive. *Rows.StructScan caches the reflect work of matching up column -// positions to fields to avoid that overhead per scan, which means it is not safe -// to run StructScan on the same Rows instance with different struct types. -func (r *Rows) StructScan(dest interface{}) error { - v := reflect.ValueOf(dest) - - if v.Kind() != reflect.Ptr { - return errors.New("must pass a pointer, not a value, to StructScan destination") - } - - v = reflect.Indirect(v) - - if !r.started { - columns, err := r.Columns() - if err != nil { - return err - } - m := r.Mapper - - r.fields = m.TraversalsByName(v.Type(), columns) - // if we are not unsafe and are missing fields, return an error - if f, err := missingFields(r.fields); err != nil && !r.unsafe { - return fmt.Errorf("missing destination name %s in %T", columns[f], dest) - } - r.values = make([]interface{}, len(columns)) - r.started = true - } - - err := fieldsByTraversal(v, r.fields, r.values, true) - if err != nil { - return err - } - // scan into the struct field pointers and append to our results - err = r.Scan(r.values...) - if err != nil { - return err - } - return r.Err() -} - -// Connect to a database and verify with a ping. -func Connect(driverName, dataSourceName string) (*DB, error) { - db, err := Open(driverName, dataSourceName) - if err != nil { - return db, err - } - err = db.Ping() - return db, err -} - -// MustConnect connects to a database and panics on error. -func MustConnect(driverName, dataSourceName string) *DB { - db, err := Connect(driverName, dataSourceName) - if err != nil { - panic(err) - } - return db -} - -// Preparex prepares a statement. -func Preparex(p Preparer, query string) (*Stmt, error) { - s, err := p.Prepare(query) - if err != nil { - return nil, err - } - return &Stmt{Stmt: s, unsafe: isUnsafe(p), Mapper: mapperFor(p)}, err -} - -// Select executes a query using the provided Queryer, and StructScans each row -// into dest, which must be a slice. If the slice elements are scannable, then -// the result set must have only one column. Otherwise, StructScan is used. -// The *sql.Rows are closed automatically. -// Any placeholder parameters are replaced with supplied args. -func Select(q Queryer, dest interface{}, query string, args ...interface{}) error { - rows, err := q.Queryx(query, args...) - if err != nil { - return err - } - // if something happens here, we want to make sure the rows are Closed - defer rows.Close() - return scanAll(rows, dest, false) -} - -// Get does a QueryRow using the provided Queryer, and scans the resulting row -// to dest. If dest is scannable, the result must only have one column. Otherwise, -// StructScan is used. Get will return sql.ErrNoRows like row.Scan would. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func Get(q Queryer, dest interface{}, query string, args ...interface{}) error { - r := q.QueryRowx(query, args...) - return r.scanAny(dest, false) -} - -// LoadFile exec's every statement in a file (as a single call to Exec). -// LoadFile may return a nil *sql.Result if errors are encountered locating or -// reading the file at path. LoadFile reads the entire file into memory, so it -// is not suitable for loading large data dumps, but can be useful for initializing -// schemas or loading indexes. -// -// FIXME: this does not really work with multi-statement files for mattn/go-sqlite3 -// or the go-mysql-driver/mysql drivers; pq seems to be an exception here. Detecting -// this by requiring something with DriverName() and then attempting to split the -// queries will be difficult to get right, and its current driver-specific behavior -// is deemed at least not complex in its incorrectness. -func LoadFile(e Execer, path string) (*sql.Result, error) { - realpath, err := filepath.Abs(path) - if err != nil { - return nil, err - } - contents, err := ioutil.ReadFile(realpath) - if err != nil { - return nil, err - } - res, err := e.Exec(string(contents)) - return &res, err -} - -// MustExec execs the query using e and panics if there was an error. -// Any placeholder parameters are replaced with supplied args. -func MustExec(e Execer, query string, args ...interface{}) sql.Result { - res, err := e.Exec(query, args...) - if err != nil { - panic(err) - } - return res -} - -// SliceScan using this Rows. -func (r *Row) SliceScan() ([]interface{}, error) { - return SliceScan(r) -} - -// MapScan using this Rows. -func (r *Row) MapScan(dest map[string]interface{}) error { - return MapScan(r, dest) -} - -func (r *Row) scanAny(dest interface{}, structOnly bool) error { - if r.err != nil { - return r.err - } - if r.rows == nil { - r.err = sql.ErrNoRows - return r.err - } - defer r.rows.Close() - - v := reflect.ValueOf(dest) - if v.Kind() != reflect.Ptr { - return errors.New("must pass a pointer, not a value, to StructScan destination") - } - if v.IsNil() { - return errors.New("nil pointer passed to StructScan destination") - } - - base := reflectx.Deref(v.Type()) - scannable := isScannable(base) - - if structOnly && scannable { - return structOnlyError(base) - } - - columns, err := r.Columns() - if err != nil { - return err - } - - if scannable && len(columns) > 1 { - return fmt.Errorf("scannable dest type %s with >1 columns (%d) in result", base.Kind(), len(columns)) - } - - if scannable { - return r.Scan(dest) - } - - m := r.Mapper - - fields := m.TraversalsByName(v.Type(), columns) - // if we are not unsafe and are missing fields, return an error - if f, err := missingFields(fields); err != nil && !r.unsafe { - return fmt.Errorf("missing destination name %s in %T", columns[f], dest) - } - values := make([]interface{}, len(columns)) - - err = fieldsByTraversal(v, fields, values, true) - if err != nil { - return err - } - // scan into the struct field pointers and append to our results - return r.Scan(values...) -} - -// StructScan a single Row into dest. -func (r *Row) StructScan(dest interface{}) error { - return r.scanAny(dest, true) -} - -// SliceScan a row, returning a []interface{} with values similar to MapScan. -// This function is primarily intended for use where the number of columns -// is not known. Because you can pass an []interface{} directly to Scan, -// it's recommended that you do that as it will not have to allocate new -// slices per row. -func SliceScan(r ColScanner) ([]interface{}, error) { - // ignore r.started, since we needn't use reflect for anything. - columns, err := r.Columns() - if err != nil { - return []interface{}{}, err - } - - values := make([]interface{}, len(columns)) - for i := range values { - values[i] = new(interface{}) - } - - err = r.Scan(values...) - - if err != nil { - return values, err - } - - for i := range columns { - values[i] = *(values[i].(*interface{})) - } - - return values, r.Err() -} - -// MapScan scans a single Row into the dest map[string]interface{}. -// Use this to get results for SQL that might not be under your control -// (for instance, if you're building an interface for an SQL server that -// executes SQL from input). Please do not use this as a primary interface! -// This will modify the map sent to it in place, so reuse the same map with -// care. Columns which occur more than once in the result will overwrite -// each other! -func MapScan(r ColScanner, dest map[string]interface{}) error { - // ignore r.started, since we needn't use reflect for anything. - columns, err := r.Columns() - if err != nil { - return err - } - - values := make([]interface{}, len(columns)) - for i := range values { - values[i] = new(interface{}) - } - - err = r.Scan(values...) - if err != nil { - return err - } - - for i, column := range columns { - dest[column] = *(values[i].(*interface{})) - } - - return r.Err() -} - -type rowsi interface { - Close() error - Columns() ([]string, error) - Err() error - Next() bool - Scan(...interface{}) error -} - -// structOnlyError returns an error appropriate for type when a non-scannable -// struct is expected but something else is given -func structOnlyError(t reflect.Type) error { - isStruct := t.Kind() == reflect.Struct - isScanner := reflect.PtrTo(t).Implements(_scannerInterface) - if !isStruct { - return fmt.Errorf("expected %s but got %s", reflect.Struct, t.Kind()) - } - if isScanner { - return fmt.Errorf("structscan expects a struct dest but the provided struct type %s implements scanner", t.Name()) - } - return fmt.Errorf("expected a struct, but struct %s has no exported fields", t.Name()) -} - -// scanAll scans all rows into a destination, which must be a slice of any -// type. If the destination slice type is a Struct, then StructScan will be -// used on each row. If the destination is some other kind of base type, then -// each row must only have one column which can scan into that type. This -// allows you to do something like: -// -// rows, _ := db.Query("select id from people;") -// var ids []int -// scanAll(rows, &ids, false) -// -// and ids will be a list of the id results. I realize that this is a desirable -// interface to expose to users, but for now it will only be exposed via changes -// to `Get` and `Select`. The reason that this has been implemented like this is -// this is the only way to not duplicate reflect work in the new API while -// maintaining backwards compatibility. -func scanAll(rows rowsi, dest interface{}, structOnly bool) error { - var v, vp reflect.Value - - value := reflect.ValueOf(dest) - - // json.Unmarshal returns errors for these - if value.Kind() != reflect.Ptr { - return errors.New("must pass a pointer, not a value, to StructScan destination") - } - if value.IsNil() { - return errors.New("nil pointer passed to StructScan destination") - } - direct := reflect.Indirect(value) - - slice, err := baseType(value.Type(), reflect.Slice) - if err != nil { - return err - } - - isPtr := slice.Elem().Kind() == reflect.Ptr - base := reflectx.Deref(slice.Elem()) - scannable := isScannable(base) - - if structOnly && scannable { - return structOnlyError(base) - } - - columns, err := rows.Columns() - if err != nil { - return err - } - - // if it's a base type make sure it only has 1 column; if not return an error - if scannable && len(columns) > 1 { - return fmt.Errorf("non-struct dest type %s with >1 columns (%d)", base.Kind(), len(columns)) - } - - if !scannable { - var values []interface{} - var m *reflectx.Mapper - - switch rows.(type) { - case *Rows: - m = rows.(*Rows).Mapper - default: - m = mapper() - } - - fields := m.TraversalsByName(base, columns) - // if we are not unsafe and are missing fields, return an error - if f, err := missingFields(fields); err != nil && !isUnsafe(rows) { - return fmt.Errorf("missing destination name %s in %T", columns[f], dest) - } - values = make([]interface{}, len(columns)) - - for rows.Next() { - // create a new struct type (which returns PtrTo) and indirect it - vp = reflect.New(base) - v = reflect.Indirect(vp) - - err = fieldsByTraversal(v, fields, values, true) - if err != nil { - return err - } - - // scan into the struct field pointers and append to our results - err = rows.Scan(values...) - if err != nil { - return err - } - - if isPtr { - direct.Set(reflect.Append(direct, vp)) - } else { - direct.Set(reflect.Append(direct, v)) - } - } - } else { - for rows.Next() { - vp = reflect.New(base) - err = rows.Scan(vp.Interface()) - if err != nil { - return err - } - // append - if isPtr { - direct.Set(reflect.Append(direct, vp)) - } else { - direct.Set(reflect.Append(direct, reflect.Indirect(vp))) - } - } - } - - return rows.Err() -} - -// FIXME: StructScan was the very first bit of API in sqlx, and now unfortunately -// it doesn't really feel like it's named properly. There is an incongruency -// between this and the way that StructScan (which might better be ScanStruct -// anyway) works on a rows object. - -// StructScan all rows from an sql.Rows or an sqlx.Rows into the dest slice. -// StructScan will scan in the entire rows result, so if you do not want to -// allocate structs for the entire result, use Queryx and see sqlx.Rows.StructScan. -// If rows is sqlx.Rows, it will use its mapper, otherwise it will use the default. -func StructScan(rows rowsi, dest interface{}) error { - return scanAll(rows, dest, true) - -} - -// reflect helpers - -func baseType(t reflect.Type, expected reflect.Kind) (reflect.Type, error) { - t = reflectx.Deref(t) - if t.Kind() != expected { - return nil, fmt.Errorf("expected %s but got %s", expected, t.Kind()) - } - return t, nil -} - -// fieldsByName fills a values interface with fields from the passed value based -// on the traversals in int. If ptrs is true, return addresses instead of values. -// We write this instead of using FieldsByName to save allocations and map lookups -// when iterating over many rows. Empty traversals will get an interface pointer. -// Because of the necessity of requesting ptrs or values, it's considered a bit too -// specialized for inclusion in reflectx itself. -func fieldsByTraversal(v reflect.Value, traversals [][]int, values []interface{}, ptrs bool) error { - v = reflect.Indirect(v) - if v.Kind() != reflect.Struct { - return errors.New("argument not a struct") - } - - for i, traversal := range traversals { - if len(traversal) == 0 { - values[i] = new(interface{}) - continue - } - f := reflectx.FieldByIndexes(v, traversal) - if ptrs { - values[i] = f.Addr().Interface() - } else { - values[i] = f.Interface() - } - } - return nil -} - -func missingFields(transversals [][]int) (field int, err error) { - for i, t := range transversals { - if len(t) == 0 { - return i, errors.New("missing field") - } - } - return 0, nil -} diff --git a/vendor/github.com/jmoiron/sqlx/sqlx_context.go b/vendor/github.com/jmoiron/sqlx/sqlx_context.go deleted file mode 100644 index 0b1714514..000000000 --- a/vendor/github.com/jmoiron/sqlx/sqlx_context.go +++ /dev/null @@ -1,335 +0,0 @@ -// +build go1.8 - -package sqlx - -import ( - "context" - "database/sql" - "fmt" - "io/ioutil" - "path/filepath" - "reflect" -) - -// ConnectContext to a database and verify with a ping. -func ConnectContext(ctx context.Context, driverName, dataSourceName string) (*DB, error) { - db, err := Open(driverName, dataSourceName) - if err != nil { - return db, err - } - err = db.PingContext(ctx) - return db, err -} - -// QueryerContext is an interface used by GetContext and SelectContext -type QueryerContext interface { - QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) - QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) - QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row -} - -// PreparerContext is an interface used by PreparexContext. -type PreparerContext interface { - PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) -} - -// ExecerContext is an interface used by MustExecContext and LoadFileContext -type ExecerContext interface { - ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) -} - -// ExtContext is a union interface which can bind, query, and exec, with Context -// used by NamedQueryContext and NamedExecContext. -type ExtContext interface { - binder - QueryerContext - ExecerContext -} - -// SelectContext executes a query using the provided Queryer, and StructScans -// each row into dest, which must be a slice. If the slice elements are -// scannable, then the result set must have only one column. Otherwise, -// StructScan is used. The *sql.Rows are closed automatically. -// Any placeholder parameters are replaced with supplied args. -func SelectContext(ctx context.Context, q QueryerContext, dest interface{}, query string, args ...interface{}) error { - rows, err := q.QueryxContext(ctx, query, args...) - if err != nil { - return err - } - // if something happens here, we want to make sure the rows are Closed - defer rows.Close() - return scanAll(rows, dest, false) -} - -// PreparexContext prepares a statement. -// -// The provided context is used for the preparation of the statement, not for -// the execution of the statement. -func PreparexContext(ctx context.Context, p PreparerContext, query string) (*Stmt, error) { - s, err := p.PrepareContext(ctx, query) - if err != nil { - return nil, err - } - return &Stmt{Stmt: s, unsafe: isUnsafe(p), Mapper: mapperFor(p)}, err -} - -// GetContext does a QueryRow using the provided Queryer, and scans the -// resulting row to dest. If dest is scannable, the result must only have one -// column. Otherwise, StructScan is used. Get will return sql.ErrNoRows like -// row.Scan would. Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func GetContext(ctx context.Context, q QueryerContext, dest interface{}, query string, args ...interface{}) error { - r := q.QueryRowxContext(ctx, query, args...) - return r.scanAny(dest, false) -} - -// LoadFileContext exec's every statement in a file (as a single call to Exec). -// LoadFileContext may return a nil *sql.Result if errors are encountered -// locating or reading the file at path. LoadFile reads the entire file into -// memory, so it is not suitable for loading large data dumps, but can be useful -// for initializing schemas or loading indexes. -// -// FIXME: this does not really work with multi-statement files for mattn/go-sqlite3 -// or the go-mysql-driver/mysql drivers; pq seems to be an exception here. Detecting -// this by requiring something with DriverName() and then attempting to split the -// queries will be difficult to get right, and its current driver-specific behavior -// is deemed at least not complex in its incorrectness. -func LoadFileContext(ctx context.Context, e ExecerContext, path string) (*sql.Result, error) { - realpath, err := filepath.Abs(path) - if err != nil { - return nil, err - } - contents, err := ioutil.ReadFile(realpath) - if err != nil { - return nil, err - } - res, err := e.ExecContext(ctx, string(contents)) - return &res, err -} - -// MustExecContext execs the query using e and panics if there was an error. -// Any placeholder parameters are replaced with supplied args. -func MustExecContext(ctx context.Context, e ExecerContext, query string, args ...interface{}) sql.Result { - res, err := e.ExecContext(ctx, query, args...) - if err != nil { - panic(err) - } - return res -} - -// PrepareNamedContext returns an sqlx.NamedStmt -func (db *DB) PrepareNamedContext(ctx context.Context, query string) (*NamedStmt, error) { - return prepareNamedContext(ctx, db, query) -} - -// NamedQueryContext using this DB. -// Any named placeholder parameters are replaced with fields from arg. -func (db *DB) NamedQueryContext(ctx context.Context, query string, arg interface{}) (*Rows, error) { - return NamedQueryContext(ctx, db, query, arg) -} - -// NamedExecContext using this DB. -// Any named placeholder parameters are replaced with fields from arg. -func (db *DB) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) { - return NamedExecContext(ctx, db, query, arg) -} - -// SelectContext using this DB. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { - return SelectContext(ctx, db, dest, query, args...) -} - -// GetContext using this DB. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func (db *DB) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { - return GetContext(ctx, db, dest, query, args...) -} - -// PreparexContext returns an sqlx.Stmt instead of a sql.Stmt. -// -// The provided context is used for the preparation of the statement, not for -// the execution of the statement. -func (db *DB) PreparexContext(ctx context.Context, query string) (*Stmt, error) { - return PreparexContext(ctx, db, query) -} - -// QueryxContext queries the database and returns an *sqlx.Rows. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { - r, err := db.DB.QueryContext(ctx, query, args...) - if err != nil { - return nil, err - } - return &Rows{Rows: r, unsafe: db.unsafe, Mapper: db.Mapper}, err -} - -// QueryRowxContext queries the database and returns an *sqlx.Row. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { - rows, err := db.DB.QueryContext(ctx, query, args...) - return &Row{rows: rows, err: err, unsafe: db.unsafe, Mapper: db.Mapper} -} - -// MustBeginTx starts a transaction, and panics on error. Returns an *sqlx.Tx instead -// of an *sql.Tx. -// -// The provided context is used until the transaction is committed or rolled -// back. If the context is canceled, the sql package will roll back the -// transaction. Tx.Commit will return an error if the context provided to -// MustBeginContext is canceled. -func (db *DB) MustBeginTx(ctx context.Context, opts *sql.TxOptions) *Tx { - tx, err := db.BeginTxx(ctx, opts) - if err != nil { - panic(err) - } - return tx -} - -// MustExecContext (panic) runs MustExec using this database. -// Any placeholder parameters are replaced with supplied args. -func (db *DB) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result { - return MustExecContext(ctx, db, query, args...) -} - -// BeginTxx begins a transaction and returns an *sqlx.Tx instead of an -// *sql.Tx. -// -// The provided context is used until the transaction is committed or rolled -// back. If the context is canceled, the sql package will roll back the -// transaction. Tx.Commit will return an error if the context provided to -// BeginxContext is canceled. -func (db *DB) BeginTxx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) { - tx, err := db.DB.BeginTx(ctx, opts) - if err != nil { - return nil, err - } - return &Tx{Tx: tx, driverName: db.driverName, unsafe: db.unsafe, Mapper: db.Mapper}, err -} - -// StmtxContext returns a version of the prepared statement which runs within a -// transaction. Provided stmt can be either *sql.Stmt or *sqlx.Stmt. -func (tx *Tx) StmtxContext(ctx context.Context, stmt interface{}) *Stmt { - var s *sql.Stmt - switch v := stmt.(type) { - case Stmt: - s = v.Stmt - case *Stmt: - s = v.Stmt - case sql.Stmt: - s = &v - case *sql.Stmt: - s = v - default: - panic(fmt.Sprintf("non-statement type %v passed to Stmtx", reflect.ValueOf(stmt).Type())) - } - return &Stmt{Stmt: tx.StmtContext(ctx, s), Mapper: tx.Mapper} -} - -// NamedStmtContext returns a version of the prepared statement which runs -// within a transaction. -func (tx *Tx) NamedStmtContext(ctx context.Context, stmt *NamedStmt) *NamedStmt { - return &NamedStmt{ - QueryString: stmt.QueryString, - Params: stmt.Params, - Stmt: tx.StmtxContext(ctx, stmt.Stmt), - } -} - -// MustExecContext runs MustExecContext within a transaction. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result { - return MustExecContext(ctx, tx, query, args...) -} - -// QueryxContext within a transaction and context. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { - r, err := tx.Tx.QueryContext(ctx, query, args...) - if err != nil { - return nil, err - } - return &Rows{Rows: r, unsafe: tx.unsafe, Mapper: tx.Mapper}, err -} - -// SelectContext within a transaction and context. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { - return SelectContext(ctx, tx, dest, query, args...) -} - -// GetContext within a transaction and context. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func (tx *Tx) GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error { - return GetContext(ctx, tx, dest, query, args...) -} - -// QueryRowxContext within a transaction and context. -// Any placeholder parameters are replaced with supplied args. -func (tx *Tx) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { - rows, err := tx.Tx.QueryContext(ctx, query, args...) - return &Row{rows: rows, err: err, unsafe: tx.unsafe, Mapper: tx.Mapper} -} - -// NamedExecContext using this Tx. -// Any named placeholder parameters are replaced with fields from arg. -func (tx *Tx) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) { - return NamedExecContext(ctx, tx, query, arg) -} - -// SelectContext using the prepared statement. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) SelectContext(ctx context.Context, dest interface{}, args ...interface{}) error { - return SelectContext(ctx, &qStmt{s}, dest, "", args...) -} - -// GetContext using the prepared statement. -// Any placeholder parameters are replaced with supplied args. -// An error is returned if the result set is empty. -func (s *Stmt) GetContext(ctx context.Context, dest interface{}, args ...interface{}) error { - return GetContext(ctx, &qStmt{s}, dest, "", args...) -} - -// MustExecContext (panic) using this statement. Note that the query portion of -// the error output will be blank, as Stmt does not expose its query. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) MustExecContext(ctx context.Context, args ...interface{}) sql.Result { - return MustExecContext(ctx, &qStmt{s}, "", args...) -} - -// QueryRowxContext using this statement. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) QueryRowxContext(ctx context.Context, args ...interface{}) *Row { - qs := &qStmt{s} - return qs.QueryRowxContext(ctx, "", args...) -} - -// QueryxContext using this statement. -// Any placeholder parameters are replaced with supplied args. -func (s *Stmt) QueryxContext(ctx context.Context, args ...interface{}) (*Rows, error) { - qs := &qStmt{s} - return qs.QueryxContext(ctx, "", args...) -} - -func (q *qStmt) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) { - return q.Stmt.QueryContext(ctx, args...) -} - -func (q *qStmt) QueryxContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) { - r, err := q.Stmt.QueryContext(ctx, args...) - if err != nil { - return nil, err - } - return &Rows{Rows: r, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper}, err -} - -func (q *qStmt) QueryRowxContext(ctx context.Context, query string, args ...interface{}) *Row { - rows, err := q.Stmt.QueryContext(ctx, args...) - return &Row{rows: rows, err: err, unsafe: q.Stmt.unsafe, Mapper: q.Stmt.Mapper} -} - -func (q *qStmt) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) { - return q.Stmt.ExecContext(ctx, args...) -} diff --git a/vendor/github.com/jmoiron/sqlx/sqlx_context_test.go b/vendor/github.com/jmoiron/sqlx/sqlx_context_test.go deleted file mode 100644 index 85e112bd5..000000000 --- a/vendor/github.com/jmoiron/sqlx/sqlx_context_test.go +++ /dev/null @@ -1,1344 +0,0 @@ -// +build go1.8 - -// The following environment variables, if set, will be used: -// -// * SQLX_SQLITE_DSN -// * SQLX_POSTGRES_DSN -// * SQLX_MYSQL_DSN -// -// Set any of these variables to 'skip' to skip them. Note that for MySQL, -// the string '?parseTime=True' will be appended to the DSN if it's not there -// already. -// -package sqlx - -import ( - "context" - "database/sql" - "encoding/json" - "fmt" - "log" - "strings" - "testing" - "time" - - _ "github.com/go-sql-driver/mysql" - "github.com/jmoiron/sqlx/reflectx" - _ "github.com/lib/pq" - _ "github.com/mattn/go-sqlite3" -) - -func MultiExecContext(ctx context.Context, e ExecerContext, query string) { - stmts := strings.Split(query, ";\n") - if len(strings.Trim(stmts[len(stmts)-1], " \n\t\r")) == 0 { - stmts = stmts[:len(stmts)-1] - } - for _, s := range stmts { - _, err := e.ExecContext(ctx, s) - if err != nil { - fmt.Println(err, s) - } - } -} - -func RunWithSchemaContext(ctx context.Context, schema Schema, t *testing.T, test func(ctx context.Context, db *DB, t *testing.T)) { - runner := func(ctx context.Context, db *DB, t *testing.T, create, drop string) { - defer func() { - MultiExecContext(ctx, db, drop) - }() - - MultiExecContext(ctx, db, create) - test(ctx, db, t) - } - - if TestPostgres { - create, drop := schema.Postgres() - runner(ctx, pgdb, t, create, drop) - } - if TestSqlite { - create, drop := schema.Sqlite3() - runner(ctx, sldb, t, create, drop) - } - if TestMysql { - create, drop := schema.MySQL() - runner(ctx, mysqldb, t, create, drop) - } -} - -func loadDefaultFixtureContext(ctx context.Context, db *DB, t *testing.T) { - tx := db.MustBeginTx(ctx, nil) - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO person (first_name, last_name, email) VALUES (?, ?, ?)"), "Jason", "Moiron", "jmoiron@jmoiron.net") - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO person (first_name, last_name, email) VALUES (?, ?, ?)"), "John", "Doe", "johndoeDNE@gmail.net") - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO place (country, city, telcode) VALUES (?, ?, ?)"), "United States", "New York", "1") - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Hong Kong", "852") - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Singapore", "65") - if db.DriverName() == "mysql" { - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO capplace (`COUNTRY`, `TELCODE`) VALUES (?, ?)"), "Sarf Efrica", "27") - } else { - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO capplace (\"COUNTRY\", \"TELCODE\") VALUES (?, ?)"), "Sarf Efrica", "27") - } - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO employees (name, id) VALUES (?, ?)"), "Peter", "4444") - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO employees (name, id, boss_id) VALUES (?, ?, ?)"), "Joe", "1", "4444") - tx.MustExecContext(ctx, tx.Rebind("INSERT INTO employees (name, id, boss_id) VALUES (?, ?, ?)"), "Martin", "2", "4444") - tx.Commit() -} - -// Test a new backwards compatible feature, that missing scan destinations -// will silently scan into sql.RawText rather than failing/panicing -func TestMissingNamesContextContext(t *testing.T) { - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - type PersonPlus struct { - FirstName string `db:"first_name"` - LastName string `db:"last_name"` - Email string - //AddedAt time.Time `db:"added_at"` - } - - // test Select first - pps := []PersonPlus{} - // pps lacks added_at destination - err := db.SelectContext(ctx, &pps, "SELECT * FROM person") - if err == nil { - t.Error("Expected missing name from Select to fail, but it did not.") - } - - // test Get - pp := PersonPlus{} - err = db.GetContext(ctx, &pp, "SELECT * FROM person LIMIT 1") - if err == nil { - t.Error("Expected missing name Get to fail, but it did not.") - } - - // test naked StructScan - pps = []PersonPlus{} - rows, err := db.QueryContext(ctx, "SELECT * FROM person LIMIT 1") - if err != nil { - t.Fatal(err) - } - rows.Next() - err = StructScan(rows, &pps) - if err == nil { - t.Error("Expected missing name in StructScan to fail, but it did not.") - } - rows.Close() - - // now try various things with unsafe set. - db = db.Unsafe() - pps = []PersonPlus{} - err = db.SelectContext(ctx, &pps, "SELECT * FROM person") - if err != nil { - t.Error(err) - } - - // test Get - pp = PersonPlus{} - err = db.GetContext(ctx, &pp, "SELECT * FROM person LIMIT 1") - if err != nil { - t.Error(err) - } - - // test naked StructScan - pps = []PersonPlus{} - rowsx, err := db.QueryxContext(ctx, "SELECT * FROM person LIMIT 1") - if err != nil { - t.Fatal(err) - } - rowsx.Next() - err = StructScan(rowsx, &pps) - if err != nil { - t.Error(err) - } - rowsx.Close() - - // test Named stmt - if !isUnsafe(db) { - t.Error("Expected db to be unsafe, but it isn't") - } - nstmt, err := db.PrepareNamedContext(ctx, `SELECT * FROM person WHERE first_name != :name`) - if err != nil { - t.Fatal(err) - } - // its internal stmt should be marked unsafe - if !nstmt.Stmt.unsafe { - t.Error("expected NamedStmt to be unsafe but its underlying stmt did not inherit safety") - } - pps = []PersonPlus{} - err = nstmt.SelectContext(ctx, &pps, map[string]interface{}{"name": "Jason"}) - if err != nil { - t.Fatal(err) - } - if len(pps) != 1 { - t.Errorf("Expected 1 person back, got %d", len(pps)) - } - - // test it with a safe db - db.unsafe = false - if isUnsafe(db) { - t.Error("expected db to be safe but it isn't") - } - nstmt, err = db.PrepareNamedContext(ctx, `SELECT * FROM person WHERE first_name != :name`) - if err != nil { - t.Fatal(err) - } - // it should be safe - if isUnsafe(nstmt) { - t.Error("NamedStmt did not inherit safety") - } - nstmt.Unsafe() - if !isUnsafe(nstmt) { - t.Error("expected newly unsafed NamedStmt to be unsafe") - } - pps = []PersonPlus{} - err = nstmt.SelectContext(ctx, &pps, map[string]interface{}{"name": "Jason"}) - if err != nil { - t.Fatal(err) - } - if len(pps) != 1 { - t.Errorf("Expected 1 person back, got %d", len(pps)) - } - - }) -} - -func TestEmbeddedStructsContextContext(t *testing.T) { - type Loop1 struct{ Person } - type Loop2 struct{ Loop1 } - type Loop3 struct{ Loop2 } - - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - peopleAndPlaces := []PersonPlace{} - err := db.SelectContext( - ctx, - &peopleAndPlaces, - `SELECT person.*, place.* FROM - person natural join place`) - if err != nil { - t.Fatal(err) - } - for _, pp := range peopleAndPlaces { - if len(pp.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - if len(pp.Place.Country) == 0 { - t.Errorf("Expected non zero lengthed country.") - } - } - - // test embedded structs with StructScan - rows, err := db.QueryxContext( - ctx, - `SELECT person.*, place.* FROM - person natural join place`) - if err != nil { - t.Error(err) - } - - perp := PersonPlace{} - rows.Next() - err = rows.StructScan(&perp) - if err != nil { - t.Error(err) - } - - if len(perp.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - if len(perp.Place.Country) == 0 { - t.Errorf("Expected non zero lengthed country.") - } - - rows.Close() - - // test the same for embedded pointer structs - peopleAndPlacesPtrs := []PersonPlacePtr{} - err = db.SelectContext( - ctx, - &peopleAndPlacesPtrs, - `SELECT person.*, place.* FROM - person natural join place`) - if err != nil { - t.Fatal(err) - } - for _, pp := range peopleAndPlacesPtrs { - if len(pp.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - if len(pp.Place.Country) == 0 { - t.Errorf("Expected non zero lengthed country.") - } - } - - // test "deep nesting" - l3s := []Loop3{} - err = db.SelectContext(ctx, &l3s, `select * from person`) - if err != nil { - t.Fatal(err) - } - for _, l3 := range l3s { - if len(l3.Loop2.Loop1.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - } - - // test "embed conflicts" - ec := []EmbedConflict{} - err = db.SelectContext(ctx, &ec, `select * from person`) - // I'm torn between erroring here or having some kind of working behavior - // in order to allow for more flexibility in destination structs - if err != nil { - t.Errorf("Was not expecting an error on embed conflicts.") - } - }) -} - -func TestJoinQueryContext(t *testing.T) { - type Employee struct { - Name string - ID int64 - // BossID is an id into the employee table - BossID sql.NullInt64 `db:"boss_id"` - } - type Boss Employee - - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - - var employees []struct { - Employee - Boss `db:"boss"` - } - - err := db.SelectContext(ctx, - &employees, - `SELECT employees.*, boss.id "boss.id", boss.name "boss.name" FROM employees - JOIN employees AS boss ON employees.boss_id = boss.id`) - if err != nil { - t.Fatal(err) - } - - for _, em := range employees { - if len(em.Employee.Name) == 0 { - t.Errorf("Expected non zero lengthed name.") - } - if em.Employee.BossID.Int64 != em.Boss.ID { - t.Errorf("Expected boss ids to match") - } - } - }) -} - -func TestJoinQueryNamedPointerStructsContext(t *testing.T) { - type Employee struct { - Name string - ID int64 - // BossID is an id into the employee table - BossID sql.NullInt64 `db:"boss_id"` - } - type Boss Employee - - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - - var employees []struct { - Emp1 *Employee `db:"emp1"` - Emp2 *Employee `db:"emp2"` - *Boss `db:"boss"` - } - - err := db.SelectContext(ctx, - &employees, - `SELECT emp.name "emp1.name", emp.id "emp1.id", emp.boss_id "emp1.boss_id", - emp.name "emp2.name", emp.id "emp2.id", emp.boss_id "emp2.boss_id", - boss.id "boss.id", boss.name "boss.name" FROM employees AS emp - JOIN employees AS boss ON emp.boss_id = boss.id - `) - if err != nil { - t.Fatal(err) - } - - for _, em := range employees { - if len(em.Emp1.Name) == 0 || len(em.Emp2.Name) == 0 { - t.Errorf("Expected non zero lengthed name.") - } - if em.Emp1.BossID.Int64 != em.Boss.ID || em.Emp2.BossID.Int64 != em.Boss.ID { - t.Errorf("Expected boss ids to match") - } - } - }) -} - -func TestSelectSliceMapTimeContext(t *testing.T) { - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - rows, err := db.QueryxContext(ctx, "SELECT * FROM person") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - _, err := rows.SliceScan() - if err != nil { - t.Error(err) - } - } - - rows, err = db.QueryxContext(ctx, "SELECT * FROM person") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - m := map[string]interface{}{} - err := rows.MapScan(m) - if err != nil { - t.Error(err) - } - } - - }) -} - -func TestNilReceiverContext(t *testing.T) { - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - var p *Person - err := db.GetContext(ctx, p, "SELECT * FROM person LIMIT 1") - if err == nil { - t.Error("Expected error when getting into nil struct ptr.") - } - var pp *[]Person - err = db.SelectContext(ctx, pp, "SELECT * FROM person") - if err == nil { - t.Error("Expected an error when selecting into nil slice ptr.") - } - }) -} - -func TestNamedQueryContext(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE place ( - id integer PRIMARY KEY, - name text NULL - ); - CREATE TABLE person ( - first_name text NULL, - last_name text NULL, - email text NULL - ); - CREATE TABLE placeperson ( - first_name text NULL, - last_name text NULL, - email text NULL, - place_id integer NULL - ); - CREATE TABLE jsperson ( - "FIRST" text NULL, - last_name text NULL, - "EMAIL" text NULL - );`, - drop: ` - drop table person; - drop table jsperson; - drop table place; - drop table placeperson; - `, - } - - RunWithSchemaContext(context.Background(), schema, t, func(ctx context.Context, db *DB, t *testing.T) { - type Person struct { - FirstName sql.NullString `db:"first_name"` - LastName sql.NullString `db:"last_name"` - Email sql.NullString - } - - p := Person{ - FirstName: sql.NullString{String: "ben", Valid: true}, - LastName: sql.NullString{String: "doe", Valid: true}, - Email: sql.NullString{String: "ben@doe.com", Valid: true}, - } - - q1 := `INSERT INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)` - _, err := db.NamedExecContext(ctx, q1, p) - if err != nil { - log.Fatal(err) - } - - p2 := &Person{} - rows, err := db.NamedQueryContext(ctx, "SELECT * FROM person WHERE first_name=:first_name", p) - if err != nil { - log.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(p2) - if err != nil { - t.Error(err) - } - if p2.FirstName.String != "ben" { - t.Error("Expected first name of `ben`, got " + p2.FirstName.String) - } - if p2.LastName.String != "doe" { - t.Error("Expected first name of `doe`, got " + p2.LastName.String) - } - } - - // these are tests for #73; they verify that named queries work if you've - // changed the db mapper. This code checks both NamedQuery "ad-hoc" style - // queries and NamedStmt queries, which use different code paths internally. - old := *db.Mapper - - type JSONPerson struct { - FirstName sql.NullString `json:"FIRST"` - LastName sql.NullString `json:"last_name"` - Email sql.NullString - } - - jp := JSONPerson{ - FirstName: sql.NullString{String: "ben", Valid: true}, - LastName: sql.NullString{String: "smith", Valid: true}, - Email: sql.NullString{String: "ben@smith.com", Valid: true}, - } - - db.Mapper = reflectx.NewMapperFunc("json", strings.ToUpper) - - // prepare queries for case sensitivity to test our ToUpper function. - // postgres and sqlite accept "", but mysql uses ``; since Go's multi-line - // strings are `` we use "" by default and swap out for MySQL - pdb := func(s string, db *DB) string { - if db.DriverName() == "mysql" { - return strings.Replace(s, `"`, "`", -1) - } - return s - } - - q1 = `INSERT INTO jsperson ("FIRST", last_name, "EMAIL") VALUES (:FIRST, :last_name, :EMAIL)` - _, err = db.NamedExecContext(ctx, pdb(q1, db), jp) - if err != nil { - t.Fatal(err, db.DriverName()) - } - - // Checks that a person pulled out of the db matches the one we put in - check := func(t *testing.T, rows *Rows) { - jp = JSONPerson{} - for rows.Next() { - err = rows.StructScan(&jp) - if err != nil { - t.Error(err) - } - if jp.FirstName.String != "ben" { - t.Errorf("Expected first name of `ben`, got `%s` (%s) ", jp.FirstName.String, db.DriverName()) - } - if jp.LastName.String != "smith" { - t.Errorf("Expected LastName of `smith`, got `%s` (%s)", jp.LastName.String, db.DriverName()) - } - if jp.Email.String != "ben@smith.com" { - t.Errorf("Expected first name of `doe`, got `%s` (%s)", jp.Email.String, db.DriverName()) - } - } - } - - ns, err := db.PrepareNamed(pdb(` - SELECT * FROM jsperson - WHERE - "FIRST"=:FIRST AND - last_name=:last_name AND - "EMAIL"=:EMAIL - `, db)) - - if err != nil { - t.Fatal(err) - } - rows, err = ns.QueryxContext(ctx, jp) - if err != nil { - t.Fatal(err) - } - - check(t, rows) - - // Check exactly the same thing, but with db.NamedQuery, which does not go - // through the PrepareNamed/NamedStmt path. - rows, err = db.NamedQueryContext(ctx, pdb(` - SELECT * FROM jsperson - WHERE - "FIRST"=:FIRST AND - last_name=:last_name AND - "EMAIL"=:EMAIL - `, db), jp) - if err != nil { - t.Fatal(err) - } - - check(t, rows) - - db.Mapper = &old - - // Test nested structs - type Place struct { - ID int `db:"id"` - Name sql.NullString `db:"name"` - } - type PlacePerson struct { - FirstName sql.NullString `db:"first_name"` - LastName sql.NullString `db:"last_name"` - Email sql.NullString - Place Place `db:"place"` - } - - pl := Place{ - Name: sql.NullString{String: "myplace", Valid: true}, - } - - pp := PlacePerson{ - FirstName: sql.NullString{String: "ben", Valid: true}, - LastName: sql.NullString{String: "doe", Valid: true}, - Email: sql.NullString{String: "ben@doe.com", Valid: true}, - } - - q2 := `INSERT INTO place (id, name) VALUES (1, :name)` - _, err = db.NamedExecContext(ctx, q2, pl) - if err != nil { - log.Fatal(err) - } - - id := 1 - pp.Place.ID = id - - q3 := `INSERT INTO placeperson (first_name, last_name, email, place_id) VALUES (:first_name, :last_name, :email, :place.id)` - _, err = db.NamedExecContext(ctx, q3, pp) - if err != nil { - log.Fatal(err) - } - - pp2 := &PlacePerson{} - rows, err = db.NamedQueryContext(ctx, ` - SELECT - first_name, - last_name, - email, - place.id AS "place.id", - place.name AS "place.name" - FROM placeperson - INNER JOIN place ON place.id = placeperson.place_id - WHERE - place.id=:place.id`, pp) - if err != nil { - log.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(pp2) - if err != nil { - t.Error(err) - } - if pp2.FirstName.String != "ben" { - t.Error("Expected first name of `ben`, got " + pp2.FirstName.String) - } - if pp2.LastName.String != "doe" { - t.Error("Expected first name of `doe`, got " + pp2.LastName.String) - } - if pp2.Place.Name.String != "myplace" { - t.Error("Expected place name of `myplace`, got " + pp2.Place.Name.String) - } - if pp2.Place.ID != pp.Place.ID { - t.Errorf("Expected place name of %v, got %v", pp.Place.ID, pp2.Place.ID) - } - } - }) -} - -func TestNilInsertsContext(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE tt ( - id integer, - value text NULL DEFAULT NULL - );`, - drop: "drop table tt;", - } - - RunWithSchemaContext(context.Background(), schema, t, func(ctx context.Context, db *DB, t *testing.T) { - type TT struct { - ID int - Value *string - } - var v, v2 TT - r := db.Rebind - - db.MustExecContext(ctx, r(`INSERT INTO tt (id) VALUES (1)`)) - db.GetContext(ctx, &v, r(`SELECT * FROM tt`)) - if v.ID != 1 { - t.Errorf("Expecting id of 1, got %v", v.ID) - } - if v.Value != nil { - t.Errorf("Expecting NULL to map to nil, got %s", *v.Value) - } - - v.ID = 2 - // NOTE: this incidentally uncovered a bug which was that named queries with - // pointer destinations would not work if the passed value here was not addressable, - // as reflectx.FieldByIndexes attempts to allocate nil pointer receivers for - // writing. This was fixed by creating & using the reflectx.FieldByIndexesReadOnly - // function. This next line is important as it provides the only coverage for this. - db.NamedExecContext(ctx, `INSERT INTO tt (id, value) VALUES (:id, :value)`, v) - - db.GetContext(ctx, &v2, r(`SELECT * FROM tt WHERE id=2`)) - if v.ID != v2.ID { - t.Errorf("%v != %v", v.ID, v2.ID) - } - if v2.Value != nil { - t.Errorf("Expecting NULL to map to nil, got %s", *v.Value) - } - }) -} - -func TestScanErrorContext(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE kv ( - k text, - v integer - );`, - drop: `drop table kv;`, - } - - RunWithSchemaContext(context.Background(), schema, t, func(ctx context.Context, db *DB, t *testing.T) { - type WrongTypes struct { - K int - V string - } - _, err := db.Exec(db.Rebind("INSERT INTO kv (k, v) VALUES (?, ?)"), "hi", 1) - if err != nil { - t.Error(err) - } - - rows, err := db.QueryxContext(ctx, "SELECT * FROM kv") - if err != nil { - t.Error(err) - } - for rows.Next() { - var wt WrongTypes - err := rows.StructScan(&wt) - if err == nil { - t.Errorf("%s: Scanning wrong types into keys should have errored.", db.DriverName()) - } - } - }) -} - -// FIXME: this function is kinda big but it slows things down to be constantly -// loading and reloading the schema.. - -func TestUsageContext(t *testing.T) { - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - slicemembers := []SliceMember{} - err := db.SelectContext(ctx, &slicemembers, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - t.Fatal(err) - } - - people := []Person{} - - err = db.SelectContext(ctx, &people, "SELECT * FROM person ORDER BY first_name ASC") - if err != nil { - t.Fatal(err) - } - - jason, john := people[0], people[1] - if jason.FirstName != "Jason" { - t.Errorf("Expecting FirstName of Jason, got %s", jason.FirstName) - } - if jason.LastName != "Moiron" { - t.Errorf("Expecting LastName of Moiron, got %s", jason.LastName) - } - if jason.Email != "jmoiron@jmoiron.net" { - t.Errorf("Expecting Email of jmoiron@jmoiron.net, got %s", jason.Email) - } - if john.FirstName != "John" || john.LastName != "Doe" || john.Email != "johndoeDNE@gmail.net" { - t.Errorf("John Doe's person record not what expected: Got %v\n", john) - } - - jason = Person{} - err = db.GetContext(ctx, &jason, db.Rebind("SELECT * FROM person WHERE first_name=?"), "Jason") - - if err != nil { - t.Fatal(err) - } - if jason.FirstName != "Jason" { - t.Errorf("Expecting to get back Jason, but got %v\n", jason.FirstName) - } - - err = db.GetContext(ctx, &jason, db.Rebind("SELECT * FROM person WHERE first_name=?"), "Foobar") - if err == nil { - t.Errorf("Expecting an error, got nil\n") - } - if err != sql.ErrNoRows { - t.Errorf("Expected sql.ErrNoRows, got %v\n", err) - } - - // The following tests check statement reuse, which was actually a problem - // due to copying being done when creating Stmt's which was eventually removed - stmt1, err := db.PreparexContext(ctx, db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Fatal(err) - } - jason = Person{} - - row := stmt1.QueryRowx("DoesNotExist") - row.Scan(&jason) - row = stmt1.QueryRowx("DoesNotExist") - row.Scan(&jason) - - err = stmt1.GetContext(ctx, &jason, "DoesNotExist User") - if err == nil { - t.Error("Expected an error") - } - err = stmt1.GetContext(ctx, &jason, "DoesNotExist User 2") - if err == nil { - t.Fatal(err) - } - - stmt2, err := db.PreparexContext(ctx, db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Fatal(err) - } - jason = Person{} - tx, err := db.Beginx() - if err != nil { - t.Fatal(err) - } - tstmt2 := tx.Stmtx(stmt2) - row2 := tstmt2.QueryRowx("Jason") - err = row2.StructScan(&jason) - if err != nil { - t.Error(err) - } - tx.Commit() - - places := []*Place{} - err = db.SelectContext(ctx, &places, "SELECT telcode FROM place ORDER BY telcode ASC") - if err != nil { - t.Fatal(err) - } - - usa, singsing, honkers := places[0], places[1], places[2] - - if usa.TelCode != 1 || honkers.TelCode != 852 || singsing.TelCode != 65 { - t.Errorf("Expected integer telcodes to work, got %#v", places) - } - - placesptr := []PlacePtr{} - err = db.SelectContext(ctx, &placesptr, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - t.Error(err) - } - //fmt.Printf("%#v\n%#v\n%#v\n", placesptr[0], placesptr[1], placesptr[2]) - - // if you have null fields and use SELECT *, you must use sql.Null* in your struct - // this test also verifies that you can use either a []Struct{} or a []*Struct{} - places2 := []Place{} - err = db.SelectContext(ctx, &places2, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - t.Fatal(err) - } - - usa, singsing, honkers = &places2[0], &places2[1], &places2[2] - - // this should return a type error that &p is not a pointer to a struct slice - p := Place{} - err = db.SelectContext(ctx, &p, "SELECT * FROM place ORDER BY telcode ASC") - if err == nil { - t.Errorf("Expected an error, argument to select should be a pointer to a struct slice") - } - - // this should be an error - pl := []Place{} - err = db.SelectContext(ctx, pl, "SELECT * FROM place ORDER BY telcode ASC") - if err == nil { - t.Errorf("Expected an error, argument to select should be a pointer to a struct slice, not a slice.") - } - - if usa.TelCode != 1 || honkers.TelCode != 852 || singsing.TelCode != 65 { - t.Errorf("Expected integer telcodes to work, got %#v", places) - } - - stmt, err := db.PreparexContext(ctx, db.Rebind("SELECT country, telcode FROM place WHERE telcode > ? ORDER BY telcode ASC")) - if err != nil { - t.Error(err) - } - - places = []*Place{} - err = stmt.SelectContext(ctx, &places, 10) - if len(places) != 2 { - t.Error("Expected 2 places, got 0.") - } - if err != nil { - t.Fatal(err) - } - singsing, honkers = places[0], places[1] - if singsing.TelCode != 65 || honkers.TelCode != 852 { - t.Errorf("Expected the right telcodes, got %#v", places) - } - - rows, err := db.QueryxContext(ctx, "SELECT * FROM place") - if err != nil { - t.Fatal(err) - } - place := Place{} - for rows.Next() { - err = rows.StructScan(&place) - if err != nil { - t.Fatal(err) - } - } - - rows, err = db.QueryxContext(ctx, "SELECT * FROM place") - if err != nil { - t.Fatal(err) - } - m := map[string]interface{}{} - for rows.Next() { - err = rows.MapScan(m) - if err != nil { - t.Fatal(err) - } - _, ok := m["country"] - if !ok { - t.Errorf("Expected key `country` in map but could not find it (%#v)\n", m) - } - } - - rows, err = db.QueryxContext(ctx, "SELECT * FROM place") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - s, err := rows.SliceScan() - if err != nil { - t.Error(err) - } - if len(s) != 3 { - t.Errorf("Expected 3 columns in result, got %d\n", len(s)) - } - } - - // test advanced querying - // test that NamedExec works with a map as well as a struct - _, err = db.NamedExecContext(ctx, "INSERT INTO person (first_name, last_name, email) VALUES (:first, :last, :email)", map[string]interface{}{ - "first": "Bin", - "last": "Smuth", - "email": "bensmith@allblacks.nz", - }) - if err != nil { - t.Fatal(err) - } - - // ensure that if the named param happens right at the end it still works - // ensure that NamedQuery works with a map[string]interface{} - rows, err = db.NamedQueryContext(ctx, "SELECT * FROM person WHERE first_name=:first", map[string]interface{}{"first": "Bin"}) - if err != nil { - t.Fatal(err) - } - - ben := &Person{} - for rows.Next() { - err = rows.StructScan(ben) - if err != nil { - t.Fatal(err) - } - if ben.FirstName != "Bin" { - t.Fatal("Expected first name of `Bin`, got " + ben.FirstName) - } - if ben.LastName != "Smuth" { - t.Fatal("Expected first name of `Smuth`, got " + ben.LastName) - } - } - - ben.FirstName = "Ben" - ben.LastName = "Smith" - ben.Email = "binsmuth@allblacks.nz" - - // Insert via a named query using the struct - _, err = db.NamedExecContext(ctx, "INSERT INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", ben) - - if err != nil { - t.Fatal(err) - } - - rows, err = db.NamedQueryContext(ctx, "SELECT * FROM person WHERE first_name=:first_name", ben) - if err != nil { - t.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(ben) - if err != nil { - t.Fatal(err) - } - if ben.FirstName != "Ben" { - t.Fatal("Expected first name of `Ben`, got " + ben.FirstName) - } - if ben.LastName != "Smith" { - t.Fatal("Expected first name of `Smith`, got " + ben.LastName) - } - } - // ensure that Get does not panic on emppty result set - person := &Person{} - err = db.GetContext(ctx, person, "SELECT * FROM person WHERE first_name=$1", "does-not-exist") - if err == nil { - t.Fatal("Should have got an error for Get on non-existant row.") - } - - // lets test prepared statements some more - - stmt, err = db.PreparexContext(ctx, db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Fatal(err) - } - rows, err = stmt.QueryxContext(ctx, "Ben") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(ben) - if err != nil { - t.Fatal(err) - } - if ben.FirstName != "Ben" { - t.Fatal("Expected first name of `Ben`, got " + ben.FirstName) - } - if ben.LastName != "Smith" { - t.Fatal("Expected first name of `Smith`, got " + ben.LastName) - } - } - - john = Person{} - stmt, err = db.PreparexContext(ctx, db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Error(err) - } - err = stmt.GetContext(ctx, &john, "John") - if err != nil { - t.Error(err) - } - - // test name mapping - // THIS USED TO WORK BUT WILL NO LONGER WORK. - db.MapperFunc(strings.ToUpper) - rsa := CPlace{} - err = db.GetContext(ctx, &rsa, "SELECT * FROM capplace;") - if err != nil { - t.Error(err, "in db:", db.DriverName()) - } - db.MapperFunc(strings.ToLower) - - // create a copy and change the mapper, then verify the copy behaves - // differently from the original. - dbCopy := NewDb(db.DB, db.DriverName()) - dbCopy.MapperFunc(strings.ToUpper) - err = dbCopy.GetContext(ctx, &rsa, "SELECT * FROM capplace;") - if err != nil { - fmt.Println(db.DriverName()) - t.Error(err) - } - - err = db.GetContext(ctx, &rsa, "SELECT * FROM cappplace;") - if err == nil { - t.Error("Expected no error, got ", err) - } - - // test base type slices - var sdest []string - rows, err = db.QueryxContext(ctx, "SELECT email FROM person ORDER BY email ASC;") - if err != nil { - t.Error(err) - } - err = scanAll(rows, &sdest, false) - if err != nil { - t.Error(err) - } - - // test Get with base types - var count int - err = db.GetContext(ctx, &count, "SELECT count(*) FROM person;") - if err != nil { - t.Error(err) - } - if count != len(sdest) { - t.Errorf("Expected %d == %d (count(*) vs len(SELECT ..)", count, len(sdest)) - } - - // test Get and Select with time.Time, #84 - var addedAt time.Time - err = db.GetContext(ctx, &addedAt, "SELECT added_at FROM person LIMIT 1;") - if err != nil { - t.Error(err) - } - - var addedAts []time.Time - err = db.SelectContext(ctx, &addedAts, "SELECT added_at FROM person;") - if err != nil { - t.Error(err) - } - - // test it on a double pointer - var pcount *int - err = db.GetContext(ctx, &pcount, "SELECT count(*) FROM person;") - if err != nil { - t.Error(err) - } - if *pcount != count { - t.Errorf("expected %d = %d", *pcount, count) - } - - // test Select... - sdest = []string{} - err = db.SelectContext(ctx, &sdest, "SELECT first_name FROM person ORDER BY first_name ASC;") - if err != nil { - t.Error(err) - } - expected := []string{"Ben", "Bin", "Jason", "John"} - for i, got := range sdest { - if got != expected[i] { - t.Errorf("Expected %d result to be %s, but got %s", i, expected[i], got) - } - } - - var nsdest []sql.NullString - err = db.SelectContext(ctx, &nsdest, "SELECT city FROM place ORDER BY city ASC") - if err != nil { - t.Error(err) - } - for _, val := range nsdest { - if val.Valid && val.String != "New York" { - t.Errorf("expected single valid result to be `New York`, but got %s", val.String) - } - } - }) -} - -// tests that sqlx will not panic when the wrong driver is passed because -// of an automatic nil dereference in sqlx.Open(), which was fixed. -func TestDoNotPanicOnConnectContext(t *testing.T) { - _, err := ConnectContext(context.Background(), "bogus", "hehe") - if err == nil { - t.Errorf("Should return error when using bogus driverName") - } -} - -func TestEmbeddedMapsContext(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE message ( - string text, - properties text - );`, - drop: `drop table message;`, - } - - RunWithSchemaContext(context.Background(), schema, t, func(ctx context.Context, db *DB, t *testing.T) { - messages := []Message{ - {"Hello, World", PropertyMap{"one": "1", "two": "2"}}, - {"Thanks, Joy", PropertyMap{"pull": "request"}}, - } - q1 := `INSERT INTO message (string, properties) VALUES (:string, :properties);` - for _, m := range messages { - _, err := db.NamedExecContext(ctx, q1, m) - if err != nil { - t.Fatal(err) - } - } - var count int - err := db.GetContext(ctx, &count, "SELECT count(*) FROM message") - if err != nil { - t.Fatal(err) - } - if count != len(messages) { - t.Fatalf("Expected %d messages in DB, found %d", len(messages), count) - } - - var m Message - err = db.GetContext(ctx, &m, "SELECT * FROM message LIMIT 1;") - if err != nil { - t.Fatal(err) - } - if m.Properties == nil { - t.Fatal("Expected m.Properties to not be nil, but it was.") - } - }) -} - -func TestIssue197Context(t *testing.T) { - // this test actually tests for a bug in database/sql: - // https://github.com/golang/go/issues/13905 - // this potentially makes _any_ named type that is an alias for []byte - // unsafe to use in a lot of different ways (basically, unsafe to hold - // onto after loading from the database). - t.Skip() - - type mybyte []byte - type Var struct{ Raw json.RawMessage } - type Var2 struct{ Raw []byte } - type Var3 struct{ Raw mybyte } - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - var err error - var v, q Var - if err = db.GetContext(ctx, &v, `SELECT '{"a": "b"}' AS raw`); err != nil { - t.Fatal(err) - } - if err = db.GetContext(ctx, &q, `SELECT 'null' AS raw`); err != nil { - t.Fatal(err) - } - - var v2, q2 Var2 - if err = db.GetContext(ctx, &v2, `SELECT '{"a": "b"}' AS raw`); err != nil { - t.Fatal(err) - } - if err = db.GetContext(ctx, &q2, `SELECT 'null' AS raw`); err != nil { - t.Fatal(err) - } - - var v3, q3 Var3 - if err = db.QueryRowContext(ctx, `SELECT '{"a": "b"}' AS raw`).Scan(&v3.Raw); err != nil { - t.Fatal(err) - } - if err = db.QueryRowContext(ctx, `SELECT '{"c": "d"}' AS raw`).Scan(&q3.Raw); err != nil { - t.Fatal(err) - } - t.Fail() - }) -} - -func TestInContext(t *testing.T) { - // some quite normal situations - type tr struct { - q string - args []interface{} - c int - } - tests := []tr{ - {"SELECT * FROM foo WHERE x = ? AND v in (?) AND y = ?", - []interface{}{"foo", []int{0, 5, 7, 2, 9}, "bar"}, - 7}, - {"SELECT * FROM foo WHERE x in (?)", - []interface{}{[]int{1, 2, 3, 4, 5, 6, 7, 8}}, - 8}, - } - for _, test := range tests { - q, a, err := In(test.q, test.args...) - if err != nil { - t.Error(err) - } - if len(a) != test.c { - t.Errorf("Expected %d args, but got %d (%+v)", test.c, len(a), a) - } - if strings.Count(q, "?") != test.c { - t.Errorf("Expected %d bindVars, got %d", test.c, strings.Count(q, "?")) - } - } - - // too many bindVars, but no slices, so short circuits parsing - // i'm not sure if this is the right behavior; this query/arg combo - // might not work, but we shouldn't parse if we don't need to - { - orig := "SELECT * FROM foo WHERE x = ? AND y = ?" - q, a, err := In(orig, "foo", "bar", "baz") - if err != nil { - t.Error(err) - } - if len(a) != 3 { - t.Errorf("Expected 3 args, but got %d (%+v)", len(a), a) - } - if q != orig { - t.Error("Expected unchanged query.") - } - } - - tests = []tr{ - // too many bindvars; slice present so should return error during parse - {"SELECT * FROM foo WHERE x = ? and y = ?", - []interface{}{"foo", []int{1, 2, 3}, "bar"}, - 0}, - // empty slice, should return error before parse - {"SELECT * FROM foo WHERE x = ?", - []interface{}{[]int{}}, - 0}, - // too *few* bindvars, should return an error - {"SELECT * FROM foo WHERE x = ? AND y in (?)", - []interface{}{[]int{1, 2, 3}}, - 0}, - } - for _, test := range tests { - _, _, err := In(test.q, test.args...) - if err == nil { - t.Error("Expected an error, but got nil.") - } - } - RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { - loadDefaultFixtureContext(ctx, db, t) - //tx.MustExecContext(ctx, tx.Rebind("INSERT INTO place (country, city, telcode) VALUES (?, ?, ?)"), "United States", "New York", "1") - //tx.MustExecContext(ctx, tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Hong Kong", "852") - //tx.MustExecContext(ctx, tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Singapore", "65") - telcodes := []int{852, 65} - q := "SELECT * FROM place WHERE telcode IN(?) ORDER BY telcode" - query, args, err := In(q, telcodes) - if err != nil { - t.Error(err) - } - query = db.Rebind(query) - places := []Place{} - err = db.SelectContext(ctx, &places, query, args...) - if err != nil { - t.Error(err) - } - if len(places) != 2 { - t.Fatalf("Expecting 2 results, got %d", len(places)) - } - if places[0].TelCode != 65 { - t.Errorf("Expecting singapore first, but got %#v", places[0]) - } - if places[1].TelCode != 852 { - t.Errorf("Expecting hong kong second, but got %#v", places[1]) - } - }) -} - -func TestEmbeddedLiteralsContext(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE x ( - k text - );`, - drop: `drop table x;`, - } - - RunWithSchemaContext(context.Background(), schema, t, func(ctx context.Context, db *DB, t *testing.T) { - type t1 struct { - K *string - } - type t2 struct { - Inline struct { - F string - } - K *string - } - - db.MustExecContext(ctx, db.Rebind("INSERT INTO x (k) VALUES (?), (?), (?);"), "one", "two", "three") - - target := t1{} - err := db.GetContext(ctx, &target, db.Rebind("SELECT * FROM x WHERE k=?"), "one") - if err != nil { - t.Error(err) - } - if *target.K != "one" { - t.Error("Expected target.K to be `one`, got ", target.K) - } - - target2 := t2{} - err = db.GetContext(ctx, &target2, db.Rebind("SELECT * FROM x WHERE k=?"), "one") - if err != nil { - t.Error(err) - } - if *target2.K != "one" { - t.Errorf("Expected target2.K to be `one`, got `%v`", target2.K) - } - }) -} diff --git a/vendor/github.com/jmoiron/sqlx/sqlx_test.go b/vendor/github.com/jmoiron/sqlx/sqlx_test.go deleted file mode 100644 index 5752773a0..000000000 --- a/vendor/github.com/jmoiron/sqlx/sqlx_test.go +++ /dev/null @@ -1,1792 +0,0 @@ -// The following environment variables, if set, will be used: -// -// * SQLX_SQLITE_DSN -// * SQLX_POSTGRES_DSN -// * SQLX_MYSQL_DSN -// -// Set any of these variables to 'skip' to skip them. Note that for MySQL, -// the string '?parseTime=True' will be appended to the DSN if it's not there -// already. -// -package sqlx - -import ( - "database/sql" - "database/sql/driver" - "encoding/json" - "fmt" - "log" - "os" - "reflect" - "strings" - "testing" - "time" - - _ "github.com/go-sql-driver/mysql" - "github.com/jmoiron/sqlx/reflectx" - _ "github.com/lib/pq" - _ "github.com/mattn/go-sqlite3" -) - -/* compile time checks that Db, Tx, Stmt (qStmt) implement expected interfaces */ -var _, _ Ext = &DB{}, &Tx{} -var _, _ ColScanner = &Row{}, &Rows{} -var _ Queryer = &qStmt{} -var _ Execer = &qStmt{} - -var TestPostgres = true -var TestSqlite = true -var TestMysql = true - -var sldb *DB -var pgdb *DB -var mysqldb *DB -var active = []*DB{} - -func init() { - ConnectAll() -} - -func ConnectAll() { - var err error - - pgdsn := os.Getenv("SQLX_POSTGRES_DSN") - mydsn := os.Getenv("SQLX_MYSQL_DSN") - sqdsn := os.Getenv("SQLX_SQLITE_DSN") - - TestPostgres = pgdsn != "skip" - TestMysql = mydsn != "skip" - TestSqlite = sqdsn != "skip" - - if !strings.Contains(mydsn, "parseTime=true") { - mydsn += "?parseTime=true" - } - - if TestPostgres { - pgdb, err = Connect("postgres", pgdsn) - if err != nil { - fmt.Printf("Disabling PG tests:\n %v\n", err) - TestPostgres = false - } - } else { - fmt.Println("Disabling Postgres tests.") - } - - if TestMysql { - mysqldb, err = Connect("mysql", mydsn) - if err != nil { - fmt.Printf("Disabling MySQL tests:\n %v", err) - TestMysql = false - } - } else { - fmt.Println("Disabling MySQL tests.") - } - - if TestSqlite { - sldb, err = Connect("sqlite3", sqdsn) - if err != nil { - fmt.Printf("Disabling SQLite:\n %v", err) - TestSqlite = false - } - } else { - fmt.Println("Disabling SQLite tests.") - } -} - -type Schema struct { - create string - drop string -} - -func (s Schema) Postgres() (string, string) { - return s.create, s.drop -} - -func (s Schema) MySQL() (string, string) { - return strings.Replace(s.create, `"`, "`", -1), s.drop -} - -func (s Schema) Sqlite3() (string, string) { - return strings.Replace(s.create, `now()`, `CURRENT_TIMESTAMP`, -1), s.drop -} - -var defaultSchema = Schema{ - create: ` -CREATE TABLE person ( - first_name text, - last_name text, - email text, - added_at timestamp default now() -); - -CREATE TABLE place ( - country text, - city text NULL, - telcode integer -); - -CREATE TABLE capplace ( - "COUNTRY" text, - "CITY" text NULL, - "TELCODE" integer -); - -CREATE TABLE nullperson ( - first_name text NULL, - last_name text NULL, - email text NULL -); - -CREATE TABLE employees ( - name text, - id integer, - boss_id integer -); - -`, - drop: ` -drop table person; -drop table place; -drop table capplace; -drop table nullperson; -drop table employees; -`, -} - -type Person struct { - FirstName string `db:"first_name"` - LastName string `db:"last_name"` - Email string - AddedAt time.Time `db:"added_at"` -} - -type Person2 struct { - FirstName sql.NullString `db:"first_name"` - LastName sql.NullString `db:"last_name"` - Email sql.NullString -} - -type Place struct { - Country string - City sql.NullString - TelCode int -} - -type PlacePtr struct { - Country string - City *string - TelCode int -} - -type PersonPlace struct { - Person - Place -} - -type PersonPlacePtr struct { - *Person - *Place -} - -type EmbedConflict struct { - FirstName string `db:"first_name"` - Person -} - -type SliceMember struct { - Country string - City sql.NullString - TelCode int - People []Person `db:"-"` - Addresses []Place `db:"-"` -} - -// Note that because of field map caching, we need a new type here -// if we've used Place already somewhere in sqlx -type CPlace Place - -func MultiExec(e Execer, query string) { - stmts := strings.Split(query, ";\n") - if len(strings.Trim(stmts[len(stmts)-1], " \n\t\r")) == 0 { - stmts = stmts[:len(stmts)-1] - } - for _, s := range stmts { - _, err := e.Exec(s) - if err != nil { - fmt.Println(err, s) - } - } -} - -func RunWithSchema(schema Schema, t *testing.T, test func(db *DB, t *testing.T)) { - runner := func(db *DB, t *testing.T, create, drop string) { - defer func() { - MultiExec(db, drop) - }() - - MultiExec(db, create) - test(db, t) - } - - if TestPostgres { - create, drop := schema.Postgres() - runner(pgdb, t, create, drop) - } - if TestSqlite { - create, drop := schema.Sqlite3() - runner(sldb, t, create, drop) - } - if TestMysql { - create, drop := schema.MySQL() - runner(mysqldb, t, create, drop) - } -} - -func loadDefaultFixture(db *DB, t *testing.T) { - tx := db.MustBegin() - tx.MustExec(tx.Rebind("INSERT INTO person (first_name, last_name, email) VALUES (?, ?, ?)"), "Jason", "Moiron", "jmoiron@jmoiron.net") - tx.MustExec(tx.Rebind("INSERT INTO person (first_name, last_name, email) VALUES (?, ?, ?)"), "John", "Doe", "johndoeDNE@gmail.net") - tx.MustExec(tx.Rebind("INSERT INTO place (country, city, telcode) VALUES (?, ?, ?)"), "United States", "New York", "1") - tx.MustExec(tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Hong Kong", "852") - tx.MustExec(tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Singapore", "65") - if db.DriverName() == "mysql" { - tx.MustExec(tx.Rebind("INSERT INTO capplace (`COUNTRY`, `TELCODE`) VALUES (?, ?)"), "Sarf Efrica", "27") - } else { - tx.MustExec(tx.Rebind("INSERT INTO capplace (\"COUNTRY\", \"TELCODE\") VALUES (?, ?)"), "Sarf Efrica", "27") - } - tx.MustExec(tx.Rebind("INSERT INTO employees (name, id) VALUES (?, ?)"), "Peter", "4444") - tx.MustExec(tx.Rebind("INSERT INTO employees (name, id, boss_id) VALUES (?, ?, ?)"), "Joe", "1", "4444") - tx.MustExec(tx.Rebind("INSERT INTO employees (name, id, boss_id) VALUES (?, ?, ?)"), "Martin", "2", "4444") - tx.Commit() -} - -// Test a new backwards compatible feature, that missing scan destinations -// will silently scan into sql.RawText rather than failing/panicing -func TestMissingNames(t *testing.T) { - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - type PersonPlus struct { - FirstName string `db:"first_name"` - LastName string `db:"last_name"` - Email string - //AddedAt time.Time `db:"added_at"` - } - - // test Select first - pps := []PersonPlus{} - // pps lacks added_at destination - err := db.Select(&pps, "SELECT * FROM person") - if err == nil { - t.Error("Expected missing name from Select to fail, but it did not.") - } - - // test Get - pp := PersonPlus{} - err = db.Get(&pp, "SELECT * FROM person LIMIT 1") - if err == nil { - t.Error("Expected missing name Get to fail, but it did not.") - } - - // test naked StructScan - pps = []PersonPlus{} - rows, err := db.Query("SELECT * FROM person LIMIT 1") - if err != nil { - t.Fatal(err) - } - rows.Next() - err = StructScan(rows, &pps) - if err == nil { - t.Error("Expected missing name in StructScan to fail, but it did not.") - } - rows.Close() - - // now try various things with unsafe set. - db = db.Unsafe() - pps = []PersonPlus{} - err = db.Select(&pps, "SELECT * FROM person") - if err != nil { - t.Error(err) - } - - // test Get - pp = PersonPlus{} - err = db.Get(&pp, "SELECT * FROM person LIMIT 1") - if err != nil { - t.Error(err) - } - - // test naked StructScan - pps = []PersonPlus{} - rowsx, err := db.Queryx("SELECT * FROM person LIMIT 1") - if err != nil { - t.Fatal(err) - } - rowsx.Next() - err = StructScan(rowsx, &pps) - if err != nil { - t.Error(err) - } - rowsx.Close() - - // test Named stmt - if !isUnsafe(db) { - t.Error("Expected db to be unsafe, but it isn't") - } - nstmt, err := db.PrepareNamed(`SELECT * FROM person WHERE first_name != :name`) - if err != nil { - t.Fatal(err) - } - // its internal stmt should be marked unsafe - if !nstmt.Stmt.unsafe { - t.Error("expected NamedStmt to be unsafe but its underlying stmt did not inherit safety") - } - pps = []PersonPlus{} - err = nstmt.Select(&pps, map[string]interface{}{"name": "Jason"}) - if err != nil { - t.Fatal(err) - } - if len(pps) != 1 { - t.Errorf("Expected 1 person back, got %d", len(pps)) - } - - // test it with a safe db - db.unsafe = false - if isUnsafe(db) { - t.Error("expected db to be safe but it isn't") - } - nstmt, err = db.PrepareNamed(`SELECT * FROM person WHERE first_name != :name`) - if err != nil { - t.Fatal(err) - } - // it should be safe - if isUnsafe(nstmt) { - t.Error("NamedStmt did not inherit safety") - } - nstmt.Unsafe() - if !isUnsafe(nstmt) { - t.Error("expected newly unsafed NamedStmt to be unsafe") - } - pps = []PersonPlus{} - err = nstmt.Select(&pps, map[string]interface{}{"name": "Jason"}) - if err != nil { - t.Fatal(err) - } - if len(pps) != 1 { - t.Errorf("Expected 1 person back, got %d", len(pps)) - } - - }) -} - -func TestEmbeddedStructs(t *testing.T) { - type Loop1 struct{ Person } - type Loop2 struct{ Loop1 } - type Loop3 struct{ Loop2 } - - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - peopleAndPlaces := []PersonPlace{} - err := db.Select( - &peopleAndPlaces, - `SELECT person.*, place.* FROM - person natural join place`) - if err != nil { - t.Fatal(err) - } - for _, pp := range peopleAndPlaces { - if len(pp.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - if len(pp.Place.Country) == 0 { - t.Errorf("Expected non zero lengthed country.") - } - } - - // test embedded structs with StructScan - rows, err := db.Queryx( - `SELECT person.*, place.* FROM - person natural join place`) - if err != nil { - t.Error(err) - } - - perp := PersonPlace{} - rows.Next() - err = rows.StructScan(&perp) - if err != nil { - t.Error(err) - } - - if len(perp.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - if len(perp.Place.Country) == 0 { - t.Errorf("Expected non zero lengthed country.") - } - - rows.Close() - - // test the same for embedded pointer structs - peopleAndPlacesPtrs := []PersonPlacePtr{} - err = db.Select( - &peopleAndPlacesPtrs, - `SELECT person.*, place.* FROM - person natural join place`) - if err != nil { - t.Fatal(err) - } - for _, pp := range peopleAndPlacesPtrs { - if len(pp.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - if len(pp.Place.Country) == 0 { - t.Errorf("Expected non zero lengthed country.") - } - } - - // test "deep nesting" - l3s := []Loop3{} - err = db.Select(&l3s, `select * from person`) - if err != nil { - t.Fatal(err) - } - for _, l3 := range l3s { - if len(l3.Loop2.Loop1.Person.FirstName) == 0 { - t.Errorf("Expected non zero lengthed first name.") - } - } - - // test "embed conflicts" - ec := []EmbedConflict{} - err = db.Select(&ec, `select * from person`) - // I'm torn between erroring here or having some kind of working behavior - // in order to allow for more flexibility in destination structs - if err != nil { - t.Errorf("Was not expecting an error on embed conflicts.") - } - }) -} - -func TestJoinQuery(t *testing.T) { - type Employee struct { - Name string - ID int64 - // BossID is an id into the employee table - BossID sql.NullInt64 `db:"boss_id"` - } - type Boss Employee - - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - - var employees []struct { - Employee - Boss `db:"boss"` - } - - err := db.Select( - &employees, - `SELECT employees.*, boss.id "boss.id", boss.name "boss.name" FROM employees - JOIN employees AS boss ON employees.boss_id = boss.id`) - if err != nil { - t.Fatal(err) - } - - for _, em := range employees { - if len(em.Employee.Name) == 0 { - t.Errorf("Expected non zero lengthed name.") - } - if em.Employee.BossID.Int64 != em.Boss.ID { - t.Errorf("Expected boss ids to match") - } - } - }) -} - -func TestJoinQueryNamedPointerStructs(t *testing.T) { - type Employee struct { - Name string - ID int64 - // BossID is an id into the employee table - BossID sql.NullInt64 `db:"boss_id"` - } - type Boss Employee - - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - - var employees []struct { - Emp1 *Employee `db:"emp1"` - Emp2 *Employee `db:"emp2"` - *Boss `db:"boss"` - } - - err := db.Select( - &employees, - `SELECT emp.name "emp1.name", emp.id "emp1.id", emp.boss_id "emp1.boss_id", - emp.name "emp2.name", emp.id "emp2.id", emp.boss_id "emp2.boss_id", - boss.id "boss.id", boss.name "boss.name" FROM employees AS emp - JOIN employees AS boss ON emp.boss_id = boss.id - `) - if err != nil { - t.Fatal(err) - } - - for _, em := range employees { - if len(em.Emp1.Name) == 0 || len(em.Emp2.Name) == 0 { - t.Errorf("Expected non zero lengthed name.") - } - if em.Emp1.BossID.Int64 != em.Boss.ID || em.Emp2.BossID.Int64 != em.Boss.ID { - t.Errorf("Expected boss ids to match") - } - } - }) -} - -func TestSelectSliceMapTime(t *testing.T) { - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - rows, err := db.Queryx("SELECT * FROM person") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - _, err := rows.SliceScan() - if err != nil { - t.Error(err) - } - } - - rows, err = db.Queryx("SELECT * FROM person") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - m := map[string]interface{}{} - err := rows.MapScan(m) - if err != nil { - t.Error(err) - } - } - - }) -} - -func TestNilReceiver(t *testing.T) { - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - var p *Person - err := db.Get(p, "SELECT * FROM person LIMIT 1") - if err == nil { - t.Error("Expected error when getting into nil struct ptr.") - } - var pp *[]Person - err = db.Select(pp, "SELECT * FROM person") - if err == nil { - t.Error("Expected an error when selecting into nil slice ptr.") - } - }) -} - -func TestNamedQuery(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE place ( - id integer PRIMARY KEY, - name text NULL - ); - CREATE TABLE person ( - first_name text NULL, - last_name text NULL, - email text NULL - ); - CREATE TABLE placeperson ( - first_name text NULL, - last_name text NULL, - email text NULL, - place_id integer NULL - ); - CREATE TABLE jsperson ( - "FIRST" text NULL, - last_name text NULL, - "EMAIL" text NULL - );`, - drop: ` - drop table person; - drop table jsperson; - drop table place; - drop table placeperson; - `, - } - - RunWithSchema(schema, t, func(db *DB, t *testing.T) { - type Person struct { - FirstName sql.NullString `db:"first_name"` - LastName sql.NullString `db:"last_name"` - Email sql.NullString - } - - p := Person{ - FirstName: sql.NullString{String: "ben", Valid: true}, - LastName: sql.NullString{String: "doe", Valid: true}, - Email: sql.NullString{String: "ben@doe.com", Valid: true}, - } - - q1 := `INSERT INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)` - _, err := db.NamedExec(q1, p) - if err != nil { - log.Fatal(err) - } - - p2 := &Person{} - rows, err := db.NamedQuery("SELECT * FROM person WHERE first_name=:first_name", p) - if err != nil { - log.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(p2) - if err != nil { - t.Error(err) - } - if p2.FirstName.String != "ben" { - t.Error("Expected first name of `ben`, got " + p2.FirstName.String) - } - if p2.LastName.String != "doe" { - t.Error("Expected first name of `doe`, got " + p2.LastName.String) - } - } - - // these are tests for #73; they verify that named queries work if you've - // changed the db mapper. This code checks both NamedQuery "ad-hoc" style - // queries and NamedStmt queries, which use different code paths internally. - old := *db.Mapper - - type JSONPerson struct { - FirstName sql.NullString `json:"FIRST"` - LastName sql.NullString `json:"last_name"` - Email sql.NullString - } - - jp := JSONPerson{ - FirstName: sql.NullString{String: "ben", Valid: true}, - LastName: sql.NullString{String: "smith", Valid: true}, - Email: sql.NullString{String: "ben@smith.com", Valid: true}, - } - - db.Mapper = reflectx.NewMapperFunc("json", strings.ToUpper) - - // prepare queries for case sensitivity to test our ToUpper function. - // postgres and sqlite accept "", but mysql uses ``; since Go's multi-line - // strings are `` we use "" by default and swap out for MySQL - pdb := func(s string, db *DB) string { - if db.DriverName() == "mysql" { - return strings.Replace(s, `"`, "`", -1) - } - return s - } - - q1 = `INSERT INTO jsperson ("FIRST", last_name, "EMAIL") VALUES (:FIRST, :last_name, :EMAIL)` - _, err = db.NamedExec(pdb(q1, db), jp) - if err != nil { - t.Fatal(err, db.DriverName()) - } - - // Checks that a person pulled out of the db matches the one we put in - check := func(t *testing.T, rows *Rows) { - jp = JSONPerson{} - for rows.Next() { - err = rows.StructScan(&jp) - if err != nil { - t.Error(err) - } - if jp.FirstName.String != "ben" { - t.Errorf("Expected first name of `ben`, got `%s` (%s) ", jp.FirstName.String, db.DriverName()) - } - if jp.LastName.String != "smith" { - t.Errorf("Expected LastName of `smith`, got `%s` (%s)", jp.LastName.String, db.DriverName()) - } - if jp.Email.String != "ben@smith.com" { - t.Errorf("Expected first name of `doe`, got `%s` (%s)", jp.Email.String, db.DriverName()) - } - } - } - - ns, err := db.PrepareNamed(pdb(` - SELECT * FROM jsperson - WHERE - "FIRST"=:FIRST AND - last_name=:last_name AND - "EMAIL"=:EMAIL - `, db)) - - if err != nil { - t.Fatal(err) - } - rows, err = ns.Queryx(jp) - if err != nil { - t.Fatal(err) - } - - check(t, rows) - - // Check exactly the same thing, but with db.NamedQuery, which does not go - // through the PrepareNamed/NamedStmt path. - rows, err = db.NamedQuery(pdb(` - SELECT * FROM jsperson - WHERE - "FIRST"=:FIRST AND - last_name=:last_name AND - "EMAIL"=:EMAIL - `, db), jp) - if err != nil { - t.Fatal(err) - } - - check(t, rows) - - db.Mapper = &old - - // Test nested structs - type Place struct { - ID int `db:"id"` - Name sql.NullString `db:"name"` - } - type PlacePerson struct { - FirstName sql.NullString `db:"first_name"` - LastName sql.NullString `db:"last_name"` - Email sql.NullString - Place Place `db:"place"` - } - - pl := Place{ - Name: sql.NullString{String: "myplace", Valid: true}, - } - - pp := PlacePerson{ - FirstName: sql.NullString{String: "ben", Valid: true}, - LastName: sql.NullString{String: "doe", Valid: true}, - Email: sql.NullString{String: "ben@doe.com", Valid: true}, - } - - q2 := `INSERT INTO place (id, name) VALUES (1, :name)` - _, err = db.NamedExec(q2, pl) - if err != nil { - log.Fatal(err) - } - - id := 1 - pp.Place.ID = id - - q3 := `INSERT INTO placeperson (first_name, last_name, email, place_id) VALUES (:first_name, :last_name, :email, :place.id)` - _, err = db.NamedExec(q3, pp) - if err != nil { - log.Fatal(err) - } - - pp2 := &PlacePerson{} - rows, err = db.NamedQuery(` - SELECT - first_name, - last_name, - email, - place.id AS "place.id", - place.name AS "place.name" - FROM placeperson - INNER JOIN place ON place.id = placeperson.place_id - WHERE - place.id=:place.id`, pp) - if err != nil { - log.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(pp2) - if err != nil { - t.Error(err) - } - if pp2.FirstName.String != "ben" { - t.Error("Expected first name of `ben`, got " + pp2.FirstName.String) - } - if pp2.LastName.String != "doe" { - t.Error("Expected first name of `doe`, got " + pp2.LastName.String) - } - if pp2.Place.Name.String != "myplace" { - t.Error("Expected place name of `myplace`, got " + pp2.Place.Name.String) - } - if pp2.Place.ID != pp.Place.ID { - t.Errorf("Expected place name of %v, got %v", pp.Place.ID, pp2.Place.ID) - } - } - }) -} - -func TestNilInserts(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE tt ( - id integer, - value text NULL DEFAULT NULL - );`, - drop: "drop table tt;", - } - - RunWithSchema(schema, t, func(db *DB, t *testing.T) { - type TT struct { - ID int - Value *string - } - var v, v2 TT - r := db.Rebind - - db.MustExec(r(`INSERT INTO tt (id) VALUES (1)`)) - db.Get(&v, r(`SELECT * FROM tt`)) - if v.ID != 1 { - t.Errorf("Expecting id of 1, got %v", v.ID) - } - if v.Value != nil { - t.Errorf("Expecting NULL to map to nil, got %s", *v.Value) - } - - v.ID = 2 - // NOTE: this incidentally uncovered a bug which was that named queries with - // pointer destinations would not work if the passed value here was not addressable, - // as reflectx.FieldByIndexes attempts to allocate nil pointer receivers for - // writing. This was fixed by creating & using the reflectx.FieldByIndexesReadOnly - // function. This next line is important as it provides the only coverage for this. - db.NamedExec(`INSERT INTO tt (id, value) VALUES (:id, :value)`, v) - - db.Get(&v2, r(`SELECT * FROM tt WHERE id=2`)) - if v.ID != v2.ID { - t.Errorf("%v != %v", v.ID, v2.ID) - } - if v2.Value != nil { - t.Errorf("Expecting NULL to map to nil, got %s", *v.Value) - } - }) -} - -func TestScanError(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE kv ( - k text, - v integer - );`, - drop: `drop table kv;`, - } - - RunWithSchema(schema, t, func(db *DB, t *testing.T) { - type WrongTypes struct { - K int - V string - } - _, err := db.Exec(db.Rebind("INSERT INTO kv (k, v) VALUES (?, ?)"), "hi", 1) - if err != nil { - t.Error(err) - } - - rows, err := db.Queryx("SELECT * FROM kv") - if err != nil { - t.Error(err) - } - for rows.Next() { - var wt WrongTypes - err := rows.StructScan(&wt) - if err == nil { - t.Errorf("%s: Scanning wrong types into keys should have errored.", db.DriverName()) - } - } - }) -} - -// FIXME: this function is kinda big but it slows things down to be constantly -// loading and reloading the schema.. - -func TestUsage(t *testing.T) { - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - slicemembers := []SliceMember{} - err := db.Select(&slicemembers, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - t.Fatal(err) - } - - people := []Person{} - - err = db.Select(&people, "SELECT * FROM person ORDER BY first_name ASC") - if err != nil { - t.Fatal(err) - } - - jason, john := people[0], people[1] - if jason.FirstName != "Jason" { - t.Errorf("Expecting FirstName of Jason, got %s", jason.FirstName) - } - if jason.LastName != "Moiron" { - t.Errorf("Expecting LastName of Moiron, got %s", jason.LastName) - } - if jason.Email != "jmoiron@jmoiron.net" { - t.Errorf("Expecting Email of jmoiron@jmoiron.net, got %s", jason.Email) - } - if john.FirstName != "John" || john.LastName != "Doe" || john.Email != "johndoeDNE@gmail.net" { - t.Errorf("John Doe's person record not what expected: Got %v\n", john) - } - - jason = Person{} - err = db.Get(&jason, db.Rebind("SELECT * FROM person WHERE first_name=?"), "Jason") - - if err != nil { - t.Fatal(err) - } - if jason.FirstName != "Jason" { - t.Errorf("Expecting to get back Jason, but got %v\n", jason.FirstName) - } - - err = db.Get(&jason, db.Rebind("SELECT * FROM person WHERE first_name=?"), "Foobar") - if err == nil { - t.Errorf("Expecting an error, got nil\n") - } - if err != sql.ErrNoRows { - t.Errorf("Expected sql.ErrNoRows, got %v\n", err) - } - - // The following tests check statement reuse, which was actually a problem - // due to copying being done when creating Stmt's which was eventually removed - stmt1, err := db.Preparex(db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Fatal(err) - } - jason = Person{} - - row := stmt1.QueryRowx("DoesNotExist") - row.Scan(&jason) - row = stmt1.QueryRowx("DoesNotExist") - row.Scan(&jason) - - err = stmt1.Get(&jason, "DoesNotExist User") - if err == nil { - t.Error("Expected an error") - } - err = stmt1.Get(&jason, "DoesNotExist User 2") - if err == nil { - t.Fatal(err) - } - - stmt2, err := db.Preparex(db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Fatal(err) - } - jason = Person{} - tx, err := db.Beginx() - if err != nil { - t.Fatal(err) - } - tstmt2 := tx.Stmtx(stmt2) - row2 := tstmt2.QueryRowx("Jason") - err = row2.StructScan(&jason) - if err != nil { - t.Error(err) - } - tx.Commit() - - places := []*Place{} - err = db.Select(&places, "SELECT telcode FROM place ORDER BY telcode ASC") - if err != nil { - t.Fatal(err) - } - - usa, singsing, honkers := places[0], places[1], places[2] - - if usa.TelCode != 1 || honkers.TelCode != 852 || singsing.TelCode != 65 { - t.Errorf("Expected integer telcodes to work, got %#v", places) - } - - placesptr := []PlacePtr{} - err = db.Select(&placesptr, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - t.Error(err) - } - //fmt.Printf("%#v\n%#v\n%#v\n", placesptr[0], placesptr[1], placesptr[2]) - - // if you have null fields and use SELECT *, you must use sql.Null* in your struct - // this test also verifies that you can use either a []Struct{} or a []*Struct{} - places2 := []Place{} - err = db.Select(&places2, "SELECT * FROM place ORDER BY telcode ASC") - if err != nil { - t.Fatal(err) - } - - usa, singsing, honkers = &places2[0], &places2[1], &places2[2] - - // this should return a type error that &p is not a pointer to a struct slice - p := Place{} - err = db.Select(&p, "SELECT * FROM place ORDER BY telcode ASC") - if err == nil { - t.Errorf("Expected an error, argument to select should be a pointer to a struct slice") - } - - // this should be an error - pl := []Place{} - err = db.Select(pl, "SELECT * FROM place ORDER BY telcode ASC") - if err == nil { - t.Errorf("Expected an error, argument to select should be a pointer to a struct slice, not a slice.") - } - - if usa.TelCode != 1 || honkers.TelCode != 852 || singsing.TelCode != 65 { - t.Errorf("Expected integer telcodes to work, got %#v", places) - } - - stmt, err := db.Preparex(db.Rebind("SELECT country, telcode FROM place WHERE telcode > ? ORDER BY telcode ASC")) - if err != nil { - t.Error(err) - } - - places = []*Place{} - err = stmt.Select(&places, 10) - if len(places) != 2 { - t.Error("Expected 2 places, got 0.") - } - if err != nil { - t.Fatal(err) - } - singsing, honkers = places[0], places[1] - if singsing.TelCode != 65 || honkers.TelCode != 852 { - t.Errorf("Expected the right telcodes, got %#v", places) - } - - rows, err := db.Queryx("SELECT * FROM place") - if err != nil { - t.Fatal(err) - } - place := Place{} - for rows.Next() { - err = rows.StructScan(&place) - if err != nil { - t.Fatal(err) - } - } - - rows, err = db.Queryx("SELECT * FROM place") - if err != nil { - t.Fatal(err) - } - m := map[string]interface{}{} - for rows.Next() { - err = rows.MapScan(m) - if err != nil { - t.Fatal(err) - } - _, ok := m["country"] - if !ok { - t.Errorf("Expected key `country` in map but could not find it (%#v)\n", m) - } - } - - rows, err = db.Queryx("SELECT * FROM place") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - s, err := rows.SliceScan() - if err != nil { - t.Error(err) - } - if len(s) != 3 { - t.Errorf("Expected 3 columns in result, got %d\n", len(s)) - } - } - - // test advanced querying - // test that NamedExec works with a map as well as a struct - _, err = db.NamedExec("INSERT INTO person (first_name, last_name, email) VALUES (:first, :last, :email)", map[string]interface{}{ - "first": "Bin", - "last": "Smuth", - "email": "bensmith@allblacks.nz", - }) - if err != nil { - t.Fatal(err) - } - - // ensure that if the named param happens right at the end it still works - // ensure that NamedQuery works with a map[string]interface{} - rows, err = db.NamedQuery("SELECT * FROM person WHERE first_name=:first", map[string]interface{}{"first": "Bin"}) - if err != nil { - t.Fatal(err) - } - - ben := &Person{} - for rows.Next() { - err = rows.StructScan(ben) - if err != nil { - t.Fatal(err) - } - if ben.FirstName != "Bin" { - t.Fatal("Expected first name of `Bin`, got " + ben.FirstName) - } - if ben.LastName != "Smuth" { - t.Fatal("Expected first name of `Smuth`, got " + ben.LastName) - } - } - - ben.FirstName = "Ben" - ben.LastName = "Smith" - ben.Email = "binsmuth@allblacks.nz" - - // Insert via a named query using the struct - _, err = db.NamedExec("INSERT INTO person (first_name, last_name, email) VALUES (:first_name, :last_name, :email)", ben) - - if err != nil { - t.Fatal(err) - } - - rows, err = db.NamedQuery("SELECT * FROM person WHERE first_name=:first_name", ben) - if err != nil { - t.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(ben) - if err != nil { - t.Fatal(err) - } - if ben.FirstName != "Ben" { - t.Fatal("Expected first name of `Ben`, got " + ben.FirstName) - } - if ben.LastName != "Smith" { - t.Fatal("Expected first name of `Smith`, got " + ben.LastName) - } - } - // ensure that Get does not panic on emppty result set - person := &Person{} - err = db.Get(person, "SELECT * FROM person WHERE first_name=$1", "does-not-exist") - if err == nil { - t.Fatal("Should have got an error for Get on non-existant row.") - } - - // lets test prepared statements some more - - stmt, err = db.Preparex(db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Fatal(err) - } - rows, err = stmt.Queryx("Ben") - if err != nil { - t.Fatal(err) - } - for rows.Next() { - err = rows.StructScan(ben) - if err != nil { - t.Fatal(err) - } - if ben.FirstName != "Ben" { - t.Fatal("Expected first name of `Ben`, got " + ben.FirstName) - } - if ben.LastName != "Smith" { - t.Fatal("Expected first name of `Smith`, got " + ben.LastName) - } - } - - john = Person{} - stmt, err = db.Preparex(db.Rebind("SELECT * FROM person WHERE first_name=?")) - if err != nil { - t.Error(err) - } - err = stmt.Get(&john, "John") - if err != nil { - t.Error(err) - } - - // test name mapping - // THIS USED TO WORK BUT WILL NO LONGER WORK. - db.MapperFunc(strings.ToUpper) - rsa := CPlace{} - err = db.Get(&rsa, "SELECT * FROM capplace;") - if err != nil { - t.Error(err, "in db:", db.DriverName()) - } - db.MapperFunc(strings.ToLower) - - // create a copy and change the mapper, then verify the copy behaves - // differently from the original. - dbCopy := NewDb(db.DB, db.DriverName()) - dbCopy.MapperFunc(strings.ToUpper) - err = dbCopy.Get(&rsa, "SELECT * FROM capplace;") - if err != nil { - fmt.Println(db.DriverName()) - t.Error(err) - } - - err = db.Get(&rsa, "SELECT * FROM cappplace;") - if err == nil { - t.Error("Expected no error, got ", err) - } - - // test base type slices - var sdest []string - rows, err = db.Queryx("SELECT email FROM person ORDER BY email ASC;") - if err != nil { - t.Error(err) - } - err = scanAll(rows, &sdest, false) - if err != nil { - t.Error(err) - } - - // test Get with base types - var count int - err = db.Get(&count, "SELECT count(*) FROM person;") - if err != nil { - t.Error(err) - } - if count != len(sdest) { - t.Errorf("Expected %d == %d (count(*) vs len(SELECT ..)", count, len(sdest)) - } - - // test Get and Select with time.Time, #84 - var addedAt time.Time - err = db.Get(&addedAt, "SELECT added_at FROM person LIMIT 1;") - if err != nil { - t.Error(err) - } - - var addedAts []time.Time - err = db.Select(&addedAts, "SELECT added_at FROM person;") - if err != nil { - t.Error(err) - } - - // test it on a double pointer - var pcount *int - err = db.Get(&pcount, "SELECT count(*) FROM person;") - if err != nil { - t.Error(err) - } - if *pcount != count { - t.Errorf("expected %d = %d", *pcount, count) - } - - // test Select... - sdest = []string{} - err = db.Select(&sdest, "SELECT first_name FROM person ORDER BY first_name ASC;") - if err != nil { - t.Error(err) - } - expected := []string{"Ben", "Bin", "Jason", "John"} - for i, got := range sdest { - if got != expected[i] { - t.Errorf("Expected %d result to be %s, but got %s", i, expected[i], got) - } - } - - var nsdest []sql.NullString - err = db.Select(&nsdest, "SELECT city FROM place ORDER BY city ASC") - if err != nil { - t.Error(err) - } - for _, val := range nsdest { - if val.Valid && val.String != "New York" { - t.Errorf("expected single valid result to be `New York`, but got %s", val.String) - } - } - }) -} - -type Product struct { - ProductID int -} - -// tests that sqlx will not panic when the wrong driver is passed because -// of an automatic nil dereference in sqlx.Open(), which was fixed. -func TestDoNotPanicOnConnect(t *testing.T) { - _, err := Connect("bogus", "hehe") - if err == nil { - t.Errorf("Should return error when using bogus driverName") - } -} - -func TestRebind(t *testing.T) { - q1 := `INSERT INTO foo (a, b, c, d, e, f, g, h, i) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` - q2 := `INSERT INTO foo (a, b, c) VALUES (?, ?, "foo"), ("Hi", ?, ?)` - - s1 := Rebind(DOLLAR, q1) - s2 := Rebind(DOLLAR, q2) - - if s1 != `INSERT INTO foo (a, b, c, d, e, f, g, h, i) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)` { - t.Errorf("q1 failed") - } - - if s2 != `INSERT INTO foo (a, b, c) VALUES ($1, $2, "foo"), ("Hi", $3, $4)` { - t.Errorf("q2 failed") - } - - s1 = Rebind(NAMED, q1) - s2 = Rebind(NAMED, q2) - - ex1 := `INSERT INTO foo (a, b, c, d, e, f, g, h, i) VALUES ` + - `(:arg1, :arg2, :arg3, :arg4, :arg5, :arg6, :arg7, :arg8, :arg9, :arg10)` - if s1 != ex1 { - t.Error("q1 failed on Named params") - } - - ex2 := `INSERT INTO foo (a, b, c) VALUES (:arg1, :arg2, "foo"), ("Hi", :arg3, :arg4)` - if s2 != ex2 { - t.Error("q2 failed on Named params") - } -} - -func TestBindMap(t *testing.T) { - // Test that it works.. - q1 := `INSERT INTO foo (a, b, c, d) VALUES (:name, :age, :first, :last)` - am := map[string]interface{}{ - "name": "Jason Moiron", - "age": 30, - "first": "Jason", - "last": "Moiron", - } - - bq, args, _ := bindMap(QUESTION, q1, am) - expect := `INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?)` - if bq != expect { - t.Errorf("Interpolation of query failed: got `%v`, expected `%v`\n", bq, expect) - } - - if args[0].(string) != "Jason Moiron" { - t.Errorf("Expected `Jason Moiron`, got %v\n", args[0]) - } - - if args[1].(int) != 30 { - t.Errorf("Expected 30, got %v\n", args[1]) - } - - if args[2].(string) != "Jason" { - t.Errorf("Expected Jason, got %v\n", args[2]) - } - - if args[3].(string) != "Moiron" { - t.Errorf("Expected Moiron, got %v\n", args[3]) - } -} - -// Test for #117, embedded nil maps - -type Message struct { - Text string `db:"string"` - Properties PropertyMap `db:"properties"` // Stored as JSON in the database -} - -type PropertyMap map[string]string - -// Implement driver.Valuer and sql.Scanner interfaces on PropertyMap -func (p PropertyMap) Value() (driver.Value, error) { - if len(p) == 0 { - return nil, nil - } - return json.Marshal(p) -} - -func (p PropertyMap) Scan(src interface{}) error { - v := reflect.ValueOf(src) - if !v.IsValid() || v.IsNil() { - return nil - } - if data, ok := src.([]byte); ok { - return json.Unmarshal(data, &p) - } - return fmt.Errorf("Could not not decode type %T -> %T", src, p) -} - -func TestEmbeddedMaps(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE message ( - string text, - properties text - );`, - drop: `drop table message;`, - } - - RunWithSchema(schema, t, func(db *DB, t *testing.T) { - messages := []Message{ - {"Hello, World", PropertyMap{"one": "1", "two": "2"}}, - {"Thanks, Joy", PropertyMap{"pull": "request"}}, - } - q1 := `INSERT INTO message (string, properties) VALUES (:string, :properties);` - for _, m := range messages { - _, err := db.NamedExec(q1, m) - if err != nil { - t.Fatal(err) - } - } - var count int - err := db.Get(&count, "SELECT count(*) FROM message") - if err != nil { - t.Fatal(err) - } - if count != len(messages) { - t.Fatalf("Expected %d messages in DB, found %d", len(messages), count) - } - - var m Message - err = db.Get(&m, "SELECT * FROM message LIMIT 1;") - if err != nil { - t.Fatal(err) - } - if m.Properties == nil { - t.Fatal("Expected m.Properties to not be nil, but it was.") - } - }) -} - -func TestIssue197(t *testing.T) { - // this test actually tests for a bug in database/sql: - // https://github.com/golang/go/issues/13905 - // this potentially makes _any_ named type that is an alias for []byte - // unsafe to use in a lot of different ways (basically, unsafe to hold - // onto after loading from the database). - t.Skip() - - type mybyte []byte - type Var struct{ Raw json.RawMessage } - type Var2 struct{ Raw []byte } - type Var3 struct{ Raw mybyte } - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - var err error - var v, q Var - if err = db.Get(&v, `SELECT '{"a": "b"}' AS raw`); err != nil { - t.Fatal(err) - } - if err = db.Get(&q, `SELECT 'null' AS raw`); err != nil { - t.Fatal(err) - } - - var v2, q2 Var2 - if err = db.Get(&v2, `SELECT '{"a": "b"}' AS raw`); err != nil { - t.Fatal(err) - } - if err = db.Get(&q2, `SELECT 'null' AS raw`); err != nil { - t.Fatal(err) - } - - var v3, q3 Var3 - if err = db.QueryRow(`SELECT '{"a": "b"}' AS raw`).Scan(&v3.Raw); err != nil { - t.Fatal(err) - } - if err = db.QueryRow(`SELECT '{"c": "d"}' AS raw`).Scan(&q3.Raw); err != nil { - t.Fatal(err) - } - t.Fail() - }) -} - -func TestIn(t *testing.T) { - // some quite normal situations - type tr struct { - q string - args []interface{} - c int - } - tests := []tr{ - {"SELECT * FROM foo WHERE x = ? AND v in (?) AND y = ?", - []interface{}{"foo", []int{0, 5, 7, 2, 9}, "bar"}, - 7}, - {"SELECT * FROM foo WHERE x in (?)", - []interface{}{[]int{1, 2, 3, 4, 5, 6, 7, 8}}, - 8}, - } - for _, test := range tests { - q, a, err := In(test.q, test.args...) - if err != nil { - t.Error(err) - } - if len(a) != test.c { - t.Errorf("Expected %d args, but got %d (%+v)", test.c, len(a), a) - } - if strings.Count(q, "?") != test.c { - t.Errorf("Expected %d bindVars, got %d", test.c, strings.Count(q, "?")) - } - } - - // too many bindVars, but no slices, so short circuits parsing - // i'm not sure if this is the right behavior; this query/arg combo - // might not work, but we shouldn't parse if we don't need to - { - orig := "SELECT * FROM foo WHERE x = ? AND y = ?" - q, a, err := In(orig, "foo", "bar", "baz") - if err != nil { - t.Error(err) - } - if len(a) != 3 { - t.Errorf("Expected 3 args, but got %d (%+v)", len(a), a) - } - if q != orig { - t.Error("Expected unchanged query.") - } - } - - tests = []tr{ - // too many bindvars; slice present so should return error during parse - {"SELECT * FROM foo WHERE x = ? and y = ?", - []interface{}{"foo", []int{1, 2, 3}, "bar"}, - 0}, - // empty slice, should return error before parse - {"SELECT * FROM foo WHERE x = ?", - []interface{}{[]int{}}, - 0}, - // too *few* bindvars, should return an error - {"SELECT * FROM foo WHERE x = ? AND y in (?)", - []interface{}{[]int{1, 2, 3}}, - 0}, - } - for _, test := range tests { - _, _, err := In(test.q, test.args...) - if err == nil { - t.Error("Expected an error, but got nil.") - } - } - RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T) { - loadDefaultFixture(db, t) - //tx.MustExec(tx.Rebind("INSERT INTO place (country, city, telcode) VALUES (?, ?, ?)"), "United States", "New York", "1") - //tx.MustExec(tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Hong Kong", "852") - //tx.MustExec(tx.Rebind("INSERT INTO place (country, telcode) VALUES (?, ?)"), "Singapore", "65") - telcodes := []int{852, 65} - q := "SELECT * FROM place WHERE telcode IN(?) ORDER BY telcode" - query, args, err := In(q, telcodes) - if err != nil { - t.Error(err) - } - query = db.Rebind(query) - places := []Place{} - err = db.Select(&places, query, args...) - if err != nil { - t.Error(err) - } - if len(places) != 2 { - t.Fatalf("Expecting 2 results, got %d", len(places)) - } - if places[0].TelCode != 65 { - t.Errorf("Expecting singapore first, but got %#v", places[0]) - } - if places[1].TelCode != 852 { - t.Errorf("Expecting hong kong second, but got %#v", places[1]) - } - }) -} - -func TestBindStruct(t *testing.T) { - var err error - - q1 := `INSERT INTO foo (a, b, c, d) VALUES (:name, :age, :first, :last)` - - type tt struct { - Name string - Age int - First string - Last string - } - - type tt2 struct { - Field1 string `db:"field_1"` - Field2 string `db:"field_2"` - } - - type tt3 struct { - tt2 - Name string - } - - am := tt{"Jason Moiron", 30, "Jason", "Moiron"} - - bq, args, _ := bindStruct(QUESTION, q1, am, mapper()) - expect := `INSERT INTO foo (a, b, c, d) VALUES (?, ?, ?, ?)` - if bq != expect { - t.Errorf("Interpolation of query failed: got `%v`, expected `%v`\n", bq, expect) - } - - if args[0].(string) != "Jason Moiron" { - t.Errorf("Expected `Jason Moiron`, got %v\n", args[0]) - } - - if args[1].(int) != 30 { - t.Errorf("Expected 30, got %v\n", args[1]) - } - - if args[2].(string) != "Jason" { - t.Errorf("Expected Jason, got %v\n", args[2]) - } - - if args[3].(string) != "Moiron" { - t.Errorf("Expected Moiron, got %v\n", args[3]) - } - - am2 := tt2{"Hello", "World"} - bq, args, _ = bindStruct(QUESTION, "INSERT INTO foo (a, b) VALUES (:field_2, :field_1)", am2, mapper()) - expect = `INSERT INTO foo (a, b) VALUES (?, ?)` - if bq != expect { - t.Errorf("Interpolation of query failed: got `%v`, expected `%v`\n", bq, expect) - } - - if args[0].(string) != "World" { - t.Errorf("Expected 'World', got %s\n", args[0].(string)) - } - if args[1].(string) != "Hello" { - t.Errorf("Expected 'Hello', got %s\n", args[1].(string)) - } - - am3 := tt3{Name: "Hello!"} - am3.Field1 = "Hello" - am3.Field2 = "World" - - bq, args, err = bindStruct(QUESTION, "INSERT INTO foo (a, b, c) VALUES (:name, :field_1, :field_2)", am3, mapper()) - - if err != nil { - t.Fatal(err) - } - - expect = `INSERT INTO foo (a, b, c) VALUES (?, ?, ?)` - if bq != expect { - t.Errorf("Interpolation of query failed: got `%v`, expected `%v`\n", bq, expect) - } - - if args[0].(string) != "Hello!" { - t.Errorf("Expected 'Hello!', got %s\n", args[0].(string)) - } - if args[1].(string) != "Hello" { - t.Errorf("Expected 'Hello', got %s\n", args[1].(string)) - } - if args[2].(string) != "World" { - t.Errorf("Expected 'World', got %s\n", args[0].(string)) - } -} - -func TestEmbeddedLiterals(t *testing.T) { - var schema = Schema{ - create: ` - CREATE TABLE x ( - k text - );`, - drop: `drop table x;`, - } - - RunWithSchema(schema, t, func(db *DB, t *testing.T) { - type t1 struct { - K *string - } - type t2 struct { - Inline struct { - F string - } - K *string - } - - db.MustExec(db.Rebind("INSERT INTO x (k) VALUES (?), (?), (?);"), "one", "two", "three") - - target := t1{} - err := db.Get(&target, db.Rebind("SELECT * FROM x WHERE k=?"), "one") - if err != nil { - t.Error(err) - } - if *target.K != "one" { - t.Error("Expected target.K to be `one`, got ", target.K) - } - - target2 := t2{} - err = db.Get(&target2, db.Rebind("SELECT * FROM x WHERE k=?"), "one") - if err != nil { - t.Error(err) - } - if *target2.K != "one" { - t.Errorf("Expected target2.K to be `one`, got `%v`", target2.K) - } - }) -} - -func BenchmarkBindStruct(b *testing.B) { - b.StopTimer() - q1 := `INSERT INTO foo (a, b, c, d) VALUES (:name, :age, :first, :last)` - type t struct { - Name string - Age int - First string - Last string - } - am := t{"Jason Moiron", 30, "Jason", "Moiron"} - b.StartTimer() - for i := 0; i < b.N; i++ { - bindStruct(DOLLAR, q1, am, mapper()) - } -} - -func BenchmarkBindMap(b *testing.B) { - b.StopTimer() - q1 := `INSERT INTO foo (a, b, c, d) VALUES (:name, :age, :first, :last)` - am := map[string]interface{}{ - "name": "Jason Moiron", - "age": 30, - "first": "Jason", - "last": "Moiron", - } - b.StartTimer() - for i := 0; i < b.N; i++ { - bindMap(DOLLAR, q1, am) - } -} - -func BenchmarkIn(b *testing.B) { - q := `SELECT * FROM foo WHERE x = ? AND v in (?) AND y = ?` - - for i := 0; i < b.N; i++ { - _, _, _ = In(q, []interface{}{"foo", []int{0, 5, 7, 2, 9}, "bar"}...) - } -} - -func BenchmarkIn1k(b *testing.B) { - q := `SELECT * FROM foo WHERE x = ? AND v in (?) AND y = ?` - - var vals [1000]interface{} - - for i := 0; i < b.N; i++ { - _, _, _ = In(q, []interface{}{"foo", vals[:], "bar"}...) - } -} - -func BenchmarkIn1kInt(b *testing.B) { - q := `SELECT * FROM foo WHERE x = ? AND v in (?) AND y = ?` - - var vals [1000]int - - for i := 0; i < b.N; i++ { - _, _, _ = In(q, []interface{}{"foo", vals[:], "bar"}...) - } -} - -func BenchmarkIn1kString(b *testing.B) { - q := `SELECT * FROM foo WHERE x = ? AND v in (?) AND y = ?` - - var vals [1000]string - - for i := 0; i < b.N; i++ { - _, _, _ = In(q, []interface{}{"foo", vals[:], "bar"}...) - } -} - -func BenchmarkRebind(b *testing.B) { - b.StopTimer() - q1 := `INSERT INTO foo (a, b, c, d, e, f, g, h, i) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)` - q2 := `INSERT INTO foo (a, b, c) VALUES (?, ?, "foo"), ("Hi", ?, ?)` - b.StartTimer() - - for i := 0; i < b.N; i++ { - Rebind(DOLLAR, q1) - Rebind(DOLLAR, q2) - } -} - -func BenchmarkRebindBuffer(b *testing.B) { - b.StopTimer() - q1 := `INSERT INTO foo (a, b, c, d, e, f, g, h, i) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)` - q2 := `INSERT INTO foo (a, b, c) VALUES (?, ?, "foo"), ("Hi", ?, ?)` - b.StartTimer() - - for i := 0; i < b.N; i++ { - rebindBuff(DOLLAR, q1) - rebindBuff(DOLLAR, q2) - } -} diff --git a/vendor/github.com/labstack/echo/.editorconfig b/vendor/github.com/labstack/echo/.editorconfig deleted file mode 100644 index 17ae50dd0..000000000 --- a/vendor/github.com/labstack/echo/.editorconfig +++ /dev/null @@ -1,25 +0,0 @@ -# EditorConfig coding styles definitions. For more information about the -# properties used in this file, please see the EditorConfig documentation: -# http://editorconfig.org/ - -# indicate this is the root of the project -root = true - -[*] -charset = utf-8 - -end_of_line = LF -insert_final_newline = true -trim_trailing_whitespace = true - -indent_style = space -indent_size = 2 - -[Makefile] -indent_style = tab - -[*.md] -trim_trailing_whitespace = false - -[*.go] -indent_style = tab diff --git a/vendor/github.com/labstack/echo/.gitattributes b/vendor/github.com/labstack/echo/.gitattributes deleted file mode 100644 index 49b63e526..000000000 --- a/vendor/github.com/labstack/echo/.gitattributes +++ /dev/null @@ -1,20 +0,0 @@ -# Automatically normalize line endings for all text-based files -# http://git-scm.com/docs/gitattributes#_end_of_line_conversion -* text=auto - -# For the following file types, normalize line endings to LF on checking and -# prevent conversion to CRLF when they are checked out (this is required in -# order to prevent newline related issues) -.* text eol=lf -*.go text eol=lf -*.yml text eol=lf -*.html text eol=lf -*.css text eol=lf -*.js text eol=lf -*.json text eol=lf -LICENSE text eol=lf - -# Exclude `website` and `cookbook` from GitHub's language statistics -# https://github.com/github/linguist#using-gitattributes -cookbook/* linguist-documentation -website/* linguist-documentation diff --git a/vendor/github.com/labstack/echo/.gitignore b/vendor/github.com/labstack/echo/.gitignore deleted file mode 100644 index dd74acca4..000000000 --- a/vendor/github.com/labstack/echo/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.DS_Store -coverage.txt -_test -vendor -.idea -*.iml -*.out diff --git a/vendor/github.com/labstack/echo/.travis.yml b/vendor/github.com/labstack/echo/.travis.yml deleted file mode 100644 index f75e70b10..000000000 --- a/vendor/github.com/labstack/echo/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -go: - - 1.7.x - - 1.8.x - - tip -install: - - make dependency -script: - - make test -after_success: - - bash <(curl -s https://codecov.io/bash) -matrix: - allow_failures: - - go: tip diff --git a/vendor/github.com/labstack/echo/Gopkg.lock b/vendor/github.com/labstack/echo/Gopkg.lock deleted file mode 100644 index 272aaa524..000000000 --- a/vendor/github.com/labstack/echo/Gopkg.lock +++ /dev/null @@ -1,75 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - revision = "d2709f9f1f31ebcda9651b03077758c1f3a0018c" - version = "v3.0.0" - -[[projects]] - name = "github.com/labstack/gommon" - packages = ["bytes","color","log","random"] - revision = "1121fd3e243c202482226a7afe4dcd07ffc4139a" - version = "v0.2.1" - -[[projects]] - name = "github.com/mattn/go-colorable" - packages = ["."] - revision = "d228849504861217f796da67fae4f6e347643f15" - version = "v0.0.7" - -[[projects]] - name = "github.com/mattn/go-isatty" - packages = ["."] - revision = "fc9e8d8ef48496124e79ae0df75490096eccf6fe" - version = "v0.0.2" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" - version = "v1.1.4" - -[[projects]] - branch = "master" - name = "github.com/valyala/bytebufferpool" - packages = ["."] - revision = "e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7" - -[[projects]] - branch = "master" - name = "github.com/valyala/fasttemplate" - packages = ["."] - revision = "dcecefd839c4193db0d35b88ec65b4c12d360ab0" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["acme","acme/autocert"] - revision = "e1a4589e7d3ea14a3352255d04b6f1a418845e5e" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = ["unix"] - revision = "b90f89a1e7a9c1f6b918820b3daa7f08488c8594" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "5f74a2a2ba5b07475ad0faa1b4c021b973ad40b2ae749e3d94e15fe839bb440e" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/labstack/echo/Gopkg.toml b/vendor/github.com/labstack/echo/Gopkg.toml deleted file mode 100644 index a24f61b94..000000000 --- a/vendor/github.com/labstack/echo/Gopkg.toml +++ /dev/null @@ -1,87 +0,0 @@ - -## Gopkg.toml example (these lines may be deleted) - -## "metadata" defines metadata about the project that could be used by other independent -## systems. The metadata defined here will be ignored by dep. -# [metadata] -# key1 = "value that convey data to other systems" -# system1-data = "value that is used by a system" -# system2-data = "value that is used by another system" - -## "required" lists a set of packages (not projects) that must be included in -## Gopkg.lock. This list is merged with the set of packages imported by the current -## project. Use it when your project needs a package it doesn't explicitly import - -## including "main" packages. -# required = ["github.com/user/thing/cmd/thing"] - -## "ignored" lists a set of packages (not projects) that are ignored when -## dep statically analyzes source code. Ignored packages can be in this project, -## or in a dependency. -# ignored = ["github.com/user/project/badpkg"] - -## Constraints are rules for how directly imported projects -## may be incorporated into the depgraph. They are respected by -## dep whether coming from the Gopkg.toml of the current project or a dependency. -# [[constraint]] -## Required: the root import path of the project being constrained. -# name = "github.com/user/project" -# -## Recommended: the version constraint to enforce for the project. -## Only one of "branch", "version" or "revision" can be specified. -# version = "1.0.0" -# branch = "master" -# revision = "abc123" -# -## Optional: an alternate location (URL or import path) for the project's source. -# source = "https://github.com/myfork/package.git" -# -## "metadata" defines metadata about the dependency or override that could be used -## by other independent systems. The metadata defined here will be ignored by dep. -# [metadata] -# key1 = "value that convey data to other systems" -# system1-data = "value that is used by a system" -# system2-data = "value that is used by another system" - -## Overrides have the same structure as [[constraint]], but supersede all -## [[constraint]] declarations from all projects. Only [[override]] from -## the current project's are applied. -## -## Overrides are a sledgehammer. Use them only as a last resort. -# [[override]] -## Required: the root import path of the project being constrained. -# name = "github.com/user/project" -# -## Optional: specifying a version constraint override will cause all other -## constraints on this project to be ignored; only the overridden constraint -## need be satisfied. -## Again, only one of "branch", "version" or "revision" can be specified. -# version = "1.0.0" -# branch = "master" -# revision = "abc123" -# -## Optional: specifying an alternate source location as an override will -## enforce that the alternate location is used for that project, regardless of -## what source location any dependent projects specify. -# source = "https://github.com/myfork/package.git" - - - -[[constraint]] - name = "github.com/dgrijalva/jwt-go" - version = "3.0.0" - -[[constraint]] - name = "github.com/labstack/gommon" - version = "0.2.1" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.1.4" - -[[constraint]] - branch = "master" - name = "github.com/valyala/fasttemplate" - -[[constraint]] - branch = "master" - name = "golang.org/x/crypto" diff --git a/vendor/github.com/labstack/echo/Makefile b/vendor/github.com/labstack/echo/Makefile deleted file mode 100644 index d4885036b..000000000 --- a/vendor/github.com/labstack/echo/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -dependency: - go get -u github.com/golang/dep/cmd/dep - dep ensure -update - -test: - echo "" > coverage.txt - for d in $(shell go list ./... | grep -v vendor); do \ - go test -race -coverprofile=profile.out -covermode=atomic $$d || exit 1; \ - [ -f profile.out ] && cat profile.out >> coverage.txt && rm profile.out; \ - done diff --git a/vendor/github.com/labstack/echo/README.md b/vendor/github.com/labstack/echo/README.md deleted file mode 100644 index 32d8d1b54..000000000 --- a/vendor/github.com/labstack/echo/README.md +++ /dev/null @@ -1,62 +0,0 @@ -
- -[![Sourcegraph](https://sourcegraph.com/github.com/labstack/echo/-/badge.svg?style=flat-square)](https://sourcegraph.com/github.com/labstack/echo?badge) -[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/labstack/echo) -[![Go Report Card](https://goreportcard.com/badge/github.com/labstack/echo?style=flat-square)](https://goreportcard.com/report/github.com/labstack/echo) -[![Build Status](http://img.shields.io/travis/labstack/echo.svg?style=flat-square)](https://travis-ci.org/labstack/echo) -[![Codecov](https://img.shields.io/codecov/c/github/labstack/echo.svg?style=flat-square)](https://codecov.io/gh/labstack/echo) [![Forum](https://img.shields.io/badge/community-forum-00afd1.svg?style=flat-square)](https://forum.labstack.com) -[![Twitter](https://img.shields.io/badge/twitter-@labstack-55acee.svg?style=flat-square)](https://twitter.com/labstack) -[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/labstack/echo/master/LICENSE) - -## Feature Overview - -- Optimized HTTP router which smartly prioritize routes -- Build robust and scalable RESTful APIs -- Group APIs -- Extensible middleware framework -- Define middleware at root, group or route level -- Data binding for JSON, XML and form payload -- Handy functions to send variety of HTTP responses -- Centralized HTTP error handling -- Template rendering with any template engine -- Define your format for the logger -- Highly customizable -- Automatic TLS via Let’s Encrypt -- HTTP/2 support - -## Performance - -![Performance](https://i.imgur.com/F2V7TfO.png) - -## [Get Started](https://echo.labstack.com/guide) - -## Support Us - -- :star: the project -- [Donate](https://echo.labstack.com/support-echo) -- :earth_americas: spread the word -- [Contribute](#contribute) to the project - -## Contribute - -**Use issues for everything** - -- For a small change, just send a PR. -- For bigger changes open an issue for discussion before sending a PR. -- PR should have: - - Test case - - Documentation - - Example (If it makes sense) -- You can also contribute by: - - Reporting issues - - Suggesting new features or enhancements - - Improve/fix documentation - -## Credits -- [Vishal Rana](https://github.com/vishr) - Author -- [Nitin Rana](https://github.com/nr17) - Consultant -- [Contributors](https://github.com/labstack/echo/graphs/contributors) - -## License - -[MIT](https://github.com/labstack/echo/blob/master/LICENSE) diff --git a/vendor/github.com/labstack/echo/bind.go b/vendor/github.com/labstack/echo/bind.go deleted file mode 100644 index 186bd83d9..000000000 --- a/vendor/github.com/labstack/echo/bind.go +++ /dev/null @@ -1,261 +0,0 @@ -package echo - -import ( - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "net/http" - "reflect" - "strconv" - "strings" -) - -type ( - // Binder is the interface that wraps the Bind method. - Binder interface { - Bind(i interface{}, c Context) error - } - - // DefaultBinder is the default implementation of the Binder interface. - DefaultBinder struct{} - - // BindUnmarshaler is the interface used to wrap the UnmarshalParam method. - BindUnmarshaler interface { - // UnmarshalParam decodes and assigns a value from an form or query param. - UnmarshalParam(param string) error - } -) - -// Bind implements the `Binder#Bind` function. -func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) { - req := c.Request() - if req.ContentLength == 0 { - if req.Method == GET || req.Method == DELETE { - if err = b.bindData(i, c.QueryParams(), "query"); err != nil { - return NewHTTPError(http.StatusBadRequest, err.Error()) - } - return - } - return NewHTTPError(http.StatusBadRequest, "Request body can't be empty") - } - ctype := req.Header.Get(HeaderContentType) - switch { - case strings.HasPrefix(ctype, MIMEApplicationJSON): - if err = json.NewDecoder(req.Body).Decode(i); err != nil { - if ute, ok := err.(*json.UnmarshalTypeError); ok { - return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unmarshal type error: expected=%v, got=%v, offset=%v", ute.Type, ute.Value, ute.Offset)) - } else if se, ok := err.(*json.SyntaxError); ok { - return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Syntax error: offset=%v, error=%v", se.Offset, se.Error())) - } else { - return NewHTTPError(http.StatusBadRequest, err.Error()) - } - } - case strings.HasPrefix(ctype, MIMEApplicationXML), strings.HasPrefix(ctype, MIMETextXML): - if err = xml.NewDecoder(req.Body).Decode(i); err != nil { - if ute, ok := err.(*xml.UnsupportedTypeError); ok { - return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Unsupported type error: type=%v, error=%v", ute.Type, ute.Error())) - } else if se, ok := err.(*xml.SyntaxError); ok { - return NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Syntax error: line=%v, error=%v", se.Line, se.Error())) - } else { - return NewHTTPError(http.StatusBadRequest, err.Error()) - } - } - case strings.HasPrefix(ctype, MIMEApplicationForm), strings.HasPrefix(ctype, MIMEMultipartForm): - params, err := c.FormParams() - if err != nil { - return NewHTTPError(http.StatusBadRequest, err.Error()) - } - if err = b.bindData(i, params, "form"); err != nil { - return NewHTTPError(http.StatusBadRequest, err.Error()) - } - default: - return ErrUnsupportedMediaType - } - return -} - -func (b *DefaultBinder) bindData(ptr interface{}, data map[string][]string, tag string) error { - typ := reflect.TypeOf(ptr).Elem() - val := reflect.ValueOf(ptr).Elem() - - if typ.Kind() != reflect.Struct { - return errors.New("Binding element must be a struct") - } - - for i := 0; i < typ.NumField(); i++ { - typeField := typ.Field(i) - structField := val.Field(i) - if !structField.CanSet() { - continue - } - structFieldKind := structField.Kind() - inputFieldName := typeField.Tag.Get(tag) - - if inputFieldName == "" { - inputFieldName = typeField.Name - // If tag is nil, we inspect if the field is a struct. - if _, ok := bindUnmarshaler(structField); !ok && structFieldKind == reflect.Struct { - err := b.bindData(structField.Addr().Interface(), data, tag) - if err != nil { - return err - } - continue - } - } - inputValue, exists := data[inputFieldName] - if !exists { - continue - } - - // Call this first, in case we're dealing with an alias to an array type - if ok, err := unmarshalField(typeField.Type.Kind(), inputValue[0], structField); ok { - if err != nil { - return err - } - continue - } - - numElems := len(inputValue) - if structFieldKind == reflect.Slice && numElems > 0 { - sliceOf := structField.Type().Elem().Kind() - slice := reflect.MakeSlice(structField.Type(), numElems, numElems) - for j := 0; j < numElems; j++ { - if err := setWithProperType(sliceOf, inputValue[j], slice.Index(j)); err != nil { - return err - } - } - val.Field(i).Set(slice) - } else { - if err := setWithProperType(typeField.Type.Kind(), inputValue[0], structField); err != nil { - return err - } - } - } - return nil -} - -func setWithProperType(valueKind reflect.Kind, val string, structField reflect.Value) error { - // But also call it here, in case we're dealing with an array of BindUnmarshalers - if ok, err := unmarshalField(valueKind, val, structField); ok { - return err - } - - switch valueKind { - case reflect.Ptr: - return setWithProperType(structField.Elem().Kind(), val, structField.Elem()) - case reflect.Int: - return setIntField(val, 0, structField) - case reflect.Int8: - return setIntField(val, 8, structField) - case reflect.Int16: - return setIntField(val, 16, structField) - case reflect.Int32: - return setIntField(val, 32, structField) - case reflect.Int64: - return setIntField(val, 64, structField) - case reflect.Uint: - return setUintField(val, 0, structField) - case reflect.Uint8: - return setUintField(val, 8, structField) - case reflect.Uint16: - return setUintField(val, 16, structField) - case reflect.Uint32: - return setUintField(val, 32, structField) - case reflect.Uint64: - return setUintField(val, 64, structField) - case reflect.Bool: - return setBoolField(val, structField) - case reflect.Float32: - return setFloatField(val, 32, structField) - case reflect.Float64: - return setFloatField(val, 64, structField) - case reflect.String: - structField.SetString(val) - default: - return errors.New("unknown type") - } - return nil -} - -func unmarshalField(valueKind reflect.Kind, val string, field reflect.Value) (bool, error) { - switch valueKind { - case reflect.Ptr: - return unmarshalFieldPtr(val, field) - default: - return unmarshalFieldNonPtr(val, field) - } -} - -// bindUnmarshaler attempts to unmarshal a reflect.Value into a BindUnmarshaler -func bindUnmarshaler(field reflect.Value) (BindUnmarshaler, bool) { - ptr := reflect.New(field.Type()) - if ptr.CanInterface() { - iface := ptr.Interface() - if unmarshaler, ok := iface.(BindUnmarshaler); ok { - return unmarshaler, ok - } - } - return nil, false -} - -func unmarshalFieldNonPtr(value string, field reflect.Value) (bool, error) { - if unmarshaler, ok := bindUnmarshaler(field); ok { - err := unmarshaler.UnmarshalParam(value) - field.Set(reflect.ValueOf(unmarshaler).Elem()) - return true, err - } - return false, nil -} - -func unmarshalFieldPtr(value string, field reflect.Value) (bool, error) { - if field.IsNil() { - // Initialize the pointer to a nil value - field.Set(reflect.New(field.Type().Elem())) - } - return unmarshalFieldNonPtr(value, field.Elem()) -} - -func setIntField(value string, bitSize int, field reflect.Value) error { - if value == "" { - value = "0" - } - intVal, err := strconv.ParseInt(value, 10, bitSize) - if err == nil { - field.SetInt(intVal) - } - return err -} - -func setUintField(value string, bitSize int, field reflect.Value) error { - if value == "" { - value = "0" - } - uintVal, err := strconv.ParseUint(value, 10, bitSize) - if err == nil { - field.SetUint(uintVal) - } - return err -} - -func setBoolField(value string, field reflect.Value) error { - if value == "" { - value = "false" - } - boolVal, err := strconv.ParseBool(value) - if err == nil { - field.SetBool(boolVal) - } - return err -} - -func setFloatField(value string, bitSize int, field reflect.Value) error { - if value == "" { - value = "0.0" - } - floatVal, err := strconv.ParseFloat(value, bitSize) - if err == nil { - field.SetFloat(floatVal) - } - return err -} diff --git a/vendor/github.com/labstack/echo/bind_test.go b/vendor/github.com/labstack/echo/bind_test.go deleted file mode 100644 index 1f1fa4868..000000000 --- a/vendor/github.com/labstack/echo/bind_test.go +++ /dev/null @@ -1,334 +0,0 @@ -package echo - -import ( - "bytes" - "io" - "mime/multipart" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -type ( - bindTestStruct struct { - I int - PtrI *int - I8 int8 - PtrI8 *int8 - I16 int16 - PtrI16 *int16 - I32 int32 - PtrI32 *int32 - I64 int64 - PtrI64 *int64 - UI uint - PtrUI *uint - UI8 uint8 - PtrUI8 *uint8 - UI16 uint16 - PtrUI16 *uint16 - UI32 uint32 - PtrUI32 *uint32 - UI64 uint64 - PtrUI64 *uint64 - B bool - PtrB *bool - F32 float32 - PtrF32 *float32 - F64 float64 - PtrF64 *float64 - S string - PtrS *string - cantSet string - DoesntExist string - T Timestamp - Tptr *Timestamp - SA StringArray - } - Timestamp time.Time - TA []Timestamp - StringArray []string - Struct struct { - Foo string - } -) - -func (t *Timestamp) UnmarshalParam(src string) error { - ts, err := time.Parse(time.RFC3339, src) - *t = Timestamp(ts) - return err -} - -func (a *StringArray) UnmarshalParam(src string) error { - *a = StringArray(strings.Split(src, ",")) - return nil -} - -func (s *Struct) UnmarshalParam(src string) error { - *s = Struct{ - Foo: src, - } - return nil -} - -func (t bindTestStruct) GetCantSet() string { - return t.cantSet -} - -var values = map[string][]string{ - "I": {"0"}, - "PtrI": {"0"}, - "I8": {"8"}, - "PtrI8": {"8"}, - "I16": {"16"}, - "PtrI16": {"16"}, - "I32": {"32"}, - "PtrI32": {"32"}, - "I64": {"64"}, - "PtrI64": {"64"}, - "UI": {"0"}, - "PtrUI": {"0"}, - "UI8": {"8"}, - "PtrUI8": {"8"}, - "UI16": {"16"}, - "PtrUI16": {"16"}, - "UI32": {"32"}, - "PtrUI32": {"32"}, - "UI64": {"64"}, - "PtrUI64": {"64"}, - "B": {"true"}, - "PtrB": {"true"}, - "F32": {"32.5"}, - "PtrF32": {"32.5"}, - "F64": {"64.5"}, - "PtrF64": {"64.5"}, - "S": {"test"}, - "PtrS": {"test"}, - "cantSet": {"test"}, - "T": {"2016-12-06T19:09:05+01:00"}, - "Tptr": {"2016-12-06T19:09:05+01:00"}, - "ST": {"bar"}, -} - -func TestBindJSON(t *testing.T) { - testBindOkay(t, strings.NewReader(userJSON), MIMEApplicationJSON) - testBindError(t, strings.NewReader(invalidContent), MIMEApplicationJSON) -} - -func TestBindXML(t *testing.T) { - testBindOkay(t, strings.NewReader(userXML), MIMEApplicationXML) - testBindError(t, strings.NewReader(invalidContent), MIMEApplicationXML) - testBindOkay(t, strings.NewReader(userXML), MIMETextXML) - testBindError(t, strings.NewReader(invalidContent), MIMETextXML) -} - -func TestBindForm(t *testing.T) { - testBindOkay(t, strings.NewReader(userForm), MIMEApplicationForm) - testBindError(t, nil, MIMEApplicationForm) - e := New() - req := httptest.NewRequest(POST, "/", strings.NewReader(userForm)) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - req.Header.Set(HeaderContentType, MIMEApplicationForm) - obj := []struct{ Field string }{} - err := c.Bind(&obj) - assert.Error(t, err) -} - -func TestBindQueryParams(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/?id=1&name=Jon+Snow", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - u := new(user) - err := c.Bind(u) - if assert.NoError(t, err) { - assert.Equal(t, 1, u.ID) - assert.Equal(t, "Jon Snow", u.Name) - } -} - -func TestBindUnmarshalParam(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/?ts=2016-12-06T19:09:05Z&sa=one,two,three&ta=2016-12-06T19:09:05Z&ta=2016-12-06T19:09:05Z&ST=baz", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - result := struct { - T Timestamp `query:"ts"` - TA []Timestamp `query:"ta"` - SA StringArray `query:"sa"` - ST Struct - }{} - err := c.Bind(&result) - ts := Timestamp(time.Date(2016, 12, 6, 19, 9, 5, 0, time.UTC)) - if assert.NoError(t, err) { - // assert.Equal(t, Timestamp(reflect.TypeOf(&Timestamp{}), time.Date(2016, 12, 6, 19, 9, 5, 0, time.UTC)), result.T) - assert.Equal(t, ts, result.T) - assert.Equal(t, StringArray([]string{"one", "two", "three"}), result.SA) - assert.Equal(t, []Timestamp{ts, ts}, result.TA) - assert.Equal(t, Struct{"baz"}, result.ST) - } -} - -func TestBindUnmarshalParamPtr(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/?ts=2016-12-06T19:09:05Z", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - result := struct { - Tptr *Timestamp `query:"ts"` - }{} - err := c.Bind(&result) - if assert.NoError(t, err) { - assert.Equal(t, Timestamp(time.Date(2016, 12, 6, 19, 9, 5, 0, time.UTC)), *result.Tptr) - } -} - -func TestBindMultipartForm(t *testing.T) { - body := new(bytes.Buffer) - mw := multipart.NewWriter(body) - mw.WriteField("id", "1") - mw.WriteField("name", "Jon Snow") - mw.Close() - testBindOkay(t, body, mw.FormDataContentType()) -} - -func TestBindUnsupportedMediaType(t *testing.T) { - testBindError(t, strings.NewReader(invalidContent), MIMEApplicationJSON) -} - -func TestBindbindData(t *testing.T) { - ts := new(bindTestStruct) - b := new(DefaultBinder) - b.bindData(ts, values, "form") - assertBindTestStruct(t, ts) -} - -func TestBindSetWithProperType(t *testing.T) { - ts := new(bindTestStruct) - typ := reflect.TypeOf(ts).Elem() - val := reflect.ValueOf(ts).Elem() - for i := 0; i < typ.NumField(); i++ { - typeField := typ.Field(i) - structField := val.Field(i) - if !structField.CanSet() { - continue - } - if len(values[typeField.Name]) == 0 { - continue - } - val := values[typeField.Name][0] - err := setWithProperType(typeField.Type.Kind(), val, structField) - assert.NoError(t, err) - } - assertBindTestStruct(t, ts) - - type foo struct { - Bar bytes.Buffer - } - v := &foo{} - typ = reflect.TypeOf(v).Elem() - val = reflect.ValueOf(v).Elem() - assert.Error(t, setWithProperType(typ.Field(0).Type.Kind(), "5", val.Field(0))) -} - -func TestBindSetFields(t *testing.T) { - ts := new(bindTestStruct) - val := reflect.ValueOf(ts).Elem() - // Int - if assert.NoError(t, setIntField("5", 0, val.FieldByName("I"))) { - assert.Equal(t, 5, ts.I) - } - if assert.NoError(t, setIntField("", 0, val.FieldByName("I"))) { - assert.Equal(t, 0, ts.I) - } - - // Uint - if assert.NoError(t, setUintField("10", 0, val.FieldByName("UI"))) { - assert.Equal(t, uint(10), ts.UI) - } - if assert.NoError(t, setUintField("", 0, val.FieldByName("UI"))) { - assert.Equal(t, uint(0), ts.UI) - } - - // Float - if assert.NoError(t, setFloatField("15.5", 0, val.FieldByName("F32"))) { - assert.Equal(t, float32(15.5), ts.F32) - } - if assert.NoError(t, setFloatField("", 0, val.FieldByName("F32"))) { - assert.Equal(t, float32(0.0), ts.F32) - } - - // Bool - if assert.NoError(t, setBoolField("true", val.FieldByName("B"))) { - assert.Equal(t, true, ts.B) - } - if assert.NoError(t, setBoolField("", val.FieldByName("B"))) { - assert.Equal(t, false, ts.B) - } - - ok, err := unmarshalFieldNonPtr("2016-12-06T19:09:05Z", val.FieldByName("T")) - if assert.NoError(t, err) { - assert.Equal(t, ok, true) - assert.Equal(t, Timestamp(time.Date(2016, 12, 6, 19, 9, 5, 0, time.UTC)), ts.T) - } -} - -func assertBindTestStruct(t *testing.T, ts *bindTestStruct) { - assert.Equal(t, 0, ts.I) - assert.Equal(t, int8(8), ts.I8) - assert.Equal(t, int16(16), ts.I16) - assert.Equal(t, int32(32), ts.I32) - assert.Equal(t, int64(64), ts.I64) - assert.Equal(t, uint(0), ts.UI) - assert.Equal(t, uint8(8), ts.UI8) - assert.Equal(t, uint16(16), ts.UI16) - assert.Equal(t, uint32(32), ts.UI32) - assert.Equal(t, uint64(64), ts.UI64) - assert.Equal(t, true, ts.B) - assert.Equal(t, float32(32.5), ts.F32) - assert.Equal(t, float64(64.5), ts.F64) - assert.Equal(t, "test", ts.S) - assert.Equal(t, "", ts.GetCantSet()) -} - -func testBindOkay(t *testing.T, r io.Reader, ctype string) { - e := New() - req := httptest.NewRequest(POST, "/", r) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - req.Header.Set(HeaderContentType, ctype) - u := new(user) - err := c.Bind(u) - if assert.NoError(t, err) { - assert.Equal(t, 1, u.ID) - assert.Equal(t, "Jon Snow", u.Name) - } -} - -func testBindError(t *testing.T, r io.Reader, ctype string) { - e := New() - req := httptest.NewRequest(POST, "/", r) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - req.Header.Set(HeaderContentType, ctype) - u := new(user) - err := c.Bind(u) - - switch { - case strings.HasPrefix(ctype, MIMEApplicationJSON), strings.HasPrefix(ctype, MIMEApplicationXML), strings.HasPrefix(ctype, MIMETextXML), - strings.HasPrefix(ctype, MIMEApplicationForm), strings.HasPrefix(ctype, MIMEMultipartForm): - if assert.IsType(t, new(HTTPError), err) { - assert.Equal(t, http.StatusBadRequest, err.(*HTTPError).Code) - } - default: - if assert.IsType(t, new(HTTPError), err) { - assert.Equal(t, ErrUnsupportedMediaType, err) - } - } -} diff --git a/vendor/github.com/labstack/echo/context.go b/vendor/github.com/labstack/echo/context.go deleted file mode 100644 index 54fa71ade..000000000 --- a/vendor/github.com/labstack/echo/context.go +++ /dev/null @@ -1,577 +0,0 @@ -package echo - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "mime/multipart" - "net" - "net/http" - "net/url" - "os" - "path/filepath" - "strings" -) - -type ( - // Context represents the context of the current HTTP request. It holds request and - // response objects, path, path parameters, data and registered handler. - Context interface { - // Request returns `*http.Request`. - Request() *http.Request - - // SetRequest sets `*http.Request`. - SetRequest(r *http.Request) - - // Response returns `*Response`. - Response() *Response - - // IsTLS returns true if HTTP connection is TLS otherwise false. - IsTLS() bool - - // IsWebSocket returns true if HTTP connection is WebSocket otherwise false. - IsWebSocket() bool - - // Scheme returns the HTTP protocol scheme, `http` or `https`. - Scheme() string - - // RealIP returns the client's network address based on `X-Forwarded-For` - // or `X-Real-IP` request header. - RealIP() string - - // Path returns the registered path for the handler. - Path() string - - // SetPath sets the registered path for the handler. - SetPath(p string) - - // Param returns path parameter by name. - Param(name string) string - - // ParamNames returns path parameter names. - ParamNames() []string - - // SetParamNames sets path parameter names. - SetParamNames(names ...string) - - // ParamValues returns path parameter values. - ParamValues() []string - - // SetParamValues sets path parameter values. - SetParamValues(values ...string) - - // QueryParam returns the query param for the provided name. - QueryParam(name string) string - - // QueryParams returns the query parameters as `url.Values`. - QueryParams() url.Values - - // QueryString returns the URL query string. - QueryString() string - - // FormValue returns the form field value for the provided name. - FormValue(name string) string - - // FormParams returns the form parameters as `url.Values`. - FormParams() (url.Values, error) - - // FormFile returns the multipart form file for the provided name. - FormFile(name string) (*multipart.FileHeader, error) - - // MultipartForm returns the multipart form. - MultipartForm() (*multipart.Form, error) - - // Cookie returns the named cookie provided in the request. - Cookie(name string) (*http.Cookie, error) - - // SetCookie adds a `Set-Cookie` header in HTTP response. - SetCookie(cookie *http.Cookie) - - // Cookies returns the HTTP cookies sent with the request. - Cookies() []*http.Cookie - - // Get retrieves data from the context. - Get(key string) interface{} - - // Set saves data in the context. - Set(key string, val interface{}) - - // Bind binds the request body into provided type `i`. The default binder - // does it based on Content-Type header. - Bind(i interface{}) error - - // Validate validates provided `i`. It is usually called after `Context#Bind()`. - // Validator must be registered using `Echo#Validator`. - Validate(i interface{}) error - - // Render renders a template with data and sends a text/html response with status - // code. Renderer must be registered using `Echo.Renderer`. - Render(code int, name string, data interface{}) error - - // HTML sends an HTTP response with status code. - HTML(code int, html string) error - - // HTMLBlob sends an HTTP blob response with status code. - HTMLBlob(code int, b []byte) error - - // String sends a string response with status code. - String(code int, s string) error - - // JSON sends a JSON response with status code. - JSON(code int, i interface{}) error - - // JSONPretty sends a pretty-print JSON with status code. - JSONPretty(code int, i interface{}, indent string) error - - // JSONBlob sends a JSON blob response with status code. - JSONBlob(code int, b []byte) error - - // JSONP sends a JSONP response with status code. It uses `callback` to construct - // the JSONP payload. - JSONP(code int, callback string, i interface{}) error - - // JSONPBlob sends a JSONP blob response with status code. It uses `callback` - // to construct the JSONP payload. - JSONPBlob(code int, callback string, b []byte) error - - // XML sends an XML response with status code. - XML(code int, i interface{}) error - - // XMLPretty sends a pretty-print XML with status code. - XMLPretty(code int, i interface{}, indent string) error - - // XMLBlob sends an XML blob response with status code. - XMLBlob(code int, b []byte) error - - // Blob sends a blob response with status code and content type. - Blob(code int, contentType string, b []byte) error - - // Stream sends a streaming response with status code and content type. - Stream(code int, contentType string, r io.Reader) error - - // File sends a response with the content of the file. - File(file string) error - - // Attachment sends a response as attachment, prompting client to save the - // file. - Attachment(file string, name string) error - - // Inline sends a response as inline, opening the file in the browser. - Inline(file string, name string) error - - // NoContent sends a response with no body and a status code. - NoContent(code int) error - - // Redirect redirects the request to a provided URL with status code. - Redirect(code int, url string) error - - // Error invokes the registered HTTP error handler. Generally used by middleware. - Error(err error) - - // Handler returns the matched handler by router. - Handler() HandlerFunc - - // SetHandler sets the matched handler by router. - SetHandler(h HandlerFunc) - - // Logger returns the `Logger` instance. - Logger() Logger - - // Echo returns the `Echo` instance. - Echo() *Echo - - // Reset resets the context after request completes. It must be called along - // with `Echo#AcquireContext()` and `Echo#ReleaseContext()`. - // See `Echo#ServeHTTP()` - Reset(r *http.Request, w http.ResponseWriter) - } - - context struct { - request *http.Request - response *Response - path string - pnames []string - pvalues []string - query url.Values - handler HandlerFunc - store Map - echo *Echo - } -) - -const ( - defaultMemory = 32 << 20 // 32 MB - indexPage = "index.html" -) - -func (c *context) Request() *http.Request { - return c.request -} - -func (c *context) SetRequest(r *http.Request) { - c.request = r -} - -func (c *context) Response() *Response { - return c.response -} - -func (c *context) IsTLS() bool { - return c.request.TLS != nil -} - -func (c *context) IsWebSocket() bool { - upgrade := c.request.Header.Get(HeaderUpgrade) - return upgrade == "websocket" || upgrade == "Websocket" -} - -func (c *context) Scheme() string { - // Can't use `r.Request.URL.Scheme` - // See: https://groups.google.com/forum/#!topic/golang-nuts/pMUkBlQBDF0 - if c.IsTLS() { - return "https" - } - if scheme := c.request.Header.Get(HeaderXForwardedProto); scheme != "" { - return scheme - } - if scheme := c.request.Header.Get(HeaderXForwardedProtocol); scheme != "" { - return scheme - } - if ssl := c.request.Header.Get(HeaderXForwardedSsl); ssl == "on" { - return "https" - } - if scheme := c.request.Header.Get(HeaderXUrlScheme); scheme != "" { - return scheme - } - return "http" -} - -func (c *context) RealIP() string { - ra := c.request.RemoteAddr - if ip := c.request.Header.Get(HeaderXForwardedFor); ip != "" { - ra = strings.Split(ip, ", ")[0] - } else if ip := c.request.Header.Get(HeaderXRealIP); ip != "" { - ra = ip - } else { - ra, _, _ = net.SplitHostPort(ra) - } - return ra -} - -func (c *context) Path() string { - return c.path -} - -func (c *context) SetPath(p string) { - c.path = p -} - -func (c *context) Param(name string) string { - for i, n := range c.pnames { - if i < len(c.pvalues) { - if n == name { - return c.pvalues[i] - } - - // Param name with aliases - for _, p := range strings.Split(n, ",") { - if p == name { - return c.pvalues[i] - } - } - } - } - return "" -} - -func (c *context) ParamNames() []string { - return c.pnames -} - -func (c *context) SetParamNames(names ...string) { - c.pnames = names -} - -func (c *context) ParamValues() []string { - return c.pvalues[:len(c.pnames)] -} - -func (c *context) SetParamValues(values ...string) { - c.pvalues = values -} - -func (c *context) QueryParam(name string) string { - if c.query == nil { - c.query = c.request.URL.Query() - } - return c.query.Get(name) -} - -func (c *context) QueryParams() url.Values { - if c.query == nil { - c.query = c.request.URL.Query() - } - return c.query -} - -func (c *context) QueryString() string { - return c.request.URL.RawQuery -} - -func (c *context) FormValue(name string) string { - return c.request.FormValue(name) -} - -func (c *context) FormParams() (url.Values, error) { - if strings.HasPrefix(c.request.Header.Get(HeaderContentType), MIMEMultipartForm) { - if err := c.request.ParseMultipartForm(defaultMemory); err != nil { - return nil, err - } - } else { - if err := c.request.ParseForm(); err != nil { - return nil, err - } - } - return c.request.Form, nil -} - -func (c *context) FormFile(name string) (*multipart.FileHeader, error) { - _, fh, err := c.request.FormFile(name) - return fh, err -} - -func (c *context) MultipartForm() (*multipart.Form, error) { - err := c.request.ParseMultipartForm(defaultMemory) - return c.request.MultipartForm, err -} - -func (c *context) Cookie(name string) (*http.Cookie, error) { - return c.request.Cookie(name) -} - -func (c *context) SetCookie(cookie *http.Cookie) { - http.SetCookie(c.Response(), cookie) -} - -func (c *context) Cookies() []*http.Cookie { - return c.request.Cookies() -} - -func (c *context) Get(key string) interface{} { - return c.store[key] -} - -func (c *context) Set(key string, val interface{}) { - if c.store == nil { - c.store = make(Map) - } - c.store[key] = val -} - -func (c *context) Bind(i interface{}) error { - return c.echo.Binder.Bind(i, c) -} - -func (c *context) Validate(i interface{}) error { - if c.echo.Validator == nil { - return ErrValidatorNotRegistered - } - return c.echo.Validator.Validate(i) -} - -func (c *context) Render(code int, name string, data interface{}) (err error) { - if c.echo.Renderer == nil { - return ErrRendererNotRegistered - } - buf := new(bytes.Buffer) - if err = c.echo.Renderer.Render(buf, name, data, c); err != nil { - return - } - return c.HTMLBlob(code, buf.Bytes()) -} - -func (c *context) HTML(code int, html string) (err error) { - return c.HTMLBlob(code, []byte(html)) -} - -func (c *context) HTMLBlob(code int, b []byte) (err error) { - return c.Blob(code, MIMETextHTMLCharsetUTF8, b) -} - -func (c *context) String(code int, s string) (err error) { - return c.Blob(code, MIMETextPlainCharsetUTF8, []byte(s)) -} - -func (c *context) JSON(code int, i interface{}) (err error) { - _, pretty := c.QueryParams()["pretty"] - if c.echo.Debug || pretty { - return c.JSONPretty(code, i, " ") - } - b, err := json.Marshal(i) - if err != nil { - return - } - return c.JSONBlob(code, b) -} - -func (c *context) JSONPretty(code int, i interface{}, indent string) (err error) { - b, err := json.MarshalIndent(i, "", indent) - if err != nil { - return - } - return c.JSONBlob(code, b) -} - -func (c *context) JSONBlob(code int, b []byte) (err error) { - return c.Blob(code, MIMEApplicationJSONCharsetUTF8, b) -} - -func (c *context) JSONP(code int, callback string, i interface{}) (err error) { - b, err := json.Marshal(i) - if err != nil { - return - } - return c.JSONPBlob(code, callback, b) -} - -func (c *context) JSONPBlob(code int, callback string, b []byte) (err error) { - c.response.Header().Set(HeaderContentType, MIMEApplicationJavaScriptCharsetUTF8) - c.response.WriteHeader(code) - if _, err = c.response.Write([]byte(callback + "(")); err != nil { - return - } - if _, err = c.response.Write(b); err != nil { - return - } - _, err = c.response.Write([]byte(");")) - return -} - -func (c *context) XML(code int, i interface{}) (err error) { - _, pretty := c.QueryParams()["pretty"] - if c.echo.Debug || pretty { - return c.XMLPretty(code, i, " ") - } - b, err := xml.Marshal(i) - if err != nil { - return - } - return c.XMLBlob(code, b) -} - -func (c *context) XMLPretty(code int, i interface{}, indent string) (err error) { - b, err := xml.MarshalIndent(i, "", indent) - if err != nil { - return - } - return c.XMLBlob(code, b) -} - -func (c *context) XMLBlob(code int, b []byte) (err error) { - c.response.Header().Set(HeaderContentType, MIMEApplicationXMLCharsetUTF8) - c.response.WriteHeader(code) - if _, err = c.response.Write([]byte(xml.Header)); err != nil { - return - } - _, err = c.response.Write(b) - return -} - -func (c *context) Blob(code int, contentType string, b []byte) (err error) { - c.response.Header().Set(HeaderContentType, contentType) - c.response.WriteHeader(code) - _, err = c.response.Write(b) - return -} - -func (c *context) Stream(code int, contentType string, r io.Reader) (err error) { - c.response.Header().Set(HeaderContentType, contentType) - c.response.WriteHeader(code) - _, err = io.Copy(c.response, r) - return -} - -func (c *context) File(file string) (err error) { - f, err := os.Open(file) - if err != nil { - return NotFoundHandler(c) - } - defer f.Close() - - fi, _ := f.Stat() - if fi.IsDir() { - file = filepath.Join(file, indexPage) - f, err = os.Open(file) - if err != nil { - return NotFoundHandler(c) - } - defer f.Close() - if fi, err = f.Stat(); err != nil { - return - } - } - http.ServeContent(c.Response(), c.Request(), fi.Name(), fi.ModTime(), f) - return -} - -func (c *context) Attachment(file, name string) (err error) { - return c.contentDisposition(file, name, "attachment") -} - -func (c *context) Inline(file, name string) (err error) { - return c.contentDisposition(file, name, "inline") -} - -func (c *context) contentDisposition(file, name, dispositionType string) (err error) { - c.response.Header().Set(HeaderContentDisposition, fmt.Sprintf("%s; filename=%q", dispositionType, name)) - c.File(file) - return -} - -func (c *context) NoContent(code int) error { - c.response.WriteHeader(code) - return nil -} - -func (c *context) Redirect(code int, url string) error { - if code < 300 || code > 308 { - return ErrInvalidRedirectCode - } - c.response.Header().Set(HeaderLocation, url) - c.response.WriteHeader(code) - return nil -} - -func (c *context) Error(err error) { - c.echo.HTTPErrorHandler(err, c) -} - -func (c *context) Echo() *Echo { - return c.echo -} - -func (c *context) Handler() HandlerFunc { - return c.handler -} - -func (c *context) SetHandler(h HandlerFunc) { - c.handler = h -} - -func (c *context) Logger() Logger { - return c.echo.Logger -} - -func (c *context) Reset(r *http.Request, w http.ResponseWriter) { - c.request = r - c.response.reset(w) - c.query = nil - c.handler = NotFoundHandler - c.store = nil - c.path = "" - c.pnames = nil - // NOTE: Don't reset because it has to have length c.echo.maxParam at all times - // c.pvalues = nil -} diff --git a/vendor/github.com/labstack/echo/context_test.go b/vendor/github.com/labstack/echo/context_test.go deleted file mode 100644 index a3ae6eb7b..000000000 --- a/vendor/github.com/labstack/echo/context_test.go +++ /dev/null @@ -1,427 +0,0 @@ -package echo - -import ( - "bytes" - "errors" - "io" - "mime/multipart" - "net/http" - "net/http/httptest" - "testing" - "text/template" - "time" - - "strings" - - "net/url" - - "encoding/xml" - - "github.com/stretchr/testify/assert" -) - -type ( - Template struct { - templates *template.Template - } -) - -func (t *Template) Render(w io.Writer, name string, data interface{}, c Context) error { - return t.templates.ExecuteTemplate(w, name, data) -} - -func TestContext(t *testing.T) { - e := New() - req := httptest.NewRequest(POST, "/", strings.NewReader(userJSON)) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec).(*context) - - // Echo - assert.Equal(t, e, c.Echo()) - - // Request - assert.NotNil(t, c.Request()) - - // Response - assert.NotNil(t, c.Response()) - - //-------- - // Render - //-------- - - tmpl := &Template{ - templates: template.Must(template.New("hello").Parse("Hello, {{.}}!")), - } - c.echo.Renderer = tmpl - err := c.Render(http.StatusOK, "hello", "Jon Snow") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "Hello, Jon Snow!", rec.Body.String()) - } - - c.echo.Renderer = nil - err = c.Render(http.StatusOK, "hello", "Jon Snow") - assert.Error(t, err) - - // JSON - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.JSON(http.StatusOK, user{1, "Jon Snow"}) - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationJSONCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, userJSON, rec.Body.String()) - } - - // JSON with "?pretty" - req = httptest.NewRequest(GET, "/?pretty", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.JSON(http.StatusOK, user{1, "Jon Snow"}) - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationJSONCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, userJSONPretty, rec.Body.String()) - } - req = httptest.NewRequest(GET, "/", nil) // reset - - // JSONPretty - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.JSONPretty(http.StatusOK, user{1, "Jon Snow"}, " ") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationJSONCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, userJSONPretty, rec.Body.String()) - } - - // JSON (error) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.JSON(http.StatusOK, make(chan bool)) - assert.Error(t, err) - - // JSONP - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - callback := "callback" - err = c.JSONP(http.StatusOK, callback, user{1, "Jon Snow"}) - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationJavaScriptCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, callback+"("+userJSON+");", rec.Body.String()) - } - - // XML - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.XML(http.StatusOK, user{1, "Jon Snow"}) - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationXMLCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, xml.Header+userXML, rec.Body.String()) - } - - // XML with "?pretty" - req = httptest.NewRequest(GET, "/?pretty", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.XML(http.StatusOK, user{1, "Jon Snow"}) - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationXMLCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, xml.Header+userXMLPretty, rec.Body.String()) - } - req = httptest.NewRequest(GET, "/", nil) - - // XML (error) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.XML(http.StatusOK, make(chan bool)) - assert.Error(t, err) - - // XMLPretty - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.XMLPretty(http.StatusOK, user{1, "Jon Snow"}, " ") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMEApplicationXMLCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, xml.Header+userXMLPretty, rec.Body.String()) - } - - // String - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.String(http.StatusOK, "Hello, World!") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMETextPlainCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, "Hello, World!", rec.Body.String()) - } - - // HTML - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.HTML(http.StatusOK, "Hello, World!") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, MIMETextHTMLCharsetUTF8, rec.Header().Get(HeaderContentType)) - assert.Equal(t, "Hello, World!", rec.Body.String()) - } - - // Stream - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - r := strings.NewReader("response from a stream") - err = c.Stream(http.StatusOK, "application/octet-stream", r) - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "application/octet-stream", rec.Header().Get(HeaderContentType)) - assert.Equal(t, "response from a stream", rec.Body.String()) - } - - // Attachment - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.Attachment("_fixture/images/walle.png", "walle.png") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "attachment; filename=\"walle.png\"", rec.Header().Get(HeaderContentDisposition)) - assert.Equal(t, 219885, rec.Body.Len()) - } - - // Inline - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - err = c.Inline("_fixture/images/walle.png", "walle.png") - if assert.NoError(t, err) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "inline; filename=\"walle.png\"", rec.Header().Get(HeaderContentDisposition)) - assert.Equal(t, 219885, rec.Body.Len()) - } - - // NoContent - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - c.NoContent(http.StatusOK) - assert.Equal(t, http.StatusOK, rec.Code) - - // Error - rec = httptest.NewRecorder() - c = e.NewContext(req, rec).(*context) - c.Error(errors.New("error")) - assert.Equal(t, http.StatusInternalServerError, rec.Code) - - // Reset - c.SetParamNames("foo") - c.SetParamValues("bar") - c.Set("foe", "ban") - c.query = url.Values(map[string][]string{"fon": []string{"baz"}}) - c.Reset(req, httptest.NewRecorder()) - assert.Equal(t, 0, len(c.ParamValues())) - assert.Equal(t, 0, len(c.ParamNames())) - assert.Equal(t, 0, len(c.store)) - assert.Equal(t, "", c.Path()) - assert.Equal(t, 0, len(c.QueryParams())) -} - -func TestContextCookie(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - theme := "theme=light" - user := "user=Jon Snow" - req.Header.Add(HeaderCookie, theme) - req.Header.Add(HeaderCookie, user) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec).(*context) - - // Read single - cookie, err := c.Cookie("theme") - if assert.NoError(t, err) { - assert.Equal(t, "theme", cookie.Name) - assert.Equal(t, "light", cookie.Value) - } - - // Read multiple - for _, cookie := range c.Cookies() { - switch cookie.Name { - case "theme": - assert.Equal(t, "light", cookie.Value) - case "user": - assert.Equal(t, "Jon Snow", cookie.Value) - } - } - - // Write - cookie = &http.Cookie{ - Name: "SSID", - Value: "Ap4PGTEq", - Domain: "labstack.com", - Path: "/", - Expires: time.Now(), - Secure: true, - HttpOnly: true, - } - c.SetCookie(cookie) - assert.Contains(t, rec.Header().Get(HeaderSetCookie), "SSID") - assert.Contains(t, rec.Header().Get(HeaderSetCookie), "Ap4PGTEq") - assert.Contains(t, rec.Header().Get(HeaderSetCookie), "labstack.com") - assert.Contains(t, rec.Header().Get(HeaderSetCookie), "Secure") - assert.Contains(t, rec.Header().Get(HeaderSetCookie), "HttpOnly") -} - -func TestContextPath(t *testing.T) { - e := New() - r := e.Router() - - r.Add(GET, "/users/:id", nil) - c := e.NewContext(nil, nil) - r.Find(GET, "/users/1", c) - assert.Equal(t, "/users/:id", c.Path()) - - r.Add(GET, "/users/:uid/files/:fid", nil) - c = e.NewContext(nil, nil) - r.Find(GET, "/users/1/files/1", c) - assert.Equal(t, "/users/:uid/files/:fid", c.Path()) -} - -func TestContextPathParam(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - c := e.NewContext(req, nil) - - // ParamNames - c.SetParamNames("uid", "fid") - assert.EqualValues(t, []string{"uid", "fid"}, c.ParamNames()) - - // ParamValues - c.SetParamValues("101", "501") - assert.EqualValues(t, []string{"101", "501"}, c.ParamValues()) - - // Param - assert.Equal(t, "501", c.Param("fid")) -} - -func TestContextPathParamNamesAlais(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - c := e.NewContext(req, nil) - - c.SetParamNames("id,name") - c.SetParamValues("joe") - - assert.Equal(t, "joe", c.Param("id")) - assert.Equal(t, "joe", c.Param("name")) -} - -func TestContextFormValue(t *testing.T) { - f := make(url.Values) - f.Set("name", "Jon Snow") - f.Set("email", "jon@labstack.com") - - e := New() - req := httptest.NewRequest(POST, "/", strings.NewReader(f.Encode())) - req.Header.Add(HeaderContentType, MIMEApplicationForm) - c := e.NewContext(req, nil) - - // FormValue - assert.Equal(t, "Jon Snow", c.FormValue("name")) - assert.Equal(t, "jon@labstack.com", c.FormValue("email")) - - // FormParams - params, err := c.FormParams() - if assert.NoError(t, err) { - assert.Equal(t, url.Values{ - "name": []string{"Jon Snow"}, - "email": []string{"jon@labstack.com"}, - }, params) - } -} - -func TestContextQueryParam(t *testing.T) { - q := make(url.Values) - q.Set("name", "Jon Snow") - q.Set("email", "jon@labstack.com") - req := httptest.NewRequest(GET, "/?"+q.Encode(), nil) - e := New() - c := e.NewContext(req, nil) - - // QueryParam - assert.Equal(t, "Jon Snow", c.QueryParam("name")) - assert.Equal(t, "jon@labstack.com", c.QueryParam("email")) - - // QueryParams - assert.Equal(t, url.Values{ - "name": []string{"Jon Snow"}, - "email": []string{"jon@labstack.com"}, - }, c.QueryParams()) -} - -func TestContextFormFile(t *testing.T) { - e := New() - buf := new(bytes.Buffer) - mr := multipart.NewWriter(buf) - w, err := mr.CreateFormFile("file", "test") - if assert.NoError(t, err) { - w.Write([]byte("test")) - } - mr.Close() - req := httptest.NewRequest(POST, "/", buf) - req.Header.Set(HeaderContentType, mr.FormDataContentType()) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - f, err := c.FormFile("file") - if assert.NoError(t, err) { - assert.Equal(t, "test", f.Filename) - } -} - -func TestContextMultipartForm(t *testing.T) { - e := New() - buf := new(bytes.Buffer) - mw := multipart.NewWriter(buf) - mw.WriteField("name", "Jon Snow") - mw.Close() - req := httptest.NewRequest(POST, "/", buf) - req.Header.Set(HeaderContentType, mw.FormDataContentType()) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - f, err := c.MultipartForm() - if assert.NoError(t, err) { - assert.NotNil(t, f) - } -} - -func TestContextRedirect(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - assert.Equal(t, nil, c.Redirect(http.StatusMovedPermanently, "http://labstack.github.io/echo")) - assert.Equal(t, http.StatusMovedPermanently, rec.Code) - assert.Equal(t, "http://labstack.github.io/echo", rec.Header().Get(HeaderLocation)) - assert.Error(t, c.Redirect(310, "http://labstack.github.io/echo")) -} - -func TestContextStore(t *testing.T) { - var c Context - c = new(context) - c.Set("name", "Jon Snow") - assert.Equal(t, "Jon Snow", c.Get("name")) -} - -func TestContextHandler(t *testing.T) { - e := New() - r := e.Router() - b := new(bytes.Buffer) - - r.Add(GET, "/handler", func(Context) error { - _, err := b.Write([]byte("handler")) - return err - }) - c := e.NewContext(nil, nil) - r.Find(GET, "/handler", c) - c.Handler()(c) - assert.Equal(t, "handler", b.String()) -} diff --git a/vendor/github.com/labstack/echo/echo.go b/vendor/github.com/labstack/echo/echo.go deleted file mode 100644 index d6b3f51c3..000000000 --- a/vendor/github.com/labstack/echo/echo.go +++ /dev/null @@ -1,728 +0,0 @@ -/* -Package echo implements high performance, minimalist Go web framework. - -Example: - - package main - - import ( - "net/http" - - "github.com/labstack/echo" - "github.com/labstack/echo/middleware" - ) - - // Handler - func hello(c echo.Context) error { - return c.String(http.StatusOK, "Hello, World!") - } - - func main() { - // Echo instance - e := echo.New() - - // Middleware - e.Use(middleware.Logger()) - e.Use(middleware.Recover()) - - // Routes - e.GET("/", hello) - - // Start server - e.Logger.Fatal(e.Start(":1323")) - } - -Learn more at https://echo.labstack.com -*/ -package echo - -import ( - "bytes" - "crypto/tls" - "errors" - "fmt" - "io" - stdLog "log" - "net" - "net/http" - "path" - "path/filepath" - "reflect" - "runtime" - "sync" - "time" - - "github.com/labstack/gommon/color" - "github.com/labstack/gommon/log" - "golang.org/x/crypto/acme/autocert" -) - -type ( - // Echo is the top-level framework instance. - Echo struct { - stdLogger *stdLog.Logger - colorer *color.Color - premiddleware []MiddlewareFunc - middleware []MiddlewareFunc - maxParam *int - router *Router - notFoundHandler HandlerFunc - pool sync.Pool - Server *http.Server - TLSServer *http.Server - Listener net.Listener - TLSListener net.Listener - AutoTLSManager autocert.Manager - DisableHTTP2 bool - Debug bool - HideBanner bool - HTTPErrorHandler HTTPErrorHandler - Binder Binder - Validator Validator - Renderer Renderer - // Mutex sync.RWMutex - Logger Logger - } - - // Route contains a handler and information for matching against requests. - Route struct { - Method string `json:"method"` - Path string `json:"path"` - Name string `json:"name"` - } - - // HTTPError represents an error that occurred while handling a request. - HTTPError struct { - Code int - Message interface{} - } - - // MiddlewareFunc defines a function to process middleware. - MiddlewareFunc func(HandlerFunc) HandlerFunc - - // HandlerFunc defines a function to server HTTP requests. - HandlerFunc func(Context) error - - // HTTPErrorHandler is a centralized HTTP error handler. - HTTPErrorHandler func(error, Context) - - // Validator is the interface that wraps the Validate function. - Validator interface { - Validate(i interface{}) error - } - - // Renderer is the interface that wraps the Render function. - Renderer interface { - Render(io.Writer, string, interface{}, Context) error - } - - // Map defines a generic map of type `map[string]interface{}`. - Map map[string]interface{} - - // i is the interface for Echo and Group. - i interface { - GET(string, HandlerFunc, ...MiddlewareFunc) *Route - } -) - -// HTTP methods -const ( - CONNECT = "CONNECT" - DELETE = "DELETE" - GET = "GET" - HEAD = "HEAD" - OPTIONS = "OPTIONS" - PATCH = "PATCH" - POST = "POST" - PUT = "PUT" - TRACE = "TRACE" -) - -// MIME types -const ( - MIMEApplicationJSON = "application/json" - MIMEApplicationJSONCharsetUTF8 = MIMEApplicationJSON + "; " + charsetUTF8 - MIMEApplicationJavaScript = "application/javascript" - MIMEApplicationJavaScriptCharsetUTF8 = MIMEApplicationJavaScript + "; " + charsetUTF8 - MIMEApplicationXML = "application/xml" - MIMEApplicationXMLCharsetUTF8 = MIMEApplicationXML + "; " + charsetUTF8 - MIMETextXML = "text/xml" - MIMETextXMLCharsetUTF8 = MIMETextXML + "; " + charsetUTF8 - MIMEApplicationForm = "application/x-www-form-urlencoded" - MIMEApplicationProtobuf = "application/protobuf" - MIMEApplicationMsgpack = "application/msgpack" - MIMETextHTML = "text/html" - MIMETextHTMLCharsetUTF8 = MIMETextHTML + "; " + charsetUTF8 - MIMETextPlain = "text/plain" - MIMETextPlainCharsetUTF8 = MIMETextPlain + "; " + charsetUTF8 - MIMEMultipartForm = "multipart/form-data" - MIMEOctetStream = "application/octet-stream" -) - -const ( - charsetUTF8 = "charset=UTF-8" -) - -// Headers -const ( - HeaderAccept = "Accept" - HeaderAcceptEncoding = "Accept-Encoding" - HeaderAllow = "Allow" - HeaderAuthorization = "Authorization" - HeaderContentDisposition = "Content-Disposition" - HeaderContentEncoding = "Content-Encoding" - HeaderContentLength = "Content-Length" - HeaderContentType = "Content-Type" - HeaderCookie = "Cookie" - HeaderSetCookie = "Set-Cookie" - HeaderIfModifiedSince = "If-Modified-Since" - HeaderLastModified = "Last-Modified" - HeaderLocation = "Location" - HeaderUpgrade = "Upgrade" - HeaderVary = "Vary" - HeaderWWWAuthenticate = "WWW-Authenticate" - HeaderXForwardedFor = "X-Forwarded-For" - HeaderXForwardedProto = "X-Forwarded-Proto" - HeaderXForwardedProtocol = "X-Forwarded-Protocol" - HeaderXForwardedSsl = "X-Forwarded-Ssl" - HeaderXUrlScheme = "X-Url-Scheme" - HeaderXHTTPMethodOverride = "X-HTTP-Method-Override" - HeaderXRealIP = "X-Real-IP" - HeaderXRequestID = "X-Request-ID" - HeaderServer = "Server" - HeaderOrigin = "Origin" - - // Access control - HeaderAccessControlRequestMethod = "Access-Control-Request-Method" - HeaderAccessControlRequestHeaders = "Access-Control-Request-Headers" - HeaderAccessControlAllowOrigin = "Access-Control-Allow-Origin" - HeaderAccessControlAllowMethods = "Access-Control-Allow-Methods" - HeaderAccessControlAllowHeaders = "Access-Control-Allow-Headers" - HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials" - HeaderAccessControlExposeHeaders = "Access-Control-Expose-Headers" - HeaderAccessControlMaxAge = "Access-Control-Max-Age" - - // Security - HeaderStrictTransportSecurity = "Strict-Transport-Security" - HeaderXContentTypeOptions = "X-Content-Type-Options" - HeaderXXSSProtection = "X-XSS-Protection" - HeaderXFrameOptions = "X-Frame-Options" - HeaderContentSecurityPolicy = "Content-Security-Policy" - HeaderXCSRFToken = "X-CSRF-Token" -) - -const ( - version = "3.2.1" - website = "https://echo.labstack.com" - // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo - banner = ` - ____ __ - / __/___/ / ___ - / _// __/ _ \/ _ \ -/___/\__/_//_/\___/ %s -High performance, minimalist Go web framework -%s -____________________________________O/_______ - O\ -` -) - -var ( - methods = [...]string{ - CONNECT, - DELETE, - GET, - HEAD, - OPTIONS, - PATCH, - POST, - PUT, - TRACE, - } -) - -// Errors -var ( - ErrUnsupportedMediaType = NewHTTPError(http.StatusUnsupportedMediaType) - ErrNotFound = NewHTTPError(http.StatusNotFound) - ErrUnauthorized = NewHTTPError(http.StatusUnauthorized) - ErrForbidden = NewHTTPError(http.StatusForbidden) - ErrMethodNotAllowed = NewHTTPError(http.StatusMethodNotAllowed) - ErrStatusRequestEntityTooLarge = NewHTTPError(http.StatusRequestEntityTooLarge) - ErrValidatorNotRegistered = errors.New("Validator not registered") - ErrRendererNotRegistered = errors.New("Renderer not registered") - ErrInvalidRedirectCode = errors.New("Invalid redirect status code") - ErrCookieNotFound = errors.New("Cookie not found") -) - -// Error handlers -var ( - NotFoundHandler = func(c Context) error { - return ErrNotFound - } - - MethodNotAllowedHandler = func(c Context) error { - return ErrMethodNotAllowed - } -) - -// New creates an instance of Echo. -func New() (e *Echo) { - e = &Echo{ - Server: new(http.Server), - TLSServer: new(http.Server), - AutoTLSManager: autocert.Manager{ - Prompt: autocert.AcceptTOS, - }, - Logger: log.New("echo"), - colorer: color.New(), - maxParam: new(int), - } - e.Server.Handler = e - e.TLSServer.Handler = e - e.HTTPErrorHandler = e.DefaultHTTPErrorHandler - e.Binder = &DefaultBinder{} - e.Logger.SetLevel(log.ERROR) - e.stdLogger = stdLog.New(e.Logger.Output(), e.Logger.Prefix()+": ", 0) - e.pool.New = func() interface{} { - return e.NewContext(nil, nil) - } - e.router = NewRouter(e) - return -} - -// NewContext returns a Context instance. -func (e *Echo) NewContext(r *http.Request, w http.ResponseWriter) Context { - return &context{ - request: r, - response: NewResponse(w, e), - store: make(Map), - echo: e, - pvalues: make([]string, *e.maxParam), - handler: NotFoundHandler, - } -} - -// Router returns router. -func (e *Echo) Router() *Router { - return e.router -} - -// DefaultHTTPErrorHandler is the default HTTP error handler. It sends a JSON response -// with status code. -func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) { - var ( - code = http.StatusInternalServerError - msg interface{} - ) - - if he, ok := err.(*HTTPError); ok { - code = he.Code - msg = he.Message - } else if e.Debug { - msg = err.Error() - } else { - msg = http.StatusText(code) - } - if _, ok := msg.(string); ok { - msg = Map{"message": msg} - } - - if !c.Response().Committed { - if c.Request().Method == HEAD { // Issue #608 - if err := c.NoContent(code); err != nil { - goto ERROR - } - } else { - if err := c.JSON(code, msg); err != nil { - goto ERROR - } - } - } -ERROR: - e.Logger.Error(err) -} - -// Pre adds middleware to the chain which is run before router. -func (e *Echo) Pre(middleware ...MiddlewareFunc) { - e.premiddleware = append(e.premiddleware, middleware...) -} - -// Use adds middleware to the chain which is run after router. -func (e *Echo) Use(middleware ...MiddlewareFunc) { - e.middleware = append(e.middleware, middleware...) -} - -// CONNECT registers a new CONNECT route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) CONNECT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(CONNECT, path, h, m...) -} - -// DELETE registers a new DELETE route for a path with matching handler in the router -// with optional route-level middleware. -func (e *Echo) DELETE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(DELETE, path, h, m...) -} - -// GET registers a new GET route for a path with matching handler in the router -// with optional route-level middleware. -func (e *Echo) GET(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(GET, path, h, m...) -} - -// HEAD registers a new HEAD route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) HEAD(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(HEAD, path, h, m...) -} - -// OPTIONS registers a new OPTIONS route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) OPTIONS(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(OPTIONS, path, h, m...) -} - -// PATCH registers a new PATCH route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) PATCH(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(PATCH, path, h, m...) -} - -// POST registers a new POST route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) POST(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(POST, path, h, m...) -} - -// PUT registers a new PUT route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) PUT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(PUT, path, h, m...) -} - -// TRACE registers a new TRACE route for a path with matching handler in the -// router with optional route-level middleware. -func (e *Echo) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return e.Add(TRACE, path, h, m...) -} - -// Any registers a new route for all HTTP methods and path with matching handler -// in the router with optional route-level middleware. -func (e *Echo) Any(path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route { - routes := make([]*Route, 0) - for _, m := range methods { - routes = append(routes, e.Add(m, path, handler, middleware...)) - } - return routes -} - -// Match registers a new route for multiple HTTP methods and path with matching -// handler in the router with optional route-level middleware. -func (e *Echo) Match(methods []string, path string, handler HandlerFunc, middleware ...MiddlewareFunc) []*Route { - routes := make([]*Route, 0) - for _, m := range methods { - routes = append(routes, e.Add(m, path, handler, middleware...)) - } - return routes -} - -// Static registers a new route with path prefix to serve static files from the -// provided root directory. -func (e *Echo) Static(prefix, root string) *Route { - if root == "" { - root = "." // For security we want to restrict to CWD. - } - return static(e, prefix, root) -} - -func static(i i, prefix, root string) *Route { - h := func(c Context) error { - p, err := PathUnescape(c.Param("*")) - if err != nil { - return err - } - name := filepath.Join(root, path.Clean("/"+p)) // "/"+ for security - return c.File(name) - } - i.GET(prefix, h) - if prefix == "/" { - return i.GET(prefix+"*", h) - } - - return i.GET(prefix+"/*", h) -} - -// File registers a new route with path to serve a static file. -func (e *Echo) File(path, file string) *Route { - return e.GET(path, func(c Context) error { - return c.File(file) - }) -} - -// Add registers a new route for an HTTP method and path with matching handler -// in the router with optional route-level middleware. -func (e *Echo) Add(method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route { - name := handlerName(handler) - e.router.Add(method, path, func(c Context) error { - h := handler - // Chain middleware - for i := len(middleware) - 1; i >= 0; i-- { - h = middleware[i](h) - } - return h(c) - }) - r := &Route{ - Method: method, - Path: path, - Name: name, - } - e.router.routes[method+path] = r - return r -} - -// Group creates a new router group with prefix and optional group-level middleware. -func (e *Echo) Group(prefix string, m ...MiddlewareFunc) (g *Group) { - g = &Group{prefix: prefix, echo: e} - g.Use(m...) - return -} - -// URI generates a URI from handler. -func (e *Echo) URI(handler HandlerFunc, params ...interface{}) string { - name := handlerName(handler) - return e.Reverse(name, params...) -} - -// URL is an alias for `URI` function. -func (e *Echo) URL(h HandlerFunc, params ...interface{}) string { - return e.URI(h, params...) -} - -// Reverse generates an URL from route name and provided parameters. -func (e *Echo) Reverse(name string, params ...interface{}) string { - uri := new(bytes.Buffer) - ln := len(params) - n := 0 - for _, r := range e.router.routes { - if r.Name == name { - for i, l := 0, len(r.Path); i < l; i++ { - if r.Path[i] == ':' && n < ln { - for ; i < l && r.Path[i] != '/'; i++ { - } - uri.WriteString(fmt.Sprintf("%v", params[n])) - n++ - } - if i < l { - uri.WriteByte(r.Path[i]) - } - } - break - } - } - return uri.String() -} - -// Routes returns the registered routes. -func (e *Echo) Routes() []*Route { - routes := []*Route{} - for _, v := range e.router.routes { - routes = append(routes, v) - } - return routes -} - -// AcquireContext returns an empty `Context` instance from the pool. -// You must return the context by calling `ReleaseContext()`. -func (e *Echo) AcquireContext() Context { - return e.pool.Get().(Context) -} - -// ReleaseContext returns the `Context` instance back to the pool. -// You must call it after `AcquireContext()`. -func (e *Echo) ReleaseContext(c Context) { - e.pool.Put(c) -} - -// ServeHTTP implements `http.Handler` interface, which serves HTTP requests. -func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) { - // Acquire lock - // e.Mutex.RLock() - // defer e.Mutex.RUnlock() - - // Acquire context - c := e.pool.Get().(*context) - defer e.pool.Put(c) - c.Reset(r, w) - - // Middleware - h := func(c Context) error { - method := r.Method - path := r.URL.RawPath - if path == "" { - path = r.URL.Path - } - e.router.Find(method, path, c) - h := c.Handler() - for i := len(e.middleware) - 1; i >= 0; i-- { - h = e.middleware[i](h) - } - return h(c) - } - - // Premiddleware - for i := len(e.premiddleware) - 1; i >= 0; i-- { - h = e.premiddleware[i](h) - } - - // Execute chain - if err := h(c); err != nil { - e.HTTPErrorHandler(err, c) - } -} - -// Start starts an HTTP server. -func (e *Echo) Start(address string) error { - e.Server.Addr = address - return e.StartServer(e.Server) -} - -// StartTLS starts an HTTPS server. -func (e *Echo) StartTLS(address string, certFile, keyFile string) (err error) { - if certFile == "" || keyFile == "" { - return errors.New("invalid tls configuration") - } - s := e.TLSServer - s.TLSConfig = new(tls.Config) - s.TLSConfig.Certificates = make([]tls.Certificate, 1) - s.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(certFile, keyFile) - if err != nil { - return - } - return e.startTLS(address) -} - -// StartAutoTLS starts an HTTPS server using certificates automatically installed from https://letsencrypt.org. -func (e *Echo) StartAutoTLS(address string) error { - s := e.TLSServer - s.TLSConfig = new(tls.Config) - s.TLSConfig.GetCertificate = e.AutoTLSManager.GetCertificate - return e.startTLS(address) -} - -func (e *Echo) startTLS(address string) error { - s := e.TLSServer - s.Addr = address - if !e.DisableHTTP2 { - s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, "h2") - } - return e.StartServer(e.TLSServer) -} - -// StartServer starts a custom http server. -func (e *Echo) StartServer(s *http.Server) (err error) { - // Setup - e.colorer.SetOutput(e.Logger.Output()) - s.ErrorLog = e.stdLogger - s.Handler = e - if e.Debug { - e.Logger.SetLevel(log.DEBUG) - } - - if !e.HideBanner { - e.colorer.Printf(banner, e.colorer.Red("v"+version), e.colorer.Blue(website)) - } - - if s.TLSConfig == nil { - if e.Listener == nil { - e.Listener, err = newListener(s.Addr) - if err != nil { - return err - } - } - if !e.HideBanner { - e.colorer.Printf("⇨ http server started on %s\n", e.colorer.Green(e.Listener.Addr())) - } - return s.Serve(e.Listener) - } - if e.TLSListener == nil { - l, err := newListener(s.Addr) - if err != nil { - return err - } - e.TLSListener = tls.NewListener(l, s.TLSConfig) - } - if !e.HideBanner { - e.colorer.Printf("⇨ https server started on %s\n", e.colorer.Green(e.TLSListener.Addr())) - } - return s.Serve(e.TLSListener) -} - -// NewHTTPError creates a new HTTPError instance. -func NewHTTPError(code int, message ...interface{}) *HTTPError { - he := &HTTPError{Code: code, Message: http.StatusText(code)} - if len(message) > 0 { - he.Message = message[0] - } - return he -} - -// Error makes it compatible with `error` interface. -func (he *HTTPError) Error() string { - return fmt.Sprintf("code=%d, message=%v", he.Code, he.Message) -} - -// WrapHandler wraps `http.Handler` into `echo.HandlerFunc`. -func WrapHandler(h http.Handler) HandlerFunc { - return func(c Context) error { - h.ServeHTTP(c.Response(), c.Request()) - return nil - } -} - -// WrapMiddleware wraps `func(http.Handler) http.Handler` into `echo.MiddlewareFunc` -func WrapMiddleware(m func(http.Handler) http.Handler) MiddlewareFunc { - return func(next HandlerFunc) HandlerFunc { - return func(c Context) (err error) { - m(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - c.SetRequest(r) - err = next(c) - })).ServeHTTP(c.Response(), c.Request()) - return - } - } -} - -func handlerName(h HandlerFunc) string { - t := reflect.ValueOf(h).Type() - if t.Kind() == reflect.Func { - return runtime.FuncForPC(reflect.ValueOf(h).Pointer()).Name() - } - return t.String() -} - -// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted -// connections. It's used by ListenAndServe and ListenAndServeTLS so -// dead TCP connections (e.g. closing laptop mid-download) eventually -// go away. -type tcpKeepAliveListener struct { - *net.TCPListener -} - -func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) { - tc, err := ln.AcceptTCP() - if err != nil { - return - } - tc.SetKeepAlive(true) - tc.SetKeepAlivePeriod(3 * time.Minute) - return tc, nil -} - -func newListener(address string) (*tcpKeepAliveListener, error) { - l, err := net.Listen("tcp", address) - if err != nil { - return nil, err - } - return &tcpKeepAliveListener{l.(*net.TCPListener)}, nil -} diff --git a/vendor/github.com/labstack/echo/echo_go1.8.go b/vendor/github.com/labstack/echo/echo_go1.8.go deleted file mode 100644 index 340bed705..000000000 --- a/vendor/github.com/labstack/echo/echo_go1.8.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build go1.8 - -package echo - -import ( - stdContext "context" -) - -// Close immediately stops the server. -// It internally calls `http.Server#Close()`. -func (e *Echo) Close() error { - if err := e.TLSServer.Close(); err != nil { - return err - } - return e.Server.Close() -} - -// Shutdown stops server the gracefully. -// It internally calls `http.Server#Shutdown()`. -func (e *Echo) Shutdown(ctx stdContext.Context) error { - if err := e.TLSServer.Shutdown(ctx); err != nil { - return err - } - return e.Server.Shutdown(ctx) -} diff --git a/vendor/github.com/labstack/echo/echo_go1.8_test.go b/vendor/github.com/labstack/echo/echo_go1.8_test.go deleted file mode 100644 index 1191c6438..000000000 --- a/vendor/github.com/labstack/echo/echo_go1.8_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// +build go1.8 - -package echo - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func TestEchoClose(t *testing.T) { - e := New() - errCh := make(chan error) - - go func() { - errCh <- e.Start(":0") - }() - - time.Sleep(200 * time.Millisecond) - - if err := e.Close(); err != nil { - t.Fatal(err) - } - - assert.NoError(t, e.Close()) - - err := <-errCh - assert.Equal(t, err.Error(), "http: Server closed") -} diff --git a/vendor/github.com/labstack/echo/echo_test.go b/vendor/github.com/labstack/echo/echo_test.go deleted file mode 100644 index a84d310d7..000000000 --- a/vendor/github.com/labstack/echo/echo_test.go +++ /dev/null @@ -1,443 +0,0 @@ -package echo - -import ( - "bytes" - "net/http" - "net/http/httptest" - "testing" - - "reflect" - "strings" - - "errors" - - "time" - - "github.com/stretchr/testify/assert" -) - -type ( - user struct { - ID int `json:"id" xml:"id" form:"id" query:"id"` - Name string `json:"name" xml:"name" form:"name" query:"name"` - } -) - -const ( - userJSON = `{"id":1,"name":"Jon Snow"}` - userXML = `1Jon Snow` - userForm = `id=1&name=Jon Snow` - invalidContent = "invalid content" -) - -const userJSONPretty = `{ - "id": 1, - "name": "Jon Snow" -}` - -const userXMLPretty = ` - 1 - Jon Snow -` - -func TestEcho(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - - // Router - assert.NotNil(t, e.Router()) - - // DefaultHTTPErrorHandler - e.DefaultHTTPErrorHandler(errors.New("error"), c) - assert.Equal(t, http.StatusInternalServerError, rec.Code) -} - -func TestEchoStatic(t *testing.T) { - e := New() - - // OK - e.Static("/images", "_fixture/images") - c, b := request(GET, "/images/walle.png", e) - assert.Equal(t, http.StatusOK, c) - assert.NotEmpty(t, b) - - // No file - e.Static("/images", "_fixture/scripts") - c, _ = request(GET, "/images/bolt.png", e) - assert.Equal(t, http.StatusNotFound, c) - - // Directory - e.Static("/images", "_fixture/images") - c, _ = request(GET, "/images", e) - assert.Equal(t, http.StatusNotFound, c) - - // Directory with index.html - e.Static("/", "_fixture") - c, r := request(GET, "/", e) - assert.Equal(t, http.StatusOK, c) - assert.Equal(t, true, strings.HasPrefix(r, "")) - - // Sub-directory with index.html - c, r = request(GET, "/folder", e) - assert.Equal(t, http.StatusOK, c) - assert.Equal(t, true, strings.HasPrefix(r, "")) -} - -func TestEchoFile(t *testing.T) { - e := New() - e.File("/walle", "_fixture/images/walle.png") - c, b := request(GET, "/walle", e) - assert.Equal(t, http.StatusOK, c) - assert.NotEmpty(t, b) -} - -func TestEchoMiddleware(t *testing.T) { - e := New() - buf := new(bytes.Buffer) - - e.Pre(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - assert.Empty(t, c.Path()) - buf.WriteString("-1") - return next(c) - } - }) - - e.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("1") - return next(c) - } - }) - - e.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("2") - return next(c) - } - }) - - e.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("3") - return next(c) - } - }) - - // Route - e.GET("/", func(c Context) error { - return c.String(http.StatusOK, "OK") - }) - - c, b := request(GET, "/", e) - assert.Equal(t, "-1123", buf.String()) - assert.Equal(t, http.StatusOK, c) - assert.Equal(t, "OK", b) -} - -func TestEchoMiddlewareError(t *testing.T) { - e := New() - e.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - return errors.New("error") - } - }) - e.GET("/", NotFoundHandler) - c, _ := request(GET, "/", e) - assert.Equal(t, http.StatusInternalServerError, c) -} - -func TestEchoHandler(t *testing.T) { - e := New() - - // HandlerFunc - e.GET("/ok", func(c Context) error { - return c.String(http.StatusOK, "OK") - }) - - c, b := request(GET, "/ok", e) - assert.Equal(t, http.StatusOK, c) - assert.Equal(t, "OK", b) -} - -func TestEchoWrapHandler(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := WrapHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - w.Write([]byte("test")) - })) - if assert.NoError(t, h(c)) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "test", rec.Body.String()) - } -} - -func TestEchoWrapMiddleware(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - buf := new(bytes.Buffer) - mw := WrapMiddleware(func(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - buf.Write([]byte("mw")) - h.ServeHTTP(w, r) - }) - }) - h := mw(func(c Context) error { - return c.String(http.StatusOK, "OK") - }) - if assert.NoError(t, h(c)) { - assert.Equal(t, "mw", buf.String()) - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "OK", rec.Body.String()) - } -} - -func TestEchoConnect(t *testing.T) { - e := New() - testMethod(t, CONNECT, "/", e) -} - -func TestEchoDelete(t *testing.T) { - e := New() - testMethod(t, DELETE, "/", e) -} - -func TestEchoGet(t *testing.T) { - e := New() - testMethod(t, GET, "/", e) -} - -func TestEchoHead(t *testing.T) { - e := New() - testMethod(t, HEAD, "/", e) -} - -func TestEchoOptions(t *testing.T) { - e := New() - testMethod(t, OPTIONS, "/", e) -} - -func TestEchoPatch(t *testing.T) { - e := New() - testMethod(t, PATCH, "/", e) -} - -func TestEchoPost(t *testing.T) { - e := New() - testMethod(t, POST, "/", e) -} - -func TestEchoPut(t *testing.T) { - e := New() - testMethod(t, PUT, "/", e) -} - -func TestEchoTrace(t *testing.T) { - e := New() - testMethod(t, TRACE, "/", e) -} - -func TestEchoAny(t *testing.T) { // JFC - e := New() - e.Any("/", func(c Context) error { - return c.String(http.StatusOK, "Any") - }) -} - -func TestEchoMatch(t *testing.T) { // JFC - e := New() - e.Match([]string{GET, POST}, "/", func(c Context) error { - return c.String(http.StatusOK, "Match") - }) -} - -func TestEchoURL(t *testing.T) { - e := New() - static := func(Context) error { return nil } - getUser := func(Context) error { return nil } - getFile := func(Context) error { return nil } - - e.GET("/static/file", static) - e.GET("/users/:id", getUser) - g := e.Group("/group") - g.GET("/users/:uid/files/:fid", getFile) - - assert.Equal(t, "/static/file", e.URL(static)) - assert.Equal(t, "/users/:id", e.URL(getUser)) - assert.Equal(t, "/users/1", e.URL(getUser, "1")) - assert.Equal(t, "/group/users/1/files/:fid", e.URL(getFile, "1")) - assert.Equal(t, "/group/users/1/files/1", e.URL(getFile, "1", "1")) -} - -func TestEchoRoutes(t *testing.T) { - e := New() - routes := []*Route{ - {GET, "/users/:user/events", ""}, - {GET, "/users/:user/events/public", ""}, - {POST, "/repos/:owner/:repo/git/refs", ""}, - {POST, "/repos/:owner/:repo/git/tags", ""}, - } - for _, r := range routes { - e.Add(r.Method, r.Path, func(c Context) error { - return c.String(http.StatusOK, "OK") - }) - } - - if assert.Equal(t, len(routes), len(e.Routes())) { - for _, r := range e.Routes() { - found := false - for _, rr := range routes { - if r.Method == rr.Method && r.Path == rr.Path { - found = true - break - } - } - if !found { - t.Errorf("Route %s %s not found", r.Method, r.Path) - } - } - } -} - -func TestEchoEncodedPath(t *testing.T) { - e := New() - e.GET("/:id", func(c Context) error { - return c.NoContent(http.StatusOK) - }) - req := httptest.NewRequest(GET, "/with%2Fslash", nil) - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - assert.Equal(t, http.StatusOK, rec.Code) -} - -func TestEchoGroup(t *testing.T) { - e := New() - buf := new(bytes.Buffer) - e.Use(MiddlewareFunc(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("0") - return next(c) - } - })) - h := func(c Context) error { - return c.NoContent(http.StatusOK) - } - - //-------- - // Routes - //-------- - - e.GET("/users", h) - - // Group - g1 := e.Group("/group1") - g1.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("1") - return next(c) - } - }) - g1.GET("", h) - - // Nested groups with middleware - g2 := e.Group("/group2") - g2.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("2") - return next(c) - } - }) - g3 := g2.Group("/group3") - g3.Use(func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - buf.WriteString("3") - return next(c) - } - }) - g3.GET("", h) - - request(GET, "/users", e) - assert.Equal(t, "0", buf.String()) - - buf.Reset() - request(GET, "/group1", e) - assert.Equal(t, "01", buf.String()) - - buf.Reset() - request(GET, "/group2/group3", e) - assert.Equal(t, "023", buf.String()) -} - -func TestEchoNotFound(t *testing.T) { - e := New() - req := httptest.NewRequest(GET, "/files", nil) - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - assert.Equal(t, http.StatusNotFound, rec.Code) -} - -func TestEchoMethodNotAllowed(t *testing.T) { - e := New() - e.GET("/", func(c Context) error { - return c.String(http.StatusOK, "Echo!") - }) - req := httptest.NewRequest(POST, "/", nil) - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - assert.Equal(t, http.StatusMethodNotAllowed, rec.Code) -} - -func TestEchoContext(t *testing.T) { - e := New() - c := e.AcquireContext() - assert.IsType(t, new(context), c) - e.ReleaseContext(c) -} - -func TestEchoStart(t *testing.T) { - e := New() - go func() { - assert.NoError(t, e.Start(":0")) - }() - time.Sleep(200 * time.Millisecond) -} - -func TestEchoStartTLS(t *testing.T) { - e := New() - go func() { - assert.NoError(t, e.StartTLS(":0", "_fixture/certs/cert.pem", "_fixture/certs/key.pem")) - }() - time.Sleep(200 * time.Millisecond) -} - -func testMethod(t *testing.T, method, path string, e *Echo) { - p := reflect.ValueOf(path) - h := reflect.ValueOf(func(c Context) error { - return c.String(http.StatusOK, method) - }) - i := interface{}(e) - reflect.ValueOf(i).MethodByName(method).Call([]reflect.Value{p, h}) - _, body := request(method, path, e) - assert.Equal(t, method, body) -} - -func request(method, path string, e *Echo) (int, string) { - req := httptest.NewRequest(method, path, nil) - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - return rec.Code, rec.Body.String() -} - -func TestHTTPError(t *testing.T) { - err := NewHTTPError(400, map[string]interface{}{ - "code": 12, - }) - assert.Equal(t, "code=400, message=map[code:12]", err.Error()) -} diff --git a/vendor/github.com/labstack/echo/group.go b/vendor/github.com/labstack/echo/group.go deleted file mode 100644 index 6ae323722..000000000 --- a/vendor/github.com/labstack/echo/group.go +++ /dev/null @@ -1,114 +0,0 @@ -package echo - -import ( - "path" -) - -type ( - // Group is a set of sub-routes for a specified route. It can be used for inner - // routes that share a common middleware or functionality that should be separate - // from the parent echo instance while still inheriting from it. - Group struct { - prefix string - middleware []MiddlewareFunc - echo *Echo - } -) - -// Use implements `Echo#Use()` for sub-routes within the Group. -func (g *Group) Use(middleware ...MiddlewareFunc) { - g.middleware = append(g.middleware, middleware...) - // Allow all requests to reach the group as they might get dropped if router - // doesn't find a match, making none of the group middleware process. - g.echo.Any(path.Clean(g.prefix+"/*"), func(c Context) error { - return NotFoundHandler(c) - }, g.middleware...) -} - -// CONNECT implements `Echo#CONNECT()` for sub-routes within the Group. -func (g *Group) CONNECT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(CONNECT, path, h, m...) -} - -// DELETE implements `Echo#DELETE()` for sub-routes within the Group. -func (g *Group) DELETE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(DELETE, path, h, m...) -} - -// GET implements `Echo#GET()` for sub-routes within the Group. -func (g *Group) GET(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(GET, path, h, m...) -} - -// HEAD implements `Echo#HEAD()` for sub-routes within the Group. -func (g *Group) HEAD(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(HEAD, path, h, m...) -} - -// OPTIONS implements `Echo#OPTIONS()` for sub-routes within the Group. -func (g *Group) OPTIONS(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(OPTIONS, path, h, m...) -} - -// PATCH implements `Echo#PATCH()` for sub-routes within the Group. -func (g *Group) PATCH(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(PATCH, path, h, m...) -} - -// POST implements `Echo#POST()` for sub-routes within the Group. -func (g *Group) POST(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(POST, path, h, m...) -} - -// PUT implements `Echo#PUT()` for sub-routes within the Group. -func (g *Group) PUT(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(PUT, path, h, m...) -} - -// TRACE implements `Echo#TRACE()` for sub-routes within the Group. -func (g *Group) TRACE(path string, h HandlerFunc, m ...MiddlewareFunc) *Route { - return g.Add(TRACE, path, h, m...) -} - -// Any implements `Echo#Any()` for sub-routes within the Group. -func (g *Group) Any(path string, handler HandlerFunc, middleware ...MiddlewareFunc) { - for _, m := range methods { - g.Add(m, path, handler, middleware...) - } -} - -// Match implements `Echo#Match()` for sub-routes within the Group. -func (g *Group) Match(methods []string, path string, handler HandlerFunc, middleware ...MiddlewareFunc) { - for _, m := range methods { - g.Add(m, path, handler, middleware...) - } -} - -// Group creates a new sub-group with prefix and optional sub-group-level middleware. -func (g *Group) Group(prefix string, middleware ...MiddlewareFunc) *Group { - m := []MiddlewareFunc{} - m = append(m, g.middleware...) - m = append(m, middleware...) - return g.echo.Group(g.prefix+prefix, m...) -} - -// Static implements `Echo#Static()` for sub-routes within the Group. -func (g *Group) Static(prefix, root string) { - static(g, prefix, root) -} - -// File implements `Echo#File()` for sub-routes within the Group. -func (g *Group) File(path, file string) { - g.echo.File(g.prefix+path, file) -} - -// Add implements `Echo#Add()` for sub-routes within the Group. -func (g *Group) Add(method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route { - // Combine into a new slice to avoid accidentally passing the same slice for - // multiple routes, which would lead to later add() calls overwriting the - // middleware from earlier calls. - m := []MiddlewareFunc{} - m = append(m, g.middleware...) - m = append(m, middleware...) - return g.echo.Add(method, g.prefix+path, handler, m...) -} diff --git a/vendor/github.com/labstack/echo/group_test.go b/vendor/github.com/labstack/echo/group_test.go deleted file mode 100644 index ea53db3af..000000000 --- a/vendor/github.com/labstack/echo/group_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package echo - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -// TODO: Fix me -func TestGroup(t *testing.T) { - g := New().Group("/group") - h := func(Context) error { return nil } - g.CONNECT("/", h) - g.DELETE("/", h) - g.GET("/", h) - g.HEAD("/", h) - g.OPTIONS("/", h) - g.PATCH("/", h) - g.POST("/", h) - g.PUT("/", h) - g.TRACE("/", h) - g.Any("/", h) - g.Match([]string{GET, POST}, "/", h) - g.Static("/static", "/tmp") - g.File("/walle", "_fixture/images//walle.png") -} - -func TestGroupRouteMiddleware(t *testing.T) { - // Ensure middleware slices are not re-used - e := New() - g := e.Group("/group") - h := func(Context) error { return nil } - m1 := func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - return next(c) - } - } - m2 := func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - return next(c) - } - } - m3 := func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - return next(c) - } - } - m4 := func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - return c.NoContent(404) - } - } - m5 := func(next HandlerFunc) HandlerFunc { - return func(c Context) error { - return c.NoContent(405) - } - } - g.Use(m1, m2, m3) - g.GET("/404", h, m4) - g.GET("/405", h, m5) - - c, _ := request(GET, "/group/404", e) - assert.Equal(t, 404, c) - c, _ = request(GET, "/group/405", e) - assert.Equal(t, 405, c) -} diff --git a/vendor/github.com/labstack/echo/log.go b/vendor/github.com/labstack/echo/log.go deleted file mode 100644 index b194c39c4..000000000 --- a/vendor/github.com/labstack/echo/log.go +++ /dev/null @@ -1,40 +0,0 @@ -package echo - -import ( - "io" - - "github.com/labstack/gommon/log" -) - -type ( - // Logger defines the logging interface. - Logger interface { - Output() io.Writer - SetOutput(w io.Writer) - Prefix() string - SetPrefix(p string) - Level() log.Lvl - SetLevel(v log.Lvl) - Print(i ...interface{}) - Printf(format string, args ...interface{}) - Printj(j log.JSON) - Debug(i ...interface{}) - Debugf(format string, args ...interface{}) - Debugj(j log.JSON) - Info(i ...interface{}) - Infof(format string, args ...interface{}) - Infoj(j log.JSON) - Warn(i ...interface{}) - Warnf(format string, args ...interface{}) - Warnj(j log.JSON) - Error(i ...interface{}) - Errorf(format string, args ...interface{}) - Errorj(j log.JSON) - Fatal(i ...interface{}) - Fatalj(j log.JSON) - Fatalf(format string, args ...interface{}) - Panic(i ...interface{}) - Panicj(j log.JSON) - Panicf(format string, args ...interface{}) - } -) diff --git a/vendor/github.com/labstack/echo/middleware/basic_auth.go b/vendor/github.com/labstack/echo/middleware/basic_auth.go deleted file mode 100644 index 8ff3d9f63..000000000 --- a/vendor/github.com/labstack/echo/middleware/basic_auth.go +++ /dev/null @@ -1,106 +0,0 @@ -package middleware - -import ( - "encoding/base64" - "strconv" - - "github.com/labstack/echo" -) - -type ( - // BasicAuthConfig defines the config for BasicAuth middleware. - BasicAuthConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Validator is a function to validate BasicAuth credentials. - // Required. - Validator BasicAuthValidator - - // Realm is a string to define realm attribute of BasicAuth. - // Default value "Restricted". - Realm string - } - - // BasicAuthValidator defines a function to validate BasicAuth credentials. - BasicAuthValidator func(string, string, echo.Context) (bool, error) -) - -const ( - basic = "Basic" - defaultRealm = "Restricted" -) - -var ( - // DefaultBasicAuthConfig is the default BasicAuth middleware config. - DefaultBasicAuthConfig = BasicAuthConfig{ - Skipper: DefaultSkipper, - Realm: defaultRealm, - } -) - -// BasicAuth returns an BasicAuth middleware. -// -// For valid credentials it calls the next handler. -// For missing or invalid credentials, it sends "401 - Unauthorized" response. -func BasicAuth(fn BasicAuthValidator) echo.MiddlewareFunc { - c := DefaultBasicAuthConfig - c.Validator = fn - return BasicAuthWithConfig(c) -} - -// BasicAuthWithConfig returns an BasicAuth middleware with config. -// See `BasicAuth()`. -func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc { - // Defaults - if config.Validator == nil { - panic("echo: basic-auth middleware requires a validator function") - } - if config.Skipper == nil { - config.Skipper = DefaultBasicAuthConfig.Skipper - } - if config.Realm == "" { - config.Realm = defaultRealm - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - auth := c.Request().Header.Get(echo.HeaderAuthorization) - l := len(basic) - - if len(auth) > l+1 && auth[:l] == basic { - b, err := base64.StdEncoding.DecodeString(auth[l+1:]) - if err != nil { - return err - } - cred := string(b) - for i := 0; i < len(cred); i++ { - if cred[i] == ':' { - // Verify credentials - valid, err := config.Validator(cred[:i], cred[i+1:], c) - if err != nil { - return err - } else if valid { - return next(c) - } - } - } - } - - realm := "" - if config.Realm == defaultRealm { - realm = defaultRealm - } else { - realm = strconv.Quote(config.Realm) - } - - // Need to return `401` for browsers to pop-up login box. - c.Response().Header().Set(echo.HeaderWWWAuthenticate, basic+" realm="+realm) - return echo.ErrUnauthorized - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/basic_auth_test.go b/vendor/github.com/labstack/echo/middleware/basic_auth_test.go deleted file mode 100644 index 7a65b2a58..000000000 --- a/vendor/github.com/labstack/echo/middleware/basic_auth_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package middleware - -import ( - "encoding/base64" - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestBasicAuth(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - res := httptest.NewRecorder() - c := e.NewContext(req, res) - f := func(u, p string, c echo.Context) (bool, error) { - if u == "joe" && p == "secret" { - return true, nil - } - return false, nil - } - h := BasicAuth(f)(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - - // Valid credentials - auth := basic + " " + base64.StdEncoding.EncodeToString([]byte("joe:secret")) - req.Header.Set(echo.HeaderAuthorization, auth) - assert.NoError(t, h(c)) - - // Invalid credentials - auth = basic + " " + base64.StdEncoding.EncodeToString([]byte("joe:invalid-password")) - req.Header.Set(echo.HeaderAuthorization, auth) - he := h(c).(*echo.HTTPError) - assert.Equal(t, http.StatusUnauthorized, he.Code) - assert.Equal(t, basic+" realm=Restricted", res.Header().Get(echo.HeaderWWWAuthenticate)) - - // Missing Authorization header - req.Header.Del(echo.HeaderAuthorization) - he = h(c).(*echo.HTTPError) - assert.Equal(t, http.StatusUnauthorized, he.Code) - - // Invalid Authorization header - auth = base64.StdEncoding.EncodeToString([]byte("invalid")) - req.Header.Set(echo.HeaderAuthorization, auth) - he = h(c).(*echo.HTTPError) - assert.Equal(t, http.StatusUnauthorized, he.Code) -} diff --git a/vendor/github.com/labstack/echo/middleware/body_dump.go b/vendor/github.com/labstack/echo/middleware/body_dump.go deleted file mode 100644 index 88b75ee19..000000000 --- a/vendor/github.com/labstack/echo/middleware/body_dump.go +++ /dev/null @@ -1,112 +0,0 @@ -package middleware - -import ( - "bufio" - "bytes" - "io/ioutil" - "net" - "net/http" - - "io" - - "github.com/labstack/echo" -) - -type ( - // BodyDumpConfig defines the config for BodyDump middleware. - BodyDumpConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Handler receives request and response payload. - // Required. - Handler BodyDumpHandler - } - - // BodyDumpHandler receives the request and response payload. - BodyDumpHandler func(echo.Context, []byte, []byte) - - bodyDumpResponseWriter struct { - io.Writer - http.ResponseWriter - } -) - -var ( - // DefaultBodyDumpConfig is the default Gzip middleware config. - DefaultBodyDumpConfig = BodyDumpConfig{ - Skipper: DefaultSkipper, - } -) - -// BodyDump returns a BodyDump middleware. -// -// BodyLimit middleware captures the request and response payload and calls the -// registered handler. -func BodyDump(handler BodyDumpHandler) echo.MiddlewareFunc { - c := DefaultBodyDumpConfig - c.Handler = handler - return BodyDumpWithConfig(c) -} - -// BodyDumpWithConfig returns a BodyDump middleware with config. -// See: `BodyDump()`. -func BodyDumpWithConfig(config BodyDumpConfig) echo.MiddlewareFunc { - // Defaults - if config.Handler == nil { - panic("echo: body-dump middleware requires a handler function") - } - if config.Skipper == nil { - config.Skipper = DefaultBodyDumpConfig.Skipper - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) (err error) { - if config.Skipper(c) { - return next(c) - } - - // Request - reqBody := []byte{} - if c.Request().Body != nil { // Read - reqBody, _ = ioutil.ReadAll(c.Request().Body) - } - c.Request().Body = ioutil.NopCloser(bytes.NewBuffer(reqBody)) // Reset - - // Response - resBody := new(bytes.Buffer) - mw := io.MultiWriter(c.Response().Writer, resBody) - writer := &bodyDumpResponseWriter{Writer: mw, ResponseWriter: c.Response().Writer} - c.Response().Writer = writer - - if err = next(c); err != nil { - c.Error(err) - } - - // Callback - config.Handler(c, reqBody, resBody.Bytes()) - - return - } - } -} - -func (w *bodyDumpResponseWriter) WriteHeader(code int) { - w.ResponseWriter.WriteHeader(code) -} - -func (w *bodyDumpResponseWriter) Write(b []byte) (int, error) { - return w.Writer.Write(b) -} - -func (w *bodyDumpResponseWriter) Flush() { - w.ResponseWriter.(http.Flusher).Flush() -} - -func (w *bodyDumpResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { - return w.ResponseWriter.(http.Hijacker).Hijack() -} - -func (w *bodyDumpResponseWriter) CloseNotify() <-chan bool { - return w.ResponseWriter.(http.CloseNotifier).CloseNotify() -} diff --git a/vendor/github.com/labstack/echo/middleware/body_dump_test.go b/vendor/github.com/labstack/echo/middleware/body_dump_test.go deleted file mode 100644 index 1da8b5ad2..000000000 --- a/vendor/github.com/labstack/echo/middleware/body_dump_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package middleware - -import ( - "io/ioutil" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestBodyDump(t *testing.T) { - e := echo.New() - hw := "Hello, World!" - req := httptest.NewRequest(echo.POST, "/", strings.NewReader(hw)) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := func(c echo.Context) error { - body, err := ioutil.ReadAll(c.Request().Body) - if err != nil { - return err - } - return c.String(http.StatusOK, string(body)) - } - - requestBody := "" - responseBody := "" - mw := BodyDump(func(c echo.Context, reqBody, resBody []byte) { - requestBody = string(reqBody) - responseBody = string(resBody) - }) - if assert.NoError(t, mw(h)(c)) { - assert.Equal(t, requestBody, hw) - assert.Equal(t, responseBody, hw) - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, hw, rec.Body.String()) - } -} diff --git a/vendor/github.com/labstack/echo/middleware/body_limit.go b/vendor/github.com/labstack/echo/middleware/body_limit.go deleted file mode 100644 index 08f9083b4..000000000 --- a/vendor/github.com/labstack/echo/middleware/body_limit.go +++ /dev/null @@ -1,116 +0,0 @@ -package middleware - -import ( - "fmt" - "io" - "sync" - - "github.com/labstack/echo" - "github.com/labstack/gommon/bytes" -) - -type ( - // BodyLimitConfig defines the config for BodyLimit middleware. - BodyLimitConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Maximum allowed size for a request body, it can be specified - // as `4x` or `4xB`, where x is one of the multiple from K, M, G, T or P. - Limit string `json:"limit"` - limit int64 - } - - limitedReader struct { - BodyLimitConfig - reader io.ReadCloser - read int64 - context echo.Context - } -) - -var ( - // DefaultBodyLimitConfig is the default Gzip middleware config. - DefaultBodyLimitConfig = BodyLimitConfig{ - Skipper: DefaultSkipper, - } -) - -// BodyLimit returns a BodyLimit middleware. -// -// BodyLimit middleware sets the maximum allowed size for a request body, if the -// size exceeds the configured limit, it sends "413 - Request Entity Too Large" -// response. The BodyLimit is determined based on both `Content-Length` request -// header and actual content read, which makes it super secure. -// Limit can be specified as `4x` or `4xB`, where x is one of the multiple from K, M, -// G, T or P. -func BodyLimit(limit string) echo.MiddlewareFunc { - c := DefaultBodyLimitConfig - c.Limit = limit - return BodyLimitWithConfig(c) -} - -// BodyLimitWithConfig returns a BodyLimit middleware with config. -// See: `BodyLimit()`. -func BodyLimitWithConfig(config BodyLimitConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultBodyLimitConfig.Skipper - } - - limit, err := bytes.Parse(config.Limit) - if err != nil { - panic(fmt.Errorf("echo: invalid body-limit=%s", config.Limit)) - } - config.limit = limit - pool := limitedReaderPool(config) - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - - // Based on content length - if req.ContentLength > config.limit { - return echo.ErrStatusRequestEntityTooLarge - } - - // Based on content read - r := pool.Get().(*limitedReader) - r.Reset(req.Body, c) - defer pool.Put(r) - req.Body = r - - return next(c) - } - } -} - -func (r *limitedReader) Read(b []byte) (n int, err error) { - n, err = r.reader.Read(b) - r.read += int64(n) - if r.read > r.limit { - return n, echo.ErrStatusRequestEntityTooLarge - } - return -} - -func (r *limitedReader) Close() error { - return r.reader.Close() -} - -func (r *limitedReader) Reset(reader io.ReadCloser, context echo.Context) { - r.reader = reader - r.context = context -} - -func limitedReaderPool(c BodyLimitConfig) sync.Pool { - return sync.Pool{ - New: func() interface{} { - return &limitedReader{BodyLimitConfig: c} - }, - } -} diff --git a/vendor/github.com/labstack/echo/middleware/body_limit_test.go b/vendor/github.com/labstack/echo/middleware/body_limit_test.go deleted file mode 100644 index 69f7d2abe..000000000 --- a/vendor/github.com/labstack/echo/middleware/body_limit_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package middleware - -import ( - "bytes" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestBodyLimit(t *testing.T) { - e := echo.New() - hw := []byte("Hello, World!") - req := httptest.NewRequest(echo.POST, "/", bytes.NewReader(hw)) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := func(c echo.Context) error { - body, err := ioutil.ReadAll(c.Request().Body) - if err != nil { - return err - } - return c.String(http.StatusOK, string(body)) - } - - // Based on content length (within limit) - if assert.NoError(t, BodyLimit("2M")(h)(c)) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, hw, rec.Body.Bytes()) - } - - // Based on content read (overlimit) - he := BodyLimit("2B")(h)(c).(*echo.HTTPError) - assert.Equal(t, http.StatusRequestEntityTooLarge, he.Code) - - // Based on content read (within limit) - req = httptest.NewRequest(echo.POST, "/", bytes.NewReader(hw)) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - if assert.NoError(t, BodyLimit("2M")(h)(c)) { - assert.Equal(t, http.StatusOK, rec.Code) - assert.Equal(t, "Hello, World!", rec.Body.String()) - } - - // Based on content read (overlimit) - req = httptest.NewRequest(echo.POST, "/", bytes.NewReader(hw)) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - he = BodyLimit("2B")(h)(c).(*echo.HTTPError) - assert.Equal(t, http.StatusRequestEntityTooLarge, he.Code) -} diff --git a/vendor/github.com/labstack/echo/middleware/compress.go b/vendor/github.com/labstack/echo/middleware/compress.go deleted file mode 100644 index 1615624c6..000000000 --- a/vendor/github.com/labstack/echo/middleware/compress.go +++ /dev/null @@ -1,122 +0,0 @@ -package middleware - -import ( - "bufio" - "compress/gzip" - "io" - "io/ioutil" - "net" - "net/http" - "strings" - - "github.com/labstack/echo" -) - -type ( - // GzipConfig defines the config for Gzip middleware. - GzipConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Gzip compression level. - // Optional. Default value -1. - Level int `json:"level"` - } - - gzipResponseWriter struct { - io.Writer - http.ResponseWriter - } -) - -const ( - gzipScheme = "gzip" -) - -var ( - // DefaultGzipConfig is the default Gzip middleware config. - DefaultGzipConfig = GzipConfig{ - Skipper: DefaultSkipper, - Level: -1, - } -) - -// Gzip returns a middleware which compresses HTTP response using gzip compression -// scheme. -func Gzip() echo.MiddlewareFunc { - return GzipWithConfig(DefaultGzipConfig) -} - -// GzipWithConfig return Gzip middleware with config. -// See: `Gzip()`. -func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultGzipConfig.Skipper - } - if config.Level == 0 { - config.Level = DefaultGzipConfig.Level - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - res := c.Response() - res.Header().Add(echo.HeaderVary, echo.HeaderAcceptEncoding) - if strings.Contains(c.Request().Header.Get(echo.HeaderAcceptEncoding), gzipScheme) { - res.Header().Set(echo.HeaderContentEncoding, gzipScheme) // Issue #806 - rw := res.Writer - w, err := gzip.NewWriterLevel(rw, config.Level) - if err != nil { - return err - } - defer func() { - if res.Size == 0 { - if res.Header().Get(echo.HeaderContentEncoding) == gzipScheme { - res.Header().Del(echo.HeaderContentEncoding) - } - // We have to reset response to it's pristine state when - // nothing is written to body or error is returned. - // See issue #424, #407. - res.Writer = rw - w.Reset(ioutil.Discard) - } - w.Close() - }() - grw := &gzipResponseWriter{Writer: w, ResponseWriter: rw} - res.Writer = grw - } - return next(c) - } - } -} - -func (w *gzipResponseWriter) WriteHeader(code int) { - if code == http.StatusNoContent { // Issue #489 - w.ResponseWriter.Header().Del(echo.HeaderContentEncoding) - } - w.Header().Del(echo.HeaderContentLength) // Issue #444 - w.ResponseWriter.WriteHeader(code) -} - -func (w *gzipResponseWriter) Write(b []byte) (int, error) { - if w.Header().Get(echo.HeaderContentType) == "" { - w.Header().Set(echo.HeaderContentType, http.DetectContentType(b)) - } - return w.Writer.Write(b) -} - -func (w *gzipResponseWriter) Flush() { - w.Writer.(*gzip.Writer).Flush() -} - -func (w *gzipResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { - return w.ResponseWriter.(http.Hijacker).Hijack() -} - -func (w *gzipResponseWriter) CloseNotify() <-chan bool { - return w.ResponseWriter.(http.CloseNotifier).CloseNotify() -} diff --git a/vendor/github.com/labstack/echo/middleware/compress_test.go b/vendor/github.com/labstack/echo/middleware/compress_test.go deleted file mode 100644 index 0493fd9f3..000000000 --- a/vendor/github.com/labstack/echo/middleware/compress_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package middleware - -import ( - "bytes" - "compress/gzip" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestGzip(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - - // Skip if no Accept-Encoding header - h := Gzip()(func(c echo.Context) error { - c.Response().Write([]byte("test")) // For Content-Type sniffing - return nil - }) - h(c) - assert.Equal(t, "test", rec.Body.String()) - - // Gzip - req = httptest.NewRequest(echo.GET, "/", nil) - req.Header.Set(echo.HeaderAcceptEncoding, gzipScheme) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - h(c) - assert.Equal(t, gzipScheme, rec.Header().Get(echo.HeaderContentEncoding)) - assert.Contains(t, rec.Header().Get(echo.HeaderContentType), echo.MIMETextPlain) - r, err := gzip.NewReader(rec.Body) - defer r.Close() - if assert.NoError(t, err) { - buf := new(bytes.Buffer) - buf.ReadFrom(r) - assert.Equal(t, "test", buf.String()) - } -} - -func TestGzipNoContent(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - req.Header.Set(echo.HeaderAcceptEncoding, gzipScheme) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := Gzip()(func(c echo.Context) error { - return c.NoContent(http.StatusNoContent) - }) - if assert.NoError(t, h(c)) { - assert.Empty(t, rec.Header().Get(echo.HeaderContentEncoding)) - assert.Empty(t, rec.Header().Get(echo.HeaderContentType)) - assert.Equal(t, 0, len(rec.Body.Bytes())) - } -} - -func TestGzipErrorReturned(t *testing.T) { - e := echo.New() - e.Use(Gzip()) - e.GET("/", func(c echo.Context) error { - return echo.ErrNotFound - }) - req := httptest.NewRequest(echo.GET, "/", nil) - req.Header.Set(echo.HeaderAcceptEncoding, gzipScheme) - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - assert.Equal(t, http.StatusNotFound, rec.Code) - assert.Empty(t, rec.Header().Get(echo.HeaderContentEncoding)) -} - -// Issue #806 -func TestGzipWithStatic(t *testing.T) { - e := echo.New() - e.Use(Gzip()) - e.Static("/test", "../_fixture/images") - req := httptest.NewRequest(echo.GET, "/test/walle.png", nil) - req.Header.Set(echo.HeaderAcceptEncoding, gzipScheme) - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - assert.Equal(t, http.StatusOK, rec.Code) - // Data is written out in chunks when Content-Length == "", so only - // validate the content length if it's not set. - if cl := rec.Header().Get("Content-Length"); cl != "" { - assert.Equal(t, cl, rec.Body.Len()) - } - r, err := gzip.NewReader(rec.Body) - assert.NoError(t, err) - defer r.Close() - want, err := ioutil.ReadFile("../_fixture/images/walle.png") - if assert.NoError(t, err) { - var buf bytes.Buffer - buf.ReadFrom(r) - assert.Equal(t, want, buf.Bytes()) - } -} diff --git a/vendor/github.com/labstack/echo/middleware/cors.go b/vendor/github.com/labstack/echo/middleware/cors.go deleted file mode 100644 index c35fc36ce..000000000 --- a/vendor/github.com/labstack/echo/middleware/cors.go +++ /dev/null @@ -1,139 +0,0 @@ -package middleware - -import ( - "net/http" - "strconv" - "strings" - - "github.com/labstack/echo" -) - -type ( - // CORSConfig defines the config for CORS middleware. - CORSConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // AllowOrigin defines a list of origins that may access the resource. - // Optional. Default value []string{"*"}. - AllowOrigins []string `json:"allow_origins"` - - // AllowMethods defines a list methods allowed when accessing the resource. - // This is used in response to a preflight request. - // Optional. Default value DefaultCORSConfig.AllowMethods. - AllowMethods []string `json:"allow_methods"` - - // AllowHeaders defines a list of request headers that can be used when - // making the actual request. This in response to a preflight request. - // Optional. Default value []string{}. - AllowHeaders []string `json:"allow_headers"` - - // AllowCredentials indicates whether or not the response to the request - // can be exposed when the credentials flag is true. When used as part of - // a response to a preflight request, this indicates whether or not the - // actual request can be made using credentials. - // Optional. Default value false. - AllowCredentials bool `json:"allow_credentials"` - - // ExposeHeaders defines a whitelist headers that clients are allowed to - // access. - // Optional. Default value []string{}. - ExposeHeaders []string `json:"expose_headers"` - - // MaxAge indicates how long (in seconds) the results of a preflight request - // can be cached. - // Optional. Default value 0. - MaxAge int `json:"max_age"` - } -) - -var ( - // DefaultCORSConfig is the default CORS middleware config. - DefaultCORSConfig = CORSConfig{ - Skipper: DefaultSkipper, - AllowOrigins: []string{"*"}, - AllowMethods: []string{echo.GET, echo.HEAD, echo.PUT, echo.PATCH, echo.POST, echo.DELETE}, - } -) - -// CORS returns a Cross-Origin Resource Sharing (CORS) middleware. -// See: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS -func CORS() echo.MiddlewareFunc { - return CORSWithConfig(DefaultCORSConfig) -} - -// CORSWithConfig returns a CORS middleware with config. -// See: `CORS()`. -func CORSWithConfig(config CORSConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultCORSConfig.Skipper - } - if len(config.AllowOrigins) == 0 { - config.AllowOrigins = DefaultCORSConfig.AllowOrigins - } - if len(config.AllowMethods) == 0 { - config.AllowMethods = DefaultCORSConfig.AllowMethods - } - - allowMethods := strings.Join(config.AllowMethods, ",") - allowHeaders := strings.Join(config.AllowHeaders, ",") - exposeHeaders := strings.Join(config.ExposeHeaders, ",") - maxAge := strconv.Itoa(config.MaxAge) - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - res := c.Response() - origin := req.Header.Get(echo.HeaderOrigin) - allowOrigin := "" - - // Check allowed origins - for _, o := range config.AllowOrigins { - if o == "*" || o == origin { - allowOrigin = o - break - } - } - - // Simple request - if req.Method != echo.OPTIONS { - res.Header().Add(echo.HeaderVary, echo.HeaderOrigin) - res.Header().Set(echo.HeaderAccessControlAllowOrigin, allowOrigin) - if config.AllowCredentials { - res.Header().Set(echo.HeaderAccessControlAllowCredentials, "true") - } - if exposeHeaders != "" { - res.Header().Set(echo.HeaderAccessControlExposeHeaders, exposeHeaders) - } - return next(c) - } - - // Preflight request - res.Header().Add(echo.HeaderVary, echo.HeaderOrigin) - res.Header().Add(echo.HeaderVary, echo.HeaderAccessControlRequestMethod) - res.Header().Add(echo.HeaderVary, echo.HeaderAccessControlRequestHeaders) - res.Header().Set(echo.HeaderAccessControlAllowOrigin, allowOrigin) - res.Header().Set(echo.HeaderAccessControlAllowMethods, allowMethods) - if config.AllowCredentials { - res.Header().Set(echo.HeaderAccessControlAllowCredentials, "true") - } - if allowHeaders != "" { - res.Header().Set(echo.HeaderAccessControlAllowHeaders, allowHeaders) - } else { - h := req.Header.Get(echo.HeaderAccessControlRequestHeaders) - if h != "" { - res.Header().Set(echo.HeaderAccessControlAllowHeaders, h) - } - } - if config.MaxAge > 0 { - res.Header().Set(echo.HeaderAccessControlMaxAge, maxAge) - } - return c.NoContent(http.StatusNoContent) - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/cors_test.go b/vendor/github.com/labstack/echo/middleware/cors_test.go deleted file mode 100644 index 70312142b..000000000 --- a/vendor/github.com/labstack/echo/middleware/cors_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package middleware - -import ( - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestCORS(t *testing.T) { - e := echo.New() - - // Wildcard origin - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := CORS()(echo.NotFoundHandler) - h(c) - assert.Equal(t, "*", rec.Header().Get(echo.HeaderAccessControlAllowOrigin)) - - // Allow origins - req = httptest.NewRequest(echo.GET, "/", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - h = CORSWithConfig(CORSConfig{ - AllowOrigins: []string{"localhost"}, - })(echo.NotFoundHandler) - req.Header.Set(echo.HeaderOrigin, "localhost") - h(c) - assert.Equal(t, "localhost", rec.Header().Get(echo.HeaderAccessControlAllowOrigin)) - - // Preflight request - req = httptest.NewRequest(echo.OPTIONS, "/", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - req.Header.Set(echo.HeaderOrigin, "localhost") - req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON) - cors := CORSWithConfig(CORSConfig{ - AllowOrigins: []string{"localhost"}, - AllowCredentials: true, - MaxAge: 3600, - }) - h = cors(echo.NotFoundHandler) - h(c) - assert.Equal(t, "localhost", rec.Header().Get(echo.HeaderAccessControlAllowOrigin)) - assert.NotEmpty(t, rec.Header().Get(echo.HeaderAccessControlAllowMethods)) - assert.Equal(t, "true", rec.Header().Get(echo.HeaderAccessControlAllowCredentials)) - assert.Equal(t, "3600", rec.Header().Get(echo.HeaderAccessControlMaxAge)) -} diff --git a/vendor/github.com/labstack/echo/middleware/csrf.go b/vendor/github.com/labstack/echo/middleware/csrf.go deleted file mode 100644 index 5bbeecb4a..000000000 --- a/vendor/github.com/labstack/echo/middleware/csrf.go +++ /dev/null @@ -1,210 +0,0 @@ -package middleware - -import ( - "crypto/subtle" - "errors" - "net/http" - "strings" - "time" - - "github.com/labstack/echo" - "github.com/labstack/gommon/random" -) - -type ( - // CSRFConfig defines the config for CSRF middleware. - CSRFConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // TokenLength is the length of the generated token. - TokenLength uint8 `json:"token_length"` - // Optional. Default value 32. - - // TokenLookup is a string in the form of ":" that is used - // to extract token from the request. - // Optional. Default value "header:X-CSRF-Token". - // Possible values: - // - "header:" - // - "form:" - // - "query:" - TokenLookup string `json:"token_lookup"` - - // Context key to store generated CSRF token into context. - // Optional. Default value "csrf". - ContextKey string `json:"context_key"` - - // Name of the CSRF cookie. This cookie will store CSRF token. - // Optional. Default value "csrf". - CookieName string `json:"cookie_name"` - - // Domain of the CSRF cookie. - // Optional. Default value none. - CookieDomain string `json:"cookie_domain"` - - // Path of the CSRF cookie. - // Optional. Default value none. - CookiePath string `json:"cookie_path"` - - // Max age (in seconds) of the CSRF cookie. - // Optional. Default value 86400 (24hr). - CookieMaxAge int `json:"cookie_max_age"` - - // Indicates if CSRF cookie is secure. - // Optional. Default value false. - CookieSecure bool `json:"cookie_secure"` - - // Indicates if CSRF cookie is HTTP only. - // Optional. Default value false. - CookieHTTPOnly bool `json:"cookie_http_only"` - } - - // csrfTokenExtractor defines a function that takes `echo.Context` and returns - // either a token or an error. - csrfTokenExtractor func(echo.Context) (string, error) -) - -var ( - // DefaultCSRFConfig is the default CSRF middleware config. - DefaultCSRFConfig = CSRFConfig{ - Skipper: DefaultSkipper, - TokenLength: 32, - TokenLookup: "header:" + echo.HeaderXCSRFToken, - ContextKey: "csrf", - CookieName: "_csrf", - CookieMaxAge: 86400, - } -) - -// CSRF returns a Cross-Site Request Forgery (CSRF) middleware. -// See: https://en.wikipedia.org/wiki/Cross-site_request_forgery -func CSRF() echo.MiddlewareFunc { - c := DefaultCSRFConfig - return CSRFWithConfig(c) -} - -// CSRFWithConfig returns a CSRF middleware with config. -// See `CSRF()`. -func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultCSRFConfig.Skipper - } - if config.TokenLength == 0 { - config.TokenLength = DefaultCSRFConfig.TokenLength - } - if config.TokenLookup == "" { - config.TokenLookup = DefaultCSRFConfig.TokenLookup - } - if config.ContextKey == "" { - config.ContextKey = DefaultCSRFConfig.ContextKey - } - if config.CookieName == "" { - config.CookieName = DefaultCSRFConfig.CookieName - } - if config.CookieMaxAge == 0 { - config.CookieMaxAge = DefaultCSRFConfig.CookieMaxAge - } - - // Initialize - parts := strings.Split(config.TokenLookup, ":") - extractor := csrfTokenFromHeader(parts[1]) - switch parts[0] { - case "form": - extractor = csrfTokenFromForm(parts[1]) - case "query": - extractor = csrfTokenFromQuery(parts[1]) - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - k, err := c.Cookie(config.CookieName) - token := "" - - if err != nil { - // Generate token - token = random.String(config.TokenLength) - } else { - // Reuse token - token = k.Value - } - - switch req.Method { - case echo.GET, echo.HEAD, echo.OPTIONS, echo.TRACE: - default: - // Validate token only for requests which are not defined as 'safe' by RFC7231 - clientToken, err := extractor(c) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, err.Error()) - } - if !validateCSRFToken(token, clientToken) { - return echo.NewHTTPError(http.StatusForbidden, "Invalid csrf token") - } - } - - // Set CSRF cookie - cookie := new(http.Cookie) - cookie.Name = config.CookieName - cookie.Value = token - if config.CookiePath != "" { - cookie.Path = config.CookiePath - } - if config.CookieDomain != "" { - cookie.Domain = config.CookieDomain - } - cookie.Expires = time.Now().Add(time.Duration(config.CookieMaxAge) * time.Second) - cookie.Secure = config.CookieSecure - cookie.HttpOnly = config.CookieHTTPOnly - c.SetCookie(cookie) - - // Store token in the context - c.Set(config.ContextKey, token) - - // Protect clients from caching the response - c.Response().Header().Add(echo.HeaderVary, echo.HeaderCookie) - - return next(c) - } - } -} - -// csrfTokenFromForm returns a `csrfTokenExtractor` that extracts token from the -// provided request header. -func csrfTokenFromHeader(header string) csrfTokenExtractor { - return func(c echo.Context) (string, error) { - return c.Request().Header.Get(header), nil - } -} - -// csrfTokenFromForm returns a `csrfTokenExtractor` that extracts token from the -// provided form parameter. -func csrfTokenFromForm(param string) csrfTokenExtractor { - return func(c echo.Context) (string, error) { - token := c.FormValue(param) - if token == "" { - return "", errors.New("Missing csrf token in the form parameter") - } - return token, nil - } -} - -// csrfTokenFromQuery returns a `csrfTokenExtractor` that extracts token from the -// provided query parameter. -func csrfTokenFromQuery(param string) csrfTokenExtractor { - return func(c echo.Context) (string, error) { - token := c.QueryParam(param) - if token == "" { - return "", errors.New("Missing csrf token in the query string") - } - return token, nil - } -} - -func validateCSRFToken(token, clientToken string) bool { - return subtle.ConstantTimeCompare([]byte(token), []byte(clientToken)) == 1 -} diff --git a/vendor/github.com/labstack/echo/middleware/csrf_test.go b/vendor/github.com/labstack/echo/middleware/csrf_test.go deleted file mode 100644 index 51495286f..000000000 --- a/vendor/github.com/labstack/echo/middleware/csrf_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package middleware - -import ( - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "github.com/labstack/echo" - "github.com/labstack/gommon/random" - "github.com/stretchr/testify/assert" -) - -func TestCSRF(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - csrf := CSRFWithConfig(CSRFConfig{ - TokenLength: 16, - }) - h := csrf(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - - // Generate CSRF token - h(c) - assert.Contains(t, rec.Header().Get(echo.HeaderSetCookie), "_csrf") - - // Without CSRF cookie - req = httptest.NewRequest(echo.POST, "/", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - assert.Error(t, h(c)) - - // Empty/invalid CSRF token - req = httptest.NewRequest(echo.POST, "/", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - req.Header.Set(echo.HeaderXCSRFToken, "") - assert.Error(t, h(c)) - - // Valid CSRF token - token := random.String(16) - req.Header.Set(echo.HeaderCookie, "_csrf="+token) - req.Header.Set(echo.HeaderXCSRFToken, token) - if assert.NoError(t, h(c)) { - assert.Equal(t, http.StatusOK, rec.Code) - } -} - -func TestCSRFTokenFromForm(t *testing.T) { - f := make(url.Values) - f.Set("csrf", "token") - e := echo.New() - req := httptest.NewRequest(echo.POST, "/", strings.NewReader(f.Encode())) - req.Header.Add(echo.HeaderContentType, echo.MIMEApplicationForm) - c := e.NewContext(req, nil) - token, err := csrfTokenFromForm("csrf")(c) - if assert.NoError(t, err) { - assert.Equal(t, "token", token) - } - _, err = csrfTokenFromForm("invalid")(c) - assert.Error(t, err) -} - -func TestCSRFTokenFromQuery(t *testing.T) { - q := make(url.Values) - q.Set("csrf", "token") - e := echo.New() - req := httptest.NewRequest(echo.GET, "/?"+q.Encode(), nil) - req.Header.Add(echo.HeaderContentType, echo.MIMEApplicationForm) - c := e.NewContext(req, nil) - token, err := csrfTokenFromQuery("csrf")(c) - if assert.NoError(t, err) { - assert.Equal(t, "token", token) - } - _, err = csrfTokenFromQuery("invalid")(c) - assert.Error(t, err) - csrfTokenFromQuery("csrf") -} diff --git a/vendor/github.com/labstack/echo/middleware/jwt.go b/vendor/github.com/labstack/echo/middleware/jwt.go deleted file mode 100644 index 96a6640f8..000000000 --- a/vendor/github.com/labstack/echo/middleware/jwt.go +++ /dev/null @@ -1,190 +0,0 @@ -package middleware - -import ( - "errors" - "fmt" - "net/http" - "reflect" - "strings" - - "github.com/dgrijalva/jwt-go" - "github.com/labstack/echo" -) - -type ( - // JWTConfig defines the config for JWT middleware. - JWTConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Signing key to validate token. - // Required. - SigningKey interface{} - - // Signing method, used to check token signing method. - // Optional. Default value HS256. - SigningMethod string - - // Context key to store user information from the token into context. - // Optional. Default value "user". - ContextKey string - - // Claims are extendable claims data defining token content. - // Optional. Default value jwt.MapClaims - Claims jwt.Claims - - // TokenLookup is a string in the form of ":" that is used - // to extract token from the request. - // Optional. Default value "header:Authorization". - // Possible values: - // - "header:" - // - "query:" - // - "cookie:" - TokenLookup string - - // AuthScheme to be used in the Authorization header. - // Optional. Default value "Bearer". - AuthScheme string - - keyFunc jwt.Keyfunc - } - - jwtExtractor func(echo.Context) (string, error) -) - -// Algorithms -const ( - AlgorithmHS256 = "HS256" -) - -var ( - // DefaultJWTConfig is the default JWT auth middleware config. - DefaultJWTConfig = JWTConfig{ - Skipper: DefaultSkipper, - SigningMethod: AlgorithmHS256, - ContextKey: "user", - TokenLookup: "header:" + echo.HeaderAuthorization, - AuthScheme: "Bearer", - Claims: jwt.MapClaims{}, - } -) - -// JWT returns a JSON Web Token (JWT) auth middleware. -// -// For valid token, it sets the user in context and calls next handler. -// For invalid token, it returns "401 - Unauthorized" error. -// For missing token, it returns "400 - Bad Request" error. -// -// See: https://jwt.io/introduction -// See `JWTConfig.TokenLookup` -func JWT(key interface{}) echo.MiddlewareFunc { - c := DefaultJWTConfig - c.SigningKey = key - return JWTWithConfig(c) -} - -// JWTWithConfig returns a JWT auth middleware with config. -// See: `JWT()`. -func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultJWTConfig.Skipper - } - if config.SigningKey == nil { - panic("echo: jwt middleware requires signing key") - } - if config.SigningMethod == "" { - config.SigningMethod = DefaultJWTConfig.SigningMethod - } - if config.ContextKey == "" { - config.ContextKey = DefaultJWTConfig.ContextKey - } - if config.Claims == nil { - config.Claims = DefaultJWTConfig.Claims - } - if config.TokenLookup == "" { - config.TokenLookup = DefaultJWTConfig.TokenLookup - } - if config.AuthScheme == "" { - config.AuthScheme = DefaultJWTConfig.AuthScheme - } - config.keyFunc = func(t *jwt.Token) (interface{}, error) { - // Check the signing method - if t.Method.Alg() != config.SigningMethod { - return nil, fmt.Errorf("Unexpected jwt signing method=%v", t.Header["alg"]) - } - return config.SigningKey, nil - } - - // Initialize - parts := strings.Split(config.TokenLookup, ":") - extractor := jwtFromHeader(parts[1], config.AuthScheme) - switch parts[0] { - case "query": - extractor = jwtFromQuery(parts[1]) - case "cookie": - extractor = jwtFromCookie(parts[1]) - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - auth, err := extractor(c) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, err.Error()) - } - token := new(jwt.Token) - // Issue #647, #656 - if _, ok := config.Claims.(jwt.MapClaims); ok { - token, err = jwt.Parse(auth, config.keyFunc) - } else { - t := reflect.ValueOf(config.Claims).Type().Elem() - claims := reflect.New(t).Interface().(jwt.Claims) - token, err = jwt.ParseWithClaims(auth, claims, config.keyFunc) - } - if err == nil && token.Valid { - // Store user information from token into context. - c.Set(config.ContextKey, token) - return next(c) - } - return echo.ErrUnauthorized - } - } -} - -// jwtFromHeader returns a `jwtExtractor` that extracts token from the request header. -func jwtFromHeader(header string, authScheme string) jwtExtractor { - return func(c echo.Context) (string, error) { - auth := c.Request().Header.Get(header) - l := len(authScheme) - if len(auth) > l+1 && auth[:l] == authScheme { - return auth[l+1:], nil - } - return "", errors.New("Missing or invalid jwt in the request header") - } -} - -// jwtFromQuery returns a `jwtExtractor` that extracts token from the query string. -func jwtFromQuery(param string) jwtExtractor { - return func(c echo.Context) (string, error) { - token := c.QueryParam(param) - if token == "" { - return "", errors.New("Missing jwt in the query string") - } - return token, nil - } -} - -// jwtFromCookie returns a `jwtExtractor` that extracts token from the named cookie. -func jwtFromCookie(name string) jwtExtractor { - return func(c echo.Context) (string, error) { - cookie, err := c.Cookie(name) - if err != nil { - return "", errors.New("Missing jwt in the cookie") - } - return cookie.Value, nil - } -} diff --git a/vendor/github.com/labstack/echo/middleware/jwt_test.go b/vendor/github.com/labstack/echo/middleware/jwt_test.go deleted file mode 100644 index b72eb4019..000000000 --- a/vendor/github.com/labstack/echo/middleware/jwt_test.go +++ /dev/null @@ -1,226 +0,0 @@ -package middleware - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/dgrijalva/jwt-go" - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -// jwtCustomInfo defines some custom types we're going to use within our tokens. -type jwtCustomInfo struct { - Name string `json:"name"` - Admin bool `json:"admin"` -} - -// jwtCustomClaims are custom claims expanding default ones. -type jwtCustomClaims struct { - *jwt.StandardClaims - jwtCustomInfo -} - -func TestJWTRace(t *testing.T) { - e := echo.New() - handler := func(c echo.Context) error { - return c.String(http.StatusOK, "test") - } - initialToken := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ" - raceToken := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IlJhY2UgQ29uZGl0aW9uIiwiYWRtaW4iOmZhbHNlfQ.Xzkx9mcgGqYMTkuxSCbJ67lsDyk5J2aB7hu65cEE-Ss" - validKey := []byte("secret") - - h := JWTWithConfig(JWTConfig{ - Claims: &jwtCustomClaims{}, - SigningKey: validKey, - })(handler) - - makeReq := func(token string) echo.Context { - req := httptest.NewRequest(echo.GET, "/", nil) - res := httptest.NewRecorder() - req.Header.Set(echo.HeaderAuthorization, DefaultJWTConfig.AuthScheme+" "+token) - c := e.NewContext(req, res) - assert.NoError(t, h(c)) - return c - } - - c := makeReq(initialToken) - user := c.Get("user").(*jwt.Token) - claims := user.Claims.(*jwtCustomClaims) - assert.Equal(t, claims.Name, "John Doe") - - makeReq(raceToken) - user = c.Get("user").(*jwt.Token) - claims = user.Claims.(*jwtCustomClaims) - // Initial context should still be "John Doe", not "Race Condition" - assert.Equal(t, claims.Name, "John Doe") - assert.Equal(t, claims.Admin, true) -} - -func TestJWT(t *testing.T) { - e := echo.New() - handler := func(c echo.Context) error { - return c.String(http.StatusOK, "test") - } - token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ" - validKey := []byte("secret") - invalidKey := []byte("invalid-key") - validAuth := DefaultJWTConfig.AuthScheme + " " + token - - for _, tc := range []struct { - expPanic bool - expErrCode int // 0 for Success - config JWTConfig - reqURL string // "/" if empty - hdrAuth string - hdrCookie string // test.Request doesn't provide SetCookie(); use name=val - info string - }{ - { - expPanic: true, - info: "No signing key provided", - }, - { - expErrCode: http.StatusBadRequest, - config: JWTConfig{ - SigningKey: validKey, - SigningMethod: "RS256", - }, - info: "Unexpected signing method", - }, - { - expErrCode: http.StatusUnauthorized, - hdrAuth: validAuth, - config: JWTConfig{SigningKey: invalidKey}, - info: "Invalid key", - }, - { - hdrAuth: validAuth, - config: JWTConfig{SigningKey: validKey}, - info: "Valid JWT", - }, - { - hdrAuth: "Token" + " " + token, - config: JWTConfig{AuthScheme: "Token", SigningKey: validKey}, - info: "Valid JWT with custom AuthScheme", - }, - { - hdrAuth: validAuth, - config: JWTConfig{ - Claims: &jwtCustomClaims{}, - SigningKey: []byte("secret"), - }, - info: "Valid JWT with custom claims", - }, - { - hdrAuth: "invalid-auth", - expErrCode: http.StatusBadRequest, - config: JWTConfig{SigningKey: validKey}, - info: "Invalid Authorization header", - }, - { - config: JWTConfig{SigningKey: validKey}, - expErrCode: http.StatusBadRequest, - info: "Empty header auth field", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "query:jwt", - }, - reqURL: "/?a=b&jwt=" + token, - info: "Valid query method", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "query:jwt", - }, - reqURL: "/?a=b&jwtxyz=" + token, - expErrCode: http.StatusBadRequest, - info: "Invalid query param name", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "query:jwt", - }, - reqURL: "/?a=b&jwt=invalid-token", - expErrCode: http.StatusUnauthorized, - info: "Invalid query param value", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "query:jwt", - }, - reqURL: "/?a=b", - expErrCode: http.StatusBadRequest, - info: "Empty query", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "cookie:jwt", - }, - hdrCookie: "jwt=" + token, - info: "Valid cookie method", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "cookie:jwt", - }, - expErrCode: http.StatusUnauthorized, - hdrCookie: "jwt=invalid", - info: "Invalid token with cookie method", - }, - { - config: JWTConfig{ - SigningKey: validKey, - TokenLookup: "cookie:jwt", - }, - expErrCode: http.StatusBadRequest, - info: "Empty cookie", - }, - } { - if tc.reqURL == "" { - tc.reqURL = "/" - } - - req := httptest.NewRequest(echo.GET, tc.reqURL, nil) - res := httptest.NewRecorder() - req.Header.Set(echo.HeaderAuthorization, tc.hdrAuth) - req.Header.Set(echo.HeaderCookie, tc.hdrCookie) - c := e.NewContext(req, res) - - if tc.expPanic { - assert.Panics(t, func() { - JWTWithConfig(tc.config) - }, tc.info) - continue - } - - if tc.expErrCode != 0 { - h := JWTWithConfig(tc.config)(handler) - he := h(c).(*echo.HTTPError) - assert.Equal(t, tc.expErrCode, he.Code, tc.info) - continue - } - - h := JWTWithConfig(tc.config)(handler) - if assert.NoError(t, h(c), tc.info) { - user := c.Get("user").(*jwt.Token) - switch claims := user.Claims.(type) { - case jwt.MapClaims: - assert.Equal(t, claims["name"], "John Doe", tc.info) - case *jwtCustomClaims: - assert.Equal(t, claims.Name, "John Doe", tc.info) - assert.Equal(t, claims.Admin, true, tc.info) - default: - panic("unexpected type of claims") - } - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/key_auth.go b/vendor/github.com/labstack/echo/middleware/key_auth.go deleted file mode 100644 index 246252608..000000000 --- a/vendor/github.com/labstack/echo/middleware/key_auth.go +++ /dev/null @@ -1,136 +0,0 @@ -package middleware - -import ( - "errors" - "net/http" - "strings" - - "github.com/labstack/echo" -) - -type ( - // KeyAuthConfig defines the config for KeyAuth middleware. - KeyAuthConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // KeyLookup is a string in the form of ":" that is used - // to extract key from the request. - // Optional. Default value "header:Authorization". - // Possible values: - // - "header:" - // - "query:" - KeyLookup string `json:"key_lookup"` - - // AuthScheme to be used in the Authorization header. - // Optional. Default value "Bearer". - AuthScheme string - - // Validator is a function to validate key. - // Required. - Validator KeyAuthValidator - } - - // KeyAuthValidator defines a function to validate KeyAuth credentials. - KeyAuthValidator func(string, echo.Context) (bool, error) - - keyExtractor func(echo.Context) (string, error) -) - -var ( - // DefaultKeyAuthConfig is the default KeyAuth middleware config. - DefaultKeyAuthConfig = KeyAuthConfig{ - Skipper: DefaultSkipper, - KeyLookup: "header:" + echo.HeaderAuthorization, - AuthScheme: "Bearer", - } -) - -// KeyAuth returns an KeyAuth middleware. -// -// For valid key it calls the next handler. -// For invalid key, it sends "401 - Unauthorized" response. -// For missing key, it sends "400 - Bad Request" response. -func KeyAuth(fn KeyAuthValidator) echo.MiddlewareFunc { - c := DefaultKeyAuthConfig - c.Validator = fn - return KeyAuthWithConfig(c) -} - -// KeyAuthWithConfig returns an KeyAuth middleware with config. -// See `KeyAuth()`. -func KeyAuthWithConfig(config KeyAuthConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultKeyAuthConfig.Skipper - } - // Defaults - if config.AuthScheme == "" { - config.AuthScheme = DefaultKeyAuthConfig.AuthScheme - } - if config.KeyLookup == "" { - config.KeyLookup = DefaultKeyAuthConfig.KeyLookup - } - if config.Validator == nil { - panic("echo: key-auth middleware requires a validator function") - } - - // Initialize - parts := strings.Split(config.KeyLookup, ":") - extractor := keyFromHeader(parts[1], config.AuthScheme) - switch parts[0] { - case "query": - extractor = keyFromQuery(parts[1]) - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - // Extract and verify key - key, err := extractor(c) - if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, err.Error()) - } - valid, err := config.Validator(key, c) - if err != nil { - return err - } else if valid { - return next(c) - } - - return echo.ErrUnauthorized - } - } -} - -// keyFromHeader returns a `keyExtractor` that extracts key from the request header. -func keyFromHeader(header string, authScheme string) keyExtractor { - return func(c echo.Context) (string, error) { - auth := c.Request().Header.Get(header) - if auth == "" { - return "", errors.New("Missing key in request header") - } - if header == echo.HeaderAuthorization { - l := len(authScheme) - if len(auth) > l+1 && auth[:l] == authScheme { - return auth[l+1:], nil - } - return "", errors.New("Invalid key in the request header") - } - return auth, nil - } -} - -// keyFromQuery returns a `keyExtractor` that extracts key from the query string. -func keyFromQuery(param string) keyExtractor { - return func(c echo.Context) (string, error) { - key := c.QueryParam(param) - if key == "" { - return "", errors.New("Missing key in the query string") - } - return key, nil - } -} diff --git a/vendor/github.com/labstack/echo/middleware/key_auth_test.go b/vendor/github.com/labstack/echo/middleware/key_auth_test.go deleted file mode 100644 index bf36006fd..000000000 --- a/vendor/github.com/labstack/echo/middleware/key_auth_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package middleware - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestKeyAuth(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - res := httptest.NewRecorder() - c := e.NewContext(req, res) - config := KeyAuthConfig{ - Validator: func(key string, c echo.Context) (bool, error) { - return key == "valid-key", nil - }, - } - h := KeyAuthWithConfig(config)(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - - // Valid key - auth := DefaultKeyAuthConfig.AuthScheme + " " + "valid-key" - req.Header.Set(echo.HeaderAuthorization, auth) - assert.NoError(t, h(c)) - - // Invalid key - auth = DefaultKeyAuthConfig.AuthScheme + " " + "invalid-key" - req.Header.Set(echo.HeaderAuthorization, auth) - he := h(c).(*echo.HTTPError) - assert.Equal(t, http.StatusUnauthorized, he.Code) - - // Missing Authorization header - req.Header.Del(echo.HeaderAuthorization) - he = h(c).(*echo.HTTPError) - assert.Equal(t, http.StatusBadRequest, he.Code) - - // Key from custom header - config.KeyLookup = "header:API-Key" - h = KeyAuthWithConfig(config)(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - req.Header.Set("API-Key", "valid-key") - assert.NoError(t, h(c)) - - // Key from query string - config.KeyLookup = "query:key" - h = KeyAuthWithConfig(config)(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - q := req.URL.Query() - q.Add("key", "valid-key") - req.URL.RawQuery = q.Encode() - assert.NoError(t, h(c)) -} diff --git a/vendor/github.com/labstack/echo/middleware/logger.go b/vendor/github.com/labstack/echo/middleware/logger.go deleted file mode 100644 index b9c54468f..000000000 --- a/vendor/github.com/labstack/echo/middleware/logger.go +++ /dev/null @@ -1,202 +0,0 @@ -package middleware - -import ( - "bytes" - "io" - "os" - "strconv" - "strings" - "sync" - "time" - - "github.com/labstack/echo" - "github.com/labstack/gommon/color" - "github.com/valyala/fasttemplate" -) - -type ( - // LoggerConfig defines the config for Logger middleware. - LoggerConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Tags to constructed the logger format. - // - // - time_unix - // - time_unix_nano - // - time_rfc3339 - // - time_rfc3339_nano - // - id (Request ID) - // - remote_ip - // - uri - // - host - // - method - // - path - // - referer - // - user_agent - // - status - // - latency (In nanoseconds) - // - latency_human (Human readable) - // - bytes_in (Bytes received) - // - bytes_out (Bytes sent) - // - header: - // - query: - // - form: - // - // Example "${remote_ip} ${status}" - // - // Optional. Default value DefaultLoggerConfig.Format. - Format string `json:"format"` - - // Output is a writer where logs in JSON format are written. - // Optional. Default value os.Stdout. - Output io.Writer - - template *fasttemplate.Template - colorer *color.Color - pool *sync.Pool - } -) - -var ( - // DefaultLoggerConfig is the default Logger middleware config. - DefaultLoggerConfig = LoggerConfig{ - Skipper: DefaultSkipper, - Format: `{"time":"${time_rfc3339_nano}","id":"${id}","remote_ip":"${remote_ip}","host":"${host}",` + - `"method":"${method}","uri":"${uri}","status":${status}, "latency":${latency},` + - `"latency_human":"${latency_human}","bytes_in":${bytes_in},` + - `"bytes_out":${bytes_out}}` + "\n", - Output: os.Stdout, - colorer: color.New(), - } -) - -// Logger returns a middleware that logs HTTP requests. -func Logger() echo.MiddlewareFunc { - return LoggerWithConfig(DefaultLoggerConfig) -} - -// LoggerWithConfig returns a Logger middleware with config. -// See: `Logger()`. -func LoggerWithConfig(config LoggerConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultLoggerConfig.Skipper - } - if config.Format == "" { - config.Format = DefaultLoggerConfig.Format - } - if config.Output == nil { - config.Output = DefaultLoggerConfig.Output - } - - config.template = fasttemplate.New(config.Format, "${", "}") - config.colorer = color.New() - config.colorer.SetOutput(config.Output) - config.pool = &sync.Pool{ - New: func() interface{} { - return bytes.NewBuffer(make([]byte, 256)) - }, - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) (err error) { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - res := c.Response() - start := time.Now() - if err = next(c); err != nil { - c.Error(err) - } - stop := time.Now() - buf := config.pool.Get().(*bytes.Buffer) - buf.Reset() - defer config.pool.Put(buf) - - if _, err = config.template.ExecuteFunc(buf, func(w io.Writer, tag string) (int, error) { - switch tag { - case "time_unix": - return buf.WriteString(strconv.FormatInt(time.Now().Unix(), 10)) - case "time_unix_nano": - return buf.WriteString(strconv.FormatInt(time.Now().UnixNano(), 10)) - case "time_rfc3339": - return buf.WriteString(time.Now().Format(time.RFC3339)) - case "time_rfc3339_nano": - return buf.WriteString(time.Now().Format(time.RFC3339Nano)) - case "id": - id := req.Header.Get(echo.HeaderXRequestID) - if id == "" { - id = res.Header().Get(echo.HeaderXRequestID) - } - return buf.WriteString(id) - case "remote_ip": - return buf.WriteString(c.RealIP()) - case "host": - return buf.WriteString(req.Host) - case "uri": - return buf.WriteString(req.RequestURI) - case "method": - return buf.WriteString(req.Method) - case "path": - p := req.URL.Path - if p == "" { - p = "/" - } - return buf.WriteString(p) - case "referer": - return buf.WriteString(req.Referer()) - case "user_agent": - return buf.WriteString(req.UserAgent()) - case "status": - n := res.Status - s := config.colorer.Green(n) - switch { - case n >= 500: - s = config.colorer.Red(n) - case n >= 400: - s = config.colorer.Yellow(n) - case n >= 300: - s = config.colorer.Cyan(n) - } - return buf.WriteString(s) - case "latency": - l := stop.Sub(start) - return buf.WriteString(strconv.FormatInt(int64(l), 10)) - case "latency_human": - return buf.WriteString(stop.Sub(start).String()) - case "bytes_in": - cl := req.Header.Get(echo.HeaderContentLength) - if cl == "" { - cl = "0" - } - return buf.WriteString(cl) - case "bytes_out": - return buf.WriteString(strconv.FormatInt(res.Size, 10)) - default: - switch { - case strings.HasPrefix(tag, "header:"): - return buf.Write([]byte(c.Request().Header.Get(tag[7:]))) - case strings.HasPrefix(tag, "query:"): - return buf.Write([]byte(c.QueryParam(tag[6:]))) - case strings.HasPrefix(tag, "form:"): - return buf.Write([]byte(c.FormValue(tag[5:]))) - case strings.HasPrefix(tag, "cookie:"): - cookie, err := c.Cookie(tag[7:]) - if err == nil { - return buf.Write([]byte(cookie.Value)) - } - } - } - return 0, nil - }); err != nil { - return - } - - _, err = config.Output.Write(buf.Bytes()) - return - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/logger_test.go b/vendor/github.com/labstack/echo/middleware/logger_test.go deleted file mode 100644 index adaa2186f..000000000 --- a/vendor/github.com/labstack/echo/middleware/logger_test.go +++ /dev/null @@ -1,139 +0,0 @@ -package middleware - -import ( - "bytes" - "errors" - "net/http" - "net/http/httptest" - "net/url" - "strings" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestLogger(t *testing.T) { - // Note: Just for the test coverage, not a real test. - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := Logger()(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - - // Status 2xx - h(c) - - // Status 3xx - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - h = Logger()(func(c echo.Context) error { - return c.String(http.StatusTemporaryRedirect, "test") - }) - h(c) - - // Status 4xx - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - h = Logger()(func(c echo.Context) error { - return c.String(http.StatusNotFound, "test") - }) - h(c) - - // Status 5xx with empty path - req = httptest.NewRequest(echo.GET, "/", nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - h = Logger()(func(c echo.Context) error { - return errors.New("error") - }) - h(c) -} - -func TestLoggerIPAddress(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - buf := new(bytes.Buffer) - e.Logger.SetOutput(buf) - ip := "127.0.0.1" - h := Logger()(func(c echo.Context) error { - return c.String(http.StatusOK, "test") - }) - - // With X-Real-IP - req.Header.Add(echo.HeaderXRealIP, ip) - h(c) - assert.Contains(t, ip, buf.String()) - - // With X-Forwarded-For - buf.Reset() - req.Header.Del(echo.HeaderXRealIP) - req.Header.Add(echo.HeaderXForwardedFor, ip) - h(c) - assert.Contains(t, ip, buf.String()) - - buf.Reset() - h(c) - assert.Contains(t, ip, buf.String()) -} - -func TestLoggerTemplate(t *testing.T) { - buf := new(bytes.Buffer) - - e := echo.New() - e.Use(LoggerWithConfig(LoggerConfig{ - Format: `{"time":"${time_rfc3339_nano}","id":"${id}","remote_ip":"${remote_ip}","host":"${host}","user_agent":"${user_agent}",` + - `"method":"${method}","uri":"${uri}","status":${status}, "latency":${latency},` + - `"latency_human":"${latency_human}","bytes_in":${bytes_in}, "path":"${path}", "referer":"${referer}",` + - `"bytes_out":${bytes_out},"ch":"${header:X-Custom-Header}",` + - `"us":"${query:username}", "cf":"${form:username}", "session":"${cookie:session}"}` + "\n", - Output: buf, - })) - - e.GET("/", func(c echo.Context) error { - return c.String(http.StatusOK, "Header Logged") - }) - - req := httptest.NewRequest(echo.GET, "/?username=apagano-param&password=secret", nil) - req.RequestURI = "/" - req.Header.Add(echo.HeaderXRealIP, "127.0.0.1") - req.Header.Add("Referer", "google.com") - req.Header.Add("User-Agent", "echo-tests-agent") - req.Header.Add("X-Custom-Header", "AAA-CUSTOM-VALUE") - req.Header.Add("X-Request-ID", "6ba7b810-9dad-11d1-80b4-00c04fd430c8") - req.Header.Add("Cookie", "_ga=GA1.2.000000000.0000000000; session=ac08034cd216a647fc2eb62f2bcf7b810") - req.Form = url.Values{ - "username": []string{"apagano-form"}, - "password": []string{"secret-form"}, - } - - rec := httptest.NewRecorder() - e.ServeHTTP(rec, req) - - cases := map[string]bool{ - "apagano-param": true, - "apagano-form": true, - "AAA-CUSTOM-VALUE": true, - "BBB-CUSTOM-VALUE": false, - "secret-form": false, - "hexvalue": false, - "GET": true, - "127.0.0.1": true, - "\"path\":\"/\"": true, - "\"uri\":\"/\"": true, - "\"status\":200": true, - "\"bytes_in\":0": true, - "google.com": true, - "echo-tests-agent": true, - "6ba7b810-9dad-11d1-80b4-00c04fd430c8": true, - "ac08034cd216a647fc2eb62f2bcf7b810": true, - } - - for token, present := range cases { - assert.True(t, strings.Contains(buf.String(), token) == present, "Case: "+token) - } -} diff --git a/vendor/github.com/labstack/echo/middleware/method_override.go b/vendor/github.com/labstack/echo/middleware/method_override.go deleted file mode 100644 index 955fd11ed..000000000 --- a/vendor/github.com/labstack/echo/middleware/method_override.go +++ /dev/null @@ -1,88 +0,0 @@ -package middleware - -import "github.com/labstack/echo" - -type ( - // MethodOverrideConfig defines the config for MethodOverride middleware. - MethodOverrideConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Getter is a function that gets overridden method from the request. - // Optional. Default values MethodFromHeader(echo.HeaderXHTTPMethodOverride). - Getter MethodOverrideGetter - } - - // MethodOverrideGetter is a function that gets overridden method from the request - MethodOverrideGetter func(echo.Context) string -) - -var ( - // DefaultMethodOverrideConfig is the default MethodOverride middleware config. - DefaultMethodOverrideConfig = MethodOverrideConfig{ - Skipper: DefaultSkipper, - Getter: MethodFromHeader(echo.HeaderXHTTPMethodOverride), - } -) - -// MethodOverride returns a MethodOverride middleware. -// MethodOverride middleware checks for the overridden method from the request and -// uses it instead of the original method. -// -// For security reasons, only `POST` method can be overridden. -func MethodOverride() echo.MiddlewareFunc { - return MethodOverrideWithConfig(DefaultMethodOverrideConfig) -} - -// MethodOverrideWithConfig returns a MethodOverride middleware with config. -// See: `MethodOverride()`. -func MethodOverrideWithConfig(config MethodOverrideConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultMethodOverrideConfig.Skipper - } - if config.Getter == nil { - config.Getter = DefaultMethodOverrideConfig.Getter - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - if req.Method == echo.POST { - m := config.Getter(c) - if m != "" { - req.Method = m - } - } - return next(c) - } - } -} - -// MethodFromHeader is a `MethodOverrideGetter` that gets overridden method from -// the request header. -func MethodFromHeader(header string) MethodOverrideGetter { - return func(c echo.Context) string { - return c.Request().Header.Get(header) - } -} - -// MethodFromForm is a `MethodOverrideGetter` that gets overridden method from the -// form parameter. -func MethodFromForm(param string) MethodOverrideGetter { - return func(c echo.Context) string { - return c.FormValue(param) - } -} - -// MethodFromQuery is a `MethodOverrideGetter` that gets overridden method from -// the query parameter. -func MethodFromQuery(param string) MethodOverrideGetter { - return func(c echo.Context) string { - return c.QueryParam(param) - } -} diff --git a/vendor/github.com/labstack/echo/middleware/method_override_test.go b/vendor/github.com/labstack/echo/middleware/method_override_test.go deleted file mode 100644 index 681231a9a..000000000 --- a/vendor/github.com/labstack/echo/middleware/method_override_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package middleware - -import ( - "bytes" - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestMethodOverride(t *testing.T) { - e := echo.New() - m := MethodOverride() - h := func(c echo.Context) error { - return c.String(http.StatusOK, "test") - } - - // Override with http header - req := httptest.NewRequest(echo.POST, "/", nil) - rec := httptest.NewRecorder() - req.Header.Set(echo.HeaderXHTTPMethodOverride, echo.DELETE) - c := e.NewContext(req, rec) - m(h)(c) - assert.Equal(t, echo.DELETE, req.Method) - - // Override with form parameter - m = MethodOverrideWithConfig(MethodOverrideConfig{Getter: MethodFromForm("_method")}) - req = httptest.NewRequest(echo.POST, "/", bytes.NewReader([]byte("_method="+echo.DELETE))) - rec = httptest.NewRecorder() - req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationForm) - c = e.NewContext(req, rec) - m(h)(c) - assert.Equal(t, echo.DELETE, req.Method) - - // Override with query parameter - m = MethodOverrideWithConfig(MethodOverrideConfig{Getter: MethodFromQuery("_method")}) - req = httptest.NewRequest(echo.POST, "/?_method="+echo.DELETE, nil) - rec = httptest.NewRecorder() - c = e.NewContext(req, rec) - m(h)(c) - assert.Equal(t, echo.DELETE, req.Method) - - // Ignore `GET` - req = httptest.NewRequest(echo.GET, "/", nil) - req.Header.Set(echo.HeaderXHTTPMethodOverride, echo.DELETE) - assert.Equal(t, echo.GET, req.Method) -} diff --git a/vendor/github.com/labstack/echo/middleware/middleware.go b/vendor/github.com/labstack/echo/middleware/middleware.go deleted file mode 100644 index efcbab913..000000000 --- a/vendor/github.com/labstack/echo/middleware/middleware.go +++ /dev/null @@ -1,14 +0,0 @@ -package middleware - -import "github.com/labstack/echo" - -type ( - // Skipper defines a function to skip middleware. Returning true skips processing - // the middleware. - Skipper func(c echo.Context) bool -) - -// DefaultSkipper returns false which processes the middleware. -func DefaultSkipper(echo.Context) bool { - return false -} diff --git a/vendor/github.com/labstack/echo/middleware/proxy.go b/vendor/github.com/labstack/echo/middleware/proxy.go deleted file mode 100644 index 4f55f39d4..000000000 --- a/vendor/github.com/labstack/echo/middleware/proxy.go +++ /dev/null @@ -1,176 +0,0 @@ -package middleware - -import ( - "fmt" - "io" - "math/rand" - "net" - "net/http" - "net/http/httputil" - "net/url" - "sync/atomic" - "time" - - "github.com/labstack/echo" -) - -// TODO: Handle TLS proxy - -type ( - // ProxyConfig defines the config for Proxy middleware. - ProxyConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Balancer defines a load balancing technique. - // Required. - // Possible values: - // - RandomBalancer - // - RoundRobinBalancer - Balancer ProxyBalancer - } - - // ProxyTarget defines the upstream target. - ProxyTarget struct { - URL *url.URL - } - - // RandomBalancer implements a random load balancing technique. - RandomBalancer struct { - Targets []*ProxyTarget - random *rand.Rand - } - - // RoundRobinBalancer implements a round-robin load balancing technique. - RoundRobinBalancer struct { - Targets []*ProxyTarget - i uint32 - } - - // ProxyBalancer defines an interface to implement a load balancing technique. - ProxyBalancer interface { - Next() *ProxyTarget - } -) - -var ( - // DefaultProxyConfig is the default Proxy middleware config. - DefaultProxyConfig = ProxyConfig{ - Skipper: DefaultSkipper, - } -) - -func proxyHTTP(t *ProxyTarget) http.Handler { - return httputil.NewSingleHostReverseProxy(t.URL) -} - -func proxyRaw(t *ProxyTarget, c echo.Context) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - in, _, err := c.Response().Hijack() - if err != nil { - c.Error(fmt.Errorf("proxy raw, hijack error=%v, url=%s", t.URL, err)) - return - } - defer in.Close() - - out, err := net.Dial("tcp", t.URL.Host) - if err != nil { - he := echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("proxy raw, dial error=%v, url=%s", t.URL, err)) - c.Error(he) - return - } - defer out.Close() - - // Write header - err = r.Write(out) - if err != nil { - he := echo.NewHTTPError(http.StatusBadGateway, fmt.Sprintf("proxy raw, request header copy error=%v, url=%s", t.URL, err)) - c.Error(he) - return - } - - errc := make(chan error, 2) - cp := func(dst io.Writer, src io.Reader) { - _, err := io.Copy(dst, src) - errc <- err - } - - go cp(out, in) - go cp(in, out) - err = <-errc - if err != nil && err != io.EOF { - c.Logger().Errorf("proxy raw, copy body error=%v, url=%s", t.URL, err) - } - }) -} - -// Next randomly returns an upstream target. -func (r *RandomBalancer) Next() *ProxyTarget { - if r.random == nil { - r.random = rand.New(rand.NewSource(int64(time.Now().Nanosecond()))) - } - return r.Targets[r.random.Intn(len(r.Targets))] -} - -// Next returns an upstream target using round-robin technique. -func (r *RoundRobinBalancer) Next() *ProxyTarget { - r.i = r.i % uint32(len(r.Targets)) - t := r.Targets[r.i] - atomic.AddUint32(&r.i, 1) - return t -} - -// Proxy returns a Proxy middleware. -// -// Proxy middleware forwards the request to upstream server using a configured load balancing technique. -func Proxy(balancer ProxyBalancer) echo.MiddlewareFunc { - c := DefaultProxyConfig - c.Balancer = balancer - return ProxyWithConfig(c) -} - -// ProxyWithConfig returns a Proxy middleware with config. -// See: `Proxy()` -func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultLoggerConfig.Skipper - } - if config.Balancer == nil { - panic("echo: proxy middleware requires balancer") - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) (err error) { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - res := c.Response() - tgt := config.Balancer.Next() - - // Fix header - if req.Header.Get(echo.HeaderXRealIP) == "" { - req.Header.Set(echo.HeaderXRealIP, c.RealIP()) - } - if req.Header.Get(echo.HeaderXForwardedProto) == "" { - req.Header.Set(echo.HeaderXForwardedProto, c.Scheme()) - } - if c.IsWebSocket() && req.Header.Get(echo.HeaderXForwardedFor) == "" { // For HTTP, it is automatically set by Go HTTP reverse proxy. - req.Header.Set(echo.HeaderXForwardedFor, c.RealIP()) - } - - // Proxy - switch { - case c.IsWebSocket(): - proxyRaw(tgt, c).ServeHTTP(res, req) - case req.Header.Get(echo.HeaderAccept) == "text/event-stream": - default: - proxyHTTP(tgt).ServeHTTP(res, req) - } - - return - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/proxy_test.go b/vendor/github.com/labstack/echo/middleware/proxy_test.go deleted file mode 100644 index bfe6bb433..000000000 --- a/vendor/github.com/labstack/echo/middleware/proxy_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package middleware - -import ( - "fmt" - "net/http" - "net/http/httptest" - "testing" - - "net/url" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -type ( - closeNotifyRecorder struct { - *httptest.ResponseRecorder - closed chan bool - } -) - -func newCloseNotifyRecorder() *closeNotifyRecorder { - return &closeNotifyRecorder{ - httptest.NewRecorder(), - make(chan bool, 1), - } -} - -func (c *closeNotifyRecorder) close() { - c.closed <- true -} - -func (c *closeNotifyRecorder) CloseNotify() <-chan bool { - return c.closed -} - -func TestProxy(t *testing.T) { - // Setup - t1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, "target 1") - })) - defer t1.Close() - url1, _ := url.Parse(t1.URL) - t2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - fmt.Fprint(w, "target 2") - })) - defer t2.Close() - url2, _ := url.Parse(t2.URL) - - targets := []*ProxyTarget{ - &ProxyTarget{ - URL: url1, - }, - &ProxyTarget{ - URL: url2, - }, - } - rb := &RandomBalancer{ - Targets: targets, - } - - // Random - e := echo.New() - e.Use(Proxy(rb)) - req := httptest.NewRequest(echo.GET, "/", nil) - rec := newCloseNotifyRecorder() - e.ServeHTTP(rec, req) - body := rec.Body.String() - expected := map[string]bool{ - "target 1": true, - "target 2": true, - } - assert.Condition(t, func() bool { - return expected[body] - }) - - // Round-robin - rrb := &RoundRobinBalancer{ - Targets: targets, - } - e = echo.New() - e.Use(Proxy(rrb)) - rec = newCloseNotifyRecorder() - e.ServeHTTP(rec, req) - body = rec.Body.String() - assert.Equal(t, "target 1", body) - rec = newCloseNotifyRecorder() - e.ServeHTTP(rec, req) - body = rec.Body.String() - assert.Equal(t, "target 2", body) -} diff --git a/vendor/github.com/labstack/echo/middleware/recover.go b/vendor/github.com/labstack/echo/middleware/recover.go deleted file mode 100644 index 96fa62c90..000000000 --- a/vendor/github.com/labstack/echo/middleware/recover.go +++ /dev/null @@ -1,85 +0,0 @@ -package middleware - -import ( - "fmt" - "runtime" - - "github.com/labstack/echo" - "github.com/labstack/gommon/color" -) - -type ( - // RecoverConfig defines the config for Recover middleware. - RecoverConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Size of the stack to be printed. - // Optional. Default value 4KB. - StackSize int `json:"stack_size"` - - // DisableStackAll disables formatting stack traces of all other goroutines - // into buffer after the trace for the current goroutine. - // Optional. Default value false. - DisableStackAll bool `json:"disable_stack_all"` - - // DisablePrintStack disables printing stack trace. - // Optional. Default value as false. - DisablePrintStack bool `json:"disable_print_stack"` - } -) - -var ( - // DefaultRecoverConfig is the default Recover middleware config. - DefaultRecoverConfig = RecoverConfig{ - Skipper: DefaultSkipper, - StackSize: 4 << 10, // 4 KB - DisableStackAll: false, - DisablePrintStack: false, - } -) - -// Recover returns a middleware which recovers from panics anywhere in the chain -// and handles the control to the centralized HTTPErrorHandler. -func Recover() echo.MiddlewareFunc { - return RecoverWithConfig(DefaultRecoverConfig) -} - -// RecoverWithConfig returns a Recover middleware with config. -// See: `Recover()`. -func RecoverWithConfig(config RecoverConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultRecoverConfig.Skipper - } - if config.StackSize == 0 { - config.StackSize = DefaultRecoverConfig.StackSize - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - defer func() { - if r := recover(); r != nil { - var err error - switch r := r.(type) { - case error: - err = r - default: - err = fmt.Errorf("%v", r) - } - stack := make([]byte, config.StackSize) - length := runtime.Stack(stack, !config.DisableStackAll) - if !config.DisablePrintStack { - c.Logger().Printf("[%s] %s %s\n", color.Red("PANIC RECOVER"), err, stack[:length]) - } - c.Error(err) - } - }() - return next(c) - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/recover_test.go b/vendor/github.com/labstack/echo/middleware/recover_test.go deleted file mode 100644 index 34c2bf31a..000000000 --- a/vendor/github.com/labstack/echo/middleware/recover_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package middleware - -import ( - "bytes" - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestRecover(t *testing.T) { - e := echo.New() - buf := new(bytes.Buffer) - e.Logger.SetOutput(buf) - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - h := Recover()(echo.HandlerFunc(func(c echo.Context) error { - panic("test") - })) - h(c) - assert.Equal(t, http.StatusInternalServerError, rec.Code) - assert.Contains(t, buf.String(), "PANIC RECOVER") -} diff --git a/vendor/github.com/labstack/echo/middleware/redirect.go b/vendor/github.com/labstack/echo/middleware/redirect.go deleted file mode 100644 index b87dab091..000000000 --- a/vendor/github.com/labstack/echo/middleware/redirect.go +++ /dev/null @@ -1,215 +0,0 @@ -package middleware - -import ( - "net/http" - - "github.com/labstack/echo" -) - -type ( - // RedirectConfig defines the config for Redirect middleware. - RedirectConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Status code to be used when redirecting the request. - // Optional. Default value http.StatusMovedPermanently. - Code int `json:"code"` - } -) - -const ( - www = "www" -) - -var ( - // DefaultRedirectConfig is the default Redirect middleware config. - DefaultRedirectConfig = RedirectConfig{ - Skipper: DefaultSkipper, - Code: http.StatusMovedPermanently, - } -) - -// HTTPSRedirect redirects http requests to https. -// For example, http://labstack.com will be redirect to https://labstack.com. -// -// Usage `Echo#Pre(HTTPSRedirect())` -func HTTPSRedirect() echo.MiddlewareFunc { - return HTTPSRedirectWithConfig(DefaultRedirectConfig) -} - -// HTTPSRedirectWithConfig returns an HTTPSRedirect middleware with config. -// See `HTTPSRedirect()`. -func HTTPSRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultTrailingSlashConfig.Skipper - } - if config.Code == 0 { - config.Code = DefaultRedirectConfig.Code - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - host := req.Host - uri := req.RequestURI - if !c.IsTLS() { - return c.Redirect(config.Code, "https://"+host+uri) - } - return next(c) - } - } -} - -// HTTPSWWWRedirect redirects http requests to https www. -// For example, http://labstack.com will be redirect to https://www.labstack.com. -// -// Usage `Echo#Pre(HTTPSWWWRedirect())` -func HTTPSWWWRedirect() echo.MiddlewareFunc { - return HTTPSWWWRedirectWithConfig(DefaultRedirectConfig) -} - -// HTTPSWWWRedirectWithConfig returns an HTTPSRedirect middleware with config. -// See `HTTPSWWWRedirect()`. -func HTTPSWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultTrailingSlashConfig.Skipper - } - if config.Code == 0 { - config.Code = DefaultRedirectConfig.Code - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - host := req.Host - uri := req.RequestURI - if !c.IsTLS() && host[:3] != www { - return c.Redirect(config.Code, "https://www."+host+uri) - } - return next(c) - } - } -} - -// HTTPSNonWWWRedirect redirects http requests to https non www. -// For example, http://www.labstack.com will be redirect to https://labstack.com. -// -// Usage `Echo#Pre(HTTPSNonWWWRedirect())` -func HTTPSNonWWWRedirect() echo.MiddlewareFunc { - return HTTPSNonWWWRedirectWithConfig(DefaultRedirectConfig) -} - -// HTTPSNonWWWRedirectWithConfig returns an HTTPSRedirect middleware with config. -// See `HTTPSNonWWWRedirect()`. -func HTTPSNonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultTrailingSlashConfig.Skipper - } - if config.Code == 0 { - config.Code = DefaultRedirectConfig.Code - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - host := req.Host - uri := req.RequestURI - if !c.IsTLS() { - if host[:3] == www { - return c.Redirect(config.Code, "https://"+host[4:]+uri) - } - return c.Redirect(config.Code, "https://"+host+uri) - } - return next(c) - } - } -} - -// WWWRedirect redirects non www requests to www. -// For example, http://labstack.com will be redirect to http://www.labstack.com. -// -// Usage `Echo#Pre(WWWRedirect())` -func WWWRedirect() echo.MiddlewareFunc { - return WWWRedirectWithConfig(DefaultRedirectConfig) -} - -// WWWRedirectWithConfig returns an HTTPSRedirect middleware with config. -// See `WWWRedirect()`. -func WWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultTrailingSlashConfig.Skipper - } - if config.Code == 0 { - config.Code = DefaultRedirectConfig.Code - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - scheme := c.Scheme() - host := req.Host - if host[:3] != www { - uri := req.RequestURI - return c.Redirect(config.Code, scheme+"://www."+host+uri) - } - return next(c) - } - } -} - -// NonWWWRedirect redirects www requests to non www. -// For example, http://www.labstack.com will be redirect to http://labstack.com. -// -// Usage `Echo#Pre(NonWWWRedirect())` -func NonWWWRedirect() echo.MiddlewareFunc { - return NonWWWRedirectWithConfig(DefaultRedirectConfig) -} - -// NonWWWRedirectWithConfig returns an HTTPSRedirect middleware with config. -// See `NonWWWRedirect()`. -func NonWWWRedirectWithConfig(config RedirectConfig) echo.MiddlewareFunc { - if config.Skipper == nil { - config.Skipper = DefaultTrailingSlashConfig.Skipper - } - if config.Code == 0 { - config.Code = DefaultRedirectConfig.Code - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - scheme := c.Scheme() - host := req.Host - if host[:3] == www { - uri := req.RequestURI - return c.Redirect(config.Code, scheme+"://"+host[4:]+uri) - } - return next(c) - } - } -} diff --git a/vendor/github.com/labstack/echo/middleware/redirect_test.go b/vendor/github.com/labstack/echo/middleware/redirect_test.go deleted file mode 100644 index abc12c0fd..000000000 --- a/vendor/github.com/labstack/echo/middleware/redirect_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package middleware - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestRedirectHTTPSRedirect(t *testing.T) { - e := echo.New() - next := func(c echo.Context) (err error) { - return c.NoContent(http.StatusOK) - } - req := httptest.NewRequest(echo.GET, "/", nil) - req.Host = "labstack.com" - res := httptest.NewRecorder() - c := e.NewContext(req, res) - HTTPSRedirect()(next)(c) - assert.Equal(t, http.StatusMovedPermanently, res.Code) - assert.Equal(t, "https://labstack.com/", res.Header().Get(echo.HeaderLocation)) -} - -func TestRedirectHTTPSWWWRedirect(t *testing.T) { - e := echo.New() - next := func(c echo.Context) (err error) { - return c.NoContent(http.StatusOK) - } - req := httptest.NewRequest(echo.GET, "/", nil) - req.Host = "labstack.com" - res := httptest.NewRecorder() - c := e.NewContext(req, res) - HTTPSWWWRedirect()(next)(c) - assert.Equal(t, http.StatusMovedPermanently, res.Code) - assert.Equal(t, "https://www.labstack.com/", res.Header().Get(echo.HeaderLocation)) -} - -func TestRedirectHTTPSNonWWWRedirect(t *testing.T) { - e := echo.New() - next := func(c echo.Context) (err error) { - return c.NoContent(http.StatusOK) - } - req := httptest.NewRequest(echo.GET, "/", nil) - req.Host = "www.labstack.com" - res := httptest.NewRecorder() - c := e.NewContext(req, res) - HTTPSNonWWWRedirect()(next)(c) - assert.Equal(t, http.StatusMovedPermanently, res.Code) - assert.Equal(t, "https://labstack.com/", res.Header().Get(echo.HeaderLocation)) -} - -func TestRedirectWWWRedirect(t *testing.T) { - e := echo.New() - next := func(c echo.Context) (err error) { - return c.NoContent(http.StatusOK) - } - req := httptest.NewRequest(echo.GET, "/", nil) - req.Host = "labstack.com" - res := httptest.NewRecorder() - c := e.NewContext(req, res) - WWWRedirect()(next)(c) - assert.Equal(t, http.StatusMovedPermanently, res.Code) - assert.Equal(t, "http://www.labstack.com/", res.Header().Get(echo.HeaderLocation)) -} - -func TestRedirectNonWWWRedirect(t *testing.T) { - e := echo.New() - next := func(c echo.Context) (err error) { - return c.NoContent(http.StatusOK) - } - req := httptest.NewRequest(echo.GET, "/", nil) - req.Host = "www.labstack.com" - res := httptest.NewRecorder() - c := e.NewContext(req, res) - NonWWWRedirect()(next)(c) - assert.Equal(t, http.StatusMovedPermanently, res.Code) - assert.Equal(t, "http://labstack.com/", res.Header().Get(echo.HeaderLocation)) -} diff --git a/vendor/github.com/labstack/echo/middleware/request_id.go b/vendor/github.com/labstack/echo/middleware/request_id.go deleted file mode 100644 index f376c296d..000000000 --- a/vendor/github.com/labstack/echo/middleware/request_id.go +++ /dev/null @@ -1,64 +0,0 @@ -package middleware - -import ( - "github.com/labstack/echo" - "github.com/labstack/gommon/random" -) - -type ( - // RequestIDConfig defines the config for RequestID middleware. - RequestIDConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // Generator defines a function to generate an ID. - // Optional. Default value random.String(32). - Generator func() string - } -) - -var ( - // DefaultRequestIDConfig is the default RequestID middleware config. - DefaultRequestIDConfig = RequestIDConfig{ - Skipper: DefaultSkipper, - Generator: generator, - } -) - -// RequestID returns a X-Request-ID middleware. -func RequestID() echo.MiddlewareFunc { - return RequestIDWithConfig(DefaultRequestIDConfig) -} - -// RequestIDWithConfig returns a X-Request-ID middleware with config. -func RequestIDWithConfig(config RequestIDConfig) echo.MiddlewareFunc { - // Defaults - if config.Skipper == nil { - config.Skipper = DefaultRequestIDConfig.Skipper - } - if config.Generator == nil { - config.Generator = generator - } - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if config.Skipper(c) { - return next(c) - } - - req := c.Request() - res := c.Response() - rid := req.Header.Get(echo.HeaderXRequestID) - if rid == "" { - rid = config.Generator() - } - res.Header().Set(echo.HeaderXRequestID, rid) - - return next(c) - } - } -} - -func generator() string { - return random.String(32) -} diff --git a/vendor/github.com/labstack/echo/middleware/request_id_test.go b/vendor/github.com/labstack/echo/middleware/request_id_test.go deleted file mode 100644 index 0e9536742..000000000 --- a/vendor/github.com/labstack/echo/middleware/request_id_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package middleware - -import ( - "net/http" - "net/http/httptest" - "testing" - - "github.com/labstack/echo" - "github.com/stretchr/testify/assert" -) - -func TestRequestID(t *testing.T) { - e := echo.New() - req := httptest.NewRequest(echo.GET, "/", nil) - rec := httptest.NewRecorder() - c := e.NewContext(req, rec) - handler := func(c echo.Context) error { - return c.String(http.StatusOK, "test") - } - - rid := RequestIDWithConfig(RequestIDConfig{}) - h := rid(handler) - h(c) - assert.Len(t, rec.Header().Get(echo.HeaderXRequestID), 32) - - // Custom generator - rid = RequestIDWithConfig(RequestIDConfig{ - Generator: func() string { return "customGenerator" }, - }) - h = rid(handler) - h(c) - assert.Equal(t, rec.Header().Get(echo.HeaderXRequestID), "customGenerator") -} diff --git a/vendor/github.com/labstack/echo/middleware/secure.go b/vendor/github.com/labstack/echo/middleware/secure.go deleted file mode 100644 index 0125e74a7..000000000 --- a/vendor/github.com/labstack/echo/middleware/secure.go +++ /dev/null @@ -1,116 +0,0 @@ -package middleware - -import ( - "fmt" - - "github.com/labstack/echo" -) - -type ( - // SecureConfig defines the config for Secure middleware. - SecureConfig struct { - // Skipper defines a function to skip middleware. - Skipper Skipper - - // XSSProtection provides protection against cross-site scripting attack (XSS) - // by setting the `X-XSS-Protection` header. - // Optional. Default value "1; mode=block". - XSSProtection string `json:"xss_protection"` - - // ContentTypeNosniff provides protection against overriding Content-Type - // header by setting the `X-Content-Type-Options` header. - // Optional. Default value "nosniff". - ContentTypeNosniff string `json:"content_type_nosniff"` - - // XFrameOptions can be used to indicate whether or not a browser should - // be allowed to render a page in a ,

^J3SC{O=CWxCY&tzNKiT7Ed?5&{U3B&KGl|Qi^kMOQv-cdv&|b# zHv+SZnT-wAe#7(YZP%L^B$3jDwEgJu(xPef1bPBj%~dC;>1=x8>E5aNpVdk9wEbN6 znfaFOK%PuQ9ON7bZ#)?~79(fcCXQqA`D`Z^Rgu8`diJp@{pdoRYN4v4B4!~qJ-xju zz9IuzeC7N8f2iUny2fVW&qlO$b@fXohTE2YkVtuxm^Lfs2*8}h`MmELTD7An)$top z>)iW4A+RHqf!yXsIQ;4yji&n6bje&nP9`W_hdwjbH)&I*Wh8ZLl=GX0)U9S4oXxg6 zZ{12VGBnnQ1(;YF+gRC~?6xwY(n4ZEb7U-Fc{#E{b-*pmQcv9y{)P@%LPCS`v-JaK zT8IV_uYiNZn#0rZdHL1O0GRqoE^pN`*{DwiyuB!#aE=KF62E}$cw>RQ+gAg zsYe&`UP`U3`0(qQqqLS-DIYLd2FV&Z7OZ9beu-$Fy5@4Pb z6%`PyADnHMZKoHEky+BJHLEtSH`ZHcVG(Ar7F!#4+W1&I9@$}i^N1`Z}+u zyi=Qw=EXF5SA_bhQsc@)(<>q}u&VxP-`GS?*T*03`fjmreyMNxr#i(*y+SY|FB7<- zD&PpDJk~K?2M(O7O=WZpM`W%ZI&sp{EfdLxXo|~@txkZj&oI8f*6T%cbPRVShlPZM z#D<5PS=s3u8DSG|fYF-ZZ2e%+oP!-UfH)X$UQIF%U!9HeWsmU-pG8@J7J`j}&tbIQ z+S<{5tvflT?#xdObSDT|o*GbB3%T4RuJ9Z)`NCCN zY)F{#>hap_GezrY3Wg~|+7OjT3*K0kle_;}|XMc1yy z$2TV>jf%nkGC}`HjgpA$0<@fqWrFW{_|MQg1>#9aGQhu16cF2;{t<%wz=60#_pdGA zQYR#Ex%{7)qSI_)Y)E7XEs7QyYn7N}a?r%~O%u#hSUOW(Tx@r5^^M)@>+4KfV_;-p zVn{O9vr4itNlJ3tZ*K0D7T_2{^9rMxxJSiC(=r>_v}kiWo1c=zEli*{@X2IqA-7<@ zh)L1fBhoDf*e-}C;vkz>3ah^5K?(!o;_$)KVhple11Wk?gIgQTKrF(Zh{Bw!Q8r!I#@`l`!c zi87)Hf^SQ-jfv!w_vWru=OAUhaDO0CSm46;%@k5IU0hBHAa`bPTpq*eA77VFTTbKCQR$>Gl|b{yVw~P=d z3=WBRgDu98<0@Q&37mDX67^AAcaqNd*F>^iooNO>OPEi{rzytxqraRR!ji z@2WTy5$7M1TD7Iz`+zDi=$U9%U8o5M@M-iZal% zBN^G5t}c6CZY*#!^&6N=h@@7dR~*C@GVH9bPHo@K{nFELN^ijCYQ;XLNq^q|ZAdG;UY> z7yj)T54L-~<*q85t>WG@_0-w!Jhz$v$g?NSA(AGJaSUK24kyaZS z6S~$92FY)>vopnp=HNBKo3o9wadS3{FW-IFWY1@M*ztZC8($6|w*Knyw!^q_A0}^K z!IJZ~BZSs>ypnPRAIOfU2cF#Hh|#6wKmeNXc@1bj)45FYd})7AS5Irj<+0)MEA7w9 z;{q!V>}vWvFx6ibxa-0DGgY52e!jR^{_xqK{ffq#$yyYxW&LtQHK|-9Rce$x@cTjM zVsxJwFf3HaI%mff*uFyUcxtuI#N~%=FvaJt-x9KELUuSilg6fj*J&1CW{2BnuUVa~ zA0BL%9gMpX8Ll=Ax4?^Au!Ef$QMo~EoNbc$Nl~_L25xBv_GzT`ULotq`@?tInERwf zoiN$oKqK$ZjHV}?E(|*%bajnAolvd5aPM9+n3u`K`BB*sZi$vHPg9I^zO3eV(s*6P z<+i>jqZzNp9O@`PkP+{HH1yM|R}Y{&^YZ&0!*?@g(2NA;Nu>f?BnFiT=PaItB|G;> z=ES5--_}esVNF_g15yalbVaU?7pNT%0zLHZS;BU$*E=+RI`!3C1&z7ahRpK z>^67a?SlKSP#s*HF&1pR*V64E>CHEd4hGng0vt#VHs(gbdaDuOOh^`MNzd=m!v+HE zD8L;$$e(PpUb_?ffUI4~m`-tb-)a3^iqFny*FrU2-4a9;t#C9k;pssL@;nVoIwGi% zl%lU(+t~fEGriI;9f>>E7xUsUD^%%M?jP^nG1C$8hyTo9fBntVmB%$*#^H@!>>f;H z12$xXjbIXJvXT&*vtSJZW&;HlM}#`=iGi$$h{MWFXAp=MA{BH%fgGiiL(Iz1C`GbE zR8Uu>r9t)Sdxr(_A z0$UfPC8dZcl(ZzN#zR9#%1#wA=?srh4F{cOwo4h4=Bf15d&YWG0|S{`x3a>Y$-p$H z8?=qwpyaoDb@T%dtae+y_h4!S*hBKvy(bTvOs2lsMYIgp4JZ;GI6d@13nO>8Ihnw( zet+?si)Wu)SGw-;xWjSUEtS>#FqvK15w)%B?&_#hKb82;|NZwLf4z06;@zoh7cU(u z1iob+KlIu0fm1$Rst>+3>tN^bI(ha%i^i8c-a}-fMQ_l@CS3MGm}FT zDxgbhRgF$nmkuAN^i~pCUW_u9hD{{YGkFvymndb|OOvE9c%U>C0voo@CbH`JYyqE7 z%S*2CEYRyKWO)@8%8G)#0=-IQsxhgJs9}m~dUI5UT_#zrsl2nc`@0bQVt8IBOba)c zwHV+~a<&1XMEP>;%lS3hn4{W`(k-Q>>(*@BxA}#2G0(>Pw?tJxaO$VvkN*7g?>|33 zG+_Va=g@QZm+}uBXc(M0^6J}fUmE&uMab~b(-&!1cwxpKmO9=0;@?UnC8JJmX1X`b%C`tvlhL}z%z@rEp7uuDZ7 zo<$$Gl;1khlF5Gfo?GK1HdUIjMwb_wuBu7T)bOZ~Tw`L;hv&=lkuZdzzQXkZ$$kOC z$n|O2%Od>He+ zohpx~R0@=t*jO32zFt~Z&u0-Un6P*$5f7P6p=*2yOmdP7kqd<;9*vs97ZN?`PQEOS z0NO0yRiEsu;4|cWb#%HxohH|zLm`Vc%A-{V6Hxle+s-{><48G?%;1a)tMU&70hT^} z43z$k2jSn}*#(yY^;73UVfY7*$tZ=!MTowV<%pH|F1s}$2=HwIR1x^e{OC0 z==YwU>9-rI4wb}6dk-~kZ7eEWud(0*sOyS8&; zc&>Ms5jMW7Hm9%#P*g$kGGWj%1|tX;-jz!ANJ3nPfAb)+rED@Y$q7btLenH^X(>V- zEmT0GS75%AEa3B4L{GN2CoO|U#ZW=`{o?SzFtIpHrVtzC^1KK|pFwX@mk(aXnP+7! z8oRT6vox9u^V{1bMypCAsl8zxw9* z$7fHUzH+7K`1Y^H9{#jzwEEgW|MluLNK{Q8PkB*QTBEsab^$1(E8@Ar7 zF7ND~xl@e5>WnXlzl~NL(oVkvRRz~ZbB}@73dU#flck&A*xUi>(3tHVTJ5%HgCE_p zCU?X3(x{_x4}NcSH*R!K8P!F3=#l2h#C*M{ zx4_$r=HM<%Wf?kF*Kfs@hPs9Xj83f#Uj=x8$lpTJ#r-uU-IhES#r%?&+mEGiN| zt>f3^g$h-n1)&8TPSG+lmm~r^)Pv#bL4iUxh0l~S$xNavmCW^^Q?sF=>cU~r1+FQc z$pWf`&vj)$Zr9h7%kbjyyr_JyVCyMF7E3_jQRyB8 zj#Nlbqthidz8Z-rNuuG1D3Jkv=)TmG>nRjAJBdiFFJqL&l9BV)ds0$(z-TEzZorgx z7evP@#6^4cM!8xXT`up_^_lAA>T&~6!2Y2d-|g7lT$nxS_JG^Ty$2t<*l=Rgqo+3H zLOc|rO3w!G>(Kfi-Wa@YyW_!9d=bQjhaD%6o~-`%D#l&gfW#eWKh)6NFol=@L@7@<{w?&jLA*2zBB*-$ey~||AJ@Q%<>a}Q@s8j`f z9XNn|0fEKl)t9lU0u~oyYAm8hJ(Ec!N{P7pJ`9dX6tFXtK$cK_m?SQbz~zH4D@mb+ z(geb?ydZairy$5PnZyesxeJ1}dMcFqt%|%%gDgxPW&rg-A(NS8261oi$c^K(0H*v# znwkzaVI1(Tu^wnQtSxyorg}@qzK(71aSKmY#xHE{S}18bdb1__e77nA1hADi`t7&u!?%Zj`)z6KO9|{!E|=v5EvO0AUu!;2abZ;J!%oR}qy-Fz*@Pb{W6cI&AVUi?h!Dy01 zDH`aA)9C3W&U(6VXAXTmQzFbGpwZ$*Lr2Q%{&4SSFbR(_st9-3y4p=1CYQ;>6nTIu z4Jz9=#|JL?9Y`Md;;Ge7J2T$Fm#b791N(tK;HhP91BF zIu_pAbk zS-S(1U)(zGyJgmX&TgtxtI-lx$z;Hv-Q9Ii5@oV@JcKS^Ave;6;RE;0b0zWp7#hEH zjt~*tg(&rK@%8g1Joz^3n4M9Yxc$keSe!`>p3!Pa!G>b%cH>%*z1Klykpcl7wEe`);MN3~k)xMMy( zc)oODzO*Z5Avf27F%E^};Dsq66dVdIW~+H;L%U^vW1@L~R^oe!AuC?lvGSKshgYCF zFK%3kt3F<3o|+wAdHc0R@csJS+}vybb~=ZLC&zmSdu^S%U9~!tl{$4@C?b#&Ghc#0 z&sdr_i-+9Yg9y41)rUl<`-;+bl6(S0bQcL-D9TyyD4&vr z18HC8cCGOr{p63cXECSTv1NXrzr!C9E!P3HfyYj@mUJmnqocY88qB*7Ou^dQ3lSX5 z2~#0p<~3XoNf<0nFyF8@6gHb18bcCS+SQkm{W{N#&)vK7<$LbAetUXwdUz#V-1U%g z`|qIqcXroxmm6yhIw?(H5HLGL2_)6*Vb5Nmm=IvvHZTh zvIp*49vybyeXHd!rrwo$R~X3Rtvv%6Xd9R~5_D|MT~TWHJVWZ?f+${KVeVR?mfl7 z-0piizZ~=@>l{q{-a9kXgPnVZ?u0l~8vB_cm1muL$X;%<88P>x(&_6|>FBla^}?JW zjy{0z?Lz|-6z9z#ijc=ZFx`bK(ulYaX(15n^VyhgBqed!n0;Y08H^n0!=q7^EQu5_ z2xU|VchTxuWs5P+J2o%Y9kC-EZ3%qEPIOqRTeL#av^ua!X=oAyyMZXj@hZu;S3cQv zSIdP*$4+gC(w1ob7fRwC{>Qc>Y0q6a)%EBCUe(Q~4t~*}xU;#c%C8;mR15m{K-aAA zCA`^aS&`Lvz4+c6{j0Ke?Hbc2 zd5&>-&X}SuLI$f=DBLqMV#B>-Gh&&sEEXY!$q|yXef@Sy0wmmJWQGQOp>!$R!wJxc z=yZG`0D;S)`vzpY?i7+Dd0bHtTObq&7+!2HE;|Dv2g%7n1VNb~7AZZ-S2(<|5t-HlSzI(7e0Zj5c*b;o$Y_mWDxVqO}v=Zv56rL1F*J)No^O?Ik0Y ze(0A~*2(gkBDL6PFdR<+tqZQs}x>hCBz5#V8BBqIu=AgDw{1J z2v})Mz9^K#$qrZ+8Q?34qz3u1T^NxJczcnb$d%3^Xeb^O3Q-^-5;+7egnCFkBC1va zgF$2D=yM8WLRyeOuY?;>gsJ6jXhALCyF4t_xd7Zm;N#xtgO4=zoE~W(Go?QA(Abx! z$DWFUf@pk8+@_lg59gLdJ#yjZrlx~y@4HK{?;0rF{dDvG#=`61Wi&VMPq2c3idWE> zXjy?9Uwr%Wg#F}QDRSE`paQtiioV&91f;A6gTZ$2xs!8tOLOD6EmIa~f>Odcl|C<1 zta(Ps$gHSvqn9aJK`8`2bhU&OK7~Z(feR~QQlxBbkEhZ2Nz-<6BeNs3G3Vy$=i=*u zP(X!NIFm>&i*@zlk6i_B}5 zZR&JE#YByX|9p=6t-B>8@SXF1-+OzW=l%GjZ_nKG^k2|+$3Tnji;p~X@k@L3;>FtP z?aCs$YYT7qR-a#f7e4K-xh|aY+*DT=>e;yQE*%fc`2JSKoTVw+fw3cr^jfAZCa^X6)+U@~PL)O)#Ma@_ zk-BMk#wIB@7&nPzav9!lP!c4N$Tum(0Rxg*x0UOz#uw6zVCQt=}b3M%P<#DO}=^wwQJyno{aG_O#npRTrR>&@&f{mYzm+QQUoCqb{!~0gC_;(m9y-x@ zGIj!GjuVlcW*yquNi=Ex;gtW~ptjZngsWi%$)zqL6%*92e@$1MtIBvKBE3Y}7+ zCirS2m?6;8KiP1<=>E3G@m7(8GE$-Vc;Yk$jo3gW>%@4ol@>5WAP5zW7CYKcf$jR< z`|n>?UHKmCHSVjQzSn*G@!O9)a(t@2_srzo4}?FYQq|1xam)5XR}N_pkn1CJBW!SX z$Jx2{vj7|eQZWVCec=mNd-J)np8?;hx)|;Fd~d5vQRQ}~W1iaHDOZ?gv(8@$``_O> z+M6~Hj`lmu;nOM2#2pE>O{(_DiMk@Xf=_1Lne}RlWv*C5R__yBoFl(Er)B; zb7iDNA{O(SR6=7=frD<8RuNSpOPt4%fF5O;4w1YtkEp3T-Ij3H&euS(7L6zf8iL(# z@AO0;=vcy;pLf~jPfhmT-G1uMjkmrRqpR}PYu~^2^N-&>c;>Hrx{n{ZxN>}E1yVoJ zUVAtyDpq!{?OxtL+}!y6@7vfqHXuWN=q(qLR~9l?rg96Ffhawi_GY7C8HPNQ2?lh& zbP1u<#`fl=3XLWxy?yCM_1<2^6LP@0)j1RmpmZk3MV3epGE?NKD71?S4#`((b*+fDY-!8hMZ_H9$>L@8byigVrD+5X!j{F_-7#D>IgePfb`w5sTcy0i;qQ zwtxrr#A$XaL@UI+TE}ZdI%S;)o{cGbI%aEGQdsR0v^71Mk!tV6Q1#~RNlL>SE?CkPMOhGRU+#i zf1)ma;=~ET6DRrnNN^|}% zzVo%_9w8BSG>juMktjF{u22BBu8OA$$^t=?P~-FYjP8DGM9kyFd_t*If+lmos_vKh zcy1F3B0pgjNM)ibC~K=ZgqSbm%k&n#$xBA+rS-7;L}NWVG7c!9u%gO#mI!9+)X`BL ztxI`yOgW^}v5=#$fQuONx!;(Ih{YDu>o2@H}ZlV-Ij@E;vLpK`idVg2^v{@m5g z%Kq8)&CM@DDF< zz7YUvOcFgup8*vH-XFIjuocFj%EaXw_;LfGSF4js(l8z&2sW7!iR#deX@-O{jd=s% z5XGy(ejT=U8&t%jo+xhkB31M->GbB=97sZi!qfs&w7q47ce%x`!c-=Au(zfRhs!RHISMnfN9|AvSh9QI zLgv9kqv*u;SC3WV8{1oz-QRv-KL7J@^S4_+EiNx_?e=*0;>}M8>c&ZZBx!ZKNrN!h zUlr6=Nn?DmSR*!wtsF(hs}>uR7>FPxs>mQuC2!)gLmdrLq0GW}TS%Y9q>fFitvqDA zb&wuB(a_WIgrm+F4iTY72jy^eOt#dr2H#G3pvxCFqjZ7d6?$>m&9fsJ@PRTu!|>G0 z5yR_OED&gcud96B-Tihi#@;=!vNQqN@kw(hV{U0~on^ju8*nWQxu*;Zxi=&W8*SlY zI28@iblhz2cbOF~nxb3`?SWt{)9xyJvfG=0bou>`neDAn@3hY`xVw3U zh$x;sp*kT|#mSzWAy6=glPW$J!<_^w+;MV~Po|N;)=2ak^!Y#Uo!dvFWbrwa9G{W~^2>PbSlv zFw_i6n;ENtE0kmQlTfLbgX_!H2o*+!+ejq&GB=QB5v8RLvsxS5+A!Fyrg6BgXFMFH zU1oD_2Oa_>rEN?qA5P^%-n@5g?B?phr9PGn$9AJY5EFSmy&iOE|&5hx!Mn#pR3Uv!a@LI&J zq%tWnka{am&*A6=$YGGjYr*d3Sw-X4NMtBtGVzjDiJAl2A4e#CMmP@VhMSHjs>7(a zfdOZ=4TBRCE(-4VD*z# zNh(HQII#jfxCV$lxmp3EqFpFWQeJ%0*)b-aH-jFBrw{!67eD=9C&%mW>RMmyLSDYx zGU~E7uF&UuYdh|S;_p39XKxz!cadt_e!P%;ys$X3Siq-{dv|Z`^R4UKlv5Y=z%1+@ zT=GtEO=+`E_iR4xW&D0Bn{tHE6v&R2E?+vlus*jxT%P;=8c3=`R_hG-OECfjW_3T= zPg;3$4PWj9S6>^G2@3&;uJJi?0}p3i9MniPY$iYC)9}bDkya|#i?t@ToG;`^)uxmI z_r0}0E>h|e=s%+8UN_JTpo+*G3h7{s9Xe-iEtO5{vi|YWHI_Q?EVjRYlif4BmPgLQ z>T!jYoavH1)lq^(R`gDUeRmf<6J}Q%sy+8#&5c}n90w1sFlQL~>ae)GKeyxYhIQVW zM5?;lHjhcXY#3p4MYAsa-w~oxgIO5BaN_eDxeR=1;b>>`X#JL;rw2bO&{FOs8Plo+ zQf{0b0zk%MrkFMoAZ0k}Ds99>YV=Jp#5QhU@|=Xv#ZCq6h2Y}~v{g#uI38C9Gd+1? zxC$ZScSMNwpty_b@C;hpXh@0M=J8`B9OfFjCdJSc8gY=zSpDkxRd9?B{(kH~FyAZa z!!CB+(RY0VCw3lF*H)a+s_dP(yBjiYQM>0QWGBDP}(GzkarYYh?rCjHA)TGl%*)e+wBj>RD%j*Ti5V^v7;VTf=%W*<20$3;%Gm3?J zlOzc}HNCV-5@Z{VVu{9@F&K@Sq!{pE=*Y_50dQfE$BVg|02I@OZaG4kq+6^}6Odaa z;N4*RBDFMvo&-k$qj$7n?r~y(mA!#SccmE@n(Z@r?@Sh0#npd5V}rQr{*_Z;0anYb zz`~^xqOu~w6uZvjY_q#uEr4TE@DPxe!51$Be#O$n3)lA2X5IF}@-CCWX`*d57l!%R z;Z1A22%siHc0@IfaJ7wULx_KQe-0;v-TgX#Eza%iPWOA+R(gyinvjheG#rglD}f(Z z3%R(^3`%2wi@24S(aVw?+yN%ORm_)T+8GQ&#w!ScAhd{^xTFlqd>kbqtJ4}S2Eu9) zHPqF&wY56f$(V^SokFQ1p{VxK9@-YxnE@;UGI@0sTW8mP9~wi;iw|FTcyS%OpWDha zB!GE}Lbj|Mt%P_5DQ1P#h&Nt)6 zYsY*Wlq$jrue!#I`b1^n@eAu%7ykc^KexUDqw85c*)LNf<(4b8e6%5CVw7xf)$xg> z*raWeD0qA$8NgeYsPr5XnuBhAl2m3C3Tu$i5M;Qi0Dw7Z4`kr zK!kKcI^5`V=&EaR--XjUGt{nXY&Is%i~`fK%C3X!7w)*w*N2}5O!7PSE8BU*qzLzm z9yTy#7d(}{$fQeYJThz@3r4@(_tSxYaOTE~*AMbuzc;R<<90e89S*r@q_1=~)la(+ zEhBjy1Z437yYMX*3+osDTd%;wtv-A1Szl&I4q(PF zEfa`Qs?cOepMfMn`inQ25X%Y`G9^c*!iZ|fOrsnrsy_+8CQ_?J^}@Qk`V&esWcS0T z?}tq7zBe1wRm3u|$%YjJCjVH|9;3N5W-KqF8E42=ZL`tE!E6Yj>*y#N ztOxrnIe#7d1ylY1H~-jeET0hs<)NYB3<->wMr?v`a!^22srWeQZiyRmb9_~VgtnxZ zBr{grX2{mH@*vO`$tGEHIO*o|2m&U-=gZ|nk@}=sWR#?o1kQS6Rr6_J>RN3;*PzMc zBv6-z;+amD_QO>FJ?>bWM}3RzT3*Lz%j-{%tx;YxlP(YX(_z*@+lpx_no6g!^|7(t zo9ve^!?7*w>ZZf~)w184&Fa9i)PaXVowqyB!=WO4s2U& z`}haeZNGrI%5t+oc4C7%nM}q<1xm<^LtwEd5X1$57p=~iK;qZCwI;ci-^7>mtuk&V z7AwRJG6fF0M#fVK|EZ!VJQA7~*Am03C)o*upc9*$){oeO`@BQBUy>GX__i|0_qxU@A z`VA0BaO}62r>6&Z{`>$Zf~e+$r#`s&q;ws83sR6>2q=JcnBErJd+5`V>8+qI`1Dl_ z*f{||eGb%Xgsqhn-L_CnHaWyFU0(N^YZFz~xnwL((xgBg6131ZdDYSl70^e|Z~^jp8?99- zf+o;bJW~dCD#F$h5hBYll9cI)w3yu^67@um1tC;_QQQT8bOYyu(^yQQB0NG5>GIQC zPle|QpnLVzPjSd)tqT9Q6S7TL@bj8eeFwdl;kI#8rmG>0H)Q1Re7XuZcm@DCo(4-) zj~klk^ma<#uG89G-MDeH1!KQC4FUD&;%Dp?JHEH)XYoB;e?Y|w1?$mx0Y#^vrX?fQ zqtl!*Xu9KTa-8C66UjQsg?C-g4=l?9&M7uW>frFAgi2F-(J;6HYLNs{iKeJYSgK9T zr8&iBscd$mg9nth#gMSt9-+@-G+Cmz;TXmYls`pZ%h~y@5ASUpD(BB{?BLwo)vkxQ z{~c{-YZvRC(#}XL4@2>2Yk4+Z{sKMp;mLPj;_rTIhz$nA<8XdJ8Bn^l9$qe|wKZ*M zr)Y?T(sp?YY4*jR&qA*K=dZv1_1Di2W9#AGANT_&9{xUB9FEa2D;Rn^D&PT(SI`_T zHwRsKZK@c>u2E#hT}PFfE5y=dJgz25lgiJefdM~=dr{z%JV;$?u5*CIL%bP=}=a;KtaNQrRra(og&9(q=AOpm(RTIf#V|n{_C_%XR z`Qbl*{R`#Sqn|GR{tGQ;5cB>T+WP@8eu3Yz{Y-O4xs;NQPnuA1Lh(UyLScZ?qQOwa z0OfT)Miyz3)77F%(O?+T_sbt};bLcGGDFtfT6E1_JCKFSmu+1pR;XDd5=H&d&L zcqs*s5a2dyVZHZYxI8*IJy?Eq=ZQC-1E+rZ%iS-ukIPsq*gLrU^_^YxnqS3XLR!)< zjR1|SRqICS?6Z$P`R0@BH~L$3q z7r*`S=bx`09o@e5+fP3}5N`eFyN@5e6>c8eKmBD|w2;NP$X{Zr8Rf50vTWwlF(xnB zU~CD#kkl#FQuRE*zI{lMvo@ut^-!PndX7}{r`J#6M}Toh_aw@% zzVPaE&mBGYI5a3vUHlztxc_+Y=--V$fsrJ4ep)WnisfZvYt#vXdL6<(I$bmisv-%D zO`uoOR%C@UY+)eKFGb^AnpTTNGuE`oLDW!r-t&??i;@h-`f`QGu5-`lG8y!gAF4DjR0kRMZr@qvaw;kP1C+&JGI({(3E~=Skg5 z+l(=;*n%2Mb_oflPMh5Ugn-#ZHkFOU3n9$0IjK`ACjmQXGaKY z?%etiQT62)UmxGRQG&TwtDS1Kj7Je+?8x+9Tn|rk2aOq>P6q)&38~61Dwp^k{;)O* zJ=(}&=JAcncCNjJ(q65f(`q%xA32bghorz0w{hKHeeRxVFYxE>7cMU^PoKb%W9!XO zzx>6szug{>Ay=llZ9bXL<5n}Vg22rXttxSvXdVs@JsIu-`&)a=O}WRIeOAR@%9G<+1wx4{g0&-FdHH#U3>@gCLH<8@TB09RkftxYpb7 zgIDWULwRX+jz;BNVN%KE_P6KPM-V9ew@y!C?>Of%_USGU4(@)t7#}T;76%6t*!x%C zo_~D6T#HeraN>K>sMl*-oJw9Jl>##`b(0Vj+6Kz2a*QWwb<7E~cH50c3rT{@>*z2{ z32KVryL8BNVwwp@Nlm_zVY8vZ1L{Yt?>iPhvCzC#^H$EvIreV`r@vof>p$LUVAe}( zRc^pi{mzbtG;F<&Q-1{M>mztD?S2ptRdBiZyc)p3N4K164UoBAV-P1rH}{BoW@BHh z?>!x^{mnW?=P8r9+^~Eg%OYF{;TkuWFQKb;arVbwf#tdjkW<{@?Ci&jPY)Kcq9CPa zi8c~5j`P4srf6N^lAK&Y=4Oz#>n16~hO(P#Mp>av%5BC-n+j!CKzD$++Cgh>D{SRyg&fsye_-o(ZbBW_DpxnJS7GpF$SF{| zz&pR#`Mrf_xe%OUVaRhCugtu>D?(az72qkNBO8GuRhQ;_Jm#T_Vou!KM1?a zH;}Z!WLJ~c)L#r2i_vl<24F1Ce|qEHJ70h}L_=G@-$DK{*N|?n=N{X{E8&lBJ-WO3 zc7N+JaZ7_veib;Hd!<&p;y7Zb-`^CsH|n_^dMTx2e32K}!R{H+()Oe}DPz-F6(zYjeEdl^$kpscN30$e0ZZPK^~6 z@a)21aOfL4MX8(_L);S?FwL1ODAyz!t>e1dmQB_~>PrhsC6$%3y`CZa_C!HYlj-O7 zYAlE_ZwklO3be)u*wn%}-%o%1;KOG>Z2-A%0LXTyqsAy0l}BQ~ysm9uspFZ7^7>Wa zeHf(y=5WzR>)Ya^b@3r>Tg-@&TneEb7&2$F?ztd$!MF?VcLq``uvZ}K%uAEWVm=8-l#|wg*Yin&Mq?daA$SEE=()TW4@=J343&{s#}A~& zy*URCu(wlNIhug%?Y9r#ci$gU9pz58+YW^{pz9 zZY7Gl;GH&iVC$Rv;W$jhii(&KuB2Fz&y3g&tlUOve}6yq{A99x#-A0erWN?hMH2=O zg_kWi7nUx&NYavwKpFn{`?E3K_GDfj$B9^)_GgwW@LW3S@j8*`p?5L~({!i&6CNl3^kx<8S0G8(+tSyD5tbJO3o%3)HK>lmIX^kWjQ-;rVwesJ@p$Sr{@hV z%UL!cL74`~C*M6EPMzbDgj5SI`8q~-Yfwf$(g(5i8s3lYzo*sj7eVH?MlH+Hq$^@) zd*oo-`?>u(n9pr7ThHw5Z{*P2WP%Epn7zzC5Z;-%!D0f7p9PDtbvTADbul*l1@8Dj zE)-0@?dyUfnZ7Rw7G&y#AMd$QQgta$p4f8CZO0-M4JEUU!c(!yH3x<+I|2h>i^i@+ zT+e_JA!ubN5*2xp(IpTWN=%_BHu1_N5*bj2HJ{AUNvCzfn5SV4{YFsr8h!9aD25!I zfB4~#A0Hq0!)~_Px`&X|Z(Q;EAl2AXsfM=t{^pKWeOj!C>WY@^^u6`|_KV`))4e(l zoXPPWB#C^*scndxn|pxwM7GNoC`rhyIlW%n_bssOiohEK|73h}B+H9yNnQ!8=FIYK zo}keY>bgwNx5m~$kldcsW?WTJx?IJkRLbNqx}i&OwhrqVOhDe|i*YVmk-PFtYQqtN zsRY(jN>>$BicC^0#8Ujk=sv>}1S`D~N#IXuUYX2&WNniMme+Dtojzn{%ex=k`gU=1 zQR7>UPNy^ywd*Sw{Q7IJq1_M*I#Iy;I$lq|TGcQKM%+U6w!B%@#Lj#)8cCyQB1ejQ z<0=pyA=MngBL?Tx_xBPKV@$?lO844|tEdJ#95GGokSom0@R^4q9CKkjwr$oX;+*Tc zV>Vjwe2Dv8zg|=2gE+Mq>V7e z9;mk4uf5ja-0EW(hSq3iOrGjA_@**rT$s~2i$z~T`8hdku`i&%`+tj|qYpaNs3l z(WE3PNLyzzqY|?w*-Yk(BnS+l;M+akgwiz&}U@7Q?QWT}=tit7$bRukmqULN90$RTVB`UY5qa*s9xR2McYi$hM&i~E4prOsJ0oRM5gWb! zQ1qOtr-hFfR2!YGRJDUlESQc&shUf?oQXV?%E61XsZ=(D>ZVuQ$Pl@DCYS3}x*&^y zJM3PD@dR`XFrEk5`Qga{R2*cIv7&83m>HB2c6}FJANu7&P#6pONbwbD9nxxEiI{Vl z7u+_vM)6UBJ0y}S?z#}|mG31xwKz`?j_4Pw@qY7=BM-ELyZUMi9&72RN?G;3QrPtGA&PU8d(y&|)MAk$G2 zF+6AH2b4AI>M=3~^(Xq~6nM;J3^NU4#U#yBf=#FbB(Efcep*U5Q{z;HsnF0&xILnB z)?9{Kai1NHY8`3R8_mzgH-jTopT219=YVIuvM81T@uNBb3_)2AacXTlA?|fHLt0Y| z|1&4To!7TSQ9~gohkvqr8{sUpST04Z3E?MSsjv)~;l%SE%AMB))~o3 z)-nhtN)A!?Ry~2|^dzmsd$qZg%T+p(S7n_lsLhc!!jPY^bej}wUO9s?{<#_gyfu@Ev4vb2#*4xizdX^%)ETV1Nvd5URB1~u=FVlvTqmOFeA;7=$78UE*t=saXJmvTiqJp-X$Z}_G!jXXl|a!J2(nN{ZxIp&$jvK3 z;@@(d1q$v<#(BRM?|Uh~`ugQ-WGQePH-yKC`)cBbLf^fISFq3S zKKb~=4-wF-xI`MU_3CgJsn2;9l{m9`KA?=uuAhGWvic(eA{ z4`~#gyc>2eEpbw8IVmg==ii33iFD+kj^Yg`d3-Q#vqmp}e0=(H_@SvDpK*!$c>nNz zh8t7-^2he~@1MVTzxd?-^ZK(-KF2L+K8nAEJ|jgTPi1$X!kb@bHU56T5I%#fe+YxN ze}fpf`?`4fVe`@)p0^vm(S?l*Nc1>rV;*pQAlqKjJ~}=cGdbp4pYt>NuH3f?lZb%J z3e^rg{5tCZRIa%~A{qg|47p`BCO^PkhIAV!b;IiESt99qq_zzp4`Fn9x+I zBp)J%|3%MQVoz1N9iH|?NGqt`pi0c2t2CyjE{`v@c}e;G;qcStx9#)OSMMG_e;41Y z_?!aJx8HvI?pG-IVfUZjEr6Gsqd(l;;u_Fv4Bvc%d&OsqmaXa)%H-@NTiLJc`h^yX z zdbo>>9#4yxG~&4x-VdcTG>^dWq?!z+~;V$UdQhi!-Wo9r-Q9N z|K=NP$SRHs1XK|(zomaMvVy;bXh;#`Js$4{{v)cqyEvoHw#p{)x^MRVunsPlEZ@E9 zFYA-s zxqI)E?-n7i@38^cgazBb&$zCSXoK*jpab>QT)(qU@V(=;y3OG+0&9J{2~IX|hm(b2=8MRE(@kPy}(F2o+qxmnupIO&6Evx6WT-~E0yI-hH7RWf#`y1iEx%+g9`5Vta1?`uUU<6zYuh;Qnw5~VD zto}61ZeB+&*%U>gNfbp$sFR6`JO#aXsdYq-Y3}n&yM7Z`+f`MUKW%@!ti^K@#UVJG zd$TJ@KTW}Cn>_EDB%=92g^=?#@x2(V?a{bJt(hvK8|l!YCqxG+o#*SOqq2n`8_C#^ z4;>_iYzXHdSUf-k8$u!~j`N(YNKKE$0v*5S<3qDRN2wL5&ft9CKeZ5|dgpws_GGhEoPujA;bY?P0 zZOf`I?(He@e!n3ifBW@f{vaML1N{f7;7 ziu|@ui+gm|85j+;48AnRtTg-zS3hK*!o#nYEite>Rtwt^)DZ}@i6V68*a|$x<0BDV zD99Y8)(Xb#X~LXVhQO?)v>;4*-(8}^o^>6rR$O+;d8kTBtvh(p(H(JvGlw~Q+*Kay zpAtnFE=CM*8YKNKKSM1g`nKiL#g(?2vVv4mCq_x7c0nPuP$rzfJkljq|3+{wMhA^0 zR+54ja3C)!jpGP@B~QasTGUH$-!1GOfnkM5gkiDct3lu5qBbToc(2G_zvfuP$7MHT zQDC6Q@vCKS!U)WAVxfGeDMElF6s5C>b!j347WJPp4L##x_sSWaw>=dHvAUeeFD*#TiIR&DsL3(3mJNkic0@xc9BCP=5XOSI@|Z z1-2^QC4PhylQ=sG`=)l0<~(4#4v;J3P}2B4BE;?U{%i)FwrpnE^-Z%oWV4$NIiZTU z&@wtp>ilk3@`85~6`Y0?Zo@sEqi*DS7+f@~s9 zSLGu2uvK=2-7Uk6C+y)qzQ5@}nSxFNpbL@RUBMO}ixH>Tg48uiC8|`jF%#p81veQ= zly8F*mhhd=&zr;g@K?8f6ts|?SNxE_iTB^x}tLrx2Nn-?w(nPdEFv24!tyhdyL9o1I!nP5lXY@qM1v-L~$JEeG z_gEYe#4cOvk*mm#6tEV-$5kf8Gr}8|&8DW=JexV2R|Vb!cDPn+3X3?BxQpllT}LDV z+xf^Wfy;6ygya(LzzK&mWm)UhroXh@SImMK3N5yWzKPQ`MGbS8&BTo6Rz~5lgYwP3 zP>uI|Pu>hxczy3zm2$9i6GdZV?d)bpgo`&X#p8bDD}0 zGTU)!Rx6#+Xk71_$RNwnhlSV=={@?IMdmQTOtGl-t#FA;TECjjU_ig5bOWOnLuO`C zj%@Ka>f1;(xnG*`nM#KjmTJ9pFG-Mur*HTBU@hl)*Qtn%p;f!C+%9rZU&pB36Qhl2 z0LQJX)=zBvsqfOOHWdCK0&~s`X4+a zNklAA1HZ9x1a~BoX4y*>(He=2KESRI_Bv zO}HKBfU|~1NdihUCL=0k#h8%77zwQrl12#Q{_^JW(F@;oETrH-dx|2%(abf%0mW$M zGF|6P(wX=rE%oc6iCWo`wr3Z;-66M`XrevpqH7eWmO5(k#L3x6m^)4qE*C@z)$WxF z%0pkfrh&q=*4oqy5W{FJ*Tii^Gl6glYr2S*)gb z^9Ehqju71?)@5)}Btw#%#!)6nZcY(!KRD?GZ)~^gd7CUxwP;W-tO|m(QahFo+olkj zGCI{=!nt%aBP6MsCK+r;c+dY7jhqT*g{sf9OXjP)LzZMNrU?AmOok{)4T)@`fHPF8 zYV+0-+aby<#Lh|0C>BfQ0=-t0E72ttv?2#Z$@KVo0|dptBKom z3v>mj3&VgIcXeKGY-ArdDSJIV?6g2^iZ%4%VmXac@YcUt}E&?3f9K0 z9+)o-D-v9cT(8O7OUS2Z&fvD?`w=rFIr0@!YQ~hj(km5AU#FD`-cHlR6pAJrN#1*} z+JZo77-Viz3k2%SVodA*pwF++VgEq~?8UHjvK%5n7q8GU0ev;L%(g%WLipA?Bw4Hw z!pm@GA_igJiefrmwn?8Scz<7YjdHFT1|^ZdRYzhwN$%s!nXaj>lhKTkP50uNKUz`_ z{!H?<8-jl>wpCP_2X@s7ul=1t+Qi0B*20g5GBHuRH11wN-58oBMIr))cUG#Uw0d2u z`zJ!pe1nb+_&;>0Hvlh~WdzNH0eT^D{vYW2)$6zE3=|&FC36;D4?#+8*sSR^P7~fI z_+~>o%D_4#@y?E_^IWw|AQ)}L3f4NP6D2L3qeA6L6wQ-zqvs;`)+V$kz6x8Nzljo= zEv2uGI;;Soslz8{ji84Uu~NA#lzD|%55#d5>;gTYRj>}wDOU84*TW3_sBf;>40#I~ zeT7~da9A(U$zqNWetQMS3!J~117wY-SdPGX#0VD#w?KEV(5ap*1y$hfA|6kHB|t8^ zG4Y)ejZa#pFmG#_pbj#j?K}x8xe!80F+=6mx!JS{8wgvIzf__p8koI;Ac8$$)sn5Q z8nhzwJn67xcq5pCi-oW~bd$9qEHyk7sC5pkkEH$=Ix_~CF$qSqKwr$*8pyF^0u!&$ zg?)uyup3^Oi(a8Kz1Yp`k#r2uCH}qtpo1J@C{ryF3?$__SN_~C#jYPJB?wb3!3>O9 s>SmKTFz#xX%2+j_#T4;&ea^-9Z+8#z7el$et^fc407*qoM6N<$f?|Tx;{X5v diff --git a/vendor/github.com/go-playground/locales/rules.go b/vendor/github.com/go-playground/locales/rules.go deleted file mode 100644 index 920290014..000000000 --- a/vendor/github.com/go-playground/locales/rules.go +++ /dev/null @@ -1,293 +0,0 @@ -package locales - -import ( - "strconv" - "time" - - "github.com/go-playground/locales/currency" -) - -// // ErrBadNumberValue is returned when the number passed for -// // plural rule determination cannot be parsed -// type ErrBadNumberValue struct { -// NumberValue string -// InnerError error -// } - -// // Error returns ErrBadNumberValue error string -// func (e *ErrBadNumberValue) Error() string { -// return fmt.Sprintf("Invalid Number Value '%s' %s", e.NumberValue, e.InnerError) -// } - -// var _ error = new(ErrBadNumberValue) - -// PluralRule denotes the type of plural rules -type PluralRule int - -// PluralRule's -const ( - PluralRuleUnknown PluralRule = iota - PluralRuleZero // zero - PluralRuleOne // one - singular - PluralRuleTwo // two - dual - PluralRuleFew // few - paucal - PluralRuleMany // many - also used for fractions if they have a separate class - PluralRuleOther // other - required—general plural form—also used if the language only has a single form -) - -const ( - pluralsString = "UnknownZeroOneTwoFewManyOther" -) - -// Translator encapsulates an instance of a locale -// NOTE: some values are returned as a []byte just in case the caller -// wishes to add more and can help avoid allocations; otherwise just cast as string -type Translator interface { - - // The following Functions are for overriding, debugging or developing - // with a Translator Locale - - // Locale returns the string value of the translator - Locale() string - - // returns an array of cardinal plural rules associated - // with this translator - PluralsCardinal() []PluralRule - - // returns an array of ordinal plural rules associated - // with this translator - PluralsOrdinal() []PluralRule - - // returns an array of range plural rules associated - // with this translator - PluralsRange() []PluralRule - - // returns the cardinal PluralRule given 'num' and digits/precision of 'v' for locale - CardinalPluralRule(num float64, v uint64) PluralRule - - // returns the ordinal PluralRule given 'num' and digits/precision of 'v' for locale - OrdinalPluralRule(num float64, v uint64) PluralRule - - // returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for locale - RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) PluralRule - - // returns the locales abbreviated month given the 'month' provided - MonthAbbreviated(month time.Month) string - - // returns the locales abbreviated months - MonthsAbbreviated() []string - - // returns the locales narrow month given the 'month' provided - MonthNarrow(month time.Month) string - - // returns the locales narrow months - MonthsNarrow() []string - - // returns the locales wide month given the 'month' provided - MonthWide(month time.Month) string - - // returns the locales wide months - MonthsWide() []string - - // returns the locales abbreviated weekday given the 'weekday' provided - WeekdayAbbreviated(weekday time.Weekday) string - - // returns the locales abbreviated weekdays - WeekdaysAbbreviated() []string - - // returns the locales narrow weekday given the 'weekday' provided - WeekdayNarrow(weekday time.Weekday) string - - // WeekdaysNarrowreturns the locales narrow weekdays - WeekdaysNarrow() []string - - // returns the locales short weekday given the 'weekday' provided - WeekdayShort(weekday time.Weekday) string - - // returns the locales short weekdays - WeekdaysShort() []string - - // returns the locales wide weekday given the 'weekday' provided - WeekdayWide(weekday time.Weekday) string - - // returns the locales wide weekdays - WeekdaysWide() []string - - // The following Functions are common Formatting functionsfor the Translator's Locale - - // returns 'num' with digits/precision of 'v' for locale and handles both Whole and Real numbers based on 'v' - FmtNumber(num float64, v uint64) string - - // returns 'num' with digits/precision of 'v' for locale and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - FmtPercent(num float64, v uint64) string - - // returns the currency representation of 'num' with digits/precision of 'v' for locale - FmtCurrency(num float64, v uint64, currency currency.Type) string - - // returns the currency representation of 'num' with digits/precision of 'v' for locale - // in accounting notation. - FmtAccounting(num float64, v uint64, currency currency.Type) string - - // returns the short date representation of 't' for locale - FmtDateShort(t time.Time) string - - // returns the medium date representation of 't' for locale - FmtDateMedium(t time.Time) string - - // returns the long date representation of 't' for locale - FmtDateLong(t time.Time) string - - // returns the full date representation of 't' for locale - FmtDateFull(t time.Time) string - - // returns the short time representation of 't' for locale - FmtTimeShort(t time.Time) string - - // returns the medium time representation of 't' for locale - FmtTimeMedium(t time.Time) string - - // returns the long time representation of 't' for locale - FmtTimeLong(t time.Time) string - - // returns the full time representation of 't' for locale - FmtTimeFull(t time.Time) string -} - -// String returns the string value of PluralRule -func (p PluralRule) String() string { - - switch p { - case PluralRuleZero: - return pluralsString[7:11] - case PluralRuleOne: - return pluralsString[11:14] - case PluralRuleTwo: - return pluralsString[14:17] - case PluralRuleFew: - return pluralsString[17:20] - case PluralRuleMany: - return pluralsString[20:24] - case PluralRuleOther: - return pluralsString[24:] - default: - return pluralsString[:7] - } -} - -// -// Precision Notes: -// -// must specify a precision >= 0, and here is why https://play.golang.org/p/LyL90U0Vyh -// -// v := float64(3.141) -// i := float64(int64(v)) -// -// fmt.Println(v - i) -// -// or -// -// s := strconv.FormatFloat(v-i, 'f', -1, 64) -// fmt.Println(s) -// -// these will not print what you'd expect: 0.14100000000000001 -// and so this library requires a precision to be specified, or -// inaccurate plural rules could be applied. -// -// -// -// n - absolute value of the source number (integer and decimals). -// i - integer digits of n. -// v - number of visible fraction digits in n, with trailing zeros. -// w - number of visible fraction digits in n, without trailing zeros. -// f - visible fractional digits in n, with trailing zeros. -// t - visible fractional digits in n, without trailing zeros. -// -// -// Func(num float64, v uint64) // v = digits/precision and prevents -1 as a special case as this can lead to very unexpected behaviour, see precision note's above. -// -// n := math.Abs(num) -// i := int64(n) -// v := v -// -// -// w := strconv.FormatFloat(num-float64(i), 'f', int(v), 64) // then parse backwards on string until no more zero's.... -// f := strconv.FormatFloat(n, 'f', int(v), 64) // then turn everything after decimal into an int64 -// t := strconv.FormatFloat(n, 'f', int(v), 64) // then parse backwards on string until no more zero's.... -// -// -// -// General Inclusion Rules -// - v will always be available inherently -// - all require n -// - w requires i -// - -// W returns the number of visible fraction digits in N, without trailing zeros. -func W(n float64, v uint64) (w int64) { - - s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - - // with either be '0' or '0.xxxx', so if 1 then w will be zero - // otherwise need to parse - if len(s) != 1 { - - s = s[2:] - end := len(s) + 1 - - for i := end; i >= 0; i-- { - if s[i] != '0' { - end = i + 1 - break - } - } - - w = int64(len(s[:end])) - } - - return -} - -// F returns the visible fractional digits in N, with trailing zeros. -func F(n float64, v uint64) (f int64) { - - s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - - // with either be '0' or '0.xxxx', so if 1 then f will be zero - // otherwise need to parse - if len(s) != 1 { - - // ignoring error, because it can't fail as we generated - // the string internally from a real number - f, _ = strconv.ParseInt(s[2:], 10, 64) - } - - return -} - -// T returns the visible fractional digits in N, without trailing zeros. -func T(n float64, v uint64) (t int64) { - - s := strconv.FormatFloat(n-float64(int64(n)), 'f', int(v), 64) - - // with either be '0' or '0.xxxx', so if 1 then t will be zero - // otherwise need to parse - if len(s) != 1 { - - s = s[2:] - end := len(s) + 1 - - for i := end; i >= 0; i-- { - if s[i] != '0' { - end = i + 1 - break - } - } - - // ignoring error, because it can't fail as we generated - // the string internally from a real number - t, _ = strconv.ParseInt(s[:end], 10, 64) - } - - return -} diff --git "a/vendor/github.com/go-playground/locales/tq\033q" "b/vendor/github.com/go-playground/locales/tq\033q" deleted file mode 100644 index 465b32e03..000000000 --- "a/vendor/github.com/go-playground/locales/tq\033q" +++ /dev/null @@ -1,255022 +0,0 @@ -diff --git a/af/af.go b/af/af.go -index a76aa23..b9b5d03 100644 ---- a/af/af.go -+++ b/af/af.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v.C.", "n.C."}, - erasNarrow: []string{"v.C.", "n.C."}, - erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"UYT": "Uruguay-standaardtyd", "MST": "MST", "CDT": "Sentrale dagligtyd", "HEPM": "Sint-Pierre en Miquelon-dagligtyd", "MEZ": "Sentraal-Europese standaardtyd", "TMST": "Turkmenistan-somertyd", "WART": "Wes-Argentinië-standaardtyd", "UYST": "Uruguay-somertyd", "VET": "Venezuela-tyd", "IST": "Indië-standaardtyd", "JDT": "Japan-dagligtyd", "HEPMX": "Meksikaanse Pasifiese dagligtyd", "WAT": "Wes-Afrika-standaardtyd", "HECU": "Kuba-dagligtyd", "GYT": "Guyana-tyd", "HNPM": "Sint-Pierre en Miquelon-standaardtyd", "ChST": "Chamorro-standaardtyd", "CAT": "Sentraal-Afrika-tyd", "WIB": "Wes-Indonesië-tyd", "HAT": "Newfoundland-dagligtyd", "HNOG": "Wes-Groenland-standaardtyd", "AEDT": "Australiese Oostelike dagligtyd", "AWDT": "Australiese Westelike dagligtyd", "LHST": "Lord Howe-standaardtyd", "GFT": "Frans-Guiana-tyd", "HNCU": "Kuba-standaardtyd", "HEEG": "Oos-Groenland-somertyd", "CHADT": "Chatham-dagligtyd", "JST": "Japan-standaardtyd", "HNEG": "Oos-Groenland-standaardtyd", "ACDT": "Australiese sentrale dagligtyd", "AEST": "Australiese Oostelike standaardtyd", "COST": "Colombië-somertyd", "SGT": "Singapoer-standaardtyd", "CST": "Sentrale standaardtyd", "ADT": "Atlantiese dagligtyd", "HADT": "Hawaii-Aleusiër-dagligtyd", "LHDT": "Lord Howe-dagligtyd", "WAST": "Wes-Afrika-somertyd", "GMT": "Greenwich-mediaantyd", "MDT": "MDT", "HNPMX": "Meksikaanse Pasifiese standaardtyd", "ACWST": "Australiese sentraal-Westelike standaard-tyd", "AWST": "Australiese Westelike standaardtyd", "WARST": "Wes-Argentinië-somertyd", "ECT": "Ecuador-tyd", "∅∅∅": "Peru-somertyd", "EDT": "Oostelike dagligtyd", "NZST": "Nieu-Seeland-standaardtyd", "OESZ": "Oos-Europese somertyd", "HENOMX": "Noordwes-Meksiko-dagligtyd", "AKDT": "Alaska-dagligtyd", "HEOG": "Wes-Groenland-somertyd", "WESZ": "Wes-Europese somertyd", "HKST": "Hongkong-somertyd", "EAT": "Oos-Afrika-tyd", "HAST": "Hawaii-Aleusiër-standaardtyd", "PDT": "Pasifiese dagligtyd", "WITA": "Sentraal Indonesië-tyd", "BOT": "Bolivia-tyd", "MYT": "Maleisië-tyd", "AKST": "Alaska-standaardtyd", "BT": "Bhoetan-tyd", "SRT": "Suriname-tyd", "HNT": "Newfoundland-standaardtyd", "SAST": "Suid-Afrika-standaardtyd", "CLT": "Chili-standaardtyd", "OEZ": "Oos-Europese standaardtyd", "ART": "Argentinië-standaardtyd", "WEZ": "Wes-Europese standaardtyd", "ACWDT": "Australiese sentraal-Westelike dagligtyd", "CHAST": "Chatham-standaardtyd", "AST": "Atlantiese standaardtyd", "ARST": "Argentinië-somertyd", "PST": "Pasifiese standaardtyd", "MESZ": "Sentraal-Europese somertyd", "CLST": "Chili-somertyd", "COT": "Colombië-standaardtyd", "NZDT": "Nieu-Seeland-dagligtyd", "TMT": "Turkmenistan-standaardtyd", "ACST": "Australiese sentraal-standaardtyd", "EST": "Oostelike standaardtyd", "WIT": "Oos-Indonesië-tyd", "HKT": "Hongkong-standaardtyd", "HNNOMX": "Noordwes-Meksiko-standaardtyd"}, -+ timezones: map[string]string{"BOT": "Bolivia-tyd", "HEEG": "Oos-Groenland-somertyd", "AWDT": "Australiese Westelike dagligtyd", "LHST": "Lord Howe-standaardtyd", "PDT": "Pasifiese dagligtyd", "GYT": "Guyana-tyd", "CAT": "Sentraal-Afrika-tyd", "TMT": "Turkmenistan-standaardtyd", "HEPM": "Sint-Pierre en Miquelon-dagligtyd", "HNCU": "Kuba-standaardtyd", "HECU": "Kuba-dagligtyd", "OEZ": "Oos-Europese standaardtyd", "HNT": "Newfoundland-standaardtyd", "MDT": "MDT", "ART": "Argentinië-standaardtyd", "HNPM": "Sint-Pierre en Miquelon-standaardtyd", "LHDT": "Lord Howe-dagligtyd", "SGT": "Singapoer-standaardtyd", "WAST": "Wes-Afrika-somertyd", "SAST": "Suid-Afrika-standaardtyd", "EDT": "Oostelike dagligtyd", "AEDT": "Australiese Oostelike dagligtyd", "CHAST": "Chatham-standaardtyd", "UYT": "Uruguay-standaardtyd", "HNPMX": "Meksikaanse Pasifiese standaardtyd", "TMST": "Turkmenistan-somertyd", "MYT": "Maleisië-tyd", "GMT": "Greenwich-mediaantyd", "COT": "Colombië-standaardtyd", "WITA": "Sentraal Indonesië-tyd", "ChST": "Chamorro-standaardtyd", "AST": "Atlantiese standaardtyd", "HAST": "Hawaii-Aleusiër-standaardtyd", "HADT": "Hawaii-Aleusiër-dagligtyd", "HNEG": "Oos-Groenland-standaardtyd", "ACWDT": "Australiese sentraal-Westelike dagligtyd", "HNOG": "Wes-Groenland-standaardtyd", "EST": "Oostelike standaardtyd", "CLST": "Chili-somertyd", "NZDT": "Nieu-Seeland-dagligtyd", "MESZ": "Sentraal-Europese somertyd", "JDT": "Japan-dagligtyd", "PST": "Pasifiese standaardtyd", "WAT": "Wes-Afrika-standaardtyd", "GFT": "Frans-Guiana-tyd", "HKT": "Hongkong-standaardtyd", "AWST": "Australiese Westelike standaardtyd", "WIT": "Oos-Indonesië-tyd", "JST": "Japan-standaardtyd", "WIB": "Wes-Indonesië-tyd", "HNNOMX": "Noordwes-Meksiko-standaardtyd", "COST": "Colombië-somertyd", "HKST": "Hongkong-somertyd", "CDT": "Sentrale dagligtyd", "ECT": "Ecuador-tyd", "HENOMX": "Noordwes-Meksiko-dagligtyd", "ACDT": "Australiese sentrale dagligtyd", "CHADT": "Chatham-dagligtyd", "AKST": "Alaska-standaardtyd", "HAT": "Newfoundland-dagligtyd", "∅∅∅": "Brasilië somertyd", "CST": "Sentrale standaardtyd", "ADT": "Atlantiese dagligtyd", "WESZ": "Wes-Europese somertyd", "OESZ": "Oos-Europese somertyd", "WARST": "Wes-Argentinië-somertyd", "MEZ": "Sentraal-Europese standaardtyd", "VET": "Venezuela-tyd", "WEZ": "Wes-Europese standaardtyd", "HEOG": "Wes-Groenland-somertyd", "MST": "MST", "ARST": "Argentinië-somertyd", "SRT": "Suriname-tyd", "ACST": "Australiese sentraal-standaardtyd", "ACWST": "Australiese sentraal-Westelike standaard-tyd", "UYST": "Uruguay-somertyd", "IST": "Indië-standaardtyd", "WART": "Wes-Argentinië-standaardtyd", "CLT": "Chili-standaardtyd", "BT": "Bhoetan-tyd", "AEST": "Australiese Oostelike standaardtyd", "HEPMX": "Meksikaanse Pasifiese dagligtyd", "AKDT": "Alaska-dagligtyd", "NZST": "Nieu-Seeland-standaardtyd", "EAT": "Oos-Afrika-tyd"}, - } - } -  -diff --git a/af_NA/af_NA.go b/af_NA/af_NA.go -index fd4af72..8b082a8 100644 ---- a/af_NA/af_NA.go -+++ b/af_NA/af_NA.go -@@ -10,68 +10,45 @@ import ( - ) -  - type af_NA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'af_NA' locale - func New() locales.Translator { - return &af_NA{ -- locale: "af_NA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "$", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "Mrt.", "Apr.", "Mei", "Jun.", "Jul.", "Aug.", "Sep.", "Okt.", "Nov.", "Des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januarie", "Februarie", "Maart", "April", "Mei", "Junie", "Julie", "Augustus", "September", "Oktober", "November", "Desember"}, -- daysAbbreviated: []string{"So.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "W", "D", "V", "S"}, -- daysShort: []string{"So.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Sa."}, -- daysWide: []string{"Sondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag"}, -- periodsAbbreviated: []string{"vm.", "nm."}, -- periodsNarrow: []string{"v", "n"}, -- periodsWide: []string{"vm.", "nm."}, -- erasAbbreviated: []string{"v.C.", "n.C."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"HEEG": "Oos-Groenland-somertyd", "HNNOMX": "Noordwes-Meksiko-standaardtyd", "HECU": "Kuba-dagligtyd", "AEDT": "Australiese Oostelike dagligtyd", "JDT": "Japan-dagligtyd", "ChST": "Chamorro-standaardtyd", "AKST": "Alaska-standaardtyd", "CDT": "Sentrale dagligtyd", "AST": "Atlantiese standaardtyd", "ACWDT": "Australiese sentraal-Westelike dagligtyd", "NZDT": "Nieu-Seeland-dagligtyd", "AWST": "Australiese Westelike standaardtyd", "GFT": "Frans-Guiana-tyd", "ECT": "Ecuador-tyd", "MST": "MST", "HEPMX": "Meksikaanse Pasifiese dagligtyd", "ACWST": "Australiese sentraal-Westelike standaard-tyd", "AEST": "Australiese Oostelike standaardtyd", "AWDT": "Australiese Westelike dagligtyd", "CLST": "Chili-somertyd", "∅∅∅": "Peru-somertyd", "EST": "Oostelike standaardtyd", "GYT": "Guyana-tyd", "MYT": "Maleisië-tyd", "WIT": "Oos-Indonesië-tyd", "WITA": "Sentraal Indonesië-tyd", "HNPM": "Sint-Pierre en Miquelon-standaardtyd", "CLT": "Chili-standaardtyd", "WAST": "Wes-Afrika-somertyd", "OESZ": "Oos-Europese somertyd", "WARST": "Wes-Argentinië-somertyd", "GMT": "Greenwich-mediaantyd", "HNPMX": "Meksikaanse Pasifiese standaardtyd", "EDT": "Oostelike dagligtyd", "BT": "Bhoetan-tyd", "ARST": "Argentinië-somertyd", "HKST": "Hongkong-somertyd", "HNEG": "Oos-Groenland-standaardtyd", "CAT": "Sentraal-Afrika-tyd", "WART": "Wes-Argentinië-standaardtyd", "COST": "Colombië-somertyd", "CST": "Sentrale standaardtyd", "HEOG": "Wes-Groenland-somertyd", "HKT": "Hongkong-standaardtyd", "BOT": "Bolivia-tyd", "SAST": "Suid-Afrika-standaardtyd", "EAT": "Oos-Afrika-tyd", "VET": "Venezuela-tyd", "ART": "Argentinië-standaardtyd", "LHDT": "Lord Howe-dagligtyd", "NZST": "Nieu-Seeland-standaardtyd", "HNT": "Newfoundland-standaardtyd", "MEZ": "Sentraal-Europese standaardtyd", "MESZ": "Sentraal-Europese somertyd", "ACST": "Australiese sentraal-standaardtyd", "IST": "Indië-standaardtyd", "WAT": "Wes-Afrika-standaardtyd", "MDT": "MDT", "ADT": "Atlantiese dagligtyd", "HEPM": "Sint-Pierre en Miquelon-dagligtyd", "LHST": "Lord Howe-standaardtyd", "CHADT": "Chatham-dagligtyd", "OEZ": "Oos-Europese standaardtyd", "SGT": "Singapoer-standaardtyd", "HADT": "Hawaii-Aleusiër-dagligtyd", "WEZ": "Wes-Europese standaardtyd", "CHAST": "Chatham-standaardtyd", "HNCU": "Kuba-standaardtyd", "AKDT": "Alaska-dagligtyd", "PST": "Pasifiese standaardtyd", "HAT": "Newfoundland-dagligtyd", "TMT": "Turkmenistan-standaardtyd", "TMST": "Turkmenistan-somertyd", "COT": "Colombië-standaardtyd", "HENOMX": "Noordwes-Meksiko-dagligtyd", "PDT": "Pasifiese dagligtyd", "WESZ": "Wes-Europese somertyd", "JST": "Japan-standaardtyd", "HNOG": "Wes-Groenland-standaardtyd", "ACDT": "Australiese sentrale dagligtyd", "UYT": "Uruguay-standaardtyd", "UYST": "Uruguay-somertyd", "WIB": "Wes-Indonesië-tyd", "HAST": "Hawaii-Aleusiër-standaardtyd", "SRT": "Suriname-tyd"}, -+ locale: "af_NA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "$", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ADT": "ADT", "SRT": "SRT", "MESZ": "MESZ", "HENOMX": "HENOMX", "UYT": "UYT", "OEZ": "OEZ", "NZST": "NZST", "NZDT": "NZDT", "HEOG": "HEOG", "CHAST": "CHAST", "SGT": "SGT", "COST": "COST", "MDT": "MDT", "HEPM": "HEPM", "HNEG": "HNEG", "LHST": "LHST", "MYT": "MYT", "JST": "JST", "IST": "IST", "BT": "BT", "CST": "CST", "ARST": "ARST", "AEDT": "AEDT", "WEZ": "WEZ", "OESZ": "OESZ", "COT": "COT", "WIB": "WIB", "VET": "VET", "AWST": "AWST", "HNPM": "HNPM", "PDT": "PDT", "AEST": "AEST", "∅∅∅": "∅∅∅", "HADT": "HADT", "ACDT": "ACDT", "AKDT": "AKDT", "EAT": "EAT", "ACST": "ACST", "MEZ": "MEZ", "WAST": "WAST", "WARST": "WARST", "SAST": "SAST", "HKT": "HKT", "TMT": "TMT", "ChST": "ChST", "PST": "PST", "HEPMX": "HEPMX", "AKST": "AKST", "WART": "WART", "EDT": "EDT", "CDT": "CDT", "LHDT": "LHDT", "TMST": "TMST", "BOT": "BOT", "ECT": "ECT", "AWDT": "AWDT", "ACWST": "ACWST", "WIT": "WIT", "GYT": "GYT", "EST": "EST", "CLT": "CLT", "GFT": "GFT", "GMT": "GMT", "WESZ": "WESZ", "HECU": "HECU", "WAT": "WAT", "AST": "AST", "ART": "ART", "HEEG": "HEEG", "CHADT": "CHADT", "HAT": "HAT", "CAT": "CAT", "MST": "MST", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "WITA": "WITA", "HAST": "HAST", "HNPMX": "HNPMX", "HNT": "HNT", "HNOG": "HNOG", "JDT": "JDT", "HNCU": "HNCU", "UYST": "UYST", "HKST": "HKST", "CLST": "CLST"}, - } - } -  -@@ -124,7 +101,7 @@ func (af *af_NA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (af *af_NA) MonthsAbbreviated() []string { -- return af.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (af *af_NA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (af *af_NA) MonthsNarrow() []string { -- return af.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (af *af_NA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (af *af_NA) MonthsWide() []string { -- return af.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,75 +167,13 @@ func (af *af_NA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'af_NA' and handles both Whole and Real numbers based on 'v' - func (af *af_NA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(af.group) - 1; j >= 0; j-- { -- b = append(b, af.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, af.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'af_NA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (af *af_NA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, af.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, af.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'af_NA' -@@ -266,58 +181,7 @@ func (af *af_NA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := af.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(af.group) - 1; j >= 0; j-- { -- b = append(b, af.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, af.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, af.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'af_NA' -@@ -326,70 +190,7 @@ func (af *af_NA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := af.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(af.group) - 1; j >= 0; j-- { -- b = append(b, af.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, af.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, af.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, af.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'af_NA' -@@ -397,28 +198,6 @@ func (af *af_NA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -486,19 +265,6 @@ func (af *af_NA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -507,26 +273,6 @@ func (af *af_NA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -535,30 +281,6 @@ func (af *af_NA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -567,34 +289,5 @@ func (af *af_NA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := af.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/af_ZA/af_ZA.go b/af_ZA/af_ZA.go -index 4e99fc4..b840e45 100644 ---- a/af_ZA/af_ZA.go -+++ b/af_ZA/af_ZA.go -@@ -10,68 +10,45 @@ import ( - ) -  - type af_ZA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'af_ZA' locale - func New() locales.Translator { - return &af_ZA{ -- locale: "af_ZA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "Mrt.", "Apr.", "Mei", "Jun.", "Jul.", "Aug.", "Sep.", "Okt.", "Nov.", "Des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januarie", "Februarie", "Maart", "April", "Mei", "Junie", "Julie", "Augustus", "September", "Oktober", "November", "Desember"}, -- daysAbbreviated: []string{"So.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "W", "D", "V", "S"}, -- daysShort: []string{"So.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Sa."}, -- daysWide: []string{"Sondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag"}, -- periodsAbbreviated: []string{"vm.", "nm."}, -- periodsNarrow: []string{"v", "n"}, -- periodsWide: []string{"vm.", "nm."}, -- erasAbbreviated: []string{"v.C.", "n.C."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"∅∅∅": "Amasone-somertyd", "OEZ": "Oos-Europese standaardtyd", "WIB": "Wes-Indonesië-tyd", "AWST": "Australiese Westelike standaardtyd", "CHAST": "Chatham-standaardtyd", "JST": "Japan-standaardtyd", "WARST": "Wes-Argentinië-somertyd", "EDT": "Oostelike dagligtyd", "ARST": "Argentinië-somertyd", "WITA": "Sentraal Indonesië-tyd", "MESZ": "Sentraal-Europese somertyd", "TMT": "Turkmenistan-standaardtyd", "HAST": "Hawaii-Aleusiër-standaardtyd", "ART": "Argentinië-standaardtyd", "HNPM": "Sint-Pierre en Miquelon-standaardtyd", "MEZ": "Sentraal-Europese standaardtyd", "SAST": "Suid-Afrika-standaardtyd", "CLST": "Chili-somertyd", "TMST": "Turkmenistan-somertyd", "EAT": "Oos-Afrika-tyd", "HENOMX": "Noordwes-Meksiko-dagligtyd", "HNPMX": "Meksikaanse Pasifiese standaardtyd", "UYST": "Uruguay-somertyd", "IST": "Indië-standaardtyd", "WAT": "Wes-Afrika-standaardtyd", "WAST": "Wes-Afrika-somertyd", "ECT": "Ecuador-tyd", "GYT": "Guyana-tyd", "VET": "Venezuela-tyd", "HKST": "Hongkong-somertyd", "LHDT": "Lord Howe-dagligtyd", "NZDT": "Nieu-Seeland-dagligtyd", "ChST": "Chamorro-standaardtyd", "HEEG": "Oos-Groenland-somertyd", "COT": "Colombië-standaardtyd", "HEPMX": "Meksikaanse Pasifiese dagligtyd", "WESZ": "Wes-Europese somertyd", "ACDT": "Australiese sentrale dagligtyd", "CAT": "Sentraal-Afrika-tyd", "UYT": "Uruguay-standaardtyd", "CST": "Sentrale standaardtyd", "HEPM": "Sint-Pierre en Miquelon-dagligtyd", "LHST": "Lord Howe-standaardtyd", "CHADT": "Chatham-dagligtyd", "CLT": "Chili-standaardtyd", "JDT": "Japan-dagligtyd", "WART": "Wes-Argentinië-standaardtyd", "HNCU": "Kuba-standaardtyd", "HEOG": "Wes-Groenland-somertyd", "ACWST": "Australiese sentraal-Westelike standaard-tyd", "AEST": "Australiese Oostelike standaardtyd", "HNEG": "Oos-Groenland-standaardtyd", "AKST": "Alaska-standaardtyd", "BT": "Bhoetan-tyd", "PDT": "Pasifiese dagligtyd", "COST": "Colombië-somertyd", "GMT": "Greenwich-mediaantyd", "AKDT": "Alaska-dagligtyd", "PST": "Pasifiese standaardtyd", "AEDT": "Australiese Oostelike dagligtyd", "AWDT": "Australiese Westelike dagligtyd", "HKT": "Hongkong-standaardtyd", "AST": "Atlantiese standaardtyd", "ADT": "Atlantiese dagligtyd", "GFT": "Frans-Guiana-tyd", "HNNOMX": "Noordwes-Meksiko-standaardtyd", "WIT": "Oos-Indonesië-tyd", "HNT": "Newfoundland-standaardtyd", "SGT": "Singapoer-standaardtyd", "CDT": "Sentrale dagligtyd", "WEZ": "Wes-Europese standaardtyd", "ACWDT": "Australiese sentraal-Westelike dagligtyd", "HAT": "Newfoundland-dagligtyd", "NZST": "Nieu-Seeland-standaardtyd", "ACST": "Australiese sentraal-standaardtyd", "OESZ": "Oos-Europese somertyd", "HECU": "Kuba-dagligtyd", "EST": "Oostelike standaardtyd", "MST": "MST", "MDT": "MDT", "MYT": "Maleisië-tyd", "SRT": "Suriname-tyd", "HNOG": "Wes-Groenland-standaardtyd", "BOT": "Bolivia-tyd", "HADT": "Hawaii-Aleusiër-dagligtyd"}, -+ locale: "af_ZA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MESZ": "MESZ", "JST": "JST", "CHADT": "CHADT", "AKST": "AKST", "EDT": "EDT", "BOT": "BOT", "HADT": "HADT", "AWST": "AWST", "AKDT": "AKDT", "CAT": "CAT", "WIB": "WIB", "HAST": "HAST", "HEEG": "HEEG", "HNOG": "HNOG", "CLST": "CLST", "SRT": "SRT", "HEPMX": "HEPMX", "OESZ": "OESZ", "GYT": "GYT", "HNEG": "HNEG", "HNPM": "HNPM", "HEPM": "HEPM", "HNT": "HNT", "HEOG": "HEOG", "COST": "COST", "HNNOMX": "HNNOMX", "GFT": "GFT", "COT": "COT", "MST": "MST", "NZST": "NZST", "ACST": "ACST", "LHST": "LHST", "MYT": "MYT", "WEZ": "WEZ", "CST": "CST", "AWDT": "AWDT", "HECU": "HECU", "HNPMX": "HNPMX", "HAT": "HAT", "WITA": "WITA", "NZDT": "NZDT", "UYST": "UYST", "∅∅∅": "∅∅∅", "IST": "IST", "OEZ": "OEZ", "TMT": "TMT", "CHAST": "CHAST", "SGT": "SGT", "EST": "EST", "ADT": "ADT", "GMT": "GMT", "AEDT": "AEDT", "UYT": "UYT", "VET": "VET", "SAST": "SAST", "CDT": "CDT", "ART": "ART", "ARST": "ARST", "AST": "AST", "HNCU": "HNCU", "WAST": "WAST", "WART": "WART", "WAT": "WAT", "MDT": "MDT", "ChST": "ChST", "EAT": "EAT", "HENOMX": "HENOMX", "LHDT": "LHDT", "PST": "PST", "WESZ": "WESZ", "CLT": "CLT", "JDT": "JDT", "AEST": "AEST", "WIT": "WIT", "ECT": "ECT", "ACDT": "ACDT", "ACWDT": "ACWDT", "PDT": "PDT", "HKT": "HKT", "HKST": "HKST", "MEZ": "MEZ", "ACWST": "ACWST", "BT": "BT", "WARST": "WARST", "TMST": "TMST"}, - } - } -  -@@ -124,7 +101,7 @@ func (af *af_ZA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (af *af_ZA) MonthsAbbreviated() []string { -- return af.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (af *af_ZA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (af *af_ZA) MonthsNarrow() []string { -- return af.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (af *af_ZA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (af *af_ZA) MonthsWide() []string { -- return af.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,75 +167,13 @@ func (af *af_ZA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'af_ZA' and handles both Whole and Real numbers based on 'v' - func (af *af_ZA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(af.group) - 1; j >= 0; j-- { -- b = append(b, af.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, af.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'af_ZA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (af *af_ZA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, af.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, af.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'af_ZA' -@@ -266,58 +181,7 @@ func (af *af_ZA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := af.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(af.group) - 1; j >= 0; j-- { -- b = append(b, af.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, af.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, af.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'af_ZA' -@@ -326,70 +190,7 @@ func (af *af_ZA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := af.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, af.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(af.group) - 1; j >= 0; j-- { -- b = append(b, af.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, af.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, af.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, af.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'af_ZA' -@@ -397,28 +198,6 @@ func (af *af_ZA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -427,21 +206,6 @@ func (af *af_ZA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, af.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,21 +214,6 @@ func (af *af_ZA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, af.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,24 +222,6 @@ func (af *af_ZA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, af.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, af.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -499,19 +230,6 @@ func (af *af_ZA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -520,26 +238,6 @@ func (af *af_ZA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -548,30 +246,6 @@ func (af *af_ZA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -580,34 +254,5 @@ func (af *af_ZA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, af.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := af.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/agq/agq.go b/agq/agq.go -index 430aa6b..f57c297 100644 ---- a/agq/agq.go -+++ b/agq/agq.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"SK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Sěe Kɨ̀lesto", "Bǎa Kɨ̀lesto"}, -- timezones: map[string]string{"BOT": "BOT", "TMT": "TMT", "WAST": "WAST", "MDT": "MDT", "HNPMX": "HNPMX", "AST": "AST", "AEDT": "AEDT", "HKST": "HKST", "CLST": "CLST", "ACST": "ACST", "OESZ": "OESZ", "WIT": "WIT", "PDT": "PDT", "ACWST": "ACWST", "HEPM": "HEPM", "MEZ": "MEZ", "NZST": "NZST", "NZDT": "NZDT", "IST": "IST", "EDT": "EDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "JDT": "JDT", "WIB": "WIB", "SRT": "SRT", "HEOG": "HEOG", "LHDT": "LHDT", "ECT": "ECT", "WARST": "WARST", "COT": "COT", "COST": "COST", "GMT": "GMT", "BT": "BT", "ART": "ART", "WAT": "WAT", "OEZ": "OEZ", "HNCU": "HNCU", "EST": "EST", "PST": "PST", "AEST": "AEST", "AWDT": "AWDT", "WITA": "WITA", "CHAST": "CHAST", "HEPMX": "HEPMX", "UYT": "UYT", "HADT": "HADT", "HAT": "HAT", "HNPM": "HNPM", "MESZ": "MESZ", "ChST": "ChST", "HEEG": "HEEG", "EAT": "EAT", "HECU": "HECU", "MST": "MST", "WESZ": "WESZ", "CHADT": "CHADT", "GFT": "GFT", "TMST": "TMST", "ADT": "ADT", "VET": "VET", "SAST": "SAST", "MYT": "MYT", "WEZ": "WEZ", "AWST": "AWST", "JST": "JST", "HENOMX": "HENOMX", "UYST": "UYST", "HKT": "HKT", "CAT": "CAT", "SGT": "SGT", "GYT": "GYT", "HNT": "HNT", "∅∅∅": "∅∅∅", "CDT": "CDT", "LHST": "LHST", "CLT": "CLT", "ACDT": "ACDT", "AKDT": "AKDT", "HAST": "HAST", "HNEG": "HNEG", "WART": "WART", "HNNOMX": "HNNOMX", "AKST": "AKST", "CST": "CST", "ARST": "ARST"}, -+ timezones: map[string]string{"BOT": "BOT", "∅∅∅": "∅∅∅", "WAT": "WAT", "AKDT": "AKDT", "HECU": "HECU", "OESZ": "OESZ", "COT": "COT", "CST": "CST", "HAT": "HAT", "ARST": "ARST", "SRT": "SRT", "HEPM": "HEPM", "WIT": "WIT", "ECT": "ECT", "JST": "JST", "AWST": "AWST", "EDT": "EDT", "HAST": "HAST", "BT": "BT", "WESZ": "WESZ", "GFT": "GFT", "TMST": "TMST", "AST": "AST", "GMT": "GMT", "UYST": "UYST", "WEZ": "WEZ", "ART": "ART", "MYT": "MYT", "AEST": "AEST", "CHAST": "CHAST", "PDT": "PDT", "WAST": "WAST", "HEOG": "HEOG", "CLST": "CLST", "MESZ": "MESZ", "HEEG": "HEEG", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "VET": "VET", "OEZ": "OEZ", "TMT": "TMT", "CHADT": "CHADT", "HEPMX": "HEPMX", "HNCU": "HNCU", "HNT": "HNT", "WARST": "WARST", "HKT": "HKT", "HKST": "HKST", "CLT": "CLT", "WITA": "WITA", "WIB": "WIB", "ADT": "ADT", "HNEG": "HNEG", "AWDT": "AWDT", "LHDT": "LHDT", "ACWDT": "ACWDT", "EST": "EST", "ACST": "ACST", "LHST": "LHST", "CDT": "CDT", "EAT": "EAT", "HNPM": "HNPM", "UYT": "UYT", "WART": "WART", "SAST": "SAST", "MST": "MST", "MDT": "MDT", "HADT": "HADT", "IST": "IST", "ACWST": "ACWST", "GYT": "GYT", "ChST": "ChST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "JDT": "JDT", "AEDT": "AEDT", "AKST": "AKST", "HNOG": "HNOG", "NZST": "NZST", "MEZ": "MEZ", "PST": "PST", "SGT": "SGT", "COST": "COST", "CAT": "CAT", "NZDT": "NZDT"}, - } - } -  -diff --git a/agq_CM/agq_CM.go b/agq_CM/agq_CM.go -index 33225f3..0662597 100644 ---- a/agq_CM/agq_CM.go -+++ b/agq_CM/agq_CM.go -@@ -42,26 +42,13 @@ type agq_CM struct { - // New returns a new instance of translator for the 'agq_CM' locale - func New() locales.Translator { - return &agq_CM{ -- locale: "agq_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "nùm", "kɨz", "tɨd", "taa", "see", "nzu", "dum", "fɔe", "dzu", "lɔm", "kaa", "fwo"}, -- monthsNarrow: []string{"", "n", "k", "t", "t", "s", "z", "k", "f", "d", "l", "c", "f"}, -- monthsWide: []string{"", "ndzɔ̀ŋɔ̀nùm", "ndzɔ̀ŋɔ̀kƗ̀zùʔ", "ndzɔ̀ŋɔ̀tƗ̀dʉ̀ghà", "ndzɔ̀ŋɔ̀tǎafʉ̄ghā", "ndzɔ̀ŋèsèe", "ndzɔ̀ŋɔ̀nzùghò", "ndzɔ̀ŋɔ̀dùmlo", "ndzɔ̀ŋɔ̀kwîfɔ̀e", "ndzɔ̀ŋɔ̀tƗ̀fʉ̀ghàdzughù", "ndzɔ̀ŋɔ̀ghǔuwelɔ̀m", "ndzɔ̀ŋɔ̀chwaʔàkaa wo", "ndzɔ̀ŋèfwòo"}, -- daysAbbreviated: []string{"nts", "kpa", "ghɔ", "tɔm", "ume", "ghɨ", "dzk"}, -- daysNarrow: []string{"n", "k", "g", "t", "u", "g", "d"}, -- daysWide: []string{"tsuʔntsɨ", "tsuʔukpà", "tsuʔughɔe", "tsuʔutɔ̀mlò", "tsuʔumè", "tsuʔughɨ̂m", "tsuʔndzɨkɔʔɔ"}, -- periodsAbbreviated: []string{"a.g", "a.k"}, -- periodsWide: []string{"a.g", "a.k"}, -- erasAbbreviated: []string{"SK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Sěe Kɨ̀lesto", "Bǎa Kɨ̀lesto"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "WAT": "WAT", "HAT": "HAT", "ChST": "ChST", "HNEG": "HNEG", "AKST": "AKST", "AKDT": "AKDT", "WIT": "WIT", "BT": "BT", "LHDT": "LHDT", "CLT": "CLT", "COST": "COST", "HNCU": "HNCU", "EDT": "EDT", "VET": "VET", "SRT": "SRT", "AEST": "AEST", "AEDT": "AEDT", "JDT": "JDT", "GFT": "GFT", "GYT": "GYT", "HADT": "HADT", "HNOG": "HNOG", "PDT": "PDT", "AWST": "AWST", "AWDT": "AWDT", "CLST": "CLST", "TMT": "TMT", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "WESZ": "WESZ", "HKT": "HKT", "MEZ": "MEZ", "CHAST": "CHAST", "ACDT": "ACDT", "WAST": "WAST", "OEZ": "OEZ", "COT": "COT", "ART": "ART", "ECT": "ECT", "WARST": "WARST", "HNNOMX": "HNNOMX", "SGT": "SGT", "EST": "EST", "PST": "PST", "HNT": "HNT", "NZST": "NZST", "HEEG": "HEEG", "CAT": "CAT", "OESZ": "OESZ", "MDT": "MDT", "UYT": "UYT", "EAT": "EAT", "HECU": "HECU", "HNPMX": "HNPMX", "CST": "CST", "HEPM": "HEPM", "NZDT": "NZDT", "IST": "IST", "JST": "JST", "ADT": "ADT", "HEOG": "HEOG", "ACWST": "ACWST", "HKST": "HKST", "HNPM": "HNPM", "SAST": "SAST", "TMST": "TMST", "WART": "WART", "ARST": "ARST", "WEZ": "WEZ", "WITA": "WITA", "MESZ": "MESZ", "BOT": "BOT", "CDT": "CDT", "ACWDT": "ACWDT", "CHADT": "CHADT", "GMT": "GMT", "AST": "AST", "UYST": "UYST", "MST": "MST", "MYT": "MYT", "WIB": "WIB", "HAST": "HAST", "LHST": "LHST", "ACST": "ACST"}, -+ locale: "agq_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "ART": "ART", "ACDT": "ACDT", "HEPM": "HEPM", "ACWDT": "ACWDT", "WARST": "WARST", "CST": "CST", "MST": "MST", "SGT": "SGT", "TMST": "TMST", "ARST": "ARST", "CHADT": "CHADT", "VET": "VET", "CLST": "CLST", "AEST": "AEST", "HECU": "HECU", "OEZ": "OEZ", "GYT": "GYT", "EST": "EST", "PST": "PST", "PDT": "PDT", "WAT": "WAT", "NZDT": "NZDT", "CDT": "CDT", "ChST": "ChST", "ACST": "ACST", "MYT": "MYT", "AKDT": "AKDT", "HNOG": "HNOG", "NZST": "NZST", "HNEG": "HNEG", "AWST": "AWST", "HKST": "HKST", "GMT": "GMT", "UYT": "UYT", "CAT": "CAT", "WIB": "WIB", "LHDT": "LHDT", "BT": "BT", "WAST": "WAST", "COT": "COT", "COST": "COST", "AST": "AST", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "HNCU": "HNCU", "WEZ": "WEZ", "ECT": "ECT", "GFT": "GFT", "HEOG": "HEOG", "CLT": "CLT", "HAST": "HAST", "LHST": "LHST", "∅∅∅": "∅∅∅", "UYST": "UYST", "WART": "WART", "HKT": "HKT", "WESZ": "WESZ", "SAST": "SAST", "TMT": "TMT", "MDT": "MDT", "EAT": "EAT", "JST": "JST", "AWDT": "AWDT", "HNPMX": "HNPMX", "EDT": "EDT", "AEDT": "AEDT", "CHAST": "CHAST", "AKST": "AKST", "ADT": "ADT", "SRT": "SRT", "HENOMX": "HENOMX", "MESZ": "MESZ", "JDT": "JDT", "OESZ": "OESZ", "HNT": "HNT", "HAT": "HAT", "HADT": "HADT", "ACWST": "ACWST", "HEPMX": "HEPMX", "BOT": "BOT", "HEEG": "HEEG", "MEZ": "MEZ", "IST": "IST", "WIT": "WIT"}, - } - } -  -@@ -107,7 +94,7 @@ func (agq *agq_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (agq *agq_CM) MonthsAbbreviated() []string { -- return agq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -117,7 +104,7 @@ func (agq *agq_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (agq *agq_CM) MonthsNarrow() []string { -- return agq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -127,7 +114,7 @@ func (agq *agq_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (agq *agq_CM) MonthsWide() []string { -- return agq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -173,75 +160,13 @@ func (agq *agq_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'agq_CM' and handles both Whole and Real numbers based on 'v' - func (agq *agq_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, agq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(agq.group) - 1; j >= 0; j-- { -- b = append(b, agq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, agq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'agq_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (agq *agq_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, agq.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, agq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, agq.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'agq_CM' -@@ -249,56 +174,7 @@ func (agq *agq_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := agq.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, agq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(agq.group) - 1; j >= 0; j-- { -- b = append(b, agq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, agq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, agq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'agq_CM' -@@ -307,63 +183,7 @@ func (agq *agq_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := agq.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, agq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(agq.group) - 1; j >= 0; j-- { -- b = append(b, agq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, agq.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, agq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'agq_CM' -@@ -371,17 +191,6 @@ func (agq *agq_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -390,17 +199,6 @@ func (agq *agq_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, agq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -409,17 +207,6 @@ func (agq *agq_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, agq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +215,6 @@ func (agq *agq_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, agq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, agq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,19 +223,6 @@ func (agq *agq_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -470,26 +231,6 @@ func (agq *agq_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -498,30 +239,6 @@ func (agq *agq_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -530,34 +247,5 @@ func (agq *agq_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, agq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := agq.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ak/ak.go b/ak/ak.go -index 17425f4..39db909 100644 ---- a/ak/ak.go -+++ b/ak/ak.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AK", "KE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Ansa Kristo", "Kristo Ekyiri"}, -- timezones: map[string]string{"ACST": "ACST", "MST": "MST", "HNT": "HNT", "ART": "ART", "WIB": "WIB", "ACWST": "ACWST", "MEZ": "MEZ", "MESZ": "MESZ", "JDT": "JDT", "HNCU": "HNCU", "AKST": "AKST", "AST": "AST", "AWST": "AWST", "CHADT": "CHADT", "JST": "JST", "OEZ": "OEZ", "EDT": "EDT", "HAT": "HAT", "LHST": "LHST", "ChST": "ChST", "BOT": "BOT", "COT": "COT", "CDT": "CDT", "HAST": "HAST", "WESZ": "WESZ", "SAST": "SAST", "∅∅∅": "∅∅∅", "WAST": "WAST", "WARST": "WARST", "WIT": "WIT", "BT": "BT", "ACWDT": "ACWDT", "WITA": "WITA", "NZDT": "NZDT", "CLST": "CLST", "WAT": "WAT", "WART": "WART", "GMT": "GMT", "MYT": "MYT", "HNNOMX": "HNNOMX", "EST": "EST", "WEZ": "WEZ", "AEDT": "AEDT", "TMT": "TMT", "CST": "CST", "CHAST": "CHAST", "HENOMX": "HENOMX", "MDT": "MDT", "HADT": "HADT", "VET": "VET", "PST": "PST", "HEEG": "HEEG", "ECT": "ECT", "ADT": "ADT", "ARST": "ARST", "HNPM": "HNPM", "GFT": "GFT", "ACDT": "ACDT", "COST": "COST", "SGT": "SGT", "HEPMX": "HEPMX", "AKDT": "AKDT", "SRT": "SRT", "LHDT": "LHDT", "IST": "IST", "TMST": "TMST", "OESZ": "OESZ", "HECU": "HECU", "UYT": "UYT", "AWDT": "AWDT", "HKST": "HKST", "HEPM": "HEPM", "HKT": "HKT", "NZST": "NZST", "HNEG": "HNEG", "EAT": "EAT", "UYST": "UYST", "AEST": "AEST", "CLT": "CLT", "HNPMX": "HNPMX", "HEOG": "HEOG", "CAT": "CAT", "GYT": "GYT", "PDT": "PDT", "HNOG": "HNOG"}, -+ timezones: map[string]string{"GFT": "GFT", "HEOG": "HEOG", "ChST": "ChST", "BOT": "BOT", "EAT": "EAT", "JST": "JST", "JDT": "JDT", "PST": "PST", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "CDT": "CDT", "HADT": "HADT", "ACDT": "ACDT", "UYT": "UYT", "VET": "VET", "WARST": "WARST", "AKST": "AKST", "GMT": "GMT", "MEZ": "MEZ", "HNEG": "HNEG", "HENOMX": "HENOMX", "TMT": "TMT", "CLST": "CLST", "HNT": "HNT", "HAT": "HAT", "HNPM": "HNPM", "PDT": "PDT", "OESZ": "OESZ", "CHAST": "CHAST", "UYST": "UYST", "MST": "MST", "HAST": "HAST", "HNNOMX": "HNNOMX", "HECU": "HECU", "WAT": "WAT", "EST": "EST", "NZST": "NZST", "NZDT": "NZDT", "CHADT": "CHADT", "WEZ": "WEZ", "HKT": "HKT", "SRT": "SRT", "ACST": "ACST", "BT": "BT", "HNCU": "HNCU", "WART": "WART", "COST": "COST", "HKST": "HKST", "AST": "AST", "MYT": "MYT", "HEPM": "HEPM", "COT": "COT", "CLT": "CLT", "ECT": "ECT", "LHST": "LHST", "SGT": "SGT", "AEDT": "AEDT", "HNPMX": "HNPMX", "OEZ": "OEZ", "TMST": "TMST", "WIB": "WIB", "AWST": "AWST", "IST": "IST", "HNOG": "HNOG", "EDT": "EDT", "CST": "CST", "ARST": "ARST", "AEST": "AEST", "SAST": "SAST", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "AWDT": "AWDT", "WAST": "WAST", "AKDT": "AKDT", "GYT": "GYT", "CAT": "CAT", "WITA": "WITA", "ART": "ART", "HEEG": "HEEG", "ACWST": "ACWST", "WIT": "WIT", "MDT": "MDT", "ADT": "ADT", "LHDT": "LHDT"}, - } - } -  -diff --git a/ak_GH/ak_GH.go b/ak_GH/ak_GH.go -index c07c545..44cb397 100644 ---- a/ak_GH/ak_GH.go -+++ b/ak_GH/ak_GH.go -@@ -42,25 +42,13 @@ type ak_GH struct { - // New returns a new instance of translator for the 'ak_GH' locale - func New() locales.Translator { - return &ak_GH{ -- locale: "ak_GH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "S-Ɔ", "K-Ɔ", "E-Ɔ", "E-O", "E-K", "O-A", "A-K", "D-Ɔ", "F-Ɛ", "Ɔ-A", "Ɔ-O", "M-Ɔ"}, -- monthsWide: []string{"", "Sanda-Ɔpɛpɔn", "Kwakwar-Ɔgyefuo", "Ebɔw-Ɔbenem", "Ebɔbira-Oforisuo", "Esusow Aketseaba-Kɔtɔnimba", "Obirade-Ayɛwohomumu", "Ayɛwoho-Kitawonsa", "Difuu-Ɔsandaa", "Fankwa-Ɛbɔ", "Ɔbɛsɛ-Ahinime", "Ɔberɛfɛw-Obubuo", "Mumu-Ɔpɛnimba"}, -- daysAbbreviated: []string{"Kwe", "Dwo", "Ben", "Wuk", "Yaw", "Fia", "Mem"}, -- daysNarrow: []string{"K", "D", "B", "W", "Y", "F", "M"}, -- daysWide: []string{"Kwesida", "Dwowda", "Benada", "Wukuda", "Yawda", "Fida", "Memeneda"}, -- periodsAbbreviated: []string{"AN", "EW"}, -- periodsWide: []string{"AN", "EW"}, -- erasAbbreviated: []string{"AK", "KE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Ansa Kristo", "Kristo Ekyiri"}, -- timezones: map[string]string{"ACDT": "ACDT", "HNT": "HNT", "NZDT": "NZDT", "MESZ": "MESZ", "SAST": "SAST", "ACWST": "ACWST", "ChST": "ChST", "MDT": "MDT", "UYT": "UYT", "WIB": "WIB", "ARST": "ARST", "COT": "COT", "COST": "COST", "HNCU": "HNCU", "HEPMX": "HEPMX", "CLST": "CLST", "ACST": "ACST", "PDT": "PDT", "JDT": "JDT", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "ACWDT": "ACWDT", "AWDT": "AWDT", "EAT": "EAT", "AKDT": "AKDT", "UYST": "UYST", "HKT": "HKT", "EST": "EST", "CHAST": "CHAST", "CHADT": "CHADT", "HEOG": "HEOG", "IST": "IST", "GFT": "GFT", "ECT": "ECT", "MST": "MST", "CST": "CST", "SRT": "SRT", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "WARST": "WARST", "HAST": "HAST", "HEPM": "HEPM", "WART": "WART", "HKST": "HKST", "WITA": "WITA", "AEDT": "AEDT", "MYT": "MYT", "JST": "JST", "WAST": "WAST", "HNOG": "HNOG", "PST": "PST", "WEZ": "WEZ", "HEEG": "HEEG", "TMT": "TMT", "HECU": "HECU", "SGT": "SGT", "AKST": "AKST", "CLT": "CLT", "TMST": "TMST", "BOT": "BOT", "ADT": "ADT", "HADT": "HADT", "WESZ": "WESZ", "MEZ": "MEZ", "AST": "AST", "GYT": "GYT", "VET": "VET", "ART": "ART", "CAT": "CAT", "GMT": "GMT", "EDT": "EDT", "CDT": "CDT", "AWST": "AWST", "NZST": "NZST", "LHDT": "LHDT", "HNEG": "HNEG", "WAT": "WAT", "HENOMX": "HENOMX", "BT": "BT", "AEST": "AEST", "WIT": "WIT", "HAT": "HAT", "HNPM": "HNPM", "LHST": "LHST"}, -+ locale: "ak_GH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "WESZ": "WESZ", "COT": "COT", "HEOG": "HEOG", "JST": "JST", "CHADT": "CHADT", "HNCU": "HNCU", "CDT": "CDT", "WIB": "WIB", "HAST": "HAST", "HEEG": "HEEG", "IST": "IST", "CHAST": "CHAST", "HAT": "HAT", "HNOG": "HNOG", "WITA": "WITA", "CST": "CST", "AST": "AST", "HNNOMX": "HNNOMX", "OEZ": "OEZ", "OESZ": "OESZ", "HNT": "HNT", "WIT": "WIT", "SAST": "SAST", "EAT": "EAT", "MESZ": "MESZ", "PST": "PST", "AEDT": "AEDT", "HECU": "HECU", "ADT": "ADT", "HEPM": "HEPM", "VET": "VET", "AKDT": "AKDT", "WARST": "WARST", "GMT": "GMT", "ARST": "ARST", "MYT": "MYT", "WEZ": "WEZ", "GYT": "GYT", "HKST": "HKST", "TMST": "TMST", "UYT": "UYT", "∅∅∅": "∅∅∅", "CLT": "CLT", "MST": "MST", "SRT": "SRT", "ACWST": "ACWST", "AEST": "AEST", "ACST": "ACST", "MEZ": "MEZ", "LHST": "LHST", "BT": "BT", "ACWDT": "ACWDT", "UYST": "UYST", "MDT": "MDT", "ChST": "ChST", "ART": "ART", "HNPM": "HNPM", "WAST": "WAST", "AKST": "AKST", "EST": "EST", "NZST": "NZST", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "GFT": "GFT", "CAT": "CAT", "BOT": "BOT", "HNEG": "HNEG", "PDT": "PDT", "SGT": "SGT", "WART": "WART", "COST": "COST", "HKT": "HKT", "CLST": "CLST", "NZDT": "NZDT", "AWST": "AWST", "HNPMX": "HNPMX", "WAT": "WAT", "HADT": "HADT", "ACDT": "ACDT", "LHDT": "LHDT", "JDT": "JDT", "EDT": "EDT", "ECT": "ECT", "TMT": "TMT"}, - } - } -  -@@ -113,7 +101,7 @@ func (ak *ak_GH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ak *ak_GH) MonthsAbbreviated() []string { -- return ak.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -133,7 +121,7 @@ func (ak *ak_GH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ak *ak_GH) MonthsWide() []string { -- return ak.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,56 +181,7 @@ func (ak *ak_GH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ak.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ak.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ak.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ak.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ak.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ak_GH' -@@ -251,64 +190,7 @@ func (ak *ak_GH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ak.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ak.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ak.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ak.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ak.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ak_GH' -@@ -316,28 +198,6 @@ func (ak *ak_GH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -346,17 +206,6 @@ func (ak *ak_GH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ak.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -365,17 +214,6 @@ func (ak *ak_GH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ak.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -384,25 +222,6 @@ func (ak *ak_GH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ak.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ak.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -411,28 +230,6 @@ func (ak *ak_GH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ak.periodsAbbreviated[0]...) -- } else { -- b = append(b, ak.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -441,35 +238,6 @@ func (ak *ak_GH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ak.periodsAbbreviated[0]...) -- } else { -- b = append(b, ak.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -478,40 +246,6 @@ func (ak *ak_GH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ak.periodsAbbreviated[0]...) -- } else { -- b = append(b, ak.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -520,44 +254,5 @@ func (ak *ak_GH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ak.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ak.periodsAbbreviated[0]...) -- } else { -- b = append(b, ak.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ak.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/am/am.go b/am/am.go -index 4ae553c..f15ff9b 100644 ---- a/am/am.go -+++ b/am/am.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ዓ/ዓ", "ዓ/ም"}, - erasNarrow: []string{"ዓ/ዓ", "ዓ/ም"}, - erasWide: []string{"ዓመተ ዓለም", "ዓመተ ምሕረት"}, -- timezones: map[string]string{"EST": "የምዕራባዊ መደበኛ የሰዓት አቆጣጠር", "MDT": "MDT", "UYT": "የኡራጓይ መደበኛ ሰዓት", "LHST": "የሎርድ ሆዌ መደበኛ የሰዓት አቆጣጠር", "HEEG": "የምስራቅ ግሪንላንድ ክረምት ሰዓት", "OEZ": "የምስራቃዊ አውሮፓ መደበኛ ሰዓት", "WIB": "የምዕራባዊ ኢንዶኔዢያ ሰዓት", "HEPM": "ቅዱስ የፒዬር እና ሚኴሎን የቀን ብርሃን ሰዓት", "JST": "የጃፓን መደበኛ ሰዓት", "WAST": "የምዕራብ አፍሪካ ክረምት ሰዓት", "AKDT": "የአላስካ የቀን ሰዓት አቆጣጠር", "WIT": "የምስራቃዊ ኢንዶኔዢያ ሰዓት", "ART": "የአርጀንቲና መደበኛ ሰዓት አቆጣጠር", "AWDT": "የአውስትራሊያ ምስራቃዊ የቀን ሰዓት አቆጣጠር", "CHADT": "የቻታም የቀን ብርሃን ሰዓት", "HNEG": "የምስራቅ ግሪንላንድ መደበኛ ሰዓት", "COST": "የኮሎምቢያ ክረምት ሰዓት", "HEPMX": "የሜክሲኮ ፓሲፊክ የቀን ሰዓት አቆጣጠር", "PDT": "የፓስፊክ የቀን ሰዓት አቆጣጠር", "HKT": "የሆንግ ኮንግ መደበኛ ሰዓት", "MESZ": "የመካከለኛው አውሮፓ ክረምት ሰዓት", "IST": "የህንድ መደበኛ ሰዓት", "TMT": "የቱርክመኒስታን መደበኛ ሰዓት", "TMST": "የቱርክመኒስታን ክረምት ሰዓት", "EAT": "የምስራቅ አፍሪካ ሰዓት", "CDT": "የመካከለኛ የቀን ሰዓት አቆጣጠር", "HNOG": "የምዕራብ ግሪንላንድ መደበኛ ሰዓት", "CHAST": "የቻታም መደበኛ ሰዓት", "GFT": "የፈረንሳይ ጉያና ሰዓት", "HECU": "የኩባ የቀን ብርሃን ሰዓት", "HENOMX": "ሰሜናዊ ምእራብ የሜክሲኮ የቀን ሰዓት አቆጣጠር", "SGT": "የሲንጋፒር መደበኛ ሰዓት", "PST": "የፓስፊክ መደበኛ ሰዓት አቆጣጠር", "HEOG": "የምዕራብ ግሪንላንድ ክረምት ሰዓት", "AEST": "የአውስትራሊያ ምዕራባዊ መደበኛ የሰዓት አቆጣጠር", "JDT": "የጃፓን የቀን ብርሃን ሰዓት", "ACDT": "የአውስትራሊያ መካከለኛ የቀን ሰዓት አቆጣጠር", "HNPM": "ቅዱስ የፒዬር እና ሚኴሎን መደበኛ ሰዓት", "HNCU": "የኩባ መደበኛ ሰዓት", "AST": "የአትላንቲክ መደበኛ የሰዓት አቆጣጠር", "UYST": "የኡራጓይ ክረምት ሰዓት", "HAST": "የሃዋይ አሌኡት መደበኛ ሰዓት አቆጣጠር", "LHDT": "የሎርድ ሆዌ የቀን ሰዓት አቆጣጠር", "CLT": "የቺሊ መደበኛ ሰዓት", "∅∅∅": "የፔሩ ክረምት ሰዓት", "NZST": "የኒው ዚላንድ መደበኛ ሰዓት", "ChST": "የቻሞሮ መደበኛ ሰዓት", "SRT": "የሱሪናም ሰዓት", "GMT": "ግሪንዊች ማዕከላዊ ሰዓት", "HAT": "የኒውፋውንድላንድ የቀን የሰዓት አቆጣጠር", "HNNOMX": "ሰሜናዊ ምእራብ የሜክሲኮ መደበኛ ሰዓት አቆጣጠር", "WARST": "የአርጀንቲና ምስራቃዊ በጋ ሰዓት አቆጣጠር", "HNPMX": "የሜክሲኮ ፓሲፊክ መደበኛ ሰዓት አቆጣጠር", "AWST": "የአውስትራሊያ ምስራቃዊ መደበኛ ሰዓት አቆጣጠር", "WITA": "የመካከለኛው ኢንዶኔዢያ ሰዓት", "NZDT": "የኒው ዚላንድ የቀን ብርሃን ሰዓት", "WAT": "የምዕራብ አፍሪካ መደበኛ ሰዓት", "HADT": "የሃዋይ አሌኡት የቀን ሰዓት አቆጣጠር", "ACWDT": "የአውስትራሊያ መካከለኛው ምስራቅ የቀን ሰዓት አቆጣጠር", "MST": "MST", "CAT": "የመካከለኛው አፍሪካ ሰዓት", "ECT": "የኢኳዶር ሰዓት", "COT": "የኮሎምቢያ መደበኛ ሰዓት", "ADT": "የአትላንቲክ የቀን ሰዓት አቆጣጠር", "MYT": "የማሌይዢያ ሰዓት", "VET": "የቬኔዝዌላ ሰዓት", "WESZ": "የምዕራባዊ አውሮፓ ክረምት ሰዓት", "ACST": "የአውስትራሊያ መካከለኛ መደበኛ የሰዓት አቆጣጠር", "AEDT": "የአውስትራሊያ ምዕራባዊ የቀን ሰዓት አቆጣጠር", "HNT": "የኒውፋውንድላንድ መደበኛ የሰዓት አቆጣጠር", "BT": "የቡታን ሰዓት", "HKST": "የሆንግ ኮንግ ክረምት ሰዓት", "EDT": "የምዕራባዊ የቀን ሰዓት አቆጣጠር", "AKST": "የአላስካ መደበኛ የሰዓት አቆጣጠር", "GYT": "የጉያና ሰዓት", "WEZ": "የምዕራባዊ አውሮፓ መደበኛ ሰዓት", "ACWST": "የአውስትራሊያ መካከለኛ ምስራቃዊ መደበኛ ሰዓት አቆጣጠር", "OESZ": "የምስራቃዊ አውሮፓ ክረምት ሰዓት", "CST": "የመካከለኛ መደበኛ ሰዓት አቆጣጠር", "ARST": "የአርጀንቲና የበጋ ሰዓት አቆጣጠር", "MEZ": "የመካከለኛው አውሮፓ መደበኛ ሰዓት", "SAST": "የደቡብ አፍሪካ መደበኛ ሰዓት", "CLST": "የቺሊ ክረምት ሰዓት", "BOT": "የቦሊቪያ ሰዓት", "WART": "የምዕራባዊ አርጀንቲና መደበኛ ሰዓት አቆጣጠር"}, -+ timezones: map[string]string{"WIB": "የምዕራባዊ ኢንዶኔዢያ ሰዓት", "MDT": "MDT", "BOT": "የቦሊቪያ ሰዓት", "HNNOMX": "ሰሜናዊ ምእራብ የሜክሲኮ መደበኛ ሰዓት አቆጣጠር", "OESZ": "የምስራቃዊ አውሮፓ ክረምት ሰዓት", "EDT": "የምዕራባዊ የቀን ሰዓት አቆጣጠር", "ECT": "የኢኳዶር ሰዓት", "MST": "MST", "LHST": "የሎርድ ሆዌ መደበኛ የሰዓት አቆጣጠር", "WAST": "የምዕራብ አፍሪካ ክረምት ሰዓት", "GFT": "የፈረንሳይ ጉያና ሰዓት", "HECU": "የኩባ የቀን ብርሃን ሰዓት", "HAST": "የሃዋይ አሌኡት መደበኛ ሰዓት አቆጣጠር", "HKT": "የሆንግ ኮንግ መደበኛ ሰዓት", "EAT": "የምስራቅ አፍሪካ ሰዓት", "HNEG": "የምስራቅ ግሪንላንድ መደበኛ ሰዓት", "HENOMX": "ሰሜናዊ ምእራብ የሜክሲኮ የቀን ሰዓት አቆጣጠር", "BT": "የቡታን ሰዓት", "WART": "የምዕራባዊ አርጀንቲና መደበኛ ሰዓት አቆጣጠር", "TMT": "የቱርክመኒስታን መደበኛ ሰዓት", "EST": "የምዕራባዊ መደበኛ የሰዓት አቆጣጠር", "CLST": "የቺሊ ክረምት ሰዓት", "NZST": "የኒው ዚላንድ መደበኛ ሰዓት", "ChST": "የቻሞሮ መደበኛ ሰዓት", "MESZ": "የመካከለኛው አውሮፓ ክረምት ሰዓት", "AEST": "የአውስትራሊያ ምዕራባዊ መደበኛ የሰዓት አቆጣጠር", "HEPMX": "የሜክሲኮ ፓሲፊክ የቀን ሰዓት አቆጣጠር", "AKDT": "የአላስካ የቀን ሰዓት አቆጣጠር", "AEDT": "የአውስትራሊያ ምዕራባዊ የቀን ሰዓት አቆጣጠር", "ARST": "የአርጀንቲና የበጋ ሰዓት አቆጣጠር", "AST": "የአትላንቲክ መደበኛ የሰዓት አቆጣጠር", "SRT": "የሱሪናም ሰዓት", "PDT": "የፓስፊክ የቀን ሰዓት አቆጣጠር", "WESZ": "የምዕራባዊ አውሮፓ ክረምት ሰዓት", "NZDT": "የኒው ዚላንድ የቀን ብርሃን ሰዓት", "MYT": "የማሌይዢያ ሰዓት", "UYT": "የኡራጓይ መደበኛ ሰዓት", "IST": "የህንድ መደበኛ ሰዓት", "SGT": "የሲንጋፒር መደበኛ ሰዓት", "CLT": "የቺሊ መደበኛ ሰዓት", "ADT": "የአትላንቲክ የቀን ሰዓት አቆጣጠር", "JDT": "የጃፓን የቀን ብርሃን ሰዓት", "AWST": "የአውስትራሊያ ምስራቃዊ መደበኛ ሰዓት አቆጣጠር", "HNPMX": "የሜክሲኮ ፓሲፊክ መደበኛ ሰዓት አቆጣጠር", "CDT": "የመካከለኛ የቀን ሰዓት አቆጣጠር", "UYST": "የኡራጓይ ክረምት ሰዓት", "WARST": "የአርጀንቲና ምስራቃዊ በጋ ሰዓት አቆጣጠር", "GYT": "የጉያና ሰዓት", "COT": "የኮሎምቢያ መደበኛ ሰዓት", "COST": "የኮሎምቢያ ክረምት ሰዓት", "HNOG": "የምዕራብ ግሪንላንድ መደበኛ ሰዓት", "CST": "የመካከለኛ መደበኛ ሰዓት አቆጣጠር", "ACWDT": "የአውስትራሊያ መካከለኛው ምስራቅ የቀን ሰዓት አቆጣጠር", "PST": "የፓስፊክ መደበኛ ሰዓት አቆጣጠር", "HAT": "የኒውፋውንድላንድ የቀን የሰዓት አቆጣጠር", "LHDT": "የሎርድ ሆዌ የቀን ሰዓት አቆጣጠር", "∅∅∅": "∅∅∅", "WEZ": "የምዕራባዊ አውሮፓ መደበኛ ሰዓት", "HNT": "የኒውፋውንድላንድ መደበኛ የሰዓት አቆጣጠር", "ART": "የአርጀንቲና መደበኛ ሰዓት አቆጣጠር", "HNPM": "ቅዱስ የፒዬር እና ሚኴሎን መደበኛ ሰዓት", "HEPM": "ቅዱስ የፒዬር እና ሚኴሎን የቀን ብርሃን ሰዓት", "AWDT": "የአውስትራሊያ ምስራቃዊ የቀን ሰዓት አቆጣጠር", "ACST": "የአውስትራሊያ መካከለኛ መደበኛ የሰዓት አቆጣጠር", "SAST": "የደቡብ አፍሪካ መደበኛ ሰዓት", "TMST": "የቱርክመኒስታን ክረምት ሰዓት", "CAT": "የመካከለኛው አፍሪካ ሰዓት", "WITA": "የመካከለኛው ኢንዶኔዢያ ሰዓት", "HEEG": "የምስራቅ ግሪንላንድ ክረምት ሰዓት", "CHADT": "የቻታም የቀን ብርሃን ሰዓት", "WAT": "የምዕራብ አፍሪካ መደበኛ ሰዓት", "AKST": "የአላስካ መደበኛ የሰዓት አቆጣጠር", "WIT": "የምስራቃዊ ኢንዶኔዢያ ሰዓት", "GMT": "ግሪንዊች ማዕከላዊ ሰዓት", "ACDT": "የአውስትራሊያ መካከለኛ የቀን ሰዓት አቆጣጠር", "ACWST": "የአውስትራሊያ መካከለኛ ምስራቃዊ መደበኛ ሰዓት አቆጣጠር", "CHAST": "የቻታም መደበኛ ሰዓት", "OEZ": "የምስራቃዊ አውሮፓ መደበኛ ሰዓት", "MEZ": "የመካከለኛው አውሮፓ መደበኛ ሰዓት", "JST": "የጃፓን መደበኛ ሰዓት", "HEOG": "የምዕራብ ግሪንላንድ ክረምት ሰዓት", "HKST": "የሆንግ ኮንግ ክረምት ሰዓት", "VET": "የቬኔዝዌላ ሰዓት", "HNCU": "የኩባ መደበኛ ሰዓት", "HADT": "የሃዋይ አሌኡት የቀን ሰዓት አቆጣጠር"}, - } - } -  -diff --git a/am_ET/am_ET.go b/am_ET/am_ET.go -index 0ab31df..7a26e1b 100644 ---- a/am_ET/am_ET.go -+++ b/am_ET/am_ET.go -@@ -10,68 +10,45 @@ import ( - ) -  - type am_ET struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'am_ET' locale - func New() locales.Translator { - return &am_ET{ -- locale: "am_ET", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ጃንዩ", "ፌብሩ", "ማርች", "ኤፕሪ", "ሜይ", "ጁን", "ጁላይ", "ኦገስ", "ሴፕቴ", "ኦክቶ", "ኖቬም", "ዲሴም"}, -- monthsNarrow: []string{"", "ጃ", "ፌ", "ማ", "ኤ", "ሜ", "ጁ", "ጁ", "ኦ", "ሴ", "ኦ", "ኖ", "ዲ"}, -- monthsWide: []string{"", "ጃንዩወሪ", "ፌብሩወሪ", "ማርች", "ኤፕሪል", "ሜይ", "ጁን", "ጁላይ", "ኦገስት", "ሴፕቴምበር", "ኦክቶበር", "ኖቬምበር", "ዲሴምበር"}, -- daysAbbreviated: []string{"እሑድ", "ሰኞ", "ማክሰ", "ረቡዕ", "ሐሙስ", "ዓርብ", "ቅዳሜ"}, -- daysNarrow: []string{"እ", "ሰ", "ማ", "ረ", "ሐ", "ዓ", "ቅ"}, -- daysShort: []string{"እ", "ሰ", "ማ", "ረ", "ሐ", "ዓ", "ቅ"}, -- daysWide: []string{"እሑድ", "ሰኞ", "ማክሰኞ", "ረቡዕ", "ሐሙስ", "ዓርብ", "ቅዳሜ"}, -- periodsAbbreviated: []string{"ጥዋት", "ከሰዓት"}, -- periodsNarrow: []string{"ጠ", "ከ"}, -- periodsWide: []string{"ጥዋት", "ከሰዓት"}, -- erasAbbreviated: []string{"ዓ/ዓ", "ዓ/ም"}, -- erasNarrow: []string{"ዓ/ዓ", "ዓ/ም"}, -- erasWide: []string{"ዓመተ ዓለም", "ዓመተ ምሕረት"}, -- timezones: map[string]string{"UYST": "የኡራጓይ ክረምት ሰዓት", "WIT": "የምስራቃዊ ኢንዶኔዢያ ሰዓት", "AWST": "የአውስትራሊያ ምስራቃዊ መደበኛ ሰዓት አቆጣጠር", "OEZ": "የምስራቃዊ አውሮፓ መደበኛ ሰዓት", "HNEG": "የምስራቅ ግሪንላንድ መደበኛ ሰዓት", "GMT": "ግሪንዊች ማዕከላዊ ሰዓት", "WIB": "የምዕራባዊ ኢንዶኔዢያ ሰዓት", "ACWST": "የአውስትራሊያ መካከለኛ ምስራቃዊ መደበኛ ሰዓት አቆጣጠር", "CLT": "የቺሊ መደበኛ ሰዓት", "HEPM": "ቅዱስ የፒዬር እና ሚኴሎን የቀን ብርሃን ሰዓት", "PDT": "የፓስፊክ የቀን ሰዓት አቆጣጠር", "CHADT": "የቻታም የቀን ብርሃን ሰዓት", "IST": "የህንድ መደበኛ ሰዓት", "∅∅∅": "የአማዞን የቀን ሰዓት አቆጣጠር", "JDT": "የጃፓን የቀን ብርሃን ሰዓት", "VET": "የቬኔዝዌላ ሰዓት", "WESZ": "የምዕራባዊ አውሮፓ ክረምት ሰዓት", "HAT": "የኒውፋውንድላንድ የቀን የሰዓት አቆጣጠር", "EST": "የምዕራባዊ መደበኛ የሰዓት አቆጣጠር", "MYT": "የማሌይዢያ ሰዓት", "ADT": "የአትላንቲክ የቀን ሰዓት አቆጣጠር", "AEST": "የአውስትራሊያ ምዕራባዊ መደበኛ የሰዓት አቆጣጠር", "JST": "የጃፓን መደበኛ ሰዓት", "AST": "የአትላንቲክ መደበኛ የሰዓት አቆጣጠር", "BOT": "የቦሊቪያ ሰዓት", "MDT": "የተራራ የቀንሰዓት አቆጣጠር", "PST": "የፓስፊክ መደበኛ ሰዓት አቆጣጠር", "SAST": "የደቡብ አፍሪካ መደበኛ ሰዓት", "HNPMX": "የሜክሲኮ ፓሲፊክ መደበኛ ሰዓት አቆጣጠር", "UYT": "የኡራጓይ መደበኛ ሰዓት", "HAST": "የሃዋይ አሌኡት መደበኛ ሰዓት አቆጣጠር", "ACWDT": "የአውስትራሊያ መካከለኛው ምስራቅ የቀን ሰዓት አቆጣጠር", "MEZ": "የመካከለኛው አውሮፓ መደበኛ ሰዓት", "TMT": "የቱርክመኒስታን መደበኛ ሰዓት", "ACDT": "የአውስትራሊያ መካከለኛ የቀን ሰዓት አቆጣጠር", "SGT": "የሲንጋፒር መደበኛ ሰዓት", "HNCU": "የኩባ መደበኛ ሰዓት", "AKDT": "የአላስካ የቀን ሰዓት አቆጣጠር", "NZDT": "የኒው ዚላንድ የቀን ብርሃን ሰዓት", "CLST": "የቺሊ ክረምት ሰዓት", "HEEG": "የምስራቅ ግሪንላንድ ክረምት ሰዓት", "CHAST": "የቻታም መደበኛ ሰዓት", "MESZ": "የመካከለኛው አውሮፓ ክረምት ሰዓት", "WARST": "የአርጀንቲና ምስራቃዊ በጋ ሰዓት አቆጣጠር", "HECU": "የኩባ የቀን ብርሃን ሰዓት", "HNOG": "የምዕራብ ግሪንላንድ መደበኛ ሰዓት", "HKST": "የሆንግ ኮንግ ክረምት ሰዓት", "NZST": "የኒው ዚላንድ መደበኛ ሰዓት", "OESZ": "የምስራቃዊ አውሮፓ ክረምት ሰዓት", "CST": "የመካከለኛ መደበኛ ሰዓት አቆጣጠር", "SRT": "የሱሪናም ሰዓት", "HNPM": "ቅዱስ የፒዬር እና ሚኴሎን መደበኛ ሰዓት", "ChST": "የቻሞሮ መደበኛ ሰዓት", "WAST": "የምዕራብ አፍሪካ ክረምት ሰዓት", "EDT": "የምዕራባዊ የቀን ሰዓት አቆጣጠር", "CDT": "የመካከለኛ የቀን ሰዓት አቆጣጠር", "HADT": "የሃዋይ አሌኡት የቀን ሰዓት አቆጣጠር", "LHDT": "የሎርድ ሆዌ የቀን ሰዓት አቆጣጠር", "WAT": "የምዕራብ አፍሪካ መደበኛ ሰዓት", "AEDT": "የአውስትራሊያ ምዕራባዊ የቀን ሰዓት አቆጣጠር", "ACST": "የአውስትራሊያ መካከለኛ መደበኛ የሰዓት አቆጣጠር", "EAT": "የምስራቅ አፍሪካ ሰዓት", "BT": "የቡታን ሰዓት", "ART": "የአርጀንቲና መደበኛ ሰዓት አቆጣጠር", "ARST": "የአርጀንቲና የበጋ ሰዓት አቆጣጠር", "MST": "የተራራ መደበኛ የሰዓት አቆጣጠር", "TMST": "የቱርክመኒስታን ክረምት ሰዓት", "WART": "የምዕራባዊ አርጀንቲና መደበኛ ሰዓት አቆጣጠር", "HKT": "የሆንግ ኮንግ መደበኛ ሰዓት", "ECT": "የኢኳዶር ሰዓት", "COT": "የኮሎምቢያ መደበኛ ሰዓት", "HEPMX": "የሜክሲኮ ፓሲፊክ የቀን ሰዓት አቆጣጠር", "GYT": "የጉያና ሰዓት", "WEZ": "የምዕራባዊ አውሮፓ መደበኛ ሰዓት", "HNT": "የኒውፋውንድላንድ መደበኛ የሰዓት አቆጣጠር", "HEOG": "የምዕራብ ግሪንላንድ ክረምት ሰዓት", "AWDT": "የአውስትራሊያ ምስራቃዊ የቀን ሰዓት አቆጣጠር", "HENOMX": "ሰሜናዊ ምእራብ የሜክሲኮ የቀን ሰዓት አቆጣጠር", "CAT": "የመካከለኛው አፍሪካ ሰዓት", "COST": "የኮሎምቢያ ክረምት ሰዓት", "HNNOMX": "ሰሜናዊ ምእራብ የሜክሲኮ መደበኛ ሰዓት አቆጣጠር", "AKST": "የአላስካ መደበኛ የሰዓት አቆጣጠር", "WITA": "የመካከለኛው ኢንዶኔዢያ ሰዓት", "LHST": "የሎርድ ሆዌ መደበኛ የሰዓት አቆጣጠር", "GFT": "የፈረንሳይ ጉያና ሰዓት"}, -+ locale: "am_ET", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JST": "JST", "∅∅∅": "∅∅∅", "WAT": "WAT", "CLST": "CLST", "CDT": "CDT", "HNCU": "HNCU", "HEOG": "HEOG", "AEDT": "AEDT", "WEZ": "WEZ", "TMST": "TMST", "NZDT": "NZDT", "ChST": "ChST", "HEEG": "HEEG", "UYST": "UYST", "EST": "EST", "BOT": "BOT", "ACDT": "ACDT", "CHADT": "CHADT", "SGT": "SGT", "VET": "VET", "WIT": "WIT", "WITA": "WITA", "AST": "AST", "AKDT": "AKDT", "CLT": "CLT", "MDT": "MDT", "GMT": "GMT", "ART": "ART", "AWDT": "AWDT", "HEPMX": "HEPMX", "GFT": "GFT", "NZST": "NZST", "WIB": "WIB", "HENOMX": "HENOMX", "AWST": "AWST", "BT": "BT", "OEZ": "OEZ", "SAST": "SAST", "ACWDT": "ACWDT", "ARST": "ARST", "HADT": "HADT", "MEZ": "MEZ", "MESZ": "MESZ", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "CHAST": "CHAST", "WARST": "WARST", "HKT": "HKT", "CST": "CST", "AKST": "AKST", "ECT": "ECT", "ADT": "ADT", "SRT": "SRT", "PST": "PST", "AEST": "AEST", "HNT": "HNT", "TMT": "TMT", "MST": "MST", "HAST": "HAST", "LHDT": "LHDT", "HEPM": "HEPM", "JDT": "JDT", "PDT": "PDT", "WART": "WART", "CAT": "CAT", "HNPM": "HNPM", "IST": "IST", "UYT": "UYT", "WESZ": "WESZ", "WAST": "WAST", "COST": "COST", "HNOG": "HNOG", "LHST": "LHST", "HAT": "HAT", "EDT": "EDT", "EAT": "EAT", "COT": "COT", "ACST": "ACST", "MYT": "MYT", "HECU": "HECU", "HNPMX": "HNPMX", "OESZ": "OESZ", "GYT": "GYT", "HKST": "HKST"}, - } - } -  -@@ -136,7 +113,7 @@ func (am *am_ET) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (am *am_ET) MonthsAbbreviated() []string { -- return am.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +123,7 @@ func (am *am_ET) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (am *am_ET) MonthsNarrow() []string { -- return am.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +133,7 @@ func (am *am_ET) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (am *am_ET) MonthsWide() []string { -- return am.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,73 +179,13 @@ func (am *am_ET) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'am_ET' and handles both Whole and Real numbers based on 'v' - func (am *am_ET) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, am.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, am.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, am.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'am_ET' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (am *am_ET) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, am.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, am.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, am.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'am_ET' -@@ -276,56 +193,7 @@ func (am *am_ET) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := am.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, am.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, am.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, am.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, am.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'am_ET' -@@ -334,68 +202,7 @@ func (am *am_ET) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := am.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, am.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, am.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, am.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, am.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, am.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'am_ET' -@@ -403,27 +210,6 @@ func (am *am_ET) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,17 +218,6 @@ func (am *am_ET) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, am.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +226,6 @@ func (am *am_ET) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, am.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +234,6 @@ func (am *am_ET) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, am.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20, 0xe1, 0x8d, 0xa3}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, am.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,28 +242,6 @@ func (am *am_ET) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, am.periodsAbbreviated[0]...) -- } else { -- b = append(b, am.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -521,35 +250,6 @@ func (am *am_ET) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, am.periodsAbbreviated[0]...) -- } else { -- b = append(b, am.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -558,40 +258,6 @@ func (am *am_ET) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, am.periodsAbbreviated[0]...) -- } else { -- b = append(b, am.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -600,44 +266,5 @@ func (am *am_ET) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, am.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, am.periodsAbbreviated[0]...) -- } else { -- b = append(b, am.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := am.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar/ar.go b/ar/ar.go -index 05ebd8f..4281fb7 100644 ---- a/ar/ar.go -+++ b/ar/ar.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"VET": "توقيت فنزويلا", "PDT": "توقيت المحيط الهادي الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "CAT": "توقيت وسط أفريقيا", "HADT": "توقيت هاواي ألوتيان الصيفي", "WIT": "توقيت شرق إندونيسيا", "WESZ": "توقيت غرب أوروبا الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "GFT": "توقيت غايانا الفرنسية", "ADT": "التوقيت الصيفي الأطلسي", "∅∅∅": "توقيت الأمازون الصيفي", "HNCU": "توقيت كوبا الرسمي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "WITA": "توقيت وسط إندونيسيا", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "NZST": "توقيت نيوزيلندا الرسمي", "BT": "توقيت بوتان", "AWST": "توقيت غرب أستراليا الرسمي", "GMT": "توقيت غرينتش", "MST": "التوقيت الجبلي الرسمي لأمريكا الشمالية", "BOT": "توقيت بوليفيا", "OEZ": "توقيت شرق أوروبا الرسمي", "AKDT": "توقيت ألاسكا الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HNT": "توقيت نيوفاوندلاند الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "GYT": "توقيت غيانا", "ARST": "توقيت الأرجنتين الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "TMT": "توقيت تركمانستان الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "HKT": "توقيت هونغ كونغ الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "ECT": "توقيت الإكوادور", "COST": "توقيت كولومبيا الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "UYST": "توقيت أورغواي الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "ART": "توقيت الأرجنتين الرسمي", "IST": "توقيت الهند", "CLST": "توقيت شيلي الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AKST": "التوقيت الرسمي لألاسكا", "MYT": "توقيت ماليزيا", "MDT": "التوقيت الجبلي الصيفي لأمريكا الشمالية", "SRT": "توقيت سورينام", "PST": "توقيت المحيط الهادي الرسمي", "EAT": "توقيت شرق أفريقيا", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AST": "التوقيت الرسمي الأطلسي", "HNEG": "توقيت شرق غرينلاند الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "HECU": "توقيت كوبا الصيفي", "UYT": "توقيت أورغواي الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "JDT": "توقيت اليابان الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "HAST": "توقيت هاواي ألوتيان الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "CHADT": "توقيت تشاتام الصيفي", "ChST": "توقيت تشامورو", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "LHST": "توقيت لورد هاو الرسمي", "SAST": "توقيت جنوب أفريقيا", "WARST": "توقيت غرب الأرجنتين الصيفي", "COT": "توقيت كولومبيا الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "CLT": "توقيت شيلي الرسمي", "JST": "توقيت اليابان الرسمي", "TMST": "توقيت تركمانستان الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "SGT": "توقيت سنغافورة"}, -+ timezones: map[string]string{"HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "WARST": "توقيت غرب الأرجنتين الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "JST": "توقيت اليابان الرسمي", "CHADT": "توقيت تشاتام الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "AST": "التوقيت الرسمي الأطلسي", "ADT": "التوقيت الصيفي الأطلسي", "HAST": "توقيت هاواي ألوتيان الرسمي", "BT": "توقيت بوتان", "AEST": "توقيت شرق أستراليا الرسمي", "GYT": "توقيت غيانا", "∅∅∅": "توقيت برازيليا الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "SAST": "توقيت جنوب أفريقيا", "COST": "توقيت كولومبيا الصيفي", "HKT": "توقيت هونغ كونغ الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "UYT": "توقيت أورغواي الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "MST": "MST", "MDT": "MDT", "BOT": "توقيت بوليفيا", "LHST": "توقيت لورد هاو الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "HNCU": "توقيت كوبا الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "EAT": "توقيت شرق أفريقيا", "AWST": "توقيت غرب أستراليا الرسمي", "AKDT": "توقيت ألاسكا الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "COT": "توقيت كولومبيا الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "ART": "توقيت الأرجنتين الرسمي", "UYST": "توقيت أورغواي الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "WITA": "توقيت وسط إندونيسيا", "ARST": "توقيت الأرجنتين الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "HECU": "توقيت كوبا الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "CLST": "توقيت شيلي الصيفي", "GMT": "توقيت غرينتش", "HEEG": "توقيت شرق غرينلاند الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "HADT": "توقيت هاواي ألوتيان الصيفي", "ECT": "توقيت الإكوادور", "ChST": "توقيت تشامورو", "LHDT": "التوقيت الصيفي للورد هاو", "PST": "توقيت المحيط الهادي الرسمي", "WIT": "توقيت شرق إندونيسيا", "HNOG": "توقيت غرب غرينلاند الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "CAT": "توقيت وسط أفريقيا", "VET": "توقيت فنزويلا", "HNEG": "توقيت شرق غرينلاند الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "GFT": "توقيت غايانا الفرنسية", "HNT": "توقيت نيوفاوندلاند الرسمي", "TMST": "توقيت تركمانستان الصيفي", "SRT": "توقيت سورينام", "MYT": "توقيت ماليزيا", "JDT": "توقيت اليابان الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "CLT": "توقيت شيلي الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "SGT": "توقيت سنغافورة", "TMT": "توقيت تركمانستان الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "IST": "توقيت الهند", "WEZ": "توقيت غرب أوروبا الرسمي"}, - } - } -  -diff --git a/ar_001/ar_001.go b/ar_001/ar_001.go -index cffbc6a..d9a0a92 100644 ---- a/ar_001/ar_001.go -+++ b/ar_001/ar_001.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_001 struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_001' locale - func New() locales.Translator { - return &ar_001{ -- locale: "ar_001", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HADT": "توقيت هاواي ألوتيان الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "IST": "توقيت الهند", "ChST": "توقيت تشامورو", "TMST": "توقيت تركمانستان الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "SRT": "توقيت سورينام", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "JDT": "توقيت اليابان الصيفي", "UYT": "توقيت أورغواي الرسمي", "BT": "توقيت بوتان", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "UYST": "توقيت أورغواي الصيفي", "ART": "توقيت الأرجنتين الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "AST": "التوقيت الرسمي الأطلسي", "GYT": "توقيت غيانا", "VET": "توقيت فنزويلا", "HAT": "توقيت نيوفاوندلاند الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "TMT": "توقيت تركمانستان الرسمي", "EAT": "توقيت شرق أفريقيا", "WAST": "توقيت غرب أفريقيا الصيفي", "COT": "توقيت كولومبيا الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "WESZ": "توقيت غرب أوروبا الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "WITA": "توقيت وسط إندونيسيا", "ECT": "توقيت الإكوادور", "WARST": "توقيت غرب الأرجنتين الصيفي", "HNCU": "توقيت كوبا الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "CHAST": "توقيت تشاتام الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "SGT": "توقيت سنغافورة", "MYT": "توقيت ماليزيا", "ARST": "توقيت الأرجنتين الصيفي", "LHST": "توقيت لورد هاو الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "COST": "توقيت كولومبيا الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "ADT": "التوقيت الصيفي الأطلسي", "HNOG": "توقيت غرب غرينلاند الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "CAT": "توقيت وسط أفريقيا", "WAT": "توقيت غرب أفريقيا الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "AKDT": "توقيت ألاسكا الصيفي", "WIB": "توقيت غرب إندونيسيا", "HAST": "توقيت هاواي ألوتيان الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "CLT": "توقيت شيلي الرسمي", "JST": "توقيت اليابان الرسمي", "BOT": "توقيت بوليفيا", "GFT": "توقيت غايانا الفرنسية", "∅∅∅": "توقيت بيرو الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "WEZ": "توقيت غرب أوروبا الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "CHADT": "توقيت تشاتام الصيفي", "HECU": "توقيت كوبا الصيفي", "WIT": "توقيت شرق إندونيسيا", "SAST": "توقيت جنوب أفريقيا", "CLST": "توقيت شيلي الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "MST": "MST", "MDT": "MDT"}, -+ locale: "ar_001", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "SRT": "SRT", "JST": "JST", "BT": "BT", "WAT": "WAT", "AKDT": "AKDT", "WARST": "WARST", "CDT": "CDT", "JDT": "JDT", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "WART": "WART", "GYT": "GYT", "MDT": "MDT", "ChST": "ChST", "UYT": "UYT", "PDT": "PDT", "GFT": "GFT", "HKST": "HKST", "VET": "VET", "HNT": "HNT", "HEOG": "HEOG", "ART": "ART", "ARST": "ARST", "PST": "PST", "CAT": "CAT", "WITA": "WITA", "MST": "MST", "AWST": "AWST", "MYT": "MYT", "IST": "IST", "AKST": "AKST", "AST": "AST", "HNEG": "HNEG", "ADT": "ADT", "EAT": "EAT", "MEZ": "MEZ", "LHDT": "LHDT", "ACWST": "ACWST", "OESZ": "OESZ", "TMT": "TMT", "WIB": "WIB", "HNPM": "HNPM", "AEDT": "AEDT", "WAST": "WAST", "NZST": "NZST", "ECT": "ECT", "EST": "EST", "BOT": "BOT", "ACST": "ACST", "ACDT": "ACDT", "UYST": "UYST", "ACWDT": "ACWDT", "AEST": "AEST", "WEZ": "WEZ", "CHAST": "CHAST", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "OEZ": "OEZ", "EDT": "EDT", "MESZ": "MESZ", "TMST": "TMST", "HEPM": "HEPM", "HNCU": "HNCU", "HEPMX": "HEPMX", "COT": "COT", "COST": "COST", "GMT": "GMT", "HAST": "HAST", "HECU": "HECU", "HAT": "HAT", "SAST": "SAST", "HNOG": "HNOG", "HENOMX": "HENOMX", "LHST": "LHST", "SGT": "SGT", "HKT": "HKT", "CLT": "CLT", "HEEG": "HEEG", "WIT": "WIT", "CST": "CST", "HNPMX": "HNPMX", "NZDT": "NZDT", "HADT": "HADT", "AWDT": "AWDT"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_001) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_001) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_001) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_001) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_001) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_001) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_001) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_001' and handles both Whole and Real numbers based on 'v' - func (ar *ar_001) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_001' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_001) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_001' -@@ -338,62 +241,7 @@ func (ar *ar_001) FmtCurrency(num float64, v uint64, currency currency.Type) str -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_001' -@@ -402,69 +250,7 @@ func (ar *ar_001) FmtAccounting(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_001' -@@ -472,17 +258,6 @@ func (ar *ar_001) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_001) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_001) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_001) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_001) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_001) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_001) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_001) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_AE/ar_AE.go b/ar_AE/ar_AE.go -index 067ae8a..2b8e8bc 100644 ---- a/ar_AE/ar_AE.go -+++ b/ar_AE/ar_AE.go -@@ -10,70 +10,48 @@ import ( - ) -  - type ar_AE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_AE' locale - func New() locales.Translator { - return &ar_AE{ -- locale: "ar_AE", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "$", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"PST": "توقيت المحيط الهادي الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "LHST": "توقيت لورد هاو الرسمي", "CLT": "توقيت شيلي الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "HNT": "توقيت نيوفاوندلاند الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "TMT": "توقيت تركمانستان الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "SRT": "توقيت سورينام", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "NZDT": "توقيت نيوزيلندا الصيفي", "IST": "توقيت الهند", "GFT": "توقيت غايانا الفرنسية", "CAT": "توقيت وسط أفريقيا", "HNCU": "توقيت كوبا الرسمي", "MYT": "توقيت ماليزيا", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "SGT": "توقيت سنغافورة", "HADT": "توقيت هاواي ألوتيان الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "CHADT": "توقيت تشاتام الصيفي", "EAT": "توقيت شرق أفريقيا", "COST": "توقيت كولومبيا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "WAT": "توقيت غرب أفريقيا الرسمي", "COT": "توقيت كولومبيا الرسمي", "AKDT": "توقيت ألاسكا الصيفي", "MST": "MST", "ADT": "التوقيت الصيفي الأطلسي", "GYT": "توقيت غيانا", "ARST": "توقيت الأرجنتين الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "SAST": "توقيت جنوب أفريقيا", "ACDT": "توقيت وسط أستراليا الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "AST": "التوقيت الرسمي الأطلسي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "UYT": "توقيت أورغواي الرسمي", "MDT": "MDT", "WIT": "توقيت شرق إندونيسيا", "HEOG": "توقيت غرب غرينلاند الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "JDT": "توقيت اليابان الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AEST": "توقيت شرق أستراليا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "JST": "توقيت اليابان الرسمي", "WIB": "توقيت غرب إندونيسيا", "HAST": "توقيت هاواي ألوتيان الرسمي", "BOT": "توقيت بوليفيا", "TMST": "توقيت تركمانستان الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "UYST": "توقيت أورغواي الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HEEG": "توقيت شرق غرينلاند الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "BT": "توقيت بوتان", "PDT": "توقيت المحيط الهادي الصيفي", "WESZ": "توقيت غرب أوروبا الصيفي", "ART": "توقيت الأرجنتين الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "ECT": "توقيت الإكوادور", "HECU": "توقيت كوبا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "WITA": "توقيت وسط إندونيسيا", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "CLST": "توقيت شيلي الصيفي", "∅∅∅": "توقيت الأمازون الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "ChST": "توقيت تشامورو", "VET": "توقيت فنزويلا"}, -+ locale: "ar_AE", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "$", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"", ""}, -+ timezones: map[string]string{"EDT": "EDT", "TMT": "TMT", "HADT": "HADT", "HNPM": "HNPM", "CHADT": "CHADT", "AEDT": "AEDT", "HNCU": "HNCU", "EST": "EST", "HAT": "HAT", "TMST": "TMST", "WITA": "WITA", "MDT": "MDT", "HEEG": "HEEG", "SGT": "SGT", "WARST": "WARST", "GYT": "GYT", "HKT": "HKT", "HENOMX": "HENOMX", "LHDT": "LHDT", "JST": "JST", "JDT": "JDT", "OESZ": "OESZ", "BOT": "BOT", "VET": "VET", "HECU": "HECU", "AKDT": "AKDT", "NZDT": "NZDT", "CDT": "CDT", "GMT": "GMT", "SRT": "SRT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "LHST": "LHST", "IST": "IST", "ACWDT": "ACWDT", "HNEG": "HNEG", "ACWST": "ACWST", "AKST": "AKST", "WIT": "WIT", "CAT": "CAT", "AWST": "AWST", "UYT": "UYT", "WAST": "WAST", "HAST": "HAST", "WESZ": "WESZ", "WAT": "WAT", "HEOG": "HEOG", "WIB": "WIB", "ARST": "ARST", "WART": "WART", "SAST": "SAST", "ECT": "ECT", "MESZ": "MESZ", "UYST": "UYST", "GFT": "GFT", "ChST": "ChST", "CLT": "CLT", "ADT": "ADT", "ART": "ART", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "BT": "BT", "HNPMX": "HNPMX", "HKST": "HKST", "CHAST": "CHAST", "AEST": "AEST", "WEZ": "WEZ", "HNT": "HNT", "COST": "COST", "HNOG": "HNOG", "CLST": "CLST", "MEZ": "MEZ", "MYT": "MYT", "HEPM": "HEPM", "PST": "PST", "HEPMX": "HEPMX", "EAT": "EAT", "PDT": "PDT", "COT": "COT", "MST": "MST", "AST": "AST", "ACST": "ACST", "OEZ": "OEZ", "CST": "CST", "NZST": "NZST"}, - } - } -  -@@ -186,7 +164,7 @@ func (ar *ar_AE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_AE) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +174,7 @@ func (ar *ar_AE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_AE) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +184,7 @@ func (ar *ar_AE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_AE) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +230,13 @@ func (ar *ar_AE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_AE' and handles both Whole and Real numbers based on 'v' - func (ar *ar_AE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_AE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_AE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_AE' -@@ -338,62 +244,7 @@ func (ar *ar_AE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_AE' -@@ -402,69 +253,7 @@ func (ar *ar_AE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_AE' -@@ -472,17 +261,6 @@ func (ar *ar_AE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +269,6 @@ func (ar *ar_AE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +277,6 @@ func (ar *ar_AE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +285,6 @@ func (ar *ar_AE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +293,6 @@ func (ar *ar_AE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +301,6 @@ func (ar *ar_AE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +309,6 @@ func (ar *ar_AE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +317,5 @@ func (ar *ar_AE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_BH/ar_BH.go b/ar_BH/ar_BH.go -index 6ea0023..2d1e7c5 100644 ---- a/ar_BH/ar_BH.go -+++ b/ar_BH/ar_BH.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_BH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_BH' locale - func New() locales.Translator { - return &ar_BH{ -- locale: "ar_BH", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"MESZ": "توقيت وسط أوروبا الصيفي", "ECT": "توقيت الإكوادور", "AKDT": "توقيت ألاسكا الصيفي", "∅∅∅": "توقيت الأمازون الصيفي", "HECU": "توقيت كوبا الصيفي", "MST": "MST", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HNOG": "توقيت غرب غرينلاند الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "GYT": "توقيت غيانا", "MYT": "توقيت ماليزيا", "WIT": "توقيت شرق إندونيسيا", "ARST": "توقيت الأرجنتين الصيفي", "GMT": "توقيت غرينتش", "HADT": "توقيت هاواي ألوتيان الصيفي", "BT": "توقيت بوتان", "HNCU": "توقيت كوبا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "CLT": "توقيت شيلي الرسمي", "TMT": "توقيت تركمانستان الرسمي", "CAT": "توقيت وسط أفريقيا", "HAT": "توقيت نيوفاوندلاند الصيفي", "CLST": "توقيت شيلي الصيفي", "UYT": "توقيت أورغواي الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AEST": "توقيت شرق أستراليا الرسمي", "EAT": "توقيت شرق أفريقيا", "COT": "توقيت كولومبيا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "WARST": "توقيت غرب الأرجنتين الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "HEOG": "توقيت غرب غرينلاند الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "COST": "توقيت كولومبيا الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "IST": "توقيت الهند", "HEEG": "توقيت شرق غرينلاند الصيفي", "SGT": "توقيت سنغافورة", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "WEZ": "توقيت غرب أوروبا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "CHAST": "توقيت تشاتام الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "VET": "توقيت فنزويلا", "WAT": "توقيت غرب أفريقيا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "UYST": "توقيت أورغواي الصيفي", "HNT": "توقيت نيوفاوندلاند الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "JST": "توقيت اليابان الرسمي", "ChST": "توقيت تشامورو", "SRT": "توقيت سورينام", "CHADT": "توقيت تشاتام الصيفي", "GFT": "توقيت غايانا الفرنسية", "ACST": "توقيت وسط أستراليا الرسمي", "MDT": "MDT", "WIB": "توقيت غرب إندونيسيا", "ART": "توقيت الأرجنتين الرسمي", "LHST": "توقيت لورد هاو الرسمي", "BOT": "توقيت بوليفيا", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "JDT": "توقيت اليابان الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "TMST": "توقيت تركمانستان الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "WESZ": "توقيت غرب أوروبا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "SAST": "توقيت جنوب أفريقيا", "AST": "التوقيت الرسمي الأطلسي", "ADT": "التوقيت الصيفي الأطلسي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "WITA": "توقيت وسط إندونيسيا"}, -+ locale: "ar_BH", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEDT": "AEDT", "TMT": "TMT", "GMT": "GMT", "ARST": "ARST", "HAST": "HAST", "ACST": "ACST", "HENOMX": "HENOMX", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "ECT": "ECT", "JST": "JST", "ACWDT": "ACWDT", "BOT": "BOT", "CHADT": "CHADT", "UYT": "UYT", "MST": "MST", "HADT": "HADT", "AWST": "AWST", "BT": "BT", "WIT": "WIT", "HKT": "HKT", "CLST": "CLST", "WITA": "WITA", "NZDT": "NZDT", "AKST": "AKST", "MYT": "MYT", "HNCU": "HNCU", "WARST": "WARST", "CST": "CST", "CDT": "CDT", "EAT": "EAT", "HEEG": "HEEG", "AEST": "AEST", "OEZ": "OEZ", "GFT": "GFT", "HAT": "HAT", "NZST": "NZST", "HNEG": "HNEG", "HECU": "HECU", "TMST": "TMST", "SRT": "SRT", "ACDT": "ACDT", "HNPM": "HNPM", "UYST": "UYST", "WAST": "WAST", "HEOG": "HEOG", "CAT": "CAT", "IST": "IST", "ACWST": "ACWST", "HNT": "HNT", "MDT": "MDT", "PST": "PST", "SGT": "SGT", "PDT": "PDT", "WESZ": "WESZ", "GYT": "GYT", "EST": "EST", "EDT": "EDT", "CLT": "CLT", "ART": "ART", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "AKDT": "AKDT", "COST": "COST", "ChST": "ChST", "AWDT": "AWDT", "LHDT": "LHDT", "CHAST": "CHAST", "HKST": "HKST", "AST": "AST", "LHST": "LHST", "HEPM": "HEPM", "SAST": "SAST", "HNOG": "HNOG", "WIB": "WIB", "MEZ": "MEZ", "WAT": "WAT", "VET": "VET", "HEPMX": "HEPMX", "WART": "WART", "COT": "COT", "ADT": "ADT", "MESZ": "MESZ", "JDT": "JDT", "WEZ": "WEZ"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_BH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_BH) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_BH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_BH) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_BH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_BH) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_BH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_BH' and handles both Whole and Real numbers based on 'v' - func (ar *ar_BH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_BH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_BH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_BH' -@@ -338,62 +241,7 @@ func (ar *ar_BH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_BH' -@@ -402,69 +250,7 @@ func (ar *ar_BH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_BH' -@@ -472,17 +258,6 @@ func (ar *ar_BH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_BH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_BH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_BH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_BH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_BH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_BH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_BH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_DJ/ar_DJ.go b/ar_DJ/ar_DJ.go -index c5144cc..48359b6 100644 ---- a/ar_DJ/ar_DJ.go -+++ b/ar_DJ/ar_DJ.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_DJ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_DJ' locale - func New() locales.Translator { - return &ar_DJ{ -- locale: "ar_DJ", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "Fdj", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"ChST": "توقيت تشامورو", "TMT": "توقيت تركمانستان الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "NZST": "توقيت نيوزيلندا الرسمي", "SAST": "توقيت جنوب أفريقيا", "COT": "توقيت كولومبيا الرسمي", "HECU": "توقيت كوبا الصيفي", "HNT": "توقيت نيوفاوندلاند الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "WITA": "توقيت وسط إندونيسيا", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "AST": "التوقيت الرسمي الأطلسي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "CLST": "توقيت شيلي الصيفي", "BOT": "توقيت بوليفيا", "ACST": "توقيت وسط أستراليا الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "BT": "توقيت بوتان", "WEZ": "توقيت غرب أوروبا الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "GYT": "توقيت غيانا", "JDT": "توقيت اليابان الصيفي", "CAT": "توقيت وسط أفريقيا", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "MYT": "توقيت ماليزيا", "AKDT": "توقيت ألاسكا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "WESZ": "توقيت غرب أوروبا الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "COST": "توقيت كولومبيا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HAST": "توقيت هاواي ألوتيان الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "GMT": "توقيت غرينتش", "ART": "توقيت الأرجنتين الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "CHADT": "توقيت تشاتام الصيفي", "UYST": "توقيت أورغواي الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "WIB": "توقيت غرب إندونيسيا", "HEOG": "توقيت غرب غرينلاند الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "TMST": "توقيت تركمانستان الصيفي", "VET": "توقيت فنزويلا", "HKST": "توقيت هونغ كونغ الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "MST": "MST", "MDT": "MDT", "MEZ": "توقيت وسط أوروبا الرسمي", "LHST": "توقيت لورد هاو الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "CLT": "توقيت شيلي الرسمي", "∅∅∅": "توقيت الأمازون الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "SGT": "توقيت سنغافورة", "SRT": "توقيت سورينام", "ACDT": "توقيت وسط أستراليا الصيفي", "EAT": "توقيت شرق أفريقيا", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HNOG": "توقيت غرب غرينلاند الرسمي", "ECT": "توقيت الإكوادور", "UYT": "توقيت أورغواي الرسمي", "GFT": "توقيت غايانا الفرنسية", "HNCU": "توقيت كوبا الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "HADT": "توقيت هاواي ألوتيان الصيفي", "AEST": "توقيت شرق أستراليا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "CHAST": "توقيت تشاتام الرسمي", "IST": "توقيت الهند", "JST": "توقيت اليابان الرسمي", "WIT": "توقيت شرق إندونيسيا", "PDT": "توقيت المحيط الهادي الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك"}, -+ locale: "ar_DJ", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "Fdj", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "CHADT": "CHADT", "WAT": "WAT", "COST": "COST", "EAT": "EAT", "MYT": "MYT", "AEDT": "AEDT", "AKDT": "AKDT", "ARST": "ARST", "MESZ": "MESZ", "IST": "IST", "PDT": "PDT", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "HADT": "HADT", "JST": "JST", "ADT": "ADT", "VET": "VET", "HECU": "HECU", "GFT": "GFT", "WIT": "WIT", "HKST": "HKST", "MDT": "MDT", "UYST": "UYST", "GYT": "GYT", "WITA": "WITA", "HNPM": "HNPM", "TMT": "TMT", "CAT": "CAT", "NZST": "NZST", "ART": "ART", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "ACST": "ACST", "AWST": "AWST", "EDT": "EDT", "TMST": "TMST", "CLT": "CLT", "CDT": "CDT", "ECT": "ECT", "ChST": "ChST", "JDT": "JDT", "ACWDT": "ACWDT", "SAST": "SAST", "CST": "CST", "AST": "AST", "SRT": "SRT", "ACDT": "ACDT", "COT": "COT", "EST": "EST", "WESZ": "WESZ", "HNOG": "HNOG", "MEZ": "MEZ", "HEPM": "HEPM", "CHAST": "CHAST", "HEPMX": "HEPMX", "AKST": "AKST", "OEZ": "OEZ", "HNT": "HNT", "BOT": "BOT", "BT": "BT", "NZDT": "NZDT", "HAST": "HAST", "HEEG": "HEEG", "GMT": "GMT", "AEST": "AEST", "UYT": "UYT", "SGT": "SGT", "WART": "WART", "WARST": "WARST", "HEOG": "HEOG", "HAT": "HAT", "CLST": "CLST", "WIB": "WIB", "AWDT": "AWDT", "WEZ": "WEZ", "HNCU": "HNCU", "WAST": "WAST", "MST": "MST", "HENOMX": "HENOMX", "LHST": "LHST", "PST": "PST", "HNPMX": "HNPMX", "HKT": "HKT", "HNEG": "HNEG"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_DJ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_DJ) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_DJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_DJ) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_DJ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_DJ) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_DJ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_DJ' and handles both Whole and Real numbers based on 'v' - func (ar *ar_DJ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_DJ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_DJ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DJ' -@@ -338,62 +241,7 @@ func (ar *ar_DJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DJ' -@@ -402,69 +250,7 @@ func (ar *ar_DJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_DJ' -@@ -472,17 +258,6 @@ func (ar *ar_DJ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_DJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_DJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_DJ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_DJ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_DJ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_DJ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_DJ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_DZ/ar_DZ.go b/ar_DZ/ar_DZ.go -index 5ee8e26..21b9970 100644 ---- a/ar_DZ/ar_DZ.go -+++ b/ar_DZ/ar_DZ.go -@@ -10,70 +10,50 @@ import ( - ) -  - type ar_DZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_DZ' locale - func New() locales.Translator { - return &ar_DZ{ -- locale: "ar_DZ", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: ",", -- group: ".", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ج", "ف", "م", "أ", "م", "ج", "ج", "أ", "س", "أ", "ن", "د"}, -- monthsWide: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HKST": "توقيت هونغ كونغ الصيفي", "CHAST": "توقيت تشاتام الرسمي", "CHADT": "توقيت تشاتام الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "ECT": "توقيت الإكوادور", "WART": "توقيت غرب الأرجنتين الرسمي", "PST": "توقيت المحيط الهادي الرسمي", "COT": "توقيت كولومبيا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "ChST": "توقيت تشامورو", "WARST": "توقيت غرب الأرجنتين الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "SGT": "توقيت سنغافورة", "BT": "توقيت بوتان", "MDT": "التوقيت الجبلي الصيفي لأمريكا الشمالية", "GYT": "توقيت غيانا", "MST": "التوقيت الجبلي الرسمي لأمريكا الشمالية", "HNOG": "توقيت غرب غرينلاند الرسمي", "LHST": "توقيت لورد هاو الرسمي", "SAST": "توقيت جنوب أفريقيا", "JDT": "توقيت اليابان الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "UYST": "توقيت أورغواي الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "AEST": "توقيت شرق أستراليا الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "WAT": "توقيت غرب أفريقيا الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "WIT": "توقيت شرق إندونيسيا", "GFT": "توقيت غايانا الفرنسية", "TMT": "توقيت تركمانستان الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "CLT": "توقيت شيلي الرسمي", "CLST": "توقيت شيلي الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "HADT": "توقيت هاواي ألوتيان الصيفي", "ART": "توقيت الأرجنتين الرسمي", "IST": "توقيت الهند", "JST": "توقيت اليابان الرسمي", "HNCU": "توقيت كوبا الرسمي", "HECU": "توقيت كوبا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "ADT": "التوقيت الصيفي الأطلسي", "MYT": "توقيت ماليزيا", "UYT": "توقيت أورغواي الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "PDT": "توقيت المحيط الهادي الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "COST": "توقيت كولومبيا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HAT": "توقيت نيوفاوندلاند الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "WESZ": "توقيت غرب أوروبا الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "HKT": "توقيت هونغ كونغ الرسمي", "TMST": "توقيت تركمانستان الصيفي", "EAT": "توقيت شرق أفريقيا", "WIB": "توقيت غرب إندونيسيا", "∅∅∅": "توقيت الأمازون الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "SRT": "توقيت سورينام", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "BOT": "توقيت بوليفيا", "WITA": "توقيت وسط إندونيسيا", "AST": "التوقيت الرسمي الأطلسي", "VET": "توقيت فنزويلا", "HNT": "توقيت نيوفاوندلاند الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WEZ": "توقيت غرب أوروبا الرسمي", "CAT": "توقيت وسط أفريقيا", "WAST": "توقيت غرب أفريقيا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي"}, -+ locale: "ar_DZ", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -+ monthsNarrow: []string{"", "ج", "ف", "م", "أ", "م", "ج", "ج", "أ", "س", "أ", "ن", "د"}, -+ monthsWide: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -+ timezones: map[string]string{"CLST": "CLST", "WIB": "WIB", "HEOG": "HEOG", "JDT": "JDT", "WEZ": "WEZ", "WESZ": "WESZ", "AST": "AST", "ACST": "ACST", "HEEG": "HEEG", "AWST": "AWST", "MYT": "MYT", "HNPMX": "HNPMX", "GFT": "GFT", "WART": "WART", "EST": "EST", "MESZ": "MESZ", "TMT": "TMT", "ARST": "ARST", "CHAST": "CHAST", "WAST": "WAST", "GYT": "GYT", "COT": "COT", "CDT": "CDT", "NZST": "NZST", "GMT": "GMT", "UYST": "UYST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "LHDT": "LHDT", "PDT": "PDT", "HECU": "HECU", "COST": "COST", "EDT": "EDT", "MEZ": "MEZ", "CAT": "CAT", "IST": "IST", "AKDT": "AKDT", "WARST": "WARST", "CLT": "CLT", "MDT": "MDT", "CHADT": "CHADT", "HEPM": "HEPM", "WIT": "WIT", "HNEG": "HNEG", "ACWDT": "ACWDT", "SAST": "SAST", "HNOG": "HNOG", "HKT": "HKT", "TMST": "TMST", "NZDT": "NZDT", "BOT": "BOT", "ACWST": "ACWST", "EAT": "EAT", "SRT": "SRT", "HAST": "HAST", "UYT": "UYT", "PST": "PST", "BT": "BT", "HEPMX": "HEPMX", "VET": "VET", "HNCU": "HNCU", "WAT": "WAT", "AKST": "AKST", "AEDT": "AEDT", "MST": "MST", "OESZ": "OESZ", "HKST": "HKST", "ART": "ART", "HADT": "HADT", "ACDT": "ACDT", "AEST": "AEST", "∅∅∅": "∅∅∅", "ECT": "ECT", "ChST": "ChST", "AWDT": "AWDT", "HNPM": "HNPM", "SGT": "SGT", "JST": "JST", "OEZ": "OEZ", "HNT": "HNT", "HAT": "HAT", "WITA": "WITA", "CST": "CST", "ADT": "ADT", "LHST": "LHST"}, - } - } -  -@@ -252,79 +232,13 @@ func (ar *ar_DZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_DZ' and handles both Whole and Real numbers based on 'v' - func (ar *ar_DZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_DZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_DZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 10 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DZ' -@@ -332,58 +246,7 @@ func (ar *ar_DZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DZ' -@@ -392,65 +255,7 @@ func (ar *ar_DZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_DZ' -@@ -458,17 +263,6 @@ func (ar *ar_DZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,27 +271,6 @@ func (ar *ar_DZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,17 +279,6 @@ func (ar *ar_DZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -525,19 +287,6 @@ func (ar *ar_DZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -546,28 +295,6 @@ func (ar *ar_DZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -576,35 +303,6 @@ func (ar *ar_DZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -613,40 +311,6 @@ func (ar *ar_DZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -655,44 +319,5 @@ func (ar *ar_DZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_EG/ar_EG.go b/ar_EG/ar_EG.go -index 662ace3..54feef4 100644 ---- a/ar_EG/ar_EG.go -+++ b/ar_EG/ar_EG.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_EG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_EG' locale - func New() locales.Translator { - return &ar_EG{ -- locale: "ar_EG", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNPM": "توقيت سانت بيير وميكولون الرسمي", "JDT": "توقيت اليابان الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "MYT": "توقيت ماليزيا", "HEOG": "توقيت غرب غرينلاند الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "LHST": "توقيت لورد هاو الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "HECU": "توقيت كوبا الصيفي", "SGT": "توقيت سنغافورة", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HNT": "توقيت نيوفاوندلاند الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "∅∅∅": "توقيت الأمازون الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "ECT": "توقيت الإكوادور", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AEDT": "توقيت شرق أستراليا الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "COST": "توقيت كولومبيا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "WIB": "توقيت غرب إندونيسيا", "BT": "توقيت بوتان", "ART": "توقيت الأرجنتين الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "CLT": "توقيت شيلي الرسمي", "GFT": "توقيت غايانا الفرنسية", "WART": "توقيت غرب الأرجنتين الرسمي", "MST": "MST", "AKST": "التوقيت الرسمي لألاسكا", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "GYT": "توقيت غيانا", "WAT": "توقيت غرب أفريقيا الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "PST": "توقيت المحيط الهادي الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "SAST": "توقيت جنوب أفريقيا", "CLST": "توقيت شيلي الصيفي", "TMST": "توقيت تركمانستان الصيفي", "CAT": "توقيت وسط أفريقيا", "MEZ": "توقيت وسط أوروبا الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "EAT": "توقيت شرق أفريقيا", "MDT": "MDT", "HADT": "توقيت هاواي ألوتيان الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "CHAST": "توقيت تشاتام الرسمي", "TMT": "توقيت تركمانستان الرسمي", "ChST": "توقيت تشامورو", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "UYT": "توقيت أورغواي الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "JST": "توقيت اليابان الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "WIT": "توقيت شرق إندونيسيا", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "WITA": "توقيت وسط إندونيسيا", "WEZ": "توقيت غرب أوروبا الرسمي", "AST": "التوقيت الرسمي الأطلسي", "COT": "توقيت كولومبيا الرسمي", "GMT": "توقيت غرينتش", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "UYST": "توقيت أورغواي الصيفي", "SRT": "توقيت سورينام", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "VET": "توقيت فنزويلا", "IST": "توقيت الهند", "ACDT": "توقيت وسط أستراليا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "BOT": "توقيت بوليفيا", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HNCU": "توقيت كوبا الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "CHADT": "توقيت تشاتام الصيفي"}, -+ locale: "ar_EG", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JDT": "JDT", "HNT": "HNT", "SAST": "SAST", "ARST": "ARST", "AWDT": "AWDT", "VET": "VET", "HNOG": "HNOG", "EDT": "EDT", "MEZ": "MEZ", "ACWDT": "ACWDT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "CLT": "CLT", "ART": "ART", "HEEG": "HEEG", "HNPM": "HNPM", "PST": "PST", "AST": "AST", "HAST": "HAST", "HNPMX": "HNPMX", "COT": "COT", "ChST": "ChST", "MDT": "MDT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "CHAST": "CHAST", "HAT": "HAT", "WARST": "WARST", "WIT": "WIT", "HKST": "HKST", "ACDT": "ACDT", "HEPM": "HEPM", "WART": "WART", "SRT": "SRT", "HEPMX": "HEPMX", "GMT": "GMT", "BT": "BT", "HNEG": "HNEG", "LHST": "LHST", "IST": "IST", "AEST": "AEST", "WESZ": "WESZ", "CLST": "CLST", "ECT": "ECT", "EAT": "EAT", "AWST": "AWST", "WAT": "WAT", "CST": "CST", "WIB": "WIB", "HADT": "HADT", "PDT": "PDT", "HECU": "HECU", "GFT": "GFT", "EST": "EST", "HKT": "HKT", "CDT": "CDT", "NZST": "NZST", "MYT": "MYT", "ADT": "ADT", "SGT": "SGT", "OEZ": "OEZ", "OESZ": "OESZ", "TMT": "TMT", "TMST": "TMST", "WITA": "WITA", "ACWST": "ACWST", "AEDT": "AEDT", "UYST": "UYST", "WEZ": "WEZ", "HNCU": "HNCU", "WAST": "WAST", "JST": "JST", "COST": "COST", "HENOMX": "HENOMX", "BOT": "BOT", "UYT": "UYT", "AKST": "AKST", "AKDT": "AKDT", "GYT": "GYT", "HEOG": "HEOG", "CAT": "CAT", "MST": "MST", "NZDT": "NZDT", "ACST": "ACST", "MESZ": "MESZ"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_EG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_EG) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_EG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_EG) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_EG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_EG) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_EG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_EG' and handles both Whole and Real numbers based on 'v' - func (ar *ar_EG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_EG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_EG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_EG' -@@ -338,62 +241,7 @@ func (ar *ar_EG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_EG' -@@ -402,69 +250,7 @@ func (ar *ar_EG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_EG' -@@ -472,17 +258,6 @@ func (ar *ar_EG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_EG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_EG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_EG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_EG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_EG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_EG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_EG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_EH/ar_EH.go b/ar_EH/ar_EH.go -index c742f78..ac62cd3 100644 ---- a/ar_EH/ar_EH.go -+++ b/ar_EH/ar_EH.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_EH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_EH' locale - func New() locales.Translator { - return &ar_EH{ -- locale: "ar_EH", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNOG": "توقيت غرب غرينلاند الرسمي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "GMT": "توقيت غرينتش", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "UYT": "توقيت أورغواي الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "HAT": "توقيت نيوفاوندلاند الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "CHAST": "توقيت تشاتام الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "SAST": "توقيت جنوب أفريقيا", "JST": "توقيت اليابان الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AST": "التوقيت الرسمي الأطلسي", "PST": "توقيت المحيط الهادي الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "CLT": "توقيت شيلي الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "BT": "توقيت بوتان", "HEOG": "توقيت غرب غرينلاند الصيفي", "TMST": "توقيت تركمانستان الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "VET": "توقيت فنزويلا", "EAT": "توقيت شرق أفريقيا", "HNCU": "توقيت كوبا الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "SRT": "توقيت سورينام", "WEZ": "توقيت غرب أوروبا الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "ECT": "توقيت الإكوادور", "WAT": "توقيت غرب أفريقيا الرسمي", "GYT": "توقيت غيانا", "WIB": "توقيت غرب إندونيسيا", "JDT": "توقيت اليابان الصيفي", "CLST": "توقيت شيلي الصيفي", "UYST": "توقيت أورغواي الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "ART": "توقيت الأرجنتين الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "SGT": "توقيت سنغافورة", "HECU": "توقيت كوبا الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "GFT": "توقيت غايانا الفرنسية", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "MYT": "توقيت ماليزيا", "AKST": "التوقيت الرسمي لألاسكا", "NZDT": "توقيت نيوزيلندا الصيفي", "IST": "توقيت الهند", "∅∅∅": "توقيت الأمازون الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "COST": "توقيت كولومبيا الصيفي", "MDT": "MDT", "HADT": "توقيت هاواي ألوتيان الصيفي", "WITA": "توقيت وسط إندونيسيا", "CHADT": "توقيت تشاتام الصيفي", "TMT": "توقيت تركمانستان الرسمي", "BOT": "توقيت بوليفيا", "ACDT": "توقيت وسط أستراليا الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "ChST": "توقيت تشامورو", "CAT": "توقيت وسط أفريقيا", "COT": "توقيت كولومبيا الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "LHST": "توقيت لورد هاو الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "MST": "MST", "WIT": "توقيت شرق إندونيسيا"}, -+ locale: "ar_EH", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACST": "ACST", "AWST": "AWST", "WESZ": "WESZ", "TMST": "TMST", "MST": "MST", "HECU": "HECU", "HAT": "HAT", "HKT": "HKT", "ACWST": "ACWST", "JDT": "JDT", "UYT": "UYT", "GMT": "GMT", "ChST": "ChST", "HNOG": "HNOG", "AST": "AST", "HNCU": "HNCU", "MEZ": "MEZ", "AEST": "AEST", "CHADT": "CHADT", "LHDT": "LHDT", "HEPM": "HEPM", "CHAST": "CHAST", "VET": "VET", "HEPMX": "HEPMX", "OESZ": "OESZ", "WITA": "WITA", "ARST": "ARST", "EDT": "EDT", "CLT": "CLT", "CLST": "CLST", "CDT": "CDT", "SRT": "SRT", "HNEG": "HNEG", "WART": "WART", "COT": "COT", "AEDT": "AEDT", "AKST": "AKST", "IST": "IST", "ACWDT": "ACWDT", "SGT": "SGT", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "BT": "BT", "MESZ": "MESZ", "HEEG": "HEEG", "HNPMX": "HNPMX", "HNT": "HNT", "GYT": "GYT", "HEOG": "HEOG", "TMT": "TMT", "CAT": "CAT", "ECT": "ECT", "WIB": "WIB", "HNNOMX": "HNNOMX", "WIT": "WIT", "SAST": "SAST", "PDT": "PDT", "OEZ": "OEZ", "BOT": "BOT", "HAST": "HAST", "MYT": "MYT", "UYST": "UYST", "PST": "PST", "WEZ": "WEZ", "COST": "COST", "NZST": "NZST", "GFT": "GFT", "WAT": "WAT", "WAST": "WAST", "EAT": "EAT", "MDT": "MDT", "ADT": "ADT", "HENOMX": "HENOMX", "LHST": "LHST", "JST": "JST", "EST": "EST", "CST": "CST", "WARST": "WARST", "ART": "ART", "HADT": "HADT", "ACDT": "ACDT", "AWDT": "AWDT", "HNPM": "HNPM", "HKST": "HKST", "NZDT": "NZDT"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_EH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_EH) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_EH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_EH) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_EH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_EH) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_EH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_EH' and handles both Whole and Real numbers based on 'v' - func (ar *ar_EH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_EH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_EH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_EH' -@@ -338,62 +241,7 @@ func (ar *ar_EH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_EH' -@@ -402,69 +250,7 @@ func (ar *ar_EH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_EH' -@@ -472,17 +258,6 @@ func (ar *ar_EH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_EH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_EH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_EH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_EH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_EH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_EH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_EH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_ER/ar_ER.go b/ar_ER/ar_ER.go -index 355e486..e6ea992 100644 ---- a/ar_ER/ar_ER.go -+++ b/ar_ER/ar_ER.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_ER struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_ER' locale - func New() locales.Translator { - return &ar_ER{ -- locale: "ar_ER", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "Nfk", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"EAT": "توقيت شرق أفريقيا", "OEZ": "توقيت شرق أوروبا الرسمي", "ECT": "توقيت الإكوادور", "HECU": "توقيت كوبا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "WESZ": "توقيت غرب أوروبا الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "CAT": "توقيت وسط أفريقيا", "AKST": "التوقيت الرسمي لألاسكا", "AWST": "توقيت غرب أستراليا الرسمي", "CHAST": "توقيت تشاتام الرسمي", "WAT": "توقيت غرب أفريقيا الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "GYT": "توقيت غيانا", "UYT": "توقيت أورغواي الرسمي", "WIT": "توقيت شرق إندونيسيا", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "CLT": "توقيت شيلي الرسمي", "AKDT": "توقيت ألاسكا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "LHST": "توقيت لورد هاو الرسمي", "GMT": "توقيت غرينتش", "VET": "توقيت فنزويلا", "NZST": "توقيت نيوزيلندا الرسمي", "IST": "توقيت الهند", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "MYT": "توقيت ماليزيا", "HADT": "توقيت هاواي ألوتيان الصيفي", "JDT": "توقيت اليابان الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "MST": "MST", "UYST": "توقيت أورغواي الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "CLST": "توقيت شيلي الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "ARST": "توقيت الأرجنتين الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "HKT": "توقيت هونغ كونغ الرسمي", "HNCU": "توقيت كوبا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "JST": "توقيت اليابان الرسمي", "ChST": "توقيت تشامورو", "MDT": "MDT", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "WITA": "توقيت وسط إندونيسيا", "HEEG": "توقيت شرق غرينلاند الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "COT": "توقيت كولومبيا الرسمي", "WEZ": "توقيت غرب أوروبا الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "∅∅∅": "توقيت بيرو الصيفي", "WIB": "توقيت غرب إندونيسيا", "HNT": "توقيت نيوفاوندلاند الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "COST": "توقيت كولومبيا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "ART": "توقيت الأرجنتين الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "HAST": "توقيت هاواي ألوتيان الرسمي", "SRT": "توقيت سورينام", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "GFT": "توقيت غايانا الفرنسية", "TMT": "توقيت تركمانستان الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "AST": "التوقيت الرسمي الأطلسي", "AEST": "توقيت شرق أستراليا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "BOT": "توقيت بوليفيا", "TMST": "توقيت تركمانستان الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "SGT": "توقيت سنغافورة", "BT": "توقيت بوتان", "CHADT": "توقيت تشاتام الصيفي", "SAST": "توقيت جنوب أفريقيا"}, -+ locale: "ar_ER", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "Nfk", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACST": "ACST", "AWDT": "AWDT", "VET": "VET", "HNPMX": "HNPMX", "OEZ": "OEZ", "SAST": "SAST", "COT": "COT", "WITA": "WITA", "HECU": "HECU", "CAT": "CAT", "CLST": "CLST", "ARST": "ARST", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "ChST": "ChST", "HADT": "HADT", "MESZ": "MESZ", "HNEG": "HNEG", "HENOMX": "HENOMX", "LHST": "LHST", "AEDT": "AEDT", "HEOG": "HEOG", "HKST": "HKST", "CST": "CST", "MDT": "MDT", "BT": "BT", "HKT": "HKT", "TMST": "TMST", "ADT": "ADT", "SRT": "SRT", "WAT": "WAT", "OESZ": "OESZ", "WARST": "WARST", "NZST": "NZST", "GMT": "GMT", "MYT": "MYT", "JST": "JST", "HEPMX": "HEPMX", "NZDT": "NZDT", "IST": "IST", "HNCU": "HNCU", "MEZ": "MEZ", "HNPM": "HNPM", "AKDT": "AKDT", "HAT": "HAT", "EDT": "EDT", "MST": "MST", "SGT": "SGT", "AKST": "AKST", "ECT": "ECT", "ACWST": "ACWST", "WIT": "WIT", "WIB": "WIB", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "AWST": "AWST", "LHDT": "LHDT", "PST": "PST", "AEST": "AEST", "TMT": "TMT", "CDT": "CDT", "ART": "ART", "HAST": "HAST", "ACWDT": "ACWDT", "CHAST": "CHAST", "GFT": "GFT", "HNT": "HNT", "AST": "AST", "HEEG": "HEEG", "HEPM": "HEPM", "PDT": "PDT", "CHADT": "CHADT", "WESZ": "WESZ", "EST": "EST", "BOT": "BOT", "EAT": "EAT", "UYT": "UYT", "GYT": "GYT", "COST": "COST", "CLT": "CLT", "JDT": "JDT", "UYST": "UYST", "WEZ": "WEZ", "WAST": "WAST", "WART": "WART"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_ER) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_ER) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_ER) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_ER) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_ER) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_ER) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_ER) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_ER' and handles both Whole and Real numbers based on 'v' - func (ar *ar_ER) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_ER' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_ER) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_ER' -@@ -338,62 +241,7 @@ func (ar *ar_ER) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_ER' -@@ -402,69 +250,7 @@ func (ar *ar_ER) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_ER' -@@ -472,17 +258,6 @@ func (ar *ar_ER) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_ER) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_ER) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_ER) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_ER) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_ER) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_ER) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_ER) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_IL/ar_IL.go b/ar_IL/ar_IL.go -index 55c0473..b891f71 100644 ---- a/ar_IL/ar_IL.go -+++ b/ar_IL/ar_IL.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_IL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_IL' locale - func New() locales.Translator { - return &ar_IL{ -- locale: "ar_IL", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WAT": "توقيت غرب أفريقيا الرسمي", "COST": "توقيت كولومبيا الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "WIT": "توقيت شرق إندونيسيا", "AWST": "توقيت غرب أستراليا الرسمي", "UYT": "توقيت أورغواي الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "HNEG": "توقيت شرق غرينلاند الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HNCU": "توقيت كوبا الرسمي", "MDT": "MDT", "WIB": "توقيت غرب إندونيسيا", "PST": "توقيت المحيط الهادي الرسمي", "JDT": "توقيت اليابان الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "WESZ": "توقيت غرب أوروبا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "JST": "توقيت اليابان الرسمي", "EAT": "توقيت شرق أفريقيا", "WARST": "توقيت غرب الأرجنتين الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "SAST": "توقيت جنوب أفريقيا", "GYT": "توقيت غيانا", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "BOT": "توقيت بوليفيا", "GFT": "توقيت غايانا الفرنسية", "TMT": "توقيت تركمانستان الرسمي", "GMT": "توقيت غرينتش", "MST": "MST", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "LHDT": "التوقيت الصيفي للورد هاو", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "MYT": "توقيت ماليزيا", "AEST": "توقيت شرق أستراليا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "CHADT": "توقيت تشاتام الصيفي", "CAT": "توقيت وسط أفريقيا", "SGT": "توقيت سنغافورة", "WEZ": "توقيت غرب أوروبا الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "TMST": "توقيت تركمانستان الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "CLST": "توقيت شيلي الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "HECU": "توقيت كوبا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HNOG": "توقيت غرب غرينلاند الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "CLT": "توقيت شيلي الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "COT": "توقيت كولومبيا الرسمي", "BT": "توقيت بوتان", "HKT": "توقيت هونغ كونغ الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "UYST": "توقيت أورغواي الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "WITA": "توقيت وسط إندونيسيا", "CHAST": "توقيت تشاتام الرسمي", "IST": "توقيت الهند", "AST": "التوقيت الرسمي الأطلسي", "ADT": "التوقيت الصيفي الأطلسي", "HNT": "توقيت نيوفاوندلاند الرسمي", "ART": "توقيت الأرجنتين الرسمي", "ChST": "توقيت تشامورو", "∅∅∅": "توقيت بيرو الصيفي", "ECT": "توقيت الإكوادور", "SRT": "توقيت سورينام", "NZDT": "توقيت نيوزيلندا الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HADT": "توقيت هاواي ألوتيان الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "VET": "توقيت فنزويلا"}, -+ locale: "ar_IL", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "CAT": "CAT", "CLST": "CLST", "AWST": "AWST", "JST": "JST", "PDT": "PDT", "HEPMX": "HEPMX", "HNEG": "HNEG", "ACWDT": "ACWDT", "MST": "MST", "CST": "CST", "ECT": "ECT", "WIB": "WIB", "GMT": "GMT", "ChST": "ChST", "ACST": "ACST", "CHAST": "CHAST", "GYT": "GYT", "SGT": "SGT", "EST": "EST", "HKST": "HKST", "BOT": "BOT", "HNNOMX": "HNNOMX", "UYT": "UYT", "UYST": "UYST", "TMT": "TMT", "MEZ": "MEZ", "HNPM": "HNPM", "AEST": "AEST", "WAT": "WAT", "HAT": "HAT", "HKT": "HKT", "ADT": "ADT", "MESZ": "MESZ", "WEZ": "WEZ", "HECU": "HECU", "WART": "WART", "SAST": "SAST", "AST": "AST", "ART": "ART", "SRT": "SRT", "LHDT": "LHDT", "IST": "IST", "AEDT": "AEDT", "OEZ": "OEZ", "NZDT": "NZDT", "ARST": "ARST", "HNCU": "HNCU", "AKDT": "AKDT", "AKST": "AKST", "OESZ": "OESZ", "BT": "BT", "WAST": "WAST", "HAST": "HAST", "COST": "COST", "CLT": "CLT", "HEOG": "HEOG", "MDT": "MDT", "WESZ": "WESZ", "HNPMX": "HNPMX", "EDT": "EDT", "TMST": "TMST", "WARST": "WARST", "NZST": "NZST", "ACDT": "ACDT", "HENOMX": "HENOMX", "HEPM": "HEPM", "CHADT": "CHADT", "GFT": "GFT", "CDT": "CDT", "EAT": "EAT", "HADT": "HADT", "HEEG": "HEEG", "MYT": "MYT", "JDT": "JDT", "ACWST": "ACWST", "HNOG": "HNOG", "COT": "COT", "WITA": "WITA", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "PST": "PST", "LHST": "LHST", "VET": "VET", "WIT": "WIT"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_IL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_IL) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_IL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_IL) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_IL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_IL) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_IL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_IL' and handles both Whole and Real numbers based on 'v' - func (ar *ar_IL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_IL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_IL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_IL' -@@ -338,62 +241,7 @@ func (ar *ar_IL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_IL' -@@ -402,69 +250,7 @@ func (ar *ar_IL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_IL' -@@ -472,17 +258,6 @@ func (ar *ar_IL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_IL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_IL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_IL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/ar_IQ/ar_IQ.go b/ar_IQ/ar_IQ.go -index 8e472f3..21f229e 100644 ---- a/ar_IQ/ar_IQ.go -+++ b/ar_IQ/ar_IQ.go -@@ -10,70 +10,48 @@ import ( - ) -  - type ar_IQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_IQ' locale - func New() locales.Translator { - return &ar_IQ{ -- locale: "ar_IQ", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرین الأول", "تشرين الثاني", "كانون الأول"}, -- monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -- monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNT": "توقيت نيوفاوندلاند الرسمي", "ART": "توقيت الأرجنتين الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "JST": "توقيت اليابان الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "COST": "توقيت كولومبيا الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "EAT": "توقيت شرق أفريقيا", "HNCU": "توقيت كوبا الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AKST": "التوقيت الرسمي لألاسكا", "GYT": "توقيت غيانا", "UYST": "توقيت أورغواي الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "TMST": "توقيت تركمانستان الصيفي", "CAT": "توقيت وسط أفريقيا", "GFT": "توقيت غايانا الفرنسية", "WART": "توقيت غرب الأرجنتين الرسمي", "BT": "توقيت بوتان", "SRT": "توقيت سورينام", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "∅∅∅": "توقيت الأمازون الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "AWDT": "توقيت غرب أستراليا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WAST": "توقيت غرب أفريقيا الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "CHAST": "توقيت تشاتام الرسمي", "SAST": "توقيت جنوب أفريقيا", "TMT": "توقيت تركمانستان الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "WEZ": "توقيت غرب أوروبا الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HADT": "توقيت هاواي ألوتيان الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "JDT": "توقيت اليابان الصيفي", "ChST": "توقيت تشامورو", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "PST": "توقيت المحيط الهادي الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "WITA": "توقيت وسط إندونيسيا", "CHADT": "توقيت تشاتام الصيفي", "BOT": "توقيت بوليفيا", "WAT": "توقيت غرب أفريقيا الرسمي", "WIT": "توقيت شرق إندونيسيا", "ARST": "توقيت الأرجنتين الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "MDT": "MDT", "MYT": "توقيت ماليزيا", "WIB": "توقيت غرب إندونيسيا", "HKT": "توقيت هونغ كونغ الرسمي", "IST": "توقيت الهند", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "GMT": "توقيت غرينتش", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "MST": "MST", "AST": "التوقيت الرسمي الأطلسي", "HAST": "توقيت هاواي ألوتيان الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "CLT": "توقيت شيلي الرسمي", "HECU": "توقيت كوبا الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "SGT": "توقيت سنغافورة", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "AKDT": "توقيت ألاسكا الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "COT": "توقيت كولومبيا الرسمي", "ECT": "توقيت الإكوادور", "UYT": "توقيت أورغواي الرسمي", "VET": "توقيت فنزويلا", "HNOG": "توقيت غرب غرينلاند الرسمي", "CLST": "توقيت شيلي الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي"}, -+ locale: "ar_IQ", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرین الأول", "تشرين الثاني", "كانون الأول"}, -+ monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -+ monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ timezones: map[string]string{"MESZ": "MESZ", "ACDT": "ACDT", "HEEG": "HEEG", "ACWDT": "ACWDT", "HNCU": "HNCU", "WART": "WART", "HKST": "HKST", "EAT": "EAT", "NZDT": "NZDT", "TMT": "TMT", "WAT": "WAT", "AKDT": "AKDT", "ECT": "ECT", "CDT": "CDT", "MST": "MST", "SGT": "SGT", "WAST": "WAST", "HAT": "HAT", "HNPMX": "HNPMX", "AWDT": "AWDT", "LHDT": "LHDT", "WARST": "WARST", "AWST": "AWST", "WESZ": "WESZ", "WIB": "WIB", "ARST": "ARST", "ChST": "ChST", "JST": "JST", "HENOMX": "HENOMX", "JDT": "JDT", "IST": "IST", "CST": "CST", "HNNOMX": "HNNOMX", "HADT": "HADT", "OESZ": "OESZ", "SAST": "SAST", "MDT": "MDT", "VET": "VET", "TMST": "TMST", "CAT": "CAT", "AEST": "AEST", "CHAST": "CHAST", "UYST": "UYST", "HKT": "HKT", "ADT": "ADT", "HNPM": "HNPM", "CHADT": "CHADT", "COT": "COT", "AST": "AST", "ACWST": "ACWST", "HNEG": "HNEG", "AEDT": "AEDT", "HEPMX": "HEPMX", "AKST": "AKST", "EDT": "EDT", "MEZ": "MEZ", "ACST": "ACST", "MYT": "MYT", "WIT": "WIT", "HNOG": "HNOG", "SRT": "SRT", "GFT": "GFT", "COST": "COST", "CLST": "CLST", "WITA": "WITA", "HECU": "HECU", "UYT": "UYT", "BT": "BT", "HEOG": "HEOG", "CLT": "CLT", "GMT": "GMT", "HAST": "HAST", "HEPM": "HEPM", "OEZ": "OEZ", "HNT": "HNT", "NZST": "NZST", "ART": "ART", "BOT": "BOT", "∅∅∅": "∅∅∅", "PST": "PST", "PDT": "PDT", "WEZ": "WEZ", "GYT": "GYT", "EST": "EST", "LHST": "LHST"}, - } - } -  -@@ -252,85 +230,13 @@ func (ar *ar_IQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_IQ' and handles both Whole and Real numbers based on 'v' - func (ar *ar_IQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_IQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_IQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_IQ' -@@ -338,62 +244,7 @@ func (ar *ar_IQ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_IQ' -@@ -402,69 +253,7 @@ func (ar *ar_IQ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_IQ' -@@ -472,17 +261,6 @@ func (ar *ar_IQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +269,6 @@ func (ar *ar_IQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +277,6 @@ func (ar *ar_IQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +285,6 @@ func (ar *ar_IQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +293,6 @@ func (ar *ar_IQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +301,6 @@ func (ar *ar_IQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +309,6 @@ func (ar *ar_IQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +317,5 @@ func (ar *ar_IQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_JO/ar_JO.go b/ar_JO/ar_JO.go -index 13a215c..79fba91 100644 ---- a/ar_JO/ar_JO.go -+++ b/ar_JO/ar_JO.go -@@ -10,70 +10,48 @@ import ( - ) -  - type ar_JO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_JO' locale - func New() locales.Translator { - return &ar_JO{ -- locale: "ar_JO", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -- monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"SRT": "توقيت سورينام", "NZST": "توقيت نيوزيلندا الرسمي", "SAST": "توقيت جنوب أفريقيا", "ACST": "توقيت وسط أستراليا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "AST": "التوقيت الرسمي الأطلسي", "UYST": "توقيت أورغواي الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "CHAST": "توقيت تشاتام الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "BT": "توقيت بوتان", "LHST": "توقيت لورد هاو الرسمي", "JDT": "توقيت اليابان الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HNCU": "توقيت كوبا الرسمي", "MST": "التوقيت الجبلي الرسمي لأمريكا الشمالية", "AEDT": "توقيت شرق أستراليا الصيفي", "COST": "توقيت كولومبيا الصيفي", "GMT": "توقيت غرينتش", "OESZ": "توقيت شرق أوروبا الصيفي", "WIT": "توقيت شرق إندونيسيا", "HEOG": "توقيت غرب غرينلاند الصيفي", "WESZ": "توقيت غرب أوروبا الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "JST": "توقيت اليابان الرسمي", "TMST": "توقيت تركمانستان الصيفي", "SGT": "توقيت سنغافورة", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "MYT": "توقيت ماليزيا", "AKST": "التوقيت الرسمي لألاسكا", "HADT": "توقيت هاواي ألوتيان الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "∅∅∅": "توقيت الأمازون الصيفي", "ChST": "توقيت تشامورو", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "ARST": "توقيت الأرجنتين الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "WITA": "توقيت وسط إندونيسيا", "WAST": "توقيت غرب أفريقيا الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "ART": "توقيت الأرجنتين الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "BOT": "توقيت بوليفيا", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "GFT": "توقيت غايانا الفرنسية", "COT": "توقيت كولومبيا الرسمي", "MDT": "التوقيت الجبلي الصيفي لأمريكا الشمالية", "VET": "توقيت فنزويلا", "AEST": "توقيت شرق أستراليا الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "CHADT": "توقيت تشاتام الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "EAT": "توقيت شرق أفريقيا", "GYT": "توقيت غيانا", "AKDT": "توقيت ألاسكا الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "CAT": "توقيت وسط أفريقيا", "HECU": "توقيت كوبا الصيفي", "UYT": "توقيت أورغواي الرسمي", "PST": "توقيت المحيط الهادي الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "CLT": "توقيت شيلي الرسمي", "CLST": "توقيت شيلي الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "IST": "توقيت الهند", "TMT": "توقيت تركمانستان الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "WAT": "توقيت غرب أفريقيا الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "ECT": "توقيت الإكوادور", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية"}, -+ locale: "ar_JO", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -+ monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ timezones: map[string]string{"SAST": "SAST", "HAST": "HAST", "MYT": "MYT", "HNCU": "HNCU", "AKDT": "AKDT", "GYT": "GYT", "HEOG": "HEOG", "SRT": "SRT", "ACDT": "ACDT", "HEEG": "HEEG", "PDT": "PDT", "SGT": "SGT", "HNT": "HNT", "HKST": "HKST", "WIB": "WIB", "BOT": "BOT", "HNEG": "HNEG", "MEZ": "MEZ", "OESZ": "OESZ", "HAT": "HAT", "CLT": "CLT", "ECT": "ECT", "ChST": "ChST", "ART": "ART", "MESZ": "MESZ", "CHADT": "CHADT", "COST": "COST", "HKT": "HKT", "VET": "VET", "GFT": "GFT", "EST": "EST", "AWST": "AWST", "HNNOMX": "HNNOMX", "BT": "BT", "ACWDT": "ACWDT", "COT": "COT", "ACST": "ACST", "EAT": "EAT", "AEDT": "AEDT", "OEZ": "OEZ", "GMT": "GMT", "ADT": "ADT", "CAT": "CAT", "HEPM": "HEPM", "JST": "JST", "JDT": "JDT", "EDT": "EDT", "CLST": "CLST", "PST": "PST", "UYST": "UYST", "HECU": "HECU", "HEPMX": "HEPMX", "WAT": "WAT", "HNOG": "HNOG", "AST": "AST", "LHDT": "LHDT", "IST": "IST", "HNPMX": "HNPMX", "TMST": "TMST", "HENOMX": "HENOMX", "NZST": "NZST", "HADT": "HADT", "WIT": "WIT", "MDT": "MDT", "LHST": "LHST", "HNPM": "HNPM", "CDT": "CDT", "ARST": "ARST", "MST": "MST", "ACWST": "ACWST", "WARST": "WARST", "TMT": "TMT", "CHAST": "CHAST", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "NZDT": "NZDT", "CST": "CST", "AEST": "AEST", "UYT": "UYT", "WART": "WART", "WITA": "WITA", "AKST": "AKST", "WAST": "WAST", "AWDT": "AWDT", "WEZ": "WEZ"}, - } - } -  -@@ -252,85 +230,13 @@ func (ar *ar_JO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_JO' and handles both Whole and Real numbers based on 'v' - func (ar *ar_JO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_JO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_JO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_JO' -@@ -338,62 +244,7 @@ func (ar *ar_JO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_JO' -@@ -402,69 +253,7 @@ func (ar *ar_JO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_JO' -@@ -472,17 +261,6 @@ func (ar *ar_JO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +269,6 @@ func (ar *ar_JO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +277,6 @@ func (ar *ar_JO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +285,6 @@ func (ar *ar_JO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +293,6 @@ func (ar *ar_JO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +301,6 @@ func (ar *ar_JO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +309,6 @@ func (ar *ar_JO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +317,5 @@ func (ar *ar_JO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_KM/ar_KM.go b/ar_KM/ar_KM.go -index 2927be9..7a8c4c0 100644 ---- a/ar_KM/ar_KM.go -+++ b/ar_KM/ar_KM.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_KM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_KM' locale - func New() locales.Translator { - return &ar_KM{ -- locale: "ar_KM", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CLST": "توقيت شيلي الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "WART": "توقيت غرب الأرجنتين الرسمي", "HADT": "توقيت هاواي ألوتيان الصيفي", "VET": "توقيت فنزويلا", "NZST": "توقيت نيوزيلندا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "UYST": "توقيت أورغواي الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "TMST": "توقيت تركمانستان الصيفي", "MYT": "توقيت ماليزيا", "BT": "توقيت بوتان", "ECT": "توقيت الإكوادور", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "CHAST": "توقيت تشاتام الرسمي", "IST": "توقيت الهند", "BOT": "توقيت بوليفيا", "WAT": "توقيت غرب أفريقيا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "JST": "توقيت اليابان الرسمي", "HNCU": "توقيت كوبا الرسمي", "SGT": "توقيت سنغافورة", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "WITA": "توقيت وسط إندونيسيا", "GMT": "توقيت غرينتش", "WIB": "توقيت غرب إندونيسيا", "WESZ": "توقيت غرب أوروبا الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "HECU": "توقيت كوبا الصيفي", "MST": "MST", "AST": "التوقيت الرسمي الأطلسي", "JDT": "توقيت اليابان الصيفي", "ChST": "توقيت تشامورو", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "SRT": "توقيت سورينام", "PDT": "توقيت المحيط الهادي الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "ARST": "توقيت الأرجنتين الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "HNEG": "توقيت شرق غرينلاند الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "CHADT": "توقيت تشاتام الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "AKST": "التوقيت الرسمي لألاسكا", "AKDT": "توقيت ألاسكا الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "HKST": "توقيت هونغ كونغ الصيفي", "GFT": "توقيت غايانا الفرنسية", "∅∅∅": "توقيت أزورس الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "SAST": "توقيت جنوب أفريقيا", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "ART": "توقيت الأرجنتين الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "TMT": "توقيت تركمانستان الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "CAT": "توقيت وسط أفريقيا", "COT": "توقيت كولومبيا الرسمي", "COST": "توقيت كولومبيا الصيفي", "HNT": "توقيت نيوفاوندلاند الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "GYT": "توقيت غيانا", "AEDT": "توقيت شرق أستراليا الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "EAT": "توقيت شرق أفريقيا", "MDT": "MDT", "UYT": "توقيت أورغواي الرسمي", "WIT": "توقيت شرق إندونيسيا", "HEOG": "توقيت غرب غرينلاند الصيفي", "CLT": "توقيت شيلي الرسمي"}, -+ locale: "ar_KM", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKT": "HKT", "PST": "PST", "UYST": "UYST", "HECU": "HECU", "LHDT": "LHDT", "MST": "MST", "AST": "AST", "ART": "ART", "AKDT": "AKDT", "GYT": "GYT", "COST": "COST", "EDT": "EDT", "CLT": "CLT", "WEZ": "WEZ", "SGT": "SGT", "VET": "VET", "AWDT": "AWDT", "CST": "CST", "HAST": "HAST", "HNNOMX": "HNNOMX", "ACST": "ACST", "WIB": "WIB", "ADT": "ADT", "GMT": "GMT", "COT": "COT", "MESZ": "MESZ", "JDT": "JDT", "AEDT": "AEDT", "AKST": "AKST", "WARST": "WARST", "NZDT": "NZDT", "ChST": "ChST", "MEZ": "MEZ", "ACWDT": "ACWDT", "WESZ": "WESZ", "HEOG": "HEOG", "AWST": "AWST", "IST": "IST", "∅∅∅": "∅∅∅", "NZST": "NZST", "CHAST": "CHAST", "OESZ": "OESZ", "LHST": "LHST", "WART": "WART", "EST": "EST", "ECT": "ECT", "ACDT": "ACDT", "HNPM": "HNPM", "AEST": "AEST", "CHADT": "CHADT", "WAT": "WAT", "MDT": "MDT", "HEEG": "HEEG", "MYT": "MYT", "BT": "BT", "HNCU": "HNCU", "CAT": "CAT", "HADT": "HADT", "HEPM": "HEPM", "OEZ": "OEZ", "HKST": "HKST", "ARST": "ARST", "EAT": "EAT", "HNEG": "HNEG", "HEPMX": "HEPMX", "BOT": "BOT", "SRT": "SRT", "HAT": "HAT", "SAST": "SAST", "GFT": "GFT", "WIT": "WIT", "WAST": "WAST", "HNT": "HNT", "HNOG": "HNOG", "TMT": "TMT", "TMST": "TMST", "PDT": "PDT", "UYT": "UYT", "HNPMX": "HNPMX", "CLST": "CLST", "CDT": "CDT", "JST": "JST", "ACWST": "ACWST", "WITA": "WITA", "HENOMX": "HENOMX"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_KM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_KM) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_KM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_KM) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_KM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_KM) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_KM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_KM' and handles both Whole and Real numbers based on 'v' - func (ar *ar_KM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_KM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_KM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_KM' -@@ -338,62 +241,7 @@ func (ar *ar_KM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_KM' -@@ -402,69 +250,7 @@ func (ar *ar_KM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_KM' -@@ -472,17 +258,6 @@ func (ar *ar_KM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_KM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_KM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_KM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/ar_KW/ar_KW.go b/ar_KW/ar_KW.go -index 101fee6..5094a89 100644 ---- a/ar_KW/ar_KW.go -+++ b/ar_KW/ar_KW.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_KW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_KW' locale - func New() locales.Translator { - return &ar_KW{ -- locale: "ar_KW", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"NZST": "توقيت نيوزيلندا الرسمي", "COST": "توقيت كولومبيا الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "AEDT": "توقيت شرق أستراليا الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "EAT": "توقيت شرق أفريقيا", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "MEZ": "توقيت وسط أوروبا الرسمي", "CLT": "توقيت شيلي الرسمي", "ChST": "توقيت تشامورو", "MST": "MST", "JDT": "توقيت اليابان الصيفي", "GFT": "توقيت غايانا الفرنسية", "HNEG": "توقيت شرق غرينلاند الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "MDT": "MDT", "HAT": "توقيت نيوفاوندلاند الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "JST": "توقيت اليابان الرسمي", "ECT": "توقيت الإكوادور", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AKDT": "توقيت ألاسكا الصيفي", "UYST": "توقيت أورغواي الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "HNT": "توقيت نيوفاوندلاند الرسمي", "BOT": "توقيت بوليفيا", "HNCU": "توقيت كوبا الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "MYT": "توقيت ماليزيا", "UYT": "توقيت أورغواي الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "IST": "توقيت الهند", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "PST": "توقيت المحيط الهادي الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "TMT": "توقيت تركمانستان الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AKST": "التوقيت الرسمي لألاسكا", "BT": "توقيت بوتان", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "WIT": "توقيت شرق إندونيسيا", "HADT": "توقيت هاواي ألوتيان الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "∅∅∅": "توقيت بيرو الصيفي", "GYT": "توقيت غيانا", "AEST": "توقيت شرق أستراليا الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "TMST": "توقيت تركمانستان الصيفي", "SRT": "توقيت سورينام", "WEZ": "توقيت غرب أوروبا الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "CAT": "توقيت وسط أفريقيا", "WARST": "توقيت غرب الأرجنتين الصيفي", "AST": "التوقيت الرسمي الأطلسي", "VET": "توقيت فنزويلا", "HAST": "توقيت هاواي ألوتيان الرسمي", "SGT": "توقيت سنغافورة", "WIB": "توقيت غرب إندونيسيا", "LHDT": "التوقيت الصيفي للورد هاو", "CLST": "توقيت شيلي الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "COT": "توقيت كولومبيا الرسمي", "HECU": "توقيت كوبا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "ADT": "التوقيت الصيفي الأطلسي", "ART": "توقيت الأرجنتين الرسمي", "SAST": "توقيت جنوب أفريقيا", "WESZ": "توقيت غرب أوروبا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "WITA": "توقيت وسط إندونيسيا", "LHST": "توقيت لورد هاو الرسمي", "CHADT": "توقيت تشاتام الصيفي"}, -+ locale: "ar_KW", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHAST": "CHAST", "UYT": "UYT", "AEDT": "AEDT", "WARST": "WARST", "CST": "CST", "EAT": "EAT", "JDT": "JDT", "CHADT": "CHADT", "PDT": "PDT", "WAT": "WAT", "GFT": "GFT", "HNT": "HNT", "ADT": "ADT", "MESZ": "MESZ", "ACDT": "ACDT", "EDT": "EDT", "TMST": "TMST", "ARST": "ARST", "HNEG": "HNEG", "HEOG": "HEOG", "CLST": "CLST", "CDT": "CDT", "NZDT": "NZDT", "ChST": "ChST", "CLT": "CLT", "MEZ": "MEZ", "HEEG": "HEEG", "HKT": "HKT", "HKST": "HKST", "WEZ": "WEZ", "WESZ": "WESZ", "WAST": "WAST", "HNPMX": "HNPMX", "HAST": "HAST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HNPM": "HNPM", "WART": "WART", "EST": "EST", "SRT": "SRT", "SGT": "SGT", "AKST": "AKST", "JST": "JST", "UYST": "UYST", "PST": "PST", "BT": "BT", "VET": "VET", "WITA": "WITA", "ECT": "ECT", "ART": "ART", "HEPMX": "HEPMX", "BOT": "BOT", "∅∅∅": "∅∅∅", "IST": "IST", "LHST": "LHST", "MYT": "MYT", "AEST": "AEST", "HECU": "HECU", "HAT": "HAT", "HADT": "HADT", "AWST": "AWST", "AWDT": "AWDT", "TMT": "TMT", "CAT": "CAT", "OEZ": "OEZ", "COT": "COT", "GMT": "GMT", "ACST": "ACST", "HENOMX": "HENOMX", "COST": "COST", "AST": "AST", "OESZ": "OESZ", "SAST": "SAST", "AKDT": "AKDT", "GYT": "GYT", "MDT": "MDT", "NZST": "NZST", "LHDT": "LHDT", "ACWDT": "ACWDT", "WIT": "WIT", "HNOG": "HNOG", "WIB": "WIB", "HEPM": "HEPM", "ACWST": "ACWST", "MST": "MST"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_KW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_KW) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_KW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_KW) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_KW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_KW) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_KW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_KW' and handles both Whole and Real numbers based on 'v' - func (ar *ar_KW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_KW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_KW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_KW' -@@ -338,62 +241,7 @@ func (ar *ar_KW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_KW' -@@ -402,69 +250,7 @@ func (ar *ar_KW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_KW' -@@ -472,17 +258,6 @@ func (ar *ar_KW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_KW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_KW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_KW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_KW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_KW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_KW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_KW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_LB/ar_LB.go b/ar_LB/ar_LB.go -index 678cf2c..ab8aa88 100644 ---- a/ar_LB/ar_LB.go -+++ b/ar_LB/ar_LB.go -@@ -10,70 +10,50 @@ import ( - ) -  - type ar_LB struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_LB' locale - func New() locales.Translator { - return &ar_LB{ -- locale: "ar_LB", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: ",", -- group: ".", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -- monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CAT": "توقيت وسط أفريقيا", "WARST": "توقيت غرب الأرجنتين الصيفي", "COST": "توقيت كولومبيا الصيفي", "AST": "التوقيت الرسمي الأطلسي", "BT": "توقيت بوتان", "AEST": "توقيت شرق أستراليا الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "IST": "توقيت الهند", "UYT": "توقيت أورغواي الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "ART": "توقيت الأرجنتين الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "JDT": "توقيت اليابان الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "HNCU": "توقيت كوبا الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "UYST": "توقيت أورغواي الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "GFT": "توقيت غايانا الفرنسية", "SGT": "توقيت سنغافورة", "HNT": "توقيت نيوفاوندلاند الرسمي", "WITA": "توقيت وسط إندونيسيا", "HEEG": "توقيت شرق غرينلاند الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "WIT": "توقيت شرق إندونيسيا", "HKT": "توقيت هونغ كونغ الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "CHADT": "توقيت تشاتام الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "SAST": "توقيت جنوب أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "GMT": "توقيت غرينتش", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "CLT": "توقيت شيلي الرسمي", "TMT": "توقيت تركمانستان الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "HECU": "توقيت كوبا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "HADT": "توقيت هاواي ألوتيان الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "TMST": "توقيت تركمانستان الصيفي", "ChST": "توقيت تشامورو", "EAT": "توقيت شرق أفريقيا", "WESZ": "توقيت غرب أوروبا الصيفي", "ECT": "توقيت الإكوادور", "VET": "توقيت فنزويلا", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "WEZ": "توقيت غرب أوروبا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "∅∅∅": "توقيت الأمازون الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "SRT": "توقيت سورينام", "PDT": "توقيت المحيط الهادي الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "MEZ": "توقيت وسط أوروبا الرسمي", "MDT": "MDT", "GYT": "توقيت غيانا", "WIB": "توقيت غرب إندونيسيا", "CLST": "توقيت شيلي الصيفي", "BOT": "توقيت بوليفيا", "WAST": "توقيت غرب أفريقيا الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "COT": "توقيت كولومبيا الرسمي", "MST": "MST", "MYT": "توقيت ماليزيا", "AWST": "توقيت غرب أستراليا الرسمي", "JST": "توقيت اليابان الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي"}, -+ locale: "ar_LB", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -+ monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ timezones: map[string]string{"GMT": "GMT", "ACST": "ACST", "HEEG": "HEEG", "AWST": "AWST", "CLST": "CLST", "CST": "CST", "NZDT": "NZDT", "ECT": "ECT", "HNT": "HNT", "EDT": "EDT", "BOT": "BOT", "ACWST": "ACWST", "WEZ": "WEZ", "WESZ": "WESZ", "ARST": "ARST", "TMT": "TMT", "ADT": "ADT", "SRT": "SRT", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "PST": "PST", "AEST": "AEST", "WAT": "WAT", "HEPM": "HEPM", "ACWDT": "ACWDT", "HNCU": "HNCU", "OESZ": "OESZ", "AEDT": "AEDT", "EST": "EST", "HKT": "HKT", "HADT": "HADT", "COST": "COST", "ChST": "ChST", "SGT": "SGT", "HECU": "HECU", "WAST": "WAST", "WIT": "WIT", "LHST": "LHST", "UYT": "UYT", "IST": "IST", "HKST": "HKST", "ART": "ART", "CDT": "CDT", "AST": "AST", "LHDT": "LHDT", "MYT": "MYT", "UYST": "UYST", "HEOG": "HEOG", "CLT": "CLT", "WITA": "WITA", "GYT": "GYT", "VET": "VET", "AKDT": "AKDT", "OEZ": "OEZ", "SAST": "SAST", "CAT": "CAT", "HNEG": "HNEG", "CHADT": "CHADT", "BT": "BT", "HNPMX": "HNPMX", "GFT": "GFT", "HNOG": "HNOG", "HNPM": "HNPM", "CHAST": "CHAST", "PDT": "PDT", "MDT": "MDT", "WIB": "WIB", "HEPMX": "HEPMX", "WART": "WART", "MST": "MST", "HAST": "HAST", "ACDT": "ACDT", "HENOMX": "HENOMX", "JST": "JST", "HAT": "HAT", "WARST": "WARST", "COT": "COT", "MEZ": "MEZ", "MESZ": "MESZ", "AWDT": "AWDT", "JDT": "JDT", "AKST": "AKST", "TMST": "TMST", "NZST": "NZST", "EAT": "EAT"}, - } - } -  -@@ -252,79 +232,13 @@ func (ar *ar_LB) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_LB' and handles both Whole and Real numbers based on 'v' - func (ar *ar_LB) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_LB' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_LB) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 10 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_LB' -@@ -332,58 +246,7 @@ func (ar *ar_LB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_LB' -@@ -392,65 +255,7 @@ func (ar *ar_LB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_LB' -@@ -458,17 +263,6 @@ func (ar *ar_LB) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,27 +271,6 @@ func (ar *ar_LB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,17 +279,6 @@ func (ar *ar_LB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -525,19 +287,6 @@ func (ar *ar_LB) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -546,28 +295,6 @@ func (ar *ar_LB) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -576,35 +303,6 @@ func (ar *ar_LB) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -613,40 +311,6 @@ func (ar *ar_LB) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -655,44 +319,5 @@ func (ar *ar_LB) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_LY/ar_LY.go b/ar_LY/ar_LY.go -index f074810..20dd554 100644 ---- a/ar_LY/ar_LY.go -+++ b/ar_LY/ar_LY.go -@@ -10,70 +10,49 @@ import ( - ) -  - type ar_LY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_LY' locale - func New() locales.Translator { - return &ar_LY{ -- locale: "ar_LY", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: ",", -- group: ".", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"", ""}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"LHDT": "التوقيت الصيفي للورد هاو", "SAST": "توقيت جنوب أفريقيا", "COST": "توقيت كولومبيا الصيفي", "MDT": "MDT", "AST": "التوقيت الرسمي الأطلسي", "MYT": "توقيت ماليزيا", "TMST": "توقيت تركمانستان الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "SGT": "توقيت سنغافورة", "HECU": "توقيت كوبا الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "IST": "توقيت الهند", "JST": "توقيت اليابان الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "AKST": "التوقيت الرسمي لألاسكا", "HADT": "توقيت هاواي ألوتيان الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "CLST": "توقيت شيلي الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "HNCU": "توقيت كوبا الرسمي", "UYST": "توقيت أورغواي الصيفي", "TMT": "توقيت تركمانستان الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "BOT": "توقيت بوليفيا", "HEEG": "توقيت شرق غرينلاند الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "MST": "MST", "GYT": "توقيت غيانا", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "SRT": "توقيت سورينام", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "WITA": "توقيت وسط إندونيسيا", "HKT": "توقيت هونغ كونغ الرسمي", "CHAST": "توقيت تشاتام الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "WIT": "توقيت شرق إندونيسيا", "BT": "توقيت بوتان", "ARST": "توقيت الأرجنتين الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "JDT": "توقيت اليابان الصيفي", "ChST": "توقيت تشامورو", "WESZ": "توقيت غرب أوروبا الصيفي", "CLT": "توقيت شيلي الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "CHADT": "توقيت تشاتام الصيفي", "∅∅∅": "توقيت الأمازون الصيفي", "EAT": "توقيت شرق أفريقيا", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HAST": "توقيت هاواي ألوتيان الرسمي", "ART": "توقيت الأرجنتين الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "ECT": "توقيت الإكوادور", "COT": "توقيت كولومبيا الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "VET": "توقيت فنزويلا", "HNT": "توقيت نيوفاوندلاند الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "GFT": "توقيت غايانا الفرنسية", "CAT": "توقيت وسط أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "GMT": "توقيت غرينتش", "UYT": "توقيت أورغواي الرسمي", "WEZ": "توقيت غرب أوروبا الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي"}, -+ locale: "ar_LY", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"", ""}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"MST": "MST", "AWST": "AWST", "CHAST": "CHAST", "WESZ": "WESZ", "WIT": "WIT", "COT": "COT", "CHADT": "CHADT", "WEZ": "WEZ", "CAT": "CAT", "WIB": "WIB", "WAT": "WAT", "WART": "WART", "ChST": "ChST", "WITA": "WITA", "BOT": "BOT", "HENOMX": "HENOMX", "LHDT": "LHDT", "AEST": "AEST", "UYT": "UYT", "HNPMX": "HNPMX", "HKST": "HKST", "ADT": "ADT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "LHST": "LHST", "AKDT": "AKDT", "CLT": "CLT", "GMT": "GMT", "ARST": "ARST", "SRT": "SRT", "HNEG": "HNEG", "HEPM": "HEPM", "PDT": "PDT", "EST": "EST", "CLST": "CLST", "NZDT": "NZDT", "HAST": "HAST", "MEZ": "MEZ", "HNT": "HNT", "CDT": "CDT", "ART": "ART", "MESZ": "MESZ", "JST": "JST", "HNPM": "HNPM", "WARST": "WARST", "GYT": "GYT", "HNOG": "HNOG", "AWDT": "AWDT", "AEDT": "AEDT", "HEEG": "HEEG", "PST": "PST", "HNCU": "HNCU", "EDT": "EDT", "CST": "CST", "AST": "AST", "UYST": "UYST", "WAST": "WAST", "HAT": "HAT", "TMST": "TMST", "EAT": "EAT", "BT": "BT", "VET": "VET", "HECU": "HECU", "ACWDT": "ACWDT", "OESZ": "OESZ", "SAST": "SAST", "HADT": "HADT", "SGT": "SGT", "AKST": "AKST", "GFT": "GFT", "HKT": "HKT", "TMT": "TMT", "ECT": "ECT", "MYT": "MYT", "∅∅∅": "∅∅∅", "IST": "IST", "ACWST": "ACWST", "HEOG": "HEOG", "NZST": "NZST", "MDT": "MDT", "ACST": "ACST", "JDT": "JDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "COST": "COST"}, - } - } -  -@@ -186,7 +165,7 @@ func (ar *ar_LY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_LY) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +175,7 @@ func (ar *ar_LY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_LY) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +185,7 @@ func (ar *ar_LY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_LY) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,79 +231,13 @@ func (ar *ar_LY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_LY' and handles both Whole and Real numbers based on 'v' - func (ar *ar_LY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_LY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_LY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 10 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_LY' -@@ -332,58 +245,7 @@ func (ar *ar_LY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_LY' -@@ -392,65 +254,7 @@ func (ar *ar_LY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_LY' -@@ -458,17 +262,6 @@ func (ar *ar_LY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,27 +270,6 @@ func (ar *ar_LY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,17 +278,6 @@ func (ar *ar_LY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -525,19 +286,6 @@ func (ar *ar_LY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -546,28 +294,6 @@ func (ar *ar_LY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -576,35 +302,6 @@ func (ar *ar_LY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -613,40 +310,6 @@ func (ar *ar_LY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -655,44 +318,5 @@ func (ar *ar_LY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_MA/ar_MA.go b/ar_MA/ar_MA.go -index 73bc6e8..318d52a 100644 ---- a/ar_MA/ar_MA.go -+++ b/ar_MA/ar_MA.go -@@ -10,70 +10,50 @@ import ( - ) -  - type ar_MA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_MA' locale - func New() locales.Translator { - return &ar_MA{ -- locale: "ar_MA", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: ",", -- group: ".", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "ماي", "يونيو", "يوليوز", "غشت", "شتنبر", "أكتوبر", "نونبر", "دجنبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "م", "ن", "ل", "غ", "ش", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "ماي", "يونيو", "يوليوز", "غشت", "شتنبر", "أكتوبر", "نونبر", "دجنبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WEZ": "توقيت غرب أوروبا الرسمي", "EAT": "توقيت شرق أفريقيا", "WAT": "توقيت غرب أفريقيا الرسمي", "GYT": "توقيت غيانا", "AKST": "التوقيت الرسمي لألاسكا", "AWST": "توقيت غرب أستراليا الرسمي", "CHAST": "توقيت تشاتام الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "WESZ": "توقيت غرب أوروبا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "TMST": "توقيت تركمانستان الصيفي", "SGT": "توقيت سنغافورة", "HNOG": "توقيت غرب غرينلاند الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "WITA": "توقيت وسط إندونيسيا", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "ECT": "توقيت الإكوادور", "AEDT": "توقيت شرق أستراليا الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "CHADT": "توقيت تشاتام الصيفي", "CAT": "توقيت وسط أفريقيا", "HADT": "توقيت هاواي ألوتيان الصيفي", "VET": "توقيت فنزويلا", "HKST": "توقيت هونغ كونغ الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "CLT": "توقيت شيلي الرسمي", "GFT": "توقيت غايانا الفرنسية", "OESZ": "توقيت شرق أوروبا الصيفي", "COST": "توقيت كولومبيا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "TMT": "توقيت تركمانستان الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "COT": "توقيت كولومبيا الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "UYT": "توقيت أورغواي الرسمي", "WIT": "توقيت شرق إندونيسيا", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "MDT": "MDT", "HNT": "توقيت نيوفاوندلاند الرسمي", "ChST": "توقيت تشامورو", "WAST": "توقيت غرب أفريقيا الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "ADT": "التوقيت الصيفي الأطلسي", "WIB": "توقيت غرب إندونيسيا", "SRT": "توقيت سورينام", "LHST": "توقيت لورد هاو الرسمي", "CLST": "توقيت شيلي الصيفي", "BOT": "توقيت بوليفيا", "OEZ": "توقيت شرق أوروبا الرسمي", "GMT": "توقيت غرينتش", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HKT": "توقيت هونغ كونغ الرسمي", "∅∅∅": "توقيت الأمازون الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "MST": "MST", "IST": "توقيت الهند", "JST": "توقيت اليابان الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "SAST": "توقيت جنوب أفريقيا", "AST": "التوقيت الرسمي الأطلسي", "UYST": "توقيت أورغواي الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "BT": "توقيت بوتان", "ARST": "توقيت الأرجنتين الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "NZST": "توقيت نيوزيلندا الرسمي", "JDT": "توقيت اليابان الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "MYT": "توقيت ماليزيا", "ART": "توقيت الأرجنتين الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "HNCU": "توقيت كوبا الرسمي", "HECU": "توقيت كوبا الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية"}, -+ locale: "ar_MA", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "ماي", "يونيو", "يوليوز", "غشت", "شتنبر", "أكتوبر", "نونبر", "دجنبر"}, -+ monthsNarrow: []string{"", "ي", "ف", "م", "أ", "م", "ن", "ل", "غ", "ش", "ك", "ب", "د"}, -+ monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "ماي", "يونيو", "يوليوز", "غشت", "شتنبر", "أكتوبر", "نونبر", "دجنبر"}, -+ timezones: map[string]string{"HEPM": "HEPM", "LHDT": "LHDT", "AKDT": "AKDT", "OEZ": "OEZ", "WART": "WART", "NZST": "NZST", "PST": "PST", "COST": "COST", "HENOMX": "HENOMX", "JDT": "JDT", "TMST": "TMST", "AST": "AST", "HAST": "HAST", "MEZ": "MEZ", "HEEG": "HEEG", "UYST": "UYST", "HNOG": "HNOG", "EAT": "EAT", "HNEG": "HNEG", "HKST": "HKST", "JST": "JST", "HECU": "HECU", "WEZ": "WEZ", "TMT": "TMT", "EDT": "EDT", "WIT": "WIT", "COT": "COT", "EST": "EST", "CLT": "CLT", "ACWST": "ACWST", "AEDT": "AEDT", "WESZ": "WESZ", "WAT": "WAT", "ADT": "ADT", "HEPMX": "HEPMX", "SGT": "SGT", "ECT": "ECT", "MDT": "MDT", "GYT": "GYT", "CAT": "CAT", "NZDT": "NZDT", "CST": "CST", "AEST": "AEST", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "GFT": "GFT", "HADT": "HADT", "HNNOMX": "HNNOMX", "MYT": "MYT", "AWST": "AWST", "WAST": "WAST", "HEOG": "HEOG", "ARST": "ARST", "ACWDT": "ACWDT", "AKST": "AKST", "HKT": "HKT", "WIB": "WIB", "HAT": "HAT", "ART": "ART", "BOT": "BOT", "HNPM": "HNPM", "HNT": "HNT", "SAST": "SAST", "WITA": "WITA", "CDT": "CDT", "BT": "BT", "VET": "VET", "HNPMX": "HNPMX", "OESZ": "OESZ", "GMT": "GMT", "SRT": "SRT", "AWDT": "AWDT", "CHAST": "CHAST", "MST": "MST", "ACST": "ACST", "LHST": "LHST", "WARST": "WARST", "CLST": "CLST", "ChST": "ChST", "ACDT": "ACDT", "CHADT": "CHADT", "IST": "IST", "PDT": "PDT", "MESZ": "MESZ", "UYT": "UYT"}, - } - } -  -@@ -252,79 +232,13 @@ func (ar *ar_MA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_MA' and handles both Whole and Real numbers based on 'v' - func (ar *ar_MA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_MA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_MA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 10 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_MA' -@@ -332,58 +246,7 @@ func (ar *ar_MA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_MA' -@@ -392,65 +255,7 @@ func (ar *ar_MA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_MA' -@@ -458,17 +263,6 @@ func (ar *ar_MA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,27 +271,6 @@ func (ar *ar_MA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,17 +279,6 @@ func (ar *ar_MA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -525,19 +287,6 @@ func (ar *ar_MA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/ar_MR/ar_MR.go b/ar_MR/ar_MR.go -index 05b33fb..8e03c30 100644 ---- a/ar_MR/ar_MR.go -+++ b/ar_MR/ar_MR.go -@@ -10,70 +10,50 @@ import ( - ) -  - type ar_MR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_MR' locale - func New() locales.Translator { - return &ar_MR{ -- locale: "ar_MR", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: ",", -- group: ".", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو", "يوليو", "أغشت", "شتمبر", "أكتوبر", "نوفمبر", "دجمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "إ", "و", "ن", "ل", "غ", "ش", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو", "يوليو", "أغشت", "شتمبر", "أكتوبر", "نوفمبر", "دجمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HKST": "توقيت هونغ كونغ الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "JST": "توقيت اليابان الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "ADT": "التوقيت الصيفي الأطلسي", "MYT": "توقيت ماليزيا", "UYST": "توقيت أورغواي الصيفي", "ART": "توقيت الأرجنتين الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "CLT": "توقيت شيلي الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "HNCU": "توقيت كوبا الرسمي", "HECU": "توقيت كوبا الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "CHAST": "توقيت تشاتام الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "TMT": "توقيت تركمانستان الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "JDT": "توقيت اليابان الصيفي", "SGT": "توقيت سنغافورة", "WEZ": "توقيت غرب أوروبا الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "IST": "توقيت الهند", "WAT": "توقيت غرب أفريقيا الرسمي", "ECT": "توقيت الإكوادور", "COT": "توقيت كولومبيا الرسمي", "HAST": "توقيت هاواي ألوتيان الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "ChST": "توقيت تشامورو", "CAT": "توقيت وسط أفريقيا", "MDT": "MDT", "AEDT": "توقيت شرق أستراليا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WIT": "توقيت شرق إندونيسيا", "WART": "توقيت غرب الأرجنتين الرسمي", "GMT": "توقيت غرينتش", "HAT": "توقيت نيوفاوندلاند الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "LHST": "توقيت لورد هاو الرسمي", "CHADT": "توقيت تشاتام الصيفي", "GFT": "توقيت غايانا الفرنسية", "AST": "التوقيت الرسمي الأطلسي", "SAST": "توقيت جنوب أفريقيا", "∅∅∅": "توقيت الأمازون الصيفي", "TMST": "توقيت تركمانستان الصيفي", "SRT": "توقيت سورينام", "COST": "توقيت كولومبيا الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "EAT": "توقيت شرق أفريقيا", "AKDT": "توقيت ألاسكا الصيفي", "CLST": "توقيت شيلي الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "VET": "توقيت فنزويلا", "BT": "توقيت بوتان", "AWDT": "توقيت غرب أستراليا الصيفي", "BOT": "توقيت بوليفيا", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "WIB": "توقيت غرب إندونيسيا", "PST": "توقيت المحيط الهادي الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "WESZ": "توقيت غرب أوروبا الصيفي", "WITA": "توقيت وسط إندونيسيا", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "HADT": "توقيت هاواي ألوتيان الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "MST": "MST", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "GYT": "توقيت غيانا", "UYT": "توقيت أورغواي الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي"}, -+ locale: "ar_MR", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو", "يوليو", "أغشت", "شتمبر", "أكتوبر", "نوفمبر", "دجمبر"}, -+ monthsNarrow: []string{"", "ي", "ف", "م", "إ", "و", "ن", "ل", "غ", "ش", "ك", "ب", "د"}, -+ monthsWide: []string{"", "يناير", "فبراير", "مارس", "إبريل", "مايو", "يونيو", "يوليو", "أغشت", "شتمبر", "أكتوبر", "نوفمبر", "دجمبر"}, -+ timezones: map[string]string{"HEPM": "HEPM", "WIT": "WIT", "MST": "MST", "BOT": "BOT", "AKST": "AKST", "GFT": "GFT", "HNOG": "HNOG", "TMST": "TMST", "CLT": "CLT", "CLST": "CLST", "NZST": "NZST", "AWDT": "AWDT", "LHST": "LHST", "IST": "IST", "ACWDT": "ACWDT", "AKDT": "AKDT", "SAST": "SAST", "COT": "COT", "COST": "COST", "HKT": "HKT", "CDT": "CDT", "HAST": "HAST", "BT": "BT", "ACWST": "ACWST", "CHADT": "CHADT", "UYST": "UYST", "GYT": "GYT", "ADT": "ADT", "MESZ": "MESZ", "CHAST": "CHAST", "VET": "VET", "HNEG": "HNEG", "PST": "PST", "AEST": "AEST", "AEDT": "AEDT", "OESZ": "OESZ", "EST": "EST", "EDT": "EDT", "WIB": "WIB", "ACST": "ACST", "MYT": "MYT", "PDT": "PDT", "UYT": "UYT", "WESZ": "WESZ", "SGT": "SGT", "HNT": "HNT", "HEOG": "HEOG", "ChST": "ChST", "ACDT": "ACDT", "AWST": "AWST", "WARST": "WARST", "CST": "CST", "ARST": "ARST", "EAT": "EAT", "HADT": "HADT", "HECU": "HECU", "WAST": "WAST", "CAT": "CAT", "AST": "AST", "SRT": "SRT", "MEZ": "MEZ", "JDT": "JDT", "HAT": "HAT", "WART": "WART", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "ECT": "ECT", "GMT": "GMT", "HEEG": "HEEG", "HENOMX": "HENOMX", "LHDT": "LHDT", "HKST": "HKST", "NZDT": "NZDT", "ART": "ART", "WEZ": "WEZ", "WAT": "WAT", "TMT": "TMT", "WITA": "WITA", "HEPMX": "HEPMX", "MDT": "MDT", "HNPMX": "HNPMX", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "JST": "JST"}, - } - } -  -@@ -252,79 +232,13 @@ func (ar *ar_MR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_MR' and handles both Whole and Real numbers based on 'v' - func (ar *ar_MR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_MR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_MR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 10 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_MR' -@@ -332,58 +246,7 @@ func (ar *ar_MR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_MR' -@@ -392,65 +255,7 @@ func (ar *ar_MR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_MR' -@@ -458,17 +263,6 @@ func (ar *ar_MR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,27 +271,6 @@ func (ar *ar_MR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,17 +279,6 @@ func (ar *ar_MR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -525,19 +287,6 @@ func (ar *ar_MR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -546,28 +295,6 @@ func (ar *ar_MR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -576,35 +303,6 @@ func (ar *ar_MR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -613,40 +311,6 @@ func (ar *ar_MR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -655,44 +319,5 @@ func (ar *ar_MR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_OM/ar_OM.go b/ar_OM/ar_OM.go -index 2bea560..791e4d0 100644 ---- a/ar_OM/ar_OM.go -+++ b/ar_OM/ar_OM.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_OM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_OM' locale - func New() locales.Translator { - return &ar_OM{ -- locale: "ar_OM", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"VET": "توقيت فنزويلا", "PST": "توقيت المحيط الهادي الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "SAST": "توقيت جنوب أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "HEOG": "توقيت غرب غرينلاند الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "ARST": "توقيت الأرجنتين الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "JDT": "توقيت اليابان الصيفي", "EAT": "توقيت شرق أفريقيا", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "UYST": "توقيت أورغواي الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "ChST": "توقيت تشامورو", "BOT": "توقيت بوليفيا", "WAT": "توقيت غرب أفريقيا الرسمي", "GFT": "توقيت غايانا الفرنسية", "OEZ": "توقيت شرق أوروبا الرسمي", "WIB": "توقيت غرب إندونيسيا", "PDT": "توقيت المحيط الهادي الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "∅∅∅": "توقيت الأمازون الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "CAT": "توقيت وسط أفريقيا", "HECU": "توقيت كوبا الصيفي", "MST": "MST", "SRT": "توقيت سورينام", "IST": "توقيت الهند", "AKST": "التوقيت الرسمي لألاسكا", "ADT": "التوقيت الصيفي الأطلسي", "WEZ": "توقيت غرب أوروبا الرسمي", "ART": "توقيت الأرجنتين الرسمي", "WITA": "توقيت وسط إندونيسيا", "TMST": "توقيت تركمانستان الصيفي", "ECT": "توقيت الإكوادور", "WARST": "توقيت غرب الأرجنتين الصيفي", "HNCU": "توقيت كوبا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AEST": "توقيت شرق أستراليا الرسمي", "CLT": "توقيت شيلي الرسمي", "CLST": "توقيت شيلي الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "MYT": "توقيت ماليزيا", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "CHADT": "توقيت تشاتام الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "GYT": "توقيت غيانا", "HADT": "توقيت هاواي ألوتيان الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "BT": "توقيت بوتان", "TMT": "توقيت تركمانستان الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "COT": "توقيت كولومبيا الرسمي", "COST": "توقيت كولومبيا الصيفي", "SGT": "توقيت سنغافورة", "MDT": "MDT", "HAT": "توقيت نيوفاوندلاند الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "CHAST": "توقيت تشاتام الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "JST": "توقيت اليابان الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "UYT": "توقيت أورغواي الرسمي", "AST": "التوقيت الرسمي الأطلسي", "WIT": "توقيت شرق إندونيسيا", "AWDT": "توقيت غرب أستراليا الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي"}, -+ locale: "ar_OM", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PDT": "PDT", "SAST": "SAST", "WITA": "WITA", "WESZ": "WESZ", "HEOG": "HEOG", "HKT": "HKT", "NZST": "NZST", "WIB": "WIB", "AWST": "AWST", "AEST": "AEST", "∅∅∅": "∅∅∅", "EDT": "EDT", "CST": "CST", "ADT": "ADT", "HADT": "HADT", "ACDT": "ACDT", "ACWST": "ACWST", "IST": "IST", "HNT": "HNT", "ARST": "ARST", "AKST": "AKST", "OEZ": "OEZ", "ChST": "ChST", "VET": "VET", "HAT": "HAT", "COT": "COT", "HKST": "HKST", "LHDT": "LHDT", "JDT": "JDT", "UYT": "UYT", "COST": "COST", "HNOG": "HNOG", "TMT": "TMT", "SGT": "SGT", "HEPMX": "HEPMX", "AKDT": "AKDT", "GYT": "GYT", "BOT": "BOT", "MESZ": "MESZ", "HNPM": "HNPM", "JST": "JST", "OESZ": "OESZ", "AWDT": "AWDT", "AEDT": "AEDT", "WIT": "WIT", "GFT": "GFT", "CLST": "CLST", "MST": "MST", "NZDT": "NZDT", "ART": "ART", "BT": "BT", "HNCU": "HNCU", "HNPMX": "HNPMX", "AST": "AST", "HNEG": "HNEG", "MDT": "MDT", "ECT": "ECT", "ACST": "ACST", "HENOMX": "HENOMX", "LHST": "LHST", "WART": "WART", "CAT": "CAT", "CLT": "CLT", "HAST": "HAST", "EAT": "EAT", "HECU": "HECU", "WARST": "WARST", "EST": "EST", "TMST": "TMST", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "WEZ": "WEZ", "WAT": "WAT", "MYT": "MYT", "ACWDT": "ACWDT", "PST": "PST", "UYST": "UYST", "MEZ": "MEZ", "CDT": "CDT", "GMT": "GMT", "SRT": "SRT", "HEEG": "HEEG", "HEPM": "HEPM", "CHAST": "CHAST", "WAST": "WAST"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_OM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_OM) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_OM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_OM) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_OM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_OM) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_OM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_OM' and handles both Whole and Real numbers based on 'v' - func (ar *ar_OM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_OM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_OM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_OM' -@@ -338,62 +241,7 @@ func (ar *ar_OM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_OM' -@@ -402,69 +250,7 @@ func (ar *ar_OM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_OM' -@@ -472,17 +258,6 @@ func (ar *ar_OM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_OM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_OM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_OM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_OM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_OM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_OM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_OM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_PS/ar_PS.go b/ar_PS/ar_PS.go -index 67d062b..f09d696 100644 ---- a/ar_PS/ar_PS.go -+++ b/ar_PS/ar_PS.go -@@ -10,70 +10,48 @@ import ( - ) -  - type ar_PS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_PS' locale - func New() locales.Translator { - return &ar_PS{ -- locale: "ar_PS", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -- monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WESZ": "توقيت غرب أوروبا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "HADT": "توقيت هاواي ألوتيان الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "AEST": "توقيت شرق أستراليا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "CHADT": "توقيت تشاتام الصيفي", "BOT": "توقيت بوليفيا", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "OESZ": "توقيت شرق أوروبا الصيفي", "MDT": "MDT", "PST": "توقيت المحيط الهادي الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "CLT": "توقيت شيلي الرسمي", "JST": "توقيت اليابان الرسمي", "ChST": "توقيت تشامورو", "HEOG": "توقيت غرب غرينلاند الصيفي", "CAT": "توقيت وسط أفريقيا", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AKDT": "توقيت ألاسكا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "GMT": "توقيت غرينتش", "HECU": "توقيت كوبا الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AKST": "التوقيت الرسمي لألاسكا", "MYT": "توقيت ماليزيا", "WEZ": "توقيت غرب أوروبا الرسمي", "TMT": "توقيت تركمانستان الرسمي", "COST": "توقيت كولومبيا الصيفي", "UYT": "توقيت أورغواي الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "HEEG": "توقيت شرق غرينلاند الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "SGT": "توقيت سنغافورة", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "HAST": "توقيت هاواي ألوتيان الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "GFT": "توقيت غايانا الفرنسية", "WAT": "توقيت غرب أفريقيا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "AST": "التوقيت الرسمي الأطلسي", "GYT": "توقيت غيانا", "PDT": "توقيت المحيط الهادي الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "LHST": "توقيت لورد هاو الرسمي", "CHAST": "توقيت تشاتام الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "SRT": "توقيت سورينام", "WITA": "توقيت وسط إندونيسيا", "MST": "MST", "WIT": "توقيت شرق إندونيسيا", "AWST": "توقيت غرب أستراليا الرسمي", "IST": "توقيت الهند", "EAT": "توقيت شرق أفريقيا", "ECT": "توقيت الإكوادور", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "VET": "توقيت فنزويلا", "HKT": "توقيت هونغ كونغ الرسمي", "CLST": "توقيت شيلي الصيفي", "COT": "توقيت كولومبيا الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "ADT": "التوقيت الصيفي الأطلسي", "ART": "توقيت الأرجنتين الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "TMST": "توقيت تركمانستان الصيفي", "UYST": "توقيت أورغواي الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "SAST": "توقيت جنوب أفريقيا", "∅∅∅": "توقيت الأمازون الصيفي", "HNCU": "توقيت كوبا الرسمي", "BT": "توقيت بوتان", "JDT": "توقيت اليابان الصيفي"}, -+ locale: "ar_PS", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -+ monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ timezones: map[string]string{"COST": "COST", "CLT": "CLT", "MST": "MST", "ACST": "ACST", "UYST": "UYST", "HAT": "HAT", "EAT": "EAT", "HAST": "HAST", "LHDT": "LHDT", "SGT": "SGT", "HNOG": "HNOG", "WARST": "WARST", "HEOG": "HEOG", "HNNOMX": "HNNOMX", "JDT": "JDT", "GFT": "GFT", "HKT": "HKT", "NZST": "NZST", "JST": "JST", "LHST": "LHST", "WESZ": "WESZ", "CHADT": "CHADT", "IST": "IST", "HNPMX": "HNPMX", "COT": "COT", "AST": "AST", "HEEG": "HEEG", "MEZ": "MEZ", "HNPM": "HNPM", "ADT": "ADT", "ACWDT": "ACWDT", "OESZ": "OESZ", "CST": "CST", "WAST": "WAST", "ACDT": "ACDT", "AEDT": "AEDT", "HECU": "HECU", "ART": "ART", "HENOMX": "HENOMX", "GYT": "GYT", "WITA": "WITA", "AWST": "AWST", "EST": "EST", "BOT": "BOT", "HADT": "HADT", "WAT": "WAT", "SAST": "SAST", "CLST": "CLST", "AEST": "AEST", "HEPMX": "HEPMX", "HKST": "HKST", "NZDT": "NZDT", "ECT": "ECT", "MYT": "MYT", "AWDT": "AWDT", "ACWST": "ACWST", "SRT": "SRT", "PST": "PST", "WIT": "WIT", "HNT": "HNT", "TMT": "TMT", "HNEG": "HNEG", "MESZ": "MESZ", "HEPM": "HEPM", "VET": "VET", "HNCU": "HNCU", "WEZ": "WEZ", "AKST": "AKST", "WIB": "WIB", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "PDT": "PDT", "CAT": "CAT", "CDT": "CDT", "MDT": "MDT", "ChST": "ChST", "GMT": "GMT", "BT": "BT", "AKDT": "AKDT", "TMST": "TMST", "OEZ": "OEZ", "ARST": "ARST", "UYT": "UYT", "WART": "WART", "EDT": "EDT"}, - } - } -  -@@ -252,85 +230,13 @@ func (ar *ar_PS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_PS' and handles both Whole and Real numbers based on 'v' - func (ar *ar_PS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_PS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_PS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_PS' -@@ -338,62 +244,7 @@ func (ar *ar_PS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_PS' -@@ -402,69 +253,7 @@ func (ar *ar_PS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_PS' -@@ -472,17 +261,6 @@ func (ar *ar_PS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +269,6 @@ func (ar *ar_PS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +277,6 @@ func (ar *ar_PS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +285,6 @@ func (ar *ar_PS) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +293,6 @@ func (ar *ar_PS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +301,6 @@ func (ar *ar_PS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +309,6 @@ func (ar *ar_PS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +317,5 @@ func (ar *ar_PS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_QA/ar_QA.go b/ar_QA/ar_QA.go -index 675f1a3..780da81 100644 ---- a/ar_QA/ar_QA.go -+++ b/ar_QA/ar_QA.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_QA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_QA' locale - func New() locales.Translator { - return &ar_QA{ -- locale: "ar_QA", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CAT": "توقيت وسط أفريقيا", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "BT": "توقيت بوتان", "HKST": "توقيت هونغ كونغ الصيفي", "WITA": "توقيت وسط إندونيسيا", "CLST": "توقيت شيلي الصيفي", "EAT": "توقيت شرق أفريقيا", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "HNT": "توقيت نيوفاوندلاند الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "HKT": "توقيت هونغ كونغ الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "MESZ": "توقيت وسط أوروبا الصيفي", "TMST": "توقيت تركمانستان الصيفي", "VET": "توقيت فنزويلا", "HEEG": "توقيت شرق غرينلاند الصيفي", "AST": "التوقيت الرسمي الأطلسي", "SRT": "توقيت سورينام", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "COST": "توقيت كولومبيا الصيفي", "SGT": "توقيت سنغافورة", "GMT": "توقيت غرينتش", "NZDT": "توقيت نيوزيلندا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "IST": "توقيت الهند", "JDT": "توقيت اليابان الصيفي", "WESZ": "توقيت غرب أوروبا الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "MDT": "MDT", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AKDT": "توقيت ألاسكا الصيفي", "UYST": "توقيت أورغواي الصيفي", "MST": "MST", "AKST": "التوقيت الرسمي لألاسكا", "ART": "توقيت الأرجنتين الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "LHST": "توقيت لورد هاو الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "COT": "توقيت كولومبيا الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "ADT": "التوقيت الصيفي الأطلسي", "GYT": "توقيت غيانا", "MEZ": "توقيت وسط أوروبا الرسمي", "∅∅∅": "توقيت الأمازون الصيفي", "TMT": "توقيت تركمانستان الرسمي", "ChST": "توقيت تشامورو", "HAST": "توقيت هاواي ألوتيان الرسمي", "PST": "توقيت المحيط الهادي الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "BOT": "توقيت بوليفيا", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HADT": "توقيت هاواي ألوتيان الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "HECU": "توقيت كوبا الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "GFT": "توقيت غايانا الفرنسية", "WIT": "توقيت شرق إندونيسيا", "SAST": "توقيت جنوب أفريقيا", "JST": "توقيت اليابان الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "ECT": "توقيت الإكوادور", "WART": "توقيت غرب الأرجنتين الرسمي", "UYT": "توقيت أورغواي الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "CHADT": "توقيت تشاتام الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "AEST": "توقيت شرق أستراليا الرسمي", "CLT": "توقيت شيلي الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HNCU": "توقيت كوبا الرسمي", "MYT": "توقيت ماليزيا"}, -+ locale: "ar_QA", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SRT": "SRT", "PST": "PST", "CHADT": "CHADT", "OEZ": "OEZ", "WART": "WART", "WARST": "WARST", "NZST": "NZST", "AWDT": "AWDT", "HEOG": "HEOG", "TMST": "TMST", "ChST": "ChST", "UYT": "UYT", "HNCU": "HNCU", "HNPMX": "HNPMX", "NZDT": "NZDT", "ART": "ART", "HADT": "HADT", "ACDT": "ACDT", "AEDT": "AEDT", "GFT": "GFT", "ECT": "ECT", "MESZ": "MESZ", "MST": "MST", "MDT": "MDT", "WIB": "WIB", "BOT": "BOT", "MEZ": "MEZ", "AWST": "AWST", "LHDT": "LHDT", "HEPM": "HEPM", "AST": "AST", "EAT": "EAT", "JDT": "JDT", "IST": "IST", "AEST": "AEST", "COST": "COST", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "HKST": "HKST", "CLST": "CLST", "WITA": "WITA", "WESZ": "WESZ", "HKT": "HKT", "ACST": "ACST", "BT": "BT", "AKST": "AKST", "ADT": "ADT", "GMT": "GMT", "TMT": "TMT", "CLT": "CLT", "HNEG": "HNEG", "HENOMX": "HENOMX", "WEZ": "WEZ", "AKDT": "AKDT", "OESZ": "OESZ", "ARST": "ARST", "PDT": "PDT", "ACWDT": "ACWDT", "UYST": "UYST", "EST": "EST", "CDT": "CDT", "HNPM": "HNPM", "JST": "JST", "CHAST": "CHAST", "SGT": "SGT", "VET": "VET", "WAST": "WAST", "HAT": "HAT", "CST": "CST", "HAST": "HAST", "HNNOMX": "HNNOMX", "HECU": "HECU", "HNT": "HNT", "COT": "COT", "CAT": "CAT", "HEEG": "HEEG", "LHST": "LHST", "ACWST": "ACWST", "HEPMX": "HEPMX", "WIT": "WIT", "SAST": "SAST", "GYT": "GYT", "EDT": "EDT", "MYT": "MYT", "WAT": "WAT"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_QA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_QA) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_QA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_QA) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_QA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_QA) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_QA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_QA' and handles both Whole and Real numbers based on 'v' - func (ar *ar_QA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_QA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_QA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_QA' -@@ -338,62 +241,7 @@ func (ar *ar_QA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_QA' -@@ -402,69 +250,7 @@ func (ar *ar_QA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_QA' -@@ -472,17 +258,6 @@ func (ar *ar_QA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_QA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_QA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_QA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_QA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_QA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_QA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_QA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_SA/ar_SA.go b/ar_SA/ar_SA.go -index d04c8e3..056e1ea 100644 ---- a/ar_SA/ar_SA.go -+++ b/ar_SA/ar_SA.go -@@ -10,70 +10,48 @@ import ( - ) -  - type ar_SA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_SA' locale - func New() locales.Translator { - return &ar_SA{ -- locale: "ar_SA", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"", ""}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"AWDT": "توقيت غرب أستراليا الصيفي", "EAT": "توقيت شرق أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "GYT": "توقيت غيانا", "LHDT": "التوقيت الصيفي للورد هاو", "MDT": "MDT", "AKST": "التوقيت الرسمي لألاسكا", "MYT": "توقيت ماليزيا", "HNT": "توقيت نيوفاوندلاند الرسمي", "ChST": "توقيت تشامورو", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "OESZ": "توقيت شرق أوروبا الصيفي", "COST": "توقيت كولومبيا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "TMT": "توقيت تركمانستان الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "CLST": "توقيت شيلي الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "VET": "توقيت فنزويلا", "SRT": "توقيت سورينام", "HAST": "توقيت هاواي ألوتيان الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "ART": "توقيت الأرجنتين الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "SGT": "توقيت سنغافورة", "HNCU": "توقيت كوبا الرسمي", "MST": "MST", "AST": "التوقيت الرسمي الأطلسي", "WITA": "توقيت وسط إندونيسيا", "AEST": "توقيت شرق أستراليا الرسمي", "HADT": "توقيت هاواي ألوتيان الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "CHADT": "توقيت تشاتام الصيفي", "JDT": "توقيت اليابان الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HAT": "توقيت نيوفاوندلاند الصيفي", "∅∅∅": "توقيت بيرو الصيفي", "GMT": "توقيت غرينتش", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "IST": "توقيت الهند", "JST": "توقيت اليابان الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HECU": "توقيت كوبا الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "WIT": "توقيت شرق إندونيسيا", "WEZ": "توقيت غرب أوروبا الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "BOT": "توقيت بوليفيا", "WAST": "توقيت غرب أفريقيا الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "UYST": "توقيت أورغواي الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "TMST": "توقيت تركمانستان الصيفي", "ECT": "توقيت الإكوادور", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "UYT": "توقيت أورغواي الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "GFT": "توقيت غايانا الفرنسية", "CAT": "توقيت وسط أفريقيا", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "CLT": "توقيت شيلي الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "COT": "توقيت كولومبيا الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "SAST": "توقيت جنوب أفريقيا", "WAT": "توقيت غرب أفريقيا الرسمي", "AKDT": "توقيت ألاسكا الصيفي", "WIB": "توقيت غرب إندونيسيا", "BT": "توقيت بوتان"}, -+ locale: "ar_SA", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ percent: "٪", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"", ""}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"CLT": "CLT", "ADT": "ADT", "MEZ": "MEZ", "AWST": "AWST", "LHDT": "LHDT", "IST": "IST", "WESZ": "WESZ", "HNCU": "HNCU", "ART": "ART", "ACDT": "ACDT", "HNPMX": "HNPMX", "HNOG": "HNOG", "BOT": "BOT", "ACWST": "ACWST", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "CAT": "CAT", "NZST": "NZST", "HEOG": "HEOG", "SGT": "SGT", "HNPM": "HNPM", "PST": "PST", "UYST": "UYST", "EST": "EST", "MDT": "MDT", "HENOMX": "HENOMX", "AWDT": "AWDT", "MYT": "MYT", "WARST": "WARST", "WIT": "WIT", "SAST": "SAST", "HKT": "HKT", "TMT": "TMT", "AST": "AST", "ChST": "ChST", "AEST": "AEST", "HECU": "HECU", "WAST": "WAST", "AKDT": "AKDT", "TMST": "TMST", "WITA": "WITA", "HEPM": "HEPM", "PDT": "PDT", "AKST": "AKST", "COT": "COT", "HNNOMX": "HNNOMX", "OESZ": "OESZ", "HNT": "HNT", "CLST": "CLST", "EAT": "EAT", "LHST": "LHST", "UYT": "UYT", "WEZ": "WEZ", "HEPMX": "HEPMX", "WART": "WART", "CHADT": "CHADT", "ECT": "ECT", "HAST": "HAST", "HNEG": "HNEG", "HEEG": "HEEG", "JST": "JST", "ACWDT": "ACWDT", "CHAST": "CHAST", "VET": "VET", "CDT": "CDT", "ARST": "ARST", "OEZ": "OEZ", "GFT": "GFT", "EDT": "EDT", "COST": "COST", "CST": "CST", "NZDT": "NZDT", "GMT": "GMT", "HADT": "HADT", "MESZ": "MESZ", "ACST": "ACST", "GYT": "GYT", "HKST": "HKST", "MST": "MST", "WIB": "WIB", "SRT": "SRT", "JDT": "JDT", "BT": "BT", "WAT": "WAT", "HAT": "HAT"}, - } - } -  -@@ -186,7 +164,7 @@ func (ar *ar_SA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_SA) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +174,7 @@ func (ar *ar_SA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_SA) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +184,7 @@ func (ar *ar_SA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_SA) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +230,13 @@ func (ar *ar_SA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_SA' and handles both Whole and Real numbers based on 'v' - func (ar *ar_SA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_SA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_SA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 9 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SA' -@@ -338,62 +244,7 @@ func (ar *ar_SA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SA' -@@ -402,69 +253,7 @@ func (ar *ar_SA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_SA' -@@ -472,17 +261,6 @@ func (ar *ar_SA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +269,6 @@ func (ar *ar_SA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +277,6 @@ func (ar *ar_SA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +285,6 @@ func (ar *ar_SA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +293,6 @@ func (ar *ar_SA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +301,6 @@ func (ar *ar_SA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +309,6 @@ func (ar *ar_SA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +317,5 @@ func (ar *ar_SA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_SD/ar_SD.go b/ar_SD/ar_SD.go -index 6bb92c2..e34b95d 100644 ---- a/ar_SD/ar_SD.go -+++ b/ar_SD/ar_SD.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_SD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_SD' locale - func New() locales.Translator { - return &ar_SD{ -- locale: "ar_SD", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"ACWDT": "توقيت غرب وسط أستراليا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "CLT": "توقيت شيلي الرسمي", "CLST": "توقيت شيلي الصيفي", "ChST": "توقيت تشامورو", "WIT": "توقيت شرق إندونيسيا", "WESZ": "توقيت غرب أوروبا الصيفي", "ART": "توقيت الأرجنتين الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "SAST": "توقيت جنوب أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "WARST": "توقيت غرب الأرجنتين الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "UYST": "توقيت أورغواي الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HADT": "توقيت هاواي ألوتيان الصيفي", "SRT": "توقيت سورينام", "HAT": "توقيت نيوفاوندلاند الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "WIB": "توقيت غرب إندونيسيا", "LHDT": "التوقيت الصيفي للورد هاو", "HNEG": "توقيت شرق غرينلاند الرسمي", "BOT": "توقيت بوليفيا", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AST": "التوقيت الرسمي الأطلسي", "WEZ": "توقيت غرب أوروبا الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "SGT": "توقيت سنغافورة", "MDT": "MDT", "LHST": "توقيت لورد هاو الرسمي", "JDT": "توقيت اليابان الصيفي", "COT": "توقيت كولومبيا الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "VET": "توقيت فنزويلا", "BT": "توقيت بوتان", "HNT": "توقيت نيوفاوندلاند الرسمي", "ECT": "توقيت الإكوادور", "CAT": "توقيت وسط أفريقيا", "MST": "MST", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "GYT": "توقيت غيانا", "HNOG": "توقيت غرب غرينلاند الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "WITA": "توقيت وسط إندونيسيا", "NZDT": "توقيت نيوزيلندا الصيفي", "CHADT": "توقيت تشاتام الصيفي", "∅∅∅": "توقيت بيرو الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "IST": "توقيت الهند", "TMST": "توقيت تركمانستان الصيفي", "GMT": "توقيت غرينتش", "HEOG": "توقيت غرب غرينلاند الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "EAT": "توقيت شرق أفريقيا", "HNCU": "توقيت كوبا الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "COST": "توقيت كولومبيا الصيفي", "HECU": "توقيت كوبا الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "JST": "توقيت اليابان الرسمي", "GFT": "توقيت غايانا الفرنسية", "TMT": "توقيت تركمانستان الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AWDT": "توقيت غرب أستراليا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "CHAST": "توقيت تشاتام الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "MYT": "توقيت ماليزيا", "UYT": "توقيت أورغواي الرسمي"}, -+ locale: "ar_SD", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "CHAST": "CHAST", "HAT": "HAT", "ART": "ART", "HNEG": "HNEG", "HEEG": "HEEG", "CLST": "CLST", "NZST": "NZST", "AEDT": "AEDT", "HNT": "HNT", "WART": "WART", "GYT": "GYT", "COT": "COT", "HECU": "HECU", "ARST": "ARST", "BOT": "BOT", "EAT": "EAT", "LHDT": "LHDT", "AKST": "AKST", "COST": "COST", "BT": "BT", "WEZ": "WEZ", "WAT": "WAT", "IST": "IST", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "MEZ": "MEZ", "ACDT": "ACDT", "HENOMX": "HENOMX", "VET": "VET", "HEPMX": "HEPMX", "HEOG": "HEOG", "NZDT": "NZDT", "HAST": "HAST", "HNNOMX": "HNNOMX", "SRT": "SRT", "ACST": "ACST", "HKST": "HKST", "WIB": "WIB", "JST": "JST", "JDT": "JDT", "OEZ": "OEZ", "SAST": "SAST", "CAT": "CAT", "HADT": "HADT", "HNPM": "HNPM", "UYT": "UYT", "WARST": "WARST", "WIT": "WIT", "CDT": "CDT", "AST": "AST", "SGT": "SGT", "HNPMX": "HNPMX", "HNCU": "HNCU", "WITA": "WITA", "ECT": "ECT", "PDT": "PDT", "ACWDT": "ACWDT", "UYST": "UYST", "PST": "PST", "HKT": "HKT", "TMST": "TMST", "MESZ": "MESZ", "MYT": "MYT", "MDT": "MDT", "GMT": "GMT", "AWDT": "AWDT", "CHADT": "CHADT", "EST": "EST", "EDT": "EDT", "CLT": "CLT", "MST": "MST", "WESZ": "WESZ", "ACWST": "ACWST", "WAST": "WAST", "HNOG": "HNOG", "ChST": "ChST", "AWST": "AWST", "HEPM": "HEPM", "ADT": "ADT", "AEST": "AEST", "OESZ": "OESZ", "GFT": "GFT", "TMT": "TMT", "CST": "CST"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_SD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_SD) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_SD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_SD) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_SD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_SD) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_SD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_SD' and handles both Whole and Real numbers based on 'v' - func (ar *ar_SD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_SD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_SD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SD' -@@ -338,62 +241,7 @@ func (ar *ar_SD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SD' -@@ -402,69 +250,7 @@ func (ar *ar_SD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_SD' -@@ -472,17 +258,6 @@ func (ar *ar_SD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_SD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_SD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_SD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_SD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_SD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_SD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_SD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_SO/ar_SO.go b/ar_SO/ar_SO.go -index 3558328..fa8d3c7 100644 ---- a/ar_SO/ar_SO.go -+++ b/ar_SO/ar_SO.go -@@ -10,70 +10,46 @@ import ( - ) -  - type ar_SO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_SO' locale - func New() locales.Translator { - return &ar_SO{ -- locale: "ar_SO", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "S", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"AWST": "توقيت غرب أستراليا الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "WESZ": "توقيت غرب أوروبا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "AEST": "توقيت شرق أستراليا الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "LHST": "توقيت لورد هاو الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "GYT": "توقيت غيانا", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "GMT": "توقيت غرينتش", "MYT": "توقيت ماليزيا", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "WIT": "توقيت شرق إندونيسيا", "NZDT": "توقيت نيوزيلندا الصيفي", "COST": "توقيت كولومبيا الصيفي", "BT": "توقيت بوتان", "LHDT": "التوقيت الصيفي للورد هاو", "CLT": "توقيت شيلي الرسمي", "TMST": "توقيت تركمانستان الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "ECT": "توقيت الإكوادور", "CHAST": "توقيت تشاتام الرسمي", "GFT": "توقيت غايانا الفرنسية", "AKDT": "توقيت ألاسكا الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "AST": "التوقيت الرسمي الأطلسي", "ART": "توقيت الأرجنتين الرسمي", "CLST": "توقيت شيلي الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HEOG": "توقيت غرب غرينلاند الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "CAT": "توقيت وسط أفريقيا", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "MST": "MST", "MDT": "MDT", "JDT": "توقيت اليابان الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "IST": "توقيت الهند", "∅∅∅": "توقيت الأمازون الصيفي", "BOT": "توقيت بوليفيا", "SRT": "توقيت سورينام", "ChST": "توقيت تشامورو", "SGT": "توقيت سنغافورة", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "MESZ": "توقيت وسط أوروبا الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "JST": "توقيت اليابان الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "UYT": "توقيت أورغواي الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "WIB": "توقيت غرب إندونيسيا", "HADT": "توقيت هاواي ألوتيان الصيفي", "TMT": "توقيت تركمانستان الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "COT": "توقيت كولومبيا الرسمي", "HECU": "توقيت كوبا الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "SAST": "توقيت جنوب أفريقيا", "HAST": "توقيت هاواي ألوتيان الرسمي", "WITA": "توقيت وسط إندونيسيا", "EAT": "توقيت شرق أفريقيا", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "UYST": "توقيت أورغواي الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "HNT": "توقيت نيوفاوندلاند الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "CHADT": "توقيت تشاتام الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "HNCU": "توقيت كوبا الرسمي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "VET": "توقيت فنزويلا"}, -+ locale: "ar_SO", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ percent: "٪", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "S", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "ACWST": "ACWST", "AKST": "AKST", "GFT": "GFT", "COST": "COST", "WITA": "WITA", "UYST": "UYST", "CAT": "CAT", "LHDT": "LHDT", "AST": "AST", "BOT": "BOT", "HNPM": "HNPM", "IST": "IST", "WAT": "WAT", "HAT": "HAT", "ART": "ART", "ACDT": "ACDT", "HENOMX": "HENOMX", "MEZ": "MEZ", "OESZ": "OESZ", "TMT": "TMT", "SRT": "SRT", "HEEG": "HEEG", "SGT": "SGT", "CDT": "CDT", "EAT": "EAT", "JST": "JST", "AWST": "AWST", "CHAST": "CHAST", "HNCU": "HNCU", "COT": "COT", "ChST": "ChST", "HNNOMX": "HNNOMX", "ADT": "ADT", "HADT": "HADT", "WIB": "WIB", "ACST": "ACST", "MYT": "MYT", "BT": "BT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "HKST": "HKST", "OEZ": "OEZ", "EST": "EST", "WESZ": "WESZ", "GMT": "GMT", "PDT": "PDT", "EDT": "EDT", "MST": "MST", "WEZ": "WEZ", "AKDT": "AKDT", "CLT": "CLT", "CST": "CST", "PST": "PST", "AEDT": "AEDT", "HEPMX": "HEPMX", "WAST": "WAST", "WIT": "WIT", "MDT": "MDT", "LHST": "LHST", "JDT": "JDT", "VET": "VET", "NZST": "NZST", "ECT": "ECT", "TMST": "TMST", "CLST": "CLST", "HAST": "HAST", "AEST": "AEST", "UYT": "UYT", "WARST": "WARST", "HKT": "HKT", "HEOG": "HEOG", "HNPMX": "HNPMX", "HNT": "HNT", "HNOG": "HNOG", "SAST": "SAST", "NZDT": "NZDT", "ARST": "ARST", "MESZ": "MESZ", "HEPM": "HEPM", "AWDT": "AWDT", "WART": "WART", "GYT": "GYT", "ACWDT": "ACWDT", "HECU": "HECU"}, - } - } -  -@@ -186,7 +162,7 @@ func (ar *ar_SO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_SO) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +172,7 @@ func (ar *ar_SO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_SO) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +182,7 @@ func (ar *ar_SO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_SO) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +228,13 @@ func (ar *ar_SO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_SO' and handles both Whole and Real numbers based on 'v' - func (ar *ar_SO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_SO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_SO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 9 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SO' -@@ -338,62 +242,7 @@ func (ar *ar_SO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SO' -@@ -402,69 +251,7 @@ func (ar *ar_SO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_SO' -@@ -472,17 +259,6 @@ func (ar *ar_SO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +267,6 @@ func (ar *ar_SO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +275,6 @@ func (ar *ar_SO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +283,6 @@ func (ar *ar_SO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +291,6 @@ func (ar *ar_SO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +299,6 @@ func (ar *ar_SO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +307,6 @@ func (ar *ar_SO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +315,5 @@ func (ar *ar_SO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_SS/ar_SS.go b/ar_SS/ar_SS.go -index 43f59d8..d69d662 100644 ---- a/ar_SS/ar_SS.go -+++ b/ar_SS/ar_SS.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_SS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_SS' locale - func New() locales.Translator { - return &ar_SS{ -- locale: "ar_SS", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "£", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"∅∅∅": "توقيت الأمازون الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "WIB": "توقيت غرب إندونيسيا", "TMST": "توقيت تركمانستان الصيفي", "CAT": "توقيت وسط أفريقيا", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AKDT": "توقيت ألاسكا الصيفي", "UYT": "توقيت أورغواي الرسمي", "UYST": "توقيت أورغواي الصيفي", "HEEG": "توقيت شرق غرينلاند الصيفي", "GMT": "توقيت غرينتش", "SGT": "توقيت سنغافورة", "HADT": "توقيت هاواي ألوتيان الصيفي", "PST": "توقيت المحيط الهادي الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "ChST": "توقيت تشامورو", "ACDT": "توقيت وسط أستراليا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "AKST": "التوقيت الرسمي لألاسكا", "ADT": "التوقيت الصيفي الأطلسي", "WEZ": "توقيت غرب أوروبا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "WITA": "توقيت وسط إندونيسيا", "SRT": "توقيت سورينام", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "ART": "توقيت الأرجنتين الرسمي", "LHST": "توقيت لورد هاو الرسمي", "CLST": "توقيت شيلي الصيفي", "BOT": "توقيت بوليفيا", "ACST": "توقيت وسط أستراليا الرسمي", "AST": "التوقيت الرسمي الأطلسي", "GYT": "توقيت غيانا", "MYT": "توقيت ماليزيا", "NZST": "توقيت نيوزيلندا الرسمي", "TMT": "توقيت تركمانستان الرسمي", "EAT": "توقيت شرق أفريقيا", "MDT": "MDT", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HAST": "توقيت هاواي ألوتيان الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "PDT": "توقيت المحيط الهادي الصيفي", "GFT": "توقيت غايانا الفرنسية", "WAST": "توقيت غرب أفريقيا الصيفي", "COT": "توقيت كولومبيا الرسمي", "COST": "توقيت كولومبيا الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HNCU": "توقيت كوبا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "JDT": "توقيت اليابان الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "VET": "توقيت فنزويلا", "WIT": "توقيت شرق إندونيسيا", "MEZ": "توقيت وسط أوروبا الرسمي", "CHAST": "توقيت تشاتام الرسمي", "JST": "توقيت اليابان الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "BT": "توقيت بوتان", "WESZ": "توقيت غرب أوروبا الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "AEST": "توقيت شرق أستراليا الرسمي", "SAST": "توقيت جنوب أفريقيا", "IST": "توقيت الهند", "MST": "MST", "HKST": "توقيت هونغ كونغ الصيفي", "CHADT": "توقيت تشاتام الصيفي", "CLT": "توقيت شيلي الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "ECT": "توقيت الإكوادور", "WARST": "توقيت غرب الأرجنتين الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "HECU": "توقيت كوبا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HKT": "توقيت هونغ كونغ الرسمي", "LHDT": "التوقيت الصيفي للورد هاو"}, -+ locale: "ar_SS", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "£", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "HKST": "HKST", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "OESZ": "OESZ", "HAT": "HAT", "COT": "COT", "EAT": "EAT", "HEPM": "HEPM", "ACWDT": "ACWDT", "PDT": "PDT", "MESZ": "MESZ", "WAST": "WAST", "WART": "WART", "CAT": "CAT", "HENOMX": "HENOMX", "AWDT": "AWDT", "JDT": "JDT", "AEST": "AEST", "AKDT": "AKDT", "CLT": "CLT", "WITA": "WITA", "WARST": "WARST", "HNOG": "HNOG", "HKT": "HKT", "HNEG": "HNEG", "CHADT": "CHADT", "VET": "VET", "HNCU": "HNCU", "WIT": "WIT", "ECT": "ECT", "BT": "BT", "HNT": "HNT", "CDT": "CDT", "ART": "ART", "BOT": "BOT", "SGT": "SGT", "GYT": "GYT", "AEDT": "AEDT", "HECU": "HECU", "OEZ": "OEZ", "NZDT": "NZDT", "WIB": "WIB", "HEEG": "HEEG", "ACDT": "ACDT", "HNPM": "HNPM", "UYST": "UYST", "PST": "PST", "SRT": "SRT", "MDT": "MDT", "ACWST": "ACWST", "COST": "COST", "CHAST": "CHAST", "UYT": "UYT", "AKST": "AKST", "ARST": "ARST", "MST": "MST", "HNNOMX": "HNNOMX", "AWST": "AWST", "LHDT": "LHDT", "GFT": "GFT", "TMST": "TMST", "NZST": "NZST", "HEOG": "HEOG", "TMT": "TMT", "CLST": "CLST", "GMT": "GMT", "HAST": "HAST", "LHST": "LHST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "CST": "CST", "ChST": "ChST", "AST": "AST", "MEZ": "MEZ", "ACST": "ACST", "JST": "JST", "ADT": "ADT", "IST": "IST", "WESZ": "WESZ", "EST": "EST", "HADT": "HADT", "MYT": "MYT", "WAT": "WAT", "EDT": "EDT"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_SS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_SS) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_SS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_SS) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_SS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_SS) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_SS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_SS' and handles both Whole and Real numbers based on 'v' - func (ar *ar_SS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_SS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_SS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SS' -@@ -338,62 +241,7 @@ func (ar *ar_SS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SS' -@@ -402,69 +250,7 @@ func (ar *ar_SS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_SS' -@@ -472,17 +258,6 @@ func (ar *ar_SS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_SS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_SS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_SS) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_SS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_SS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_SS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_SS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_SY/ar_SY.go b/ar_SY/ar_SY.go -index 7850193..c2400ec 100644 ---- a/ar_SY/ar_SY.go -+++ b/ar_SY/ar_SY.go -@@ -10,70 +10,48 @@ import ( - ) -  - type ar_SY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_SY' locale - func New() locales.Translator { - return &ar_SY{ -- locale: "ar_SY", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -- monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"AST": "التوقيت الرسمي الأطلسي", "VET": "توقيت فنزويلا", "HNT": "توقيت نيوفاوندلاند الرسمي", "CLST": "توقيت شيلي الصيفي", "ACDT": "توقيت وسط أستراليا الصيفي", "COST": "توقيت كولومبيا الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "MST": "MST", "HAT": "توقيت نيوفاوندلاند الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "GMT": "توقيت غرينتش", "CLT": "توقيت شيلي الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "ADT": "التوقيت الصيفي الأطلسي", "SRT": "توقيت سورينام", "HKT": "توقيت هونغ كونغ الرسمي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "WIT": "توقيت شرق إندونيسيا", "HECU": "توقيت كوبا الصيفي", "MYT": "توقيت ماليزيا", "PST": "توقيت المحيط الهادي الرسمي", "WITA": "توقيت وسط إندونيسيا", "MESZ": "توقيت وسط أوروبا الصيفي", "IST": "توقيت الهند", "JST": "توقيت اليابان الرسمي", "TMT": "توقيت تركمانستان الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "HADT": "توقيت هاواي ألوتيان الصيفي", "BT": "توقيت بوتان", "WEZ": "توقيت غرب أوروبا الرسمي", "WESZ": "توقيت غرب أوروبا الصيفي", "GFT": "توقيت غايانا الفرنسية", "ACST": "توقيت وسط أستراليا الرسمي", "SGT": "توقيت سنغافورة", "WIB": "توقيت غرب إندونيسيا", "AKDT": "توقيت ألاسكا الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "CHAST": "توقيت تشاتام الرسمي", "CHADT": "توقيت تشاتام الصيفي", "COT": "توقيت كولومبيا الرسمي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "MDT": "MDT", "HNOG": "توقيت غرب غرينلاند الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "LHDT": "التوقيت الصيفي للورد هاو", "EAT": "توقيت شرق أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "AEST": "توقيت شرق أستراليا الرسمي", "LHST": "توقيت لورد هاو الرسمي", "∅∅∅": "توقيت الأمازون الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "GYT": "توقيت غيانا", "UYST": "توقيت أورغواي الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "TMST": "توقيت تركمانستان الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "AEDT": "توقيت شرق أستراليا الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "JDT": "توقيت اليابان الصيفي", "BOT": "توقيت بوليفيا", "WAT": "توقيت غرب أفريقيا الرسمي", "UYT": "توقيت أورغواي الرسمي", "HNCU": "توقيت كوبا الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "SAST": "توقيت جنوب أفريقيا", "ChST": "توقيت تشامورو", "OEZ": "توقيت شرق أوروبا الرسمي", "AWST": "توقيت غرب أستراليا الرسمي", "ECT": "توقيت الإكوادور", "CAT": "توقيت وسط أفريقيا", "HAST": "توقيت هاواي ألوتيان الرسمي", "ART": "توقيت الأرجنتين الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية"}, -+ locale: "ar_SY", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ monthsNarrow: []string{"", "ك", "ش", "آ", "ن", "أ", "ح", "ت", "آ", "أ", "ت", "ت", "ك"}, -+ monthsWide: []string{"", "كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"}, -+ timezones: map[string]string{"ART": "ART", "HNNOMX": "HNNOMX", "UYT": "UYT", "UYST": "UYST", "OEZ": "OEZ", "WART": "WART", "COT": "COT", "CLT": "CLT", "MDT": "MDT", "JDT": "JDT", "HEOG": "HEOG", "SRT": "SRT", "MEZ": "MEZ", "TMST": "TMST", "WITA": "WITA", "HNPM": "HNPM", "HEPM": "HEPM", "WESZ": "WESZ", "HADT": "HADT", "AKDT": "AKDT", "HNT": "HNT", "HAT": "HAT", "∅∅∅": "∅∅∅", "COST": "COST", "CDT": "CDT", "EAT": "EAT", "EDT": "EDT", "CHADT": "CHADT", "BT": "BT", "SAST": "SAST", "HKT": "HKT", "CLST": "CLST", "ECT": "ECT", "HNEG": "HNEG", "AWDT": "AWDT", "AWST": "AWST", "ACWDT": "ACWDT", "IST": "IST", "AEDT": "AEDT", "SGT": "SGT", "OESZ": "OESZ", "GFT": "GFT", "CAT": "CAT", "AST": "AST", "ChST": "ChST", "JST": "JST", "WAT": "WAT", "VET": "VET", "EST": "EST", "TMT": "TMT", "HAST": "HAST", "LHST": "LHST", "ACWST": "ACWST", "AEST": "AEST", "HECU": "HECU", "WAST": "WAST", "WIT": "WIT", "HNOG": "HNOG", "ARST": "ARST", "MESZ": "MESZ", "PDT": "PDT", "HNCU": "HNCU", "HKST": "HKST", "NZST": "NZST", "LHDT": "LHDT", "CST": "CST", "HENOMX": "HENOMX", "PST": "PST", "AKST": "AKST", "CHAST": "CHAST", "GYT": "GYT", "WIB": "WIB", "MST": "MST", "ADT": "ADT", "BOT": "BOT", "ACDT": "ACDT", "GMT": "GMT", "HEEG": "HEEG", "HNPMX": "HNPMX", "WEZ": "WEZ", "WARST": "WARST", "NZDT": "NZDT", "ACST": "ACST", "MYT": "MYT", "HEPMX": "HEPMX"}, - } - } -  -@@ -252,85 +230,13 @@ func (ar *ar_SY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_SY' and handles both Whole and Real numbers based on 'v' - func (ar *ar_SY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_SY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_SY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SY' -@@ -338,62 +244,7 @@ func (ar *ar_SY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SY' -@@ -402,69 +253,7 @@ func (ar *ar_SY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_SY' -@@ -472,17 +261,6 @@ func (ar *ar_SY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +269,6 @@ func (ar *ar_SY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +277,6 @@ func (ar *ar_SY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +285,6 @@ func (ar *ar_SY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +293,6 @@ func (ar *ar_SY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +301,6 @@ func (ar *ar_SY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +309,6 @@ func (ar *ar_SY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +317,5 @@ func (ar *ar_SY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_TD/ar_TD.go b/ar_TD/ar_TD.go -index bec62d0..516a91e 100644 ---- a/ar_TD/ar_TD.go -+++ b/ar_TD/ar_TD.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_TD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_TD' locale - func New() locales.Translator { - return &ar_TD{ -- locale: "ar_TD", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"SAST": "توقيت جنوب أفريقيا", "JST": "توقيت اليابان الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "HAST": "توقيت هاواي ألوتيان الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "AWDT": "توقيت غرب أستراليا الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WIB": "توقيت غرب إندونيسيا", "MST": "MST", "HEOG": "توقيت غرب غرينلاند الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "WAT": "توقيت غرب أفريقيا الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "CHADT": "توقيت تشاتام الصيفي", "IST": "توقيت الهند", "∅∅∅": "توقيت الأمازون الصيفي", "BOT": "توقيت بوليفيا", "ECT": "توقيت الإكوادور", "MDT": "MDT", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "ARST": "توقيت الأرجنتين الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "TMT": "توقيت تركمانستان الرسمي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "WESZ": "توقيت غرب أوروبا الصيفي", "ART": "توقيت الأرجنتين الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "WAST": "توقيت غرب أفريقيا الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "OESZ": "توقيت شرق أوروبا الصيفي", "HECU": "توقيت كوبا الصيفي", "CLT": "توقيت شيلي الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "VET": "توقيت فنزويلا", "BT": "توقيت بوتان", "UYST": "توقيت أورغواي الصيفي", "LHST": "توقيت لورد هاو الرسمي", "GFT": "توقيت غايانا الفرنسية", "ChST": "توقيت تشامورو", "COST": "توقيت كولومبيا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AST": "التوقيت الرسمي الأطلسي", "MYT": "توقيت ماليزيا", "AEST": "توقيت شرق أستراليا الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "HNEG": "توقيت شرق غرينلاند الرسمي", "OEZ": "توقيت شرق أوروبا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AKDT": "توقيت ألاسكا الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "WIT": "توقيت شرق إندونيسيا", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HAT": "توقيت نيوفاوندلاند الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "COT": "توقيت كولومبيا الرسمي", "HADT": "توقيت هاواي ألوتيان الصيفي", "CAT": "توقيت وسط أفريقيا", "SGT": "توقيت سنغافورة", "HNCU": "توقيت كوبا الرسمي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "PST": "توقيت المحيط الهادي الرسمي", "WITA": "توقيت وسط إندونيسيا", "HEEG": "توقيت شرق غرينلاند الصيفي", "UYT": "توقيت أورغواي الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "CLST": "توقيت شيلي الصيفي", "TMST": "توقيت تركمانستان الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "GYT": "توقيت غيانا", "HNOG": "توقيت غرب غرينلاند الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "CHAST": "توقيت تشاتام الرسمي", "JDT": "توقيت اليابان الصيفي", "MESZ": "توقيت وسط أوروبا الصيفي", "EAT": "توقيت شرق أفريقيا", "SRT": "توقيت سورينام"}, -+ locale: "ar_TD", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HECU": "HECU", "WART": "WART", "CAT": "CAT", "WIB": "WIB", "AWDT": "AWDT", "ACWST": "ACWST", "CLT": "CLT", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "AKST": "AKST", "TMT": "TMT", "HAST": "HAST", "JST": "JST", "WAT": "WAT", "ACDT": "ACDT", "HEEG": "HEEG", "AWST": "AWST", "LHDT": "LHDT", "IST": "IST", "ECT": "ECT", "AST": "AST", "HADT": "HADT", "WITA": "WITA", "AEDT": "AEDT", "GFT": "GFT", "HNOG": "HNOG", "WESZ": "WESZ", "CST": "CST", "CDT": "CDT", "SRT": "SRT", "AEST": "AEST", "WEZ": "WEZ", "COST": "COST", "BOT": "BOT", "CHADT": "CHADT", "PDT": "PDT", "WIT": "WIT", "HKST": "HKST", "MST": "MST", "HNNOMX": "HNNOMX", "VET": "VET", "HNPMX": "HNPMX", "COT": "COT", "EDT": "EDT", "HNPM": "HNPM", "JDT": "JDT", "SGT": "SGT", "ACST": "ACST", "LHST": "LHST", "HNCU": "HNCU", "OESZ": "OESZ", "GYT": "GYT", "ChST": "ChST", "ARST": "ARST", "MEZ": "MEZ", "SAST": "SAST", "HKT": "HKT", "MDT": "MDT", "HNEG": "HNEG", "HAT": "HAT", "EST": "EST", "GMT": "GMT", "EAT": "EAT", "AKDT": "AKDT", "HEOG": "HEOG", "CLST": "CLST", "NZST": "NZST", "NZDT": "NZDT", "PST": "PST", "HENOMX": "HENOMX", "HEPM": "HEPM", "OEZ": "OEZ", "HNT": "HNT", "CHAST": "CHAST", "UYT": "UYT", "UYST": "UYST", "HEPMX": "HEPMX", "WAST": "WAST", "WARST": "WARST", "ART": "ART", "MESZ": "MESZ", "BT": "BT", "ADT": "ADT", "MYT": "MYT", "TMST": "TMST"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_TD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_TD) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_TD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_TD) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_TD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_TD) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_TD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_TD' and handles both Whole and Real numbers based on 'v' - func (ar *ar_TD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_TD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_TD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_TD' -@@ -338,62 +241,7 @@ func (ar *ar_TD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_TD' -@@ -402,69 +250,7 @@ func (ar *ar_TD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_TD' -@@ -472,17 +258,6 @@ func (ar *ar_TD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_TD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_TD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_TD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_TD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_TD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_TD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_TD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_TN/ar_TN.go b/ar_TN/ar_TN.go -index 7652b1b..6d33c62 100644 ---- a/ar_TN/ar_TN.go -+++ b/ar_TN/ar_TN.go -@@ -10,70 +10,50 @@ import ( - ) -  - type ar_TN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_TN' locale - func New() locales.Translator { - return &ar_TN{ -- locale: "ar_TN", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: ",", -- group: ".", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ج", "ف", "م", "أ", "م", "ج", "ج", "أ", "س", "أ", "ن", "د"}, -- monthsWide: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HEEG": "توقيت شرق غرينلاند الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "ART": "توقيت الأرجنتين الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "MEZ": "توقيت وسط أوروبا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "SGT": "توقيت سنغافورة", "WEZ": "توقيت غرب أوروبا الرسمي", "IST": "توقيت الهند", "TMT": "توقيت تركمانستان الرسمي", "EAT": "توقيت شرق أفريقيا", "GYT": "توقيت غيانا", "HAT": "توقيت نيوفاوندلاند الصيفي", "AEDT": "توقيت شرق أستراليا الصيفي", "BOT": "توقيت بوليفيا", "CAT": "توقيت وسط أفريقيا", "WIT": "توقيت شرق إندونيسيا", "AWDT": "توقيت غرب أستراليا الصيفي", "AST": "التوقيت الرسمي الأطلسي", "HNEG": "توقيت شرق غرينلاند الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "HNCU": "توقيت كوبا الرسمي", "MST": "MST", "MDT": "MDT", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "PST": "توقيت المحيط الهادي الرسمي", "CHAST": "توقيت تشاتام الرسمي", "∅∅∅": "توقيت الأمازون الصيفي", "AKDT": "توقيت ألاسكا الصيفي", "HADT": "توقيت هاواي ألوتيان الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "AEST": "توقيت شرق أستراليا الرسمي", "WITA": "توقيت وسط إندونيسيا", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "JST": "توقيت اليابان الرسمي", "COT": "توقيت كولومبيا الرسمي", "HECU": "توقيت كوبا الصيفي", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "WESZ": "توقيت غرب أوروبا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "NZST": "توقيت نيوزيلندا الرسمي", "TMST": "توقيت تركمانستان الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "WART": "توقيت غرب الأرجنتين الرسمي", "COST": "توقيت كولومبيا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HKT": "توقيت هونغ كونغ الرسمي", "JDT": "توقيت اليابان الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "GFT": "توقيت غايانا الفرنسية", "OEZ": "توقيت شرق أوروبا الرسمي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "UYST": "توقيت أورغواي الصيفي", "SAST": "توقيت جنوب أفريقيا", "CLST": "توقيت شيلي الصيفي", "ChST": "توقيت تشامورو", "WAT": "توقيت غرب أفريقيا الرسمي", "ADT": "التوقيت الصيفي الأطلسي", "NZDT": "توقيت نيوزيلندا الصيفي", "ACST": "توقيت وسط أستراليا الرسمي", "AKST": "التوقيت الرسمي لألاسكا", "CHADT": "توقيت تشاتام الصيفي", "CLT": "توقيت شيلي الرسمي", "HAST": "توقيت هاواي ألوتيان الرسمي", "VET": "توقيت فنزويلا", "SRT": "توقيت سورينام", "MESZ": "توقيت وسط أوروبا الصيفي", "UYT": "توقيت أورغواي الرسمي", "HNOG": "توقيت غرب غرينلاند الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "ECT": "توقيت الإكوادور", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "MYT": "توقيت ماليزيا", "WIB": "توقيت غرب إندونيسيا", "BT": "توقيت بوتان", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "HEPM": "توقيت سانت بيير وميكولون الصيفي"}, -+ locale: "ar_TN", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -+ monthsNarrow: []string{"", "ج", "ف", "م", "أ", "م", "ج", "ج", "أ", "س", "أ", "ن", "د"}, -+ monthsWide: []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -+ timezones: map[string]string{"HAST": "HAST", "AWDT": "AWDT", "CHADT": "CHADT", "UYT": "UYT", "EAT": "EAT", "UYST": "UYST", "HECU": "HECU", "SGT": "SGT", "MDT": "MDT", "SAST": "SAST", "CLT": "CLT", "ART": "ART", "ARST": "ARST", "ACST": "ACST", "WIT": "WIT", "GYT": "GYT", "IST": "IST", "HNCU": "HNCU", "WART": "WART", "EDT": "EDT", "HNEG": "HNEG", "PDT": "PDT", "ACWDT": "ACWDT", "COT": "COT", "HKST": "HKST", "WITA": "WITA", "CST": "CST", "CHAST": "CHAST", "GFT": "GFT", "HKT": "HKT", "MST": "MST", "HENOMX": "HENOMX", "LHST": "LHST", "WESZ": "WESZ", "COST": "COST", "TMST": "TMST", "NZDT": "NZDT", "MESZ": "MESZ", "WEZ": "WEZ", "OESZ": "OESZ", "WAT": "WAT", "HEPM": "HEPM", "HEPMX": "HEPMX", "AKDT": "AKDT", "NZST": "NZST", "ChST": "ChST", "WAST": "WAST", "HAT": "HAT", "CLST": "CLST", "WIB": "WIB", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "MYT": "MYT", "JST": "JST", "AEDT": "AEDT", "VET": "VET", "AWST": "AWST", "AKST": "AKST", "WARST": "WARST", "AST": "AST", "ADT": "ADT", "BOT": "BOT", "AEST": "AEST", "HNPMX": "HNPMX", "HEOG": "HEOG", "EST": "EST", "ECT": "ECT", "HEEG": "HEEG", "HNPM": "HNPM", "JDT": "JDT", "ACWST": "ACWST", "HNOG": "HNOG", "TMT": "TMT", "SRT": "SRT", "LHDT": "LHDT", "PST": "PST", "BT": "BT", "HNT": "HNT", "CAT": "CAT", "CDT": "CDT", "GMT": "GMT", "HADT": "HADT", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "OEZ": "OEZ"}, - } - } -  -@@ -252,79 +232,13 @@ func (ar *ar_TN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_TN' and handles both Whole and Real numbers based on 'v' - func (ar *ar_TN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_TN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_TN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 10 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_TN' -@@ -332,58 +246,7 @@ func (ar *ar_TN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_TN' -@@ -392,65 +255,7 @@ func (ar *ar_TN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ar.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ar.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_TN' -@@ -458,17 +263,6 @@ func (ar *ar_TN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,27 +271,6 @@ func (ar *ar_TN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,17 +279,6 @@ func (ar *ar_TN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -525,19 +287,6 @@ func (ar *ar_TN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -546,28 +295,6 @@ func (ar *ar_TN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -576,35 +303,6 @@ func (ar *ar_TN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -613,40 +311,6 @@ func (ar *ar_TN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -655,44 +319,5 @@ func (ar *ar_TN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ar_YE/ar_YE.go b/ar_YE/ar_YE.go -index 6c202bd..8b712b6 100644 ---- a/ar_YE/ar_YE.go -+++ b/ar_YE/ar_YE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ar_YE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ar_YE' locale - func New() locales.Translator { - return &ar_YE{ -- locale: "ar_YE", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -- decimal: "٫", -- group: "٬", -- minus: "؜-", -- percent: "٪؜", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- monthsNarrow: []string{"", "ي", "ف", "م", "أ", "و", "ن", "ل", "غ", "س", "ك", "ب", "د"}, -- monthsWide: []string{"", "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"}, -- daysAbbreviated: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysNarrow: []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"}, -- daysShort: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- daysWide: []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"}, -- periodsAbbreviated: []string{"ص", "م"}, -- periodsNarrow: []string{"ص", "م"}, -- periodsWide: []string{"ص", "م"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"ChST": "توقيت تشامورو", "MST": "MST", "AKST": "التوقيت الرسمي لألاسكا", "HAST": "توقيت هاواي ألوتيان الرسمي", "SRT": "توقيت سورينام", "CHAST": "توقيت تشاتام الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "CLST": "توقيت شيلي الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "VET": "توقيت فنزويلا", "AWDT": "توقيت غرب أستراليا الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "EAT": "توقيت شرق أفريقيا", "COT": "توقيت كولومبيا الرسمي", "WIB": "توقيت غرب إندونيسيا", "HNT": "توقيت نيوفاوندلاند الرسمي", "CAT": "توقيت وسط أفريقيا", "WART": "توقيت غرب الأرجنتين الرسمي", "∅∅∅": "توقيت أزورس الصيفي", "ART": "توقيت الأرجنتين الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "MYT": "توقيت ماليزيا", "WESZ": "توقيت غرب أوروبا الصيفي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "SAST": "توقيت جنوب أفريقيا", "TMT": "توقيت تركمانستان الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "IST": "توقيت الهند", "HADT": "توقيت هاواي ألوتيان الصيفي", "WIT": "توقيت شرق إندونيسيا", "OESZ": "توقيت شرق أوروبا الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "ADT": "التوقيت الصيفي الأطلسي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "GFT": "توقيت غايانا الفرنسية", "OEZ": "توقيت شرق أوروبا الرسمي", "JDT": "توقيت اليابان الصيفي", "MDT": "MDT", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "AST": "التوقيت الرسمي الأطلسي", "UYST": "توقيت أورغواي الصيفي", "ARST": "توقيت الأرجنتين الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "HKST": "توقيت هونغ كونغ الصيفي", "CLT": "توقيت شيلي الرسمي", "TMST": "توقيت تركمانستان الصيفي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "GMT": "توقيت غرينتش", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "AKDT": "توقيت ألاسكا الصيفي", "BT": "توقيت بوتان", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "JST": "توقيت اليابان الرسمي", "SGT": "توقيت سنغافورة", "WEZ": "توقيت غرب أوروبا الرسمي", "CHADT": "توقيت تشاتام الصيفي", "MEZ": "توقيت وسط أوروبا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "GYT": "توقيت غيانا", "WITA": "توقيت وسط إندونيسيا", "NZDT": "توقيت نيوزيلندا الصيفي", "BOT": "توقيت بوليفيا", "ECT": "توقيت الإكوادور", "COST": "توقيت كولومبيا الصيفي", "HECU": "توقيت كوبا الصيفي", "LHST": "توقيت لورد هاو الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "WAT": "توقيت غرب أفريقيا الرسمي", "ACST": "توقيت وسط أستراليا الرسمي", "HNCU": "توقيت كوبا الرسمي", "UYT": "توقيت أورغواي الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "PST": "توقيت المحيط الهادي الرسمي", "AEST": "توقيت شرق أستراليا الرسمي"}, -+ locale: "ar_YE", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{1, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPM": "HNPM", "HNPMX": "HNPMX", "WAST": "WAST", "OEZ": "OEZ", "WARST": "WARST", "ChST": "ChST", "AWST": "AWST", "WESZ": "WESZ", "HKST": "HKST", "ARST": "ARST", "SRT": "SRT", "ACDT": "ACDT", "HEPM": "HEPM", "CAT": "CAT", "WIB": "WIB", "BOT": "BOT", "CHADT": "CHADT", "UYT": "UYT", "UYST": "UYST", "HKT": "HKT", "CDT": "CDT", "AEST": "AEST", "AKST": "AKST", "HEOG": "HEOG", "ART": "ART", "MDT": "MDT", "HENOMX": "HENOMX", "SGT": "SGT", "HECU": "HECU", "AKDT": "AKDT", "EST": "EST", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "COT": "COT", "NZDT": "NZDT", "HAST": "HAST", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "AEDT": "AEDT", "HNCU": "HNCU", "MST": "MST", "LHDT": "LHDT", "WEZ": "WEZ", "HAT": "HAT", "ACST": "ACST", "JST": "JST", "BT": "BT", "CHAST": "CHAST", "OESZ": "OESZ", "ADT": "ADT", "MYT": "MYT", "IST": "IST", "HEPMX": "HEPMX", "WART": "WART", "WIT": "WIT", "CLST": "CLST", "AST": "AST", "HEEG": "HEEG", "TMT": "TMT", "AWDT": "AWDT", "WAT": "WAT", "HNT": "HNT", "SAST": "SAST", "CLT": "CLT", "GMT": "GMT", "EDT": "EDT", "MEZ": "MEZ", "MESZ": "MESZ", "HNEG": "HNEG", "JDT": "JDT", "PST": "PST", "GFT": "GFT", "COST": "COST", "TMST": "TMST", "CST": "CST", "NZST": "NZST", "EAT": "EAT", "GYT": "GYT", "HNOG": "HNOG", "WITA": "WITA", "HADT": "HADT", "LHST": "LHST", "PDT": "PDT", "VET": "VET", "ECT": "ECT"}, - } - } -  -@@ -186,7 +161,7 @@ func (ar *ar_YE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ar *ar_YE) MonthsAbbreviated() []string { -- return ar.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -196,7 +171,7 @@ func (ar *ar_YE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ar *ar_YE) MonthsNarrow() []string { -- return ar.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -206,7 +181,7 @@ func (ar *ar_YE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ar *ar_YE) MonthsWide() []string { -- return ar.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -252,85 +227,13 @@ func (ar *ar_YE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_YE' and handles both Whole and Real numbers based on 'v' - func (ar *ar_YE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_YE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ar *ar_YE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ar.percentSuffix...) -- -- b = append(b, ar.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_YE' -@@ -338,62 +241,7 @@ func (ar *ar_YE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ar.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_YE' -@@ -402,69 +250,7 @@ func (ar *ar_YE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ar.currencies[currency] -- l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ar.decimal) - 1; j >= 0; j-- { -- b = append(b, ar.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ar.group) - 1; j >= 0; j-- { -- b = append(b, ar.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ar.minus) - 1; j >= 0; j-- { -- b = append(b, ar.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ar.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ar.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ar.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ar_YE' -@@ -472,17 +258,6 @@ func (ar *ar_YE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,27 +266,6 @@ func (ar *ar_YE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -520,17 +274,6 @@ func (ar *ar_YE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -539,19 +282,6 @@ func (ar *ar_YE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ar.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ar.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -560,28 +290,6 @@ func (ar *ar_YE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,35 +298,6 @@ func (ar *ar_YE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -627,40 +306,6 @@ func (ar *ar_YE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -669,44 +314,5 @@ func (ar *ar_YE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ar.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ar.periodsAbbreviated[0]...) -- } else { -- b = append(b, ar.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ar.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/as/as.go b/as/as.go -index 13818e9..1ff0c02 100644 ---- a/as/as.go -+++ b/as/as.go -@@ -58,7 +58,7 @@ func New() locales.Translator { - daysWide: []string{"দেওবাৰ", "সোমবাৰ", "মঙ্গলবাৰ", "বুধবাৰ", "বৃহষ্পতিবাৰ", "শুক্ৰবাৰ", "শনিবাৰ"}, - periodsAbbreviated: []string{"পূৰ্বাহ্ণ", "অপৰাহ্ণ"}, - periodsWide: []string{"পূৰ্বাহ্ণ", "অপৰাহ্ণ"}, -- timezones: map[string]string{"AKDT": "AKDT", "UYST": "UYST", "WIT": "WIT", "AWST": "AWST", "BOT": "BOT", "WAT": "WAT", "HNOG": "HNOG", "HEPM": "HEPM", "IST": "ভাৰতীয় সময়", "ChST": "ChST", "TMT": "TMT", "WAST": "WAST", "HNNOMX": "HNNOMX", "CDT": "CDT", "JDT": "JDT", "CAT": "CAT", "HAST": "HAST", "AWDT": "AWDT", "CHAST": "CHAST", "COST": "COST", "HNCU": "HNCU", "PST": "PST", "ACWST": "ACWST", "MEZ": "MEZ", "WART": "WART", "EST": "EST", "WESZ": "WESZ", "AEDT": "AEDT", "SAST": "SAST", "CLST": "CLST", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "BT": "BT", "ACWDT": "ACWDT", "ART": "ART", "HKT": "HKT", "HEEG": "HEEG", "HENOMX": "HENOMX", "CST": "CST", "MYT": "MYT", "HEOG": "HEOG", "COT": "COT", "MST": "MST", "VET": "VET", "AEST": "AEST", "JST": "JST", "GMT": "GMT", "UYT": "UYT", "HAT": "HAT", "NZST": "NZST", "ACST": "ACST", "ECT": "ECT", "MDT": "MDT", "AKST": "AKST", "WIB": "WIB", "LHST": "LHST", "CLT": "CLT", "HEPMX": "HEPMX", "AST": "AST", "ARST": "ARST", "HKST": "HKST", "ADT": "ADT", "HADT": "HADT", "WITA": "WITA", "MESZ": "MESZ", "EAT": "EAT", "WARST": "WARST", "WEZ": "WEZ", "CHADT": "CHADT", "GFT": "GFT", "ACDT": "ACDT", "OEZ": "OEZ", "HECU": "HECU", "GYT": "GYT", "SRT": "SRT", "HNT": "HNT", "NZDT": "NZDT", "SGT": "SGT", "EDT": "EDT", "PDT": "PDT", "HNPM": "HNPM", "LHDT": "LHDT", "HNEG": "HNEG", "TMST": "TMST"}, -+ timezones: map[string]string{"CHAST": "CHAST", "AEST": "AEST", "HEPMX": "HEPMX", "HNT": "HNT", "SAST": "SAST", "HAST": "HAST", "MEZ": "MEZ", "HEPM": "HEPM", "CLT": "CLT", "WIT": "WIT", "HEOG": "HEOG", "TMT": "TMT", "WITA": "WITA", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "HKT": "HKT", "JDT": "JDT", "IST": "ভাৰতীয় সময়", "OESZ": "OESZ", "GYT": "GYT", "COT": "COT", "CST": "CST", "BT": "BT", "OEZ": "OEZ", "HECU": "HECU", "WARST": "WARST", "MST": "MST", "NZDT": "NZDT", "JST": "JST", "GMT": "GMT", "HNCU": "HNCU", "AKDT": "AKDT", "HENOMX": "HENOMX", "ACWST": "ACWST", "WAT": "WAT", "ECT": "ECT", "WIB": "WIB", "ARST": "ARST", "WART": "WART", "COST": "COST", "CAT": "CAT", "AST": "AST", "PST": "PST", "GFT": "GFT", "HKST": "HKST", "ART": "ART", "HNOG": "HNOG", "EDT": "EDT", "MYT": "MYT", "CHADT": "CHADT", "AKST": "AKST", "CLST": "CLST", "SRT": "SRT", "HNEG": "HNEG", "AWDT": "AWDT", "WEZ": "WEZ", "LHST": "LHST", "UYST": "UYST", "∅∅∅": "∅∅∅", "VET": "VET", "WAST": "WAST", "MDT": "MDT", "NZST": "NZST", "BOT": "BOT", "HADT": "HADT", "AEDT": "AEDT", "WESZ": "WESZ", "HAT": "HAT", "CDT": "CDT", "ChST": "ChST", "EAT": "EAT", "PDT": "PDT", "AWST": "AWST", "LHDT": "LHDT", "HNPM": "HNPM", "EST": "EST", "TMST": "TMST", "ADT": "ADT", "MESZ": "MESZ", "ACDT": "ACDT", "SGT": "SGT", "ACST": "ACST", "UYT": "UYT", "ACWDT": "ACWDT"}, - } - } -  -diff --git a/as_IN/as_IN.go b/as_IN/as_IN.go -index 87b786a..66301c5 100644 ---- a/as_IN/as_IN.go -+++ b/as_IN/as_IN.go -@@ -10,55 +10,45 @@ import ( - ) -  - type as_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'as_IN' locale - func New() locales.Translator { - return &as_IN{ -- locale: "as_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsRange: nil, -- timeSeparator: ".", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "জানু", "ফেব্ৰু", "মাৰ্চ", "এপ্ৰিল", "মে", "জুন", "জুলাই", "আগ", "সেপ্ট", "অক্টো", "নভে", "ডিসে"}, -- monthsWide: []string{"", "জানুৱাৰী", "ফেব্ৰুৱাৰী", "মাৰ্চ", "এপ্ৰিল", "মে", "জুন", "জুলাই", "আগষ্ট", "ছেপ্তেম্বৰ", "অক্টোবৰ", "নৱেম্বৰ", "ডিচেম্বৰ"}, -- daysAbbreviated: []string{"ৰবি", "সোম", "মঙ্গল", "বুধ", "বৃহষ্পতি", "শুক্ৰ", "শনি"}, -- daysWide: []string{"দেওবাৰ", "সোমবাৰ", "মঙ্গলবাৰ", "বুধবাৰ", "বৃহষ্পতিবাৰ", "শুক্ৰবাৰ", "শনিবাৰ"}, -- periodsAbbreviated: []string{"পূৰ্বাহ্ণ", "অপৰাহ্ণ"}, -- periodsWide: []string{"পূৰ্বাহ্ণ", "অপৰাহ্ণ"}, -- timezones: map[string]string{"HKST": "HKST", "WITA": "WITA", "JST": "JST", "EDT": "EDT", "AKST": "AKST", "CST": "CST", "CDT": "CDT", "AWDT": "AWDT", "MYT": "MYT", "HNPMX": "HNPMX", "UYT": "UYT", "CHAST": "CHAST", "ARST": "ARST", "LHST": "LHST", "IST": "ভাৰতীয় সময়", "HNEG": "HNEG", "SGT": "SGT", "UYST": "UYST", "WIT": "WIT", "NZST": "NZST", "CLT": "CLT", "GFT": "GFT", "TMT": "TMT", "PST": "PST", "HKT": "HKT", "BOT": "BOT", "COT": "COT", "HENOMX": "HENOMX", "HECU": "HECU", "WIB": "WIB", "HAT": "HAT", "MEZ": "MEZ", "MESZ": "MESZ", "LHDT": "LHDT", "WAST": "WAST", "GMT": "GMT", "ADT": "ADT", "AEST": "AEST", "SAST": "SAST", "GYT": "GYT", "WESZ": "WESZ", "WEZ": "WEZ", "ACWST": "ACWST", "ACWDT": "ACWDT", "ChST": "ChST", "EAT": "EAT", "SRT": "SRT", "CHADT": "CHADT", "HEPMX": "HEPMX", "VET": "VET", "HEOG": "HEOG", "AWST": "AWST", "ACDT": "ACDT", "WAT": "WAT", "ECT": "ECT", "HNNOMX": "HNNOMX", "EST": "EST", "HAST": "HAST", "AST": "AST", "AKDT": "AKDT", "ART": "ART", "∅∅∅": "∅∅∅", "ACST": "ACST", "WART": "WART", "BT": "BT", "HEPM": "HEPM", "JDT": "JDT", "HEEG": "HEEG", "WARST": "WARST", "HNPM": "HNPM", "NZDT": "NZDT", "OEZ": "OEZ", "HADT": "HADT", "CLST": "CLST", "CAT": "CAT", "OESZ": "OESZ", "MST": "MST", "HNT": "HNT", "HNOG": "HNOG", "COST": "COST", "PDT": "PDT", "TMST": "TMST", "HNCU": "HNCU", "MDT": "MDT", "AEDT": "AEDT"}, -+ locale: "as_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "HNCU": "HNCU", "HNT": "HNT", "COST": "COST", "WITA": "WITA", "GMT": "GMT", "ACDT": "ACDT", "HEEG": "HEEG", "ACWDT": "ACWDT", "CAT": "CAT", "HNEG": "HNEG", "WAST": "WAST", "AST": "AST", "BOT": "BOT", "MESZ": "MESZ", "ECT": "ECT", "ARST": "ARST", "HAST": "HAST", "AWDT": "AWDT", "WART": "WART", "EST": "EST", "PDT": "PDT", "WESZ": "WESZ", "OEZ": "OEZ", "MEZ": "MEZ", "HENOMX": "HENOMX", "HNPM": "HNPM", "UYT": "UYT", "IST": "IST", "WIB": "WIB", "ART": "ART", "HEOG": "HEOG", "HKST": "HKST", "CLT": "CLT", "AWST": "AWST", "MYT": "MYT", "BT": "BT", "AKST": "AKST", "SAST": "SAST", "CST": "CST", "NZST": "NZST", "LHST": "LHST", "ADT": "ADT", "UYST": "UYST", "∅∅∅": "∅∅∅", "GYT": "GYT", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "MDT": "MDT", "ChST": "ChST", "ACST": "ACST", "JST": "JST", "PST": "PST", "HECU": "HECU", "GFT": "GFT", "TMT": "TMT", "TMST": "TMST", "CDT": "CDT", "LHDT": "LHDT", "CHADT": "CHADT", "WAT": "WAT", "WIT": "WIT", "HNOG": "HNOG", "SRT": "SRT", "NZDT": "NZDT", "JDT": "JDT", "HEPMX": "HEPMX", "AKDT": "AKDT", "WARST": "WARST", "COT": "COT", "ACWST": "ACWST", "CHAST": "CHAST", "HNPMX": "HNPMX", "CLST": "CLST", "EAT": "EAT", "HEPM": "HEPM", "SGT": "SGT", "VET": "VET", "MST": "MST", "HKT": "HKT", "AEST": "AEST", "AEDT": "AEDT", "OESZ": "OESZ", "HAT": "HAT", "EDT": "EDT"}, - } - } -  -@@ -125,7 +115,7 @@ func (as *as_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (as *as_IN) MonthsAbbreviated() []string { -- return as.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +135,7 @@ func (as *as_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (as *as_IN) MonthsWide() []string { -- return as.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,82 +181,13 @@ func (as *as_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'as_IN' and handles both Whole and Real numbers based on 'v' - func (as *as_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, as.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, as.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, as.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'as_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (as *as_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, as.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, as.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, as.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'as_IN' -@@ -274,69 +195,7 @@ func (as *as_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := as.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, as.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, as.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(as.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, as.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, as.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, as.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'as_IN' -@@ -345,81 +204,7 @@ func (as *as_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := as.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, as.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, as.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(as.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, as.currencyNegativePrefix[j]) -- } -- -- b = append(b, as.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(as.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, as.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, as.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'as_IN' -@@ -427,17 +212,6 @@ func (as *as_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,27 +220,6 @@ func (as *as_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,17 +228,6 @@ func (as *as_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, as.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -494,19 +236,6 @@ func (as *as_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, as.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, as.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -515,28 +244,6 @@ func (as *as_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, as.periodsAbbreviated[0]...) -- } else { -- b = append(b, as.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -545,35 +252,6 @@ func (as *as_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, as.periodsAbbreviated[0]...) -- } else { -- b = append(b, as.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -582,40 +260,6 @@ func (as *as_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, as.periodsAbbreviated[0]...) -- } else { -- b = append(b, as.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -624,44 +268,5 @@ func (as *as_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, as.periodsAbbreviated[0]...) -- } else { -- b = append(b, as.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := as.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/asa/asa.go b/asa/asa.go -index f852c82..fc419b3 100644 ---- a/asa/asa.go -+++ b/asa/asa.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KM", "BM"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla yakwe Yethu", "Baada yakwe Yethu"}, -- timezones: map[string]string{"AWDT": "AWDT", "LHST": "LHST", "TMT": "TMT", "HNPMX": "HNPMX", "BT": "BT", "ACST": "ACST", "ECT": "ECT", "EAT": "EAT", "PST": "PST", "WESZ": "WESZ", "HEEG": "HEEG", "MYT": "MYT", "WIB": "WIB", "HEOG": "HEOG", "ACWDT": "ACWDT", "NZDT": "NZDT", "CHADT": "CHADT", "TMST": "TMST", "HECU": "HECU", "JST": "JST", "ACDT": "ACDT", "WAT": "WAT", "ACWST": "ACWST", "EST": "EST", "HKT": "HKT", "CLST": "CLST", "GFT": "GFT", "WAST": "WAST", "COST": "COST", "HENOMX": "HENOMX", "CST": "CST", "ART": "ART", "HKST": "HKST", "WITA": "WITA", "JDT": "JDT", "ChST": "ChST", "HNEG": "HNEG", "GMT": "GMT", "ARST": "ARST", "MEZ": "MEZ", "ADT": "ADT", "WIT": "WIT", "SRT": "SRT", "WEZ": "WEZ", "COT": "COT", "PDT": "PDT", "HNOG": "HNOG", "HAT": "HAT", "HNPM": "HNPM", "OESZ": "OESZ", "WART": "WART", "HNNOMX": "HNNOMX", "HADT": "HADT", "VET": "VET", "MESZ": "MESZ", "NZST": "NZST", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "UYST": "UYST", "HEPM": "HEPM", "CHAST": "CHAST", "IST": "IST", "CAT": "CAT", "MST": "MST", "AEDT": "AEDT", "BOT": "BOT", "MDT": "MDT", "AST": "AST", "GYT": "GYT", "AKST": "AKST", "WARST": "WARST", "SGT": "SGT", "HAST": "HAST", "HNT": "HNT", "LHDT": "LHDT", "OEZ": "OEZ", "EDT": "EDT", "HEPMX": "HEPMX", "AKDT": "AKDT", "CDT": "CDT", "AEST": "AEST", "AWST": "AWST", "SAST": "SAST", "CLT": "CLT", "UYT": "UYT"}, -+ timezones: map[string]string{"PST": "PST", "AKDT": "AKDT", "CST": "CST", "MDT": "MDT", "ARST": "ARST", "HEPM": "HEPM", "HEEG": "HEEG", "WIT": "WIT", "ART": "ART", "EAT": "EAT", "AEDT": "AEDT", "UYT": "UYT", "HNPMX": "HNPMX", "GFT": "GFT", "AST": "AST", "PDT": "PDT", "MYT": "MYT", "WARST": "WARST", "COST": "COST", "TMT": "TMT", "CLST": "CLST", "ADT": "ADT", "HADT": "HADT", "ACDT": "ACDT", "LHDT": "LHDT", "ACWDT": "ACWDT", "OESZ": "OESZ", "GMT": "GMT", "MEZ": "MEZ", "WEZ": "WEZ", "HKT": "HKT", "LHST": "LHST", "BT": "BT", "UYST": "UYST", "WAT": "WAT", "HAT": "HAT", "SAST": "SAST", "MST": "MST", "ACST": "ACST", "HNCU": "HNCU", "OEZ": "OEZ", "WART": "WART", "SGT": "SGT", "WESZ": "WESZ", "AKST": "AKST", "HNT": "HNT", "WITA": "WITA", "MESZ": "MESZ", "CHADT": "CHADT", "WAST": "WAST", "HKST": "HKST", "HNPM": "HNPM", "AWDT": "AWDT", "AEST": "AEST", "VET": "VET", "EST": "EST", "HNEG": "HNEG", "HECU": "HECU", "NZDT": "NZDT", "JST": "JST", "JDT": "JDT", "∅∅∅": "∅∅∅", "IST": "IST", "CHAST": "CHAST", "COT": "COT", "HEOG": "HEOG", "TMST": "TMST", "HNNOMX": "HNNOMX", "NZST": "NZST", "ECT": "ECT", "ChST": "ChST", "SRT": "SRT", "CAT": "CAT", "GYT": "GYT", "HNOG": "HNOG", "CDT": "CDT", "HAST": "HAST", "ACWST": "ACWST", "CLT": "CLT", "WIB": "WIB", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "EDT": "EDT", "BOT": "BOT", "AWST": "AWST"}, - } - } -  -diff --git a/asa_TZ/asa_TZ.go b/asa_TZ/asa_TZ.go -index 6efae2d..706de5e 100644 ---- a/asa_TZ/asa_TZ.go -+++ b/asa_TZ/asa_TZ.go -@@ -10,60 +10,45 @@ import ( - ) -  - type asa_TZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'asa_TZ' locale - func New() locales.Translator { - return &asa_TZ{ -- locale: "asa_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Ijm", "Jmo"}, -- daysNarrow: []string{"J", "J", "J", "J", "A", "I", "J"}, -- daysWide: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"icheheavo", "ichamthi"}, -- periodsWide: []string{"icheheavo", "ichamthi"}, -- erasAbbreviated: []string{"KM", "BM"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla yakwe Yethu", "Baada yakwe Yethu"}, -- timezones: map[string]string{"SRT": "SRT", "WEZ": "WEZ", "ECT": "ECT", "OEZ": "OEZ", "∅∅∅": "∅∅∅", "CST": "CST", "WIB": "WIB", "HNOG": "HNOG", "WITA": "WITA", "JST": "JST", "COST": "COST", "HNEG": "HNEG", "EST": "EST", "ART": "ART", "HAT": "HAT", "AEDT": "AEDT", "MEZ": "MEZ", "CHADT": "CHADT", "CLT": "CLT", "ACST": "ACST", "CAT": "CAT", "WAST": "WAST", "VET": "VET", "ARST": "ARST", "EAT": "EAT", "HNCU": "HNCU", "ADT": "ADT", "BOT": "BOT", "UYST": "UYST", "ACWST": "ACWST", "AWST": "AWST", "LHDT": "LHDT", "TMST": "TMST", "WART": "WART", "HENOMX": "HENOMX", "HAST": "HAST", "CLST": "CLST", "HNNOMX": "HNNOMX", "GMT": "GMT", "HEPMX": "HEPMX", "GYT": "GYT", "WESZ": "WESZ", "HKT": "HKT", "HNPMX": "HNPMX", "MYT": "MYT", "HADT": "HADT", "ACWDT": "ACWDT", "HEEG": "HEEG", "OESZ": "OESZ", "AST": "AST", "AKST": "AKST", "AWDT": "AWDT", "HEPM": "HEPM", "MESZ": "MESZ", "UYT": "UYT", "SAST": "SAST", "ACDT": "ACDT", "AKDT": "AKDT", "WIT": "WIT", "HEOG": "HEOG", "HNPM": "HNPM", "LHST": "LHST", "NZST": "NZST", "EDT": "EDT", "MDT": "MDT", "HKST": "HKST", "CHAST": "CHAST", "JDT": "JDT", "ChST": "ChST", "CDT": "CDT", "PST": "PST", "HNT": "HNT", "GFT": "GFT", "WARST": "WARST", "COT": "COT", "SGT": "SGT", "HECU": "HECU", "MST": "MST", "PDT": "PDT", "IST": "IST", "BT": "BT", "AEST": "AEST", "NZDT": "NZDT", "TMT": "TMT", "WAT": "WAT"}, -+ locale: "asa_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MESZ": "MESZ", "TMST": "TMST", "WIB": "WIB", "CDT": "CDT", "NZST": "NZST", "MYT": "MYT", "HNPM": "HNPM", "AWST": "AWST", "OESZ": "OESZ", "SAST": "SAST", "WIT": "WIT", "COST": "COST", "ART": "ART", "HNEG": "HNEG", "CHADT": "CHADT", "HNCU": "HNCU", "HNPMX": "HNPMX", "WESZ": "WESZ", "VET": "VET", "EDT": "EDT", "BOT": "BOT", "ACDT": "ACDT", "AEST": "AEST", "AEDT": "AEDT", "PST": "PST", "LHST": "LHST", "LHDT": "LHDT", "ARST": "ARST", "GMT": "GMT", "HEPM": "HEPM", "COT": "COT", "CLST": "CLST", "AWDT": "AWDT", "NZDT": "NZDT", "ChST": "ChST", "GYT": "GYT", "CAT": "CAT", "CLT": "CLT", "HNNOMX": "HNNOMX", "BT": "BT", "HECU": "HECU", "HNT": "HNT", "HNOG": "HNOG", "AST": "AST", "MST": "MST", "EAT": "EAT", "JST": "JST", "AKDT": "AKDT", "HKST": "HKST", "ECT": "ECT", "ACWDT": "ACWDT", "UYT": "UYT", "WAST": "WAST", "OEZ": "OEZ", "WARST": "WARST", "SRT": "SRT", "∅∅∅": "∅∅∅", "CST": "CST", "HAST": "HAST", "IST": "IST", "HEPMX": "HEPMX", "HAT": "HAT", "HKT": "HKT", "CHAST": "CHAST", "UYST": "UYST", "HEEG": "HEEG", "HENOMX": "HENOMX", "ACST": "ACST", "JDT": "JDT", "ACWST": "ACWST", "EST": "EST", "MDT": "MDT", "MEZ": "MEZ", "SGT": "SGT", "WAT": "WAT", "AKST": "AKST", "HADT": "HADT", "WEZ": "WEZ", "WART": "WART", "ADT": "ADT", "PDT": "PDT", "GFT": "GFT", "HEOG": "HEOG", "TMT": "TMT", "WITA": "WITA"}, - } - } -  -@@ -116,7 +101,7 @@ func (asa *asa_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (asa *asa_TZ) MonthsAbbreviated() []string { -- return asa.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (asa *asa_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (asa *asa_TZ) MonthsNarrow() []string { -- return asa.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (asa *asa_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (asa *asa_TZ) MonthsWide() []string { -- return asa.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (asa *asa_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := asa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, asa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, asa.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, asa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, asa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, asa.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'asa_TZ' -@@ -254,63 +190,7 @@ func (asa *asa_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := asa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, asa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, asa.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, asa.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, asa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, asa.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, asa.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'asa_TZ' -@@ -318,27 +198,6 @@ func (asa *asa_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -347,17 +206,6 @@ func (asa *asa_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, asa.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -366,17 +214,6 @@ func (asa *asa_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, asa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -385,19 +222,6 @@ func (asa *asa_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, asa.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, asa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -406,19 +230,6 @@ func (asa *asa_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -427,26 +238,6 @@ func (asa *asa_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -455,30 +246,6 @@ func (asa *asa_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -487,34 +254,5 @@ func (asa *asa_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, asa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := asa.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ast/ast.go b/ast/ast.go -index 90e5817..e5ddbef 100644 ---- a/ast/ast.go -+++ b/ast/ast.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"e.C.", "d.C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"enantes de Cristu", "después de Cristu"}, -- timezones: map[string]string{"HKST": "Hora braniega de Ḥong Kong", "NZDT": "Hora braniega de Nueva Zelanda", "IST": "Hora estándar de la India", "HNCU": "Hora estándar de Cuba", "AKST": "Hora estándar d’Alaska", "WIB": "Hora d’Indonesia del oeste", "ARST": "Hora braniega d’Arxentina", "HKT": "Hora estándar de Ḥong Kong", "BOT": "Hora de Bolivia", "WAT": "Hora estándar d’África del oeste", "HEOG": "Hora braniega de Groenlandia occidental", "AWST": "Hora estándar d’Australia del oeste", "HADT": "Hora braniega de Hawaii-Aleutianes", "JDT": "Hora braniega de Xapón", "OESZ": "Hora braniega d’Europa del Este", "ECT": "Hora d’Ecuador", "NZST": "Hora estándar de Nueva Zelanda", "CLT": "Hora estándar de Chile", "CLST": "Hora braniega de Chile", "WARST": "Hora braniega occidental d’Arxentina", "CDT": "Hora braniega central norteamericana", "UYST": "Hora braniega del Uruguái", "WIT": "Hora d’Indonesia del este", "PST": "Hora estándar del Pacíficu norteamericanu", "ACDT": "Hora braniega d’Australia central", "CAT": "Hora d’África central", "HENOMX": "Hora braniega del noroeste de Méxicu", "CST": "Hora estándar central norteamericana", "GYT": "Hora de La Guyana", "HNOG": "Hora estándar de Groenlandia occidental", "WESZ": "Hora braniega d’Europa Occidental", "HEPMX": "Hora braniega del Pacíficu de Méxicu", "AEDT": "Hora braniega d’Australia del este", "TMT": "Hora estándar del Turkmenistán", "LHDT": "Hora braniega de Lord Howe", "HNEG": "Hora estándar de Groenlandia oriental", "GFT": "Hora de La Guyana Francesa", "HNNOMX": "Hora estándar del noroeste de Méxicu", "EST": "Hora estándar del este norteamericanu", "HAT": "Hora braniega de Newfoundland", "WEZ": "Hora estándar d’Europa Occidental", "MESZ": "Hora braniega d’Europa Central", "AKDT": "Hora braniega d’Alaska", "VET": "Hora de Venezuela", "BT": "Hora de Bután", "CHADT": "Hora braniega de Chatham", "MST": "Hora estándar de Macáu", "AST": "Hora estándar del Atlánticu", "HNT": "Hora estándar de Newfoundland", "COT": "Hora estándar de Colombia", "HECU": "Hora braniega de Cuba", "∅∅∅": "Hora braniega de Les Azores", "GMT": "Hora media de Greenwich", "EDT": "Hora braniega del este norteamericanu", "ChST": "Hora estándar de Chamorro", "PDT": "Hora braniega del Pacíficu norteamericanu", "LHST": "Hora estándar de Lord Howe", "SAST": "Hora de Sudáfrica", "HEEG": "Hora braniega de Groenlandia oriental", "TMST": "Hora braniega del Turkmenistán", "HNPM": "Hora estándar de Saint Pierre y Miquelon", "MEZ": "Hora estándar d’Europa Central", "HNPMX": "Hora estándar del Pacíficu de Méxicu", "ADT": "Hora braniega del Atlánticu", "MYT": "Hora de Malasia", "HAST": "Hora estándar de Hawaii-Aleutianes", "ACWDT": "Hora braniega d’Australia central del oeste", "OEZ": "Hora estándar d’Europa del Este", "WART": "Hora estándar occidental d’Arxentina", "SGT": "Hora estándar de Singapur", "MDT": "Hora braniega de Macáu", "JST": "Hora estándar de Xapón", "WAST": "Hora braniega d’África del oeste", "COST": "Hora braniega de Colombia", "WITA": "Hora d’Indonesia central", "AEST": "Hora estándar d’Australia del este", "HEPM": "Hora braniega de Saint Pierre y Miquelon", "EAT": "Hora d’África del este", "ART": "Hora estándar d’Arxentina", "CHAST": "Hora estándar de Chatham", "UYT": "Hora estándar del Uruguái", "SRT": "Hora del Surinam", "ACWST": "Hora estándar d’Australia central del oeste", "AWDT": "Hora braniega d’Australia del oeste", "ACST": "Hora estándar d’Australia central"}, -+ timezones: map[string]string{"AEDT": "Hora braniega d’Australia del este", "VET": "Hora de Venezuela", "HECU": "Hora braniega de Cuba", "AKST": "Hora estándar d’Alaska", "COT": "Hora estándar de Colombia", "COST": "Hora braniega de Colombia", "WIB": "Hora d’Indonesia del oeste", "AWDT": "Hora braniega d’Australia del oeste", "CHAST": "Hora estándar de Chatham", "HNCU": "Hora estándar de Cuba", "MEZ": "Hora estándar d’Europa Central", "ACWST": "Hora estándar d’Australia central del oeste", "IST": "Hora estándar de la India", "PDT": "Hora braniega del Pacíficu norteamericanu", "GMT": "Hora media de Greenwich", "LHDT": "Hora braniega de Lord Howe", "EST": "Hora estándar del este norteamericanu", "HNEG": "Hora estándar de Groenlandia oriental", "OESZ": "Hora braniega d’Europa del Este", "HAT": "Hora braniega de Newfoundland", "HKT": "Hora estándar de Ḥong Kong", "ChST": "Hora estándar de Chamorro", "CDT": "Hora braniega central norteamericana", "SRT": "Hora del Surinam", "BT": "Hora de Bután", "NZDT": "Hora braniega de Nueva Zelanda", "ECT": "Hora d’Ecuador", "HNPMX": "Hora estándar del Pacíficu de Méxicu", "∅∅∅": "Hora braniega de Les Azores", "HEEG": "Hora braniega de Groenlandia oriental", "EAT": "Hora d’África del este", "ACDT": "Hora braniega d’Australia central", "HEPM": "Hora braniega de Saint Pierre y Miquelon", "JST": "Hora estándar de Xapón", "JDT": "Hora braniega de Xapón", "TMT": "Hora estándar del Turkmenistán", "CST": "Hora estándar central norteamericana", "AWST": "Hora estándar d’Australia del oeste", "UYT": "Hora estándar del Uruguái", "SGT": "Hora estándar de Singapur", "MST": "Hora estándar de Macáu", "ACST": "Hora estándar d’Australia central", "HNPM": "Hora estándar de Saint Pierre y Miquelon", "AEST": "Hora estándar d’Australia del este", "WEZ": "Hora estándar d’Europa Occidental", "WIT": "Hora d’Indonesia del este", "HNT": "Hora estándar de Newfoundland", "WARST": "Hora braniega occidental d’Arxentina", "CLT": "Hora estándar de Chile", "HAST": "Hora estándar de Hawaii-Aleutianes", "HNOG": "Hora estándar de Groenlandia occidental", "ACWDT": "Hora braniega d’Australia central del oeste", "GYT": "Hora de La Guyana", "TMST": "Hora braniega del Turkmenistán", "EDT": "Hora braniega del este norteamericanu", "ARST": "Hora braniega d’Arxentina", "BOT": "Hora de Bolivia", "WITA": "Hora d’Indonesia central", "MDT": "Hora braniega de Macáu", "ART": "Hora estándar d’Arxentina", "HADT": "Hora braniega de Hawaii-Aleutianes", "CAT": "Hora d’África central", "CLST": "Hora braniega de Chile", "ADT": "Hora braniega del Atlánticu", "HNNOMX": "Hora estándar del noroeste de Méxicu", "HENOMX": "Hora braniega del noroeste de Méxicu", "MYT": "Hora de Malasia", "WAST": "Hora braniega d’África del oeste", "AKDT": "Hora braniega d’Alaska", "HKST": "Hora braniega de Ḥong Kong", "NZST": "Hora estándar de Nueva Zelanda", "WART": "Hora estándar occidental d’Arxentina", "UYST": "Hora braniega del Uruguái", "HEPMX": "Hora braniega del Pacíficu de Méxicu", "WESZ": "Hora braniega d’Europa Occidental", "GFT": "Hora de La Guyana Francesa", "SAST": "Hora de Sudáfrica", "AST": "Hora estándar del Atlánticu", "CHADT": "Hora braniega de Chatham", "PST": "Hora estándar del Pacíficu norteamericanu", "WAT": "Hora estándar d’África del oeste", "OEZ": "Hora estándar d’Europa del Este", "HEOG": "Hora braniega de Groenlandia occidental", "MESZ": "Hora braniega d’Europa Central", "LHST": "Hora estándar de Lord Howe"}, - } - } -  -diff --git a/ast_ES/ast_ES.go b/ast_ES/ast_ES.go -index efea916..af5e33c 100644 ---- a/ast_ES/ast_ES.go -+++ b/ast_ES/ast_ES.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ast_ES struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ast_ES' locale - func New() locales.Translator { - return &ast_ES{ -- locale: "ast_ES", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "xin", "feb", "mar", "abr", "may", "xun", "xnt", "ago", "set", "och", "pay", "avi"}, -- monthsNarrow: []string{"", "X", "F", "M", "A", "M", "X", "X", "A", "S", "O", "P", "A"}, -- monthsWide: []string{"", "de xineru", "de febreru", "de marzu", "d’abril", "de mayu", "de xunu", "de xunetu", "d’agostu", "de setiembre", "d’ochobre", "de payares", "d’avientu"}, -- daysAbbreviated: []string{"dom", "llu", "mar", "mié", "xue", "vie", "sáb"}, -- daysNarrow: []string{"D", "L", "M", "M", "X", "V", "S"}, -- daysShort: []string{"do", "ll", "ma", "mi", "xu", "vi", "sá"}, -- daysWide: []string{"domingu", "llunes", "martes", "miércoles", "xueves", "vienres", "sábadu"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"de la mañana", "de la tarde"}, -- erasAbbreviated: []string{"e.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"enantes de Cristu", "después de Cristu"}, -- timezones: map[string]string{"HNEG": "Hora estándar de Groenlandia oriental", "HNCU": "Hora estándar de Cuba", "ARST": "Hora braniega d’Arxentina", "AWDT": "Hora braniega d’Australia del oeste", "LHDT": "Hora braniega de Lord Howe", "CHADT": "Hora braniega de Chatham", "JDT": "Hora braniega de Xapón", "ADT": "Hora braniega del Atlánticu", "VET": "Hora de Venezuela", "ACWST": "Hora estándar d’Australia central del oeste", "PDT": "Hora braniega del Pacíficu norteamericanu", "AEST": "Hora estándar d’Australia del este", "HEOG": "Hora braniega de Groenlandia occidental", "HKST": "Hora braniega de Ḥong Kong", "HEEG": "Hora braniega de Groenlandia oriental", "ACST": "Hora estándar d’Australia central", "EAT": "Hora d’África del este", "WART": "Hora estándar occidental d’Arxentina", "EST": "Hora estándar del este norteamericanu", "BT": "Hora de Bután", "GFT": "Hora de La Guyana Francesa", "TMST": "Hora braniega del Turkmenistán", "IST": "Hora estándar de la India", "WAST": "Hora braniega d’África del oeste", "COT": "Hora estándar de Colombia", "GMT": "Hora media de Greenwich", "NZST": "Hora estándar de Nueva Zelanda", "MESZ": "Hora braniega d’Europa Central", "WIT": "Hora d’Indonesia del este", "WESZ": "Hora braniega d’Europa Occidental", "CHAST": "Hora estándar de Chatham", "WAT": "Hora estándar d’África del oeste", "ECT": "Hora d’Ecuador", "CAT": "Hora d’África central", "HNPMX": "Hora estándar del Pacíficu de Méxicu", "GYT": "Hora de La Guyana", "TMT": "Hora estándar del Turkmenistán", "HENOMX": "Hora braniega del noroeste de Méxicu", "HNOG": "Hora estándar de Groenlandia occidental", "PST": "Hora estándar del Pacíficu norteamericanu", "MST": "Hora estándar de Macáu", "UYST": "Hora braniega del Uruguái", "OESZ": "Hora braniega d’Europa del Este", "MDT": "Hora braniega de Macáu", "AKST": "Hora estándar d’Alaska", "SRT": "Hora del Surinam", "HKT": "Hora estándar de Ḥong Kong", "JST": "Hora estándar de Xapón", "COST": "Hora braniega de Colombia", "HEPMX": "Hora braniega del Pacíficu de Méxicu", "AKDT": "Hora braniega d’Alaska", "CDT": "Hora braniega central norteamericana", "UYT": "Hora estándar del Uruguái", "HECU": "Hora braniega de Cuba", "WIB": "Hora d’Indonesia del oeste", "CST": "Hora estándar central norteamericana", "SAST": "Hora de Sudáfrica", "WARST": "Hora braniega occidental d’Arxentina", "WEZ": "Hora estándar d’Europa Occidental", "ACWDT": "Hora braniega d’Australia central del oeste", "HNT": "Hora estándar de Newfoundland", "BOT": "Hora de Bolivia", "HNNOMX": "Hora estándar del noroeste de Méxicu", "HAT": "Hora braniega de Newfoundland", "ART": "Hora estándar d’Arxentina", "WITA": "Hora d’Indonesia central", "MEZ": "Hora estándar d’Europa Central", "HEPM": "Hora braniega de Saint Pierre y Miquelon", "CLT": "Hora estándar de Chile", "OEZ": "Hora estándar d’Europa del Este", "AST": "Hora estándar del Atlánticu", "HAST": "Hora estándar de Hawaii-Aleutianes", "AWST": "Hora estándar d’Australia del oeste", "HNPM": "Hora estándar de Saint Pierre y Miquelon", "CLST": "Hora braniega de Chile", "ChST": "Hora estándar de Chamorro", "ACDT": "Hora braniega d’Australia central", "MYT": "Hora de Malasia", "HADT": "Hora braniega de Hawaii-Aleutianes", "AEDT": "Hora braniega d’Australia del este", "LHST": "Hora estándar de Lord Howe", "∅∅∅": "Hora braniega del Perú", "SGT": "Hora estándar de Singapur", "EDT": "Hora braniega del este norteamericanu", "NZDT": "Hora braniega de Nueva Zelanda"}, -+ locale: "ast_ES", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPM": "HNPM", "AKST": "AKST", "NZDT": "NZDT", "ADT": "ADT", "MEZ": "MEZ", "LHDT": "LHDT", "WAT": "WAT", "TMST": "TMST", "EDT": "EDT", "WITA": "WITA", "LHST": "LHST", "ChST": "ChST", "MESZ": "MESZ", "EST": "EST", "JDT": "JDT", "VET": "VET", "HNPMX": "HNPMX", "COT": "COT", "TMT": "TMT", "SAST": "SAST", "NZST": "NZST", "SRT": "SRT", "JST": "JST", "BT": "BT", "AEDT": "AEDT", "HECU": "HECU", "AKDT": "AKDT", "ACDT": "ACDT", "WAST": "WAST", "HNOG": "HNOG", "AEST": "AEST", "UYT": "UYT", "UYST": "UYST", "PST": "PST", "WESZ": "WESZ", "HAST": "HAST", "HNEG": "HNEG", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "CAT": "CAT", "CLST": "CLST", "ACST": "ACST", "AWDT": "AWDT", "OESZ": "OESZ", "HNT": "HNT", "HEOG": "HEOG", "EAT": "EAT", "HEPM": "HEPM", "ACWDT": "ACWDT", "CHADT": "CHADT", "PDT": "PDT", "GMT": "GMT", "WEZ": "WEZ", "WIB": "WIB", "AST": "AST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "CST": "CST", "CDT": "CDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "SGT": "SGT", "HADT": "HADT", "HENOMX": "HENOMX", "COST": "COST", "HKST": "HKST", "ECT": "ECT", "IST": "IST", "HNCU": "HNCU", "GFT": "GFT", "WIT": "WIT", "WARST": "WARST", "ARST": "ARST", "BOT": "BOT", "GYT": "GYT", "CLT": "CLT", "MYT": "MYT", "HAT": "HAT", "HKT": "HKT", "MDT": "MDT", "ART": "ART", "AWST": "AWST", "WART": "WART", "MST": "MST"}, - } - } -  -@@ -125,7 +102,7 @@ func (ast *ast_ES) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ast *ast_ES) MonthsAbbreviated() []string { -- return ast.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +112,7 @@ func (ast *ast_ES) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ast *ast_ES) MonthsNarrow() []string { -- return ast.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -145,7 +122,7 @@ func (ast *ast_ES) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ast *ast_ES) MonthsWide() []string { -- return ast.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,73 +168,13 @@ func (ast *ast_ES) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ast_ES' and handles both Whole and Real numbers based on 'v' - func (ast *ast_ES) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ast.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ast.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ast.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ast_ES' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ast *ast_ES) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ast.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ast.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ast.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ast_ES' -@@ -265,56 +182,7 @@ func (ast *ast_ES) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ast.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ast.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ast.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ast.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ast.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ast.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ast_ES' -@@ -323,63 +191,7 @@ func (ast *ast_ES) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ast.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ast.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ast.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ast.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ast.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ast.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ast.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ast_ES' -@@ -387,17 +199,6 @@ func (ast *ast_ES) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +207,6 @@ func (ast *ast_ES) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ast.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,18 +215,6 @@ func (ast *ast_ES) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ast.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -445,20 +223,6 @@ func (ast *ast_ES) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ast.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ast.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -467,19 +231,6 @@ func (ast *ast_ES) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -488,26 +239,6 @@ func (ast *ast_ES) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -516,30 +247,6 @@ func (ast *ast_ES) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -548,34 +255,5 @@ func (ast *ast_ES) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ast.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ast.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/az/az.go b/az/az.go -index 16876e4..e9be608 100644 ---- a/az/az.go -+++ b/az/az.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"e.ə.", "y.e."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"eramızdan əvvəl", "yeni era"}, -- timezones: map[string]string{"∅∅∅": "Amazon Yay Vaxtı", "HEEG": "Şərqi Qrenlandiya Yay Vaxtı", "AST": "Atlantik Standart Vaxt", "CLST": "Çili Yay Vaxtı", "EAT": "Şərqi Afrika Vaxtı", "OEZ": "Şərqi Avropa Standart Vaxtı", "WART": "Qərbi Argentina Standart Vaxtı", "HENOMX": "Şimal-Qərbi Meksika Yay Vaxtı", "CDT": "Şimali Mərkəzi Amerika Yay Vaxtı", "HAST": "Havay-Aleut Standart Vaxtı", "TMST": "Türkmənistan Yay Vaxtı", "ACST": "Mərkəzi Avstraliya Standart Vaxtı", "WAST": "Qərbi Afrika Yay Vaxtı", "WIB": "Qərbi İndoneziya Vaxtı", "HKST": "Honq Konq Yay Vaxtı", "GMT": "Qrinviç Orta Vaxtı", "AKST": "Alyaska Standart Vaxtı", "ACWST": "Mərkəzi Qərbi Avstraliya Standart Vaxtı", "HAT": "Nyufaundlend Yay Vaxtı", "AEST": "Şərqi Avstraliya Standart Vaxtı", "HKT": "Honq Konq Standart Vaxtı", "HNPM": "San Pier və Mikelon Standart Vaxtı", "JST": "Yaponiya Standart Vaxtı", "WARST": "Qərbi Argentina Yay Vaxtı", "EST": "Şimali Şərqi Amerika Standart Vaxtı", "WESZ": "Qərbi Avropa Yay Vaxtı", "GYT": "Qayana Vaxtı", "SRT": "Surinam Vaxtı", "PST": "Şimali Amerika Sakit Okean Standart Vaxtı", "ARST": "Argentina Yay Vaxtı", "AWST": "Qərbi Avstraliya Standart Vaxtı", "HADT": "Havay-Aleut Yay Vaxtı", "NZST": "Yeni Zelandiya Standart Vaxtı", "ChST": "Çamorro Vaxtı", "COT": "Kolumbiya Standart Vaxtı", "COST": "Kolumbiya Yay Vaxtı", "MDT": "MDT", "UYST": "Uruqvay Yay Vaxtı", "WIT": "Şərqi İndoneziya Vaxtı", "HNCU": "Kuba Standart Vaxtı", "HECU": "Kuba Yay Vaxtı", "AKDT": "Alyaska Yay Vaxtı", "BT": "Butan Vaxtı", "HNNOMX": "Şimal-Qərbi Meksika Standart Vaxtı", "SGT": "Sinqapur Vaxtı", "MST": "MST", "ART": "Argentina Standart Vaxtı", "MEZ": "Mərkəzi Avropa Standart Vaxtı", "MESZ": "Mərkəzi Avropa Yay Vaxtı", "OESZ": "Şərqi Avropa Yay Vaxtı", "HEPMX": "Meksika Sakit Okean Yay Vaxtı", "HNOG": "Qərbi Qrenlandiya Standart Vaxtı", "HNPMX": "Meksika Sakit Okean Standart Vaxtı", "MYT": "Malayziya Vaxtı", "TMT": "Türkmənistan Standart Vaxtı", "LHST": "Lord Hau Standart Vaxtı", "NZDT": "Yeni Zelandiya Yay Vaxtı", "IST": "Hindistan Vaxtı", "CLT": "Çili Standart Vaxtı", "BOT": "Boliviya Vaxtı", "CAT": "Mərkəzi Afrika Vaxtı", "VET": "Venesuela Vaxtı", "CHAST": "Çatham Standart Vaxtı", "SAST": "Cənubi Afrika Vaxtı", "JDT": "Yaponiya Yay Vaxtı", "HNEG": "Şərqi Qrenlandiya Standart Vaxtı", "ACDT": "Mərkəzi Avstraliya Yay Vaxtı", "WAT": "Qərbi Afrika Standart Vaxtı", "WEZ": "Qərbi Avropa Standart Vaxtı", "ACWDT": "Mərkəzi Qərbi Avstraliya Yay Vaxtı", "HNT": "Nyufaundlend Standart Vaxtı", "LHDT": "Lord Hau Yay vaxtı", "GFT": "Fransız Qvianası Vaxtı", "UYT": "Uruqvay Standart Vaxtı", "ADT": "Atlantik Yay Vaxtı", "PDT": "Şimali Amerika Sakit Okean Yay Vaxtı", "WITA": "Mərkəzi İndoneziya Vaxtı", "CHADT": "Çatham Yay Vaxtı", "ECT": "Ekvador Vaxtı", "HEOG": "Qərbi Qrenlandiya Yay Vaxtı", "AWDT": "Qərbi Avstraliya Yay Vaxtı", "HEPM": "San Pier və Mikelon Yay Vaxtı", "EDT": "Şimali Şərqi Amerika Yay Vaxtı", "CST": "Şimali Mərkəzi Amerika Standart Vaxtı", "AEDT": "Şərqi Avstraliya Yay Vaxtı"}, -+ timezones: map[string]string{"CLST": "Çili Yay Vaxtı", "BOT": "Boliviya Vaxtı", "ACDT": "Mərkəzi Avstraliya Yay Vaxtı", "COT": "Kolumbiya Standart Vaxtı", "IST": "Hindistan Vaxtı", "PDT": "Şimali Amerika Sakit Okean Yay Vaxtı", "VET": "Venesuela Vaxtı", "OESZ": "Şərqi Avropa Yay Vaxtı", "CLT": "Çili Standart Vaxtı", "SRT": "Surinam Vaxtı", "LHST": "Lord Hau Standart Vaxtı", "AKST": "Alyaska Standart Vaxtı", "OEZ": "Şərqi Avropa Standart Vaxtı", "GFT": "Fransız Qvianası Vaxtı", "HNOG": "Qərbi Qrenlandiya Standart Vaxtı", "HKST": "Honq Konq Yay Vaxtı", "WIB": "Qərbi İndoneziya Vaxtı", "AST": "Atlantik Standart Vaxt", "MESZ": "Mərkəzi Avropa Yay Vaxtı", "HEEG": "Şərqi Qrenlandiya Yay Vaxtı", "AWST": "Qərbi Avstraliya Standart Vaxtı", "HNPM": "San Pier və Mikelon Standart Vaxtı", "UYT": "Uruqvay Standart Vaxtı", "SAST": "Cənubi Afrika Vaxtı", "NZST": "Yeni Zelandiya Standart Vaxtı", "ADT": "Atlantik Yay Vaxtı", "ARST": "Argentina Yay Vaxtı", "HENOMX": "Şimal-Qərbi Meksika Yay Vaxtı", "MYT": "Malayziya Vaxtı", "AEST": "Şərqi Avstraliya Standart Vaxtı", "CAT": "Mərkəzi Afrika Vaxtı", "ART": "Argentina Standart Vaxtı", "HNEG": "Şərqi Qrenlandiya Standart Vaxtı", "AWDT": "Qərbi Avstraliya Yay Vaxtı", "JDT": "Yaponiya Yay Vaxtı", "ChST": "Çamorro Vaxtı", "HADT": "Havay-Aleut Yay Vaxtı", "WEZ": "Qərbi Avropa Standart Vaxtı", "WAT": "Qərbi Afrika Standart Vaxtı", "WAST": "Qərbi Afrika Yay Vaxtı", "HAT": "Nyufaundlend Yay Vaxtı", "TMT": "Türkmənistan Standart Vaxtı", "WIT": "Şərqi İndoneziya Vaxtı", "EDT": "Şimali Şərqi Amerika Yay Vaxtı", "HKT": "Honq Konq Standart Vaxtı", "WITA": "Mərkəzi İndoneziya Vaxtı", "GMT": "Qrinviç Orta Vaxtı", "HAST": "Havay-Aleut Standart Vaxtı", "WARST": "Qərbi Argentina Yay Vaxtı", "TMST": "Türkmənistan Yay Vaxtı", "MST": "MST", "MDT": "MDT", "CST": "Şimali Mərkəzi Amerika Standart Vaxtı", "EAT": "Şərqi Afrika Vaxtı", "JST": "Yaponiya Standart Vaxtı", "ACWST": "Mərkəzi Qərbi Avstraliya Standart Vaxtı", "ACWDT": "Mərkəzi Qərbi Avstraliya Yay Vaxtı", "AEDT": "Şərqi Avstraliya Yay Vaxtı", "HNT": "Nyufaundlend Standart Vaxtı", "COST": "Kolumbiya Yay Vaxtı", "EST": "Şimali Şərqi Amerika Standart Vaxtı", "ECT": "Ekvador Vaxtı", "ACST": "Mərkəzi Avstraliya Standart Vaxtı", "UYST": "Uruqvay Yay Vaxtı", "HNCU": "Kuba Standart Vaxtı", "WART": "Qərbi Argentina Standart Vaxtı", "NZDT": "Yeni Zelandiya Yay Vaxtı", "BT": "Butan Vaxtı", "SGT": "Sinqapur Vaxtı", "HEOG": "Qərbi Qrenlandiya Yay Vaxtı", "HNNOMX": "Şimal-Qərbi Meksika Standart Vaxtı", "LHDT": "Lord Hau Yay vaxtı", "WESZ": "Qərbi Avropa Yay Vaxtı", "AKDT": "Alyaska Yay Vaxtı", "PST": "Şimali Amerika Sakit Okean Standart Vaxtı", "CHAST": "Çatham Standart Vaxtı", "HECU": "Kuba Yay Vaxtı", "HNPMX": "Meksika Sakit Okean Standart Vaxtı", "HEPMX": "Meksika Sakit Okean Yay Vaxtı", "GYT": "Qayana Vaxtı", "∅∅∅": "Braziliya Yay Vaxtı", "CDT": "Şimali Mərkəzi Amerika Yay Vaxtı", "MEZ": "Mərkəzi Avropa Standart Vaxtı", "HEPM": "San Pier və Mikelon Yay Vaxtı", "CHADT": "Çatham Yay Vaxtı"}, - } - } -  -@@ -112,9 +112,9 @@ func (az *az) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -+ iMod10 := i % 10 - iMod100 := i % 100 - iMod1000 := i % 1000 -- iMod10 := i % 10 -  - if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) { - return locales.PluralRuleOne -diff --git a/az_Cyrl/az_Cyrl.go b/az_Cyrl/az_Cyrl.go -index 4d8a733..dd53362 100644 ---- a/az_Cyrl/az_Cyrl.go -+++ b/az_Cyrl/az_Cyrl.go -@@ -59,7 +59,6 @@ func New() locales.Translator { - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", - monthsAbbreviated: []string{"", "јан", "фев", "мар", "апр", "май", "ијн", "ијл", "авг", "сен", "окт", "ној", "дек"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, - monthsWide: []string{"", "јанвар", "феврал", "март", "апрел", "май", "ијун", "ијул", "август", "сентјабр", "октјабр", "нојабр", "декабр"}, - daysAbbreviated: []string{"Б.", "Б.Е.", "Ч.А.", "Ч.", "Ҹ.А.", "Ҹ.", "Ш."}, - daysNarrow: []string{"7", "1", "2", "3", "4", "5", "6"}, -@@ -71,7 +70,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"е.ә.", "ј.е."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ерамыздан әввәл", "јени ера"}, -- timezones: map[string]string{"WITA": "Mərkəzi İndoneziya Vaxtı", "CLST": "Çili Yay Vaxtı", "GFT": "Fransız Qvianası Vaxtı", "GMT": "Qrinviç Orta Vaxtı", "SGT": "Sinqapur Vaxtı", "IST": "Hindistan Vaxtı", "JDT": "Yaponiya Yay Vaxtı", "OEZ": "Şərqi Avropa Standart Vaxtı", "WARST": "Qərbi Argentina Yay Vaxtı", "ADT": "Atlantik Yay Vaxtı", "NZDT": "Yeni Zelandiya Yay Vaxtı", "COT": "Kolumbiya Standart Vaxtı", "HNNOMX": "Şimal-Qərbi Meksika Standart Vaxtı", "EST": "Şimali Şərqi Amerika Standart Vaxtı", "MST": "MST", "MDT": "MDT", "MYT": "Malayziya Vaxtı", "ACWST": "Mərkəzi Qərbi Avstraliya Standart Vaxtı", "HAT": "Nyufaundlend Yay Vaxtı", "WAT": "Qərbi Afrika Standart Vaxtı", "OESZ": "Şərqi Avropa Yay Vaxtı", "CDT": "Şimali Mərkəzi Amerika Yay Vaxtı", "SAST": "Cənubi Afrika Vaxtı", "HENOMX": "Şimal-Qərbi Meksika Yay Vaxtı", "PST": "Şimali Amerika Sakit Okean Standart Vaxtı", "AWDT": "Qərbi Avstraliya Yay Vaxtı", "HNPM": "San Pier və Mikelon Standart Vaxtı", "MEZ": "Mərkəzi Avropa Standart Vaxtı", "CLT": "Çili Standart Vaxtı", "ACWDT": "Mərkəzi Qərbi Avstraliya Yay Vaxtı", "HNT": "Nyufaundlend Standart Vaxtı", "HKT": "Honq Konq Standart Vaxtı", "JST": "Yaponiya Standart Vaxtı", "TMT": "Türkmənistan Standart Vaxtı", "ECT": "Ekvador Vaxtı", "COST": "Kolumbiya Yay Vaxtı", "UYT": "Uruqvay Standart Vaxtı", "AKDT": "Alyaska Yay Vaxtı", "AEST": "Şərqi Avstraliya Standart Vaxtı", "CHAST": "Çatham Standart Vaxtı", "ChST": "Çamorro Vaxtı", "EAT": "Şərqi Afrika Vaxtı", "WAST": "Qərbi Afrika Yay Vaxtı", "GYT": "Qayana Vaxtı", "ART": "Argentina Standart Vaxtı", "HNOG": "Qərbi Qrenlandiya Standart Vaxtı", "HEOG": "Qərbi Qrenlandiya Yay Vaxtı", "AEDT": "Şərqi Avstraliya Yay Vaxtı", "MESZ": "Mərkəzi Avropa Yay Vaxtı", "WART": "Qərbi Argentina Standart Vaxtı", "HECU": "Kuba Yay Vaxtı", "HEPM": "San Pier və Mikelon Yay Vaxtı", "TMST": "Türkmənistan Yay Vaxtı", "AST": "Atlantik Standart Vaxt", "BT": "Butan Vaxtı", "AWST": "Qərbi Avstraliya Standart Vaxtı", "HNCU": "Kuba Standart Vaxtı", "AKST": "Alyaska Standart Vaxtı", "CST": "Şimali Mərkəzi Amerika Standart Vaxtı", "HADT": "Havay-Aleut Yay Vaxtı", "SRT": "Surinam Vaxtı", "ARST": "Argentina Yay Vaxtı", "HKST": "Honq Konq Yay Vaxtı", "LHDT": "Lord Hau Yay vaxtı", "ACDT": "Mərkəzi Avstraliya Yay Vaxtı", "HNPMX": "Meksika Sakit Okean Standart Vaxtı", "UYST": "Uruqvay Yay Vaxtı", "HAST": "Havay-Aleut Standart Vaxtı", "WESZ": "Qərbi Avropa Yay Vaxtı", "LHST": "Lord Hau Standart Vaxtı", "BOT": "Boliviya Vaxtı", "ACST": "Mərkəzi Avstraliya Standart Vaxtı", "HEPMX": "Meksika Sakit Okean Yay Vaxtı", "WIB": "Qərbi İndoneziya Vaxtı", "VET": "Venesuela Vaxtı", "WIT": "Şərqi İndoneziya Vaxtı", "CAT": "Mərkəzi Afrika Vaxtı", "EDT": "Şimali Şərqi Amerika Yay Vaxtı", "PDT": "Şimali Amerika Sakit Okean Yay Vaxtı", "∅∅∅": "Amazon Yay Vaxtı", "HNEG": "Şərqi Qrenlandiya Standart Vaxtı", "HEEG": "Şərqi Qrenlandiya Yay Vaxtı", "WEZ": "Qərbi Avropa Standart Vaxtı", "NZST": "Yeni Zelandiya Standart Vaxtı", "CHADT": "Çatham Yay Vaxtı"}, -+ timezones: map[string]string{"HEPM": "HEPM", "WARST": "WARST", "ECT": "ECT", "MDT": "MDT", "AEDT": "AEDT", "CHAST": "CHAST", "WESZ": "WESZ", "WIT": "WIT", "ACDT": "ACDT", "WAST": "WAST", "SAST": "SAST", "ChST": "ChST", "ARST": "ARST", "ACST": "ACST", "HNPM": "HNPM", "MYT": "MYT", "IST": "IST", "HNPMX": "HNPMX", "COT": "COT", "CLST": "CLST", "GMT": "GMT", "SRT": "SRT", "WIB": "WIB", "HENOMX": "HENOMX", "JDT": "JDT", "AWDT": "AWDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "VET": "VET", "HKT": "HKT", "NZDT": "NZDT", "AST": "AST", "ADT": "ADT", "NZST": "NZST", "HAST": "HAST", "MESZ": "MESZ", "LHST": "LHST", "CHADT": "CHADT", "GFT": "GFT", "WART": "WART", "HKST": "HKST", "HNT": "HNT", "HNEG": "HNEG", "JST": "JST", "AEST": "AEST", "PST": "PST", "PDT": "PDT", "BT": "BT", "HNCU": "HNCU", "CAT": "CAT", "CST": "CST", "HADT": "HADT", "MEZ": "MEZ", "UYT": "UYT", "HECU": "HECU", "COST": "COST", "BOT": "BOT", "WEZ": "WEZ", "OEZ": "OEZ", "HNOG": "HNOG", "EST": "EST", "TMST": "TMST", "CLT": "CLT", "HNNOMX": "HNNOMX", "UYST": "UYST", "SGT": "SGT", "AKDT": "AKDT", "OESZ": "OESZ", "HEOG": "HEOG", "EDT": "EDT", "WITA": "WITA", "CDT": "CDT", "HEPMX": "HEPMX", "HAT": "HAT", "MST": "MST", "EAT": "EAT", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "WAT": "WAT", "AKST": "AKST", "GYT": "GYT", "ART": "ART", "TMT": "TMT", "HEEG": "HEEG", "AWST": "AWST"}, - } - } -  -@@ -112,9 +111,9 @@ func (az *az_Cyrl) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -+ iMod10 := i % 10 - iMod100 := i % 100 - iMod1000 := i % 1000 -- iMod10 := i % 10 -  - if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) { - return locales.PluralRuleOne -@@ -160,7 +159,7 @@ func (az *az_Cyrl) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (az *az_Cyrl) MonthsNarrow() []string { -- return az.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -diff --git a/az_Cyrl_AZ/az_Cyrl_AZ.go b/az_Cyrl_AZ/az_Cyrl_AZ.go -index 4d5148a..9848418 100644 ---- a/az_Cyrl_AZ/az_Cyrl_AZ.go -+++ b/az_Cyrl_AZ/az_Cyrl_AZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type az_Cyrl_AZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'az_Cyrl_AZ' locale - func New() locales.Translator { - return &az_Cyrl_AZ{ -- locale: "az_Cyrl_AZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avq", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"B.", "B.E.", "Ç.A.", "Ç.", "C.A.", "C.", "Ş."}, -- daysNarrow: []string{"7", "1", "2", "3", "4", "5", "6"}, -- daysShort: []string{"B.", "B.E.", "Ç.A.", "Ç.", "C.A.", "C.", "Ş."}, -- daysWide: []string{"bazar", "bazar ertəsi", "çərşənbə axşamı", "çərşənbə", "cümə axşamı", "cümə", "şənbə"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"e.ə.", "y.e."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"eramızdan əvvəl", "yeni era"}, -- timezones: map[string]string{"WEZ": "Qərbi Avropa Standart Vaxtı", "HKT": "Honq Konq Standart Vaxtı", "HNT": "Nyufaundlend Standart Vaxtı", "COST": "Kolumbiya Yay Vaxtı", "CST": "Şimali Mərkəzi Amerika Standart Vaxtı", "SRT": "Surinam Vaxtı", "HNPM": "San Pier və Mikelon Standart Vaxtı", "ACST": "Mərkəzi Avstraliya Standart Vaxtı", "CAT": "Mərkəzi Afrika Vaxtı", "MDT": "Şimali Dağlıq Amerika Yay Vaxtı", "WITA": "Mərkəzi İndoneziya Vaxtı", "CHAST": "Çatham Standart Vaxtı", "AWST": "Qərbi Avstraliya Standart Vaxtı", "JDT": "Yaponiya Yay Vaxtı", "ECT": "Ekvador Vaxtı", "JST": "Yaponiya Standart Vaxtı", "BOT": "Boliviya Vaxtı", "ACDT": "Mərkəzi Avstraliya Yay Vaxtı", "AKST": "Alyaska Standart Vaxtı", "ACWDT": "Mərkəzi Qərbi Avstraliya Yay Vaxtı", "AEST": "Şərqi Avstraliya Standart Vaxtı", "NZDT": "Yeni Zelandiya Yay Vaxtı", "AWDT": "Qərbi Avstraliya Yay Vaxtı", "MYT": "Malayziya Vaxtı", "SAST": "Cənubi Afrika Vaxtı", "IST": "Hindistan Vaxtı", "GFT": "Fransız Qvianası Vaxtı", "OEZ": "Şərqi Avropa Standart Vaxtı", "HNCU": "Kuba Standart Vaxtı", "HEOG": "Qərbi Qrenlandiya Yay Vaxtı", "HKST": "Honq Konq Yay Vaxtı", "LHST": "Lord Hau Standart Vaxtı", "AKDT": "Alyaska Yay Vaxtı", "CDT": "Şimali Mərkəzi Amerika Yay Vaxtı", "BT": "Butan Vaxtı", "ART": "Argentina Standart Vaxtı", "∅∅∅": "Amazon Yay Vaxtı", "WARST": "Qərbi Argentina Yay Vaxtı", "EST": "Şimali Şərqi Amerika Standart Vaxtı", "WIB": "Qərbi İndoneziya Vaxtı", "HADT": "Havay-Aleut Yay Vaxtı", "WIT": "Şərqi İndoneziya Vaxtı", "AST": "Atlantik Standart Vaxt", "HEPMX": "Meksika Sakit Okean Yay Vaxtı", "WESZ": "Qərbi Avropa Yay Vaxtı", "TMT": "Türkmənistan Standart Vaxtı", "HNNOMX": "Şimal-Qərbi Meksika Standart Vaxtı", "ARST": "Argentina Yay Vaxtı", "AEDT": "Şərqi Avstraliya Yay Vaxtı", "MESZ": "Mərkəzi Avropa Yay Vaxtı", "ChST": "Çamorro Vaxtı", "HECU": "Kuba Yay Vaxtı", "MST": "Şimali Dağlıq Amerika Standart Vaxtı", "PDT": "Şimali Amerika Sakit Okean Yay Vaxtı", "HAT": "Nyufaundlend Yay Vaxtı", "HNPMX": "Meksika Sakit Okean Standart Vaxtı", "UYST": "Uruqvay Yay Vaxtı", "CLST": "Çili Yay Vaxtı", "TMST": "Türkmənistan Yay Vaxtı", "WAT": "Qərbi Afrika Standart Vaxtı", "SGT": "Sinqapur Vaxtı", "GYT": "Qayana Vaxtı", "MEZ": "Mərkəzi Avropa Standart Vaxtı", "LHDT": "Lord Hau Yay vaxtı", "NZST": "Yeni Zelandiya Standart Vaxtı", "ADT": "Atlantik Yay Vaxtı", "HAST": "Havay-Aleut Standart Vaxtı", "PST": "Şimali Amerika Sakit Okean Standart Vaxtı", "UYT": "Uruqvay Standart Vaxtı", "HEEG": "Şərqi Qrenlandiya Yay Vaxtı", "EAT": "Şərqi Afrika Vaxtı", "WAST": "Qərbi Afrika Yay Vaxtı", "EDT": "Şimali Şərqi Amerika Yay Vaxtı", "VET": "Venesuela Vaxtı", "ACWST": "Mərkəzi Qərbi Avstraliya Standart Vaxtı", "HEPM": "San Pier və Mikelon Yay Vaxtı", "WART": "Qərbi Argentina Standart Vaxtı", "HENOMX": "Şimal-Qərbi Meksika Yay Vaxtı", "CHADT": "Çatham Yay Vaxtı", "HNEG": "Şərqi Qrenlandiya Standart Vaxtı", "OESZ": "Şərqi Avropa Yay Vaxtı", "GMT": "Qrinviç Orta Vaxtı", "HNOG": "Qərbi Qrenlandiya Standart Vaxtı", "CLT": "Çili Standart Vaxtı", "COT": "Kolumbiya Standart Vaxtı"}, -+ locale: "az_Cyrl_AZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CST": "CST", "HENOMX": "HENOMX", "AEDT": "AEDT", "ACWDT": "ACWDT", "CHAST": "CHAST", "WAST": "WAST", "AKDT": "AKDT", "UYT": "UYT", "IST": "IST", "PDT": "PDT", "LHST": "LHST", "PST": "PST", "LHDT": "LHDT", "ACWST": "ACWST", "COST": "COST", "HNOG": "HNOG", "CLST": "CLST", "WITA": "WITA", "GMT": "GMT", "BOT": "BOT", "HADT": "HADT", "ACST": "ACST", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "MST": "MST", "AST": "AST", "AWST": "AWST", "AWDT": "AWDT", "HNPM": "HNPM", "SGT": "SGT", "HNCU": "HNCU", "CAT": "CAT", "CLT": "CLT", "ACDT": "ACDT", "TMST": "TMST", "OEZ": "OEZ", "OESZ": "OESZ", "HKST": "HKST", "HAT": "HAT", "HEEG": "HEEG", "JST": "JST", "UYST": "UYST", "WEZ": "WEZ", "WESZ": "WESZ", "HEPMX": "HEPMX", "GFT": "GFT", "SAST": "SAST", "MEZ": "MEZ", "JDT": "JDT", "BT": "BT", "MYT": "MYT", "HNT": "HNT", "COT": "COT", "HNEG": "HNEG", "ADT": "ADT", "ARST": "ARST", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "WAT": "WAT", "WART": "WART", "MDT": "MDT", "NZST": "NZST", "WIB": "WIB", "WARST": "WARST", "HEOG": "HEOG", "VET": "VET", "HKT": "HKT", "ChST": "ChST", "MESZ": "MESZ", "CHADT": "CHADT", "AEST": "AEST", "GYT": "GYT", "ECT": "ECT", "SRT": "SRT", "EAT": "EAT", "NZDT": "NZDT", "AKST": "AKST", "EDT": "EDT", "HECU": "HECU", "WIT": "WIT", "EST": "EST", "TMT": "TMT", "CDT": "CDT", "ART": "ART", "HAST": "HAST"}, - } - } -  -@@ -150,7 +127,7 @@ func (az *az_Cyrl_AZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (az *az_Cyrl_AZ) MonthsAbbreviated() []string { -- return az.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -160,7 +137,7 @@ func (az *az_Cyrl_AZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (az *az_Cyrl_AZ) MonthsNarrow() []string { -- return az.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -170,7 +147,7 @@ func (az *az_Cyrl_AZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (az *az_Cyrl_AZ) MonthsWide() []string { -- return az.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -216,73 +193,13 @@ func (az *az_Cyrl_AZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'az_Cyrl_AZ' and handles both Whole and Real numbers based on 'v' - func (az *az_Cyrl_AZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'az_Cyrl_AZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (az *az_Cyrl_AZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, az.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'az_Cyrl_AZ' -@@ -290,60 +207,7 @@ func (az *az_Cyrl_AZ) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := az.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, az.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Cyrl_AZ' -@@ -352,72 +216,7 @@ func (az *az_Cyrl_AZ) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := az.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyNegativePrefix[j]) -- } -- -- b = append(b, az.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, az.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'az_Cyrl_AZ' -@@ -425,27 +224,6 @@ func (az *az_Cyrl_AZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -454,17 +232,6 @@ func (az *az_Cyrl_AZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,17 +240,6 @@ func (az *az_Cyrl_AZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -492,20 +248,6 @@ func (az *az_Cyrl_AZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, az.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -514,19 +256,6 @@ func (az *az_Cyrl_AZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -535,26 +264,6 @@ func (az *az_Cyrl_AZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -563,30 +272,6 @@ func (az *az_Cyrl_AZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -595,34 +280,5 @@ func (az *az_Cyrl_AZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := az.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/az_Latn/az_Latn.go b/az_Latn/az_Latn.go -index aece59c..8240472 100644 ---- a/az_Latn/az_Latn.go -+++ b/az_Latn/az_Latn.go -@@ -10,68 +10,45 @@ import ( - ) -  - type az_Latn struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'az_Latn' locale - func New() locales.Translator { - return &az_Latn{ -- locale: "az_Latn", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avq", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"B.", "B.E.", "Ç.A.", "Ç.", "C.A.", "C.", "Ş."}, -- daysNarrow: []string{"7", "1", "2", "3", "4", "5", "6"}, -- daysShort: []string{"B.", "B.E.", "Ç.A.", "Ç.", "C.A.", "C.", "Ş."}, -- daysWide: []string{"bazar", "bazar ertəsi", "çərşənbə axşamı", "çərşənbə", "cümə axşamı", "cümə", "şənbə"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"e.ə.", "y.e."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"eramızdan əvvəl", "yeni era"}, -- timezones: map[string]string{"GYT": "Qayana Vaxtı", "UYST": "Uruqvay Yay Vaxtı", "WIT": "Şərqi İndoneziya Vaxtı", "NZDT": "Yeni Zelandiya Yay Vaxtı", "ACDT": "Mərkəzi Avstraliya Yay Vaxtı", "HKST": "Honq Konq Yay Vaxtı", "CLT": "Çili Standart Vaxtı", "ChST": "Çamorro Vaxtı", "HEEG": "Şərqi Qrenlandiya Yay Vaxtı", "ACST": "Mərkəzi Avstraliya Standart Vaxtı", "HENOMX": "Şimal-Qərbi Meksika Yay Vaxtı", "WIB": "Qərbi İndoneziya Vaxtı", "LHST": "Lord Hau Standart Vaxtı", "CHAST": "Çatham Standart Vaxtı", "JST": "Yaponiya Standart Vaxtı", "HEPMX": "Meksika Sakit Okean Yay Vaxtı", "OESZ": "Şərqi Avropa Yay Vaxtı", "HNCU": "Kuba Standart Vaxtı", "BT": "Butan Vaxtı", "IST": "Hindistan Vaxtı", "CLST": "Çili Yay Vaxtı", "HNEG": "Şərqi Qrenlandiya Standart Vaxtı", "WARST": "Qərbi Argentina Yay Vaxtı", "EDT": "Şimali Şərqi Amerika Yay Vaxtı", "TMT": "Türkmənistan Standart Vaxtı", "TMST": "Türkmənistan Yay Vaxtı", "EST": "Şimali Şərqi Amerika Standart Vaxtı", "AKST": "Alyaska Standart Vaxtı", "MYT": "Malayziya Vaxtı", "ACWDT": "Mərkəzi Qərbi Avstraliya Yay Vaxtı", "HEOG": "Qərbi Qrenlandiya Yay Vaxtı", "HEPM": "San Pier və Mikelon Yay Vaxtı", "WAT": "Qərbi Afrika Standart Vaxtı", "HECU": "Kuba Yay Vaxtı", "HNPMX": "Meksika Sakit Okean Standart Vaxtı", "AKDT": "Alyaska Yay Vaxtı", "CDT": "Şimali Mərkəzi Amerika Yay Vaxtı", "ACWST": "Mərkəzi Qərbi Avstraliya Standart Vaxtı", "AEST": "Şərqi Avstraliya Standart Vaxtı", "SAST": "Cənubi Afrika Vaxtı", "GFT": "Fransız Qvianası Vaxtı", "OEZ": "Şərqi Avropa Standart Vaxtı", "COST": "Kolumbiya Yay Vaxtı", "MST": "MST", "ADT": "Atlantik Yay Vaxtı", "AEDT": "Şərqi Avstraliya Yay Vaxtı", "MESZ": "Mərkəzi Avropa Yay Vaxtı", "NZST": "Yeni Zelandiya Standart Vaxtı", "EAT": "Şərqi Afrika Vaxtı", "HNNOMX": "Şimal-Qərbi Meksika Standart Vaxtı", "WESZ": "Qərbi Avropa Yay Vaxtı", "ART": "Argentina Standart Vaxtı", "ARST": "Argentina Yay Vaxtı", "HNOG": "Qərbi Qrenlandiya Standart Vaxtı", "AWST": "Qərbi Avstraliya Standart Vaxtı", "GMT": "Qrinviç Orta Vaxtı", "CST": "Şimali Mərkəzi Amerika Standart Vaxtı", "HAST": "Havay-Aleut Standart Vaxtı", "MEZ": "Mərkəzi Avropa Standart Vaxtı", "CAT": "Mərkəzi Afrika Vaxtı", "WAST": "Qərbi Afrika Yay Vaxtı", "SGT": "Sinqapur Vaxtı", "AST": "Atlantik Standart Vaxt", "SRT": "Surinam Vaxtı", "WEZ": "Qərbi Avropa Standart Vaxtı", "HNT": "Nyufaundlend Standart Vaxtı", "AWDT": "Qərbi Avstraliya Yay Vaxtı", "JDT": "Yaponiya Yay Vaxtı", "WART": "Qərbi Argentina Standart Vaxtı", "UYT": "Uruqvay Standart Vaxtı", "VET": "Venesuela Vaxtı", "PDT": "Şimali Amerika Sakit Okean Yay Vaxtı", "WITA": "Mərkəzi İndoneziya Vaxtı", "HNPM": "San Pier və Mikelon Standart Vaxtı", "CHADT": "Çatham Yay Vaxtı", "COT": "Kolumbiya Standart Vaxtı", "HAT": "Nyufaundlend Yay Vaxtı", "HKT": "Honq Konq Standart Vaxtı", "BOT": "Boliviya Vaxtı", "∅∅∅": "Azor Yay Vaxtı", "MDT": "MDT", "HADT": "Havay-Aleut Yay Vaxtı", "PST": "Şimali Amerika Sakit Okean Standart Vaxtı", "LHDT": "Lord Hau Yay vaxtı", "ECT": "Ekvador Vaxtı"}, -+ locale: "az_Latn", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MYT": "MYT", "BT": "BT", "CDT": "CDT", "MDT": "MDT", "LHST": "LHST", "JDT": "JDT", "HAT": "HAT", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "WAT": "WAT", "ADT": "ADT", "SRT": "SRT", "MESZ": "MESZ", "MST": "MST", "NZST": "NZST", "GMT": "GMT", "∅∅∅": "∅∅∅", "AEST": "AEST", "AEDT": "AEDT", "AKDT": "AKDT", "HNT": "HNT", "CHADT": "CHADT", "SGT": "SGT", "WITA": "WITA", "ACDT": "ACDT", "CLST": "CLST", "ART": "ART", "BOT": "BOT", "HNCU": "HNCU", "HECU": "HECU", "HEPMX": "HEPMX", "HEOG": "HEOG", "CAT": "CAT", "HAST": "HAST", "HADT": "HADT", "HNEG": "HNEG", "CLT": "CLT", "AST": "AST", "ChST": "ChST", "UYT": "UYT", "CHAST": "CHAST", "VET": "VET", "OESZ": "OESZ", "COST": "COST", "HENOMX": "HENOMX", "ACWST": "ACWST", "WESZ": "WESZ", "ECT": "ECT", "MEZ": "MEZ", "WART": "WART", "HKT": "HKT", "NZDT": "NZDT", "WIB": "WIB", "JST": "JST", "AKST": "AKST", "WARST": "WARST", "WIT": "WIT", "SAST": "SAST", "HKST": "HKST", "UYST": "UYST", "IST": "IST", "PST": "PST", "PDT": "PDT", "EST": "EST", "AWST": "AWST", "HEPM": "HEPM", "WAST": "WAST", "ACWDT": "ACWDT", "WEZ": "WEZ", "GFT": "GFT", "ACST": "ACST", "EDT": "EDT", "TMST": "TMST", "CST": "CST", "HNPM": "HNPM", "HNPMX": "HNPMX", "OEZ": "OEZ", "GYT": "GYT", "COT": "COT", "HEEG": "HEEG", "LHDT": "LHDT", "TMT": "TMT", "ARST": "ARST", "EAT": "EAT"}, - } - } -  -@@ -150,7 +127,7 @@ func (az *az_Latn) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (az *az_Latn) MonthsAbbreviated() []string { -- return az.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -160,7 +137,7 @@ func (az *az_Latn) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (az *az_Latn) MonthsNarrow() []string { -- return az.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -170,7 +147,7 @@ func (az *az_Latn) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (az *az_Latn) MonthsWide() []string { -- return az.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -216,73 +193,13 @@ func (az *az_Latn) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'az_Latn' and handles both Whole and Real numbers based on 'v' - func (az *az_Latn) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'az_Latn' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (az *az_Latn) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, az.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'az_Latn' -@@ -290,60 +207,7 @@ func (az *az_Latn) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := az.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, az.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Latn' -@@ -352,72 +216,7 @@ func (az *az_Latn) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := az.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyNegativePrefix[j]) -- } -- -- b = append(b, az.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, az.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'az_Latn' -@@ -425,27 +224,6 @@ func (az *az_Latn) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -454,17 +232,6 @@ func (az *az_Latn) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,17 +240,6 @@ func (az *az_Latn) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -492,20 +248,6 @@ func (az *az_Latn) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, az.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -514,19 +256,6 @@ func (az *az_Latn) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -535,26 +264,6 @@ func (az *az_Latn) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -563,30 +272,6 @@ func (az *az_Latn) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -595,34 +280,5 @@ func (az *az_Latn) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := az.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/az_Latn_AZ/az_Latn_AZ.go b/az_Latn_AZ/az_Latn_AZ.go -index e892d87..b9c0fca 100644 ---- a/az_Latn_AZ/az_Latn_AZ.go -+++ b/az_Latn_AZ/az_Latn_AZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type az_Latn_AZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'az_Latn_AZ' locale - func New() locales.Translator { - return &az_Latn_AZ{ -- locale: "az_Latn_AZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avq", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avqust", "sentyabr", "oktyabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"B.", "B.E.", "Ç.A.", "Ç.", "C.A.", "C.", "Ş."}, -- daysNarrow: []string{"7", "1", "2", "3", "4", "5", "6"}, -- daysShort: []string{"B.", "B.E.", "Ç.A.", "Ç.", "C.A.", "C.", "Ş."}, -- daysWide: []string{"bazar", "bazar ertəsi", "çərşənbə axşamı", "çərşənbə", "cümə axşamı", "cümə", "şənbə"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"e.ə.", "y.e."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"eramızdan əvvəl", "yeni era"}, -- timezones: map[string]string{"JDT": "Yaponiya Yay Vaxtı", "WIT": "Şərqi İndoneziya Vaxtı", "AEST": "Şərqi Avstraliya Standart Vaxtı", "CHAST": "Çatham Standart Vaxtı", "SAST": "Cənubi Afrika Vaxtı", "CLST": "Çili Yay Vaxtı", "COST": "Kolumbiya Yay Vaxtı", "UYT": "Uruqvay Standart Vaxtı", "AST": "Atlantik Standart Vaxt", "GFT": "Fransız Qvianası Vaxtı", "EST": "Şimali Şərqi Amerika Standart Vaxtı", "ACWDT": "Mərkəzi Qərbi Avstraliya Yay Vaxtı", "HEOG": "Qərbi Qrenlandiya Yay Vaxtı", "HNT": "Nyufaundlend Standart Vaxtı", "CLT": "Çili Standart Vaxtı", "ACST": "Mərkəzi Avstraliya Standart Vaxtı", "WARST": "Qərbi Argentina Yay Vaxtı", "HEPMX": "Meksika Sakit Okean Yay Vaxtı", "ADT": "Atlantik Yay Vaxtı", "MYT": "Malayziya Vaxtı", "BOT": "Boliviya Vaxtı", "VET": "Venesuela Vaxtı", "AWDT": "Qərbi Avstraliya Yay Vaxtı", "BT": "Butan Vaxtı", "ARST": "Argentina Yay Vaxtı", "CAT": "Mərkəzi Afrika Vaxtı", "COT": "Kolumbiya Standart Vaxtı", "HNCU": "Kuba Standart Vaxtı", "HNPMX": "Meksika Sakit Okean Standart Vaxtı", "AKST": "Alyaska Standart Vaxtı", "WIB": "Qərbi İndoneziya Vaxtı", "ChST": "Çamorro Vaxtı", "WAST": "Qərbi Afrika Yay Vaxtı", "OEZ": "Şərqi Avropa Standart Vaxtı", "UYST": "Uruqvay Yay Vaxtı", "NZST": "Yeni Zelandiya Standart Vaxtı", "SRT": "Surinam Vaxtı", "HNNOMX": "Şimal-Qərbi Meksika Standart Vaxtı", "SGT": "Sinqapur Vaxtı", "HECU": "Kuba Yay Vaxtı", "EDT": "Şimali Şərqi Amerika Yay Vaxtı", "MST": "MST", "HADT": "Havay-Aleut Yay Vaxtı", "MEZ": "Mərkəzi Avropa Standart Vaxtı", "IST": "Hindistan Vaxtı", "TMT": "Türkmənistan Standart Vaxtı", "OESZ": "Şərqi Avropa Yay Vaxtı", "ACWST": "Mərkəzi Qərbi Avstraliya Standart Vaxtı", "WITA": "Mərkəzi İndoneziya Vaxtı", "HEPM": "San Pier və Mikelon Yay Vaxtı", "∅∅∅": "Amazon Yay Vaxtı", "ART": "Argentina Standart Vaxtı", "LHST": "Lord Hau Standart Vaxtı", "CDT": "Şimali Mərkəzi Amerika Yay Vaxtı", "WESZ": "Qərbi Avropa Yay Vaxtı", "HKT": "Honq Konq Standart Vaxtı", "MESZ": "Mərkəzi Avropa Yay Vaxtı", "CHADT": "Çatham Yay Vaxtı", "AWST": "Qərbi Avstraliya Standart Vaxtı", "WAT": "Qərbi Afrika Standart Vaxtı", "WART": "Qərbi Argentina Standart Vaxtı", "HENOMX": "Şimal-Qərbi Meksika Yay Vaxtı", "AKDT": "Alyaska Yay Vaxtı", "GYT": "Qayana Vaxtı", "PST": "Şimali Amerika Sakit Okean Standart Vaxtı", "JST": "Yaponiya Standart Vaxtı", "HNEG": "Şərqi Qrenlandiya Standart Vaxtı", "TMST": "Türkmənistan Yay Vaxtı", "WEZ": "Qərbi Avropa Standart Vaxtı", "AEDT": "Şərqi Avstraliya Yay Vaxtı", "HEEG": "Şərqi Qrenlandiya Yay Vaxtı", "EAT": "Şərqi Afrika Vaxtı", "HAST": "Havay-Aleut Standart Vaxtı", "PDT": "Şimali Amerika Sakit Okean Yay Vaxtı", "LHDT": "Lord Hau Yay vaxtı", "NZDT": "Yeni Zelandiya Yay Vaxtı", "ACDT": "Mərkəzi Avstraliya Yay Vaxtı", "ECT": "Ekvador Vaxtı", "HAT": "Nyufaundlend Yay Vaxtı", "HNOG": "Qərbi Qrenlandiya Standart Vaxtı", "HKST": "Honq Konq Yay Vaxtı", "HNPM": "San Pier və Mikelon Standart Vaxtı", "GMT": "Qrinviç Orta Vaxtı", "MDT": "MDT", "CST": "Şimali Mərkəzi Amerika Standart Vaxtı"}, -+ locale: "az_Latn_AZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACST": "ACST", "IST": "IST", "AKDT": "AKDT", "WIT": "WIT", "GYT": "GYT", "CAT": "CAT", "CLST": "CLST", "NZST": "NZST", "PDT": "PDT", "UYST": "UYST", "WEZ": "WEZ", "HNPMX": "HNPMX", "OESZ": "OESZ", "HNT": "HNT", "MYT": "MYT", "AEST": "AEST", "UYT": "UYT", "∅∅∅": "∅∅∅", "JDT": "JDT", "HECU": "HECU", "OEZ": "OEZ", "CLT": "CLT", "GMT": "GMT", "ACWST": "ACWST", "HEPMX": "HEPMX", "AKST": "AKST", "HNOG": "HNOG", "TMST": "TMST", "AST": "AST", "ADT": "ADT", "ChST": "ChST", "EAT": "EAT", "LHDT": "LHDT", "HEPM": "HEPM", "WESZ": "WESZ", "COST": "COST", "CST": "CST", "MDT": "MDT", "EDT": "EDT", "TMT": "TMT", "CDT": "CDT", "HNNOMX": "HNNOMX", "AWST": "AWST", "JST": "JST", "CHAST": "CHAST", "VET": "VET", "WARST": "WARST", "HADT": "HADT", "MEZ": "MEZ", "HENOMX": "HENOMX", "HNPM": "HNPM", "PST": "PST", "HNCU": "HNCU", "NZDT": "NZDT", "AWDT": "AWDT", "ACWDT": "ACWDT", "WAT": "WAT", "WIB": "WIB", "HAST": "HAST", "ACDT": "ACDT", "WAST": "WAST", "SAST": "SAST", "MST": "MST", "ARST": "ARST", "WITA": "WITA", "HEEG": "HEEG", "LHST": "LHST", "BT": "BT", "AEDT": "AEDT", "SGT": "SGT", "GFT": "GFT", "EST": "EST", "HKST": "HKST", "MESZ": "MESZ", "HNEG": "HNEG", "CHADT": "CHADT", "HAT": "HAT", "COT": "COT", "HEOG": "HEOG", "HKT": "HKT", "SRT": "SRT", "WART": "WART", "ECT": "ECT", "ART": "ART", "BOT": "BOT"}, - } - } -  -@@ -112,9 +89,9 @@ func (az *az_Latn_AZ) OrdinalPluralRule(num float64, v uint64) locales.PluralRul -  - n := math.Abs(num) - i := int64(n) -- iMod1000 := i % 1000 - iMod10 := i % 10 - iMod100 := i % 100 -+ iMod1000 := i % 1000 -  - if (iMod10 == 1 || iMod10 == 2 || iMod10 == 5 || iMod10 == 7 || iMod10 == 8) || (iMod100 == 20 || iMod100 == 50 || iMod100 == 70 || iMod100 == 80) { - return locales.PluralRuleOne -@@ -150,7 +127,7 @@ func (az *az_Latn_AZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (az *az_Latn_AZ) MonthsAbbreviated() []string { -- return az.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -160,7 +137,7 @@ func (az *az_Latn_AZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (az *az_Latn_AZ) MonthsNarrow() []string { -- return az.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -170,7 +147,7 @@ func (az *az_Latn_AZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (az *az_Latn_AZ) MonthsWide() []string { -- return az.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -216,73 +193,13 @@ func (az *az_Latn_AZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'az_Latn_AZ' and handles both Whole and Real numbers based on 'v' - func (az *az_Latn_AZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'az_Latn_AZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (az *az_Latn_AZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, az.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'az_Latn_AZ' -@@ -290,60 +207,7 @@ func (az *az_Latn_AZ) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := az.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, az.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, az.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'az_Latn_AZ' -@@ -352,72 +216,7 @@ func (az *az_Latn_AZ) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := az.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, az.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, az.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyNegativePrefix[j]) -- } -- -- b = append(b, az.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(az.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, az.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, az.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'az_Latn_AZ' -@@ -425,27 +224,6 @@ func (az *az_Latn_AZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -454,17 +232,6 @@ func (az *az_Latn_AZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,17 +240,6 @@ func (az *az_Latn_AZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -492,20 +248,6 @@ func (az *az_Latn_AZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, az.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, az.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -514,19 +256,6 @@ func (az *az_Latn_AZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -535,26 +264,6 @@ func (az *az_Latn_AZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -563,30 +272,6 @@ func (az *az_Latn_AZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -595,34 +280,5 @@ func (az *az_Latn_AZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, az.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := az.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bas/bas.go b/bas/bas.go -index 7e9dd51..8e570a2 100644 ---- a/bas/bas.go -+++ b/bas/bas.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"b.Y.K", "m.Y.K"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"bisū bi Yesù Krǐstò", "i mbūs Yesù Krǐstò"}, -- timezones: map[string]string{"MESZ": "MESZ", "SAST": "SAST", "WARST": "WARST", "VET": "VET", "NZDT": "NZDT", "JDT": "JDT", "ACST": "ACST", "WAT": "WAT", "HECU": "HECU", "HNPMX": "HNPMX", "HKST": "HKST", "AST": "AST", "EST": "EST", "MST": "MST", "ART": "ART", "HNT": "HNT", "HKT": "HKT", "CHADT": "CHADT", "COST": "COST", "HENOMX": "HENOMX", "CST": "CST", "MEZ": "MEZ", "JST": "JST", "CLST": "CLST", "GMT": "GMT", "SRT": "SRT", "HNOG": "HNOG", "HAT": "HAT", "AWST": "AWST", "WITA": "WITA", "HEPM": "HEPM", "GYT": "GYT", "HADT": "HADT", "HEOG": "HEOG", "AKST": "AKST", "AEST": "AEST", "CHAST": "CHAST", "CLT": "CLT", "∅∅∅": "∅∅∅", "WAST": "WAST", "UYST": "UYST", "HAST": "HAST", "ACWST": "ACWST", "AEDT": "AEDT", "LHST": "LHST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "BT": "BT", "ARST": "ARST", "ChST": "ChST", "ECT": "ECT", "WESZ": "WESZ", "AWDT": "AWDT", "BOT": "BOT", "NZST": "NZST", "GFT": "GFT", "OEZ": "OEZ", "MYT": "MYT", "UYT": "UYT", "MDT": "MDT", "WIB": "WIB", "HNPM": "HNPM", "HNEG": "HNEG", "OESZ": "OESZ", "SGT": "SGT", "EDT": "EDT", "WIT": "WIT", "PST": "PST", "IST": "IST", "WART": "WART", "CDT": "CDT", "TMT": "TMT", "HEEG": "HEEG", "EAT": "EAT", "COT": "COT", "PDT": "PDT", "WEZ": "WEZ", "ACWDT": "ACWDT", "LHDT": "LHDT", "TMST": "TMST", "ACDT": "ACDT", "CAT": "CAT", "HNCU": "HNCU", "ADT": "ADT", "AKDT": "AKDT"}, -+ timezones: map[string]string{"ACST": "ACST", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "GFT": "GFT", "GYT": "GYT", "HEEG": "HEEG", "CHADT": "CHADT", "WARST": "WARST", "NZST": "NZST", "HADT": "HADT", "LHST": "LHST", "ACWDT": "ACWDT", "OEZ": "OEZ", "SAST": "SAST", "TMT": "TMT", "WITA": "WITA", "ACDT": "ACDT", "LHDT": "LHDT", "BT": "BT", "WAT": "WAT", "EDT": "EDT", "CLT": "CLT", "ART": "ART", "HNNOMX": "HNNOMX", "UYST": "UYST", "HEPM": "HEPM", "VET": "VET", "HECU": "HECU", "WAST": "WAST", "EST": "EST", "TMST": "TMST", "PDT": "PDT", "ADT": "ADT", "EAT": "EAT", "HAST": "HAST", "MEZ": "MEZ", "MYT": "MYT", "HNPM": "HNPM", "PST": "PST", "HNCU": "HNCU", "WIT": "WIT", "COT": "COT", "CAT": "CAT", "CST": "CST", "ACWST": "ACWST", "HKST": "HKST", "NZDT": "NZDT", "WIB": "WIB", "JST": "JST", "SGT": "SGT", "CLST": "CLST", "HEOG": "HEOG", "MDT": "MDT", "BOT": "BOT", "IST": "IST", "UYT": "UYT", "HAT": "HAT", "WART": "WART", "HNOG": "HNOG", "HNEG": "HNEG", "CHAST": "CHAST", "HEPMX": "HEPMX", "COST": "COST", "MESZ": "MESZ", "AEST": "AEST", "AKST": "AKST", "AST": "AST", "MST": "MST", "SRT": "SRT", "AWDT": "AWDT", "HKT": "HKT", "ECT": "ECT", "ChST": "ChST", "JDT": "JDT", "OESZ": "OESZ", "HNT": "HNT", "AWST": "AWST", "HNPMX": "HNPMX", "GMT": "GMT", "ARST": "ARST", "HENOMX": "HENOMX", "WEZ": "WEZ", "WESZ": "WESZ", "CDT": "CDT"}, - } - } -  -diff --git a/bas_CM/bas_CM.go b/bas_CM/bas_CM.go -index 89bed66..96e0325 100644 ---- a/bas_CM/bas_CM.go -+++ b/bas_CM/bas_CM.go -@@ -10,64 +10,45 @@ import ( - ) -  - type bas_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bas_CM' locale - func New() locales.Translator { - return &bas_CM{ -- locale: "bas_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "kɔn", "mac", "mat", "mto", "mpu", "hil", "nje", "hik", "dip", "bio", "may", "liɓ"}, -- monthsNarrow: []string{"", "k", "m", "m", "m", "m", "h", "n", "h", "d", "b", "m", "l"}, -- monthsWide: []string{"", "Kɔndɔŋ", "Màcɛ̂l", "Màtùmb", "Màtop", "M̀puyɛ", "Hìlòndɛ̀", "Njèbà", "Hìkaŋ", "Dìpɔ̀s", "Bìòôm", "Màyɛsèp", "Lìbuy li ńyèe"}, -- daysAbbreviated: []string{"nɔy", "nja", "uum", "ŋge", "mbɔ", "kɔɔ", "jon"}, -- daysNarrow: []string{"n", "n", "u", "ŋ", "m", "k", "j"}, -- daysWide: []string{"ŋgwà nɔ̂y", "ŋgwà njaŋgumba", "ŋgwà ûm", "ŋgwà ŋgê", "ŋgwà mbɔk", "ŋgwà kɔɔ", "ŋgwà jôn"}, -- periodsAbbreviated: []string{"I bikɛ̂glà", "I ɓugajɔp"}, -- periodsWide: []string{"I bikɛ̂glà", "I ɓugajɔp"}, -- erasAbbreviated: []string{"b.Y.K", "m.Y.K"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"bisū bi Yesù Krǐstò", "i mbūs Yesù Krǐstò"}, -- timezones: map[string]string{"SGT": "SGT", "MST": "MST", "HNT": "HNT", "HKT": "HKT", "WITA": "WITA", "ChST": "ChST", "HEEG": "HEEG", "ECT": "ECT", "CST": "CST", "EST": "EST", "BT": "BT", "HEPM": "HEPM", "NZST": "NZST", "MEZ": "MEZ", "WAST": "WAST", "COST": "COST", "UYST": "UYST", "AKST": "AKST", "ADT": "ADT", "PDT": "PDT", "ACWDT": "ACWDT", "HAT": "HAT", "SAST": "SAST", "TMT": "TMT", "WART": "WART", "HNPMX": "HNPMX", "AWST": "AWST", "AWDT": "AWDT", "HADT": "HADT", "WIT": "WIT", "COT": "COT", "AKDT": "AKDT", "AST": "AST", "HAST": "HAST", "CLST": "CLST", "GYT": "GYT", "VET": "VET", "HNPM": "HNPM", "ACWST": "ACWST", "ARST": "ARST", "MESZ": "MESZ", "CHADT": "CHADT", "CLT": "CLT", "ACDT": "ACDT", "WARST": "WARST", "HECU": "HECU", "ART": "ART", "IST": "IST", "HNNOMX": "HNNOMX", "GMT": "GMT", "WEZ": "WEZ", "HEPMX": "HEPMX", "WIB": "WIB", "PST": "PST", "WESZ": "WESZ", "JST": "JST", "JDT": "JDT", "ACST": "ACST", "HENOMX": "HENOMX", "HEOG": "HEOG", "GFT": "GFT", "TMST": "TMST", "AEST": "AEST", "BOT": "BOT", "WAT": "WAT", "OESZ": "OESZ", "LHDT": "LHDT", "HNOG": "HNOG", "CHAST": "CHAST", "OEZ": "OEZ", "EDT": "EDT", "CDT": "CDT", "SRT": "SRT", "HNEG": "HNEG", "EAT": "EAT", "AEDT": "AEDT", "NZDT": "NZDT", "∅∅∅": "∅∅∅", "CAT": "CAT", "MYT": "MYT", "UYT": "UYT", "HNCU": "HNCU", "MDT": "MDT", "HKST": "HKST", "LHST": "LHST"}, -+ locale: "bas_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKDT": "AKDT", "MST": "MST", "HNEG": "HNEG", "HEOG": "HEOG", "EST": "EST", "CLT": "CLT", "HEPM": "HEPM", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "GFT": "GFT", "ADT": "ADT", "HEEG": "HEEG", "AWST": "AWST", "HNPMX": "HNPMX", "GYT": "GYT", "TMT": "TMT", "MDT": "MDT", "ART": "ART", "AST": "AST", "HAST": "HAST", "JST": "JST", "LHST": "LHST", "UYT": "UYT", "HEPMX": "HEPMX", "OEZ": "OEZ", "OESZ": "OESZ", "CST": "CST", "PST": "PST", "WAST": "WAST", "HAT": "HAT", "SAST": "SAST", "EDT": "EDT", "HKST": "HKST", "NZST": "NZST", "HNPM": "HNPM", "UYST": "UYST", "HNOG": "HNOG", "GMT": "GMT", "LHDT": "LHDT", "WITA": "WITA", "NZDT": "NZDT", "AWDT": "AWDT", "HKT": "HKT", "JDT": "JDT", "VET": "VET", "WART": "WART", "WIB": "WIB", "ChST": "ChST", "EAT": "EAT", "IST": "IST", "HNCU": "HNCU", "ARST": "ARST", "BT": "BT", "HNT": "HNT", "WARST": "WARST", "MYT": "MYT", "PDT": "PDT", "SGT": "SGT", "AKST": "AKST", "COT": "COT", "CLST": "CLST", "MESZ": "MESZ", "AEDT": "AEDT", "CHAST": "CHAST", "HECU": "HECU", "WEZ": "WEZ", "WAT": "WAT", "COST": "COST", "ECT": "ECT", "CDT": "CDT", "ACST": "ACST", "TMST": "TMST", "SRT": "SRT", "HENOMX": "HENOMX", "MEZ": "MEZ", "ACWST": "ACWST", "AEST": "AEST", "WIT": "WIT", "CAT": "CAT", "BOT": "BOT", "HADT": "HADT", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "ACWDT": "ACWDT", "CHADT": "CHADT"}, - } - } -  -@@ -113,7 +94,7 @@ func (bas *bas_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bas *bas_CM) MonthsAbbreviated() []string { -- return bas.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (bas *bas_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bas *bas_CM) MonthsNarrow() []string { -- return bas.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (bas *bas_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bas *bas_CM) MonthsWide() []string { -- return bas.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,77 +160,13 @@ func (bas *bas_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bas_CM' and handles both Whole and Real numbers based on 'v' - func (bas *bas_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(bas.group) - 1; j >= 0; j-- { -- b = append(b, bas.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bas.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bas_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bas *bas_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bas.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bas.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bas.percentSuffix...) -- -- b = append(b, bas.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bas_CM' -@@ -257,58 +174,7 @@ func (bas *bas_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bas.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(bas.group) - 1; j >= 0; j-- { -- b = append(b, bas.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bas.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bas.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, bas.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bas_CM' -@@ -317,65 +183,7 @@ func (bas *bas_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bas.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(bas.group) - 1; j >= 0; j-- { -- b = append(b, bas.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bas.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bas.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bas.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, bas.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bas_CM' -@@ -383,17 +191,6 @@ func (bas *bas_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -402,17 +199,6 @@ func (bas *bas_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bas.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -421,17 +207,6 @@ func (bas *bas_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bas.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,19 +215,6 @@ func (bas *bas_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bas.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bas.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,19 +223,6 @@ func (bas *bas_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -482,26 +231,6 @@ func (bas *bas_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -510,30 +239,6 @@ func (bas *bas_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -542,34 +247,5 @@ func (bas *bas_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bas.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/be/be.go b/be/be.go -index b1bcad1..a9f91f3 100644 ---- a/be/be.go -+++ b/be/be.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"да н.э.", "н.э."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"да нараджэння Хрыстова", "ад нараджэння Хрыстова"}, -- timezones: map[string]string{"MST": "MST", "UYST": "Уругвайскі летні час", "CHAST": "Стандартны час Чатэма", "CLST": "Чылійскі летні час", "ChST": "Час Чамора", "HEOG": "Летні час Заходняй Грэнландыі", "GMT": "Час па Грынвічы", "UYT": "Уругвайскі стандартны час", "HNT": "Ньюфаўндлендскі стандартны час", "HKT": "Стандартны час Ганконга", "LHDT": "Летні час Лорд-Хау", "TMT": "Стандартны час Туркменістана", "TMST": "Летні час Туркменістана", "WART": "Стандартны час Заходняй Аргенціны", "CDT": "Паўночнаамерыканскі цэнтральны летні час", "IST": "Час Індыі", "OEZ": "Усходнееўрапейскі стандартны час", "GYT": "Час Гаяны", "ADT": "Атлантычны летні час", "WEZ": "Заходнееўрапейскі стандартны час", "AWST": "Стандартны час заходняй Аўстраліі", "ACDT": "Летні час цэнтральнай Аўстраліі", "HENOMX": "Паўночна-заходні мексіканскі летні час", "HNPMX": "Мексіканскі ціхаакіянскі стандатны час", "ACWDT": "Заходні летні час Цэнтральнай Аўстраліі", "CLT": "Чылійскі стандартны час", "OESZ": "Усходнееўрапейскі летні час", "BT": "Час Бутана", "SRT": "Час Сурынама", "AEST": "Стандартны час усходняй Аўстраліі", "HKST": "Летні час Ганконга", "∅∅∅": "Амазонскі летні час", "ECT": "Эквадорскі час", "EDT": "Паўночнаамерыканскі ўсходні летні час", "ARST": "Аргенцінскі летні час", "MESZ": "Цэнтральнаеўрапейскі летні час", "HEEG": "Летні час Усходняй Грэнландыі", "SGT": "Сінгапурскі час", "ART": "Аргенцінскі стандартны час", "AKST": "Стандартны час Аляскі", "NZST": "Стандартны час Новай Зеландыі", "CHADT": "Летні час Чатэма", "GFT": "Час Французскай Гвіяны", "HEPMX": "Мексіканскі ціхаакіянскі летні час", "CAT": "Цэнтральнаафрыканскі час", "EAT": "Усходнеафрыканскі час", "AKDT": "Летні час Аляскі", "AST": "Атлантычны стандартны час", "WIT": "Усходнеінданезійскі час", "HNOG": "Стандартны час Заходняй Грэнландыі", "JDT": "Летні час Японіі", "BOT": "Балівійскі час", "PST": "Ціхаакіянскі стандартны час", "WESZ": "Заходнееўрапейскі летні час", "MYT": "Час Малайзіі", "ACWST": "Заходні стандартны час Цэнтральнай Аўстраліі", "COT": "Калумбійскі стандартны час", "EST": "Паўночнаамерыканскі ўсходні стандартны час", "HECU": "Летні час Кубы", "CST": "Паўночнаамерыканскі цэнтральны стандартны час", "AEDT": "Летні час усходняй Аўстраліі", "HNPM": "Стандартны час Сен-П’ер і Мікелон", "SAST": "Паўднёваафрыканскі час", "WAST": "Заходнеафрыканскі летні час", "HAST": "Гавайска-Алеуцкі стандартны час", "HADT": "Гавайска-Алеуцкі летні час", "AWDT": "Летні час заходняй Аўстраліі", "HEPM": "Стандартны летні час Сен-П’ер і Мікелон", "JST": "Стандартны час Японіі", "ACST": "Стандартны час цэнтральнай Аўстраліі", "WARST": "Летні час Заходняй Аргенціны", "COST": "Калумбійскі летні час", "HNCU": "Стандартны час Кубы", "HAT": "Ньюфаўндлендскі летні час", "WITA": "Цэнтральнаінданезійскі час", "MEZ": "Цэнтральнаеўрапейскі стандартны час", "HNEG": "Стандартны час Усходняй Грэнландыі", "WAT": "Заходнеафрыканскі стандартны час", "WIB": "Заходнеінданезійскі час", "VET": "Венесуэльскі час", "PDT": "Ціхаакіянскі летні час", "LHST": "Стандартны час Лорд-Хау", "NZDT": "Летні час Новай Зеландыі", "HNNOMX": "Паўночна-заходні мексіканскі стандартны час", "MDT": "MDT"}, -+ timezones: map[string]string{"EDT": "Паўночнаамерыканскі ўсходні летні час", "TMST": "Летні час Туркменістана", "CLST": "Чылійскі летні час", "HEPM": "Стандартны летні час Сен-П’ер і Мікелон", "∅∅∅": "∅∅∅", "ACWST": "Заходні стандартны час Цэнтральнай Аўстраліі", "ACWDT": "Заходні летні час Цэнтральнай Аўстраліі", "HAT": "Ньюфаўндлендскі летні час", "CST": "Паўночнаамерыканскі цэнтральны стандартны час", "MDT": "MDT", "EAT": "Усходнеафрыканскі час", "ACDT": "Летні час цэнтральнай Аўстраліі", "AEDT": "Летні час усходняй Аўстраліі", "GFT": "Час Французскай Гвіяны", "ChST": "Час Чамора", "ART": "Аргенцінскі стандартны час", "MEZ": "Цэнтральнаеўрапейскі стандартны час", "CHAST": "Стандартны час Чатэма", "UYT": "Уругвайскі стандартны час", "WARST": "Летні час Заходняй Аргенціны", "CDT": "Паўночнаамерыканскі цэнтральны летні час", "HNNOMX": "Паўночна-заходні мексіканскі стандартны час", "HNPMX": "Мексіканскі ціхаакіянскі стандатны час", "AST": "Атлантычны стандартны час", "LHST": "Стандартны час Лорд-Хау", "IST": "Час Індыі", "GYT": "Час Гаяны", "ECT": "Эквадорскі час", "SRT": "Час Сурынама", "CHADT": "Летні час Чатэма", "BT": "Час Бутана", "AEST": "Стандартны час усходняй Аўстраліі", "COST": "Калумбійскі летні час", "CLT": "Чылійскі стандартны час", "HNPM": "Стандартны час Сен-П’ер і Мікелон", "AKDT": "Летні час Аляскі", "WIT": "Усходнеінданезійскі час", "MST": "MST", "COT": "Калумбійскі стандартны час", "HEOG": "Летні час Заходняй Грэнландыі", "HENOMX": "Паўночна-заходні мексіканскі летні час", "HECU": "Летні час Кубы", "HEPMX": "Мексіканскі ціхаакіянскі летні час", "WAST": "Заходнеафрыканскі летні час", "OESZ": "Усходнееўрапейскі летні час", "HNEG": "Стандартны час Усходняй Грэнландыі", "LHDT": "Летні час Лорд-Хау", "AKST": "Стандартны час Аляскі", "EST": "Паўночнаамерыканскі ўсходні стандартны час", "ARST": "Аргенцінскі летні час", "MYT": "Час Малайзіі", "WESZ": "Заходнееўрапейскі летні час", "VET": "Венесуэльскі час", "HKT": "Стандартны час Ганконга", "BOT": "Балівійскі час", "AWST": "Стандартны час заходняй Аўстраліі", "UYST": "Уругвайскі летні час", "HNT": "Ньюфаўндлендскі стандартны час", "HAST": "Гавайска-Алеуцкі стандартны час", "JST": "Стандартны час Японіі", "SGT": "Сінгапурскі час", "HNOG": "Стандартны час Заходняй Грэнландыі", "CAT": "Цэнтральнаафрыканскі час", "WEZ": "Заходнееўрапейскі стандартны час", "WAT": "Заходнеафрыканскі стандартны час", "NZDT": "Летні час Новай Зеландыі", "GMT": "Час па Грынвічы", "ACST": "Стандартны час цэнтральнай Аўстраліі", "PST": "Ціхаакіянскі стандартны час", "WART": "Стандартны час Заходняй Аргенціны", "TMT": "Стандартны час Туркменістана", "NZST": "Стандартны час Новай Зеландыі", "JDT": "Летні час Японіі", "PDT": "Ціхаакіянскі летні час", "OEZ": "Усходнееўрапейскі стандартны час", "SAST": "Паўднёваафрыканскі час", "WIB": "Заходнеінданезійскі час", "WITA": "Цэнтральнаінданезійскі час", "ADT": "Атлантычны летні час", "HADT": "Гавайска-Алеуцкі летні час", "MESZ": "Цэнтральнаеўрапейскі летні час", "HEEG": "Летні час Усходняй Грэнландыі", "AWDT": "Летні час заходняй Аўстраліі", "HNCU": "Стандартны час Кубы", "HKST": "Летні час Ганконга"}, - } - } -  -@@ -101,8 +101,8 @@ func (be *be) PluralsRange() []locales.PluralRule { - func (be *be) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -diff --git a/be_BY/be_BY.go b/be_BY/be_BY.go -index 9405a4c..5a302a3 100644 ---- a/be_BY/be_BY.go -+++ b/be_BY/be_BY.go -@@ -10,70 +10,45 @@ import ( - ) -  - type be_BY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'be_BY' locale - func New() locales.Translator { - return &be_BY{ -- locale: "be_BY", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{4, 6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "сту", "лют", "сак", "кра", "мая", "чэр", "ліп", "жні", "вер", "кас", "ліс", "сне"}, -- monthsNarrow: []string{"", "с", "л", "с", "к", "м", "ч", "л", "ж", "в", "к", "л", "с"}, -- monthsWide: []string{"", "студзеня", "лютага", "сакавіка", "красавіка", "мая", "чэрвеня", "ліпеня", "жніўня", "верасня", "кастрычніка", "лістапада", "снежня"}, -- daysAbbreviated: []string{"нд", "пн", "аў", "ср", "чц", "пт", "сб"}, -- daysNarrow: []string{"н", "п", "а", "с", "ч", "п", "с"}, -- daysShort: []string{"нд", "пн", "аў", "ср", "чц", "пт", "сб"}, -- daysWide: []string{"нядзеля", "панядзелак", "аўторак", "серада", "чацвер", "пятніца", "субота"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"да н.э.", "н.э."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"да нараджэння Хрыстова", "ад нараджэння Хрыстова"}, -- timezones: map[string]string{"COST": "Калумбійскі летні час", "AKDT": "Летні час Аляскі", "ARST": "Аргенцінскі летні час", "ACST": "Стандартны час цэнтральнай Аўстраліі", "SAST": "Паўднёваафрыканскі час", "EAT": "Усходнеафрыканскі час", "HNPMX": "Мексіканскі ціхаакіянскі стандатны час", "ART": "Аргенцінскі стандартны час", "AWST": "Стандартны час заходняй Аўстраліі", "LHST": "Стандартны час Лорд-Хау", "MEZ": "Цэнтральнаеўрапейскі стандартны час", "JDT": "Летні час Японіі", "HNEG": "Стандартны час Усходняй Грэнландыі", "HENOMX": "Паўночна-заходні мексіканскі летні час", "SGT": "Сінгапурскі час", "ACWST": "Заходні стандартны час Цэнтральнай Аўстраліі", "LHDT": "Летні час Лорд-Хау", "NZDT": "Летні час Новай Зеландыі", "HAT": "Ньюфаўндлендскі летні час", "AWDT": "Летні час заходняй Аўстраліі", "HEPM": "Стандартны летні час Сен-П’ер і Мікелон", "BOT": "Балівійскі час", "HEEG": "Летні час Усходняй Грэнландыі", "CDT": "Паўночнаамерыканскі цэнтральны летні час", "HAST": "Гавайска-Алеуцкі стандартны час", "BT": "Час Бутана", "CAT": "Цэнтральнаафрыканскі час", "WARST": "Летні час Заходняй Аргенціны", "EST": "Паўночнаамерыканскі ўсходні стандартны час", "OESZ": "Усходнееўрапейскі летні час", "GMT": "Час па Грынвічы", "UYST": "Уругвайскі летні час", "PDT": "Ціхаакіянскі летні час", "IST": "Час Індыі", "CHADT": "Летні час Чатэма", "OEZ": "Усходнееўрапейскі стандартны час", "ECT": "Эквадорскі час", "CST": "Паўночнаамерыканскі цэнтральны стандартны час", "WESZ": "Заходнееўрапейскі летні час", "AEDT": "Летні час усходняй Аўстраліі", "WEZ": "Заходнееўрапейскі стандартны час", "HECU": "Летні час Кубы", "HEPMX": "Мексіканскі ціхаакіянскі летні час", "JST": "Стандартны час Японіі", "GFT": "Час Французскай Гвіяны", "ACWDT": "Заходні летні час Цэнтральнай Аўстраліі", "HNT": "Ньюфаўндлендскі стандартны час", "NZST": "Стандартны час Новай Зеландыі", "TMST": "Летні час Туркменістана", "ACDT": "Летні час цэнтральнай Аўстраліі", "HNCU": "Стандартны час Кубы", "MST": "Паўночнаамерыканскі горны стандартны час", "HADT": "Гавайска-Алеуцкі летні час", "∅∅∅": "Амазонскі летні час", "MYT": "Час Малайзіі", "MDT": "Паўночнаамерыканскі горны летні час", "MESZ": "Цэнтральнаеўрапейскі летні час", "TMT": "Стандартны час Туркменістана", "WAT": "Заходнеафрыканскі стандартны час", "UYT": "Уругвайскі стандартны час", "VET": "Венесуэльскі час", "HKST": "Летні час Ганконга", "CHAST": "Стандартны час Чатэма", "WAST": "Заходнеафрыканскі летні час", "PST": "Ціхаакіянскі стандартны час", "WITA": "Цэнтральнаінданезійскі час", "HNPM": "Стандартны час Сен-П’ер і Мікелон", "AEST": "Стандартны час усходняй Аўстраліі", "CLST": "Чылійскі летні час", "ChST": "Час Чамора", "WART": "Стандартны час Заходняй Аргенціны", "GYT": "Час Гаяны", "HEOG": "Летні час Заходняй Грэнландыі", "HKT": "Стандартны час Ганконга", "ADT": "Атлантычны летні час", "HNNOMX": "Паўночна-заходні мексіканскі стандартны час", "EDT": "Паўночнаамерыканскі ўсходні летні час", "HNOG": "Стандартны час Заходняй Грэнландыі", "CLT": "Чылійскі стандартны час", "COT": "Калумбійскі стандартны час", "AKST": "Стандартны час Аляскі", "AST": "Атлантычны стандартны час", "WIT": "Усходнеінданезійскі час", "WIB": "Заходнеінданезійскі час", "SRT": "Час Сурынама"}, -+ locale: "be_BY", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{4, 6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKDT": "AKDT", "HAT": "HAT", "HEOG": "HEOG", "HAST": "HAST", "HECU": "HECU", "HNPMX": "HNPMX", "HNT": "HNT", "CAT": "CAT", "CLST": "CLST", "ACWDT": "ACWDT", "AEDT": "AEDT", "GFT": "GFT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "CLT": "CLT", "JDT": "JDT", "GYT": "GYT", "HEPM": "HEPM", "CHADT": "CHADT", "PST": "PST", "ACWST": "ACWST", "HKT": "HKT", "ARST": "ARST", "AWDT": "AWDT", "HNEG": "HNEG", "JST": "JST", "AKST": "AKST", "WART": "WART", "HNOG": "HNOG", "TMT": "TMT", "MDT": "MDT", "AST": "AST", "TMST": "TMST", "AWST": "AWST", "WITA": "WITA", "GMT": "GMT", "HNNOMX": "HNNOMX", "WARST": "WARST", "EST": "EST", "BOT": "BOT", "UYST": "UYST", "EDT": "EDT", "UYT": "UYT", "WAST": "WAST", "SGT": "SGT", "CDT": "CDT", "WEZ": "WEZ", "HENOMX": "HENOMX", "BT": "BT", "HNCU": "HNCU", "COT": "COT", "ECT": "ECT", "SRT": "SRT", "CHAST": "CHAST", "WAT": "WAT", "OEZ": "OEZ", "WIT": "WIT", "MST": "MST", "NZDT": "NZDT", "ACDT": "ACDT", "HEEG": "HEEG", "MYT": "MYT", "PDT": "PDT", "WESZ": "WESZ", "OESZ": "OESZ", "CST": "CST", "MESZ": "MESZ", "ACST": "ACST", "LHDT": "LHDT", "AEST": "AEST", "HEPMX": "HEPMX", "SAST": "SAST", "NZST": "NZST", "HADT": "HADT", "LHST": "LHST", "IST": "IST", "VET": "VET", "ADT": "ADT", "EAT": "EAT", "ART": "ART", "MEZ": "MEZ", "COST": "COST", "HKST": "HKST", "WIB": "WIB", "ChST": "ChST"}, - } - } -  -@@ -178,7 +153,7 @@ func (be *be_BY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (be *be_BY) MonthsAbbreviated() []string { -- return be.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -188,7 +163,7 @@ func (be *be_BY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (be *be_BY) MonthsNarrow() []string { -- return be.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -198,7 +173,7 @@ func (be *be_BY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (be *be_BY) MonthsWide() []string { -- return be.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -244,77 +219,13 @@ func (be *be_BY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'be_BY' and handles both Whole and Real numbers based on 'v' - func (be *be_BY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, be.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(be.group) - 1; j >= 0; j-- { -- b = append(b, be.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, be.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'be_BY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (be *be_BY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, be.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, be.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, be.percentSuffix...) -- -- b = append(b, be.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'be_BY' -@@ -322,58 +233,7 @@ func (be *be_BY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := be.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, be.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(be.group) - 1; j >= 0; j-- { -- b = append(b, be.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, be.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, be.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, be.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'be_BY' -@@ -382,65 +242,7 @@ func (be *be_BY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := be.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, be.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(be.group) - 1; j >= 0; j-- { -- b = append(b, be.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, be.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, be.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, be.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, be.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'be_BY' -@@ -448,23 +250,6 @@ func (be *be_BY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -473,23 +258,6 @@ func (be *be_BY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,20 +266,6 @@ func (be *be_BY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, be.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -520,22 +274,6 @@ func (be *be_BY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, be.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, be.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -544,19 +282,6 @@ func (be *be_BY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -565,26 +290,6 @@ func (be *be_BY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -593,30 +298,6 @@ func (be *be_BY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -625,34 +306,5 @@ func (be *be_BY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, be.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := be.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bem/bem.go b/bem/bem.go -index 4cadeaa..0f3f862 100644 ---- a/bem/bem.go -+++ b/bem/bem.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Before Yesu", "After Yesu"}, -- timezones: map[string]string{"MEZ": "MEZ", "CLT": "CLT", "CLST": "CLST", "HNNOMX": "HNNOMX", "SGT": "SGT", "WIB": "WIB", "∅∅∅": "∅∅∅", "BOT": "BOT", "HNEG": "HNEG", "GFT": "GFT", "HNCU": "HNCU", "AST": "AST", "AKST": "AKST", "HAST": "HAST", "AEST": "AEST", "LHST": "LHST", "OEZ": "OEZ", "COT": "COT", "GMT": "GMT", "UYST": "UYST", "ART": "ART", "CHAST": "CHAST", "CHADT": "CHADT", "JDT": "JDT", "HNOG": "HNOG", "ChST": "ChST", "WART": "WART", "COST": "COST", "HECU": "HECU", "ADT": "ADT", "HADT": "HADT", "WIT": "WIT", "AWST": "AWST", "HEEG": "HEEG", "MDT": "MDT", "HEPMX": "HEPMX", "GYT": "GYT", "BT": "BT", "PDT": "PDT", "HAT": "HAT", "ACDT": "ACDT", "EST": "EST", "EDT": "EDT", "CDT": "CDT", "PST": "PST", "HEOG": "HEOG", "WAST": "WAST", "MST": "MST", "ECT": "ECT", "ACWST": "ACWST", "ACWDT": "ACWDT", "HNT": "HNT", "HNPM": "HNPM", "NZDT": "NZDT", "JST": "JST", "ACST": "ACST", "WESZ": "WESZ", "HKT": "HKT", "TMST": "TMST", "CAT": "CAT", "WARST": "WARST", "UYT": "UYT", "AEDT": "AEDT", "SAST": "SAST", "AKDT": "AKDT", "CST": "CST", "MYT": "MYT", "ARST": "ARST", "MESZ": "MESZ", "EAT": "EAT", "HKST": "HKST", "WITA": "WITA", "NZST": "NZST", "WAT": "WAT", "HNPMX": "HNPMX", "SRT": "SRT", "AWDT": "AWDT", "LHDT": "LHDT", "HENOMX": "HENOMX", "VET": "VET", "TMT": "TMT", "WEZ": "WEZ", "HEPM": "HEPM", "IST": "IST", "OESZ": "OESZ"}, -+ timezones: map[string]string{"GYT": "GYT", "EST": "EST", "CDT": "CDT", "HEPM": "HEPM", "LHST": "LHST", "WEZ": "WEZ", "MEZ": "MEZ", "HNPM": "HNPM", "HNT": "HNT", "HAT": "HAT", "WARST": "WARST", "HNOG": "HNOG", "CLT": "CLT", "EAT": "EAT", "HNCU": "HNCU", "OEZ": "OEZ", "TMT": "TMT", "ARST": "ARST", "COST": "COST", "CST": "CST", "AST": "AST", "SGT": "SGT", "ADT": "ADT", "HADT": "HADT", "MESZ": "MESZ", "PDT": "PDT", "VET": "VET", "GFT": "GFT", "ECT": "ECT", "ChST": "ChST", "AWDT": "AWDT", "HKT": "HKT", "NZST": "NZST", "HNNOMX": "HNNOMX", "UYT": "UYT", "ACWST": "ACWST", "HNPMX": "HNPMX", "EDT": "EDT", "WITA": "WITA", "ART": "ART", "ACST": "ACST", "JST": "JST", "LHDT": "LHDT", "AEST": "AEST", "IST": "IST", "WIT": "WIT", "HKST": "HKST", "MST": "MST", "NZDT": "NZDT", "GMT": "GMT", "BOT": "BOT", "ACWDT": "ACWDT", "AEDT": "AEDT", "AKST": "AKST", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "TMST": "TMST", "CLST": "CLST", "HNEG": "HNEG", "HECU": "HECU", "SAST": "SAST", "CHAST": "CHAST", "CHADT": "CHADT", "AKDT": "AKDT", "COT": "COT", "JDT": "JDT", "HEPMX": "HEPMX", "WESZ": "WESZ", "WAST": "WAST", "AWST": "AWST", "MYT": "MYT", "UYST": "UYST", "PST": "PST", "BT": "BT", "OESZ": "OESZ", "CAT": "CAT", "ACDT": "ACDT", "HENOMX": "HENOMX", "HEEG": "HEEG", "WAT": "WAT", "WART": "WART", "WIB": "WIB", "MDT": "MDT", "SRT": "SRT", "HAST": "HAST"}, - } - } -  -diff --git a/bem_ZM/bem_ZM.go b/bem_ZM/bem_ZM.go -index 212cd07..f6ce501 100644 ---- a/bem_ZM/bem_ZM.go -+++ b/bem_ZM/bem_ZM.go -@@ -10,58 +10,45 @@ import ( - ) -  - type bem_ZM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bem_ZM' locale - func New() locales.Translator { - return &bem_ZM{ -- locale: "bem_ZM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Epr", "Mei", "Jun", "Jul", "Oga", "Sep", "Okt", "Nov", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "E", "M", "J", "J", "O", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Epreo", "Mei", "Juni", "Julai", "Ogasti", "Septemba", "Oktoba", "Novemba", "Disemba"}, -- daysWide: []string{"Pa Mulungu", "Palichimo", "Palichibuli", "Palichitatu", "Palichine", "Palichisano", "Pachibelushi"}, -- periodsAbbreviated: []string{"uluchelo", "akasuba"}, -- periodsWide: []string{"uluchelo", "akasuba"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Before Yesu", "After Yesu"}, -- timezones: map[string]string{"NZST": "NZST", "GYT": "GYT", "UYST": "UYST", "WIB": "WIB", "AEDT": "AEDT", "WAST": "WAST", "HNOG": "HNOG", "PST": "PST", "ACWDT": "ACWDT", "VET": "VET", "HEOG": "HEOG", "AEST": "AEST", "AWST": "AWST", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AST": "AST", "PDT": "PDT", "HECU": "HECU", "HAST": "HAST", "HNPM": "HNPM", "MESZ": "MESZ", "LHDT": "LHDT", "HNEG": "HNEG", "ACDT": "ACDT", "OESZ": "OESZ", "TMT": "TMT", "AWDT": "AWDT", "EST": "EST", "MYT": "MYT", "ART": "ART", "CHADT": "CHADT", "CLT": "CLT", "ChST": "ChST", "MEZ": "MEZ", "JDT": "JDT", "GMT": "GMT", "HEPMX": "HEPMX", "WESZ": "WESZ", "HKT": "HKT", "IST": "IST", "TMST": "TMST", "ARST": "ARST", "HEPM": "HEPM", "HNPMX": "HNPMX", "UYT": "UYT", "AKDT": "AKDT", "BT": "BT", "HNT": "HNT", "CAT": "CAT", "EAT": "EAT", "MST": "MST", "CST": "CST", "AKST": "AKST", "WIT": "WIT", "ECT": "ECT", "MDT": "MDT", "LHST": "LHST", "NZDT": "NZDT", "JST": "JST", "CLST": "CLST", "BOT": "BOT", "ACST": "ACST", "ADT": "ADT", "HADT": "HADT", "CDT": "CDT", "WEZ": "WEZ", "ACWST": "ACWST", "CHAST": "CHAST", "WAT": "WAT", "SRT": "SRT", "HAT": "HAT", "COST": "COST", "HENOMX": "HENOMX", "WITA": "WITA", "HKST": "HKST", "GFT": "GFT", "OEZ": "OEZ", "WARST": "WARST", "COT": "COT", "EDT": "EDT", "SAST": "SAST", "WART": "WART", "SGT": "SGT", "HNCU": "HNCU"}, -+ locale: "bem_ZM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "HKST": "HKST", "WAST": "WAST", "AKDT": "AKDT", "HAT": "HAT", "EST": "EST", "HKT": "HKT", "MESZ": "MESZ", "AWDT": "AWDT", "HNPM": "HNPM", "HECU": "HECU", "HNPMX": "HNPMX", "WART": "WART", "EDT": "EDT", "GMT": "GMT", "ChST": "ChST", "HEPM": "HEPM", "SGT": "SGT", "WAT": "WAT", "GFT": "GFT", "MDT": "MDT", "AST": "AST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "PST": "PST", "CLST": "CLST", "NZST": "NZST", "ECT": "ECT", "AWST": "AWST", "MYT": "MYT", "HEPMX": "HEPMX", "OESZ": "OESZ", "WIB": "WIB", "HNEG": "HNEG", "PDT": "PDT", "CHAST": "CHAST", "WEZ": "WEZ", "HEOG": "HEOG", "NZDT": "NZDT", "HENOMX": "HENOMX", "SRT": "SRT", "MEZ": "MEZ", "WESZ": "WESZ", "COST": "COST", "ARST": "ARST", "BOT": "BOT", "HAST": "HAST", "HEEG": "HEEG", "HNCU": "HNCU", "SAST": "SAST", "HNOG": "HNOG", "EAT": "EAT", "JDT": "JDT", "UYT": "UYT", "AKST": "AKST", "BT": "BT", "AEDT": "AEDT", "WIT": "WIT", "CAT": "CAT", "CST": "CST", "ART": "ART", "LHST": "LHST", "IST": "IST", "UYST": "UYST", "WARST": "WARST", "GYT": "GYT", "TMT": "TMT", "WITA": "WITA", "ACWST": "ACWST", "ACWDT": "ACWDT", "OEZ": "OEZ", "COT": "COT", "MST": "MST", "ADT": "ADT", "LHDT": "LHDT", "JST": "JST", "AEST": "AEST", "TMST": "TMST", "CLT": "CLT", "CDT": "CDT", "HADT": "HADT", "VET": "VET", "∅∅∅": "∅∅∅", "ACST": "ACST", "CHADT": "CHADT"}, - } - } -  -@@ -114,7 +101,7 @@ func (bem *bem_ZM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bem *bem_ZM) MonthsAbbreviated() []string { -- return bem.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -124,7 +111,7 @@ func (bem *bem_ZM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bem *bem_ZM) MonthsNarrow() []string { -- return bem.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -134,7 +121,7 @@ func (bem *bem_ZM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bem *bem_ZM) MonthsWide() []string { -- return bem.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,56 +181,7 @@ func (bem *bem_ZM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bem.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bem.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bem.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, bem.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bem.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bem_ZM' -@@ -252,68 +190,7 @@ func (bem *bem_ZM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bem.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bem.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bem.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, bem.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bem.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bem.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bem_ZM' -@@ -321,27 +198,6 @@ func (bem *bem_ZM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -350,17 +206,6 @@ func (bem *bem_ZM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bem.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -369,17 +214,6 @@ func (bem *bem_ZM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bem.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -388,19 +222,6 @@ func (bem *bem_ZM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bem.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bem.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -409,28 +230,6 @@ func (bem *bem_ZM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bem.periodsAbbreviated[0]...) -- } else { -- b = append(b, bem.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -439,35 +238,6 @@ func (bem *bem_ZM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bem.periodsAbbreviated[0]...) -- } else { -- b = append(b, bem.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -476,40 +246,6 @@ func (bem *bem_ZM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bem.periodsAbbreviated[0]...) -- } else { -- b = append(b, bem.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -518,44 +254,5 @@ func (bem *bem_ZM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bem.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bem.periodsAbbreviated[0]...) -- } else { -- b = append(b, bem.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bem.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bez/bez.go b/bez/bez.go -index 7cceeea..d41abad 100644 ---- a/bez/bez.go -+++ b/bez/bez.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KM", "BM"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Mtwaa", "Baada ya Mtwaa"}, -- timezones: map[string]string{"MESZ": "MESZ", "JST": "JST", "SGT": "SGT", "SRT": "SRT", "WEZ": "WEZ", "ACWST": "ACWST", "AWDT": "AWDT", "LHDT": "LHDT", "BOT": "BOT", "ACST": "ACST", "WIB": "WIB", "AEST": "AEST", "WITA": "WITA", "COST": "COST", "HEPMX": "HEPMX", "CDT": "CDT", "PST": "PST", "HNOG": "HNOG", "ACDT": "ACDT", "OESZ": "OESZ", "GMT": "GMT", "LHST": "LHST", "∅∅∅": "∅∅∅", "HENOMX": "HENOMX", "AKST": "AKST", "CST": "CST", "VET": "VET", "HEOG": "HEOG", "GFT": "GFT", "GYT": "GYT", "ACWDT": "ACWDT", "CLT": "CLT", "ECT": "ECT", "HADT": "HADT", "WIT": "WIT", "HKST": "HKST", "TMT": "TMT", "WAST": "WAST", "OEZ": "OEZ", "UYST": "UYST", "IST": "IST", "HNEG": "HNEG", "CAT": "CAT", "HNCU": "HNCU", "HECU": "HECU", "EST": "EST", "MST": "MST", "HEEG": "HEEG", "WARST": "WARST", "HEPM": "HEPM", "TMST": "TMST", "AST": "AST", "UYT": "UYT", "ART": "ART", "AEDT": "AEDT", "CHAST": "CHAST", "WAT": "WAT", "WART": "WART", "MYT": "MYT", "HNPM": "HNPM", "NZST": "NZST", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "MDT": "MDT", "HNPMX": "HNPMX", "HAT": "HAT", "HKT": "HKT", "CLST": "CLST", "ChST": "ChST", "EAT": "EAT", "BT": "BT", "ARST": "ARST", "COT": "COT", "EDT": "EDT", "AKDT": "AKDT", "WESZ": "WESZ", "HNT": "HNT", "MEZ": "MEZ", "CHADT": "CHADT", "SAST": "SAST", "JDT": "JDT", "ADT": "ADT", "HAST": "HAST", "PDT": "PDT", "AWST": "AWST"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HECU": "HECU", "HNPMX": "HNPMX", "WIB": "WIB", "EAT": "EAT", "WAT": "WAT", "AKDT": "AKDT", "WAST": "WAST", "AKST": "AKST", "GFT": "GFT", "HNOG": "HNOG", "ARST": "ARST", "UYT": "UYT", "BT": "BT", "HNCU": "HNCU", "ChST": "ChST", "ACDT": "ACDT", "CHAST": "CHAST", "WEZ": "WEZ", "ECT": "ECT", "AST": "AST", "MEZ": "MEZ", "IST": "IST", "SGT": "SGT", "TMST": "TMST", "CAT": "CAT", "CDT": "CDT", "HEEG": "HEEG", "LHST": "LHST", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "MST": "MST", "MYT": "MYT", "WART": "WART", "WIT": "WIT", "SAST": "SAST", "MDT": "MDT", "AEST": "AEST", "OESZ": "OESZ", "EST": "EST", "EDT": "EDT", "ACST": "ACST", "AWDT": "AWDT", "PST": "PST", "VET": "VET", "HAT": "HAT", "HEOG": "HEOG", "HADT": "HADT", "MESZ": "MESZ", "PDT": "PDT", "ACWST": "ACWST", "COST": "COST", "OEZ": "OEZ", "HKT": "HKT", "CLST": "CLST", "GMT": "GMT", "HNEG": "HNEG", "HENOMX": "HENOMX", "JDT": "JDT", "UYST": "UYST", "WITA": "WITA", "BOT": "BOT", "WARST": "WARST", "HEPMX": "HEPMX", "HKST": "HKST", "CLT": "CLT", "NZDT": "NZDT", "ADT": "ADT", "SRT": "SRT", "HNPM": "HNPM", "ACWDT": "ACWDT", "JST": "JST", "AEDT": "AEDT", "COT": "COT", "NZST": "NZST", "ART": "ART", "HAST": "HAST", "HNNOMX": "HNNOMX", "AWST": "AWST", "TMT": "TMT", "CST": "CST", "LHDT": "LHDT", "HEPM": "HEPM", "HNT": "HNT", "GYT": "GYT"}, - } - } -  -diff --git a/bez_TZ/bez_TZ.go b/bez_TZ/bez_TZ.go -index a09b119..d8c0abb 100644 ---- a/bez_TZ/bez_TZ.go -+++ b/bez_TZ/bez_TZ.go -@@ -42,24 +42,13 @@ type bez_TZ struct { - // New returns a new instance of translator for the 'bez_TZ' locale - func New() locales.Translator { - return &bez_TZ{ -- locale: "bez_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Hut", "Vil", "Dat", "Tai", "Han", "Sit", "Sab", "Nan", "Tis", "Kum", "Kmj", "Kmb"}, -- monthsNarrow: []string{"", "H", "V", "D", "T", "H", "S", "S", "N", "T", "K", "K", "K"}, -- monthsWide: []string{"", "pa mwedzi gwa hutala", "pa mwedzi gwa wuvili", "pa mwedzi gwa wudatu", "pa mwedzi gwa wutai", "pa mwedzi gwa wuhanu", "pa mwedzi gwa sita", "pa mwedzi gwa saba", "pa mwedzi gwa nane", "pa mwedzi gwa tisa", "pa mwedzi gwa kumi", "pa mwedzi gwa kumi na moja", "pa mwedzi gwa kumi na mbili"}, -- daysAbbreviated: []string{"Mul", "Vil", "Hiv", "Hid", "Hit", "Hih", "Lem"}, -- daysNarrow: []string{"M", "J", "H", "H", "H", "W", "J"}, -- daysWide: []string{"pa mulungu", "pa shahuviluha", "pa hivili", "pa hidatu", "pa hitayi", "pa hihanu", "pa shahulembela"}, -- periodsAbbreviated: []string{"pamilau", "pamunyi"}, -- periodsWide: []string{"pamilau", "pamunyi"}, -- erasAbbreviated: []string{"KM", "BM"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Mtwaa", "Baada ya Mtwaa"}, -- timezones: map[string]string{"WITA": "WITA", "CDT": "CDT", "GYT": "GYT", "WIB": "WIB", "WIT": "WIT", "ART": "ART", "HKST": "HKST", "HEPM": "HEPM", "SGT": "SGT", "PST": "PST", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "COST": "COST", "ADT": "ADT", "HADT": "HADT", "HKT": "HKT", "HNPM": "HNPM", "SAST": "SAST", "WARST": "WARST", "GMT": "GMT", "HNOG": "HNOG", "OESZ": "OESZ", "HENOMX": "HENOMX", "HAT": "HAT", "HNEG": "HNEG", "EAT": "EAT", "HNCU": "HNCU", "MDT": "MDT", "HNPMX": "HNPMX", "HNT": "HNT", "NZDT": "NZDT", "COT": "COT", "HECU": "HECU", "WESZ": "WESZ", "AEST": "AEST", "HAST": "HAST", "BT": "BT", "MESZ": "MESZ", "NZST": "NZST", "CLST": "CLST", "JDT": "JDT", "WART": "WART", "UYST": "UYST", "ARST": "ARST", "CHAST": "CHAST", "CHADT": "CHADT", "WAT": "WAT", "MYT": "MYT", "AEDT": "AEDT", "WEZ": "WEZ", "HEOG": "HEOG", "ChST": "ChST", "CAT": "CAT", "WAST": "WAST", "HNNOMX": "HNNOMX", "EST": "EST", "AST": "AST", "MEZ": "MEZ", "LHST": "LHST", "LHDT": "LHDT", "CLT": "CLT", "MST": "MST", "AWST": "AWST", "AWDT": "AWDT", "OEZ": "OEZ", "ECT": "ECT", "HEPMX": "HEPMX", "AKDT": "AKDT", "CST": "CST", "SRT": "SRT", "IST": "IST", "GFT": "GFT", "TMT": "TMT", "AKST": "AKST", "ACWST": "ACWST", "UYT": "UYT", "JST": "JST", "BOT": "BOT", "ACDT": "ACDT", "EDT": "EDT", "HEEG": "HEEG", "TMST": "TMST", "ACST": "ACST", "VET": "VET", "PDT": "PDT"}, -+ locale: "bez_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EST": "EST", "BOT": "BOT", "JST": "JST", "IST": "IST", "HNPMX": "HNPMX", "HECU": "HECU", "WAST": "WAST", "HAT": "HAT", "ARST": "ARST", "MESZ": "MESZ", "HENOMX": "HENOMX", "ChST": "ChST", "JDT": "JDT", "LHDT": "LHDT", "CHAST": "CHAST", "ACWST": "ACWST", "AKDT": "AKDT", "TMT": "TMT", "HNNOMX": "HNNOMX", "AWST": "AWST", "∅∅∅": "∅∅∅", "GFT": "GFT", "HNEG": "HNEG", "MYT": "MYT", "SGT": "SGT", "OESZ": "OESZ", "WART": "WART", "HADT": "HADT", "WAT": "WAT", "GYT": "GYT", "OEZ": "OEZ", "AST": "AST", "HAST": "HAST", "CHADT": "CHADT", "UYT": "UYT", "PST": "PST", "ACWDT": "ACWDT", "VET": "VET", "CAT": "CAT", "GMT": "GMT", "AEST": "AEST", "HKT": "HKT", "WIB": "WIB", "ECT": "ECT", "HEOG": "HEOG", "TMST": "TMST", "WITA": "WITA", "NZST": "NZST", "AWDT": "AWDT", "UYST": "UYST", "CDT": "CDT", "SRT": "SRT", "HEPMX": "HEPMX", "AKST": "AKST", "MST": "MST", "MDT": "MDT", "ACDT": "ACDT", "SAST": "SAST", "CST": "CST", "ACST": "ACST", "PDT": "PDT", "HNCU": "HNCU", "HKST": "HKST", "ART": "ART", "WEZ": "WEZ", "WARST": "WARST", "WIT": "WIT", "COT": "COT", "CLT": "CLT", "CLST": "CLST", "NZDT": "NZDT", "LHST": "LHST", "AEDT": "AEDT", "BT": "BT", "WESZ": "WESZ", "COST": "COST", "HNOG": "HNOG", "EDT": "EDT", "ADT": "ADT", "EAT": "EAT", "MEZ": "MEZ", "HEEG": "HEEG", "HNPM": "HNPM", "HEPM": "HEPM", "HNT": "HNT"}, - } - } -  -@@ -112,7 +101,7 @@ func (bez *bez_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bez *bez_TZ) MonthsAbbreviated() []string { -- return bez.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (bez *bez_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bez *bez_TZ) MonthsNarrow() []string { -- return bez.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (bez *bez_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bez *bez_TZ) MonthsWide() []string { -- return bez.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,54 +181,7 @@ func (bez *bez_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bez.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bez.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bez.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bez.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bez.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bez_TZ' -@@ -248,61 +190,7 @@ func (bez *bez_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bez.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bez.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bez.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bez.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bez.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bez_TZ' -@@ -310,27 +198,6 @@ func (bez *bez_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -339,17 +206,6 @@ func (bez *bez_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bez.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -358,17 +214,6 @@ func (bez *bez_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bez.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -377,19 +222,6 @@ func (bez *bez_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bez.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bez.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -398,19 +230,6 @@ func (bez *bez_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -419,26 +238,6 @@ func (bez *bez_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -447,30 +246,6 @@ func (bez *bez_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -479,34 +254,5 @@ func (bez *bez_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bez.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bez.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bg/bg.go b/bg/bg.go -index 857e9a4..45193a9 100644 ---- a/bg/bg.go -+++ b/bg/bg.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"пр.Хр.", "сл.Хр."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"преди Христа", "след Христа"}, -- timezones: map[string]string{"CLST": "Чилийско лятно часово време", "ADT": "Северноамериканско атлантическо лятно часово време", "WEZ": "Западноевропейско стандартно време", "BT": "Бутанско време", "HEOG": "Западногренландско лятно часово време", "HKST": "Хонконгско лятно часово време", "OESZ": "Източноевропейско лятно часово време", "CAT": "Централноафриканско време", "AKDT": "Аляска – лятно часово време", "WIB": "Западноиндонезийско време", "ACWDT": "Австралия – западно централно лятно часово време", "NZST": "Новозеландско стандартно време", "OEZ": "Източноевропейско стандартно време", "SRT": "Суринамско време", "HKT": "Хонконгско стандартно време", "NZDT": "Новозеландско лятно часово време", "PST": "Северноамериканско тихоокеанско стандартно време", "WITA": "Централноиндонезийско време", "SAST": "Южноафриканско време", "ACDT": "Австралия – централно лятно часово време", "EAT": "Източноафриканско време", "WARST": "Западноаржентинско лятно часово време", "UYST": "Уругвайско лятно часово време", "HADT": "Хавайско-алеутско лятно часово време", "WAT": "Западноафриканско стандартно време", "HNOG": "Западногренландско стандартно време", "COST": "Колумбийско лятно часово време", "UYT": "Уругвайско стандартно време", "HEPM": "Сен Пиер и Микелон – лятно часово време", "AEDT": "Австралия – източно лятно часово време", "AWDT": "Австралия – западно лятно часово време", "ChST": "Чаморо – стандартно време", "BOT": "Боливийско време", "ECT": "Еквадорско време", "HEPMX": "Мексиканско тихоокеанско лятно часово време", "HAT": "Нюфаундлендско лятно часово време", "AEST": "Австралия – източно стандартно време", "TMT": "Туркменистанско стандартно време", "HEEG": "Източногренландско лятно часово време", "WAST": "Западноафриканско лятно часово време", "COT": "Колумбийско стандартно време", "EDT": "Северноамериканско източно лятно часово време", "CDT": "Северноамериканско централно лятно часово време", "MEZ": "Централноевропейско стандартно време", "HNEG": "Източногренландско стандартно време", "HNNOMX": "Мексико – северозападно стандартно време", "MYT": "Малайзийско време", "HAST": "Хавайско-алеутско стандартно време", "PDT": "Северноамериканско тихоокеанско лятно часово време", "WESZ": "Западноевропейско лятно време", "GMT": "Средно гринуичко време", "AKST": "Аляска – стандартно време", "CHAST": "Чатъм – стандартно време", "IST": "Индийско стандартно време", "∅∅∅": "Амазонско лятно часово време", "EST": "Северноамериканско източно стандартно време", "WIT": "Източноиндонезийско време", "ARST": "Аржентинско лятно часово време", "AWST": "Австралия – западно стандартно време", "LHST": "Лорд Хау – стандартно време", "WART": "Западноаржентинско стандартно време", "HNCU": "Кубинско стандартно време", "MDT": "MDT", "AST": "Северноамериканско атлантическо стандартно време", "VET": "Венецуелско време", "ACWST": "Австралия – западно централно стандартно време", "HNPM": "Сен Пиер и Микелон – стандартно време", "JST": "Японско стандартно време", "JDT": "Японско лятно часово време", "HENOMX": "Мексико – северозападно лятно часово време", "SGT": "Сингапурско време", "HNPMX": "Мексиканско тихоокеанско стандартно време", "HNT": "Нюфаундлендско стандартно време", "CLT": "Чилийско стандартно време", "ACST": "Австралия – централно стандартно време", "GYT": "Гаяна", "MESZ": "Централноевропейско лятно часово време", "CHADT": "Чатъм – лятно часово време", "LHDT": "Лорд Хау – лятно часово време", "GFT": "Френска Гвиана", "TMST": "Туркменистанско лятно часово време", "HECU": "Кубинско лятно часово време", "MST": "MST", "CST": "Северноамериканско централно стандартно време", "ART": "Аржентинско стандартно време"}, -+ timezones: map[string]string{"∅∅∅": "Бразилско лятно часово време", "EST": "Северноамериканско източно стандартно време", "ART": "Аржентинско стандартно време", "MYT": "Малайзийско време", "HEPM": "Сен Пиер и Микелон – лятно часово време", "BT": "Бутанско време", "SGT": "Сингапурско време", "OEZ": "Източноевропейско стандартно време", "WARST": "Западноаржентинско лятно часово време", "HAST": "Хавайско-алеутско стандартно време", "HNPM": "Сен Пиер и Микелон – стандартно време", "PST": "Северноамериканско тихоокеанско стандартно време", "HNOG": "Западногренландско стандартно време", "TMT": "Туркменистанско стандартно време", "MST": "MST", "MEZ": "Централноевропейско стандартно време", "AWST": "Австралия – западно стандартно време", "AEST": "Австралия – източно стандартно време", "CHAST": "Чатъм – стандартно време", "WAT": "Западноафриканско стандартно време", "WIT": "Източноиндонезийско време", "TMST": "Туркменистанско лятно часово време", "CLT": "Чилийско стандартно време", "CDT": "Северноамериканско централно лятно часово време", "MDT": "MDT", "HENOMX": "Мексико – северозападно лятно часово време", "HNCU": "Кубинско стандартно време", "HEPMX": "Мексиканско тихоокеанско лятно часово време", "GFT": "Френска Гвиана", "EDT": "Северноамериканско източно лятно часово време", "ADT": "Северноамериканско атлантическо лятно часово време", "HNNOMX": "Мексико – северозападно стандартно време", "JDT": "Японско лятно часово време", "WESZ": "Западноевропейско лятно време", "HECU": "Кубинско лятно часово време", "AKDT": "Аляска – лятно часово време", "OESZ": "Източноевропейско лятно часово време", "CAT": "Централноафриканско време", "BOT": "Боливийско време", "SRT": "Суринамско време", "IST": "Индийско стандартно време", "ACWST": "Австралия – западно централно стандартно време", "CHADT": "Чатъм – лятно часово време", "HAT": "Нюфаундлендско лятно часово време", "HKT": "Хонконгско стандартно време", "WIB": "Западноиндонезийско време", "AST": "Северноамериканско атлантическо стандартно време", "AWDT": "Австралия – западно лятно часово време", "HEOG": "Западногренландско лятно часово време", "WITA": "Централноиндонезийско време", "NZDT": "Новозеландско лятно часово време", "PDT": "Северноамериканско тихоокеанско лятно часово време", "UYST": "Уругвайско лятно часово време", "WAST": "Западноафриканско лятно часово време", "HNT": "Нюфаундлендско стандартно време", "GYT": "Гаяна", "COST": "Колумбийско лятно часово време", "ACST": "Австралия – централно стандартно време", "HNEG": "Източногренландско стандартно време", "WEZ": "Западноевропейско стандартно време", "ECT": "Еквадорско време", "GMT": "Средно гринуичко време", "VET": "Венецуелско време", "CST": "Северноамериканско централно стандартно време", "JST": "Японско стандартно време", "WART": "Западноаржентинско стандартно време", "CLST": "Чилийско лятно часово време", "ACDT": "Австралия – централно лятно часово време", "LHST": "Лорд Хау – стандартно време", "SAST": "Южноафриканско време", "COT": "Колумбийско стандартно време", "HKST": "Хонконгско лятно часово време", "ChST": "Чаморо – стандартно време", "HEEG": "Източногренландско лятно часово време", "ACWDT": "Австралия – западно централно лятно часово време", "AKST": "Аляска – стандартно време", "NZST": "Новозеландско стандартно време", "MESZ": "Централноевропейско лятно часово време", "LHDT": "Лорд Хау – лятно часово време", "UYT": "Уругвайско стандартно време", "HNPMX": "Мексиканско тихоокеанско стандартно време", "ARST": "Аржентинско лятно часово време", "EAT": "Източноафриканско време", "HADT": "Хавайско-алеутско лятно часово време", "AEDT": "Австралия – източно лятно часово време"}, - } - } -  -diff --git a/bg_BG/bg_BG.go b/bg_BG/bg_BG.go -index 07ac384..e74e5d5 100644 ---- a/bg_BG/bg_BG.go -+++ b/bg_BG/bg_BG.go -@@ -10,70 +10,45 @@ import ( - ) -  - type bg_BG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bg_BG' locale - func New() locales.Translator { - return &bg_BG{ -- locale: "bg_BG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "яну", "фев", "март", "апр", "май", "юни", "юли", "авг", "сеп", "окт", "ное", "дек"}, -- monthsNarrow: []string{"", "я", "ф", "м", "а", "м", "ю", "ю", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "януари", "февруари", "март", "април", "май", "юни", "юли", "август", "септември", "октомври", "ноември", "декември"}, -- daysAbbreviated: []string{"нд", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"н", "п", "в", "с", "ч", "п", "с"}, -- daysShort: []string{"нд", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"неделя", "понеделник", "вторник", "сряда", "четвъртък", "петък", "събота"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"пр.об.", "сл.об."}, -- erasAbbreviated: []string{"пр.Хр.", "сл.Хр."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"преди Христа", "след Христа"}, -- timezones: map[string]string{"UYST": "Уругвайско лятно часово време", "AWST": "Австралия – западно стандартно време", "HKST": "Хонконгско лятно часово време", "MESZ": "Централноевропейско лятно часово време", "SAST": "Южноафриканско време", "HNCU": "Кубинско стандартно време", "AKST": "Аляска – стандартно време", "ACWST": "Австралия – западно централно стандартно време", "COT": "Колумбийско стандартно време", "HNPMX": "Мексиканско тихоокеанско стандартно време", "MYT": "Малайзийско време", "PST": "Северноамериканско тихоокеанско стандартно време", "HEPM": "Сен Пиер и Микелон – лятно часово време", "JST": "Японско стандартно време", "TMST": "Туркменистанско лятно часово време", "ECT": "Еквадорско време", "WEZ": "Западноевропейско стандартно време", "HNOG": "Западногренландско стандартно време", "WITA": "Централноиндонезийско време", "CLST": "Чилийско лятно часово време", "WAT": "Западноафриканско стандартно време", "AEDT": "Австралия – източно лятно часово време", "CHAST": "Чатъм – стандартно време", "IST": "Индийско стандартно време", "CLT": "Чилийско стандартно време", "HNEG": "Източногренландско стандартно време", "GFT": "Френска Гвиана", "WAST": "Западноафриканско лятно часово време", "EDT": "Северноамериканско източно лятно часово време", "CDT": "Северноамериканско централно лятно часово време", "EST": "Северноамериканско източно стандартно време", "AST": "Северноамериканско атлантическо стандартно време", "SRT": "Суринамско време", "AEST": "Австралия – източно стандартно време", "AWDT": "Австралия – западно лятно часово време", "JDT": "Японско лятно часово време", "EAT": "Източноафриканско време", "BT": "Бутанско време", "HNPM": "Сен Пиер и Микелон – стандартно време", "CHADT": "Чатъм – лятно часово време", "ACDT": "Австралия – централно лятно часово време", "MST": "MST", "HEPMX": "Мексиканско тихоокеанско лятно часово време", "HAST": "Хавайско-алеутско стандартно време", "LHDT": "Лорд Хау – лятно часово време", "∅∅∅": "Амазонско лятно часово време", "ChST": "Чаморо – стандартно време", "ACST": "Австралия – централно стандартно време", "WART": "Западноаржентинско стандартно време", "GMT": "Средно гринуичко време", "GYT": "Гаяна", "VET": "Венецуелско време", "HNT": "Нюфаундлендско стандартно време", "HAT": "Нюфаундлендско лятно часово време", "ART": "Аржентинско стандартно време", "HEEG": "Източногренландско лятно часово време", "OEZ": "Източноевропейско стандартно време", "HENOMX": "Мексико – северозападно лятно часово време", "WIT": "Източноиндонезийско време", "WESZ": "Западноевропейско лятно време", "ACWDT": "Австралия – западно централно лятно часово време", "ARST": "Аржентинско лятно часово време", "TMT": "Туркменистанско стандартно време", "OESZ": "Източноевропейско лятно часово време", "HNNOMX": "Мексико – северозападно стандартно време", "SGT": "Сингапурско време", "MDT": "MDT", "HEOG": "Западногренландско лятно часово време", "CST": "Северноамериканско централно стандартно време", "UYT": "Уругвайско стандартно време", "HADT": "Хавайско-алеутско лятно часово време", "LHST": "Лорд Хау – стандартно време", "NZST": "Новозеландско стандартно време", "HECU": "Кубинско лятно часово време", "WIB": "Западноиндонезийско време", "NZDT": "Новозеландско лятно часово време", "BOT": "Боливийско време", "CAT": "Централноафриканско време", "AKDT": "Аляска – лятно часово време", "ADT": "Северноамериканско атлантическо лятно часово време", "PDT": "Северноамериканско тихоокеанско лятно часово време", "MEZ": "Централноевропейско стандартно време", "WARST": "Западноаржентинско лятно часово време", "COST": "Колумбийско лятно часово време", "HKT": "Хонконгско стандартно време"}, -+ locale: "bg_BG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "EAT": "EAT", "MESZ": "MESZ", "HEPMX": "HEPMX", "HKST": "HKST", "TMT": "TMT", "HNPM": "HNPM", "HEPM": "HEPM", "COST": "COST", "VET": "VET", "MDT": "MDT", "ART": "ART", "HAST": "HAST", "HNEG": "HNEG", "AWDT": "AWDT", "UYST": "UYST", "BT": "BT", "EST": "EST", "ARST": "ARST", "ACWST": "ACWST", "WEZ": "WEZ", "HNOG": "HNOG", "HKT": "HKT", "ChST": "ChST", "JDT": "JDT", "LHDT": "LHDT", "CHAST": "CHAST", "HNT": "HNT", "WIT": "WIT", "COT": "COT", "BOT": "BOT", "PST": "PST", "WAT": "WAT", "HEOG": "HEOG", "CST": "CST", "NZST": "NZST", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "HEEG": "HEEG", "WAST": "WAST", "WART": "WART", "GYT": "GYT", "AWST": "AWST", "AEST": "AEST", "AKST": "AKST", "TMST": "TMST", "WIB": "WIB", "CHADT": "CHADT", "UYT": "UYT", "AKDT": "AKDT", "ECT": "ECT", "AST": "AST", "HENOMX": "HENOMX", "AEDT": "AEDT", "WESZ": "WESZ", "WARST": "WARST", "MYT": "MYT", "SAST": "SAST", "CDT": "CDT", "ADT": "ADT", "HADT": "HADT", "MEZ": "MEZ", "NZDT": "NZDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "HECU": "HECU", "HNPMX": "HNPMX", "GFT": "GFT", "PDT": "PDT", "OEZ": "OEZ", "HAT": "HAT", "MST": "MST", "SRT": "SRT", "ACST": "ACST", "JST": "JST", "IST": "IST", "EDT": "EDT", "WITA": "WITA", "LHST": "LHST", "∅∅∅": "∅∅∅", "SGT": "SGT", "OESZ": "OESZ", "CAT": "CAT", "CLT": "CLT", "CLST": "CLST"}, - } - } -  -@@ -126,7 +101,7 @@ func (bg *bg_BG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bg *bg_BG) MonthsAbbreviated() []string { -- return bg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (bg *bg_BG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bg *bg_BG) MonthsNarrow() []string { -- return bg.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (bg *bg_BG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bg *bg_BG) MonthsWide() []string { -- return bg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (bg *bg_BG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bg_BG' and handles both Whole and Real numbers based on 'v' - func (bg *bg_BG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(bg.group) - 1; j >= 0; j-- { -- b = append(b, bg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bg_BG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bg *bg_BG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bg.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bg.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bg_BG' -@@ -268,45 +181,7 @@ func (bg *bg_BG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bg.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bg.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, bg.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bg_BG' -@@ -315,52 +190,7 @@ func (bg *bg_BG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bg.currencies[currency] -- l := len(s) + len(symbol) + 6 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bg.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bg.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bg.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, bg.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bg_BG' -@@ -368,26 +198,6 @@ func (bg *bg_BG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -396,26 +206,6 @@ func (bg *bg_BG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -424,20 +214,6 @@ func (bg *bg_BG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -446,22 +222,6 @@ func (bg *bg_BG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -470,15 +230,6 @@ func (bg *bg_BG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -487,22 +238,6 @@ func (bg *bg_BG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -511,26 +246,6 @@ func (bg *bg_BG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -539,30 +254,5 @@ func (bg *bg_BG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bm/bm.go b/bm/bm.go -index 49b16b5..3c25994 100644 ---- a/bm/bm.go -+++ b/bm/bm.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"J.-C. ɲɛ", "ni J.-C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"jezu krisiti ɲɛ", "jezu krisiti minkɛ"}, -- timezones: map[string]string{"OEZ": "OEZ", "EDT": "EDT", "AST": "AST", "SRT": "SRT", "WEZ": "WEZ", "HNPMX": "HNPMX", "LHST": "LHST", "GFT": "GFT", "SGT": "SGT", "AKST": "AKST", "ARST": "ARST", "WESZ": "WESZ", "ACWST": "ACWST", "NZST": "NZST", "WIT": "WIT", "HEOG": "HEOG", "PDT": "PDT", "HNPM": "HNPM", "CLST": "CLST", "GYT": "GYT", "AKDT": "AKDT", "NZDT": "NZDT", "BOT": "BOT", "HNCU": "HNCU", "CST": "CST", "BT": "BT", "AEDT": "AEDT", "HEPM": "HEPM", "JDT": "JDT", "EAT": "EAT", "WAST": "WAST", "HNNOMX": "HNNOMX", "HADT": "HADT", "ART": "ART", "MEZ": "MEZ", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "WARST": "WARST", "COT": "COT", "GMT": "GMT", "HECU": "HECU", "HAT": "HAT", "TMT": "TMT", "WAT": "WAT", "ADT": "ADT", "MYT": "MYT", "UYT": "UYT", "HKST": "HKST", "COST": "COST", "EST": "EST", "ChST": "ChST", "HENOMX": "HENOMX", "UYST": "UYST", "HAST": "HAST", "HNT": "HNT", "ACWDT": "ACWDT", "ACST": "ACST", "CAT": "CAT", "WART": "WART", "VET": "VET", "IST": "IST", "CLT": "CLT", "CDT": "CDT", "WIB": "WIB", "AEST": "AEST", "AWST": "AWST", "AWDT": "AWDT", "HKT": "HKT", "JST": "JST", "ECT": "ECT", "HEPMX": "HEPMX", "HNOG": "HNOG", "WITA": "WITA", "CHADT": "CHADT", "TMST": "TMST", "HNEG": "HNEG", "MST": "MST", "MDT": "MDT", "PST": "PST", "LHDT": "LHDT", "ACDT": "ACDT", "OESZ": "OESZ", "CHAST": "CHAST", "SAST": "SAST"}, -+ timezones: map[string]string{"HNOG": "HNOG", "HEOG": "HEOG", "EST": "EST", "ChST": "ChST", "ART": "ART", "UYT": "UYT", "WEZ": "WEZ", "WARST": "WARST", "ECT": "ECT", "ARST": "ARST", "JDT": "JDT", "WESZ": "WESZ", "CLST": "CLST", "MST": "MST", "MEZ": "MEZ", "MESZ": "MESZ", "ACWDT": "ACWDT", "CLT": "CLT", "SRT": "SRT", "AKDT": "AKDT", "CST": "CST", "CDT": "CDT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "GFT": "GFT", "EDT": "EDT", "CAT": "CAT", "IST": "IST", "HNT": "HNT", "GMT": "GMT", "EAT": "EAT", "LHST": "LHST", "JST": "JST", "UYST": "UYST", "LHDT": "LHDT", "HNCU": "HNCU", "WART": "WART", "TMST": "TMST", "HEPMX": "HEPMX", "AKST": "AKST", "WIT": "WIT", "HADT": "HADT", "HEPM": "HEPM", "AWST": "AWST", "CHAST": "CHAST", "HNPMX": "HNPMX", "GYT": "GYT", "AEDT": "AEDT", "OEZ": "OEZ", "WIB": "WIB", "HAST": "HAST", "HENOMX": "HENOMX", "AEST": "AEST", "CHADT": "CHADT", "HAT": "HAT", "AST": "AST", "SAST": "SAST", "WITA": "WITA", "NZST": "NZST", "BOT": "BOT", "AWDT": "AWDT", "BT": "BT", "SGT": "SGT", "COST": "COST", "HNPM": "HNPM", "ACWST": "ACWST", "TMT": "TMT", "NZDT": "NZDT", "WAST": "WAST", "OESZ": "OESZ", "HKST": "HKST", "ADT": "ADT", "MDT": "MDT", "ACST": "ACST", "HECU": "HECU", "WAT": "WAT", "COT": "COT", "HKT": "HKT", "ACDT": "ACDT", "MYT": "MYT", "PDT": "PDT", "∅∅∅": "∅∅∅", "VET": "VET", "HNEG": "HNEG", "PST": "PST"}, - } - } -  -diff --git a/bm_ML/bm_ML.go b/bm_ML/bm_ML.go -index 632ba9a..8fd1a20 100644 ---- a/bm_ML/bm_ML.go -+++ b/bm_ML/bm_ML.go -@@ -10,58 +10,45 @@ import ( - ) -  - type bm_ML struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bm_ML' locale - func New() locales.Translator { - return &bm_ML{ -- locale: "bm_ML", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "zan", "feb", "mar", "awi", "mɛ", "zuw", "zul", "uti", "sɛt", "ɔku", "now", "des"}, -- monthsNarrow: []string{"", "Z", "F", "M", "A", "M", "Z", "Z", "U", "S", "Ɔ", "N", "D"}, -- monthsWide: []string{"", "zanwuye", "feburuye", "marisi", "awirili", "mɛ", "zuwɛn", "zuluye", "uti", "sɛtanburu", "ɔkutɔburu", "nowanburu", "desanburu"}, -- daysAbbreviated: []string{"kar", "ntɛ", "tar", "ara", "ala", "jum", "sib"}, -- daysNarrow: []string{"K", "N", "T", "A", "A", "J", "S"}, -- daysWide: []string{"kari", "ntɛnɛ", "tarata", "araba", "alamisa", "juma", "sibiri"}, -- erasAbbreviated: []string{"J.-C. ɲɛ", "ni J.-C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"jezu krisiti ɲɛ", "jezu krisiti minkɛ"}, -- timezones: map[string]string{"EAT": "EAT", "WIT": "WIT", "CLST": "CLST", "∅∅∅": "∅∅∅", "MDT": "MDT", "VET": "VET", "MESZ": "MESZ", "WAST": "WAST", "AEST": "AEST", "SAST": "SAST", "ECT": "ECT", "CAT": "CAT", "HAT": "HAT", "ART": "ART", "MST": "MST", "LHDT": "LHDT", "WAT": "WAT", "ChST": "ChST", "HNPMX": "HNPMX", "ACWST": "ACWST", "LHST": "LHST", "TMT": "TMT", "GMT": "GMT", "WESZ": "WESZ", "HNOG": "HNOG", "OESZ": "OESZ", "EDT": "EDT", "UYST": "UYST", "NZDT": "NZDT", "CHAST": "CHAST", "HECU": "HECU", "HAST": "HAST", "HKST": "HKST", "AEDT": "AEDT", "HEOG": "HEOG", "HKT": "HKT", "WITA": "WITA", "HEPM": "HEPM", "JST": "JST", "TMST": "TMST", "ACWDT": "ACWDT", "HNT": "HNT", "AKDT": "AKDT", "SRT": "SRT", "COST": "COST", "AKST": "AKST", "COT": "COT", "EST": "EST", "HADT": "HADT", "AWST": "AWST", "ACDT": "ACDT", "NZST": "NZST", "ACST": "ACST", "OEZ": "OEZ", "SGT": "SGT", "HEPMX": "HEPMX", "CDT": "CDT", "ARST": "ARST", "PDT": "PDT", "MYT": "MYT", "HEEG": "HEEG", "GFT": "GFT", "WART": "WART", "AST": "AST", "ADT": "ADT", "UYT": "UYT", "AWDT": "AWDT", "HNEG": "HNEG", "WARST": "WARST", "GYT": "GYT", "PST": "PST", "HNPM": "HNPM", "HENOMX": "HENOMX", "WEZ": "WEZ", "CHADT": "CHADT", "CLT": "CLT", "BOT": "BOT", "CST": "CST", "BT": "BT", "MEZ": "MEZ", "IST": "IST", "HNCU": "HNCU", "WIB": "WIB", "JDT": "JDT", "HNNOMX": "HNNOMX"}, -+ locale: "bm_ML", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MST": "MST", "PDT": "PDT", "HECU": "HECU", "NZST": "NZST", "WIB": "WIB", "HADT": "HADT", "BT": "BT", "HEPMX": "HEPMX", "GYT": "GYT", "TMT": "TMT", "CDT": "CDT", "ARST": "ARST", "ART": "ART", "EAT": "EAT", "PST": "PST", "VET": "VET", "WAST": "WAST", "HEOG": "HEOG", "TMST": "TMST", "CLT": "CLT", "OESZ": "OESZ", "AST": "AST", "CHAST": "CHAST", "HENOMX": "HENOMX", "WESZ": "WESZ", "CLST": "CLST", "ChST": "ChST", "SRT": "SRT", "HNNOMX": "HNNOMX", "WIT": "WIT", "WART": "WART", "COT": "COT", "ACDT": "ACDT", "LHST": "LHST", "AEST": "AEST", "UYT": "UYT", "OEZ": "OEZ", "∅∅∅": "∅∅∅", "EDT": "EDT", "MYT": "MYT", "CHADT": "CHADT", "HNCU": "HNCU", "SGT": "SGT", "HNT": "HNT", "COST": "COST", "CAT": "CAT", "ECT": "ECT", "HEEG": "HEEG", "HEPM": "HEPM", "AWDT": "AWDT", "HNPMX": "HNPMX", "WARST": "WARST", "HKST": "HKST", "HAST": "HAST", "HNEG": "HNEG", "CST": "CST", "JDT": "JDT", "ACWDT": "ACWDT", "GFT": "GFT", "BOT": "BOT", "HNPM": "HNPM", "AWST": "AWST", "MDT": "MDT", "ACST": "ACST", "IST": "IST", "WEZ": "WEZ", "WAT": "WAT", "AKDT": "AKDT", "HAT": "HAT", "SAST": "SAST", "AKST": "AKST", "WITA": "WITA", "JST": "JST", "MEZ": "MEZ", "LHDT": "LHDT", "UYST": "UYST", "EST": "EST", "NZDT": "NZDT", "ADT": "ADT", "GMT": "GMT", "AEDT": "AEDT", "HNOG": "HNOG", "HKT": "HKT", "MESZ": "MESZ", "ACWST": "ACWST"}, - } - } -  -@@ -107,7 +94,7 @@ func (bm *bm_ML) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bm *bm_ML) MonthsAbbreviated() []string { -- return bm.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -117,7 +104,7 @@ func (bm *bm_ML) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bm *bm_ML) MonthsNarrow() []string { -- return bm.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -127,7 +114,7 @@ func (bm *bm_ML) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bm *bm_ML) MonthsWide() []string { -- return bm.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -187,56 +174,7 @@ func (bm *bm_ML) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bm.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bm.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, bm.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bm.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bm_ML' -@@ -245,68 +183,7 @@ func (bm *bm_ML) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bm.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bm.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, bm.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bm.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bm.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bm_ML' -@@ -314,17 +191,6 @@ func (bm *bm_ML) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -333,17 +199,6 @@ func (bm *bm_ML) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bm.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -352,17 +207,6 @@ func (bm *bm_ML) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bm.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,19 +215,6 @@ func (bm *bm_ML) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bm.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bm.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -392,19 +223,6 @@ func (bm *bm_ML) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -413,26 +231,6 @@ func (bm *bm_ML) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -441,30 +239,6 @@ func (bm *bm_ML) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -473,34 +247,5 @@ func (bm *bm_ML) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bm.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bm.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bn/bn.go b/bn/bn.go -index 430d642..79f9b82 100644 ---- a/bn/bn.go -+++ b/bn/bn.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"}, -- timezones: map[string]string{"MYT": "মালয়েশিয়া সময়", "ART": "আর্জেনটিনা মানক সময়", "AEDT": "অস্ট্রেলীয় পূর্ব দিবালোক সময়", "CLT": "চিলি মানক সময়", "ECT": "ইকুয়েডর সময়", "AST": "অতলান্তিক মানক সময়", "HKT": "হং কং মানক সময়", "MEZ": "মধ্য ইউরোপের মানক সময়", "GFT": "ফরাসি গায়ানা সময়", "CAT": "মধ্য আফ্রিকা সময়", "ADT": "অতলান্তিক দিবালোক সময়", "AKST": "আলাস্কা মানক সময়", "MESZ": "মধ্য ইউরোপের গ্রীষ্মকালীন সময়", "TMST": "তুর্কমেনিস্তান গ্রীষ্মকালীন সময়", "BOT": "বোলিভিয়া সময়", "MDT": "মাকাও গ্রীষ্মকাল সময়", "CDT": "কেন্দ্রীয় দিবালোক সময়", "UYT": "উরুগুয়ে মানক সময়", "HAT": "নিউফাউন্ডল্যান্ড দিবালোক সময়", "NZDT": "নিউজিল্যান্ড দিবালোক সময়", "JST": "জাপান মানক সময়", "COST": "কোলোম্বিয়া গ্রীষ্মকালীন সময়", "EST": "পূর্বাঞ্চলের প্রমাণ সময়", "WIB": "পশ্চিমী ইন্দোনেশিয়া সময়", "BT": "ভুটান সময়", "HEOG": "পশ্চিম গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "∅∅∅": "অ্যামাজন গ্রীষ্মকালীন সময়", "HNOG": "পশ্চিম গ্রীনল্যান্ড মানক সময়", "AWST": "অস্ট্রেলীয় পশ্চিমি মানক সময়", "HEPM": "সেন্ট পিয়ের ও মিকেলন দিবালোক সময়", "COT": "কোলোম্বিয়া মানক সময়", "HENOMX": "উত্তরপশ্চিম মেক্সিকোর দিনের সময়", "HECU": "কিউবা দিবালোক সময়", "WIT": "পূর্ব ইন্দোনেশিয়া সময়", "SRT": "সুরিনাম সময়", "NZST": "নিউজিল্যান্ড মানক সময়", "LHST": "লর্ড হাওয়ে মানক মসয়", "EAT": "পূর্ব আফ্রিকা সময়", "WARST": "পশ্চিমি আর্জেনটিনা গৃষ্মকালীন সময়", "EDT": "পূর্বাঞ্চলের দিবালোক সময়", "HNPMX": "মেক্সিকান প্রশান্ত মহসাগরীয় মানক সময়", "ARST": "আর্জেনটিনা গ্রীষ্মকালীন সময়", "CHAST": "চ্যাথাম মানক সময়", "IST": "ভারতীয় মানক সময়", "GMT": "গ্রীনিচ মিন টাইম", "HNCU": "কিউবা মানক সময়", "HADT": "হাওয়াই-আলেউত দিবালোক সময়", "PST": "প্রশান্ত মহাসাগরীয় অঞ্চলের মানক সময়", "ACWDT": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি দিবালোক সময়", "SAST": "দক্ষিণ আফ্রিকা মানক সময়", "JDT": "জাপান দিবালোক সময়", "TMT": "তুর্কমেনিস্তান মানক সময়", "ChST": "চামেরো মানক সময়", "ACST": "অস্ট্রেলীয় কেন্দ্রীয় মানক সময়", "UYST": "উরুগুয়ে গ্রীষ্মকালীন সময়", "AKDT": "আলাস্কা দিবালোক সময়", "HNEG": "পূর্ব গ্রীনল্যান্ড মানক সময়", "WAT": "পশ্চিম আফ্রিকা মানক সময়", "WESZ": "পশ্চিম ইউরোপের গ্রীষ্মকালীন সময়", "HNPM": "সেন্ট পিয়ের ও মিকেলন মানক সময়", "ACDT": "অস্ট্রেলীয় কেন্দ্রীয় দিবালোক সময়", "HEPMX": "মেক্সিকান প্রশান্ত মহাসাগরীয় দিবালোক সময়", "WEZ": "পশ্চিম ইউরোপের মানক সময়", "WITA": "কেন্দ্রীয় ইন্দোনেশিয়া সময়", "AWDT": "অস্ট্রেলীয় পশ্চিমি দিবালোক সময়", "CLST": "চিলি গ্রীষ্মকাল সময়", "OEZ": "পূর্ব ইউরোপের মানক সময়", "WART": "পশ্চিমি আর্জেনটিনার প্রমাণ সময়", "MST": "মাকাও মান সময়", "HAST": "হাওয়াই-আলেউত মানক সময়", "VET": "ভেনেজুয়েলা সময়", "HNNOMX": "উত্তরপশ্চিম মেক্সিকোর মানক সময়", "SGT": "সিঙ্গাপুর মানক সময়", "CST": "কেন্দ্রীয় মানক সময়", "PDT": "প্রশান্ত মহাসাগরীয় অঞ্চলের দিনের সময়", "ACWST": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি মানক সময়", "AEST": "অস্ট্রেলীয় পূর্ব মানক সময়", "OESZ": "পূর্ব ইউরোপের গ্রীষ্মকালীন সময়", "WAST": "পশ্চিম আফ্রিকা গ্রীষ্মকালীন সময়", "GYT": "গুয়ানা সময়", "HKST": "হং কং গ্রীষ্মকালীন সময়", "LHDT": "লর্ড হাওয়ে দিবালোক মসয়", "HEEG": "পূর্ব গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "HNT": "নিউফাউন্ডল্যান্ড মানক সময়", "CHADT": "চ্যাথাম দিবালোক সময়"}, -+ timezones: map[string]string{"UYST": "উরুগুয়ে গ্রীষ্মকালীন সময়", "HEPMX": "মেক্সিকান প্রশান্ত মহাসাগরীয় দিবালোক সময়", "AKDT": "আলাস্কা দিবালোক সময়", "GFT": "ফরাসি গায়ানা সময়", "HNOG": "পশ্চিম গ্রীনল্যান্ড মানক সময়", "MST": "মাকাও মান সময়", "ART": "আর্জেনটিনা মানক সময়", "AST": "অতলান্তিক মানক সময়", "HNNOMX": "উত্তরপশ্চিম মেক্সিকোর মানক সময়", "HKST": "হং কং গ্রীষ্মকালীন সময়", "NZST": "নিউজিল্যান্ড মানক সময়", "ARST": "আর্জেনটিনা গ্রীষ্মকালীন সময়", "GMT": "গ্রীনিচ মিন টাইম", "LHDT": "লর্ড হাওয়ে দিবালোক মসয়", "AEST": "অস্ট্রেলীয় পূর্ব মানক সময়", "AEDT": "অস্ট্রেলীয় পূর্ব দিবালোক সময়", "COT": "কোলোম্বিয়া মানক সময়", "CLST": "চিলি গ্রীষ্মকাল সময়", "ChST": "চামেরো মানক সময়", "HENOMX": "উত্তরপশ্চিম মেক্সিকোর দিনের সময়", "JST": "জাপান মানক সময়", "AWDT": "অস্ট্রেলীয় পশ্চিমি দিবালোক সময়", "ACWST": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি মানক সময়", "UYT": "উরুগুয়ে মানক সময়", "WIT": "পূর্ব ইন্দোনেশিয়া সময়", "HAT": "নিউফাউন্ডল্যান্ড দিবালোক সময়", "HEOG": "পশ্চিম গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "HKT": "হং কং মানক সময়", "EST": "পূর্বাঞ্চলের প্রমাণ সময়", "EAT": "পূর্ব আফ্রিকা সময়", "JDT": "জাপান দিবালোক সময়", "PDT": "প্রশান্ত মহাসাগরীয় অঞ্চলের দিনের সময়", "OESZ": "পূর্ব ইউরোপের গ্রীষ্মকালীন সময়", "HAST": "হাওয়াই-আলেউত মানক সময়", "LHST": "লর্ড হাওয়ে মানক মসয়", "ACWDT": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি দিবালোক সময়", "HNCU": "কিউবা মানক সময়", "WART": "পশ্চিমি আর্জেনটিনার প্রমাণ সময়", "CHADT": "চ্যাথাম দিবালোক সময়", "VET": "ভেনেজুয়েলা সময়", "HECU": "কিউবা দিবালোক সময়", "MEZ": "মধ্য ইউরোপের মানক সময়", "HEPM": "সেন্ট পিয়ের ও মিকেলন দিবালোক সময়", "AWST": "অস্ট্রেলীয় পশ্চিমি মানক সময়", "OEZ": "পূর্ব ইউরোপের মানক সময়", "CLT": "চিলি মানক সময়", "NZDT": "নিউজিল্যান্ড দিবালোক সময়", "MYT": "মালয়েশিয়া সময়", "HNT": "নিউফাউন্ডল্যান্ড মানক সময়", "SAST": "দক্ষিণ আফ্রিকা মানক সময়", "GYT": "গুয়ানা সময়", "TMT": "তুর্কমেনিস্তান মানক সময়", "WESZ": "পশ্চিম ইউরোপের গ্রীষ্মকালীন সময়", "SGT": "সিঙ্গাপুর মানক সময়", "∅∅∅": "ব্রাসিলিয়া গ্রীষ্মকালীন সময়", "EDT": "পূর্বাঞ্চলের দিবালোক সময়", "CAT": "মধ্য আফ্রিকা সময়", "BT": "ভুটান সময়", "COST": "কোলোম্বিয়া গ্রীষ্মকালীন সময়", "WITA": "কেন্দ্রীয় ইন্দোনেশিয়া সময়", "ACST": "অস্ট্রেলীয় কেন্দ্রীয় মানক সময়", "ACDT": "অস্ট্রেলীয় কেন্দ্রীয় দিবালোক সময়", "HNPM": "সেন্ট পিয়ের ও মিকেলন মানক সময়", "WAT": "পশ্চিম আফ্রিকা মানক সময়", "WARST": "পশ্চিমি আর্জেনটিনা গৃষ্মকালীন সময়", "TMST": "তুর্কমেনিস্তান গ্রীষ্মকালীন সময়", "HNEG": "পূর্ব গ্রীনল্যান্ড মানক সময়", "HEEG": "পূর্ব গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "WAST": "পশ্চিম আফ্রিকা গ্রীষ্মকালীন সময়", "HNPMX": "মেক্সিকান প্রশান্ত মহসাগরীয় মানক সময়", "CST": "কেন্দ্রীয় মানক সময়", "MDT": "মাকাও গ্রীষ্মকাল সময়", "CHAST": "চ্যাথাম মানক সময়", "PST": "প্রশান্ত মহাসাগরীয় অঞ্চলের মানক সময়", "WIB": "পশ্চিমী ইন্দোনেশিয়া সময়", "ADT": "অতলান্তিক দিবালোক সময়", "WEZ": "পশ্চিম ইউরোপের মানক সময়", "ECT": "ইকুয়েডর সময়", "BOT": "বোলিভিয়া সময়", "AKST": "আলাস্কা মানক সময়", "IST": "ভারতীয় মানক সময়", "CDT": "কেন্দ্রীয় দিবালোক সময়", "SRT": "সুরিনাম সময়", "HADT": "হাওয়াই-আলেউত দিবালোক সময়", "MESZ": "মধ্য ইউরোপের গ্রীষ্মকালীন সময়"}, - } - } -  -diff --git a/bn_BD/bn_BD.go b/bn_BD/bn_BD.go -index 9fb0d11..fdff302 100644 ---- a/bn_BD/bn_BD.go -+++ b/bn_BD/bn_BD.go -@@ -42,30 +42,13 @@ type bn_BD struct { - // New returns a new instance of translator for the 'bn_BD' locale - func New() locales.Translator { - return &bn_BD{ -- locale: "bn_BD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"}, -- monthsNarrow: []string{"", "জা", "ফে", "মা", "এ", "মে", "জুন", "জু", "আ", "সে", "অ", "ন", "ডি"}, -- monthsWide: []string{"", "জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"}, -- daysAbbreviated: []string{"রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি"}, -- daysNarrow: []string{"র", "সো", "ম", "বু", "বৃ", "শু", "শ"}, -- daysShort: []string{"রঃ", "সোঃ", "মঃ", "বুঃ", "বৃঃ", "শুঃ", "শোঃ"}, -- daysWide: []string{"রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"}, -- timezones: map[string]string{"PST": "প্রশান্ত মহাসাগরীয় অঞ্চলের মানক সময়", "AEDT": "অস্ট্রেলীয় পূর্ব দিবালোক সময়", "TMST": "তুর্কমেনিস্তান গ্রীষ্মকালীন সময়", "ECT": "ইকুয়েডর সময়", "HNPMX": "মেক্সিকান প্রশান্ত মহসাগরীয় মানক সময়", "AWDT": "অস্ট্রেলীয় পশ্চিমি দিবালোক সময়", "CLST": "চিলি গ্রীষ্মকাল সময়", "ChST": "চামেরো মানক সময়", "EST": "পূর্বাঞ্চলের প্রমাণ সময়", "EDT": "পূর্বাঞ্চলের দিবালোক সময়", "CDT": "কেন্দ্রীয় দিবালোক সময়", "WIB": "পশ্চিমী ইন্দোনেশিয়া সময়", "WEZ": "পশ্চিম ইউরোপের মানক সময়", "AEST": "অস্ট্রেলীয় পূর্ব মানক সময়", "WITA": "কেন্দ্রীয় ইন্দোনেশিয়া সময়", "HNPM": "সেন্ট পিয়ের ও মিকেলন মানক সময়", "LHST": "লর্ড হাওয়ে মানক মসয়", "HADT": "হাওয়াই-আলেউত দিবালোক সময়", "HEOG": "পশ্চিম গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "AKDT": "আলাস্কা দিবালোক সময়", "CLT": "চিলি মানক সময়", "WAT": "পশ্চিম আফ্রিকা মানক সময়", "MST": "মাকাও মান সময়", "ACWST": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি মানক সময়", "AWST": "অস্ট্রেলীয় পশ্চিমি মানক সময়", "NZDT": "নিউজিল্যান্ড দিবালোক সময়", "SAST": "দক্ষিণ আফ্রিকা মানক সময়", "GFT": "ফরাসি গায়ানা সময়", "TMT": "তুর্কমেনিস্তান মানক সময়", "OESZ": "পূর্ব ইউরোপের গ্রীষ্মকালীন সময়", "GMT": "গ্রীনিচ মিন টাইম", "VET": "ভেনেজুয়েলা সময়", "CST": "কেন্দ্রীয় মানক সময়", "ADT": "অতলান্তিক দিবালোক সময়", "HNT": "নিউফাউন্ডল্যান্ড মানক সময়", "HNOG": "পশ্চিম গ্রীনল্যান্ড মানক সময়", "CHAST": "চ্যাথাম মানক সময়", "IST": "ভারতীয় মানক সময়", "WART": "পশ্চিমি আর্জেনটিনার প্রমাণ সময়", "HNNOMX": "উত্তরপশ্চিম মেক্সিকোর মানক সময়", "HECU": "কিউবা দিবালোক সময়", "HEPMX": "মেক্সিকান প্রশান্ত মহাসাগরীয় দিবালোক সময়", "WIT": "পূর্ব ইন্দোনেশিয়া সময়", "ARST": "আর্জেনটিনা গ্রীষ্মকালীন সময়", "BOT": "বোলিভিয়া সময়", "ACST": "অস্ট্রেলীয় কেন্দ্রীয় মানক সময়", "WAST": "পশ্চিম আফ্রিকা গ্রীষ্মকালীন সময়", "UYT": "উরুগুয়ে মানক সময়", "AST": "অতলান্তিক মানক সময়", "JDT": "জাপান দিবালোক সময়", "HEEG": "পূর্ব গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "WARST": "পশ্চিমি আর্জেনটিনা গৃষ্মকালীন সময়", "HENOMX": "উত্তরপশ্চিম মেক্সিকোর দিনের সময়", "HNCU": "কিউবা মানক সময়", "HAST": "হাওয়াই-আলেউত মানক সময়", "SRT": "সুরিনাম সময়", "PDT": "প্রশান্ত মহাসাগরীয় অঞ্চলের দিনের সময়", "HEPM": "সেন্ট পিয়ের ও মিকেলন দিবালোক সময়", "CHADT": "চ্যাথাম দিবালোক সময়", "JST": "জাপান মানক সময়", "NZST": "নিউজিল্যান্ড মানক সময়", "MYT": "মালয়েশিয়া সময়", "BT": "ভুটান সময়", "WESZ": "পশ্চিম ইউরোপের গ্রীষ্মকালীন সময়", "HKST": "হং কং গ্রীষ্মকালীন সময়", "LHDT": "লর্ড হাওয়ে দিবালোক মসয়", "ACDT": "অস্ট্রেলীয় কেন্দ্রীয় দিবালোক সময়", "SGT": "সিঙ্গাপুর মানক সময়", "AKST": "আলাস্কা মানক সময়", "HAT": "নিউফাউন্ডল্যান্ড দিবালোক সময়", "HNEG": "পূর্ব গ্রীনল্যান্ড মানক সময়", "EAT": "পূর্ব আফ্রিকা সময়", "ACWDT": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি দিবালোক সময়", "ART": "আর্জেনটিনা মানক সময়", "∅∅∅": "অ্যামাজন গ্রীষ্মকালীন সময়", "OEZ": "পূর্ব ইউরোপের মানক সময়", "MDT": "মাকাও গ্রীষ্মকাল সময়", "GYT": "গুয়ানা সময়", "HKT": "হং কং মানক সময়", "MEZ": "মধ্য ইউরোপের মানক সময়", "MESZ": "মধ্য ইউরোপের গ্রীষ্মকালীন সময়", "CAT": "মধ্য আফ্রিকা সময়", "COT": "কোলোম্বিয়া মানক সময়", "COST": "কোলোম্বিয়া গ্রীষ্মকালীন সময়", "UYST": "উরুগুয়ে গ্রীষ্মকালীন সময়"}, -+ locale: "bn_BD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "OEZ": "OEZ", "EDT": "EDT", "EAT": "EAT", "HAST": "HAST", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "AKST": "AKST", "COT": "COT", "SRT": "SRT", "ACST": "ACST", "MYT": "MYT", "UYST": "UYST", "WAT": "WAT", "MEZ": "MEZ", "ACDT": "ACDT", "AEDT": "AEDT", "GYT": "GYT", "CST": "CST", "CDT": "CDT", "ARST": "ARST", "BOT": "BOT", "SAST": "SAST", "PDT": "PDT", "BT": "BT", "SGT": "SGT", "HNCU": "HNCU", "WIT": "WIT", "IST": "IST", "CLT": "CLT", "NZST": "NZST", "ChST": "ChST", "HNEG": "HNEG", "HEPM": "HEPM", "WARST": "WARST", "HNOG": "HNOG", "AST": "AST", "HADT": "HADT", "LHST": "LHST", "JDT": "JDT", "UYT": "UYT", "EST": "EST", "MDT": "MDT", "JST": "JST", "AEST": "AEST", "OESZ": "OESZ", "HNT": "HNT", "CAT": "CAT", "HEPMX": "HEPMX", "TMST": "TMST", "MST": "MST", "WEZ": "WEZ", "AKDT": "AKDT", "HAT": "HAT", "HKST": "HKST", "CLST": "CLST", "GMT": "GMT", "HNPM": "HNPM", "PST": "PST", "∅∅∅": "∅∅∅", "WITA": "WITA", "CHAST": "CHAST", "HECU": "HECU", "TMT": "TMT", "VET": "VET", "WAST": "WAST", "GFT": "GFT", "ECT": "ECT", "WIB": "WIB", "ART": "ART", "HEEG": "HEEG", "AWDT": "AWDT", "NZDT": "NZDT", "HENOMX": "HENOMX", "COST": "COST", "HKT": "HKT", "ADT": "ADT", "CHADT": "CHADT", "ACWST": "ACWST", "ACWDT": "ACWDT", "WART": "WART", "AWST": "AWST", "HNPMX": "HNPMX", "HEOG": "HEOG"}, - } - } -  -@@ -143,7 +126,7 @@ func (bn *bn_BD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bn *bn_BD) MonthsAbbreviated() []string { -- return bn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +136,7 @@ func (bn *bn_BD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bn *bn_BD) MonthsNarrow() []string { -- return bn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +146,7 @@ func (bn *bn_BD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bn *bn_BD) MonthsWide() []string { -- return bn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,82 +192,13 @@ func (bn *bn_BD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bn_BD' and handles both Whole and Real numbers based on 'v' - func (bn *bn_BD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, bn.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bn_BD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bn *bn_BD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bn_BD' -@@ -292,63 +206,7 @@ func (bn *bn_BD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bn.currencies[currency] -- l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, bn.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bn_BD' -@@ -357,70 +215,7 @@ func (bn *bn_BD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bn.currencies[currency] -- l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, bn.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bn.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bn_BD' -@@ -428,17 +223,6 @@ func (bn *bn_BD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -447,17 +231,6 @@ func (bn *bn_BD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,17 +239,6 @@ func (bn *bn_BD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,19 +247,6 @@ func (bn *bn_BD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,28 +255,6 @@ func (bn *bn_BD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -536,35 +263,6 @@ func (bn *bn_BD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -573,40 +271,6 @@ func (bn *bn_BD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -615,44 +279,5 @@ func (bn *bn_BD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bn_IN/bn_IN.go b/bn_IN/bn_IN.go -index 8c69d60..acc1f5c 100644 ---- a/bn_IN/bn_IN.go -+++ b/bn_IN/bn_IN.go -@@ -42,30 +42,13 @@ type bn_IN struct { - // New returns a new instance of translator for the 'bn_IN' locale - func New() locales.Translator { - return &bn_IN{ -- locale: "bn_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"}, -- monthsNarrow: []string{"", "জা", "ফে", "মা", "এ", "মে", "জুন", "জু", "আ", "সে", "অ", "ন", "ডি"}, -- monthsWide: []string{"", "জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"}, -- daysAbbreviated: []string{"রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি"}, -- daysNarrow: []string{"র", "সো", "ম", "বু", "বৃ", "শু", "শ"}, -- daysShort: []string{"রঃ", "সোঃ", "মঃ", "বুঃ", "বৃঃ", "শুঃ", "শোঃ"}, -- daysWide: []string{"রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"}, -- timezones: map[string]string{"AWDT": "অস্ট্রেলীয় পশ্চিমি দিবালোক সময়", "HKST": "হং কং গ্রীষ্মকালীন সময়", "MESZ": "মধ্য ইউরোপের গ্রীষ্মকালীন সময়", "JDT": "জাপান দিবালোক সময়", "WAST": "পশ্চিম আফ্রিকা গ্রীষ্মকালীন সময়", "SGT": "সিঙ্গাপুর মানক সময়", "ART": "আর্জেনটিনা মানক সময়", "AWST": "অস্ট্রেলীয় পশ্চিমি মানক সময়", "CST": "কেন্দ্রীয় মানক সময়", "BT": "ভুটান সময়", "GMT": "গ্রীনিচ মিন টাইম", "HNCU": "কিউবা মানক সময়", "ACWST": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি মানক সময়", "HEOG": "পশ্চিম গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "TMST": "তুর্কমেনিস্তান গ্রীষ্মকালীন সময়", "CAT": "মধ্য আফ্রিকা সময়", "AST": "অতলান্তিক মানক সময়", "VET": "ভেনেজুয়েলা সময়", "WIT": "পূর্ব ইন্দোনেশিয়া সময়", "AEDT": "অস্ট্রেলীয় পূর্ব দিবালোক সময়", "HNEG": "পূর্ব গ্রীনল্যান্ড মানক সময়", "HECU": "কিউবা দিবালোক সময়", "UYST": "উরুগুয়ে গ্রীষ্মকালীন সময়", "WITA": "কেন্দ্রীয় ইন্দোনেশিয়া সময়", "HEPM": "সেন্ট পিয়ের ও মিকেলন দিবালোক সময়", "CHAST": "চ্যাথাম মানক সময়", "WAT": "পশ্চিম আফ্রিকা মানক সময়", "COST": "কোলোম্বিয়া গ্রীষ্মকালীন সময়", "EST": "পূর্বাঞ্চলের প্রমাণ সময়", "HNT": "নিউফাউন্ডল্যান্ড মানক সময়", "HKT": "হং কং মানক সময়", "HNPM": "সেন্ট পিয়ের ও মিকেলন মানক সময়", "WART": "পশ্চিমি আর্জেনটিনার প্রমাণ সময়", "ARST": "আর্জেনটিনা গ্রীষ্মকালীন সময়", "MEZ": "মধ্য ইউরোপের মানক সময়", "CLT": "চিলি মানক সময়", "COT": "কোলোম্বিয়া মানক সময়", "AKDT": "আলাস্কা দিবালোক সময়", "WESZ": "পশ্চিম ইউরোপের গ্রীষ্মকালীন সময়", "ACWDT": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি দিবালোক সময়", "NZDT": "নিউজিল্যান্ড দিবালোক সময়", "HEEG": "পূর্ব গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "LHDT": "লর্ড হাওয়ে দিবালোক মসয়", "ChST": "চামেরো মানক সময়", "TMT": "তুর্কমেনিস্তান মানক সময়", "ACDT": "অস্ট্রেলীয় কেন্দ্রীয় দিবালোক সময়", "OESZ": "পূর্ব ইউরোপের গ্রীষ্মকালীন সময়", "HNOG": "পশ্চিম গ্রীনল্যান্ড মানক সময়", "AEST": "অস্ট্রেলীয় পূর্ব মানক সময়", "EDT": "পূর্বাঞ্চলের দিবালোক সময়", "MYT": "মালয়েশিয়া সময়", "NZST": "নিউজিল্যান্ড মানক সময়", "OEZ": "পূর্ব ইউরোপের মানক সময়", "HNPMX": "মেক্সিকান প্রশান্ত মহসাগরীয় মানক সময়", "CDT": "কেন্দ্রীয় দিবালোক সময়", "HADT": "হাওয়াই-আলেউত দিবালোক সময়", "CLST": "চিলি গ্রীষ্মকাল সময়", "GFT": "ফরাসি গায়ানা সময়", "UYT": "উরুগুয়ে মানক সময়", "HAST": "হাওয়াই-আলেউত মানক সময়", "SRT": "সুরিনাম সময়", "PST": "প্রশান্ত মহাসাগরীয় অঞ্চলের মানক সময়", "HAT": "নিউফাউন্ডল্যান্ড দিবালোক সময়", "HNNOMX": "উত্তরপশ্চিম মেক্সিকোর মানক সময়", "MDT": "মাকাও গ্রীষ্মকাল সময়", "GYT": "গুয়ানা সময়", "JST": "জাপান মানক সময়", "BOT": "বোলিভিয়া সময়", "LHST": "লর্ড হাওয়ে মানক মসয়", "CHADT": "চ্যাথাম দিবালোক সময়", "IST": "ভারতীয় মানক সময়", "ACST": "অস্ট্রেলীয় কেন্দ্রীয় মানক সময়", "ECT": "ইকুয়েডর সময়", "MST": "মাকাও মান সময়", "PDT": "প্রশান্ত মহাসাগরীয় অঞ্চলের দিনের সময়", "WEZ": "পশ্চিম ইউরোপের মানক সময়", "HEPMX": "মেক্সিকান প্রশান্ত মহাসাগরীয় দিবালোক সময়", "WIB": "পশ্চিমী ইন্দোনেশিয়া সময়", "∅∅∅": "অ্যামাজন গ্রীষ্মকালীন সময়", "WARST": "পশ্চিমি আর্জেনটিনা গৃষ্মকালীন সময়", "HENOMX": "উত্তরপশ্চিম মেক্সিকোর দিনের সময়", "AKST": "আলাস্কা মানক সময়", "ADT": "অতলান্তিক দিবালোক সময়", "SAST": "দক্ষিণ আফ্রিকা মানক সময়", "EAT": "পূর্ব আফ্রিকা সময়"}, -+ locale: "bn_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZDT": "NZDT", "ECT": "ECT", "ChST": "ChST", "MEZ": "MEZ", "ACWST": "ACWST", "WIT": "WIT", "HAT": "HAT", "HKST": "HKST", "MST": "MST", "AWDT": "AWDT", "AEDT": "AEDT", "UYST": "UYST", "EDT": "EDT", "HEEG": "HEEG", "VET": "VET", "WAT": "WAT", "HNEG": "HNEG", "ACDT": "ACDT", "WESZ": "WESZ", "AKST": "AKST", "COST": "COST", "WIB": "WIB", "BOT": "BOT", "ACWDT": "ACWDT", "UYT": "UYT", "HECU": "HECU", "HNOG": "HNOG", "CDT": "CDT", "MDT": "MDT", "EAT": "EAT", "JDT": "JDT", "CHAST": "CHAST", "AKDT": "AKDT", "WARST": "WARST", "GYT": "GYT", "SRT": "SRT", "MESZ": "MESZ", "HNPM": "HNPM", "HEPMX": "HEPMX", "JST": "JST", "LHDT": "LHDT", "WART": "WART", "WITA": "WITA", "BT": "BT", "HNT": "HNT", "COT": "COT", "∅∅∅": "∅∅∅", "IST": "IST", "PDT": "PDT", "OEZ": "OEZ", "HEOG": "HEOG", "ACST": "ACST", "MYT": "MYT", "AWST": "AWST", "SAST": "SAST", "HKT": "HKT", "ARST": "ARST", "TMST": "TMST", "CLST": "CLST", "HAST": "HAST", "HNPMX": "HNPMX", "WEZ": "WEZ", "GFT": "GFT", "HEPM": "HEPM", "SGT": "SGT", "OESZ": "OESZ", "AST": "AST", "GMT": "GMT", "HADT": "HADT", "CLT": "CLT", "ART": "ART", "LHST": "LHST", "CHADT": "CHADT", "WAST": "WAST", "CAT": "CAT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "TMT": "TMT", "EST": "EST", "NZST": "NZST", "CST": "CST", "ADT": "ADT", "AEST": "AEST", "PST": "PST", "HNCU": "HNCU"}, - } - } -  -@@ -143,7 +126,7 @@ func (bn *bn_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bn *bn_IN) MonthsAbbreviated() []string { -- return bn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +136,7 @@ func (bn *bn_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bn *bn_IN) MonthsNarrow() []string { -- return bn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +146,7 @@ func (bn *bn_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bn *bn_IN) MonthsWide() []string { -- return bn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,82 +192,13 @@ func (bn *bn_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bn_IN' and handles both Whole and Real numbers based on 'v' - func (bn *bn_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, bn.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bn_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bn *bn_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bn_IN' -@@ -292,63 +206,7 @@ func (bn *bn_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bn.currencies[currency] -- l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, bn.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bn_IN' -@@ -357,70 +215,7 @@ func (bn *bn_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bn.currencies[currency] -- l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, bn.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bn.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bn_IN' -@@ -428,17 +223,6 @@ func (bn *bn_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -447,17 +231,6 @@ func (bn *bn_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,17 +239,6 @@ func (bn *bn_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,19 +247,6 @@ func (bn *bn_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, bn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,28 +255,6 @@ func (bn *bn_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -536,35 +263,6 @@ func (bn *bn_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -573,40 +271,6 @@ func (bn *bn_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -615,44 +279,5 @@ func (bn *bn_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bn.periodsAbbreviated[0]...) -- } else { -- b = append(b, bn.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bo/bo.go b/bo/bo.go -index 4d84656..9519dd5 100644 ---- a/bo/bo.go -+++ b/bo/bo.go -@@ -64,7 +64,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"སྤྱི་ལོ་སྔོན་", "སྤྱི་ལོ་"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"WESZ": "WESZ", "MESZ": "MESZ", "CLT": "CLT", "GFT": "GFT", "IST": "IST", "JDT": "JDT", "TMST": "TMST", "HEPMX": "HEPMX", "WIB": "WIB", "ARST": "ARST", "PDT": "PDT", "MEZ": "MEZ", "ADT": "ADT", "AEST": "AEST", "LHST": "LHST", "CLST": "CLST", "TMT": "TMT", "GMT": "GMT", "HNT": "HNT", "WEZ": "WEZ", "HNPM": "HNPM", "NZST": "NZST", "WARST": "WARST", "WIT": "WIT", "ACWDT": "ACWDT", "OEZ": "OEZ", "OESZ": "OESZ", "ACST": "ACST", "HNNOMX": "HNNOMX", "COST": "COST", "HNCU": "HNCU", "HEOG": "HEOG", "JST": "JST", "EST": "EST", "AST": "AST", "WAT": "WAT", "MST": "MST", "AKST": "AKST", "CDT": "CDT", "UYT": "UYT", "ACDT": "ACDT", "HENOMX": "HENOMX", "VET": "VET", "HEEG": "HEEG", "NZDT": "NZDT", "LHDT": "LHDT", "ECT": "ECT", "AKDT": "AKDT", "HADT": "HADT", "ART": "ART", "HNOG": "HNOG", "AEDT": "AEDT", "MYT": "MYT", "UYST": "UYST", "HAST": "HAST", "CHAST": "CHAST", "BOT": "BOT", "∅∅∅": "∅∅∅", "EDT": "EDT", "AWST": "AWST", "ChST": "ChST", "CHADT": "CHADT", "COT": "COT", "HECU": "HECU", "MDT": "MDT", "GYT": "GYT", "HKT": "HKT", "WAST": "WAST", "BT": "BT", "ACWST": "ACWST", "HKST": "HKST", "HEPM": "HEPM", "SAST": "SAST", "AWDT": "AWDT", "CAT": "CAT", "WART": "WART", "SRT": "SRT", "HAT": "HAT", "PST": "PST", "WITA": "WITA", "SGT": "SGT", "HNPMX": "HNPMX", "CST": "CST", "HNEG": "HNEG", "EAT": "EAT"}, -+ timezones: map[string]string{"AEDT": "AEDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "OESZ": "OESZ", "NZDT": "NZDT", "MESZ": "MESZ", "MYT": "MYT", "WEZ": "WEZ", "VET": "VET", "WIT": "WIT", "HKT": "HKT", "ART": "ART", "BOT": "BOT", "WITA": "WITA", "JDT": "JDT", "WESZ": "WESZ", "CDT": "CDT", "HAST": "HAST", "HNPM": "HNPM", "UYST": "UYST", "ACWDT": "ACWDT", "EDT": "EDT", "HNEG": "HNEG", "HEPM": "HEPM", "CLST": "CLST", "GMT": "GMT", "SGT": "SGT", "AKST": "AKST", "GFT": "GFT", "HNT": "HNT", "COST": "COST", "HKST": "HKST", "ARST": "ARST", "AWST": "AWST", "LHDT": "LHDT", "HECU": "HECU", "HAT": "HAT", "MDT": "MDT", "ACWST": "ACWST", "SAST": "SAST", "GYT": "GYT", "AST": "AST", "ACST": "ACST", "HEOG": "HEOG", "HADT": "HADT", "WARST": "WARST", "EST": "EST", "CLT": "CLT", "WIB": "WIB", "NZST": "NZST", "ECT": "ECT", "IST": "IST", "HNCU": "HNCU", "MST": "MST", "ADT": "ADT", "ACDT": "ACDT", "PDT": "PDT", "BT": "BT", "WAST": "WAST", "COT": "COT", "TMT": "TMT", "CST": "CST", "AEST": "AEST", "PST": "PST", "WAT": "WAT", "WART": "WART", "EAT": "EAT", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "TMST": "TMST", "HNPMX": "HNPMX", "CAT": "CAT", "ChST": "ChST", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "CHADT": "CHADT", "UYT": "UYT", "OEZ": "OEZ", "HNOG": "HNOG", "SRT": "SRT", "HEEG": "HEEG", "JST": "JST", "LHST": "LHST"}, - } - } -  -diff --git a/bo_CN/bo_CN.go b/bo_CN/bo_CN.go -index fd35971..c86c1fa 100644 ---- a/bo_CN/bo_CN.go -+++ b/bo_CN/bo_CN.go -@@ -10,61 +10,45 @@ import ( - ) -  - type bo_CN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bo_CN' locale - func New() locales.Translator { - return &bo_CN{ -- locale: "bo_CN", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ཟླ་༡", "ཟླ་༢", "ཟླ་༣", "ཟླ་༤", "ཟླ་༥", "ཟླ་༦", "ཟླ་༧", "ཟླ་༨", "ཟླ་༩", "ཟླ་༡༠", "ཟླ་༡༡", "ཟླ་༡༢"}, -- monthsWide: []string{"", "ཟླ་བ་དང་པོ", "ཟླ་བ་གཉིས་པ", "ཟླ་བ་གསུམ་པ", "ཟླ་བ་བཞི་པ", "ཟླ་བ་ལྔ་པ", "ཟླ་བ་དྲུག་པ", "ཟླ་བ་བདུན་པ", "ཟླ་བ་བརྒྱད་པ", "ཟླ་བ་དགུ་པ", "ཟླ་བ་བཅུ་པ", "ཟླ་བ་བཅུ་གཅིག་པ", "ཟླ་བ་བཅུ་གཉིས་པ"}, -- daysAbbreviated: []string{"ཉི་མ་", "ཟླ་བ་", "མིག་དམར་", "ལྷག་པ་", "ཕུར་བུ་", "པ་སངས་", "སྤེན་པ་"}, -- daysNarrow: []string{"ཉི", "ཟླ", "མིག", "ལྷག", "ཕུར", "སངས", "སྤེན"}, -- daysWide: []string{"གཟའ་ཉི་མ་", "གཟའ་ཟླ་བ་", "གཟའ་མིག་དམར་", "གཟའ་ལྷག་པ་", "གཟའ་ཕུར་བུ་", "གཟའ་པ་སངས་", "གཟའ་སྤེན་པ་"}, -- periodsAbbreviated: []string{"སྔ་དྲོ་", "ཕྱི་དྲོ་"}, -- periodsWide: []string{"སྔ་དྲོ་", "ཕྱི་དྲོ་"}, -- erasAbbreviated: []string{"སྤྱི་ལོ་སྔོན་", "སྤྱི་ལོ་"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"MYT": "MYT", "VET": "VET", "SRT": "SRT", "HKST": "HKST", "CAT": "CAT", "HAST": "HAST", "HEPM": "HEPM", "CLT": "CLT", "ACDT": "ACDT", "OESZ": "OESZ", "GYT": "GYT", "UYST": "UYST", "ARST": "ARST", "AEST": "AEST", "TMST": "TMST", "ChST": "ChST", "WART": "WART", "HEOG": "HEOG", "NZST": "NZST", "MESZ": "MESZ", "COST": "COST", "HECU": "HECU", "NZDT": "NZDT", "CHADT": "CHADT", "AKST": "AKST", "HNCU": "HNCU", "ADT": "ADT", "UYT": "UYT", "HKT": "HKT", "BOT": "BOT", "ECT": "ECT", "JDT": "JDT", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "HADT": "HADT", "ACWDT": "ACWDT", "SAST": "SAST", "CHAST": "CHAST", "GFT": "GFT", "SGT": "SGT", "HAT": "HAT", "PST": "PST", "HNPM": "HNPM", "GMT": "GMT", "BT": "BT", "CLST": "CLST", "COT": "COT", "WAST": "WAST", "EAT": "EAT", "MST": "MST", "ACWST": "ACWST", "HNEG": "HNEG", "WAT": "WAT", "WIT": "WIT", "EST": "EST", "CDT": "CDT", "ACST": "ACST", "CST": "CST", "HNT": "HNT", "PDT": "PDT", "WESZ": "WESZ", "JST": "JST", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "EDT": "EDT", "MDT": "MDT", "ART": "ART", "AWST": "AWST", "IST": "IST", "AST": "AST", "MEZ": "MEZ", "LHST": "LHST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "TMT": "TMT", "HNOG": "HNOG", "WITA": "WITA", "AEDT": "AEDT", "OEZ": "OEZ", "WARST": "WARST", "HNPMX": "HNPMX", "WIB": "WIB", "WEZ": "WEZ", "AWDT": "AWDT", "HEEG": "HEEG"}, -+ locale: "bo_CN", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SRT": "SRT", "HNNOMX": "HNNOMX", "OEZ": "OEZ", "AEST": "AEST", "ACWST": "ACWST", "HNPMX": "HNPMX", "WEZ": "WEZ", "HAT": "HAT", "WARST": "WARST", "MESZ": "MESZ", "ACST": "ACST", "LHST": "LHST", "UYST": "UYST", "IST": "IST", "COST": "COST", "WITA": "WITA", "ACWDT": "ACWDT", "WAT": "WAT", "AKST": "AKST", "GFT": "GFT", "CAT": "CAT", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "VET": "VET", "OESZ": "OESZ", "HNT": "HNT", "GMT": "GMT", "JST": "JST", "HNPM": "HNPM", "CHADT": "CHADT", "HEPM": "HEPM", "PDT": "PDT", "HECU": "HECU", "GYT": "GYT", "EDT": "EDT", "CST": "CST", "MEZ": "MEZ", "HEEG": "HEEG", "UYT": "UYT", "SGT": "SGT", "WAST": "WAST", "TMST": "TMST", "CDT": "CDT", "MST": "MST", "EAT": "EAT", "JDT": "JDT", "COT": "COT", "TMT": "TMT", "CLST": "CLST", "ART": "ART", "ARST": "ARST", "AEDT": "AEDT", "HEOG": "HEOG", "ECT": "ECT", "HNEG": "HNEG", "HEPMX": "HEPMX", "HNOG": "HNOG", "AWDT": "AWDT", "LHDT": "LHDT", "MYT": "MYT", "AKDT": "AKDT", "WART": "WART", "NZST": "NZST", "HAST": "HAST", "CHAST": "CHAST", "WIT": "WIT", "MDT": "MDT", "BOT": "BOT", "HADT": "HADT", "EST": "EST", "NZDT": "NZDT", "ChST": "ChST", "ACDT": "ACDT", "PST": "PST", "BT": "BT", "HKT": "HKT", "WIB": "WIB", "AST": "AST", "ADT": "ADT", "AWST": "AWST", "HNCU": "HNCU", "SAST": "SAST", "HKST": "HKST", "CLT": "CLT"}, - } - } -  -@@ -110,7 +94,7 @@ func (bo *bo_CN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bo *bo_CN) MonthsAbbreviated() []string { -- return bo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +114,7 @@ func (bo *bo_CN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bo *bo_CN) MonthsWide() []string { -- return bo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -176,73 +160,13 @@ func (bo *bo_CN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bo_CN' and handles both Whole and Real numbers based on 'v' - func (bo *bo_CN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bo_CN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bo *bo_CN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bo_CN' -@@ -250,60 +174,7 @@ func (bo *bo_CN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, bo.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, bo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bo_CN' -@@ -312,72 +183,7 @@ func (bo *bo_CN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(bo.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, bo.currencyNegativePrefix[j]) -- } -- -- b = append(b, bo.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, bo.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bo_CN' -@@ -385,28 +191,6 @@ func (bo *bo_CN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -415,17 +199,6 @@ func (bo *bo_CN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbd, 0xa0, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b}...) -- b = append(b, bo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -434,19 +207,6 @@ func (bo *bo_CN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0xa4, 0xe0, 0xbe, 0xb1, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbc, 0x8b}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, bo.monthsWide[t.Month()]...) -- b = append(b, []byte{0xe0, 0xbd, 0xa0, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,19 +215,6 @@ func (bo *bo_CN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, bo.monthsWide[t.Month()]...) -- b = append(b, []byte{0xe0, 0xbd, 0xa0, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, bo.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -476,28 +223,6 @@ func (bo *bo_CN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -506,35 +231,6 @@ func (bo *bo_CN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -543,40 +239,6 @@ func (bo *bo_CN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -585,44 +247,5 @@ func (bo *bo_CN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bo_IN/bo_IN.go b/bo_IN/bo_IN.go -index a8fb1b4..e7d1202 100644 ---- a/bo_IN/bo_IN.go -+++ b/bo_IN/bo_IN.go -@@ -10,61 +10,45 @@ import ( - ) -  - type bo_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bo_IN' locale - func New() locales.Translator { - return &bo_IN{ -- locale: "bo_IN", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ཟླ་༡", "ཟླ་༢", "ཟླ་༣", "ཟླ་༤", "ཟླ་༥", "ཟླ་༦", "ཟླ་༧", "ཟླ་༨", "ཟླ་༩", "ཟླ་༡༠", "ཟླ་༡༡", "ཟླ་༡༢"}, -- monthsWide: []string{"", "ཟླ་བ་དང་པོ", "ཟླ་བ་གཉིས་པ", "ཟླ་བ་གསུམ་པ", "ཟླ་བ་བཞི་པ", "ཟླ་བ་ལྔ་པ", "ཟླ་བ་དྲུག་པ", "ཟླ་བ་བདུན་པ", "ཟླ་བ་བརྒྱད་པ", "ཟླ་བ་དགུ་པ", "ཟླ་བ་བཅུ་པ", "ཟླ་བ་བཅུ་གཅིག་པ", "ཟླ་བ་བཅུ་གཉིས་པ"}, -- daysAbbreviated: []string{"ཉི་མ་", "ཟླ་བ་", "མིག་དམར་", "ལྷག་པ་", "ཕུར་བུ་", "པ་སངས་", "སྤེན་པ་"}, -- daysNarrow: []string{"ཉི", "ཟླ", "མིག", "ལྷག", "ཕུར", "སངས", "སྤེན"}, -- daysWide: []string{"གཟའ་ཉི་མ་", "གཟའ་ཟླ་བ་", "གཟའ་མིག་དམར་", "གཟའ་ལྷག་པ་", "གཟའ་ཕུར་བུ་", "གཟའ་པ་སངས་", "གཟའ་སྤེན་པ་"}, -- periodsAbbreviated: []string{"སྔ་དྲོ་", "ཕྱི་དྲོ་"}, -- periodsWide: []string{"སྔ་དྲོ་", "ཕྱི་དྲོ་"}, -- erasAbbreviated: []string{"སྤྱི་ལོ་སྔོན་", "སྤྱི་ལོ་"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HEOG": "HEOG", "AWST": "AWST", "NZST": "NZST", "ACDT": "ACDT", "MST": "MST", "ADT": "ADT", "GYT": "GYT", "HADT": "HADT", "VET": "VET", "HNT": "HNT", "WESZ": "WESZ", "HEPM": "HEPM", "HENOMX": "HENOMX", "EDT": "EDT", "WIB": "WIB", "PDT": "PDT", "AEST": "AEST", "AWDT": "AWDT", "CLST": "CLST", "CAT": "CAT", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "HAT": "HAT", "LHST": "LHST", "LHDT": "LHDT", "OESZ": "OESZ", "GMT": "GMT", "BT": "BT", "HKST": "HKST", "ECT": "ECT", "HNEG": "HNEG", "HNCU": "HNCU", "WITA": "WITA", "CHAST": "CHAST", "EAT": "EAT", "COST": "COST", "CST": "CST", "TMT": "TMT", "EST": "EST", "ART": "ART", "MESZ": "MESZ", "GFT": "GFT", "ChST": "ChST", "WARST": "WARST", "COT": "COT", "HNPMX": "HNPMX", "WAST": "WAST", "ACWST": "ACWST", "HECU": "HECU", "UYST": "UYST", "HAST": "HAST", "SAST": "SAST", "JDT": "JDT", "MDT": "MDT", "AST": "AST", "NZDT": "NZDT", "HNPM": "HNPM", "IST": "IST", "CLT": "CLT", "HEEG": "HEEG", "ACST": "ACST", "∅∅∅": "∅∅∅", "SRT": "SRT", "HNOG": "HNOG", "CHADT": "CHADT", "OEZ": "OEZ", "AKST": "AKST", "WEZ": "WEZ", "AEDT": "AEDT", "TMST": "TMST", "MYT": "MYT", "WIT": "WIT", "JST": "JST", "HKT": "HKT", "MEZ": "MEZ", "BOT": "BOT", "WAT": "WAT", "WART": "WART", "SGT": "SGT", "ARST": "ARST", "CDT": "CDT", "ACWDT": "ACWDT", "PST": "PST", "AKDT": "AKDT", "UYT": "UYT"}, -+ locale: "bo_IN", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OEZ": "OEZ", "PST": "PST", "HECU": "HECU", "ADT": "ADT", "GMT": "GMT", "ACDT": "ACDT", "LHST": "LHST", "JDT": "JDT", "ACWDT": "ACWDT", "GYT": "GYT", "ECT": "ECT", "WIT": "WIT", "PDT": "PDT", "AEDT": "AEDT", "HNCU": "HNCU", "WARST": "WARST", "MEZ": "MEZ", "UYT": "UYT", "ChST": "ChST", "WEZ": "WEZ", "COST": "COST", "HKT": "HKT", "EST": "EST", "NZST": "NZST", "WIB": "WIB", "MYT": "MYT", "GFT": "GFT", "SAST": "SAST", "∅∅∅": "∅∅∅", "BOT": "BOT", "SRT": "SRT", "ACWST": "ACWST", "AEST": "AEST", "VET": "VET", "HEEG": "HEEG", "HEPM": "HEPM", "HNPM": "HNPM", "SGT": "SGT", "AKST": "AKST", "ACST": "ACST", "AWDT": "AWDT", "MDT": "MDT", "EAT": "EAT", "HNPMX": "HNPMX", "COT": "COT", "WITA": "WITA", "JST": "JST", "CHADT": "CHADT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HNT": "HNT", "CAT": "CAT", "MESZ": "MESZ", "AWST": "AWST", "CST": "CST", "CDT": "CDT", "NZDT": "NZDT", "ARST": "ARST", "WART": "WART", "HNOG": "HNOG", "CLT": "CLT", "HAST": "HAST", "HENOMX": "HENOMX", "WESZ": "WESZ", "HKST": "HKST", "MST": "MST", "HNEG": "HNEG", "IST": "IST", "WAT": "WAT", "AKDT": "AKDT", "HAT": "HAT", "HEOG": "HEOG", "HADT": "HADT", "TMST": "TMST", "CLST": "CLST", "AST": "AST", "ART": "ART", "LHDT": "LHDT", "UYST": "UYST", "EDT": "EDT", "TMT": "TMT", "BT": "BT", "WAST": "WAST", "HNNOMX": "HNNOMX", "CHAST": "CHAST"}, - } - } -  -@@ -110,7 +94,7 @@ func (bo *bo_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bo *bo_IN) MonthsAbbreviated() []string { -- return bo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +114,7 @@ func (bo *bo_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bo *bo_IN) MonthsWide() []string { -- return bo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -176,73 +160,13 @@ func (bo *bo_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bo_IN' and handles both Whole and Real numbers based on 'v' - func (bo *bo_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bo_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bo *bo_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bo_IN' -@@ -250,60 +174,7 @@ func (bo *bo_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, bo.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, bo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bo_IN' -@@ -312,72 +183,7 @@ func (bo *bo_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(bo.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, bo.currencyNegativePrefix[j]) -- } -- -- b = append(b, bo.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(bo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, bo.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bo_IN' -@@ -385,28 +191,6 @@ func (bo *bo_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -415,17 +199,6 @@ func (bo *bo_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbd, 0xa0, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b}...) -- b = append(b, bo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -434,19 +207,6 @@ func (bo *bo_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0xa4, 0xe0, 0xbe, 0xb1, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbc, 0x8b}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, bo.monthsWide[t.Month()]...) -- b = append(b, []byte{0xe0, 0xbd, 0xa0, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,19 +215,6 @@ func (bo *bo_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, bo.monthsWide[t.Month()]...) -- b = append(b, []byte{0xe0, 0xbd, 0xa0, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, bo.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -476,28 +223,6 @@ func (bo *bo_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -506,35 +231,6 @@ func (bo *bo_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -543,40 +239,6 @@ func (bo *bo_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -585,44 +247,5 @@ func (bo *bo_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, bo.periodsAbbreviated[0]...) -- } else { -- b = append(b, bo.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/br/br.go b/br/br.go -index 53f9a68..b14012d 100644 ---- a/br/br.go -+++ b/br/br.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"a-raok J.K.", "goude J.K."}, - erasNarrow: []string{"a-raok J.K.", "goude J.K."}, - erasWide: []string{"a-raok Jezuz-Krist", "goude Jezuz-Krist"}, -- timezones: map[string]string{"JST": "eur cʼhoañv Japan", "WAT": "eur cʼhoañv Afrika ar Cʼhornôg", "HECU": "eur hañv Kuba", "EST": "eur cʼhoañv ar Reter", "CDT": "CDT", "WIT": "eur Indonezia ar Reter", "MEZ": "eur cʼhoañv Kreizeuropa", "CHADT": "eur hañv Chatham", "HNEG": "eur cʼhoañv Greunland ar Reter", "HEEG": "eur hañv Greunland ar Reter", "GFT": "eur Gwiana cʼhall", "ACST": "eur cʼhoañv Kreizaostralia", "ART": "eur cʼhoañv Arcʼhantina", "WITA": "WITA", "CHAST": "eur cʼhoañv Chatham", "IST": "eur cʼhoañv India", "CLST": "eur hañv Chile", "CAT": "eur Kreizafrika", "HNCU": "eur cʼhoañv Kuba", "ACWDT": "eur hañv Kreizaostralia ar Cʼhornôg", "AWST": "eur cʼhoañv Aostralia ar Cʼhornôg", "NZST": "eur cʼhoañv Zeland-Nevez", "TMT": "eur cʼhoañv Turkmenistan", "WART": "eur cʼhoañv Arcʼhantina ar Cʼhornôg", "CST": "CST", "SAST": "eur cʼhoañv Suafrika", "ECT": "eur Ecuador", "AEDT": "eur hañv Aostralia ar Reter", "MESZ": "eur hañv Kreizeuropa", "LHDT": "LHDT", "AWDT": "eur hañv Aostralia ar Cʼhornôg", "HNPM": "eur cʼhoañv Sant-Pêr-ha-Mikelon", "WIB": "eur Indonezia ar Cʼhornôg", "PST": "PST", "PDT": "PDT", "COT": "eur cʼhoañv Kolombia", "HADT": "HADT", "∅∅∅": "eur hañv an Amazon", "WARST": "eur hañv Arcʼhantina ar Cʼhornôg", "TMST": "eur hañv Turkmenistan", "COST": "eur hañv Kolombia", "EDT": "eur hañv ar Reter", "MYT": "eur Malaysia", "UYST": "eur hañv Uruguay", "ADT": "ADT", "ACWST": "eur cʼhoañv Kreizaostralia ar Cʼhornôg", "ARST": "eur hañv Arcʼhantina", "EAT": "eur Afrika ar Reter", "OESZ": "eur hañv Europa ar Reter", "HNPMX": "HNPMX", "AKDT": "eur hañv Alaska", "WEZ": "eur cʼhoañv Europa ar Cʼhornôg", "CLT": "eur cʼhoañv Chile", "ChST": "ChST", "JDT": "eur hañv Japan", "HEPMX": "HEPMX", "UYT": "eur cʼhoañv Uruguay", "HNNOMX": "eur cʼhoañv Gwalarn Mecʼhiko", "HENOMX": "eur hañv Gwalarn Mecʼhiko", "BT": "eur Bhoutan", "ACDT": "eur hañv Kreizaostralia", "WAST": "eur hañv Afrika ar Cʼhornôg", "GYT": "eur Guyana", "AKST": "eur cʼhoañv Alaska", "AEST": "eur cʼhoañv Aostralia ar Reter", "BOT": "eur Bolivia", "SGT": "eur cʼhoañv Singapour", "AST": "AST", "HAT": "eur hañv Newfoundland", "HKT": "eur cʼhoañv Hong Kong", "HEPM": "eur hañv Sant-Pêr-ha-Mikelon", "HNOG": "eur cʼhoañv Greunland ar Cʼhornôg", "HEOG": "eur hañv Greunland ar Cʼhornôg", "HNT": "eur cʼhoañv Newfoundland", "NZDT": "eur hañv Zeland-Nevez", "MST": "eur cʼhoañv ar Menezioù", "HAST": "HAST", "VET": "eur Venezuela", "HKST": "eur hañv Hong Kong", "LHST": "LHST", "OEZ": "eur cʼhoañv Europa ar Reter", "GMT": "Amzer keitat Greenwich (AKG)", "MDT": "eur hañv ar Menezioù", "SRT": "eur Surinam", "WESZ": "eur hañv Europa ar Cʼhornôg"}, -+ timezones: map[string]string{"BOT": "eur Bolivia", "HEEG": "eur hañv Greunland ar Reter", "VET": "eur Venezuela", "MESZ": "eur hañv Kreizeuropa", "ACWDT": "eur hañv Kreizaostralia ar Cʼhornôg", "HNT": "eur cʼhoañv Newfoundland", "HEOG": "eur hañv Greunland ar Cʼhornôg", "HKT": "eur cʼhoañv Hong Kong", "NZDT": "eur hañv Zeland-Nevez", "IST": "eur cʼhoañv India", "ACWST": "eur cʼhoañv Kreizaostralia ar Cʼhornôg", "CHAST": "eur cʼhoañv Chatham", "UYST": "eur hañv Uruguay", "BT": "eur Bhoutan", "CLST": "eur hañv Chile", "ART": "eur cʼhoañv Arcʼhantina", "ACST": "eur cʼhoañv Kreizaostralia", "HEPM": "eur hañv Sant-Pêr-ha-Mikelon", "AWDT": "eur hañv Aostralia ar Cʼhornôg", "WARST": "eur hañv Arcʼhantina ar Cʼhornôg", "COST": "eur hañv Kolombia", "CDT": "CDT", "AST": "AST", "HNEG": "eur cʼhoañv Greunland ar Reter", "CHADT": "eur hañv Chatham", "PDT": "PDT", "WESZ": "eur hañv Europa ar Cʼhornôg", "EDT": "eur hañv ar Reter", "CST": "CST", "MDT": "eur hañv Macau", "ARST": "eur hañv Arcʼhantina", "MEZ": "eur cʼhoañv Kreizeuropa", "LHDT": "LHDT", "HAT": "eur hañv Newfoundland", "WIT": "eur Indonezia ar Reter", "GYT": "eur Guyana", "CAT": "eur Kreizafrika", "HENOMX": "eur hañv Gwalarn Mecʼhiko", "MYT": "eur Malaysia", "AEDT": "eur hañv Aostralia ar Reter", "AKST": "eur cʼhoañv Alaska", "GFT": "eur Gwiana cʼhall", "HKST": "eur hañv Hong Kong", "HAST": "HAST", "∅∅∅": "eur hañv an Amazon", "HECU": "eur hañv Kuba", "AWST": "eur cʼhoañv Aostralia ar Cʼhornôg", "AKDT": "eur hañv Alaska", "OEZ": "eur cʼhoañv Europa ar Reter", "ECT": "eur Ecuador", "ChST": "ChST", "EST": "eur cʼhoañv ar Reter", "CLT": "eur cʼhoañv Chile", "EAT": "eur Afrika ar Reter", "HNNOMX": "eur cʼhoañv Gwalarn Mecʼhiko", "HNPM": "eur cʼhoañv Sant-Pêr-ha-Mikelon", "JDT": "eur hañv Japan", "WAT": "eur cʼhoañv Afrika ar Cʼhornôg", "HNOG": "eur cʼhoañv Greunland ar Cʼhornôg", "WITA": "WITA", "SRT": "eur Surinam", "SGT": "eur cʼhoañv Singapour", "SAST": "eur cʼhoañv Suafrika", "WIB": "eur Indonezia ar Cʼhornôg", "GMT": "Amzer keitat Greenwich (AKG)", "ACDT": "eur hañv Kreizaostralia", "AEST": "eur cʼhoañv Aostralia ar Reter", "HEPMX": "HEPMX", "WART": "eur cʼhoañv Arcʼhantina ar Cʼhornôg", "MST": "eur cʼhoañv Macau", "HADT": "HADT", "UYT": "eur cʼhoañv Uruguay", "WAST": "eur hañv Afrika ar Cʼhornôg", "ADT": "ADT", "LHST": "LHST", "WEZ": "eur cʼhoañv Europa ar Cʼhornôg", "NZST": "eur cʼhoañv Zeland-Nevez", "JST": "eur cʼhoañv Japan", "PST": "PST", "HNCU": "eur cʼhoañv Kuba", "OESZ": "eur hañv Europa ar Reter", "COT": "eur cʼhoañv Kolombia", "TMT": "eur cʼhoañv Turkmenistan", "TMST": "eur hañv Turkmenistan", "HNPMX": "HNPMX"}, - } - } -  -@@ -101,9 +101,9 @@ func (br *br) PluralsRange() []locales.PluralRule { - func (br *br) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -+ nMod1000000 := math.Mod(n, 1000000) - nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -- nMod1000000 := math.Mod(n, 1000000) -  - if nMod10 == 1 && (nMod100 != 11 && nMod100 != 71 && nMod100 != 91) { - return locales.PluralRuleOne -diff --git a/br_FR/br_FR.go b/br_FR/br_FR.go -index be061fe..4385f11 100644 ---- a/br_FR/br_FR.go -+++ b/br_FR/br_FR.go -@@ -10,70 +10,45 @@ import ( - ) -  - type br_FR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'br_FR' locale - func New() locales.Translator { - return &br_FR{ -- locale: "br_FR", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Gen.", "Cʼhwe.", "Meur.", "Ebr.", "Mae", "Mezh.", "Goue.", "Eost", "Gwen.", "Here", "Du", "Kzu."}, -- monthsNarrow: []string{"", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"}, -- monthsWide: []string{"", "Genver", "Cʼhwevrer", "Meurzh", "Ebrel", "Mae", "Mezheven", "Gouere", "Eost", "Gwengolo", "Here", "Du", "Kerzu"}, -- daysAbbreviated: []string{"Sul", "Lun", "Meu.", "Mer.", "Yaou", "Gwe.", "Sad."}, -- daysNarrow: []string{"Su", "L", "Mz", "Mc", "Y", "G", "Sa"}, -- daysShort: []string{"Sul", "Lun", "Meu.", "Mer.", "Yaou", "Gwe.", "Sad."}, -- daysWide: []string{"Sul", "Lun", "Meurzh", "Mercʼher", "Yaou", "Gwener", "Sadorn"}, -- periodsAbbreviated: []string{"A.M.", "G.M."}, -- periodsNarrow: []string{"am", "gm"}, -- periodsWide: []string{"A.M.", "G.M."}, -- erasAbbreviated: []string{"a-raok J.K.", "goude J.K."}, -- erasNarrow: []string{"a-raok J.K.", "goude J.K."}, -- erasWide: []string{"a-raok Jezuz-Krist", "goude Jezuz-Krist"}, -- timezones: map[string]string{"HEPMX": "HEPMX", "JST": "eur cʼhoañv Japan", "HEEG": "eur hañv Greunland ar Reter", "SGT": "eur cʼhoañv Singapour", "AKDT": "eur hañv Alaska", "AST": "AST", "ADT": "ADT", "EST": "eur cʼhoañv ar Reter", "MDT": "eur hañv Macau", "HNCU": "eur cʼhoañv Kuba", "AKST": "eur cʼhoañv Alaska", "ARST": "eur hañv Arcʼhantina", "IST": "eur cʼhoañv India", "ACDT": "eur hañv Kreizaostralia", "PST": "PST", "HKT": "eur cʼhoañv Hong Kong", "WITA": "WITA", "WAST": "eur hañv Afrika ar Cʼhornôg", "WART": "eur cʼhoañv Arcʼhantina ar Cʼhornôg", "GMT": "Amzer keitat Greenwich (AKG)", "SRT": "eur Surinam", "HAT": "eur hañv Newfoundland", "TMST": "eur hañv Turkmenistan", "CLST": "eur hañv Chile", "GFT": "eur Gwiana cʼhall", "HAST": "HAST", "PDT": "PDT", "AWST": "eur cʼhoañv Aostralia ar Cʼhornôg", "LHDT": "LHDT", "JDT": "eur hañv Japan", "BOT": "eur Bolivia", "ACST": "eur cʼhoañv Kreizaostralia", "HECU": "eur hañv Kuba", "CDT": "CDT", "HNT": "eur cʼhoañv Newfoundland", "MEZ": "eur cʼhoañv Kreizeuropa", "HNEG": "eur cʼhoañv Greunland ar Reter", "ACWDT": "eur hañv Kreizaostralia ar Cʼhornôg", "AEST": "eur cʼhoañv Aostralia ar Reter", "AWDT": "eur hañv Aostralia ar Cʼhornôg", "HNPM": "eur cʼhoañv Sant-Pêr-ha-Mikelon", "CHADT": "eur hañv Chatham", "WEZ": "eur cʼhoañv Europa ar Cʼhornôg", "WESZ": "eur hañv Europa ar Cʼhornôg", "CLT": "eur cʼhoañv Chile", "OESZ": "eur hañv Europa ar Reter", "∅∅∅": "eur hañv Perou", "CST": "CST", "GYT": "eur Guyana", "HNOG": "eur cʼhoañv Greunland ar Cʼhornôg", "TMT": "eur cʼhoañv Turkmenistan", "ChST": "ChST", "WARST": "eur hañv Arcʼhantina ar Cʼhornôg", "UYT": "eur cʼhoañv Uruguay", "BT": "eur Bhoutan", "NZST": "eur cʼhoañv Zeland-Nevez", "COST": "eur hañv Kolombia", "HNPMX": "HNPMX", "HKST": "eur hañv Hong Kong", "AEDT": "eur hañv Aostralia ar Reter", "HEPM": "eur hañv Sant-Pêr-ha-Mikelon", "WAT": "eur cʼhoañv Afrika ar Cʼhornôg", "HENOMX": "eur hañv Gwalarn Mecʼhiko", "COT": "eur cʼhoañv Kolombia", "HADT": "HADT", "VET": "eur Venezuela", "LHST": "LHST", "ECT": "eur Ecuador", "CAT": "eur Kreizafrika", "HNNOMX": "eur cʼhoañv Gwalarn Mecʼhiko", "MST": "eur cʼhoañv Macau", "MYT": "eur Malaysia", "OEZ": "eur cʼhoañv Europa ar Reter", "ACWST": "eur cʼhoañv Kreizaostralia ar Cʼhornôg", "ART": "eur cʼhoañv Arcʼhantina", "HEOG": "eur hañv Greunland ar Cʼhornôg", "NZDT": "eur hañv Zeland-Nevez", "SAST": "eur cʼhoañv Suafrika", "EAT": "eur Afrika ar Reter", "EDT": "eur hañv ar Reter", "UYST": "eur hañv Uruguay", "CHAST": "eur cʼhoañv Chatham", "MESZ": "eur hañv Kreizeuropa", "WIB": "eur Indonezia ar Cʼhornôg", "WIT": "eur Indonezia ar Reter"}, -+ locale: "br_FR", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "MYT": "MYT", "IST": "IST", "UYT": "UYT", "ART": "ART", "MESZ": "MESZ", "ACWST": "ACWST", "OESZ": "OESZ", "NZDT": "NZDT", "AWDT": "AWDT", "AEST": "AEST", "OEZ": "OEZ", "WART": "WART", "GYT": "GYT", "ADT": "ADT", "AKST": "AKST", "WEZ": "WEZ", "HADT": "HADT", "ACDT": "ACDT", "HNPM": "HNPM", "PST": "PST", "HKT": "HKT", "HKST": "HKST", "EAT": "EAT", "JDT": "JDT", "VET": "VET", "HNOG": "HNOG", "TMT": "TMT", "HAST": "HAST", "MEZ": "MEZ", "AWST": "AWST", "WAST": "WAST", "WIT": "WIT", "TMST": "TMST", "NZST": "NZST", "AKDT": "AKDT", "GFT": "GFT", "HNT": "HNT", "COT": "COT", "EST": "EST", "MDT": "MDT", "CDT": "CDT", "HNNOMX": "HNNOMX", "BT": "BT", "CLT": "CLT", "CST": "CST", "BOT": "BOT", "ACST": "ACST", "LHST": "LHST", "CHADT": "CHADT", "ECT": "ECT", "SRT": "SRT", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "SAST": "SAST", "HEOG": "HEOG", "ChST": "ChST", "PDT": "PDT", "ACWDT": "ACWDT", "UYST": "UYST", "WESZ": "WESZ", "WAT": "WAT", "HAT": "HAT", "EDT": "EDT", "ARST": "ARST", "HENOMX": "HENOMX", "CHAST": "CHAST", "SGT": "SGT", "HNPMX": "HNPMX", "GMT": "GMT", "HEPMX": "HEPMX", "HNCU": "HNCU", "HEPM": "HEPM", "AEDT": "AEDT", "HECU": "HECU", "WARST": "WARST", "WIB": "WIB", "AST": "AST", "HEEG": "HEEG", "JST": "JST", "COST": "COST", "CAT": "CAT", "CLST": "CLST", "WITA": "WITA", "MST": "MST"}, - } - } -  -@@ -135,7 +110,7 @@ func (br *br_FR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (br *br_FR) MonthsAbbreviated() []string { -- return br.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +120,7 @@ func (br *br_FR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (br *br_FR) MonthsNarrow() []string { -- return br.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +130,7 @@ func (br *br_FR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (br *br_FR) MonthsWide() []string { -- return br.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,77 +176,13 @@ func (br *br_FR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'br_FR' and handles both Whole and Real numbers based on 'v' - func (br *br_FR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, br.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(br.group) - 1; j >= 0; j-- { -- b = append(b, br.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, br.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'br_FR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (br *br_FR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, br.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, br.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, br.percentSuffix...) -- -- b = append(b, br.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'br_FR' -@@ -279,58 +190,7 @@ func (br *br_FR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := br.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, br.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(br.group) - 1; j >= 0; j-- { -- b = append(b, br.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, br.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, br.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, br.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'br_FR' -@@ -339,65 +199,7 @@ func (br *br_FR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := br.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, br.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(br.group) - 1; j >= 0; j-- { -- b = append(b, br.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, br.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, br.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, br.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, br.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'br_FR' -@@ -405,28 +207,6 @@ func (br *br_FR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -435,17 +215,6 @@ func (br *br_FR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, br.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -454,17 +223,6 @@ func (br *br_FR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, br.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -473,19 +231,6 @@ func (br *br_FR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, br.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, br.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -494,19 +239,6 @@ func (br *br_FR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -515,26 +247,6 @@ func (br *br_FR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -543,30 +255,6 @@ func (br *br_FR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -575,34 +263,5 @@ func (br *br_FR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, br.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := br.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/brx/brx.go b/brx/brx.go -index eba178a..b94ceb6 100644 ---- a/brx/brx.go -+++ b/brx/brx.go -@@ -68,7 +68,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ईसा.पूर्व", "सन"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"HKT": "हाँगकॉंग स्टैंडर्ड टाईम", "CAT": "मध्य अफ्रीका स्टैंडर्ड टाईम", "GMT": "ग्रीनीच स्टैंडर्ड टाईम", "HECU": "क्युबा डेलाईट टाईम", "MDT": "माकाऊ समर टाईम", "MYT": "मलेशिया स्टैंडर्ड टाईम", "HADT": "हवाई आलटन डेलाईट टाईम", "HEOG": "ग्रीनलैण्ड वेस्टर्न समर टाईम", "WESZ": "वेस्टर्न यूरोप समर टाईम", "LHST": "लार्ड़ होव स्टैंडर्ड टाईम", "TMST": "तुर्कमेनीस्तान समर टाईम", "WART": "पश्चीम अर्जण्टिना स्टैंडर्ड टाईम", "COST": "कोलंबिया समर टाईम", "HNPMX": "HNPMX", "AKDT": "अलास्का डेलाईट टाईम", "VET": "वेनेज़ुएला स्टैंडर्ड टाईम", "HAT": "न्युफाऊंडलैण्ड डेलाईट टाईम", "PST": "पैसीफीक स्टैंडर्ड टाईम", "PDT": "पैसीफीक डेलाईट टाईम", "HEPM": "सेँ पीयॅर एवं मीकलों डेलाईट टाईम", "CHADT": "चैथम डेलाईट टाईम", "MEZ": "मध्य यूरोप स्टैंडर्ड टाईम", "HNNOMX": "HNNOMX", "GYT": "गुयाना स्टैंडर्ड टाईम", "HKST": "हाँगकॉंग समर टाईम", "JST": "जपान स्टैंडर्ड टाईम", "EAT": "पूर्वी अफ्रीका स्टैंडर्ड टाईम", "WARST": "पश्चीम अर्जण्टिना समर टाईम", "EST": "ईस्टर्न अमरिका स्टैंडर्ड टाईम", "EDT": "ईस्टर्न अमरिका डेलाईट टाईम", "HEPMX": "HEPMX", "CDT": "सैंट्रल अमरिका डेलाईट टाईम", "AEST": "पूर्वी ओस्ट्रेलिया स्टैंडर्ड टाईम", "MESZ": "मध्य यूरोप समर टाईम", "ACST": "मध्य ओस्ट्रेलिया स्टैंडर्ड टाईम", "ACDT": "मध्य ओस्ट्रेलिया डेलाईट टाईम", "COT": "कोलंबिया स्टैंडर्ड टाईम", "WEZ": "वेस्टर्न यूरोप स्टैंडर्ड टाईम", "NZDT": "न्युज़ीलैण्ड डेलाईट टाईम", "BOT": "बोलिविया स्टैंडर्ड टाईम", "CST": "सैंट्रल अमरिका स्टैंडर्ड टाईम", "UYT": "ऊरुगुए स्टैंडर्ड टाईम", "ARST": "अर्जण्टिना समर टाईम", "WITA": "ईंडोनीशिया स्टैंडर्ड टाईम", "AEDT": "पूर्वी ओस्ट्रेलिया डेलाईट टाईम", "CLT": "चीली स्टैंडर्ड टाईम", "CLST": "चीली समर टाईम", "BT": "भुटान स्टैंडर्ड टाईम", "ART": "अर्जनटिना स्टैंडर्ड टाईम", "JDT": "जपान डेलाईट टाईम", "HEEG": "ग्रीनलैण्ड ईस्टर्न समर टाईम", "OESZ": "ईस्टर्न यूरोप समर टाईम", "HNCU": "क्युबा स्टैंडर्ड टाईम", "SAST": "दक्षिण अफ्रीका स्टैंडर्ड टाईम", "ECT": "एक्वाडौर स्टैंडर्ड टाईम", "UYST": "ऊरुगुए समर टाईम", "ACWDT": "मध्य-पश्चीम ओस्ट्रेलिया डेलाईट टाईम", "LHDT": "लार्ड़ होव डेलाईट टाईम", "IST": "भारतीय स्टैंडर्ड टाईम", "∅∅∅": "अमाज़ोन समर टाईम", "HENOMX": "HENOMX", "ADT": "अटलांटीक डेलाईट टाईम", "NZST": "न्युज़ीलैण्ड स्टैंडर्ड टाईम", "TMT": "तुर्कमेनीस्तान स्टैंडर्ड टाईम", "MST": "माकाऊ स्टैंडर्ड टाईम", "AKST": "अलास्का स्टैंडर्ड टाईम", "WIT": "ईस्टर्न ईंडोनीशिया स्टैंडर्ड टाईम", "HNOG": "ग्रीनलैण्ड वेस्टर्न स्टैंडर्ड टाईम", "CHAST": "चैथम स्टैंडर्ड टाईम", "ChST": "चामरो स्टैंडर्ड टाईम", "ACWST": "मध्य-पश्चीम ओस्ट्रेलिया स्टैंडर्ड टाईम", "HNT": "न्युफाऊंडलैण्ड स्टैंडर्ड टाईम", "HNPM": "सेँ पीयॅर एवं मीकलों स्टैंडर्ड टाईम", "HNEG": "ग्रीनलैण्ड ईस्टर्न स्टैंडर्ड टाईम", "OEZ": "ईस्टर्न यूरोप स्टैंडर्ड टाईम", "WAT": "पश्चीम अफ्रीका स्टैंडर्ड टाईम", "SRT": "सुरीनाम स्टैंडर्ड टाईम", "AWDT": "दक्षिण ओस्ट्रेलिया डेलाईट टाईम", "GFT": "फ्रान्सीसी गुयाना स्टैंडर्ड टाईम", "WAST": "पश्चीम अफ्रीका समर टाईम", "WIB": "वेस्टर्न ईंडोनीशिया स्टैंडर्ड टाईम", "AWST": "दक्षिण ओस्ट्रेलिया स्टैंडर्ड टाईम", "SGT": "सींगापुर स्टैंडर्ड टाईम", "AST": "अटलांटीक स्टैंडर्ड टाईम", "HAST": "हवाई आलटन स्टैंडर्ड टाईम"}, -+ timezones: map[string]string{"ACWDT": "मध्य-पश्चीम ओस्ट्रेलिया डेलाईट टाईम", "UYST": "ऊरुगुए समर टाईम", "HEPM": "सेँ पीयॅर एवं मीकलों डेलाईट टाईम", "AEST": "पूर्वी ओस्ट्रेलिया स्टैंडर्ड टाईम", "NZST": "न्युज़ीलैण्ड स्टैंडर्ड टाईम", "MESZ": "मध्य यूरोप समर टाईम", "HEEG": "ग्रीनलैण्ड ईस्टर्न समर टाईम", "WEZ": "वेस्टर्न यूरोप स्टैंडर्ड टाईम", "WESZ": "वेस्टर्न यूरोप समर टाईम", "WARST": "पश्चीम अर्जण्टिना समर टाईम", "EDT": "ईस्टर्न अमरिका डेलाईट टाईम", "HNEG": "ग्रीनलैण्ड ईस्टर्न स्टैंडर्ड टाईम", "MYT": "मलेशिया स्टैंडर्ड टाईम", "∅∅∅": "आकर समर टाईम", "HNPMX": "HNPMX", "HAT": "न्युफाऊंडलैण्ड डेलाईट टाईम", "AWST": "दक्षिण ओस्ट्रेलिया स्टैंडर्ड टाईम", "COST": "कोलंबिया समर टाईम", "CHADT": "चैथम डेलाईट टाईम", "TMT": "तुर्कमेनीस्तान स्टैंडर्ड टाईम", "CLST": "चीली समर टाईम", "CST": "सैंट्रल अमरिका स्टैंडर्ड टाईम", "ACST": "मध्य ओस्ट्रेलिया स्टैंडर्ड टाईम", "BT": "भुटान स्टैंडर्ड टाईम", "OEZ": "ईस्टर्न यूरोप स्टैंडर्ड टाईम", "GFT": "फ्रान्सीसी गुयाना स्टैंडर्ड टाईम", "ECT": "एक्वाडौर स्टैंडर्ड टाईम", "WIB": "वेस्टर्न ईंडोनीशिया स्टैंडर्ड टाईम", "ChST": "चामरो स्टैंडर्ड टाईम", "JST": "जपान स्टैंडर्ड टाईम", "HNNOMX": "HNNOMX", "AWDT": "दक्षिण ओस्ट्रेलिया डेलाईट टाईम", "AEDT": "पूर्वी ओस्ट्रेलिया डेलाईट टाईम", "VET": "वेनेज़ुएला स्टैंडर्ड टाईम", "HECU": "क्युबा डेलाईट टाईम", "HEPMX": "HEPMX", "SRT": "सुरीनाम स्टैंडर्ड टाईम", "ACDT": "मध्य ओस्ट्रेलिया डेलाईट टाईम", "HNPM": "सेँ पीयॅर एवं मीकलों स्टैंडर्ड टाईम", "JDT": "जपान डेलाईट टाईम", "ACWST": "मध्य-पश्चीम ओस्ट्रेलिया स्टैंडर्ड टाईम", "WIT": "ईस्टर्न ईंडोनीशिया स्टैंडर्ड टाईम", "GYT": "गुयाना स्टैंडर्ड टाईम", "EST": "ईस्टर्न अमरिका स्टैंडर्ड टाईम", "HKT": "हाँगकॉंग स्टैंडर्ड टाईम", "LHDT": "लार्ड़ होव डेलाईट टाईम", "PST": "पैसीफीक स्टैंडर्ड टाईम", "CHAST": "चैथम स्टैंडर्ड टाईम", "HNCU": "क्युबा स्टैंडर्ड टाईम", "WAST": "पश्चीम अफ्रीका समर टाईम", "AKST": "अलास्का स्टैंडर्ड टाईम", "AKDT": "अलास्का डेलाईट टाईम", "CLT": "चीली स्टैंडर्ड टाईम", "HADT": "हवाई आलटन डेलाईट टाईम", "WAT": "पश्चीम अफ्रीका स्टैंडर्ड टाईम", "OESZ": "ईस्टर्न यूरोप समर टाईम", "WART": "पश्चीम अर्जण्टिना स्टैंडर्ड टाईम", "HKST": "हाँगकॉंग समर टाईम", "WITA": "ईंडोनीशिया स्टैंडर्ड टाईम", "GMT": "ग्रीनीच स्टैंडर्ड टाईम", "EAT": "पूर्वी अफ्रीका स्टैंडर्ड टाईम", "ART": "अर्जनटिना स्टैंडर्ड टाईम", "HNT": "न्युफाऊंडलैण्ड स्टैंडर्ड टाईम", "ADT": "अटलांटीक डेलाईट टाईम", "IST": "भारतीय स्टैंडर्ड टाईम", "LHST": "लार्ड़ होव स्टैंडर्ड टाईम", "PDT": "पैसीफीक डेलाईट टाईम", "SGT": "सींगापुर स्टैंडर्ड टाईम", "HNOG": "ग्रीनलैण्ड वेस्टर्न स्टैंडर्ड टाईम", "AST": "अटलांटीक स्टैंडर्ड टाईम", "HENOMX": "HENOMX", "UYT": "ऊरुगुए स्टैंडर्ड टाईम", "HEOG": "ग्रीनलैण्ड वेस्टर्न समर टाईम", "TMST": "तुर्कमेनीस्तान समर टाईम", "CAT": "मध्य अफ्रीका स्टैंडर्ड टाईम", "CDT": "सैंट्रल अमरिका डेलाईट टाईम", "BOT": "बोलिविया स्टैंडर्ड टाईम", "HAST": "हवाई आलटन स्टैंडर्ड टाईम", "SAST": "दक्षिण अफ्रीका स्टैंडर्ड टाईम", "COT": "कोलंबिया स्टैंडर्ड टाईम", "MST": "माकाऊ स्टैंडर्ड टाईम", "MDT": "माकाऊ समर टाईम", "NZDT": "न्युज़ीलैण्ड डेलाईट टाईम", "ARST": "अर्जण्टिना समर टाईम", "MEZ": "मध्य यूरोप स्टैंडर्ड टाईम"}, - } - } -  -diff --git a/brx_IN/brx_IN.go b/brx_IN/brx_IN.go -index e7119ff..e44fe6d 100644 ---- a/brx_IN/brx_IN.go -+++ b/brx_IN/brx_IN.go -@@ -10,65 +10,45 @@ import ( - ) -  - type brx_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'brx_IN' locale - func New() locales.Translator { - return &brx_IN{ -- locale: "brx_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsNarrow: []string{"", "ज", "फे", "मा", "ए", "मे", "जु", "जु", "आ", "से", "अ", "न", "दि"}, -- monthsWide: []string{"", "जानुवारी", "फेब्रुवारी", "मार्स", "एफ्रिल", "मे", "जुन", "जुलाइ", "आगस्थ", "सेबथेज्ब़र", "अखथबर", "नबेज्ब़र", "दिसेज्ब़र"}, -- daysAbbreviated: []string{"रबि", "सम", "मंगल", "बुद", "बिसथि", "सुखुर", "सुनि"}, -- daysNarrow: []string{"र", "स", "मं", "बु", "बि", "सु", "सु"}, -- daysWide: []string{"रबिबार", "समबार", "मंगलबार", "बुदबार", "बिसथिबार", "सुखुरबार", "सुनिबार"}, -- periodsAbbreviated: []string{"फुं", "बेलासे"}, -- periodsWide: []string{"फुं", "बेलासे"}, -- erasAbbreviated: []string{"ईसा.पूर्व", "सन"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"OEZ": "ईस्टर्न यूरोप स्टैंडर्ड टाईम", "HNOG": "ग्रीनलैण्ड वेस्टर्न स्टैंडर्ड टाईम", "IST": "भारतीय स्टैंडर्ड टाईम", "TMST": "तुर्कमेनीस्तान समर टाईम", "∅∅∅": "पेरु समर टाईम", "WIT": "ईस्टर्न ईंडोनीशिया स्टैंडर्ड टाईम", "PST": "पैसीफीक स्टैंडर्ड टाईम", "ACWST": "मध्य-पश्चीम ओस्ट्रेलिया स्टैंडर्ड टाईम", "NZST": "न्युज़ीलैण्ड स्टैंडर्ड टाईम", "TMT": "तुर्कमेनीस्तान स्टैंडर्ड टाईम", "AKST": "अलास्का स्टैंडर्ड टाईम", "HEPMX": "HEPMX", "MEZ": "मध्य यूरोप स्टैंडर्ड टाईम", "JDT": "जपान डेलाईट टाईम", "COT": "कोलंबिया स्टैंडर्ड टाईम", "MDT": "माकाऊ समर टाईम", "HADT": "हवाई आलटन डेलाईट टाईम", "HKST": "हाँगकॉंग समर टाईम", "HNPM": "सेँ पीयॅर एवं मीकलों स्टैंडर्ड टाईम", "COST": "कोलंबिया समर टाईम", "HNNOMX": "HNNOMX", "HNCU": "क्युबा स्टैंडर्ड टाईम", "UYST": "ऊरुगुए समर टाईम", "AST": "अटलांटीक स्टैंडर्ड टाईम", "HNT": "न्युफाऊंडलैण्ड स्टैंडर्ड टाईम", "HEPM": "सेँ पीयॅर एवं मीकलों डेलाईट टाईम", "MESZ": "मध्य यूरोप समर टाईम", "HNEG": "ग्रीनलैण्ड ईस्टर्न स्टैंडर्ड टाईम", "OESZ": "ईस्टर्न यूरोप समर टाईम", "CST": "सैंट्रल अमरिका स्टैंडर्ड टाईम", "HEOG": "ग्रीनलैण्ड वेस्टर्न समर टाईम", "CLST": "चीली समर टाईम", "SGT": "सींगापुर स्टैंडर्ड टाईम", "UYT": "ऊरुगुए स्टैंडर्ड टाईम", "HAST": "हवाई आलटन स्टैंडर्ड टाईम", "WEZ": "वेस्टर्न यूरोप स्टैंडर्ड टाईम", "ACST": "मध्य ओस्ट्रेलिया स्टैंडर्ड टाईम", "EAT": "पूर्वी अफ्रीका स्टैंडर्ड टाईम", "HNPMX": "HNPMX", "CDT": "सैंट्रल अमरिका डेलाईट टाईम", "WESZ": "वेस्टर्न यूरोप समर टाईम", "CAT": "मध्य अफ्रीका स्टैंडर्ड टाईम", "WAST": "पश्चीम अफ्रीका समर टाईम", "JST": "जपान स्टैंडर्ड टाईम", "GFT": "फ्रान्सीसी गुयाना स्टैंडर्ड टाईम", "VET": "वेनेज़ुएला स्टैंडर्ड टाईम", "MYT": "मलेशिया स्टैंडर्ड टाईम", "AKDT": "अलास्का डेलाईट टाईम", "WIB": "वेस्टर्न ईंडोनीशिया स्टैंडर्ड टाईम", "WITA": "ईंडोनीशिया स्टैंडर्ड टाईम", "HEEG": "ग्रीनलैण्ड ईस्टर्न समर टाईम", "MST": "माकाऊ स्टैंडर्ड टाईम", "CHADT": "चैथम डेलाईट टाईम", "GYT": "गुयाना स्टैंडर्ड टाईम", "HAT": "न्युफाऊंडलैण्ड डेलाईट टाईम", "WARST": "पश्चीम अर्जण्टिना समर टाईम", "EST": "ईस्टर्न अमरिका स्टैंडर्ड टाईम", "ADT": "अटलांटीक डेलाईट टाईम", "BT": "भुटान स्टैंडर्ड टाईम", "AEST": "पूर्वी ओस्ट्रेलिया स्टैंडर्ड टाईम", "AEDT": "पूर्वी ओस्ट्रेलिया डेलाईट टाईम", "ChST": "चामरो स्टैंडर्ड टाईम", "ACDT": "मध्य ओस्ट्रेलिया डेलाईट टाईम", "LHST": "लार्ड़ होव स्टैंडर्ड टाईम", "CHAST": "चैथम स्टैंडर्ड टाईम", "ACWDT": "मध्य-पश्चीम ओस्ट्रेलिया डेलाईट टाईम", "AWST": "दक्षिण ओस्ट्रेलिया स्टैंडर्ड टाईम", "LHDT": "लार्ड़ होव डेलाईट टाईम", "GMT": "ग्रीनीच स्टैंडर्ड टाईम", "HECU": "क्युबा डेलाईट टाईम", "ART": "अर्जनटिना स्टैंडर्ड टाईम", "AWDT": "दक्षिण ओस्ट्रेलिया डेलाईट टाईम", "NZDT": "न्युज़ीलैण्ड डेलाईट टाईम", "CLT": "चीली स्टैंडर्ड टाईम", "WART": "पश्चीम अर्जण्टिना स्टैंडर्ड टाईम", "EDT": "ईस्टर्न अमरिका डेलाईट टाईम", "HENOMX": "HENOMX", "PDT": "पैसीफीक डेलाईट टाईम", "ARST": "अर्जण्टिना समर टाईम", "BOT": "बोलिविया स्टैंडर्ड टाईम", "WAT": "पश्चीम अफ्रीका स्टैंडर्ड टाईम", "HKT": "हाँगकॉंग स्टैंडर्ड टाईम", "SAST": "दक्षिण अफ्रीका स्टैंडर्ड टाईम", "ECT": "एक्वाडौर स्टैंडर्ड टाईम", "SRT": "सुरीनाम स्टैंडर्ड टाईम"}, -+ locale: "brx_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "CHAST": "CHAST", "HNPMX": "HNPMX", "WAST": "WAST", "AKDT": "AKDT", "HNEG": "HNEG", "ACST": "ACST", "MYT": "MYT", "HAT": "HAT", "HNT": "HNT", "SAST": "SAST", "MEZ": "MEZ", "ACDT": "ACDT", "OESZ": "OESZ", "MESZ": "MESZ", "ACWST": "ACWST", "IST": "IST", "HNCU": "HNCU", "HECU": "HECU", "AST": "AST", "EAT": "EAT", "HEEG": "HEEG", "UYT": "UYT", "GYT": "GYT", "CLT": "CLT", "HAST": "HAST", "HNPM": "HNPM", "JST": "JST", "WARST": "WARST", "HEOG": "HEOG", "WIB": "WIB", "MDT": "MDT", "ChST": "ChST", "HKT": "HKT", "EDT": "EDT", "JDT": "JDT", "ACWDT": "ACWDT", "WIT": "WIT", "AEST": "AEST", "GFT": "GFT", "WART": "WART", "ARST": "ARST", "BOT": "BOT", "WITA": "WITA", "CHADT": "CHADT", "CLST": "CLST", "WESZ": "WESZ", "TMT": "TMT", "ECT": "ECT", "LHDT": "LHDT", "PST": "PST", "HEPMX": "HEPMX", "WAT": "WAT", "GMT": "GMT", "PDT": "PDT", "VET": "VET", "SGT": "SGT", "NZDT": "NZDT", "CST": "CST", "BT": "BT", "∅∅∅": "∅∅∅", "COST": "COST", "CAT": "CAT", "HENOMX": "HENOMX", "AWST": "AWST", "UYST": "UYST", "OEZ": "OEZ", "EST": "EST", "ADT": "ADT", "AWDT": "AWDT", "AKST": "AKST", "COT": "COT", "HNOG": "HNOG", "HKST": "HKST", "CDT": "CDT", "MST": "MST", "AEDT": "AEDT", "HADT": "HADT", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "WEZ": "WEZ", "TMST": "TMST", "NZST": "NZST", "ART": "ART", "SRT": "SRT"}, - } - } -  -@@ -131,7 +111,7 @@ func (brx *brx_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (brx *brx_IN) MonthsNarrow() []string { -- return brx.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -141,7 +121,7 @@ func (brx *brx_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (brx *brx_IN) MonthsWide() []string { -- return brx.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -187,82 +167,13 @@ func (brx *brx_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'brx_IN' and handles both Whole and Real numbers based on 'v' - func (brx *brx_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, brx.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, brx.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, brx.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'brx_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (brx *brx_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, brx.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, brx.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, brx.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'brx_IN' -@@ -270,69 +181,7 @@ func (brx *brx_IN) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := brx.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, brx.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, brx.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(brx.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, brx.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, brx.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, brx.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'brx_IN' -@@ -341,81 +190,7 @@ func (brx *brx_IN) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := brx.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, brx.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, brx.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(brx.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, brx.currencyNegativePrefix[j]) -- } -- -- b = append(b, brx.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(brx.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, brx.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, brx.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'brx_IN' -@@ -423,17 +198,6 @@ func (brx *brx_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -442,17 +206,6 @@ func (brx *brx_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, brx.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,17 +214,6 @@ func (brx *brx_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, brx.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,19 +222,6 @@ func (brx *brx_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, brx.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, brx.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,28 +230,6 @@ func (brx *brx_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, brx.periodsAbbreviated[0]...) -- } else { -- b = append(b, brx.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -531,35 +238,6 @@ func (brx *brx_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, brx.periodsAbbreviated[0]...) -- } else { -- b = append(b, brx.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -568,40 +246,6 @@ func (brx *brx_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, brx.periodsAbbreviated[0]...) -- } else { -- b = append(b, brx.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -610,44 +254,5 @@ func (brx *brx_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, brx.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, brx.periodsAbbreviated[0]...) -- } else { -- b = append(b, brx.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := brx.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bs/bs.go b/bs/bs.go -index 0c75b36..64e004c 100644 ---- a/bs/bs.go -+++ b/bs/bs.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"p. n. e.", "n. e."}, - erasNarrow: []string{"pr.n.e.", "AD"}, - erasWide: []string{"prije nove ere", "nove ere"}, -- timezones: map[string]string{"GYT": "Gvajansko vrijeme", "WIB": "Zapadnoindonezijsko vrijeme", "OESZ": "Istočnoevropsko ljetno vrijeme", "MST": "Makao standardno vreme", "HNPMX": "Meksičko pacifičko standardno vrijeme", "AST": "Sjevernoameričko atlantsko standardno vrijeme", "BOT": "Bolivijsko vrijeme", "OEZ": "Istočnoevropsko standardno vrijeme", "AWDT": "Zapadnoaustralijsko ljetno vrijeme", "CLT": "Čileansko standardno vrijeme", "TMST": "Turkmenistansko ljetno vrijeme", "ChST": "Čamorsko standardno vrijeme", "ACDT": "Centralnoaustralijsko ljetno vrijeme", "HNPM": "Standardno vrijeme na Ostrvima Sen Pjer i Mikelon", "MEZ": "Centralnoevropsko standardno vrijeme", "MESZ": "Centralnoevropsko ljetno vrijeme", "SAST": "Južnoafričko standardno vrijeme", "ADT": "Sjevernoameričko atlantsko ljetno vrijeme", "WEZ": "Zapadnoevropsko standardno vrijeme", "ARST": "Argentinsko ljetno vrijeme", "WAST": "Zapadnoafričko ljetno vrijeme", "CAT": "Centralnoafričko vrijeme", "HNNOMX": "Sjeverozapadno meksičko standardno vrijeme", "HENOMX": "Sjeverozapadno meksičko ljetno vrijeme", "GMT": "Griničko vrijeme", "LHDT": "Ljetno vrijeme na Ostrvu Lord Hau", "MYT": "Malezijsko vrijeme", "AEDT": "Istočnoaustralijsko ljetno vrijeme", "CDT": "Sjevernoameričko centralno ljetno vrijeme", "WESZ": "Zapadnoevropsko ljetno vrijeme", "PST": "Sjevernoameričko pacifičko standardno vrijeme", "PDT": "Sjevernoameričko pacifičko ljetno vrijeme", "AWST": "Zapadnoaustralijsko standardno vrijeme", "HKST": "Hongkonško ljetno vrijeme", "LHST": "Standardno vrijeme na Ostrvu Lord Hau", "IST": "Indijsko standardno vrijeme", "WAT": "Zapadnoafričko standardno vrijeme", "HADT": "Havajsko-aleućansko ljetno vrijeme", "AKST": "Aljaskansko standardno vrijeme", "CST": "Sjevernoameričko centralno standardno vrijeme", "HAST": "Havajsko-aleućansko standardno vrijeme", "ACWDT": "Australijsko centralnozapadno ljetno vrijeme", "CHAST": "Čatamsko standardno vrijeme", "∅∅∅": "Amazonsko ljetno vrijeme", "COT": "Kolumbijsko standardno vrijeme", "WART": "Zapadnoargentinsko standardno vrijeme", "HKT": "Hongkonško standardno vrijeme", "HNEG": "Istočnogrenlandsko standardno vrijeme", "GFT": "Francuskogvajansko vrijeme", "TMT": "Turkmenistansko standardno vrijeme", "AKDT": "Aljaskansko ljetno vrijeme", "ACST": "Centralnoaustralijsko standardno vrijeme", "VET": "Venecuelansko vrijeme", "ACWST": "Australijsko centralnozapadno standardno vrijeme", "ART": "Argentinsko standardno vrijeme", "NZDT": "Novozelandsko ljetno vrijeme", "JST": "Japansko standardno vrijeme", "JDT": "Japansko ljetno vrijeme", "HEEG": "Istočnogrenlandsko ljetno vrijeme", "HNOG": "Zapadnogrenlandsko standardno vrijeme", "WITA": "Centralnoindonezijsko vrijeme", "HEPM": "Ljetno vrijeme na Ostrvima Sen Pjer i Mikelon", "COST": "Kolumbijsko ljetno vrijeme", "AEST": "Istočnoaustralijsko standardno vrijeme", "SGT": "Singapursko standardno vrijeme", "EDT": "Sjevernoameričko istočno ljetno vrijeme", "WIT": "Istočnoindonezijsko vrijeme", "BT": "Butansko vrijeme", "CHADT": "Čatamsko ljetno vrijeme", "EAT": "Istočnoafričko vrijeme", "HNCU": "Kubansko standardno vrijeme", "UYST": "Urugvajsko ljetno vrijeme", "HEOG": "Zapadnogrenlandsko ljetno vrijeme", "CLST": "Čileansko ljetno vrijeme", "ECT": "Ekvadorsko vrijeme", "HEPMX": "Meksičko pacifičko ljetno vrijeme", "EST": "Sjevernoameričko istočno standardno vrijeme", "WARST": "Zapadnoargentinsko ljetno vrijeme", "HAT": "Njufaundlendsko ljetno vrijeme", "SRT": "Surinamsko vrijeme", "HNT": "Njufaundlendsko standardno vrijeme", "NZST": "Novozelandsko standardno vrijeme", "HECU": "Kubansko ljetno vrijeme", "MDT": "Makao letnje računanje vremena", "UYT": "Urugvajsko standardno vrijeme"}, -+ timezones: map[string]string{"EST": "Sjevernoameričko istočno standardno vrijeme", "CLT": "Čileansko standardno vrijeme", "SRT": "Surinamsko vrijeme", "HNEG": "Istočnogrenlandsko standardno vrijeme", "UYST": "Urugvajsko ljetno vrijeme", "PST": "Sjevernoameričko pacifičko standardno vrijeme", "WART": "Zapadnoargentinsko standardno vrijeme", "TMT": "Turkmenistansko standardno vrijeme", "NZDT": "Novozelandsko ljetno vrijeme", "MDT": "Makao letnje računanje vremena", "ADT": "Sjevernoameričko atlantsko ljetno vrijeme", "HAST": "Havajsko-aleućansko standardno vrijeme", "LHDT": "Ljetno vrijeme na Ostrvu Lord Hau", "WARST": "Zapadnoargentinsko ljetno vrijeme", "∅∅∅": "Brazilijsko ljetno vrijeme", "HEPMX": "Meksičko pacifičko ljetno vrijeme", "CDT": "Sjevernoameričko centralno ljetno vrijeme", "ChST": "Čamorsko standardno vrijeme", "MYT": "Malezijsko vrijeme", "WAST": "Zapadnoafričko ljetno vrijeme", "TMST": "Turkmenistansko ljetno vrijeme", "WIB": "Zapadnoindonezijsko vrijeme", "GMT": "Griničko vrijeme", "LHST": "Standardno vrijeme na Ostrvu Lord Hau", "ACWST": "Australijsko centralnozapadno standardno vrijeme", "WIT": "Istočnoindonezijsko vrijeme", "NZST": "Novozelandsko standardno vrijeme", "EDT": "Sjevernoameričko istočno ljetno vrijeme", "CHAST": "Čatamsko standardno vrijeme", "HEOG": "Zapadnogrenlandsko ljetno vrijeme", "SAST": "Južnoafričko standardno vrijeme", "HKST": "Hongkonško ljetno vrijeme", "ACDT": "Centralnoaustralijsko ljetno vrijeme", "HECU": "Kubansko ljetno vrijeme", "COST": "Kolumbijsko ljetno vrijeme", "HKT": "Hongkonško standardno vrijeme", "WITA": "Centralnoindonezijsko vrijeme", "ARST": "Argentinsko ljetno vrijeme", "HNT": "Njufaundlendsko standardno vrijeme", "HNOG": "Zapadnogrenlandsko standardno vrijeme", "ACST": "Centralnoaustralijsko standardno vrijeme", "AWST": "Zapadnoaustralijsko standardno vrijeme", "AWDT": "Zapadnoaustralijsko ljetno vrijeme", "AEDT": "Istočnoaustralijsko ljetno vrijeme", "HAT": "Njufaundlendsko ljetno vrijeme", "COT": "Kolumbijsko standardno vrijeme", "HENOMX": "Sjeverozapadno meksičko ljetno vrijeme", "BT": "Butansko vrijeme", "ACWDT": "Australijsko centralnozapadno ljetno vrijeme", "CHADT": "Čatamsko ljetno vrijeme", "CLST": "Čileansko ljetno vrijeme", "HADT": "Havajsko-aleućansko ljetno vrijeme", "ART": "Argentinsko standardno vrijeme", "SGT": "Singapursko standardno vrijeme", "AKDT": "Aljaskansko ljetno vrijeme", "OEZ": "Istočnoevropsko standardno vrijeme", "OESZ": "Istočnoevropsko ljetno vrijeme", "BOT": "Bolivijsko vrijeme", "EAT": "Istočnoafričko vrijeme", "IST": "Indijsko standardno vrijeme", "CAT": "Centralnoafričko vrijeme", "CST": "Sjevernoameričko centralno standardno vrijeme", "JDT": "Japansko ljetno vrijeme", "AEST": "Istočnoaustralijsko standardno vrijeme", "UYT": "Urugvajsko standardno vrijeme", "HNNOMX": "Sjeverozapadno meksičko standardno vrijeme", "HEPM": "Ljetno vrijeme na Ostrvima Sen Pjer i Mikelon", "MESZ": "Centralnoevropsko ljetno vrijeme", "PDT": "Sjevernoameričko pacifičko ljetno vrijeme", "WESZ": "Zapadnoevropsko ljetno vrijeme", "AKST": "Aljaskansko standardno vrijeme", "ECT": "Ekvadorsko vrijeme", "AST": "Sjevernoameričko atlantsko standardno vrijeme", "HNCU": "Kubansko standardno vrijeme", "HNPMX": "Meksičko pacifičko standardno vrijeme", "WEZ": "Zapadnoevropsko standardno vrijeme", "HEEG": "Istočnogrenlandsko ljetno vrijeme", "JST": "Japansko standardno vrijeme", "MST": "Makao standardno vreme", "MEZ": "Centralnoevropsko standardno vrijeme", "HNPM": "Standardno vrijeme na Ostrvima Sen Pjer i Mikelon", "VET": "Venecuelansko vrijeme", "WAT": "Zapadnoafričko standardno vrijeme", "GFT": "Francuskogvajansko vrijeme", "GYT": "Gvajansko vrijeme"}, - } - } -  -diff --git a/bs_Cyrl/bs_Cyrl.go b/bs_Cyrl/bs_Cyrl.go -index 8081969..ae8163b 100644 ---- a/bs_Cyrl/bs_Cyrl.go -+++ b/bs_Cyrl/bs_Cyrl.go -@@ -63,15 +63,13 @@ func New() locales.Translator { - monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јуни", "јули", "август", "септембар", "октобар", "новембар", "децембар"}, - daysAbbreviated: []string{"нед", "пон", "уто", "сри", "чет", "пет", "суб"}, - daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, - daysWide: []string{"недеља", "понедељак", "уторак", "сриједа", "четвртак", "петак", "субота"}, - periodsAbbreviated: []string{"пре подне", "поподне"}, -- periodsNarrow: []string{"prijepodne", "popodne"}, - periodsWide: []string{"пре подне", "поподне"}, - erasAbbreviated: []string{"п. н. е.", "н. е."}, - erasNarrow: []string{"п.н.е.", "н.е."}, - erasWide: []string{"Пре нове ере", "Нове ере"}, -- timezones: map[string]string{"ACWDT": "Аустралијско централно западно летње рачунање времена", "LHST": "Лорд Хов стандардно време", "WART": "Западна Аргентина стандардно време", "WARST": "Западна Аргентина летње рачунање времена", "∅∅∅": "Азори летње рачунање времена", "HADT": "Хавајско-алеутско летње рачунање времена", "SRT": "Суринам време", "HNOG": "Западни Гренланд стандардно време", "HNPM": "Сен Пјер и Микелон стандардно време", "MST": "Макао стандардно време", "HAST": "Хавајско-алеутско стандардно време", "ACDT": "Аустралијско централно летње рачунање времена", "WAT": "Западно-афричко стандардно време", "HNNOMX": "Sjeverozapadno meksičko standardno vrijeme", "CST": "Централно стандардно време", "HKST": "Хонгконшко летње рачунање времена", "MEZ": "Средњеевропско стандардно време", "NZST": "Нови Зеланд стандардно време", "SAST": "Јужно-афричко време", "AKDT": "Аљашко летње време", "CHADT": "Чатам летње рачунање времена", "ChST": "Чаморо време", "BT": "Бутан време", "MDT": "Макао летње рачунање вемена", "CHAST": "Чатам стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "HNCU": "Куба стандардно време", "PDT": "Пацифичко летње рачунање времена", "OESZ": "Источноевропско летње рачунање времена", "HEPMX": "Meksičko pacifičko ljetno vrijeme", "WEZ": "Западноевропско стандардно време", "CLST": "Чиле летње рачунање времена", "HENOMX": "Sjeverozapadno meksičko ljetno vrijeme", "WIT": "Источно-индонезијско време", "GYT": "Гвајана време", "CLT": "Чиле стандардно време", "GMT": "Гринвич средње време", "HNPMX": "Meksičko pacifičko standardno vrijeme", "ADT": "Атланско лтње рачунање времена", "VET": "Венецуела време", "NZDT": "Нови Зеланд летње рачунање времена", "JST": "Јапанско стандардно време", "SGT": "Сингапур стандардно време", "UYST": "Уругвај летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "AWST": "Аустралијско западно стандардно време", "HKT": "Хонг Конг стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање вемена", "JDT": "Јапанско летње рачунање времена", "TMT": "Туркменистан стандардно време", "UYT": "Уругвај стандардно време", "WAST": "Западно-афричко летње рачунање времена", "EDT": "Источно летње рачунање времена", "CDT": "Централно летње рачунање времена", "MYT": "Малезија време", "WIB": "Западно-индонезијско време", "PST": "Пацифичко стандардно време", "WITA": "Централно-индонезијско време", "BOT": "Боливија време", "EST": "Источно стандардно време", "HNT": "Њуфаундленд стандардно време", "ART": "Аргентина стандардно време", "ARST": "Аргентина летње рачунање времена", "HEOG": "Западни Гренланд летње рачунање времена", "WESZ": "Западноевропско летње рачунање времена", "GFT": "Француска Гвајана време", "COT": "Колумбија стандардно време", "HECU": "Куба летње рачунање времена", "AEDT": "Аустралијско источно летње рачунање времена", "LHDT": "Лорд Хов летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "OEZ": "Источноевропско стандардно време", "EAT": "Источно-афричко време", "AST": "Атланско стандардно време", "HAT": "Њуфаундленд летње рачунање времена", "AEST": "Аустралијско источно стандардно време", "ACST": "Аустралијско централно стандардно време", "CAT": "Централно-афричко време", "AKST": "Аљашко стандардно време", "IST": "Индијско стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "ECT": "Еквадор време", "COST": "Колумбија летње рачунање времена", "AWDT": "Аустралијско западно летње рачунање времена"}, -+ timezones: map[string]string{"WARST": "Западна Аргентина летње рачунање времена", "CST": "Централно стандардно време", "NZDT": "Нови Зеланд летње рачунање времена", "JST": "Јапанско стандардно време", "MYT": "Малезија време", "WEZ": "Западноевропско стандардно време", "WESZ": "Западноевропско летње рачунање времена", "SAST": "Јужно-афричко време", "EDT": "Источно летње рачунање времена", "HKT": "Хонг Конг стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "CHAST": "Чатам стандардно време", "HAT": "Њуфаундленд летње рачунање времена", "WIT": "Источно-индонезијско време", "HEOG": "Западни Гренланд летње рачунање времена", "LHDT": "Лорд Хов летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "UYT": "Уругвај стандардно време", "HNPMX": "HNPMX", "AEDT": "Аустралијско источно летње рачунање времена", "HNPM": "Сен Пјер и Микелон стандардно време", "AWST": "Аустралијско западно стандардно време", "MST": "Макао стандардно време", "BOT": "Боливија време", "SRT": "Суринам време", "MEZ": "Средњеевропско стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "LHST": "Лорд Хов стандардно време", "PST": "Пацифичко стандардно време", "HECU": "Куба летње рачунање времена", "SGT": "Сингапур стандардно време", "VET": "Венецуела време", "WITA": "Централно-индонезијско време", "HENOMX": "HENOMX", "IST": "Индијско стандардно време", "HEPMX": "HEPMX", "OEZ": "Источноевропско стандардно време", "EST": "Источно стандардно време", "ADT": "Атланско лтње рачунање времена", "CHADT": "Чатам летње рачунање времена", "UYST": "Уругвај летње рачунање времена", "AKST": "Аљашко стандардно време", "WART": "Западна Аргентина стандардно време", "COST": "Колумбија летње рачунање времена", "TMT": "Туркменистан стандардно време", "PDT": "Пацифичко летње рачунање времена", "HNT": "Њуфаундленд стандардно време", "ARST": "Аргентина летње рачунање времена", "HAST": "Хавајско-алеутско стандардно време", "AKDT": "Аљашко летње време", "GYT": "Гвајана време", "WIB": "Западно-индонезијско време", "ART": "Аргентина стандардно време", "ACST": "Аустралијско централно стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање вемена", "BT": "Бутан време", "COT": "Колумбија стандардно време", "AST": "Атланско стандардно време", "ChST": "Чаморо време", "EAT": "Источно-афричко време", "HADT": "Хавајско-алеутско летње рачунање времена", "ACWDT": "Аустралијско централно западно летње рачунање времена", "GFT": "Француска Гвајана време", "HNOG": "Западни Гренланд стандардно време", "HKST": "Хонгконшко летње рачунање времена", "ECT": "Еквадор време", "CDT": "Централно летње рачунање времена", "HNNOMX": "HNNOMX", "HNEG": "Источни Гренланд стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "AEST": "Аустралијско источно стандардно време", "WAT": "Западно-афричко стандардно време", "WAST": "Западно-афричко летње рачунање времена", "∅∅∅": "Бразилија летње рачунање времена", "CAT": "Централно-афричко време", "CLT": "Чиле стандардно време", "CLST": "Чиле летње рачунање времена", "GMT": "Гринвич средње време", "HNCU": "Куба стандардно време", "OESZ": "Источноевропско летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "MDT": "Макао летње рачунање вемена", "NZST": "Нови Зеланд стандардно време", "ACDT": "Аустралијско централно летње рачунање времена", "JDT": "Јапанско летње рачунање времена"}, - } - } -  -@@ -101,8 +99,8 @@ func (bs *bs_Cyrl) CardinalPluralRule(num float64, v uint64) locales.PluralRule - n := math.Abs(num) - i := int64(n) - f := locales.F(n, v) -- iMod10 := i % 10 - iMod100 := i % 100 -+ iMod10 := i % 10 - fMod10 := f % 10 - fMod100 := f % 100 -  -diff --git a/bs_Cyrl_BA/bs_Cyrl_BA.go b/bs_Cyrl_BA/bs_Cyrl_BA.go -index 6db31c2..37de0d3 100644 ---- a/bs_Cyrl_BA/bs_Cyrl_BA.go -+++ b/bs_Cyrl_BA/bs_Cyrl_BA.go -@@ -10,70 +10,45 @@ import ( - ) -  - type bs_Cyrl_BA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bs_Cyrl_BA' locale - func New() locales.Translator { - return &bs_Cyrl_BA{ -- locale: "bs_Cyrl_BA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan", "feb", "mar", "apr", "maj", "jun", "jul", "avg", "sep", "okt", "nov", "dec"}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januar", "februar", "mart", "april", "maj", "juni", "juli", "avgust", "septembar", "oktobar", "novembar", "decembar"}, -- daysAbbreviated: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysNarrow: []string{"N", "P", "U", "S", "Č", "P", "S"}, -- daysShort: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysWide: []string{"nedjelja", "ponedjeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"prijepodne", "popodne"}, -- periodsNarrow: []string{"prijepodne", "popodne"}, -- periodsWide: []string{"prijepodne", "popodne"}, -- erasAbbreviated: []string{"p. n. e.", "n. e."}, -- erasNarrow: []string{"pr.n.e.", "AD"}, -- erasWide: []string{"prije nove ere", "nove ere"}, -- timezones: map[string]string{"WEZ": "Zapadnoevropsko standardno vrijeme", "ARST": "Argentinsko ljetno vrijeme", "HEPMX": "Meksičko pacifičko ljetno vrijeme", "WIT": "Istočnoindonezijsko vrijeme", "AWST": "Zapadnoaustralijsko standardno vrijeme", "OESZ": "Istočnoevropsko ljetno vrijeme", "VET": "Venecuelansko vrijeme", "MDT": "Makao letnje računanje vremena", "ADT": "Sjevernoameričko atlantsko ljetno vrijeme", "GYT": "Gvajansko vrijeme", "HKST": "Hongkonško ljetno vrijeme", "NZDT": "Novozelandsko ljetno vrijeme", "SAST": "Južnoafričko standardno vrijeme", "OEZ": "Istočnoevropsko standardno vrijeme", "HECU": "Kubansko ljetno vrijeme", "MYT": "Malezijsko vrijeme", "BT": "Butansko vrijeme", "PST": "Sjevernoameričko pacifičko standardno vrijeme", "PDT": "Sjevernoameričko pacifičko ljetno vrijeme", "MESZ": "Centralnoevropsko ljetno vrijeme", "LHDT": "Ljetno vrijeme na Ostrvu Lord Hau", "BOT": "Bolivijsko vrijeme", "HNCU": "Kubansko standardno vrijeme", "HEEG": "Istočnogrenlandsko ljetno vrijeme", "WAT": "Zapadnoafričko standardno vrijeme", "WARST": "Zapadnoargentinsko ljetno vrijeme", "HNEG": "Istočnogrenlandsko standardno vrijeme", "AKST": "Aljaskansko standardno vrijeme", "HNOG": "Zapadnogrenlandsko standardno vrijeme", "HEPM": "Ljetno vrijeme na Ostrvima Sen Pjer i Mikelon", "MST": "Makao standardno vreme", "ChST": "Čamorsko standardno vrijeme", "ACWST": "Australijsko centralnozapadno standardno vrijeme", "ACWDT": "Australijsko centralnozapadno ljetno vrijeme", "JST": "Japansko standardno vrijeme", "ECT": "Ekvadorsko vrijeme", "HNNOMX": "Sjeverozapadno meksičko standardno vrijeme", "HAST": "Havajsko-aleućansko standardno vrijeme", "ART": "Argentinsko standardno vrijeme", "CHAST": "Čatamsko standardno vrijeme", "GFT": "Francuskogvajansko vrijeme", "COT": "Kolumbijsko standardno vrijeme", "UYST": "Urugvajsko ljetno vrijeme", "WESZ": "Zapadnoevropsko ljetno vrijeme", "AEDT": "Istočnoaustralijsko ljetno vrijeme", "AWDT": "Zapadnoaustralijsko ljetno vrijeme", "WITA": "Centralnoindonezijsko vrijeme", "HNPM": "Standardno vrijeme na Ostrvima Sen Pjer i Mikelon", "EAT": "Istočnoafričko vrijeme", "WART": "Zapadnoargentinsko standardno vrijeme", "WIB": "Zapadnoindonezijsko vrijeme", "CLST": "Čileansko ljetno vrijeme", "TMT": "Turkmenistansko standardno vrijeme", "CAT": "Centralnoafričko vrijeme", "GMT": "Griničko vrijeme", "JDT": "Japansko ljetno vrijeme", "HENOMX": "Sjeverozapadno meksičko ljetno vrijeme", "HEOG": "Zapadnogrenlandsko ljetno vrijeme", "EST": "Sjevernoameričko istočno standardno vrijeme", "IST": "Indijsko standardno vrijeme", "ACST": "Centralnoaustralijsko standardno vrijeme", "COST": "Kolumbijsko ljetno vrijeme", "∅∅∅": "Azorsko ljetno vrijeme", "AST": "Sjevernoameričko atlantsko standardno vrijeme", "HADT": "Havajsko-aleućansko ljetno vrijeme", "AEST": "Istočnoaustralijsko standardno vrijeme", "CHADT": "Čatamsko ljetno vrijeme", "TMST": "Turkmenistansko ljetno vrijeme", "CST": "Sjevernoameričko centralno standardno vrijeme", "HAT": "Njufaundlendsko ljetno vrijeme", "HKT": "Hongkonško standardno vrijeme", "NZST": "Novozelandsko standardno vrijeme", "CLT": "Čileansko standardno vrijeme", "UYT": "Urugvajsko standardno vrijeme", "ACDT": "Centralnoaustralijsko ljetno vrijeme", "WAST": "Zapadnoafričko ljetno vrijeme", "AKDT": "Aljaskansko ljetno vrijeme", "EDT": "Sjevernoameričko istočno ljetno vrijeme", "HNPMX": "Meksičko pacifičko standardno vrijeme", "CDT": "Sjevernoameričko centralno ljetno vrijeme", "SRT": "Surinamsko vrijeme", "HNT": "Njufaundlendsko standardno vrijeme", "MEZ": "Centralnoevropsko standardno vrijeme", "LHST": "Standardno vrijeme na Ostrvu Lord Hau", "SGT": "Singapursko standardno vrijeme"}, -+ locale: "bs_Cyrl_BA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "ACWDT": "ACWDT", "OESZ": "OESZ", "BOT": "BOT", "EAT": "EAT", "MEZ": "MEZ", "HEPM": "HEPM", "CHAST": "CHAST", "ACWST": "ACWST", "WEZ": "WEZ", "SGT": "SGT", "HNT": "HNT", "COST": "COST", "ADT": "ADT", "ARST": "ARST", "HNEG": "HNEG", "UYT": "UYT", "GFT": "GFT", "TMT": "TMT", "CDT": "CDT", "MDT": "MDT", "WAT": "WAT", "WARST": "WARST", "JDT": "JDT", "AEDT": "AEDT", "WESZ": "WESZ", "SRT": "SRT", "MYT": "MYT", "AWST": "AWST", "PST": "PST", "BT": "BT", "VET": "VET", "AKST": "AKST", "ACST": "ACST", "HEEG": "HEEG", "TMST": "TMST", "CLST": "CLST", "MST": "MST", "AST": "AST", "AWDT": "AWDT", "LHDT": "LHDT", "JST": "JST", "CHADT": "CHADT", "OEZ": "OEZ", "HNOG": "HNOG", "WIB": "WIB", "HAST": "HAST", "IST": "IST", "WART": "WART", "WIT": "WIT", "HEOG": "HEOG", "EST": "EST", "MESZ": "MESZ", "PDT": "PDT", "AEST": "AEST", "CST": "CST", "ART": "ART", "HADT": "HADT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "SAST": "SAST", "COT": "COT", "CAT": "CAT", "HENOMX": "HENOMX", "UYST": "UYST", "∅∅∅": "∅∅∅", "GYT": "GYT", "HKST": "HKST", "GMT": "GMT", "ACDT": "ACDT", "HNPM": "HNPM", "EDT": "EDT", "CLT": "CLT", "NZDT": "NZDT", "ECT": "ECT", "NZST": "NZST", "ChST": "ChST", "HECU": "HECU", "WAST": "WAST", "AKDT": "AKDT", "HAT": "HAT", "WITA": "WITA", "HNCU": "HNCU", "HEPMX": "HEPMX", "HKT": "HKT"}, - } - } -  -@@ -157,7 +132,7 @@ func (bs *bs_Cyrl_BA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bs *bs_Cyrl_BA) MonthsAbbreviated() []string { -- return bs.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +142,7 @@ func (bs *bs_Cyrl_BA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bs *bs_Cyrl_BA) MonthsNarrow() []string { -- return bs.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +152,7 @@ func (bs *bs_Cyrl_BA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bs *bs_Cyrl_BA) MonthsWide() []string { -- return bs.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,75 +198,13 @@ func (bs *bs_Cyrl_BA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bs_Cyrl_BA' and handles both Whole and Real numbers based on 'v' - func (bs *bs_Cyrl_BA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bs_Cyrl_BA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bs *bs_Cyrl_BA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bs.percentSuffix...) -- -- b = append(b, bs.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Cyrl_BA' -@@ -299,56 +212,7 @@ func (bs *bs_Cyrl_BA) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, bs.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Cyrl_BA' -@@ -357,63 +221,7 @@ func (bs *bs_Cyrl_BA) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bs.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bs.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, bs.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bs_Cyrl_BA' -@@ -421,19 +229,6 @@ func (bs *bs_Cyrl_BA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -442,19 +237,6 @@ func (bs *bs_Cyrl_BA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -463,19 +245,6 @@ func (bs *bs_Cyrl_BA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -484,21 +253,6 @@ func (bs *bs_Cyrl_BA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bs.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -507,19 +261,6 @@ func (bs *bs_Cyrl_BA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -528,26 +269,6 @@ func (bs *bs_Cyrl_BA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -556,30 +277,6 @@ func (bs *bs_Cyrl_BA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -588,34 +285,5 @@ func (bs *bs_Cyrl_BA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bs.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bs_Latn/bs_Latn.go b/bs_Latn/bs_Latn.go -index d60df14..f8de40e 100644 ---- a/bs_Latn/bs_Latn.go -+++ b/bs_Latn/bs_Latn.go -@@ -10,70 +10,45 @@ import ( - ) -  - type bs_Latn struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bs_Latn' locale - func New() locales.Translator { - return &bs_Latn{ -- locale: "bs_Latn", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan", "feb", "mar", "apr", "maj", "jun", "jul", "avg", "sep", "okt", "nov", "dec"}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januar", "februar", "mart", "april", "maj", "juni", "juli", "avgust", "septembar", "oktobar", "novembar", "decembar"}, -- daysAbbreviated: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysNarrow: []string{"N", "P", "U", "S", "Č", "P", "S"}, -- daysShort: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysWide: []string{"nedjelja", "ponedjeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"prijepodne", "popodne"}, -- periodsNarrow: []string{"prijepodne", "popodne"}, -- periodsWide: []string{"prijepodne", "popodne"}, -- erasAbbreviated: []string{"p. n. e.", "n. e."}, -- erasNarrow: []string{"pr.n.e.", "AD"}, -- erasWide: []string{"prije nove ere", "nove ere"}, -- timezones: map[string]string{"VET": "Venecuelansko vrijeme", "HAT": "Njufaundlendsko ljetno vrijeme", "ADT": "Sjevernoameričko atlantsko ljetno vrijeme", "HNT": "Njufaundlendsko standardno vrijeme", "NZST": "Novozelandsko standardno vrijeme", "TMT": "Turkmenistansko standardno vrijeme", "OEZ": "Istočnoevropsko standardno vrijeme", "COST": "Kolumbijsko ljetno vrijeme", "WESZ": "Zapadnoevropsko ljetno vrijeme", "WEZ": "Zapadnoevropsko standardno vrijeme", "TMST": "Turkmenistansko ljetno vrijeme", "MYT": "Malezijsko vrijeme", "GMT": "Griničko vrijeme", "HEPMX": "Meksičko pacifičko ljetno vrijeme", "BOT": "Bolivijsko vrijeme", "SGT": "Singapursko standardno vrijeme", "GYT": "Gvajansko vrijeme", "ART": "Argentinsko standardno vrijeme", "AEDT": "Istočnoaustralijsko ljetno vrijeme", "CHADT": "Čatamsko ljetno vrijeme", "CLT": "Čileansko standardno vrijeme", "WAT": "Zapadnoafričko standardno vrijeme", "ECT": "Ekvadorsko vrijeme", "COT": "Kolumbijsko standardno vrijeme", "ACWDT": "Australijsko centralnozapadno ljetno vrijeme", "JST": "Japansko standardno vrijeme", "GFT": "Francuskogvajansko vrijeme", "ACDT": "Centralnoaustralijsko ljetno vrijeme", "EAT": "Istočnoafričko vrijeme", "AKDT": "Aljaskansko ljetno vrijeme", "HADT": "Havajsko-aleućansko ljetno vrijeme", "LHST": "Standardno vrijeme na Ostrvu Lord Hau", "CHAST": "Čatamsko standardno vrijeme", "CLST": "Čileansko ljetno vrijeme", "∅∅∅": "Amazonsko ljetno vrijeme", "HNPMX": "Meksičko pacifičko standardno vrijeme", "JDT": "Japansko ljetno vrijeme", "CST": "Sjevernoameričko centralno standardno vrijeme", "UYT": "Urugvajsko standardno vrijeme", "ACWST": "Australijsko centralnozapadno standardno vrijeme", "HEOG": "Zapadnogrenlandsko ljetno vrijeme", "AWST": "Zapadnoaustralijsko standardno vrijeme", "IST": "Indijsko standardno vrijeme", "ACST": "Centralnoaustralijsko standardno vrijeme", "MDT": "Makao letnje računanje vremena", "OESZ": "Istočnoevropsko ljetno vrijeme", "AST": "Sjevernoameričko atlantsko standardno vrijeme", "SRT": "Surinamsko vrijeme", "PST": "Sjevernoameričko pacifičko standardno vrijeme", "AWDT": "Zapadnoaustralijsko ljetno vrijeme", "HEPM": "Ljetno vrijeme na Ostrvima Sen Pjer i Mikelon", "MESZ": "Centralnoevropsko ljetno vrijeme", "SAST": "Južnoafričko standardno vrijeme", "EST": "Sjevernoameričko istočno standardno vrijeme", "WART": "Zapadnoargentinsko standardno vrijeme", "WARST": "Zapadnoargentinsko ljetno vrijeme", "ChST": "Čamorsko standardno vrijeme", "HKST": "Hongkonško ljetno vrijeme", "MEZ": "Centralnoevropsko standardno vrijeme", "HKT": "Hongkonško standardno vrijeme", "WIB": "Zapadnoindonezijsko vrijeme", "ARST": "Argentinsko ljetno vrijeme", "HNPM": "Standardno vrijeme na Ostrvima Sen Pjer i Mikelon", "LHDT": "Ljetno vrijeme na Ostrvu Lord Hau", "NZDT": "Novozelandsko ljetno vrijeme", "WAST": "Zapadnoafričko ljetno vrijeme", "HNNOMX": "Sjeverozapadno meksičko standardno vrijeme", "MST": "Makao standardno vreme", "HECU": "Kubansko ljetno vrijeme", "CDT": "Sjevernoameričko centralno ljetno vrijeme", "HAST": "Havajsko-aleućansko standardno vrijeme", "PDT": "Sjevernoameričko pacifičko ljetno vrijeme", "HENOMX": "Sjeverozapadno meksičko ljetno vrijeme", "EDT": "Sjevernoameričko istočno ljetno vrijeme", "HNOG": "Zapadnogrenlandsko standardno vrijeme", "WITA": "Centralnoindonezijsko vrijeme", "HNEG": "Istočnogrenlandsko standardno vrijeme", "HEEG": "Istočnogrenlandsko ljetno vrijeme", "WIT": "Istočnoindonezijsko vrijeme", "UYST": "Urugvajsko ljetno vrijeme", "BT": "Butansko vrijeme", "AEST": "Istočnoaustralijsko standardno vrijeme", "CAT": "Centralnoafričko vrijeme", "HNCU": "Kubansko standardno vrijeme", "AKST": "Aljaskansko standardno vrijeme"}, -+ locale: "bs_Latn", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "HNPMX": "HNPMX", "WESZ": "WESZ", "WAST": "WAST", "HAT": "HAT", "ECT": "ECT", "HAST": "HAST", "CHADT": "CHADT", "GFT": "GFT", "HNT": "HNT", "GYT": "GYT", "NZDT": "NZDT", "WAT": "WAT", "MESZ": "MESZ", "IST": "IST", "PST": "PST", "HECU": "HECU", "SAST": "SAST", "ChST": "ChST", "SRT": "SRT", "ACWST": "ACWST", "AEST": "AEST", "CHAST": "CHAST", "WEZ": "WEZ", "COST": "COST", "∅∅∅": "∅∅∅", "HADT": "HADT", "GMT": "GMT", "BT": "BT", "UYT": "UYT", "PDT": "PDT", "VET": "VET", "WARST": "WARST", "CAT": "CAT", "CDT": "CDT", "OESZ": "OESZ", "HNOG": "HNOG", "AEDT": "AEDT", "SGT": "SGT", "BOT": "BOT", "JST": "JST", "UYST": "UYST", "HNCU": "HNCU", "WITA": "WITA", "CST": "CST", "AWDT": "AWDT", "HEPMX": "HEPMX", "HEPM": "HEPM", "CLT": "CLT", "ARST": "ARST", "HKT": "HKT", "HKST": "HKST", "MST": "MST", "ART": "ART", "HNEG": "HNEG", "WIT": "WIT", "TMST": "TMST", "NZST": "NZST", "MDT": "MDT", "AST": "AST", "MEZ": "MEZ", "ACDT": "ACDT", "HNPM": "HNPM", "AKDT": "AKDT", "CLST": "CLST", "WIB": "WIB", "COT": "COT", "EAT": "EAT", "AKST": "AKST", "TMT": "TMT", "ADT": "ADT", "WART": "WART", "HEEG": "HEEG", "ACST": "ACST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "MYT": "MYT", "JDT": "JDT", "AWST": "AWST", "LHST": "LHST", "EST": "EST", "EDT": "EDT", "HEOG": "HEOG", "ACWDT": "ACWDT", "OEZ": "OEZ"}, - } - } -  -@@ -103,8 +78,8 @@ func (bs *bs_Latn) CardinalPluralRule(num float64, v uint64) locales.PluralRule - n := math.Abs(num) - i := int64(n) - f := locales.F(n, v) -- iMod100 := i % 100 - iMod10 := i % 10 -+ iMod100 := i % 100 - fMod10 := f % 10 - fMod100 := f % 100 -  -@@ -157,7 +132,7 @@ func (bs *bs_Latn) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bs *bs_Latn) MonthsAbbreviated() []string { -- return bs.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +142,7 @@ func (bs *bs_Latn) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bs *bs_Latn) MonthsNarrow() []string { -- return bs.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +152,7 @@ func (bs *bs_Latn) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bs *bs_Latn) MonthsWide() []string { -- return bs.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,75 +198,13 @@ func (bs *bs_Latn) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bs_Latn' and handles both Whole and Real numbers based on 'v' - func (bs *bs_Latn) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bs_Latn' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bs *bs_Latn) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bs.percentSuffix...) -- -- b = append(b, bs.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Latn' -@@ -299,56 +212,7 @@ func (bs *bs_Latn) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, bs.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Latn' -@@ -357,63 +221,7 @@ func (bs *bs_Latn) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bs.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bs.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, bs.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bs_Latn' -@@ -421,19 +229,6 @@ func (bs *bs_Latn) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -442,19 +237,6 @@ func (bs *bs_Latn) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -463,19 +245,6 @@ func (bs *bs_Latn) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -484,21 +253,6 @@ func (bs *bs_Latn) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bs.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -507,19 +261,6 @@ func (bs *bs_Latn) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -528,26 +269,6 @@ func (bs *bs_Latn) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -556,30 +277,6 @@ func (bs *bs_Latn) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -588,34 +285,5 @@ func (bs *bs_Latn) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bs.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/bs_Latn_BA/bs_Latn_BA.go b/bs_Latn_BA/bs_Latn_BA.go -index 0f64741..7c18b6a 100644 ---- a/bs_Latn_BA/bs_Latn_BA.go -+++ b/bs_Latn_BA/bs_Latn_BA.go -@@ -10,70 +10,45 @@ import ( - ) -  - type bs_Latn_BA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'bs_Latn_BA' locale - func New() locales.Translator { - return &bs_Latn_BA{ -- locale: "bs_Latn_BA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan", "feb", "mar", "apr", "maj", "jun", "jul", "avg", "sep", "okt", "nov", "dec"}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januar", "februar", "mart", "april", "maj", "juni", "juli", "avgust", "septembar", "oktobar", "novembar", "decembar"}, -- daysAbbreviated: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysNarrow: []string{"N", "P", "U", "S", "Č", "P", "S"}, -- daysShort: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysWide: []string{"nedjelja", "ponedjeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"prijepodne", "popodne"}, -- periodsNarrow: []string{"prijepodne", "popodne"}, -- periodsWide: []string{"prijepodne", "popodne"}, -- erasAbbreviated: []string{"p. n. e.", "n. e."}, -- erasNarrow: []string{"pr.n.e.", "AD"}, -- erasWide: []string{"prije nove ere", "nove ere"}, -- timezones: map[string]string{"AKDT": "Aljaskansko ljetno vrijeme", "MEZ": "Centralnoevropsko standardno vrijeme", "CHAST": "Čatamsko standardno vrijeme", "UYST": "Urugvajsko ljetno vrijeme", "CHADT": "Čatamsko ljetno vrijeme", "HAST": "Havajsko-aleućansko standardno vrijeme", "CLT": "Čileansko standardno vrijeme", "JST": "Japansko standardno vrijeme", "GFT": "Francuskogvajansko vrijeme", "OEZ": "Istočnoevropsko standardno vrijeme", "SAST": "Južnoafričko standardno vrijeme", "HNEG": "Istočnogrenlandsko standardno vrijeme", "OESZ": "Istočnoevropsko ljetno vrijeme", "MESZ": "Centralnoevropsko ljetno vrijeme", "CDT": "Sjevernoameričko centralno ljetno vrijeme", "PDT": "Sjevernoameričko pacifičko ljetno vrijeme", "ACWST": "Australijsko centralnozapadno standardno vrijeme", "HNOG": "Zapadnogrenlandsko standardno vrijeme", "HKST": "Hongkonško ljetno vrijeme", "BOT": "Bolivijsko vrijeme", "ACDT": "Centralnoaustralijsko ljetno vrijeme", "UYT": "Urugvajsko standardno vrijeme", "EAT": "Istočnoafričko vrijeme", "ADT": "Sjevernoameričko atlantsko ljetno vrijeme", "AEST": "Istočnoaustralijsko standardno vrijeme", "AWDT": "Zapadnoaustralijsko ljetno vrijeme", "HNPM": "Standardno vrijeme na Ostrvima Sen Pjer i Mikelon", "NZST": "Novozelandsko standardno vrijeme", "HECU": "Kubansko ljetno vrijeme", "GMT": "Griničko vrijeme", "WIB": "Zapadnoindonezijsko vrijeme", "PST": "Sjevernoameričko pacifičko standardno vrijeme", "WEZ": "Zapadnoevropsko standardno vrijeme", "NZDT": "Novozelandsko ljetno vrijeme", "ACST": "Centralnoaustralijsko standardno vrijeme", "HENOMX": "Sjeverozapadno meksičko ljetno vrijeme", "HEPM": "Ljetno vrijeme na Ostrvima Sen Pjer i Mikelon", "IST": "Indijsko standardno vrijeme", "TMST": "Turkmenistansko ljetno vrijeme", "HNT": "Njufaundlendsko standardno vrijeme", "AST": "Sjevernoameričko atlantsko standardno vrijeme", "HADT": "Havajsko-aleućansko ljetno vrijeme", "WESZ": "Zapadnoevropsko ljetno vrijeme", "WAT": "Zapadnoafričko standardno vrijeme", "HNPMX": "Meksičko pacifičko standardno vrijeme", "HNCU": "Kubansko standardno vrijeme", "∅∅∅": "Brazilijsko ljetno vrijeme", "HEPMX": "Meksičko pacifičko ljetno vrijeme", "AKST": "Aljaskansko standardno vrijeme", "WITA": "Centralnoindonezijsko vrijeme", "COST": "Kolumbijsko ljetno vrijeme", "HNNOMX": "Sjeverozapadno meksičko standardno vrijeme", "EST": "Sjevernoameričko istočno standardno vrijeme", "MDT": "Makao letnje računanje vremena", "CST": "Sjevernoameričko centralno standardno vrijeme", "VET": "Venecuelansko vrijeme", "LHDT": "Ljetno vrijeme na Ostrvu Lord Hau", "WART": "Zapadnoargentinsko standardno vrijeme", "HEOG": "Zapadnogrenlandsko ljetno vrijeme", "AEDT": "Istočnoaustralijsko ljetno vrijeme", "TMT": "Turkmenistansko standardno vrijeme", "SGT": "Singapursko standardno vrijeme", "EDT": "Sjevernoameričko istočno ljetno vrijeme", "BT": "Butansko vrijeme", "JDT": "Japansko ljetno vrijeme", "WAST": "Zapadnoafričko ljetno vrijeme", "COT": "Kolumbijsko standardno vrijeme", "GYT": "Gvajansko vrijeme", "MYT": "Malezijsko vrijeme", "AWST": "Zapadnoaustralijsko standardno vrijeme", "MST": "Makao standardno vreme", "ACWDT": "Australijsko centralnozapadno ljetno vrijeme", "HAT": "Njufaundlendsko ljetno vrijeme", "ARST": "Argentinsko ljetno vrijeme", "HKT": "Hongkonško standardno vrijeme", "LHST": "Standardno vrijeme na Ostrvu Lord Hau", "CLST": "Čileansko ljetno vrijeme", "CAT": "Centralnoafričko vrijeme", "WIT": "Istočnoindonezijsko vrijeme", "ECT": "Ekvadorsko vrijeme", "SRT": "Surinamsko vrijeme", "ART": "Argentinsko standardno vrijeme", "ChST": "Čamorsko standardno vrijeme", "HEEG": "Istočnogrenlandsko ljetno vrijeme", "WARST": "Zapadnoargentinsko ljetno vrijeme"}, -+ locale: "bs_Latn_BA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JDT": "JDT", "CHAST": "CHAST", "VET": "VET", "HNPMX": "HNPMX", "COST": "COST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "JST": "JST", "ARST": "ARST", "HNEG": "HNEG", "PDT": "PDT", "AST": "AST", "HNPM": "HNPM", "SAST": "SAST", "∅∅∅": "∅∅∅", "MST": "MST", "NZST": "NZST", "GMT": "GMT", "BOT": "BOT", "CHADT": "CHADT", "AEDT": "AEDT", "CLST": "CLST", "CST": "CST", "NZDT": "NZDT", "ECT": "ECT", "WEZ": "WEZ", "SRT": "SRT", "HEPM": "HEPM", "UYT": "UYT", "WAST": "WAST", "WART": "WART", "HEOG": "HEOG", "CAT": "CAT", "ADT": "ADT", "ACWST": "ACWST", "HECU": "HECU", "HKST": "HKST", "MDT": "MDT", "LHST": "LHST", "MYT": "MYT", "HADT": "HADT", "AKST": "AKST", "OEZ": "OEZ", "TMST": "TMST", "WITA": "WITA", "HAST": "HAST", "ART": "ART", "AWST": "AWST", "BT": "BT", "GFT": "GFT", "WIT": "WIT", "COT": "COT", "WIB": "WIB", "ACST": "ACST", "HEEG": "HEEG", "PST": "PST", "AKDT": "AKDT", "HNT": "HNT", "HKT": "HKT", "CLT": "CLT", "MEZ": "MEZ", "HENOMX": "HENOMX", "AEST": "AEST", "WESZ": "WESZ", "HNCU": "HNCU", "OESZ": "OESZ", "GYT": "GYT", "HNOG": "HNOG", "TMT": "TMT", "EDT": "EDT", "AWDT": "AWDT", "SGT": "SGT", "HAT": "HAT", "EST": "EST", "EAT": "EAT", "MESZ": "MESZ", "WARST": "WARST", "ChST": "ChST", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "CDT": "CDT", "IST": "IST", "WAT": "WAT", "LHDT": "LHDT", "UYST": "UYST"}, - } - } -  -@@ -157,7 +132,7 @@ func (bs *bs_Latn_BA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (bs *bs_Latn_BA) MonthsAbbreviated() []string { -- return bs.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +142,7 @@ func (bs *bs_Latn_BA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (bs *bs_Latn_BA) MonthsNarrow() []string { -- return bs.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +152,7 @@ func (bs *bs_Latn_BA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (bs *bs_Latn_BA) MonthsWide() []string { -- return bs.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,75 +198,13 @@ func (bs *bs_Latn_BA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'bs_Latn_BA' and handles both Whole and Real numbers based on 'v' - func (bs *bs_Latn_BA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'bs_Latn_BA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (bs *bs_Latn_BA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, bs.percentSuffix...) -- -- b = append(b, bs.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Latn_BA' -@@ -299,56 +212,7 @@ func (bs *bs_Latn_BA) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, bs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, bs.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bs_Latn_BA' -@@ -357,63 +221,7 @@ func (bs *bs_Latn_BA) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := bs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, bs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, bs.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, bs.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, bs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, bs.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, bs.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'bs_Latn_BA' -@@ -421,19 +229,6 @@ func (bs *bs_Latn_BA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -442,19 +237,6 @@ func (bs *bs_Latn_BA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -463,19 +245,6 @@ func (bs *bs_Latn_BA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -484,21 +253,6 @@ func (bs *bs_Latn_BA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, bs.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, bs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -507,19 +261,6 @@ func (bs *bs_Latn_BA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -528,26 +269,6 @@ func (bs *bs_Latn_BA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -556,30 +277,6 @@ func (bs *bs_Latn_BA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -588,34 +285,5 @@ func (bs *bs_Latn_BA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, bs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := bs.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ca/ca.go b/ca/ca.go -index 2d888f7..c3cd869 100644 ---- a/ca/ca.go -+++ b/ca/ca.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"aC", "dC"}, - erasNarrow: []string{"aC", "dC"}, - erasWide: []string{"abans de Crist", "després de Crist"}, -- timezones: map[string]string{"WIT": "Hora de l’est d’Indonèsia", "WESZ": "Hora d’estiu de l’Oest d’Europa", "CHADT": "Hora d’estiu de Chatham", "CLST": "Hora d’estiu de Xile", "ChST": "Hora de Chamorro", "ACST": "Hora estàndard d’Austràlia Central", "AWDT": "Hora d’estiu d’Austràlia Occidental", "IST": "Hora estàndard de l’Índia", "GFT": "Hora de la Guaiana Francesa", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "PDT": "Hora d’estiu del Pacífic", "PST": "Hora estàndard del Pacífic", "AEST": "Hora estàndard d’Austràlia Oriental", "TMT": "Hora estàndard del Turkmenistan", "OESZ": "Hora d’estiu de l’Est d’Europa", "AKDT": "Hora d’estiu d’Alaska", "WIB": "Hora de l’oest d’Indonèsia", "HAST": "Hora estàndard de Hawaii-Aleutianes", "ARST": "Hora d’estiu de l’Argentina", "JDT": "Hora d’estiu del Japó", "CLT": "Hora estàndard de Xile", "WART": "Hora estàndard de l’oest de l’Argentina", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "WEZ": "Hora estàndard de l’Oest d’Europa", "HAT": "Hora d’estiu de Terranova", "∅∅∅": "Hora d’estiu de l’Amazones", "BOT": "Hora de Bolívia", "ACDT": "Hora d’estiu d’Austràlia Central", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "SGT": "Hora de Singapur", "MYT": "Hora de Malàisia", "AKST": "Hora estàndard d’Alaska", "AEDT": "Hora d’estiu d’Austràlia Oriental", "AWST": "Hora estàndard d’Austràlia Occidental", "MESZ": "Hora d’estiu del Centre d’Europa", "SAST": "Hora estàndard del sud de l’Àfrica", "WAST": "Hora d’estiu de l’Àfrica Occidental", "SRT": "Hora de Surinam", "HKT": "Hora estàndard de Hong Kong", "LHST": "Hora estàndard de Lord Howe", "NZDT": "Hora d’estiu de Nova Zelanda", "EAT": "Hora de l’Àfrica Oriental", "AST": "Hora estàndard de l’Atlàntic", "UYST": "Hora d’estiu de l’Uruguai", "VET": "Hora de Veneçuela", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "HNCU": "Hora estàndard de Cuba", "HKST": "Hora d’estiu de Hong Kong", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "TMST": "Hora d’estiu del Turkmenistan", "OEZ": "Hora estàndard de l’Est d’Europa", "COT": "Hora estàndard de Colòmbia", "EST": "Hora estàndard oriental d’Amèrica del Nord", "ADT": "Hora d’estiu de l’Atlàntic", "ART": "Hora estàndard de l’Argentina", "HNT": "Hora estàndard de Terranova", "WITA": "Hora central d’Indonèsia", "LHDT": "Horari d’estiu de Lord Howe", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "WAT": "Hora estàndard de l’Àfrica Occidental", "GYT": "Hora de Guyana", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "MEZ": "Hora estàndard del Centre d’Europa", "GMT": "Hora del Meridià de Greenwich", "CST": "Hora estàndard central d’Amèrica del Nord", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "NZST": "Hora estàndard de Nova Zelanda", "CHAST": "Hora estàndard de Chatham", "WARST": "Hora d’estiu de l’oest de l’Argentina", "MST": "Hora estàndard de Macau", "UYT": "Hora estàndard de l’Uruguai", "CDT": "Hora d’estiu central d’Amèrica del Nord", "JST": "Hora estàndard del Japó", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "BT": "Hora de Bhutan", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "ECT": "Hora de l’Equador", "CAT": "Hora de l’Àfrica Central", "COST": "Hora d’estiu de Colòmbia", "HECU": "Hora d’estiu de Cuba", "MDT": "Hora d’estiu de Macau", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon"}, -+ timezones: map[string]string{"CST": "Hora estàndard central d’Amèrica del Nord", "EAT": "Hora de l’Àfrica Oriental", "WAST": "Hora d’estiu de l’Àfrica Occidental", "WARST": "Hora d’estiu de l’oest de l’Argentina", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "WIB": "Hora de l’oest d’Indonèsia", "CHAST": "Hora estàndard de Chatham", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "TMT": "Hora estàndard del Turkmenistan", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "HNT": "Hora estàndard de Terranova", "HAT": "Hora d’estiu de Terranova", "AST": "Hora estàndard de l’Atlàntic", "ARST": "Hora d’estiu de l’Argentina", "ACST": "Hora estàndard d’Austràlia Central", "JDT": "Hora d’estiu del Japó", "HNCU": "Hora estàndard de Cuba", "COST": "Hora d’estiu de Colòmbia", "MESZ": "Hora d’estiu del Centre d’Europa", "UYST": "Hora d’estiu de l’Uruguai", "LHST": "Hora estàndard de Lord Howe", "PDT": "Hora d’estiu del Pacífic", "HKT": "Hora estàndard de Hong Kong", "CAT": "Hora de l’Àfrica Central", "ECT": "Hora de l’Equador", "ChST": "Hora de Chamorro", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "AWST": "Hora estàndard d’Austràlia Occidental", "TMST": "Hora d’estiu del Turkmenistan", "ADT": "Hora d’estiu de l’Atlàntic", "VET": "Hora de Veneçuela", "WAT": "Hora estàndard de l’Àfrica Occidental", "COT": "Hora estàndard de Colòmbia", "GYT": "Hora de Guyana", "CLST": "Hora d’estiu de Xile", "MST": "Hora estàndard de Macau", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "AKDT": "Hora d’estiu d’Alaska", "GFT": "Hora de la Guaiana Francesa", "CLT": "Hora estàndard de Xile", "MDT": "Hora d’estiu de Macau", "ART": "Hora estàndard de l’Argentina", "AWDT": "Hora d’estiu d’Austràlia Occidental", "IST": "Hora estàndard de l’Índia", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "EST": "Hora estàndard oriental d’Amèrica del Nord", "BOT": "Hora de Bolívia", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "LHDT": "Horari d’estiu de Lord Howe", "MYT": "Hora de Malàisia", "JST": "Hora estàndard del Japó", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "ACDT": "Hora d’estiu d’Austràlia Central", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "WEZ": "Hora estàndard de l’Oest d’Europa", "CDT": "Hora d’estiu central d’Amèrica del Nord", "SRT": "Hora de Surinam", "OEZ": "Hora estàndard de l’Est d’Europa", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "WITA": "Hora central d’Indonèsia", "GMT": "Hora del Meridià de Greenwich", "WIT": "Hora de l’est d’Indonèsia", "HKST": "Hora d’estiu de Hong Kong", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "AEST": "Hora estàndard d’Austràlia Oriental", "HAST": "Hora estàndard de Hawaii-Aleutianes", "MEZ": "Hora estàndard del Centre d’Europa", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "PST": "Hora estàndard del Pacífic", "NZST": "Hora estàndard de Nova Zelanda", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon", "HECU": "Hora d’estiu de Cuba", "∅∅∅": "Hora d’estiu de les Açores", "UYT": "Hora estàndard de l’Uruguai", "AEDT": "Hora d’estiu d’Austràlia Oriental", "AKST": "Hora estàndard d’Alaska", "WART": "Hora estàndard de l’oest de l’Argentina", "OESZ": "Hora d’estiu de l’Est d’Europa", "SAST": "Hora estàndard del sud de l’Àfrica", "NZDT": "Hora d’estiu de Nova Zelanda", "CHADT": "Hora d’estiu de Chatham", "BT": "Hora de Bhutan", "WESZ": "Hora d’estiu de l’Oest d’Europa", "SGT": "Hora de Singapur"}, - } - } -  -diff --git a/ca_AD/ca_AD.go b/ca_AD/ca_AD.go -index c561a2e..00c10c4 100644 ---- a/ca_AD/ca_AD.go -+++ b/ca_AD/ca_AD.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ca_AD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ca_AD' locale - func New() locales.Translator { - return &ca_AD{ -- locale: "ca_AD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "de gen.", "de febr.", "de març", "d’abr.", "de maig", "de juny", "de jul.", "d’ag.", "de set.", "d’oct.", "de nov.", "de des."}, -- monthsNarrow: []string{"", "GN", "FB", "MÇ", "AB", "MG", "JN", "JL", "AG", "ST", "OC", "NV", "DS"}, -- monthsWide: []string{"", "de gener", "de febrer", "de març", "d’abril", "de maig", "de juny", "de juliol", "d’agost", "de setembre", "d’octubre", "de novembre", "de desembre"}, -- daysAbbreviated: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysNarrow: []string{"dg", "dl", "dt", "dc", "dj", "dv", "ds"}, -- daysShort: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysWide: []string{"diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"aC", "dC"}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"abans de Crist", "després de Crist"}, -- timezones: map[string]string{"AST": "Hora estàndard de l’Atlàntic", "CHADT": "Hora d’estiu de Chatham", "CLST": "Hora d’estiu de Xile", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "SRT": "Hora de Surinam", "PDT": "Hora d’estiu del Pacífic", "ART": "Hora estàndard de l’Argentina", "HKST": "Hora d’estiu de Hong Kong", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "GMT": "Hora del Meridià de Greenwich", "WIT": "Hora de l’est d’Indonèsia", "MEZ": "Hora estàndard del Centre d’Europa", "EAT": "Hora de l’Àfrica Oriental", "LHDT": "Horari d’estiu de Lord Howe", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "WAST": "Hora d’estiu de l’Àfrica Occidental", "HNCU": "Hora estàndard de Cuba", "UYT": "Hora estàndard de l’Uruguai", "AKDT": "Hora d’estiu d’Alaska", "CST": "Hora estàndard central d’Amèrica del Nord", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "TMST": "Hora d’estiu del Turkmenistan", "SGT": "Hora de Singapur", "GYT": "Hora de Guyana", "AEDT": "Hora d’estiu d’Austràlia Oriental", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon", "IST": "Hora estàndard de l’Índia", "COT": "Hora estàndard de Colòmbia", "EST": "Hora estàndard oriental d’Amèrica del Nord", "AKST": "Hora estàndard d’Alaska", "CLT": "Hora estàndard de Xile", "OESZ": "Hora d’estiu de l’Est d’Europa", "WARST": "Hora d’estiu de l’oest de l’Argentina", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "HNT": "Hora estàndard de Terranova", "MESZ": "Hora d’estiu del Centre d’Europa", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "MYT": "Hora de Malàisia", "VET": "Hora de Veneçuela", "PST": "Hora estàndard del Pacífic", "NZDT": "Hora d’estiu de Nova Zelanda", "WIB": "Hora de l’oest d’Indonèsia", "AWDT": "Hora d’estiu d’Austràlia Occidental", "CHAST": "Hora estàndard de Chatham", "GFT": "Hora de la Guaiana Francesa", "TMT": "Hora estàndard del Turkmenistan", "JST": "Hora estàndard del Japó", "ACST": "Hora estàndard d’Austràlia Central", "WAT": "Hora estàndard de l’Àfrica Occidental", "WART": "Hora estàndard de l’oest de l’Argentina", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "HECU": "Hora d’estiu de Cuba", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "AEST": "Hora estàndard d’Austràlia Oriental", "UYST": "Hora d’estiu de l’Uruguai", "CDT": "Hora d’estiu central d’Amèrica del Nord", "LHST": "Hora estàndard de Lord Howe", "NZST": "Hora estàndard de Nova Zelanda", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "SAST": "Hora estàndard del sud de l’Àfrica", "MST": "Hora estàndard de Macau", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "WESZ": "Hora d’estiu de l’Oest d’Europa", "ARST": "Hora d’estiu de l’Argentina", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "ACDT": "Hora d’estiu d’Austràlia Central", "CAT": "Hora de l’Àfrica Central", "OEZ": "Hora estàndard de l’Est d’Europa", "COST": "Hora d’estiu de Colòmbia", "WEZ": "Hora estàndard de l’Oest d’Europa", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "HKT": "Hora estàndard de Hong Kong", "WITA": "Hora central d’Indonèsia", "∅∅∅": "∅∅∅", "MDT": "Hora d’estiu de Macau", "HAT": "Hora d’estiu de Terranova", "BOT": "Hora de Bolívia", "ECT": "Hora de l’Equador", "ChST": "Hora de Chamorro", "ADT": "Hora d’estiu de l’Atlàntic", "HAST": "Hora estàndard de Hawaii-Aleutianes", "BT": "Hora de Bhutan", "AWST": "Hora estàndard d’Austràlia Occidental", "JDT": "Hora d’estiu del Japó"}, -+ locale: "ca_AD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ADT": "ADT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "HEPM": "HEPM", "HNOG": "HNOG", "HKT": "HKT", "HEPMX": "HEPMX", "OEZ": "OEZ", "HKST": "HKST", "MEZ": "MEZ", "MESZ": "MESZ", "AWDT": "AWDT", "CHADT": "CHADT", "HNPMX": "HNPMX", "WEZ": "WEZ", "WIT": "WIT", "ChST": "ChST", "ACWDT": "ACWDT", "IST": "IST", "TMT": "TMT", "NZDT": "NZDT", "AEDT": "AEDT", "GYT": "GYT", "EST": "EST", "MDT": "MDT", "ART": "ART", "HNCU": "HNCU", "WESZ": "WESZ", "AKST": "AKST", "SAST": "SAST", "CDT": "CDT", "GMT": "GMT", "AEST": "AEST", "VET": "VET", "JST": "JST", "AWST": "AWST", "EDT": "EDT", "HAST": "HAST", "CST": "CST", "SRT": "SRT", "ACST": "ACST", "MYT": "MYT", "SGT": "SGT", "WAT": "WAT", "TMST": "TMST", "ECT": "ECT", "BOT": "BOT", "HADT": "HADT", "ACWST": "ACWST", "PDT": "PDT", "GFT": "GFT", "HAT": "HAT", "WART": "WART", "CAT": "CAT", "HNPM": "HNPM", "LHDT": "LHDT", "BT": "BT", "HECU": "HECU", "EAT": "EAT", "WAST": "WAST", "WITA": "WITA", "MST": "MST", "HEEG": "HEEG", "JDT": "JDT", "OESZ": "OESZ", "WIB": "WIB", "CLST": "CLST", "NZST": "NZST", "CHAST": "CHAST", "COST": "COST", "CLT": "CLT", "HNT": "HNT", "WARST": "WARST", "PST": "PST", "AKDT": "AKDT", "COT": "COT", "HEOG": "HEOG", "ARST": "ARST", "LHST": "LHST", "UYST": "UYST", "∅∅∅": "∅∅∅", "HENOMX": "HENOMX", "UYT": "UYT", "AST": "AST"}, - } - } -  -@@ -138,7 +113,7 @@ func (ca *ca_AD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ca *ca_AD) MonthsAbbreviated() []string { -- return ca.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (ca *ca_AD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ca *ca_AD) MonthsNarrow() []string { -- return ca.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (ca *ca_AD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ca *ca_AD) MonthsWide() []string { -- return ca.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +179,13 @@ func (ca *ca_AD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ca_AD' and handles both Whole and Real numbers based on 'v' - func (ca *ca_AD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ca_AD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ca *ca_AD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ca.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ca_AD' -@@ -278,56 +193,7 @@ func (ca *ca_AD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ca.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_AD' -@@ -336,63 +202,7 @@ func (ca *ca_AD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ca.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ca.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ca.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ca_AD' -@@ -400,17 +210,6 @@ func (ca *ca_AD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +218,6 @@ func (ca *ca_AD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,18 +226,6 @@ func (ca *ca_AD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,20 +234,6 @@ func (ca *ca_AD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ca.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,15 +242,6 @@ func (ca *ca_AD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -497,22 +250,6 @@ func (ca *ca_AD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,26 +258,6 @@ func (ca *ca_AD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -549,30 +266,5 @@ func (ca *ca_AD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ca.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ca_ES/ca_ES.go b/ca_ES/ca_ES.go -index 8e709c3..ae900cf 100644 ---- a/ca_ES/ca_ES.go -+++ b/ca_ES/ca_ES.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ca_ES struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ca_ES' locale - func New() locales.Translator { - return &ca_ES{ -- locale: "ca_ES", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "de gen.", "de febr.", "de març", "d’abr.", "de maig", "de juny", "de jul.", "d’ag.", "de set.", "d’oct.", "de nov.", "de des."}, -- monthsNarrow: []string{"", "GN", "FB", "MÇ", "AB", "MG", "JN", "JL", "AG", "ST", "OC", "NV", "DS"}, -- monthsWide: []string{"", "de gener", "de febrer", "de març", "d’abril", "de maig", "de juny", "de juliol", "d’agost", "de setembre", "d’octubre", "de novembre", "de desembre"}, -- daysAbbreviated: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysNarrow: []string{"dg", "dl", "dt", "dc", "dj", "dv", "ds"}, -- daysShort: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysWide: []string{"diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"aC", "dC"}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"abans de Crist", "després de Crist"}, -- timezones: map[string]string{"WITA": "Hora central d’Indonèsia", "CLT": "Hora estàndard de Xile", "MYT": "Hora de Malàisia", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "AWDT": "Hora d’estiu d’Austràlia Occidental", "NZDT": "Hora d’estiu de Nova Zelanda", "TMST": "Hora d’estiu del Turkmenistan", "ECT": "Hora de l’Equador", "AKST": "Hora estàndard d’Alaska", "HNT": "Hora estàndard de Terranova", "ACDT": "Hora d’estiu d’Austràlia Central", "WARST": "Hora d’estiu de l’oest de l’Argentina", "COT": "Hora estàndard de Colòmbia", "HNCU": "Hora estàndard de Cuba", "MDT": "Hora d’estiu de Macau", "HECU": "Hora d’estiu de Cuba", "AEDT": "Hora d’estiu d’Austràlia Oriental", "LHDT": "Horari d’estiu de Lord Howe", "SAST": "Hora estàndard del sud de l’Àfrica", "JST": "Hora estàndard del Japó", "WART": "Hora estàndard de l’oest de l’Argentina", "COST": "Hora d’estiu de Colòmbia", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "AST": "Hora estàndard de l’Atlàntic", "GYT": "Hora de Guyana", "HKT": "Hora estàndard de Hong Kong", "HKST": "Hora d’estiu de Hong Kong", "MEZ": "Hora estàndard del Centre d’Europa", "NZST": "Hora estàndard de Nova Zelanda", "CLST": "Hora d’estiu de Xile", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "EAT": "Hora de l’Àfrica Oriental", "GMT": "Hora del Meridià de Greenwich", "SGT": "Hora de Singapur", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "WESZ": "Hora d’estiu de l’Oest d’Europa", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "WAST": "Hora d’estiu de l’Àfrica Occidental", "AKDT": "Hora d’estiu d’Alaska", "PST": "Hora estàndard del Pacífic", "ART": "Hora estàndard de l’Argentina", "CHAST": "Hora estàndard de Chatham", "UYT": "Hora estàndard de l’Uruguai", "ADT": "Hora d’estiu de l’Atlàntic", "WIT": "Hora de l’est d’Indonèsia", "BT": "Hora de Bhutan", "BOT": "Hora de Bolívia", "WAT": "Hora estàndard de l’Àfrica Occidental", "OESZ": "Hora d’estiu de l’Est d’Europa", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "AEST": "Hora estàndard d’Austràlia Oriental", "∅∅∅": "Hora d’estiu de l’Amazones", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "CAT": "Hora de l’Àfrica Central", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "SRT": "Hora de Surinam", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "ARST": "Hora d’estiu de l’Argentina", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "GFT": "Hora de la Guaiana Francesa", "ACST": "Hora estàndard d’Austràlia Central", "CDT": "Hora d’estiu central d’Amèrica del Nord", "AWST": "Hora estàndard d’Austràlia Occidental", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "IST": "Hora estàndard de l’Índia", "OEZ": "Hora estàndard de l’Est d’Europa", "EST": "Hora estàndard oriental d’Amèrica del Nord", "UYST": "Hora d’estiu de l’Uruguai", "CST": "Hora estàndard central d’Amèrica del Nord", "WEZ": "Hora estàndard de l’Oest d’Europa", "LHST": "Hora estàndard de Lord Howe", "WIB": "Hora de l’oest d’Indonèsia", "VET": "Hora de Veneçuela", "PDT": "Hora d’estiu del Pacífic", "HAT": "Hora d’estiu de Terranova", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "MESZ": "Hora d’estiu del Centre d’Europa", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon", "CHADT": "Hora d’estiu de Chatham", "JDT": "Hora d’estiu del Japó", "ChST": "Hora de Chamorro", "HAST": "Hora estàndard de Hawaii-Aleutianes", "TMT": "Hora estàndard del Turkmenistan", "MST": "Hora estàndard de Macau"}, -+ locale: "ca_ES", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "ChST": "ChST", "HNOG": "HNOG", "AWDT": "AWDT", "HNCU": "HNCU", "WAT": "WAT", "OEZ": "OEZ", "TMST": "TMST", "WIB": "WIB", "AKDT": "AKDT", "WEZ": "WEZ", "HAT": "HAT", "EAT": "EAT", "HENOMX": "HENOMX", "PST": "PST", "ACWST": "ACWST", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "COT": "COT", "EDT": "EDT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "IST": "IST", "GYT": "GYT", "NZST": "NZST", "HAST": "HAST", "HNEG": "HNEG", "CHAST": "CHAST", "OESZ": "OESZ", "HNT": "HNT", "HECU": "HECU", "HEEG": "HEEG", "MYT": "MYT", "SAST": "SAST", "CDT": "CDT", "MST": "MST", "ECT": "ECT", "AST": "AST", "MEZ": "MEZ", "AEST": "AEST", "CLT": "CLT", "HADT": "HADT", "MESZ": "MESZ", "HNPM": "HNPM", "HNPMX": "HNPMX", "WESZ": "WESZ", "WIT": "WIT", "EST": "EST", "HKST": "HKST", "BOT": "BOT", "UYST": "UYST", "CLST": "CLST", "CST": "CST", "NZDT": "NZDT", "ART": "ART", "JST": "JST", "PDT": "PDT", "JDT": "JDT", "HEPM": "HEPM", "UYT": "UYT", "BT": "BT", "AKST": "AKST", "SRT": "SRT", "LHST": "LHST", "AEDT": "AEDT", "SGT": "SGT", "VET": "VET", "WAST": "WAST", "HEOG": "HEOG", "CAT": "CAT", "MDT": "MDT", "AWST": "AWST", "GFT": "GFT", "WARST": "WARST", "COST": "COST", "GMT": "GMT", "ACST": "ACST", "CHADT": "CHADT", "ACWDT": "ACWDT", "WART": "WART", "HKT": "HKT", "TMT": "TMT", "ADT": "ADT", "ARST": "ARST", "LHDT": "LHDT"}, - } - } -  -@@ -138,7 +113,7 @@ func (ca *ca_ES) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ca *ca_ES) MonthsAbbreviated() []string { -- return ca.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (ca *ca_ES) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ca *ca_ES) MonthsNarrow() []string { -- return ca.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (ca *ca_ES) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ca *ca_ES) MonthsWide() []string { -- return ca.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +179,13 @@ func (ca *ca_ES) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ca_ES' and handles both Whole and Real numbers based on 'v' - func (ca *ca_ES) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ca_ES' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ca *ca_ES) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ca.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ca_ES' -@@ -278,56 +193,7 @@ func (ca *ca_ES) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ca.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_ES' -@@ -336,63 +202,7 @@ func (ca *ca_ES) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ca.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ca.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ca.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ca_ES' -@@ -400,17 +210,6 @@ func (ca *ca_ES) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +218,6 @@ func (ca *ca_ES) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,18 +226,6 @@ func (ca *ca_ES) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,20 +234,6 @@ func (ca *ca_ES) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ca.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,15 +242,6 @@ func (ca *ca_ES) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -497,22 +250,6 @@ func (ca *ca_ES) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,26 +258,6 @@ func (ca *ca_ES) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -549,30 +266,5 @@ func (ca *ca_ES) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ca.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ca_ES_VALENCIA/ca_ES_VALENCIA.go b/ca_ES_VALENCIA/ca_ES_VALENCIA.go -index dfcbcac..73de3ef 100644 ---- a/ca_ES_VALENCIA/ca_ES_VALENCIA.go -+++ b/ca_ES_VALENCIA/ca_ES_VALENCIA.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ca_ES_VALENCIA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ca_ES_VALENCIA' locale - func New() locales.Translator { - return &ca_ES_VALENCIA{ -- locale: "ca_ES_VALENCIA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "de gen.", "de febr.", "de març", "d’abr.", "de maig", "de juny", "de jul.", "d’ag.", "de set.", "d’oct.", "de nov.", "de des."}, -- monthsNarrow: []string{"", "GN", "FB", "MÇ", "AB", "MG", "JN", "JL", "AG", "ST", "OC", "NV", "DS"}, -- monthsWide: []string{"", "de gener", "de febrer", "de març", "d’abril", "de maig", "de juny", "de juliol", "d’agost", "de setembre", "d’octubre", "de novembre", "de desembre"}, -- daysAbbreviated: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysNarrow: []string{"dg", "dl", "dt", "dc", "dj", "dv", "ds"}, -- daysShort: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysWide: []string{"diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"aC", "dC"}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"abans de Crist", "després de Crist"}, -- timezones: map[string]string{"WIT": "Hora de l’est d’Indonèsia", "HECU": "Hora d’estiu de Cuba", "HAST": "Hora estàndard de Hawaii-Aleutianes", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "VET": "Hora de Veneçuela", "IST": "Hora estàndard de l’Índia", "ChST": "Hora de Chamorro", "CAT": "Hora de l’Àfrica Central", "EAT": "Hora de l’Àfrica Oriental", "EST": "Hora estàndard oriental d’Amèrica del Nord", "ARST": "Hora d’estiu de l’Argentina", "AWST": "Hora estàndard d’Austràlia Occidental", "LHDT": "Horari d’estiu de Lord Howe", "OEZ": "Hora estàndard de l’Est d’Europa", "ECT": "Hora de l’Equador", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "AKDT": "Hora d’estiu d’Alaska", "ADT": "Hora d’estiu de l’Atlàntic", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "JDT": "Hora d’estiu del Japó", "GFT": "Hora de la Guaiana Francesa", "CHAST": "Hora estàndard de Chatham", "COT": "Hora estàndard de Colòmbia", "MST": "Hora estàndard de Macau", "MDT": "Hora d’estiu de Macau", "MYT": "Hora de Malàisia", "SRT": "Hora de Surinam", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "WART": "Hora estàndard de l’oest de l’Argentina", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "CST": "Hora estàndard central d’Amèrica del Nord", "JST": "Hora estàndard del Japó", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "WAST": "Hora d’estiu de l’Àfrica Occidental", "OESZ": "Hora d’estiu de l’Est d’Europa", "UYT": "Hora estàndard de l’Uruguai", "GYT": "Hora de Guyana", "WESZ": "Hora d’estiu de l’Oest d’Europa", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "TMST": "Hora d’estiu del Turkmenistan", "TMT": "Hora estàndard del Turkmenistan", "GMT": "Hora del Meridià de Greenwich", "WEZ": "Hora estàndard de l’Oest d’Europa", "MESZ": "Hora d’estiu del Centre d’Europa", "NZST": "Hora estàndard de Nova Zelanda", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "MEZ": "Hora estàndard del Centre d’Europa", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "HNCU": "Hora estàndard de Cuba", "PDT": "Hora d’estiu del Pacífic", "HNT": "Hora estàndard de Terranova", "AEDT": "Hora d’estiu d’Austràlia Oriental", "UYST": "Hora d’estiu de l’Uruguai", "CDT": "Hora d’estiu central d’Amèrica del Nord", "ART": "Hora estàndard de l’Argentina", "NZDT": "Hora d’estiu de Nova Zelanda", "ACDT": "Hora d’estiu d’Austràlia Central", "HAT": "Hora d’estiu de Terranova", "AEST": "Hora estàndard d’Austràlia Oriental", "AST": "Hora estàndard de l’Atlàntic", "AKST": "Hora estàndard d’Alaska", "HKST": "Hora d’estiu de Hong Kong", "∅∅∅": "Hora d’estiu de l’Amazones", "SGT": "Hora de Singapur", "LHST": "Hora estàndard de Lord Howe", "SAST": "Hora estàndard del sud de l’Àfrica", "CLT": "Hora estàndard de Xile", "BOT": "Hora de Bolívia", "ACST": "Hora estàndard d’Austràlia Central", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "AWDT": "Hora d’estiu d’Austràlia Occidental", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "CHADT": "Hora d’estiu de Chatham", "CLST": "Hora d’estiu de Xile", "COST": "Hora d’estiu de Colòmbia", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "PST": "Hora estàndard del Pacífic", "HKT": "Hora estàndard de Hong Kong", "WITA": "Hora central d’Indonèsia", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "WIB": "Hora de l’oest d’Indonèsia", "BT": "Hora de Bhutan", "WAT": "Hora estàndard de l’Àfrica Occidental", "WARST": "Hora d’estiu de l’oest de l’Argentina"}, -+ locale: "ca_ES_VALENCIA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "CLT": "CLT", "SRT": "SRT", "ACST": "ACST", "HEPM": "HEPM", "UYT": "UYT", "AEST": "AEST", "VET": "VET", "ECT": "ECT", "MESZ": "MESZ", "HNPMX": "HNPMX", "TMT": "TMT", "CAT": "CAT", "AST": "AST", "HNEG": "HNEG", "PDT": "PDT", "CHAST": "CHAST", "HNT": "HNT", "HKT": "HKT", "HKST": "HKST", "CHADT": "CHADT", "GFT": "GFT", "HEOG": "HEOG", "HNPM": "HNPM", "NZDT": "NZDT", "ChST": "ChST", "AWDT": "AWDT", "PST": "PST", "ACWDT": "ACWDT", "WAT": "WAT", "MST": "MST", "NZST": "NZST", "JST": "JST", "HEPMX": "HEPMX", "HNOG": "HNOG", "TMST": "TMST", "WEZ": "WEZ", "HAT": "HAT", "COT": "COT", "ACWST": "ACWST", "ADT": "ADT", "EAT": "EAT", "HNCU": "HNCU", "AKST": "AKST", "OEZ": "OEZ", "EDT": "EDT", "MDT": "MDT", "ARST": "ARST", "AWST": "AWST", "LHST": "LHST", "WART": "WART", "COST": "COST", "WIB": "WIB", "AEDT": "AEDT", "WESZ": "WESZ", "HECU": "HECU", "LHDT": "LHDT", "BT": "BT", "CST": "CST", "HAST": "HAST", "JDT": "JDT", "IST": "IST", "WARST": "WARST", "∅∅∅": "∅∅∅", "CLST": "CLST", "HADT": "HADT", "SGT": "SGT", "EST": "EST", "GMT": "GMT", "MYT": "MYT", "UYST": "UYST", "CDT": "CDT", "ART": "ART", "BOT": "BOT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "WIT": "WIT", "GYT": "GYT", "WITA": "WITA", "HENOMX": "HENOMX", "WAST": "WAST", "OESZ": "OESZ", "SAST": "SAST", "ACDT": "ACDT"}, - } - } -  -@@ -138,7 +113,7 @@ func (ca *ca_ES_VALENCIA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ca *ca_ES_VALENCIA) MonthsAbbreviated() []string { -- return ca.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (ca *ca_ES_VALENCIA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ca *ca_ES_VALENCIA) MonthsNarrow() []string { -- return ca.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (ca *ca_ES_VALENCIA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ca *ca_ES_VALENCIA) MonthsWide() []string { -- return ca.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +179,13 @@ func (ca *ca_ES_VALENCIA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ca_ES_VALENCIA' and handles both Whole and Real numbers based on 'v' - func (ca *ca_ES_VALENCIA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ca_ES_VALENCIA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ca *ca_ES_VALENCIA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ca.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ca_ES_VALENCIA' -@@ -278,56 +193,7 @@ func (ca *ca_ES_VALENCIA) FmtCurrency(num float64, v uint64, currency currency.T -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ca.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_ES_VALENCIA' -@@ -336,63 +202,7 @@ func (ca *ca_ES_VALENCIA) FmtAccounting(num float64, v uint64, currency currency -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ca.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ca.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ca.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ca_ES_VALENCIA' -@@ -400,17 +210,6 @@ func (ca *ca_ES_VALENCIA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +218,6 @@ func (ca *ca_ES_VALENCIA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,18 +226,6 @@ func (ca *ca_ES_VALENCIA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,20 +234,6 @@ func (ca *ca_ES_VALENCIA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ca.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,15 +242,6 @@ func (ca *ca_ES_VALENCIA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -497,22 +250,6 @@ func (ca *ca_ES_VALENCIA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,26 +258,6 @@ func (ca *ca_ES_VALENCIA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -549,30 +266,5 @@ func (ca *ca_ES_VALENCIA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ca.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ca_FR/ca_FR.go b/ca_FR/ca_FR.go -index cda1363..fa1d899 100644 ---- a/ca_FR/ca_FR.go -+++ b/ca_FR/ca_FR.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ca_FR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ca_FR' locale - func New() locales.Translator { - return &ca_FR{ -- locale: "ca_FR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "F", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "de gen.", "de febr.", "de març", "d’abr.", "de maig", "de juny", "de jul.", "d’ag.", "de set.", "d’oct.", "de nov.", "de des."}, -- monthsNarrow: []string{"", "GN", "FB", "MÇ", "AB", "MG", "JN", "JL", "AG", "ST", "OC", "NV", "DS"}, -- monthsWide: []string{"", "de gener", "de febrer", "de març", "d’abril", "de maig", "de juny", "de juliol", "d’agost", "de setembre", "d’octubre", "de novembre", "de desembre"}, -- daysAbbreviated: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysNarrow: []string{"dg", "dl", "dt", "dc", "dj", "dv", "ds"}, -- daysShort: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysWide: []string{"diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"aC", "dC"}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"abans de Crist", "després de Crist"}, -- timezones: map[string]string{"AWDT": "Hora d’estiu d’Austràlia Occidental", "AEST": "Hora estàndard d’Austràlia Oriental", "WIT": "Hora de l’est d’Indonèsia", "CAT": "Hora de l’Àfrica Central", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "AST": "Hora estàndard de l’Atlàntic", "LHDT": "Horari d’estiu de Lord Howe", "CLST": "Hora d’estiu de Xile", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "TMT": "Hora estàndard del Turkmenistan", "GYT": "Hora de Guyana", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "WAST": "Hora d’estiu de l’Àfrica Occidental", "VET": "Hora de Veneçuela", "BT": "Hora de Bhutan", "WART": "Hora estàndard de l’oest de l’Argentina", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "HNCU": "Hora estàndard de Cuba", "EST": "Hora estàndard oriental d’Amèrica del Nord", "AKST": "Hora estàndard d’Alaska", "EAT": "Hora de l’Àfrica Oriental", "OEZ": "Hora estàndard de l’Est d’Europa", "OESZ": "Hora d’estiu de l’Est d’Europa", "WARST": "Hora d’estiu de l’oest de l’Argentina", "BOT": "Hora de Bolívia", "ACDT": "Hora d’estiu d’Austràlia Central", "COST": "Hora d’estiu de Colòmbia", "MST": "Hora estàndard de Macau", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "LHST": "Hora estàndard de Lord Howe", "SAST": "Hora estàndard del sud de l’Àfrica", "JST": "Hora estàndard del Japó", "CST": "Hora estàndard central d’Amèrica del Nord", "WIB": "Hora de l’oest d’Indonèsia", "SRT": "Hora de Surinam", "WESZ": "Hora d’estiu de l’Oest d’Europa", "HNT": "Hora estàndard de Terranova", "HKT": "Hora estàndard de Hong Kong", "MYT": "Hora de Malàisia", "IST": "Hora estàndard de l’Índia", "ChST": "Hora de Chamorro", "ACST": "Hora estàndard d’Austràlia Central", "GMT": "Hora del Meridià de Greenwich", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "AKDT": "Hora d’estiu d’Alaska", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "PDT": "Hora d’estiu del Pacífic", "WITA": "Hora central d’Indonèsia", "AEDT": "Hora d’estiu d’Austràlia Oriental", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "AWST": "Hora estàndard d’Austràlia Occidental", "JDT": "Hora d’estiu del Japó", "MDT": "Hora d’estiu de Macau", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "HKST": "Hora d’estiu de Hong Kong", "∅∅∅": "Hora d’estiu de l’Amazones", "ECT": "Hora de l’Equador", "MESZ": "Hora d’estiu del Centre d’Europa", "CLT": "Hora estàndard de Xile", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "CDT": "Hora d’estiu central d’Amèrica del Nord", "UYT": "Hora estàndard de l’Uruguai", "UYST": "Hora d’estiu de l’Uruguai", "HAST": "Hora estàndard de Hawaii-Aleutianes", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "NZST": "Hora estàndard de Nova Zelanda", "CHAST": "Hora estàndard de Chatham", "TMST": "Hora d’estiu del Turkmenistan", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "PST": "Hora estàndard del Pacífic", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon", "NZDT": "Hora d’estiu de Nova Zelanda", "WEZ": "Hora estàndard de l’Oest d’Europa", "HAT": "Hora d’estiu de Terranova", "ART": "Hora estàndard de l’Argentina", "ARST": "Hora d’estiu de l’Argentina", "CHADT": "Hora d’estiu de Chatham", "GFT": "Hora de la Guaiana Francesa", "HECU": "Hora d’estiu de Cuba", "ADT": "Hora d’estiu de l’Atlàntic", "MEZ": "Hora estàndard del Centre d’Europa", "WAT": "Hora estàndard de l’Àfrica Occidental", "COT": "Hora estàndard de Colòmbia", "SGT": "Hora de Singapur"}, -+ locale: "ca_FR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "F", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAST": "HAST", "MYT": "MYT", "PDT": "PDT", "HNCU": "HNCU", "CLST": "CLST", "ChST": "ChST", "CDT": "CDT", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "BT": "BT", "ACWDT": "ACWDT", "AKST": "AKST", "WIT": "WIT", "WITA": "WITA", "ACST": "ACST", "JDT": "JDT", "HECU": "HECU", "WAST": "WAST", "OEZ": "OEZ", "CST": "CST", "MST": "MST", "HADT": "HADT", "MESZ": "MESZ", "LHST": "LHST", "WEZ": "WEZ", "WESZ": "WESZ", "HKT": "HKT", "WART": "WART", "CLT": "CLT", "ARST": "ARST", "HNEG": "HNEG", "EST": "EST", "NZDT": "NZDT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "AEST": "AEST", "WAT": "WAT", "GFT": "GFT", "BOT": "BOT", "HEPM": "HEPM", "IST": "IST", "NZST": "NZST", "HENOMX": "HENOMX", "VET": "VET", "HAT": "HAT", "EDT": "EDT", "COT": "COT", "HNOG": "HNOG", "WIB": "WIB", "ADT": "ADT", "SRT": "SRT", "ACDT": "ACDT", "JST": "JST", "CHAST": "CHAST", "CHADT": "CHADT", "UYT": "UYT", "TMST": "TMST", "UYST": "UYST", "WARST": "WARST", "GMT": "GMT", "ART": "ART", "EAT": "EAT", "ACWST": "ACWST", "SAST": "SAST", "GYT": "GYT", "HEOG": "HEOG", "COST": "COST", "MEZ": "MEZ", "HEEG": "HEEG", "LHDT": "LHDT", "PST": "PST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "AKDT": "AKDT", "ECT": "ECT", "SGT": "SGT", "OESZ": "OESZ", "HNT": "HNT", "MDT": "MDT", "AWST": "AWST", "AEDT": "AEDT", "HKST": "HKST", "TMT": "TMT", "CAT": "CAT", "AST": "AST"}, - } - } -  -@@ -138,7 +113,7 @@ func (ca *ca_FR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ca *ca_FR) MonthsAbbreviated() []string { -- return ca.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (ca *ca_FR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ca *ca_FR) MonthsNarrow() []string { -- return ca.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (ca *ca_FR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ca *ca_FR) MonthsWide() []string { -- return ca.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +179,13 @@ func (ca *ca_FR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ca_FR' and handles both Whole and Real numbers based on 'v' - func (ca *ca_FR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ca_FR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ca *ca_FR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ca.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ca_FR' -@@ -278,56 +193,7 @@ func (ca *ca_FR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ca.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_FR' -@@ -336,63 +202,7 @@ func (ca *ca_FR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ca.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ca.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ca.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ca_FR' -@@ -400,17 +210,6 @@ func (ca *ca_FR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +218,6 @@ func (ca *ca_FR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,18 +226,6 @@ func (ca *ca_FR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,20 +234,6 @@ func (ca *ca_FR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ca.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,15 +242,6 @@ func (ca *ca_FR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -497,22 +250,6 @@ func (ca *ca_FR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,26 +258,6 @@ func (ca *ca_FR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -549,30 +266,5 @@ func (ca *ca_FR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ca.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ca_IT/ca_IT.go b/ca_IT/ca_IT.go -index b541664..48e1e1d 100644 ---- a/ca_IT/ca_IT.go -+++ b/ca_IT/ca_IT.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ca_IT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ca_IT' locale - func New() locales.Translator { - return &ca_IT{ -- locale: "ca_IT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "de gen.", "de febr.", "de març", "d’abr.", "de maig", "de juny", "de jul.", "d’ag.", "de set.", "d’oct.", "de nov.", "de des."}, -- monthsNarrow: []string{"", "GN", "FB", "MÇ", "AB", "MG", "JN", "JL", "AG", "ST", "OC", "NV", "DS"}, -- monthsWide: []string{"", "de gener", "de febrer", "de març", "d’abril", "de maig", "de juny", "de juliol", "d’agost", "de setembre", "d’octubre", "de novembre", "de desembre"}, -- daysAbbreviated: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysNarrow: []string{"dg", "dl", "dt", "dc", "dj", "dv", "ds"}, -- daysShort: []string{"dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."}, -- daysWide: []string{"diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"aC", "dC"}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"abans de Crist", "després de Crist"}, -- timezones: map[string]string{"AEST": "Hora estàndard d’Austràlia Oriental", "HKT": "Hora estàndard de Hong Kong", "MESZ": "Hora d’estiu del Centre d’Europa", "GFT": "Hora de la Guaiana Francesa", "CAT": "Hora de l’Àfrica Central", "CST": "Hora estàndard central d’Amèrica del Nord", "COST": "Hora d’estiu de Colòmbia", "HNNOMX": "Hora estàndard del nord-oest de Mèxic", "SAST": "Hora estàndard del sud de l’Àfrica", "AWST": "Hora estàndard d’Austràlia Occidental", "IST": "Hora estàndard de l’Índia", "CLST": "Hora d’estiu de Xile", "HNEG": "Hora estàndard de l’Est de Grenlàndia", "HEEG": "Hora d’estiu de l’Est de Grenlàndia", "OEZ": "Hora estàndard de l’Est d’Europa", "WIT": "Hora de l’est d’Indonèsia", "AEDT": "Hora d’estiu d’Austràlia Oriental", "NZST": "Hora estàndard de Nova Zelanda", "SRT": "Hora de Surinam", "WIB": "Hora de l’oest d’Indonèsia", "BT": "Hora de Bhutan", "PST": "Hora estàndard del Pacífic", "ART": "Hora estàndard de l’Argentina", "CHAST": "Hora estàndard de Chatham", "ECT": "Hora de l’Equador", "CDT": "Hora d’estiu central d’Amèrica del Nord", "OESZ": "Hora d’estiu de l’Est d’Europa", "HENOMX": "Hora d’estiu del nord-oest de Mèxic", "HNCU": "Hora estàndard de Cuba", "AWDT": "Hora d’estiu d’Austràlia Occidental", "HEOG": "Hora d’estiu de l’Oest de Grenlàndia", "ChST": "Hora de Chamorro", "TMST": "Hora d’estiu del Turkmenistan", "WESZ": "Hora d’estiu de l’Oest d’Europa", "HEPM": "Hora d’estiu de Saint-Pierre i Miquelon", "LHST": "Hora estàndard de Lord Howe", "LHDT": "Horari d’estiu de Lord Howe", "CLT": "Hora estàndard de Xile", "∅∅∅": "Hora d’estiu de l’Amazones", "JST": "Hora estàndard del Japó", "WEZ": "Hora estàndard de l’Oest d’Europa", "HAST": "Hora estàndard de Hawaii-Aleutianes", "ACWDT": "Hora d’estiu d’Austràlia centre-occidental", "HNT": "Hora estàndard de Terranova", "MEZ": "Hora estàndard del Centre d’Europa", "UYST": "Hora d’estiu de l’Uruguai", "HAT": "Hora d’estiu de Terranova", "WITA": "Hora central d’Indonèsia", "JDT": "Hora d’estiu del Japó", "BOT": "Hora de Bolívia", "ACWST": "Hora estàndard d’Austràlia centre-occidental", "MYT": "Hora de Malàisia", "AKST": "Hora estàndard d’Alaska", "HNPMX": "Hora estàndard del Pacífic de Mèxic", "AKDT": "Hora d’estiu d’Alaska", "HADT": "Hora d’estiu de Hawaii-Aleutianes", "PDT": "Hora d’estiu del Pacífic", "HKST": "Hora d’estiu de Hong Kong", "CHADT": "Hora d’estiu de Chatham", "WAT": "Hora estàndard de l’Àfrica Occidental", "EDT": "Hora d’estiu oriental d’Amèrica del Nord", "HECU": "Hora d’estiu de Cuba", "COT": "Hora estàndard de Colòmbia", "MDT": "Hora d’estiu de Macau", "AST": "Hora estàndard de l’Atlàntic", "GYT": "Hora de Guyana", "HNPM": "Hora estàndard de Saint-Pierre i Miquelon", "WAST": "Hora d’estiu de l’Àfrica Occidental", "WART": "Hora estàndard de l’oest de l’Argentina", "EST": "Hora estàndard oriental d’Amèrica del Nord", "VET": "Hora de Veneçuela", "SGT": "Hora de Singapur", "HEPMX": "Hora d’estiu del Pacífic de Mèxic", "UYT": "Hora estàndard de l’Uruguai", "ARST": "Hora d’estiu de l’Argentina", "HNOG": "Hora estàndard de l’Oest de Grenlàndia", "NZDT": "Hora d’estiu de Nova Zelanda", "ACDT": "Hora d’estiu d’Austràlia Central", "GMT": "Hora del Meridià de Greenwich", "MST": "Hora estàndard de Macau", "TMT": "Hora estàndard del Turkmenistan", "ACST": "Hora estàndard d’Austràlia Central", "EAT": "Hora de l’Àfrica Oriental", "WARST": "Hora d’estiu de l’oest de l’Argentina", "ADT": "Hora d’estiu de l’Atlàntic"}, -+ locale: "ca_IT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEEG": "HEEG", "ARST": "ARST", "HADT": "HADT", "JDT": "JDT", "HECU": "HECU", "MEZ": "MEZ", "WAT": "WAT", "EST": "EST", "MST": "MST", "SGT": "SGT", "CAT": "CAT", "HNEG": "HNEG", "CHAST": "CHAST", "BT": "BT", "WEZ": "WEZ", "HNCU": "HNCU", "WARST": "WARST", "NZST": "NZST", "CST": "CST", "ACST": "ACST", "HENOMX": "HENOMX", "LHDT": "LHDT", "ACWST": "ACWST", "AKST": "AKST", "GFT": "GFT", "TMST": "TMST", "AEDT": "AEDT", "COT": "COT", "HEOG": "HEOG", "ECT": "ECT", "ADT": "ADT", "BOT": "BOT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "MYT": "MYT", "HEPMX": "HEPMX", "EDT": "EDT", "ChST": "ChST", "CLT": "CLT", "HEPM": "HEPM", "OEZ": "OEZ", "HKT": "HKT", "NZDT": "NZDT", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "AWDT": "AWDT", "IST": "IST", "AKDT": "AKDT", "WIB": "WIB", "MDT": "MDT", "GMT": "GMT", "LHST": "LHST", "WESZ": "WESZ", "WIT": "WIT", "HKST": "HKST", "VET": "VET", "SAST": "SAST", "HNOG": "HNOG", "WITA": "WITA", "CDT": "CDT", "ART": "ART", "HAT": "HAT", "HAST": "HAST", "ACDT": "ACDT", "CHADT": "CHADT", "UYT": "UYT", "PST": "PST", "OESZ": "OESZ", "HNT": "HNT", "TMT": "TMT", "AST": "AST", "PDT": "PDT", "EAT": "EAT", "JST": "JST", "AWST": "AWST", "HNPM": "HNPM", "AEST": "AEST", "UYST": "UYST", "∅∅∅": "∅∅∅", "WAST": "WAST", "WART": "WART", "GYT": "GYT", "COST": "COST", "CLST": "CLST", "SRT": "SRT"}, - } - } -  -@@ -138,7 +113,7 @@ func (ca *ca_IT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ca *ca_IT) MonthsAbbreviated() []string { -- return ca.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (ca *ca_IT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ca *ca_IT) MonthsNarrow() []string { -- return ca.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (ca *ca_IT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ca *ca_IT) MonthsWide() []string { -- return ca.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +179,13 @@ func (ca *ca_IT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ca_IT' and handles both Whole and Real numbers based on 'v' - func (ca *ca_IT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ca_IT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ca *ca_IT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ca.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ca_IT' -@@ -278,56 +193,7 @@ func (ca *ca_IT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ca.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ca.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ca_IT' -@@ -336,63 +202,7 @@ func (ca *ca_IT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ca.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ca.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ca.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ca.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ca.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ca.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ca.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ca_IT' -@@ -400,17 +210,6 @@ func (ca *ca_IT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +218,6 @@ func (ca *ca_IT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,18 +226,6 @@ func (ca *ca_IT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,20 +234,6 @@ func (ca *ca_IT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ca.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ca.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,15 +242,6 @@ func (ca *ca_IT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -497,22 +250,6 @@ func (ca *ca_IT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,26 +258,6 @@ func (ca *ca_IT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -549,30 +266,5 @@ func (ca *ca_IT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ca.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ca.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ce/ce.go b/ce/ce.go -index 2425227..8178fbe 100644 ---- a/ce/ce.go -+++ b/ce/ce.go -@@ -62,7 +62,7 @@ func New() locales.Translator { - monthsAbbreviated: []string{"", "янв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "сен", "окт", "ноя", "дек"}, - monthsWide: []string{"", "январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"}, - daysWide: []string{"кӀиранан де", "оршотан де", "шинарин де", "кхаарин де", "еарин де", "пӀераскан де", "шот де"}, -- timezones: map[string]string{"JDT": "Япони, аьхкенан хан", "COST": "Колумби, аьхкенан хан", "LHDT": "Лорд-Хау, аьхкенан хан", "ACWST": "Юккъера Австрали, малхбузен стандартан хан", "CHADT": "Чатем, аьхкенан хан", "TMT": "Туркменин стандартан хан", "COT": "Колумби, стандартан хан", "SGT": "Сингапур", "EAT": "Малхбален Африка", "BOT": "Боливи", "AEDT": "Малхбален Австрали, аьхкенан хан", "CST": "Юккъера Америка, стандартан хан", "AKDT": "Аляска, аьхкенан хан", "CLST": "Чили, аьхкенан хан", "TMST": "Туркменин аьхкенан хан", "ACST": "Юккъера Австрали, стандартан хан", "ACDT": "Юккъера Австрали, аьхкенан хан", "CAT": "Юккъера Африка", "GMT": "Гринвичица юкъара хан", "AKST": "Аляска, стандартан хан", "WESZ": "Малхбузен Европа, аьхкенан хан", "LHST": "Лорд-Хау, стандартан хан", "GYT": "Гайана", "EDT": "Малхбален Америка, аьхкенан хан", "HNPMX": "Тийна океанан Мексикан стандартан хан", "ADT": "Атлантикан аьхкенан хан", "BT": "Бутан", "SRT": "Суринам", "∅∅∅": "Азоран гӀайренаш, аьхкенан хан", "PDT": "Тийна океанан аьхкенан хан", "WITA": "Юккъера Индонези", "HNPM": "Сен-Пьер а, Микелон а, стандартан хан", "CHAST": "Чатем, стандартан хан", "ECT": "Эквадор", "CDT": "Юккъера Америка, аьхкенан хан", "AWDT": "Малхбузен Австрали, аьхкенан хан", "ACWDT": "Юккъера Австрали, малхбузен аьхкенан хан", "WEZ": "Малхбузен Европа, стандартан хан", "AWST": "Малхбузен Австрали, стандартан хан", "NZST": "Керла Зеланди, стандартан хан", "HNEG": "Малхбален Гренланди, стандартан хан", "HNNOMX": "Къилбаседа Американ Мексикан стандартан хан", "MST": "MST", "MEZ": "Юккъера Европа, стандартан хан", "NZDT": "Керла Зеланди, аьхкенан хан", "SAST": "Къилба Африка", "GFT": "Французийн Гвиана", "ChST": "Чаморро", "HEEG": "Малхбален Гренланди, аьхкенан хан", "OESZ": "Малхбален Европа, аьхкенан хан", "HKST": "Гонконг, аьхкенан хан", "MESZ": "Юккъера Европа, аьхкенан хан", "OEZ": "Малхбален Европа, стандартан хан", "WARST": "Малхбузен Аргентина, аьхкенан хан", "HAST": "Гавайн-алеутийн стандартан хан", "HECU": "Куба, аьхкенан хан", "EST": "Малхбален Америка, стандартан хан", "MDT": "MDT", "MYT": "Малайзи", "PST": "Тийна океанан стандартан хан", "JST": "Япони, стандартан хан", "HENOMX": "Къилбаседа Американ Мексикан аьхкенан хан", "HNCU": "Куба, стандартан хан", "WIT": "Малхбален Индонези", "HNT": "Ньюфаундленд, стандартан хан", "ART": "Аргентина, стандартан хан", "HEPM": "Сен-Пьер а, Микелон а, аьхкенан хан", "IST": "Инди", "WIB": "Малхбузен Индонези", "HAT": "Ньюфаундленд, аьхкенан хан", "CLT": "Чили, стандартан хан", "WAT": "Малхбузен Африка, стандартан хан", "WAST": "Малхбузен Африка, аьхкенан хан", "UYT": "Уругвай, стандартан хан", "AST": "Атлантикан стандартан хан", "UYST": "Уругвай, аьхкенан хан", "HADT": "Гавайн-алеутийн аьхкенан хан", "VET": "Венесуэла", "ARST": "Аргентина, аьхкенан хан", "HNOG": "Малхбузен Гренланди, стандартан хан", "HEOG": "Малхбузен Гренланди, аьхкенан хан", "HEPMX": "Тийна океанан Мексикан аьхкенан хан", "HKT": "Гонконг, стандартан хан", "WART": "Малхбузен Аргентина, стандартан хан", "AEST": "Малхбален Австрали, стандартан хан"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "IST": "Инди", "BT": "Бутан", "OEZ": "Малхбален Европа, стандартан хан", "COST": "Колумби, аьхкенан хан", "NZDT": "Керла Зеланди, аьхкенан хан", "HADT": "Гавайн-алеутийн аьхкенан хан", "MYT": "Малайзи", "SAST": "Къилба Африка", "HKST": "Гонконг, аьхкенан хан", "ADT": "Атлантикан аьхкенан хан", "ART": "Аргентина, стандартан хан", "LHST": "Лорд-Хау, стандартан хан", "PST": "Тийна океанан стандартан хан", "HNCU": "Куба, стандартан хан", "HEPMX": "Тийна океанан Мексикан аьхкенан хан", "HNT": "Ньюфаундленд, стандартан хан", "WITA": "Юккъера Индонези", "HECU": "Куба, аьхкенан хан", "OESZ": "Малхбален Европа, аьхкенан хан", "GYT": "Гайана", "EDT": "Малхбален Америка, аьхкенан хан", "PDT": "Тийна океанан аьхкенан хан", "AEDT": "Малхбален Австрали, аьхкенан хан", "WAT": "Малхбузен Африка, стандартан хан", "AKDT": "Аляска, аьхкенан хан", "GFT": "Французийн Гвиана", "CDT": "Юккъера Америка, аьхкенан хан", "GMT": "Гринвичица юкъара хан", "MEZ": "Юккъера Европа, стандартан хан", "TMT": "Туркменин стандартан хан", "TMST": "Туркменин аьхкенан хан", "ARST": "Аргентина, аьхкенан хан", "HEPM": "Сен-Пьер а, Микелон а, аьхкенан хан", "WARST": "Малхбузен Аргентина, аьхкенан хан", "COT": "Колумби, стандартан хан", "EST": "Малхбален Америка, стандартан хан", "CLT": "Чили, стандартан хан", "MESZ": "Юккъера Европа, аьхкенан хан", "HNEG": "Малхбален Гренланди, стандартан хан", "HKT": "Гонконг, стандартан хан", "HENOMX": "Къилбаседа Американ Мексикан аьхкенан хан", "AWDT": "Малхбузен Австрали, аьхкенан хан", "ACWDT": "Юккъера Австрали, малхбузен аьхкенан хан", "HEEG": "Малхбален Гренланди, аьхкенан хан", "HNPM": "Сен-Пьер а, Микелон а, стандартан хан", "CAT": "Юккъера Африка", "MST": "MST", "ChST": "Чаморро", "SRT": "Суринам", "WIT": "Малхбален Индонези", "LHDT": "Лорд-Хау, аьхкенан хан", "JST": "Япони, стандартан хан", "AEST": "Малхбален Австрали, стандартан хан", "CHAST": "Чатем, стандартан хан", "CHADT": "Чатем, аьхкенан хан", "WEZ": "Малхбузен Европа, стандартан хан", "SGT": "Сингапур", "CLST": "Чили, аьхкенан хан", "EAT": "Малхбален Африка", "AWST": "Малхбузен Австрали, стандартан хан", "HNPMX": "Тийна океанан Мексикан стандартан хан", "WART": "Малхбузен Аргентина, стандартан хан", "NZST": "Керла Зеланди, стандартан хан", "VET": "Венесуэла", "MDT": "MDT", "AST": "Атлантикан стандартан хан", "HAST": "Гавайн-алеутийн стандартан хан", "HNNOMX": "Къилбаседа Американ Мексикан стандартан хан", "UYT": "Уругвай, стандартан хан", "WESZ": "Малхбузен Европа, аьхкенан хан", "HNOG": "Малхбузен Гренланди, стандартан хан", "ECT": "Эквадор", "WIB": "Малхбузен Индонези", "ACST": "Юккъера Австрали, стандартан хан", "ACWST": "Юккъера Австрали, малхбузен стандартан хан", "UYST": "Уругвай, аьхкенан хан", "WAST": "Малхбузен Африка, аьхкенан хан", "HAT": "Ньюфаундленд, аьхкенан хан", "ACDT": "Юккъера Австрали, аьхкенан хан", "JDT": "Япони, аьхкенан хан", "AKST": "Аляска, стандартан хан", "HEOG": "Малхбузен Гренланди, аьхкенан хан", "CST": "Юккъера Америка, стандартан хан", "BOT": "Боливи"}, - } - } -  -diff --git a/ce_RU/ce_RU.go b/ce_RU/ce_RU.go -index fff8f53..df81547 100644 ---- a/ce_RU/ce_RU.go -+++ b/ce_RU/ce_RU.go -@@ -10,59 +10,45 @@ import ( - ) -  - type ce_RU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ce_RU' locale - func New() locales.Translator { - return &ce_RU{ -- locale: "ce_RU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "сен", "окт", "ноя", "дек"}, -- monthsWide: []string{"", "январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"}, -- daysWide: []string{"кӀиранан де", "оршотан де", "шинарин де", "кхаарин де", "еарин де", "пӀераскан де", "шот де"}, -- timezones: map[string]string{"HKT": "Гонконг, стандартан хан", "MESZ": "Юккъера Европа, аьхкенан хан", "CHAST": "Чатем, стандартан хан", "CLST": "Чили, аьхкенан хан", "WARST": "Малхбузен Аргентина, аьхкенан хан", "HADT": "Гавайн-алеутийн аьхкенан хан", "HEOG": "Малхбузен Гренланди, аьхкенан хан", "SAST": "Къилба Африка", "JST": "Япони, стандартан хан", "COST": "Колумби, аьхкенан хан", "HECU": "Куба, аьхкенан хан", "HEPMX": "Тийна океанан Мексикан аьхкенан хан", "WIT": "Малхбален Индонези", "PDT": "Тийна океанан аьхкенан хан", "AWST": "Малхбузен Австрали, стандартан хан", "HNOG": "Малхбузен Гренланди, стандартан хан", "AEST": "Малхбален Австрали, стандартан хан", "HEPM": "Сен-Пьер а, Микелон а, аьхкенан хан", "CHADT": "Чатем, аьхкенан хан", "HNEG": "Малхбален Гренланди, стандартан хан", "CAT": "Юккъера Африка", "OEZ": "Малхбален Европа, стандартан хан", "COT": "Колумби, стандартан хан", "HNPMX": "Тийна океанан Мексикан стандартан хан", "AST": "Атлантикан стандартан хан", "AKDT": "Аляска, аьхкенан хан", "WIB": "Малхбузен Индонези", "VET": "Венесуэла", "SRT": "Суринам", "PST": "Тийна океанан стандартан хан", "HNCU": "Куба, стандартан хан", "MEZ": "Юккъера Европа, стандартан хан", "∅∅∅": "Амазонка, аьхкенан хан", "ChST": "Чаморро", "HAT": "Ньюфаундленд, аьхкенан хан", "LHST": "Лорд-Хау, стандартан хан", "HENOMX": "Къилбаседа Американ Мексикан аьхкенан хан", "UYT": "Уругвай, стандартан хан", "IST": "Инди", "HNT": "Ньюфаундленд, стандартан хан", "HKST": "Гонконг, аьхкенан хан", "WAST": "Малхбузен Африка, аьхкенан хан", "GMT": "Гринвичица юкъара хан", "UYST": "Уругвай, аьхкенан хан", "HAST": "Гавайн-алеутийн стандартан хан", "ARST": "Аргентина, аьхкенан хан", "WITA": "Юккъера Индонези", "JDT": "Япони, аьхкенан хан", "TMT": "Туркменин стандартан хан", "MST": "MST", "BT": "Бутан", "ACWDT": "Юккъера Австрали, малхбузен аьхкенан хан", "AEDT": "Малхбален Австрали, аьхкенан хан", "HNPM": "Сен-Пьер а, Микелон а, стандартан хан", "EDT": "Малхбален Америка, аьхкенан хан", "GYT": "Гайана", "AKST": "Аляска, стандартан хан", "ACWST": "Юккъера Австрали, малхбузен стандартан хан", "AWDT": "Малхбузен Австрали, аьхкенан хан", "LHDT": "Лорд-Хау, аьхкенан хан", "NZST": "Керла Зеланди, стандартан хан", "HEEG": "Малхбален Гренланди, аьхкенан хан", "GFT": "Французийн Гвиана", "MYT": "Малайзи", "ART": "Аргентина, стандартан хан", "HNNOMX": "Къилбаседа Американ Мексикан стандартан хан", "CLT": "Чили, стандартан хан", "ACDT": "Юккъера Австрали, аьхкенан хан", "EAT": "Малхбален Африка", "SGT": "Сингапур", "ADT": "Атлантикан аьхкенан хан", "TMST": "Туркменин аьхкенан хан", "BOT": "Боливи", "ECT": "Эквадор", "WAT": "Малхбузен Африка, стандартан хан", "OESZ": "Малхбален Европа, аьхкенан хан", "EST": "Малхбален Америка, стандартан хан", "WEZ": "Малхбузен Европа, стандартан хан", "WESZ": "Малхбузен Европа, аьхкенан хан", "NZDT": "Керла Зеланди, аьхкенан хан", "ACST": "Юккъера Австрали, стандартан хан", "WART": "Малхбузен Аргентина, стандартан хан", "MDT": "MDT", "CST": "Юккъера Америка, стандартан хан", "CDT": "Юккъера Америка, аьхкенан хан"}, -+ locale: "ce_RU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "ADT": "ADT", "BOT": "BOT", "HENOMX": "HENOMX", "MYT": "MYT", "AEDT": "AEDT", "WITA": "WITA", "MST": "MST", "WEZ": "WEZ", "CHAST": "CHAST", "HEPMX": "HEPMX", "WIB": "WIB", "AWDT": "AWDT", "TMST": "TMST", "NZDT": "NZDT", "CST": "CST", "ACST": "ACST", "CHADT": "CHADT", "HNT": "HNT", "HNOG": "HNOG", "EST": "EST", "TMT": "TMT", "HEEG": "HEEG", "LHST": "LHST", "JST": "JST", "AEST": "AEST", "WESZ": "WESZ", "AKST": "AKST", "SAST": "SAST", "PST": "PST", "ACWST": "ACWST", "IST": "IST", "WAT": "WAT", "OESZ": "OESZ", "ARST": "ARST", "JDT": "JDT", "UYT": "UYT", "GFT": "GFT", "HAT": "HAT", "HKST": "HKST", "LHDT": "LHDT", "NZST": "NZST", "AST": "AST", "HAST": "HAST", "EAT": "EAT", "HNPMX": "HNPMX", "COST": "COST", "HKT": "HKT", "ChST": "ChST", "ART": "ART", "MEZ": "MEZ", "BT": "BT", "CLT": "CLT", "CDT": "CDT", "HEOG": "HEOG", "CAT": "CAT", "ECT": "ECT", "HEPM": "HEPM", "UYST": "UYST", "GYT": "GYT", "COT": "COT", "ACWDT": "ACWDT", "WIT": "WIT", "SRT": "SRT", "WARST": "WARST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "VET": "VET", "WAST": "WAST", "WART": "WART", "HNPM": "HNPM", "SGT": "SGT", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "CLST": "CLST", "MDT": "MDT", "HADT": "HADT", "ACDT": "ACDT", "MESZ": "MESZ", "PDT": "PDT", "AKDT": "AKDT", "EDT": "EDT", "HNCU": "HNCU", "AWST": "AWST", "HECU": "HECU"}, - } - } -  -@@ -115,7 +101,7 @@ func (ce *ce_RU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ce *ce_RU) MonthsAbbreviated() []string { -- return ce.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +121,7 @@ func (ce *ce_RU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ce *ce_RU) MonthsWide() []string { -- return ce.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -181,75 +167,13 @@ func (ce *ce_RU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ce_RU' and handles both Whole and Real numbers based on 'v' - func (ce *ce_RU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ce.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ce.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ce.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ce_RU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ce *ce_RU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ce.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ce.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ce.percentSuffix...) -- -- b = append(b, ce.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ce_RU' -@@ -257,56 +181,7 @@ func (ce *ce_RU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ce.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ce.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ce.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ce.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ce.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ce.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ce_RU' -@@ -315,63 +190,7 @@ func (ce *ce_RU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ce.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ce.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ce.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ce.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ce.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ce.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ce.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ce_RU' -diff --git a/cgg/cgg.go b/cgg/cgg.go -index 061c9d0..96ee614 100644 ---- a/cgg/cgg.go -+++ b/cgg/cgg.go -@@ -57,7 +57,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kurisito Atakaijire", "Kurisito Yaijire"}, -- timezones: map[string]string{"HKST": "HKST", "LHDT": "LHDT", "JDT": "JDT", "COT": "COT", "ART": "ART", "ChST": "ChST", "TMT": "TMT", "WIB": "WIB", "MYT": "MYT", "ACWDT": "ACWDT", "WAT": "WAT", "COST": "COST", "HENOMX": "HENOMX", "HNCU": "HNCU", "GFT": "GFT", "CAT": "CAT", "HECU": "HECU", "HNT": "HNT", "HEOG": "HEOG", "AEDT": "AEDT", "HKT": "HKT", "WITA": "WITA", "BT": "BT", "HNOG": "HNOG", "CLST": "CLST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HAST": "HAST", "AEST": "AEST", "ACDT": "ACDT", "EAT": "EAT", "WAST": "WAST", "AKST": "AKST", "AKDT": "AKDT", "CST": "CST", "WEZ": "WEZ", "ACWST": "ACWST", "CHAST": "CHAST", "BOT": "BOT", "UYT": "UYT", "MESZ": "MESZ", "SAST": "SAST", "ACST": "ACST", "ECT": "ECT", "MDT": "MDT", "WIT": "WIT", "∅∅∅": "∅∅∅", "TMST": "TMST", "GMT": "GMT", "PDT": "PDT", "HAT": "HAT", "EDT": "EDT", "MST": "MST", "ADT": "ADT", "SRT": "SRT", "HNEG": "HNEG", "OEZ": "OEZ", "PST": "PST", "NZST": "NZST", "IST": "IST", "JST": "JST", "EST": "EST", "VET": "VET", "NZDT": "NZDT", "WART": "WART", "WARST": "WARST", "SGT": "SGT", "OESZ": "OESZ", "HEPMX": "HEPMX", "AST": "AST", "AWST": "AWST", "AWDT": "AWDT", "MEZ": "MEZ", "LHST": "LHST", "CLT": "CLT", "HADT": "HADT", "CDT": "CDT", "HNPMX": "HNPMX", "UYST": "UYST", "GYT": "GYT", "WESZ": "WESZ", "ARST": "ARST", "HNPM": "HNPM", "HEPM": "HEPM", "CHADT": "CHADT"}, -+ timezones: map[string]string{"IST": "IST", "CHADT": "CHADT", "TMT": "TMT", "CLT": "CLT", "∅∅∅": "∅∅∅", "HAST": "HAST", "HNEG": "HNEG", "HEPM": "HEPM", "WESZ": "WESZ", "AKDT": "AKDT", "WIT": "WIT", "GYT": "GYT", "EDT": "EDT", "BOT": "BOT", "ACDT": "ACDT", "WAT": "WAT", "HNT": "HNT", "UYT": "UYT", "AKST": "AKST", "HKST": "HKST", "TMST": "TMST", "CAT": "CAT", "MDT": "MDT", "MYT": "MYT", "PST": "PST", "HNOG": "HNOG", "NZDT": "NZDT", "ECT": "ECT", "MESZ": "MESZ", "AEDT": "AEDT", "CLST": "CLST", "ACST": "ACST", "JDT": "JDT", "WEZ": "WEZ", "AEST": "AEST", "UYST": "UYST", "SGT": "SGT", "WAST": "WAST", "WART": "WART", "COT": "COT", "OESZ": "OESZ", "HKT": "HKT", "MST": "MST", "ART": "ART", "SRT": "SRT", "LHST": "LHST", "HNPMX": "HNPMX", "ARST": "ARST", "LHDT": "LHDT", "HNPM": "HNPM", "HECU": "HECU", "CST": "CST", "HENOMX": "HENOMX", "BT": "BT", "ACWDT": "ACWDT", "HEOG": "HEOG", "JST": "JST", "EST": "EST", "ChST": "ChST", "HADT": "HADT", "MEZ": "MEZ", "AWST": "AWST", "AWDT": "AWDT", "WITA": "WITA", "NZST": "NZST", "AST": "AST", "CDT": "CDT", "OEZ": "OEZ", "GFT": "GFT", "SAST": "SAST", "COST": "COST", "HEPMX": "HEPMX", "HAT": "HAT", "WIB": "WIB", "ADT": "ADT", "HEEG": "HEEG", "PDT": "PDT", "CHAST": "CHAST", "HNCU": "HNCU", "GMT": "GMT", "EAT": "EAT", "HNNOMX": "HNNOMX", "VET": "VET", "WARST": "WARST", "ACWST": "ACWST"}, - } - } -  -diff --git a/cgg_UG/cgg_UG.go b/cgg_UG/cgg_UG.go -index 420d68a..75cac80 100644 ---- a/cgg_UG/cgg_UG.go -+++ b/cgg_UG/cgg_UG.go -@@ -42,22 +42,13 @@ type cgg_UG struct { - // New returns a new instance of translator for the 'cgg_UG' locale - func New() locales.Translator { - return &cgg_UG{ -- locale: "cgg_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "KBZ", "KBR", "KST", "KKN", "KTN", "KMK", "KMS", "KMN", "KMW", "KKM", "KNK", "KNB"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Okwokubanza", "Okwakabiri", "Okwakashatu", "Okwakana", "Okwakataana", "Okwamukaaga", "Okwamushanju", "Okwamunaana", "Okwamwenda", "Okwaikumi", "Okwaikumi na kumwe", "Okwaikumi na ibiri"}, -- daysAbbreviated: []string{"SAN", "ORK", "OKB", "OKS", "OKN", "OKT", "OMK"}, -- daysNarrow: []string{"S", "K", "R", "S", "N", "T", "M"}, -- daysWide: []string{"Sande", "Orwokubanza", "Orwakabiri", "Orwakashatu", "Orwakana", "Orwakataano", "Orwamukaaga"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kurisito Atakaijire", "Kurisito Yaijire"}, -- timezones: map[string]string{"MST": "MST", "AKST": "AKST", "SRT": "SRT", "COT": "COT", "SGT": "SGT", "ACDT": "ACDT", "HNPMX": "HNPMX", "AEDT": "AEDT", "GFT": "GFT", "ART": "ART", "HEPMX": "HEPMX", "ACWDT": "ACWDT", "TMST": "TMST", "OESZ": "OESZ", "WART": "WART", "UYST": "UYST", "HNT": "HNT", "HEOG": "HEOG", "CHADT": "CHADT", "CLST": "CLST", "JDT": "JDT", "ACST": "ACST", "WAT": "WAT", "WARST": "WARST", "GMT": "GMT", "EST": "EST", "MESZ": "MESZ", "SAST": "SAST", "HEPM": "HEPM", "IST": "IST", "WAST": "WAST", "HNCU": "HNCU", "AST": "AST", "AWST": "AWST", "HNPM": "HNPM", "TMT": "TMT", "HKT": "HKT", "BOT": "BOT", "UYT": "UYT", "LHST": "LHST", "CLT": "CLT", "VET": "VET", "HAST": "HAST", "ECT": "ECT", "HENOMX": "HENOMX", "COST": "COST", "HECU": "HECU", "MDT": "MDT", "CDT": "CDT", "ADT": "ADT", "GYT": "GYT", "JST": "JST", "CAT": "CAT", "HNOG": "HNOG", "WEZ": "WEZ", "HAT": "HAT", "NZDT": "NZDT", "∅∅∅": "∅∅∅", "EAT": "EAT", "MYT": "MYT", "PDT": "PDT", "AEST": "AEST", "LHDT": "LHDT", "HEEG": "HEEG", "BT": "BT", "HKST": "HKST", "NZST": "NZST", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "CHAST": "CHAST", "HNEG": "HNEG", "EDT": "EDT", "AKDT": "AKDT", "WIB": "WIB", "WIT": "WIT", "AWDT": "AWDT", "WITA": "WITA", "PST": "PST", "MEZ": "MEZ", "ChST": "ChST", "HADT": "HADT", "ACWST": "ACWST", "ARST": "ARST", "OEZ": "OEZ", "CST": "CST"}, -+ locale: "cgg_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "HADT": "HADT", "WIB": "WIB", "ART": "ART", "ADT": "ADT", "CHAST": "CHAST", "HEOG": "HEOG", "MST": "MST", "MEZ": "MEZ", "AEDT": "AEDT", "ACDT": "ACDT", "HNPM": "HNPM", "HEPM": "HEPM", "CHADT": "CHADT", "HECU": "HECU", "WITA": "WITA", "AST": "AST", "HAST": "HAST", "CAT": "CAT", "CLT": "CLT", "AKDT": "AKDT", "WART": "WART", "COT": "COT", "∅∅∅": "∅∅∅", "GYT": "GYT", "ECT": "ECT", "CDT": "CDT", "HEEG": "HEEG", "MDT": "MDT", "EDT": "EDT", "HKST": "HKST", "LHDT": "LHDT", "HNT": "HNT", "HAT": "HAT", "WAT": "WAT", "WARST": "WARST", "TMST": "TMST", "ARST": "ARST", "AWST": "AWST", "WEZ": "WEZ", "UYT": "UYT", "OESZ": "OESZ", "GFT": "GFT", "WIT": "WIT", "NZST": "NZST", "CST": "CST", "JDT": "JDT", "HEPMX": "HEPMX", "WAST": "WAST", "OEZ": "OEZ", "HNEG": "HNEG", "UYST": "UYST", "PST": "PST", "SGT": "SGT", "COST": "COST", "EAT": "EAT", "HENOMX": "HENOMX", "MESZ": "MESZ", "ACWST": "ACWST", "CLST": "CLST", "LHST": "LHST", "BT": "BT", "HNPMX": "HNPMX", "PDT": "PDT", "HNOG": "HNOG", "EST": "EST", "SRT": "SRT", "ACST": "ACST", "JST": "JST", "HKT": "HKT", "NZDT": "NZDT", "AEST": "AEST", "TMT": "TMT", "VET": "VET", "HNCU": "HNCU", "ChST": "ChST", "AWDT": "AWDT", "IST": "IST", "ACWDT": "ACWDT", "WESZ": "WESZ", "AKST": "AKST", "SAST": "SAST", "BOT": "BOT", "HNNOMX": "HNNOMX", "MYT": "MYT"}, - } - } -  -@@ -110,7 +101,7 @@ func (cgg *cgg_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (cgg *cgg_UG) MonthsAbbreviated() []string { -- return cgg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -120,7 +111,7 @@ func (cgg *cgg_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (cgg *cgg_UG) MonthsNarrow() []string { -- return cgg.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -130,7 +121,7 @@ func (cgg *cgg_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (cgg *cgg_UG) MonthsWide() []string { -- return cgg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,56 +181,7 @@ func (cgg *cgg_UG) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cgg.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cgg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, cgg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, cgg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cgg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cgg_UG' -@@ -248,64 +190,7 @@ func (cgg *cgg_UG) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cgg.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cgg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, cgg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, cgg.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cgg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'cgg_UG' -@@ -313,27 +198,6 @@ func (cgg *cgg_UG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -342,17 +206,6 @@ func (cgg *cgg_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cgg.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -361,17 +214,6 @@ func (cgg *cgg_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cgg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -380,19 +222,6 @@ func (cgg *cgg_UG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, cgg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cgg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -401,19 +230,6 @@ func (cgg *cgg_UG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -422,26 +238,6 @@ func (cgg *cgg_UG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -450,30 +246,6 @@ func (cgg *cgg_UG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -482,34 +254,5 @@ func (cgg *cgg_UG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cgg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := cgg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/chr/chr.go b/chr/chr.go -index ed3a3d6..8ac7ef7 100644 ---- a/chr/chr.go -+++ b/chr/chr.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ᏧᏓᎷᎸ ᎤᎷᎯᏍᏗ ᎦᎶᏁᏛ", "ᎠᏃ ᏙᎻᏂ"}, -- timezones: map[string]string{"PDT": "ᏭᏕᎵᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "MEZ": "ᎠᏰᏟ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MESZ": "ᎠᏰᏟ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "EAT": "ᏗᎧᎸᎬ ᎬᎿᎨᏍᏛ ᎠᏟᎢᎵᏒ", "CST": "ᎠᏰᏟ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "UYST": "ᏳᎷᏇ ᎪᎩ ᎠᏟᎢᎵᏒ", "WIB": "ᏭᏕᎵᎬ ᏗᏜ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "IST": "ᎢᏂᏗᎢᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HENOMX": "ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "UYT": "ᏳᎷᏇ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HKST": "ᎰᏂᎩ ᎪᏂᎩ ᎪᎩ ᎠᏟᎢᎵᏒ", "WEZ": "ᏭᏕᎵᎬ ᏗᏜ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ACWDT": "ᎠᏰᏟ ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "NZST": "ᎢᏤ ᏏᎢᎴᏂᏗ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MST": "ᎣᏓᎸ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HAT": "ᎢᏤᎤᏂᏩᏛᏓᎦᏙᎯ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "HEOG": "ᏭᏕᎵᎬ ᎢᏤᏍᏛᏱ ᎪᎩ ᎠᏟᎢᎵᏒ", "NZDT": "ᎢᏤ ᏏᎢᎴᏂᏗ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "CLST": "ᏥᎵ ᎪᎩ ᎠᏟᎢᎵᏒ", "JDT": "ᏣᏩᏂᏏ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "CAT": "ᎠᏰᏟ ᎬᎿᎨᏍᏛ ᎠᏟᎢᎵᏒ", "WAST": "ᏭᏕᎵᎬ ᎬᎿᎨᏍᏛ ᎪᎩ ᎠᏟᎢᎵᏒ", "SRT": "ᏒᎵᎾᎻ ᎠᏟᎢᎵᏒ", "VET": "ᏪᏁᏑᏪᎳ ᎠᏟᎢᎵᏒ", "ChST": "ᏣᎼᎶ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HEEG": "ᏗᎧᎸᎬ ᎢᏤᏍᏛᏱ ᎪᎩ ᎠᏟᎢᎵᏒ", "TMT": "ᏛᎵᎩᎺᏂᏍᏔᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HAST": "ᎭᏩᏱ-ᎠᎵᏳᏏᎠᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HEPMX": "ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "HNOG": "ᏭᏕᎵᎬ ᎢᏤᏍᏛᏱ ᎠᏟᎶᏍᏗ ᎠᎵᎢᎵᏒ", "HNPM": "ᎤᏓᏅᏘ ᏈᏰ ᎠᎴ ᎻᏇᎶᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "SAST": "ᏧᎦᎾᏮ ᎬᎿᎨᏍᏛ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CLT": "ᏥᎵ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "∅∅∅": "ᎠᎺᏌᏂ ᎪᎩ ᎠᏟᎢᎵᏒ", "HNEG": "ᏗᎧᎸᎬ ᎢᏤᏍᏛᏱ ᎠᏟᎶᏍᏗ ᎠᎵᎢᎵᏒ", "AST": "ᏗᎧᎸᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WIT": "ᏗᎧᎸᎬ ᏗᏜ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "WART": "ᏭᏕᎵᎬ ᏗᏜ ᎠᏥᏂᏘᏂᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "COST": "ᎪᎸᎻᏈᎢᎠ ᎪᎩ ᎠᏟᎢᎵᏒ", "GMT": "ᎢᏤ ᎢᏳᏍᏗ ᎠᏟᎢᎵᏒ", "ADT": "ᏗᎧᎸᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "WITA": "ᎠᏰᏟ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "AWDT": "ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "HEPM": "ᎤᏓᏅᏘ ᏈᏰ ᎠᎴ ᎻᏇᎶᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "CHADT": "ᏣᏝᎻ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "JST": "ᏣᏩᏂᏏ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "TMST": "ᏛᎵᎩᎺᏂᏍᏔᏂ ᎪᎩ ᎠᏟᎢᎵᏒ", "ACST": "ᎠᏰᏟ ᎡᎳᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CDT": "ᎠᏰᏟ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "HNT": "ᎢᏤᎤᏂᏩᏛᏓᎦᏙᎯ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "GYT": "ᎦᏯᎾ ᎠᏟᎢᎵᏒ", "BOT": "ᏉᎵᏫᎠ ᎠᏟᎢᎵᏒ", "GFT": "ᎠᏂᎦᎸ ᏈᏯᎾ ᎠᏟᎢᎵᏒ", "OEZ": "ᏗᎧᎸᎬ ᏗᏜ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HECU": "ᎫᏆ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "HNPMX": "ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HADT": "ᎭᏩᏱ-ᎠᎵᏳᏏᎠᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "EST": "ᏗᎧᎸᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "PST": "ᏭᏕᎵᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CHAST": "ᏣᏝᎻ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ACDT": "ᎠᏰᏟ ᎡᎳᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "HNCU": "ᎫᏆ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WESZ": "ᏭᏕᎵᎬ ᏗᏜ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "LHST": "ᎤᎬᏫᏳᎯ ᎭᏫ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "SGT": "ᏏᏂᎦᏉᎵ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "EDT": "ᏗᎧᎸᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "AEDT": "ᎡᎳᏗᏜ ᏗᎧᎸᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "WAT": "ᏭᏕᎵᎬ ᎬᎿᎨᏍᏛ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "COT": "ᎪᎸᎻᏈᎢᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNNOMX": "ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MYT": "ᎹᎴᏏᎢᎠ ᎠᏟᎢᎵᏒ", "MDT": "ᎣᏓᎸ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "AWST": "ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "LHDT": "ᎤᎬᏫᏳᎯ ᎭᏫ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "AKDT": "ᎠᎳᏍᎦ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "ARST": "ᎠᏥᏂᏘᏂᎠ ᎪᎩ ᎠᏟᎢᎵᏒ", "ACWST": "ᎠᏰᏟ ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ART": "ᎠᏥᏂᏘᏂᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AEST": "ᎡᎳᏗᏜ ᏗᎧᎸᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HKT": "ᎰᏂᎩ ᎪᏂᎩ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "OESZ": "ᏗᎧᎸᎬ ᏗᏜ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "ECT": "ᎡᏆᏙᎵ ᎠᏟᎢᎵᏒ", "WARST": "ᏭᏕᎵᎬ ᏗᏜ ᎠᏥᏂᏘᏂᎠ ᎪᎩ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "BT": "ᏊᏔᏂ ᎠᏟᎢᎵᏒ", "AKST": "ᎠᎳᏍᎦ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ"}, -+ timezones: map[string]string{"COT": "ᎪᎸᎻᏈᎢᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "NZST": "ᎢᏤ ᏏᎢᎴᏂᏗ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MYT": "ᎹᎴᏏᎢᎠ ᎠᏟᎢᎵᏒ", "HEPM": "ᎤᏓᏅᏘ ᏈᏰ ᎠᎴ ᎻᏇᎶᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "ACWDT": "ᎠᏰᏟ ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "WESZ": "ᏭᏕᎵᎬ ᏗᏜ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "SGT": "ᏏᏂᎦᏉᎵ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ART": "ᎠᏥᏂᏘᏂᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "BOT": "ᏉᎵᏫᎠ ᎠᏟᎢᎵᏒ", "ACDT": "ᎠᏰᏟ ᎡᎳᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "SAST": "ᏧᎦᎾᏮ ᎬᎿᎨᏍᏛ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "NZDT": "ᎢᏤ ᏏᎢᎴᏂᏗ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "ECT": "ᎡᏆᏙᎵ ᎠᏟᎢᎵᏒ", "EAT": "ᏗᎧᎸᎬ ᎬᎿᎨᏍᏛ ᎠᏟᎢᎵᏒ", "HNPM": "ᎤᏓᏅᏘ ᏈᏰ ᎠᎴ ᎻᏇᎶᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "JST": "ᏣᏩᏂᏏ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "JDT": "ᏣᏩᏂᏏ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "MESZ": "ᎠᏰᏟ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "HNNOMX": "ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "LHDT": "ᎤᎬᏫᏳᎯ ᎭᏫ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "HNT": "ᎢᏤᎤᏂᏩᏛᏓᎦᏙᎯ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CDT": "ᎠᏰᏟ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "HADT": "ᎭᏩᏱ-ᎠᎵᏳᏏᎠᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "ACST": "ᎠᏰᏟ ᎡᎳᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNCU": "ᎫᏆ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "OESZ": "ᏗᎧᎸᎬ ᏗᏜ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "HEOG": "ᏭᏕᎵᎬ ᎢᏤᏍᏛᏱ ᎪᎩ ᎠᏟᎢᎵᏒ", "ADT": "ᏗᎧᎸᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "IST": "ᎢᏂᏗᎢᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "PDT": "ᏭᏕᎵᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "WART": "ᏭᏕᎵᎬ ᏗᏜ ᎠᏥᏂᏘᏂᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HKT": "ᎰᏂᎩ ᎪᏂᎩ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CLST": "ᏥᎵ ᎪᎩ ᎠᏟᎢᎵᏒ", "PST": "ᏭᏕᎵᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WAST": "ᏭᏕᎵᎬ ᎬᎿᎨᏍᏛ ᎪᎩ ᎠᏟᎢᎵᏒ", "OEZ": "ᏗᎧᎸᎬ ᏗᏜ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WEZ": "ᏭᏕᎵᎬ ᏗᏜ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ARST": "ᎠᏥᏂᏘᏂᎠ ᎪᎩ ᎠᏟᎢᎵᏒ", "HAST": "ᎭᏩᏱ-ᎠᎵᏳᏏᎠᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HENOMX": "ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "AST": "ᏗᎧᎸᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HEEG": "ᏗᎧᎸᎬ ᎢᏤᏍᏛᏱ ᎪᎩ ᎠᏟᎢᎵᏒ", "∅∅∅": "∅∅∅", "HECU": "ᎫᏆ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "WAT": "ᏭᏕᎵᎬ ᎬᎿᎨᏍᏛ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AKDT": "ᎠᎳᏍᎦ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "GFT": "ᎠᏂᎦᎸ ᏈᏯᎾ ᎠᏟᎢᎵᏒ", "WARST": "ᏭᏕᎵᎬ ᏗᏜ ᎠᏥᏂᏘᏂᎠ ᎪᎩ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MDT": "MDT", "LHST": "ᎤᎬᏫᏳᎯ ᎭᏫ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CHAST": "ᏣᏝᎻ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNOG": "ᏭᏕᎵᎬ ᎢᏤᏍᏛᏱ ᎠᏟᎶᏍᏗ ᎠᎵᎢᎵᏒ", "EST": "ᏗᎧᎸᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "TMST": "ᏛᎵᎩᎺᏂᏍᏔᏂ ᎪᎩ ᎠᏟᎢᎵᏒ", "UYST": "ᏳᎷᏇ ᎪᎩ ᎠᏟᎢᎵᏒ", "ACWST": "ᎠᏰᏟ ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HAT": "ᎢᏤᎤᏂᏩᏛᏓᎦᏙᎯ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "GYT": "ᎦᏯᎾ ᎠᏟᎢᎵᏒ", "EDT": "ᏗᎧᎸᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "GMT": "ᎢᏤ ᎢᏳᏍᏗ ᎠᏟᎢᎵᏒ", "AWDT": "ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "CHADT": "ᏣᏝᎻ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "CAT": "ᎠᏰᏟ ᎬᎿᎨᏍᏛ ᎠᏟᎢᎵᏒ", "HKST": "ᎰᏂᎩ ᎪᏂᎩ ᎪᎩ ᎠᏟᎢᎵᏒ", "CLT": "ᏥᎵ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "SRT": "ᏒᎵᎾᎻ ᎠᏟᎢᎵᏒ", "AEST": "ᎡᎳᏗᏜ ᏗᎧᎸᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AKST": "ᎠᎳᏍᎦ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNPMX": "ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CST": "ᎠᏰᏟ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WIB": "ᏭᏕᎵᎬ ᏗᏜ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "HNEG": "ᏗᎧᎸᎬ ᎢᏤᏍᏛᏱ ᎠᏟᎶᏍᏗ ᎠᎵᎢᎵᏒ", "AEDT": "ᎡᎳᏗᏜ ᏗᎧᎸᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "HEPMX": "ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "WIT": "ᏗᎧᎸᎬ ᏗᏜ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "COST": "ᎪᎸᎻᏈᎢᎠ ᎪᎩ ᎠᏟᎢᎵᏒ", "TMT": "ᏛᎵᎩᎺᏂᏍᏔᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ChST": "ᏣᎼᎶ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AWST": "ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "BT": "ᏊᏔᏂ ᎠᏟᎢᎵᏒ", "WITA": "ᎠᏰᏟ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "MST": "MST", "UYT": "ᏳᎷᏇ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "VET": "ᏪᏁᏑᏪᎳ ᎠᏟᎢᎵᏒ", "MEZ": "ᎠᏰᏟ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ"}, - } - } -  -diff --git a/chr_US/chr_US.go b/chr_US/chr_US.go -index 9540719..1ceefac 100644 ---- a/chr_US/chr_US.go -+++ b/chr_US/chr_US.go -@@ -10,68 +10,45 @@ import ( - ) -  - type chr_US struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'chr_US' locale - func New() locales.Translator { - return &chr_US{ -- locale: "chr_US", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ᎤᏃ", "ᎧᎦ", "ᎠᏅ", "ᎧᏬ", "ᎠᏂ", "ᏕᎭ", "ᎫᏰ", "ᎦᎶ", "ᏚᎵ", "ᏚᏂ", "ᏅᏓ", "ᎥᏍ"}, -- monthsNarrow: []string{"", "Ꭴ", "Ꭷ", "Ꭰ", "Ꭷ", "Ꭰ", "Ꮥ", "Ꭻ", "Ꭶ", "Ꮪ", "Ꮪ", "Ꮕ", "Ꭵ"}, -- monthsWide: []string{"", "ᎤᏃᎸᏔᏅ", "ᎧᎦᎵ", "ᎠᏅᏱ", "ᎧᏬᏂ", "ᎠᏂᏍᎬᏘ", "ᏕᎭᎷᏱ", "ᎫᏰᏉᏂ", "ᎦᎶᏂ", "ᏚᎵᏍᏗ", "ᏚᏂᏅᏗ", "ᏅᏓᏕᏆ", "ᎥᏍᎩᏱ"}, -- daysAbbreviated: []string{"ᏆᏍᎬ", "ᏉᏅᎯ", "ᏔᎵᏁ", "ᏦᎢᏁ", "ᏅᎩᏁ", "ᏧᎾᎩ", "ᏈᏕᎾ"}, -- daysNarrow: []string{"Ꮖ", "Ꮙ", "Ꮤ", "Ꮶ", "Ꮕ", "Ꮷ", "Ꭴ"}, -- daysShort: []string{"ᏍᎬ", "ᏅᎯ", "ᏔᎵ", "ᏦᎢ", "ᏅᎩ", "ᏧᎾ", "ᏕᎾ"}, -- daysWide: []string{"ᎤᎾᏙᏓᏆᏍᎬ", "ᎤᎾᏙᏓᏉᏅᎯ", "ᏔᎵᏁᎢᎦ", "ᏦᎢᏁᎢᎦ", "ᏅᎩᏁᎢᎦ", "ᏧᎾᎩᎶᏍᏗ", "ᎤᎾᏙᏓᏈᏕᎾ"}, -- periodsAbbreviated: []string{"ᏌᎾᎴ", "ᏒᎯᏱᎢᏗᏢ"}, -- periodsNarrow: []string{"Ꮜ", "Ꮢ"}, -- periodsWide: []string{"ᏌᎾᎴ", "ᏒᎯᏱᎢᏗᏢ"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ᏧᏓᎷᎸ ᎤᎷᎯᏍᏗ ᎦᎶᏁᏛ", "ᎠᏃ ᏙᎻᏂ"}, -- timezones: map[string]string{"PST": "ᏭᏕᎵᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "PDT": "ᏭᏕᎵᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "AWDT": "ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "LHST": "ᎤᎬᏫᏳᎯ ᎭᏫ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "OESZ": "ᏗᎧᎸᎬ ᏗᏜ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "COST": "ᎪᎸᎻᏈᎢᎠ ᎪᎩ ᎠᏟᎢᎵᏒ", "GYT": "ᎦᏯᎾ ᎠᏟᎢᎵᏒ", "HEOG": "ᏭᏕᎵᎬ ᎢᏤᏍᏛᏱ ᎪᎩ ᎠᏟᎢᎵᏒ", "CHADT": "ᏣᏝᎻ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "WART": "ᏭᏕᎵᎬ ᏗᏜ ᎠᏥᏂᏘᏂᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNPMX": "ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HEPMX": "ᎠᏂᏍᏆᏂ ᏭᏕᎵᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "UYST": "ᏳᎷᏇ ᎪᎩ ᎠᏟᎢᎵᏒ", "JDT": "ᏣᏩᏂᏏ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "ECT": "ᎡᏆᏙᎵ ᎠᏟᎢᎵᏒ", "CDT": "ᎠᏰᏟ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "MEZ": "ᎠᏰᏟ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HEPM": "ᎤᏓᏅᏘ ᏈᏰ ᎠᎴ ᎻᏇᎶᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "HNOG": "ᏭᏕᎵᎬ ᎢᏤᏍᏛᏱ ᎠᏟᎶᏍᏗ ᎠᎵᎢᎵᏒ", "WEZ": "ᏭᏕᎵᎬ ᏗᏜ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ARST": "ᎠᏥᏂᏘᏂᎠ ᎪᎩ ᎠᏟᎢᎵᏒ", "AEDT": "ᎡᎳᏗᏜ ᏗᎧᎸᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "NZST": "ᎢᏤ ᏏᎢᎴᏂᏗ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "GFT": "ᎠᏂᎦᎸ ᏈᏯᎾ ᎠᏟᎢᎵᏒ", "WAT": "ᏭᏕᎵᎬ ᎬᎿᎨᏍᏛ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNNOMX": "ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WESZ": "ᏭᏕᎵᎬ ᏗᏜ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "HEEG": "ᏗᎧᎸᎬ ᎢᏤᏍᏛᏱ ᎪᎩ ᎠᏟᎢᎵᏒ", "COT": "ᎪᎸᎻᏈᎢᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WIT": "ᏗᎧᎸᎬ ᏗᏜ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "MDT": "MDT", "MYT": "ᎹᎴᏏᎢᎠ ᎠᏟᎢᎵᏒ", "HADT": "ᎭᏩᏱ-ᎠᎵᏳᏏᎠᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "TMST": "ᏛᎵᎩᎺᏂᏍᏔᏂ ᎪᎩ ᎠᏟᎢᎵᏒ", "SGT": "ᏏᏂᎦᏉᎵ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "VET": "ᏪᏁᏑᏪᎳ ᎠᏟᎢᎵᏒ", "HKST": "ᎰᏂᎩ ᎪᏂᎩ ᎪᎩ ᎠᏟᎢᎵᏒ", "HAT": "ᎢᏤᎤᏂᏩᏛᏓᎦᏙᎯ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "ACST": "ᎠᏰᏟ ᎡᎳᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ACDT": "ᎠᏰᏟ ᎡᎳᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "EDT": "ᏗᎧᎸᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "ADT": "ᏗᎧᎸᎬ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "HAST": "ᎭᏩᏱ-ᎠᎵᏳᏏᎠᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HKT": "ᎰᏂᎩ ᎪᏂᎩ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CHAST": "ᏣᏝᎻ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "SAST": "ᏧᎦᎾᏮ ᎬᎿᎨᏍᏛ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CAT": "ᎠᏰᏟ ᎬᎿᎨᏍᏛ ᎠᏟᎢᎵᏒ", "WARST": "ᏭᏕᎵᎬ ᏗᏜ ᎠᏥᏂᏘᏂᎠ ᎪᎩ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MST": "MST", "UYT": "ᏳᎷᏇ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ACWDT": "ᎠᏰᏟ ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "∅∅∅": "ᎠᎺᏌᏂ ᎪᎩ ᎠᏟᎢᎵᏒ", "ChST": "ᏣᎼᎶ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AKST": "ᎠᎳᏍᎦ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AST": "ᏗᎧᎸᎬ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "NZDT": "ᎢᏤ ᏏᎢᎴᏂᏗ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "IST": "ᎢᏂᏗᎢᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "JST": "ᏣᏩᏂᏏ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "WAST": "ᏭᏕᎵᎬ ᎬᎿᎨᏍᏛ ᎪᎩ ᎠᏟᎢᎵᏒ", "HECU": "ᎫᏆ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "WITA": "ᎠᏰᏟ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "LHDT": "ᎤᎬᏫᏳᎯ ᎭᏫ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏒᎩ", "EAT": "ᏗᎧᎸᎬ ᎬᎿᎨᏍᏛ ᎠᏟᎢᎵᏒ", "EST": "ᏗᎧᎸᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "ACWST": "ᎠᏰᏟ ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNT": "ᎢᏤᎤᏂᏩᏛᏓᎦᏙᎯ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CST": "ᎠᏰᏟ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CLT": "ᏥᎵ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "OEZ": "ᏗᎧᎸᎬ ᏗᏜ ᏳᎳᏈ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HENOMX": "ᏧᏴᏢ ᏭᏕᎵᎬ ᎠᏂᏍᏆᏂ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "AKDT": "ᎠᎳᏍᎦ ᎪᎯ ᎢᎦ ᎠᏟᎢᎵᏍᏒᎩ", "WIB": "ᏭᏕᎵᎬ ᏗᏜ ᎢᏂᏙᏂᏍᏯ ᎠᏟᎢᎵᏒ", "SRT": "ᏒᎵᎾᎻ ᎠᏟᎢᎵᏒ", "ART": "ᎠᏥᏂᏘᏂᎠ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "AEST": "ᎡᎳᏗᏜ ᏗᎧᎸᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "CLST": "ᏥᎵ ᎪᎩ ᎠᏟᎢᎵᏒ", "HNEG": "ᏗᎧᎸᎬ ᎢᏤᏍᏛᏱ ᎠᏟᎶᏍᏗ ᎠᎵᎢᎵᏒ", "TMT": "ᏛᎵᎩᎺᏂᏍᏔᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNCU": "ᎫᏆ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "HNPM": "ᎤᏓᏅᏘ ᏈᏰ ᎠᎴ ᎻᏇᎶᏂ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ", "MESZ": "ᎠᏰᏟ ᏳᎳᏈ ᎪᎩ ᎠᏟᎢᎵᏒ", "BOT": "ᏉᎵᏫᎠ ᎠᏟᎢᎵᏒ", "GMT": "ᎢᏤ ᎢᏳᏍᏗ ᎠᏟᎢᎵᏒ", "BT": "ᏊᏔᏂ ᎠᏟᎢᎵᏒ", "AWST": "ᎡᎳᏗᏜ ᏭᏕᎵᎬ ᏗᏜ ᎠᏟᎶᏍᏗ ᎠᏟᎢᎵᏒ"}, -+ locale: "chr_US", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BT": "BT", "ECT": "ECT", "MYT": "MYT", "HAT": "HAT", "COT": "COT", "TMST": "TMST", "NZST": "NZST", "BOT": "BOT", "AKST": "AKST", "OESZ": "OESZ", "HNT": "HNT", "JST": "JST", "AWDT": "AWDT", "HEPMX": "HEPMX", "WESZ": "WESZ", "CDT": "CDT", "HEPM": "HEPM", "HNPMX": "HNPMX", "CAT": "CAT", "SRT": "SRT", "LHST": "LHST", "CHAST": "CHAST", "VET": "VET", "HNCU": "HNCU", "HKT": "HKT", "ADT": "ADT", "LHDT": "LHDT", "UYST": "UYST", "CLST": "CLST", "MEZ": "MEZ", "EAT": "EAT", "AWST": "AWST", "EST": "EST", "ARST": "ARST", "JDT": "JDT", "PST": "PST", "GFT": "GFT", "COST": "COST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "HEEG": "HEEG", "ACDT": "ACDT", "AEDT": "AEDT", "AKDT": "AKDT", "WIT": "WIT", "HNOG": "HNOG", "MST": "MST", "HADT": "HADT", "HNPM": "HNPM", "ACWDT": "ACWDT", "WARST": "WARST", "ChST": "ChST", "WIB": "WIB", "ART": "ART", "GMT": "GMT", "HAST": "HAST", "HENOMX": "HENOMX", "ACST": "ACST", "TMT": "TMT", "NZDT": "NZDT", "WAT": "WAT", "ACWST": "ACWST", "PDT": "PDT", "CST": "CST", "AST": "AST", "CHADT": "CHADT", "UYT": "UYT", "SGT": "SGT", "EDT": "EDT", "WITA": "WITA", "HKST": "HKST", "CLT": "CLT", "MDT": "MDT", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "WEZ": "WEZ", "WART": "WART", "SAST": "SAST", "GYT": "GYT", "AEST": "AEST", "IST": "IST", "OEZ": "OEZ", "HEOG": "HEOG", "HECU": "HECU", "WAST": "WAST"}, - } - } -  -@@ -124,7 +101,7 @@ func (chr *chr_US) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (chr *chr_US) MonthsAbbreviated() []string { -- return chr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (chr *chr_US) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (chr *chr_US) MonthsNarrow() []string { -- return chr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (chr *chr_US) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (chr *chr_US) MonthsWide() []string { -- return chr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +167,13 @@ func (chr *chr_US) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'chr_US' and handles both Whole and Real numbers based on 'v' - func (chr *chr_US) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, chr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, chr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, chr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'chr_US' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (chr *chr_US) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, chr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, chr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, chr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'chr_US' -@@ -264,56 +181,7 @@ func (chr *chr_US) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := chr.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, chr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, chr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, chr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, chr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'chr_US' -@@ -322,68 +190,7 @@ func (chr *chr_US) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := chr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, chr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, chr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, chr.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, chr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, chr.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'chr_US' -@@ -391,17 +198,6 @@ func (chr *chr_US) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -410,17 +206,6 @@ func (chr *chr_US) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, chr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -429,17 +214,6 @@ func (chr *chr_US) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, chr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -448,19 +222,6 @@ func (chr *chr_US) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, chr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, chr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,28 +230,6 @@ func (chr *chr_US) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, chr.periodsAbbreviated[0]...) -- } else { -- b = append(b, chr.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -499,35 +238,6 @@ func (chr *chr_US) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, chr.periodsAbbreviated[0]...) -- } else { -- b = append(b, chr.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -536,40 +246,6 @@ func (chr *chr_US) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, chr.periodsAbbreviated[0]...) -- } else { -- b = append(b, chr.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -578,44 +254,5 @@ func (chr *chr_US) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, chr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, chr.periodsAbbreviated[0]...) -- } else { -- b = append(b, chr.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := chr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ckb/ckb.go b/ckb/ckb.go -index 179cd93..a318455 100644 ---- a/ckb/ckb.go -+++ b/ckb/ckb.go -@@ -72,7 +72,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"پێش زایین", "زایینی"}, - erasNarrow: []string{"پ.ن", "ز"}, - erasWide: []string{"پێش زایین", "زایینی"}, -- timezones: map[string]string{"JST": "JST", "TMT": "TMT", "VET": "VET", "HEPM": "HEPM", "NZDT": "NZDT", "HNPMX": "HNPMX", "HAT": "HAT", "IST": "IST", "OEZ": "OEZ", "GFT": "GFT", "ACST": "ACST", "CAT": "CAT", "EST": "EST", "BT": "BT", "HNT": "HNT", "HEOG": "HEOG", "MEZ": "MEZ", "BOT": "BOT", "GMT": "GMT", "GYT": "GYT", "HAST": "HAST", "ART": "ART", "CHAST": "CHAST", "CHADT": "CHADT", "MESZ": "MESZ", "CLST": "CLST", "EDT": "EDT", "JDT": "JDT", "WAST": "WAST", "SGT": "SGT", "HNCU": "HNCU", "HECU": "HECU", "AST": "AST", "PDT": "PDT", "NZST": "NZST", "COT": "COT", "HNPM": "HNPM", "EAT": "EAT", "PST": "PST", "AEST": "AEST", "AEDT": "AEDT", "HNOG": "HNOG", "HENOMX": "HENOMX", "CST": "CST", "MYT": "MYT", "SRT": "SRT", "ACWST": "ACWST", "ARST": "ARST", "SAST": "SAST", "CLT": "CLT", "AKST": "AKST", "UYST": "UYST", "MST": "MST", "WITA": "WITA", "LHDT": "LHDT", "WAT": "WAT", "COST": "COST", "AKDT": "AKDT", "HKT": "HKT", "HKST": "HKST", "HEEG": "HEEG", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "WIB": "WIB", "WIT": "WIT", "AWST": "AWST", "UYT": "UYT", "ADT": "ADT", "MDT": "MDT", "TMST": "TMST", "WART": "WART", "WARST": "WARST", "WEZ": "WEZ", "WESZ": "WESZ", "LHST": "LHST", "ChST": "ChST", "ACDT": "ACDT", "ECT": "ECT", "CDT": "CDT", "HADT": "HADT", "ACWDT": "ACWDT", "HNEG": "HNEG"}, -+ timezones: map[string]string{"GMT": "GMT", "BOT": "BOT", "JDT": "JDT", "OESZ": "OESZ", "GYT": "GYT", "HNOG": "HNOG", "ART": "ART", "ARST": "ARST", "UYT": "UYT", "ACWST": "ACWST", "AWDT": "AWDT", "IST": "IST", "AEST": "AEST", "AKST": "AKST", "TMST": "TMST", "CST": "CST", "ACST": "ACST", "HNNOMX": "HNNOMX", "COST": "COST", "HADT": "HADT", "HENOMX": "HENOMX", "SGT": "SGT", "HNPMX": "HNPMX", "BT": "BT", "HKT": "HKT", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "HEEG": "HEEG", "OEZ": "OEZ", "HKST": "HKST", "MEZ": "MEZ", "MESZ": "MESZ", "AWST": "AWST", "HAT": "HAT", "TMT": "TMT", "CDT": "CDT", "ECT": "ECT", "WIB": "WIB", "HNT": "HNT", "CAT": "CAT", "VET": "VET", "HNCU": "HNCU", "AKDT": "AKDT", "WIT": "WIT", "ADT": "ADT", "HNPM": "HNPM", "HEPM": "HEPM", "WEZ": "WEZ", "AEDT": "AEDT", "WAT": "WAT", "WARST": "WARST", "MST": "MST", "NZDT": "NZDT", "ChST": "ChST", "HAST": "HAST", "WESZ": "WESZ", "WAST": "WAST", "UYST": "UYST", "PST": "PST", "ACWDT": "ACWDT", "EDT": "EDT", "CLT": "CLT", "MDT": "MDT", "LHST": "LHST", "PDT": "PDT", "HEPMX": "HEPMX", "WART": "WART", "SAST": "SAST", "CLST": "CLST", "AST": "AST", "EAT": "EAT", "JST": "JST", "COT": "COT", "HEOG": "HEOG", "NZST": "NZST", "SRT": "SRT", "LHDT": "LHDT", "HECU": "HECU", "MYT": "MYT", "GFT": "GFT", "CHADT": "CHADT", "EST": "EST", "WITA": "WITA", "HNEG": "HNEG", "CHAST": "CHAST"}, - } - } -  -diff --git a/ckb_IQ/ckb_IQ.go b/ckb_IQ/ckb_IQ.go -index 493e0b6..1351f22 100644 ---- a/ckb_IQ/ckb_IQ.go -+++ b/ckb_IQ/ckb_IQ.go -@@ -10,69 +10,45 @@ import ( - ) -  - type ckb_IQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ckb_IQ' locale - func New() locales.Translator { - return &ckb_IQ{ -- locale: "ckb_IQ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: "٫", -- group: "٬", -- percent: "٪", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "کانوونی دووەم", "شوبات", "ئازار", "نیسان", "ئایار", "حوزەیران", "تەمووز", "ئاب", "ئەیلوول", "تشرینی یەکەم", "تشرینی دووەم", "کانونی یەکەم"}, -- monthsNarrow: []string{"", "ک", "ش", "ئ", "ن", "ئ", "ح", "ت", "ئ", "ئ", "ت", "ت", "ک"}, -- monthsWide: []string{"", "کانوونی دووەم", "شوبات", "ئازار", "نیسان", "ئایار", "حوزەیران", "تەمووز", "ئاب", "ئەیلوول", "تشرینی یەکەم", "تشرینی دووەم", "کانونی یەکەم"}, -- daysAbbreviated: []string{"یەکشەممە", "دووشەممە", "سێشەممە", "چوارشەممە", "پێنجشەممە", "ھەینی", "شەممە"}, -- daysNarrow: []string{"ی", "د", "س", "چ", "پ", "ھ", "ش"}, -- daysShort: []string{"١ش", "٢ش", "٣ش", "٤ش", "٥ش", "ھ", "ش"}, -- daysWide: []string{"یەکشەممە", "دووشەممە", "سێشەممە", "چوارشەممە", "پێنجشەممە", "ھەینی", "شەممە"}, -- periodsAbbreviated: []string{"ب.ن", "د.ن"}, -- periodsNarrow: []string{"ب.ن", "د.ن"}, -- periodsWide: []string{"ب.ن", "د.ن"}, -- erasAbbreviated: []string{"پێش زایین", "زایینی"}, -- erasNarrow: []string{"پ.ن", "ز"}, -- erasWide: []string{"پێش زایین", "زایینی"}, -- timezones: map[string]string{"NZST": "NZST", "OEZ": "OEZ", "EST": "EST", "EDT": "EDT", "HEPMX": "HEPMX", "MEZ": "MEZ", "ARST": "ARST", "HNOG": "HNOG", "CHADT": "CHADT", "EAT": "EAT", "GYT": "GYT", "HNT": "HNT", "LHDT": "LHDT", "MDT": "MDT", "CDT": "CDT", "UYST": "UYST", "HKT": "HKT", "NZDT": "NZDT", "WARST": "WARST", "HNPM": "HNPM", "TMT": "TMT", "WAT": "WAT", "WART": "WART", "AKST": "AKST", "HEOG": "HEOG", "CHAST": "CHAST", "BOT": "BOT", "ACST": "ACST", "CAT": "CAT", "COT": "COT", "COST": "COST", "AWST": "AWST", "CLST": "CLST", "ACDT": "ACDT", "IST": "IST", "BT": "BT", "SRT": "SRT", "CLT": "CLT", "JDT": "JDT", "WAST": "WAST", "ECT": "ECT", "VET": "VET", "AEDT": "AEDT", "MESZ": "MESZ", "GMT": "GMT", "SGT": "SGT", "AKDT": "AKDT", "AST": "AST", "WEZ": "WEZ", "HEPM": "HEPM", "LHST": "LHST", "HECU": "HECU", "CST": "CST", "PST": "PST", "HAT": "HAT", "AEST": "AEST", "AWDT": "AWDT", "HKST": "HKST", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "HNCU": "HNCU", "WIT": "WIT", "ADT": "ADT", "ART": "ART", "ChST": "ChST", "TMST": "TMST", "WIB": "WIB", "HADT": "HADT", "WITA": "WITA", "HNNOMX": "HNNOMX", "PDT": "PDT", "ACWST": "ACWST", "JST": "JST", "OESZ": "OESZ", "MST": "MST", "HAST": "HAST", "HENOMX": "HENOMX", "MYT": "MYT", "UYT": "UYT", "ACWDT": "ACWDT", "SAST": "SAST", "HNEG": "HNEG", "GFT": "GFT", "HNPMX": "HNPMX", "WESZ": "WESZ"}, -+ locale: "ckb_IQ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "LHST": "LHST", "ACWDT": "ACWDT", "CHAST": "CHAST", "HNCU": "HNCU", "HNOG": "HNOG", "NZST": "NZST", "HAST": "HAST", "ACST": "ACST", "HNT": "HNT", "WART": "WART", "AKDT": "AKDT", "OEZ": "OEZ", "MDT": "MDT", "ART": "ART", "HNPM": "HNPM", "JDT": "JDT", "UYT": "UYT", "AKST": "AKST", "OESZ": "OESZ", "WITA": "WITA", "AEST": "AEST", "IST": "IST", "WAST": "WAST", "WARST": "WARST", "GYT": "GYT", "CLST": "CLST", "HNNOMX": "HNNOMX", "JST": "JST", "VET": "VET", "TMST": "TMST", "CAT": "CAT", "CDT": "CDT", "ADT": "ADT", "HEPM": "HEPM", "COST": "COST", "EST": "EST", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "AEDT": "AEDT", "CHADT": "CHADT", "WAT": "WAT", "WIB": "WIB", "HENOMX": "HENOMX", "MEZ": "MEZ", "PDT": "PDT", "BT": "BT", "WIT": "WIT", "HKT": "HKT", "MST": "MST", "BOT": "BOT", "MESZ": "MESZ", "HEEG": "HEEG", "TMT": "TMT", "ARST": "ARST", "WESZ": "WESZ", "ChST": "ChST", "ACDT": "ACDT", "UYST": "UYST", "WEZ": "WEZ", "GFT": "GFT", "HNPMX": "HNPMX", "EDT": "EDT", "CLT": "CLT", "NZDT": "NZDT", "GMT": "GMT", "EAT": "EAT", "AWDT": "AWDT", "HKST": "HKST", "AST": "AST", "SRT": "SRT", "HADT": "HADT", "SGT": "SGT", "HEOG": "HEOG", "ECT": "ECT", "CST": "CST", "HNEG": "HNEG", "LHDT": "LHDT", "HEPMX": "HEPMX", "HAT": "HAT", "MYT": "MYT", "PST": "PST", "HECU": "HECU", "SAST": "SAST", "COT": "COT"}, - } - } -  -@@ -125,7 +101,7 @@ func (ckb *ckb_IQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ckb *ckb_IQ) MonthsAbbreviated() []string { -- return ckb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +111,7 @@ func (ckb *ckb_IQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ckb *ckb_IQ) MonthsNarrow() []string { -- return ckb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -145,7 +121,7 @@ func (ckb *ckb_IQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ckb *ckb_IQ) MonthsWide() []string { -- return ckb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,81 +167,13 @@ func (ckb *ckb_IQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ckb_IQ' and handles both Whole and Real numbers based on 'v' - func (ckb *ckb_IQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ckb.group) - 1; j >= 0; j-- { -- b = append(b, ckb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ckb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ckb_IQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ckb *ckb_IQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ckb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ckb.percentSuffix...) -- -- b = append(b, ckb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ckb_IQ' -@@ -273,60 +181,7 @@ func (ckb *ckb_IQ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ckb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ckb.group) - 1; j >= 0; j-- { -- b = append(b, ckb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ckb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ckb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ckb.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ckb_IQ' -@@ -335,67 +190,7 @@ func (ckb *ckb_IQ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ckb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ckb.group) - 1; j >= 0; j-- { -- b = append(b, ckb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ckb.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ckb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ckb.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ckb.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ckb_IQ' -@@ -403,28 +198,6 @@ func (ckb *ckb_IQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -433,17 +206,6 @@ func (ckb *ckb_IQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ckb.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -452,17 +214,6 @@ func (ckb *ckb_IQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xdb, 0x8c, 0x20}...) -- b = append(b, ckb.monthsWide[t.Month()]...) -- b = append(b, []byte{0xdb, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +222,6 @@ func (ckb *ckb_IQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ckb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ckb.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -492,28 +230,6 @@ func (ckb *ckb_IQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ckb.periodsAbbreviated[0]...) -- } else { -- b = append(b, ckb.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -522,35 +238,6 @@ func (ckb *ckb_IQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ckb.periodsAbbreviated[0]...) -- } else { -- b = append(b, ckb.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -559,40 +246,6 @@ func (ckb *ckb_IQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ckb.periodsAbbreviated[0]...) -- } else { -- b = append(b, ckb.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -601,44 +254,5 @@ func (ckb *ckb_IQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ckb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ckb.periodsAbbreviated[0]...) -- } else { -- b = append(b, ckb.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ckb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ckb_IR/ckb_IR.go b/ckb_IR/ckb_IR.go -index f05ebfd..7bce9d1 100644 ---- a/ckb_IR/ckb_IR.go -+++ b/ckb_IR/ckb_IR.go -@@ -10,69 +10,45 @@ import ( - ) -  - type ckb_IR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ckb_IR' locale - func New() locales.Translator { - return &ckb_IR{ -- locale: "ckb_IR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: "٫", -- group: "٬", -- percent: "٪", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "کانوونی دووەم", "شوبات", "ئازار", "نیسان", "ئایار", "حوزەیران", "تەمووز", "ئاب", "ئەیلوول", "تشرینی یەکەم", "تشرینی دووەم", "کانونی یەکەم"}, -- monthsNarrow: []string{"", "ک", "ش", "ئ", "ن", "ئ", "ح", "ت", "ئ", "ئ", "ت", "ت", "ک"}, -- monthsWide: []string{"", "کانوونی دووەم", "شوبات", "ئازار", "نیسان", "ئایار", "حوزەیران", "تەمووز", "ئاب", "ئەیلوول", "تشرینی یەکەم", "تشرینی دووەم", "کانونی یەکەم"}, -- daysAbbreviated: []string{"یەکشەممە", "دووشەممە", "سێشەممە", "چوارشەممە", "پێنجشەممە", "ھەینی", "شەممە"}, -- daysNarrow: []string{"ی", "د", "س", "چ", "پ", "ھ", "ش"}, -- daysShort: []string{"١ش", "٢ش", "٣ش", "٤ش", "٥ش", "ھ", "ش"}, -- daysWide: []string{"یەکشەممە", "دووشەممە", "سێشەممە", "چوارشەممە", "پێنجشەممە", "ھەینی", "شەممە"}, -- periodsAbbreviated: []string{"ب.ن", "د.ن"}, -- periodsNarrow: []string{"ب.ن", "د.ن"}, -- periodsWide: []string{"ب.ن", "د.ن"}, -- erasAbbreviated: []string{"پێش زایین", "زایینی"}, -- erasNarrow: []string{"پ.ن", "ز"}, -- erasWide: []string{"پێش زایین", "زایینی"}, -- timezones: map[string]string{"LHDT": "LHDT", "OESZ": "OESZ", "UYT": "UYT", "HNT": "HNT", "PST": "PST", "ART": "ART", "HEPM": "HEPM", "TMST": "TMST", "CAT": "CAT", "ECT": "ECT", "SGT": "SGT", "MDT": "MDT", "AWST": "AWST", "WEZ": "WEZ", "HEOG": "HEOG", "JST": "JST", "HNEG": "HNEG", "WARST": "WARST", "HECU": "HECU", "CST": "CST", "PDT": "PDT", "HNNOMX": "HNNOMX", "GMT": "GMT", "EST": "EST", "SRT": "SRT", "WESZ": "WESZ", "ChST": "ChST", "TMT": "TMT", "WART": "WART", "COT": "COT", "EDT": "EDT", "WIT": "WIT", "ACWST": "ACWST", "AEDT": "AEDT", "HNPMX": "HNPMX", "CDT": "CDT", "VET": "VET", "HNOG": "HNOG", "HKT": "HKT", "LHST": "LHST", "SAST": "SAST", "ACST": "ACST", "WAT": "WAT", "HKST": "HKST", "HNPM": "HNPM", "GFT": "GFT", "AKDT": "AKDT", "ADT": "ADT", "CLT": "CLT", "AWDT": "AWDT", "NZST": "NZST", "∅∅∅": "∅∅∅", "EAT": "EAT", "UYST": "UYST", "BT": "BT", "MEZ": "MEZ", "NZDT": "NZDT", "CLST": "CLST", "ACDT": "ACDT", "GYT": "GYT", "WIB": "WIB", "IST": "IST", "BOT": "BOT", "WAST": "WAST", "OEZ": "OEZ", "HNCU": "HNCU", "MST": "MST", "HAT": "HAT", "HEEG": "HEEG", "HENOMX": "HENOMX", "AKST": "AKST", "ACWDT": "ACWDT", "ARST": "ARST", "HAST": "HAST", "HADT": "HADT", "MESZ": "MESZ", "CHAST": "CHAST", "HEPMX": "HEPMX", "MYT": "MYT", "AEST": "AEST", "WITA": "WITA", "CHADT": "CHADT", "JDT": "JDT", "COST": "COST", "AST": "AST"}, -+ locale: "ckb_IR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNNOMX": "HNNOMX", "BT": "BT", "WEZ": "WEZ", "WAST": "WAST", "CAT": "CAT", "MDT": "MDT", "ACST": "ACST", "HNEG": "HNEG", "AEDT": "AEDT", "EST": "EST", "LHDT": "LHDT", "IST": "IST", "WITA": "WITA", "MST": "MST", "ARST": "ARST", "MESZ": "MESZ", "PDT": "PDT", "COT": "COT", "HEOG": "HEOG", "NZDT": "NZDT", "HNPM": "HNPM", "JDT": "JDT", "UYST": "UYST", "OEZ": "OEZ", "WARST": "WARST", "TMST": "TMST", "NZST": "NZST", "WIB": "WIB", "BOT": "BOT", "AWST": "AWST", "AWDT": "AWDT", "VET": "VET", "HEPMX": "HEPMX", "ADT": "ADT", "ChST": "ChST", "SRT": "SRT", "HEEG": "HEEG", "JST": "JST", "ACWDT": "ACWDT", "WIT": "WIT", "HKST": "HKST", "CLT": "CLT", "CST": "CST", "HEPM": "HEPM", "WESZ": "WESZ", "HNCU": "HNCU", "HENOMX": "HENOMX", "COST": "COST", "HNOG": "HNOG", "CLST": "CLST", "ECT": "ECT", "HAST": "HAST", "MEZ": "MEZ", "ACDT": "ACDT", "LHST": "LHST", "SGT": "SGT", "HNT": "HNT", "HAT": "HAT", "EDT": "EDT", "AST": "AST", "HADT": "HADT", "UYT": "UYT", "AEST": "AEST", "AKDT": "AKDT", "GYT": "GYT", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "HNPMX": "HNPMX", "WAT": "WAT", "AKST": "AKST", "SAST": "SAST", "CDT": "CDT", "ART": "ART", "CHADT": "CHADT", "GMT": "GMT", "PST": "PST", "OESZ": "OESZ", "TMT": "TMT", "EAT": "EAT", "MYT": "MYT", "CHAST": "CHAST", "HECU": "HECU", "GFT": "GFT", "WART": "WART", "HKT": "HKT"}, - } - } -  -@@ -125,7 +101,7 @@ func (ckb *ckb_IR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ckb *ckb_IR) MonthsAbbreviated() []string { -- return ckb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +111,7 @@ func (ckb *ckb_IR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ckb *ckb_IR) MonthsNarrow() []string { -- return ckb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -145,7 +121,7 @@ func (ckb *ckb_IR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ckb *ckb_IR) MonthsWide() []string { -- return ckb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,81 +167,13 @@ func (ckb *ckb_IR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ckb_IR' and handles both Whole and Real numbers based on 'v' - func (ckb *ckb_IR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ckb.group) - 1; j >= 0; j-- { -- b = append(b, ckb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ckb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ckb_IR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ckb *ckb_IR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ckb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ckb.percentSuffix...) -- -- b = append(b, ckb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ckb_IR' -@@ -273,60 +181,7 @@ func (ckb *ckb_IR) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ckb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ckb.group) - 1; j >= 0; j-- { -- b = append(b, ckb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ckb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ckb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ckb.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ckb_IR' -@@ -335,67 +190,7 @@ func (ckb *ckb_IR) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ckb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ckb.decimal) - 1; j >= 0; j-- { -- b = append(b, ckb.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ckb.group) - 1; j >= 0; j-- { -- b = append(b, ckb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ckb.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ckb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ckb.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ckb.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ckb_IR' -@@ -403,28 +198,6 @@ func (ckb *ckb_IR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -433,17 +206,6 @@ func (ckb *ckb_IR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ckb.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -452,17 +214,6 @@ func (ckb *ckb_IR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xdb, 0x8c, 0x20}...) -- b = append(b, ckb.monthsWide[t.Month()]...) -- b = append(b, []byte{0xdb, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +222,6 @@ func (ckb *ckb_IR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ckb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ckb.daysWide[t.Weekday()]...) -- - return string(b) - } -  -diff --git a/cmd/generate_resources.go b/cmd/generate_resources.go -index 34e58ca..116df26 100644 ---- a/cmd/generate_resources.go -+++ b/cmd/generate_resources.go -@@ -71,11 +71,16 @@ var ( - secondaryGroupLenRegex = regexp.MustCompile(",([0-9#]+),") - requiredNumRegex = regexp.MustCompile("([0-9]+)\\.") - requiredDecimalRegex = regexp.MustCompile("\\.([0-9]+)") -+ -+ enInheritance = map[string]string{ -+ "en_AG": "en_001", "en_AI": "en_001", "en_AS": "en", "en_AU": "en_GB", "en_BB": "en_001", "en_BE": "en_GB", "en_BM": "en_001", "en_BS": "en_001", "en_BW": "en_001", "en_BZ": "en_001", "en_CA": "en", "en_CC": "en_001", "en_CK": "en_001", "en_CM": "en_001", "en_CX": "en_001", "en_DG": "en_GB", "en_DM": "en_001", "en_ER": "en_001", "en_FJ": "en_001", "en_FK": "en_GB", "en_FM": "en_001", "en_GB": "en_001", "en_GD": "en_001", "en_GG": "en_GB", "en_GH": "en_001", "en_GI": "en_GB", "en_GM": "en_001", "en_GU": "en", "en_GY": "en_001", "en_HK": "en_GB", "en_IE": "en_GB", "en_IM": "en_GB", "en_IN": "en_GB", "en_IO": "en_GB", "en_JE": "en_GB", "en_JM": "en_001", "en_KE": "en_001", "en_KI": "en_001", "en_KN": "en_001", "en_KY": "en_001", "en_LC": "en_001", "en_LR": "en_001", "en_LS": "en_001", "en_MG": "en_001", "en_MH": "en", "en_MO": "en_GB", "en_MP": "en", "en_MS": "en_001", "en_MT": "en_GB", "en_MU": "en_001", "en_MW": "en_001", "en_MY": "en_001", "en_NA": "en_001", "en_NF": "en_001", "en_NG": "en_001", "en_NR": "en_001", "en_NU": "en_001", "en_NZ": "en_GB", "en_PG": "en_001", "en_PH": "en_001", "en_PK": "en_GB", "en_PN": "en_001", "en_PR": "en", "en_PW": "en_001", "en_RW": "en_001", "en_SB": "en_001", "en_SC": "en_001", "en_SD": "en_001", "en_SG": "en_GB", "en_SH": "en_GB", "en_SL": "en_001", "en_SS": "en_001", "en_SX": "en_001", "en_SZ": "en_001", "en_TC": "en_001", "en_TK": "en_001", "en_TO": "en_001", "en_TT": "en_001", "en_TV": "en_001", "en_TZ": "en_001", "en_UG": "en_001", "en_UM": "en", "en_US": "en", "en_VC": "en_001", "en_VG": "en_GB", "en_VI": "en", "en_VU": "en_001", "en_WS": "en_001", "en_ZA": "en_001", "en_ZM": "en_001", "en_ZW": "en_001", -+ } - ) -  - type translator struct { -- Locale string -- BaseLocale string -+ Locale string -+ BaseLocale string -+ // InheritedLocale string - Plurals string - CardinalFunc string - PluralsOrdinal string -@@ -325,7 +330,7 @@ func postProcess(cldr *cldr.CLDR) { - } - } -  -- var base *translator -+ var inherited *translator - var found bool -  - for _, trans := range translators { -@@ -333,7 +338,7 @@ func postProcess(cldr *cldr.CLDR) { - fmt.Println("Post Processing:", trans.Locale) -  - // cardinal plural rules -- trans.CardinalFunc, trans.Plurals = parseCardinalPluralRuleFunc(cldr, trans.BaseLocale) -+ trans.CardinalFunc, trans.Plurals = parseCardinalPluralRuleFunc(cldr, trans.Locale, trans.BaseLocale) -  - //ordinal plural rules - trans.OrdinalFunc, trans.PluralsOrdinal = parseOrdinalPluralRuleFunc(cldr, trans.BaseLocale) -@@ -346,7 +351,18 @@ func postProcess(cldr *cldr.CLDR) { - found = false - } else { -  -- base, found = baseTranslators[trans.BaseLocale] -+ iloc := trans.Locale -+ -+ if trans.BaseLocale == "en" { -+ if inherit, found := enInheritance[trans.Locale]; found { -+ iloc = inherit -+ } -+ } -+ -+ inherited, found = baseTranslators[iloc] -+ if !found { -+ inherited, found = baseTranslators[trans.BaseLocale] // last ditch effort for unofficial fallback -+ } - } -  - // Numbers -@@ -354,7 +370,7 @@ func postProcess(cldr *cldr.CLDR) { - if len(trans.Decimal) == 0 { -  - if found { -- trans.Decimal = base.Decimal -+ trans.Decimal = inherited.Decimal - } -  - if len(trans.Decimal) == 0 { -@@ -365,7 +381,7 @@ func postProcess(cldr *cldr.CLDR) { - if len(trans.Group) == 0 { -  - if found { -- trans.Group = base.Group -+ trans.Group = inherited.Group - } -  - if len(trans.Group) == 0 { -@@ -376,7 +392,7 @@ func postProcess(cldr *cldr.CLDR) { - if len(trans.Minus) == 0 { -  - if found { -- trans.Minus = base.Minus -+ trans.Minus = inherited.Minus - } -  - if len(trans.Minus) == 0 { -@@ -387,7 +403,7 @@ func postProcess(cldr *cldr.CLDR) { - if len(trans.Percent) == 0 { -  - if found { -- trans.Percent = base.Percent -+ trans.Percent = inherited.Percent - } -  - if len(trans.Percent) == 0 { -@@ -398,7 +414,7 @@ func postProcess(cldr *cldr.CLDR) { - if len(trans.PerMille) == 0 { -  - if found { -- trans.PerMille = base.PerMille -+ trans.PerMille = inherited.PerMille - } -  - if len(trans.PerMille) == 0 { -@@ -407,11 +423,11 @@ func postProcess(cldr *cldr.CLDR) { - } -  - if len(trans.TimeSeparator) == 0 && found { -- trans.TimeSeparator = base.TimeSeparator -+ trans.TimeSeparator = inherited.TimeSeparator - } -  - if len(trans.Infinity) == 0 && found { -- trans.Infinity = base.Infinity -+ trans.Infinity = inherited.Infinity - } -  - // Currency -@@ -419,119 +435,119 @@ func postProcess(cldr *cldr.CLDR) { - // number values -  - if len(trans.DecimalNumberFormat) == 0 && found { -- trans.DecimalNumberFormat = base.DecimalNumberFormat -+ trans.DecimalNumberFormat = inherited.DecimalNumberFormat - } -  - if len(trans.PercentNumberFormat) == 0 && found { -- trans.PercentNumberFormat = base.PercentNumberFormat -+ trans.PercentNumberFormat = inherited.PercentNumberFormat - } -  - if len(trans.CurrencyNumberFormat) == 0 && found { -- trans.CurrencyNumberFormat = base.CurrencyNumberFormat -+ trans.CurrencyNumberFormat = inherited.CurrencyNumberFormat - } -  - if len(trans.NegativeCurrencyNumberFormat) == 0 && found { -- trans.NegativeCurrencyNumberFormat = base.NegativeCurrencyNumberFormat -+ trans.NegativeCurrencyNumberFormat = inherited.NegativeCurrencyNumberFormat - } -  - // date values -  - if len(trans.FmtDateFull) == 0 && found { -- trans.FmtDateFull = base.FmtDateFull -+ trans.FmtDateFull = inherited.FmtDateFull - } -  - if len(trans.FmtDateLong) == 0 && found { -- trans.FmtDateLong = base.FmtDateLong -+ trans.FmtDateLong = inherited.FmtDateLong - } -  - if len(trans.FmtDateMedium) == 0 && found { -- trans.FmtDateMedium = base.FmtDateMedium -+ trans.FmtDateMedium = inherited.FmtDateMedium - } -  - if len(trans.FmtDateShort) == 0 && found { -- trans.FmtDateShort = base.FmtDateShort -+ trans.FmtDateShort = inherited.FmtDateShort - } -  - // time values -  - if len(trans.FmtTimeFull) == 0 && found { -- trans.FmtTimeFull = base.FmtTimeFull -+ trans.FmtTimeFull = inherited.FmtTimeFull - } -  - if len(trans.FmtTimeLong) == 0 && found { -- trans.FmtTimeLong = base.FmtTimeLong -+ trans.FmtTimeLong = inherited.FmtTimeLong - } -  - if len(trans.FmtTimeMedium) == 0 && found { -- trans.FmtTimeMedium = base.FmtTimeMedium -+ trans.FmtTimeMedium = inherited.FmtTimeMedium - } -  - if len(trans.FmtTimeShort) == 0 && found { -- trans.FmtTimeShort = base.FmtTimeShort -+ trans.FmtTimeShort = inherited.FmtTimeShort - } -  - // month values -  - if len(trans.FmtMonthsAbbreviated) == 0 && found { -- trans.FmtMonthsAbbreviated = base.FmtMonthsAbbreviated -+ trans.FmtMonthsAbbreviated = inherited.FmtMonthsAbbreviated - } -  - if len(trans.FmtMonthsNarrow) == 0 && found { -- trans.FmtMonthsNarrow = base.FmtMonthsNarrow -+ trans.FmtMonthsNarrow = inherited.FmtMonthsNarrow - } -  - if len(trans.FmtMonthsWide) == 0 && found { -- trans.FmtMonthsWide = base.FmtMonthsWide -+ trans.FmtMonthsWide = inherited.FmtMonthsWide - } -  - // day values -  - if len(trans.FmtDaysAbbreviated) == 0 && found { -- trans.FmtDaysAbbreviated = base.FmtDaysAbbreviated -+ trans.FmtDaysAbbreviated = inherited.FmtDaysAbbreviated - } -  - if len(trans.FmtDaysNarrow) == 0 && found { -- trans.FmtDaysNarrow = base.FmtDaysNarrow -+ trans.FmtDaysNarrow = inherited.FmtDaysNarrow - } -  - if len(trans.FmtDaysShort) == 0 && found { -- trans.FmtDaysShort = base.FmtDaysShort -+ trans.FmtDaysShort = inherited.FmtDaysShort - } -  - if len(trans.FmtDaysWide) == 0 && found { -- trans.FmtDaysWide = base.FmtDaysWide -+ trans.FmtDaysWide = inherited.FmtDaysWide - } -  - // period values -  - if len(trans.FmtPeriodsAbbreviated) == 0 && found { -- trans.FmtPeriodsAbbreviated = base.FmtPeriodsAbbreviated -+ trans.FmtPeriodsAbbreviated = inherited.FmtPeriodsAbbreviated - } -  - if len(trans.FmtPeriodsNarrow) == 0 && found { -- trans.FmtPeriodsNarrow = base.FmtPeriodsNarrow -+ trans.FmtPeriodsNarrow = inherited.FmtPeriodsNarrow - } -  - if len(trans.FmtPeriodsShort) == 0 && found { -- trans.FmtPeriodsShort = base.FmtPeriodsShort -+ trans.FmtPeriodsShort = inherited.FmtPeriodsShort - } -  - if len(trans.FmtPeriodsWide) == 0 && found { -- trans.FmtPeriodsWide = base.FmtPeriodsWide -+ trans.FmtPeriodsWide = inherited.FmtPeriodsWide - } -  - // era values -  - if len(trans.FmtErasAbbreviated) == 0 && found { -- trans.FmtErasAbbreviated = base.FmtErasAbbreviated -+ trans.FmtErasAbbreviated = inherited.FmtErasAbbreviated - } -  - if len(trans.FmtErasNarrow) == 0 && found { -- trans.FmtErasNarrow = base.FmtErasNarrow -+ trans.FmtErasNarrow = inherited.FmtErasNarrow - } -  - if len(trans.FmtErasWide) == 0 && found { -- trans.FmtErasWide = base.FmtErasWide -+ trans.FmtErasWide = inherited.FmtErasWide - } -  - ldml := cldr.RawLDML(trans.Locale) -@@ -578,7 +594,7 @@ func postProcess(cldr *cldr.CLDR) { - // timezones -  - if (trans.timezones == nil || len(trans.timezones) == 0) && found { -- trans.timezones = base.timezones -+ trans.timezones = inherited.timezones - } -  - // make sure all base timezones are part of sub locale timezones -@@ -586,7 +602,7 @@ func postProcess(cldr *cldr.CLDR) { -  - var ok bool -  -- for k, v := range base.timezones { -+ for k, v := range inherited.timezones { -  - if _, ok = trans.timezones[k]; ok { - continue -@@ -646,17 +662,28 @@ func preProcess(cldrVar *cldr.CLDR) { -  - split := strings.SplitN(l, "_", 2) - baseLocale := split[0] -+ // inheritedLocale := baseLocale -+ -+ // // one of the inherited english locales -+ // // http://cldr.unicode.org/development/development-process/design-proposals/english-inheritance -+ // if l == "en_001" || l == "en_GB" { -+ // inheritedLocale = l -+ // } -  - trans := &translator{ - Locale: l, - BaseLocale: baseLocale, -+ // InheritedLocale: inheritedLocale, - } -  -- // if is a base locale -- if len(split) == 1 { -- baseTranslators[baseLocale] = trans -- } -+ // // if is a base locale or one of the inherited english locales -+ // // http://cldr.unicode.org/development/development-process/design-proposals/english-inheritance -+ // if len(split) == 1 || l == "en_001" || l == "en_GB" { -+ // baseTranslators[inheritedLocale] = trans -+ // } -  -+ baseTranslators[l] = trans -+ baseTranslators[split[0]] = trans // allowing for unofficial fallback if none exists - translators[l] = trans -  - // get number, currency and datetime symbols -@@ -2268,7 +2295,9 @@ func parseOrdinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results -  - // TODO: cleanup function logic perhaps write a lexer... but it's working right now, and - // I'm already farther down the rabbit hole than I'd like and so pulling the chute here. --func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results string, plurals string) { -+// -+// updated to also accept actual locale as 'pt_PT' exists in cardinal rules different from 'pt' -+func parseCardinalPluralRuleFunc(current *cldr.CLDR, locale, baseLocale string) (results string, plurals string) { -  - var prCardinal *struct { - cldr.Common -@@ -2280,7 +2309,10 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results - } -  - var pluralArr []locales.PluralRule -+ var inBaseLocale bool -+ l := locale -  -+FIND: - // idx 2 is cardinal rules - for _, pr := range current.Supplemental().Plurals[2].PluralRules { -  -@@ -2288,7 +2320,7 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results -  - for _, loc := range locs { -  -- if loc == baseLocale { -+ if loc == l { - prCardinal = pr - } - } -@@ -2296,6 +2328,13 @@ func parseCardinalPluralRuleFunc(current *cldr.CLDR, baseLocale string) (results -  - // no plural rules for locale - if prCardinal == nil { -+ -+ if !inBaseLocale { -+ inBaseLocale = true -+ l = baseLocale -+ goto FIND -+ } -+ - plurals = "nil" - results = "return locales.PluralRuleUnknown" - return -diff --git a/cs/cs.go b/cs/cs.go -index 2c3c95f..e1dda32 100644 ---- a/cs/cs.go -+++ b/cs/cs.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"př. n. l.", "n. l."}, - erasNarrow: []string{"př.n.l.", "n.l."}, - erasWide: []string{"př. n. l.", "n. l."}, -- timezones: map[string]string{"WART": "Západoargentinský standardní čas", "AKDT": "Aljašský letní čas", "HNOG": "Západogrónský standardní čas", "MEZ": "Středoevropský standardní čas", "CLT": "Chilský standardní čas", "GFT": "Francouzskoguyanský čas", "WIB": "Západoindonéský čas", "HEOG": "Západogrónský letní čas", "COST": "Kolumbijský letní čas", "HNCU": "Kubánský standardní čas", "GMT": "Greenwichský střední čas", "CDT": "Severoamerický centrální letní čas", "HNPM": "Pierre-miquelonský standardní čas", "CLST": "Chilský letní čas", "BOT": "Bolivijský čas", "WARST": "Západoargentinský letní čas", "HNT": "Newfoundlandský standardní čas", "HKST": "Hongkongský letní čas", "CAT": "Středoafrický čas", "EAT": "Východoafrický čas", "MDT": "Macajský letní čas", "HAST": "Havajsko-aleutský standardní čas", "WESZ": "Západoevropský letní čas", "AEST": "Východoaustralský standardní čas", "NZDT": "Novozélandský letní čas", "HNEG": "Východogrónský standardní čas", "ADT": "Atlantický letní čas", "GYT": "Guyanský čas", "WIT": "Východoindonéský čas", "HADT": "Havajsko-aleutský letní čas", "ACWDT": "Středozápadní australský letní čas", "WAST": "Západoafrický letní čas", "HECU": "Kubánský letní čas", "HEPMX": "Mexický pacifický letní čas", "MST": "Macajský standardní čas", "CST": "Severoamerický centrální standardní čas", "UYT": "Uruguayský standardní čas", "AWST": "Západoaustralský standardní čas", "IST": "Indický čas", "JST": "Japonský standardní čas", "HENOMX": "Severozápadní mexický letní čas", "HNPMX": "Mexický pacifický standardní čas", "EDT": "Severoamerický východní letní čas", "HAT": "Newfoundlandský letní čas", "CHAST": "Chathamský standardní čas", "MESZ": "Středoevropský letní čas", "JDT": "Japonský letní čas", "SRT": "Surinamský čas", "HEPM": "Pierre-miquelonský letní čas", "ECT": "Ekvádorský čas", "MYT": "Malajský čas", "LHDT": "Letní čas ostrova lorda Howa", "SGT": "Singapurský čas", "OEZ": "Východoevropský standardní čas", "HNNOMX": "Severozápadní mexický standardní čas", "VET": "Venezuelský čas", "HKT": "Hongkongský standardní čas", "HEEG": "Východogrónský letní čas", "TMT": "Turkmenský standardní čas", "ACDT": "Středoaustralský letní čas", "OESZ": "Východoevropský letní čas", "AKST": "Aljašský standardní čas", "AST": "Atlantický standardní čas", "ACWST": "Středozápadní australský standardní čas", "LHST": "Standardní čas ostrova lorda Howa", "ChST": "Chamorrský čas", "ARST": "Argentinský letní čas", "AEDT": "Východoaustralský letní čas", "AWDT": "Západoaustralský letní čas", "SAST": "Jihoafrický čas", "ACST": "Středoaustralský standardní čas", "COT": "Kolumbijský standardní čas", "BT": "Bhútánský čas", "ART": "Argentinský standardní čas", "PDT": "Severoamerický pacifický letní čas", "WEZ": "Západoevropský standardní čas", "WITA": "Středoindonéský čas", "∅∅∅": "Amazonský letní čas", "TMST": "Turkmenský letní čas", "WAT": "Západoafrický standardní čas", "EST": "Severoamerický východní standardní čas", "UYST": "Uruguayský letní čas", "PST": "Severoamerický pacifický standardní čas", "NZST": "Novozélandský standardní čas", "CHADT": "Chathamský letní čas"}, -+ timezones: map[string]string{"EAT": "Východoafrický čas", "HEEG": "Východogrónský letní čas", "AKDT": "Aljašský letní čas", "HNOG": "Západogrónský standardní čas", "WITA": "Středoindonéský čas", "AST": "Atlantický standardní čas", "SRT": "Surinamský čas", "HADT": "Havajsko-aleutský letní čas", "∅∅∅": "Peruánský letní čas", "PST": "Severoamerický pacifický standardní čas", "WAT": "Západoafrický standardní čas", "HKT": "Hongkongský standardní čas", "CAT": "Středoafrický čas", "ART": "Argentinský standardní čas", "UYT": "Uruguayský standardní čas", "EST": "Severoamerický východní standardní čas", "LHST": "Standardní čas ostrova lorda Howa", "SAST": "Jihoafrický čas", "COST": "Kolumbijský letní čas", "WIB": "Západoindonéský čas", "HNPM": "Pierre-miquelonský standardní čas", "AEDT": "Východoaustralský letní čas", "HNPMX": "Mexický pacifický standardní čas", "HNT": "Newfoundlandský standardní čas", "WART": "Západoargentinský standardní čas", "CDT": "Severoamerický centrální letní čas", "ARST": "Argentinský letní čas", "HEPM": "Pierre-miquelonský letní čas", "ACWDT": "Středozápadní australský letní čas", "BOT": "Bolivijský čas", "ACDT": "Středoaustralský letní čas", "LHDT": "Letní čas ostrova lorda Howa", "GFT": "Francouzskoguyanský čas", "COT": "Kolumbijský standardní čas", "EDT": "Severoamerický východní letní čas", "TMST": "Turkmenský letní čas", "GMT": "Greenwichský střední čas", "HAST": "Havajsko-aleutský standardní čas", "CHAST": "Chathamský standardní čas", "CHADT": "Chathamský letní čas", "HEPMX": "Mexický pacifický letní čas", "WEZ": "Západoevropský standardní čas", "NZST": "Novozélandský standardní čas", "NZDT": "Novozélandský letní čas", "JDT": "Japonský letní čas", "AWST": "Západoaustralský standardní čas", "MYT": "Malajský čas", "IST": "Indický čas", "HENOMX": "Severozápadní mexický letní čas", "MESZ": "Středoevropský letní čas", "OEZ": "Východoevropský standardní čas", "ECT": "Ekvádorský čas", "ADT": "Atlantický letní čas", "HECU": "Kubánský letní čas", "WESZ": "Západoevropský letní čas", "OESZ": "Východoevropský letní čas", "HKST": "Hongkongský letní čas", "CST": "Severoamerický centrální standardní čas", "HNEG": "Východogrónský standardní čas", "BT": "Bhútánský čas", "WAST": "Západoafrický letní čas", "ChST": "Chamorrský čas", "MEZ": "Středoevropský standardní čas", "JST": "Japonský standardní čas", "ACWST": "Středozápadní australský standardní čas", "UYST": "Uruguayský letní čas", "HAT": "Newfoundlandský letní čas", "WARST": "Západoargentinský letní čas", "ACST": "Středoaustralský standardní čas", "PDT": "Severoamerický pacifický letní čas", "VET": "Venezuelský čas", "WIT": "Východoindonéský čas", "HEOG": "Západogrónský letní čas", "GYT": "Guyanský čas", "CLT": "Chilský standardní čas", "HNNOMX": "Severozápadní mexický standardní čas", "AWDT": "Západoaustralský letní čas", "AEST": "Východoaustralský standardní čas", "MST": "Macajský standardní čas", "MDT": "Macajský letní čas", "HNCU": "Kubánský standardní čas", "SGT": "Singapurský čas", "AKST": "Aljašský standardní čas", "TMT": "Turkmenský standardní čas", "CLST": "Chilský letní čas"}, - } - } -  -diff --git a/cs_CZ/cs_CZ.go b/cs_CZ/cs_CZ.go -index 7c8d8b0..a2ae11d 100644 ---- a/cs_CZ/cs_CZ.go -+++ b/cs_CZ/cs_CZ.go -@@ -10,70 +10,45 @@ import ( - ) -  - type cs_CZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'cs_CZ' locale - func New() locales.Translator { - return &cs_CZ{ -- locale: "cs_CZ", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "led", "úno", "bře", "dub", "kvě", "čvn", "čvc", "srp", "zář", "říj", "lis", "pro"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "ledna", "února", "března", "dubna", "května", "června", "července", "srpna", "září", "října", "listopadu", "prosince"}, -- daysAbbreviated: []string{"ne", "po", "út", "st", "čt", "pá", "so"}, -- daysNarrow: []string{"N", "P", "Ú", "S", "Č", "P", "S"}, -- daysShort: []string{"ne", "po", "út", "st", "čt", "pá", "so"}, -- daysWide: []string{"neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota"}, -- periodsAbbreviated: []string{"dop.", "odp."}, -- periodsNarrow: []string{"dop.", "odp."}, -- periodsWide: []string{"dop.", "odp."}, -- erasAbbreviated: []string{"př. n. l.", "n. l."}, -- erasNarrow: []string{"př.n.l.", "n.l."}, -- erasWide: []string{"př. n. l.", "n. l."}, -- timezones: map[string]string{"AKST": "Aljašský standardní čas", "PDT": "Severoamerický pacifický letní čas", "ACST": "Středoaustralský standardní čas", "ACWST": "Středozápadní australský standardní čas", "HNOG": "Západogrónský standardní čas", "NZDT": "Novozélandský letní čas", "TMST": "Turkmenský letní čas", "ChST": "Chamorrský čas", "MDT": "Macajský letní čas", "AKDT": "Aljašský letní čas", "WIT": "Východoindonéský čas", "WARST": "Západoargentinský letní čas", "CHAST": "Chathamský standardní čas", "JST": "Japonský standardní čas", "ECT": "Ekvádorský čas", "HNCU": "Kubánský standardní čas", "ADT": "Atlantický letní čas", "MYT": "Malajský čas", "HAST": "Havajsko-aleutský standardní čas", "HECU": "Kubánský letní čas", "WIB": "Západoindonéský čas", "AEDT": "Východoaustralský letní čas", "WAST": "Západoafrický letní čas", "IST": "Indický čas", "HNEG": "Východogrónský standardní čas", "BOT": "Bolivijský čas", "COST": "Kolumbijský letní čas", "HEPMX": "Mexický pacifický letní čas", "CDT": "Severoamerický centrální letní čas", "LHST": "Standardní čas ostrova lorda Howa", "OESZ": "Východoevropský letní čas", "VET": "Venezuelský čas", "ACWDT": "Středozápadní australský letní čas", "HNT": "Newfoundlandský standardní čas", "HEPM": "Pierre-miquelonský letní čas", "TMT": "Turkmenský standardní čas", "CAT": "Středoafrický čas", "UYST": "Uruguayský letní čas", "BT": "Bhútánský čas", "HKT": "Hongkongský standardní čas", "AWST": "Západoaustralský standardní čas", "CLST": "Chilský letní čas", "OEZ": "Východoevropský standardní čas", "WART": "Západoargentinský standardní čas", "GMT": "Greenwichský střední čas", "GYT": "Guyanský čas", "UYT": "Uruguayský standardní čas", "ARST": "Argentinský letní čas", "WEZ": "Západoevropský standardní čas", "HKST": "Hongkongský letní čas", "HNPMX": "Mexický pacifický standardní čas", "MST": "Macajský standardní čas", "HEOG": "Západogrónský letní čas", "ART": "Argentinský standardní čas", "SGT": "Singapurský čas", "CST": "Severoamerický centrální standardní čas", "HADT": "Havajsko-aleutský letní čas", "HAT": "Newfoundlandský letní čas", "ACDT": "Středoaustralský letní čas", "WESZ": "Západoevropský letní čas", "LHDT": "Letní čas ostrova lorda Howa", "CLT": "Chilský standardní čas", "MESZ": "Středoevropský letní čas", "EDT": "Severoamerický východní letní čas", "PST": "Severoamerický pacifický standardní čas", "WITA": "Středoindonéský čas", "GFT": "Francouzskoguyanský čas", "HNNOMX": "Severozápadní mexický standardní čas", "HENOMX": "Severozápadní mexický letní čas", "EST": "Severoamerický východní standardní čas", "AWDT": "Západoaustralský letní čas", "HEEG": "Východogrónský letní čas", "MEZ": "Středoevropský standardní čas", "SAST": "Jihoafrický čas", "∅∅∅": "Amazonský letní čas", "NZST": "Novozélandský standardní čas", "CHADT": "Chathamský letní čas", "COT": "Kolumbijský standardní čas", "HNPM": "Pierre-miquelonský standardní čas", "JDT": "Japonský letní čas", "WAT": "Západoafrický standardní čas", "EAT": "Východoafrický čas", "AST": "Atlantický standardní čas", "SRT": "Surinamský čas", "AEST": "Východoaustralský standardní čas"}, -+ locale: "cs_CZ", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "MST": "MST", "ADT": "ADT", "ART": "ART", "HEPMX": "HEPMX", "WAST": "WAST", "WART": "WART", "TMT": "TMT", "EAT": "EAT", "HNPM": "HNPM", "AEDT": "AEDT", "CLT": "CLT", "NZDT": "NZDT", "HAST": "HAST", "WESZ": "WESZ", "HECU": "HECU", "ACST": "ACST", "∅∅∅": "∅∅∅", "GFT": "GFT", "GYT": "GYT", "NZST": "NZST", "CHAST": "CHAST", "HKST": "HKST", "LHDT": "LHDT", "JST": "JST", "PDT": "PDT", "SGT": "SGT", "MDT": "MDT", "ECT": "ECT", "AST": "AST", "HNNOMX": "HNNOMX", "VET": "VET", "HNPMX": "HNPMX", "HAT": "HAT", "EST": "EST", "GMT": "GMT", "HNOG": "HNOG", "WIB": "WIB", "LHST": "LHST", "HEPM": "HEPM", "AWST": "AWST", "COST": "COST", "ChST": "ChST", "BOT": "BOT", "HNEG": "HNEG", "UYST": "UYST", "AWDT": "AWDT", "JDT": "JDT", "CST": "CST", "ARST": "ARST", "ACDT": "ACDT", "HEEG": "HEEG", "BT": "BT", "CHADT": "CHADT", "AKST": "AKST", "OESZ": "OESZ", "EDT": "EDT", "HKT": "HKT", "WITA": "WITA", "PST": "PST", "AKDT": "AKDT", "HNT": "HNT", "HEOG": "HEOG", "WAT": "WAT", "OEZ": "OEZ", "WARST": "WARST", "WIT": "WIT", "UYT": "UYT", "IST": "IST", "ACWST": "ACWST", "HNCU": "HNCU", "CAT": "CAT", "HADT": "HADT", "MESZ": "MESZ", "HENOMX": "HENOMX", "MYT": "MYT", "ACWDT": "ACWDT", "WEZ": "WEZ", "SAST": "SAST", "CDT": "CDT", "MEZ": "MEZ", "AEST": "AEST", "COT": "COT", "TMST": "TMST", "SRT": "SRT"}, - } - } -  -@@ -164,7 +139,7 @@ func (cs *cs_CZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (cs *cs_CZ) MonthsAbbreviated() []string { -- return cs.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -174,7 +149,7 @@ func (cs *cs_CZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (cs *cs_CZ) MonthsNarrow() []string { -- return cs.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -184,7 +159,7 @@ func (cs *cs_CZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (cs *cs_CZ) MonthsWide() []string { -- return cs.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -230,77 +205,13 @@ func (cs *cs_CZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'cs_CZ' and handles both Whole and Real numbers based on 'v' - func (cs *cs_CZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(cs.group) - 1; j >= 0; j-- { -- b = append(b, cs.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'cs_CZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (cs *cs_CZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cs.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, cs.percentSuffix...) -- -- b = append(b, cs.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'cs_CZ' -@@ -308,58 +219,7 @@ func (cs *cs_CZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(cs.group) - 1; j >= 0; j-- { -- b = append(b, cs.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cs.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, cs.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cs_CZ' -@@ -368,65 +228,7 @@ func (cs *cs_CZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cs.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cs.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(cs.group) - 1; j >= 0; j-- { -- b = append(b, cs.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, cs.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cs.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, cs.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, cs.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'cs_CZ' -@@ -434,27 +236,6 @@ func (cs *cs_CZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -463,17 +244,6 @@ func (cs *cs_CZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,17 +252,6 @@ func (cs *cs_CZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, cs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,19 +260,6 @@ func (cs *cs_CZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, cs.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, cs.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -522,15 +268,6 @@ func (cs *cs_CZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -539,22 +276,6 @@ func (cs *cs_CZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -563,26 +284,6 @@ func (cs *cs_CZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -591,30 +292,5 @@ func (cs *cs_CZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cs.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := cs.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/cu/cu.go b/cu/cu.go -index 76e4103..62645eb 100644 ---- a/cu/cu.go -+++ b/cu/cu.go -@@ -72,7 +72,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"пре́дъ р.\u00a0х.", "по р.\u00a0х."}, -- timezones: map[string]string{"SAST": "SAST", "UYST": "UYST", "ACWST": "ACWST", "HEOG": "HEOG", "AWST": "AWST", "WITA": "WITA", "ACWDT": "ACWDT", "HAT": "HAT", "GMT": "сре́днее вре́мѧ по грі́нꙋичꙋ", "MST": "MST", "HNT": "HNT", "ART": "ART", "AEST": "AEST", "NZDT": "NZDT", "TMST": "TMST", "CST": "среднеамерїка́нское зи́мнее вре́мѧ", "ADT": "а҆тланті́ческое лѣ́тнее вре́мѧ", "WEZ": "западноєѵрѡпе́йское зи́мнее вре́мѧ", "CHAST": "CHAST", "IST": "IST", "AKDT": "AKDT", "WIB": "WIB", "JDT": "JDT", "TMT": "TMT", "WIT": "WIT", "PST": "тихоѻкеа́нское зи́мнее вре́мѧ", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "ACST": "ACST", "ACDT": "ACDT", "WARST": "WARST", "HENOMX": "HENOMX", "HAST": "HAST", "MESZ": "среднеєѵрѡпе́йское лѣ́тнее вре́мѧ", "CLT": "CLT", "HEEG": "HEEG", "MDT": "MDT", "AST": "а҆тланті́ческое зи́мнее вре́мѧ", "GFT": "GFT", "ECT": "ECT", "HEPMX": "HEPMX", "WESZ": "западноєѵрѡпе́йское лѣ́тнее вре́мѧ", "AEDT": "AEDT", "HKST": "HKST", "HEPM": "HEPM", "LHST": "LHST", "OEZ": "восточноєѵрѡпе́йское зи́мнее вре́мѧ", "WART": "WART", "BT": "BT", "HNPM": "HNPM", "HNEG": "HNEG", "OESZ": "восточноєѵрѡпе́йское лѣ́тнее вре́мѧ", "HNNOMX": "HNNOMX", "SGT": "SGT", "EST": "восточноамерїка́нское зи́мнее вре́мѧ", "HNPMX": "HNPMX", "PDT": "тихоѻкеа́нское лѣ́тнее вре́мѧ", "HKT": "HKT", "LHDT": "LHDT", "CHADT": "CHADT", "COT": "COT", "EDT": "восточноамерїка́нское лѣ́тнее вре́мѧ", "EAT": "EAT", "HECU": "HECU", "AKST": "AKST", "MYT": "MYT", "UYT": "UYT", "CLST": "CLST", "JST": "JST", "ChST": "ChST", "COST": "COST", "GYT": "GYT", "ARST": "ARST", "NZST": "NZST", "WAT": "WAT", "CDT": "среднеамерїка́нское лѣ́тнее вре́мѧ", "MEZ": "среднеєѵрѡпе́йское зи́мнее вре́мѧ", "BOT": "BOT", "CAT": "CAT", "WAST": "WAST", "HNCU": "HNCU", "HADT": "HADT", "VET": "VET", "SRT": "SRT", "HNOG": "HNOG"}, -+ timezones: map[string]string{"HNNOMX": "HNNOMX", "PST": "тихоѻкеа́нское зи́мнее вре́мѧ", "PDT": "тихоѻкеа́нское лѣ́тнее вре́мѧ", "WEZ": "западноєѵрѡпе́йское зи́мнее вре́мѧ", "SGT": "SGT", "OESZ": "восточноєѵрѡпе́йское лѣ́тнее вре́мѧ", "SAST": "SAST", "WITA": "WITA", "AST": "а҆тланті́ческое зи́мнее вре́мѧ", "SRT": "SRT", "HEPMX": "HEPMX", "HEOG": "HEOG", "WIB": "WIB", "AWST": "AWST", "LHST": "LHST", "IST": "IST", "∅∅∅": "∅∅∅", "HNOG": "HNOG", "NZST": "NZST", "GMT": "сре́днее вре́мѧ по грі́нꙋичꙋ", "MYT": "MYT", "BT": "BT", "ACDT": "ACDT", "LHDT": "LHDT", "OEZ": "восточноєѵрѡпе́йское зи́мнее вре́мѧ", "HAT": "HAT", "EDT": "восточноамерїка́нское лѣ́тнее вре́мѧ", "ADT": "а҆тланті́ческое лѣ́тнее вре́мѧ", "BOT": "BOT", "ACST": "ACST", "CHAST": "CHAST", "HNCU": "HNCU", "WART": "WART", "EST": "восточноамерїка́нское зи́мнее вре́мѧ", "CLST": "CLST", "MST": "MST", "HECU": "HECU", "WIT": "WIT", "TMT": "TMT", "ARST": "ARST", "UYST": "UYST", "HNPMX": "HNPMX", "AKDT": "AKDT", "COT": "COT", "HKT": "HKT", "CLT": "CLT", "AWDT": "AWDT", "HEPM": "HEPM", "AEDT": "AEDT", "AKST": "AKST", "CDT": "среднеамерїка́нское лѣ́тнее вре́мѧ", "ECT": "ECT", "HENOMX": "HENOMX", "UYT": "UYT", "WAST": "WAST", "GFT": "GFT", "NZDT": "NZDT", "ART": "ART", "MEZ": "среднеєѵрѡпе́йское зи́мнее вре́мѧ", "HNEG": "HNEG", "HNPM": "HNPM", "WAT": "WAT", "COST": "COST", "CAT": "CAT", "CST": "среднеамерїка́нское зи́мнее вре́мѧ", "ChST": "ChST", "HAST": "HAST", "JST": "JST", "TMST": "TMST", "MESZ": "среднеєѵрѡпе́йское лѣ́тнее вре́мѧ", "AEST": "AEST", "HKST": "HKST", "MDT": "MDT", "JDT": "JDT", "WESZ": "западноєѵрѡпе́йское лѣ́тнее вре́мѧ", "ACWST": "ACWST", "ACWDT": "ACWDT", "HNT": "HNT", "WARST": "WARST", "GYT": "GYT", "EAT": "EAT", "HADT": "HADT", "HEEG": "HEEG", "CHADT": "CHADT", "VET": "VET"}, - } - } -  -diff --git a/cu_RU/cu_RU.go b/cu_RU/cu_RU.go -index e74ec10..3a3d723 100644 ---- a/cu_RU/cu_RU.go -+++ b/cu_RU/cu_RU.go -@@ -10,69 +10,45 @@ import ( - ) -  - type cu_RU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'cu_RU' locale - func New() locales.Translator { - return &cu_RU{ -- locale: "cu_RU", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "і҆аⷩ҇", "феⷡ҇", "маⷬ҇", "а҆пⷬ҇", "маꙵ", "і҆ꙋⷩ҇", "і҆ꙋⷧ҇", "а҆́ѵⷢ҇", "сеⷫ҇", "ѻ҆кⷮ", "ноеⷨ", "деⷦ҇"}, -- monthsNarrow: []string{"", "І҆", "Ф", "М", "А҆", "М", "І҆", "І҆", "А҆", "С", "Ѻ҆", "Н", "Д"}, -- monthsWide: []string{"", "і҆аннꙋа́рїа", "феврꙋа́рїа", "ма́рта", "а҆прі́ллїа", "ма́їа", "і҆ꙋ́нїа", "і҆ꙋ́лїа", "а҆́ѵгꙋста", "септе́мврїа", "ѻ҆ктѡ́врїа", "ное́мврїа", "деке́мврїа"}, -- daysAbbreviated: []string{"ндⷧ҇ѧ", "пнⷣе", "втоⷬ҇", "срⷣе", "чеⷦ҇", "пѧⷦ҇", "сꙋⷠ҇"}, -- daysNarrow: []string{"Н", "П", "В", "С", "Ч", "П", "С"}, -- daysShort: []string{"ндⷧ҇ѧ", "пнⷣе", "втоⷬ҇", "срⷣе", "чеⷦ҇", "пѧⷦ҇", "сꙋⷠ҇"}, -- daysWide: []string{"недѣ́лѧ", "понедѣ́льникъ", "вто́рникъ", "среда̀", "четверто́къ", "пѧто́къ", "сꙋббѡ́та"}, -- periodsAbbreviated: []string{"ДП", "ПП"}, -- periodsNarrow: []string{"ДП", "ПП"}, -- periodsWide: []string{"ДП", "ПП"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"пре́дъ р.\u00a0х.", "по р.\u00a0х."}, -- timezones: map[string]string{"LHST": "LHST", "CST": "среднеамерїка́нское зи́мнее вре́мѧ", "ADT": "а҆тланті́ческое лѣ́тнее вре́мѧ", "AWDT": "AWDT", "WAST": "WAST", "SGT": "SGT", "ART": "ART", "PDT": "тихоѻкеа́нское лѣ́тнее вре́мѧ", "HKST": "HKST", "AWST": "AWST", "HEPM": "HEPM", "EST": "восточноамерїка́нское зи́мнее вре́мѧ", "LHDT": "LHDT", "HNEG": "HNEG", "OEZ": "восточноєѵрѡпе́йское зи́мнее вре́мѧ", "COST": "COST", "WARST": "WARST", "SAST": "SAST", "JDT": "JDT", "ChST": "ChST", "CLT": "CLT", "TMT": "TMT", "WAT": "WAT", "HECU": "HECU", "UYST": "UYST", "PST": "тихоѻкеа́нское зи́мнее вре́мѧ", "CHAST": "CHAST", "AEST": "AEST", "HNPM": "HNPM", "HAST": "HAST", "SRT": "SRT", "ACWDT": "ACWDT", "GFT": "GFT", "TMST": "TMST", "ACDT": "ACDT", "EAT": "EAT", "ECT": "ECT", "GYT": "GYT", "WIT": "WIT", "∅∅∅": "∅∅∅", "WART": "WART", "NZST": "NZST", "NZDT": "NZDT", "OESZ": "восточноєѵрѡпе́йское лѣ́тнее вре́мѧ", "CAT": "CAT", "HNCU": "HNCU", "HEPMX": "HEPMX", "WESZ": "западноєѵрѡпе́йское лѣ́тнее вре́мѧ", "ARST": "ARST", "CLST": "CLST", "HEEG": "HEEG", "HNPMX": "HNPMX", "HADT": "HADT", "HEOG": "HEOG", "WITA": "WITA", "IST": "IST", "ACST": "ACST", "COT": "COT", "HNNOMX": "HNNOMX", "VET": "VET", "BT": "BT", "WEZ": "западноєѵрѡпе́йское зи́мнее вре́мѧ", "HENOMX": "HENOMX", "UYT": "UYT", "HAT": "HAT", "HNOG": "HNOG", "MDT": "MDT", "AKST": "AKST", "CHADT": "CHADT", "MYT": "MYT", "WIB": "WIB", "MESZ": "среднеєѵрѡпе́йское лѣ́тнее вре́мѧ", "GMT": "сре́днее вре́мѧ по грі́нꙋичꙋ", "MST": "MST", "EDT": "восточноамерїка́нское лѣ́тнее вре́мѧ", "AKDT": "AKDT", "MEZ": "среднеєѵрѡпе́йское зи́мнее вре́мѧ", "JST": "JST", "CDT": "среднеамерїка́нское лѣ́тнее вре́мѧ", "AST": "а҆тланті́ческое зи́мнее вре́мѧ", "AEDT": "AEDT", "BOT": "BOT", "ACWST": "ACWST", "HNT": "HNT", "HKT": "HKT"}, -+ locale: "cu_RU", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "ACDT": "ACDT", "JDT": "JDT", "AWDT": "AWDT", "SGT": "SGT", "EDT": "EDT", "HKT": "HKT", "HEPMX": "HEPMX", "WESZ": "WESZ", "WAT": "WAT", "HNOG": "HNOG", "BT": "BT", "HNPMX": "HNPMX", "HECU": "HECU", "WARST": "WARST", "WITA": "WITA", "HNEG": "HNEG", "OESZ": "OESZ", "GFT": "GFT", "HKST": "HKST", "MST": "MST", "SRT": "SRT", "EAT": "EAT", "MEZ": "MEZ", "AWST": "AWST", "WAST": "WAST", "AKST": "AKST", "CLT": "CLT", "AST": "AST", "ChST": "ChST", "MESZ": "MESZ", "WEZ": "WEZ", "OEZ": "OEZ", "CDT": "CDT", "BOT": "BOT", "HAST": "HAST", "LHDT": "LHDT", "CHAST": "CHAST", "AKDT": "AKDT", "HAT": "HAT", "HEOG": "HEOG", "WIB": "WIB", "HEEG": "HEEG", "UYST": "UYST", "TMST": "TMST", "CLST": "CLST", "NZDT": "NZDT", "JST": "JST", "CHADT": "CHADT", "UYT": "UYT", "ACWST": "ACWST", "HNCU": "HNCU", "WART": "WART", "WIT": "WIT", "GYT": "GYT", "ECT": "ECT", "GMT": "GMT", "AEST": "AEST", "ACWDT": "ACWDT", "VET": "VET", "∅∅∅": "∅∅∅", "HNT": "HNT", "SAST": "SAST", "TMT": "TMT", "ACST": "ACST", "HENOMX": "HENOMX", "HEPM": "HEPM", "CST": "CST", "NZST": "NZST", "ARST": "ARST", "PDT": "PDT", "COT": "COT", "COST": "COST", "CAT": "CAT", "MDT": "MDT", "HNNOMX": "HNNOMX", "MYT": "MYT", "HNPM": "HNPM", "AEDT": "AEDT", "IST": "IST", "PST": "PST", "EST": "EST", "ADT": "ADT", "ART": "ART", "LHST": "LHST"}, - } - } -  -@@ -118,7 +94,7 @@ func (cu *cu_RU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (cu *cu_RU) MonthsAbbreviated() []string { -- return cu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -128,7 +104,7 @@ func (cu *cu_RU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (cu *cu_RU) MonthsNarrow() []string { -- return cu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -138,7 +114,7 @@ func (cu *cu_RU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (cu *cu_RU) MonthsWide() []string { -- return cu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -184,77 +160,13 @@ func (cu *cu_RU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'cu_RU' and handles both Whole and Real numbers based on 'v' - func (cu *cu_RU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(cu.group) - 1; j >= 0; j-- { -- b = append(b, cu.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'cu_RU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (cu *cu_RU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, cu.percentSuffix...) -- -- b = append(b, cu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'cu_RU' -@@ -262,58 +174,7 @@ func (cu *cu_RU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(cu.group) - 1; j >= 0; j-- { -- b = append(b, cu.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, cu.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cu_RU' -@@ -322,65 +183,7 @@ func (cu *cu_RU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(cu.group) - 1; j >= 0; j-- { -- b = append(b, cu.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, cu.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, cu.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, cu.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'cu_RU' -@@ -388,28 +191,6 @@ func (cu *cu_RU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -418,17 +199,6 @@ func (cu *cu_RU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, cu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -437,17 +207,6 @@ func (cu *cu_RU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, cu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -456,22 +215,6 @@ func (cu *cu_RU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, cu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0xd0, 0xbb}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -480,19 +223,6 @@ func (cu *cu_RU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -501,26 +231,6 @@ func (cu *cu_RU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -529,30 +239,6 @@ func (cu *cu_RU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -561,34 +247,5 @@ func (cu *cu_RU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := cu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/cy/cy.go b/cy/cy.go -index 0db534d..7ebeeef 100644 ---- a/cy/cy.go -+++ b/cy/cy.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"CC", "OC"}, - erasNarrow: []string{"C", "O"}, - erasWide: []string{"Cyn Crist", "Oed Crist"}, -- timezones: map[string]string{"WESZ": "Amser Haf Gorllewin Ewrop", "WITA": "Amser Canolbarth Indonesia", "AEDT": "Amser Haf Dwyrain Awstralia", "CHADT": "Amser Haf Chatham", "SAST": "Amser Safonol De Affrica", "ChST": "Amser Chamorro", "EST": "Amser Safonol Dwyrain Gogledd America", "IST": "Amser India", "WAT": "Amser Safonol Gorllewin Affrica", "HNT": "Amser Safonol Newfoundland", "ARST": "Amser Haf Ariannin", "UYST": "Amser Haf Uruguay", "NZDT": "Amser Haf Seland Newydd", "HEEG": "Amser Haf Dwyrain yr Ynys Las", "OESZ": "Amser Haf Dwyrain Ewrop", "CST": "Amser Safonol Canolbarth Gogledd America", "ACWDT": "Amser Haf Canolbarth Gorllewin Awstralia", "HKT": "Amser Safonol Hong Kong", "COST": "Amser Haf Colombia", "SGT": "Amser Singapore", "CDT": "Amser Haf Canolbarth Gogledd America", "GYT": "Amser Guyana", "MESZ": "Amser Haf Canolbarth Ewrop", "HNEG": "Amser Safonol Dwyrain yr Ynys Las", "HENOMX": "Amser Haf Gogledd Orllewin Mecsico", "WIB": "Amser Gorllewin Indonesia", "CHAST": "Amser Safonol Chatham", "TMST": "Amser Haf Tyrcmenistan", "HNCU": "Amser Safonol Cuba", "HADT": "Amser Haf Hawaii-Aleutian", "AEST": "Amser Safonol Dwyrain Awstralia", "HEPM": "Amser Haf Saint-Pierre-et-Miquelon", "∅∅∅": "Amser Haf Amazonas", "COT": "Amser Safonol Colombia", "GMT": "Amser Safonol Greenwich", "HEOG": "Amser Haf Gorllewin yr Ynys Las", "WART": "Amser Safonol Gorllewin Ariannin", "AST": "Amser Safonol Cefnfor yr Iwerydd", "HAST": "Amser Safonol Hawaii-Aleutian", "LHST": "Amser Safonol yr Arglwydd Howe", "JST": "Amser Safonol Siapan", "WAST": "Amser Haf Gorllewin Affrica", "OEZ": "Amser Safonol Dwyrain Ewrop", "HEPMX": "Amser Haf Pasiffig Mecsico", "VET": "Amser Venezuela", "SRT": "Amser Suriname", "PST": "Amser Safonol Cefnfor Tawel Gogledd America", "ACST": "Amser Safonol Canolbarth Awstralia", "ACDT": "Amser Haf Canolbarth Awstralia", "EAT": "Amser Dwyrain Affrica", "HNPMX": "Amser Safonol Pasiffig Mecsico", "PDT": "Amser Haf Cefnfor Tawel Gogledd America", "AKDT": "Amser Haf Alaska", "WIT": "Amser Dwyrain Indonesia", "AWDT": "Amser Haf Gorllewin Awstralia", "GFT": "Amser Guyane Ffrengig", "MDT": "MDT", "EDT": "Amser Haf Dwyrain Gogledd America", "AKST": "Amser Safonol Alaska", "HNPM": "Amser Safonol Saint-Pierre-et-Miquelon", "CLT": "Amser Safonol Chile", "CAT": "Amser Canolbarth Affrica", "UYT": "Amser Safonol Uruguay", "HKST": "Amser Haf Hong Kong", "LHDT": "Amser Haf yr Arglwydd Howe", "WEZ": "Amser Safonol Gorllewin Ewrop", "ART": "Amser Safonol Ariannin", "HNOG": "Amser Safonol Gorllewin yr Ynys Las", "WARST": "Amser Haf Gorllewin Ariannin", "HECU": "Amser Haf Cuba", "MYT": "Amser Malaysia", "BT": "Amser Bhutan", "MEZ": "Amser Safonol Canolbarth Ewrop", "BOT": "Amser Bolivia", "TMT": "Amser Safonol Tyrcmenistan", "ECT": "Amser Ecuador", "AWST": "Amser Safonol Gorllewin Awstralia", "CLST": "Amser Haf Chile", "JDT": "Amser Haf Siapan", "MST": "MST", "ACWST": "Amser Safonol Canolbarth Gorllewin Awstralia", "NZST": "Amser Safonol Seland Newydd", "HNNOMX": "Amser Safonol Gogledd Orllewin Mecsico", "ADT": "Amser Haf Cefnfor yr Iwerydd", "HAT": "Amser Haf Newfoundland"}, -+ timezones: map[string]string{"∅∅∅": "Amser Haf Brasília", "CAT": "Amser Canolbarth Affrica", "MDT": "MDT", "HAST": "Amser Safonol Hawaii-Aleutian", "UYST": "Amser Haf Uruguay", "OEZ": "Amser Safonol Dwyrain Ewrop", "EST": "Amser Safonol Dwyrain Gogledd America", "MST": "MST", "HNPM": "Amser Safonol Saint-Pierre-et-Miquelon", "MYT": "Amser Malaysia", "HECU": "Amser Haf Cuba", "WART": "Amser Safonol Gorllewin Ariannin", "COT": "Amser Safonol Colombia", "TMST": "Amser Haf Tyrcmenistan", "ARST": "Amser Haf Ariannin", "AST": "Amser Safonol Cefnfor yr Iwerydd", "PST": "Amser Safonol Cefnfor Tawel Gogledd America", "HNPMX": "Amser Safonol Pasiffig Mecsico", "WIT": "Amser Dwyrain Indonesia", "TMT": "Amser Safonol Tyrcmenistan", "WIB": "Amser Gorllewin Indonesia", "BOT": "Amser Bolivia", "AWDT": "Amser Haf Gorllewin Awstralia", "HNCU": "Amser Safonol Cuba", "WAT": "Amser Safonol Gorllewin Affrica", "AKDT": "Amser Haf Alaska", "HEOG": "Amser Haf Gorllewin yr Ynys Las", "NZST": "Amser Safonol Seland Newydd", "JST": "Amser Safonol Siapan", "HNOG": "Amser Safonol Gorllewin yr Ynys Las", "ChST": "Amser Chamorro", "AWST": "Amser Safonol Gorllewin Awstralia", "HNT": "Amser Safonol Newfoundland", "HKT": "Amser Safonol Hong Kong", "HKST": "Amser Haf Hong Kong", "ART": "Amser Safonol Ariannin", "MEZ": "Amser Safonol Canolbarth Ewrop", "ACDT": "Amser Haf Canolbarth Awstralia", "HNEG": "Amser Safonol Dwyrain yr Ynys Las", "CHAST": "Amser Safonol Chatham", "PDT": "Amser Haf Cefnfor Tawel Gogledd America", "GYT": "Amser Guyana", "COST": "Amser Haf Colombia", "CLST": "Amser Haf Chile", "ADT": "Amser Haf Cefnfor yr Iwerydd", "EAT": "Amser Dwyrain Affrica", "OESZ": "Amser Haf Dwyrain Ewrop", "LHST": "Amser Safonol yr Arglwydd Howe", "AKST": "Amser Safonol Alaska", "WARST": "Amser Haf Gorllewin Ariannin", "ACWST": "Amser Safonol Canolbarth Gorllewin Awstralia", "WEZ": "Amser Safonol Gorllewin Ewrop", "MESZ": "Amser Haf Canolbarth Ewrop", "HEEG": "Amser Haf Dwyrain yr Ynys Las", "CHADT": "Amser Haf Chatham", "SGT": "Amser Singapore", "WITA": "Amser Canolbarth Indonesia", "ECT": "Amser Ecuador", "CST": "Amser Safonol Canolbarth Gogledd America", "HNNOMX": "Amser Safonol Gogledd Orllewin Mecsico", "AEDT": "Amser Haf Dwyrain Awstralia", "VET": "Amser Venezuela", "WAST": "Amser Haf Gorllewin Affrica", "GFT": "Amser Guyane Ffrengig", "CDT": "Amser Haf Canolbarth Gogledd America", "NZDT": "Amser Haf Seland Newydd", "GMT": "Amser Safonol Greenwich", "HEPM": "Amser Haf Saint-Pierre-et-Miquelon", "HEPMX": "Amser Haf Pasiffig Mecsico", "HAT": "Amser Haf Newfoundland", "EDT": "Amser Haf Dwyrain Gogledd America", "HADT": "Amser Haf Hawaii-Aleutian", "ACWDT": "Amser Haf Canolbarth Gorllewin Awstralia", "AEST": "Amser Safonol Dwyrain Awstralia", "WESZ": "Amser Haf Gorllewin Ewrop", "CLT": "Amser Safonol Chile", "JDT": "Amser Haf Siapan", "LHDT": "Amser Haf yr Arglwydd Howe", "IST": "Amser India", "BT": "Amser Bhutan", "SAST": "Amser Safonol De Affrica", "SRT": "Amser Suriname", "HENOMX": "Amser Haf Gogledd Orllewin Mecsico", "ACST": "Amser Safonol Canolbarth Awstralia", "UYT": "Amser Safonol Uruguay"}, - } - } -  -diff --git a/cy_GB/cy_GB.go b/cy_GB/cy_GB.go -index 3a8051f..d96409b 100644 ---- a/cy_GB/cy_GB.go -+++ b/cy_GB/cy_GB.go -@@ -10,68 +10,45 @@ import ( - ) -  - type cy_GB struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'cy_GB' locale - func New() locales.Translator { - return &cy_GB{ -- locale: "cy_GB", -- pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 3, 4, 5, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Ion", "Chwef", "Maw", "Ebrill", "Mai", "Meh", "Gorff", "Awst", "Medi", "Hyd", "Tach", "Rhag"}, -- monthsNarrow: []string{"", "I", "Ch", "M", "E", "M", "M", "G", "A", "M", "H", "T", "Rh"}, -- monthsWide: []string{"", "Ionawr", "Chwefror", "Mawrth", "Ebrill", "Mai", "Mehefin", "Gorffennaf", "Awst", "Medi", "Hydref", "Tachwedd", "Rhagfyr"}, -- daysAbbreviated: []string{"Sul", "Llun", "Maw", "Mer", "Iau", "Gwen", "Sad"}, -- daysNarrow: []string{"S", "Ll", "M", "M", "I", "G", "S"}, -- daysShort: []string{"Su", "Ll", "Ma", "Me", "Ia", "Gw", "Sa"}, -- daysWide: []string{"Dydd Sul", "Dydd Llun", "Dydd Mawrth", "Dydd Mercher", "Dydd Iau", "Dydd Gwener", "Dydd Sadwrn"}, -- periodsAbbreviated: []string{"yb", "yh"}, -- periodsNarrow: []string{"b", "h"}, -- periodsWide: []string{"yb", "yh"}, -- erasAbbreviated: []string{"CC", "OC"}, -- erasNarrow: []string{"C", "O"}, -- erasWide: []string{"Cyn Crist", "Oed Crist"}, -- timezones: map[string]string{"EAT": "Amser Dwyrain Affrica", "WIB": "Amser Gorllewin Indonesia", "HAST": "Amser Safonol Hawaii-Aleutian", "CHAST": "Amser Safonol Chatham", "CLT": "Amser Safonol Chile", "GFT": "Amser Guyane Ffrengig", "BOT": "Amser Bolivia", "HNEG": "Amser Safonol Dwyrain yr Ynys Las", "HENOMX": "Amser Haf Gogledd Orllewin Mecsico", "HADT": "Amser Haf Hawaii-Aleutian", "MEZ": "Amser Safonol Canolbarth Ewrop", "LHST": "Amser Safonol yr Arglwydd Howe", "IST": "Amser India", "CDT": "Amser Haf Canolbarth Gogledd America", "AKST": "Amser Safonol Alaska", "BT": "Amser Bhutan", "ART": "Amser Safonol Ariannin", "HNOG": "Amser Safonol Gorllewin yr Ynys Las", "JST": "Amser Safonol Siapan", "TMT": "Amser Safonol Tyrcmenistan", "TMST": "Amser Haf Tyrcmenistan", "UYST": "Amser Haf Uruguay", "PDT": "Amser Haf Cefnfor Tawel Gogledd America", "CLST": "Amser Haf Chile", "ACDT": "Amser Haf Canolbarth Awstralia", "PST": "Amser Safonol Cefnfor Tawel Gogledd America", "AEDT": "Amser Haf Dwyrain Awstralia", "HKST": "Amser Haf Hong Kong", "WARST": "Amser Haf Gorllewin Ariannin", "AST": "Amser Safonol Cefnfor yr Iwerydd", "MDT": "Amser Haf Mynyddoedd Gogledd America", "WITA": "Amser Canolbarth Indonesia", "HNPM": "Amser Safonol Saint-Pierre-et-Miquelon", "CHADT": "Amser Haf Chatham", "NZST": "Amser Safonol Seland Newydd", "HEEG": "Amser Haf Dwyrain yr Ynys Las", "UYT": "Amser Safonol Uruguay", "MST": "Amser Safonol Mynyddoedd Gogledd America", "ARST": "Amser Haf Ariannin", "OESZ": "Amser Haf Dwyrain Ewrop", "WAST": "Amser Haf Gorllewin Affrica", "AEST": "Amser Safonol Dwyrain Awstralia", "AWDT": "Amser Haf Gorllewin Awstralia", "WAT": "Amser Safonol Gorllewin Affrica", "HNNOMX": "Amser Safonol Gogledd Orllewin Mecsico", "WART": "Amser Safonol Gorllewin Ariannin", "ADT": "Amser Haf Cefnfor yr Iwerydd", "HEPM": "Amser Haf Saint-Pierre-et-Miquelon", "ChST": "Amser Chamorro", "ECT": "Amser Ecuador", "COT": "Amser Safonol Colombia", "HECU": "Amser Haf Cuba", "EST": "Amser Safonol Dwyrain Gogledd America", "HEPMX": "Amser Haf Pasiffig Mecsico", "HAT": "Amser Haf Newfoundland", "WESZ": "Amser Haf Gorllewin Ewrop", "LHDT": "Amser Haf yr Arglwydd Howe", "SGT": "Amser Singapore", "MYT": "Amser Malaysia", "WIT": "Amser Dwyrain Indonesia", "HNT": "Amser Safonol Newfoundland", "ACWDT": "Amser Haf Canolbarth Gorllewin Awstralia", "MESZ": "Amser Haf Canolbarth Ewrop", "JDT": "Amser Haf Siapan", "EDT": "Amser Haf Dwyrain Gogledd America", "CST": "Amser Safonol Canolbarth Gogledd America", "VET": "Amser Venezuela", "SRT": "Amser Suriname", "ACWST": "Amser Safonol Canolbarth Gorllewin Awstralia", "OEZ": "Amser Safonol Dwyrain Ewrop", "GYT": "Amser Guyana", "HKT": "Amser Safonol Hong Kong", "∅∅∅": "Amser Haf Amazonas", "ACST": "Amser Safonol Canolbarth Awstralia", "CAT": "Amser Canolbarth Affrica", "GMT": "Amser Safonol Greenwich", "HEOG": "Amser Haf Gorllewin yr Ynys Las", "WEZ": "Amser Safonol Gorllewin Ewrop", "HNPMX": "Amser Safonol Pasiffig Mecsico", "AKDT": "Amser Haf Alaska", "AWST": "Amser Safonol Gorllewin Awstralia", "NZDT": "Amser Haf Seland Newydd", "SAST": "Amser Safonol De Affrica", "COST": "Amser Haf Colombia", "HNCU": "Amser Safonol Cuba"}, -+ locale: "cy_GB", -+ pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{1, 2, 3, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 3, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MDT": "MDT", "ART": "ART", "ADT": "ADT", "HNPM": "HNPM", "NZST": "NZST", "NZDT": "NZDT", "CST": "CST", "HNT": "HNT", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "WAT": "WAT", "HECU": "HECU", "WEZ": "WEZ", "HNOG": "HNOG", "TMT": "TMT", "CDT": "CDT", "LHST": "LHST", "AEDT": "AEDT", "AKDT": "AKDT", "CLT": "CLT", "EAT": "EAT", "MEZ": "MEZ", "HEPMX": "HEPMX", "SGT": "SGT", "AKST": "AKST", "COT": "COT", "MST": "MST", "HEPM": "HEPM", "CHAST": "CHAST", "UYST": "UYST", "PST": "PST", "WARST": "WARST", "EDT": "EDT", "ChST": "ChST", "ARST": "ARST", "UYT": "UYT", "SAST": "SAST", "TMST": "TMST", "HKST": "HKST", "AST": "AST", "HEEG": "HEEG", "COST": "COST", "GYT": "GYT", "HENOMX": "HENOMX", "JST": "JST", "IST": "IST", "WITA": "WITA", "MESZ": "MESZ", "GFT": "GFT", "CHADT": "CHADT", "OEZ": "OEZ", "HAT": "HAT", "ECT": "ECT", "ACST": "ACST", "AEST": "AEST", "HNCU": "HNCU", "HNPMX": "HNPMX", "OESZ": "OESZ", "WIT": "WIT", "HEOG": "HEOG", "CLST": "CLST", "HAST": "HAST", "HADT": "HADT", "EST": "EST", "BT": "BT", "VET": "VET", "WAST": "WAST", "HKT": "HKT", "CAT": "CAT", "BOT": "BOT", "ACDT": "ACDT", "LHDT": "LHDT", "ACWDT": "ACWDT", "PDT": "PDT", "∅∅∅": "∅∅∅", "WIB": "WIB", "SRT": "SRT", "GMT": "GMT", "JDT": "JDT", "WART": "WART", "AWDT": "AWDT", "ACWST": "ACWST", "HNEG": "HNEG", "MYT": "MYT", "AWST": "AWST"}, - } - } -  -@@ -192,7 +169,7 @@ func (cy *cy_GB) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (cy *cy_GB) MonthsAbbreviated() []string { -- return cy.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -202,7 +179,7 @@ func (cy *cy_GB) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (cy *cy_GB) MonthsNarrow() []string { -- return cy.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -212,7 +189,7 @@ func (cy *cy_GB) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (cy *cy_GB) MonthsWide() []string { -- return cy.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -258,73 +235,13 @@ func (cy *cy_GB) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'cy_GB' and handles both Whole and Real numbers based on 'v' - func (cy *cy_GB) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, cy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'cy_GB' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (cy *cy_GB) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cy.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, cy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, cy.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'cy_GB' -@@ -332,56 +249,7 @@ func (cy *cy_GB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cy.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, cy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, cy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cy_GB' -@@ -390,68 +258,7 @@ func (cy *cy_GB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := cy.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, cy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, cy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, cy.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, cy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, cy.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'cy_GB' -@@ -459,27 +266,6 @@ func (cy *cy_GB) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -488,17 +274,6 @@ func (cy *cy_GB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cy.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -507,17 +282,6 @@ func (cy *cy_GB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -526,19 +290,6 @@ func (cy *cy_GB) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, cy.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, cy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -547,19 +298,6 @@ func (cy *cy_GB) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -568,26 +306,6 @@ func (cy *cy_GB) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -596,30 +314,6 @@ func (cy *cy_GB) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -628,34 +322,5 @@ func (cy *cy_GB) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, cy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := cy.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/da/da.go b/da/da.go -index 4e5b9a7..a3314f2 100644 ---- a/da/da.go -+++ b/da/da.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "e.Kr."}, - erasNarrow: []string{"fKr", "eKr"}, - erasWide: []string{"f.Kr.", "e.Kr."}, -- timezones: map[string]string{"HNPM": "Saint Pierre- og Miquelon-normaltid", "CAT": "Centralafrikansk tid", "EST": "Eastern-normaltid", "MYT": "Malaysisk tid", "ACWST": "Vestlig centralaustralsk normaltid", "NZST": "Newzealandsk normaltid", "AST": "Atlantic-normaltid", "UYT": "Uruguayansk normaltid", "WEZ": "Vesteuropæisk normaltid", "COST": "Colombiansk sommertid", "GMT": "GMT", "EDT": "Eastern-sommertid", "PDT": "Pacific-sommertid", "HKT": "Hongkong-normaltid", "CLT": "Chilensk normaltid", "∅∅∅": "Amazonas-sommertid", "SRT": "Surinam-tid", "HKST": "Hongkong-sommertid", "CLST": "Chilensk sommertid", "HEEG": "Østgrønlandsk sommertid", "WAT": "Vestafrikansk normaltid", "SGT": "Singaporeansk normaltid", "AEST": "Østaustralsk normaltid", "AKST": "Alaska-normaltid", "ACWDT": "Vestlig centralaustralsk sommertid", "SAST": "Sydafrikansk tid", "TMT": "Turkmensk normaltid", "WARST": "Vestargentinsk sommertid", "AKDT": "Alaska-sommertid", "WIB": "Vestindonesisk tid", "COT": "Colombiansk normaltid", "HNNOMX": "Nordvestmexicansk normaltid", "UYST": "Uruguayansk sommertid", "WESZ": "Vesteuropæisk sommertid", "ART": "Argentinsk normaltid", "AEDT": "Østaustralsk sommertid", "HAT": "Newfoundlandsk sommertid", "MEZ": "Centraleuropæisk normaltid", "CHAST": "Chatham-normaltid", "BOT": "Boliviansk tid", "HENOMX": "Nordvestmexicansk sommertid", "HEPMX": "Mexicansk Pacific-sommertid", "PST": "Pacific-normaltid", "ChST": "Chamorro-tid", "HNEG": "Østgrønlandsk normaltid", "GFT": "Fransk Guyana-tid", "ACDT": "Centralaustralsk sommertid", "CST": "Central-normaltid", "ARST": "Argentinsk sommertid", "OEZ": "Østeuropæisk normaltid", "HNPMX": "Mexicansk Pacific-normaltid", "CDT": "Central-sommertid", "ADT": "Atlantic-sommertid", "GYT": "Guyana-tid", "HNT": "Newfoundlandsk normaltid", "HEPM": "Saint Pierre- og Miquelon-sommertid", "EAT": "Østafrikansk tid", "HNCU": "Cubansk normaltid", "HECU": "Cubansk sommertid", "MESZ": "Centraleuropæisk sommertid", "IST": "Indisk normaltid", "JDT": "Japansk sommertid", "TMST": "Turkmensk sommertid", "MST": "Macao-normaltid", "HAST": "Hawaii-Aleutian-normaltid", "AWDT": "Vestaustralsk sommertid", "JST": "Japansk normaltid", "ACST": "Centralaustralsk normaltid", "OESZ": "Østeuropæisk sommertid", "MDT": "Macao-sommertid", "HADT": "Hawaii-Aleutian-sommertid", "BT": "Bhutanesisk tid", "WIT": "Østindonesisk tid", "HNOG": "Vestgrønlandsk normaltid", "LHST": "Lord Howe-normaltid", "NZDT": "Newzealandsk sommertid", "CHADT": "Chatham-sommertid", "ECT": "Ecuadoriansk tid", "WART": "Vestargentinsk normaltid", "VET": "Venezuelansk tid", "HEOG": "Vestgrønlandsk sommertid", "WITA": "Centralindonesisk tid", "LHDT": "Lord Howe-sommertid", "WAST": "Vestafrikansk sommertid", "AWST": "Vestaustralsk normaltid"}, -+ timezones: map[string]string{"OEZ": "Østeuropæisk normaltid", "WITA": "Centralindonesisk tid", "LHST": "Lord Howe-normaltid", "CDT": "Central-sommertid", "ADT": "Atlantic-sommertid", "HNEG": "Østgrønlandsk normaltid", "ACWDT": "Vestlig centralaustralsk sommertid", "CHADT": "Chatham-sommertid", "HNCU": "Cubansk normaltid", "COT": "Colombiansk normaltid", "SRT": "Surinam-tid", "HENOMX": "Nordvestmexicansk sommertid", "AEST": "Østaustralsk normaltid", "UYT": "Uruguayansk normaltid", "WESZ": "Vesteuropæisk sommertid", "HAT": "Newfoundlandsk sommertid", "WART": "Vestargentinsk normaltid", "EDT": "Eastern-sommertid", "HKST": "Hongkong-sommertid", "HADT": "Hawaii-Aleutian-sommertid", "ACDT": "Centralaustralsk sommertid", "BT": "Bhutanesisk tid", "HNOG": "Vestgrønlandsk normaltid", "HEOG": "Vestgrønlandsk sommertid", "CAT": "Centralafrikansk tid", "MST": "Macao-normaltid", "NZST": "Newzealandsk normaltid", "ECT": "Ecuadoriansk tid", "LHDT": "Lord Howe-sommertid", "∅∅∅": "Brasiliansk sommertid", "TMST": "Turkmensk sommertid", "ARST": "Argentinsk sommertid", "AWST": "Vestaustralsk normaltid", "MYT": "Malaysisk tid", "PST": "Pacific-normaltid", "ACWST": "Vestlig centralaustralsk normaltid", "VET": "Venezuelansk tid", "HEPMX": "Mexicansk Pacific-sommertid", "WAST": "Vestafrikansk sommertid", "COST": "Colombiansk sommertid", "HKT": "Hongkong-normaltid", "HEEG": "Østgrønlandsk sommertid", "HECU": "Cubansk sommertid", "TMT": "Turkmensk normaltid", "BOT": "Boliviansk tid", "ACST": "Centralaustralsk normaltid", "HNPM": "Saint Pierre- og Miquelon-normaltid", "HEPM": "Saint Pierre- og Miquelon-sommertid", "IST": "Indisk normaltid", "GYT": "Guyana-tid", "CLST": "Chilensk sommertid", "GMT": "GMT", "ART": "Argentinsk normaltid", "HAST": "Hawaii-Aleutian-normaltid", "JDT": "Japansk sommertid", "AKDT": "Alaska-sommertid", "ChST": "Chamorro-tid", "WEZ": "Vesteuropæisk normaltid", "WARST": "Vestargentinsk sommertid", "WIB": "Vestindonesisk tid", "AWDT": "Vestaustralsk sommertid", "SAST": "Sydafrikansk tid", "MESZ": "Centraleuropæisk sommertid", "PDT": "Pacific-sommertid", "CHAST": "Chatham-normaltid", "CLT": "Chilensk normaltid", "CST": "Central-normaltid", "MDT": "Macao-sommertid", "JST": "Japansk normaltid", "AEDT": "Østaustralsk sommertid", "HNPMX": "Mexicansk Pacific-normaltid", "HNT": "Newfoundlandsk normaltid", "WIT": "Østindonesisk tid", "NZDT": "Newzealandsk sommertid", "MEZ": "Centraleuropæisk normaltid", "HNNOMX": "Nordvestmexicansk normaltid", "UYST": "Uruguayansk sommertid", "SGT": "Singaporeansk normaltid", "OESZ": "Østeuropæisk sommertid", "GFT": "Fransk Guyana-tid", "EST": "Eastern-normaltid", "AST": "Atlantic-normaltid", "EAT": "Østafrikansk tid", "WAT": "Vestafrikansk normaltid", "AKST": "Alaska-normaltid"}, - } - } -  -diff --git a/da_DK/da_DK.go b/da_DK/da_DK.go -index 9a945fa..d0d0f24 100644 ---- a/da_DK/da_DK.go -+++ b/da_DK/da_DK.go -@@ -10,70 +10,45 @@ import ( - ) -  - type da_DK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'da_DK' locale - func New() locales.Translator { - return &da_DK{ -- locale: "da_DK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "maj", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sø", "ma", "ti", "on", "to", "fr", "lø"}, -- daysWide: []string{"søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"fKr", "eKr"}, -- erasWide: []string{"f.Kr.", "e.Kr."}, -- timezones: map[string]string{"JDT": "Japansk sommertid", "VET": "Venezuelansk tid", "ARST": "Argentinsk sommertid", "HNPM": "Saint Pierre- og Miquelon-normaltid", "AWST": "Vestaustralsk normaltid", "GFT": "Fransk Guyana-tid", "AST": "Atlantic-normaltid", "HADT": "Hawaii-Aleutian-sommertid", "AEDT": "Østaustralsk sommertid", "HEEG": "Østgrønlandsk sommertid", "PST": "Pacific-normaltid", "AEST": "Østaustralsk normaltid", "CLT": "Chilensk normaltid", "TMST": "Turkmensk sommertid", "ACWST": "Vestlig centralaustralsk normaltid", "MESZ": "Centraleuropæisk sommertid", "WAT": "Vestafrikansk normaltid", "MST": "Macao-normaltid", "SRT": "Surinam-tid", "LHDT": "Lord Howe-sommertid", "HKT": "Hongkong-normaltid", "HKST": "Hongkong-sommertid", "ACDT": "Centralaustralsk sommertid", "WARST": "Vestargentinsk sommertid", "UYST": "Uruguayansk sommertid", "WIT": "Østindonesisk tid", "ACWDT": "Vestlig centralaustralsk sommertid", "HAT": "Newfoundlandsk sommertid", "AWDT": "Vestaustralsk sommertid", "SAST": "Sydafrikansk tid", "WART": "Vestargentinsk normaltid", "SGT": "Singaporeansk normaltid", "HAST": "Hawaii-Aleutian-normaltid", "ECT": "Ecuadoriansk tid", "COT": "Colombiansk normaltid", "EDT": "Eastern-sommertid", "UYT": "Uruguayansk normaltid", "IST": "Indisk normaltid", "CLST": "Chilensk sommertid", "ChST": "Chamorro-tid", "ACST": "Centralaustralsk normaltid", "CHAST": "Chatham-normaltid", "MEZ": "Centraleuropæisk normaltid", "WIB": "Vestindonesisk tid", "BOT": "Boliviansk tid", "OESZ": "Østeuropæisk sommertid", "CDT": "Central-sommertid", "ADT": "Atlantic-sommertid", "MDT": "Macao-sommertid", "HNPMX": "Mexicansk Pacific-normaltid", "HEPM": "Saint Pierre- og Miquelon-sommertid", "LHST": "Lord Howe-normaltid", "WAST": "Vestafrikansk sommertid", "HNNOMX": "Nordvestmexicansk normaltid", "HNCU": "Cubansk normaltid", "GMT": "GMT", "WITA": "Centralindonesisk tid", "HECU": "Cubansk sommertid", "BT": "Bhutanesisk tid", "ART": "Argentinsk normaltid", "PDT": "Pacific-sommertid", "HNEG": "Østgrønlandsk normaltid", "OEZ": "Østeuropæisk normaltid", "AKST": "Alaska-normaltid", "WESZ": "Vesteuropæisk sommertid", "CST": "Central-normaltid", "MYT": "Malaysisk tid", "HNT": "Newfoundlandsk normaltid", "HNOG": "Vestgrønlandsk normaltid", "∅∅∅": "Amazonas-sommertid", "EAT": "Østafrikansk tid", "CAT": "Centralafrikansk tid", "AKDT": "Alaska-sommertid", "TMT": "Turkmensk normaltid", "HENOMX": "Nordvestmexicansk sommertid", "EST": "Eastern-normaltid", "WEZ": "Vesteuropæisk normaltid", "HEOG": "Vestgrønlandsk sommertid", "NZST": "Newzealandsk normaltid", "NZDT": "Newzealandsk sommertid", "CHADT": "Chatham-sommertid", "JST": "Japansk normaltid", "COST": "Colombiansk sommertid", "HEPMX": "Mexicansk Pacific-sommertid", "GYT": "Guyana-tid"}, -+ locale: "da_DK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "HAST": "HAST", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "CLT": "CLT", "NZST": "NZST", "VET": "VET", "EDT": "EDT", "AST": "AST", "ART": "ART", "EAT": "EAT", "HADT": "HADT", "ACDT": "ACDT", "HNPM": "HNPM", "CHADT": "CHADT", "WAST": "WAST", "WART": "WART", "TMST": "TMST", "CST": "CST", "AWST": "AWST", "WESZ": "WESZ", "GFT": "GFT", "COST": "COST", "UYST": "UYST", "HEPMX": "HEPMX", "OESZ": "OESZ", "HAT": "HAT", "GYT": "GYT", "NZDT": "NZDT", "HEEG": "HEEG", "HNPMX": "HNPMX", "HNOG": "HNOG", "WITA": "WITA", "WIB": "WIB", "HENOMX": "HENOMX", "MYT": "MYT", "EST": "EST", "CAT": "CAT", "ECT": "ECT", "MEZ": "MEZ", "HECU": "HECU", "OEZ": "OEZ", "CLST": "CLST", "MDT": "MDT", "ADT": "ADT", "IST": "IST", "SGT": "SGT", "COT": "COT", "∅∅∅": "∅∅∅", "GMT": "GMT", "HEPM": "HEPM", "JDT": "JDT", "PST": "PST", "WEZ": "WEZ", "HKST": "HKST", "CDT": "CDT", "AEST": "AEST", "CHAST": "CHAST", "UYT": "UYT", "WARST": "WARST", "HEOG": "HEOG", "MST": "MST", "BT": "BT", "AKDT": "AKDT", "SAST": "SAST", "ARST": "ARST", "BOT": "BOT", "HNEG": "HNEG", "ACWST": "ACWST", "WIT": "WIT", "ChST": "ChST", "SRT": "SRT", "HNCU": "HNCU", "WAT": "WAT", "HKT": "HKT", "ACST": "ACST", "LHDT": "LHDT", "JST": "JST", "PDT": "PDT", "ACWDT": "ACWDT", "TMT": "TMT", "MESZ": "MESZ", "AWDT": "AWDT", "LHST": "LHST", "AKST": "AKST"}, - } - } -  -@@ -141,7 +116,7 @@ func (da *da_DK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (da *da_DK) MonthsAbbreviated() []string { -- return da.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -151,7 +126,7 @@ func (da *da_DK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (da *da_DK) MonthsNarrow() []string { -- return da.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -161,7 +136,7 @@ func (da *da_DK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (da *da_DK) MonthsWide() []string { -- return da.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -207,75 +182,13 @@ func (da *da_DK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'da_DK' and handles both Whole and Real numbers based on 'v' - func (da *da_DK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, da.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, da.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'da_DK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (da *da_DK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, da.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, da.percentSuffix...) -- -- b = append(b, da.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'da_DK' -@@ -283,56 +196,7 @@ func (da *da_DK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := da.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, da.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, da.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, da.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, da.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'da_DK' -@@ -341,63 +205,7 @@ func (da *da_DK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := da.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, da.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, da.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, da.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, da.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, da.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'da_DK' -@@ -405,27 +213,6 @@ func (da *da_DK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,17 +221,6 @@ func (da *da_DK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, da.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -453,17 +229,6 @@ func (da *da_DK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, da.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,20 +237,6 @@ func (da *da_DK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, da.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20, 0x64, 0x65, 0x6e}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, da.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -494,19 +245,6 @@ func (da *da_DK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -515,26 +253,6 @@ func (da *da_DK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -543,30 +261,6 @@ func (da *da_DK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -575,34 +269,5 @@ func (da *da_DK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := da.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/da_GL/da_GL.go b/da_GL/da_GL.go -index 5aa46bb..1d1e937 100644 ---- a/da_GL/da_GL.go -+++ b/da_GL/da_GL.go -@@ -10,70 +10,45 @@ import ( - ) -  - type da_GL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'da_GL' locale - func New() locales.Translator { - return &da_GL{ -- locale: "da_GL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "maj", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sø", "ma", "ti", "on", "to", "fr", "lø"}, -- daysWide: []string{"søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"fKr", "eKr"}, -- erasWide: []string{"f.Kr.", "e.Kr."}, -- timezones: map[string]string{"HNNOMX": "Nordvestmexicansk normaltid", "COST": "Colombiansk sommertid", "WEZ": "Vesteuropæisk normaltid", "MEZ": "Centraleuropæisk normaltid", "TMT": "Turkmensk normaltid", "SAST": "Sydafrikansk tid", "∅∅∅": "Amazonas-sommertid", "CDT": "Central-sommertid", "JDT": "Japansk sommertid", "WART": "Vestargentinsk normaltid", "HNPMX": "Mexicansk Pacific-normaltid", "HEPMX": "Mexicansk Pacific-sommertid", "GYT": "Guyana-tid", "SRT": "Surinam-tid", "ART": "Argentinsk normaltid", "AWDT": "Vestaustralsk sommertid", "IST": "Indisk normaltid", "COT": "Colombiansk normaltid", "ARST": "Argentinsk sommertid", "HNOG": "Vestgrønlandsk normaltid", "CHAST": "Chatham-normaltid", "SGT": "Singaporeansk normaltid", "AEDT": "Østaustralsk sommertid", "NZST": "Newzealandsk normaltid", "EAT": "Østafrikansk tid", "ACWST": "Vestlig centralaustralsk normaltid", "PDT": "Pacific-sommertid", "HKST": "Hongkong-sommertid", "JST": "Japansk normaltid", "MST": "Mountain-normaltid", "MDT": "Mountain-sommertid", "WIT": "Østindonesisk tid", "LHST": "Lord Howe-normaltid", "LHDT": "Lord Howe-sommertid", "GFT": "Fransk Guyana-tid", "OESZ": "Østeuropæisk sommertid", "CAT": "Centralafrikansk tid", "WIB": "Vestindonesisk tid", "HADT": "Hawaii-Aleutian-sommertid", "WITA": "Centralindonesisk tid", "CLST": "Chilensk sommertid", "HNEG": "Østgrønlandsk normaltid", "HNCU": "Cubansk normaltid", "MYT": "Malaysisk tid", "HAT": "Newfoundlandsk sommertid", "NZDT": "Newzealandsk sommertid", "MESZ": "Centraleuropæisk sommertid", "AKST": "Alaska-normaltid", "CST": "Central-normaltid", "WESZ": "Vesteuropæisk sommertid", "HEPM": "Saint Pierre- og Miquelon-sommertid", "TMST": "Turkmensk sommertid", "AKDT": "Alaska-sommertid", "AWST": "Vestaustralsk normaltid", "ECT": "Ecuadoriansk tid", "GMT": "GMT", "VET": "Venezuelansk tid", "PST": "Pacific-normaltid", "HENOMX": "Nordvestmexicansk sommertid", "WARST": "Vestargentinsk sommertid", "EDT": "Eastern-sommertid", "HKT": "Hongkong-normaltid", "AEST": "Østaustralsk normaltid", "HNPM": "Saint Pierre- og Miquelon-normaltid", "OEZ": "Østeuropæisk normaltid", "AST": "Atlantic-normaltid", "ADT": "Atlantic-sommertid", "ACWDT": "Vestlig centralaustralsk sommertid", "HEEG": "Østgrønlandsk sommertid", "ACST": "Centralaustralsk normaltid", "UYT": "Uruguayansk normaltid", "CHADT": "Chatham-sommertid", "WAST": "Vestafrikansk sommertid", "EST": "Eastern-normaltid", "ChST": "Chamorro-tid", "WAT": "Vestafrikansk normaltid", "HAST": "Hawaii-Aleutian-normaltid", "HEOG": "Vestgrønlandsk sommertid", "CLT": "Chilensk normaltid", "ACDT": "Centralaustralsk sommertid", "HECU": "Cubansk sommertid", "UYST": "Uruguayansk sommertid", "BT": "Bhutanesisk tid", "HNT": "Newfoundlandsk normaltid", "BOT": "Boliviansk tid"}, -+ locale: "da_GL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "WAT": "WAT", "COT": "COT", "HEOG": "HEOG", "TMST": "TMST", "NZST": "NZST", "HEPM": "HEPM", "CHAST": "CHAST", "AEDT": "AEDT", "WESZ": "WESZ", "VET": "VET", "MST": "MST", "BOT": "BOT", "HEEG": "HEEG", "PDT": "PDT", "UYST": "UYST", "ACWST": "ACWST", "MDT": "MDT", "ECT": "ECT", "MEZ": "MEZ", "LHST": "LHST", "HNPMX": "HNPMX", "HKT": "HKT", "TMT": "TMT", "AWDT": "AWDT", "UYT": "UYT", "ACDT": "ACDT", "ACWDT": "ACWDT", "HNT": "HNT", "HKST": "HKST", "WIB": "WIB", "ChST": "ChST", "SAST": "SAST", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "JST": "JST", "PST": "PST", "SGT": "SGT", "OEZ": "OEZ", "HAT": "HAT", "CLT": "CLT", "CST": "CST", "AWST": "AWST", "ACST": "ACST", "MYT": "MYT", "BT": "BT", "OESZ": "OESZ", "COST": "COST", "ART": "ART", "HNEG": "HNEG", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "WITA": "WITA", "HAST": "HAST", "IST": "IST", "HNPM": "HNPM", "HNCU": "HNCU", "AKST": "AKST", "GFT": "GFT", "WARST": "WARST", "CLST": "CLST", "NZDT": "NZDT", "MESZ": "MESZ", "JDT": "JDT", "WART": "WART", "WIT": "WIT", "GYT": "GYT", "HADT": "HADT", "EAT": "EAT", "HENOMX": "HENOMX", "LHDT": "LHDT", "HECU": "HECU", "CAT": "CAT", "ADT": "ADT", "GMT": "GMT", "SRT": "SRT", "EDT": "EDT", "ARST": "ARST", "AEST": "AEST", "WAST": "WAST", "AKDT": "AKDT", "HNOG": "HNOG", "EST": "EST", "CDT": "CDT", "AST": "AST"}, - } - } -  -@@ -141,7 +116,7 @@ func (da *da_GL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (da *da_GL) MonthsAbbreviated() []string { -- return da.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -151,7 +126,7 @@ func (da *da_GL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (da *da_GL) MonthsNarrow() []string { -- return da.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -161,7 +136,7 @@ func (da *da_GL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (da *da_GL) MonthsWide() []string { -- return da.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -207,75 +182,13 @@ func (da *da_GL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'da_GL' and handles both Whole and Real numbers based on 'v' - func (da *da_GL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, da.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, da.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'da_GL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (da *da_GL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, da.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, da.percentSuffix...) -- -- b = append(b, da.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'da_GL' -@@ -283,56 +196,7 @@ func (da *da_GL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := da.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, da.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, da.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, da.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, da.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'da_GL' -@@ -341,63 +205,7 @@ func (da *da_GL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := da.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, da.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, da.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, da.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, da.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, da.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, da.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'da_GL' -@@ -405,27 +213,6 @@ func (da *da_GL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,17 +221,6 @@ func (da *da_GL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, da.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -453,17 +229,6 @@ func (da *da_GL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, da.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,20 +237,6 @@ func (da *da_GL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, da.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20, 0x64, 0x65, 0x6e}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, da.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/dav/dav.go b/dav/dav.go -index 8db3743..0b18008 100644 ---- a/dav/dav.go -+++ b/dav/dav.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"ACST": "ACST", "HNT": "HNT", "HNPM": "HNPM", "LHDT": "LHDT", "CHAST": "CHAST", "GFT": "GFT", "CDT": "CDT", "AST": "AST", "WIB": "WIB", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "ECT": "ECT", "WARST": "WARST", "JST": "JST", "SRT": "SRT", "PST": "PST", "MEZ": "MEZ", "NZDT": "NZDT", "CLST": "CLST", "ChST": "ChST", "BOT": "BOT", "EAT": "EAT", "BT": "BT", "HNOG": "HNOG", "HEOG": "HEOG", "HKST": "HKST", "NZST": "NZST", "COST": "COST", "HENOMX": "HENOMX", "GMT": "GMT", "EST": "EST", "HEPMX": "HEPMX", "HNEG": "HNEG", "ACDT": "ACDT", "EDT": "EDT", "MYT": "MYT", "AKST": "AKST", "MESZ": "MESZ", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "SGT": "SGT", "HECU": "HECU", "HKT": "HKT", "OESZ": "OESZ", "HNPMX": "HNPMX", "MDT": "MDT", "WEZ": "WEZ", "HEPM": "HEPM", "UYT": "UYT", "AKDT": "AKDT", "WIT": "WIT", "CHADT": "CHADT", "JDT": "JDT", "TMST": "TMST", "HAST": "HAST", "MST": "MST", "AWST": "AWST", "TMT": "TMT", "WAT": "WAT", "COT": "COT", "CST": "CST", "VET": "VET", "ACWST": "ACWST", "ART": "ART", "OEZ": "OEZ", "WART": "WART", "ACWDT": "ACWDT", "CLT": "CLT", "WAST": "WAST", "UYST": "UYST", "AEST": "AEST", "AEDT": "AEDT", "IST": "IST", "GYT": "GYT", "ARST": "ARST", "WITA": "WITA", "LHST": "LHST", "SAST": "SAST", "ADT": "ADT", "HNCU": "HNCU", "HADT": "HADT", "PDT": "PDT", "WESZ": "WESZ", "HAT": "HAT", "CAT": "CAT"}, -+ timezones: map[string]string{"HNOG": "HNOG", "NZST": "NZST", "NZDT": "NZDT", "GMT": "GMT", "BOT": "BOT", "AWST": "AWST", "UYT": "UYT", "VET": "VET", "IST": "IST", "ACWDT": "ACWDT", "OEZ": "OEZ", "EST": "EST", "EAT": "EAT", "HEPM": "HEPM", "JDT": "JDT", "AKDT": "AKDT", "HAT": "HAT", "HEOG": "HEOG", "CLT": "CLT", "WIB": "WIB", "AWDT": "AWDT", "AKST": "AKST", "WART": "WART", "COST": "COST", "HEEG": "HEEG", "BT": "BT", "SGT": "SGT", "HECU": "HECU", "∅∅∅": "∅∅∅", "WITA": "WITA", "ARST": "ARST", "HNEG": "HNEG", "HENOMX": "HENOMX", "EDT": "EDT", "CHADT": "CHADT", "WARST": "WARST", "MEZ": "MEZ", "MYT": "MYT", "PDT": "PDT", "CDT": "CDT", "MST": "MST", "PST": "PST", "HEPMX": "HEPMX", "ChST": "ChST", "ACWST": "ACWST", "AEST": "AEST", "AEDT": "AEDT", "WIT": "WIT", "HKT": "HKT", "HKST": "HKST", "TMST": "TMST", "HADT": "HADT", "LHDT": "LHDT", "JST": "JST", "SAST": "SAST", "ART": "ART", "SRT": "SRT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "UYST": "UYST", "HNCU": "HNCU", "WAST": "WAST", "COT": "COT", "CST": "CST", "ECT": "ECT", "LHST": "LHST", "HNPMX": "HNPMX", "HNT": "HNT", "CAT": "CAT", "HAST": "HAST", "ACST": "ACST", "WESZ": "WESZ", "GFT": "GFT", "GYT": "GYT", "CLST": "CLST", "MDT": "MDT", "ADT": "ADT", "ACDT": "ACDT", "CHAST": "CHAST", "WEZ": "WEZ", "WAT": "WAT", "OESZ": "OESZ", "TMT": "TMT", "AST": "AST", "HNPM": "HNPM"}, - } - } -  -diff --git a/dav_KE/dav_KE.go b/dav_KE/dav_KE.go -index ff70678..ca1274b 100644 ---- a/dav_KE/dav_KE.go -+++ b/dav_KE/dav_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type dav_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'dav_KE' locale - func New() locales.Translator { - return &dav_KE{ -- locale: "dav_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Imb", "Kaw", "Kad", "Kan", "Kas", "Kar", "Mfu", "Wun", "Ike", "Iku", "Imw", "Iwi"}, -- monthsNarrow: []string{"", "I", "K", "K", "K", "K", "K", "M", "W", "I", "I", "I", "I"}, -- monthsWide: []string{"", "Mori ghwa imbiri", "Mori ghwa kawi", "Mori ghwa kadadu", "Mori ghwa kana", "Mori ghwa kasanu", "Mori ghwa karandadu", "Mori ghwa mfungade", "Mori ghwa wunyanya", "Mori ghwa ikenda", "Mori ghwa ikumi", "Mori ghwa ikumi na imweri", "Mori ghwa ikumi na iwi"}, -- daysAbbreviated: []string{"Jum", "Jim", "Kaw", "Kad", "Kan", "Kas", "Ngu"}, -- daysNarrow: []string{"J", "J", "K", "K", "K", "K", "N"}, -- daysWide: []string{"Ituku ja jumwa", "Kuramuka jimweri", "Kuramuka kawi", "Kuramuka kadadu", "Kuramuka kana", "Kuramuka kasanu", "Kifula nguwo"}, -- periodsAbbreviated: []string{"Luma lwa K", "luma lwa p"}, -- periodsWide: []string{"Luma lwa K", "luma lwa p"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"EAT": "EAT", "HECU": "HECU", "MST": "MST", "AWDT": "AWDT", "NZDT": "NZDT", "AKST": "AKST", "PDT": "PDT", "HAT": "HAT", "HKT": "HKT", "IST": "IST", "HENOMX": "HENOMX", "WIB": "WIB", "WEZ": "WEZ", "ACWST": "ACWST", "LHDT": "LHDT", "NZST": "NZST", "OEZ": "OEZ", "UYT": "UYT", "SRT": "SRT", "HNT": "HNT", "EDT": "EDT", "MYT": "MYT", "HKST": "HKST", "SGT": "SGT", "VET": "VET", "ART": "ART", "ECT": "ECT", "COT": "COT", "COST": "COST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "AKDT": "AKDT", "CST": "CST", "CHADT": "CHADT", "WARST": "WARST", "JDT": "JDT", "BOT": "BOT", "GMT": "GMT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "ADT": "ADT", "AEST": "AEST", "CLT": "CLT", "MESZ": "MESZ", "OESZ": "OESZ", "HAST": "HAST", "AEDT": "AEDT", "WITA": "WITA", "ChST": "ChST", "TMST": "TMST", "MDT": "MDT", "ARST": "ARST", "JST": "JST", "ACDT": "ACDT", "EST": "EST", "GYT": "GYT", "WIT": "WIT", "HNOG": "HNOG", "AWST": "AWST", "GFT": "GFT", "TMT": "TMT", "CAT": "CAT", "HADT": "HADT", "HEPM": "HEPM", "CLST": "CLST", "WAST": "WAST", "UYST": "UYST", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "HEEG": "HEEG", "WAT": "WAT", "AST": "AST", "PST": "PST", "WESZ": "WESZ", "ACWDT": "ACWDT", "HNPM": "HNPM", "ACST": "ACST", "WART": "WART", "CDT": "CDT", "BT": "BT", "HEOG": "HEOG", "SAST": "SAST", "LHST": "LHST", "CHAST": "CHAST"}, -+ locale: "dav_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLT": "CLT", "JDT": "JDT", "UYST": "UYST", "∅∅∅": "∅∅∅", "PDT": "PDT", "WEZ": "WEZ", "SGT": "SGT", "WAT": "WAT", "WIB": "WIB", "EAT": "EAT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "HAT": "HAT", "COST": "COST", "TMST": "TMST", "BT": "BT", "HNCU": "HNCU", "OEZ": "OEZ", "HNOG": "HNOG", "NZST": "NZST", "ACST": "ACST", "HNEG": "HNEG", "LHDT": "LHDT", "AKST": "AKST", "CLST": "CLST", "CST": "CST", "ART": "ART", "ADT": "ADT", "HEEG": "HEEG", "AST": "AST", "JST": "JST", "AEST": "AEST", "CHAST": "CHAST", "UYT": "UYT", "HKT": "HKT", "HKST": "HKST", "CDT": "CDT", "MESZ": "MESZ", "HNPM": "HNPM", "AEDT": "AEDT", "WART": "WART", "SAST": "SAST", "EDT": "EDT", "MST": "MST", "HAST": "HAST", "MYT": "MYT", "HNPMX": "HNPMX", "WARST": "WARST", "MDT": "MDT", "AWST": "AWST", "LHST": "LHST", "CHADT": "CHADT", "AKDT": "AKDT", "GFT": "GFT", "WIT": "WIT", "WITA": "WITA", "SRT": "SRT", "ACDT": "ACDT", "HEPM": "HEPM", "GYT": "GYT", "BOT": "BOT", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "ACWST": "ACWST", "VET": "VET", "TMT": "TMT", "IST": "IST", "HEOG": "HEOG", "WAST": "WAST", "HNT": "HNT", "ARST": "ARST", "GMT": "GMT", "HADT": "HADT", "HECU": "HECU", "OESZ": "OESZ", "COT": "COT", "EST": "EST", "CAT": "CAT", "ECT": "ECT", "ChST": "ChST", "AWDT": "AWDT", "PST": "PST", "HEPMX": "HEPMX", "WESZ": "WESZ", "NZDT": "NZDT"}, - } - } -  -@@ -109,7 +94,7 @@ func (dav *dav_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (dav *dav_KE) MonthsAbbreviated() []string { -- return dav.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (dav *dav_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (dav *dav_KE) MonthsNarrow() []string { -- return dav.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (dav *dav_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (dav *dav_KE) MonthsWide() []string { -- return dav.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (dav *dav_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dav.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dav.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, dav.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, dav.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dav.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'dav_KE' -@@ -247,68 +183,7 @@ func (dav *dav_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dav.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dav.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, dav.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, dav.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dav.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, dav.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'dav_KE' -@@ -316,27 +191,6 @@ func (dav *dav_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (dav *dav_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dav.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (dav *dav_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dav.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (dav *dav_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, dav.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dav.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (dav *dav_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (dav *dav_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (dav *dav_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (dav *dav_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dav.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := dav.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de/de.go b/de/de.go -index eb0b105..f3eea31 100644 ---- a/de/de.go -+++ b/de/de.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v. Chr.", "n. Chr."}, - erasNarrow: []string{"v. Chr.", "n. Chr."}, - erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"PDT": "Nordamerikanische Westküsten-Sommerzeit", "LHST": "Lord-Howe-Normalzeit", "ACDT": "Zentralaustralische Sommerzeit", "COST": "Kolumbianische Sommerzeit", "HKT": "Hongkong-Normalzeit", "CLT": "Chilenische Normalzeit", "JDT": "Japanische Sommerzeit", "OESZ": "Osteuropäische Sommerzeit", "MST": "Macau-Normalzeit", "AKST": "Alaska-Normalzeit", "GYT": "Guyana-Zeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "HNOG": "Westgrönland-Normalzeit", "WAT": "Westafrikanische Normalzeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "MYT": "Malaysische Zeit", "HEOG": "Westgrönland-Sommerzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "NZST": "Neuseeland-Normalzeit", "VET": "Venezuela-Zeit", "SRT": "Suriname-Zeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "JST": "Japanische Normalzeit", "WARST": "Westargentinische Sommerzeit", "UYT": "Uruguyanische Normalzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "MDT": "Macau-Sommerzeit", "HAT": "Neufundland-Sommerzeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "IST": "Indische Zeit", "HECU": "Kubanische Sommerzeit", "UYST": "Uruguayanische Sommerzeit", "HNT": "Neufundland-Normalzeit", "ARST": "Argentinische Sommerzeit", "MEZ": "Mitteleuropäische Normalzeit", "WAST": "Westafrikanische Sommerzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "GFT": "Französisch-Guayana-Zeit", "TMT": "Turkmenistan-Normalzeit", "OEZ": "Osteuropäische Normalzeit", "WART": "Westargentinische Normalzeit", "SGT": "Singapur-Zeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "ADT": "Atlantik-Sommerzeit", "WIB": "Westindonesische Zeit", "HKST": "Hongkong-Sommerzeit", "WITA": "Zentralindonesische Zeit", "∅∅∅": "Amazonas-Sommerzeit", "BOT": "Bolivianische Zeit", "TMST": "Turkmenistan-Sommerzeit", "CAT": "Zentralafrikanische Zeit", "COT": "Kolumbianische Normalzeit", "GMT": "Mittlere Greenwich-Zeit", "AWST": "Westaustralische Normalzeit", "ChST": "Chamorro-Zeit", "HEEG": "Ostgrönland-Sommerzeit", "EAT": "Ostafrikanische Zeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "AEST": "Ostaustralische Normalzeit", "ECT": "Ecuadorianische Zeit", "CST": "Nordamerikanische Inland-Normalzeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "AST": "Atlantik-Normalzeit", "HAST": "Hawaii-Aleuten-Normalzeit", "BT": "Bhutan-Zeit", "WEZ": "Westeuropäische Normalzeit", "AWDT": "Westaustralische Sommerzeit", "NZDT": "Neuseeland-Sommerzeit", "SAST": "Südafrikanische Zeit", "CLST": "Chilenische Sommerzeit", "HNEG": "Ostgrönland-Normalzeit", "ACST": "Zentralaustralische Normalzeit", "WIT": "Ostindonesische Zeit", "WESZ": "Westeuropäische Sommerzeit", "MESZ": "Mitteleuropäische Sommerzeit", "CHADT": "Chatham-Sommerzeit", "HNCU": "Kubanische Normalzeit", "AKDT": "Alaska-Sommerzeit", "ART": "Argentinische Normalzeit", "AEDT": "Ostaustralische Sommerzeit", "CHAST": "Chatham-Normalzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit"}, -+ timezones: map[string]string{"HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "WIT": "Ostindonesische Zeit", "GYT": "Guyana-Zeit", "HAST": "Hawaii-Aleuten-Normalzeit", "HEEG": "Ostgrönland-Sommerzeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "HNCU": "Kubanische Normalzeit", "WITA": "Zentralindonesische Zeit", "JDT": "Japanische Sommerzeit", "WARST": "Westargentinische Sommerzeit", "WART": "Westargentinische Normalzeit", "LHST": "Lord-Howe-Normalzeit", "AEST": "Ostaustralische Normalzeit", "HNT": "Neufundland-Normalzeit", "SAST": "Südafrikanische Zeit", "HNOG": "Westgrönland-Normalzeit", "HKT": "Hongkong-Normalzeit", "MST": "Macau-Normalzeit", "AWST": "Westaustralische Normalzeit", "NZDT": "Neuseeland-Sommerzeit", "NZST": "Neuseeland-Normalzeit", "CHAST": "Chatham-Normalzeit", "∅∅∅": "Acre-Sommerzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "WAT": "Westafrikanische Normalzeit", "CAT": "Zentralafrikanische Zeit", "ECT": "Ecuadorianische Zeit", "BOT": "Bolivianische Zeit", "AEDT": "Ostaustralische Sommerzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "ADT": "Atlantik-Sommerzeit", "WAST": "Westafrikanische Sommerzeit", "OEZ": "Osteuropäische Normalzeit", "CLST": "Chilenische Sommerzeit", "ChST": "Chamorro-Zeit", "SRT": "Suriname-Zeit", "CHADT": "Chatham-Sommerzeit", "GFT": "Französisch-Guayana-Zeit", "HEOG": "Westgrönland-Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "ARST": "Argentinische Sommerzeit", "HECU": "Kubanische Sommerzeit", "VET": "Venezuela-Zeit", "EAT": "Ostafrikanische Zeit", "MYT": "Malaysische Zeit", "HAT": "Neufundland-Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "ACST": "Zentralaustralische Normalzeit", "JST": "Japanische Normalzeit", "AKST": "Alaska-Normalzeit", "MESZ": "Mitteleuropäische Sommerzeit", "AWDT": "Westaustralische Sommerzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "AST": "Atlantik-Normalzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "ACDT": "Zentralaustralische Sommerzeit", "UYT": "Uruguyanische Normalzeit", "UYST": "Uruguayanische Sommerzeit", "COT": "Kolumbianische Normalzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "WIB": "Westindonesische Zeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "AKDT": "Alaska-Sommerzeit", "OESZ": "Osteuropäische Sommerzeit", "HKST": "Hongkong-Sommerzeit", "IST": "Indische Zeit", "BT": "Bhutan-Zeit", "WEZ": "Westeuropäische Normalzeit", "COST": "Kolumbianische Sommerzeit", "TMST": "Turkmenistan-Sommerzeit", "CST": "Nordamerikanische Inland-Normalzeit", "MDT": "Macau-Sommerzeit", "HNEG": "Ostgrönland-Normalzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "WESZ": "Westeuropäische Sommerzeit", "SGT": "Singapur-Zeit", "CLT": "Chilenische Normalzeit", "ART": "Argentinische Normalzeit", "MEZ": "Mitteleuropäische Normalzeit"}, - } - } -  -diff --git a/de_AT/de_AT.go b/de_AT/de_AT.go -index 7d02b54..445b956 100644 ---- a/de_AT/de_AT.go -+++ b/de_AT/de_AT.go -@@ -18,7 +18,6 @@ type de_AT struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,31 +48,15 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", - group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", - monthsAbbreviated: []string{"", "Jän.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, - monthsWide: []string{"", "Jänner", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, - periodsNarrow: []string{"vm.", "nm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"SRT": "Suriname-Zeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "HEOG": "Westgrönland-Sommerzeit", "WITA": "Zentralindonesische Zeit", "WAT": "Westafrikanische Normalzeit", "HNCU": "Kubanische Normalzeit", "SGT": "Singapur-Zeit", "MYT": "Malaysische Zeit", "HAT": "Neufundland-Sommerzeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "AWDT": "Westaustralische Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "AEDT": "Ostaustralische Sommerzeit", "CLT": "Chilenische Normalzeit", "CAT": "Zentralafrikanische Zeit", "MST": "Rocky Mountain-Normalzeit", "HKST": "Hongkong-Sommerzeit", "NZDT": "Neuseeland-Sommerzeit", "∅∅∅": "Amazonas-Sommerzeit", "ECT": "Ecuadorianische Zeit", "ChST": "Chamorro-Zeit", "HECU": "Kubanische Sommerzeit", "WIB": "Westindonesische Zeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "AEST": "Ostaustralische Normalzeit", "MESZ": "Mitteleuropäische Sommerzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "WIT": "Ostindonesische Zeit", "HAST": "Hawaii-Aleuten-Normalzeit", "HNT": "Neufundland-Normalzeit", "CHAST": "Chatham-Normalzeit", "CHADT": "Chatham-Sommerzeit", "ADT": "Atlantik-Sommerzeit", "UYST": "Uruguayanische Sommerzeit", "AWST": "Westaustralische Normalzeit", "LHST": "Lord-Howe-Normalzeit", "HNEG": "Ostgrönland-Normalzeit", "GYT": "Guyana-Zeit", "BOT": "Bolivianische Zeit", "WAST": "Westafrikanische Sommerzeit", "BT": "Bhutan-Zeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "HEEG": "Ostgrönland-Sommerzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "IST": "Indische Zeit", "EAT": "Ostafrikanische Zeit", "AST": "Atlantik-Normalzeit", "UYT": "Uruguyanische Normalzeit", "VET": "Venezuela-Zeit", "HNOG": "Westgrönland-Normalzeit", "MEZ": "Mitteleuropäische Normalzeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "SAST": "Südafrikanische Zeit", "JDT": "Japanische Sommerzeit", "WARST": "Westargentinische Sommerzeit", "COST": "Kolumbianische Sommerzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "AKDT": "Alaska-Sommerzeit", "WEZ": "Westeuropäische Normalzeit", "WESZ": "Westeuropäische Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "COT": "Kolumbianische Normalzeit", "OEZ": "Osteuropäische Normalzeit", "OESZ": "Osteuropäische Sommerzeit", "WART": "Westargentinische Normalzeit", "AKST": "Alaska-Normalzeit", "CST": "Nordamerikanische Inland-Normalzeit", "MDT": "Rocky-Mountain-Sommerzeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "HKT": "Hongkong-Normalzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "NZST": "Neuseeland-Normalzeit", "CLST": "Chilenische Sommerzeit", "TMST": "Turkmenistan-Sommerzeit", "ACST": "Zentralaustralische Normalzeit", "ACDT": "Zentralaustralische Sommerzeit", "ART": "Argentinische Normalzeit", "ARST": "Argentinische Sommerzeit", "JST": "Japanische Normalzeit", "GFT": "Französisch-Guayana-Zeit"}, -+ timezones: map[string]string{"UYST": "UYST", "WART": "WART", "PST": "PST", "ARST": "ARST", "CHAST": "CHAST", "CHADT": "CHADT", "UYT": "UYT", "COT": "COT", "COST": "COST", "TMST": "TMST", "HADT": "HADT", "MYT": "MYT", "LHST": "LHST", "WEZ": "WEZ", "HNCU": "HNCU", "HECU": "HECU", "WIT": "WIT", "GYT": "GYT", "EDT": "EDT", "JST": "JST", "AEST": "AEST", "∅∅∅": "∅∅∅", "HKT": "HKT", "CDT": "CDT", "NZDT": "NZDT", "HEPM": "HEPM", "HEOG": "HEOG", "NZST": "NZST", "WESZ": "WESZ", "AKST": "AKST", "CLT": "CLT", "JDT": "JDT", "PDT": "PDT", "HNPMX": "HNPMX", "OESZ": "OESZ", "HAT": "HAT", "EST": "EST", "WITA": "WITA", "ECT": "ECT", "HNPM": "HNPM", "VET": "VET", "OEZ": "OEZ", "ACDT": "ACDT", "ChST": "ChST", "ADT": "ADT", "MESZ": "MESZ", "SAST": "SAST", "AST": "AST", "HENOMX": "HENOMX", "AWDT": "AWDT", "ACWST": "ACWST", "IST": "IST", "SRT": "SRT", "HAST": "HAST", "AKDT": "AKDT", "HNT": "HNT", "MST": "MST", "AWST": "AWST", "HNNOMX": "HNNOMX", "ACST": "ACST", "WAST": "WAST", "GFT": "GFT", "CST": "CST", "MDT": "MDT", "BOT": "BOT", "ACWDT": "ACWDT", "HKST": "HKST", "CAT": "CAT", "EAT": "EAT", "WIB": "WIB", "ART": "ART", "GMT": "GMT", "WAT": "WAT", "WARST": "WARST", "TMT": "TMT", "CLST": "CLST", "HNEG": "HNEG", "AEDT": "AEDT", "HEPMX": "HEPMX", "SGT": "SGT", "HEEG": "HEEG", "MEZ": "MEZ", "LHDT": "LHDT", "BT": "BT", "HNOG": "HNOG"}, - } - } -  -@@ -148,7 +131,7 @@ func (de *de_AT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_AT) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -204,77 +187,13 @@ func (de *de_AT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_AT' and handles both Whole and Real numbers based on 'v' - func (de *de_AT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(de.group) - 1; j >= 0; j-- { -- b = append(b, de.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_AT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_AT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, de.percentSuffix...) -- -- b = append(b, de.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'de_AT' -@@ -282,7 +201,7 @@ func (de *de_AT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -346,7 +265,7 @@ func (de *de_AT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -421,27 +340,6 @@ func (de *de_AT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -450,27 +348,6 @@ func (de *de_AT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,17 +356,6 @@ func (de *de_AT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +364,6 @@ func (de *de_AT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -519,19 +372,6 @@ func (de *de_AT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -540,26 +380,6 @@ func (de *de_AT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -568,30 +388,6 @@ func (de *de_AT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -600,34 +396,5 @@ func (de *de_AT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de_BE/de_BE.go b/de_BE/de_BE.go -index 3e5f91e..e833bf8 100644 ---- a/de_BE/de_BE.go -+++ b/de_BE/de_BE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type de_BE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'de_BE' locale - func New() locales.Translator { - return &de_BE{ -- locale: "de_BE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, -- periodsNarrow: []string{"vm.", "nm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"ART": "Argentinische Normalzeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "HKST": "Hongkong-Sommerzeit", "WAT": "Westafrikanische Normalzeit", "ECT": "Ecuadorianische Zeit", "TMST": "Turkmenistan-Sommerzeit", "COT": "Kolumbianische Normalzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "WIB": "Westindonesische Zeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "MYT": "Malaysische Zeit", "UYST": "Uruguayanische Sommerzeit", "WIT": "Ostindonesische Zeit", "HEOG": "Westgrönland-Sommerzeit", "NZDT": "Neuseeland-Sommerzeit", "MEZ": "Mitteleuropäische Normalzeit", "TMT": "Turkmenistan-Normalzeit", "AEDT": "Ostaustralische Sommerzeit", "COST": "Kolumbianische Sommerzeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "MST": "Macau-Normalzeit", "AWST": "Westaustralische Normalzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "LHST": "Lord-Howe-Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "EAT": "Ostafrikanische Zeit", "CLST": "Chilenische Sommerzeit", "JST": "Japanische Normalzeit", "JDT": "Japanische Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "HKT": "Hongkong-Normalzeit", "AEST": "Ostaustralische Normalzeit", "NZST": "Neuseeland-Normalzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "AKDT": "Alaska-Sommerzeit", "CST": "Nordamerikanische Inland-Normalzeit", "CHADT": "Chatham-Sommerzeit", "CAT": "Zentralafrikanische Zeit", "WARST": "Westargentinische Sommerzeit", "MDT": "Macau-Sommerzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "ACST": "Zentralaustralische Normalzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "HAT": "Neufundland-Sommerzeit", "AWDT": "Westaustralische Sommerzeit", "HEEG": "Ostgrönland-Sommerzeit", "AST": "Atlantik-Normalzeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "CLT": "Chilenische Normalzeit", "∅∅∅": "Amazonas-Sommerzeit", "OEZ": "Osteuropäische Normalzeit", "AKST": "Alaska-Normalzeit", "HAST": "Hawaii-Aleuten-Normalzeit", "ARST": "Argentinische Sommerzeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "ACDT": "Zentralaustralische Sommerzeit", "HECU": "Kubanische Sommerzeit", "GYT": "Guyana-Zeit", "UYT": "Uruguyanische Normalzeit", "VET": "Venezuela-Zeit", "BT": "Bhutan-Zeit", "WESZ": "Westeuropäische Sommerzeit", "SAST": "Südafrikanische Zeit", "WAST": "Westafrikanische Sommerzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "IST": "Indische Zeit", "BOT": "Bolivianische Zeit", "HNEG": "Ostgrönland-Normalzeit", "OESZ": "Osteuropäische Sommerzeit", "WART": "Westargentinische Normalzeit", "HNCU": "Kubanische Normalzeit", "SRT": "Suriname-Zeit", "HNT": "Neufundland-Normalzeit", "CHAST": "Chatham-Normalzeit", "GFT": "Französisch-Guayana-Zeit", "ChST": "Chamorro-Zeit", "ADT": "Atlantik-Sommerzeit", "WEZ": "Westeuropäische Normalzeit", "HNOG": "Westgrönland-Normalzeit", "WITA": "Zentralindonesische Zeit", "MESZ": "Mitteleuropäische Sommerzeit", "SGT": "Singapur-Zeit"}, -+ locale: "de_BE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWDT": "ACWDT", "PST": "PST", "WESZ": "WESZ", "SGT": "SGT", "HAST": "HAST", "AWDT": "AWDT", "LHDT": "LHDT", "WARST": "WARST", "ECT": "ECT", "CDT": "CDT", "MDT": "MDT", "MESZ": "MESZ", "CHADT": "CHADT", "EDT": "EDT", "CLT": "CLT", "ACST": "ACST", "HECU": "HECU", "WAST": "WAST", "OEZ": "OEZ", "CAT": "CAT", "ChST": "ChST", "UYT": "UYT", "PDT": "PDT", "HNPMX": "HNPMX", "AKST": "AKST", "COST": "COST", "HEOG": "HEOG", "HNNOMX": "HNNOMX", "AWST": "AWST", "ACWST": "ACWST", "AKDT": "AKDT", "AST": "AST", "HADT": "HADT", "AEDT": "AEDT", "VET": "VET", "HKST": "HKST", "NZDT": "NZDT", "ARST": "ARST", "JDT": "JDT", "GFT": "GFT", "EST": "EST", "ADT": "ADT", "BOT": "BOT", "EAT": "EAT", "ACDT": "ACDT", "GMT": "GMT", "UYST": "UYST", "WIB": "WIB", "ART": "ART", "COT": "COT", "SAST": "SAST", "WITA": "WITA", "CST": "CST", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "HNOG": "HNOG", "HKT": "HKT", "HNEG": "HNEG", "HEEG": "HEEG", "WART": "WART", "HEPMX": "HEPMX", "OESZ": "OESZ", "HNT": "HNT", "HAT": "HAT", "TMST": "TMST", "MEZ": "MEZ", "MYT": "MYT", "JST": "JST", "NZST": "NZST", "HNCU": "HNCU", "CLST": "CLST", "LHST": "LHST", "BT": "BT", "CHAST": "CHAST", "MST": "MST", "WAT": "WAT", "AEST": "AEST", "IST": "IST", "WIT": "WIT", "GYT": "GYT", "TMT": "TMT", "SRT": "SRT", "HNPM": "HNPM", "HEPM": "HEPM"}, - } - } -  -@@ -138,7 +113,7 @@ func (de *de_BE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (de *de_BE) MonthsAbbreviated() []string { -- return de.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (de *de_BE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_BE) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (de *de_BE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (de *de_BE) MonthsWide() []string { -- return de.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (de *de_BE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_BE' and handles both Whole and Real numbers based on 'v' - func (de *de_BE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_BE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_BE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, de.percentSuffix...) -- -- b = append(b, de.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'de_BE' -@@ -280,56 +193,7 @@ func (de *de_BE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, de.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'de_BE' -@@ -338,63 +202,7 @@ func (de *de_BE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, de.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, de.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, de.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'de_BE' -@@ -402,27 +210,6 @@ func (de *de_BE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +218,6 @@ func (de *de_BE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +226,6 @@ func (de *de_BE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +234,6 @@ func (de *de_BE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +242,6 @@ func (de *de_BE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +250,6 @@ func (de *de_BE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +258,6 @@ func (de *de_BE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +266,5 @@ func (de *de_BE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de_CH/de_CH.go b/de_CH/de_CH.go -index a055b02..a9fd5a3 100644 ---- a/de_CH/de_CH.go -+++ b/de_CH/de_CH.go -@@ -50,28 +50,11 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{2, 6}, - decimal: ".", - group: "'", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, -- periodsNarrow: []string{"vm.", "nm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "WART": "Westargentinische Normalzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "MESZ": "Mitteleuropäische Sommerzeit", "JST": "Japanische Normalzeit", "HEEG": "Ostgrönland-Sommerzeit", "WAT": "Westafrikanische Normalzeit", "CLST": "Chilenische Sommerzeit", "WAST": "Westafrikanische Sommerzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "WIT": "Ostindonesische Zeit", "HEOG": "Westgrönland-Sommerzeit", "AWDT": "Westaustralische Sommerzeit", "COST": "Kolumbianische Sommerzeit", "MDT": "Macau-Sommerzeit", "CST": "Nordamerikanische Inland-Normalzeit", "AEST": "Ostaustralische Normalzeit", "LHST": "Lord-Howe-Normalzeit", "WARST": "Westargentinische Sommerzeit", "EAT": "Ostafrikanische Zeit", "AST": "Atlantik-Normalzeit", "VET": "Venezuela-Zeit", "BT": "Bhutan-Zeit", "ART": "Argentinische Normalzeit", "NZST": "Neuseeland-Normalzeit", "HNCU": "Kubanische Normalzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "WESZ": "Westeuropäische Sommerzeit", "ACST": "Zentralaustralische Normalzeit", "MEZ": "Mitteleuropäische Normalzeit", "OESZ": "Osteuropäische Sommerzeit", "CAT": "Zentralafrikanische Zeit", "IST": "Indische Zeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "MST": "Macau-Normalzeit", "AKST": "Alaska-Normalzeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "WITA": "Zentralindonesische Zeit", "CHAST": "Chatham-Normalzeit", "CLT": "Chilenische Normalzeit", "AKDT": "Alaska-Sommerzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "HKST": "Hongkong-Sommerzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "SGT": "Singapur-Zeit", "GYT": "Guyana-Zeit", "HAST": "Hawaii-Aleuten-Normalzeit", "HAT": "Neufundland-Sommerzeit", "WEZ": "Westeuropäische Normalzeit", "UYT": "Uruguyanische Normalzeit", "WIB": "Westindonesische Zeit", "ACDT": "Zentralaustralische Sommerzeit", "ChST": "Chamorro-Zeit", "MYT": "Malaysische Zeit", "HNT": "Neufundland-Normalzeit", "HNOG": "Westgrönland-Normalzeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "ARST": "Argentinische Sommerzeit", "AWST": "Westaustralische Normalzeit", "SAST": "Südafrikanische Zeit", "OEZ": "Osteuropäische Normalzeit", "COT": "Kolumbianische Normalzeit", "GFT": "Französisch-Guayana-Zeit", "HECU": "Kubanische Sommerzeit", "ADT": "Atlantik-Sommerzeit", "HKT": "Hongkong-Normalzeit", "NZDT": "Neuseeland-Sommerzeit", "JDT": "Japanische Sommerzeit", "AEDT": "Ostaustralische Sommerzeit", "BOT": "Bolivianische Zeit", "ECT": "Ecuadorianische Zeit", "SRT": "Suriname-Zeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "CHADT": "Chatham-Sommerzeit", "∅∅∅": "Azoren-Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "UYST": "Uruguayanische Sommerzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "HNEG": "Ostgrönland-Normalzeit", "TMST": "Turkmenistan-Sommerzeit"}, -+ timezones: map[string]string{"EDT": "EDT", "HENOMX": "HENOMX", "AEDT": "AEDT", "CHADT": "CHADT", "PDT": "PDT", "AKST": "AKST", "GFT": "GFT", "WART": "WART", "HKT": "HKT", "NZST": "NZST", "JDT": "JDT", "AWST": "AWST", "BT": "BT", "∅∅∅": "∅∅∅", "CLT": "CLT", "ART": "ART", "AWDT": "AWDT", "SGT": "SGT", "SRT": "SRT", "MEZ": "MEZ", "SAST": "SAST", "CAT": "CAT", "CDT": "CDT", "ACWDT": "ACWDT", "UYST": "UYST", "ADT": "ADT", "AEST": "AEST", "PST": "PST", "HNOG": "HNOG", "GYT": "GYT", "COT": "COT", "ECT": "ECT", "HNPM": "HNPM", "WAST": "WAST", "HKST": "HKST", "CST": "CST", "NZDT": "NZDT", "ChST": "ChST", "HADT": "HADT", "WAT": "WAT", "WARST": "WARST", "HEOG": "HEOG", "WITA": "WITA", "MST": "MST", "HNNOMX": "HNNOMX", "UYT": "UYT", "TMT": "TMT", "CLST": "CLST", "ARST": "ARST", "GMT": "GMT", "ACST": "ACST", "OEZ": "OEZ", "HAT": "HAT", "EST": "EST", "AST": "AST", "HECU": "HECU", "VET": "VET", "AKDT": "AKDT", "HNT": "HNT", "WIT": "WIT", "WIB": "WIB", "MESZ": "MESZ", "ACDT": "ACDT", "HEEG": "HEEG", "JST": "JST", "WESZ": "WESZ", "TMST": "TMST", "MDT": "MDT", "HNEG": "HNEG", "LHST": "LHST", "MYT": "MYT", "ACWST": "ACWST", "CHAST": "CHAST", "WEZ": "WEZ", "BOT": "BOT", "IST": "IST", "OESZ": "OESZ", "COST": "COST", "EAT": "EAT", "HAST": "HAST", "HEPM": "HEPM", "LHDT": "LHDT", "HNCU": "HNCU", "HNPMX": "HNPMX", "HEPMX": "HEPMX"}, - } - } -  -@@ -136,7 +119,7 @@ func (de *de_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (de *de_CH) MonthsAbbreviated() []string { -- return de.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +129,7 @@ func (de *de_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_CH) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +139,7 @@ func (de *de_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (de *de_CH) MonthsWide() []string { -- return de.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,49 +185,14 @@ func (de *de_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_CH' and handles both Whole and Real numbers based on 'v' - func (de *de_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_CH) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 1 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -276,7 +224,7 @@ func (de *de_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -338,7 +286,7 @@ func (de *de_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -411,27 +359,6 @@ func (de *de_CH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -440,27 +367,6 @@ func (de *de_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,17 +375,6 @@ func (de *de_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -488,19 +383,6 @@ func (de *de_CH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -509,19 +391,6 @@ func (de *de_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -530,26 +399,6 @@ func (de *de_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -558,30 +407,6 @@ func (de *de_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -590,34 +415,5 @@ func (de *de_CH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de_DE/de_DE.go b/de_DE/de_DE.go -index 3886a94..b3dafc1 100644 ---- a/de_DE/de_DE.go -+++ b/de_DE/de_DE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type de_DE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'de_DE' locale - func New() locales.Translator { - return &de_DE{ -- locale: "de_DE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, -- periodsNarrow: []string{"vm.", "nm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"ART": "Argentinische Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "CLST": "Chilenische Sommerzeit", "EAT": "Ostafrikanische Zeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "HNT": "Neufundland-Normalzeit", "HKST": "Hongkong-Sommerzeit", "CHAST": "Chatham-Normalzeit", "HNCU": "Kubanische Normalzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "WEZ": "Westeuropäische Normalzeit", "HNOG": "Westgrönland-Normalzeit", "CHADT": "Chatham-Sommerzeit", "UYT": "Uruguyanische Normalzeit", "AEDT": "Ostaustralische Sommerzeit", "MEZ": "Mitteleuropäische Normalzeit", "ADT": "Atlantik-Sommerzeit", "JST": "Japanische Normalzeit", "OESZ": "Osteuropäische Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "BT": "Bhutan-Zeit", "ACST": "Zentralaustralische Normalzeit", "OEZ": "Osteuropäische Normalzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "GFT": "Französisch-Guayana-Zeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "HKT": "Hongkong-Normalzeit", "CAT": "Zentralafrikanische Zeit", "COT": "Kolumbianische Normalzeit", "COST": "Kolumbianische Sommerzeit", "GYT": "Guyana-Zeit", "WIB": "Westindonesische Zeit", "SRT": "Suriname-Zeit", "WESZ": "Westeuropäische Sommerzeit", "HEOG": "Westgrönland-Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "SGT": "Singapur-Zeit", "MYT": "Malaysische Zeit", "AWDT": "Westaustralische Sommerzeit", "NZST": "Neuseeland-Normalzeit", "ChST": "Chamorro-Zeit", "BOT": "Bolivianische Zeit", "ECT": "Ecuadorianische Zeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "CLT": "Chilenische Normalzeit", "SAST": "Südafrikanische Zeit", "JDT": "Japanische Sommerzeit", "HNEG": "Ostgrönland-Normalzeit", "HEEG": "Ostgrönland-Sommerzeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "AEST": "Ostaustralische Normalzeit", "AWST": "Westaustralische Normalzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "AKDT": "Alaska-Sommerzeit", "HAST": "Hawaii-Aleuten-Normalzeit", "WITA": "Zentralindonesische Zeit", "∅∅∅": "Amazonas-Sommerzeit", "WARST": "Westargentinische Sommerzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "HECU": "Kubanische Sommerzeit", "MDT": "Macau-Sommerzeit", "CST": "Nordamerikanische Inland-Normalzeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "MESZ": "Mitteleuropäische Sommerzeit", "WART": "Westargentinische Normalzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "HAT": "Neufundland-Sommerzeit", "WAST": "Westafrikanische Sommerzeit", "VET": "Venezuela-Zeit", "LHST": "Lord-Howe-Normalzeit", "WAT": "Westafrikanische Normalzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "WIT": "Ostindonesische Zeit", "TMST": "Turkmenistan-Sommerzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "IST": "Indische Zeit", "ACDT": "Zentralaustralische Sommerzeit", "MST": "Macau-Normalzeit", "UYST": "Uruguayanische Sommerzeit", "AKST": "Alaska-Normalzeit", "AST": "Atlantik-Normalzeit", "ARST": "Argentinische Sommerzeit", "NZDT": "Neuseeland-Sommerzeit"}, -+ locale: "de_DE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACDT": "ACDT", "WARST": "WARST", "AST": "AST", "GMT": "GMT", "HEEG": "HEEG", "BT": "BT", "TMST": "TMST", "EST": "EST", "HKT": "HKT", "MYT": "MYT", "HEPM": "HEPM", "UYST": "UYST", "SGT": "SGT", "MDT": "MDT", "SRT": "SRT", "HKST": "HKST", "AWDT": "AWDT", "LHST": "LHST", "AEST": "AEST", "CHADT": "CHADT", "HECU": "HECU", "AKDT": "AKDT", "COT": "COT", "CLT": "CLT", "ADT": "ADT", "HNOG": "HNOG", "ChST": "ChST", "HENOMX": "HENOMX", "HNPM": "HNPM", "MST": "MST", "MESZ": "MESZ", "JST": "JST", "UYT": "UYT", "HNCU": "HNCU", "WAT": "WAT", "COST": "COST", "CDT": "CDT", "ARST": "ARST", "BOT": "BOT", "HAST": "HAST", "PST": "PST", "OESZ": "OESZ", "HAT": "HAT", "CST": "CST", "HADT": "HADT", "MEZ": "MEZ", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "WEZ": "WEZ", "ECT": "ECT", "IST": "IST", "HNT": "HNT", "JDT": "JDT", "NZDT": "NZDT", "WIB": "WIB", "ART": "ART", "AWST": "AWST", "VET": "VET", "GFT": "GFT", "WIT": "WIT", "CAT": "CAT", "AKST": "AKST", "HEOG": "HEOG", "WITA": "WITA", "AEDT": "AEDT", "WAST": "WAST", "OEZ": "OEZ", "TMT": "TMT", "EAT": "EAT", "ACST": "ACST", "HEPMX": "HEPMX", "WART": "WART", "GYT": "GYT", "NZST": "NZST", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "CHAST": "CHAST", "PDT": "PDT", "HNEG": "HNEG", "CLST": "CLST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "SAST": "SAST", "EDT": "EDT"}, - } - } -  -@@ -138,7 +113,7 @@ func (de *de_DE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (de *de_DE) MonthsAbbreviated() []string { -- return de.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (de *de_DE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_DE) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (de *de_DE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (de *de_DE) MonthsWide() []string { -- return de.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (de *de_DE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_DE' and handles both Whole and Real numbers based on 'v' - func (de *de_DE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_DE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_DE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, de.percentSuffix...) -- -- b = append(b, de.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'de_DE' -@@ -280,56 +193,7 @@ func (de *de_DE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, de.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'de_DE' -@@ -338,63 +202,7 @@ func (de *de_DE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, de.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, de.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, de.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'de_DE' -@@ -402,27 +210,6 @@ func (de *de_DE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +218,6 @@ func (de *de_DE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +226,6 @@ func (de *de_DE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +234,6 @@ func (de *de_DE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +242,6 @@ func (de *de_DE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +250,6 @@ func (de *de_DE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +258,6 @@ func (de *de_DE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +266,5 @@ func (de *de_DE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de_IT/de_IT.go b/de_IT/de_IT.go -index 6ae3f83..b0021fb 100644 ---- a/de_IT/de_IT.go -+++ b/de_IT/de_IT.go -@@ -10,70 +10,47 @@ import ( - ) -  - type de_IT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'de_IT' locale - func New() locales.Translator { - return &de_IT{ -- locale: "de_IT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jän.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Jänner", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, -- periodsNarrow: []string{"vm.", "nm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "HNCU": "Kubanische Normalzeit", "HECU": "Kubanische Sommerzeit", "MST": "Macau-Normalzeit", "CLT": "Chilenische Normalzeit", "JST": "Japanische Normalzeit", "WART": "Westargentinische Normalzeit", "COST": "Kolumbianische Sommerzeit", "AKST": "Alaska-Normalzeit", "CST": "Nordamerikanische Inland-Normalzeit", "HNOG": "Westgrönland-Normalzeit", "AWST": "Westaustralische Normalzeit", "SAST": "Südafrikanische Zeit", "HNEG": "Ostgrönland-Normalzeit", "ACST": "Zentralaustralische Normalzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "CHAST": "Chatham-Normalzeit", "CAT": "Zentralafrikanische Zeit", "WARST": "Westargentinische Sommerzeit", "HNT": "Neufundland-Normalzeit", "HAT": "Neufundland-Sommerzeit", "OESZ": "Osteuropäische Sommerzeit", "GYT": "Guyana-Zeit", "AKDT": "Alaska-Sommerzeit", "HEOG": "Westgrönland-Sommerzeit", "AEST": "Ostaustralische Normalzeit", "HKT": "Hongkong-Normalzeit", "WITA": "Zentralindonesische Zeit", "LHST": "Lord-Howe-Normalzeit", "ARST": "Argentinische Sommerzeit", "NZST": "Neuseeland-Normalzeit", "WIT": "Ostindonesische Zeit", "VET": "Venezuela-Zeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "NZDT": "Neuseeland-Sommerzeit", "CHADT": "Chatham-Sommerzeit", "JDT": "Japanische Sommerzeit", "OEZ": "Osteuropäische Normalzeit", "AWDT": "Westaustralische Sommerzeit", "MEZ": "Mitteleuropäische Normalzeit", "BOT": "Bolivianische Zeit", "BT": "Bhutan-Zeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "HKST": "Hongkong-Sommerzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "ADT": "Atlantik-Sommerzeit", "HAST": "Hawaii-Aleuten-Normalzeit", "EAT": "Ostafrikanische Zeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "UYT": "Uruguyanische Normalzeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "CLST": "Chilenische Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "TMST": "Turkmenistan-Sommerzeit", "LHDT": "Lord-Howe-Sommerzeit", "ECT": "Ecuadorianische Zeit", "COT": "Kolumbianische Normalzeit", "ART": "Argentinische Normalzeit", "MESZ": "Mitteleuropäische Sommerzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "GMT": "Mittlere Greenwich-Zeit", "SRT": "Suriname-Zeit", "ChST": "Chamorro-Zeit", "HEEG": "Ostgrönland-Sommerzeit", "GFT": "Französisch-Guayana-Zeit", "WAT": "Westafrikanische Normalzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "AST": "Atlantik-Normalzeit", "WESZ": "Westeuropäische Sommerzeit", "AEDT": "Ostaustralische Sommerzeit", "IST": "Indische Zeit", "ACDT": "Zentralaustralische Sommerzeit", "WAST": "Westafrikanische Sommerzeit", "SGT": "Singapur-Zeit", "MDT": "Macau-Sommerzeit", "UYST": "Uruguayanische Sommerzeit", "WIB": "Westindonesische Zeit", "∅∅∅": "Amazonas-Sommerzeit", "MYT": "Malaysische Zeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "WEZ": "Westeuropäische Normalzeit"}, -+ locale: "de_IT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "Jän.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -+ monthsWide: []string{"", "Jänner", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -+ timezones: map[string]string{"CAT": "CAT", "ADT": "ADT", "ARST": "ARST", "HADT": "HADT", "MEZ": "MEZ", "JST": "JST", "HKT": "HKT", "HKST": "HKST", "COT": "COT", "IST": "IST", "OESZ": "OESZ", "UYT": "UYT", "BT": "BT", "WAT": "WAT", "EAT": "EAT", "ACST": "ACST", "ACWST": "ACWST", "WART": "WART", "TMST": "TMST", "NZST": "NZST", "HAST": "HAST", "AEDT": "AEDT", "GFT": "GFT", "EDT": "EDT", "TMT": "TMT", "NZDT": "NZDT", "AWST": "AWST", "ChST": "ChST", "SGT": "SGT", "AKST": "AKST", "AST": "AST", "GMT": "GMT", "HNPM": "HNPM", "HNCU": "HNCU", "HECU": "HECU", "AKDT": "AKDT", "SAST": "SAST", "HEOG": "HEOG", "MDT": "MDT", "ACDT": "ACDT", "HAT": "HAT", "WIT": "WIT", "CST": "CST", "HNEG": "HNEG", "AWDT": "AWDT", "JDT": "JDT", "HNPMX": "HNPMX", "ART": "ART", "HEEG": "HEEG", "PST": "PST", "PDT": "PDT", "CHAST": "CHAST", "WIB": "WIB", "LHDT": "LHDT", "ACWDT": "ACWDT", "AEST": "AEST", "HNT": "HNT", "GYT": "GYT", "HNOG": "HNOG", "EST": "EST", "HENOMX": "HENOMX", "WESZ": "WESZ", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "UYST": "UYST", "WEZ": "WEZ", "OEZ": "OEZ", "CLST": "CLST", "MESZ": "MESZ", "SRT": "SRT", "VET": "VET", "WARST": "WARST", "COST": "COST", "WITA": "WITA", "ECT": "ECT", "MST": "MST", "BOT": "BOT", "MYT": "MYT", "CHADT": "CHADT", "WAST": "WAST", "CLT": "CLT", "CDT": "CDT", "HEPM": "HEPM", "HNNOMX": "HNNOMX", "LHST": "LHST"}, - } - } -  -@@ -148,7 +125,7 @@ func (de *de_IT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_IT) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -204,75 +181,13 @@ func (de *de_IT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_IT' and handles both Whole and Real numbers based on 'v' - func (de *de_IT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_IT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_IT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, de.percentSuffix...) -- -- b = append(b, de.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'de_IT' -@@ -280,56 +195,7 @@ func (de *de_IT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, de.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'de_IT' -@@ -338,63 +204,7 @@ func (de *de_IT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, de.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, de.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, de.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'de_IT' -@@ -402,27 +212,6 @@ func (de *de_IT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +220,6 @@ func (de *de_IT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +228,6 @@ func (de *de_IT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +236,6 @@ func (de *de_IT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +244,6 @@ func (de *de_IT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +252,6 @@ func (de *de_IT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +260,6 @@ func (de *de_IT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +268,5 @@ func (de *de_IT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de_LI/de_LI.go b/de_LI/de_LI.go -index e55b641..dca03bd 100644 ---- a/de_LI/de_LI.go -+++ b/de_LI/de_LI.go -@@ -50,28 +50,12 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{2, 6}, - decimal: ".", - group: "'", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, - periodsNarrow: []string{"vm.", "nm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"HKST": "Hongkong-Sommerzeit", "∅∅∅": "Amazonas-Sommerzeit", "TMST": "Turkmenistan-Sommerzeit", "VET": "Venezuela-Zeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "CHAST": "Chatham-Normalzeit", "WIB": "Westindonesische Zeit", "ART": "Argentinische Normalzeit", "NZST": "Neuseeland-Normalzeit", "HAST": "Hawaii-Aleuten-Normalzeit", "ARST": "Argentinische Sommerzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "JST": "Japanische Normalzeit", "AST": "Atlantik-Normalzeit", "AKST": "Alaska-Normalzeit", "HNT": "Neufundland-Normalzeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "WARST": "Westargentinische Sommerzeit", "MST": "Macau-Normalzeit", "MYT": "Malaysische Zeit", "HEOG": "Westgrönland-Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "ACDT": "Zentralaustralische Sommerzeit", "WART": "Westargentinische Normalzeit", "MDT": "Macau-Sommerzeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "HNOG": "Westgrönland-Normalzeit", "LHST": "Lord-Howe-Normalzeit", "LHDT": "Lord-Howe-Sommerzeit", "SAST": "Südafrikanische Zeit", "BOT": "Bolivianische Zeit", "WAT": "Westafrikanische Normalzeit", "HECU": "Kubanische Sommerzeit", "BT": "Bhutan-Zeit", "CLST": "Chilenische Sommerzeit", "GFT": "Französisch-Guayana-Zeit", "HNEG": "Ostgrönland-Normalzeit", "SGT": "Singapur-Zeit", "UYT": "Uruguyanische Normalzeit", "CHADT": "Chatham-Sommerzeit", "WEZ": "Westeuropäische Normalzeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "WIT": "Ostindonesische Zeit", "AEDT": "Ostaustralische Sommerzeit", "CLT": "Chilenische Normalzeit", "OEZ": "Osteuropäische Normalzeit", "ECT": "Ecuadorianische Zeit", "CAT": "Zentralafrikanische Zeit", "WAST": "Westafrikanische Sommerzeit", "HNCU": "Kubanische Normalzeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "CST": "Nordamerikanische Inland-Normalzeit", "MEZ": "Mitteleuropäische Normalzeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "AKDT": "Alaska-Sommerzeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "ChST": "Chamorro-Zeit", "EAT": "Ostafrikanische Zeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "ADT": "Atlantik-Sommerzeit", "GYT": "Guyana-Zeit", "AWST": "Westaustralische Normalzeit", "OESZ": "Osteuropäische Sommerzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "UYST": "Uruguayanische Sommerzeit", "WITA": "Zentralindonesische Zeit", "SRT": "Suriname-Zeit", "AWDT": "Westaustralische Sommerzeit", "NZDT": "Neuseeland-Sommerzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "HKT": "Hongkong-Normalzeit", "HEEG": "Ostgrönland-Sommerzeit", "ACST": "Zentralaustralische Normalzeit", "COT": "Kolumbianische Normalzeit", "COST": "Kolumbianische Sommerzeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "AEST": "Ostaustralische Normalzeit", "WESZ": "Westeuropäische Sommerzeit", "MESZ": "Mitteleuropäische Sommerzeit", "IST": "Indische Zeit", "JDT": "Japanische Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "HAT": "Neufundland-Sommerzeit"}, -+ timezones: map[string]string{"EAT": "EAT", "ACDT": "ACDT", "OEZ": "OEZ", "LHST": "LHST", "HEPM": "HEPM", "IST": "IST", "AST": "AST", "ECT": "ECT", "HNCU": "HNCU", "WAT": "WAT", "AKDT": "AKDT", "GYT": "GYT", "HNOG": "HNOG", "CST": "CST", "MDT": "MDT", "GMT": "GMT", "SGT": "SGT", "HECU": "HECU", "AKST": "AKST", "WART": "WART", "COST": "COST", "TMST": "TMST", "ADT": "ADT", "BOT": "BOT", "AWDT": "AWDT", "PDT": "PDT", "OESZ": "OESZ", "HEOG": "HEOG", "MEZ": "MEZ", "HNEG": "HNEG", "ACWST": "ACWST", "MYT": "MYT", "HNPM": "HNPM", "ACWDT": "ACWDT", "UYT": "UYT", "NZST": "NZST", "ChST": "ChST", "ART": "ART", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "BT": "BT", "COT": "COT", "WITA": "WITA", "EDT": "EDT", "HADT": "HADT", "AWST": "AWST", "LHDT": "LHDT", "AEDT": "AEDT", "WEZ": "WEZ", "HAT": "HAT", "WARST": "WARST", "NZDT": "NZDT", "WIB": "WIB", "ARST": "ARST", "SRT": "SRT", "HEEG": "HEEG", "CHAST": "CHAST", "WAST": "WAST", "HNT": "HNT", "CDT": "CDT", "UYST": "UYST", "EST": "EST", "CAT": "CAT", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "WIT": "WIT", "CLT": "CLT", "MST": "MST", "HAST": "HAST", "JDT": "JDT", "WESZ": "WESZ", "GFT": "GFT", "SAST": "SAST", "HKST": "HKST", "ACST": "ACST", "JST": "JST", "PST": "PST", "CHADT": "CHADT", "VET": "VET", "CLST": "CLST", "AEST": "AEST", "HNPMX": "HNPMX", "HKT": "HKT", "TMT": "TMT"}, - } - } -  -@@ -136,7 +120,7 @@ func (de *de_LI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (de *de_LI) MonthsAbbreviated() []string { -- return de.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +130,7 @@ func (de *de_LI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_LI) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +140,7 @@ func (de *de_LI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (de *de_LI) MonthsWide() []string { -- return de.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,49 +186,14 @@ func (de *de_LI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_LI' and handles both Whole and Real numbers based on 'v' - func (de *de_LI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_LI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_LI) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 1 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -276,7 +225,7 @@ func (de *de_LI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -338,7 +287,7 @@ func (de *de_LI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -411,27 +360,6 @@ func (de *de_LI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -440,27 +368,6 @@ func (de *de_LI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,17 +376,6 @@ func (de *de_LI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -488,19 +384,6 @@ func (de *de_LI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -509,19 +392,6 @@ func (de *de_LI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -530,26 +400,6 @@ func (de *de_LI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -558,30 +408,6 @@ func (de *de_LI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -590,34 +416,5 @@ func (de *de_LI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/de_LU/de_LU.go b/de_LU/de_LU.go -index 4e05dc8..67ef8cf 100644 ---- a/de_LU/de_LU.go -+++ b/de_LU/de_LU.go -@@ -10,70 +10,46 @@ import ( - ) -  - type de_LU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'de_LU' locale - func New() locales.Translator { - return &de_LU{ -- locale: "de_LU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "F", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mo.", "Di.", "Mi.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"}, -- periodsAbbreviated: []string{"vorm.", "nachm."}, -- periodsNarrow: []string{"vorm.", "nachm."}, -- periodsWide: []string{"vorm.", "nachm."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"AKDT": "Alaska-Sommerzeit", "BT": "Bhutan-Zeit", "OEZ": "Osteuropäische Normalzeit", "COT": "Kolumbianische Normalzeit", "HEPMX": "Mexiko Pazifikzone-Sommerzeit", "HADT": "Hawaii-Aleuten-Sommerzeit", "ACWST": "Zentral-/Westaustralische Normalzeit", "HAT": "Neufundland-Sommerzeit", "AEDT": "Ostaustralische Sommerzeit", "HEPM": "Saint-Pierre-und-Miquelon-Sommerzeit", "GMT": "Mittlere Greenwich-Zeit", "HNPMX": "Mexiko Pazifikzone-Normalzeit", "MEZ": "Mitteleuropäische Normalzeit", "HENOMX": "Mexiko Nordwestliche Zone-Sommerzeit", "HNT": "Neufundland-Normalzeit", "WITA": "Zentralindonesische Zeit", "LHDT": "Lord-Howe-Sommerzeit", "WAST": "Westafrikanische Sommerzeit", "OESZ": "Osteuropäische Sommerzeit", "NZST": "Neuseeland-Normalzeit", "CHAST": "Chatham-Normalzeit", "CLT": "Chilenische Normalzeit", "HEEG": "Ostgrönland-Sommerzeit", "COST": "Kolumbianische Sommerzeit", "ADT": "Atlantik-Sommerzeit", "UYT": "Uruguyanische Normalzeit", "HKT": "Hongkong-Normalzeit", "MESZ": "Mitteleuropäische Sommerzeit", "IST": "Indische Zeit", "HECU": "Kubanische Sommerzeit", "ARST": "Argentinische Sommerzeit", "HKST": "Hongkong-Sommerzeit", "WAT": "Westafrikanische Normalzeit", "UYST": "Uruguayanische Sommerzeit", "VET": "Venezuela-Zeit", "NZDT": "Neuseeland-Sommerzeit", "CLST": "Chilenische Sommerzeit", "ACST": "Zentralaustralische Normalzeit", "WIT": "Ostindonesische Zeit", "PDT": "Nordamerikanische Westküsten-Sommerzeit", "TMT": "Turkmenistan-Normalzeit", "ACDT": "Zentralaustralische Sommerzeit", "ART": "Argentinische Normalzeit", "WARST": "Westargentinische Sommerzeit", "HNNOMX": "Mexiko Nordwestliche Zone-Normalzeit", "AST": "Atlantik-Normalzeit", "GYT": "Guyana-Zeit", "AKST": "Alaska-Normalzeit", "HAST": "Hawaii-Aleuten-Normalzeit", "SRT": "Suriname-Zeit", "CAT": "Zentralafrikanische Zeit", "∅∅∅": "Azoren-Sommerzeit", "AWST": "Westaustralische Normalzeit", "AWDT": "Westaustralische Sommerzeit", "HNEG": "Ostgrönland-Normalzeit", "GFT": "Französisch-Guayana-Zeit", "WIB": "Westindonesische Zeit", "PST": "Nordamerikanische Westküsten-Normalzeit", "HNPM": "Saint-Pierre-und-Miquelon-Normalzeit", "CHADT": "Chatham-Sommerzeit", "SAST": "Südafrikanische Zeit", "JST": "Japanische Normalzeit", "TMST": "Turkmenistan-Sommerzeit", "SGT": "Singapur-Zeit", "MST": "Macau-Normalzeit", "MDT": "Macau-Sommerzeit", "BOT": "Bolivianische Zeit", "EDT": "Nordamerikanische Ostküsten-Sommerzeit", "CDT": "Nordamerikanische Inland-Sommerzeit", "WESZ": "Westeuropäische Sommerzeit", "AEST": "Ostaustralische Normalzeit", "ChST": "Chamorro-Zeit", "EAT": "Ostafrikanische Zeit", "HNCU": "Kubanische Normalzeit", "EST": "Nordamerikanische Ostküsten-Normalzeit", "MYT": "Malaysische Zeit", "HNOG": "Westgrönland-Normalzeit", "HEOG": "Westgrönland-Sommerzeit", "WART": "Westargentinische Normalzeit", "CST": "Nordamerikanische Inland-Normalzeit", "WEZ": "Westeuropäische Normalzeit", "ACWDT": "Zentral-/Westaustralische Sommerzeit", "LHST": "Lord-Howe-Normalzeit", "JDT": "Japanische Sommerzeit", "ECT": "Ecuadorianische Zeit"}, -+ locale: "de_LU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "F", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsNarrow: []string{"vorm.", "nachm."}, -+ timezones: map[string]string{"WAT": "WAT", "GFT": "GFT", "COT": "COT", "NZST": "NZST", "GMT": "GMT", "PDT": "PDT", "ACWDT": "ACWDT", "EDT": "EDT", "WITA": "WITA", "ADT": "ADT", "HADT": "HADT", "IST": "IST", "BT": "BT", "AEDT": "AEDT", "NZDT": "NZDT", "ChST": "ChST", "EAT": "EAT", "ACST": "ACST", "HEPM": "HEPM", "WEZ": "WEZ", "BOT": "BOT", "HEEG": "HEEG", "JST": "JST", "WART": "WART", "MDT": "MDT", "SRT": "SRT", "LHDT": "LHDT", "OEZ": "OEZ", "HEOG": "HEOG", "EST": "EST", "UYT": "UYT", "UYST": "UYST", "HECU": "HECU", "HAT": "HAT", "HNEG": "HNEG", "HENOMX": "HENOMX", "SGT": "SGT", "HNT": "HNT", "TMST": "TMST", "ARST": "ARST", "MESZ": "MESZ", "CHADT": "CHADT", "CAT": "CAT", "CST": "CST", "AWST": "AWST", "MYT": "MYT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "PST": "PST", "WAST": "WAST", "WARST": "WARST", "HKT": "HKT", "AST": "AST", "AWDT": "AWDT", "HNCU": "HNCU", "HEPMX": "HEPMX", "OESZ": "OESZ", "SAST": "SAST", "HNPM": "HNPM", "JDT": "JDT", "VET": "VET", "HNOG": "HNOG", "CLT": "CLT", "MST": "MST", "ECT": "ECT", "WIB": "WIB", "ART": "ART", "WESZ": "WESZ", "AKDT": "AKDT", "WIT": "WIT", "GYT": "GYT", "ACWST": "ACWST", "HNPMX": "HNPMX", "CLST": "CLST", "CDT": "CDT", "HAST": "HAST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "AEST": "AEST", "AKST": "AKST", "COST": "COST", "HKST": "HKST", "TMT": "TMT", "MEZ": "MEZ", "LHST": "LHST"}, - } - } -  -@@ -138,7 +114,7 @@ func (de *de_LU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (de *de_LU) MonthsAbbreviated() []string { -- return de.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +124,7 @@ func (de *de_LU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (de *de_LU) MonthsNarrow() []string { -- return de.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +134,7 @@ func (de *de_LU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (de *de_LU) MonthsWide() []string { -- return de.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +180,13 @@ func (de *de_LU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'de_LU' and handles both Whole and Real numbers based on 'v' - func (de *de_LU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'de_LU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (de *de_LU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, de.percentSuffix...) -- -- b = append(b, de.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'de_LU' -@@ -280,56 +194,7 @@ func (de *de_LU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, de.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, de.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'de_LU' -@@ -338,63 +203,7 @@ func (de *de_LU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := de.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, de.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, de.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, de.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, de.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, de.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, de.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'de_LU' -@@ -402,27 +211,6 @@ func (de *de_LU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +219,6 @@ func (de *de_LU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +227,6 @@ func (de *de_LU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +235,6 @@ func (de *de_LU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, de.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, de.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +243,6 @@ func (de *de_LU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +251,6 @@ func (de *de_LU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +259,6 @@ func (de *de_LU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +267,5 @@ func (de *de_LU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, de.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := de.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/dje/dje.go b/dje/dje.go -index a1d0b50..cf57515 100644 ---- a/dje/dje.go -+++ b/dje/dje.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"IJ", "IZ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Isaa jine", "Isaa zamanoo"}, -- timezones: map[string]string{"SAST": "SAST", "ChST": "ChST", "MST": "MST", "AEST": "AEST", "NZST": "NZST", "HNOG": "HNOG", "AWDT": "AWDT", "HKST": "HKST", "NZDT": "NZDT", "WARST": "WARST", "UYST": "UYST", "BT": "BT", "WEZ": "WEZ", "CHADT": "CHADT", "JDT": "JDT", "ACST": "ACST", "EAT": "EAT", "HENOMX": "HENOMX", "CHAST": "CHAST", "MESZ": "MESZ", "HNCU": "HNCU", "EST": "EST", "WIB": "WIB", "HNT": "HNT", "ACDT": "ACDT", "AKDT": "AKDT", "WITA": "WITA", "CLT": "CLT", "HECU": "HECU", "MDT": "MDT", "PDT": "PDT", "CAT": "CAT", "GMT": "GMT", "UYT": "UYT", "PST": "PST", "GFT": "GFT", "COT": "COT", "SGT": "SGT", "HNPMX": "HNPMX", "CDT": "CDT", "HAST": "HAST", "SRT": "SRT", "HAT": "HAT", "IST": "IST", "BOT": "BOT", "HEEG": "HEEG", "WART": "WART", "ART": "ART", "CLST": "CLST", "JST": "JST", "ECT": "ECT", "ADT": "ADT", "ACWST": "ACWST", "HEPM": "HEPM", "AEDT": "AEDT", "HNEG": "HNEG", "AKST": "AKST", "CST": "CST", "GYT": "GYT", "VET": "VET", "WESZ": "WESZ", "ARST": "ARST", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "WAT": "WAT", "HEPMX": "HEPMX", "AST": "AST", "AWST": "AWST", "HKT": "HKT", "MEZ": "MEZ", "LHST": "LHST", "HADT": "HADT", "WAST": "WAST", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "EDT": "EDT", "MYT": "MYT", "WIT": "WIT", "TMT": "TMT", "TMST": "TMST", "OEZ": "OEZ", "COST": "COST", "ACWDT": "ACWDT", "HNPM": "HNPM", "LHDT": "LHDT"}, -+ timezones: map[string]string{"MDT": "MDT", "ART": "ART", "WAST": "WAST", "WARST": "WARST", "∅∅∅": "∅∅∅", "HKST": "HKST", "CLT": "CLT", "CAT": "CAT", "HNEG": "HNEG", "AKST": "AKST", "WIT": "WIT", "NZST": "NZST", "JST": "JST", "AWST": "AWST", "AWDT": "AWDT", "GFT": "GFT", "EST": "EST", "HEPM": "HEPM", "ACDT": "ACDT", "LHST": "LHST", "AEST": "AEST", "AEDT": "AEDT", "CHADT": "CHADT", "HEOG": "HEOG", "WIB": "WIB", "LHDT": "LHDT", "HNPM": "HNPM", "BT": "BT", "VET": "VET", "HNT": "HNT", "MEZ": "MEZ", "EAT": "EAT", "MESZ": "MESZ", "UYST": "UYST", "SGT": "SGT", "OESZ": "OESZ", "CLST": "CLST", "CDT": "CDT", "ADT": "ADT", "ACST": "ACST", "JDT": "JDT", "WEZ": "WEZ", "OEZ": "OEZ", "GYT": "GYT", "COST": "COST", "TMST": "TMST", "CST": "CST", "ARST": "ARST", "BOT": "BOT", "HNCU": "HNCU", "AKDT": "AKDT", "WART": "WART", "TMT": "TMT", "ECT": "ECT", "ChST": "ChST", "AST": "AST", "ACWDT": "ACWDT", "HECU": "HECU", "SAST": "SAST", "HKT": "HKT", "WESZ": "WESZ", "HAT": "HAT", "ACWST": "ACWST", "NZDT": "NZDT", "HADT": "HADT", "HEEG": "HEEG", "PDT": "PDT", "CHAST": "CHAST", "UYT": "UYT", "EDT": "EDT", "MST": "MST", "PST": "PST", "HNPMX": "HNPMX", "WITA": "WITA", "SRT": "SRT", "HNNOMX": "HNNOMX", "WAT": "WAT", "GMT": "GMT", "COT": "COT", "HENOMX": "HENOMX", "MYT": "MYT", "IST": "IST", "HEPMX": "HEPMX", "HNOG": "HNOG", "HAST": "HAST"}, - } - } -  -diff --git a/dje_NE/dje_NE.go b/dje_NE/dje_NE.go -index a133bd5..8dd1d97 100644 ---- a/dje_NE/dje_NE.go -+++ b/dje_NE/dje_NE.go -@@ -42,26 +42,13 @@ type dje_NE struct { - // New returns a new instance of translator for the 'dje_NE' locale - func New() locales.Translator { - return &dje_NE{ -- locale: "dje_NE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Žan", "Fee", "Mar", "Awi", "Me", "Žuw", "Žuy", "Ut", "Sek", "Okt", "Noo", "Dee"}, -- monthsNarrow: []string{"", "Ž", "F", "M", "A", "M", "Ž", "Ž", "U", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Žanwiye", "Feewiriye", "Marsi", "Awiril", "Me", "Žuweŋ", "Žuyye", "Ut", "Sektanbur", "Oktoobur", "Noowanbur", "Deesanbur"}, -- daysAbbreviated: []string{"Alh", "Ati", "Ata", "Ala", "Alm", "Alz", "Asi"}, -- daysNarrow: []string{"H", "T", "T", "L", "M", "Z", "S"}, -- daysWide: []string{"Alhadi", "Atinni", "Atalaata", "Alarba", "Alhamisi", "Alzuma", "Asibti"}, -- periodsAbbreviated: []string{"Subbaahi", "Zaarikay b"}, -- periodsWide: []string{"Subbaahi", "Zaarikay b"}, -- erasAbbreviated: []string{"IJ", "IZ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Isaa jine", "Isaa zamanoo"}, -- timezones: map[string]string{"GYT": "GYT", "MEZ": "MEZ", "LHST": "LHST", "ChST": "ChST", "HNEG": "HNEG", "HNPMX": "HNPMX", "NZST": "NZST", "CHADT": "CHADT", "SAST": "SAST", "OEZ": "OEZ", "WART": "WART", "MESZ": "MESZ", "HKT": "HKT", "NZDT": "NZDT", "HEOG": "HEOG", "ACWST": "ACWST", "HNT": "HNT", "AEST": "AEST", "COT": "COT", "UYT": "UYT", "AEDT": "AEDT", "CHAST": "CHAST", "HNOG": "HNOG", "MST": "MST", "CDT": "CDT", "AWDT": "AWDT", "BOT": "BOT", "HEEG": "HEEG", "HENOMX": "HENOMX", "GMT": "GMT", "MYT": "MYT", "AKDT": "AKDT", "VET": "VET", "HNPM": "HNPM", "CAT": "CAT", "AST": "AST", "UYST": "UYST", "WIB": "WIB", "PST": "PST", "ACWDT": "ACWDT", "IST": "IST", "ACST": "ACST", "ACDT": "ACDT", "ADT": "ADT", "OESZ": "OESZ", "HAT": "HAT", "TMST": "TMST", "EAT": "EAT", "WAT": "WAT", "HNNOMX": "HNNOMX", "EST": "EST", "WIT": "WIT", "ART": "ART", "AWST": "AWST", "JST": "JST", "JDT": "JDT", "AKST": "AKST", "WEZ": "WEZ", "HKST": "HKST", "WITA": "WITA", "HEPM": "HEPM", "TMT": "TMT", "PDT": "PDT", "LHDT": "LHDT", "CLT": "CLT", "WARST": "WARST", "SGT": "SGT", "EDT": "EDT", "MDT": "MDT", "HAST": "HAST", "HADT": "HADT", "SRT": "SRT", "WESZ": "WESZ", "ECT": "ECT", "∅∅∅": "∅∅∅", "CST": "CST", "CLST": "CLST", "HNCU": "HNCU", "BT": "BT", "GFT": "GFT", "WAST": "WAST", "HECU": "HECU", "ARST": "ARST", "COST": "COST", "HEPMX": "HEPMX"}, -+ locale: "dje_NE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "TMST": "TMST", "ChST": "ChST", "CLT": "CLT", "MYT": "MYT", "OESZ": "OESZ", "HAT": "HAT", "∅∅∅": "∅∅∅", "GYT": "GYT", "EST": "EST", "WIB": "WIB", "CST": "CST", "MDT": "MDT", "ART": "ART", "HNEG": "HNEG", "AEDT": "AEDT", "ACWDT": "ACWDT", "SGT": "SGT", "HKT": "HKT", "CLST": "CLST", "ACWST": "ACWST", "HNT": "HNT", "CAT": "CAT", "NZST": "NZST", "AWST": "AWST", "OEZ": "OEZ", "WART": "WART", "COT": "COT", "AST": "AST", "GMT": "GMT", "HEPM": "HEPM", "WAT": "WAT", "WAST": "WAST", "WARST": "WARST", "EDT": "EDT", "HKST": "HKST", "SRT": "SRT", "HEEG": "HEEG", "HEPMX": "HEPMX", "AKST": "AKST", "ECT": "ECT", "HNPM": "HNPM", "HNPMX": "HNPMX", "HNCU": "HNCU", "TMT": "TMT", "WITA": "WITA", "HADT": "HADT", "HNNOMX": "HNNOMX", "IST": "IST", "SAST": "SAST", "COST": "COST", "ARST": "ARST", "MEZ": "MEZ", "PDT": "PDT", "BT": "BT", "WEZ": "WEZ", "BOT": "BOT", "ACST": "ACST", "LHDT": "LHDT", "CHAST": "CHAST", "EAT": "EAT", "JDT": "JDT", "AWDT": "AWDT", "LHST": "LHST", "UYST": "UYST", "WESZ": "WESZ", "ACDT": "ACDT", "CHADT": "CHADT", "UYT": "UYT", "WIT": "WIT", "NZDT": "NZDT", "PST": "PST", "AKDT": "AKDT", "HNOG": "HNOG", "HEOG": "HEOG", "MST": "MST", "MESZ": "MESZ", "HENOMX": "HENOMX", "HECU": "HECU", "CDT": "CDT", "ADT": "ADT", "HAST": "HAST", "JST": "JST", "AEST": "AEST", "VET": "VET"}, - } - } -  -@@ -107,7 +94,7 @@ func (dje *dje_NE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (dje *dje_NE) MonthsAbbreviated() []string { -- return dje.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -117,7 +104,7 @@ func (dje *dje_NE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (dje *dje_NE) MonthsNarrow() []string { -- return dje.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -127,7 +114,7 @@ func (dje *dje_NE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (dje *dje_NE) MonthsWide() []string { -- return dje.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -173,75 +160,13 @@ func (dje *dje_NE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'dje_NE' and handles both Whole and Real numbers based on 'v' - func (dje *dje_NE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dje.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dje.group) - 1; j >= 0; j-- { -- b = append(b, dje.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dje.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'dje_NE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (dje *dje_NE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dje.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dje.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, dje.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'dje_NE' -@@ -249,56 +174,7 @@ func (dje *dje_NE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dje.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dje.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dje.group) - 1; j >= 0; j-- { -- b = append(b, dje.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dje.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dje.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'dje_NE' -@@ -307,63 +183,7 @@ func (dje *dje_NE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dje.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dje.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dje.group) - 1; j >= 0; j-- { -- b = append(b, dje.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, dje.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dje.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'dje_NE' -@@ -371,17 +191,6 @@ func (dje *dje_NE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -390,17 +199,6 @@ func (dje *dje_NE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dje.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -409,17 +207,6 @@ func (dje *dje_NE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dje.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +215,6 @@ func (dje *dje_NE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, dje.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dje.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,19 +223,6 @@ func (dje *dje_NE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -470,26 +231,6 @@ func (dje *dje_NE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -498,30 +239,6 @@ func (dje *dje_NE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -530,34 +247,5 @@ func (dje *dje_NE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dje.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := dje.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/dsb/dsb.go b/dsb/dsb.go -index 27bfc19..9d3f0a2 100644 ---- a/dsb/dsb.go -+++ b/dsb/dsb.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"pś.Chr.n.", "pó Chr.n."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"pśed Kristusowym naroźenim", "pó Kristusowem naroźenju"}, -- timezones: map[string]string{"HKT": "Hongkongski standardny cas", "HENOMX": "Mexiski dłujkowjacorny lěśojski cas", "NZST": "Nowoseelandski standardny cas", "CHAST": "Chathamski standardny cas", "OEZ": "Pódzajtšnoeuropski standardny cas", "OESZ": "Pódzajtšnoeuropski lěśojski cas", "COST": "Kolumbiski lěśojski cas", "AKST": "Alaskojski standardny cas", "HADT": "Hawaiisko-aleutski lěśojski cas", "WITA": "Srjejźoindoneski cas", "AWDT": "Pódwjacornoawstralski lěśojski cas", "ACDT": "Srjejźoawstralski lěśojski cas", "EST": "Pódpołnocnoameriski pódzajtšny standardny cas", "HAST": "Hawaiisko-aleutski standardny cas", "AEST": "Pódzajtšnoawstralski standardny cas", "AEDT": "Pódzajtšnoawstralski lěśojski cas", "NZDT": "Nowoseelandski lěśojski cas", "CLT": "Chilski standardny cas", "GFT": "Francojskoguyański cas", "WAST": "Pódwjacornoafriski lěśojski cas", "HNNOMX": "Mexiski dłujkowjacorny standardny cas", "MDT": "MDT", "SRT": "Surinamski cas", "ACWDT": "Srjejźopódwjacorny awstralski lěśojski cas", "TMST": "Turkmeniski lěśojski cas", "CDT": "Pódpołnocnoameriski centralny lěśojski cas", "UYT": "Uruguayski standardny cas", "MESZ": "Srjejźoeuropski lěśojski cas", "HNOG": "Pódwjacornogrönlandski standardny cas", "CHADT": "Chathamski lěśojski cas", "CLST": "Chilski lěśojski cas", "TMT": "Turkmeniski standardny cas", "ChST": "Chamorrski cas", "GMT": "Greenwichski cas", "ADT": "Atlantiski lěśojski cas", "MYT": "Malajziski cas", "WAT": "Pódwjacornoafriski standardny cas", "ECT": "Ekuadorski cas", "WART": "Pódwjacornoargentinski standardny cas", "AWST": "Pódwjacornoawstralski standardny cas", "IST": "Indiski cas", "HNEG": "Pódzajtšnogrönlandski standardny cas", "HNCU": "Kubański standardny cas", "∅∅∅": "Acorski lěśojski cas", "GYT": "Guyański cas", "HECU": "Kubański lěśojski cas", "WIB": "Pódwjacornoindoneski cas", "JDT": "Japański lěśojski cas", "ART": "Argentinski standardny cas", "HEPM": "St.-Pierre-a-Miqueloński lěśojski cas", "LHST": "Standardny cas kupy Lord-Howe", "SAST": "Pódpołdnjowoafriski cas", "JST": "Japański standardny cas", "SGT": "Singapurski cas", "WIT": "Pódzajtšnoindoneski", "ACWST": "Srjejźopódwjacorny awstralski standardny cas", "LHDT": "lěśojski cas kupy Lord-Howe", "CAT": "Srjejźoafriski cas", "HEPMX": "Mexiski pacifiski lěśojski cas", "BT": "Bhutański cas", "PDT": "Pódpołnocnoameriski pacifiski lěśojski cas", "ARST": "Argentinski lěśojski cas", "WESZ": "Pódwjacornoeuropski lěśojski cas", "HNPM": "St.-Pierre-a-Miqueloński standardny cas", "PST": "Pódpołnocnoameriski pacifiski standardny cas", "ACST": "Srjejźoawstralski standardny cas", "HNPMX": "Mexiski pacifiski standardny cas", "AKDT": "Alaskojski lěśojski cas", "HAT": "Nowofundlandski lěśojski cas", "MEZ": "Srjejźoeuropski standardny cas", "AST": "Atlantiski standardny cas", "VET": "Venezuelski cas", "HEOG": "Pódwjacornogrönlandski lěśojski cas", "EAT": "Pódzajtšnoafriski cas", "CST": "Pódpołnocnoameriski centralny standardny cas", "UYST": "Uruguayski lěśojski cas", "WEZ": "Pódwjacornoeuropski standardny cas", "HKST": "Hongkongski lěśojski cas", "HEEG": "Pódzajtšnogrönlandski lěśojski cas", "BOT": "Boliwiski cas", "WARST": "Pódwjacornoargentinski lěśojski cas", "COT": "Kolumbiski standardny cas", "EDT": "Pódpołnocnoameriski pódzajtšny lěśojski cas", "MST": "MST", "HNT": "Nowofundlandski standardny cas"}, -+ timezones: map[string]string{"LHST": "Standardny cas kupy Lord-Howe", "CHAST": "Chathamski standardny cas", "TMST": "Turkmeniski lěśojski cas", "GMT": "Greenwichski cas", "AWST": "Pódwjacornoawstralski standardny cas", "JST": "Japański standardny cas", "CHADT": "Chathamski lěśojski cas", "IST": "Indiski cas", "AEDT": "Pódzajtšnoawstralski lěśojski cas", "WART": "Pódwjacornoargentinski standardny cas", "NZDT": "Nowoseelandski lěśojski cas", "ADT": "Atlantiski lěśojski cas", "NZST": "Nowoseelandski standardny cas", "UYT": "Uruguayski standardny cas", "AEST": "Pódzajtšnoawstralski standardny cas", "WAST": "Pódwjacornoafriski lěśojski cas", "GFT": "Francojskoguyański cas", "HEOG": "Pódwjacornogrönlandski lěśojski cas", "CLT": "Chilski standardny cas", "CST": "Pódpołnocnoameriski centralny standardny cas", "WESZ": "Pódwjacornoeuropski lěśojski cas", "WAT": "Pódwjacornoafriski standardny cas", "HNT": "Nowofundlandski standardny cas", "HKT": "Hongkongski standardny cas", "ARST": "Argentinski lěśojski cas", "ACST": "Srjejźoawstralski standardny cas", "HNEG": "Pódzajtšnogrönlandski standardny cas", "HENOMX": "Mexiski dłujkowjacorny lěśojski cas", "LHDT": "lěśojski cas kupy Lord-Howe", "HEPM": "St.-Pierre-a-Miqueloński lěśojski cas", "JDT": "Japański lěśojski cas", "EDT": "Pódpołnocnoameriski pódzajtšny lěśojski cas", "WIB": "Pódwjacornoindoneski cas", "HAT": "Nowofundlandski lěśojski cas", "MDT": "MDT", "ECT": "Ekuadorski cas", "AWDT": "Pódwjacornoawstralski lěśojski cas", "UYST": "Uruguayski lěśojski cas", "ACWST": "Srjejźopódwjacorny awstralski standardny cas", "OEZ": "Pódzajtšnoeuropski standardny cas", "EST": "Pódpołnocnoameriski pódzajtšny standardny cas", "WITA": "Srjejźoindoneski cas", "SAST": "Pódpołdnjowoafriski cas", "COST": "Kolumbiski lěśojski cas", "HNPM": "St.-Pierre-a-Miqueloński standardny cas", "AKST": "Alaskojski standardny cas", "COT": "Kolumbiski standardny cas", "VET": "Venezuelski cas", "HEPMX": "Mexiski pacifiski lěśojski cas", "MST": "MST", "HKST": "Hongkongski lěśojski cas", "CLST": "Chilski lěśojski cas", "SGT": "Singapurski cas", "GYT": "Guyański cas", "HNOG": "Pódwjacornogrönlandski standardny cas", "CAT": "Srjejźoafriski cas", "HADT": "Hawaiisko-aleutski lěśojski cas", "EAT": "Pódzajtšnoafriski cas", "HEEG": "Pódzajtšnogrönlandski lěśojski cas", "PDT": "Pódpołnocnoameriski pacifiski lěśojski cas", "WEZ": "Pódwjacornoeuropski standardny cas", "TMT": "Turkmeniski standardny cas", "SRT": "Surinamski cas", "HAST": "Hawaiisko-aleutski standardny cas", "ACDT": "Srjejźoawstralski lěśojski cas", "HNNOMX": "Mexiski dłujkowjacorny standardny cas", "PST": "Pódpołnocnoameriski pacifiski standardny cas", "HECU": "Kubański lěśojski cas", "∅∅∅": "Acorski lěśojski cas", "ART": "Argentinski standardny cas", "BOT": "Boliwiski cas", "BT": "Bhutański cas", "ACWDT": "Srjejźopódwjacorny awstralski lěśojski cas", "AKDT": "Alaskojski lěśojski cas", "AST": "Atlantiski standardny cas", "ChST": "Chamorrski cas", "HNCU": "Kubański standardny cas", "WIT": "Pódzajtšnoindoneski", "CDT": "Pódpołnocnoameriski centralny lěśojski cas", "MEZ": "Srjejźoeuropski standardny cas", "WARST": "Pódwjacornoargentinski lěśojski cas", "MESZ": "Srjejźoeuropski lěśojski cas", "OESZ": "Pódzajtšnoeuropski lěśojski cas", "MYT": "Malajziski cas", "HNPMX": "Mexiski pacifiski standardny cas"}, - } - } -  -diff --git a/dsb_DE/dsb_DE.go b/dsb_DE/dsb_DE.go -index 802e034..89facfe 100644 ---- a/dsb_DE/dsb_DE.go -+++ b/dsb_DE/dsb_DE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type dsb_DE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'dsb_DE' locale - func New() locales.Translator { - return &dsb_DE{ -- locale: "dsb_DE", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "měr.", "apr.", "maj.", "jun.", "jul.", "awg.", "sep.", "okt.", "now.", "dec."}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januara", "februara", "měrca", "apryla", "maja", "junija", "julija", "awgusta", "septembra", "oktobra", "nowembra", "decembra"}, -- daysAbbreviated: []string{"nje", "pón", "wał", "srj", "stw", "pět", "sob"}, -- daysNarrow: []string{"n", "p", "w", "s", "s", "p", "s"}, -- daysShort: []string{"nj", "pó", "wa", "sr", "st", "pě", "so"}, -- daysWide: []string{"njeźela", "pónjeźele", "wałtora", "srjoda", "stwórtk", "pětk", "sobota"}, -- periodsAbbreviated: []string{"dopołdnja", "wótpołdnja"}, -- periodsNarrow: []string{"dop.", "wótp."}, -- periodsWide: []string{"dopołdnja", "wótpołdnja"}, -- erasAbbreviated: []string{"pś.Chr.n.", "pó Chr.n."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"pśed Kristusowym naroźenim", "pó Kristusowem naroźenju"}, -- timezones: map[string]string{"BT": "Bhutański cas", "TMST": "Turkmeniski lěśojski cas", "AST": "Atlantiski standardny cas", "WIB": "Pódwjacornoindoneski cas", "HADT": "Hawaiisko-aleutski lěśojski cas", "HNNOMX": "Mexiski dłujkowjacorny standardny cas", "HNT": "Nowofundlandski standardny cas", "MST": "MST", "EST": "Pódpołnocnoameriski pódzajtšny standardny cas", "CST": "Pódpołnocnoameriski centralny standardny cas", "HAT": "Nowofundlandski lěśojski cas", "MEZ": "Srjejźoeuropski standardny cas", "WAT": "Pódwjacornoafriski standardny cas", "HNCU": "Kubański standardny cas", "GMT": "Greenwichski cas", "JDT": "Japański lěśojski cas", "ACST": "Srjejźoawstralski standardny cas", "CHADT": "Chathamski lěśojski cas", "HEEG": "Pódzajtšnogrönlandski lěśojski cas", "ChST": "Chamorrski cas", "EDT": "Pódpołnocnoameriski pódzajtšny lěśojski cas", "AKST": "Alaskojski standardny cas", "WITA": "Srjejźoindoneski cas", "LHST": "Standardny cas kupy Lord-Howe", "HECU": "Kubański lěśojski cas", "HNOG": "Pódwjacornogrönlandski standardny cas", "AWDT": "Pódwjacornoawstralski lěśojski cas", "SGT": "Singapurski cas", "SRT": "Surinamski cas", "HNEG": "Pódzajtšnogrönlandski standardny cas", "WAST": "Pódwjacornoafriski lěśojski cas", "CAT": "Srjejźoafriski cas", "COST": "Kolumbiski lěśojski cas", "ACWDT": "Srjejźopódwjacorny awstralski lěśojski cas", "∅∅∅": "Peruski lěśojski cas", "CDT": "Pódpołnocnoameriski centralny lěśojski cas", "WIT": "Pódzajtšnoindoneski", "SAST": "Pódpołdnjowoafriski cas", "WEZ": "Pódwjacornoeuropski standardny cas", "ARST": "Argentinski lěśojski cas", "PST": "Pódpołnocnoameriski pacifiski standardny cas", "CHAST": "Chathamski standardny cas", "CLT": "Chilski standardny cas", "TMT": "Turkmeniski standardny cas", "HEPMX": "Mexiski pacifiski lěśojski cas", "GYT": "Guyański cas", "ART": "Argentinski standardny cas", "VET": "Venezuelski cas", "NZDT": "Nowoseelandski lěśojski cas", "GFT": "Francojskoguyański cas", "COT": "Kolumbiski standardny cas", "HENOMX": "Mexiski dłujkowjacorny lěśojski cas", "ADT": "Atlantiski lěśojski cas", "HEOG": "Pódwjacornogrönlandski lěśojski cas", "PDT": "Pódpołnocnoameriski pacifiski lěśojski cas", "BOT": "Boliwiski cas", "ACDT": "Srjejźoawstralski lěśojski cas", "EAT": "Pódzajtšnoafriski cas", "UYST": "Uruguayski lěśojski cas", "HAST": "Hawaiisko-aleutski standardny cas", "AWST": "Pódwjacornoawstralski standardny cas", "HKT": "Hongkongski standardny cas", "HEPM": "St.-Pierre-a-Miqueloński lěśojski cas", "OESZ": "Pódzajtšnoeuropski lěśojski cas", "WART": "Pódwjacornoargentinski standardny cas", "WESZ": "Pódwjacornoeuropski lěśojski cas", "MYT": "Malajziski cas", "UYT": "Uruguayski standardny cas", "MESZ": "Srjejźoeuropski lěśojski cas", "HNPM": "St.-Pierre-a-Miqueloński standardny cas", "CLST": "Chilski lěśojski cas", "OEZ": "Pódzajtšnoeuropski standardny cas", "ACWST": "Srjejźopódwjacorny awstralski standardny cas", "AEST": "Pódzajtšnoawstralski standardny cas", "LHDT": "lěśojski cas kupy Lord-Howe", "NZST": "Nowoseelandski standardny cas", "WARST": "Pódwjacornoargentinski lěśojski cas", "AKDT": "Alaskojski lěśojski cas", "AEDT": "Pódzajtšnoawstralski lěśojski cas", "HKST": "Hongkongski lěśojski cas", "IST": "Indiski cas", "JST": "Japański standardny cas", "ECT": "Ekuadorski cas", "MDT": "MDT", "HNPMX": "Mexiski pacifiski standardny cas"}, -+ locale: "dsb_DE", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKDT": "AKDT", "HNOG": "HNOG", "TMST": "TMST", "NZST": "NZST", "ARST": "ARST", "MESZ": "MESZ", "PDT": "PDT", "UYT": "UYT", "CAT": "CAT", "GMT": "GMT", "MEZ": "MEZ", "AWST": "AWST", "WESZ": "WESZ", "HEOG": "HEOG", "CHADT": "CHADT", "NZDT": "NZDT", "CST": "CST", "ART": "ART", "JDT": "JDT", "CHAST": "CHAST", "ACDT": "ACDT", "∅∅∅": "∅∅∅", "HAT": "HAT", "SAST": "SAST", "CLT": "CLT", "ECT": "ECT", "AWDT": "AWDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "HNT": "HNT", "WIB": "WIB", "BOT": "BOT", "JST": "JST", "ADT": "ADT", "SRT": "SRT", "COT": "COT", "WEZ": "WEZ", "OEZ": "OEZ", "COST": "COST", "MST": "MST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "UYST": "UYST", "CLST": "CLST", "AEDT": "AEDT", "WITA": "WITA", "HEEG": "HEEG", "HENOMX": "HENOMX", "LHST": "LHST", "HNPM": "HNPM", "PST": "PST", "CDT": "CDT", "BT": "BT", "AEST": "AEST", "HKT": "HKT", "TMT": "TMT", "GYT": "GYT", "MDT": "MDT", "LHDT": "LHDT", "HNPMX": "HNPMX", "GFT": "GFT", "OESZ": "OESZ", "HAST": "HAST", "WAT": "WAT", "AST": "AST", "MYT": "MYT", "VET": "VET", "WIT": "WIT", "HKST": "HKST", "ACST": "ACST", "ACWST": "ACWST", "IST": "IST", "WAST": "WAST", "ChST": "ChST", "EST": "EST", "AKST": "AKST", "WART": "WART", "WARST": "WARST", "HADT": "HADT", "EAT": "EAT", "SGT": "SGT", "HECU": "HECU", "HEPMX": "HEPMX", "EDT": "EDT"}, - } - } -  -@@ -134,7 +109,7 @@ func (dsb *dsb_DE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (dsb *dsb_DE) MonthsAbbreviated() []string { -- return dsb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -144,7 +119,7 @@ func (dsb *dsb_DE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (dsb *dsb_DE) MonthsNarrow() []string { -- return dsb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -154,7 +129,7 @@ func (dsb *dsb_DE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (dsb *dsb_DE) MonthsWide() []string { -- return dsb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -200,75 +175,13 @@ func (dsb *dsb_DE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'dsb_DE' and handles both Whole and Real numbers based on 'v' - func (dsb *dsb_DE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dsb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, dsb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dsb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'dsb_DE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (dsb *dsb_DE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dsb.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dsb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, dsb.percentSuffix...) -- -- b = append(b, dsb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'dsb_DE' -@@ -276,56 +189,7 @@ func (dsb *dsb_DE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dsb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dsb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, dsb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dsb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dsb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, dsb.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'dsb_DE' -@@ -334,63 +198,7 @@ func (dsb *dsb_DE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dsb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dsb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, dsb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, dsb.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dsb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, dsb.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, dsb.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'dsb_DE' -@@ -398,17 +206,6 @@ func (dsb *dsb_DE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -417,17 +214,6 @@ func (dsb *dsb_DE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -436,17 +222,6 @@ func (dsb *dsb_DE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, dsb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,19 +230,6 @@ func (dsb *dsb_DE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, dsb.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, dsb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -476,15 +238,6 @@ func (dsb *dsb_DE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -493,22 +246,6 @@ func (dsb *dsb_DE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -517,26 +254,6 @@ func (dsb *dsb_DE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -545,30 +262,5 @@ func (dsb *dsb_DE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dsb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := dsb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/dua/dua.go b/dua/dua.go -index 3805d8e..95c0dc3 100644 ---- a/dua/dua.go -+++ b/dua/dua.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ɓ.Ys", "mb.Ys"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ɓoso ɓwá yáɓe lá", "mbúsa kwédi a Yés"}, -- timezones: map[string]string{"GMT": "GMT", "AKDT": "AKDT", "CAT": "CAT", "JDT": "JDT", "ACDT": "ACDT", "WAT": "WAT", "HNNOMX": "HNNOMX", "AKST": "AKST", "AST": "AST", "WEZ": "WEZ", "CHAST": "CHAST", "ECT": "ECT", "COT": "COT", "HEPM": "HEPM", "ChST": "ChST", "EAT": "EAT", "MDT": "MDT", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "SGT": "SGT", "HNPMX": "HNPMX", "HAT": "HAT", "CLST": "CLST", "MYT": "MYT", "HKST": "HKST", "MEZ": "MEZ", "LHDT": "LHDT", "GFT": "GFT", "MESZ": "MESZ", "EST": "EST", "WIB": "WIB", "PDT": "PDT", "AWST": "AWST", "NZDT": "NZDT", "TMST": "TMST", "HNOG": "HNOG", "WITA": "WITA", "NZST": "NZST", "LHST": "LHST", "SAST": "SAST", "UYST": "UYST", "HEEG": "HEEG", "OESZ": "OESZ", "HEPMX": "HEPMX", "SRT": "SRT", "PST": "PST", "AEDT": "AEDT", "TMT": "TMT", "HADT": "HADT", "ACWST": "ACWST", "ACWDT": "ACWDT", "HENOMX": "HENOMX", "COST": "COST", "GYT": "GYT", "UYT": "UYT", "WIT": "WIT", "HNT": "HNT", "ARST": "ARST", "BOT": "BOT", "HNCU": "HNCU", "ART": "ART", "AWDT": "AWDT", "JST": "JST", "CLT": "CLT", "MST": "MST", "BT": "BT", "HKT": "HKT", "OEZ": "OEZ", "HAST": "HAST", "HEOG": "HEOG", "HNPM": "HNPM", "ACST": "ACST", "WAST": "WAST", "WARST": "WARST", "EDT": "EDT", "CDT": "CDT", "VET": "VET", "WESZ": "WESZ", "CHADT": "CHADT", "IST": "IST", "WART": "WART", "HECU": "HECU", "CST": "CST", "ADT": "ADT", "AEST": "AEST"}, -+ timezones: map[string]string{"SGT": "SGT", "VET": "VET", "SAST": "SAST", "TMT": "TMT", "CAT": "CAT", "ARST": "ARST", "MESZ": "MESZ", "UYST": "UYST", "HNPMX": "HNPMX", "HNPM": "HNPM", "COT": "COT", "EST": "EST", "ECT": "ECT", "AST": "AST", "HENOMX": "HENOMX", "AWDT": "AWDT", "WIB": "WIB", "HAST": "HAST", "AEST": "AEST", "WIT": "WIT", "GYT": "GYT", "HEOG": "HEOG", "NZST": "NZST", "∅∅∅": "∅∅∅", "ADT": "ADT", "HNNOMX": "HNNOMX", "JDT": "JDT", "AKDT": "AKDT", "CST": "CST", "LHST": "LHST", "PDT": "PDT", "CHAST": "CHAST", "UYT": "UYT", "COST": "COST", "CDT": "CDT", "MDT": "MDT", "SRT": "SRT", "HNEG": "HNEG", "ACWST": "ACWST", "HEPMX": "HEPMX", "LHDT": "LHDT", "HNCU": "HNCU", "WAT": "WAT", "WARST": "WARST", "GMT": "GMT", "ChST": "ChST", "HADT": "HADT", "ACDT": "ACDT", "CHADT": "CHADT", "HECU": "HECU", "HNT": "HNT", "HKT": "HKT", "MST": "MST", "EAT": "EAT", "AWST": "AWST", "MYT": "MYT", "EDT": "EDT", "CLST": "CLST", "BOT": "BOT", "ACST": "ACST", "HEEG": "HEEG", "HEPM": "HEPM", "OESZ": "OESZ", "GFT": "GFT", "WART": "WART", "HKST": "HKST", "MEZ": "MEZ", "ACWDT": "ACWDT", "OEZ": "OEZ", "CLT": "CLT", "AEDT": "AEDT", "WESZ": "WESZ", "WAST": "WAST", "HAT": "HAT", "ART": "ART", "NZDT": "NZDT", "IST": "IST", "WEZ": "WEZ", "BT": "BT", "AKST": "AKST", "HNOG": "HNOG", "TMST": "TMST", "WITA": "WITA", "JST": "JST", "PST": "PST"}, - } - } -  -diff --git a/dua_CM/dua_CM.go b/dua_CM/dua_CM.go -index 128a4a7..1343c34 100644 ---- a/dua_CM/dua_CM.go -+++ b/dua_CM/dua_CM.go -@@ -10,64 +10,45 @@ import ( - ) -  - type dua_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'dua_CM' locale - func New() locales.Translator { - return &dua_CM{ -- locale: "dua_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "di", "ŋgɔn", "sɔŋ", "diɓ", "emi", "esɔ", "mad", "diŋ", "nyɛt", "may", "tin", "elá"}, -- monthsNarrow: []string{"", "d", "ŋ", "s", "d", "e", "e", "m", "d", "n", "m", "t", "e"}, -- monthsWide: []string{"", "dimɔ́di", "ŋgɔndɛ", "sɔŋɛ", "diɓáɓá", "emiasele", "esɔpɛsɔpɛ", "madiɓɛ́díɓɛ́", "diŋgindi", "nyɛtɛki", "mayésɛ́", "tiníní", "eláŋgɛ́"}, -- daysAbbreviated: []string{"ét", "mɔ́s", "kwa", "muk", "ŋgi", "ɗón", "esa"}, -- daysNarrow: []string{"e", "m", "k", "m", "ŋ", "ɗ", "e"}, -- daysWide: []string{"éti", "mɔ́sú", "kwasú", "mukɔ́sú", "ŋgisú", "ɗónɛsú", "esaɓasú"}, -- periodsAbbreviated: []string{"idiɓa", "ebyámu"}, -- periodsWide: []string{"idiɓa", "ebyámu"}, -- erasAbbreviated: []string{"ɓ.Ys", "mb.Ys"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ɓoso ɓwá yáɓe lá", "mbúsa kwédi a Yés"}, -- timezones: map[string]string{"VET": "VET", "HAT": "HAT", "EAT": "EAT", "COT": "COT", "ARST": "ARST", "HKST": "HKST", "EST": "EST", "AEST": "AEST", "HEPM": "HEPM", "GFT": "GFT", "TMST": "TMST", "ECT": "ECT", "WART": "WART", "ACWDT": "ACWDT", "AEDT": "AEDT", "HNPM": "HNPM", "CHADT": "CHADT", "ChST": "ChST", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "UYT": "UYT", "IST": "IST", "SAST": "SAST", "JST": "JST", "AST": "AST", "SRT": "SRT", "NZDT": "NZDT", "CHAST": "CHAST", "HEEG": "HEEG", "OEZ": "OEZ", "HENOMX": "HENOMX", "AKST": "AKST", "MEZ": "MEZ", "AKDT": "AKDT", "HEOG": "HEOG", "PDT": "PDT", "JDT": "JDT", "ACST": "ACST", "ACDT": "ACDT", "CAT": "CAT", "COST": "COST", "BOT": "BOT", "GYT": "GYT", "AWDT": "AWDT", "WEZ": "WEZ", "PST": "PST", "LHST": "LHST", "CLT": "CLT", "EDT": "EDT", "WESZ": "WESZ", "ACWST": "ACWST", "HKT": "HKT", "HNOG": "HNOG", "OESZ": "OESZ", "HNCU": "HNCU", "HECU": "HECU", "HNT": "HNT", "ART": "ART", "AWST": "AWST", "TMT": "TMT", "HEPMX": "HEPMX", "WIT": "WIT", "HAST": "HAST", "WAT": "WAT", "MST": "MST", "MDT": "MDT", "BT": "BT", "MESZ": "MESZ", "WAST": "WAST", "SGT": "SGT", "HADT": "HADT", "WITA": "WITA", "CLST": "CLST", "HNNOMX": "HNNOMX", "ADT": "ADT", "MYT": "MYT", "UYST": "UYST", "HNEG": "HNEG", "GMT": "GMT", "CDT": "CDT", "WIB": "WIB", "WARST": "WARST", "CST": "CST", "LHDT": "LHDT", "NZST": "NZST"}, -+ locale: "dua_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPM": "HEPM", "UYST": "UYST", "IST": "IST", "ACWDT": "ACWDT", "HNCU": "HNCU", "HNEG": "HNEG", "HENOMX": "HENOMX", "LHST": "LHST", "OEZ": "OEZ", "WARST": "WARST", "WITA": "WITA", "PST": "PST", "WEZ": "WEZ", "HKST": "HKST", "PDT": "PDT", "HKT": "HKT", "TMT": "TMT", "LHDT": "LHDT", "MDT": "MDT", "SRT": "SRT", "ACST": "ACST", "CST": "CST", "AEST": "AEST", "WART": "WART", "NZST": "NZST", "WIB": "WIB", "ACWST": "ACWST", "AEDT": "AEDT", "CHADT": "CHADT", "HEPMX": "HEPMX", "SAST": "SAST", "TMST": "TMST", "ADT": "ADT", "HAST": "HAST", "HADT": "HADT", "CHAST": "CHAST", "HEOG": "HEOG", "EDT": "EDT", "WESZ": "WESZ", "VET": "VET", "HNT": "HNT", "HAT": "HAT", "ChST": "ChST", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "JST": "JST", "HNPMX": "HNPMX", "MST": "MST", "ARST": "ARST", "AWDT": "AWDT", "WAST": "WAST", "HNOG": "HNOG", "CLT": "CLT", "ECT": "ECT", "HECU": "HECU", "WAT": "WAT", "CAT": "CAT", "GMT": "GMT", "ACDT": "ACDT", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "COST": "COST", "EST": "EST", "CDT": "CDT", "AWST": "AWST", "JDT": "JDT", "MEZ": "MEZ", "MYT": "MYT", "UYT": "UYT", "GYT": "GYT", "CLST": "CLST", "AST": "AST", "BOT": "BOT", "EAT": "EAT", "SGT": "SGT", "AKST": "AKST", "WIT": "WIT", "COT": "COT", "NZDT": "NZDT", "ART": "ART", "BT": "BT", "MESZ": "MESZ", "AKDT": "AKDT", "GFT": "GFT"}, - } - } -  -@@ -113,7 +94,7 @@ func (dua *dua_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (dua *dua_CM) MonthsAbbreviated() []string { -- return dua.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (dua *dua_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (dua *dua_CM) MonthsNarrow() []string { -- return dua.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (dua *dua_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (dua *dua_CM) MonthsWide() []string { -- return dua.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,77 +160,13 @@ func (dua *dua_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'dua_CM' and handles both Whole and Real numbers based on 'v' - func (dua *dua_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dua.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dua.group) - 1; j >= 0; j-- { -- b = append(b, dua.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dua.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'dua_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (dua *dua_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dua.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dua.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, dua.percentSuffix...) -- -- b = append(b, dua.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'dua_CM' -@@ -257,58 +174,7 @@ func (dua *dua_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dua.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dua.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dua.group) - 1; j >= 0; j-- { -- b = append(b, dua.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dua.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dua.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, dua.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'dua_CM' -@@ -317,65 +183,7 @@ func (dua *dua_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dua.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dua.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dua.group) - 1; j >= 0; j-- { -- b = append(b, dua.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, dua.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dua.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, dua.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, dua.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'dua_CM' -@@ -383,17 +191,6 @@ func (dua *dua_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -402,17 +199,6 @@ func (dua *dua_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dua.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -421,17 +207,6 @@ func (dua *dua_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dua.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,19 +215,6 @@ func (dua *dua_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, dua.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dua.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,19 +223,6 @@ func (dua *dua_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -482,26 +231,6 @@ func (dua *dua_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -510,30 +239,6 @@ func (dua *dua_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -542,34 +247,5 @@ func (dua *dua_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dua.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := dua.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/dyo/dyo.go b/dyo/dyo.go -index a9a86ae..ec8074f 100644 ---- a/dyo/dyo.go -+++ b/dyo/dyo.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ArY", "AtY"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Ariŋuu Yeesu", "Atooŋe Yeesu"}, -- timezones: map[string]string{"HKT": "HKT", "HEPMX": "HEPMX", "CDT": "CDT", "HNOG": "HNOG", "TMT": "TMT", "MDT": "MDT", "HNPMX": "HNPMX", "ADT": "ADT", "JDT": "JDT", "EST": "EST", "MESZ": "MESZ", "SAST": "SAST", "HNEG": "HNEG", "ACDT": "ACDT", "MST": "MST", "AKST": "AKST", "AEDT": "AEDT", "HEPM": "HEPM", "PST": "PST", "WESZ": "WESZ", "EAT": "EAT", "UYST": "UYST", "HAST": "HAST", "WIT": "WIT", "BT": "BT", "LHDT": "LHDT", "CHADT": "CHADT", "CLT": "CLT", "ChST": "ChST", "COST": "COST", "HNNOMX": "HNNOMX", "SRT": "SRT", "HKST": "HKST", "WITA": "WITA", "WART": "WART", "WARST": "WARST", "GMT": "GMT", "SGT": "SGT", "GYT": "GYT", "WAST": "WAST", "OEZ": "OEZ", "UYT": "UYT", "CST": "CST", "HEOG": "HEOG", "ART": "ART", "IST": "IST", "HECU": "HECU", "CAT": "CAT", "WAT": "WAT", "ECT": "ECT", "MYT": "MYT", "WEZ": "WEZ", "ARST": "ARST", "CHAST": "CHAST", "TMST": "TMST", "HNCU": "HNCU", "HADT": "HADT", "AWDT": "AWDT", "LHST": "LHST", "MEZ": "MEZ", "OESZ": "OESZ", "AST": "AST", "AEST": "AEST", "AWST": "AWST", "GFT": "GFT", "HNT": "HNT", "ACWDT": "ACWDT", "HAT": "HAT", "NZDT": "NZDT", "∅∅∅": "∅∅∅", "WIB": "WIB", "VET": "VET", "CLST": "CLST", "COT": "COT", "BOT": "BOT", "HEEG": "HEEG", "ACST": "ACST", "EDT": "EDT", "PDT": "PDT", "ACWST": "ACWST", "HNPM": "HNPM", "JST": "JST", "AKDT": "AKDT", "NZST": "NZST", "HENOMX": "HENOMX"}, -+ timezones: map[string]string{"ChST": "ChST", "HAST": "HAST", "HNOG": "HNOG", "LHDT": "LHDT", "AKST": "AKST", "WITA": "WITA", "MDT": "MDT", "HNEG": "HNEG", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "WAST": "WAST", "HKT": "HKT", "GMT": "GMT", "HNPM": "HNPM", "CHAST": "CHAST", "UYST": "UYST", "SGT": "SGT", "NZDT": "NZDT", "MYT": "MYT", "ACWST": "ACWST", "CHADT": "CHADT", "HEOG": "HEOG", "NZST": "NZST", "WIB": "WIB", "SRT": "SRT", "HNCU": "HNCU", "AKDT": "AKDT", "LHST": "LHST", "HNT": "HNT", "CLST": "CLST", "TMST": "TMST", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "HKST": "HKST", "PDT": "PDT", "COT": "COT", "SAST": "SAST", "EST": "EST", "ECT": "ECT", "ARST": "ARST", "JDT": "JDT", "AWST": "AWST", "WARST": "WARST", "EDT": "EDT", "AWDT": "AWDT", "ACWDT": "ACWDT", "VET": "VET", "WIT": "WIT", "BOT": "BOT", "HEPM": "HEPM", "OEZ": "OEZ", "COST": "COST", "CAT": "CAT", "AST": "AST", "HEPMX": "HEPMX", "WAT": "WAT", "MST": "MST", "BT": "BT", "CST": "CST", "HNPMX": "HNPMX", "WART": "WART", "HEEG": "HEEG", "MEZ": "MEZ", "JST": "JST", "UYT": "UYT", "GFT": "GFT", "OESZ": "OESZ", "CLT": "CLT", "ART": "ART", "HENOMX": "HENOMX", "PST": "PST", "IST": "IST", "WEZ": "WEZ", "CDT": "CDT", "ADT": "ADT", "HADT": "HADT", "ACST": "ACST", "AEDT": "AEDT", "HECU": "HECU", "HAT": "HAT", "GYT": "GYT", "TMT": "TMT", "EAT": "EAT", "ACDT": "ACDT", "AEST": "AEST"}, - } - } -  -diff --git a/dyo_SN/dyo_SN.go b/dyo_SN/dyo_SN.go -index 5e2b0bd..1fbaa72 100644 ---- a/dyo_SN/dyo_SN.go -+++ b/dyo_SN/dyo_SN.go -@@ -10,60 +10,45 @@ import ( - ) -  - type dyo_SN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'dyo_SN' locale - func New() locales.Translator { - return &dyo_SN{ -- locale: "dyo_SN", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Sa", "Fe", "Ma", "Ab", "Me", "Su", "Sú", "Ut", "Se", "Ok", "No", "De"}, -- monthsNarrow: []string{"", "S", "F", "M", "A", "M", "S", "S", "U", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Sanvie", "Fébirie", "Mars", "Aburil", "Mee", "Sueŋ", "Súuyee", "Ut", "Settembar", "Oktobar", "Novembar", "Disambar"}, -- daysAbbreviated: []string{"Dim", "Ten", "Tal", "Ala", "Ara", "Arj", "Sib"}, -- daysNarrow: []string{"D", "T", "T", "A", "A", "A", "S"}, -- daysWide: []string{"Dimas", "Teneŋ", "Talata", "Alarbay", "Aramisay", "Arjuma", "Sibiti"}, -- erasAbbreviated: []string{"ArY", "AtY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Ariŋuu Yeesu", "Atooŋe Yeesu"}, -- timezones: map[string]string{"MEZ": "MEZ", "SAST": "SAST", "JST": "JST", "GFT": "GFT", "WAST": "WAST", "HECU": "HECU", "HEPMX": "HEPMX", "AEST": "AEST", "OEZ": "OEZ", "AWDT": "AWDT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HNPMX": "HNPMX", "HAST": "HAST", "WAT": "WAT", "ECT": "ECT", "WESZ": "WESZ", "HNT": "HNT", "CLT": "CLT", "CST": "CST", "HNPM": "HNPM", "NZST": "NZST", "ACWDT": "ACWDT", "LHST": "LHST", "TMT": "TMT", "OESZ": "OESZ", "ADT": "ADT", "UYST": "UYST", "HADT": "HADT", "HEPM": "HEPM", "EAT": "EAT", "COT": "COT", "WARST": "WARST", "VET": "VET", "BT": "BT", "HEOG": "HEOG", "ART": "ART", "AEDT": "AEDT", "ChST": "ChST", "EDT": "EDT", "GYT": "GYT", "UYT": "UYT", "BOT": "BOT", "NZDT": "NZDT", "MESZ": "MESZ", "JDT": "JDT", "HKST": "HKST", "ACST": "ACST", "AWST": "AWST", "CHAST": "CHAST", "COST": "COST", "SGT": "SGT", "AKDT": "AKDT", "WIB": "WIB", "CLST": "CLST", "MST": "MST", "ACWST": "ACWST", "PST": "PST", "ACDT": "ACDT", "CAT": "CAT", "MYT": "MYT", "HAT": "HAT", "WITA": "WITA", "AKST": "AKST", "HENOMX": "HENOMX", "WART": "WART", "WEZ": "WEZ", "HKT": "HKT", "LHDT": "LHDT", "AST": "AST", "WIT": "WIT", "SRT": "SRT", "PDT": "PDT", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "GMT": "GMT", "MDT": "MDT", "HNOG": "HNOG", "CHADT": "CHADT", "IST": "IST", "TMST": "TMST", "EST": "EST", "CDT": "CDT", "ARST": "ARST"}, -+ locale: "dyo_SN", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKST": "AKST", "CLT": "CLT", "CLST": "CLST", "GFT": "GFT", "PST": "PST", "ACWDT": "ACWDT", "BOT": "BOT", "BT": "BT", "AEST": "AEST", "WESZ": "WESZ", "CHADT": "CHADT", "HNOG": "HNOG", "ECT": "ECT", "EAT": "EAT", "CHAST": "CHAST", "HNPMX": "HNPMX", "WAST": "WAST", "HAT": "HAT", "NZDT": "NZDT", "CDT": "CDT", "HNT": "HNT", "WITA": "WITA", "HAST": "HAST", "JST": "JST", "CST": "CST", "SRT": "SRT", "HNEG": "HNEG", "HEPM": "HEPM", "WART": "WART", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "SAST": "SAST", "IST": "IST", "GYT": "GYT", "HKST": "HKST", "CAT": "CAT", "ARST": "ARST", "HKT": "HKT", "MDT": "MDT", "NZST": "NZST", "ChST": "ChST", "HENOMX": "HENOMX", "MEZ": "MEZ", "OEZ": "OEZ", "TMST": "TMST", "EST": "EST", "EDT": "EDT", "AWST": "AWST", "ACWST": "ACWST", "SGT": "SGT", "HEPMX": "HEPMX", "TMT": "TMT", "AST": "AST", "HEEG": "HEEG", "UYT": "UYT", "ACDT": "ACDT", "VET": "VET", "HECU": "HECU", "AKDT": "AKDT", "WIT": "WIT", "GMT": "GMT", "ADT": "ADT", "WARST": "WARST", "COT": "COT", "PDT": "PDT", "WEZ": "WEZ", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "MYT": "MYT", "HNPM": "HNPM", "JDT": "JDT", "WIB": "WIB", "ART": "ART", "HADT": "HADT", "LHST": "LHST", "WAT": "WAT", "OESZ": "OESZ", "COST": "COST", "MST": "MST", "LHDT": "LHDT", "AEDT": "AEDT", "UYST": "UYST", "ACST": "ACST", "MESZ": "MESZ", "HNCU": "HNCU"}, - } - } -  -@@ -109,7 +94,7 @@ func (dyo *dyo_SN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (dyo *dyo_SN) MonthsAbbreviated() []string { -- return dyo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (dyo *dyo_SN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (dyo *dyo_SN) MonthsNarrow() []string { -- return dyo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (dyo *dyo_SN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (dyo *dyo_SN) MonthsWide() []string { -- return dyo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -175,75 +160,13 @@ func (dyo *dyo_SN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'dyo_SN' and handles both Whole and Real numbers based on 'v' - func (dyo *dyo_SN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dyo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dyo.group) - 1; j >= 0; j-- { -- b = append(b, dyo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dyo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'dyo_SN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (dyo *dyo_SN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dyo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dyo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, dyo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'dyo_SN' -@@ -251,58 +174,7 @@ func (dyo *dyo_SN) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dyo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dyo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dyo.group) - 1; j >= 0; j-- { -- b = append(b, dyo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dyo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dyo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, dyo.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'dyo_SN' -@@ -311,65 +183,7 @@ func (dyo *dyo_SN) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dyo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dyo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(dyo.group) - 1; j >= 0; j-- { -- b = append(b, dyo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, dyo.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dyo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, dyo.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, dyo.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'dyo_SN' -@@ -377,17 +191,6 @@ func (dyo *dyo_SN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -396,17 +199,6 @@ func (dyo *dyo_SN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dyo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -415,17 +207,6 @@ func (dyo *dyo_SN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dyo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,19 +215,6 @@ func (dyo *dyo_SN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, dyo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, dyo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,19 +223,6 @@ func (dyo *dyo_SN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -476,26 +231,6 @@ func (dyo *dyo_SN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -504,30 +239,6 @@ func (dyo *dyo_SN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -536,34 +247,5 @@ func (dyo *dyo_SN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dyo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := dyo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/dz/dz.go b/dz/dz.go -index 821e32c..32bbcff 100644 ---- a/dz/dz.go -+++ b/dz/dz.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"WESZ": "ནུབ་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "HEPM": "པའི་རི་དང་མི་ཀི་ལཱོན་ཉིན་སྲུང་ཆུ་ཚོད", "AST": "ཨེཊ་ལེན་ཊིཀ་ཚད་ལྡན་ཆུ་ཚོད", "WARST": "ནུབ་ཕྱོགས་ཨར་ཇེན་ཊི་ན་བྱཱར་དུས་ཆུ་ཚོད", "UYST": "ཡུ་རུ་གུ་ཝཱའི་བྱཱར་དུས་ཆུ་ཚོད", "CDT": "བྱང་ཨ་མི་རི་ཀ་དབུས་ཕྱོགས་ཉིན་སྲུང་ཆུ་ཚོད", "HAST": "ཧ་ཝའི་-ཨེ་ལིའུ་ཤེན་ཚད་ལྡན་ཆུ་ཚོད", "TMT": "TMT", "ACDT": "དབུས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "ECT": "ཨེ་ཀུ་ཌཽ་ཆུ་ཚོད", "EAT": "ཤར་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "HNNOMX": "HNNOMX", "SRT": "སུ་རི་ནཱམ་ཆུ་ཚོད", "∅∅∅": "པ་རུ་བྱཱར་དུས་ཆུ་ཚོད", "MST": "MST", "ADT": "ཨེཊ་ལེན་ཊིཀ་ཉིན་སྲུང་ཆུ་ཚོད", "AEDT": "ཤར་ཕྱོགས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "CHAST": "CHAST", "OEZ": "ཤར་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "PST": "བྱང་ཨ་མི་རི་ཀ་པེ་སི་ཕིག་ཚད་ལྡན་ཆུ་ཚོད", "HNT": "ནིའུ་ཕའུནཌ་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "TMST": "TMST", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "GYT": "གུ་ཡ་ན་ཆུ་ཚོད", "MYT": "MYT", "VET": "བེ་ནི་ཛུ་ཝེ་ལ་ཆུ་ཚོད", "ACWDT": "དབུས་ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "OESZ": "ཤར་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "COT": "ཀོ་ལོམ་བྷི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "SGT": "SGT", "HNCU": "ཀིའུ་བྷ་ཚད་ལྡན་ཆུ་ཚོད", "EST": "བྱང་ཨ་མི་རི་ཀ་ཤར་ཕྱོགས་ཚད་ལྡན་ཆུ་ཚོད", "PDT": "བྱང་ཨ་མི་རི་ཀ་པེ་སི་ཕིག་ཉིན་སྲུང་ཆུ་ཚོད", "MESZ": "དབུས་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "NZST": "ནིའུ་ཛི་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "WAT": "ནུབ་ཕྱོགས་ཨཕ་རི་ཀཱ་ཚད་ལྡན་ཆུ་ཚོད", "BOT": "བྷོ་ལི་བི་ཡ་ཆུ་ཚོད", "AKST": "ཨ་ལསི་ཀ་ཚད་ལྡན་ཆུ་ཚོད", "HADT": "ཧ་ཝའི་-ཨེ་ལིའུ་ཤེན་ཉིན་སྲུང་ཆུ་ཚོད", "WIT": "ཤར་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "ACWST": "དབུས་ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "HKT": "HKT", "CLST": "ཅི་ལི་བྱཱར་དུས་ཆུ་ཚོད", "GMT": "གིརིན་ཝིཆ་ལུ་ཡོད་པའི་ཆུ་ཚོད", "WITA": "དབུས་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "NZDT": "ནིའུ་ཛི་ལེནཌ་ཉིན་སྲུང་ཆུ་ཚོད", "HEEG": "ཤར་ཕྱོགས་གིརིན་ལེནཌ་བྱཱར་དུས་ཆུ་ཚོད", "WAST": "ནུབ་ཕྱོགས་ཨཕ་རི་ཀཱ་བྱཱར་དུས་ཆུ་ཚོད", "ARST": "ཨར་ཇེན་ཊི་ན་བྱཱར་དུས་ཆུ་ཚོད", "HEOG": "ནུབ་ཕྱོགས་གིརིན་ལེནཌ་བྱཱར་དུས་ཆུ་ཚོད", "AWST": "ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "SAST": "ལྷོ་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "JDT": "ཇ་པཱན་ཉིན་སྲུང་ཆུ་ཚོད", "GFT": "ཕིརེནཅ་གི་ཡ་ན་ཆུ་ཚོད", "WART": "ནུབ་ཕྱོགས་ཨར་ཇེན་ཊི་ན་ཚད་ལྡན་ཆུ་ཚོད", "HNPMX": "HNPMX", "CST": "བྱང་ཨ་མི་རི་ཀ་དབུས་ཕྱོགས་ཚད་ལྡན་ཆུ་ཚོད", "CLT": "ཅི་ལི་ཚད་ལྡན་ཆུ་ཚོད", "HNEG": "ཤར་ཕྱོགས་གིརིན་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "MDT": "MDT", "COST": "ཀོ་ལོམ་བྷི་ཡ་བྱཱར་དུས་ཆུ་ཚོད", "AKDT": "ཨ་ལསི་ཀ་ཉིན་སྲུང་ཆུ་ཚོད", "AEST": "ཤར་ཕྱོགས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "AWDT": "ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "HNPM": "པའི་རི་དང་མི་ཀི་ལཱོན་ཚད་ལྡན་ཆུ་ཚོད", "MEZ": "དབུས་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "CAT": "དབུས་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "LHST": "LHST", "JST": "ཇ་པཱན་ཚད་ལྡན་ཆུ་ཚོད", "HAT": "ནིའུ་ཕའུནཌ་ལེནཌ་ཉིན་སྲུང་ཆུ་ཚོད", "BT": "འབྲུག་ཡུལ་ཆུ་ཚོད", "WEZ": "ནུབ་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "HKST": "HKST", "CHADT": "CHADT", "IST": "རྒྱ་གར་ཆུ་ཚོད", "ACST": "དབུས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "UYT": "ཡུ་རུ་གུ་ཝཱའི་ཚད་ལྡན་ཆུ་ཚོད", "LHDT": "LHDT", "HNOG": "ནུབ་ཕྱོགས་གིརིན་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "EDT": "བྱང་ཨ་མི་རི་ཀ་ཤར་ཕྱོགས་ཉིན་སྲུང་ཆུ་ཚོད", "WIB": "ནུབ་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "ART": "ཨར་ཇེན་ཊི་ན་ཚད་ལྡན་ཆུ་ཚོད", "ChST": "ChST", "HECU": "ཀིའུ་བྷ་ཉིན་སྲུང་ཆུ་ཚོད"}, -+ timezones: map[string]string{"EST": "བྱང་ཨ་མི་རི་ཀ་ཤར་ཕྱོགས་ཚད་ལྡན་ཆུ་ཚོད", "HKST": "HKST", "MDT": "MDT", "ARST": "ཨར་ཇེན་ཊི་ན་བྱཱར་དུས་ཆུ་ཚོད", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "OESZ": "ཤར་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "HNCU": "ཀིའུ་བྷ་ཚད་ལྡན་ཆུ་ཚོད", "GFT": "ཕིརེནཅ་གི་ཡ་ན་ཆུ་ཚོད", "HNT": "ནིའུ་ཕའུནཌ་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "ADT": "ཨེཊ་ལེན་ཊིཀ་ཉིན་སྲུང་ཆུ་ཚོད", "HADT": "ཧ་ཝའི་-ཨེ་ལིའུ་ཤེན་ཉིན་སྲུང་ཆུ་ཚོད", "ACST": "དབུས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "HNNOMX": "HNNOMX", "JST": "ཇ་པཱན་ཚད་ལྡན་ཆུ་ཚོད", "WAST": "ནུབ་ཕྱོགས་ཨཕ་རི་ཀཱ་བྱཱར་དུས་ཆུ་ཚོད", "EDT": "བྱང་ཨ་མི་རི་ཀ་ཤར་ཕྱོགས་ཉིན་སྲུང་ཆུ་ཚོད", "ECT": "ཨེ་ཀུ་ཌཽ་ཆུ་ཚོད", "HNPM": "པའི་རི་དང་མི་ཀི་ལཱོན་ཚད་ལྡན་ཆུ་ཚོད", "PDT": "བྱང་ཨ་མི་རི་ཀ་པེ་སི་ཕིག་ཉིན་སྲུང་ཆུ་ཚོད", "BT": "འབྲུག་ཡུལ་ཆུ་ཚོད", "AEST": "ཤར་ཕྱོགས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "MST": "MST", "UYST": "ཡུ་རུ་གུ་ཝཱའི་བྱཱར་དུས་ཆུ་ཚོད", "OEZ": "ཤར་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "CLT": "ཅི་ལི་ཚད་ལྡན་ཆུ་ཚོད", "HNOG": "ནུབ་ཕྱོགས་གིརིན་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "EAT": "ཤར་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "WESZ": "ནུབ་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "HECU": "ཀིའུ་བྷ་ཉིན་སྲུང་ཆུ་ཚོད", "HAT": "ནིའུ་ཕའུནཌ་ལེནཌ་ཉིན་སྲུང་ཆུ་ཚོད", "WARST": "ནུབ་ཕྱོགས་ཨར་ཇེན་ཊི་ན་བྱཱར་དུས་ཆུ་ཚོད", "MEZ": "དབུས་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "HENOMX": "HENOMX", "HEOG": "ནུབ་ཕྱོགས་གིརིན་ལེནཌ་བྱཱར་དུས་ཆུ་ཚོད", "TMT": "TMT", "ACWDT": "དབུས་ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "WIT": "ཤར་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "GYT": "གུ་ཡ་ན་ཆུ་ཚོད", "WITA": "དབུས་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "GMT": "གིརིན་ཝིཆ་ལུ་ཡོད་པའི་ཆུ་ཚོད", "ART": "ཨར་ཇེན་ཊི་ན་ཚད་ལྡན་ཆུ་ཚོད", "JDT": "ཇ་པཱན་ཉིན་སྲུང་ཆུ་ཚོད", "PST": "བྱང་ཨ་མི་རི་ཀ་པེ་སི་ཕིག་ཚད་ལྡན་ཆུ་ཚོད", "CLST": "ཅི་ལི་བྱཱར་དུས་ཆུ་ཚོད", "CST": "བྱང་ཨ་མི་རི་ཀ་དབུས་ཕྱོགས་ཚད་ལྡན་ཆུ་ཚོད", "ChST": "ChST", "LHST": "LHST", "MYT": "MYT", "CAT": "དབུས་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "COT": "ཀོ་ལོམ་བྷི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "WIB": "ནུབ་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "HEEG": "ཤར་ཕྱོགས་གིརིན་ལེནཌ་བྱཱར་དུས་ཆུ་ཚོད", "VET": "བེ་ནི་ཛུ་ཝེ་ལ་ཆུ་ཚོད", "WAT": "ནུབ་ཕྱོགས་ཨཕ་རི་ཀཱ་ཚད་ལྡན་ཆུ་ཚོད", "AKST": "ཨ་ལསི་ཀ་ཚད་ལྡན་ཆུ་ཚོད", "CDT": "བྱང་ཨ་མི་རི་ཀ་དབུས་ཕྱོགས་ཉིན་སྲུང་ཆུ་ཚོད", "AWDT": "ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "LHDT": "LHDT", "WEZ": "ནུབ་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "SGT": "SGT", "NZDT": "ནིའུ་ཛི་ལེནཌ་ཉིན་སྲུང་ཆུ་ཚོད", "HAST": "ཧ་ཝའི་-ཨེ་ལིའུ་ཤེན་ཚད་ལྡན་ཆུ་ཚོད", "AWST": "ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "HKT": "HKT", "TMST": "TMST", "HEPM": "པའི་རི་དང་མི་ཀི་ལཱོན་ཉིན་སྲུང་ཆུ་ཚོད", "CHADT": "CHADT", "COST": "ཀོ་ལོམ་བྷི་ཡ་བྱཱར་དུས་ཆུ་ཚོད", "AST": "ཨེཊ་ལེན་ཊིཀ་ཚད་ལྡན་ཆུ་ཚོད", "SRT": "སུ་རི་ནཱམ་ཆུ་ཚོད", "IST": "རྒྱ་གར་ཆུ་ཚོད", "SAST": "ལྷོ་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "HNEG": "ཤར་ཕྱོགས་གིརིན་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "AKDT": "ཨ་ལསི་ཀ་ཉིན་སྲུང་ཆུ་ཚོད", "HEPMX": "HEPMX", "WART": "ནུབ་ཕྱོགས་ཨར་ཇེན་ཊི་ན་ཚད་ལྡན་ཆུ་ཚོད", "NZST": "ནིའུ་ཛི་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "BOT": "བྷོ་ལི་བི་ཡ་ཆུ་ཚོད", "UYT": "ཡུ་རུ་གུ་ཝཱའི་ཚད་ལྡན་ཆུ་ཚོད", "ACWST": "དབུས་ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "AEDT": "ཤར་ཕྱོགས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "MESZ": "དབུས་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "ACDT": "དབུས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "CHAST": "CHAST"}, - } - } -  -diff --git a/dz_BT/dz_BT.go b/dz_BT/dz_BT.go -index 7f34c55..cdd7dc2 100644 ---- a/dz_BT/dz_BT.go -+++ b/dz_BT/dz_BT.go -@@ -18,7 +18,6 @@ type dz_BT struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -43,33 +42,13 @@ type dz_BT struct { - // New returns a new instance of translator for the 'dz_BT' locale - func New() locales.Translator { - return &dz_BT{ -- locale: "dz_BT", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "གྲངས་མེད", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩", "༡༠", "༡༡", "12"}, -- monthsNarrow: []string{"", "༡", "༢", "༣", "4", "༥", "༦", "༧", "༨", "9", "༡༠", "༡༡", "༡༢"}, -- monthsWide: []string{"", "ཟླ་དངཔ་", "ཟླ་གཉིས་པ་", "ཟླ་གསུམ་པ་", "ཟླ་བཞི་པ་", "ཟླ་ལྔ་པ་", "ཟླ་དྲུག་པ", "ཟླ་བདུན་པ་", "ཟླ་བརྒྱད་པ་", "ཟླ་དགུ་པ་", "ཟླ་བཅུ་པ་", "ཟླ་བཅུ་གཅིག་པ་", "ཟླ་བཅུ་གཉིས་པ་"}, -- daysAbbreviated: []string{"ཟླ་", "མིར་", "ལྷག་", "ཕུར་", "སངས་", "སྤེན་", "ཉི་"}, -- daysNarrow: []string{"ཟླ", "མིར", "ལྷག", "ཕུར", "སངྶ", "སྤེན", "ཉི"}, -- daysShort: []string{"ཟླ་", "མིར་", "ལྷག་", "ཕུར་", "སངས་", "སྤེན་", "ཉི་"}, -- daysWide: []string{"གཟའ་ཟླ་བ་", "གཟའ་མིག་དམར་", "གཟའ་ལྷག་པ་", "གཟའ་ཕུར་བུ་", "གཟའ་པ་སངས་", "གཟའ་སྤེན་པ་", "གཟའ་ཉི་མ་"}, -- periodsAbbreviated: []string{"སྔ་ཆ་", "ཕྱི་ཆ་"}, -- periodsNarrow: []string{"སྔ་ཆ་", "ཕྱི་ཆ་"}, -- periodsWide: []string{"སྔ་ཆ་", "ཕྱི་ཆ་"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"UYT": "ཡུ་རུ་གུ་ཝཱའི་ཚད་ལྡན་ཆུ་ཚོད", "WIT": "ཤར་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "SRT": "སུ་རི་ནཱམ་ཆུ་ཚོད", "HEOG": "ནུབ་ཕྱོགས་གིརིན་ལེནཌ་བྱཱར་དུས་ཆུ་ཚོད", "WITA": "དབུས་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "HNNOMX": "HNNOMX", "AKST": "ཨ་ལསི་ཀ་ཚད་ལྡན་ཆུ་ཚོད", "SGT": "SGT", "AWDT": "ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "WEZ": "ནུབ་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "ARST": "ཨར་ཇེན་ཊི་ན་བྱཱར་དུས་ཆུ་ཚོད", "MEZ": "དབུས་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "HNCU": "ཀིའུ་བྷ་ཚད་ལྡན་ཆུ་ཚོད", "CDT": "བྱང་ཨ་མི་རི་ཀ་དབུས་ཕྱོགས་ཉིན་སྲུང་ཆུ་ཚོད", "AWST": "ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "EAT": "ཤར་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "MST": "MST", "COST": "ཀོ་ལོམ་བྷི་ཡ་བྱཱར་དུས་ཆུ་ཚོད", "EST": "བྱང་ཨ་མི་རི་ཀ་ཤར་ཕྱོགས་ཚད་ལྡན་ཆུ་ཚོད", "AST": "ཨེཊ་ལེན་ཊིཀ་ཚད་ལྡན་ཆུ་ཚོད", "BT": "འབྲུག་ཡུལ་ཆུ་ཚོད", "ACWDT": "དབུས་ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "HAT": "ནིའུ་ཕའུནཌ་ལེནཌ་ཉིན་སྲུང་ཆུ་ཚོད", "TMST": "TMST", "ChST": "ChST", "NZST": "ནིའུ་ཛི་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "WAT": "ནུབ་ཕྱོགས་ཨཕ་རི་ཀཱ་ཚད་ལྡན་ཆུ་ཚོད", "HNEG": "ཤར་ཕྱོགས་གིརིན་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "ACST": "དབུས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "GMT": "གིརིན་ཝིཆ་ལུ་ཡོད་པའི་ཆུ་ཚོད", "HEPMX": "HEPMX", "GYT": "གུ་ཡ་ན་ཆུ་ཚོད", "HNOG": "ནུབ་ཕྱོགས་གིརིན་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "CLST": "ཅི་ལི་བྱཱར་དུས་ཆུ་ཚོད", "JST": "ཇ་པཱན་ཚད་ལྡན་ཆུ་ཚོད", "HKT": "HKT", "AEST": "ཤར་ཕྱོགས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "LHDT": "LHDT", "JDT": "ཇ་པཱན་ཉིན་སྲུང་ཆུ་ཚོད", "HECU": "ཀིའུ་བྷ་ཉིན་སྲུང་ཆུ་ཚོད", "CHADT": "CHADT", "UYST": "ཡུ་རུ་གུ་ཝཱའི་བྱཱར་དུས་ཆུ་ཚོད", "ACWST": "དབུས་ནུབ་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "HENOMX": "HENOMX", "MDT": "MDT", "AKDT": "ཨ་ལསི་ཀ་ཉིན་སྲུང་ཆུ་ཚོད", "SAST": "ལྷོ་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "OEZ": "ཤར་ཕྱོགས་ཡུ་རོ་པེན་ཚད་ལྡན་ཆུ་ཚོད", "HNPMX": "HNPMX", "ART": "ཨར་ཇེན་ཊི་ན་ཚད་ལྡན་ཆུ་ཚོད", "∅∅∅": "ཨེ་མ་ཛཱོན་བྱཱར་དུས་ཆུ་ཚོད", "OESZ": "ཤར་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "HKST": "HKST", "IST": "རྒྱ་གར་ཆུ་ཚོད", "BOT": "བྷོ་ལི་བི་ཡ་ཆུ་ཚོད", "ADT": "ཨེཊ་ལེན་ཊིཀ་ཉིན་སྲུང་ཆུ་ཚོད", "HAST": "ཧ་ཝའི་-ཨེ་ལིའུ་ཤེན་ཚད་ལྡན་ཆུ་ཚོད", "PST": "བྱང་ཨ་མི་རི་ཀ་པེ་སི་ཕིག་ཚད་ལྡན་ཆུ་ཚོད", "HEPM": "པའི་རི་དང་མི་ཀི་ལཱོན་ཉིན་སྲུང་ཆུ་ཚོད", "LHST": "LHST", "CHAST": "CHAST", "WAST": "ནུབ་ཕྱོགས་ཨཕ་རི་ཀཱ་བྱཱར་དུས་ཆུ་ཚོད", "WART": "ནུབ་ཕྱོགས་ཨར་ཇེན་ཊི་ན་ཚད་ལྡན་ཆུ་ཚོད", "MESZ": "དབུས་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "HADT": "ཧ་ཝའི་-ཨེ་ལིའུ་ཤེན་ཉིན་སྲུང་ཆུ་ཚོད", "HNT": "ནིའུ་ཕའུནཌ་ལེནཌ་ཚད་ལྡན་ཆུ་ཚོད", "CLT": "ཅི་ལི་ཚད་ལྡན་ཆུ་ཚོད", "WIB": "ནུབ་ཕྱོགས་ཨིན་ཌོ་ནེ་ཤི་ཡ་ཆུ་ཚོད", "CAT": "དབུས་ཕྱོགས་ཨཕ་རི་ཀཱ་ཆུ་ཚོད", "COT": "ཀོ་ལོམ་བྷི་ཡ་ཚད་ལྡན་ཆུ་ཚོད", "WARST": "ནུབ་ཕྱོགས་ཨར་ཇེན་ཊི་ན་བྱཱར་དུས་ཆུ་ཚོད", "EDT": "བྱང་ཨ་མི་རི་ཀ་ཤར་ཕྱོགས་ཉིན་སྲུང་ཆུ་ཚོད", "CST": "བྱང་ཨ་མི་རི་ཀ་དབུས་ཕྱོགས་ཚད་ལྡན་ཆུ་ཚོད", "MYT": "MYT", "ACDT": "དབུས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "ECT": "ཨེ་ཀུ་ཌཽ་ཆུ་ཚོད", "AEDT": "ཤར་ཕྱོགས་ཕྱོགས་ཨཱོས་ཊྲེལ་ལི་ཡ་ཉིན་སྲུང་ཆུ་ཚོད", "HNPM": "པའི་རི་དང་མི་ཀི་ལཱོན་ཚད་ལྡན་ཆུ་ཚོད", "WESZ": "ནུབ་ཕྱོགས་ཡུ་རོ་པེན་བྱཱར་དུས་ཆུ་ཚོད", "PDT": "བྱང་ཨ་མི་རི་ཀ་པེ་སི་ཕིག་ཉིན་སྲུང་ཆུ་ཚོད", "TMT": "TMT", "VET": "བེ་ནི་ཛུ་ཝེ་ལ་ཆུ་ཚོད", "NZDT": "ནིའུ་ཛི་ལེནཌ་ཉིན་སྲུང་ཆུ་ཚོད", "HEEG": "ཤར་ཕྱོགས་གིརིན་ལེནཌ་བྱཱར་དུས་ཆུ་ཚོད", "GFT": "ཕིརེནཅ་གི་ཡ་ན་ཆུ་ཚོད"}, -+ locale: "dz_BT", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "CLT": "CLT", "ART": "ART", "WIT": "WIT", "HEOG": "HEOG", "GYT": "GYT", "COST": "COST", "JDT": "JDT", "∅∅∅": "∅∅∅", "SGT": "SGT", "HAT": "HAT", "MST": "MST", "MEZ": "MEZ", "BT": "BT", "SRT": "SRT", "HENOMX": "HENOMX", "JST": "JST", "AWST": "AWST", "ACWST": "ACWST", "HKST": "HKST", "ACDT": "ACDT", "ACWDT": "ACWDT", "PDT": "PDT", "EST": "EST", "ChST": "ChST", "HEPMX": "HEPMX", "OESZ": "OESZ", "GFT": "GFT", "TMT": "TMT", "HNPM": "HNPM", "AWDT": "AWDT", "LHDT": "LHDT", "CHAST": "CHAST", "HNNOMX": "HNNOMX", "TMST": "TMST", "CLST": "CLST", "WITA": "WITA", "MDT": "MDT", "HADT": "HADT", "HEEG": "HEEG", "LHST": "LHST", "AKDT": "AKDT", "SAST": "SAST", "COT": "COT", "HNT": "HNT", "NZST": "NZST", "ARST": "ARST", "ADT": "ADT", "AST": "AST", "HNEG": "HNEG", "HECU": "HECU", "VET": "VET", "WAST": "WAST", "AKST": "AKST", "WART": "WART", "CST": "CST", "GMT": "GMT", "HEPM": "HEPM", "AEDT": "AEDT", "CHADT": "CHADT", "OEZ": "OEZ", "AEST": "AEST", "PST": "PST", "WEZ": "WEZ", "MESZ": "MESZ", "EDT": "EDT", "HKT": "HKT", "BOT": "BOT", "ACST": "ACST", "HNCU": "HNCU", "WAT": "WAT", "WARST": "WARST", "ECT": "ECT", "NZDT": "NZDT", "HAST": "HAST", "CAT": "CAT", "WIB": "WIB", "MYT": "MYT", "UYT": "UYT", "UYST": "UYST", "WESZ": "WESZ", "IST": "IST", "HNOG": "HNOG", "CDT": "CDT", "EAT": "EAT"}, - } - } -  -@@ -115,7 +94,7 @@ func (dz *dz_BT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (dz *dz_BT) MonthsAbbreviated() []string { -- return dz.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -125,7 +104,7 @@ func (dz *dz_BT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (dz *dz_BT) MonthsNarrow() []string { -- return dz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -135,7 +114,7 @@ func (dz *dz_BT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (dz *dz_BT) MonthsWide() []string { -- return dz.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -181,84 +160,13 @@ func (dz *dz_BT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'dz_BT' and handles both Whole and Real numbers based on 'v' - func (dz *dz_BT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, dz.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'dz_BT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (dz *dz_BT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dz.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, dz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, dz.percentSuffix...) -- -- b = append(b, dz.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'dz_BT' -@@ -266,65 +174,7 @@ func (dz *dz_BT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dz.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, dz.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, dz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'dz_BT' -@@ -333,73 +183,7 @@ func (dz *dz_BT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := dz.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, dz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, dz.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, dz.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, dz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'dz_BT' -@@ -407,28 +191,6 @@ func (dz *dz_BT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -437,24 +199,6 @@ func (dz *dz_BT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0xa4, 0xe0, 0xbe, 0xb1, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbc, 0x8b}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0x9f, 0xe0, 0xbe, 0xb3, 0xe0, 0xbc, 0x8b}...) -- b = append(b, dz.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -463,24 +207,6 @@ func (dz *dz_BT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0xa4, 0xe0, 0xbe, 0xb1, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbc, 0x8b}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, dz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -489,25 +215,6 @@ func (dz *dz_BT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, dz.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20, 0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0xa4, 0xe0, 0xbe, 0xb1, 0xe0, 0xbd, 0xb2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0xa3, 0xe0, 0xbd, 0xbc, 0xe0, 0xbc, 0x8b}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, dz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xba, 0xe0, 0xbd, 0xa6, 0xe0, 0xbc, 0x8b}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -516,30 +223,6 @@ func (dz *dz_BT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0x86, 0xe0, 0xbd, 0xb4, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xbc, 0xe0, 0xbd, 0x91, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0x90, 0xe0, 0xbd, 0xa2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x98, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, dz.periodsAbbreviated[0]...) -- } else { -- b = append(b, dz.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -548,37 +231,6 @@ func (dz *dz_BT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0x86, 0xe0, 0xbd, 0xb4, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xbc, 0xe0, 0xbd, 0x91, 0xe0, 0xbc, 0x8b}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, dz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, dz.periodsAbbreviated[0]...) -- } else { -- b = append(b, dz.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -587,42 +239,6 @@ func (dz *dz_BT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0x86, 0xe0, 0xbd, 0xb4, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xbc, 0xe0, 0xbd, 0x91, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0x90, 0xe0, 0xbd, 0xa2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x98, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, dz.periodsAbbreviated[0]...) -- } else { -- b = append(b, dz.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -631,46 +247,5 @@ func (dz *dz_BT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xe0, 0xbd, 0x86, 0xe0, 0xbd, 0xb4, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x9a, 0xe0, 0xbd, 0xbc, 0xe0, 0xbd, 0x91, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0x20, 0xe0, 0xbd, 0xa6, 0xe0, 0xbe, 0x90, 0xe0, 0xbd, 0xa2, 0xe0, 0xbc, 0x8b, 0xe0, 0xbd, 0x98, 0xe0, 0xbc, 0x8b, 0x20}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, dz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, dz.periodsAbbreviated[0]...) -- } else { -- b = append(b, dz.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := dz.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ebu/ebu.go b/ebu/ebu.go -index 238740a..fa455ec 100644 ---- a/ebu/ebu.go -+++ b/ebu/ebu.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"MK", "TK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Mbere ya Kristo", "Thutha wa Kristo"}, -- timezones: map[string]string{"GFT": "GFT", "GMT": "GMT", "WIT": "WIT", "VET": "VET", "HNOG": "HNOG", "TMST": "TMST", "OESZ": "OESZ", "AKST": "AKST", "HECU": "HECU", "WEZ": "WEZ", "HAT": "HAT", "NZST": "NZST", "CLT": "CLT", "SRT": "SRT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "COST": "COST", "HNNOMX": "HNNOMX", "GYT": "GYT", "HKT": "HKT", "WITA": "WITA", "MEZ": "MEZ", "HEEG": "HEEG", "PST": "PST", "HNEG": "HNEG", "HNCU": "HNCU", "EST": "EST", "HENOMX": "HENOMX", "AKDT": "AKDT", "WIB": "WIB", "HKST": "HKST", "SAST": "SAST", "JDT": "JDT", "OEZ": "OEZ", "ACST": "ACST", "ACDT": "ACDT", "WAST": "WAST", "ECT": "ECT", "ACWDT": "ACWDT", "AEST": "AEST", "CLST": "CLST", "BOT": "BOT", "COT": "COT", "ADT": "ADT", "HEPMX": "HEPMX", "UYST": "UYST", "PDT": "PDT", "WESZ": "WESZ", "AWDT": "AWDT", "MESZ": "MESZ", "MST": "MST", "MDT": "MDT", "CST": "CST", "HADT": "HADT", "HEOG": "HEOG", "AWST": "AWST", "SGT": "SGT", "EDT": "EDT", "WART": "WART", "HNPMX": "HNPMX", "AST": "AST", "ACWST": "ACWST", "AEDT": "AEDT", "HEPM": "HEPM", "EAT": "EAT", "ARST": "ARST", "CAT": "CAT", "NZDT": "NZDT", "JST": "JST", "UYT": "UYT", "BT": "BT", "HNT": "HNT", "LHST": "LHST", "LHDT": "LHDT", "CHADT": "CHADT", "TMT": "TMT", "ART": "ART", "IST": "IST", "ChST": "ChST", "CDT": "CDT", "HAST": "HAST", "HNPM": "HNPM", "WAT": "WAT", "WARST": "WARST", "MYT": "MYT"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "WAT": "WAT", "OESZ": "OESZ", "WEZ": "WEZ", "WESZ": "WESZ", "AKDT": "AKDT", "EAT": "EAT", "JDT": "JDT", "HEPMX": "HEPMX", "LHDT": "LHDT", "AWDT": "AWDT", "PST": "PST", "ECT": "ECT", "WIB": "WIB", "LHST": "LHST", "MESZ": "MESZ", "AWST": "AWST", "ACWDT": "ACWDT", "HNOG": "HNOG", "EDT": "EDT", "MDT": "MDT", "JST": "JST", "ACWST": "ACWST", "CHADT": "CHADT", "IST": "IST", "HECU": "HECU", "COT": "COT", "HEOG": "HEOG", "MST": "MST", "ARST": "ARST", "AEST": "AEST", "TMT": "TMT", "TMST": "TMST", "GYT": "GYT", "SAST": "SAST", "CST": "CST", "BOT": "BOT", "ACDT": "ACDT", "GFT": "GFT", "OEZ": "OEZ", "WIT": "WIT", "HAT": "HAT", "GMT": "GMT", "AST": "AST", "HNNOMX": "HNNOMX", "ACST": "ACST", "WAST": "WAST", "COST": "COST", "EST": "EST", "CDT": "CDT", "ART": "ART", "HADT": "HADT", "VET": "VET", "WARST": "WARST", "HKT": "HKT", "PDT": "PDT", "∅∅∅": "∅∅∅", "WART": "WART", "NZST": "NZST", "SRT": "SRT", "HEEG": "HEEG", "AKST": "AKST", "HNT": "HNT", "HKST": "HKST", "WITA": "WITA", "HENOMX": "HENOMX", "HNPM": "HNPM", "HEPM": "HEPM", "ADT": "ADT", "MEZ": "MEZ", "MYT": "MYT", "BT": "BT", "AEDT": "AEDT", "CHAST": "CHAST", "UYT": "UYT", "SGT": "SGT", "NZDT": "NZDT", "HAST": "HAST", "HNEG": "HNEG", "HNCU": "HNCU", "CLT": "CLT", "CAT": "CAT", "ChST": "ChST", "UYST": "UYST", "CLST": "CLST"}, - } - } -  -diff --git a/ebu_KE/ebu_KE.go b/ebu_KE/ebu_KE.go -index 057858d..ad86092 100644 ---- a/ebu_KE/ebu_KE.go -+++ b/ebu_KE/ebu_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type ebu_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ebu_KE' locale - func New() locales.Translator { - return &ebu_KE{ -- locale: "ebu_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Mbe", "Kai", "Kat", "Kan", "Gat", "Gan", "Mug", "Knn", "Ken", "Iku", "Imw", "Igi"}, -- monthsNarrow: []string{"", "M", "K", "K", "K", "G", "G", "M", "K", "K", "I", "I", "I"}, -- monthsWide: []string{"", "Mweri wa mbere", "Mweri wa kaĩri", "Mweri wa kathatũ", "Mweri wa kana", "Mweri wa gatano", "Mweri wa gatantatũ", "Mweri wa mũgwanja", "Mweri wa kanana", "Mweri wa kenda", "Mweri wa ikũmi", "Mweri wa ikũmi na ũmwe", "Mweri wa ikũmi na Kaĩrĩ"}, -- daysAbbreviated: []string{"Kma", "Tat", "Ine", "Tan", "Arm", "Maa", "NMM"}, -- daysNarrow: []string{"K", "N", "N", "N", "A", "M", "N"}, -- daysWide: []string{"Kiumia", "Njumatatu", "Njumaine", "Njumatano", "Aramithi", "Njumaa", "NJumamothii"}, -- periodsAbbreviated: []string{"KI", "UT"}, -- periodsWide: []string{"KI", "UT"}, -- erasAbbreviated: []string{"MK", "TK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Mbere ya Kristo", "Thutha wa Kristo"}, -- timezones: map[string]string{"HEEG": "HEEG", "TMST": "TMST", "HECU": "HECU", "MDT": "MDT", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "UYST": "UYST", "AEST": "AEST", "WAST": "WAST", "WESZ": "WESZ", "HEPMX": "HEPMX", "AKDT": "AKDT", "GFT": "GFT", "HAST": "HAST", "HEOG": "HEOG", "AEDT": "AEDT", "IST": "IST", "AST": "AST", "BT": "BT", "EST": "EST", "HNPMX": "HNPMX", "OEZ": "OEZ", "ADT": "ADT", "ACWST": "ACWST", "SAST": "SAST", "ACDT": "ACDT", "AKST": "AKST", "SRT": "SRT", "PDT": "PDT", "HNEG": "HNEG", "MST": "MST", "LHDT": "LHDT", "JST": "JST", "TMT": "TMT", "ECT": "ECT", "HNCU": "HNCU", "UYT": "UYT", "HKT": "HKT", "WITA": "WITA", "VET": "VET", "HNT": "HNT", "MEZ": "MEZ", "GYT": "GYT", "ACST": "ACST", "HADT": "HADT", "NZDT": "NZDT", "CHAST": "CHAST", "CLST": "CLST", "WART": "WART", "EDT": "EDT", "PST": "PST", "WEZ": "WEZ", "LHST": "LHST", "NZST": "NZST", "BOT": "BOT", "OESZ": "OESZ", "WARST": "WARST", "COST": "COST", "CST": "CST", "HNOG": "HNOG", "HKST": "HKST", "HEPM": "HEPM", "ACWDT": "ACWDT", "HAT": "HAT", "MYT": "MYT", "WIT": "WIT", "ART": "ART", "ARST": "ARST", "AWST": "AWST", "CAT": "CAT", "EAT": "EAT", "HENOMX": "HENOMX", "SGT": "SGT", "MESZ": "MESZ", "ChST": "ChST", "JDT": "JDT", "COT": "COT", "CHADT": "CHADT", "CLT": "CLT", "HNNOMX": "HNNOMX", "GMT": "GMT", "CDT": "CDT", "WIB": "WIB", "HNPM": "HNPM", "WAT": "WAT"}, -+ locale: "ebu_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "ACWDT": "ACWDT", "CAT": "CAT", "CLST": "CLST", "CST": "CST", "AST": "AST", "GMT": "GMT", "HEEG": "HEEG", "WIB": "WIB", "AEDT": "AEDT", "CHADT": "CHADT", "WART": "WART", "MDT": "MDT", "HNPM": "HNPM", "IST": "IST", "VET": "VET", "ACDT": "ACDT", "UYT": "UYT", "WEZ": "WEZ", "EST": "EST", "HKT": "HKT", "AWST": "AWST", "AKST": "AKST", "WIT": "WIT", "LHST": "LHST", "HAT": "HAT", "HEPM": "HEPM", "JST": "JST", "HECU": "HECU", "HKST": "HKST", "ARST": "ARST", "MESZ": "MESZ", "ACST": "ACST", "GYT": "GYT", "EDT": "EDT", "PST": "PST", "ACWST": "ACWST", "HNPMX": "HNPMX", "WITA": "WITA", "AEST": "AEST", "OEZ": "OEZ", "OESZ": "OESZ", "WARST": "WARST", "SAST": "SAST", "HEOG": "HEOG", "BT": "BT", "SGT": "SGT", "AKDT": "AKDT", "NZDT": "NZDT", "BOT": "BOT", "AWDT": "AWDT", "LHDT": "LHDT", "TMT": "TMT", "ADT": "ADT", "HNT": "HNT", "COST": "COST", "∅∅∅": "∅∅∅", "GFT": "GFT", "HNOG": "HNOG", "CDT": "CDT", "HAST": "HAST", "MEZ": "MEZ", "MYT": "MYT", "HEPMX": "HEPMX", "WAST": "WAST", "COT": "COT", "TMST": "TMST", "NZST": "NZST", "MST": "MST", "HADT": "HADT", "HNCU": "HNCU", "ECT": "ECT", "HENOMX": "HENOMX", "JDT": "JDT", "PDT": "PDT", "CHAST": "CHAST", "WESZ": "WESZ", "ChST": "ChST", "ART": "ART", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "CLT": "CLT", "SRT": "SRT", "EAT": "EAT", "WAT": "WAT"}, - } - } -  -@@ -109,7 +94,7 @@ func (ebu *ebu_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ebu *ebu_KE) MonthsAbbreviated() []string { -- return ebu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (ebu *ebu_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ebu *ebu_KE) MonthsNarrow() []string { -- return ebu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (ebu *ebu_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ebu *ebu_KE) MonthsWide() []string { -- return ebu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (ebu *ebu_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ebu.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ebu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ebu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ebu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ebu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ebu_KE' -@@ -247,68 +183,7 @@ func (ebu *ebu_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ebu.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ebu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ebu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ebu.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ebu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ebu.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ebu_KE' -@@ -316,27 +191,6 @@ func (ebu *ebu_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (ebu *ebu_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ebu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (ebu *ebu_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ebu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (ebu *ebu_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ebu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ebu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (ebu *ebu_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (ebu *ebu_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (ebu *ebu_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (ebu *ebu_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ebu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ebu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ee/ee.go b/ee/ee.go -index d2713a6..4708ddc 100644 ---- a/ee/ee.go -+++ b/ee/ee.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"hY", "Yŋ"}, - erasNarrow: []string{"hY", "Yŋ"}, - erasWide: []string{"Hafi Yesu Va Do ŋgɔ", "Yesu Ŋɔli"}, -- timezones: map[string]string{"HNOG": "Ɣetoɖoƒe Grinlanɖ gaƒoƒoɖoanyime", "HEOG": "Ɣetoɖoƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "SAST": "Anyiehe Africa gaƒoƒome", "TMT": "Tɛkmenistan gaƒoƒoɖoanyime", "EST": "Ɣedzeƒe America gaƒoƒoɖoanyime", "CST": "Titina America gaƒoƒoɖoanyime", "HAT": "Niufaunɖlanɖ ŋkekeme gaƒoƒome", "MST": "America Todzidukɔwo ƒe gaƒoƒoɖoanyime", "BT": "BT", "AWDT": "Ɣetoɖoƒe Australia ŋkekeme gaƒoƒome", "TMST": "Tɛkmenistan dzomeŋɔli gaƒoƒome", "WAT": "Ɣetoɖoƒe Afrika gaƒoƒoɖoanyime", "HNPMX": "HNPMX", "WIB": "WIB", "CHAST": "CHAST", "CAT": "Titina Afrika gaƒoƒome", "WAST": "Ɣetoɖoƒe Africa ŋkekeme gaƒoƒome", "ADT": "Atlantic ŋkekeme gaƒoƒome", "WIT": "WIT", "ChST": "ChST", "EDT": "Ɣedzeƒe America ŋkekeme gaƒoƒome", "MDT": "America Todzidukɔwo ƒe ŋkekme gaƒoƒome", "HKST": "Hɔng Kɔng dzomeŋɔli gaƒoƒome", "MEZ": "Titina Europe gaƒoƒoɖoanyime", "JST": "Japan gaƒoƒoɖanyime", "HECU": "Kuba ŋkekeme gaƒoƒome", "GYT": "Gayana gaƒoƒome", "AWST": "Ɣetoɖoƒe Australia gaƒoƒoɖoanyime", "WESZ": "Ɣetoɖoƒe Europe ŋkekeme gaƒoƒome", "IST": "IST", "EAT": "Ɣedzeƒe Africa gaƒoƒome", "HNNOMX": "HNNOMX", "AST": "Atlantic gaƒoƒoɖoanyime", "ARST": "Argentina dzomeŋɔli gaƒoƒome", "ACWST": "Australia ɣetoɖofe gaƒoƒoɖoanyime", "ACWDT": "Australia ɣetoɖofe ŋkekeme gaƒoƒome", "SGT": "SGT", "HEPMX": "HEPMX", "AKST": "Alaska gaƒoƒoɖoanyime", "HAST": "Hawaii-Aleutia gaƒoƒoɖoanyime", "ACDT": "Titina Australia ŋkekeme gaƒoƒome", "OESZ": "Ɣedzeƒe Europe ŋkekeme gaƒoƒome", "WART": "Ɣetoɖoƒe Argentina gaƒoƒoɖoanyime", "GMT": "Greenwich gaƒoƒome", "MYT": "MYT", "SRT": "Suriname gaƒoƒome", "CHADT": "CHADT", "NZDT": "NZDT", "JDT": "Japan ŋkekeme gaƒoƒome", "AEST": "Ɣedzeƒe Australia gaƒoƒoɖoanyime", "ART": "Argentina gaƒoƒoɖoanyime", "PST": "Pacific gaƒoƒoɖoanyime", "WITA": "WITA", "GFT": "Frentsi Guiana gaƒoƒome", "UYST": "Uruguai dzomeŋɔli gaƒoƒome", "HNT": "Niufaunɖlanɖ gaƒoƒoɖoanyime", "LHDT": "LHDT", "NZST": "NZST", "CDT": "Titina America ŋkekeme gaƒoƒome", "VET": "Venezuela gaƒoƒome", "HNEG": "Ɣedzeƒe Grinlanɖ gaƒoƒoɖoanyime", "COT": "Kolombia gaƒoƒoɖoanyime", "HENOMX": "HENOMX", "BOT": "Bolivia gaƒoƒome", "MESZ": "Titina Europe ŋkekeme gaƒoƒome", "CLT": "Tsile gaƒoƒoɖoanyime", "CLST": "Tsile dzomeŋɔli gaƒoƒome", "ACST": "Titina Australia gaƒoƒoɖoanyime", "HKT": "Hɔng Kɔng gaƒoƒoɖoanyi me", "WEZ": "Ɣetoɖoƒe Europe gaƒoƒoɖoanyime", "∅∅∅": "Amazon dzomeŋɔli gaƒoƒome", "ECT": "Ikuedɔ dzomeŋɔli gaƒoƒome", "WARST": "Ɣetoɖoƒe Argentina dzomeŋɔli gaƒoƒome", "HNCU": "Kuba gaƒoƒoɖoanyime", "PDT": "Pacific ŋkekme gaƒoƒome", "LHST": "LHST", "COST": "Kolombia dzomeŋɔli gaƒoƒome", "AKDT": "Alaska ŋkekeme gaƒoƒome", "AEDT": "Ɣedzeƒe Australia ŋkekeme gaƒoƒome", "HNPM": "Saint Pierre kple Mikuelon gaƒoƒoɖoanyime", "HEPM": "Saint Pierre kple Mikuelon ŋkekeme gaƒoƒome", "HEEG": "Ɣedzeƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "OEZ": "Ɣedzeƒe Europe gaƒoƒoɖoanyime", "UYT": "Uruguai gaƒoƒoɖoanyime", "HADT": "Hawaii-Aleutia ŋkekeme gaƒoƒome"}, -+ timezones: map[string]string{"COT": "Kolombia gaƒoƒoɖoanyime", "HKT": "Hɔng Kɔng gaƒoƒoɖoanyi me", "BOT": "Bolivia gaƒoƒome", "MEZ": "Titina Europe gaƒoƒoɖoanyime", "UYT": "Uruguai gaƒoƒoɖoanyime", "WART": "Ɣetoɖoƒe Argentina gaƒoƒoɖoanyime", "WARST": "Ɣetoɖoƒe Argentina dzomeŋɔli gaƒoƒome", "EST": "Ɣedzeƒe America gaƒoƒoɖoanyime", "WIB": "WIB", "SRT": "Suriname gaƒoƒome", "HAST": "Hawaii-Aleutia gaƒoƒoɖoanyime", "SGT": "SGT", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "HNT": "Niufaunɖlanɖ gaƒoƒoɖoanyime", "SAST": "Anyiehe Africa gaƒoƒome", "ECT": "Ikuedɔ dzomeŋɔli gaƒoƒome", "ADT": "Atlantic ŋkekeme gaƒoƒome", "MESZ": "Titina Europe ŋkekeme gaƒoƒome", "ACST": "Titina Australia gaƒoƒoɖoanyime", "ARST": "Argentina dzomeŋɔli gaƒoƒome", "ACDT": "Titina Australia ŋkekeme gaƒoƒome", "OEZ": "Ɣedzeƒe Europe gaƒoƒoɖoanyime", "HNOG": "Ɣetoɖoƒe Grinlanɖ gaƒoƒoɖoanyime", "TMT": "Tɛkmenistan gaƒoƒoɖoanyime", "CAT": "Titina Afrika gaƒoƒome", "NZST": "NZST", "NZDT": "NZDT", "GYT": "Gayana gaƒoƒome", "CDT": "Titina America ŋkekeme gaƒoƒome", "ACWDT": "Australia ɣetoɖofe ŋkekeme gaƒoƒome", "HNEG": "Ɣedzeƒe Grinlanɖ gaƒoƒoɖoanyime", "LHST": "LHST", "IST": "IST", "AKDT": "Alaska ŋkekeme gaƒoƒome", "AWDT": "Ɣetoɖoƒe Australia ŋkekeme gaƒoƒome", "CHADT": "CHADT", "VET": "Venezuela gaƒoƒome", "HNCU": "Kuba gaƒoƒoɖoanyime", "HKST": "Hɔng Kɔng dzomeŋɔli gaƒoƒome", "WITA": "WITA", "ART": "Argentina gaƒoƒoɖoanyime", "EAT": "Ɣedzeƒe Africa gaƒoƒome", "AEDT": "Ɣedzeƒe Australia ŋkekeme gaƒoƒome", "UYST": "Uruguai dzomeŋɔli gaƒoƒome", "WIT": "WIT", "EDT": "Ɣedzeƒe America ŋkekeme gaƒoƒome", "JST": "Japan gaƒoƒoɖanyime", "PDT": "Pacific ŋkekme gaƒoƒome", "BT": "BT", "HNPMX": "HNPMX", "HEPM": "Saint Pierre kple Mikuelon ŋkekeme gaƒoƒome", "HEPMX": "HEPMX", "WAT": "Ɣetoɖoƒe Afrika gaƒoƒoɖoanyime", "HAT": "Niufaunɖlanɖ ŋkekeme gaƒoƒome", "HEOG": "Ɣetoɖoƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "ChST": "ChST", "MYT": "MYT", "HNPM": "Saint Pierre kple Mikuelon gaƒoƒoɖoanyime", "CST": "Titina America gaƒoƒoɖoanyime", "GMT": "Greenwich gaƒoƒome", "HEEG": "Ɣedzeƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "WAST": "Ɣetoɖoƒe Africa ŋkekeme gaƒoƒome", "CLST": "Tsile dzomeŋɔli gaƒoƒome", "HENOMX": "HENOMX", "∅∅∅": "Amazon dzomeŋɔli gaƒoƒome", "OESZ": "Ɣedzeƒe Europe ŋkekeme gaƒoƒome", "TMST": "Tɛkmenistan dzomeŋɔli gaƒoƒome", "MDT": "Makau ŋkekeme gaƒoƒome", "AST": "Atlantic gaƒoƒoɖoanyime", "WESZ": "Ɣetoɖoƒe Europe ŋkekeme gaƒoƒome", "HECU": "Kuba ŋkekeme gaƒoƒome", "AKST": "Alaska gaƒoƒoɖoanyime", "GFT": "Frentsi Guiana gaƒoƒome", "COST": "Kolombia dzomeŋɔli gaƒoƒome", "LHDT": "LHDT", "AEST": "Ɣedzeƒe Australia gaƒoƒoɖoanyime", "WEZ": "Ɣetoɖoƒe Europe gaƒoƒoɖoanyime", "ACWST": "Australia ɣetoɖofe gaƒoƒoɖoanyime", "CLT": "Tsile gaƒoƒoɖoanyime", "MST": "Makau gaƒoƒoɖoanyime", "HADT": "Hawaii-Aleutia ŋkekeme gaƒoƒome", "AWST": "Ɣetoɖoƒe Australia gaƒoƒoɖoanyime", "JDT": "Japan ŋkekeme gaƒoƒome", "PST": "Pacific gaƒoƒoɖoanyime"}, - } - } -  -diff --git a/ee_GH/ee_GH.go b/ee_GH/ee_GH.go -index af2a53b..8f890c9 100644 ---- a/ee_GH/ee_GH.go -+++ b/ee_GH/ee_GH.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ee_GH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ee_GH' locale - func New() locales.Translator { - return &ee_GH{ -- locale: "ee_GH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "dzv", "dzd", "ted", "afɔ", "dam", "mas", "sia", "dea", "any", "kel", "ade", "dzm"}, -- monthsNarrow: []string{"", "d", "d", "t", "a", "d", "m", "s", "d", "a", "k", "a", "d"}, -- monthsWide: []string{"", "dzove", "dzodze", "tedoxe", "afɔfĩe", "dama", "masa", "siamlɔm", "deasiamime", "anyɔnyɔ", "kele", "adeɛmekpɔxe", "dzome"}, -- daysAbbreviated: []string{"kɔs", "dzo", "bla", "kuɖ", "yaw", "fiɖ", "mem"}, -- daysNarrow: []string{"k", "d", "b", "k", "y", "f", "m"}, -- daysShort: []string{"kɔs", "dzo", "bla", "kuɖ", "yaw", "fiɖ", "mem"}, -- daysWide: []string{"kɔsiɖa", "dzoɖa", "blaɖa", "kuɖa", "yawoɖa", "fiɖa", "memleɖa"}, -- periodsAbbreviated: []string{"ŋdi", "ɣetrɔ"}, -- periodsNarrow: []string{"ŋ", "ɣ"}, -- periodsWide: []string{"ŋdi", "ɣetrɔ"}, -- erasAbbreviated: []string{"hY", "Yŋ"}, -- erasNarrow: []string{"hY", "Yŋ"}, -- erasWide: []string{"Hafi Yesu Va Do ŋgɔ", "Yesu Ŋɔli"}, -- timezones: map[string]string{"AKDT": "Alaska ŋkekeme gaƒoƒome", "CST": "Titina America gaƒoƒoɖoanyime", "MDT": "Makau ŋkekeme gaƒoƒome", "HEOG": "Ɣetoɖoƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "ACWDT": "Australia ɣetoɖofe ŋkekeme gaƒoƒome", "ART": "Argentina gaƒoƒoɖoanyime", "MEZ": "Titina Europe gaƒoƒoɖoanyime", "MST": "Makau gaƒoƒoɖoanyime", "AWDT": "Ɣetoɖoƒe Australia ŋkekeme gaƒoƒome", "JST": "Japan gaƒoƒoɖanyime", "OESZ": "Ɣedzeƒe Europe ŋkekeme gaƒoƒome", "HNNOMX": "HNNOMX", "∅∅∅": "Azores dzomeŋɔli gaƒoƒome", "HAST": "Hawaii-Aleutia gaƒoƒoɖoanyime", "BT": "BT", "SAST": "Anyiehe Africa gaƒoƒome", "AWST": "Ɣetoɖoƒe Australia gaƒoƒoɖoanyime", "HEPM": "Saint Pierre kple Mikuelon ŋkekeme gaƒoƒome", "CLT": "Tsile gaƒoƒoɖoanyime", "WART": "Ɣetoɖoƒe Argentina gaƒoƒoɖoanyime", "EST": "Ɣedzeƒe America gaƒoƒoɖoanyime", "GYT": "Gayana gaƒoƒome", "UYT": "Uruguai gaƒoƒoɖoanyime", "HNOG": "Ɣetoɖoƒe Grinlanɖ gaƒoƒoɖoanyime", "EAT": "Ɣedzeƒe Africa gaƒoƒome", "WAST": "Ɣetoɖoƒe Africa ŋkekeme gaƒoƒome", "AEST": "Ɣedzeƒe Australia gaƒoƒoɖoanyime", "CHAST": "CHAST", "CAT": "Titina Afrika gaƒoƒome", "OEZ": "Ɣedzeƒe Europe gaƒoƒoɖoanyime", "BOT": "Bolivia gaƒoƒome", "TMST": "Tɛkmenistan dzomeŋɔli gaƒoƒome", "AST": "Atlantic gaƒoƒoɖoanyime", "AEDT": "Ɣedzeƒe Australia ŋkekeme gaƒoƒome", "NZDT": "NZDT", "CHADT": "CHADT", "IST": "IST", "CDT": "Titina America ŋkekeme gaƒoƒome", "HAT": "Niufaunɖlanɖ ŋkekeme gaƒoƒome", "COT": "Kolombia gaƒoƒoɖoanyime", "COST": "Kolombia dzomeŋɔli gaƒoƒome", "GMT": "Greenwich gaƒoƒome", "EDT": "Ɣedzeƒe America ŋkekeme gaƒoƒome", "ADT": "Atlantic ŋkekeme gaƒoƒome", "WAT": "Ɣetoɖoƒe Afrika gaƒoƒoɖoanyime", "ECT": "Ikuedɔ dzomeŋɔli gaƒoƒome", "WIT": "WIT", "HNT": "Niufaunɖlanɖ gaƒoƒoɖoanyime", "HNPM": "Saint Pierre kple Mikuelon gaƒoƒoɖoanyime", "LHDT": "LHDT", "CLST": "Tsile dzomeŋɔli gaƒoƒome", "HNCU": "Kuba gaƒoƒoɖoanyime", "AKST": "Alaska gaƒoƒoɖoanyime", "LHST": "LHST", "NZST": "NZST", "HNEG": "Ɣedzeƒe Grinlanɖ gaƒoƒoɖoanyime", "JDT": "Japan ŋkekeme gaƒoƒome", "HEEG": "Ɣedzeƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "ACST": "Titina Australia gaƒoƒoɖoanyime", "HENOMX": "HENOMX", "VET": "Venezuela gaƒoƒome", "SRT": "Suriname gaƒoƒome", "ARST": "Argentina dzomeŋɔli gaƒoƒome", "HKST": "Hɔng Kɔng dzomeŋɔli gaƒoƒome", "WITA": "WITA", "HECU": "Kuba ŋkekeme gaƒoƒome", "HEPMX": "HEPMX", "HADT": "Hawaii-Aleutia ŋkekeme gaƒoƒome", "PST": "Pacific gaƒoƒoɖoanyime", "ACWST": "Australia ɣetoɖofe gaƒoƒoɖoanyime", "WEZ": "Ɣetoɖoƒe Europe gaƒoƒoɖoanyime", "WESZ": "Ɣetoɖoƒe Europe ŋkekeme gaƒoƒome", "HKT": "Hɔng Kɔng gaƒoƒoɖoanyi me", "SGT": "SGT", "HNPMX": "HNPMX", "UYST": "Uruguai dzomeŋɔli gaƒoƒome", "WIB": "WIB", "PDT": "Pacific ŋkekme gaƒoƒome", "MESZ": "Titina Europe ŋkekeme gaƒoƒome", "ChST": "ChST", "ACDT": "Titina Australia ŋkekeme gaƒoƒome", "WARST": "Ɣetoɖoƒe Argentina dzomeŋɔli gaƒoƒome", "MYT": "MYT", "GFT": "Frentsi Guiana gaƒoƒome", "TMT": "Tɛkmenistan gaƒoƒoɖoanyime"}, -+ locale: "ee_GH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "VET": "VET", "HECU": "HECU", "GFT": "GFT", "COT": "COT", "HNOG": "HNOG", "HEOG": "HEOG", "ChST": "ChST", "MEZ": "MEZ", "HEPM": "HEPM", "IST": "IST", "AEDT": "AEDT", "ECT": "ECT", "EAT": "EAT", "CHADT": "CHADT", "WART": "WART", "NZST": "NZST", "BOT": "BOT", "HADT": "HADT", "HNNOMX": "HNNOMX", "MYT": "MYT", "HNCU": "HNCU", "OESZ": "OESZ", "ACST": "ACST", "HNEG": "HNEG", "LHDT": "LHDT", "CHAST": "CHAST", "ACWDT": "ACWDT", "TMT": "TMT", "WIB": "WIB", "LHST": "LHST", "UYST": "UYST", "WAT": "WAT", "ADT": "ADT", "ARST": "ARST", "MESZ": "MESZ", "SGT": "SGT", "AKST": "AKST", "TMST": "TMST", "MDT": "MDT", "HEEG": "HEEG", "AWST": "AWST", "AEST": "AEST", "GYT": "GYT", "COST": "COST", "WITA": "WITA", "CST": "CST", "CDT": "CDT", "NZDT": "NZDT", "EDT": "EDT", "HKST": "HKST", "CLST": "CLST", "AST": "AST", "HAST": "HAST", "HNPM": "HNPM", "WEZ": "WEZ", "∅∅∅": "∅∅∅", "HNT": "HNT", "WIT": "WIT", "CAT": "CAT", "SRT": "SRT", "ACDT": "ACDT", "BT": "BT", "AKDT": "AKDT", "CLT": "CLT", "AWDT": "AWDT", "SAST": "SAST", "JST": "JST", "JDT": "JDT", "ACWST": "ACWST", "HNPMX": "HNPMX", "WARST": "WARST", "HENOMX": "HENOMX", "UYT": "UYT", "PDT": "PDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "MST": "MST", "GMT": "GMT", "WAST": "WAST", "HAT": "HAT", "EST": "EST", "HKT": "HKT", "ART": "ART", "PST": "PST"}, - } - } -  -@@ -118,7 +101,7 @@ func (ee *ee_GH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ee *ee_GH) MonthsAbbreviated() []string { -- return ee.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -128,7 +111,7 @@ func (ee *ee_GH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ee *ee_GH) MonthsNarrow() []string { -- return ee.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -138,7 +121,7 @@ func (ee *ee_GH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ee *ee_GH) MonthsWide() []string { -- return ee.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -198,56 +181,7 @@ func (ee *ee_GH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ee.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ee.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ee.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ee.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ee.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ee_GH' -@@ -256,68 +190,7 @@ func (ee *ee_GH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ee.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ee.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ee.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ee.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ee.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ee.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ee_GH' -@@ -325,17 +198,6 @@ func (ee *ee_GH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -344,18 +206,6 @@ func (ee *ee_GH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ee.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,18 +214,6 @@ func (ee *ee_GH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ee.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -384,20 +222,6 @@ func (ee *ee_GH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ee.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ee.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -406,30 +230,6 @@ func (ee *ee_GH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ee.periodsAbbreviated[0]...) -- } else { -- b = append(b, ee.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20, 0x67, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -438,37 +238,6 @@ func (ee *ee_GH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ee.periodsAbbreviated[0]...) -- } else { -- b = append(b, ee.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20, 0x67, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -477,41 +246,6 @@ func (ee *ee_GH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ee.periodsAbbreviated[0]...) -- } else { -- b = append(b, ee.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20, 0x67, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -520,45 +254,5 @@ func (ee *ee_GH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ee.periodsAbbreviated[0]...) -- } else { -- b = append(b, ee.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20, 0x67, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ee.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ee.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ee_TG/ee_TG.go b/ee_TG/ee_TG.go -index f459781..e8fba72 100644 ---- a/ee_TG/ee_TG.go -+++ b/ee_TG/ee_TG.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ee_TG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ee_TG' locale - func New() locales.Translator { - return &ee_TG{ -- locale: "ee_TG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "dzv", "dzd", "ted", "afɔ", "dam", "mas", "sia", "dea", "any", "kel", "ade", "dzm"}, -- monthsNarrow: []string{"", "d", "d", "t", "a", "d", "m", "s", "d", "a", "k", "a", "d"}, -- monthsWide: []string{"", "dzove", "dzodze", "tedoxe", "afɔfĩe", "dama", "masa", "siamlɔm", "deasiamime", "anyɔnyɔ", "kele", "adeɛmekpɔxe", "dzome"}, -- daysAbbreviated: []string{"kɔs", "dzo", "bla", "kuɖ", "yaw", "fiɖ", "mem"}, -- daysNarrow: []string{"k", "d", "b", "k", "y", "f", "m"}, -- daysShort: []string{"kɔs", "dzo", "bla", "kuɖ", "yaw", "fiɖ", "mem"}, -- daysWide: []string{"kɔsiɖa", "dzoɖa", "blaɖa", "kuɖa", "yawoɖa", "fiɖa", "memleɖa"}, -- periodsAbbreviated: []string{"ŋdi", "ɣetrɔ"}, -- periodsNarrow: []string{"ŋ", "ɣ"}, -- periodsWide: []string{"ŋdi", "ɣetrɔ"}, -- erasAbbreviated: []string{"hY", "Yŋ"}, -- erasNarrow: []string{"hY", "Yŋ"}, -- erasWide: []string{"Hafi Yesu Va Do ŋgɔ", "Yesu Ŋɔli"}, -- timezones: map[string]string{"UYST": "Uruguai dzomeŋɔli gaƒoƒome", "MESZ": "Titina Europe ŋkekeme gaƒoƒome", "WART": "Ɣetoɖoƒe Argentina gaƒoƒoɖoanyime", "HECU": "Kuba ŋkekeme gaƒoƒome", "MDT": "Makau ŋkekeme gaƒoƒome", "ADT": "Atlantic ŋkekeme gaƒoƒome", "LHDT": "LHDT", "HEEG": "Ɣedzeƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "SAST": "Anyiehe Africa gaƒoƒome", "WAST": "Ɣetoɖoƒe Africa ŋkekeme gaƒoƒome", "COT": "Kolombia gaƒoƒoɖoanyime", "AST": "Atlantic gaƒoƒoɖoanyime", "UYT": "Uruguai gaƒoƒoɖoanyime", "BT": "BT", "ART": "Argentina gaƒoƒoɖoanyime", "AWST": "Ɣetoɖoƒe Australia gaƒoƒoɖoanyime", "OEZ": "Ɣedzeƒe Europe gaƒoƒoɖoanyime", "WARST": "Ɣetoɖoƒe Argentina dzomeŋɔli gaƒoƒome", "WESZ": "Ɣetoɖoƒe Europe ŋkekeme gaƒoƒome", "ACWST": "Australia ɣetoɖofe gaƒoƒoɖoanyime", "NZST": "NZST", "IST": "IST", "AKDT": "Alaska ŋkekeme gaƒoƒome", "MYT": "MYT", "HNT": "Niufaunɖlanɖ gaƒoƒoɖoanyime", "AEDT": "Ɣedzeƒe Australia ŋkekeme gaƒoƒome", "MEZ": "Titina Europe gaƒoƒoɖoanyime", "EAT": "Ɣedzeƒe Africa gaƒoƒome", "GMT": "Greenwich gaƒoƒome", "CST": "Titina America gaƒoƒoɖoanyime", "ARST": "Argentina dzomeŋɔli gaƒoƒome", "HKT": "Hɔng Kɔng gaƒoƒoɖoanyi me", "HNPM": "Saint Pierre kple Mikuelon gaƒoƒoɖoanyime", "VET": "Venezuela gaƒoƒome", "HAT": "Niufaunɖlanɖ ŋkekeme gaƒoƒome", "HNOG": "Ɣetoɖoƒe Grinlanɖ gaƒoƒoɖoanyime", "BOT": "Bolivia gaƒoƒome", "TMST": "Tɛkmenistan dzomeŋɔli gaƒoƒome", "WAT": "Ɣetoɖoƒe Afrika gaƒoƒoɖoanyime", "HENOMX": "HENOMX", "PST": "Pacific gaƒoƒoɖoanyime", "AEST": "Ɣedzeƒe Australia gaƒoƒoɖoanyime", "GFT": "Frentsi Guiana gaƒoƒome", "CAT": "Titina Afrika gaƒoƒome", "COST": "Kolombia dzomeŋɔli gaƒoƒome", "HNNOMX": "HNNOMX", "CDT": "Titina America ŋkekeme gaƒoƒome", "WIB": "WIB", "CLT": "Tsile gaƒoƒoɖoanyime", "ECT": "Ikuedɔ dzomeŋɔli gaƒoƒome", "SRT": "Suriname gaƒoƒome", "WEZ": "Ɣetoɖoƒe Europe gaƒoƒoɖoanyime", "HEOG": "Ɣetoɖoƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "CLST": "Tsile dzomeŋɔli gaƒoƒome", "TMT": "Tɛkmenistan gaƒoƒoɖoanyime", "HNCU": "Kuba gaƒoƒoɖoanyime", "WIT": "WIT", "ACWDT": "Australia ɣetoɖofe ŋkekeme gaƒoƒome", "CHADT": "CHADT", "NZDT": "NZDT", "ChST": "ChST", "ACST": "Titina Australia gaƒoƒoɖoanyime", "EDT": "Ɣedzeƒe America ŋkekeme gaƒoƒome", "MST": "Makau gaƒoƒoɖoanyime", "WITA": "WITA", "JDT": "Japan ŋkekeme gaƒoƒome", "HNEG": "Ɣedzeƒe Grinlanɖ gaƒoƒoɖoanyime", "SGT": "SGT", "AKST": "Alaska gaƒoƒoɖoanyime", "GYT": "Gayana gaƒoƒome", "HADT": "Hawaii-Aleutia ŋkekeme gaƒoƒome", "PDT": "Pacific ŋkekme gaƒoƒome", "HKST": "Hɔng Kɔng dzomeŋɔli gaƒoƒome", "CHAST": "CHAST", "OESZ": "Ɣedzeƒe Europe ŋkekeme gaƒoƒome", "EST": "Ɣedzeƒe America gaƒoƒoɖoanyime", "HNPMX": "HNPMX", "LHST": "LHST", "JST": "Japan gaƒoƒoɖanyime", "ACDT": "Titina Australia ŋkekeme gaƒoƒome", "∅∅∅": "Peru dzomeŋɔli gaƒoƒome", "HEPMX": "HEPMX", "HAST": "Hawaii-Aleutia gaƒoƒoɖoanyime", "AWDT": "Ɣetoɖoƒe Australia ŋkekeme gaƒoƒome", "HEPM": "Saint Pierre kple Mikuelon ŋkekeme gaƒoƒome"}, -+ locale: "ee_TG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "HNCU": "HNCU", "ARST": "ARST", "HADT": "HADT", "JST": "JST", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "GYT": "GYT", "CDT": "CDT", "MYT": "MYT", "CHADT": "CHADT", "UYT": "UYT", "WEZ": "WEZ", "WAT": "WAT", "SAST": "SAST", "WIB": "WIB", "HENOMX": "HENOMX", "VET": "VET", "WAST": "WAST", "HKT": "HKT", "CAT": "CAT", "AST": "AST", "ACWDT": "ACWDT", "PST": "PST", "AKDT": "AKDT", "HNT": "HNT", "WART": "WART", "HNPM": "HNPM", "LHST": "LHST", "AEDT": "AEDT", "CLT": "CLT", "ECT": "ECT", "BOT": "BOT", "JDT": "JDT", "LHDT": "LHDT", "ACWST": "ACWST", "AKST": "AKST", "GFT": "GFT", "MDT": "MDT", "COT": "COT", "MEZ": "MEZ", "SGT": "SGT", "WIT": "WIT", "EST": "EST", "TMT": "TMT", "ADT": "ADT", "NZDT": "NZDT", "ACDT": "ACDT", "HEPM": "HEPM", "CHAST": "CHAST", "UYST": "UYST", "HEPMX": "HEPMX", "HEOG": "HEOG", "MST": "MST", "HNEG": "HNEG", "AWDT": "AWDT", "BT": "BT", "EDT": "EDT", "WITA": "WITA", "HNNOMX": "HNNOMX", "HECU": "HECU", "CLST": "CLST", "CST": "CST", "EAT": "EAT", "MESZ": "MESZ", "OEZ": "OEZ", "HNOG": "HNOG", "HKST": "HKST", "SRT": "SRT", "ACST": "ACST", "HEEG": "HEEG", "PDT": "PDT", "HNPMX": "HNPMX", "COST": "COST", "TMST": "TMST", "ChST": "ChST", "HAST": "HAST", "AEST": "AEST", "IST": "IST", "OESZ": "OESZ", "GMT": "GMT", "HAT": "HAT", "WARST": "WARST", "NZST": "NZST", "ART": "ART"}, - } - } -  -@@ -118,7 +101,7 @@ func (ee *ee_TG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ee *ee_TG) MonthsAbbreviated() []string { -- return ee.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -128,7 +111,7 @@ func (ee *ee_TG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ee *ee_TG) MonthsNarrow() []string { -- return ee.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -138,7 +121,7 @@ func (ee *ee_TG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ee *ee_TG) MonthsWide() []string { -- return ee.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -198,56 +181,7 @@ func (ee *ee_TG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ee.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ee.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ee.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ee.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ee.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ee_TG' -@@ -256,68 +190,7 @@ func (ee *ee_TG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ee.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ee.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ee.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ee.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ee.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ee.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ee_TG' -@@ -325,17 +198,6 @@ func (ee *ee_TG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -344,18 +206,6 @@ func (ee *ee_TG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ee.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,18 +214,6 @@ func (ee *ee_TG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ee.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -384,20 +222,6 @@ func (ee *ee_TG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ee.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ee.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/el/el.go b/el/el.go -index 09ac4f6..407d4c2 100644 ---- a/el/el.go -+++ b/el/el.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"π.Χ.", "μ.Χ."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"προ Χριστού", "μετά Χριστόν"}, -- timezones: map[string]string{"PDT": "Θερινή ώρα Βόρειας Αμερικής", "HEPM": "Θερινή ώρα Σαιντ Πιερ και Μικελόν", "PST": "Χειμερινή ώρα Βόρειας Αμερικής", "ChST": "Ώρα Τσαμόρο", "AEDT": "Θερινή ώρα Ανατολικής Αυστραλίας", "GFT": "Ώρα Γαλλικής Γουιάνας", "TMST": "Θερινή ώρα Τουρκμενιστάν", "COST": "Θερινή ώρα Κολομβίας", "WARST": "Θερινή ώρα Δυτικής Αργεντινής", "GMT": "Μέση ώρα Γκρίνουιτς", "HKST": "Θερινή ώρα Χονγκ Κονγκ", "AEST": "Χειμερινή ώρα Ανατολικής Αυστραλίας", "∅∅∅": "Θερινή ώρα Περού", "AST": "Χειμερινή ώρα Ατλαντικού", "WIT": "Ώρα Ανατολικής Ινδονησίας", "NZDT": "Θερινή ώρα Νέας Ζηλανδίας", "CAT": "Ώρα Κεντρικής Αφρικής", "AWDT": "Θερινή ώρα Δυτικής Αυστραλίας", "CLT": "Χειμερινή ώρα Χιλής", "HKT": "Χειμερινή ώρα Χονγκ Κονγκ", "HECU": "Θερινή ώρα Κούβας", "UYST": "Θερινή ώρα Ουρουγουάης", "HAT": "Θερινή ώρα Νέας Γης", "ARST": "Θερινή ώρα Αργεντινής", "HNOG": "Χειμερινή ώρα Δυτικής Γροιλανδίας", "TMT": "Χειμερινή ώρα Τουρκμενιστάν", "WART": "Χειμερινή ώρα Δυτικής Αργεντινής", "SGT": "Ώρα Σιγκαπούρης", "AKDT": "Θερινή ώρα Αλάσκας", "WIB": "Ώρα Δυτικής Ινδονησίας", "VET": "Ώρα Βενεζουέλας", "LHST": "Χειμερινή ώρα Λορντ Χάου", "CLST": "Θερινή ώρα Χιλής", "HENOMX": "Θερινή ώρα Βορειοδυτικού Μεξικού", "MST": "Χειμερινή ώρα Μακάο", "EST": "Ανατολική χειμερινή ώρα Βόρειας Αμερικής", "EDT": "Ανατολική θερινή ώρα Βόρειας Αμερικής", "GYT": "Ώρα Γουιάνας", "HNT": "Χειμερινή ώρα Νέας Γης", "EAT": "Ώρα Ανατολικής Αφρικής", "WAT": "Χειμερινή ώρα Δυτικής Αφρικής", "HNNOMX": "Χειμερινή ώρα Βορειοδυτικού Μεξικού", "MDT": "Θερινή ώρα Μακάο", "HNPMX": "Χειμερινή ώρα Ειρηνικού Μεξικού", "HNCU": "Χειμερινή ώρα Κούβας", "CDT": "Κεντρική θερινή ώρα Βόρειας Αμερικής", "UYT": "Χειμερινή ώρα Ουρουγουάης", "HAST": "Χειμερινή ώρα Χαβάης-Αλεούτιων νήσων", "HADT": "Θερινή ώρα Χαβάης-Αλεούτιων νήσων", "ACST": "Χειμερινή ώρα Κεντρικής Αυστραλίας", "CST": "Κεντρική χειμερινή ώρα Βόρειας Αμερικής", "WESZ": "Θερινή ώρα Δυτικής Ευρώπης", "MEZ": "Χειμερινή ώρα Κεντρικής Ευρώπης", "SAST": "Χειμερινή ώρα Νότιας Αφρικής", "AKST": "Χειμερινή ώρα Αλάσκας", "BT": "Ώρα Μπουτάν", "ACWDT": "Θερινή ώρα Κεντροδυτικής Αυστραλίας", "ACDT": "Θερινή ώρα Κεντρικής Αυστραλίας", "WAST": "Θερινή ώρα Δυτικής Αφρικής", "OESZ": "Θερινή ώρα Ανατολικής Ευρώπης", "COT": "Χειμερινή ώρα Κολομβίας", "HEPMX": "Θερινή ώρα Ειρηνικού Μεξικού", "CHADT": "Θερινή ώρα Τσάθαμ", "HNEG": "Χειμερινή ώρα Ανατολικής Γροιλανδίας", "ECT": "Ώρα Εκουαδόρ", "MYT": "Ώρα Μαλαισίας", "AWST": "Χειμερινή ώρα Δυτικής Αυστραλίας", "IST": "Ώρα Ινδίας", "LHDT": "Θερινή ώρα Λορντ Χάου", "CHAST": "Χειμερινή ώρα Τσάθαμ", "JST": "Χειμερινή ώρα Ιαπωνίας", "SRT": "Ώρα Σουρινάμ", "WEZ": "Χειμερινή ώρα Δυτικής Ευρώπης", "ACWST": "Χειμερινή ώρα Κεντροδυτικής Αυστραλίας", "HEOG": "Θερινή ώρα Δυτικής Γροιλανδίας", "WITA": "Ώρα Κεντρικής Ινδονησίας", "BOT": "Ώρα Βολιβίας", "HEEG": "Θερινή ώρα Ανατολικής Γροιλανδίας", "ADT": "Θερινή ώρα Ατλαντικού", "ART": "Χειμερινή ώρα Αργεντινής", "HNPM": "Χειμερινή ώρα Σαιντ Πιερ και Μικελόν", "MESZ": "Θερινή ώρα Κεντρικής Ευρώπης", "OEZ": "Χειμερινή ώρα Ανατολικής Ευρώπης", "NZST": "Χειμερινή ώρα Νέας Ζηλανδίας", "JDT": "Θερινή ώρα Ιαπωνίας"}, -+ timezones: map[string]string{"COST": "Θερινή ώρα Κολομβίας", "CLT": "Χειμερινή ώρα Χιλής", "MST": "Χειμερινή ώρα Μακάο", "BOT": "Ώρα Βολιβίας", "ACWST": "Χειμερινή ώρα Κεντροδυτικής Αυστραλίας", "COT": "Χειμερινή ώρα Κολομβίας", "WEZ": "Χειμερινή ώρα Δυτικής Ευρώπης", "WAT": "Χειμερινή ώρα Δυτικής Αφρικής", "OESZ": "Θερινή ώρα Ανατολικής Ευρώπης", "HNOG": "Χειμερινή ώρα Δυτικής Γροιλανδίας", "HKST": "Θερινή ώρα Χονγκ Κονγκ", "CLST": "Θερινή ώρα Χιλής", "PDT": "Θερινή ώρα Βόρειας Αμερικής", "ACWDT": "Θερινή ώρα Κεντροδυτικής Αυστραλίας", "MESZ": "Θερινή ώρα Κεντρικής Ευρώπης", "CST": "Κεντρική χειμερινή ώρα Βόρειας Αμερικής", "EAT": "Ώρα Ανατολικής Αφρικής", "HNPM": "Χειμερινή ώρα Σαιντ Πιερ και Μικελόν", "HECU": "Θερινή ώρα Κούβας", "ART": "Χειμερινή ώρα Αργεντινής", "HAT": "Θερινή ώρα Νέας Γης", "ACST": "Χειμερινή ώρα Κεντρικής Αυστραλίας", "LHDT": "Θερινή ώρα Λορντ Χάου", "CHADT": "Θερινή ώρα Τσάθαμ", "WART": "Χειμερινή ώρα Δυτικής Αργεντινής", "TMT": "Χειμερινή ώρα Τουρκμενιστάν", "EST": "Ανατολική χειμερινή ώρα Βόρειας Αμερικής", "NZDT": "Θερινή ώρα Νέας Ζηλανδίας", "ChST": "Ώρα Τσαμόρο", "MEZ": "Χειμερινή ώρα Κεντρικής Ευρώπης", "AKDT": "Θερινή ώρα Αλάσκας", "HNT": "Χειμερινή ώρα Νέας Γης", "AST": "Χειμερινή ώρα Ατλαντικού", "LHST": "Χειμερινή ώρα Λορντ Χάου", "VET": "Ώρα Βενεζουέλας", "HNCU": "Χειμερινή ώρα Κούβας", "WIT": "Ώρα Ανατολικής Ινδονησίας", "GMT": "Μέση ώρα Γκρίνουιτς", "AEST": "Χειμερινή ώρα Ανατολικής Αυστραλίας", "∅∅∅": "∅∅∅", "CAT": "Ώρα Κεντρικής Αφρικής", "UYT": "Χειμερινή ώρα Ουρουγουάης", "HEOG": "Θερινή ώρα Δυτικής Γροιλανδίας", "EDT": "Ανατολική θερινή ώρα Βόρειας Αμερικής", "ECT": "Ώρα Εκουαδόρ", "ARST": "Θερινή ώρα Αργεντινής", "BT": "Ώρα Μπουτάν", "IST": "Ώρα Ινδίας", "HEPMX": "Θερινή ώρα Ειρηνικού Μεξικού", "AKST": "Χειμερινή ώρα Αλάσκας", "HKT": "Χειμερινή ώρα Χονγκ Κονγκ", "TMST": "Θερινή ώρα Τουρκμενιστάν", "CDT": "Κεντρική θερινή ώρα Βόρειας Αμερικής", "ADT": "Θερινή ώρα Ατλαντικού", "UYST": "Θερινή ώρα Ουρουγουάης", "HNPMX": "Χειμερινή ώρα Ειρηνικού Μεξικού", "HADT": "Θερινή ώρα Χαβάης-Αλεούτιων νήσων", "CHAST": "Χειμερινή ώρα Τσάθαμ", "MDT": "Θερινή ώρα Μακάο", "WAST": "Θερινή ώρα Δυτικής Αφρικής", "ACDT": "Θερινή ώρα Κεντρικής Αυστραλίας", "SAST": "Χειμερινή ώρα Νότιας Αφρικής", "SRT": "Ώρα Σουρινάμ", "HEPM": "Θερινή ώρα Σαιντ Πιερ και Μικελόν", "GFT": "Ώρα Γαλλικής Γουιάνας", "GYT": "Ώρα Γουιάνας", "WITA": "Ώρα Κεντρικής Ινδονησίας", "HEEG": "Θερινή ώρα Ανατολικής Γροιλανδίας", "HENOMX": "Θερινή ώρα Βορειοδυτικού Μεξικού", "MYT": "Ώρα Μαλαισίας", "JDT": "Θερινή ώρα Ιαπωνίας", "AWDT": "Θερινή ώρα Δυτικής Αυστραλίας", "WESZ": "Θερινή ώρα Δυτικής Ευρώπης", "WARST": "Θερινή ώρα Δυτικής Αργεντινής", "OEZ": "Χειμερινή ώρα Ανατολικής Ευρώπης", "NZST": "Χειμερινή ώρα Νέας Ζηλανδίας", "HNNOMX": "Χειμερινή ώρα Βορειοδυτικού Μεξικού", "JST": "Χειμερινή ώρα Ιαπωνίας", "AEDT": "Θερινή ώρα Ανατολικής Αυστραλίας", "SGT": "Ώρα Σιγκαπούρης", "HAST": "Χειμερινή ώρα Χαβάης-Αλεούτιων νήσων", "HNEG": "Χειμερινή ώρα Ανατολικής Γροιλανδίας", "AWST": "Χειμερινή ώρα Δυτικής Αυστραλίας", "PST": "Χειμερινή ώρα Βόρειας Αμερικής", "WIB": "Ώρα Δυτικής Ινδονησίας"}, - } - } -  -diff --git a/el_CY/el_CY.go b/el_CY/el_CY.go -index 88ce682..3022b5b 100644 ---- a/el_CY/el_CY.go -+++ b/el_CY/el_CY.go -@@ -10,70 +10,45 @@ import ( - ) -  - type el_CY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'el_CY' locale - func New() locales.Translator { - return &el_CY{ -- locale: "el_CY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "Ιαν", "Φεβ", "Μαρ", "Απρ", "Μαΐ", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"}, -- monthsNarrow: []string{"", "Ι", "Φ", "Μ", "Α", "Μ", "Ι", "Ι", "Α", "Σ", "Ο", "Ν", "Δ"}, -- monthsWide: []string{"", "Ιανουαρίου", "Φεβρουαρίου", "Μαρτίου", "Απριλίου", "Μαΐου", "Ιουνίου", "Ιουλίου", "Αυγούστου", "Σεπτεμβρίου", "Οκτωβρίου", "Νοεμβρίου", "Δεκεμβρίου"}, -- daysAbbreviated: []string{"Κυρ", "Δευ", "Τρί", "Τετ", "Πέμ", "Παρ", "Σάβ"}, -- daysNarrow: []string{"Κ", "Δ", "Τ", "Τ", "Π", "Π", "Σ"}, -- daysShort: []string{"Κυ", "Δε", "Τρ", "Τε", "Πέ", "Πα", "Σά"}, -- daysWide: []string{"Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"}, -- periodsAbbreviated: []string{"π.μ.", "μ.μ."}, -- periodsNarrow: []string{"πμ", "μμ"}, -- periodsWide: []string{"π.μ.", "μ.μ."}, -- erasAbbreviated: []string{"π.Χ.", "μ.Χ."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"προ Χριστού", "μετά Χριστόν"}, -- timezones: map[string]string{"WAT": "Χειμερινή ώρα Δυτικής Αφρικής", "CDT": "Κεντρική θερινή ώρα Βόρειας Αμερικής", "HEOG": "Θερινή ώρα Δυτικής Γροιλανδίας", "AEST": "Χειμερινή ώρα Ανατολικής Αυστραλίας", "NZST": "Χειμερινή ώρα Νέας Ζηλανδίας", "NZDT": "Θερινή ώρα Νέας Ζηλανδίας", "WARST": "Θερινή ώρα Δυτικής Αργεντινής", "PDT": "Θερινή ώρα Βόρειας Αμερικής", "ACWDT": "Θερινή ώρα Κεντροδυτικής Αυστραλίας", "HNPM": "Χειμερινή ώρα Σαιντ Πιερ και Μικελόν", "ChST": "Ώρα Τσαμόρο", "MEZ": "Χειμερινή ώρα Κεντρικής Ευρώπης", "WART": "Χειμερινή ώρα Δυτικής Αργεντινής", "UYST": "Θερινή ώρα Ουρουγουάης", "CST": "Κεντρική χειμερινή ώρα Βόρειας Αμερικής", "WIB": "Ώρα Δυτικής Ινδονησίας", "AEDT": "Θερινή ώρα Ανατολικής Αυστραλίας", "HNPMX": "Χειμερινή ώρα Ειρηνικού Μεξικού", "HAST": "Χειμερινή ώρα Χαβάης-Αλεούτιων νήσων", "BT": "Ώρα Μπουτάν", "AWDT": "Θερινή ώρα Δυτικής Αυστραλίας", "HKST": "Θερινή ώρα Χονγκ Κονγκ", "HADT": "Θερινή ώρα Χαβάης-Αλεούτιων νήσων", "SRT": "Ώρα Σουρινάμ", "HNOG": "Χειμερινή ώρα Δυτικής Γροιλανδίας", "ARST": "Θερινή ώρα Αργεντινής", "AWST": "Χειμερινή ώρα Δυτικής Αυστραλίας", "CLT": "Χειμερινή ώρα Χιλής", "HNEG": "Χειμερινή ώρα Ανατολικής Γροιλανδίας", "WAST": "Θερινή ώρα Δυτικής Αφρικής", "∅∅∅": "Θερινή ώρα Αζορών", "MYT": "Ώρα Μαλαισίας", "ADT": "Θερινή ώρα Ατλαντικού", "HNT": "Χειμερινή ώρα Νέας Γης", "HKT": "Χειμερινή ώρα Χονγκ Κονγκ", "COT": "Χειμερινή ώρα Κολομβίας", "SGT": "Ώρα Σιγκαπούρης", "EDT": "Ανατολική θερινή ώρα Βόρειας Αμερικής", "BOT": "Ώρα Βολιβίας", "GYT": "Ώρα Γουιάνας", "WESZ": "Θερινή ώρα Δυτικής Ευρώπης", "GFT": "Ώρα Γαλλικής Γουιάνας", "MST": "Χειμερινή ώρα Μακάο", "AST": "Χειμερινή ώρα Ατλαντικού", "LHST": "Χειμερινή ώρα Λορντ Χάου", "IST": "Ώρα Ινδίας", "LHDT": "Θερινή ώρα Λορντ Χάου", "TMT": "Χειμερινή ώρα Τουρκμενιστάν", "EAT": "Ώρα Ανατολικής Αφρικής", "UYT": "Χειμερινή ώρα Ουρουγουάης", "AKDT": "Θερινή ώρα Αλάσκας", "ACWST": "Χειμερινή ώρα Κεντροδυτικής Αυστραλίας", "ART": "Χειμερινή ώρα Αργεντινής", "HEPM": "Θερινή ώρα Σαιντ Πιερ και Μικελόν", "COST": "Θερινή ώρα Κολομβίας", "VET": "Ώρα Βενεζουέλας", "HEEG": "Θερινή ώρα Ανατολικής Γροιλανδίας", "TMST": "Θερινή ώρα Τουρκμενιστάν", "HEPMX": "Θερινή ώρα Ειρηνικού Μεξικού", "CLST": "Θερινή ώρα Χιλής", "ACDT": "Θερινή ώρα Κεντρικής Αυστραλίας", "HENOMX": "Θερινή ώρα Βορειοδυτικού Μεξικού", "GMT": "Μέση ώρα Γκρίνουιτς", "WEZ": "Χειμερινή ώρα Δυτικής Ευρώπης", "CHAST": "Χειμερινή ώρα Τσάθαμ", "JDT": "Θερινή ώρα Ιαπωνίας", "CAT": "Ώρα Κεντρικής Αφρικής", "OEZ": "Χειμερινή ώρα Ανατολικής Ευρώπης", "ECT": "Ώρα Εκουαδόρ", "MDT": "Θερινή ώρα Μακάο", "WIT": "Ώρα Ανατολικής Ινδονησίας", "PST": "Χειμερινή ώρα Βόρειας Αμερικής", "CHADT": "Θερινή ώρα Τσάθαμ", "JST": "Χειμερινή ώρα Ιαπωνίας", "AKST": "Χειμερινή ώρα Αλάσκας", "MESZ": "Θερινή ώρα Κεντρικής Ευρώπης", "SAST": "Χειμερινή ώρα Νότιας Αφρικής", "ACST": "Χειμερινή ώρα Κεντρικής Αυστραλίας", "WITA": "Ώρα Κεντρικής Ινδονησίας", "OESZ": "Θερινή ώρα Ανατολικής Ευρώπης", "HNNOMX": "Χειμερινή ώρα Βορειοδυτικού Μεξικού", "HNCU": "Χειμερινή ώρα Κούβας", "HECU": "Θερινή ώρα Κούβας", "EST": "Ανατολική χειμερινή ώρα Βόρειας Αμερικής", "HAT": "Θερινή ώρα Νέας Γης"}, -+ locale: "el_CY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "HADT": "HADT", "IST": "IST", "WESZ": "WESZ", "MST": "MST", "AEDT": "AEDT", "AKDT": "AKDT", "HAT": "HAT", "HKT": "HKT", "MESZ": "MESZ", "AKST": "AKST", "HNT": "HNT", "COT": "COT", "WITA": "WITA", "ECT": "ECT", "BOT": "BOT", "HENOMX": "HENOMX", "WART": "WART", "CDT": "CDT", "MYT": "MYT", "LHST": "LHST", "HNPMX": "HNPMX", "WAT": "WAT", "HAST": "HAST", "HNEG": "HNEG", "AWST": "AWST", "WEZ": "WEZ", "WARST": "WARST", "ART": "ART", "HNPM": "HNPM", "OEZ": "OEZ", "AEST": "AEST", "CHAST": "CHAST", "CHADT": "CHADT", "WIB": "WIB", "AST": "AST", "ADT": "ADT", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "HEPMX": "HEPMX", "ACDT": "ACDT", "VET": "VET", "HNCU": "HNCU", "WIT": "WIT", "SAST": "SAST", "CAT": "CAT", "NZDT": "NZDT", "CST": "CST", "ChST": "ChST", "JDT": "JDT", "EDT": "EDT", "MEZ": "MEZ", "AWDT": "AWDT", "HECU": "HECU", "HNOG": "HNOG", "EST": "EST", "TMST": "TMST", "SRT": "SRT", "ACWDT": "ACWDT", "UYT": "UYT", "GFT": "GFT", "COST": "COST", "OESZ": "OESZ", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "ARST": "ARST", "GMT": "GMT", "LHDT": "LHDT", "WAST": "WAST", "HKST": "HKST", "MDT": "MDT", "HEEG": "HEEG", "HEPM": "HEPM", "BT": "BT", "GYT": "GYT", "PDT": "PDT", "TMT": "TMT", "NZST": "NZST", "EAT": "EAT", "ACST": "ACST", "UYST": "UYST", "PST": "PST", "CLT": "CLT", "JST": "JST", "SGT": "SGT"}, - } - } -  -@@ -137,7 +112,7 @@ func (el *el_CY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (el *el_CY) MonthsAbbreviated() []string { -- return el.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +122,7 @@ func (el *el_CY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (el *el_CY) MonthsNarrow() []string { -- return el.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +132,7 @@ func (el *el_CY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (el *el_CY) MonthsWide() []string { -- return el.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +178,13 @@ func (el *el_CY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'el_CY' and handles both Whole and Real numbers based on 'v' - func (el *el_CY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, el.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, el.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'el_CY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (el *el_CY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, el.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, el.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'el_CY' -@@ -277,56 +192,7 @@ func (el *el_CY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := el.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, el.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, el.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, el.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, el.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'el_CY' -@@ -335,63 +201,7 @@ func (el *el_CY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := el.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, el.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, el.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, el.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, el.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, el.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'el_CY' -@@ -399,17 +209,6 @@ func (el *el_CY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -418,17 +217,6 @@ func (el *el_CY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, el.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,17 +225,6 @@ func (el *el_CY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, el.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,19 +233,6 @@ func (el *el_CY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, el.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, el.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,28 +241,6 @@ func (el *el_CY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -507,35 +249,6 @@ func (el *el_CY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -544,40 +257,6 @@ func (el *el_CY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,44 +265,5 @@ func (el *el_CY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := el.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/el_GR/el_GR.go b/el_GR/el_GR.go -index 6a26471..8aeef9d 100644 ---- a/el_GR/el_GR.go -+++ b/el_GR/el_GR.go -@@ -10,70 +10,45 @@ import ( - ) -  - type el_GR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'el_GR' locale - func New() locales.Translator { - return &el_GR{ -- locale: "el_GR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "Ιαν", "Φεβ", "Μαρ", "Απρ", "Μαΐ", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"}, -- monthsNarrow: []string{"", "Ι", "Φ", "Μ", "Α", "Μ", "Ι", "Ι", "Α", "Σ", "Ο", "Ν", "Δ"}, -- monthsWide: []string{"", "Ιανουαρίου", "Φεβρουαρίου", "Μαρτίου", "Απριλίου", "Μαΐου", "Ιουνίου", "Ιουλίου", "Αυγούστου", "Σεπτεμβρίου", "Οκτωβρίου", "Νοεμβρίου", "Δεκεμβρίου"}, -- daysAbbreviated: []string{"Κυρ", "Δευ", "Τρί", "Τετ", "Πέμ", "Παρ", "Σάβ"}, -- daysNarrow: []string{"Κ", "Δ", "Τ", "Τ", "Π", "Π", "Σ"}, -- daysShort: []string{"Κυ", "Δε", "Τρ", "Τε", "Πέ", "Πα", "Σά"}, -- daysWide: []string{"Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"}, -- periodsAbbreviated: []string{"π.μ.", "μ.μ."}, -- periodsNarrow: []string{"πμ", "μμ"}, -- periodsWide: []string{"π.μ.", "μ.μ."}, -- erasAbbreviated: []string{"π.Χ.", "μ.Χ."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"προ Χριστού", "μετά Χριστόν"}, -- timezones: map[string]string{"WARST": "Θερινή ώρα Δυτικής Αργεντινής", "HKST": "Θερινή ώρα Χονγκ Κονγκ", "OESZ": "Θερινή ώρα Ανατολικής Ευρώπης", "SGT": "Ώρα Σιγκαπούρης", "JST": "Χειμερινή ώρα Ιαπωνίας", "BOT": "Ώρα Βολιβίας", "COT": "Χειμερινή ώρα Κολομβίας", "GYT": "Ώρα Γουιάνας", "UYT": "Χειμερινή ώρα Ουρουγουάης", "MESZ": "Θερινή ώρα Κεντρικής Ευρώπης", "NZDT": "Θερινή ώρα Νέας Ζηλανδίας", "WART": "Χειμερινή ώρα Δυτικής Αργεντινής", "COST": "Θερινή ώρα Κολομβίας", "ARST": "Θερινή ώρα Αργεντινής", "PST": "Χειμερινή ώρα Βόρειας Αμερικής", "AEST": "Χειμερινή ώρα Ανατολικής Αυστραλίας", "HKT": "Χειμερινή ώρα Χονγκ Κονγκ", "HEPM": "Θερινή ώρα Σαιντ Πιερ και Μικελόν", "MEZ": "Χειμερινή ώρα Κεντρικής Ευρώπης", "∅∅∅": "Θερινή ώρα Περού", "HEEG": "Θερινή ώρα Ανατολικής Γροιλανδίας", "AKDT": "Θερινή ώρα Αλάσκας", "CDT": "Κεντρική θερινή ώρα Βόρειας Αμερικής", "ART": "Χειμερινή ώρα Αργεντινής", "AWDT": "Θερινή ώρα Δυτικής Αυστραλίας", "HNPMX": "Χειμερινή ώρα Ειρηνικού Μεξικού", "WIT": "Ώρα Ανατολικής Ινδονησίας", "HNPM": "Χειμερινή ώρα Σαιντ Πιερ και Μικελόν", "CLST": "Θερινή ώρα Χιλής", "VET": "Ώρα Βενεζουέλας", "WIB": "Ώρα Δυτικής Ινδονησίας", "HADT": "Θερινή ώρα Χαβάης-Αλεούτιων νήσων", "BT": "Ώρα Μπουτάν", "HNT": "Χειμερινή ώρα Νέας Γης", "GFT": "Ώρα Γαλλικής Γουιάνας", "CAT": "Ώρα Κεντρικής Αφρικής", "SRT": "Ώρα Σουρινάμ", "HEOG": "Θερινή ώρα Δυτικής Γροιλανδίας", "NZST": "Χειμερινή ώρα Νέας Ζηλανδίας", "HNEG": "Χειμερινή ώρα Ανατολικής Γροιλανδίας", "ACDT": "Θερινή ώρα Κεντρικής Αυστραλίας", "HNNOMX": "Χειμερινή ώρα Βορειοδυτικού Μεξικού", "OEZ": "Χειμερινή ώρα Ανατολικής Ευρώπης", "UYST": "Θερινή ώρα Ουρουγουάης", "WESZ": "Θερινή ώρα Δυτικής Ευρώπης", "SAST": "Χειμερινή ώρα Νότιας Αφρικής", "IST": "Ώρα Ινδίας", "EAT": "Ώρα Ανατολικής Αφρικής", "HAST": "Χειμερινή ώρα Χαβάης-Αλεούτιων νήσων", "PDT": "Θερινή ώρα Βόρειας Αμερικής", "AWST": "Χειμερινή ώρα Δυτικής Αυστραλίας", "CHADT": "Θερινή ώρα Τσάθαμ", "TMT": "Χειμερινή ώρα Τουρκμενιστάν", "AST": "Χειμερινή ώρα Ατλαντικού", "HNCU": "Χειμερινή ώρα Κούβας", "ADT": "Θερινή ώρα Ατλαντικού", "AKST": "Χειμερινή ώρα Αλάσκας", "LHST": "Χειμερινή ώρα Λορντ Χάου", "WAST": "Θερινή ώρα Δυτικής Αφρικής", "EST": "Ανατολική χειμερινή ώρα Βόρειας Αμερικής", "EDT": "Ανατολική θερινή ώρα Βόρειας Αμερικής", "HEPMX": "Θερινή ώρα Ειρηνικού Μεξικού", "CST": "Κεντρική χειμερινή ώρα Βόρειας Αμερικής", "ACWDT": "Θερινή ώρα Κεντροδυτικής Αυστραλίας", "TMST": "Θερινή ώρα Τουρκμενιστάν", "ChST": "Ώρα Τσαμόρο", "WAT": "Χειμερινή ώρα Δυτικής Αφρικής", "MYT": "Ώρα Μαλαισίας", "CHAST": "Χειμερινή ώρα Τσάθαμ", "JDT": "Θερινή ώρα Ιαπωνίας", "ACST": "Χειμερινή ώρα Κεντρικής Αυστραλίας", "HENOMX": "Θερινή ώρα Βορειοδυτικού Μεξικού", "GMT": "Μέση ώρα Γκρίνουιτς", "MDT": "Θερινή ώρα Μακάο", "AEDT": "Θερινή ώρα Ανατολικής Αυστραλίας", "WITA": "Ώρα Κεντρικής Ινδονησίας", "CLT": "Χειμερινή ώρα Χιλής", "ECT": "Ώρα Εκουαδόρ", "WEZ": "Χειμερινή ώρα Δυτικής Ευρώπης", "HAT": "Θερινή ώρα Νέας Γης", "LHDT": "Θερινή ώρα Λορντ Χάου", "MST": "Χειμερινή ώρα Μακάο", "HNOG": "Χειμερινή ώρα Δυτικής Γροιλανδίας", "ACWST": "Χειμερινή ώρα Κεντροδυτικής Αυστραλίας", "HECU": "Θερινή ώρα Κούβας"}, -+ locale: "el_GR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKST": "AKST", "HAT": "HAT", "GYT": "GYT", "TMT": "TMT", "BOT": "BOT", "UYST": "UYST", "WAT": "WAT", "MST": "MST", "WIB": "WIB", "HADT": "HADT", "HEEG": "HEEG", "MYT": "MYT", "AEDT": "AEDT", "WART": "WART", "HEOG": "HEOG", "LHST": "LHST", "HEPM": "HEPM", "SGT": "SGT", "HEPMX": "HEPMX", "HNT": "HNT", "AKDT": "AKDT", "CDT": "CDT", "NZST": "NZST", "ECT": "ECT", "AWST": "AWST", "IST": "IST", "ACWDT": "ACWDT", "WESZ": "WESZ", "EDT": "EDT", "CLST": "CLST", "MDT": "MDT", "GMT": "GMT", "ACDT": "ACDT", "HNCU": "HNCU", "COST": "COST", "WITA": "WITA", "HNEG": "HNEG", "HECU": "HECU", "WARST": "WARST", "HNOG": "HNOG", "WIT": "WIT", "COT": "COT", "CLT": "CLT", "LHDT": "LHDT", "WAST": "WAST", "GFT": "GFT", "ART": "ART", "PST": "PST", "PDT": "PDT", "BT": "BT", "CHAST": "CHAST", "VET": "VET", "OEZ": "OEZ", "ChST": "ChST", "HNNOMX": "HNNOMX", "JST": "JST", "UYT": "UYT", "HNPMX": "HNPMX", "MEZ": "MEZ", "MESZ": "MESZ", "AEST": "AEST", "WEZ": "WEZ", "OESZ": "OESZ", "SAST": "SAST", "ADT": "ADT", "ARST": "ARST", "EAT": "EAT", "HENOMX": "HENOMX", "HNPM": "HNPM", "CHADT": "CHADT", "HKST": "HKST", "AST": "AST", "ACST": "ACST", "AWDT": "AWDT", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "HKT": "HKT", "TMST": "TMST", "CST": "CST", "NZDT": "NZDT", "SRT": "SRT", "HAST": "HAST", "JDT": "JDT", "EST": "EST", "CAT": "CAT"}, - } - } -  -@@ -137,7 +112,7 @@ func (el *el_GR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (el *el_GR) MonthsAbbreviated() []string { -- return el.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +122,7 @@ func (el *el_GR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (el *el_GR) MonthsNarrow() []string { -- return el.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +132,7 @@ func (el *el_GR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (el *el_GR) MonthsWide() []string { -- return el.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +178,13 @@ func (el *el_GR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'el_GR' and handles both Whole and Real numbers based on 'v' - func (el *el_GR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, el.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, el.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'el_GR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (el *el_GR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, el.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, el.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'el_GR' -@@ -277,56 +192,7 @@ func (el *el_GR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := el.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, el.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, el.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, el.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, el.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'el_GR' -@@ -335,63 +201,7 @@ func (el *el_GR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := el.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, el.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, el.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, el.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, el.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, el.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, el.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'el_GR' -@@ -399,17 +209,6 @@ func (el *el_GR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -418,17 +217,6 @@ func (el *el_GR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, el.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,17 +225,6 @@ func (el *el_GR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, el.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,19 +233,6 @@ func (el *el_GR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, el.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, el.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,28 +241,6 @@ func (el *el_GR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -507,35 +249,6 @@ func (el *el_GR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -544,40 +257,6 @@ func (el *el_GR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,44 +265,5 @@ func (el *el_GR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, el.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, el.periodsAbbreviated[0]...) -- } else { -- b = append(b, el.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := el.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en/en.go b/en/en.go -index 035677a..aec40b9 100644 ---- a/en/en.go -+++ b/en/en.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"B", "A"}, - erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"SRT": "Suriname Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "WAST": "West Africa Summer Time", "WART": "Western Argentina Standard Time", "BT": "Bhutan Time", "HEOG": "West Greenland Summer Time", "ACWST": "Australian Central Western Standard Time", "JDT": "Japan Daylight Time", "TMST": "Turkmenistan Summer Time", "HEEG": "East Greenland Summer Time", "MYT": "Malaysia Time", "HAST": "Hawaii-Aleutian Standard Time", "PST": "Pacific Standard Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "JST": "Japan Standard Time", "CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "MST": "Mountain Standard Time", "OESZ": "Eastern European Summer Time", "SGT": "Singapore Standard Time", "ACDT": "Australian Central Daylight Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EDT": "Eastern Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "HKT": "Hong Kong Standard Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "UYST": "Uruguay Summer Time", "MDT": "Mountain Daylight Time", "ACST": "Australian Central Standard Time", "GMT": "Greenwich Mean Time", "AKDT": "Alaska Daylight Time", "VET": "Venezuela Time", "AWDT": "Australian Western Daylight Time", "CLT": "Chile Standard Time", "BOT": "Bolivia Time", "EAT": "East Africa Time", "WAT": "West Africa Standard Time", "HAT": "Newfoundland Daylight Time", "ChST": "Chamorro Standard Time", "ADT": "Atlantic Daylight Time", "CDT": "Central Daylight Time", "LHST": "Lord Howe Standard Time", "MEZ": "Central European Standard Time", "WEZ": "Western European Standard Time", "CHAST": "Chatham Standard Time", "∅∅∅": "Amazon Summer Time", "GFT": "French Guiana Time", "EST": "Eastern Standard Time", "UYT": "Uruguay Standard Time", "AKST": "Alaska Standard Time", "WIB": "Western Indonesia Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "WITA": "Central Indonesia Time", "ARST": "Argentina Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SAST": "South Africa Standard Time", "WIT": "Eastern Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "OEZ": "Eastern European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "AST": "Atlantic Standard Time", "WESZ": "Western European Summer Time", "HKST": "Hong Kong Summer Time", "MESZ": "Central European Summer Time", "HNPMX": "Mexican Pacific Standard Time", "HNOG": "West Greenland Standard Time", "PDT": "Pacific Daylight Time", "GYT": "Guyana Time", "HADT": "Hawaii-Aleutian Daylight Time", "NZST": "New Zealand Standard Time", "CHADT": "Chatham Daylight Time", "TMT": "Turkmenistan Standard Time", "ECT": "Ecuador Time", "LHDT": "Lord Howe Daylight Time"}, -+ timezones: map[string]string{"ACST": "Australian Central Standard Time", "AWST": "Australian Western Standard Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "HNT": "Newfoundland Standard Time", "MDT": "Macau Summer Time", "ChST": "Chamorro Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "BT": "Bhutan Time", "ACWDT": "Australian Central Western Daylight Time", "MST": "Macau Standard Time", "ECT": "Ecuador Time", "WIB": "Western Indonesia Time", "MEZ": "Central European Standard Time", "HNEG": "East Greenland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "PST": "Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "SAST": "South Africa Standard Time", "CAT": "Central Africa Time", "LHST": "Lord Howe Standard Time", "HNPMX": "Mexican Pacific Standard Time", "WIT": "Eastern Indonesia Time", "GYT": "Guyana Time", "HKT": "Hong Kong Standard Time", "CDT": "Central Daylight Time", "PDT": "Pacific Daylight Time", "GFT": "French Guiana Time", "HEOG": "West Greenland Summer Time", "∅∅∅": "Brasilia Summer Time", "EST": "Eastern Standard Time", "CLT": "Chile Standard Time", "GMT": "Greenwich Mean Time", "SRT": "Suriname Time", "HEEG": "East Greenland Summer Time", "UYT": "Uruguay Standard Time", "HKST": "Hong Kong Summer Time", "MYT": "Malaysia Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "HNOG": "West Greenland Standard Time", "ARST": "Argentina Summer Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "VET": "Venezuela Time", "CLST": "Chile Summer Time", "JDT": "Japan Daylight Time", "WESZ": "Western European Summer Time", "HAT": "Newfoundland Daylight Time", "TMT": "Turkmenistan Standard Time", "EAT": "East Africa Time", "LHDT": "Lord Howe Daylight Time", "JST": "Japan Standard Time", "IST": "India Standard Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "HECU": "Cuba Daylight Time", "AKST": "Alaska Standard Time", "AWDT": "Australian Western Daylight Time", "WAT": "West Africa Standard Time", "TMST": "Turkmenistan Summer Time", "CST": "Central Standard Time", "CHADT": "Chatham Daylight Time", "WEZ": "Western European Standard Time", "WAST": "West Africa Summer Time", "WARST": "Western Argentina Summer Time", "NZST": "New Zealand Standard Time", "AST": "Atlantic Standard Time", "BOT": "Bolivia Time", "MESZ": "Central European Summer Time", "WITA": "Central Indonesia Time", "NZDT": "New Zealand Daylight Time", "ART": "Argentina Standard Time", "ACDT": "Australian Central Daylight Time", "CHAST": "Chatham Standard Time", "SGT": "Singapore Standard Time"}, - } - } -  -diff --git a/en_001/en_001.go b/en_001/en_001.go -index 27884a8..5419bbf 100644 ---- a/en_001/en_001.go -+++ b/en_001/en_001.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_001 struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_001' locale - func New() locales.Translator { - return &en_001{ -- locale: "en_001", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JP¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GFT": "French Guiana Time", "MST": "Macau Standard Time", "ADT": "Atlantic Daylight Time", "UYST": "Uruguay Summer Time", "WIB": "Western Indonesia Time", "SAST": "South Africa Standard Time", "UYT": "Uruguay Standard Time", "AKST": "Alaska Standard Time", "IST": "India Standard Time", "CDT": "Central Daylight Time", "SRT": "Suriname Time", "MEZ": "Central European Standard Time", "MESZ": "Central European Summer Time", "JDT": "Japan Daylight Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "HEEG": "East Greenland Summer Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "HEOG": "West Greenland Summer Time", "ACWST": "Australian Central Western Standard Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "CHADT": "Chatham Daylight Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "ARST": "Argentina Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "JST": "Japan Standard Time", "WAT": "West Africa Standard Time", "EDT": "Eastern Daylight Time", "VET": "Venezuela Time", "HNEG": "East Greenland Standard Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "BT": "Bhutan Time", "HKT": "Hong Kong Standard Time", "WART": "Western Argentina Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WEZ": "Western European Standard Time", "GYT": "Guyana Time", "WIT": "Eastern Indonesia Time", "HKST": "Hong Kong Summer Time", "CHAST": "Chatham Standard Time", "ChST": "Chamorro Standard Time", "BOT": "Bolivia Time", "WAST": "West Africa Summer Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "CLST": "Chile Summer Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "GMT": "Greenwich Mean Time", "MDT": "Macau Summer Time", "CST": "Central Standard Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "PDT": "Pacific Daylight Time", "TMT": "Turkmenistan Standard Time", "NZST": "New Zealand Standard Time", "∅∅∅": "Peru Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "PST": "Pacific Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLT": "Chile Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "LHST": "Lord Howe Standard Time", "ECT": "Ecuador Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "HNT": "Newfoundland Standard Time", "HNOG": "West Greenland Standard Time", "WESZ": "Western European Summer Time", "WITA": "Central Indonesia Time", "AWDT": "Australian Western Daylight Time"}, -+ locale: "en_001", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JP¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "UYT": "UYT", "HAT": "HAT", "JST": "JST", "AWDT": "AWDT", "PST": "PST", "ACWDT": "ACWDT", "CAT": "CAT", "WIB": "WIB", "ACST": "ACST", "LHST": "LHST", "BT": "BT", "HEEG": "HEEG", "WART": "WART", "GYT": "GYT", "TMT": "TMT", "PDT": "PDT", "UYST": "UYST", "HKT": "HKT", "EST": "EST", "ARST": "ARST", "EAT": "EAT", "IST": "IST", "HEPMX": "HEPMX", "MST": "MST", "HNEG": "HNEG", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "TMST": "TMST", "CLT": "CLT", "CHAST": "CHAST", "CHADT": "CHADT", "HECU": "HECU", "GFT": "GFT", "OEZ": "OEZ", "GMT": "GMT", "HAST": "HAST", "HEPM": "HEPM", "AWST": "AWST", "AEST": "AEST", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "HNPM": "HNPM", "ACWST": "ACWST", "AKDT": "AKDT", "COT": "COT", "HNT": "HNT", "COST": "COST", "HKST": "HKST", "CST": "CST", "ChST": "ChST", "LHDT": "LHDT", "WAT": "WAT", "WAST": "WAST", "EDT": "EDT", "HNOG": "HNOG", "AST": "AST", "SGT": "SGT", "AKST": "AKST", "HEOG": "HEOG", "MYT": "MYT", "VET": "VET", "WIT": "WIT", "CLST": "CLST", "ECT": "ECT", "SRT": "SRT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "JDT": "JDT", "AEDT": "AEDT", "NZST": "NZST", "NZDT": "NZDT", "CDT": "CDT", "ART": "ART", "HADT": "HADT", "HNCU": "HNCU", "WARST": "WARST", "SAST": "SAST", "WESZ": "WESZ", "MDT": "MDT", "ADT": "ADT", "BOT": "BOT", "MESZ": "MESZ", "WEZ": "WEZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_001) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_001) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_001) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_001) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_001) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_001) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_001) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_001' and handles both Whole and Real numbers based on 'v' - func (en *en_001) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_001' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_001) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_001' -@@ -278,56 +195,7 @@ func (en *en_001) FmtCurrency(num float64, v uint64, currency currency.Type) str -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_001' -@@ -336,68 +204,7 @@ func (en *en_001) FmtAccounting(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_001' -@@ -493,28 +300,6 @@ func (en *en_001) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -523,35 +308,6 @@ func (en *en_001) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -560,40 +316,6 @@ func (en *en_001) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,44 +324,5 @@ func (en *en_001) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_150/en_150.go b/en_150/en_150.go -index 2035504..53b1f06 100644 ---- a/en_150/en_150.go -+++ b/en_150/en_150.go -@@ -50,28 +50,11 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: " ", - currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEEG": "East Greenland Summer Time", "WAT": "West Africa Standard Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "AWST": "Australian Western Standard Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "SGT": "Singapore Standard Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "WIB": "Western Indonesia Time", "AEST": "Australian Eastern Standard Time", "NZST": "New Zealand Standard Time", "EAT": "East Africa Time", "HECU": "Cuba Daylight Time", "CHADT": "Chatham Daylight Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "MYT": "Malaysia Time", "CDT": "Central Daylight Time", "HKT": "Hong Kong Standard Time", "HKST": "Hong Kong Summer Time", "IST": "India Standard Time", "CLST": "Chile Summer Time", "TMST": "Turkmenistan Summer Time", "OESZ": "Eastern European Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "ADT": "Atlantic Daylight Time", "UYT": "Uruguay Standard Time", "AKST": "Alaska Standard Time", "VET": "Venezuela Time", "HEPMX": "Mexican Pacific Daylight Time", "SRT": "Suriname Time", "HNPM": "St. Pierre & Miquelon Standard Time", "WAST": "West Africa Summer Time", "COST": "Colombia Summer Time", "UYST": "Uruguay Summer Time", "MEZ": "Central European Standard Time", "BT": "Bhutan Time", "CHAST": "Chatham Standard Time", "LHDT": "Lord Howe Daylight Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "ARST": "Argentina Summer Time", "WESZ": "Western European Summer Time", "AEDT": "Australian Eastern Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MESZ": "Central European Summer Time", "WARST": "Western Argentina Summer Time", "CST": "Central Standard Time", "PST": "Pacific Standard Time", "HAT": "Newfoundland Daylight Time", "TMT": "Turkmenistan Standard Time", "ACDT": "Australian Central Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "PDT": "Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "WIT": "Eastern Indonesia Time", "WITA": "Central Indonesia Time", "NZDT": "New Zealand Daylight Time", "GFT": "French Guiana Time", "∅∅∅": "Peru Summer Time", "AST": "Atlantic Standard Time", "CLT": "Chile Standard Time", "ChST": "Chamorro Standard Time", "BOT": "Bolivia Time", "MST": "Macau Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "ACST": "Australian Central Standard Time", "ECT": "Ecuador Time", "ART": "Argentina Standard Time", "JST": "Japan Standard Time", "CAT": "Central Africa Time", "EST": "Eastern Standard Time", "HNPMX": "Mexican Pacific Standard Time", "GYT": "Guyana Time", "ACWDT": "Australian Central Western Daylight Time", "SAST": "South Africa Standard Time"}, -+ timezones: map[string]string{"MEZ": "MEZ", "PST": "PST", "ACWST": "ACWST", "CHAST": "CHAST", "WAT": "WAT", "WIT": "WIT", "CLST": "CLST", "ECT": "ECT", "JST": "JST", "IST": "IST", "VET": "VET", "WAST": "WAST", "GFT": "GFT", "EDT": "EDT", "HNEG": "HNEG", "HENOMX": "HENOMX", "OEZ": "OEZ", "HEOG": "HEOG", "EST": "EST", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "HEPMX": "HEPMX", "OESZ": "OESZ", "AST": "AST", "EAT": "EAT", "HAST": "HAST", "BOT": "BOT", "LHDT": "LHDT", "MYT": "MYT", "ACST": "ACST", "JDT": "JDT", "PDT": "PDT", "TMST": "TMST", "WITA": "WITA", "CST": "CST", "ChST": "ChST", "ART": "ART", "HNPM": "HNPM", "AEDT": "AEDT", "WART": "WART", "WARST": "WARST", "COT": "COT", "ADT": "ADT", "SGT": "SGT", "HNT": "HNT", "CDT": "CDT", "MDT": "MDT", "AWDT": "AWDT", "NZDT": "NZDT", "WIB": "WIB", "UYST": "UYST", "∅∅∅": "∅∅∅", "HAT": "HAT", "HNOG": "HNOG", "CLT": "CLT", "COST": "COST", "HKST": "HKST", "NZST": "NZST", "UYT": "UYT", "AWST": "AWST", "WEZ": "WEZ", "HNPMX": "HNPMX", "TMT": "TMT", "GMT": "GMT", "ARST": "ARST", "SRT": "SRT", "CHADT": "CHADT", "GYT": "GYT", "CAT": "CAT", "ACDT": "ACDT", "AEST": "AEST", "SAST": "SAST", "HKT": "HKT", "LHST": "LHST", "AKST": "AKST", "AKDT": "AKDT", "HADT": "HADT", "HEEG": "HEEG", "WESZ": "WESZ", "HNCU": "HNCU", "HECU": "HECU", "MST": "MST", "HEPM": "HEPM", "BT": "BT", "ACWDT": "ACWDT"}, - } - } -  -@@ -138,7 +121,7 @@ func (en *en_150) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_150) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +131,7 @@ func (en *en_150) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_150) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +141,7 @@ func (en *en_150) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_150) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +187,13 @@ func (en *en_150) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_150' and handles both Whole and Real numbers based on 'v' - func (en *en_150) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_150' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_150) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_150' -@@ -278,7 +201,7 @@ func (en *en_150) FmtCurrency(num float64, v uint64, currency currency.Type) str -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -336,7 +259,7 @@ func (en *en_150) FmtAccounting(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -400,17 +323,6 @@ func (en *en_150) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +331,6 @@ func (en *en_150) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,17 +339,6 @@ func (en *en_150) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,19 +347,6 @@ func (en *en_150) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_AG/en_AG.go b/en_AG/en_AG.go -index 5b14913..29ba0c5 100644 ---- a/en_AG/en_AG.go -+++ b/en_AG/en_AG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_AG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_AG' locale - func New() locales.Translator { - return &en_AG{ -- locale: "en_AG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"IST": "India Standard Time", "MDT": "Macau Summer Time", "ADT": "Atlantic Daylight Time", "AEST": "Australian Eastern Standard Time", "WAT": "West Africa Standard Time", "WARST": "Western Argentina Summer Time", "MST": "Macau Standard Time", "HNPMX": "Mexican Pacific Standard Time", "SRT": "Suriname Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HECU": "Cuba Daylight Time", "HKST": "Hong Kong Summer Time", "MEZ": "Central European Standard Time", "CHAST": "Chatham Standard Time", "CLST": "Chile Summer Time", "ACST": "Australian Central Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "MYT": "Malaysia Time", "WIB": "Western Indonesia Time", "PST": "Pacific Standard Time", "AEDT": "Australian Eastern Daylight Time", "CAT": "Central Africa Time", "EAT": "East Africa Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time", "ARST": "Argentina Summer Time", "ECT": "Ecuador Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CHADT": "Chatham Daylight Time", "∅∅∅": "Amazon Summer Time", "JST": "Japan Standard Time", "EST": "Eastern Standard Time", "BT": "Bhutan Time", "HEEG": "East Greenland Summer Time", "WITA": "Central Indonesia Time", "NZDT": "New Zealand Daylight Time", "WAST": "West Africa Summer Time", "COT": "Colombia Standard Time", "AWST": "Australian Western Standard Time", "HKT": "Hong Kong Standard Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "UYST": "Uruguay Summer Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "AST": "Atlantic Standard Time", "ART": "Argentina Standard Time", "SAST": "South Africa Standard Time", "OEZ": "Eastern European Standard Time", "AKST": "Alaska Standard Time", "VET": "Venezuela Time", "WIT": "Eastern Indonesia Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "HNEG": "East Greenland Standard Time", "ACWDT": "Australian Central Western Daylight Time", "ChST": "Chamorro Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EDT": "Eastern Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HAT": "Newfoundland Daylight Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "BOT": "Bolivia Time", "GYT": "Guyana Time", "PDT": "Pacific Daylight Time", "WESZ": "Western European Summer Time", "HNOG": "West Greenland Standard Time", "LHST": "Lord Howe Standard Time", "CLT": "Chile Standard Time", "JDT": "Japan Daylight Time", "ACDT": "Australian Central Daylight Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "UYT": "Uruguay Standard Time", "HNT": "Newfoundland Standard Time", "HEOG": "West Greenland Summer Time", "AWDT": "Australian Western Daylight Time", "MESZ": "Central European Summer Time", "GFT": "French Guiana Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time"}, -+ locale: "en_AG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "VET": "VET", "CAT": "CAT", "ART": "ART", "HNPM": "HNPM", "ChST": "ChST", "HEPM": "HEPM", "PST": "PST", "AKDT": "AKDT", "OESZ": "OESZ", "HNT": "HNT", "WART": "WART", "NZDT": "NZDT", "HEPMX": "HEPMX", "TMST": "TMST", "WITA": "WITA", "AWDT": "AWDT", "LHDT": "LHDT", "HEEG": "HEEG", "JDT": "JDT", "AEDT": "AEDT", "CHADT": "CHADT", "WEZ": "WEZ", "WAT": "WAT", "HAT": "HAT", "ARST": "ARST", "CHAST": "CHAST", "HNPMX": "HNPMX", "BOT": "BOT", "CDT": "CDT", "SRT": "SRT", "UYT": "UYT", "WIT": "WIT", "HKT": "HKT", "ECT": "ECT", "ADT": "ADT", "MYT": "MYT", "OEZ": "OEZ", "HADT": "HADT", "MESZ": "MESZ", "ACDT": "ACDT", "MEZ": "MEZ", "UYST": "UYST", "AKST": "AKST", "GFT": "GFT", "HNOG": "HNOG", "EDT": "EDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "BT": "BT", "WAST": "WAST", "GYT": "GYT", "EST": "EST", "TMT": "TMT", "MDT": "MDT", "AEST": "AEST", "CLST": "CLST", "IST": "IST", "HNCU": "HNCU", "HECU": "HECU", "COST": "COST", "CLT": "CLT", "MST": "MST", "NZST": "NZST", "HNEG": "HNEG", "ACWDT": "ACWDT", "PDT": "PDT", "WESZ": "WESZ", "SGT": "SGT", "COT": "COT", "HKST": "HKST", "LHST": "LHST", "WARST": "WARST", "WIB": "WIB", "CST": "CST", "EAT": "EAT", "AWST": "AWST", "ACWST": "ACWST", "SAST": "SAST", "AST": "AST", "ACST": "ACST", "HEOG": "HEOG", "GMT": "GMT", "HAST": "HAST", "JST": "JST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_AG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_AG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_AG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_AG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_AG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_AG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_AG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_AG' and handles both Whole and Real numbers based on 'v' - func (en *en_AG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_AG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_AG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_AG' -@@ -278,56 +195,7 @@ func (en *en_AG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_AG' -@@ -336,84 +204,33 @@ func (en *en_AG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_AG' -+func (en *en_AG) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_AG' --func (en *en_AG) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_AG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_AG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_AG) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_AG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_AG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_AG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_AG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_AI/en_AI.go b/en_AI/en_AI.go -index 3daf091..8793b1c 100644 ---- a/en_AI/en_AI.go -+++ b/en_AI/en_AI.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_AI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_AI' locale - func New() locales.Translator { - return &en_AI{ -- locale: "en_AI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ECT": "Ecuador Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "UYST": "Uruguay Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "HAT": "Newfoundland Daylight Time", "NZST": "New Zealand Standard Time", "∅∅∅": "Amazon Summer Time", "GFT": "French Guiana Time", "GYT": "Guyana Time", "VET": "Venezuela Time", "BT": "Bhutan Time", "HEOG": "West Greenland Summer Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "MDT": "Macau Summer Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "WART": "Western Argentina Standard Time", "ACST": "Australian Central Standard Time", "WIT": "Eastern Indonesia Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "WITA": "Central Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "ACDT": "Australian Central Daylight Time", "EST": "Eastern Standard Time", "UYT": "Uruguay Standard Time", "WEZ": "Western European Standard Time", "AWST": "Australian Western Standard Time", "HKT": "Hong Kong Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MEZ": "Central European Standard Time", "PDT": "Pacific Daylight Time", "ACWST": "Australian Central Western Standard Time", "IST": "India Standard Time", "CLT": "Chile Standard Time", "BOT": "Bolivia Time", "CAT": "Central Africa Time", "WARST": "Western Argentina Summer Time", "HECU": "Cuba Daylight Time", "HKST": "Hong Kong Summer Time", "MESZ": "Central European Summer Time", "SAST": "South Africa Standard Time", "PST": "Pacific Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CHAST": "Chatham Standard Time", "COT": "Colombia Standard Time", "SGT": "Singapore Standard Time", "CST": "Central Standard Time", "HNOG": "West Greenland Standard Time", "MST": "Macau Standard Time", "HNPMX": "Mexican Pacific Standard Time", "JDT": "Japan Daylight Time", "TMST": "Turkmenistan Summer Time", "ChST": "Chamorro Standard Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HNCU": "Cuba Standard Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "ARST": "Argentina Summer Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "ART": "Argentina Standard Time", "HNT": "Newfoundland Standard Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "CHADT": "Chatham Daylight Time", "CLST": "Chile Summer Time", "TMT": "Turkmenistan Standard Time", "HEEG": "East Greenland Summer Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "AKST": "Alaska Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "EDT": "Eastern Daylight Time", "WESZ": "Western European Summer Time", "AKDT": "Alaska Daylight Time", "SRT": "Suriname Time"}, -+ locale: "en_AI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HNCU": "HNCU", "HNPMX": "HNPMX", "CLST": "CLST", "SRT": "SRT", "WEZ": "WEZ", "PDT": "PDT", "ACWDT": "ACWDT", "CHADT": "CHADT", "WAST": "WAST", "HNT": "HNT", "WARST": "WARST", "WIT": "WIT", "PST": "PST", "GYT": "GYT", "CLT": "CLT", "NZST": "NZST", "SAST": "SAST", "AEDT": "AEDT", "SGT": "SGT", "HECU": "HECU", "HNOG": "HNOG", "ART": "ART", "BOT": "BOT", "BT": "BT", "JDT": "JDT", "AEST": "AEST", "CHAST": "CHAST", "OESZ": "OESZ", "GFT": "GFT", "MDT": "MDT", "EAT": "EAT", "MESZ": "MESZ", "COST": "COST", "CAT": "CAT", "WITA": "WITA", "ADT": "ADT", "HNPM": "HNPM", "IST": "IST", "ACWST": "ACWST", "HEPM": "HEPM", "HNNOMX": "HNNOMX", "MYT": "MYT", "HEPMX": "HEPMX", "HKST": "HKST", "ECT": "ECT", "AST": "AST", "HAST": "HAST", "MEZ": "MEZ", "LHDT": "LHDT", "NZDT": "NZDT", "WIB": "WIB", "HNEG": "HNEG", "UYST": "UYST", "AKST": "AKST", "EST": "EST", "TMST": "TMST", "CST": "CST", "GMT": "GMT", "JST": "JST", "LHST": "LHST", "UYT": "UYT", "VET": "VET", "HAT": "HAT", "COT": "COT", "HKT": "HKT", "ChST": "ChST", "AWDT": "AWDT", "AWST": "AWST", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "WAT": "WAT", "AKDT": "AKDT", "EDT": "EDT", "ARST": "ARST", "HENOMX": "HENOMX", "WART": "WART", "HEEG": "HEEG", "HEOG": "HEOG", "HADT": "HADT", "OEZ": "OEZ", "TMT": "TMT", "CDT": "CDT", "MST": "MST", "ACST": "ACST"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_AI) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_AI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_AI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_AI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_AI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_AI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_AI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_AI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_AI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_AI' and handles both Whole and Real numbers based on 'v' - func (en *en_AI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_AI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_AI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_AI' -@@ -278,56 +195,7 @@ func (en *en_AI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_AI' -@@ -336,84 +204,33 @@ func (en *en_AI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_AI' -+func (en *en_AI) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_AI' --func (en *en_AI) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_AI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_AI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_AI) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_AS/en_AS.go b/en_AS/en_AS.go -index 5d4af08..2ebecec 100644 ---- a/en_AS/en_AS.go -+++ b/en_AS/en_AS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_AS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_AS' locale - func New() locales.Translator { - return &en_AS{ -- locale: "en_AS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GMT": "Greenwich Mean Time", "UYT": "Uruguay Standard Time", "CDT": "Central Daylight Time", "CHAST": "Chatham Standard Time", "CLT": "Chile Standard Time", "OESZ": "Eastern European Summer Time", "HNCU": "Cuba Standard Time", "WEZ": "Western European Standard Time", "ARST": "Argentina Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SGT": "Singapore Standard Time", "AEST": "Australian Eastern Standard Time", "BT": "Bhutan Time", "AWDT": "Australian Western Daylight Time", "SAST": "South Africa Standard Time", "IST": "India Standard Time", "ACDT": "Australian Central Daylight Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "VET": "Venezuela Time", "HKST": "Hong Kong Summer Time", "WIT": "Eastern Indonesia Time", "HNOG": "West Greenland Standard Time", "NZDT": "New Zealand Daylight Time", "CAT": "Central Africa Time", "EAT": "East Africa Time", "EDT": "Eastern Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HAT": "Newfoundland Daylight Time", "LHDT": "Lord Howe Daylight Time", "MESZ": "Central European Summer Time", "CLST": "Chile Summer Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "COT": "Colombia Standard Time", "AKST": "Alaska Standard Time", "MEZ": "Central European Standard Time", "JST": "Japan Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "ADT": "Atlantic Daylight Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AKDT": "Alaska Daylight Time", "∅∅∅": "Amazon Summer Time", "JDT": "Japan Daylight Time", "BOT": "Bolivia Time", "WAST": "West Africa Summer Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time", "SRT": "Suriname Time", "PDT": "Pacific Daylight Time", "WESZ": "Western European Summer Time", "ACWDT": "Australian Central Western Daylight Time", "AEDT": "Australian Eastern Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "PST": "Pacific Standard Time", "ART": "Argentina Standard Time", "MST": "Macau Standard Time", "CST": "Central Standard Time", "HKT": "Hong Kong Standard Time", "GFT": "French Guiana Time", "HECU": "Cuba Daylight Time", "GYT": "Guyana Time", "HEOG": "West Greenland Summer Time", "ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "ChST": "Chamorro Standard Time", "HNEG": "East Greenland Standard Time", "TMT": "Turkmenistan Standard Time", "ACST": "Australian Central Standard Time", "EST": "Eastern Standard Time", "MYT": "Malaysia Time", "HEEG": "East Greenland Summer Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "ECT": "Ecuador Time", "UYST": "Uruguay Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MDT": "Macau Summer Time", "AST": "Atlantic Standard Time", "WIB": "Western Indonesia Time", "AWST": "Australian Western Standard Time", "WITA": "Central Indonesia Time", "CHADT": "Chatham Daylight Time"}, -+ locale: "en_AS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEST": "AEST", "AKST": "AKST", "CAT": "CAT", "MESZ": "MESZ", "AWST": "AWST", "PDT": "PDT", "CHADT": "CHADT", "OESZ": "OESZ", "WARST": "WARST", "BOT": "BOT", "ACDT": "ACDT", "BT": "BT", "HEPMX": "HEPMX", "TMT": "TMT", "HENOMX": "HENOMX", "ChST": "ChST", "HAST": "HAST", "AEDT": "AEDT", "HNCU": "HNCU", "HEOG": "HEOG", "TMST": "TMST", "GMT": "GMT", "HEPM": "HEPM", "ACWDT": "ACWDT", "WESZ": "WESZ", "GYT": "GYT", "WITA": "WITA", "NZST": "NZST", "HNNOMX": "HNNOMX", "UYST": "UYST", "WIT": "WIT", "∅∅∅": "∅∅∅", "AST": "AST", "MYT": "MYT", "JDT": "JDT", "IST": "IST", "EDT": "EDT", "LHDT": "LHDT", "WEZ": "WEZ", "AKDT": "AKDT", "WAST": "WAST", "HKT": "HKT", "PST": "PST", "ECT": "ECT", "COT": "COT", "MST": "MST", "ADT": "ADT", "MDT": "MDT", "HNEG": "HNEG", "HEEG": "HEEG", "ACWST": "ACWST", "VET": "VET", "HNOG": "HNOG", "HKST": "HKST", "EST": "EST", "EAT": "EAT", "HECU": "HECU", "WART": "WART", "NZDT": "NZDT", "ART": "ART", "HADT": "HADT", "CHAST": "CHAST", "HNPMX": "HNPMX", "OEZ": "OEZ", "HAT": "HAT", "CLST": "CLST", "SRT": "SRT", "SGT": "SGT", "GFT": "GFT", "HNT": "HNT", "SAST": "SAST", "HNPM": "HNPM", "JST": "JST", "MEZ": "MEZ", "LHST": "LHST", "WAT": "WAT", "COST": "COST", "CLT": "CLT", "CDT": "CDT", "ARST": "ARST", "ACST": "ACST", "AWDT": "AWDT", "UYT": "UYT", "WIB": "WIB", "CST": "CST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_AS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_AS) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_AS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_AS) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_AS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_AS) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_AS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_AS' and handles both Whole and Real numbers based on 'v' - func (en *en_AS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_AS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_AS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_AS' -@@ -278,56 +195,7 @@ func (en *en_AS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_AS' -@@ -336,68 +204,7 @@ func (en *en_AS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_AS' -@@ -405,15 +212,15 @@ func (en *en_AS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_AS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_AS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_AS) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_AS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_AS) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_AS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_AS) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_AS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_AS) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_AS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_AS) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_AT/en_AT.go b/en_AT/en_AT.go -index fda344e..e512c84 100644 ---- a/en_AT/en_AT.go -+++ b/en_AT/en_AT.go -@@ -49,31 +49,12 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - percentSuffix: " ", - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WAST": "West Africa Summer Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "HKST": "Hong Kong Summer Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "HNT": "Newfoundland Standard Time", "MESZ": "Central European Summer Time", "TMST": "Turkmenistan Summer Time", "HEEG": "East Greenland Summer Time", "WARST": "Western Argentina Summer Time", "COT": "Colombia Standard Time", "ARST": "Argentina Summer Time", "ACWDT": "Australian Central Western Daylight Time", "NZDT": "New Zealand Daylight Time", "MDT": "Macau Summer Time", "UYT": "Uruguay Standard Time", "WESZ": "Western European Summer Time", "AEST": "Australian Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MEZ": "Central European Standard Time", "HNCU": "Cuba Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "GMT": "Greenwich Mean Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "AWDT": "Australian Western Daylight Time", "ChST": "Chamorro Standard Time", "EAT": "East Africa Time", "HNPMX": "Mexican Pacific Standard Time", "PST": "Pacific Standard Time", "AEDT": "Australian Eastern Daylight Time", "BOT": "Bolivia Time", "HENOMX": "Northwest Mexico Daylight Time", "ART": "Argentina Standard Time", "WITA": "Central Indonesia Time", "ACST": "Australian Central Standard Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "EDT": "Eastern Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "AKST": "Alaska Standard Time", "JST": "Japan Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CLST": "Chile Summer Time", "ECT": "Ecuador Time", "SGT": "Singapore Standard Time", "MST": "Macau Standard Time", "GYT": "Guyana Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "∅∅∅": "Peru Summer Time", "WAT": "West Africa Standard Time", "NZST": "New Zealand Standard Time", "IST": "India Standard Time", "WART": "Western Argentina Standard Time", "AKDT": "Alaska Daylight Time", "HNOG": "West Greenland Standard Time", "LHST": "Lord Howe Standard Time", "CHAST": "Chatham Standard Time", "EST": "Eastern Standard Time", "ADT": "Atlantic Daylight Time", "WIB": "Western Indonesia Time", "SRT": "Suriname Time", "HEOG": "West Greenland Summer Time", "LHDT": "Lord Howe Daylight Time", "GFT": "French Guiana Time", "CAT": "Central Africa Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "JDT": "Japan Daylight Time", "CLT": "Chile Standard Time", "COST": "Colombia Summer Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "WIT": "Eastern Indonesia Time", "ACWST": "Australian Central Western Standard Time", "HKT": "Hong Kong Standard Time", "TMT": "Turkmenistan Standard Time", "ACDT": "Australian Central Daylight Time", "AST": "Atlantic Standard Time", "VET": "Venezuela Time", "AWST": "Australian Western Standard Time", "HNEG": "East Greenland Standard Time", "HECU": "Cuba Daylight Time"}, -+ timezones: map[string]string{"UYST": "UYST", "HNPMX": "HNPMX", "AKDT": "AKDT", "SAST": "SAST", "HNPM": "HNPM", "ART": "ART", "AST": "AST", "HNEG": "HNEG", "JST": "JST", "LHDT": "LHDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "CST": "CST", "COT": "COT", "HEEG": "HEEG", "AEST": "AEST", "VET": "VET", "WART": "WART", "WIT": "WIT", "EST": "EST", "TMT": "TMT", "MEZ": "MEZ", "IST": "IST", "MST": "MST", "AWDT": "AWDT", "ACDT": "ACDT", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "HECU": "HECU", "HNOG": "HNOG", "ChST": "ChST", "MDT": "MDT", "HAST": "HAST", "MESZ": "MESZ", "WAT": "WAT", "GFT": "GFT", "COST": "COST", "HKT": "HKT", "WIB": "WIB", "NZST": "NZST", "GMT": "GMT", "ACST": "ACST", "ACWST": "ACWST", "AKST": "AKST", "OEZ": "OEZ", "GYT": "GYT", "CDT": "CDT", "CLST": "CLST", "HENOMX": "HENOMX", "WEZ": "WEZ", "CLT": "CLT", "EAT": "EAT", "BOT": "BOT", "JDT": "JDT", "HAT": "HAT", "WARST": "WARST", "WITA": "WITA", "NZDT": "NZDT", "PDT": "PDT", "PST": "PST", "HEOG": "HEOG", "ADT": "ADT", "UYT": "UYT", "BT": "BT", "HNT": "HNT", "TMST": "TMST", "HEPM": "HEPM", "ARST": "ARST", "SRT": "SRT", "LHST": "LHST", "WAST": "WAST", "CAT": "CAT", "ECT": "ECT", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "WESZ": "WESZ", "HKST": "HKST", "HADT": "HADT", "MYT": "MYT", "CHADT": "CHADT", "HEPMX": "HEPMX", "SGT": "SGT", "OESZ": "OESZ", "EDT": "EDT", "AWST": "AWST"}, - } - } -  -@@ -114,8 +95,8 @@ func (en *en_AT) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_AT) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -140,7 +121,7 @@ func (en *en_AT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_AT) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -150,7 +131,7 @@ func (en *en_AT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_AT) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -160,7 +141,7 @@ func (en *en_AT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_AT) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -206,49 +187,14 @@ func (en *en_AT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_AT' and handles both Whole and Real numbers based on 'v' - func (en *en_AT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_AT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_AT) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -+ l := len(s) + 2 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -282,7 +228,7 @@ func (en *en_AT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -344,7 +290,7 @@ func (en *en_AT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -417,17 +363,6 @@ func (en *en_AT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -436,17 +371,6 @@ func (en *en_AT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,17 +379,6 @@ func (en *en_AT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -474,19 +387,6 @@ func (en *en_AT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -495,28 +395,6 @@ func (en *en_AT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -525,35 +403,6 @@ func (en *en_AT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -562,40 +411,6 @@ func (en *en_AT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -604,44 +419,5 @@ func (en *en_AT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_AU/en_AU.go b/en_AU/en_AU.go -index 65c3426..3aff346 100644 ---- a/en_AU/en_AU.go -+++ b/en_AU/en_AU.go -@@ -10,68 +10,52 @@ import ( - ) -  - type en_AU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_AU' locale - func New() locales.Translator { - return &en_AU{ -- locale: "en_AU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "Tk", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "$b", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "₱", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "£", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "Kr", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "Gs", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "Rs", "SDD", "SDG", "SDP", "Kr", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "$U", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "CFP", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat."}, -- daysNarrow: []string{"Su.", "M.", "Tu.", "W.", "Th.", "F.", "Sa."}, -- daysShort: []string{"Su.", "Mon.", "Tu.", "Wed.", "Th.", "Fri.", "Sat."}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ChST": "Chamorro Standard Time", "COT": "Colombia Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "PST": "Pacific Standard Time", "HEEG": "East Greenland Summer Time", "GFT": "French Guiana Time", "CDT": "Central Daylight Time", "HAT": "Newfoundland Daylight Time", "AEST": "Australian Eastern Standard Time", "SAST": "South Africa Standard Time", "LHST": "Lord Howe Standard Time", "GMT": "Greenwich Mean Time", "HAST": "Hawaii-Aleutian Standard Time", "WEZ": "Western European Standard Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "MEZ": "Central European Standard Time", "∅∅∅": "Amazon Summer Time", "OESZ": "Eastern European Summer Time", "HECU": "Cuba Daylight Time", "ADT": "Atlantic Daylight Time", "HNT": "Newfoundland Standard Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "ARST": "Argentina Summer Time", "MYT": "Malaysia Time", "WIB": "Western Indonesia Time", "HNOG": "West Greenland Standard Time", "CLST": "Chile Summer Time", "WAST": "West Africa Summer Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time", "SRT": "Suriname Time", "ART": "Argentina Standard Time", "AWDT": "Australian Western Daylight Time", "CHADT": "Chatham Daylight Time", "CST": "Central Standard Time", "WAT": "West Africa Standard Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "JDT": "Japan Summer Time", "ACDT": "Australian Central Daylight Time", "JST": "Japan Standard Time", "CLT": "Chile Standard Time", "EAT": "Eastern Africa Time", "SGT": "Singapore Standard Time", "HKT": "Hong Kong Standard Time", "HKST": "Hong Kong Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "PDT": "Pacific Daylight Time", "MDT": "Macau Summer Time", "WIT": "Eastern Indonesia Time", "BT": "Bhutan Time", "HEOG": "West Greenland Summer Time", "ACST": "Australian Central Standard Time", "MST": "Macau Standard Time", "WESZ": "Western European Summer Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "TMST": "Turkmenistan Summer Time", "ECT": "Ecuador Time", "HEPMX": "Mexican Pacific Daylight Time", "AKST": "Alaska Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "MESZ": "Central European Summer Time", "ACWST": "Australian Central Western Standard Time", "HNCU": "Cuba Standard Time", "GYT": "Guyana Time", "NZST": "New Zealand Standard Time", "OEZ": "Eastern European Standard Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "HENOMX": "Northwest Mexico Daylight Time", "WART": "Western Argentina Standard Time", "EST": "Eastern Standard Time", "UYT": "Uruguay Standard Time", "LHDT": "Lord Howe Daylight Time", "HNEG": "East Greenland Standard Time", "UYST": "Uruguay Summer Time", "VET": "Venezuela Time"}, -+ locale: "en_AU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "Tk", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "$b", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "₱", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "£", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "Kr", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "Gs", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "Rs", "SDD", "SDG", "SDP", "Kr", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "$U", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "CFP", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "Jan.", "Feb.", "Mar.", "Apr.", "May", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."}, -+ daysAbbreviated: []string{"Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat."}, -+ daysNarrow: []string{"Su.", "M.", "Tu.", "W.", "Th.", "F.", "Sa."}, -+ daysShort: []string{"Su.", "Mon.", "Tu.", "Wed.", "Th.", "Fri.", "Sat."}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsNarrow: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"AKST": "AKST", "ACDT": "Australian Central Daylight Time", "LHST": "LHST", "JDT": "Japan Summer Time", "SGT": "SGT", "WAT": "WAT", "OESZ": "OESZ", "SAST": "SAST", "HKT": "HKT", "CDT": "CDT", "ADT": "ADT", "ART": "ART", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "MST": "MST", "ChST": "ChST", "JST": "Japan Standard Time", "ACWST": "ACWST", "HEOG": "HEOG", "AST": "AST", "HNEG": "HNEG", "HEPMX": "HEPMX", "WAST": "WAST", "HAT": "HAT", "EST": "EST", "TMT": "TMT", "UYST": "UYST", "AEDT": "Australian Eastern Daylight Time", "HNPMX": "HNPMX", "AKDT": "AKDT", "WART": "WART", "HEEG": "HEEG", "PST": "PST", "AWDT": "Australian Western Daylight Time", "WESZ": "WESZ", "WARST": "WARST", "AEST": "Australian Eastern Standard Time", "CLT": "CLT", "WITA": "WITA", "MDT": "MDT", "LHDT": "LHDT", "PDT": "PDT", "MEZ": "MEZ", "MESZ": "MESZ", "HECU": "HECU", "GFT": "GFT", "MYT": "MYT", "BT": "BT", "COST": "COST", "TMST": "TMST", "GYT": "GYT", "HKST": "HKST", "CLST": "CLST", "NZDT": "NZDT", "ECT": "ECT", "WIB": "WIB", "AWST": "Australian Western Standard Time", "HNOG": "HNOG", "BOT": "BOT", "SRT": "SRT", "EAT": "Eastern Africa Time", "HNPM": "HNPM", "WIT": "WIT", "CHADT": "CHADT", "UYT": "UYT", "IST": "IST", "CAT": "CAT", "GMT": "GMT", "HAST": "HAST", "ACST": "Australian Central Standard Time", "CHAST": "CHAST", "WEZ": "WEZ", "HNCU": "HNCU", "COT": "COT", "HNT": "HNT", "CST": "CST", "NZST": "NZST", "ARST": "ARST", "HEPM": "HEPM", "VET": "VET", "∅∅∅": "∅∅∅", "HADT": "HADT", "HENOMX": "HENOMX", "OEZ": "OEZ", "EDT": "EDT"}, - } - } -  -@@ -112,8 +96,8 @@ func (en *en_AU) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_AU) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -148,7 +132,7 @@ func (en *en_AU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_AU) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +142,7 @@ func (en *en_AU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_AU) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +188,13 @@ func (en *en_AU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_AU' and handles both Whole and Real numbers based on 'v' - func (en *en_AU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_AU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_AU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_AU' -@@ -278,56 +202,7 @@ func (en *en_AU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_AU' -@@ -336,68 +211,7 @@ func (en *en_AU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_AU' -@@ -424,17 +238,6 @@ func (en *en_AU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +246,6 @@ func (en *en_AU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +254,6 @@ func (en *en_AU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,13 +262,11 @@ func (en *en_AU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +274,6 @@ func (en *en_AU) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +283,11 @@ func (en *en_AU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +302,6 @@ func (en *en_AU) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +311,11 @@ func (en *en_AU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +332,6 @@ func (en *en_AU) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +343,11 @@ func (en *en_AU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +364,6 @@ func (en *en_AU) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_BB/en_BB.go b/en_BB/en_BB.go -index 9cb4aaa..b461b43 100644 ---- a/en_BB/en_BB.go -+++ b/en_BB/en_BB.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_BB struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_BB' locale - func New() locales.Translator { - return &en_BB{ -- locale: "en_BB", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "$", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HADT": "Hawaii-Aleutian Daylight Time", "WEZ": "Western European Standard Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "HEPMX": "Mexican Pacific Daylight Time", "WARST": "Western Argentina Summer Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "WITA": "Central Indonesia Time", "TMST": "Turkmenistan Summer Time", "WAST": "West Africa Summer Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "HNCU": "Cuba Standard Time", "CDT": "Central Daylight Time", "HKST": "Hong Kong Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "AKDT": "Alaska Daylight Time", "AST": "Atlantic Standard Time", "MDT": "Mountain Daylight Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CLST": "Chile Summer Time", "SGT": "Singapore Standard Time", "HECU": "Cuba Daylight Time", "CST": "Central Standard Time", "HAT": "Newfoundland Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "EST": "Eastern Standard Time", "OEZ": "Eastern European Standard Time", "MST": "Mountain Standard Time", "SRT": "Suriname Time", "ARST": "Argentina Summer Time", "MESZ": "Central European Summer Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "EAT": "East Africa Time", "PDT": "Pacific Daylight Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "ChST": "Chamorro Standard Time", "UYT": "Uruguay Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HNT": "Newfoundland Standard Time", "HEOG": "West Greenland Summer Time", "SAST": "South Africa Standard Time", "ACST": "Australian Central Standard Time", "ACDT": "Australian Central Daylight Time", "VET": "Venezuela Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "∅∅∅": "Amazon Summer Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "GYT": "Guyana Time", "AEST": "Australian Eastern Standard Time", "LHDT": "Lord Howe Daylight Time", "CHADT": "Chatham Daylight Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "COST": "Colombia Summer Time", "AKST": "Alaska Standard Time", "ACWST": "Australian Central Western Standard Time", "HNOG": "West Greenland Standard Time", "IST": "India Standard Time", "JDT": "Japan Daylight Time", "MEZ": "Central European Standard Time", "GMT": "Greenwich Mean Time", "WIB": "Western Indonesia Time", "PST": "Pacific Standard Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "WAT": "West Africa Standard Time", "EDT": "Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "CLT": "Chile Standard Time", "MYT": "Malaysia Time", "HNPMX": "Mexican Pacific Standard Time", "UYST": "Uruguay Summer Time"}, -+ locale: "en_BB", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "$", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEEG": "HEEG", "AWDT": "AWDT", "CDT": "CDT", "ADT": "ADT", "GMT": "GMT", "ACDT": "ACDT", "BT": "BT", "CHAST": "CHAST", "WESZ": "WESZ", "WART": "WART", "NZST": "NZST", "NZDT": "NZDT", "ARST": "ARST", "UYT": "UYT", "SGT": "SGT", "AKDT": "AKDT", "HAT": "HAT", "TMT": "TMT", "PDT": "PDT", "WEZ": "WEZ", "TMST": "TMST", "ART": "ART", "MESZ": "MESZ", "HENOMX": "HENOMX", "HEOG": "HEOG", "LHDT": "LHDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "EST": "EST", "WIB": "WIB", "ACST": "ACST", "AWST": "AWST", "ACWDT": "ACWDT", "HNNOMX": "HNNOMX", "JST": "JST", "VET": "VET", "HECU": "HECU", "GFT": "GFT", "WARST": "WARST", "HKT": "HKT", "ChST": "ChST", "BOT": "BOT", "EAT": "EAT", "HEPM": "HEPM", "JDT": "JDT", "WIT": "WIT", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "MDT": "MDT", "IST": "IST", "HNEG": "HNEG", "ACWST": "ACWST", "COT": "COT", "COST": "COST", "MST": "MST", "LHST": "LHST", "CLST": "CLST", "HNCU": "HNCU", "CHADT": "CHADT", "HNPMX": "HNPMX", "HNT": "HNT", "EDT": "EDT", "ECT": "ECT", "HADT": "HADT", "MYT": "MYT", "UYST": "UYST", "WAT": "WAT", "CLT": "CLT", "WITA": "WITA", "AST": "AST", "AEDT": "AEDT", "GYT": "GYT", "HKST": "HKST", "CAT": "CAT", "CST": "CST", "SRT": "SRT", "HAST": "HAST", "MEZ": "MEZ", "HNPM": "HNPM", "WAST": "WAST", "AKST": "AKST", "OEZ": "OEZ", "SAST": "SAST", "PST": "PST", "AEST": "AEST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_BB) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BB) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_BB) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BB) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_BB) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BB) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_BB) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BB' and handles both Whole and Real numbers based on 'v' - func (en *en_BB) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BB' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BB) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BB' -@@ -278,56 +195,7 @@ func (en *en_BB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_BB' -@@ -336,84 +204,33 @@ func (en *en_BB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_BB' -+func (en *en_BB) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_BB' --func (en *en_BB) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_BB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_BB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_BB) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_BB) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_BB) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_BB) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_BB) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_BE/en_BE.go b/en_BE/en_BE.go -index 8cb9c23..2c04fbd 100644 ---- a/en_BE/en_BE.go -+++ b/en_BE/en_BE.go -@@ -50,28 +50,13 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: " ", - currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, - periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, - periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEEG": "East Greenland Summer Time", "ECT": "Ecuador Time", "GMT": "Greenwich Mean Time", "HAST": "Hawaii-Aleutian Standard Time", "ACDT": "Australian Central Daylight Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "AEST": "Australian Eastern Standard Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time", "HNCU": "Cuba Standard Time", "WIB": "Western Indonesia Time", "ART": "Argentina Standard Time", "CLST": "Chile Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HAT": "Newfoundland Daylight Time", "AWDT": "Australian Western Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "JST": "Japan Standard Time", "OESZ": "Eastern European Summer Time", "COT": "Colombia Standard Time", "MYT": "Malaysia Time", "HADT": "Hawaii-Aleutian Daylight Time", "MESZ": "Central European Summer Time", "NZDT": "New Zealand Daylight Time", "BOT": "Bolivia Time", "CAT": "Central Africa Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time", "HEOG": "West Greenland Summer Time", "GFT": "French Guiana Time", "ADT": "Atlantic Daylight Time", "HKT": "Hong Kong Standard Time", "LHDT": "Lord Howe Daylight Time", "WAT": "West Africa Standard Time", "MST": "Macau Standard Time", "CDT": "Central Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "CST": "Central Standard Time", "ARST": "Argentina Summer Time", "HNEG": "East Greenland Standard Time", "ACST": "Australian Central Standard Time", "WARST": "Western Argentina Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "HECU": "Cuba Daylight Time", "HNOG": "West Greenland Standard Time", "PDT": "Pacific Daylight Time", "WITA": "Central Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "CHAST": "Chatham Standard Time", "MEZ": "Central European Standard Time", "OEZ": "Eastern European Standard Time", "WAST": "West Africa Summer Time", "UYT": "Uruguay Standard Time", "AKDT": "Alaska Daylight Time", "WIT": "Eastern Indonesia Time", "AWST": "Australian Western Standard Time", "GYT": "Guyana Time", "WEZ": "Western European Standard Time", "CHADT": "Chatham Daylight Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "CLT": "Chile Standard Time", "BT": "Bhutan Time", "SRT": "Suriname Time", "PST": "Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "UYST": "Uruguay Summer Time", "VET": "Venezuela Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "ChST": "Chamorro Standard Time", "∅∅∅": "Peru Summer Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "HNT": "Newfoundland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SAST": "South Africa Standard Time", "AST": "Atlantic Standard Time", "WESZ": "Western European Summer Time", "HKST": "Hong Kong Summer Time", "NZST": "New Zealand Standard Time"}, -+ timezones: map[string]string{"UYST": "UYST", "AKDT": "AKDT", "GYT": "GYT", "COT": "COT", "HKT": "HKT", "TMT": "TMT", "SRT": "SRT", "ACWDT": "ACWDT", "WESZ": "WESZ", "COST": "COST", "EST": "EST", "ECT": "ECT", "LHDT": "LHDT", "HADT": "HADT", "ACWST": "ACWST", "AEDT": "AEDT", "HECU": "HECU", "WART": "WART", "WARST": "WARST", "WIT": "WIT", "WITA": "WITA", "GMT": "GMT", "PST": "PST", "∅∅∅": "∅∅∅", "SGT": "SGT", "HNT": "HNT", "MEZ": "MEZ", "HENOMX": "HENOMX", "AWST": "AWST", "JDT": "JDT", "IST": "IST", "CHAST": "CHAST", "VET": "VET", "EDT": "EDT", "ART": "ART", "GFT": "GFT", "HNOG": "HNOG", "HNPMX": "HNPMX", "MESZ": "MESZ", "HNPM": "HNPM", "BT": "BT", "HEOG": "HEOG", "CST": "CST", "BOT": "BOT", "CAT": "CAT", "NZST": "NZST", "NZDT": "NZDT", "WAT": "WAT", "LHST": "LHST", "ARST": "ARST", "MYT": "MYT", "PDT": "PDT", "TMST": "TMST", "ChST": "ChST", "HAST": "HAST", "HNEG": "HNEG", "AWDT": "AWDT", "HEPM": "HEPM", "AKST": "AKST", "OESZ": "OESZ", "SAST": "SAST", "ADT": "ADT", "ACST": "ACST", "JST": "JST", "UYT": "UYT", "WEZ": "WEZ", "HEPMX": "HEPMX", "WAST": "WAST", "HAT": "HAT", "AST": "AST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "OEZ": "OEZ", "HKST": "HKST", "WIB": "WIB", "MDT": "MDT", "ACDT": "ACDT", "CHADT": "CHADT", "CLST": "CLST", "EAT": "EAT", "AEST": "AEST", "CLT": "CLT", "CDT": "CDT", "MST": "MST"}, - } - } -  -@@ -138,7 +123,7 @@ func (en *en_BE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BE) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +133,7 @@ func (en *en_BE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BE) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +143,7 @@ func (en *en_BE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BE) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +189,13 @@ func (en *en_BE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BE' and handles both Whole and Real numbers based on 'v' - func (en *en_BE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BE' -@@ -278,7 +203,7 @@ func (en *en_BE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -336,7 +261,7 @@ func (en *en_BE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -452,17 +377,6 @@ func (en *en_BE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +385,6 @@ func (en *en_BE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_BI/en_BI.go b/en_BI/en_BI.go -index 225240b..cb8fa9e 100644 ---- a/en_BI/en_BI.go -+++ b/en_BI/en_BI.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_BI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_BI' locale - func New() locales.Translator { - return &en_BI{ -- locale: "en_BI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "FBu", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HECU": "Cuba Daylight Time", "MESZ": "Central European Summer Time", "OEZ": "Eastern European Standard Time", "WIB": "Western Indonesia Time", "NZST": "New Zealand Standard Time", "CAT": "Central Africa Time", "∅∅∅": "Peru Summer Time", "GMT": "Greenwich Mean Time", "HEPMX": "Mexican Pacific Daylight Time", "SRT": "Suriname Time", "WEZ": "Western European Standard Time", "ACDT": "Australian Central Daylight Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "EDT": "Eastern Daylight Time", "CHAST": "Chatham Standard Time", "BOT": "Bolivia Time", "ACST": "Australian Central Standard Time", "UYST": "Uruguay Summer Time", "ART": "Argentina Standard Time", "MEZ": "Central European Standard Time", "ChST": "Chamorro Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "AKDT": "Alaska Daylight Time", "AST": "Atlantic Standard Time", "ACWST": "Australian Central Western Standard Time", "AEST": "Australian Eastern Standard Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "HEEG": "East Greenland Summer Time", "WAST": "West Africa Summer Time", "HEOG": "West Greenland Summer Time", "HKST": "Hong Kong Summer Time", "NZDT": "New Zealand Daylight Time", "TMST": "Turkmenistan Summer Time", "CDT": "Central Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "WITA": "Central Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CLST": "Chile Summer Time", "GFT": "French Guiana Time", "ADT": "Atlantic Daylight Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "PST": "Pacific Standard Time", "HAT": "Newfoundland Daylight Time", "CHADT": "Chatham Daylight Time", "ECT": "Ecuador Time", "MST": "Macau Standard Time", "MYT": "Malaysia Time", "JDT": "Japan Daylight Time", "EST": "Eastern Standard Time", "AKST": "Alaska Standard Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "OESZ": "Eastern European Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HNT": "Newfoundland Standard Time", "HKT": "Hong Kong Standard Time", "LHDT": "Lord Howe Daylight Time", "WIT": "Eastern Indonesia Time", "WAT": "West Africa Standard Time", "UYT": "Uruguay Standard Time", "GYT": "Guyana Time", "BT": "Bhutan Time", "JST": "Japan Standard Time", "EAT": "East Africa Time", "CST": "Central Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "HNCU": "Cuba Standard Time", "COST": "Colombia Summer Time", "MDT": "Macau Summer Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "WART": "Western Argentina Standard Time", "PDT": "Pacific Daylight Time", "WESZ": "Western European Summer Time", "AWST": "Australian Western Standard Time", "IST": "India Standard Time", "HNEG": "East Greenland Standard Time", "TMT": "Turkmenistan Standard Time", "HNPMX": "Mexican Pacific Standard Time"}, -+ locale: "en_BI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "FBu", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CDT": "CDT", "NZST": "NZST", "MEZ": "MEZ", "HEPM": "HEPM", "OEZ": "OEZ", "HKST": "HKST", "CST": "CST", "PDT": "PDT", "ACWST": "ACWST", "JST": "JST", "BOT": "BOT", "HADT": "HADT", "EAT": "EAT", "PST": "PST", "BT": "BT", "CAT": "CAT", "ECT": "ECT", "SRT": "SRT", "UYT": "UYT", "CHAST": "CHAST", "WIT": "WIT", "ART": "ART", "MYT": "MYT", "MESZ": "MESZ", "AWST": "AWST", "UYST": "UYST", "IST": "IST", "OESZ": "OESZ", "WART": "WART", "SAST": "SAST", "CLT": "CLT", "NZDT": "NZDT", "AEDT": "AEDT", "AKST": "AKST", "GYT": "GYT", "EST": "EST", "TMT": "TMT", "TMST": "TMST", "GMT": "GMT", "ChST": "ChST", "LHDT": "LHDT", "VET": "VET", "COST": "COST", "EDT": "EDT", "WARST": "WARST", "ACWDT": "ACWDT", "WEZ": "WEZ", "AWDT": "AWDT", "WESZ": "WESZ", "MST": "MST", "WIB": "WIB", "∅∅∅": "∅∅∅", "CLST": "CLST", "ADT": "ADT", "HNNOMX": "HNNOMX", "COT": "COT", "HNOG": "HNOG", "HNEG": "HNEG", "LHST": "LHST", "JDT": "JDT", "CHADT": "CHADT", "HEPMX": "HEPMX", "WITA": "WITA", "ARST": "ARST", "HECU": "HECU", "HNPMX": "HNPMX", "GFT": "GFT", "HNT": "HNT", "HNPM": "HNPM", "HNCU": "HNCU", "ACST": "ACST", "ACDT": "ACDT", "HENOMX": "HENOMX", "HAT": "HAT", "AST": "AST", "HAST": "HAST", "MDT": "MDT", "HEEG": "HEEG", "AEST": "AEST", "SGT": "SGT", "WAT": "WAT", "WAST": "WAST", "HEOG": "HEOG", "HKT": "HKT", "AKDT": "AKDT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_BI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_BI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_BI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_BI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BI' and handles both Whole and Real numbers based on 'v' - func (en *en_BI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BI' -@@ -278,56 +195,7 @@ func (en *en_BI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_BI' -@@ -336,68 +204,7 @@ func (en *en_BI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_BI' -@@ -405,17 +212,6 @@ func (en *en_BI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +220,6 @@ func (en *en_BI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +228,6 @@ func (en *en_BI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +236,6 @@ func (en *en_BI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,28 +244,6 @@ func (en *en_BI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +252,6 @@ func (en *en_BI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +260,6 @@ func (en *en_BI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +268,5 @@ func (en *en_BI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_BM/en_BM.go b/en_BM/en_BM.go -index 5d8680f..47ce12f 100644 ---- a/en_BM/en_BM.go -+++ b/en_BM/en_BM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_BM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_BM' locale - func New() locales.Translator { - return &en_BM{ -- locale: "en_BM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "$", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "ECT": "Ecuador Time", "EAT": "East Africa Time", "HNNOMX": "Northwest Mexico Standard Time", "AKST": "Alaska Standard Time", "WIB": "Western Indonesia Time", "HKT": "Hong Kong Standard Time", "HNEG": "East Greenland Standard Time", "WEZ": "Western European Standard Time", "ACWDT": "Australian Central Western Daylight Time", "IST": "India Standard Time", "CDT": "Central Daylight Time", "AEDT": "Australian Eastern Daylight Time", "CLT": "Chile Standard Time", "CAT": "Central Africa Time", "HEPMX": "Mexican Pacific Daylight Time", "UYT": "Uruguay Standard Time", "TMT": "Turkmenistan Standard Time", "ACWST": "Australian Central Western Standard Time", "LHDT": "Lord Howe Daylight Time", "ACST": "Australian Central Standard Time", "WART": "Western Argentina Standard Time", "HECU": "Cuba Daylight Time", "SGT": "Singapore Standard Time", "GYT": "Guyana Time", "ARST": "Argentina Summer Time", "PST": "Pacific Standard Time", "MESZ": "Central European Summer Time", "GFT": "French Guiana Time", "TMST": "Turkmenistan Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WITA": "Central Indonesia Time", "GMT": "Greenwich Mean Time", "EDT": "Eastern Daylight Time", "ChST": "Chamorro Standard Time", "WAST": "West Africa Summer Time", "COT": "Colombia Standard Time", "ADT": "Atlantic Daylight Time", "PDT": "Pacific Daylight Time", "AEST": "Australian Eastern Standard Time", "AWDT": "Australian Western Daylight Time", "MEZ": "Central European Standard Time", "EST": "Eastern Standard Time", "UYST": "Uruguay Summer Time", "SRT": "Suriname Time", "HNOG": "West Greenland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "BOT": "Bolivia Time", "HNPMX": "Mexican Pacific Standard Time", "HNT": "Newfoundland Standard Time", "NZST": "New Zealand Standard Time", "ACDT": "Australian Central Daylight Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "HNCU": "Cuba Standard Time", "OESZ": "Eastern European Summer Time", "AST": "Atlantic Standard Time", "VET": "Venezuela Time", "WIT": "Eastern Indonesia Time", "HEOG": "West Greenland Summer Time", "LHST": "Lord Howe Standard Time", "JST": "Japan Standard Time", "JDT": "Japan Daylight Time", "WESZ": "Western European Summer Time", "HEEG": "East Greenland Summer Time", "OEZ": "Eastern European Standard Time", "CLST": "Chile Summer Time", "MDT": "Macau Summer Time", "CST": "Central Standard Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "HKST": "Hong Kong Summer Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "WAT": "West Africa Standard Time", "MST": "Macau Standard Time", "MYT": "Malaysia Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHAST": "Chatham Standard Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time"}, -+ locale: "en_BM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "$", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "HNPM": "HNPM", "HNT": "HNT", "COST": "COST", "TMT": "TMT", "NZST": "NZST", "AST": "AST", "LHST": "LHST", "CHADT": "CHADT", "HECU": "HECU", "WARST": "WARST", "∅∅∅": "∅∅∅", "JST": "JST", "HEPM": "HEPM", "ACWST": "ACWST", "MDT": "MDT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "PDT": "PDT", "HEPMX": "HEPMX", "WART": "WART", "WESZ": "WESZ", "WIB": "WIB", "MYT": "MYT", "HNPMX": "HNPMX", "AKDT": "AKDT", "HKST": "HKST", "CAT": "CAT", "BT": "BT", "WAST": "WAST", "EST": "EST", "EDT": "EDT", "CST": "CST", "ART": "ART", "UYST": "UYST", "WITA": "WITA", "NZDT": "NZDT", "BOT": "BOT", "SRT": "SRT", "HAST": "HAST", "VET": "VET", "ACST": "ACST", "HNEG": "HNEG", "OEZ": "OEZ", "CLT": "CLT", "MST": "MST", "GMT": "GMT", "ARST": "ARST", "MEZ": "MEZ", "UYT": "UYT", "HAT": "HAT", "HKT": "HKT", "CLST": "CLST", "AWST": "AWST", "WEZ": "WEZ", "SGT": "SGT", "GFT": "GFT", "CDT": "CDT", "ECT": "ECT", "EAT": "EAT", "HADT": "HADT", "AEST": "AEST", "OESZ": "OESZ", "MESZ": "MESZ", "HENOMX": "HENOMX", "WAT": "WAT", "SAST": "SAST", "AWDT": "AWDT", "WIT": "WIT", "ACDT": "ACDT", "JDT": "JDT", "ACWDT": "ACWDT", "AKST": "AKST", "GYT": "GYT", "TMST": "TMST", "ADT": "ADT", "ChST": "ChST", "CHAST": "CHAST", "PST": "PST", "COT": "COT", "HNOG": "HNOG", "HEOG": "HEOG", "IST": "IST", "HNCU": "HNCU"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_BM) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_BM) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_BM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_BM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_BM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_BM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BM' and handles both Whole and Real numbers based on 'v' - func (en *en_BM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BM' -@@ -278,56 +195,7 @@ func (en *en_BM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_BM' -@@ -336,84 +204,33 @@ func (en *en_BM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_BM' -+func (en *en_BM) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_BM' --func (en *en_BM) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_BM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_BM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_BM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_BM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_BM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_BM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_BM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_BS/en_BS.go b/en_BS/en_BS.go -index 56b2ef0..14d822e 100644 ---- a/en_BS/en_BS.go -+++ b/en_BS/en_BS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_BS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_BS' locale - func New() locales.Translator { - return &en_BS{ -- locale: "en_BS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "$", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WART": "Western Argentina Standard Time", "HNPMX": "Mexican Pacific Standard Time", "MYT": "Malaysia Time", "ACWST": "Australian Central Western Standard Time", "ACWDT": "Australian Central Western Daylight Time", "ARST": "Argentina Summer Time", "BOT": "Bolivia Time", "WAT": "West Africa Standard Time", "AEDT": "Australian Eastern Daylight Time", "ChST": "Chamorro Standard Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "HEOG": "West Greenland Summer Time", "HKST": "Hong Kong Summer Time", "NZST": "New Zealand Standard Time", "GMT": "Greenwich Mean Time", "BT": "Bhutan Time", "HNOG": "West Greenland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "MEZ": "Central European Standard Time", "CHADT": "Chatham Daylight Time", "OEZ": "Eastern European Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "EDT": "Eastern Daylight Time", "AEST": "Australian Eastern Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "AST": "Atlantic Standard Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "EST": "Eastern Standard Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "PDT": "Pacific Daylight Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "UYT": "Uruguay Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "SRT": "Suriname Time", "JDT": "Japan Daylight Time", "HNCU": "Cuba Standard Time", "TMT": "Turkmenistan Standard Time", "AKST": "Alaska Standard Time", "WIT": "Eastern Indonesia Time", "∅∅∅": "Amazon Summer Time", "JST": "Japan Standard Time", "COT": "Colombia Standard Time", "CST": "Central Standard Time", "PST": "Pacific Standard Time", "CAT": "Central Africa Time", "WAST": "West Africa Summer Time", "HEEG": "East Greenland Summer Time", "HNT": "Newfoundland Standard Time", "AWDT": "Australian Western Daylight Time", "SAST": "South Africa Standard Time", "HNEG": "East Greenland Standard Time", "TMST": "Turkmenistan Summer Time", "CDT": "Central Daylight Time", "AWST": "Australian Western Standard Time", "NZDT": "New Zealand Daylight Time", "EAT": "East Africa Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "HECU": "Cuba Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "ART": "Argentina Standard Time", "LHDT": "Lord Howe Daylight Time", "CHAST": "Chatham Standard Time", "GFT": "French Guiana Time", "ACDT": "Australian Central Daylight Time", "MST": "Macau Standard Time", "WESZ": "Western European Summer Time", "HAT": "Newfoundland Daylight Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "COST": "Colombia Summer Time", "WIB": "Western Indonesia Time", "IST": "India Standard Time", "ACST": "Australian Central Standard Time", "WARST": "Western Argentina Summer Time", "VET": "Venezuela Time", "WEZ": "Western European Standard Time", "WITA": "Central Indonesia Time", "LHST": "Lord Howe Standard Time"}, -+ locale: "en_BS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "$", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OESZ": "OESZ", "∅∅∅": "∅∅∅", "HKST": "HKST", "HEPM": "HEPM", "HEPMX": "HEPMX", "HNEG": "HNEG", "HEEG": "HEEG", "SGT": "SGT", "EAT": "EAT", "ACDT": "ACDT", "CST": "CST", "ECT": "ECT", "ADT": "ADT", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "WAST": "WAST", "COST": "COST", "TMT": "TMT", "GFT": "GFT", "WART": "WART", "CHAST": "CHAST", "ChST": "ChST", "JST": "JST", "EDT": "EDT", "TMST": "TMST", "ARST": "ARST", "BOT": "BOT", "BT": "BT", "SAST": "SAST", "GYT": "GYT", "WARST": "WARST", "WIT": "WIT", "AST": "AST", "GMT": "GMT", "ACST": "ACST", "JDT": "JDT", "LHST": "LHST", "LHDT": "LHDT", "MYT": "MYT", "AKST": "AKST", "HKT": "HKT", "CLST": "CLST", "NZDT": "NZDT", "ACWST": "ACWST", "VET": "VET", "HNCU": "HNCU", "AKDT": "AKDT", "HNT": "HNT", "CLT": "CLT", "NZST": "NZST", "AWDT": "AWDT", "WEZ": "WEZ", "EST": "EST", "CAT": "CAT", "AWST": "AWST", "PST": "PST", "HECU": "HECU", "WAT": "WAT", "MDT": "MDT", "MEZ": "MEZ", "UYT": "UYT", "UYST": "UYST", "IST": "IST", "MESZ": "MESZ", "CHADT": "CHADT", "MST": "MST", "HAST": "HAST", "HNPM": "HNPM", "AEST": "AEST", "AEDT": "AEDT", "WESZ": "WESZ", "COT": "COT", "HNOG": "HNOG", "HNPMX": "HNPMX", "OEZ": "OEZ", "HADT": "HADT", "HNNOMX": "HNNOMX", "PDT": "PDT", "CDT": "CDT", "ART": "ART", "WIB": "WIB", "SRT": "SRT", "HAT": "HAT", "HEOG": "HEOG", "WITA": "WITA"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_BS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BS) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_BS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BS) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_BS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BS) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_BS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BS' and handles both Whole and Real numbers based on 'v' - func (en *en_BS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BS' -@@ -278,56 +195,7 @@ func (en *en_BS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_BS' -@@ -336,84 +204,33 @@ func (en *en_BS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_BS' -+func (en *en_BS) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_BS' --func (en *en_BS) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_BS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_BS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_BS) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_BS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_BS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_BS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_BS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_BW/en_BW.go b/en_BW/en_BW.go -index 5e9d051..195e341 100644 ---- a/en_BW/en_BW.go -+++ b/en_BW/en_BW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_BW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_BW' locale - func New() locales.Translator { - return &en_BW{ -- locale: "en_BW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "P", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEPMX": "Mexican Pacific Daylight Time", "UYT": "Uruguay Standard Time", "PDT": "Pacific Daylight Time", "WAT": "West Africa Standard Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "SGT": "Singapore Standard Time", "ADT": "Atlantic Daylight Time", "AWST": "Australian Western Standard Time", "∅∅∅": "Amazon Summer Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "OESZ": "Eastern European Summer Time", "EAT": "East Africa Time", "WART": "Western Argentina Standard Time", "CDT": "Central Daylight Time", "VET": "Venezuela Time", "MESZ": "Central European Summer Time", "IST": "India Standard Time", "JST": "Japan Standard Time", "GFT": "French Guiana Time", "AST": "Atlantic Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "BOT": "Bolivia Time", "HECU": "Cuba Daylight Time", "WIB": "Western Indonesia Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "CAT": "Central Africa Time", "HADT": "Hawaii-Aleutian Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "EST": "Eastern Standard Time", "HAT": "Newfoundland Daylight Time", "CHADT": "Chatham Daylight Time", "MST": "Macau Standard Time", "ACWST": "Australian Central Western Standard Time", "AEDT": "Australian Eastern Daylight Time", "ACST": "Australian Central Standard Time", "OEZ": "Eastern European Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "WEZ": "Western European Standard Time", "MYT": "Malaysia Time", "CST": "Central Standard Time", "HNEG": "East Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "WESZ": "Western European Summer Time", "ARST": "Argentina Summer Time", "WITA": "Central Indonesia Time", "MEZ": "Central European Standard Time", "CLST": "Chile Summer Time", "BT": "Bhutan Time", "CHAST": "Chatham Standard Time", "SAST": "South Africa Standard Time", "AKDT": "Alaska Daylight Time", "WIT": "Eastern Indonesia Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "NZST": "New Zealand Standard Time", "MDT": "Macau Summer Time", "PST": "Pacific Standard Time", "HNT": "Newfoundland Standard Time", "HKT": "Hong Kong Standard Time", "CLT": "Chile Standard Time", "HNPMX": "Mexican Pacific Standard Time", "SRT": "Suriname Time", "HKST": "Hong Kong Summer Time", "HNCU": "Cuba Standard Time", "EDT": "Eastern Daylight Time", "UYST": "Uruguay Summer Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "TMST": "Turkmenistan Summer Time", "GMT": "Greenwich Mean Time", "GYT": "Guyana Time", "ART": "Argentina Standard Time", "WAST": "West Africa Summer Time", "COT": "Colombia Standard Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "AEST": "Australian Eastern Standard Time", "HENOMX": "Northwest Mexico Daylight Time"}, -+ locale: "en_BW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "P", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNPM": "HNPM", "HNPMX": "HNPMX", "OESZ": "OESZ", "WIT": "WIT", "ADT": "ADT", "WIB": "WIB", "HEEG": "HEEG", "MYT": "MYT", "IST": "IST", "PDT": "PDT", "ACWDT": "ACWDT", "AKDT": "AKDT", "HNOG": "HNOG", "BT": "BT", "SRT": "SRT", "ACDT": "ACDT", "HEPM": "HEPM", "JST": "JST", "WAT": "WAT", "NZST": "NZST", "EAT": "EAT", "HAST": "HAST", "CHAST": "CHAST", "GYT": "GYT", "HADT": "HADT", "HNEG": "HNEG", "PST": "PST", "HAT": "HAT", "CLST": "CLST", "WITA": "WITA", "MST": "MST", "GMT": "GMT", "ACWST": "ACWST", "WEZ": "WEZ", "OEZ": "OEZ", "EST": "EST", "HKT": "HKT", "CLT": "CLT", "CST": "CST", "LHST": "LHST", "CHADT": "CHADT", "SGT": "SGT", "COT": "COT", "BOT": "BOT", "MESZ": "MESZ", "JDT": "JDT", "CDT": "CDT", "UYST": "UYST", "VET": "VET", "MDT": "MDT", "ARST": "ARST", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "HNT": "HNT", "TMT": "TMT", "CAT": "CAT", "NZDT": "NZDT", "ChST": "ChST", "LHDT": "LHDT", "AEST": "AEST", "SAST": "SAST", "TMST": "TMST", "AST": "AST", "ACST": "ACST", "WAST": "WAST", "AKST": "AKST", "GFT": "GFT", "WART": "WART", "EDT": "EDT", "HEOG": "HEOG", "MEZ": "MEZ", "AWST": "AWST", "AWDT": "AWDT", "UYT": "UYT", "WESZ": "WESZ", "HNCU": "HNCU", "HECU": "HECU", "AEDT": "AEDT", "WARST": "WARST", "COST": "COST", "ECT": "ECT", "HKST": "HKST", "ART": "ART"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_BW) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_BW) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_BW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BW) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_BW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BW) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_BW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BW) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_BW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BW' and handles both Whole and Real numbers based on 'v' - func (en *en_BW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BW' -@@ -278,56 +195,7 @@ func (en *en_BW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_BW' -@@ -336,68 +204,7 @@ func (en *en_BW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_BW' -diff --git a/en_BZ/en_BZ.go b/en_BZ/en_BZ.go -index 474d45c..36b9325 100644 ---- a/en_BZ/en_BZ.go -+++ b/en_BZ/en_BZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_BZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_BZ' locale - func New() locales.Translator { - return &en_BZ{ -- locale: "en_BZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "$", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"PDT": "Pacific Daylight Time", "SAST": "South Africa Standard Time", "HKST": "Hong Kong Summer Time", "MESZ": "Central European Summer Time", "CAT": "Central Africa Time", "HECU": "Cuba Daylight Time", "WESZ": "Western European Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HEOG": "West Greenland Summer Time", "MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "AST": "Atlantic Standard Time", "HEEG": "East Greenland Summer Time", "OEZ": "Eastern European Standard Time", "HNCU": "Cuba Standard Time", "LHST": "Lord Howe Standard Time", "TMT": "Turkmenistan Standard Time", "ECT": "Ecuador Time", "EDT": "Eastern Daylight Time", "UYST": "Uruguay Summer Time", "WIT": "Eastern Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "WEZ": "Western European Standard Time", "∅∅∅": "Amazon Summer Time", "WIB": "Western Indonesia Time", "AEST": "Australian Eastern Standard Time", "OESZ": "Eastern European Summer Time", "UYT": "Uruguay Standard Time", "CLT": "Chile Standard Time", "MDT": "Macau Summer Time", "EST": "Eastern Standard Time", "HNT": "Newfoundland Standard Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "GYT": "Guyana Time", "ART": "Argentina Standard Time", "HKT": "Hong Kong Standard Time", "AKDT": "Alaska Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "BOT": "Bolivia Time", "COT": "Colombia Standard Time", "SGT": "Singapore Standard Time", "BT": "Bhutan Time", "ACWST": "Australian Central Western Standard Time", "WITA": "Central Indonesia Time", "CST": "Central Standard Time", "ACST": "Australian Central Standard Time", "HAT": "Newfoundland Daylight Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "AWDT": "Australian Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "ChST": "Chamorro Standard Time", "VET": "Venezuela Time", "SRT": "Suriname Time", "ARST": "Argentina Summer Time", "ACDT": "Australian Central Daylight Time", "EAT": "East Africa Time", "COST": "Colombia Summer Time", "WART": "Western Argentina Standard Time", "HNPMX": "Mexican Pacific Standard Time", "PST": "Pacific Standard Time", "GFT": "French Guiana Time", "TMST": "Turkmenistan Summer Time", "CDT": "Central Daylight Time", "MYT": "Malaysia Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CHADT": "Chatham Daylight Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "WARST": "Western Argentina Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "ADT": "Atlantic Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "AWST": "Australian Western Standard Time", "MEZ": "Central European Standard Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HNOG": "West Greenland Standard Time", "CLST": "Chile Summer Time", "JST": "Japan Standard Time", "WAST": "West Africa Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time"}, -+ locale: "en_BZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "$", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACDT": "ACDT", "HNPM": "HNPM", "AKST": "AKST", "WARST": "WARST", "HKST": "HKST", "TMT": "TMT", "GMT": "GMT", "LHST": "LHST", "AEDT": "AEDT", "HNCU": "HNCU", "GFT": "GFT", "EAT": "EAT", "WESZ": "WESZ", "OEZ": "OEZ", "TMST": "TMST", "AST": "AST", "AWDT": "AWDT", "JDT": "JDT", "ACWDT": "ACWDT", "AEST": "AEST", "WIT": "WIT", "CLST": "CLST", "CST": "CST", "AWST": "AWST", "WAST": "WAST", "HKT": "HKT", "HENOMX": "HENOMX", "JST": "JST", "∅∅∅": "∅∅∅", "HNT": "HNT", "SRT": "SRT", "MESZ": "MESZ", "CHADT": "CHADT", "UYST": "UYST", "WAT": "WAT", "SAST": "SAST", "HNOG": "HNOG", "MST": "MST", "HEEG": "HEEG", "IST": "IST", "COST": "COST", "NZDT": "NZDT", "ECT": "ECT", "WIB": "WIB", "HNEG": "HNEG", "PST": "PST", "CHAST": "CHAST", "CDT": "CDT", "ART": "ART", "LHDT": "LHDT", "HEPM": "HEPM", "BT": "BT", "ACWST": "ACWST", "OESZ": "OESZ", "EST": "EST", "EDT": "EDT", "HADT": "HADT", "VET": "VET", "COT": "COT", "HEOG": "HEOG", "ChST": "ChST", "HNNOMX": "HNNOMX", "CLT": "CLT", "WITA": "WITA", "MEZ": "MEZ", "MYT": "MYT", "CAT": "CAT", "ADT": "ADT", "ACST": "ACST", "ARST": "ARST", "SGT": "SGT", "HECU": "HECU", "HEPMX": "HEPMX", "HAT": "HAT", "MDT": "MDT", "NZST": "NZST", "GYT": "GYT", "BOT": "BOT", "PDT": "PDT", "UYT": "UYT", "WEZ": "WEZ", "HNPMX": "HNPMX", "AKDT": "AKDT", "WART": "WART", "HAST": "HAST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_BZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_BZ) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_BZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_BZ) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_BZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_BZ) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_BZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_BZ' and handles both Whole and Real numbers based on 'v' - func (en *en_BZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_BZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_BZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_BZ' -@@ -278,56 +195,7 @@ func (en *en_BZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_BZ' -@@ -336,68 +204,7 @@ func (en *en_BZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_BZ' -diff --git a/en_CA/en_CA.go b/en_CA/en_CA.go -index 0815669..ad0203e 100644 ---- a/en_CA/en_CA.go -+++ b/en_CA/en_CA.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_CA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_CA' locale - func New() locales.Translator { - return &en_CA{ -- locale: "en_CA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "$", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNT": "Newfoundland Standard Time", "ChST": "Chamorro Standard Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "TMT": "Turkmenistan Standard Time", "WAT": "West Africa Standard Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "UYST": "Uruguay Summer Time", "JST": "Japan Standard Time", "WIT": "Eastern Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "AEDT": "Australian Eastern Daylight Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time", "HECU": "Cuba Daylight Time", "MYT": "Malaysia Time", "SRT": "Suriname Time", "WITA": "Central Indonesia Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "COT": "Colombia Standard Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "TMST": "Turkmenistan Summer Time", "ECT": "Ecuador Time", "WEZ": "Western European Standard Time", "HNEG": "East Greenland Standard Time", "COST": "Colombia Summer Time", "ADT": "Atlantic Daylight Time", "AKDT": "Alaska Daylight Time", "ACWST": "Australian Central Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "GFT": "French Guiana Time", "ACST": "Australian Central Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HKT": "Hong Kong Standard Time", "OESZ": "Eastern European Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "UYT": "Uruguay Standard Time", "CDT": "Central Daylight Time", "HNOG": "West Greenland Standard Time", "OEZ": "Eastern European Standard Time", "EDT": "Eastern Daylight Time", "AST": "Atlantic Standard Time", "LHDT": "Lord Howe Daylight Time", "GMT": "Greenwich Mean Time", "HNCU": "Cuba Standard Time", "CST": "Central Standard Time", "WAST": "West Africa Summer Time", "HNPMX": "Mexican Pacific Standard Time", "HKST": "Hong Kong Summer Time", "MESZ": "Central European Summer Time", "CAT": "Central Africa Time", "EAT": "East Africa Time", "SGT": "Singapore Standard Time", "EST": "Eastern Standard Time", "HEOG": "West Greenland Summer Time", "JDT": "Japan Daylight Time", "WIB": "Western Indonesia Time", "WESZ": "Western European Summer Time", "HAT": "Newfoundland Daylight Time", "AEST": "Australian Eastern Standard Time", "AWST": "Australian Western Standard Time", "MEZ": "Central European Standard Time", "BOT": "Bolivia Time", "MST": "Macau Standard Time", "PST": "Pacific Standard Time", "PDT": "Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "CHADT": "Chatham Daylight Time"}, -+ locale: "en_CA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "$", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MYT": "MYT", "HNPMX": "HNPMX", "WITA": "WITA", "HENOMX": "HENOMX", "PST": "PST", "CHADT": "CHADT", "OEZ": "OEZ", "COT": "COT", "AST": "AST", "MESZ": "MESZ", "ACDT": "ACDT", "JDT": "JDT", "ACWDT": "ACWDT", "CHAST": "CHAST", "WIT": "WIT", "COST": "COST", "PDT": "PDT", "AKST": "AKST", "OESZ": "OESZ", "JST": "JST", "HNCU": "HNCU", "HECU": "HECU", "SRT": "SRT", "BT": "BT", "ACWST": "ACWST", "WEZ": "WEZ", "HNT": "HNT", "HKT": "HKT", "HKST": "HKST", "ARST": "ARST", "HAST": "HAST", "ACST": "ACST", "LHST": "LHST", "HEPM": "HEPM", "UYT": "UYT", "HEOG": "HEOG", "NZDT": "NZDT", "ChST": "ChST", "HNEG": "HNEG", "HAT": "HAT", "TMT": "TMT", "NZST": "NZST", "AWST": "AWST", "AWDT": "AWDT", "AKDT": "AKDT", "EDT": "EDT", "MDT": "MDT", "EAT": "EAT", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "AEST": "AEST", "ECT": "ECT", "ART": "ART", "EST": "EST", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "VET": "VET", "WAST": "WAST", "GFT": "GFT", "WART": "WART", "WIB": "WIB", "BOT": "BOT", "LHDT": "LHDT", "HNOG": "HNOG", "CLT": "CLT", "IST": "IST", "WESZ": "WESZ", "TMST": "TMST", "HEEG": "HEEG", "ADT": "ADT", "UYST": "UYST", "WAT": "WAT", "WARST": "WARST", "SAST": "SAST", "CAT": "CAT", "CST": "CST", "CDT": "CDT", "SGT": "SGT", "HEPMX": "HEPMX", "GYT": "GYT", "CLST": "CLST", "MST": "MST", "GMT": "GMT", "HADT": "HADT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_CA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CA) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_CA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CA) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_CA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CA) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_CA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CA' and handles both Whole and Real numbers based on 'v' - func (en *en_CA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CA' -@@ -278,56 +195,7 @@ func (en *en_CA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_CA' -@@ -336,68 +204,7 @@ func (en *en_CA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_CA' -@@ -494,13 +301,11 @@ func (en *en_CA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -508,13 +313,6 @@ func (en *en_CA) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -524,13 +322,11 @@ func (en *en_CA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -545,13 +341,6 @@ func (en *en_CA) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -561,13 +350,11 @@ func (en *en_CA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -584,14 +371,6 @@ func (en *en_CA) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -603,13 +382,11 @@ func (en *en_CA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -626,14 +403,6 @@ func (en *en_CA) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_CC/en_CC.go b/en_CC/en_CC.go -index 2b72d55..fed0636 100644 ---- a/en_CC/en_CC.go -+++ b/en_CC/en_CC.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_CC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_CC' locale - func New() locales.Translator { - return &en_CC{ -- locale: "en_CC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HKT": "Hong Kong Standard Time", "HNEG": "East Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "OEZ": "Eastern European Standard Time", "WAT": "West Africa Standard Time", "UYST": "Uruguay Summer Time", "WIT": "Eastern Indonesia Time", "WAST": "West Africa Summer Time", "SGT": "Singapore Standard Time", "ART": "Argentina Standard Time", "PDT": "Pacific Daylight Time", "ACWST": "Australian Central Western Standard Time", "JST": "Japan Standard Time", "TMST": "Turkmenistan Summer Time", "ACST": "Australian Central Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "GYT": "Guyana Time", "HNOG": "West Greenland Standard Time", "WITA": "Central Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "CHADT": "Chatham Daylight Time", "LHDT": "Lord Howe Daylight Time", "WART": "Western Argentina Standard Time", "ADT": "Atlantic Daylight Time", "EDT": "Eastern Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "HNT": "Newfoundland Standard Time", "HEOG": "West Greenland Summer Time", "PST": "Pacific Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CLST": "Chile Summer Time", "HNCU": "Cuba Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HKST": "Hong Kong Summer Time", "ECT": "Ecuador Time", "WARST": "Western Argentina Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "GFT": "French Guiana Time", "BOT": "Bolivia Time", "HAT": "Newfoundland Daylight Time", "NZST": "New Zealand Standard Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "COT": "Colombia Standard Time", "EST": "Eastern Standard Time", "ARST": "Argentina Summer Time", "CLT": "Chile Standard Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "BT": "Bhutan Time", "CHAST": "Chatham Standard Time", "TMT": "Turkmenistan Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HECU": "Cuba Daylight Time", "CST": "Central Standard Time", "SRT": "Suriname Time", "HEEG": "East Greenland Summer Time", "AST": "Atlantic Standard Time", "GMT": "Greenwich Mean Time", "WIB": "Western Indonesia Time", "AWDT": "Australian Western Daylight Time", "MEZ": "Central European Standard Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "EAT": "East Africa Time", "AEST": "Australian Eastern Standard Time", "∅∅∅": "Amazon Summer Time", "MYT": "Malaysia Time", "UYT": "Uruguay Standard Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHST": "Lord Howe Standard Time", "CAT": "Central Africa Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "WEZ": "Western European Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MESZ": "Central European Summer Time", "CDT": "Central Daylight Time", "AKST": "Alaska Standard Time"}, -+ locale: "en_CC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EAT": "EAT", "ACDT": "ACDT", "AWDT": "AWDT", "GYT": "GYT", "HEOG": "HEOG", "MST": "MST", "ARST": "ARST", "∅∅∅": "∅∅∅", "EST": "EST", "HEEG": "HEEG", "LHST": "LHST", "HNT": "HNT", "WART": "WART", "COT": "COT", "HNOG": "HNOG", "CHADT": "CHADT", "ACWST": "ACWST", "VET": "VET", "WAST": "WAST", "MDT": "MDT", "NZDT": "NZDT", "ADT": "ADT", "CHAST": "CHAST", "WARST": "WARST", "COST": "COST", "HKST": "HKST", "ECT": "ECT", "MYT": "MYT", "HNCU": "HNCU", "AKDT": "AKDT", "OEZ": "OEZ", "HAT": "HAT", "TMT": "TMT", "JDT": "JDT", "ACWDT": "ACWDT", "WESZ": "WESZ", "HNPMX": "HNPMX", "HKT": "HKT", "WIB": "WIB", "UYST": "UYST", "PST": "PST", "WEZ": "WEZ", "WIT": "WIT", "ART": "ART", "IST": "IST", "BT": "BT", "ACST": "ACST", "JST": "JST", "HECU": "HECU", "WAT": "WAT", "SAST": "SAST", "HAST": "HAST", "HADT": "HADT", "TMST": "TMST", "CLT": "CLT", "AST": "AST", "HNNOMX": "HNNOMX", "PDT": "PDT", "CST": "CST", "NZST": "NZST", "AWST": "AWST", "UYT": "UYT", "AKST": "AKST", "HNEG": "HNEG", "LHDT": "LHDT", "HNPM": "HNPM", "ChST": "ChST", "BOT": "BOT", "MEZ": "MEZ", "HEPM": "HEPM", "GFT": "GFT", "EDT": "EDT", "CLST": "CLST", "AEST": "AEST", "AEDT": "AEDT", "SGT": "SGT", "HEPMX": "HEPMX", "CAT": "CAT", "GMT": "GMT", "SRT": "SRT", "HENOMX": "HENOMX", "OESZ": "OESZ", "WITA": "WITA", "CDT": "CDT", "MESZ": "MESZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_CC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CC) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_CC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CC) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_CC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CC) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_CC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CC' and handles both Whole and Real numbers based on 'v' - func (en *en_CC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CC' -@@ -278,56 +195,7 @@ func (en *en_CC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_CC' -@@ -336,84 +204,33 @@ func (en *en_CC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_CC' -+func (en *en_CC) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_CC' --func (en *en_CC) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_CC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_CC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_CC) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_CH/en_CH.go b/en_CH/en_CH.go -index 48bbd6b..fd037e2 100644 ---- a/en_CH/en_CH.go -+++ b/en_CH/en_CH.go -@@ -48,30 +48,11 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: "-", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WITA": "Central Indonesia Time", "NZST": "New Zealand Standard Time", "BOT": "Bolivia Time", "HNEG": "East Greenland Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "JDT": "Japan Daylight Time", "MDT": "Macau Summer Time", "HEOG": "West Greenland Summer Time", "TMST": "Turkmenistan Summer Time", "HEEG": "East Greenland Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "HAT": "Newfoundland Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "JST": "Japan Standard Time", "HNCU": "Cuba Standard Time", "EST": "Eastern Standard Time", "AWST": "Australian Western Standard Time", "HKST": "Hong Kong Summer Time", "WIT": "Eastern Indonesia Time", "ACDT": "Australian Central Daylight Time", "OEZ": "Eastern European Standard Time", "UYT": "Uruguay Standard Time", "PST": "Pacific Standard Time", "NZDT": "New Zealand Daylight Time", "CLST": "Chile Summer Time", "GFT": "French Guiana Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "VET": "Venezuela Time", "HNOG": "West Greenland Standard Time", "AWDT": "Australian Western Daylight Time", "WARST": "Western Argentina Summer Time", "AST": "Atlantic Standard Time", "WESZ": "Western European Summer Time", "MEZ": "Central European Standard Time", "ChST": "Chamorro Standard Time", "MYT": "Malaysia Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "WART": "Western Argentina Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "MST": "Macau Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "WAT": "West Africa Standard Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "WAST": "West Africa Summer Time", "GMT": "Greenwich Mean Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "MESZ": "Central European Summer Time", "LHST": "Lord Howe Standard Time", "TMT": "Turkmenistan Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "OESZ": "Eastern European Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "EDT": "Eastern Daylight Time", "SRT": "Suriname Time", "∅∅∅": "Amazon Summer Time", "CAT": "Central Africa Time", "EAT": "East Africa Time", "WIB": "Western Indonesia Time", "HKT": "Hong Kong Standard Time", "CHAST": "Chatham Standard Time", "CHADT": "Chatham Daylight Time", "ACST": "Australian Central Standard Time", "COST": "Colombia Summer Time", "HECU": "Cuba Daylight Time", "ADT": "Atlantic Daylight Time", "AKST": "Alaska Standard Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HNT": "Newfoundland Standard Time"}, -+ timezones: map[string]string{"CHADT": "CHADT", "ACWDT": "ACWDT", "AEST": "AEST", "SGT": "SGT", "COT": "COT", "MDT": "MDT", "HADT": "HADT", "HNPM": "HNPM", "CDT": "CDT", "ARST": "ARST", "VET": "VET", "WAST": "WAST", "AST": "AST", "GMT": "GMT", "PDT": "PDT", "BT": "BT", "MYT": "MYT", "ACDT": "ACDT", "HENOMX": "HENOMX", "LHST": "LHST", "HNT": "HNT", "NZDT": "NZDT", "ADT": "ADT", "MEZ": "MEZ", "WITA": "WITA", "NZST": "NZST", "ChST": "ChST", "EAT": "EAT", "JDT": "JDT", "MST": "MST", "HAST": "HAST", "MESZ": "MESZ", "LHDT": "LHDT", "CHAST": "CHAST", "PST": "PST", "GYT": "GYT", "COST": "COST", "∅∅∅": "∅∅∅", "CST": "CST", "OESZ": "OESZ", "WIT": "WIT", "AEDT": "AEDT", "WAT": "WAT", "HECU": "HECU", "AKST": "AKST", "HKT": "HKT", "CLT": "CLT", "HEEG": "HEEG", "IST": "IST", "SRT": "SRT", "AWDT": "AWDT", "UYT": "UYT", "HNPMX": "HNPMX", "OEZ": "OEZ", "HNOG": "HNOG", "EDT": "EDT", "CLST": "CLST", "EST": "EST", "TMST": "TMST", "AWST": "AWST", "WEZ": "WEZ", "UYST": "UYST", "HNCU": "HNCU", "HEPMX": "HEPMX", "AKDT": "AKDT", "WARST": "WARST", "WIB": "WIB", "HNEG": "HNEG", "HEPM": "HEPM", "HKST": "HKST", "BOT": "BOT", "ACST": "ACST", "WESZ": "WESZ", "JST": "JST", "HAT": "HAT", "SAST": "SAST", "HEOG": "HEOG", "CAT": "CAT", "ART": "ART", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "GFT": "GFT", "WART": "WART", "TMT": "TMT", "ECT": "ECT"}, - } - } -  -@@ -138,7 +119,7 @@ func (en *en_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CH) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +129,7 @@ func (en *en_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CH) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +139,7 @@ func (en *en_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CH) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +185,13 @@ func (en *en_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CH' and handles both Whole and Real numbers based on 'v' - func (en *en_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CH' -@@ -278,7 +199,7 @@ func (en *en_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -340,7 +261,7 @@ func (en *en_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -409,17 +330,6 @@ func (en *en_CH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -428,17 +338,6 @@ func (en *en_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -447,17 +346,6 @@ func (en *en_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,19 +354,6 @@ func (en *en_CH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -487,28 +362,6 @@ func (en *en_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -517,35 +370,6 @@ func (en *en_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -554,40 +378,6 @@ func (en *en_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -596,44 +386,5 @@ func (en *en_CH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_CK/en_CK.go b/en_CK/en_CK.go -index 63557a2..ddc2184 100644 ---- a/en_CK/en_CK.go -+++ b/en_CK/en_CK.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_CK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_CK' locale - func New() locales.Translator { - return &en_CK{ -- locale: "en_CK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "WIB": "Western Indonesia Time", "PST": "Pacific Standard Time", "MESZ": "Central European Summer Time", "WAST": "West Africa Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HECU": "Cuba Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HNEG": "East Greenland Standard Time", "ECT": "Ecuador Time", "COST": "Colombia Summer Time", "HNCU": "Cuba Standard Time", "MDT": "Macau Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "ART": "Argentina Standard Time", "JDT": "Japan Daylight Time", "WAT": "West Africa Standard Time", "OESZ": "Eastern European Summer Time", "COT": "Colombia Standard Time", "EST": "Eastern Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HEOG": "West Greenland Summer Time", "AWDT": "Australian Western Daylight Time", "MEZ": "Central European Standard Time", "LHDT": "Lord Howe Daylight Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "CAT": "Central Africa Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "PDT": "Pacific Daylight Time", "ARST": "Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "NZDT": "New Zealand Daylight Time", "GFT": "French Guiana Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "ACDT": "Australian Central Daylight Time", "WIT": "Eastern Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "AEST": "Australian Eastern Standard Time", "HKST": "Hong Kong Summer Time", "CHADT": "Chatham Daylight Time", "EAT": "East Africa Time", "EDT": "Eastern Daylight Time", "MYT": "Malaysia Time", "BT": "Bhutan Time", "HEEG": "East Greenland Summer Time", "UYST": "Uruguay Summer Time", "CST": "Central Standard Time", "GYT": "Guyana Time", "AWST": "Australian Western Standard Time", "HKT": "Hong Kong Standard Time", "BOT": "Bolivia Time", "ACST": "Australian Central Standard Time", "CDT": "Central Daylight Time", "WEZ": "Western European Standard Time", "HNOG": "West Greenland Standard Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "ADT": "Atlantic Daylight Time", "SRT": "Suriname Time", "HNT": "Newfoundland Standard Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "WARST": "Western Argentina Summer Time", "AKST": "Alaska Standard Time", "WITA": "Central Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "∅∅∅": "Amazon Summer Time", "JST": "Japan Standard Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "ACWST": "Australian Central Western Standard Time", "OEZ": "Eastern European Standard Time", "UYT": "Uruguay Standard Time", "AST": "Atlantic Standard Time", "HAT": "Newfoundland Daylight Time"}, -+ locale: "en_CK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PDT": "PDT", "AKST": "AKST", "TMST": "TMST", "HAST": "HAST", "ACDT": "ACDT", "HEEG": "HEEG", "AWDT": "AWDT", "JDT": "JDT", "GYT": "GYT", "HKST": "HKST", "CLT": "CLT", "SAST": "SAST", "WIT": "WIT", "GMT": "GMT", "ChST": "ChST", "ART": "ART", "ARST": "ARST", "UYST": "UYST", "WART": "WART", "HKT": "HKT", "CAT": "CAT", "AST": "AST", "MESZ": "MESZ", "VET": "VET", "NZST": "NZST", "ECT": "ECT", "ADT": "ADT", "WAST": "WAST", "OESZ": "OESZ", "EST": "EST", "TMT": "TMT", "EAT": "EAT", "HNEG": "HNEG", "HENOMX": "HENOMX", "IST": "IST", "GFT": "GFT", "MST": "MST", "WIB": "WIB", "HNNOMX": "HNNOMX", "LHST": "LHST", "ACWDT": "ACWDT", "COST": "COST", "MDT": "MDT", "MEZ": "MEZ", "ACWST": "ACWST", "AKDT": "AKDT", "HEOG": "HEOG", "CLST": "CLST", "SGT": "SGT", "HNCU": "HNCU", "OEZ": "OEZ", "WARST": "WARST", "COT": "COT", "HAT": "HAT", "∅∅∅": "∅∅∅", "HEPM": "HEPM", "BT": "BT", "AEST": "AEST", "CHADT": "CHADT", "HNT": "HNT", "HADT": "HADT", "HNPM": "HNPM", "UYT": "UYT", "WESZ": "WESZ", "HEPMX": "HEPMX", "WAT": "WAT", "EDT": "EDT", "WITA": "WITA", "CST": "CST", "BOT": "BOT", "JST": "JST", "SRT": "SRT", "LHDT": "LHDT", "MYT": "MYT", "AEDT": "AEDT", "HNOG": "HNOG", "CDT": "CDT", "ACST": "ACST", "CHAST": "CHAST", "WEZ": "WEZ", "NZDT": "NZDT", "AWST": "AWST", "PST": "PST", "HECU": "HECU", "HNPMX": "HNPMX"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_CK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CK) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_CK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CK) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_CK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CK) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_CK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CK' and handles both Whole and Real numbers based on 'v' - func (en *en_CK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CK' -@@ -278,56 +195,7 @@ func (en *en_CK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_CK' -@@ -336,84 +204,33 @@ func (en *en_CK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_CK' -+func (en *en_CK) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_CK' --func (en *en_CK) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_CK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_CK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_CK) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_CM/en_CM.go b/en_CM/en_CM.go -index 6b0ddbb..343e48d 100644 ---- a/en_CM/en_CM.go -+++ b/en_CM/en_CM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_CM' locale - func New() locales.Translator { - return &en_CM{ -- locale: "en_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"JST": "Japan Standard Time", "TMT": "Turkmenistan Standard Time", "BOT": "Bolivia Time", "HNCU": "Cuba Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "VET": "Venezuela Time", "ART": "Argentina Standard Time", "WESZ": "Western European Summer Time", "AEST": "Australian Eastern Standard Time", "MEZ": "Central European Standard Time", "ACDT": "Australian Central Daylight Time", "CAT": "Central Africa Time", "HENOMX": "Northwest Mexico Daylight Time", "SRT": "Suriname Time", "HEOG": "West Greenland Summer Time", "AKST": "Alaska Standard Time", "ACWDT": "Australian Central Western Daylight Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "ACST": "Australian Central Standard Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "CDT": "Central Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "WAT": "West Africa Standard Time", "HNPMX": "Mexican Pacific Standard Time", "PST": "Pacific Standard Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "TMST": "Turkmenistan Summer Time", "OESZ": "Eastern European Summer Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "AWST": "Australian Western Standard Time", "NZST": "New Zealand Standard Time", "CLST": "Chile Summer Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "ACWST": "Australian Central Western Standard Time", "∅∅∅": "Amazon Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "MST": "Macau Standard Time", "GFT": "French Guiana Time", "MESZ": "Central European Summer Time", "HKT": "Hong Kong Standard Time", "JDT": "Japan Daylight Time", "CST": "Central Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HAT": "Newfoundland Daylight Time", "HNOG": "West Greenland Standard Time", "WEZ": "Western European Standard Time", "CLT": "Chile Standard Time", "GYT": "Guyana Time", "UYT": "Uruguay Standard Time", "WIT": "Eastern Indonesia Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "WAST": "West Africa Summer Time", "COT": "Colombia Standard Time", "HECU": "Cuba Daylight Time", "HEEG": "East Greenland Summer Time", "OEZ": "Eastern European Standard Time", "MDT": "Macau Summer Time", "ARST": "Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "NZDT": "New Zealand Daylight Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "EST": "Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "ECT": "Ecuador Time", "WART": "Western Argentina Standard Time", "ADT": "Atlantic Daylight Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "HNT": "Newfoundland Standard Time", "PDT": "Pacific Daylight Time", "HKST": "Hong Kong Summer Time"}, -+ locale: "en_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MST": "MST", "HENOMX": "HENOMX", "CHADT": "CHADT", "UYT": "UYT", "UYST": "UYST", "WAT": "WAT", "GFT": "GFT", "CDT": "CDT", "GMT": "GMT", "WIT": "WIT", "CST": "CST", "ECT": "ECT", "MESZ": "MESZ", "AWDT": "AWDT", "BT": "BT", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "COT": "COT", "ACWST": "ACWST", "HNT": "HNT", "GYT": "GYT", "HKT": "HKT", "MDT": "MDT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "HNPMX": "HNPMX", "HAST": "HAST", "HEEG": "HEEG", "AWST": "AWST", "OESZ": "OESZ", "TMT": "TMT", "TMST": "TMST", "WIB": "WIB", "BOT": "BOT", "HKST": "HKST", "ACST": "ACST", "LHST": "LHST", "LHDT": "LHDT", "JST": "JST", "JDT": "JDT", "CHAST": "CHAST", "HNOG": "HNOG", "ART": "ART", "WARST": "WARST", "ACDT": "ACDT", "HNEG": "HNEG", "PST": "PST", "VET": "VET", "HEPMX": "HEPMX", "AKST": "AKST", "HAT": "HAT", "HADT": "HADT", "EDT": "EDT", "ADT": "ADT", "HNPM": "HNPM", "ACWDT": "ACWDT", "SAST": "SAST", "AEDT": "AEDT", "EST": "EST", "CLST": "CLST", "MEZ": "MEZ", "HEPM": "HEPM", "PDT": "PDT", "AEST": "AEST", "CLT": "CLT", "IST": "IST", "HNCU": "HNCU", "AKDT": "AKDT", "WART": "WART", "NZST": "NZST", "AST": "AST", "HECU": "HECU", "CAT": "CAT", "ChST": "ChST", "ARST": "ARST", "SRT": "SRT", "EAT": "EAT", "WAST": "WAST", "WITA": "WITA", "MYT": "MYT", "WEZ": "WEZ", "SGT": "SGT", "COST": "COST", "HEOG": "HEOG"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CM' and handles both Whole and Real numbers based on 'v' - func (en *en_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CM' -@@ -278,56 +195,7 @@ func (en *en_CM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_CM' -@@ -336,84 +204,33 @@ func (en *en_CM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_CM' -+func (en *en_CM) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_CM' --func (en *en_CM) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_CM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_CX/en_CX.go b/en_CX/en_CX.go -index 5638e6e..0806da5 100644 ---- a/en_CX/en_CX.go -+++ b/en_CX/en_CX.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_CX struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_CX' locale - func New() locales.Translator { - return &en_CX{ -- locale: "en_CX", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"SRT": "Suriname Time", "ART": "Argentina Standard Time", "CHAST": "Chatham Standard Time", "HECU": "Cuba Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "ADT": "Atlantic Daylight Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "CHADT": "Chatham Daylight Time", "JST": "Japan Standard Time", "ECT": "Ecuador Time", "∅∅∅": "Peru Summer Time", "PDT": "Pacific Daylight Time", "MEZ": "Central European Standard Time", "LHDT": "Lord Howe Daylight Time", "AKDT": "Alaska Daylight Time", "VET": "Venezuela Time", "HEOG": "West Greenland Summer Time", "GFT": "French Guiana Time", "MESZ": "Central European Summer Time", "IST": "India Standard Time", "TMT": "Turkmenistan Standard Time", "WAT": "West Africa Standard Time", "OEZ": "Eastern European Standard Time", "WART": "Western Argentina Standard Time", "AKST": "Alaska Standard Time", "UYT": "Uruguay Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AWST": "Australian Western Standard Time", "ACST": "Australian Central Standard Time", "PST": "Pacific Standard Time", "AEDT": "Australian Eastern Daylight Time", "JDT": "Japan Daylight Time", "CLT": "Chile Standard Time", "HEEG": "East Greenland Summer Time", "CAT": "Central Africa Time", "HNNOMX": "Northwest Mexico Standard Time", "MDT": "Macau Summer Time", "WIT": "Eastern Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "GMT": "Greenwich Mean Time", "AEST": "Australian Eastern Standard Time", "CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "SAST": "South Africa Standard Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HNT": "Newfoundland Standard Time", "COT": "Colombia Standard Time", "SGT": "Singapore Standard Time", "EDT": "Eastern Daylight Time", "GYT": "Guyana Time", "HAT": "Newfoundland Daylight Time", "AWDT": "Australian Western Daylight Time", "ChST": "Chamorro Standard Time", "ACDT": "Australian Central Daylight Time", "WAST": "West Africa Summer Time", "ACWST": "Australian Central Western Standard Time", "WITA": "Central Indonesia Time", "TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time", "AST": "Atlantic Standard Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "HKST": "Hong Kong Summer Time", "NZDT": "New Zealand Daylight Time", "HNCU": "Cuba Standard Time", "ARST": "Argentina Summer Time", "WESZ": "Western European Summer Time", "HKT": "Hong Kong Standard Time", "NZST": "New Zealand Standard Time", "HNOG": "West Greenland Standard Time", "WEZ": "Western European Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "BOT": "Bolivia Time", "MST": "Macau Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "OESZ": "Eastern European Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time"}, -+ locale: "en_CX", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "CHAST": "CHAST", "HEPMX": "HEPMX", "AKDT": "AKDT", "TMT": "TMT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "JST": "JST", "HNPMX": "HNPMX", "EDT": "EDT", "ART": "ART", "AWDT": "AWDT", "HNPM": "HNPM", "GMT": "GMT", "BOT": "BOT", "SGT": "SGT", "HECU": "HECU", "WAST": "WAST", "HNT": "HNT", "WART": "WART", "GYT": "GYT", "WEZ": "WEZ", "ECT": "ECT", "ACDT": "ACDT", "HEEG": "HEEG", "HENOMX": "HENOMX", "IST": "IST", "CLST": "CLST", "AWST": "AWST", "ACWST": "ACWST", "HKT": "HKT", "CDT": "CDT", "AEST": "AEST", "CHADT": "CHADT", "GFT": "GFT", "HEOG": "HEOG", "CAT": "CAT", "CLT": "CLT", "ChST": "ChST", "HAST": "HAST", "MESZ": "MESZ", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "SAST": "SAST", "CST": "CST", "HADT": "HADT", "PDT": "PDT", "BT": "BT", "UYT": "UYT", "WAT": "WAT", "OESZ": "OESZ", "WARST": "WARST", "WIT": "WIT", "COST": "COST", "ARST": "ARST", "EST": "EST", "MST": "MST", "ACST": "ACST", "HEPM": "HEPM", "HAT": "HAT", "NZST": "NZST", "AST": "AST", "ADT": "ADT", "JDT": "JDT", "PST": "PST", "VET": "VET", "COT": "COT", "HNOG": "HNOG", "WITA": "WITA", "NZDT": "NZDT", "MEZ": "MEZ", "WESZ": "WESZ", "HNCU": "HNCU", "OEZ": "OEZ", "LHDT": "LHDT", "MYT": "MYT", "HKST": "HKST", "WIB": "WIB", "MDT": "MDT", "SRT": "SRT", "EAT": "EAT", "AKST": "AKST", "TMST": "TMST", "AEDT": "AEDT", "UYST": "UYST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_CX) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CX) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_CX) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CX) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_CX) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CX) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_CX) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CX' and handles both Whole and Real numbers based on 'v' - func (en *en_CX) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CX' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CX) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CX' -@@ -278,56 +195,7 @@ func (en *en_CX) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_CX' -@@ -336,84 +204,33 @@ func (en *en_CX) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_CX' -+func (en *en_CX) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_CX' --func (en *en_CX) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_CX) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_CX) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_CX) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_CY/en_CY.go b/en_CY/en_CY.go -index d9af1b7..bdba781 100644 ---- a/en_CY/en_CY.go -+++ b/en_CY/en_CY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_CY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_CY' locale - func New() locales.Translator { - return &en_CY{ -- locale: "en_CY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "HEEG": "East Greenland Summer Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "HADT": "Hawaii-Aleutian Daylight Time", "WESZ": "Western European Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "IST": "India Standard Time", "WAT": "West Africa Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "UYST": "Uruguay Summer Time", "ARST": "Argentina Summer Time", "AEST": "Australian Eastern Standard Time", "CAT": "Central Africa Time", "HNCU": "Cuba Standard Time", "AST": "Atlantic Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "OEZ": "Eastern European Standard Time", "HEOG": "West Greenland Summer Time", "HKST": "Hong Kong Summer Time", "GYT": "Guyana Time", "WITA": "Central Indonesia Time", "JDT": "Japan Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "EDT": "Eastern Daylight Time", "AKST": "Alaska Standard Time", "HKT": "Hong Kong Standard Time", "WART": "Western Argentina Standard Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "CLST": "Chile Summer Time", "WARST": "Western Argentina Summer Time", "HECU": "Cuba Daylight Time", "MDT": "Macau Summer Time", "PST": "Pacific Standard Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "NZST": "New Zealand Standard Time", "BOT": "Bolivia Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "CST": "Central Standard Time", "AKDT": "Alaska Daylight Time", "VET": "Venezuela Time", "ACWDT": "Australian Central Western Daylight Time", "AWST": "Australian Western Standard Time", "SAST": "South Africa Standard Time", "OESZ": "Eastern European Summer Time", "MST": "Macau Standard Time", "UYT": "Uruguay Standard Time", "TMST": "Turkmenistan Summer Time", "AEDT": "Australian Eastern Daylight Time", "AWDT": "Australian Western Daylight Time", "CHAST": "Chatham Standard Time", "TMT": "Turkmenistan Standard Time", "∅∅∅": "Peru Summer Time", "ADT": "Atlantic Daylight Time", "WIB": "Western Indonesia Time", "WIT": "Eastern Indonesia Time", "LHDT": "Lord Howe Daylight Time", "CDT": "Central Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "MESZ": "Central European Summer Time", "JST": "Japan Standard Time", "GFT": "French Guiana Time", "WAST": "West Africa Summer Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "MEZ": "Central European Standard Time", "HNEG": "East Greenland Standard Time", "COT": "Colombia Standard Time", "MYT": "Malaysia Time", "HNOG": "West Greenland Standard Time", "LHST": "Lord Howe Standard Time", "CLT": "Chile Standard Time", "ChST": "Chamorro Standard Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "SRT": "Suriname Time", "ART": "Argentina Standard Time", "ACST": "Australian Central Standard Time", "HNPMX": "Mexican Pacific Standard Time", "NZDT": "New Zealand Daylight Time", "CHADT": "Chatham Daylight Time"}, -+ locale: "en_CY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JST": "JST", "AEST": "AEST", "HEPMX": "HEPMX", "GFT": "GFT", "CLT": "CLT", "MDT": "MDT", "HNEG": "HNEG", "BT": "BT", "WIB": "WIB", "ACST": "ACST", "HEEG": "HEEG", "PDT": "PDT", "VET": "VET", "HNCU": "HNCU", "WITA": "WITA", "MESZ": "MESZ", "UYST": "UYST", "EST": "EST", "EDT": "EDT", "ECT": "ECT", "JDT": "JDT", "HKST": "HKST", "ADT": "ADT", "UYT": "UYT", "WESZ": "WESZ", "ART": "ART", "HAST": "HAST", "ACDT": "ACDT", "MYT": "MYT", "HECU": "HECU", "NZST": "NZST", "ARST": "ARST", "CLST": "CLST", "HEPM": "HEPM", "AWDT": "AWDT", "ACWDT": "ACWDT", "OEZ": "OEZ", "COST": "COST", "BOT": "BOT", "MEZ": "MEZ", "HENOMX": "HENOMX", "CHAST": "CHAST", "AKDT": "AKDT", "WART": "WART", "WIT": "WIT", "HKT": "HKT", "CDT": "CDT", "GMT": "GMT", "IST": "IST", "HNPMX": "HNPMX", "WAST": "WAST", "OESZ": "OESZ", "HAT": "HAT", "HEOG": "HEOG", "HNOG": "HNOG", "TMST": "TMST", "CHADT": "CHADT", "WEZ": "WEZ", "WAT": "WAT", "WARST": "WARST", "GYT": "GYT", "COT": "COT", "CAT": "CAT", "MST": "MST", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "AKST": "AKST", "SAST": "SAST", "EAT": "EAT", "HNNOMX": "HNNOMX", "LHST": "LHST", "AEDT": "AEDT", "HNT": "HNT", "HADT": "HADT", "PST": "PST", "SGT": "SGT", "TMT": "TMT", "CST": "CST", "ChST": "ChST", "SRT": "SRT", "ACWST": "ACWST", "NZDT": "NZDT", "AST": "AST", "AWST": "AWST", "LHDT": "LHDT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_CY) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_CY) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_CY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_CY) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_CY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_CY) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_CY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_CY) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_CY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_CY' and handles both Whole and Real numbers based on 'v' - func (en *en_CY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_CY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_CY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_CY' -@@ -278,56 +195,7 @@ func (en *en_CY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_CY' -@@ -336,68 +204,7 @@ func (en *en_CY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_CY' -@@ -405,17 +212,6 @@ func (en *en_CY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +220,6 @@ func (en *en_CY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +228,6 @@ func (en *en_CY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +236,6 @@ func (en *en_CY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,28 +244,6 @@ func (en *en_CY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +252,6 @@ func (en *en_CY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +260,6 @@ func (en *en_CY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +268,5 @@ func (en *en_CY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_DE/en_DE.go b/en_DE/en_DE.go -index dbdc89f..bc26bad 100644 ---- a/en_DE/en_DE.go -+++ b/en_DE/en_DE.go -@@ -10,70 +10,47 @@ import ( - ) -  - type en_DE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ percentSuffix string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_DE' locale - func New() locales.Translator { - return &en_DE{ -- locale: "en_DE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNEG": "East Greenland Standard Time", "HEEG": "East Greenland Summer Time", "VET": "Venezuela Time", "PDT": "Pacific Daylight Time", "AWDT": "Australian Western Daylight Time", "∅∅∅": "Amazon Summer Time", "CLST": "Chile Summer Time", "OESZ": "Eastern European Summer Time", "COT": "Colombia Standard Time", "HECU": "Cuba Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HEOG": "West Greenland Summer Time", "PST": "Pacific Standard Time", "JDT": "Japan Daylight Time", "CDT": "Central Daylight Time", "MYT": "Malaysia Time", "NZDT": "New Zealand Daylight Time", "GMT": "Greenwich Mean Time", "AKDT": "Alaska Daylight Time", "GYT": "Guyana Time", "MST": "Mountain Standard Time", "HNT": "Newfoundland Standard Time", "NZST": "New Zealand Standard Time", "BOT": "Bolivia Time", "ACST": "Australian Central Standard Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "AEDT": "Australian Eastern Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time", "HNCU": "Cuba Standard Time", "WIT": "Eastern Indonesia Time", "ACWST": "Australian Central Western Standard Time", "WESZ": "Western European Summer Time", "IST": "India Standard Time", "EAT": "East Africa Time", "AKST": "Alaska Standard Time", "MDT": "Mountain Daylight Time", "TMST": "Turkmenistan Summer Time", "WAST": "West Africa Summer Time", "CAT": "Central Africa Time", "HNPMX": "Mexican Pacific Standard Time", "AEST": "Australian Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHDT": "Lord Howe Daylight Time", "ChST": "Chamorro Standard Time", "HNOG": "West Greenland Standard Time", "CHADT": "Chatham Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "ADT": "Atlantic Daylight Time", "AST": "Atlantic Standard Time", "SRT": "Suriname Time", "MESZ": "Central European Summer Time", "SAST": "South Africa Standard Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "AWST": "Australian Western Standard Time", "CHAST": "Chatham Standard Time", "WAT": "West Africa Standard Time", "UYST": "Uruguay Summer Time", "HAT": "Newfoundland Daylight Time", "SGT": "Singapore Standard Time", "CST": "Central Standard Time", "OEZ": "Eastern European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "UYT": "Uruguay Standard Time", "ART": "Argentina Standard Time", "WITA": "Central Indonesia Time", "LHST": "Lord Howe Standard Time", "GFT": "French Guiana Time", "TMT": "Turkmenistan Standard Time", "JST": "Japan Standard Time", "CLT": "Chile Standard Time", "HKT": "Hong Kong Standard Time", "HKST": "Hong Kong Summer Time", "MEZ": "Central European Standard Time", "WARST": "Western Argentina Summer Time", "ARST": "Argentina Summer Time", "WEZ": "Western European Standard Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "HEPMX": "Mexican Pacific Daylight Time"}, -+ locale: "en_DE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ percentSuffix: " ", -+ timezones: map[string]string{"HAT": "HAT", "HKST": "HKST", "ECT": "ECT", "ART": "ART", "PDT": "PDT", "UYST": "UYST", "OESZ": "OESZ", "GYT": "GYT", "ACST": "ACST", "HNEG": "HNEG", "PST": "PST", "VET": "VET", "WAST": "WAST", "AKDT": "AKDT", "CLST": "CLST", "NZDT": "NZDT", "HNPM": "HNPM", "HNPMX": "HNPMX", "HEOG": "HEOG", "JDT": "JDT", "WESZ": "WESZ", "HNCU": "HNCU", "NZST": "NZST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "WARST": "WARST", "HENOMX": "HENOMX", "CHADT": "CHADT", "SGT": "SGT", "GFT": "GFT", "CLT": "CLT", "WITA": "WITA", "MST": "MST", "GMT": "GMT", "HEEG": "HEEG", "WAT": "WAT", "WIT": "WIT", "HKT": "HKT", "CST": "CST", "BOT": "BOT", "WEZ": "WEZ", "SAST": "SAST", "HADT": "HADT", "LHDT": "LHDT", "HNT": "HNT", "HNOG": "HNOG", "MDT": "MDT", "MESZ": "MESZ", "ACDT": "ACDT", "AWST": "AWST", "CHAST": "CHAST", "AKST": "AKST", "COST": "COST", "EDT": "EDT", "TMT": "TMT", "CDT": "CDT", "ARST": "ARST", "WART": "WART", "COT": "COT", "ADT": "ADT", "SRT": "SRT", "LHST": "LHST", "ACWST": "ACWST", "OEZ": "OEZ", "CAT": "CAT", "ChST": "ChST", "EAT": "EAT", "AEDT": "AEDT", "AWDT": "AWDT", "BT": "BT", "AEST": "AEST", "ACWDT": "ACWDT", "UYT": "UYT", "TMST": "TMST", "WIB": "WIB", "AST": "AST", "HAST": "HAST", "HEPM": "HEPM", "IST": "IST", "∅∅∅": "∅∅∅", "EST": "EST", "MEZ": "MEZ", "MYT": "MYT", "JST": "JST", "HECU": "HECU"}, - } - } -  -@@ -140,7 +117,7 @@ func (en *en_DE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_DE) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -150,7 +127,7 @@ func (en *en_DE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_DE) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -160,7 +137,7 @@ func (en *en_DE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_DE) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -206,49 +183,14 @@ func (en *en_DE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_DE' and handles both Whole and Real numbers based on 'v' - func (en *en_DE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_DE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_DE) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -+ l := len(s) + 2 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -282,56 +224,7 @@ func (en *en_DE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_DE' -@@ -340,68 +233,7 @@ func (en *en_DE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_DE' -@@ -409,17 +241,6 @@ func (en *en_DE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -428,17 +249,6 @@ func (en *en_DE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -447,17 +257,6 @@ func (en *en_DE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,19 +265,6 @@ func (en *en_DE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -487,28 +273,6 @@ func (en *en_DE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -517,35 +281,6 @@ func (en *en_DE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -554,40 +289,6 @@ func (en *en_DE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -596,44 +297,5 @@ func (en *en_DE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_DG/en_DG.go b/en_DG/en_DG.go -index b2e75c3..938f7e0 100644 ---- a/en_DG/en_DG.go -+++ b/en_DG/en_DG.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_DG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_DG' locale - func New() locales.Translator { - return &en_DG{ -- locale: "en_DG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"MYT": "Malaysia Time", "ARST": "Argentina Summer Time", "WESZ": "Western European Summer Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "CAT": "Central Africa Time", "GMT": "Greenwich Mean Time", "SGT": "Singapore Standard Time", "HNT": "Newfoundland Standard Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "WITA": "Central Indonesia Time", "COST": "Colombia Summer Time", "AKST": "Alaska Standard Time", "ART": "Argentina Standard Time", "SAST": "South Africa Standard Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "PST": "Pacific Standard Time", "MESZ": "Central European Summer Time", "IST": "India Standard Time", "UYST": "Uruguay Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "ACWST": "Australian Central Western Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HAT": "Newfoundland Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "TMT": "Turkmenistan Standard Time", "BOT": "Bolivia Time", "OESZ": "Eastern European Summer Time", "ChST": "Chamorro Standard Time", "WART": "Western Argentina Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HEOG": "West Greenland Summer Time", "AEST": "Australian Eastern Standard Time", "CHADT": "Chatham Daylight Time", "CLT": "Chile Standard Time", "BT": "Bhutan Time", "HNOG": "West Greenland Standard Time", "WEZ": "Western European Standard Time", "HECU": "Cuba Daylight Time", "MDT": "Macau Summer Time", "AST": "Atlantic Standard Time", "WIB": "Western Indonesia Time", "VET": "Venezuela Time", "ECT": "Ecuador Time", "CHAST": "Chatham Standard Time", "TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time", "HNPMX": "Mexican Pacific Standard Time", "MST": "Macau Standard Time", "AKDT": "Alaska Daylight Time", "PDT": "Pacific Daylight Time", "NZDT": "New Zealand Daylight Time", "OEZ": "Eastern European Standard Time", "WARST": "Western Argentina Summer Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "ADT": "Atlantic Daylight Time", "HKST": "Hong Kong Summer Time", "AWDT": "Australian Western Daylight Time", "HNCU": "Cuba Standard Time", "LHDT": "Lord Howe Daylight Time", "CLST": "Chile Summer Time", "ACST": "Australian Central Standard Time", "EST": "Eastern Standard Time", "GYT": "Guyana Time", "UYT": "Uruguay Standard Time", "HKT": "Hong Kong Standard Time", "JDT": "Japan Daylight Time", "EDT": "Eastern Daylight Time", "WIT": "Eastern Indonesia Time", "SRT": "Suriname Time", "NZST": "New Zealand Standard Time", "GFT": "French Guiana Time", "JST": "Japan Standard Time", "HEEG": "East Greenland Summer Time", "∅∅∅": "Azores Summer Time", "COT": "Colombia Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "MEZ": "Central European Standard Time", "LHST": "Lord Howe Standard Time", "HNEG": "East Greenland Standard Time", "HNNOMX": "Northwest Mexico Standard Time"}, -+ locale: "en_DG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"ACDT": "ACDT", "HNPM": "HNPM", "CHADT": "CHADT", "ACWST": "ACWST", "HNPMX": "HNPMX", "HNT": "HNT", "HKST": "HKST", "ADT": "ADT", "HAT": "HAT", "CST": "CST", "GMT": "GMT", "HADT": "HADT", "MYT": "MYT", "UYST": "UYST", "SGT": "SGT", "EST": "EST", "WITA": "WITA", "SRT": "SRT", "JST": "JST", "WESZ": "WESZ", "HEPMX": "HEPMX", "GYT": "GYT", "∅∅∅": "∅∅∅", "NZST": "NZST", "ART": "ART", "ARST": "ARST", "EAT": "EAT", "HAST": "HAST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "TMST": "TMST", "CAT": "CAT", "AKDT": "AKDT", "HEOG": "HEOG", "HEPM": "HEPM", "WAST": "WAST", "PDT": "PDT", "LHDT": "LHDT", "IST": "IST", "AWST": "AWST", "UYT": "UYT", "COT": "COT", "COST": "COST", "CDT": "CDT", "MEZ": "MEZ", "MESZ": "MESZ", "ACWDT": "ACWDT", "WIB": "WIB", "BOT": "BOT", "HECU": "HECU", "WAT": "WAT", "SAST": "SAST", "ACST": "ACST", "HNCU": "HNCU", "ChST": "ChST", "HEEG": "HEEG", "LHST": "LHST", "AEDT": "AEDT", "VET": "VET", "AKST": "AKST", "WARST": "WARST", "WIT": "WIT", "MST": "MST", "AST": "AST", "BT": "BT", "GFT": "GFT", "OESZ": "OESZ", "HNOG": "HNOG", "ECT": "ECT", "OEZ": "OEZ", "PST": "PST", "WEZ": "WEZ", "WART": "WART", "EDT": "EDT", "NZDT": "NZDT", "MDT": "MDT", "HENOMX": "HENOMX", "TMT": "TMT", "CLST": "CLST", "HNEG": "HNEG", "JDT": "JDT", "CHAST": "CHAST", "AEST": "AEST", "HKT": "HKT", "CLT": "CLT"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_DG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_DG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_DG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_DG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_DG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_DG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_DG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_DG' and handles both Whole and Real numbers based on 'v' - func (en *en_DG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_DG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_DG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_DG' -@@ -278,56 +197,7 @@ func (en *en_DG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_DG' -@@ -336,68 +206,7 @@ func (en *en_DG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_DG' -@@ -405,17 +214,6 @@ func (en *en_DG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_DG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_DG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_DG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_DK/en_DK.go b/en_DK/en_DK.go -index 3a2a4d9..c19ec7d 100644 ---- a/en_DK/en_DK.go -+++ b/en_DK/en_DK.go -@@ -10,70 +10,47 @@ import ( - ) -  - type en_DK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ percentSuffix string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_DK' locale - func New() locales.Translator { - return &en_DK{ -- locale: "en_DK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "kr.", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEOG": "West Greenland Summer Time", "ACWST": "Australian Central Western Standard Time", "CLT": "Chile Standard Time", "TMT": "Turkmenistan Standard Time", "HNCU": "Cuba Standard Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "AST": "Atlantic Standard Time", "GYT": "Guyana Time", "ART": "Argentina Standard Time", "NZST": "New Zealand Standard Time", "ChST": "Chamorro Standard Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "EAT": "East Africa Time", "ADT": "Atlantic Daylight Time", "GFT": "French Guiana Time", "EST": "Eastern Standard Time", "HAT": "Newfoundland Daylight Time", "PDT": "Pacific Daylight Time", "AEST": "Australian Eastern Standard Time", "HEEG": "East Greenland Summer Time", "ECT": "Ecuador Time", "WARST": "Western Argentina Summer Time", "HNPMX": "Mexican Pacific Standard Time", "MYT": "Malaysia Time", "ACWDT": "Australian Central Western Daylight Time", "MEZ": "Central European Standard Time", "SGT": "Singapore Standard Time", "AKST": "Alaska Standard Time", "CHAST": "Chatham Standard Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "CAT": "Central Africa Time", "WEZ": "Western European Standard Time", "BT": "Bhutan Time", "SRT": "Suriname Time", "MESZ": "Central European Summer Time", "∅∅∅": "Amazon Summer Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "ARST": "Argentina Summer Time", "HNOG": "West Greenland Standard Time", "AEDT": "Australian Eastern Daylight Time", "TMST": "Turkmenistan Summer Time", "WAST": "West Africa Summer Time", "COST": "Colombia Summer Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "AWST": "Australian Western Standard Time", "ACST": "Australian Central Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "AWDT": "Australian Western Daylight Time", "SAST": "South Africa Standard Time", "WAT": "West Africa Standard Time", "HECU": "Cuba Daylight Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "GMT": "Greenwich Mean Time", "WIB": "Western Indonesia Time", "PST": "Pacific Standard Time", "CHADT": "Chatham Daylight Time", "JST": "Japan Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "MST": "Macau Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "UYT": "Uruguay Standard Time", "CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "BOT": "Bolivia Time", "CDT": "Central Daylight Time", "UYST": "Uruguay Summer Time", "VET": "Venezuela Time", "HNT": "Newfoundland Standard Time", "HKT": "Hong Kong Standard Time", "JDT": "Japan Daylight Time", "HKST": "Hong Kong Summer Time", "WITA": "Central Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time"}, -+ locale: "en_DK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ".", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "kr.", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ percentSuffix: " ", -+ timezones: map[string]string{"CDT": "CDT", "MEZ": "MEZ", "HNPMX": "HNPMX", "HNT": "HNT", "ADT": "ADT", "HADT": "HADT", "IST": "IST", "HNEG": "HNEG", "GYT": "GYT", "CLST": "CLST", "HEEG": "HEEG", "AEST": "AEST", "HNCU": "HNCU", "GFT": "GFT", "UYT": "UYT", "OESZ": "OESZ", "ART": "ART", "SRT": "SRT", "ACDT": "ACDT", "HNPM": "HNPM", "JDT": "JDT", "HKST": "HKST", "WIB": "WIB", "MESZ": "MESZ", "PST": "PST", "CHAST": "CHAST", "WESZ": "WESZ", "HENOMX": "HENOMX", "UYST": "UYST", "HECU": "HECU", "OEZ": "OEZ", "HAT": "HAT", "AKDT": "AKDT", "WIT": "WIT", "HKT": "HKT", "EAT": "EAT", "JST": "JST", "CHADT": "CHADT", "SGT": "SGT", "WAST": "WAST", "WITA": "WITA", "MYT": "MYT", "∅∅∅": "∅∅∅", "CLT": "CLT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "HEPM": "HEPM", "CAT": "CAT", "MST": "MST", "HAST": "HAST", "VET": "VET", "AKST": "AKST", "TMST": "TMST", "WARST": "WARST", "COT": "COT", "EST": "EST", "CST": "CST", "AWDT": "AWDT", "LHST": "LHST", "PDT": "PDT", "HEPMX": "HEPMX", "EDT": "EDT", "AST": "AST", "GMT": "GMT", "ChST": "ChST", "WART": "WART", "TMT": "TMT", "ACWDT": "ACWDT", "AEDT": "AEDT", "SAST": "SAST", "NZST": "NZST", "NZDT": "NZDT", "BOT": "BOT", "ACST": "ACST", "ACWST": "ACWST", "COST": "COST", "HEOG": "HEOG", "MDT": "MDT", "AWST": "AWST", "BT": "BT", "WEZ": "WEZ", "WAT": "WAT", "ECT": "ECT", "ARST": "ARST", "HNOG": "HNOG"}, - } - } -  -@@ -140,7 +117,7 @@ func (en *en_DK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_DK) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -150,7 +127,7 @@ func (en *en_DK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_DK) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -160,7 +137,7 @@ func (en *en_DK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_DK) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -206,49 +183,14 @@ func (en *en_DK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_DK' and handles both Whole and Real numbers based on 'v' - func (en *en_DK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_DK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_DK) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -+ l := len(s) + 2 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -282,56 +224,7 @@ func (en *en_DK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_DK' -@@ -340,68 +233,7 @@ func (en *en_DK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_DK' -@@ -409,17 +241,6 @@ func (en *en_DK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -428,17 +249,6 @@ func (en *en_DK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -447,17 +257,6 @@ func (en *en_DK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,19 +265,6 @@ func (en *en_DK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_DM/en_DM.go b/en_DM/en_DM.go -index b296117..efe33b0 100644 ---- a/en_DM/en_DM.go -+++ b/en_DM/en_DM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_DM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_DM' locale - func New() locales.Translator { - return &en_DM{ -- locale: "en_DM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNNOMX": "Northwest Mexico Standard Time", "EST": "Eastern Standard Time", "ADT": "Atlantic Daylight Time", "VET": "Venezuela Time", "MESZ": "Central European Summer Time", "SAST": "South Africa Standard Time", "ECT": "Ecuador Time", "∅∅∅": "Amazon Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "AWST": "Australian Western Standard Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "CLST": "Chile Summer Time", "HECU": "Cuba Daylight Time", "ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "ChST": "Chamorro Standard Time", "CAT": "Central Africa Time", "WEZ": "Western European Standard Time", "IST": "India Standard Time", "JST": "Japan Standard Time", "ACST": "Australian Central Standard Time", "COST": "Colombia Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "WESZ": "Western European Summer Time", "PDT": "Pacific Daylight Time", "GFT": "French Guiana Time", "HNCU": "Cuba Standard Time", "CHADT": "Chatham Daylight Time", "WAST": "West Africa Summer Time", "OESZ": "Eastern European Summer Time", "CST": "Central Standard Time", "UYT": "Uruguay Standard Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "LHDT": "Lord Howe Daylight Time", "LHST": "Lord Howe Standard Time", "CLT": "Chile Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time", "TMST": "Turkmenistan Summer Time", "WARST": "Western Argentina Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "CHAST": "Chatham Standard Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "OEZ": "Eastern European Standard Time", "COT": "Colombia Standard Time", "WIB": "Western Indonesia Time", "WIT": "Eastern Indonesia Time", "SRT": "Suriname Time", "HKT": "Hong Kong Standard Time", "WITA": "Central Indonesia Time", "MDT": "Mountain Daylight Time", "ART": "Argentina Standard Time", "NZDT": "New Zealand Daylight Time", "WAT": "West Africa Standard Time", "WART": "Western Argentina Standard Time", "AKDT": "Alaska Daylight Time", "HEOG": "West Greenland Summer Time", "BOT": "Bolivia Time", "TMT": "Turkmenistan Standard Time", "SGT": "Singapore Standard Time", "CDT": "Central Daylight Time", "GYT": "Guyana Time", "MST": "Mountain Standard Time", "ARST": "Argentina Summer Time", "HNOG": "West Greenland Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HKST": "Hong Kong Summer Time", "MEZ": "Central European Standard Time", "EDT": "Eastern Daylight Time", "HEEG": "East Greenland Summer Time", "EAT": "East Africa Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "PST": "Pacific Standard Time", "AST": "Atlantic Standard Time"}, -+ locale: "en_DM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPM": "HEPM", "NZST": "NZST", "AST": "AST", "SRT": "SRT", "HEEG": "HEEG", "BOT": "BOT", "AEST": "AEST", "VET": "VET", "MST": "MST", "EST": "EST", "CLT": "CLT", "HAST": "HAST", "HADT": "HADT", "WEZ": "WEZ", "WAT": "WAT", "HNT": "HNT", "WARST": "WARST", "HKT": "HKT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "GFT": "GFT", "WART": "WART", "IST": "IST", "PDT": "PDT", "CST": "CST", "EDT": "EDT", "HKST": "HKST", "CLST": "CLST", "WITA": "WITA", "NZDT": "NZDT", "WIB": "WIB", "ADT": "ADT", "JDT": "JDT", "OESZ": "OESZ", "SAST": "SAST", "TMT": "TMT", "MDT": "MDT", "AEDT": "AEDT", "PST": "PST", "COST": "COST", "HEOG": "HEOG", "ART": "ART", "MYT": "MYT", "CHADT": "CHADT", "COT": "COT", "HNOG": "HNOG", "HNPM": "HNPM", "UYST": "UYST", "WIT": "WIT", "GMT": "GMT", "ARST": "ARST", "AWDT": "AWDT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "LHDT": "LHDT", "OEZ": "OEZ", "HAT": "HAT", "CDT": "CDT", "MESZ": "MESZ", "JST": "JST", "ACWDT": "ACWDT", "SGT": "SGT", "MEZ": "MEZ", "ACDT": "ACDT", "ACWST": "ACWST", "HECU": "HECU", "WAST": "WAST", "AKST": "AKST", "GYT": "GYT", "CAT": "CAT", "BT": "BT", "HNCU": "HNCU", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "TMST": "TMST", "ChST": "ChST", "WESZ": "WESZ", "EAT": "EAT", "AWST": "AWST", "LHST": "LHST", "UYT": "UYT", "ECT": "ECT", "ACST": "ACST", "CHAST": "CHAST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_DM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_DM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_DM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_DM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_DM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_DM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_DM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_DM' and handles both Whole and Real numbers based on 'v' - func (en *en_DM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_DM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_DM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_DM' -@@ -278,56 +195,7 @@ func (en *en_DM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_DM' -@@ -336,84 +204,33 @@ func (en *en_DM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_DM' -+func (en *en_DM) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_DM' --func (en *en_DM) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_DM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_DM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_DM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_DM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_DM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_DM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_DM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_ER/en_ER.go b/en_ER/en_ER.go -index 05e4f22..a2090e9 100644 ---- a/en_ER/en_ER.go -+++ b/en_ER/en_ER.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_ER struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_ER' locale - func New() locales.Translator { - return &en_ER{ -- locale: "en_ER", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "Nfk", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WEZ": "Western European Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "GMT": "Greenwich Mean Time", "PDT": "Pacific Daylight Time", "AWDT": "Australian Western Daylight Time", "CLST": "Chile Summer Time", "TMT": "Turkmenistan Standard Time", "OESZ": "Eastern European Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "CDT": "Central Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "CHADT": "Chatham Daylight Time", "ChST": "Chamorro Standard Time", "ADT": "Atlantic Daylight Time", "HAT": "Newfoundland Daylight Time", "BOT": "Bolivia Time", "AST": "Atlantic Standard Time", "ARST": "Argentina Summer Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "MST": "Mountain Standard Time", "HEOG": "West Greenland Summer Time", "WESZ": "Western European Summer Time", "UYT": "Uruguay Standard Time", "CAT": "Central Africa Time", "UYST": "Uruguay Summer Time", "HEEG": "East Greenland Summer Time", "GFT": "French Guiana Time", "ACDT": "Australian Central Daylight Time", "EAT": "East Africa Time", "MYT": "Malaysia Time", "WIT": "Eastern Indonesia Time", "HKT": "Hong Kong Standard Time", "NZST": "New Zealand Standard Time", "HNT": "Newfoundland Standard Time", "ACST": "Australian Central Standard Time", "CST": "Central Standard Time", "HKST": "Hong Kong Summer Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time", "HECU": "Cuba Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "GYT": "Guyana Time", "AKST": "Alaska Standard Time", "CLT": "Chile Standard Time", "TMST": "Turkmenistan Summer Time", "WARST": "Western Argentina Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MESZ": "Central European Summer Time", "IST": "India Standard Time", "WAT": "West Africa Standard Time", "ECT": "Ecuador Time", "BT": "Bhutan Time", "SRT": "Suriname Time", "ACWST": "Australian Central Western Standard Time", "EDT": "Eastern Daylight Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "EST": "Eastern Standard Time", "LHST": "Lord Howe Standard Time", "CHAST": "Chatham Standard Time", "VET": "Venezuela Time", "ART": "Argentina Standard Time", "WITA": "Central Indonesia Time", "HNOG": "West Greenland Standard Time", "WAST": "West Africa Summer Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "PST": "Pacific Standard Time", "AEDT": "Australian Eastern Daylight Time", "MEZ": "Central European Standard Time", "LHDT": "Lord Howe Daylight Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "MDT": "Mountain Daylight Time", "WIB": "Western Indonesia Time", "AEST": "Australian Eastern Standard Time", "OEZ": "Eastern European Standard Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time"}, -+ locale: "en_ER", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "Nfk", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PST": "PST", "WEZ": "WEZ", "HECU": "HECU", "WAT": "WAT", "AKST": "AKST", "TMST": "TMST", "ART": "ART", "GYT": "GYT", "HEOG": "HEOG", "EDT": "EDT", "AST": "AST", "AEST": "AEST", "ACWST": "ACWST", "HNT": "HNT", "HAT": "HAT", "CLT": "CLT", "CLST": "CLST", "HADT": "HADT", "LHDT": "LHDT", "WESZ": "WESZ", "HENOMX": "HENOMX", "AEDT": "AEDT", "HNCU": "HNCU", "HKT": "HKT", "MYT": "MYT", "AWST": "AWST", "HNPMX": "HNPMX", "CST": "CST", "SRT": "SRT", "ACST": "ACST", "AWDT": "AWDT", "CHADT": "CHADT", "OESZ": "OESZ", "GFT": "GFT", "COT": "COT", "MESZ": "MESZ", "MEZ": "MEZ", "HNPM": "HNPM", "UYT": "UYT", "ChST": "ChST", "HNEG": "HNEG", "IST": "IST", "OEZ": "OEZ", "WIT": "WIT", "COST": "COST", "WIB": "WIB", "CDT": "CDT", "MDT": "MDT", "∅∅∅": "∅∅∅", "WAST": "WAST", "NZDT": "NZDT", "LHST": "LHST", "WART": "WART", "HNOG": "HNOG", "BT": "BT", "HAST": "HAST", "HEPM": "HEPM", "SGT": "SGT", "EST": "EST", "BOT": "BOT", "HEEG": "HEEG", "ACDT": "ACDT", "EAT": "EAT", "JST": "JST", "JDT": "JDT", "UYST": "UYST", "PDT": "PDT", "HEPMX": "HEPMX", "TMT": "TMT", "GMT": "GMT", "ARST": "ARST", "MST": "MST", "HNNOMX": "HNNOMX", "VET": "VET", "AKDT": "AKDT", "WARST": "WARST", "HKST": "HKST", "ADT": "ADT", "NZST": "NZST", "ECT": "ECT", "CAT": "CAT", "ACWDT": "ACWDT", "SAST": "SAST", "WITA": "WITA", "CHAST": "CHAST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_ER) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_ER) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_ER) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_ER) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_ER) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_ER) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_ER) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_ER' and handles both Whole and Real numbers based on 'v' - func (en *en_ER) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_ER' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_ER) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_ER' -@@ -278,56 +195,7 @@ func (en *en_ER) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_ER' -@@ -336,84 +204,33 @@ func (en *en_ER) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_ER' -+func (en *en_ER) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_ER' --func (en *en_ER) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_ER) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_ER) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_ER) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_ER) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_ER) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_ER) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_ER) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_FI/en_FI.go b/en_FI/en_FI.go -index 16cebc9..40022bd 100644 ---- a/en_FI/en_FI.go -+++ b/en_FI/en_FI.go -@@ -10,70 +10,48 @@ import ( - ) -  - type en_FI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ percentSuffix string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_FI' locale - func New() locales.Translator { - return &en_FI{ -- locale: "en_FI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WARST": "Western Argentina Summer Time", "GMT": "Greenwich Mean Time", "GYT": "Guyana Time", "HADT": "Hawaii-Aleutian Daylight Time", "BT": "Bhutan Time", "AEST": "Australian Eastern Standard Time", "WITA": "Central Indonesia Time", "WAST": "West Africa Summer Time", "WIT": "Eastern Indonesia Time", "ACWST": "Australian Central Western Standard Time", "ECT": "Ecuador Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "∅∅∅": "Amazon Summer Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "HNCU": "Cuba Standard Time", "WESZ": "Western European Summer Time", "ACWDT": "Australian Central Western Daylight Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "AST": "Atlantic Standard Time", "CDT": "Central Daylight Time", "AWDT": "Australian Western Daylight Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "HECU": "Cuba Daylight Time", "MYT": "Malaysia Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "CLST": "Chile Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time", "CST": "Central Standard Time", "ADT": "Atlantic Daylight Time", "WIB": "Western Indonesia Time", "HAT": "Newfoundland Daylight Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "SRT": "Suriname Time", "HEOG": "West Greenland Summer Time", "IST": "India Standard Time", "OESZ": "Eastern European Summer Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "HNT": "Newfoundland Standard Time", "GFT": "French Guiana Time", "EAT": "East Africa Time", "OEZ": "Eastern European Standard Time", "MESZ": "Central European Summer Time", "HNEG": "East Greenland Standard Time", "UYST": "Uruguay Summer Time", "AEDT": "Australian Eastern Daylight Time", "HKT": "Hong Kong Standard Time", "CHADT": "Chatham Daylight Time", "UYT": "Uruguay Standard Time", "CHAST": "Chatham Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "COST": "Colombia Summer Time", "AKDT": "Alaska Daylight Time", "HNOG": "West Greenland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "CLT": "Chile Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PDT": "Pacific Daylight Time", "MEZ": "Central European Standard Time", "ACST": "Australian Central Standard Time", "VET": "Venezuela Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "HEEG": "East Greenland Summer Time", "WAT": "West Africa Standard Time", "PST": "Pacific Standard Time", "WEZ": "Western European Standard Time", "AWST": "Australian Western Standard Time", "HKST": "Hong Kong Summer Time", "WART": "Western Argentina Standard Time"}, -+ locale: "en_FI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ group: " ", -+ timeSeparator: ".", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ percentSuffix: " ", -+ timezones: map[string]string{"NZST": "NZST", "SRT": "SRT", "UYT": "UYT", "VET": "VET", "COST": "COST", "HEPMX": "HEPMX", "WAT": "WAT", "WITA": "WITA", "AST": "AST", "BOT": "BOT", "HNEG": "HNEG", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HKST": "HKST", "ADT": "ADT", "MEZ": "MEZ", "HECU": "HECU", "HNPMX": "HNPMX", "TMST": "TMST", "MST": "MST", "HAST": "HAST", "AWST": "AWST", "BT": "BT", "WIT": "WIT", "CDT": "CDT", "AEST": "AEST", "OEZ": "OEZ", "HEOG": "HEOG", "NZDT": "NZDT", "PDT": "PDT", "HAT": "HAT", "SAST": "SAST", "CST": "CST", "HADT": "HADT", "MYT": "MYT", "HEPM": "HEPM", "ECT": "ECT", "AKDT": "AKDT", "OESZ": "OESZ", "HNT": "HNT", "TMT": "TMT", "WIB": "WIB", "JDT": "JDT", "UYST": "UYST", "IST": "IST", "ART": "ART", "CHADT": "CHADT", "JST": "JST", "COT": "COT", "HKT": "HKT", "LHST": "LHST", "LHDT": "LHDT", "PST": "PST", "AKST": "AKST", "CLST": "CLST", "ACST": "ACST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "MDT": "MDT", "EAT": "EAT", "ACWST": "ACWST", "WARST": "WARST", "CLT": "CLT", "AWDT": "AWDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "EDT": "EDT", "ChST": "ChST", "SGT": "SGT", "HNCU": "HNCU", "GFT": "GFT", "GYT": "GYT", "CAT": "CAT", "GMT": "GMT", "AEDT": "AEDT", "WEZ": "WEZ", "WAST": "WAST", "WESZ": "WESZ", "WART": "WART", "HNOG": "HNOG", "EST": "EST", "ARST": "ARST", "MESZ": "MESZ", "HEEG": "HEEG", "HNPM": "HNPM"}, - } - } -  -@@ -140,7 +118,7 @@ func (en *en_FI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_FI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -150,7 +128,7 @@ func (en *en_FI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_FI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -160,7 +138,7 @@ func (en *en_FI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_FI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -206,51 +184,14 @@ func (en *en_FI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_FI' and handles both Whole and Real numbers based on 'v' - func (en *en_FI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_FI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_FI) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -+ l := len(s) + 2 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -284,58 +225,7 @@ func (en *en_FI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_FI' -@@ -344,70 +234,7 @@ func (en *en_FI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_FI' -@@ -415,17 +242,6 @@ func (en *en_FI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -434,17 +250,6 @@ func (en *en_FI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -453,17 +258,6 @@ func (en *en_FI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,19 +266,6 @@ func (en *en_FI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_FJ/en_FJ.go b/en_FJ/en_FJ.go -index de314a9..d54580e 100644 ---- a/en_FJ/en_FJ.go -+++ b/en_FJ/en_FJ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_FJ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_FJ' locale - func New() locales.Translator { - return &en_FJ{ -- locale: "en_FJ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "$", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AKDT": "Alaska Daylight Time", "ChST": "Chamorro Standard Time", "TMST": "Turkmenistan Summer Time", "WAT": "West Africa Standard Time", "MYT": "Malaysia Time", "HKST": "Hong Kong Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "MST": "Macau Standard Time", "UYT": "Uruguay Standard Time", "CDT": "Central Daylight Time", "WESZ": "Western European Summer Time", "AEST": "Australian Eastern Standard Time", "WARST": "Western Argentina Summer Time", "COT": "Colombia Standard Time", "ADT": "Atlantic Daylight Time", "AWST": "Australian Western Standard Time", "IST": "India Standard Time", "EAT": "East Africa Time", "WART": "Western Argentina Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "WEZ": "Western European Standard Time", "ARST": "Argentina Summer Time", "CHAST": "Chatham Standard Time", "JST": "Japan Standard Time", "NZST": "New Zealand Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "WIT": "Eastern Indonesia Time", "HNT": "Newfoundland Standard Time", "ART": "Argentina Standard Time", "HEOG": "West Greenland Summer Time", "HECU": "Cuba Daylight Time", "CST": "Central Standard Time", "PST": "Pacific Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "BOT": "Bolivia Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "UYST": "Uruguay Summer Time", "VET": "Venezuela Time", "AEDT": "Australian Eastern Daylight Time", "COST": "Colombia Summer Time", "GYT": "Guyana Time", "WITA": "Central Indonesia Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHDT": "Lord Howe Daylight Time", "∅∅∅": "Amazon Summer Time", "CAT": "Central Africa Time", "HNOG": "West Greenland Standard Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "CLST": "Chile Summer Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "MDT": "Macau Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "SRT": "Suriname Time", "CLT": "Chile Standard Time", "GFT": "French Guiana Time", "BT": "Bhutan Time", "CHADT": "Chatham Daylight Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "OEZ": "Eastern European Standard Time", "SAST": "South Africa Standard Time", "WAST": "West Africa Summer Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "PDT": "Pacific Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "ACDT": "Australian Central Daylight Time", "AST": "Atlantic Standard Time", "WIB": "Western Indonesia Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "NZDT": "New Zealand Daylight Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "GMT": "Greenwich Mean Time", "AKST": "Alaska Standard Time", "ACWST": "Australian Central Western Standard Time", "HAT": "Newfoundland Daylight Time", "MEZ": "Central European Standard Time", "ACST": "Australian Central Standard Time"}, -+ locale: "en_FJ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "$", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "LHST": "LHST", "AEDT": "AEDT", "HECU": "HECU", "OESZ": "OESZ", "CST": "CST", "HEEG": "HEEG", "ARST": "ARST", "SRT": "SRT", "GYT": "GYT", "∅∅∅": "∅∅∅", "EDT": "EDT", "HKT": "HKT", "WIB": "WIB", "CLST": "CLST", "NZDT": "NZDT", "HENOMX": "HENOMX", "MYT": "MYT", "WEZ": "WEZ", "WESZ": "WESZ", "WAT": "WAT", "HNOG": "HNOG", "HKST": "HKST", "MST": "MST", "BOT": "BOT", "AWST": "AWST", "AEST": "AEST", "UYT": "UYT", "AKDT": "AKDT", "OEZ": "OEZ", "EST": "EST", "WITA": "WITA", "ADT": "ADT", "HNNOMX": "HNNOMX", "IST": "IST", "COST": "COST", "CAT": "CAT", "MDT": "MDT", "EAT": "EAT", "LHDT": "LHDT", "HNPM": "HNPM", "JST": "JST", "JDT": "JDT", "CHAST": "CHAST", "CHADT": "CHADT", "SAST": "SAST", "TMT": "TMT", "CLT": "CLT", "CDT": "CDT", "NZST": "NZST", "MEZ": "MEZ", "AKST": "AKST", "WARST": "WARST", "COT": "COT", "PST": "PST", "SGT": "SGT", "TMST": "TMST", "ECT": "ECT", "HAST": "HAST", "PDT": "PDT", "BT": "BT", "UYST": "UYST", "HEPMX": "HEPMX", "ChST": "ChST", "MESZ": "MESZ", "GFT": "GFT", "ART": "ART", "HEPM": "HEPM", "ACWDT": "ACWDT", "HNCU": "HNCU", "HNPMX": "HNPMX", "WART": "WART", "HEOG": "HEOG", "AST": "AST", "ACDT": "ACDT", "AWDT": "AWDT", "VET": "VET", "HNT": "HNT", "ACST": "ACST", "ACWST": "ACWST", "WAST": "WAST", "HAT": "HAT", "WIT": "WIT", "GMT": "GMT", "HNEG": "HNEG"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_FJ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_FJ) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_FJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_FJ) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_FJ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_FJ) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_FJ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_FJ' and handles both Whole and Real numbers based on 'v' - func (en *en_FJ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_FJ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_FJ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_FJ' -@@ -278,56 +195,7 @@ func (en *en_FJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_FJ' -@@ -336,84 +204,33 @@ func (en *en_FJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_FJ' -+func (en *en_FJ) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_FJ' --func (en *en_FJ) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_FJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_FJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_FJ) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_FJ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_FJ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_FJ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_FJ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_FK/en_FK.go b/en_FK/en_FK.go -index 23b049b..5c59834 100644 ---- a/en_FK/en_FK.go -+++ b/en_FK/en_FK.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_FK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_FK' locale - func New() locales.Translator { - return &en_FK{ -- locale: "en_FK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "£", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"SGT": "Singapore Standard Time", "UYT": "Uruguay Standard Time", "WESZ": "Western European Summer Time", "NZST": "New Zealand Standard Time", "CHADT": "Chatham Daylight Time", "JST": "Japan Standard Time", "BOT": "Bolivia Time", "HNPMX": "Mexican Pacific Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "VET": "Venezuela Time", "ARST": "Argentina Summer Time", "MESZ": "Central European Summer Time", "HEEG": "East Greenland Summer Time", "CAT": "Central Africa Time", "OEZ": "Eastern European Standard Time", "COT": "Colombia Standard Time", "AEST": "Australian Eastern Standard Time", "AWST": "Australian Western Standard Time", "OESZ": "Eastern European Summer Time", "EDT": "Eastern Daylight Time", "AWDT": "Australian Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "WARST": "Western Argentina Summer Time", "GMT": "Greenwich Mean Time", "HECU": "Cuba Daylight Time", "MST": "Macau Standard Time", "WEZ": "Western European Standard Time", "WITA": "Central Indonesia Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "PST": "Pacific Standard Time", "HKST": "Hong Kong Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "AST": "Atlantic Standard Time", "HNT": "Newfoundland Standard Time", "IST": "India Standard Time", "ChST": "Chamorro Standard Time", "WIB": "Western Indonesia Time", "ART": "Argentina Standard Time", "HAT": "Newfoundland Daylight Time", "HKT": "Hong Kong Standard Time", "LHST": "Lord Howe Standard Time", "TMT": "Turkmenistan Standard Time", "ACST": "Australian Central Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "BT": "Bhutan Time", "SAST": "South Africa Standard Time", "CLST": "Chile Summer Time", "∅∅∅": "Peru Summer Time", "UYST": "Uruguay Summer Time", "CDT": "Central Daylight Time", "HEOG": "West Greenland Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHAST": "Chatham Standard Time", "HNEG": "East Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "EST": "Eastern Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "MEZ": "Central European Standard Time", "WAST": "West Africa Summer Time", "COST": "Colombia Summer Time", "ADT": "Atlantic Daylight Time", "GYT": "Guyana Time", "ECT": "Ecuador Time", "AKST": "Alaska Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "ACWST": "Australian Central Western Standard Time", "JDT": "Japan Daylight Time", "GFT": "French Guiana Time", "EAT": "East Africa Time", "WAT": "West Africa Standard Time", "WART": "Western Argentina Standard Time", "MYT": "Malaysia Time", "WIT": "Eastern Indonesia Time", "TMST": "Turkmenistan Summer Time", "MDT": "Macau Summer Time", "PDT": "Pacific Daylight Time", "AEDT": "Australian Eastern Daylight Time", "CLT": "Chile Standard Time", "AKDT": "Alaska Daylight Time", "CST": "Central Standard Time", "SRT": "Suriname Time"}, -+ locale: "en_FK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "£", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"AEDT": "AEDT", "GYT": "GYT", "HAST": "HAST", "COT": "COT", "EAT": "EAT", "HEOG": "HEOG", "ACST": "ACST", "JST": "JST", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "CHADT": "CHADT", "HEPMX": "HEPMX", "HNT": "HNT", "HKT": "HKT", "HKST": "HKST", "TMST": "TMST", "CAT": "CAT", "NZST": "NZST", "HENOMX": "HENOMX", "VET": "VET", "WARST": "WARST", "HNOG": "HNOG", "CST": "CST", "ART": "ART", "IST": "IST", "AEST": "AEST", "HAT": "HAT", "WIT": "WIT", "COST": "COST", "NZDT": "NZDT", "HADT": "HADT", "ECT": "ECT", "MEZ": "MEZ", "ACDT": "ACDT", "LHDT": "LHDT", "HNPM": "HNPM", "WAT": "WAT", "WITA": "WITA", "MDT": "MDT", "HEEG": "HEEG", "AWDT": "AWDT", "CLT": "CLT", "ARST": "ARST", "SRT": "SRT", "ACWDT": "ACWDT", "SGT": "SGT", "WAST": "WAST", "GMT": "GMT", "PDT": "PDT", "EST": "EST", "CLST": "CLST", "BT": "BT", "HNCU": "HNCU", "OESZ": "OESZ", "EDT": "EDT", "AWST": "AWST", "UYT": "UYT", "WEZ": "WEZ", "HECU": "HECU", "HNNOMX": "HNNOMX", "GFT": "GFT", "WART": "WART", "MST": "MST", "ADT": "ADT", "MESZ": "MESZ", "MYT": "MYT", "JDT": "JDT", "AKST": "AKST", "TMT": "TMT", "ChST": "ChST", "HNEG": "HNEG", "CHAST": "CHAST", "WESZ": "WESZ", "OEZ": "OEZ", "CDT": "CDT", "WIB": "WIB", "LHST": "LHST", "PST": "PST", "UYST": "UYST", "SAST": "SAST", "AST": "AST", "HEPM": "HEPM", "HNPMX": "HNPMX", "AKDT": "AKDT", "BOT": "BOT"}, - } - } -  -@@ -112,8 +91,8 @@ func (en *en_FK) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_FK) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +117,7 @@ func (en *en_FK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_FK) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_FK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_FK) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_FK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_FK) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_FK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_FK' and handles both Whole and Real numbers based on 'v' - func (en *en_FK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_FK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_FK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_FK' -@@ -278,56 +197,7 @@ func (en *en_FK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_FK' -@@ -336,68 +206,7 @@ func (en *en_FK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_FK' -@@ -405,17 +214,6 @@ func (en *en_FK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_FK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_FK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_FK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_FM/en_FM.go b/en_FM/en_FM.go -index 4e85ebb..5dee9d5 100644 ---- a/en_FM/en_FM.go -+++ b/en_FM/en_FM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_FM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_FM' locale - func New() locales.Translator { - return &en_FM{ -- locale: "en_FM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AEST": "Australian Eastern Standard Time", "AWDT": "Australian Western Daylight Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "UYST": "Uruguay Summer Time", "ACWST": "Australian Central Western Standard Time", "WITA": "Central Indonesia Time", "ChST": "Chamorro Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "MYT": "Malaysia Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "ART": "Argentina Standard Time", "AWST": "Australian Western Standard Time", "ACST": "Australian Central Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time", "NZST": "New Zealand Standard Time", "ECT": "Ecuador Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "HEOG": "West Greenland Summer Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "BOT": "Bolivia Time", "OESZ": "Eastern European Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "SRT": "Suriname Time", "HKT": "Hong Kong Standard Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "EDT": "Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLT": "Chile Standard Time", "WAST": "West Africa Summer Time", "OEZ": "Eastern European Standard Time", "AST": "Atlantic Standard Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "COST": "Colombia Summer Time", "VET": "Venezuela Time", "BT": "Bhutan Time", "HKST": "Hong Kong Summer Time", "JDT": "Japan Daylight Time", "TMST": "Turkmenistan Summer Time", "HNCU": "Cuba Standard Time", "SGT": "Singapore Standard Time", "UYT": "Uruguay Standard Time", "ARST": "Argentina Summer Time", "HNOG": "West Greenland Standard Time", "PST": "Pacific Standard Time", "MEZ": "Central European Standard Time", "WARST": "Western Argentina Summer Time", "WIB": "Western Indonesia Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "∅∅∅": "Amazon Summer Time", "PDT": "Pacific Daylight Time", "WAT": "West Africa Standard Time", "TMT": "Turkmenistan Standard Time", "WART": "Western Argentina Standard Time", "MST": "Mountain Standard Time", "MDT": "Mountain Daylight Time", "CHADT": "Chatham Daylight Time", "CLST": "Chile Summer Time", "GFT": "French Guiana Time", "MESZ": "Central European Summer Time", "WEZ": "Western European Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "GYT": "Guyana Time", "HNT": "Newfoundland Standard Time", "AEDT": "Australian Eastern Daylight Time", "HECU": "Cuba Daylight Time", "COT": "Colombia Standard Time", "EST": "Eastern Standard Time", "WIT": "Eastern Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "HAT": "Newfoundland Daylight Time", "WESZ": "Western European Summer Time", "CAT": "Central Africa Time"}, -+ locale: "en_FM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WEZ": "WEZ", "COT": "COT", "ECT": "ECT", "AST": "AST", "JST": "JST", "UYST": "UYST", "HNCU": "HNCU", "WART": "WART", "NZST": "NZST", "WIB": "WIB", "HADT": "HADT", "LHST": "LHST", "AWDT": "AWDT", "GFT": "GFT", "WARST": "WARST", "HNOG": "HNOG", "CAT": "CAT", "ACST": "ACST", "HNEG": "HNEG", "ACWST": "ACWST", "HAT": "HAT", "EDT": "EDT", "BOT": "BOT", "SRT": "SRT", "IST": "IST", "WITA": "WITA", "CST": "CST", "ART": "ART", "MDT": "MDT", "AWST": "AWST", "SGT": "SGT", "WESZ": "WESZ", "WAT": "WAT", "OEZ": "OEZ", "NZDT": "NZDT", "MST": "MST", "HNNOMX": "HNNOMX", "BT": "BT", "AKDT": "AKDT", "HKST": "HKST", "MEZ": "MEZ", "CHAST": "CHAST", "HECU": "HECU", "COST": "COST", "CDT": "CDT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "HEOG": "HEOG", "TMT": "TMT", "GMT": "GMT", "HAST": "HAST", "ACWDT": "ACWDT", "AEDT": "AEDT", "HKT": "HKT", "HENOMX": "HENOMX", "PST": "PST", "WAST": "WAST", "AEST": "AEST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "AKST": "AKST", "SAST": "SAST", "ACDT": "ACDT", "HEEG": "HEEG", "MYT": "MYT", "HNPM": "HNPM", "UYT": "UYT", "HNT": "HNT", "TMST": "TMST", "CLT": "CLT", "ARST": "ARST", "HEPM": "HEPM", "JDT": "JDT", "WIT": "WIT", "ADT": "ADT", "PDT": "PDT", "VET": "VET", "EST": "EST", "ChST": "ChST", "EAT": "EAT", "CHADT": "CHADT", "GYT": "GYT", "LHDT": "LHDT", "CLST": "CLST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_FM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_FM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_FM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_FM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_FM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_FM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_FM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_FM' and handles both Whole and Real numbers based on 'v' - func (en *en_FM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_FM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_FM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_FM' -@@ -278,56 +195,7 @@ func (en *en_FM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_FM' -@@ -336,84 +204,33 @@ func (en *en_FM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_FM' -+func (en *en_FM) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_FM' --func (en *en_FM) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_FM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_FM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_FM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_FM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_FM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_FM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_FM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_GB/en_GB.go b/en_GB/en_GB.go -index eccd49b..d5f526d 100644 ---- a/en_GB/en_GB.go -+++ b/en_GB/en_GB.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_GB struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GB' locale - func New() locales.Translator { - return &en_GB{ -- locale: "en_GB", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "HNOG": "West Greenland Standard Time", "ChST": "Chamorro Standard Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "MDT": "Macau Summer Time", "WAST": "West Africa Summer Time", "AST": "Atlantic Standard Time", "CHAST": "Chatham Standard Time", "JDT": "Japan Daylight Time", "CST": "Central Standard Time", "PDT": "Pacific Daylight Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "ACST": "Australian Central Standard Time", "HNPMX": "Mexican Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "WAT": "West Africa Standard Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "NZDT": "New Zealand Daylight Time", "MST": "Macau Standard Time", "CDT": "Central Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WEZ": "Western European Standard Time", "VET": "Venezuela Time", "HAT": "Newfoundland Daylight Time", "AWST": "Australian Western Standard Time", "AEST": "Australian Eastern Standard Time", "WART": "Western Argentina Standard Time", "AKST": "Alaska Standard Time", "AKDT": "Alaska Daylight Time", "MYT": "Malaysia Time", "CLT": "Chile Standard Time", "ART": "Argentina Standard Time", "PST": "Pacific Standard Time", "HKT": "Hong Kong Standard Time", "WITA": "Central Indonesia Time", "EAT": "East Africa Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "UYST": "Uruguay Summer Time", "MESZ": "Central European Summer Time", "HNT": "Newfoundland Standard Time", "NZST": "New Zealand Standard Time", "ECT": "Ecuador Time", "GMT": "Greenwich Mean Time", "UYT": "Uruguay Standard Time", "SRT": "Suriname Time", "∅∅∅": "Peru Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "CAT": "Central Africa Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HEOG": "West Greenland Summer Time", "WIB": "Western Indonesia Time", "WESZ": "Western European Summer Time", "JST": "Japan Standard Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "WIT": "Eastern Indonesia Time", "ACDT": "Australian Central Daylight Time", "HKST": "Hong Kong Summer Time", "LHDT": "Lord Howe Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLST": "Chile Summer Time", "BOT": "Bolivia Time", "TMST": "Turkmenistan Summer Time", "HNCU": "Cuba Standard Time", "ACWDT": "Australian Central Western Daylight Time", "EDT": "Eastern Daylight Time", "BT": "Bhutan Time", "ARST": "Argentina Summer Time", "LHST": "Lord Howe Standard Time", "GFT": "French Guiana Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "HECU": "Cuba Daylight Time", "MEZ": "Central European Standard Time", "SAST": "South Africa Standard Time"}, -+ locale: "en_GB", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "MEZ": "MEZ", "PDT": "PDT", "CHADT": "CHADT", "OESZ": "OESZ", "NZDT": "NZDT", "CST": "CST", "EAT": "EAT", "IST": "IST", "VET": "VET", "BOT": "BOT", "HNPM": "HNPM", "AEST": "AEST", "HNCU": "HNCU", "COST": "COST", "EDT": "EDT", "CAT": "CAT", "AEDT": "AEDT", "WIB": "WIB", "MESZ": "MESZ", "LHDT": "LHDT", "ACWST": "ACWST", "COT": "COT", "HNOG": "HNOG", "EST": "EST", "MST": "MST", "WIT": "WIT", "MDT": "MDT", "HAST": "HAST", "MYT": "MYT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "CDT": "CDT", "HNEG": "HNEG", "WARST": "WARST", "HAT": "HAT", "HKST": "HKST", "ADT": "ADT", "WAST": "WAST", "LHST": "LHST", "HEPM": "HEPM", "HNPMX": "HNPMX", "AKDT": "AKDT", "HECU": "HECU", "WESZ": "WESZ", "ACDT": "ACDT", "BT": "BT", "ACWDT": "ACWDT", "UYT": "UYT", "PST": "PST", "WEZ": "WEZ", "HEEG": "HEEG", "AWDT": "AWDT", "SGT": "SGT", "HKT": "HKT", "WITA": "WITA", "SRT": "SRT", "ACST": "ACST", "NZST": "NZST", "ART": "ART", "HNNOMX": "HNNOMX", "JDT": "JDT", "UYST": "UYST", "SAST": "SAST", "ChST": "ChST", "JST": "JST", "AWST": "AWST", "ECT": "ECT", "GMT": "GMT", "AST": "AST", "HADT": "HADT", "HNT": "HNT", "TMT": "TMT", "TMST": "TMST", "CLT": "CLT", "CHAST": "CHAST", "HEPMX": "HEPMX", "AKST": "AKST", "CLST": "CLST", "ARST": "ARST", "WAT": "WAT", "GFT": "GFT", "OEZ": "OEZ", "WART": "WART", "GYT": "GYT"}, - } - } -  -@@ -112,8 +91,8 @@ func (en *en_GB) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_GB) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +117,7 @@ func (en *en_GB) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GB) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_GB) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GB) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_GB) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GB) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_GB) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GB' and handles both Whole and Real numbers based on 'v' - func (en *en_GB) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GB' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GB) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GB' -@@ -278,56 +197,7 @@ func (en *en_GB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GB' -@@ -336,84 +206,33 @@ func (en *en_GB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_GB' -+func (en *en_GB) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_GB' --func (en *en_GB) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +243,10 @@ func (en *en_GB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +262,10 @@ func (en *en_GB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +283,10 @@ func (en *en_GB) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_GD/en_GD.go b/en_GD/en_GD.go -index 4bfc5b6..41afe77 100644 ---- a/en_GD/en_GD.go -+++ b/en_GD/en_GD.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_GD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GD' locale - func New() locales.Translator { - return &en_GD{ -- locale: "en_GD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AWST": "Australian Western Standard Time", "CHAST": "Chatham Standard Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "EDT": "Eastern Daylight Time", "MYT": "Malaysia Time", "WESZ": "Western European Summer Time", "GMT": "Greenwich Mean Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "IST": "India Standard Time", "BOT": "Bolivia Time", "WIB": "Western Indonesia Time", "PST": "Pacific Standard Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "WITA": "Central Indonesia Time", "MESZ": "Central European Summer Time", "HEEG": "East Greenland Summer Time", "BT": "Bhutan Time", "HADT": "Hawaii-Aleutian Daylight Time", "HEOG": "West Greenland Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "∅∅∅": "Amazon Summer Time", "HECU": "Cuba Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "MDT": "Mountain Daylight Time", "AEST": "Australian Eastern Standard Time", "CLT": "Chile Standard Time", "TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time", "AKST": "Alaska Standard Time", "AKDT": "Alaska Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "JDT": "Japan Daylight Time", "ACDT": "Australian Central Daylight Time", "COT": "Colombia Standard Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time", "ADT": "Atlantic Daylight Time", "LHST": "Lord Howe Standard Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "ECT": "Ecuador Time", "EST": "Eastern Standard Time", "AST": "Atlantic Standard Time", "ChST": "Chamorro Standard Time", "NZDT": "New Zealand Daylight Time", "HNEG": "East Greenland Standard Time", "CAT": "Central Africa Time", "UYST": "Uruguay Summer Time", "HKT": "Hong Kong Standard Time", "MST": "Mountain Standard Time", "HNT": "Newfoundland Standard Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "JST": "Japan Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HAT": "Newfoundland Daylight Time", "HKST": "Hong Kong Summer Time", "TMT": "Turkmenistan Standard Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "SRT": "Suriname Time", "HNOG": "West Greenland Standard Time", "MEZ": "Central European Standard Time", "GFT": "French Guiana Time", "ART": "Argentina Standard Time", "ACWST": "Australian Central Western Standard Time", "LHDT": "Lord Howe Daylight Time", "CLST": "Chile Summer Time", "WART": "Western Argentina Standard Time", "WIT": "Eastern Indonesia Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "AEDT": "Australian Eastern Daylight Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "ACST": "Australian Central Standard Time", "HNCU": "Cuba Standard Time", "VET": "Venezuela Time", "GYT": "Guyana Time", "UYT": "Uruguay Standard Time", "CDT": "Central Daylight Time"}, -+ locale: "en_GD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "ARST": "ARST", "BOT": "BOT", "WAST": "WAST", "ACST": "ACST", "MYT": "MYT", "HNPMX": "HNPMX", "CST": "CST", "GMT": "GMT", "HEPM": "HEPM", "PST": "PST", "AEST": "AEST", "WEZ": "WEZ", "SGT": "SGT", "HECU": "HECU", "AKDT": "AKDT", "SRT": "SRT", "MESZ": "MESZ", "IST": "IST", "GYT": "GYT", "HKST": "HKST", "MDT": "MDT", "JST": "JST", "AKST": "AKST", "HEOG": "HEOG", "ART": "ART", "OESZ": "OESZ", "COST": "COST", "CLT": "CLT", "CDT": "CDT", "HADT": "HADT", "MEZ": "MEZ", "JDT": "JDT", "PDT": "PDT", "UYT": "UYT", "HNCU": "HNCU", "NZST": "NZST", "ChST": "ChST", "HNEG": "HNEG", "HEEG": "HEEG", "WAT": "WAT", "CAT": "CAT", "AWDT": "AWDT", "UYST": "UYST", "HNT": "HNT", "WARST": "WARST", "∅∅∅": "∅∅∅", "WART": "WART", "ECT": "ECT", "BT": "BT", "CHAST": "CHAST", "CHADT": "CHADT", "OEZ": "OEZ", "WITA": "WITA", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "LHST": "LHST", "LHDT": "LHDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "HAT": "HAT", "HNOG": "HNOG", "EDT": "EDT", "TMT": "TMT", "SAST": "SAST", "EST": "EST", "TMST": "TMST", "EAT": "EAT", "ACWST": "ACWST", "HEPMX": "HEPMX", "COT": "COT", "HKT": "HKT", "NZDT": "NZDT", "WIB": "WIB", "ADT": "ADT", "ACDT": "ACDT", "HNPM": "HNPM", "WESZ": "WESZ", "GFT": "GFT", "WIT": "WIT", "MST": "MST", "AST": "AST", "HAST": "HAST", "AWST": "AWST", "VET": "VET"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_GD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GD) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_GD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GD) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_GD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GD) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_GD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GD' and handles both Whole and Real numbers based on 'v' - func (en *en_GD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GD' -@@ -278,56 +195,7 @@ func (en *en_GD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GD' -@@ -336,84 +204,33 @@ func (en *en_GD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_GD' -+func (en *en_GD) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_GD' --func (en *en_GD) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_GD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_GD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_GD) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_GD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_GD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_GD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_GD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_GG/en_GG.go b/en_GG/en_GG.go -index 05a4e9b..043d900 100644 ---- a/en_GG/en_GG.go -+++ b/en_GG/en_GG.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_GG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GG' locale - func New() locales.Translator { - return &en_GG{ -- locale: "en_GG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WAST": "West Africa Summer Time", "HAT": "Newfoundland Daylight Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HKT": "Hong Kong Standard Time", "IST": "India Standard Time", "TMST": "Turkmenistan Summer Time", "ChST": "Chamorro Standard Time", "∅∅∅": "Peru Summer Time", "EDT": "Eastern Daylight Time", "VET": "Venezuela Time", "ART": "Argentina Standard Time", "NZST": "New Zealand Standard Time", "UYT": "Uruguay Standard Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "AEST": "Australian Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "GFT": "French Guiana Time", "PST": "Pacific Standard Time", "WAT": "West Africa Standard Time", "COST": "Colombia Summer Time", "HECU": "Cuba Daylight Time", "MDT": "Macau Summer Time", "ADT": "Atlantic Daylight Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "CHADT": "Chatham Daylight Time", "BOT": "Bolivia Time", "COT": "Colombia Standard Time", "ARST": "Argentina Summer Time", "WEZ": "Western European Standard Time", "WITA": "Central Indonesia Time", "JDT": "Japan Daylight Time", "OEZ": "Eastern European Standard Time", "WARST": "Western Argentina Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HNEG": "East Greenland Standard Time", "PDT": "Pacific Daylight Time", "WART": "Western Argentina Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "CLT": "Chile Standard Time", "ACST": "Australian Central Standard Time", "MST": "Macau Standard Time", "CDT": "Central Daylight Time", "ACWST": "Australian Central Western Standard Time", "MESZ": "Central European Summer Time", "CAT": "Central Africa Time", "HNCU": "Cuba Standard Time", "HNOG": "West Greenland Standard Time", "WESZ": "Western European Summer Time", "MEZ": "Central European Standard Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "CST": "Central Standard Time", "HNT": "Newfoundland Standard Time", "ACWDT": "Australian Central Western Daylight Time", "NZDT": "New Zealand Daylight Time", "CLST": "Chile Summer Time", "TMT": "Turkmenistan Standard Time", "HKST": "Hong Kong Summer Time", "CHAST": "Chatham Standard Time", "AKDT": "Alaska Daylight Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "HNNOMX": "Northwest Mexico Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time", "SGT": "Singapore Standard Time", "GYT": "Guyana Time", "HEOG": "West Greenland Summer Time", "EAT": "East Africa Time", "WIT": "Eastern Indonesia Time", "SRT": "Suriname Time", "EST": "Eastern Standard Time", "AKST": "Alaska Standard Time"}, -+ locale: "en_GG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"WARST": "WARST", "HNOG": "HNOG", "COT": "COT", "HAST": "HAST", "AWST": "AWST", "CLT": "CLT", "WITA": "WITA", "GMT": "GMT", "BOT": "BOT", "EAT": "EAT", "HNPM": "HNPM", "JDT": "JDT", "PST": "PST", "WAST": "WAST", "HNT": "HNT", "WIB": "WIB", "HEOG": "HEOG", "HNCU": "HNCU", "VET": "VET", "GFT": "GFT", "COST": "COST", "TMST": "TMST", "CDT": "CDT", "ART": "ART", "ChST": "ChST", "HADT": "HADT", "ACDT": "ACDT", "UYST": "UYST", "WEZ": "WEZ", "AKST": "AKST", "MDT": "MDT", "WIT": "WIT", "MEZ": "MEZ", "HNEG": "HNEG", "JST": "JST", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "SGT": "SGT", "ARST": "ARST", "CLST": "CLST", "AST": "AST", "SAST": "SAST", "HKT": "HKT", "HKST": "HKST", "CAT": "CAT", "BT": "BT", "OESZ": "OESZ", "HENOMX": "HENOMX", "LHDT": "LHDT", "HECU": "HECU", "HEPM": "HEPM", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "IST": "IST", "HEPMX": "HEPMX", "EST": "EST", "ECT": "ECT", "SRT": "SRT", "MESZ": "MESZ", "AEST": "AEST", "HNPMX": "HNPMX", "TMT": "TMT", "NZST": "NZST", "ADT": "ADT", "HEEG": "HEEG", "AWDT": "AWDT", "MST": "MST", "MYT": "MYT", "WART": "WART", "CST": "CST", "AEDT": "AEDT", "CHAST": "CHAST", "CHADT": "CHADT", "PDT": "PDT", "AKDT": "AKDT", "HAT": "HAT", "GYT": "GYT", "ACST": "ACST", "EDT": "EDT", "ACWST": "ACWST", "UYT": "UYT", "WAT": "WAT", "OEZ": "OEZ", "LHST": "LHST"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_GG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_GG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_GG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_GG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GG' and handles both Whole and Real numbers based on 'v' - func (en *en_GG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GG' -@@ -278,56 +197,7 @@ func (en *en_GG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GG' -@@ -336,68 +206,7 @@ func (en *en_GG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_GG' -@@ -405,17 +214,6 @@ func (en *en_GG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_GG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_GG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_GG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_GH/en_GH.go b/en_GH/en_GH.go -index 9c45a5e..8730d71 100644 ---- a/en_GH/en_GH.go -+++ b/en_GH/en_GH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_GH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GH' locale - func New() locales.Translator { - return &en_GH{ -- locale: "en_GH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GH₵", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"UYT": "Uruguay Standard Time", "HAT": "Newfoundland Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "ADT": "Atlantic Daylight Time", "CDT": "Central Daylight Time", "HEEG": "East Greenland Summer Time", "WAST": "West Africa Summer Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "MEZ": "Central European Standard Time", "IST": "India Standard Time", "ACST": "Australian Central Standard Time", "AKDT": "Alaska Daylight Time", "WIB": "Western Indonesia Time", "VET": "Venezuela Time", "ART": "Argentina Standard Time", "NZST": "New Zealand Standard Time", "TMT": "Turkmenistan Standard Time", "EAT": "East Africa Time", "HEOG": "West Greenland Summer Time", "AEST": "Australian Eastern Standard Time", "COT": "Colombia Standard Time", "SGT": "Singapore Standard Time", "AWDT": "Australian Western Daylight Time", "CHAST": "Chatham Standard Time", "GYT": "Guyana Time", "ACWDT": "Australian Central Western Daylight Time", "AKST": "Alaska Standard Time", "AST": "Atlantic Standard Time", "PDT": "Pacific Daylight Time", "WESZ": "Western European Summer Time", "LHDT": "Lord Howe Daylight Time", "JST": "Japan Standard Time", "BOT": "Bolivia Time", "WITA": "Central Indonesia Time", "HENOMX": "Northwest Mexico Daylight Time", "HNOG": "West Greenland Standard Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "MST": "Macau Standard Time", "HNT": "Newfoundland Standard Time", "AEDT": "Australian Eastern Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "∅∅∅": "Amazon Summer Time", "JDT": "Japan Daylight Time", "NZDT": "New Zealand Daylight Time", "MESZ": "Central European Summer Time", "TMST": "Turkmenistan Summer Time", "WART": "Western Argentina Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "HKST": "Hong Kong Summer Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "WAT": "West Africa Standard Time", "HECU": "Cuba Daylight Time", "GMT": "Greenwich Mean Time", "PST": "Pacific Standard Time", "HKT": "Hong Kong Standard Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "GFT": "French Guiana Time", "ARST": "Argentina Summer Time", "LHST": "Lord Howe Standard Time", "ChST": "Chamorro Standard Time", "UYST": "Uruguay Summer Time", "CST": "Central Standard Time", "MYT": "Malaysia Time", "HADT": "Hawaii-Aleutian Daylight Time", "BT": "Bhutan Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HNCU": "Cuba Standard Time", "MDT": "Macau Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWST": "Australian Central Western Standard Time", "WEZ": "Western European Standard Time", "SAST": "South Africa Standard Time", "EDT": "Eastern Daylight Time", "SRT": "Suriname Time", "OEZ": "Eastern European Standard Time", "WARST": "Western Argentina Summer Time", "CAT": "Central Africa Time", "WIT": "Eastern Indonesia Time"}, -+ locale: "en_GH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GH₵", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "CLST": "CLST", "EDT": "EDT", "CAT": "CAT", "HENOMX": "HENOMX", "WESZ": "WESZ", "HNCU": "HNCU", "HECU": "HECU", "AKST": "AKST", "SAST": "SAST", "ACDT": "ACDT", "GYT": "GYT", "LHST": "LHST", "ACWDT": "ACWDT", "WIT": "WIT", "WITA": "WITA", "HNEG": "HNEG", "HNPM": "HNPM", "HEPM": "HEPM", "HAT": "HAT", "SGT": "SGT", "HEOG": "HEOG", "MST": "MST", "ChST": "ChST", "ARST": "ARST", "AWST": "AWST", "AWDT": "AWDT", "PST": "PST", "HAST": "HAST", "HEEG": "HEEG", "BOT": "BOT", "JDT": "JDT", "ECT": "ECT", "WIB": "WIB", "EAT": "EAT", "MYT": "MYT", "CST": "CST", "NZDT": "NZDT", "HNT": "HNT", "MDT": "MDT", "HADT": "HADT", "JST": "JST", "CHAST": "CHAST", "HEPMX": "HEPMX", "CLT": "CLT", "GMT": "GMT", "AEST": "AEST", "GFT": "GFT", "WART": "WART", "COST": "COST", "HNOG": "HNOG", "HKT": "HKT", "TMT": "TMT", "MESZ": "MESZ", "VET": "VET", "WAT": "WAT", "WARST": "WARST", "HKST": "HKST", "AST": "AST", "UYT": "UYT", "∅∅∅": "∅∅∅", "IST": "IST", "CHADT": "CHADT", "HNPMX": "HNPMX", "NZST": "NZST", "WEZ": "WEZ", "AKDT": "AKDT", "OEZ": "OEZ", "TMST": "TMST", "CDT": "CDT", "BT": "BT", "ACWST": "ACWST", "AEDT": "AEDT", "ADT": "ADT", "HNNOMX": "HNNOMX", "COT": "COT", "EST": "EST", "ART": "ART", "MEZ": "MEZ", "UYST": "UYST", "PDT": "PDT", "WAST": "WAST", "OESZ": "OESZ", "SRT": "SRT", "ACST": "ACST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_GH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GH) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_GH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GH) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_GH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GH) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_GH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GH' and handles both Whole and Real numbers based on 'v' - func (en *en_GH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GH' -@@ -278,56 +195,7 @@ func (en *en_GH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GH' -@@ -336,84 +204,33 @@ func (en *en_GH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_GH' -+func (en *en_GH) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_GH' --func (en *en_GH) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_GH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_GH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_GH) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_GH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_GH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_GH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_GH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_GI/en_GI.go b/en_GI/en_GI.go -index 655f99f..4fa08c5 100644 ---- a/en_GI/en_GI.go -+++ b/en_GI/en_GI.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_GI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GI' locale - func New() locales.Translator { - return &en_GI{ -- locale: "en_GI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "£", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "ECT": "Ecuador Time", "ACWDT": "Australian Central Western Daylight Time", "WITA": "Central Indonesia Time", "WIT": "Eastern Indonesia Time", "CHADT": "Chatham Daylight Time", "GFT": "French Guiana Time", "WART": "Western Argentina Standard Time", "SRT": "Suriname Time", "WEZ": "Western European Standard Time", "WESZ": "Western European Summer Time", "MEZ": "Central European Standard Time", "JST": "Japan Standard Time", "ChST": "Chamorro Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "AKDT": "Alaska Daylight Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "GMT": "Greenwich Mean Time", "CDT": "Central Daylight Time", "UYT": "Uruguay Standard Time", "NZDT": "New Zealand Daylight Time", "LHDT": "Lord Howe Daylight Time", "HEEG": "East Greenland Summer Time", "EAT": "East Africa Time", "MDT": "Macau Summer Time", "UYST": "Uruguay Summer Time", "ARST": "Argentina Summer Time", "CHAST": "Chatham Standard Time", "CAT": "Central Africa Time", "WAST": "West Africa Summer Time", "OEZ": "Eastern European Standard Time", "JDT": "Japan Daylight Time", "WARST": "Western Argentina Summer Time", "HECU": "Cuba Daylight Time", "ADT": "Atlantic Daylight Time", "BT": "Bhutan Time", "HNOG": "West Greenland Standard Time", "LHST": "Lord Howe Standard Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "∅∅∅": "Amazon Summer Time", "COT": "Colombia Standard Time", "CST": "Central Standard Time", "MYT": "Malaysia Time", "HEOG": "West Greenland Summer Time", "PDT": "Pacific Daylight Time", "VET": "Venezuela Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "TMT": "Turkmenistan Standard Time", "ACST": "Australian Central Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "HKT": "Hong Kong Standard Time", "AWDT": "Australian Western Daylight Time", "MST": "Macau Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "SAST": "South Africa Standard Time", "AST": "Atlantic Standard Time", "ACWST": "Australian Central Western Standard Time", "HKST": "Hong Kong Summer Time", "ACDT": "Australian Central Daylight Time", "HNCU": "Cuba Standard Time", "EST": "Eastern Standard Time", "AKST": "Alaska Standard Time", "PST": "Pacific Standard Time", "AWST": "Australian Western Standard Time", "OESZ": "Eastern European Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "EDT": "Eastern Daylight Time", "GYT": "Guyana Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "NZST": "New Zealand Standard Time", "MESZ": "Central European Summer Time", "COST": "Colombia Summer Time", "HAT": "Newfoundland Daylight Time", "WAT": "West Africa Standard Time", "TMST": "Turkmenistan Summer Time", "BOT": "Bolivia Time", "HNPMX": "Mexican Pacific Standard Time", "HNT": "Newfoundland Standard Time", "CLT": "Chile Standard Time"}, -+ locale: "en_GI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "£", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"OESZ": "OESZ", "WARST": "WARST", "WIT": "WIT", "HENOMX": "HENOMX", "JST": "JST", "ACWST": "ACWST", "WEZ": "WEZ", "HNPMX": "HNPMX", "EDT": "EDT", "WIB": "WIB", "BT": "BT", "WAT": "WAT", "ARST": "ARST", "GYT": "GYT", "MESZ": "MESZ", "UYST": "UYST", "ACWDT": "ACWDT", "CHADT": "CHADT", "HECU": "HECU", "MST": "MST", "MYT": "MYT", "MEZ": "MEZ", "HNPM": "HNPM", "SAST": "SAST", "CLST": "CLST", "ECT": "ECT", "HAST": "HAST", "SGT": "SGT", "TMT": "TMT", "ART": "ART", "HNT": "HNT", "HKT": "HKT", "HKST": "HKST", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "ChST": "ChST", "HNEG": "HNEG", "AWDT": "AWDT", "COT": "COT", "AEST": "AEST", "HEOG": "HEOG", "CAT": "CAT", "BOT": "BOT", "SRT": "SRT", "HNNOMX": "HNNOMX", "AWST": "AWST", "UYT": "UYT", "CST": "CST", "GFT": "GFT", "HAT": "HAT", "EST": "EST", "EAT": "EAT", "ACST": "ACST", "ACDT": "ACDT", "CHAST": "CHAST", "OEZ": "OEZ", "CLT": "CLT", "GMT": "GMT", "HNCU": "HNCU", "WAST": "WAST", "ADT": "ADT", "MDT": "MDT", "HEEG": "HEEG", "LHST": "LHST", "IST": "IST", "PST": "PST", "AST": "AST", "PDT": "PDT", "AKST": "AKST", "HNOG": "HNOG", "WITA": "WITA", "CDT": "CDT", "HADT": "HADT", "AEDT": "AEDT", "VET": "VET", "WART": "WART", "NZST": "NZST", "NZDT": "NZDT", "TMST": "TMST", "LHDT": "LHDT", "JDT": "JDT", "WESZ": "WESZ", "HEPMX": "HEPMX", "COST": "COST"}, - } - } -  -@@ -112,8 +91,8 @@ func (en *en_GI) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_GI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +117,7 @@ func (en *en_GI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_GI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_GI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_GI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GI' and handles both Whole and Real numbers based on 'v' - func (en *en_GI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GI' -@@ -278,56 +197,7 @@ func (en *en_GI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GI' -@@ -336,68 +206,7 @@ func (en *en_GI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_GI' -@@ -405,17 +214,6 @@ func (en *en_GI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_GI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_GI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_GI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_GM/en_GM.go b/en_GM/en_GM.go -index ccbb1d0..ae8736a 100644 ---- a/en_GM/en_GM.go -+++ b/en_GM/en_GM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_GM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GM' locale - func New() locales.Translator { - return &en_GM{ -- locale: "en_GM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "D", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ACWST": "Australian Central Western Standard Time", "TMT": "Turkmenistan Standard Time", "ChST": "Chamorro Standard Time", "COT": "Colombia Standard Time", "HNPMX": "Mexican Pacific Standard Time", "GYT": "Guyana Time", "HKT": "Hong Kong Standard Time", "MEZ": "Central European Standard Time", "IST": "India Standard Time", "JST": "Japan Standard Time", "JDT": "Japan Daylight Time", "CLST": "Chile Summer Time", "BOT": "Bolivia Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "VET": "Venezuela Time", "WAST": "West Africa Summer Time", "WARST": "Western Argentina Summer Time", "AST": "Atlantic Standard Time", "UYT": "Uruguay Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "ARST": "Argentina Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CAT": "Central Africa Time", "EDT": "Eastern Daylight Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "AEDT": "Australian Eastern Daylight Time", "TMST": "Turkmenistan Summer Time", "HNCU": "Cuba Standard Time", "WIT": "Eastern Indonesia Time", "∅∅∅": "Amazon Summer Time", "ECT": "Ecuador Time", "HEOG": "West Greenland Summer Time", "HAT": "Newfoundland Daylight Time", "WITA": "Central Indonesia Time", "EAT": "East Africa Time", "COST": "Colombia Summer Time", "AKDT": "Alaska Daylight Time", "ART": "Argentina Standard Time", "HNOG": "West Greenland Standard Time", "AWST": "Australian Western Standard Time", "AWDT": "Australian Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "EST": "Eastern Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "SRT": "Suriname Time", "NZDT": "New Zealand Daylight Time", "CLT": "Chile Standard Time", "GFT": "French Guiana Time", "HNNOMX": "Northwest Mexico Standard Time", "MDT": "Macau Summer Time", "CDT": "Central Daylight Time", "HNT": "Newfoundland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHST": "Lord Howe Standard Time", "WAT": "West Africa Standard Time", "CST": "Central Standard Time", "WESZ": "Western European Summer Time", "CHADT": "Chatham Daylight Time", "PDT": "Pacific Daylight Time", "MESZ": "Central European Summer Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "AEST": "Australian Eastern Standard Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "HECU": "Cuba Daylight Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "AKST": "Alaska Standard Time", "WEZ": "Western European Standard Time", "HKST": "Hong Kong Summer Time", "CHAST": "Chatham Standard Time", "PST": "Pacific Standard Time", "ACWDT": "Australian Central Western Daylight Time", "NZST": "New Zealand Standard Time", "HNEG": "East Greenland Standard Time", "ACST": "Australian Central Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "ADT": "Atlantic Daylight Time", "OEZ": "Eastern European Standard Time", "HAST": "Hawaii-Aleutian Standard Time"}, -+ locale: "en_GM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "D", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKT": "HKT", "ART": "ART", "WESZ": "WESZ", "WAST": "WAST", "OESZ": "OESZ", "ChST": "ChST", "IST": "IST", "∅∅∅": "∅∅∅", "HAT": "HAT", "CLT": "CLT", "CST": "CST", "VET": "VET", "HNCU": "HNCU", "OEZ": "OEZ", "WARST": "WARST", "COST": "COST", "AWDT": "AWDT", "HNPM": "HNPM", "HEPMX": "HEPMX", "EST": "EST", "TMST": "TMST", "ADT": "ADT", "GMT": "GMT", "SRT": "SRT", "SGT": "SGT", "EAT": "EAT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AKDT": "AKDT", "HKST": "HKST", "CLST": "CLST", "WITA": "WITA", "ACST": "ACST", "HNEG": "HNEG", "AWST": "AWST", "CHAST": "CHAST", "CHADT": "CHADT", "UYST": "UYST", "PDT": "PDT", "BT": "BT", "GFT": "GFT", "SAST": "SAST", "EDT": "EDT", "WIB": "WIB", "LHDT": "LHDT", "MYT": "MYT", "ACWST": "ACWST", "WIT": "WIT", "COT": "COT", "CDT": "CDT", "MST": "MST", "MEZ": "MEZ", "UYT": "UYT", "GYT": "GYT", "BOT": "BOT", "MESZ": "MESZ", "WEZ": "WEZ", "HECU": "HECU", "NZDT": "NZDT", "ACDT": "ACDT", "HEEG": "HEEG", "LHST": "LHST", "HNPMX": "HNPMX", "CAT": "CAT", "MDT": "MDT", "ECT": "ECT", "HAST": "HAST", "JDT": "JDT", "PST": "PST", "NZST": "NZST", "AEDT": "AEDT", "WAT": "WAT", "HNT": "HNT", "TMT": "TMT", "AST": "AST", "JST": "JST", "HEPM": "HEPM", "AEST": "AEST", "ACWDT": "ACWDT", "AKST": "AKST", "WART": "WART", "HNOG": "HNOG", "HEOG": "HEOG", "ARST": "ARST", "HADT": "HADT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_GM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_GM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_GM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_GM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GM' and handles both Whole and Real numbers based on 'v' - func (en *en_GM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GM' -@@ -278,56 +195,7 @@ func (en *en_GM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GM' -@@ -336,84 +204,33 @@ func (en *en_GM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_GM' -+func (en *en_GM) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_GM' --func (en *en_GM) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_GM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_GM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_GM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_GM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_GM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_GM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_GM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_GU/en_GU.go b/en_GU/en_GU.go -index 34fd7aa..198ee18 100644 ---- a/en_GU/en_GU.go -+++ b/en_GU/en_GU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_GU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GU' locale - func New() locales.Translator { - return &en_GU{ -- locale: "en_GU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CDT": "Central Daylight Time", "PDT": "Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "IST": "India Standard Time", "JDT": "Japan Daylight Time", "UYT": "Uruguay Standard Time", "CST": "Central Standard Time", "WITA": "Central Indonesia Time", "LHST": "Lord Howe Standard Time", "BOT": "Bolivia Time", "HNCU": "Cuba Standard Time", "GYT": "Guyana Time", "AEST": "Australian Eastern Standard Time", "MESZ": "Central European Summer Time", "∅∅∅": "Amazon Summer Time", "WART": "Western Argentina Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "AKST": "Alaska Standard Time", "WIB": "Western Indonesia Time", "WESZ": "Western European Summer Time", "MEZ": "Central European Standard Time", "HEOG": "West Greenland Summer Time", "HKT": "Hong Kong Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "GFT": "French Guiana Time", "HNNOMX": "Northwest Mexico Standard Time", "CHAST": "Chatham Standard Time", "SGT": "Singapore Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWDT": "Australian Central Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "AST": "Atlantic Standard Time", "CAT": "Central Africa Time", "MST": "Macau Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "UYST": "Uruguay Summer Time", "EST": "Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "MDT": "Macau Summer Time", "WIT": "Eastern Indonesia Time", "ChST": "Chamorro Standard Time", "SRT": "Suriname Time", "HNOG": "West Greenland Standard Time", "ART": "Argentina Standard Time", "AWDT": "Australian Western Daylight Time", "HEEG": "East Greenland Summer Time", "AKDT": "Alaska Daylight Time", "PST": "Pacific Standard Time", "ARST": "Argentina Summer Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "CLST": "Chile Summer Time", "ACDT": "Australian Central Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "EDT": "Eastern Daylight Time", "VET": "Venezuela Time", "NZST": "New Zealand Standard Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "HAT": "Newfoundland Daylight Time", "CLT": "Chile Standard Time", "ACST": "Australian Central Standard Time", "WARST": "Western Argentina Summer Time", "BT": "Bhutan Time", "COST": "Colombia Summer Time", "HECU": "Cuba Daylight Time", "TMT": "Turkmenistan Standard Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "COT": "Colombia Standard Time", "MYT": "Malaysia Time", "ADT": "Atlantic Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "NZDT": "New Zealand Daylight Time", "TMST": "Turkmenistan Summer Time", "WAT": "West Africa Standard Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time"}, -+ locale: "en_GU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EAT": "EAT", "HADT": "HADT", "AWST": "AWST", "HAT": "HAT", "AST": "AST", "SRT": "SRT", "ACDT": "ACDT", "WAT": "WAT", "GFT": "GFT", "GYT": "GYT", "HKST": "HKST", "ART": "ART", "HENOMX": "HENOMX", "HECU": "HECU", "VET": "VET", "HKT": "HKT", "JDT": "JDT", "BOT": "BOT", "CHADT": "CHADT", "UYST": "UYST", "EST": "EST", "MDT": "MDT", "HNPMX": "HNPMX", "COT": "COT", "COST": "COST", "HEPM": "HEPM", "MEZ": "MEZ", "CHAST": "CHAST", "OEZ": "OEZ", "ECT": "ECT", "GMT": "GMT", "HAST": "HAST", "PDT": "PDT", "OESZ": "OESZ", "CLT": "CLT", "ChST": "ChST", "ACWST": "ACWST", "IST": "IST", "UYT": "UYT", "JST": "JST", "∅∅∅": "∅∅∅", "TMST": "TMST", "WITA": "WITA", "ARST": "ARST", "HNEG": "HNEG", "ACWDT": "ACWDT", "WARST": "WARST", "SAST": "SAST", "CAT": "CAT", "CDT": "CDT", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "MYT": "MYT", "WESZ": "WESZ", "WART": "WART", "CLST": "CLST", "WIB": "WIB", "MST": "MST", "AEST": "AEST", "HNT": "HNT", "HNOG": "HNOG", "NZST": "NZST", "MESZ": "MESZ", "BT": "BT", "WEZ": "WEZ", "SGT": "SGT", "NZDT": "NZDT", "PST": "PST", "HNCU": "HNCU", "AKST": "AKST", "LHST": "LHST", "AEDT": "AEDT", "EDT": "EDT", "TMT": "TMT", "ADT": "ADT", "HNPM": "HNPM", "HEEG": "HEEG", "LHDT": "LHDT", "HEPMX": "HEPMX", "WAST": "WAST", "AKDT": "AKDT", "WIT": "WIT", "HEOG": "HEOG", "ACST": "ACST", "CST": "CST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_GU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GU) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_GU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GU) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_GU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GU) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_GU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GU' and handles both Whole and Real numbers based on 'v' - func (en *en_GU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GU' -@@ -278,56 +195,7 @@ func (en *en_GU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GU' -@@ -336,68 +204,7 @@ func (en *en_GU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_GU' -@@ -405,15 +212,15 @@ func (en *en_GU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_GU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_GU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_GU) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_GU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_GU) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_GU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_GU) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_GU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_GU) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_GU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_GU) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_GY/en_GY.go b/en_GY/en_GY.go -index cde7490..470e0fb 100644 ---- a/en_GY/en_GY.go -+++ b/en_GY/en_GY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_GY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_GY' locale - func New() locales.Translator { - return &en_GY{ -- locale: "en_GY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "$", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ECT": "Ecuador Time", "COST": "Colombia Summer Time", "WART": "Western Argentina Standard Time", "HNT": "Newfoundland Standard Time", "PDT": "Pacific Daylight Time", "MESZ": "Central European Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HKST": "Hong Kong Summer Time", "TMT": "Turkmenistan Standard Time", "GYT": "Guyana Time", "UYT": "Uruguay Standard Time", "MDT": "Mountain Daylight Time", "HKT": "Hong Kong Standard Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "HEOG": "West Greenland Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "BOT": "Bolivia Time", "HNEG": "East Greenland Standard Time", "WAST": "West Africa Summer Time", "WIB": "Western Indonesia Time", "WESZ": "Western European Summer Time", "ART": "Argentina Standard Time", "GFT": "French Guiana Time", "HNNOMX": "Northwest Mexico Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "MYT": "Malaysia Time", "WITA": "Central Indonesia Time", "IST": "India Standard Time", "HNCU": "Cuba Standard Time", "CDT": "Central Daylight Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "EDT": "Eastern Daylight Time", "ACWST": "Australian Central Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CHAST": "Chatham Standard Time", "BT": "Bhutan Time", "∅∅∅": "Amazon Summer Time", "ChST": "Chamorro Standard Time", "GMT": "Greenwich Mean Time", "AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "MST": "Mountain Standard Time", "WAT": "West Africa Standard Time", "COT": "Colombia Standard Time", "AEST": "Australian Eastern Standard Time", "CHADT": "Chatham Daylight Time", "JDT": "Japan Daylight Time", "NZDT": "New Zealand Daylight Time", "HEEG": "East Greenland Summer Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "UYST": "Uruguay Summer Time", "WIT": "Eastern Indonesia Time", "WEZ": "Western European Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "HAT": "Newfoundland Daylight Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "OESZ": "Eastern European Summer Time", "WARST": "Western Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "CLST": "Chile Summer Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "MEZ": "Central European Standard Time", "HECU": "Cuba Daylight Time", "AKST": "Alaska Standard Time", "AWST": "Australian Western Standard Time", "AWDT": "Australian Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "AKDT": "Alaska Daylight Time", "VET": "Venezuela Time", "HNOG": "West Greenland Standard Time", "PST": "Pacific Standard Time", "EAT": "East Africa Time", "SRT": "Suriname Time", "ACWDT": "Australian Central Western Daylight Time", "ARST": "Argentina Summer Time"}, -+ locale: "en_GY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "$", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAT": "HAT", "WIT": "WIT", "EST": "EST", "SRT": "SRT", "IST": "IST", "WIB": "WIB", "MDT": "MDT", "ADT": "ADT", "PDT": "PDT", "WAST": "WAST", "COST": "COST", "EAT": "EAT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "ACWST": "ACWST", "HNOG": "HNOG", "HEOG": "HEOG", "NZDT": "NZDT", "HNPM": "HNPM", "AEST": "AEST", "HNPMX": "HNPMX", "GFT": "GFT", "TMT": "TMT", "ACWDT": "ACWDT", "AKDT": "AKDT", "WART": "WART", "TMST": "TMST", "CLT": "CLT", "CDT": "CDT", "ART": "ART", "CHAST": "CHAST", "UYT": "UYT", "CLST": "CLST", "HAST": "HAST", "BT": "BT", "HENOMX": "HENOMX", "AWDT": "AWDT", "GYT": "GYT", "CST": "CST", "BOT": "BOT", "HADT": "HADT", "MESZ": "MESZ", "ACDT": "ACDT", "WEZ": "WEZ", "EDT": "EDT", "HEEG": "HEEG", "JST": "JST", "LHST": "LHST", "PST": "PST", "HNCU": "HNCU", "HKT": "HKT", "CAT": "CAT", "WITA": "WITA", "NZST": "NZST", "ACST": "ACST", "SGT": "SGT", "HNT": "HNT", "JDT": "JDT", "CHADT": "CHADT", "AKST": "AKST", "SAST": "SAST", "GMT": "GMT", "OEZ": "OEZ", "WARST": "WARST", "COT": "COT", "AST": "AST", "ChST": "ChST", "WAT": "WAT", "UYST": "UYST", "HEPMX": "HEPMX", "MST": "MST", "ECT": "ECT", "MEZ": "MEZ", "AWST": "AWST", "LHDT": "LHDT", "MYT": "MYT", "VET": "VET", "HECU": "HECU", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "HKST": "HKST", "ARST": "ARST", "AEDT": "AEDT", "WESZ": "WESZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_GY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_GY) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_GY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_GY) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_GY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_GY) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_GY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_GY' and handles both Whole and Real numbers based on 'v' - func (en *en_GY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_GY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_GY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_GY' -@@ -278,56 +195,7 @@ func (en *en_GY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_GY' -@@ -336,84 +204,33 @@ func (en *en_GY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_GY' -+func (en *en_GY) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_GY' --func (en *en_GY) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_GY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_GY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_GY) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_GY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_GY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_GY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_GY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_HK/en_HK.go b/en_HK/en_HK.go -index 64351fd..54f770e 100644 ---- a/en_HK/en_HK.go -+++ b/en_HK/en_HK.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_HK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_HK' locale - func New() locales.Translator { - return &en_HK{ -- locale: "en_HK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"LHDT": "Lord Howe Daylight Time", "MEZ": "Central European Standard Time", "MST": "Macau Standard Time", "HNPMX": "Mexican Pacific Standard Time", "ART": "Argentina Standard Time", "WIT": "Eastern Indonesia Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "UYT": "Uruguay Standard Time", "COT": "Colombia Standard Time", "AKST": "Alaska Standard Time", "ARST": "Argentina Summer Time", "TMST": "Turkmenistan Summer Time", "WAST": "West Africa Summer Time", "EDT": "Eastern Daylight Time", "PST": "Pacific Standard Time", "ChST": "Chamorro Standard Time", "HNEG": "East Greenland Standard Time", "HECU": "Cuba Daylight Time", "CHAST": "Chatham Standard Time", "CLT": "Chile Standard Time", "ACWDT": "Australian Central Western Daylight Time", "NZDT": "New Zealand Daylight Time", "CAT": "Central Africa Time", "SGT": "Singapore Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "SRT": "Suriname Time", "JST": "Japan Standard Time", "WAT": "West Africa Standard Time", "WIB": "Western Indonesia Time", "HKST": "Hong Kong Summer Time", "AEST": "Australian Eastern Standard Time", "EAT": "East Africa Time", "CDT": "Central Daylight Time", "ADT": "Atlantic Daylight Time", "WEZ": "Western European Standard Time", "LHST": "Lord Howe Standard Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "MYT": "Malaysia Time", "BT": "Bhutan Time", "AWDT": "Australian Western Daylight Time", "HNT": "Newfoundland Standard Time", "HNOG": "West Greenland Standard Time", "AWST": "Australian Western Standard Time", "AEDT": "Australian Eastern Daylight Time", "MESZ": "Central European Summer Time", "HNCU": "Cuba Standard Time", "EST": "Eastern Standard Time", "AST": "Atlantic Standard Time", "WART": "Western Argentina Standard Time", "IST": "India Standard Time", "GFT": "French Guiana Time", "OESZ": "Eastern European Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "WITA": "Central Indonesia Time", "JDT": "Japan Daylight Time", "∅∅∅": "Azores Summer Time", "GMT": "Greenwich Mean Time", "AKDT": "Alaska Daylight Time", "NZST": "New Zealand Standard Time", "CHADT": "Chatham Daylight Time", "CLST": "Chile Summer Time", "ACST": "Australian Central Standard Time", "WESZ": "Western European Summer Time", "HEOG": "West Greenland Summer Time", "PDT": "Pacific Daylight Time", "WARST": "Western Argentina Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "BOT": "Bolivia Time", "COST": "Colombia Summer Time", "VET": "Venezuela Time", "OEZ": "Eastern European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "UYST": "Uruguay Summer Time", "ACWST": "Australian Central Western Standard Time", "HAT": "Newfoundland Daylight Time"}, -+ locale: "en_HK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"JST": "JST", "AEST": "AEST", "OESZ": "OESZ", "EAT": "EAT", "EST": "EST", "CST": "CST", "ECT": "ECT", "ART": "ART", "ACDT": "ACDT", "UYST": "UYST", "WAST": "WAST", "GFT": "GFT", "PST": "PST", "ARST": "ARST", "HNEG": "HNEG", "CLT": "CLT", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "TMT": "TMT", "HNOG": "HNOG", "HEOG": "HEOG", "GMT": "GMT", "LHST": "LHST", "ACWST": "ACWST", "OEZ": "OEZ", "HNT": "HNT", "MEZ": "MEZ", "MESZ": "MESZ", "PDT": "PDT", "WITA": "WITA", "HAST": "HAST", "HEEG": "HEEG", "HNPM": "HNPM", "IST": "IST", "HAT": "HAT", "ChST": "ChST", "TMST": "TMST", "HECU": "HECU", "WART": "WART", "HKST": "HKST", "CHADT": "CHADT", "WARST": "WARST", "COT": "COT", "WAT": "WAT", "MST": "MST", "HADT": "HADT", "JDT": "JDT", "SGT": "SGT", "HEPMX": "HEPMX", "AEDT": "AEDT", "HKT": "HKT", "SRT": "SRT", "COST": "COST", "EDT": "EDT", "CLST": "CLST", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "ACWDT": "ACWDT", "VET": "VET", "AKST": "AKST", "AKDT": "AKDT", "WIT": "WIT", "CAT": "CAT", "NZST": "NZST", "NZDT": "NZDT", "WIB": "WIB", "WEZ": "WEZ", "HNPMX": "HNPMX", "BT": "BT", "ADT": "ADT", "AWDT": "AWDT", "GYT": "GYT", "MDT": "MDT", "AWST": "AWST", "MYT": "MYT", "CHAST": "CHAST", "WESZ": "WESZ", "SAST": "SAST", "AST": "AST", "BOT": "BOT", "ACST": "ACST", "LHDT": "LHDT", "UYT": "UYT", "HNCU": "HNCU", "CDT": "CDT"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_HK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_HK) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_HK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_HK) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_HK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_HK) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_HK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_HK' and handles both Whole and Real numbers based on 'v' - func (en *en_HK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_HK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_HK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_HK' -@@ -278,56 +197,7 @@ func (en *en_HK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_HK' -@@ -336,68 +206,7 @@ func (en *en_HK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_HK' -@@ -424,17 +233,6 @@ func (en *en_HK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +241,6 @@ func (en *en_HK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +249,6 @@ func (en *en_HK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,13 +257,11 @@ func (en *en_HK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +269,6 @@ func (en *en_HK) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +278,11 @@ func (en *en_HK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +297,6 @@ func (en *en_HK) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +306,11 @@ func (en *en_HK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +327,6 @@ func (en *en_HK) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +338,11 @@ func (en *en_HK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +359,6 @@ func (en *en_HK) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_IE/en_IE.go b/en_IE/en_IE.go -index f2f0d6e..dde5127 100644 ---- a/en_IE/en_IE.go -+++ b/en_IE/en_IE.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_IE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_IE' locale - func New() locales.Translator { - return &en_IE{ -- locale: "en_IE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GYT": "Guyana Time", "PST": "Pacific Standard Time", "BOT": "Bolivia Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "HECU": "Cuba Daylight Time", "HNOG": "West Greenland Standard Time", "JST": "Japan Standard Time", "MYT": "Malaysia Time", "AKST": "Alaska Standard Time", "WIT": "Eastern Indonesia Time", "MESZ": "Central European Summer Time", "NZST": "New Zealand Standard Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CAT": "Central Africa Time", "HNCU": "Cuba Standard Time", "MDT": "Macau Summer Time", "WESZ": "Western European Summer Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "BT": "Bhutan Time", "WEZ": "Western European Standard Time", "WITA": "Central Indonesia Time", "HEOG": "West Greenland Summer Time", "ARST": "Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "TMT": "Turkmenistan Standard Time", "WAT": "West Africa Standard Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "NZDT": "New Zealand Daylight Time", "PDT": "Pacific Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "TMST": "Turkmenistan Summer Time", "AKDT": "Alaska Daylight Time", "CDT": "Central Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "SRT": "Suriname Time", "SAST": "South Africa Standard Time", "OEZ": "Eastern European Standard Time", "COST": "Colombia Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "CHADT": "Chatham Daylight Time", "HEEG": "East Greenland Summer Time", "WARST": "Western Argentina Summer Time", "VET": "Venezuela Time", "HAT": "Newfoundland Daylight Time", "UYST": "Uruguay Summer Time", "WIB": "Western Indonesia Time", "ACWST": "Australian Central Western Standard Time", "AWDT": "Australian Western Daylight Time", "∅∅∅": "Amazon Summer Time", "GFT": "French Guiana Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "IST": "India Standard Time", "HNEG": "East Greenland Standard Time", "ACST": "Australian Central Standard Time", "EAT": "East Africa Time", "EDT": "Eastern Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "MEZ": "Central European Standard Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "LHDT": "Lord Howe Daylight Time", "CHAST": "Chatham Standard Time", "WAST": "West Africa Summer Time", "UYT": "Uruguay Standard Time", "HKT": "Hong Kong Standard Time", "HKST": "Hong Kong Summer Time"}, -+ locale: "en_IE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"a.m.", "p.m."}, -+ timezones: map[string]string{"TMT": "TMT", "CDT": "CDT", "NZDT": "NZDT", "ART": "ART", "LHDT": "LHDT", "AEST": "AEST", "MEZ": "MEZ", "HAST": "HAST", "ACDT": "ACDT", "HNPM": "HNPM", "LHST": "LHST", "HNCU": "HNCU", "EST": "EST", "MDT": "MDT", "ChST": "ChST", "BOT": "BOT", "HENOMX": "HENOMX", "AWST": "AWST", "TMST": "TMST", "GMT": "GMT", "HEOG": "HEOG", "EDT": "EDT", "HNPMX": "HNPMX", "IST": "IST", "HEPMX": "HEPMX", "OEZ": "OEZ", "CAT": "CAT", "∅∅∅": "∅∅∅", "MESZ": "MESZ", "HNEG": "HNEG", "HEPM": "HEPM", "AEDT": "AEDT", "WARST": "WARST", "GYT": "GYT", "HKST": "HKST", "AST": "AST", "ECT": "ECT", "CHADT": "CHADT", "SGT": "SGT", "AKDT": "AKDT", "SAST": "SAST", "JDT": "JDT", "MYT": "MYT", "WIT": "WIT", "ACST": "ACST", "WAT": "WAT", "CST": "CST", "BT": "BT", "AWDT": "AWDT", "ACWDT": "ACWDT", "WAST": "WAST", "AKST": "AKST", "HNNOMX": "HNNOMX", "UYT": "UYT", "UYST": "UYST", "HECU": "HECU", "OESZ": "OESZ", "HNOG": "HNOG", "HKT": "HKT", "WITA": "WITA", "MST": "MST", "PST": "PST", "WESZ": "WESZ", "HNT": "HNT", "WIB": "WIB", "JST": "JST", "ACWST": "ACWST", "PDT": "PDT", "WART": "WART", "COT": "COT", "CLT": "CLT", "ADT": "ADT", "HADT": "HADT", "HEEG": "HEEG", "WEZ": "WEZ", "VET": "VET", "HAT": "HAT", "CLST": "CLST", "NZST": "NZST", "SRT": "SRT", "EAT": "EAT", "CHAST": "CHAST", "GFT": "GFT", "COST": "COST", "ARST": "ARST"}, - } - } -  -@@ -112,8 +91,8 @@ func (en *en_IE) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_IE) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +117,7 @@ func (en *en_IE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_IE) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_IE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_IE) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_IE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_IE) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_IE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_IE' and handles both Whole and Real numbers based on 'v' - func (en *en_IE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_IE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_IE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_IE' -@@ -278,56 +197,7 @@ func (en *en_IE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_IE' -@@ -336,68 +206,7 @@ func (en *en_IE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_IE' -@@ -405,17 +214,6 @@ func (en *en_IE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_IE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_IE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_IL/en_IL.go b/en_IL/en_IL.go -index aab8e5b..d32268b 100644 ---- a/en_IL/en_IL.go -+++ b/en_IL/en_IL.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_IL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_IL' locale - func New() locales.Translator { - return &en_IL{ -- locale: "en_IL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"VET": "Venezuela Time", "PDT": "Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "HEOG": "West Greenland Summer Time", "IST": "India Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "ChST": "Chamorro Standard Time", "WAT": "West Africa Standard Time", "EST": "Eastern Standard Time", "AST": "Atlantic Standard Time", "PST": "Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "HAT": "Newfoundland Daylight Time", "AWST": "Australian Western Standard Time", "OEZ": "Eastern European Standard Time", "ADT": "Atlantic Daylight Time", "WIB": "Western Indonesia Time", "ART": "Argentina Standard Time", "HKST": "Hong Kong Summer Time", "MEZ": "Central European Standard Time", "JST": "Japan Standard Time", "ECT": "Ecuador Time", "GYT": "Guyana Time", "HKT": "Hong Kong Standard Time", "JDT": "Japan Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "AEDT": "Australian Eastern Daylight Time", "LHDT": "Lord Howe Daylight Time", "HNEG": "East Greenland Standard Time", "EAT": "East Africa Time", "WIT": "Eastern Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "TMT": "Turkmenistan Standard Time", "WAST": "West Africa Summer Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "AKDT": "Alaska Daylight Time", "SRT": "Suriname Time", "WESZ": "Western European Summer Time", "HNT": "Newfoundland Standard Time", "CHADT": "Chatham Daylight Time", "HECU": "Cuba Daylight Time", "AKST": "Alaska Standard Time", "BT": "Bhutan Time", "MESZ": "Central European Summer Time", "CHAST": "Chatham Standard Time", "CLST": "Chile Summer Time", "COST": "Colombia Summer Time", "CST": "Central Standard Time", "ACST": "Australian Central Standard Time", "HNCU": "Cuba Standard Time", "EDT": "Eastern Daylight Time", "UYST": "Uruguay Summer Time", "WEZ": "Western European Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "HNOG": "West Greenland Standard Time", "AEST": "Australian Eastern Standard Time", "AWDT": "Australian Western Daylight Time", "WITA": "Central Indonesia Time", "HEEG": "East Greenland Summer Time", "GFT": "French Guiana Time", "GMT": "Greenwich Mean Time", "UYT": "Uruguay Standard Time", "CDT": "Central Daylight Time", "NZST": "New Zealand Standard Time", "MYT": "Malaysia Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time", "TMST": "Turkmenistan Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "ARST": "Argentina Summer Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "ACDT": "Australian Central Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time"}, -+ locale: "en_IL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "OESZ": "OESZ", "SAST": "SAST", "WIB": "WIB", "AST": "AST", "ChST": "ChST", "SGT": "SGT", "ACST": "ACST", "MYT": "MYT", "UYT": "UYT", "COST": "COST", "HNOG": "HNOG", "NZDT": "NZDT", "LHDT": "LHDT", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "HECU": "HECU", "AKST": "AKST", "TMT": "TMT", "CLT": "CLT", "MESZ": "MESZ", "AWST": "AWST", "UYST": "UYST", "CLST": "CLST", "WIT": "WIT", "ECT": "ECT", "BT": "BT", "VET": "VET", "OEZ": "OEZ", "COT": "COT", "MEZ": "MEZ", "JDT": "JDT", "AKDT": "AKDT", "WARST": "WARST", "GMT": "GMT", "BOT": "BOT", "EAT": "EAT", "HNT": "HNT", "AWDT": "AWDT", "PDT": "PDT", "WAT": "WAT", "NZST": "NZST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "EST": "EST", "WITA": "WITA", "CST": "CST", "MST": "MST", "CHADT": "CHADT", "AEDT": "AEDT", "WESZ": "WESZ", "WART": "WART", "GYT": "GYT", "HEEG": "HEEG", "LHST": "LHST", "HNPM": "HNPM", "TMST": "TMST", "CAT": "CAT", "HNEG": "HNEG", "HEPM": "HEPM", "JST": "JST", "ACWDT": "ACWDT", "HNCU": "HNCU", "MDT": "MDT", "ART": "ART", "ARST": "ARST", "HEPMX": "HEPMX", "GFT": "GFT", "EDT": "EDT", "HKST": "HKST", "CDT": "CDT", "SRT": "SRT", "HAT": "HAT", "HENOMX": "HENOMX", "WEZ": "WEZ", "WAST": "WAST", "HEOG": "HEOG", "CHAST": "CHAST", "PST": "PST", "AEST": "AEST", "IST": "IST", "HKT": "HKT", "ADT": "ADT", "HAST": "HAST", "HADT": "HADT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_IL) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_IL) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_IL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_IL) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_IL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_IL) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_IL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_IL) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_IL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_IL' and handles both Whole and Real numbers based on 'v' - func (en *en_IL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_IL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_IL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_IL' -@@ -278,56 +195,7 @@ func (en *en_IL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_IL' -@@ -336,68 +204,7 @@ func (en *en_IL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_IL' -@@ -405,17 +212,6 @@ func (en *en_IL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +220,6 @@ func (en *en_IL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +228,6 @@ func (en *en_IL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +236,6 @@ func (en *en_IL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_IM/en_IM.go b/en_IM/en_IM.go -index ed00d31..33b3abe 100644 ---- a/en_IM/en_IM.go -+++ b/en_IM/en_IM.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_IM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_IM' locale - func New() locales.Translator { - return &en_IM{ -- locale: "en_IM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HKST": "Hong Kong Summer Time", "CLST": "Chile Summer Time", "WART": "Western Argentina Standard Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "ChST": "Chamorro Standard Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time", "CST": "Central Standard Time", "AEST": "Australian Eastern Standard Time", "CHAST": "Chatham Standard Time", "WITA": "Central Indonesia Time", "CAT": "Central Africa Time", "ECT": "Ecuador Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time", "UYT": "Uruguay Standard Time", "AST": "Atlantic Standard Time", "PDT": "Pacific Daylight Time", "WESZ": "Western European Summer Time", "AWST": "Australian Western Standard Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "HEEG": "East Greenland Summer Time", "WAT": "West Africa Standard Time", "MESZ": "Central European Summer Time", "CHADT": "Chatham Daylight Time", "JST": "Japan Standard Time", "MYT": "Malaysia Time", "SRT": "Suriname Time", "HNT": "Newfoundland Standard Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HAT": "Newfoundland Daylight Time", "IST": "India Standard Time", "TMST": "Turkmenistan Summer Time", "∅∅∅": "Peru Summer Time", "OESZ": "Eastern European Summer Time", "HECU": "Cuba Daylight Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "COT": "Colombia Standard Time", "VET": "Venezuela Time", "ARST": "Argentina Summer Time", "NZDT": "New Zealand Daylight Time", "SAST": "South Africa Standard Time", "WAST": "West Africa Summer Time", "OEZ": "Eastern European Standard Time", "MST": "Macau Standard Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "TMT": "Turkmenistan Standard Time", "ACST": "Australian Central Standard Time", "EDT": "Eastern Daylight Time", "AKST": "Alaska Standard Time", "AKDT": "Alaska Daylight Time", "WIT": "Eastern Indonesia Time", "MEZ": "Central European Standard Time", "HNCU": "Cuba Standard Time", "EST": "Eastern Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "AEDT": "Australian Eastern Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZST": "New Zealand Standard Time", "LHDT": "Lord Howe Daylight Time", "COST": "Colombia Summer Time", "UYST": "Uruguay Summer Time", "GYT": "Guyana Time", "PST": "Pacific Standard Time", "HEOG": "West Greenland Summer Time", "AWDT": "Australian Western Daylight Time", "EAT": "East Africa Time", "MDT": "Macau Summer Time", "HNPMX": "Mexican Pacific Standard Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "CLT": "Chile Standard Time", "ACDT": "Australian Central Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HNEG": "East Greenland Standard Time", "GFT": "French Guiana Time", "HEPMX": "Mexican Pacific Daylight Time", "HNOG": "West Greenland Standard Time"}, -+ locale: "en_IM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"EDT": "EDT", "BT": "BT", "ACWDT": "ACWDT", "HNCU": "HNCU", "OESZ": "OESZ", "GYT": "GYT", "SRT": "SRT", "PST": "PST", "CLST": "CLST", "NZDT": "NZDT", "ART": "ART", "JDT": "JDT", "UYST": "UYST", "HEPMX": "HEPMX", "TMST": "TMST", "CAT": "CAT", "HNT": "HNT", "COST": "COST", "∅∅∅": "∅∅∅", "ChST": "ChST", "HAT": "HAT", "WARST": "WARST", "EST": "EST", "HKST": "HKST", "AWST": "AWST", "MYT": "MYT", "PDT": "PDT", "WIB": "WIB", "MESZ": "MESZ", "CHAST": "CHAST", "GFT": "GFT", "SAST": "SAST", "COT": "COT", "GMT": "GMT", "HNEG": "HNEG", "EAT": "EAT", "ACWST": "ACWST", "HECU": "HECU", "AKST": "AKST", "WART": "WART", "HNOG": "HNOG", "CLT": "CLT", "MDT": "MDT", "BOT": "BOT", "AEDT": "AEDT", "ACST": "ACST", "HENOMX": "HENOMX", "JST": "JST", "WEZ": "WEZ", "AKDT": "AKDT", "WITA": "WITA", "ADT": "ADT", "SGT": "SGT", "ECT": "ECT", "HAST": "HAST", "HNPM": "HNPM", "UYT": "UYT", "IST": "IST", "HNPMX": "HNPMX", "TMT": "TMT", "CDT": "CDT", "AEST": "AEST", "VET": "VET", "MEZ": "MEZ", "LHDT": "LHDT", "HEPM": "HEPM", "WESZ": "WESZ", "WAST": "WAST", "WIT": "WIT", "HKT": "HKT", "CST": "CST", "ARST": "ARST", "OEZ": "OEZ", "HEOG": "HEOG", "MST": "MST", "NZST": "NZST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "WAT": "WAT", "AST": "AST", "ACDT": "ACDT", "LHST": "LHST", "CHADT": "CHADT", "HADT": "HADT", "HEEG": "HEEG"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_IM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_IM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_IM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_IM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_IM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_IM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_IM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_IM' and handles both Whole and Real numbers based on 'v' - func (en *en_IM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_IM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_IM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_IM' -@@ -278,56 +197,7 @@ func (en *en_IM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_IM' -@@ -336,68 +206,7 @@ func (en *en_IM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_IM' -@@ -405,17 +214,6 @@ func (en *en_IM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_IM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_IM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_IM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_IN/en_IN.go b/en_IN/en_IN.go -index 474fa91..5e98563 100644 ---- a/en_IN/en_IN.go -+++ b/en_IN/en_IN.go -@@ -48,30 +48,13 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, - periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, - periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HADT": "Hawaii-Aleutian Daylight Time", "LHST": "Lord Howe Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "GYT": "Guyana Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HNEG": "East Greenland Standard Time", "WAST": "West Africa Summer Time", "CAT": "Central Africa Time", "WARST": "Western Argentina Summer Time", "UYT": "Uruguay Standard Time", "PST": "Pacific Standard Time", "MESZ": "Central European Summer Time", "PDT": "Pacific Daylight Time", "HKST": "Hong Kong Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "AKST": "Alaska Standard Time", "ADT": "Atlantic Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "AWST": "Australian Western Standard Time", "CHADT": "Chatham Daylight Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "SAST": "South Africa Standard Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "∅∅∅": "Peru Summer Time", "HNOG": "West Greenland Standard Time", "JST": "Japan Standard Time", "WITA": "Central Indonesia Time", "IST": "India Standard Time", "CLT": "Chile Standard Time", "JDT": "Japan Daylight Time", "OESZ": "Eastern European Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AEDT": "Australian Eastern Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "GMT": "Greenwich Mean Time", "HAST": "Hawaii-Aleutian Standard Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "CDT": "Central Daylight Time", "AST": "Atlantic Standard Time", "ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "CLST": "Chile Summer Time", "OEZ": "Eastern European Standard Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "ChST": "Chamorro Standard Time", "AKDT": "Alaska Daylight Time", "MYT": "Malaysia Time", "VET": "Venezuela Time", "WEZ": "Western European Standard Time", "HEOG": "West Greenland Summer Time", "ACST": "Australian Central Standard Time", "HNCU": "Cuba Standard Time", "MDT": "Macau Summer Time", "TMT": "Turkmenistan Standard Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "HKT": "Hong Kong Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "SGT": "Singapore Standard Time", "WIB": "Western Indonesia Time", "HAT": "Newfoundland Daylight Time", "MEZ": "Central European Standard Time", "HEEG": "East Greenland Summer Time", "TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time", "WAT": "West Africa Standard Time", "UYST": "Uruguay Summer Time", "MST": "Macau Standard Time", "EST": "Eastern Standard Time", "SRT": "Suriname Time", "BT": "Bhutan Time", "GFT": "French Guiana Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "HECU": "Cuba Daylight Time", "WART": "Western Argentina Standard Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time"}, -+ timezones: map[string]string{"GYT": "GYT", "HKT": "HKT", "BT": "BT", "AWST": "AWST", "PST": "PST", "PDT": "PDT", "HEPMX": "HEPMX", "CST": "CST", "ACDT": "ACDT", "WEZ": "WEZ", "GFT": "GFT", "HAT": "HAT", "WARST": "WARST", "HNEG": "HNEG", "HECU": "HECU", "HNT": "HNT", "CLT": "CLT", "IST": "IST", "OEZ": "OEZ", "MDT": "MDT", "ADT": "ADT", "AWDT": "AWDT", "MEZ": "MEZ", "ACST": "ACST", "UYST": "UYST", "HNPMX": "HNPMX", "HKST": "HKST", "WITA": "WITA", "SRT": "SRT", "HAST": "HAST", "WESZ": "WESZ", "AKDT": "AKDT", "WART": "WART", "WIT": "WIT", "COT": "COT", "NZDT": "NZDT", "BOT": "BOT", "HENOMX": "HENOMX", "JDT": "JDT", "LHDT": "LHDT", "AEDT": "AEDT", "CHAST": "CHAST", "CHADT": "CHADT", "ART": "ART", "HEPM": "HEPM", "GMT": "GMT", "WAT": "WAT", "WAST": "WAST", "NZST": "NZST", "ChST": "ChST", "VET": "VET", "AEST": "AEST", "HNCU": "HNCU", "OESZ": "OESZ", "SAST": "SAST", "CAT": "CAT", "ACWDT": "ACWDT", "HNPM": "HNPM", "HEOG": "HEOG", "MESZ": "MESZ", "LHST": "LHST", "AKST": "AKST", "EDT": "EDT", "TMT": "TMT", "ECT": "ECT", "MST": "MST", "AST": "AST", "EAT": "EAT", "HNOG": "HNOG", "COST": "COST", "TMST": "TMST", "WIB": "WIB", "ACWST": "ACWST", "JST": "JST", "UYT": "UYT", "∅∅∅": "∅∅∅", "EST": "EST", "CLST": "CLST", "HADT": "HADT", "HEEG": "HEEG", "MYT": "MYT", "SGT": "SGT", "CDT": "CDT", "ARST": "ARST", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -138,7 +121,7 @@ func (en *en_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_IN) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +131,7 @@ func (en *en_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_IN) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +141,7 @@ func (en *en_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_IN) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -205,7 +188,7 @@ func (en *en_IN) WeekdaysWide() []string { - func (en *en_IN) FmtNumber(num float64, v uint64) string { -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + 0 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - inSecondary := false -@@ -255,7 +238,7 @@ func (en *en_IN) FmtNumber(num float64, v uint64) string { - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_IN) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -287,7 +270,7 @@ func (en *en_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - inSecondary := false -@@ -358,7 +341,7 @@ func (en *en_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - inSecondary := false -@@ -492,17 +475,6 @@ func (en *en_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -532,13 +504,11 @@ func (en *en_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -546,13 +516,6 @@ func (en *en_IN) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -562,13 +525,11 @@ func (en *en_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -583,13 +544,6 @@ func (en *en_IN) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -599,13 +553,11 @@ func (en *en_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -622,14 +574,6 @@ func (en *en_IN) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -641,13 +585,11 @@ func (en *en_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -664,14 +606,6 @@ func (en *en_IN) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_IO/en_IO.go b/en_IO/en_IO.go -index cb121eb..91eaaaa 100644 ---- a/en_IO/en_IO.go -+++ b/en_IO/en_IO.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_IO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_IO' locale - func New() locales.Translator { - return &en_IO{ -- locale: "en_IO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"SRT": "Suriname Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "HEEG": "East Greenland Summer Time", "WESZ": "Western European Summer Time", "HAT": "Newfoundland Daylight Time", "HKT": "Hong Kong Standard Time", "TMST": "Turkmenistan Summer Time", "EST": "Eastern Standard Time", "WEZ": "Western European Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AEST": "Australian Eastern Standard Time", "HNEG": "East Greenland Standard Time", "EAT": "East Africa Time", "OESZ": "Eastern European Summer Time", "VET": "Venezuela Time", "HNOG": "West Greenland Standard Time", "HKST": "Hong Kong Summer Time", "CLST": "Chile Summer Time", "JST": "Japan Standard Time", "ChST": "Chamorro Standard Time", "AKDT": "Alaska Daylight Time", "WIT": "Eastern Indonesia Time", "ART": "Argentina Standard Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "JDT": "Japan Daylight Time", "WART": "Western Argentina Standard Time", "UYT": "Uruguay Standard Time", "PST": "Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHDT": "Lord Howe Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "BT": "Bhutan Time", "WITA": "Central Indonesia Time", "HECU": "Cuba Daylight Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "NZDT": "New Zealand Daylight Time", "CHADT": "Chatham Daylight Time", "BOT": "Bolivia Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "MST": "Macau Standard Time", "NZST": "New Zealand Standard Time", "∅∅∅": "Amazon Summer Time", "ACST": "Australian Central Standard Time", "GMT": "Greenwich Mean Time", "EDT": "Eastern Daylight Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "ARST": "Argentina Summer Time", "GYT": "Guyana Time", "UYST": "Uruguay Summer Time", "OEZ": "Eastern European Standard Time", "SGT": "Singapore Standard Time", "TMT": "Turkmenistan Standard Time", "ECT": "Ecuador Time", "COST": "Colombia Summer Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "AWST": "Australian Western Standard Time", "MESZ": "Central European Summer Time", "PDT": "Pacific Daylight Time", "CHAST": "Chatham Standard Time", "GFT": "French Guiana Time", "ACDT": "Australian Central Daylight Time", "WAST": "West Africa Summer Time", "WARST": "Western Argentina Summer Time", "MDT": "Macau Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "MYT": "Malaysia Time", "HEOG": "West Greenland Summer Time", "MEZ": "Central European Standard Time", "WAT": "West Africa Standard Time", "CST": "Central Standard Time", "AST": "Atlantic Standard Time", "HNCU": "Cuba Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time"}, -+ locale: "en_IO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"WART": "WART", "HKST": "HKST", "CST": "CST", "MEZ": "MEZ", "MYT": "MYT", "BT": "BT", "HEPMX": "HEPMX", "AKST": "AKST", "ChST": "ChST", "COT": "COT", "AST": "AST", "GMT": "GMT", "CHAST": "CHAST", "PDT": "PDT", "AEST": "AEST", "WESZ": "WESZ", "HNCU": "HNCU", "HKT": "HKT", "CLT": "CLT", "MST": "MST", "ACST": "ACST", "SAST": "SAST", "HEOG": "HEOG", "EST": "EST", "AWDT": "AWDT", "AKDT": "AKDT", "MESZ": "MESZ", "HEEG": "HEEG", "HNT": "HNT", "WIT": "WIT", "TMT": "TMT", "HAST": "HAST", "JDT": "JDT", "PST": "PST", "HNOG": "HNOG", "ARST": "ARST", "WIB": "WIB", "HNPM": "HNPM", "CHADT": "CHADT", "HNPMX": "HNPMX", "GYT": "GYT", "CDT": "CDT", "HADT": "HADT", "AEDT": "AEDT", "ECT": "ECT", "WITA": "WITA", "BOT": "BOT", "HENOMX": "HENOMX", "ACWST": "ACWST", "WAT": "WAT", "OEZ": "OEZ", "SRT": "SRT", "HNEG": "HNEG", "LHDT": "LHDT", "UYST": "UYST", "WEZ": "WEZ", "AWST": "AWST", "UYT": "UYT", "WAST": "WAST", "CLST": "CLST", "NZST": "NZST", "SGT": "SGT", "HAT": "HAT", "NZDT": "NZDT", "MDT": "MDT", "EAT": "EAT", "HNNOMX": "HNNOMX", "LHST": "LHST", "∅∅∅": "∅∅∅", "ADT": "ADT", "IST": "IST", "HECU": "HECU", "COST": "COST", "EDT": "EDT", "CAT": "CAT", "ACWDT": "ACWDT", "TMST": "TMST", "ART": "ART", "JST": "JST", "OESZ": "OESZ", "ACDT": "ACDT", "HEPM": "HEPM", "VET": "VET", "GFT": "GFT", "WARST": "WARST"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_IO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_IO) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_IO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_IO) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_IO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_IO) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_IO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_IO' and handles both Whole and Real numbers based on 'v' - func (en *en_IO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_IO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_IO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_IO' -@@ -278,56 +197,7 @@ func (en *en_IO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_IO' -@@ -336,84 +206,33 @@ func (en *en_IO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_IO' -+func (en *en_IO) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_IO' --func (en *en_IO) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +243,10 @@ func (en *en_IO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +262,10 @@ func (en *en_IO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +283,10 @@ func (en *en_IO) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_JE/en_JE.go b/en_JE/en_JE.go -index 59240a3..526d347 100644 ---- a/en_JE/en_JE.go -+++ b/en_JE/en_JE.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_JE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_JE' locale - func New() locales.Translator { - return &en_JE{ -- locale: "en_JE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"BOT": "Bolivia Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "SRT": "Suriname Time", "AEST": "Australian Eastern Standard Time", "LHST": "Lord Howe Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "CHAST": "Chatham Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "WESZ": "Western European Summer Time", "AEDT": "Australian Eastern Daylight Time", "ART": "Argentina Standard Time", "ACST": "Australian Central Standard Time", "WAT": "West Africa Standard Time", "COST": "Colombia Summer Time", "GMT": "Greenwich Mean Time", "AKST": "Alaska Standard Time", "MYT": "Malaysia Time", "WITA": "Central Indonesia Time", "JDT": "Japan Daylight Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "CDT": "Central Daylight Time", "VET": "Venezuela Time", "ACWDT": "Australian Central Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "BT": "Bhutan Time", "HEOG": "West Greenland Summer Time", "PST": "Pacific Standard Time", "HNPMX": "Mexican Pacific Standard Time", "ADT": "Atlantic Daylight Time", "PDT": "Pacific Daylight Time", "NZDT": "New Zealand Daylight Time", "HKST": "Hong Kong Summer Time", "AWST": "Australian Western Standard Time", "HEEG": "East Greenland Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "UYT": "Uruguay Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "WEZ": "Western European Standard Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "CHADT": "Chatham Daylight Time", "MEZ": "Central European Standard Time", "HNEG": "East Greenland Standard Time", "HKT": "Hong Kong Standard Time", "∅∅∅": "Amazon Summer Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "EST": "Eastern Standard Time", "GYT": "Guyana Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWST": "Australian Central Western Standard Time", "MST": "Mountain Standard Time", "HNOG": "West Greenland Standard Time", "OESZ": "Eastern European Summer Time", "HECU": "Cuba Daylight Time", "SGT": "Singapore Standard Time", "MDT": "Mountain Daylight Time", "SAST": "South Africa Standard Time", "GFT": "French Guiana Time", "ARST": "Argentina Summer Time", "MESZ": "Central European Summer Time", "JST": "Japan Standard Time", "CLT": "Chile Standard Time", "ChST": "Chamorro Standard Time", "EDT": "Eastern Daylight Time", "WIB": "Western Indonesia Time", "WIT": "Eastern Indonesia Time", "AWDT": "Australian Western Daylight Time", "HAT": "Newfoundland Daylight Time", "ECT": "Ecuador Time", "HNCU": "Cuba Standard Time", "AST": "Atlantic Standard Time", "UYST": "Uruguay Summer Time", "HNT": "Newfoundland Standard Time", "WAST": "West Africa Summer Time", "EAT": "East Africa Time", "AKDT": "Alaska Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLST": "Chile Summer Time"}, -+ locale: "en_JE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"AST": "AST", "ART": "ART", "HECU": "HECU", "HEPMX": "HEPMX", "CST": "CST", "ChST": "ChST", "IST": "IST", "COST": "COST", "CLST": "CLST", "HKST": "HKST", "MYT": "MYT", "CHADT": "CHADT", "AEST": "AEST", "UYT": "UYT", "ACWDT": "ACWDT", "OESZ": "OESZ", "WIT": "WIT", "ARST": "ARST", "AWDT": "AWDT", "LHDT": "LHDT", "OEZ": "OEZ", "WIB": "WIB", "ADT": "ADT", "∅∅∅": "∅∅∅", "SAST": "SAST", "HEOG": "HEOG", "BOT": "BOT", "AEDT": "AEDT", "GFT": "GFT", "WART": "WART", "PST": "PST", "GYT": "GYT", "CLT": "CLT", "MST": "MST", "ECT": "ECT", "HADT": "HADT", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "GMT": "GMT", "SRT": "SRT", "HKT": "HKT", "TMT": "TMT", "CDT": "CDT", "NZDT": "NZDT", "JDT": "JDT", "UYST": "UYST", "EST": "EST", "PDT": "PDT", "AKDT": "AKDT", "COT": "COT", "EAT": "EAT", "MESZ": "MESZ", "ACDT": "ACDT", "EDT": "EDT", "HNEG": "HNEG", "WAST": "WAST", "WARST": "WARST", "JST": "JST", "SGT": "SGT", "HNCU": "HNCU", "HAT": "HAT", "HNOG": "HNOG", "HEEG": "HEEG", "AWST": "AWST", "LHST": "LHST", "TMST": "TMST", "CAT": "CAT", "WESZ": "WESZ", "WAT": "WAT", "MDT": "MDT", "MEZ": "MEZ", "HNPM": "HNPM", "WEZ": "WEZ", "HNT": "HNT", "NZST": "NZST", "HAST": "HAST", "HEPM": "HEPM", "BT": "BT", "WITA": "WITA", "HENOMX": "HENOMX", "ACWST": "ACWST", "VET": "VET", "ACST": "ACST", "HNPMX": "HNPMX", "AKST": "AKST"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_JE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_JE) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_JE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_JE) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_JE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_JE) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_JE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_JE' and handles both Whole and Real numbers based on 'v' - func (en *en_JE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_JE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_JE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_JE' -@@ -278,56 +197,7 @@ func (en *en_JE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_JE' -@@ -336,68 +206,7 @@ func (en *en_JE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_JE' -@@ -405,17 +214,6 @@ func (en *en_JE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_JE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_JE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_JE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_JM/en_JM.go b/en_JM/en_JM.go -index 93cac37..4103e0d 100644 ---- a/en_JM/en_JM.go -+++ b/en_JM/en_JM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_JM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_JM' locale - func New() locales.Translator { - return &en_JM{ -- locale: "en_JM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "$", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"BT": "Bhutan Time", "MEZ": "Central European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "WIT": "Eastern Indonesia Time", "PST": "Pacific Standard Time", "IST": "India Standard Time", "ACST": "Australian Central Standard Time", "HECU": "Cuba Daylight Time", "SRT": "Suriname Time", "ECT": "Ecuador Time", "EAT": "East Africa Time", "WART": "Western Argentina Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PDT": "Pacific Daylight Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "AKDT": "Alaska Daylight Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHDT": "Lord Howe Daylight Time", "ChST": "Chamorro Standard Time", "WIB": "Western Indonesia Time", "ACWST": "Australian Central Western Standard Time", "ACWDT": "Australian Central Western Daylight Time", "ART": "Argentina Standard Time", "EDT": "Eastern Daylight Time", "AST": "Atlantic Standard Time", "VET": "Venezuela Time", "WAST": "West Africa Summer Time", "HNCU": "Cuba Standard Time", "CDT": "Central Daylight Time", "WEZ": "Western European Standard Time", "TMT": "Turkmenistan Standard Time", "SGT": "Singapore Standard Time", "MST": "Macau Standard Time", "HEOG": "West Greenland Summer Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "HEEG": "East Greenland Summer Time", "OEZ": "Eastern European Standard Time", "WARST": "Western Argentina Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "HNOG": "West Greenland Standard Time", "WESZ": "Western European Summer Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "COT": "Colombia Standard Time", "AWST": "Australian Western Standard Time", "AWDT": "Australian Western Daylight Time", "CHADT": "Chatham Daylight Time", "CLST": "Chile Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "EST": "Eastern Standard Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "MYT": "Malaysia Time", "JDT": "Japan Daylight Time", "TMST": "Turkmenistan Summer Time", "COST": "Colombia Summer Time", "AKST": "Alaska Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "ARST": "Argentina Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZST": "New Zealand Standard Time", "CLT": "Chile Standard Time", "GFT": "French Guiana Time", "GMT": "Greenwich Mean Time", "OESZ": "Eastern European Summer Time", "ACDT": "Australian Central Daylight Time", "UYT": "Uruguay Standard Time", "HNT": "Newfoundland Standard Time", "AEST": "Australian Eastern Standard Time", "BOT": "Bolivia Time", "ADT": "Atlantic Daylight Time", "CAT": "Central Africa Time", "WAT": "West Africa Standard Time", "UYST": "Uruguay Summer Time", "CST": "Central Standard Time", "HAT": "Newfoundland Daylight Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "NZDT": "New Zealand Daylight Time", "HNEG": "East Greenland Standard Time", "∅∅∅": "Azores Summer Time"}, -+ locale: "en_JM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "$", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEEG": "HEEG", "HNPM": "HNPM", "BT": "BT", "HNPMX": "HNPMX", "COST": "COST", "HKT": "HKT", "IST": "IST", "WESZ": "WESZ", "HECU": "HECU", "HAST": "HAST", "JDT": "JDT", "NZST": "NZST", "AST": "AST", "EAT": "EAT", "LHDT": "LHDT", "PST": "PST", "EST": "EST", "TMST": "TMST", "ADT": "ADT", "GMT": "GMT", "SRT": "SRT", "SGT": "SGT", "EDT": "EDT", "HKST": "HKST", "CLST": "CLST", "WEZ": "WEZ", "HAT": "HAT", "CAT": "CAT", "MEZ": "MEZ", "ACWST": "ACWST", "HEPMX": "HEPMX", "MST": "MST", "HADT": "HADT", "∅∅∅": "∅∅∅", "CDT": "CDT", "HNEG": "HNEG", "LHST": "LHST", "ACWDT": "ACWDT", "WARST": "WARST", "COT": "COT", "ACST": "ACST", "HEPM": "HEPM", "AEDT": "AEDT", "OEZ": "OEZ", "BOT": "BOT", "JST": "JST", "GFT": "GFT", "GYT": "GYT", "MESZ": "MESZ", "HENOMX": "HENOMX", "CST": "CST", "ART": "ART", "HNCU": "HNCU", "AKDT": "AKDT", "UYT": "UYT", "PDT": "PDT", "WIB": "WIB", "HNNOMX": "HNNOMX", "UYST": "UYST", "OESZ": "OESZ", "HNT": "HNT", "CLT": "CLT", "NZDT": "NZDT", "CHAST": "CHAST", "WAST": "WAST", "HEOG": "HEOG", "TMT": "TMT", "MDT": "MDT", "ECT": "ECT", "ChST": "ChST", "ARST": "ARST", "ACDT": "ACDT", "AWDT": "AWDT", "WIT": "WIT", "WITA": "WITA", "MYT": "MYT", "VET": "VET", "HNOG": "HNOG", "CHADT": "CHADT", "AWST": "AWST", "AEST": "AEST", "WAT": "WAT", "AKST": "AKST", "WART": "WART", "SAST": "SAST"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_JM) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_JM) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_JM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_JM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_JM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_JM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_JM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_JM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_JM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_JM' and handles both Whole and Real numbers based on 'v' - func (en *en_JM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_JM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_JM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_JM' -@@ -278,56 +195,7 @@ func (en *en_JM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_JM' -@@ -336,68 +204,7 @@ func (en *en_JM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_JM' -@@ -424,10 +231,10 @@ func (en *en_JM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +250,10 @@ func (en *en_JM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +271,10 @@ func (en *en_JM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +290,6 @@ func (en *en_JM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +298,6 @@ func (en *en_JM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +306,6 @@ func (en *en_JM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +314,5 @@ func (en *en_JM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_KE/en_KE.go b/en_KE/en_KE.go -index 527124c..edd721f 100644 ---- a/en_KE/en_KE.go -+++ b/en_KE/en_KE.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_KE' locale - func New() locales.Translator { - return &en_KE{ -- locale: "en_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GYT": "Guyana Time", "MYT": "Malaysia Time", "AKDT": "Alaska Daylight Time", "AST": "Atlantic Standard Time", "WESZ": "Western European Summer Time", "HNT": "Newfoundland Standard Time", "NZST": "New Zealand Standard Time", "HNEG": "East Greenland Standard Time", "HNPMX": "Mexican Pacific Standard Time", "ACST": "Australian Central Standard Time", "EAT": "East Africa Time", "OESZ": "Eastern European Summer Time", "ADT": "Atlantic Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "LHDT": "Lord Howe Daylight Time", "∅∅∅": "Amazon Summer Time", "GFT": "French Guiana Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "CLST": "Chile Summer Time", "TMST": "Turkmenistan Summer Time", "PST": "Pacific Standard Time", "CHADT": "Chatham Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "SRT": "Suriname Time", "TMT": "Turkmenistan Standard Time", "HNCU": "Cuba Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "AKST": "Alaska Standard Time", "CDT": "Central Daylight Time", "JST": "Japan Standard Time", "HEEG": "East Greenland Summer Time", "MEZ": "Central European Standard Time", "ACWST": "Australian Central Western Standard Time", "AEST": "Australian Eastern Standard Time", "HNOG": "West Greenland Standard Time", "AWST": "Australian Western Standard Time", "CST": "Central Standard Time", "ART": "Argentina Standard Time", "EDT": "Eastern Daylight Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time", "UYST": "Uruguay Summer Time", "HAT": "Newfoundland Daylight Time", "IST": "India Standard Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PDT": "Pacific Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZDT": "New Zealand Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "HECU": "Cuba Daylight Time", "OEZ": "Eastern European Standard Time", "WIT": "Eastern Indonesia Time", "UYT": "Uruguay Standard Time", "WEZ": "Western European Standard Time", "ACWDT": "Australian Central Western Daylight Time", "ARST": "Argentina Summer Time", "JDT": "Japan Daylight Time", "COT": "Colombia Standard Time", "CAT": "Central Africa Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "HEOG": "West Greenland Summer Time", "ChST": "Chamorro Standard Time", "ACDT": "Australian Central Daylight Time", "VET": "Venezuela Time", "AEDT": "Australian Eastern Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "GMT": "Greenwich Mean Time", "HKST": "Hong Kong Summer Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "ECT": "Ecuador Time", "HNNOMX": "Northwest Mexico Standard Time"}, -+ locale: "en_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPM": "HEPM", "JDT": "JDT", "WEZ": "WEZ", "HNCU": "HNCU", "HECU": "HECU", "AKDT": "AKDT", "COST": "COST", "CDT": "CDT", "MEZ": "MEZ", "IST": "IST", "NZST": "NZST", "ART": "ART", "ChST": "ChST", "EAT": "EAT", "HADT": "HADT", "MYT": "MYT", "WAT": "WAT", "TMT": "TMT", "TMST": "TMST", "ACWST": "ACWST", "WAST": "WAST", "EDT": "EDT", "SRT": "SRT", "ACST": "ACST", "CHADT": "CHADT", "OEZ": "OEZ", "HNT": "HNT", "CST": "CST", "WIB": "WIB", "MESZ": "MESZ", "HNEG": "HNEG", "LHDT": "LHDT", "CHAST": "CHAST", "WART": "WART", "HEOG": "HEOG", "BOT": "BOT", "CAT": "CAT", "MST": "MST", "NZDT": "NZDT", "UYST": "UYST", "HKT": "HKT", "HKST": "HKST", "ECT": "ECT", "ADT": "ADT", "ARST": "ARST", "LHST": "LHST", "HNPM": "HNPM", "AEST": "AEST", "GYT": "GYT", "HNOG": "HNOG", "WIT": "WIT", "BT": "BT", "GFT": "GFT", "WARST": "WARST", "HNNOMX": "HNNOMX", "UYT": "UYT", "CLT": "CLT", "MDT": "MDT", "HAT": "HAT", "COT": "COT", "AWST": "AWST", "JST": "JST", "PDT": "PDT", "VET": "VET", "AST": "AST", "HAST": "HAST", "ACDT": "ACDT", "HEEG": "HEEG", "PST": "PST", "HNPMX": "HNPMX", "SAST": "SAST", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "WESZ": "WESZ", "OESZ": "OESZ", "CLST": "CLST", "AWDT": "AWDT", "AKST": "AKST", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "GMT": "GMT", "HENOMX": "HENOMX", "SGT": "SGT", "EST": "EST", "WITA": "WITA"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_KE) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_KE) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_KE) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_KE) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_KE) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_KE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_KE' and handles both Whole and Real numbers based on 'v' - func (en *en_KE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_KE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_KE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_KE' -@@ -278,56 +195,7 @@ func (en *en_KE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_KE' -@@ -336,84 +204,33 @@ func (en *en_KE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_KE' -+func (en *en_KE) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_KE' --func (en *en_KE) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_KE) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_KI/en_KI.go b/en_KI/en_KI.go -index 92a724b..8b26337 100644 ---- a/en_KI/en_KI.go -+++ b/en_KI/en_KI.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_KI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_KI' locale - func New() locales.Translator { - return &en_KI{ -- locale: "en_KI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GFT": "French Guiana Time", "CAT": "Central Africa Time", "AWDT": "Australian Western Daylight Time", "EDT": "Eastern Daylight Time", "SGT": "Singapore Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNT": "Newfoundland Standard Time", "WITA": "Central Indonesia Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MEZ": "Central European Standard Time", "WAT": "West Africa Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "VET": "Venezuela Time", "HNOG": "West Greenland Standard Time", "UYT": "Uruguay Standard Time", "CDT": "Central Daylight Time", "SRT": "Suriname Time", "CHADT": "Chatham Daylight Time", "ART": "Argentina Standard Time", "CLST": "Chile Summer Time", "TMST": "Turkmenistan Summer Time", "ACDT": "Australian Central Daylight Time", "WAST": "West Africa Summer Time", "EST": "Eastern Standard Time", "WIB": "Western Indonesia Time", "HEOG": "West Greenland Summer Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "MDT": "Macau Summer Time", "AST": "Atlantic Standard Time", "AEDT": "Australian Eastern Daylight Time", "HKST": "Hong Kong Summer Time", "BT": "Bhutan Time", "CST": "Central Standard Time", "PDT": "Pacific Daylight Time", "HAT": "Newfoundland Daylight Time", "SAST": "South Africa Standard Time", "ACST": "Australian Central Standard Time", "HECU": "Cuba Daylight Time", "MST": "Macau Standard Time", "MYT": "Malaysia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "IST": "India Standard Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "HNCU": "Cuba Standard Time", "OESZ": "Eastern European Summer Time", "ACWST": "Australian Central Western Standard Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PST": "Pacific Standard Time", "∅∅∅": "Amazon Summer Time", "TMT": "Turkmenistan Standard Time", "EAT": "East Africa Time", "WART": "Western Argentina Standard Time", "WESZ": "Western European Summer Time", "ACWDT": "Australian Central Western Daylight Time", "AWST": "Australian Western Standard Time", "LHDT": "Lord Howe Daylight Time", "ChST": "Chamorro Standard Time", "BOT": "Bolivia Time", "AKDT": "Alaska Daylight Time", "UYST": "Uruguay Summer Time", "WIT": "Eastern Indonesia Time", "ARST": "Argentina Summer Time", "JDT": "Japan Daylight Time", "CLT": "Chile Standard Time", "HEEG": "East Greenland Summer Time", "WARST": "Western Argentina Summer Time", "ADT": "Atlantic Daylight Time", "WEZ": "Western European Standard Time", "AEST": "Australian Eastern Standard Time", "COST": "Colombia Summer Time", "HNNOMX": "Northwest Mexico Standard Time"}, -+ locale: "en_KI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JDT": "JDT", "AEST": "AEST", "∅∅∅": "∅∅∅", "HECU": "HECU", "WAST": "WAST", "HNOG": "HNOG", "NZST": "NZST", "ADT": "ADT", "MEZ": "MEZ", "HENOMX": "HENOMX", "AWST": "AWST", "HNPMX": "HNPMX", "OEZ": "OEZ", "LHDT": "LHDT", "HNPM": "HNPM", "PDT": "PDT", "ACWST": "ACWST", "BT": "BT", "WEZ": "WEZ", "AKDT": "AKDT", "WIT": "WIT", "EDT": "EDT", "GMT": "GMT", "ChST": "ChST", "LHST": "LHST", "WESZ": "WESZ", "SGT": "SGT", "EST": "EST", "PST": "PST", "WAT": "WAT", "GFT": "GFT", "WART": "WART", "COST": "COST", "CLT": "CLT", "NZDT": "NZDT", "BOT": "BOT", "MESZ": "MESZ", "CHADT": "CHADT", "GYT": "GYT", "COT": "COT", "CAT": "CAT", "CST": "CST", "ECT": "ECT", "HAST": "HAST", "TMST": "TMST", "HADT": "HADT", "HEPM": "HEPM", "AEDT": "AEDT", "IST": "IST", "HNCU": "HNCU", "AKST": "AKST", "HAT": "HAT", "TMT": "TMT", "ARST": "ARST", "UYT": "UYT", "HNT": "HNT", "SAST": "SAST", "EAT": "EAT", "ACST": "ACST", "ACDT": "ACDT", "VET": "VET", "WARST": "WARST", "CDT": "CDT", "MST": "MST", "MDT": "MDT", "HEEG": "HEEG", "UYST": "UYST", "ACWDT": "ACWDT", "HEOG": "HEOG", "WITA": "WITA", "AST": "AST", "ART": "ART", "MYT": "MYT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HKST": "HKST", "WIB": "WIB", "SRT": "SRT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "JST": "JST", "CHAST": "CHAST", "HKT": "HKT", "AWDT": "AWDT", "CLST": "CLST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_KI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_KI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_KI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_KI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_KI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_KI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_KI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_KI' and handles both Whole and Real numbers based on 'v' - func (en *en_KI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_KI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_KI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_KI' -@@ -278,56 +195,7 @@ func (en *en_KI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_KI' -@@ -336,84 +204,33 @@ func (en *en_KI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_KI' -+func (en *en_KI) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_KI' --func (en *en_KI) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_KI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_KI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_KI) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_KI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_KI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_KI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_KI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_KN/en_KN.go b/en_KN/en_KN.go -index 1c40820..71216d9 100644 ---- a/en_KN/en_KN.go -+++ b/en_KN/en_KN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_KN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_KN' locale - func New() locales.Translator { - return &en_KN{ -- locale: "en_KN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CDT": "Central Daylight Time", "LHDT": "Lord Howe Daylight Time", "TMT": "Turkmenistan Standard Time", "AKST": "Alaska Standard Time", "CST": "Central Standard Time", "AEDT": "Australian Eastern Daylight Time", "CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "SGT": "Singapore Standard Time", "AKDT": "Alaska Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "HAT": "Newfoundland Daylight Time", "HEOG": "West Greenland Summer Time", "GYT": "Guyana Time", "HEEG": "East Greenland Summer Time", "ACDT": "Australian Central Daylight Time", "PDT": "Pacific Daylight Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "BOT": "Bolivia Time", "EST": "Eastern Standard Time", "ADT": "Atlantic Daylight Time", "MST": "Mountain Standard Time", "MDT": "Mountain Daylight Time", "LHST": "Lord Howe Standard Time", "AWDT": "Australian Western Daylight Time", "MEZ": "Central European Standard Time", "ACST": "Australian Central Standard Time", "HKT": "Hong Kong Standard Time", "AWST": "Australian Western Standard Time", "OEZ": "Eastern European Standard Time", "ECT": "Ecuador Time", "GMT": "Greenwich Mean Time", "HAST": "Hawaii-Aleutian Standard Time", "WITA": "Central Indonesia Time", "AEST": "Australian Eastern Standard Time", "EDT": "Eastern Daylight Time", "MYT": "Malaysia Time", "ART": "Argentina Standard Time", "CHADT": "Chatham Daylight Time", "MESZ": "Central European Summer Time", "HNOG": "West Greenland Standard Time", "JST": "Japan Standard Time", "WAST": "West Africa Summer Time", "OESZ": "Eastern European Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "BT": "Bhutan Time", "WESZ": "Western European Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CLT": "Chile Standard Time", "GFT": "French Guiana Time", "ChST": "Chamorro Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "WART": "Western Argentina Standard Time", "WIT": "Eastern Indonesia Time", "HKST": "Hong Kong Summer Time", "CHAST": "Chatham Standard Time", "WARST": "Western Argentina Summer Time", "COT": "Colombia Standard Time", "HNCU": "Cuba Standard Time", "NZST": "New Zealand Standard Time", "SAST": "South Africa Standard Time", "WAT": "West Africa Standard Time", "AST": "Atlantic Standard Time", "UYT": "Uruguay Standard Time", "SRT": "Suriname Time", "HNT": "Newfoundland Standard Time", "WEZ": "Western European Standard Time", "UYST": "Uruguay Summer Time", "∅∅∅": "Amazon Summer Time", "JDT": "Japan Daylight Time", "COST": "Colombia Summer Time", "VET": "Venezuela Time", "ACWST": "Australian Central Western Standard Time", "ARST": "Argentina Summer Time", "HNPMX": "Mexican Pacific Standard Time", "PST": "Pacific Standard Time", "CAT": "Central Africa Time", "HECU": "Cuba Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time"}, -+ locale: "en_KN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "EDT": "EDT", "CST": "CST", "MESZ": "MESZ", "HNEG": "HNEG", "JDT": "JDT", "UYST": "UYST", "HEPMX": "HEPMX", "ChST": "ChST", "ARST": "ARST", "AWDT": "AWDT", "JST": "JST", "ACWST": "ACWST", "OESZ": "OESZ", "HEOG": "HEOG", "ECT": "ECT", "LHST": "LHST", "IST": "IST", "HNCU": "HNCU", "CAT": "CAT", "CDT": "CDT", "AEST": "AEST", "AKST": "AKST", "OEZ": "OEZ", "COST": "COST", "AST": "AST", "GMT": "GMT", "ACDT": "ACDT", "BT": "BT", "COT": "COT", "EST": "EST", "WITA": "WITA", "SAST": "SAST", "HNOG": "HNOG", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "AKDT": "AKDT", "WART": "WART", "EAT": "EAT", "HENOMX": "HENOMX", "MYT": "MYT", "NZDT": "NZDT", "ADT": "ADT", "MDT": "MDT", "HAST": "HAST", "HNPMX": "HNPMX", "WIB": "WIB", "PST": "PST", "TMST": "TMST", "CLT": "CLT", "NZST": "NZST", "ACST": "ACST", "LHDT": "LHDT", "HEPM": "HEPM", "ACWDT": "ACWDT", "SGT": "SGT", "ART": "ART", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "WARST": "WARST", "HKT": "HKT", "HADT": "HADT", "HEEG": "HEEG", "PDT": "PDT", "TMT": "TMT", "CLST": "CLST", "MST": "MST", "AWST": "AWST", "CHADT": "CHADT", "WAST": "WAST", "GYT": "GYT", "HNT": "HNT", "SRT": "SRT", "CHAST": "CHAST", "UYT": "UYT", "HECU": "HECU", "WAT": "WAT", "BOT": "BOT", "WEZ": "WEZ", "HAT": "HAT", "WIT": "WIT", "WESZ": "WESZ", "VET": "VET", "HKST": "HKST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_KN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_KN) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_KN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_KN) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_KN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_KN) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_KN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_KN' and handles both Whole and Real numbers based on 'v' - func (en *en_KN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_KN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_KN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_KN' -@@ -278,56 +195,7 @@ func (en *en_KN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_KN' -@@ -336,84 +204,33 @@ func (en *en_KN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_KN' -+func (en *en_KN) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_KN' --func (en *en_KN) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_KN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_KN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_KN) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_KN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_KN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_KN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_KN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_KY/en_KY.go b/en_KY/en_KY.go -index 929a7a1..df712ad 100644 ---- a/en_KY/en_KY.go -+++ b/en_KY/en_KY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_KY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_KY' locale - func New() locales.Translator { - return &en_KY{ -- locale: "en_KY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "$", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WESZ": "Western European Summer Time", "GFT": "French Guiana Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "PDT": "Pacific Daylight Time", "AEST": "Australian Eastern Standard Time", "CLST": "Chile Summer Time", "HKST": "Hong Kong Summer Time", "∅∅∅": "Amazon Summer Time", "EDT": "Eastern Daylight Time", "AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "JDT": "Japan Daylight Time", "WAT": "West Africa Standard Time", "ACWDT": "Australian Central Western Daylight Time", "MESZ": "Central European Summer Time", "NZDT": "New Zealand Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "IST": "India Standard Time", "JST": "Japan Standard Time", "WAST": "West Africa Summer Time", "GMT": "Greenwich Mean Time", "MST": "Mountain Standard Time", "VET": "Venezuela Time", "HNPM": "St. Pierre & Miquelon Standard Time", "ADT": "Atlantic Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "AWDT": "Australian Western Daylight Time", "HKT": "Hong Kong Standard Time", "HNEG": "East Greenland Standard Time", "OESZ": "Eastern European Summer Time", "MYT": "Malaysia Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "AST": "Atlantic Standard Time", "PST": "Pacific Standard Time", "ARST": "Argentina Summer Time", "EAT": "East Africa Time", "CHAST": "Chatham Standard Time", "ChST": "Chamorro Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "UYT": "Uruguay Standard Time", "SRT": "Suriname Time", "WITA": "Central Indonesia Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "UYST": "Uruguay Summer Time", "GYT": "Guyana Time", "MDT": "Mountain Daylight Time", "WIT": "Eastern Indonesia Time", "HEEG": "East Greenland Summer Time", "TMST": "Turkmenistan Summer Time", "HNCU": "Cuba Standard Time", "WEZ": "Western European Standard Time", "NZST": "New Zealand Standard Time", "CLT": "Chile Standard Time", "MEZ": "Central European Standard Time", "OEZ": "Eastern European Standard Time", "SAST": "South Africa Standard Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "CAT": "Central Africa Time", "HEOG": "West Greenland Summer Time", "AEDT": "Australian Eastern Daylight Time", "CHADT": "Chatham Daylight Time", "AKST": "Alaska Standard Time", "AWST": "Australian Western Standard Time", "WARST": "Western Argentina Summer Time", "HECU": "Cuba Daylight Time", "ACST": "Australian Central Standard Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "ART": "Argentina Standard Time", "HNOG": "West Greenland Standard Time", "TMT": "Turkmenistan Standard Time"}, -+ locale: "en_KY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "$", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MYT": "MYT", "IST": "IST", "HEOG": "HEOG", "TMT": "TMT", "ADT": "ADT", "HENOMX": "HENOMX", "HAT": "HAT", "WARST": "WARST", "SAST": "SAST", "ART": "ART", "BT": "BT", "AST": "AST", "HADT": "HADT", "CHADT": "CHADT", "ACWST": "ACWST", "AKDT": "AKDT", "COT": "COT", "HEEG": "HEEG", "MESZ": "MESZ", "PDT": "PDT", "ECT": "ECT", "WIB": "WIB", "WIT": "WIT", "HNT": "HNT", "COST": "COST", "HNPM": "HNPM", "JST": "JST", "LHST": "LHST", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "EST": "EST", "GMT": "GMT", "SRT": "SRT", "ACWDT": "ACWDT", "WEZ": "WEZ", "WAST": "WAST", "OEZ": "OEZ", "HNPMX": "HNPMX", "WAT": "WAT", "TMST": "TMST", "CLST": "CLST", "AKST": "AKST", "GFT": "GFT", "EDT": "EDT", "HAST": "HAST", "MEZ": "MEZ", "CHAST": "CHAST", "UYT": "UYT", "VET": "VET", "ChST": "ChST", "AWDT": "AWDT", "LHDT": "LHDT", "HNOG": "HNOG", "CLT": "CLT", "WITA": "WITA", "ACST": "ACST", "WESZ": "WESZ", "SGT": "SGT", "OESZ": "OESZ", "MDT": "MDT", "ACDT": "ACDT", "JDT": "JDT", "AWST": "AWST", "PST": "PST", "WART": "WART", "GYT": "GYT", "NZDT": "NZDT", "CST": "CST", "AEST": "AEST", "HKT": "HKT", "HKST": "HKST", "CAT": "CAT", "ARST": "ARST", "HNEG": "HNEG", "HEPM": "HEPM", "UYST": "UYST", "HNCU": "HNCU", "NZST": "NZST", "HEPMX": "HEPMX", "CDT": "CDT", "MST": "MST", "BOT": "BOT", "EAT": "EAT", "HNNOMX": "HNNOMX", "HECU": "HECU"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_KY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_KY) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_KY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_KY) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_KY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_KY) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_KY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_KY' and handles both Whole and Real numbers based on 'v' - func (en *en_KY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_KY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_KY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_KY' -@@ -278,56 +195,7 @@ func (en *en_KY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_KY' -@@ -336,84 +204,33 @@ func (en *en_KY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_KY' -+func (en *en_KY) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_KY' --func (en *en_KY) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_KY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_KY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_KY) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_KY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_KY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_KY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_KY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_LC/en_LC.go b/en_LC/en_LC.go -index 7c5a14c..572fcb4 100644 ---- a/en_LC/en_LC.go -+++ b/en_LC/en_LC.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_LC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_LC' locale - func New() locales.Translator { - return &en_LC{ -- locale: "en_LC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GFT": "French Guiana Time", "EAT": "East Africa Time", "HECU": "Cuba Daylight Time", "EST": "Eastern Standard Time", "ADT": "Atlantic Daylight Time", "HKT": "Hong Kong Standard Time", "HKST": "Hong Kong Summer Time", "HNCU": "Cuba Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "ACWST": "Australian Central Western Standard Time", "HAT": "Newfoundland Daylight Time", "AEST": "Australian Eastern Standard Time", "PST": "Pacific Standard Time", "ARST": "Argentina Summer Time", "CLT": "Chile Standard Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "WAT": "West Africa Standard Time", "AKST": "Alaska Standard Time", "SRT": "Suriname Time", "CHADT": "Chatham Daylight Time", "ACST": "Australian Central Standard Time", "EDT": "Eastern Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WITA": "Central Indonesia Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "COT": "Colombia Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AEDT": "Australian Eastern Daylight Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "TMST": "Turkmenistan Summer Time", "MDT": "Macau Summer Time", "WEZ": "Western European Standard Time", "HEOG": "West Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "AKDT": "Alaska Daylight Time", "VET": "Venezuela Time", "ART": "Argentina Standard Time", "AWST": "Australian Western Standard Time", "OEZ": "Eastern European Standard Time", "UYT": "Uruguay Standard Time", "UYST": "Uruguay Summer Time", "CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "CST": "Central Standard Time", "PDT": "Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "HNOG": "West Greenland Standard Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "MST": "Macau Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "MEZ": "Central European Standard Time", "AWDT": "Australian Western Daylight Time", "BOT": "Bolivia Time", "CAT": "Central Africa Time", "ECT": "Ecuador Time", "WART": "Western Argentina Standard Time", "WIB": "Western Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "OESZ": "Eastern European Summer Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "∅∅∅": "Amazon Summer Time", "WAST": "West Africa Summer Time", "GMT": "Greenwich Mean Time", "AST": "Atlantic Standard Time", "MESZ": "Central European Summer Time", "WESZ": "Western European Summer Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "COST": "Colombia Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "GYT": "Guyana Time", "WIT": "Eastern Indonesia Time", "CDT": "Central Daylight Time", "MYT": "Malaysia Time", "HEPM": "St. Pierre & Miquelon Daylight Time"}, -+ locale: "en_LC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "COST": "COST", "CST": "CST", "AST": "AST", "LHST": "LHST", "ChST": "ChST", "HADT": "HADT", "OEZ": "OEZ", "EAT": "EAT", "ACDT": "ACDT", "ACWST": "ACWST", "AKDT": "AKDT", "TMST": "TMST", "LHDT": "LHDT", "BT": "BT", "HNCU": "HNCU", "WAT": "WAT", "HEOG": "HEOG", "TMT": "TMT", "MST": "MST", "HNEG": "HNEG", "HEEG": "HEEG", "HEPM": "HEPM", "UYST": "UYST", "HNPMX": "HNPMX", "SGT": "SGT", "VET": "VET", "NZST": "NZST", "SRT": "SRT", "MEZ": "MEZ", "ACST": "ACST", "JDT": "JDT", "MYT": "MYT", "ECT": "ECT", "BOT": "BOT", "CHADT": "CHADT", "PST": "PST", "GFT": "GFT", "∅∅∅": "∅∅∅", "AWST": "AWST", "WESZ": "WESZ", "WART": "WART", "EST": "EST", "CAT": "CAT", "ART": "ART", "AEST": "AEST", "HAT": "HAT", "HNOG": "HNOG", "WITA": "WITA", "ADT": "ADT", "MESZ": "MESZ", "JST": "JST", "ACWDT": "ACWDT", "WARST": "WARST", "SAST": "SAST", "WIB": "WIB", "MDT": "MDT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "CHAST": "CHAST", "PDT": "PDT", "AKST": "AKST", "GMT": "GMT", "HAST": "HAST", "AWDT": "AWDT", "COT": "COT", "CLT": "CLT", "CDT": "CDT", "HNPM": "HNPM", "IST": "IST", "HECU": "HECU", "OESZ": "OESZ", "GYT": "GYT", "HKT": "HKT", "HKST": "HKST", "CLST": "CLST", "HENOMX": "HENOMX", "WAST": "WAST", "EDT": "EDT", "ARST": "ARST", "UYT": "UYT", "HEPMX": "HEPMX", "WEZ": "WEZ", "WIT": "WIT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_LC) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_LC) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_LC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_LC) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_LC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_LC) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_LC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_LC) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_LC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_LC' and handles both Whole and Real numbers based on 'v' - func (en *en_LC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_LC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_LC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_LC' -@@ -278,56 +195,7 @@ func (en *en_LC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_LC' -@@ -336,84 +204,33 @@ func (en *en_LC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_LC' -+func (en *en_LC) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_LC' --func (en *en_LC) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_LC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_LC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_LC) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_LC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_LC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_LC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_LC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_LR/en_LR.go b/en_LR/en_LR.go -index b8a9e6e..15b235d 100644 ---- a/en_LR/en_LR.go -+++ b/en_LR/en_LR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_LR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_LR' locale - func New() locales.Translator { - return &en_LR{ -- locale: "en_LR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "$", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"IST": "India Standard Time", "JDT": "Japan Daylight Time", "SAST": "South Africa Standard Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "WITA": "Central Indonesia Time", "ChST": "Chamorro Standard Time", "GYT": "Guyana Time", "HENOMX": "Northwest Mexico Daylight Time", "SGT": "Singapore Standard Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "BT": "Bhutan Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "HKT": "Hong Kong Standard Time", "LHST": "Lord Howe Standard Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "GMT": "Greenwich Mean Time", "UYST": "Uruguay Summer Time", "SRT": "Suriname Time", "CLT": "Chile Standard Time", "MYT": "Malaysia Time", "CST": "Central Standard Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "MST": "Macau Standard Time", "PDT": "Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "HECU": "Cuba Daylight Time", "AST": "Atlantic Standard Time", "AKDT": "Alaska Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZDT": "New Zealand Daylight Time", "ACST": "Australian Central Standard Time", "WARST": "Western Argentina Summer Time", "UYT": "Uruguay Standard Time", "WIT": "Eastern Indonesia Time", "HEOG": "West Greenland Summer Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "ECT": "Ecuador Time", "∅∅∅": "Azores Summer Time", "ADT": "Atlantic Daylight Time", "ACWST": "Australian Central Western Standard Time", "CHAST": "Chatham Standard Time", "HEEG": "East Greenland Summer Time", "COT": "Colombia Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "JST": "Japan Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "WEZ": "Western European Standard Time", "MEZ": "Central European Standard Time", "NZST": "New Zealand Standard Time", "CLST": "Chile Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HNCU": "Cuba Standard Time", "AKST": "Alaska Standard Time", "HNOG": "West Greenland Standard Time", "AEST": "Australian Eastern Standard Time", "MESZ": "Central European Summer Time", "WART": "Western Argentina Standard Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "PST": "Pacific Standard Time", "AEDT": "Australian Eastern Daylight Time", "GFT": "French Guiana Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AWST": "Australian Western Standard Time", "HKST": "Hong Kong Summer Time", "LHDT": "Lord Howe Daylight Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "HADT": "Hawaii-Aleutian Daylight Time"}, -+ locale: "en_LR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "$", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"IST": "IST", "SGT": "SGT", "HADT": "HADT", "HENOMX": "HENOMX", "MYT": "MYT", "HNPM": "HNPM", "AEDT": "AEDT", "VET": "VET", "WITA": "WITA", "ACDT": "ACDT", "COST": "COST", "CDT": "CDT", "NZDT": "NZDT", "ChST": "ChST", "UYT": "UYT", "WESZ": "WESZ", "HNT": "HNT", "WART": "WART", "JST": "JST", "CAT": "CAT", "HAST": "HAST", "MESZ": "MESZ", "WAST": "WAST", "HAT": "HAT", "SAST": "SAST", "TMST": "TMST", "ART": "ART", "WIT": "WIT", "COT": "COT", "HEOG": "HEOG", "CLST": "CLST", "GMT": "GMT", "HNEG": "HNEG", "AWST": "AWST", "CHADT": "CHADT", "OESZ": "OESZ", "WARST": "WARST", "CST": "CST", "HEPM": "HEPM", "GYT": "GYT", "CLT": "CLT", "ACST": "ACST", "HNNOMX": "HNNOMX", "LHST": "LHST", "∅∅∅": "∅∅∅", "HECU": "HECU", "HEPMX": "HEPMX", "AST": "AST", "HKST": "HKST", "HEEG": "HEEG", "JDT": "JDT", "UYST": "UYST", "AEST": "AEST", "AKST": "AKST", "HKT": "HKT", "ARST": "ARST", "MEZ": "MEZ", "OEZ": "OEZ", "HNOG": "HNOG", "EST": "EST", "MST": "MST", "BT": "BT", "NZST": "NZST", "LHDT": "LHDT", "WAT": "WAT", "TMT": "TMT", "EAT": "EAT", "HNCU": "HNCU", "AKDT": "AKDT", "WIB": "WIB", "BOT": "BOT", "MDT": "MDT", "ECT": "ECT", "EDT": "EDT", "SRT": "SRT", "AWDT": "AWDT", "PST": "PST", "ACWST": "ACWST", "HNPMX": "HNPMX", "GFT": "GFT", "ADT": "ADT", "CHAST": "CHAST", "PDT": "PDT", "ACWDT": "ACWDT", "WEZ": "WEZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_LR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_LR) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_LR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_LR) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_LR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_LR) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_LR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_LR' and handles both Whole and Real numbers based on 'v' - func (en *en_LR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_LR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_LR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_LR' -@@ -278,56 +195,7 @@ func (en *en_LR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_LR' -@@ -336,84 +204,33 @@ func (en *en_LR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_LR' -+func (en *en_LR) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_LR' --func (en *en_LR) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_LR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_LR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_LR) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_LR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_LR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_LR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_LR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_LS/en_LS.go b/en_LS/en_LS.go -index 946e2d9..72d8e6f 100644 ---- a/en_LS/en_LS.go -+++ b/en_LS/en_LS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_LS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_LS' locale - func New() locales.Translator { - return &en_LS{ -- locale: "en_LS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "R", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HENOMX": "Northwest Mexico Daylight Time", "JST": "Japan Standard Time", "HNPMX": "Mexican Pacific Standard Time", "UYT": "Uruguay Standard Time", "TMST": "Turkmenistan Summer Time", "HEEG": "East Greenland Summer Time", "∅∅∅": "Peru Summer Time", "PST": "Pacific Standard Time", "WEZ": "Western European Standard Time", "COST": "Colombia Summer Time", "VET": "Venezuela Time", "MESZ": "Central European Summer Time", "UYST": "Uruguay Summer Time", "JDT": "Japan Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "PDT": "Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "EAT": "East Africa Time", "WARST": "Western Argentina Summer Time", "AKST": "Alaska Standard Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WITA": "Central Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "CAT": "Central Africa Time", "HEPMX": "Mexican Pacific Daylight Time", "ARST": "Argentina Summer Time", "HKT": "Hong Kong Standard Time", "CHADT": "Chatham Daylight Time", "NZDT": "New Zealand Daylight Time", "SAST": "South Africa Standard Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "HEOG": "West Greenland Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HNEG": "East Greenland Standard Time", "TMT": "Turkmenistan Standard Time", "CDT": "Central Daylight Time", "GYT": "Guyana Time", "WIB": "Western Indonesia Time", "HNT": "Newfoundland Standard Time", "ART": "Argentina Standard Time", "WESZ": "Western European Summer Time", "AEST": "Australian Eastern Standard Time", "ChST": "Chamorro Standard Time", "ACST": "Australian Central Standard Time", "WAST": "West Africa Summer Time", "EDT": "Eastern Daylight Time", "MST": "Macau Standard Time", "HAT": "Newfoundland Daylight Time", "AWST": "Australian Western Standard Time", "CHAST": "Chatham Standard Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "ACWST": "Australian Central Western Standard Time", "AEDT": "Australian Eastern Daylight Time", "LHDT": "Lord Howe Daylight Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "WAT": "West Africa Standard Time", "WART": "Western Argentina Standard Time", "ADT": "Atlantic Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "SGT": "Singapore Standard Time", "EST": "Eastern Standard Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "SRT": "Suriname Time", "MEZ": "Central European Standard Time", "IST": "India Standard Time", "GFT": "French Guiana Time", "MDT": "Macau Summer Time", "CST": "Central Standard Time", "WIT": "Eastern Indonesia Time", "HNOG": "West Greenland Standard Time", "AWDT": "Australian Western Daylight Time", "HKST": "Hong Kong Summer Time", "BOT": "Bolivia Time"}, -+ locale: "en_LS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "R", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ChST": "ChST", "HAST": "HAST", "LHST": "LHST", "AEST": "AEST", "HNOG": "HNOG", "WITA": "WITA", "ARST": "ARST", "GMT": "GMT", "WIB": "WIB", "ACDT": "ACDT", "HEPM": "HEPM", "AWDT": "AWDT", "CHADT": "CHADT", "SGT": "SGT", "SAST": "SAST", "HKT": "HKT", "HENOMX": "HENOMX", "AKST": "AKST", "WARST": "WARST", "ADT": "ADT", "MESZ": "MESZ", "HNPM": "HNPM", "CHAST": "CHAST", "HECU": "HECU", "SRT": "SRT", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "GYT": "GYT", "ECT": "ECT", "BOT": "BOT", "AWST": "AWST", "TMST": "TMST", "CDT": "CDT", "HADT": "HADT", "IST": "IST", "PST": "PST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WESZ": "WESZ", "COST": "COST", "AST": "AST", "MDT": "MDT", "JDT": "JDT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "AKDT": "AKDT", "HNT": "HNT", "UYT": "UYT", "OEZ": "OEZ", "WART": "WART", "CST": "CST", "NZST": "NZST", "HNEG": "HNEG", "LHDT": "LHDT", "ACWDT": "ACWDT", "BT": "BT", "WIT": "WIT", "COT": "COT", "CLT": "CLT", "OESZ": "OESZ", "ART": "ART", "PDT": "PDT", "HNCU": "HNCU", "GFT": "GFT", "CAT": "CAT", "CLST": "CLST", "MST": "MST", "EAT": "EAT", "WAST": "WAST", "HKST": "HKST", "TMT": "TMT", "NZDT": "NZDT", "ACST": "ACST", "HEEG": "HEEG", "EST": "EST", "EDT": "EDT", "HEOG": "HEOG", "MEZ": "MEZ", "JST": "JST", "MYT": "MYT", "UYST": "UYST", "VET": "VET", "WAT": "WAT", "HAT": "HAT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_LS) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_LS) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_LS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_LS) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_LS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_LS) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_LS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_LS) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_LS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_LS' and handles both Whole and Real numbers based on 'v' - func (en *en_LS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_LS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_LS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_LS' -@@ -278,56 +195,7 @@ func (en *en_LS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_LS' -@@ -336,84 +204,33 @@ func (en *en_LS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_LS' -+func (en *en_LS) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_LS' --func (en *en_LS) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_LS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_LS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_LS) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_LS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_LS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_LS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_LS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_MG/en_MG.go b/en_MG/en_MG.go -index 3043095..b74f894 100644 ---- a/en_MG/en_MG.go -+++ b/en_MG/en_MG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MG' locale - func New() locales.Translator { - return &en_MG{ -- locale: "en_MG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "Ar", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"SGT": "Singapore Standard Time", "UYT": "Uruguay Standard Time", "BT": "Bhutan Time", "HEEG": "East Greenland Summer Time", "OESZ": "Eastern European Summer Time", "ADT": "Atlantic Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "EST": "Eastern Standard Time", "ART": "Argentina Standard Time", "HEOG": "West Greenland Summer Time", "HKT": "Hong Kong Standard Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "HECU": "Cuba Daylight Time", "MDT": "Macau Summer Time", "AWDT": "Australian Western Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "ACWST": "Australian Central Western Standard Time", "ACWDT": "Australian Central Western Daylight Time", "∅∅∅": "Peru Summer Time", "HNCU": "Cuba Standard Time", "HNPMX": "Mexican Pacific Standard Time", "LHST": "Lord Howe Standard Time", "CHAST": "Chatham Standard Time", "GFT": "French Guiana Time", "NZDT": "New Zealand Daylight Time", "AST": "Atlantic Standard Time", "UYST": "Uruguay Summer Time", "WIB": "Western Indonesia Time", "SRT": "Suriname Time", "HKST": "Hong Kong Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MEZ": "Central European Standard Time", "ACST": "Australian Central Standard Time", "GMT": "Greenwich Mean Time", "PDT": "Pacific Daylight Time", "CHADT": "Chatham Daylight Time", "IST": "India Standard Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "CAT": "Central Africa Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time", "MYT": "Malaysia Time", "HADT": "Hawaii-Aleutian Daylight Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "CDT": "Central Daylight Time", "PST": "Pacific Standard Time", "WEZ": "Western European Standard Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "OEZ": "Eastern European Standard Time", "EDT": "Eastern Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "AKST": "Alaska Standard Time", "BOT": "Bolivia Time", "WITA": "Central Indonesia Time", "WARST": "Western Argentina Summer Time", "GYT": "Guyana Time", "VET": "Venezuela Time", "ARST": "Argentina Summer Time", "HNOG": "West Greenland Standard Time", "HNT": "Newfoundland Standard Time", "AEST": "Australian Eastern Standard Time", "LHDT": "Lord Howe Daylight Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "MST": "Macau Standard Time", "AKDT": "Alaska Daylight Time", "AEDT": "Australian Eastern Daylight Time", "ChST": "Chamorro Standard Time", "ACDT": "Australian Central Daylight Time", "AWST": "Australian Western Standard Time", "NZST": "New Zealand Standard Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HAT": "Newfoundland Daylight Time", "MESZ": "Central European Summer Time"}, -+ locale: "en_MG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "Ar", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SRT": "SRT", "HAST": "HAST", "MEZ": "MEZ", "MESZ": "MESZ", "HEEG": "HEEG", "JDT": "JDT", "OEZ": "OEZ", "SAST": "SAST", "ARST": "ARST", "EAT": "EAT", "HNEG": "HNEG", "CHAST": "CHAST", "WAT": "WAT", "ACDT": "ACDT", "LHST": "LHST", "MYT": "MYT", "ACWST": "ACWST", "WESZ": "WESZ", "VET": "VET", "TMT": "TMT", "MDT": "MDT", "WIB": "WIB", "GMT": "GMT", "IST": "IST", "UYST": "UYST", "HKST": "HKST", "ART": "ART", "PDT": "PDT", "WEZ": "WEZ", "HNCU": "HNCU", "CLT": "CLT", "BOT": "BOT", "HADT": "HADT", "HEPM": "HEPM", "HECU": "HECU", "HEPMX": "HEPMX", "TMST": "TMST", "MST": "MST", "ACWDT": "ACWDT", "SGT": "SGT", "AKST": "AKST", "HAT": "HAT", "EDT": "EDT", "AWDT": "AWDT", "CAT": "CAT", "ChST": "ChST", "ACST": "ACST", "HNT": "HNT", "HEOG": "HEOG", "HKT": "HKT", "HENOMX": "HENOMX", "LHDT": "LHDT", "BT": "BT", "WIT": "WIT", "∅∅∅": "∅∅∅", "NZDT": "NZDT", "AWST": "AWST", "AEDT": "AEDT", "UYT": "UYT", "HNPMX": "HNPMX", "WART": "WART", "HNOG": "HNOG", "AKDT": "AKDT", "GYT": "GYT", "COT": "COT", "EST": "EST", "CLST": "CLST", "WITA": "WITA", "AST": "AST", "PST": "PST", "GFT": "GFT", "COST": "COST", "NZST": "NZST", "ADT": "ADT", "HNNOMX": "HNNOMX", "JST": "JST", "AEST": "AEST", "CHADT": "CHADT", "WAST": "WAST", "OESZ": "OESZ", "CST": "CST", "CDT": "CDT", "ECT": "ECT", "HNPM": "HNPM", "WARST": "WARST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_MG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MG' and handles both Whole and Real numbers based on 'v' - func (en *en_MG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MG' -@@ -278,56 +195,7 @@ func (en *en_MG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MG' -@@ -336,84 +204,33 @@ func (en *en_MG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_MG' -+func (en *en_MG) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_MG' --func (en *en_MG) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_MG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_MG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_MG) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_MH/en_MH.go b/en_MH/en_MH.go -index 060969d..1c0015a 100644 ---- a/en_MH/en_MH.go -+++ b/en_MH/en_MH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MH' locale - func New() locales.Translator { - return &en_MH{ -- locale: "en_MH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "WAT": "West Africa Standard Time", "OEZ": "Eastern European Standard Time", "COST": "Colombia Summer Time", "BOT": "Bolivia Time", "HENOMX": "Northwest Mexico Daylight Time", "CHADT": "Chatham Daylight Time", "ECT": "Ecuador Time", "WART": "Western Argentina Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "BT": "Bhutan Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "MEZ": "Central European Standard Time", "CLST": "Chile Summer Time", "NZDT": "New Zealand Daylight Time", "HNCU": "Cuba Standard Time", "UYST": "Uruguay Summer Time", "AWDT": "Australian Western Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "ACDT": "Australian Central Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "ART": "Argentina Standard Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "JDT": "Japan Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "COT": "Colombia Standard Time", "GMT": "Greenwich Mean Time", "GYT": "Guyana Time", "VET": "Venezuela Time", "WIT": "Eastern Indonesia Time", "HAT": "Newfoundland Daylight Time", "TMST": "Turkmenistan Summer Time", "OESZ": "Eastern European Summer Time", "EDT": "Eastern Daylight Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "HNT": "Newfoundland Standard Time", "ARST": "Argentina Summer Time", "HKT": "Hong Kong Standard Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "WAST": "West Africa Summer Time", "UYT": "Uruguay Standard Time", "AKST": "Alaska Standard Time", "WESZ": "Western European Summer Time", "NZST": "New Zealand Standard Time", "CHAST": "Chatham Standard Time", "AEDT": "Australian Eastern Daylight Time", "∅∅∅": "Amazon Summer Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "WARST": "Western Argentina Summer Time", "ADT": "Atlantic Daylight Time", "WITA": "Central Indonesia Time", "HEEG": "East Greenland Summer Time", "HECU": "Cuba Daylight Time", "AWST": "Australian Western Standard Time", "CLT": "Chile Standard Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "ACST": "Australian Central Standard Time", "MDT": "Mountain Daylight Time", "SRT": "Suriname Time", "PST": "Pacific Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AEST": "Australian Eastern Standard Time", "MESZ": "Central European Summer Time", "IST": "India Standard Time", "GFT": "French Guiana Time", "AKDT": "Alaska Daylight Time", "MST": "Mountain Standard Time", "WIB": "Western Indonesia Time", "ACWST": "Australian Central Western Standard Time", "HKST": "Hong Kong Summer Time", "SGT": "Singapore Standard Time"}, -+ locale: "en_MH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "WIT": "WIT", "SAST": "SAST", "BOT": "BOT", "HENOMX": "HENOMX", "WAST": "WAST", "MESZ": "MESZ", "ACWST": "ACWST", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "GMT": "GMT", "ChST": "ChST", "JST": "JST", "GYT": "GYT", "COT": "COT", "TMT": "TMT", "ARST": "ARST", "PST": "PST", "SGT": "SGT", "WAT": "WAT", "HAT": "HAT", "CLT": "CLT", "HAST": "HAST", "HEEG": "HEEG", "HEPMX": "HEPMX", "OESZ": "OESZ", "COST": "COST", "HNEG": "HNEG", "CHAST": "CHAST", "CAT": "CAT", "CDT": "CDT", "MST": "MST", "ACST": "ACST", "AEDT": "AEDT", "HNPMX": "HNPMX", "UYST": "UYST", "PDT": "PDT", "CLST": "CLST", "WIB": "WIB", "NZST": "NZST", "ECT": "ECT", "HNNOMX": "HNNOMX", "UYT": "UYT", "WESZ": "WESZ", "VET": "VET", "WEZ": "WEZ", "WART": "WART", "AST": "AST", "LHST": "LHST", "AEST": "AEST", "CHADT": "CHADT", "IST": "IST", "HNPM": "HNPM", "AKDT": "AKDT", "EST": "EST", "HKT": "HKT", "TMST": "TMST", "MDT": "MDT", "LHDT": "LHDT", "AWST": "AWST", "BT": "BT", "AKST": "AKST", "HNOG": "HNOG", "HEOG": "HEOG", "NZDT": "NZDT", "ART": "ART", "ACDT": "ACDT", "EDT": "EDT", "MEZ": "MEZ", "JDT": "JDT", "HEPM": "HEPM", "OEZ": "OEZ", "WARST": "WARST", "ADT": "ADT", "HADT": "HADT", "HKST": "HKST", "WITA": "WITA", "CST": "CST", "EAT": "EAT", "AWDT": "AWDT", "MYT": "MYT", "SRT": "SRT", "ACWDT": "ACWDT", "HNT": "HNT", "HECU": "HECU"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_MH) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_MH) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_MH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MH) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MH) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MH) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MH' and handles both Whole and Real numbers based on 'v' - func (en *en_MH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MH' -@@ -278,56 +195,7 @@ func (en *en_MH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MH' -@@ -336,68 +204,7 @@ func (en *en_MH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_MH' -@@ -405,15 +212,15 @@ func (en *en_MH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_MH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_MH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_MH) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_MH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_MH) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_MH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_MH) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_MH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_MH) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_MH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_MH) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_MO/en_MO.go b/en_MO/en_MO.go -index a17dfb9..1ae097e 100644 ---- a/en_MO/en_MO.go -+++ b/en_MO/en_MO.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_MO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MO' locale - func New() locales.Translator { - return &en_MO{ -- locale: "en_MO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WITA": "Central Indonesia Time", "HNEG": "East Greenland Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CLST": "Chile Summer Time", "ACDT": "Australian Central Daylight Time", "CHAST": "Chatham Standard Time", "JDT": "Japan Daylight Time", "MDT": "Macau Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "GFT": "French Guiana Time", "OESZ": "Eastern European Summer Time", "COT": "Colombia Standard Time", "HNCU": "Cuba Standard Time", "UYT": "Uruguay Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "ChST": "Chamorro Standard Time", "EDT": "Eastern Daylight Time", "ACST": "Australian Central Standard Time", "WART": "Western Argentina Standard Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "HNT": "Newfoundland Standard Time", "JST": "Japan Standard Time", "OEZ": "Eastern European Standard Time", "MST": "Macau Standard Time", "UYST": "Uruguay Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "SRT": "Suriname Time", "HEOG": "West Greenland Summer Time", "CDT": "Central Daylight Time", "WESZ": "Western European Summer Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "MESZ": "Central European Summer Time", "IST": "India Standard Time", "WAST": "West Africa Summer Time", "SGT": "Singapore Standard Time", "HNOG": "West Greenland Standard Time", "AKST": "Alaska Standard Time", "PST": "Pacific Standard Time", "MEZ": "Central European Standard Time", "TMST": "Turkmenistan Summer Time", "CST": "Central Standard Time", "NZDT": "New Zealand Daylight Time", "TMT": "Turkmenistan Standard Time", "COST": "Colombia Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "MYT": "Malaysia Time", "HAST": "Hawaii-Aleutian Standard Time", "AWDT": "Australian Western Daylight Time", "∅∅∅": "Amazon Summer Time", "HEEG": "East Greenland Summer Time", "HECU": "Cuba Daylight Time", "ADT": "Atlantic Daylight Time", "HAT": "Newfoundland Daylight Time", "ARST": "Argentina Summer Time", "AEST": "Australian Eastern Standard Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SAST": "South Africa Standard Time", "BOT": "Bolivia Time", "WIB": "Western Indonesia Time", "WARST": "Western Argentina Summer Time", "WAT": "West Africa Standard Time", "VET": "Venezuela Time", "BT": "Bhutan Time", "ACWST": "Australian Central Western Standard Time", "GMT": "Greenwich Mean Time", "GYT": "Guyana Time", "WEZ": "Western European Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CHADT": "Chatham Daylight Time", "WIT": "Eastern Indonesia Time", "ART": "Argentina Standard Time", "PDT": "Pacific Daylight Time", "HKT": "Hong Kong Standard Time", "CLT": "Chile Standard Time", "ECT": "Ecuador Time", "CAT": "Central Africa Time", "EAT": "East Africa Time", "AST": "Atlantic Standard Time"}, -+ locale: "en_MO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"CDT": "CDT", "ECT": "ECT", "ADT": "ADT", "AWST": "AWST", "VET": "VET", "WAST": "WAST", "EDT": "EDT", "TMST": "TMST", "AKDT": "AKDT", "BOT": "BOT", "ACST": "ACST", "JDT": "JDT", "CHADT": "CHADT", "PST": "PST", "WAT": "WAT", "HEOG": "HEOG", "WIB": "WIB", "NZDT": "NZDT", "HEEG": "HEEG", "ACWDT": "ACWDT", "WESZ": "WESZ", "AKST": "AKST", "WARST": "WARST", "CST": "CST", "GMT": "GMT", "MEZ": "MEZ", "AWDT": "AWDT", "UYT": "UYT", "SAST": "SAST", "COST": "COST", "EAT": "EAT", "HNEG": "HNEG", "AEDT": "AEDT", "WIT": "WIT", "CLT": "CLT", "CAT": "CAT", "SGT": "SGT", "COT": "COT", "HKT": "HKT", "NZST": "NZST", "ARST": "ARST", "SRT": "SRT", "MESZ": "MESZ", "ACDT": "ACDT", "MST": "MST", "MDT": "MDT", "AST": "AST", "ChST": "ChST", "JST": "JST", "WART": "WART", "CLST": "CLST", "TMT": "TMT", "WITA": "WITA", "HADT": "HADT", "LHST": "LHST", "LHDT": "LHDT", "UYST": "UYST", "GFT": "GFT", "HAT": "HAT", "MYT": "MYT", "CHAST": "CHAST", "HAST": "HAST", "HENOMX": "HENOMX", "ACWST": "ACWST", "HNPMX": "HNPMX", "HNPM": "HNPM", "IST": "IST", "PDT": "PDT", "BT": "BT", "AEST": "AEST", "HECU": "HECU", "OEZ": "OEZ", "HKST": "HKST", "HNT": "HNT", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "ART": "ART", "HEPM": "HEPM", "HNOG": "HNOG", "EST": "EST", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "HEPMX": "HEPMX", "OESZ": "OESZ", "GYT": "GYT"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_MO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MO) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_MO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MO) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_MO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MO) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_MO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MO' and handles both Whole and Real numbers based on 'v' - func (en *en_MO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MO' -@@ -278,56 +197,7 @@ func (en *en_MO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MO' -@@ -336,68 +206,7 @@ func (en *en_MO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_MO' -@@ -405,17 +214,6 @@ func (en *en_MO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_MO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_MO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_MO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,13 +246,11 @@ func (en *en_MO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +258,6 @@ func (en *en_MO) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +267,11 @@ func (en *en_MO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +286,6 @@ func (en *en_MO) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +295,11 @@ func (en *en_MO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +316,6 @@ func (en *en_MO) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +327,11 @@ func (en *en_MO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +348,6 @@ func (en *en_MO) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_MP/en_MP.go b/en_MP/en_MP.go -index 2a538fb..c2b8105 100644 ---- a/en_MP/en_MP.go -+++ b/en_MP/en_MP.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MP struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MP' locale - func New() locales.Translator { - return &en_MP{ -- locale: "en_MP", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEPM": "St. Pierre & Miquelon Daylight Time", "SRT": "Suriname Time", "ACWST": "Australian Central Western Standard Time", "LHDT": "Lord Howe Daylight Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "COT": "Colombia Standard Time", "HNPMX": "Mexican Pacific Standard Time", "WIB": "Western Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "ChST": "Chamorro Standard Time", "ART": "Argentina Standard Time", "WEZ": "Western European Standard Time", "JDT": "Japan Daylight Time", "BOT": "Bolivia Time", "HEEG": "East Greenland Summer Time", "OEZ": "Eastern European Standard Time", "EST": "Eastern Standard Time", "UYT": "Uruguay Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "HNPM": "St. Pierre & Miquelon Standard Time", "JST": "Japan Standard Time", "WAST": "West Africa Summer Time", "GMT": "Greenwich Mean Time", "GYT": "Guyana Time", "UYST": "Uruguay Summer Time", "CAT": "Central Africa Time", "CLST": "Chile Summer Time", "ECT": "Ecuador Time", "CDT": "Central Daylight Time", "PST": "Pacific Standard Time", "MESZ": "Central European Summer Time", "GFT": "French Guiana Time", "ACDT": "Australian Central Daylight Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time", "MST": "Macau Standard Time", "PDT": "Pacific Daylight Time", "AWDT": "Australian Western Daylight Time", "HKT": "Hong Kong Standard Time", "NZDT": "New Zealand Daylight Time", "EAT": "East Africa Time", "EDT": "Eastern Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "WAT": "West Africa Standard Time", "WARST": "Western Argentina Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "HECU": "Cuba Daylight Time", "AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "LHST": "Lord Howe Standard Time", "ACST": "Australian Central Standard Time", "OESZ": "Eastern European Summer Time", "AKST": "Alaska Standard Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "MEZ": "Central European Standard Time", "CLT": "Chile Standard Time", "TMT": "Turkmenistan Standard Time", "MDT": "Macau Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "AKDT": "Alaska Daylight Time", "ARST": "Argentina Summer Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "HKST": "Hong Kong Summer Time", "NZST": "New Zealand Standard Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "IST": "India Standard Time", "∅∅∅": "Amazon Summer Time", "BT": "Bhutan Time", "AWST": "Australian Western Standard Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "TMST": "Turkmenistan Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HNEG": "East Greenland Standard Time", "HNCU": "Cuba Standard Time", "MYT": "Malaysia Time", "AEST": "Australian Eastern Standard Time"}, -+ locale: "en_MP", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"VET": "VET", "HNCU": "HNCU", "WAT": "WAT", "ARST": "ARST", "AWST": "AWST", "WEZ": "WEZ", "COST": "COST", "NZDT": "NZDT", "ChST": "ChST", "ART": "ART", "EAT": "EAT", "ACWST": "ACWST", "OESZ": "OESZ", "TMST": "TMST", "WITA": "WITA", "GMT": "GMT", "BT": "BT", "WARST": "WARST", "GYT": "GYT", "CLST": "CLST", "MDT": "MDT", "CHADT": "CHADT", "OEZ": "OEZ", "COT": "COT", "HKT": "HKT", "WIB": "WIB", "HAST": "HAST", "MYT": "MYT", "AEDT": "AEDT", "GFT": "GFT", "HNT": "HNT", "TMT": "TMT", "MEZ": "MEZ", "ACST": "ACST", "IST": "IST", "SGT": "SGT", "AKST": "AKST", "ADT": "ADT", "UYT": "UYT", "HECU": "HECU", "CAT": "CAT", "ACDT": "ACDT", "HADT": "HADT", "LHST": "LHST", "LHDT": "LHDT", "HNPM": "HNPM", "HKST": "HKST", "AST": "AST", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "WIT": "WIT", "BOT": "BOT", "PST": "PST", "EST": "EST", "NZST": "NZST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "HEPM": "HEPM", "AEST": "AEST", "UYST": "UYST", "WESZ": "WESZ", "MESZ": "MESZ", "CHAST": "CHAST", "HAT": "HAT", "WART": "WART", "SAST": "SAST", "HEOG": "HEOG", "ECT": "ECT", "PDT": "PDT", "HENOMX": "HENOMX", "WAST": "WAST", "SRT": "SRT", "JST": "JST", "HNOG": "HNOG", "CLT": "CLT", "CST": "CST", "CDT": "CDT", "HEEG": "HEEG", "HNEG": "HNEG", "JDT": "JDT", "HEPMX": "HEPMX", "AKDT": "AKDT", "EDT": "EDT", "MST": "MST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_MP) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MP) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MP) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MP) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MP) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MP) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MP) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MP' and handles both Whole and Real numbers based on 'v' - func (en *en_MP) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MP' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MP) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MP' -@@ -278,56 +195,7 @@ func (en *en_MP) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MP' -@@ -336,68 +204,7 @@ func (en *en_MP) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_MP' -@@ -405,15 +212,15 @@ func (en *en_MP) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_MP) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_MP) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_MP) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_MP) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_MP) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_MP) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_MP) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_MP) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_MP) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_MP) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_MP) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_MS/en_MS.go b/en_MS/en_MS.go -index 3b49006..279a2dc 100644 ---- a/en_MS/en_MS.go -+++ b/en_MS/en_MS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MS' locale - func New() locales.Translator { - return &en_MS{ -- locale: "en_MS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AEST": "Australian Eastern Standard Time", "CLST": "Chile Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "MESZ": "Central European Summer Time", "HNEG": "East Greenland Standard Time", "COST": "Colombia Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "HKT": "Hong Kong Standard Time", "WITA": "Central Indonesia Time", "ECT": "Ecuador Time", "WARST": "Western Argentina Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "PST": "Pacific Standard Time", "HEOG": "West Greenland Summer Time", "CAT": "Central Africa Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "WIT": "Eastern Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "GFT": "French Guiana Time", "GMT": "Greenwich Mean Time", "CDT": "Central Daylight Time", "NZDT": "New Zealand Daylight Time", "JST": "Japan Standard Time", "EAT": "East Africa Time", "WAT": "West Africa Standard Time", "OESZ": "Eastern European Summer Time", "PDT": "Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "CHAST": "Chatham Standard Time", "JDT": "Japan Daylight Time", "AWDT": "Australian Western Daylight Time", "TMT": "Turkmenistan Standard Time", "ACDT": "Australian Central Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "GYT": "Guyana Time", "ACWST": "Australian Central Western Standard Time", "ARST": "Argentina Summer Time", "CLT": "Chile Standard Time", "SRT": "Suriname Time", "ART": "Argentina Standard Time", "ACST": "Australian Central Standard Time", "WAST": "West Africa Summer Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "WIB": "Western Indonesia Time", "MEZ": "Central European Standard Time", "IST": "India Standard Time", "SGT": "Singapore Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "UYST": "Uruguay Summer Time", "HNOG": "West Greenland Standard Time", "NZST": "New Zealand Standard Time", "∅∅∅": "Amazon Summer Time", "EDT": "Eastern Daylight Time", "AKDT": "Alaska Daylight Time", "MYT": "Malaysia Time", "WESZ": "Western European Summer Time", "CHADT": "Chatham Daylight Time", "BOT": "Bolivia Time", "VET": "Venezuela Time", "WEZ": "Western European Standard Time", "ChST": "Chamorro Standard Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "UYT": "Uruguay Standard Time", "HKST": "Hong Kong Summer Time"}, -+ locale: "en_MS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "EAT": "EAT", "LHST": "LHST", "ACWDT": "ACWDT", "CAT": "CAT", "HEOG": "HEOG", "LHDT": "LHDT", "AWDT": "AWDT", "CHADT": "CHADT", "WAST": "WAST", "IST": "IST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "PST": "PST", "UYST": "UYST", "HKST": "HKST", "HAST": "HAST", "HADT": "HADT", "JDT": "JDT", "ACWST": "ACWST", "HNCU": "HNCU", "AKST": "AKST", "MST": "MST", "ARST": "ARST", "AST": "AST", "CHAST": "CHAST", "HECU": "HECU", "MEZ": "MEZ", "MESZ": "MESZ", "EST": "EST", "WITA": "WITA", "MDT": "MDT", "ChST": "ChST", "BOT": "BOT", "SRT": "SRT", "BT": "BT", "AEDT": "AEDT", "WEZ": "WEZ", "COST": "COST", "SAST": "SAST", "ACST": "ACST", "HNPM": "HNPM", "AWST": "AWST", "UYT": "UYT", "VET": "VET", "WART": "WART", "WIT": "WIT", "HNT": "HNT", "CST": "CST", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "ADT": "ADT", "ACDT": "ACDT", "HNOG": "HNOG", "NZST": "NZST", "HEPMX": "HEPMX", "HKT": "HKT", "TMT": "TMT", "TMST": "TMST", "NZDT": "NZDT", "WIB": "WIB", "AEST": "AEST", "HNPMX": "HNPMX", "HNEG": "HNEG", "HAT": "HAT", "COT": "COT", "EDT": "EDT", "HEEG": "HEEG", "PDT": "PDT", "WAT": "WAT", "OESZ": "OESZ", "WARST": "WARST", "ECT": "ECT", "CDT": "CDT", "GFT": "GFT", "OEZ": "OEZ", "GYT": "GYT", "CLT": "CLT", "CLST": "CLST", "ART": "ART", "MYT": "MYT", "JST": "JST", "SGT": "SGT", "AKDT": "AKDT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_MS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MS) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MS) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MS) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MS' and handles both Whole and Real numbers based on 'v' - func (en *en_MS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MS' -@@ -278,56 +195,7 @@ func (en *en_MS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MS' -@@ -336,84 +204,33 @@ func (en *en_MS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_MS' -+func (en *en_MS) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_MS' --func (en *en_MS) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_MS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_MS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_MS) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_MT/en_MT.go b/en_MT/en_MT.go -index c62a259..770456f 100644 ---- a/en_MT/en_MT.go -+++ b/en_MT/en_MT.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_MT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MT' locale - func New() locales.Translator { - return &en_MT{ -- locale: "en_MT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WEZ": "Western European Standard Time", "SAST": "South Africa Standard Time", "TMST": "Turkmenistan Summer Time", "CAT": "Central Africa Time", "PST": "Pacific Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "IST": "India Standard Time", "GFT": "French Guiana Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "HKST": "Hong Kong Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "BT": "Bhutan Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "MEZ": "Central European Standard Time", "CLST": "Chile Summer Time", "JST": "Japan Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "AEDT": "Australian Eastern Daylight Time", "WAT": "West Africa Standard Time", "OESZ": "Eastern European Summer Time", "ACWST": "Australian Central Western Standard Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "HEEG": "East Greenland Summer Time", "UYT": "Uruguay Standard Time", "MESZ": "Central European Summer Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time", "HNCU": "Cuba Standard Time", "MST": "Macau Standard Time", "AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "ChST": "Chamorro Standard Time", "SRT": "Suriname Time", "WESZ": "Western European Summer Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "CST": "Central Standard Time", "GYT": "Guyana Time", "UYST": "Uruguay Summer Time", "VET": "Venezuela Time", "AEST": "Australian Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "CLT": "Chile Standard Time", "ACST": "Australian Central Standard Time", "HECU": "Cuba Daylight Time", "EST": "Eastern Standard Time", "HNT": "Newfoundland Standard Time", "COST": "Colombia Summer Time", "MYT": "Malaysia Time", "WIT": "Eastern Indonesia Time", "EAT": "East Africa Time", "ACDT": "Australian Central Daylight Time", "HKT": "Hong Kong Standard Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HAT": "Newfoundland Daylight Time", "∅∅∅": "Amazon Summer Time", "JDT": "Japan Daylight Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "MDT": "Macau Summer Time", "PDT": "Pacific Daylight Time", "ART": "Argentina Standard Time", "AWST": "Australian Western Standard Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "TMT": "Turkmenistan Standard Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "EDT": "Eastern Daylight Time", "ECT": "Ecuador Time", "NZDT": "New Zealand Daylight Time", "WAST": "West Africa Summer Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time"}, -+ locale: "en_MT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"HAST": "HAST", "AWST": "AWST", "MYT": "MYT", "WIT": "WIT", "LHDT": "LHDT", "HEPM": "HEPM", "OESZ": "OESZ", "WESZ": "WESZ", "SAST": "SAST", "HKT": "HKT", "CAT": "CAT", "ChST": "ChST", "ACST": "ACST", "EST": "EST", "IST": "IST", "GFT": "GFT", "HEOG": "HEOG", "PDT": "PDT", "GYT": "GYT", "CLT": "CLT", "HNNOMX": "HNNOMX", "PST": "PST", "CHAST": "CHAST", "CHADT": "CHADT", "WEZ": "WEZ", "SGT": "SGT", "NZDT": "NZDT", "ARST": "ARST", "HNPM": "HNPM", "BOT": "BOT", "JST": "JST", "OEZ": "OEZ", "TMT": "TMT", "MST": "MST", "ART": "ART", "HNCU": "HNCU", "VET": "VET", "HNT": "HNT", "WART": "WART", "COT": "COT", "WIB": "WIB", "AST": "AST", "HNEG": "HNEG", "MEZ": "MEZ", "ACWST": "ACWST", "ACWDT": "ACWDT", "AEST": "AEST", "WAST": "WAST", "NZST": "NZST", "ECT": "ECT", "GMT": "GMT", "AKST": "AKST", "SRT": "SRT", "ACDT": "ACDT", "LHST": "LHST", "JDT": "JDT", "UYST": "UYST", "∅∅∅": "∅∅∅", "WITA": "WITA", "ADT": "ADT", "HAT": "HAT", "HEEG": "HEEG", "HENOMX": "HENOMX", "BT": "BT", "WAT": "WAT", "MDT": "MDT", "EAT": "EAT", "HADT": "HADT", "MESZ": "MESZ", "WARST": "WARST", "CLST": "CLST", "CST": "CST", "CDT": "CDT", "HNPMX": "HNPMX", "AKDT": "AKDT", "HNOG": "HNOG", "EDT": "EDT", "HKST": "HKST", "UYT": "UYT", "AEDT": "AEDT", "HECU": "HECU", "TMST": "TMST", "AWDT": "AWDT", "HEPMX": "HEPMX", "COST": "COST"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_MT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MT) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_MT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MT) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_MT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MT) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_MT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MT' and handles both Whole and Real numbers based on 'v' - func (en *en_MT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MT' -@@ -278,56 +197,7 @@ func (en *en_MT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MT' -@@ -336,68 +206,7 @@ func (en *en_MT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_MT' -@@ -405,17 +214,6 @@ func (en *en_MT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -470,19 +268,6 @@ func (en *en_MT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_MU/en_MU.go b/en_MU/en_MU.go -index 02d4c89..71ca877 100644 ---- a/en_MU/en_MU.go -+++ b/en_MU/en_MU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MU' locale - func New() locales.Translator { - return &en_MU{ -- locale: "en_MU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "Rs", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"∅∅∅": "Azores Summer Time", "LHST": "Lord Howe Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EDT": "Eastern Daylight Time", "AKDT": "Alaska Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HEEG": "East Greenland Summer Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "JST": "Japan Standard Time", "OEZ": "Eastern European Standard Time", "HNEG": "East Greenland Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "ARST": "Argentina Summer Time", "AEST": "Australian Eastern Standard Time", "IST": "India Standard Time", "AKST": "Alaska Standard Time", "CST": "Central Standard Time", "AST": "Atlantic Standard Time", "UYT": "Uruguay Standard Time", "PST": "Pacific Standard Time", "HAT": "Newfoundland Daylight Time", "LHDT": "Lord Howe Daylight Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "GMT": "Greenwich Mean Time", "AEDT": "Australian Eastern Daylight Time", "MEZ": "Central European Standard Time", "TMT": "Turkmenistan Standard Time", "EAT": "East Africa Time", "SRT": "Suriname Time", "CLST": "Chile Summer Time", "WART": "Western Argentina Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "HKST": "Hong Kong Summer Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "WAT": "West Africa Standard Time", "HNCU": "Cuba Standard Time", "CHADT": "Chatham Daylight Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "BT": "Bhutan Time", "NZDT": "New Zealand Daylight Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "EST": "Eastern Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "MYT": "Malaysia Time", "ACWST": "Australian Central Western Standard Time", "ART": "Argentina Standard Time", "NZST": "New Zealand Standard Time", "CHAST": "Chatham Standard Time", "ACDT": "Australian Central Daylight Time", "WAST": "West Africa Summer Time", "OESZ": "Eastern European Summer Time", "HECU": "Cuba Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "HNT": "Newfoundland Standard Time", "AWDT": "Australian Western Daylight Time", "ChST": "Chamorro Standard Time", "WIT": "Eastern Indonesia Time", "CLT": "Chile Standard Time", "ACST": "Australian Central Standard Time", "ADT": "Atlantic Daylight Time", "GYT": "Guyana Time", "AWST": "Australian Western Standard Time", "CAT": "Central Africa Time", "UYST": "Uruguay Summer Time", "ACWDT": "Australian Central Western Daylight Time", "WITA": "Central Indonesia Time", "ECT": "Ecuador Time", "SGT": "Singapore Standard Time", "WESZ": "Western European Summer Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "MESZ": "Central European Summer Time", "TMST": "Turkmenistan Summer Time"}, -+ locale: "en_MU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "Rs", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKDT": "AKDT", "ECT": "ECT", "MEZ": "MEZ", "AWST": "AWST", "MYT": "MYT", "CLT": "CLT", "WARST": "WARST", "WIT": "WIT", "COST": "COST", "MST": "MST", "ChST": "ChST", "BOT": "BOT", "HADT": "HADT", "JST": "JST", "OEZ": "OEZ", "HKT": "HKT", "HNOG": "HNOG", "HNEG": "HNEG", "PDT": "PDT", "HEPMX": "HEPMX", "HNCU": "HNCU", "WITA": "WITA", "ACDT": "ACDT", "BT": "BT", "SGT": "SGT", "AKST": "AKST", "HAT": "HAT", "COT": "COT", "UYST": "UYST", "IST": "IST", "HNPMX": "HNPMX", "TMT": "TMT", "EAT": "EAT", "ACST": "ACST", "LHDT": "LHDT", "SAST": "SAST", "AEST": "AEST", "ADT": "ADT", "NZDT": "NZDT", "SRT": "SRT", "HAST": "HAST", "HNPM": "HNPM", "GFT": "GFT", "EDT": "EDT", "EST": "EST", "CAT": "CAT", "MESZ": "MESZ", "HEPM": "HEPM", "WEZ": "WEZ", "OESZ": "OESZ", "HKST": "HKST", "HENOMX": "HENOMX", "ACWST": "ACWST", "AEDT": "AEDT", "CHAST": "CHAST", "WAT": "WAT", "GYT": "GYT", "CST": "CST", "NZST": "NZST", "HEEG": "HEEG", "PST": "PST", "ACWDT": "ACWDT", "VET": "VET", "TMST": "TMST", "AST": "AST", "ART": "ART", "JDT": "JDT", "UYT": "UYT", "∅∅∅": "∅∅∅", "WART": "WART", "CLST": "CLST", "MDT": "MDT", "WIB": "WIB", "GMT": "GMT", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "LHST": "LHST", "ARST": "ARST", "HECU": "HECU", "WAST": "WAST", "HEOG": "HEOG", "CDT": "CDT", "CHADT": "CHADT", "WESZ": "WESZ", "HNT": "HNT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_MU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MU) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MU) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MU) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MU' and handles both Whole and Real numbers based on 'v' - func (en *en_MU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MU' -@@ -278,56 +195,7 @@ func (en *en_MU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MU' -@@ -336,84 +204,33 @@ func (en *en_MU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_MU' -+func (en *en_MU) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_MU' --func (en *en_MU) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_MU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_MU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_MU) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_MW/en_MW.go b/en_MW/en_MW.go -index add3b49..6641732 100644 ---- a/en_MW/en_MW.go -+++ b/en_MW/en_MW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MW' locale - func New() locales.Translator { - return &en_MW{ -- locale: "en_MW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ChST": "Chamorro Standard Time", "COT": "Colombia Standard Time", "CDT": "Central Daylight Time", "ART": "Argentina Standard Time", "HKT": "Hong Kong Standard Time", "LHST": "Lord Howe Standard Time", "CLT": "Chile Standard Time", "CAT": "Central Africa Time", "WAST": "West Africa Summer Time", "AST": "Atlantic Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "VET": "Venezuela Time", "ACWDT": "Australian Central Western Daylight Time", "ARST": "Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "HAT": "Newfoundland Daylight Time", "HEOG": "West Greenland Summer Time", "HNT": "Newfoundland Standard Time", "JST": "Japan Standard Time", "ECT": "Ecuador Time", "MST": "Macau Standard Time", "CST": "Central Standard Time", "HNOG": "West Greenland Standard Time", "∅∅∅": "Azores Summer Time", "AKST": "Alaska Standard Time", "AWDT": "Australian Western Daylight Time", "ACST": "Australian Central Standard Time", "OESZ": "Eastern European Summer Time", "MYT": "Malaysia Time", "SRT": "Suriname Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MESZ": "Central European Summer Time", "GFT": "French Guiana Time", "HECU": "Cuba Daylight Time", "EST": "Eastern Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "HEEG": "East Greenland Summer Time", "AEST": "Australian Eastern Standard Time", "WITA": "Central Indonesia Time", "LHDT": "Lord Howe Daylight Time", "MDT": "Macau Summer Time", "WART": "Western Argentina Standard Time", "ACWST": "Australian Central Western Standard Time", "CHAST": "Chatham Standard Time", "UYT": "Uruguay Standard Time", "BT": "Bhutan Time", "PDT": "Pacific Daylight Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "WARST": "Western Argentina Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "UYST": "Uruguay Summer Time", "HKST": "Hong Kong Summer Time", "MEZ": "Central European Standard Time", "HNEG": "East Greenland Standard Time", "TMT": "Turkmenistan Standard Time", "GMT": "Greenwich Mean Time", "HNCU": "Cuba Standard Time", "CLST": "Chile Summer Time", "PST": "Pacific Standard Time", "WESZ": "Western European Summer Time", "AWST": "Australian Western Standard Time", "CHADT": "Chatham Daylight Time", "TMST": "Turkmenistan Summer Time", "GYT": "Guyana Time", "AKDT": "Alaska Daylight Time", "WIT": "Eastern Indonesia Time", "HNNOMX": "Northwest Mexico Standard Time", "EAT": "East Africa Time", "WAT": "West Africa Standard Time", "OEZ": "Eastern European Standard Time", "WEZ": "Western European Standard Time", "NZST": "New Zealand Standard Time", "SGT": "Singapore Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "WIB": "Western Indonesia Time"}, -+ locale: "en_MW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HNT": "HNT", "HEEG": "HEEG", "AEDT": "AEDT", "CHAST": "CHAST", "UYST": "UYST", "VET": "VET", "HNPMX": "HNPMX", "HAT": "HAT", "WART": "WART", "WAT": "WAT", "OESZ": "OESZ", "WIT": "WIT", "SAST": "SAST", "NZST": "NZST", "BOT": "BOT", "AEST": "AEST", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "HNOG": "HNOG", "CAT": "CAT", "ART": "ART", "MEZ": "MEZ", "UYT": "UYT", "PDT": "PDT", "HEPMX": "HEPMX", "CLT": "CLT", "CST": "CST", "ADT": "ADT", "HENOMX": "HENOMX", "AWST": "AWST", "BT": "BT", "ACWST": "ACWST", "HEOG": "HEOG", "HKT": "HKT", "CLST": "CLST", "HNEG": "HNEG", "JST": "JST", "NZDT": "NZDT", "MST": "MST", "EAT": "EAT", "LHST": "LHST", "IST": "IST", "HNCU": "HNCU", "OEZ": "OEZ", "GFT": "GFT", "HADT": "HADT", "ACDT": "ACDT", "JDT": "JDT", "ACWDT": "ACWDT", "COT": "COT", "WAST": "WAST", "CDT": "CDT", "MDT": "MDT", "SRT": "SRT", "MYT": "MYT", "AKST": "AKST", "WARST": "WARST", "ECT": "ECT", "ChST": "ChST", "ARST": "ARST", "AST": "AST", "HKST": "HKST", "MESZ": "MESZ", "HNPM": "HNPM", "HEPM": "HEPM", "HECU": "HECU", "COST": "COST", "TMST": "TMST", "WIB": "WIB", "GMT": "GMT", "HNNOMX": "HNNOMX", "SGT": "SGT", "GYT": "GYT", "WITA": "WITA", "AWDT": "AWDT", "LHDT": "LHDT", "PST": "PST", "ACST": "ACST", "WEZ": "WEZ", "AKDT": "AKDT", "TMT": "TMT", "EST": "EST", "EDT": "EDT", "HAST": "HAST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_MW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MW) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MW) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MW) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MW' and handles both Whole and Real numbers based on 'v' - func (en *en_MW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MW' -@@ -278,56 +195,7 @@ func (en *en_MW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MW' -@@ -336,84 +204,33 @@ func (en *en_MW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_MW' -+func (en *en_MW) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_MW' --func (en *en_MW) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_MW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_MW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_MW) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_MW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_MW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_MW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_MW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_MY/en_MY.go b/en_MY/en_MY.go -index e76fd47..bbecfe0 100644 ---- a/en_MY/en_MY.go -+++ b/en_MY/en_MY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_MY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_MY' locale - func New() locales.Translator { - return &en_MY{ -- locale: "en_MY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "RM", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CLT": "Chile Standard Time", "WAST": "West Africa Summer Time", "HAT": "Newfoundland Daylight Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "HEEG": "East Greenland Summer Time", "ACST": "Australian Central Standard Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "ART": "Argentina Standard Time", "HKST": "Hong Kong Summer Time", "IST": "India Standard Time", "COST": "Colombia Summer Time", "CST": "Central Standard Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "WITA": "Central Indonesia Time", "EDT": "Eastern Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "MYT": "Malaysia Time", "BT": "Bhutan Time", "WEZ": "Western European Standard Time", "ChST": "Chamorro Standard Time", "HNEG": "East Greenland Standard Time", "HNT": "Newfoundland Standard Time", "LHDT": "Lord Howe Daylight Time", "CHAST": "Chatham Standard Time", "OESZ": "Eastern European Summer Time", "HKT": "Hong Kong Standard Time", "MEZ": "Central European Standard Time", "LHST": "Lord Howe Standard Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "MST": "Macau Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZST": "New Zealand Standard Time", "JST": "Japan Standard Time", "OEZ": "Eastern European Standard Time", "ECT": "Ecuador Time", "GMT": "Greenwich Mean Time", "CLST": "Chile Summer Time", "JDT": "Japan Daylight Time", "TMT": "Turkmenistan Standard Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "GFT": "French Guiana Time", "GYT": "Guyana Time", "WIT": "Eastern Indonesia Time", "HEPMX": "Mexican Pacific Daylight Time", "AST": "Atlantic Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "ARST": "Argentina Summer Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time", "TMST": "Turkmenistan Summer Time", "AKST": "Alaska Standard Time", "SRT": "Suriname Time", "PST": "Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "MESZ": "Central European Summer Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "AKDT": "Alaska Daylight Time", "CDT": "Central Daylight Time", "UYT": "Uruguay Standard Time", "UYST": "Uruguay Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "ACDT": "Australian Central Daylight Time", "WIB": "Western Indonesia Time", "PDT": "Pacific Daylight Time", "HEOG": "West Greenland Summer Time", "AWDT": "Australian Western Daylight Time", "CAT": "Central Africa Time", "HENOMX": "Northwest Mexico Daylight Time", "MDT": "Macau Summer Time", "ADT": "Atlantic Daylight Time", "HNOG": "West Greenland Standard Time", "AWST": "Australian Western Standard Time", "BOT": "Bolivia Time", "WAT": "West Africa Standard Time"}, -+ locale: "en_MY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "RM", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CDT": "CDT", "JST": "JST", "CAT": "CAT", "WITA": "WITA", "MYT": "MYT", "HNT": "HNT", "ECT": "ECT", "ART": "ART", "HADT": "HADT", "HEEG": "HEEG", "CHAST": "CHAST", "WEZ": "WEZ", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "EDT": "EDT", "MST": "MST", "MEZ": "MEZ", "HNCU": "HNCU", "WARST": "WARST", "AEDT": "AEDT", "OESZ": "OESZ", "WIT": "WIT", "HEOG": "HEOG", "CST": "CST", "LHST": "LHST", "UYST": "UYST", "ACWST": "ACWST", "HKST": "HKST", "ACST": "ACST", "PDT": "PDT", "COST": "COST", "GFT": "GFT", "WART": "WART", "NZDT": "NZDT", "BOT": "BOT", "MESZ": "MESZ", "VET": "VET", "OEZ": "OEZ", "HAST": "HAST", "UYT": "UYT", "TMT": "TMT", "WIB": "WIB", "WESZ": "WESZ", "WAT": "WAT", "HKT": "HKT", "MDT": "MDT", "ARST": "ARST", "AWST": "AWST", "∅∅∅": "∅∅∅", "PST": "PST", "EAT": "EAT", "WAST": "WAST", "AKST": "AKST", "AST": "AST", "ADT": "ADT", "ACDT": "ACDT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "HNOG": "HNOG", "SGT": "SGT", "HECU": "HECU", "HAT": "HAT", "LHDT": "LHDT", "CLT": "CLT", "NZST": "NZST", "IST": "IST", "HEPMX": "HEPMX", "SAST": "SAST", "COT": "COT", "HNPM": "HNPM", "JDT": "JDT", "CHADT": "CHADT", "GYT": "GYT", "GMT": "GMT", "AEST": "AEST", "AKDT": "AKDT", "EST": "EST", "TMST": "TMST", "CLST": "CLST", "AWDT": "AWDT", "BT": "BT", "ACWDT": "ACWDT", "ChST": "ChST", "SRT": "SRT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_MY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_MY) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_MY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_MY) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_MY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_MY) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_MY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_MY' and handles both Whole and Real numbers based on 'v' - func (en *en_MY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_MY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_MY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_MY' -@@ -278,56 +195,7 @@ func (en *en_MY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_MY' -@@ -336,84 +204,33 @@ func (en *en_MY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_MY' -+func (en *en_MY) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_MY' --func (en *en_MY) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_MY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_MY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_MY) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_MY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_MY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_MY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_MY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_NA/en_NA.go b/en_NA/en_NA.go -index bc987d6..84ee630 100644 ---- a/en_NA/en_NA.go -+++ b/en_NA/en_NA.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_NA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_NA' locale - func New() locales.Translator { - return &en_NA{ -- locale: "en_NA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "$", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HADT": "Hawaii-Aleutian Daylight Time", "WAST": "West Africa Summer Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "WIB": "Western Indonesia Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "TMT": "Turkmenistan Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWDT": "Australian Central Western Daylight Time", "MEZ": "Central European Standard Time", "LHST": "Lord Howe Standard Time", "CLST": "Chile Summer Time", "∅∅∅": "Amazon Summer Time", "CST": "Central Standard Time", "EDT": "Eastern Daylight Time", "CDT": "Central Daylight Time", "ART": "Argentina Standard Time", "WART": "Western Argentina Standard Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "ACDT": "Australian Central Daylight Time", "CAT": "Central Africa Time", "SAST": "South Africa Standard Time", "CLT": "Chile Standard Time", "JST": "Japan Standard Time", "JDT": "Japan Daylight Time", "AEDT": "Australian Eastern Daylight Time", "HKST": "Hong Kong Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HEEG": "East Greenland Summer Time", "COT": "Colombia Standard Time", "UYST": "Uruguay Summer Time", "AKST": "Alaska Standard Time", "AST": "Atlantic Standard Time", "BT": "Bhutan Time", "PST": "Pacific Standard Time", "HAT": "Newfoundland Daylight Time", "NZST": "New Zealand Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "AKDT": "Alaska Daylight Time", "ACWST": "Australian Central Western Standard Time", "AEST": "Australian Eastern Standard Time", "IST": "India Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "HNT": "Newfoundland Standard Time", "HEOG": "West Greenland Summer Time", "MESZ": "Central European Summer Time", "ChST": "Chamorro Standard Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "TMST": "Turkmenistan Summer Time", "ACST": "Australian Central Standard Time", "HNPMX": "Mexican Pacific Standard Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "LHDT": "Lord Howe Daylight Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "WIT": "Eastern Indonesia Time", "WEZ": "Western European Standard Time", "HNOG": "West Greenland Standard Time", "MST": "Macau Standard Time", "ADT": "Atlantic Daylight Time", "MDT": "Macau Summer Time", "MYT": "Malaysia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZDT": "New Zealand Daylight Time", "ECT": "Ecuador Time", "HECU": "Cuba Daylight Time", "PDT": "Pacific Daylight Time", "WARST": "Western Argentina Summer Time", "SRT": "Suriname Time", "AWST": "Australian Western Standard Time", "WAT": "West Africa Standard Time", "UYT": "Uruguay Standard Time", "HKT": "Hong Kong Standard Time", "WITA": "Central Indonesia Time", "CHAST": "Chatham Standard Time", "SGT": "Singapore Standard Time"}, -+ locale: "en_NA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "$", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKST": "HKST", "ADT": "ADT", "HADT": "HADT", "HNPM": "HNPM", "VET": "VET", "WART": "WART", "MESZ": "MESZ", "HEEG": "HEEG", "AWST": "AWST", "GMT": "GMT", "ACDT": "ACDT", "HAT": "HAT", "WARST": "WARST", "GYT": "GYT", "COST": "COST", "HNOG": "HNOG", "TMST": "TMST", "LHDT": "LHDT", "CHADT": "CHADT", "UYST": "UYST", "PST": "PST", "HNPMX": "HNPMX", "HKT": "HKT", "ECT": "ECT", "UYT": "UYT", "AKDT": "AKDT", "ARST": "ARST", "HNT": "HNT", "WITA": "WITA", "NZST": "NZST", "EAT": "EAT", "HENOMX": "HENOMX", "GFT": "GFT", "∅∅∅": "∅∅∅", "WIB": "WIB", "MDT": "MDT", "AWDT": "AWDT", "WEZ": "WEZ", "WESZ": "WESZ", "CLT": "CLT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "WAT": "WAT", "OESZ": "OESZ", "HEOG": "HEOG", "TMT": "TMT", "CAT": "CAT", "ACWDT": "ACWDT", "HECU": "HECU", "AST": "AST", "JST": "JST", "JDT": "JDT", "BT": "BT", "WIT": "WIT", "BOT": "BOT", "MEZ": "MEZ", "SGT": "SGT", "ART": "ART", "HEPMX": "HEPMX", "SAST": "SAST", "COT": "COT", "EST": "EST", "EDT": "EDT", "NZDT": "NZDT", "ChST": "ChST", "HNCU": "HNCU", "CLST": "CLST", "CDT": "CDT", "MYT": "MYT", "HEPM": "HEPM", "IST": "IST", "PDT": "PDT", "AEST": "AEST", "ACWST": "ACWST", "WAST": "WAST", "AKST": "AKST", "SRT": "SRT", "HAST": "HAST", "AEDT": "AEDT", "CHAST": "CHAST", "CST": "CST", "MST": "MST", "ACST": "ACST", "LHST": "LHST", "OEZ": "OEZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_NA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NA) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_NA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NA) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_NA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NA) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_NA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NA' and handles both Whole and Real numbers based on 'v' - func (en *en_NA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NA' -@@ -278,56 +195,7 @@ func (en *en_NA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_NA' -@@ -336,84 +204,33 @@ func (en *en_NA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_NA' -+func (en *en_NA) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_NA' --func (en *en_NA) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_NA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_NA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_NA) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_NA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_NA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_NA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_NA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_NF/en_NF.go b/en_NF/en_NF.go -index bed6b5c..daa2abc 100644 ---- a/en_NF/en_NF.go -+++ b/en_NF/en_NF.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_NF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_NF' locale - func New() locales.Translator { - return &en_NF{ -- locale: "en_NF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"NZST": "New Zealand Standard Time", "CLST": "Chile Summer Time", "ChST": "Chamorro Standard Time", "AKST": "Alaska Standard Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "TMST": "Turkmenistan Summer Time", "UYT": "Uruguay Standard Time", "AEDT": "Australian Eastern Daylight Time", "MEZ": "Central European Standard Time", "SAST": "South Africa Standard Time", "TMT": "Turkmenistan Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "AWST": "Australian Western Standard Time", "HKT": "Hong Kong Standard Time", "HEEG": "East Greenland Summer Time", "EAT": "East Africa Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "HNCU": "Cuba Standard Time", "AWDT": "Australian Western Daylight Time", "HAT": "Newfoundland Daylight Time", "MESZ": "Central European Summer Time", "CLT": "Chile Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EDT": "Eastern Daylight Time", "BT": "Bhutan Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "BOT": "Bolivia Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "CAT": "Central Africa Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "GMT": "Greenwich Mean Time", "MYT": "Malaysia Time", "PST": "Pacific Standard Time", "PDT": "Pacific Daylight Time", "HNOG": "West Greenland Standard Time", "HNEG": "East Greenland Standard Time", "NZDT": "New Zealand Daylight Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "WITA": "Central Indonesia Time", "ACST": "Australian Central Standard Time", "∅∅∅": "Peru Summer Time", "EST": "Eastern Standard Time", "HNT": "Newfoundland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHDT": "Lord Howe Daylight Time", "SRT": "Suriname Time", "AEST": "Australian Eastern Standard Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time", "CDT": "Central Daylight Time", "AST": "Atlantic Standard Time", "OEZ": "Eastern European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HECU": "Cuba Daylight Time", "GFT": "French Guiana Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "HEOG": "West Greenland Summer Time", "CHADT": "Chatham Daylight Time", "CST": "Central Standard Time", "ADT": "Atlantic Daylight Time", "VET": "Venezuela Time", "CHAST": "Chatham Standard Time", "WIB": "Western Indonesia Time", "IST": "India Standard Time", "SGT": "Singapore Standard Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time"}, -+ locale: "en_NF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"IST": "IST", "HECU": "HECU", "ACWDT": "ACWDT", "WEZ": "WEZ", "WART": "WART", "HEOG": "HEOG", "MESZ": "MESZ", "HEPM": "HEPM", "JDT": "JDT", "AEST": "AEST", "CHAST": "CHAST", "CHADT": "CHADT", "CLST": "CLST", "NZDT": "NZDT", "WESZ": "WESZ", "AKDT": "AKDT", "UYT": "UYT", "UYST": "UYST", "HKST": "HKST", "EST": "EST", "SRT": "SRT", "AEDT": "AEDT", "VET": "VET", "OESZ": "OESZ", "WIT": "WIT", "BT": "BT", "HNOG": "HNOG", "HENOMX": "HENOMX", "ARST": "ARST", "EAT": "EAT", "LHDT": "LHDT", "MYT": "MYT", "PST": "PST", "∅∅∅": "∅∅∅", "TMT": "TMT", "MDT": "MDT", "ECT": "ECT", "JST": "JST", "COT": "COT", "TMST": "TMST", "COST": "COST", "MST": "MST", "ART": "ART", "AWST": "AWST", "OEZ": "OEZ", "GYT": "GYT", "ChST": "ChST", "AST": "AST", "ADT": "ADT", "HAST": "HAST", "ACST": "ACST", "HNEG": "HNEG", "SAST": "SAST", "CDT": "CDT", "HNPMX": "HNPMX", "HEEG": "HEEG", "PDT": "PDT", "WAT": "WAT", "CAT": "CAT", "CST": "CST", "ACWST": "ACWST", "SGT": "SGT", "AKST": "AKST", "WAST": "WAST", "WIB": "WIB", "HNPM": "HNPM", "AWDT": "AWDT", "CLT": "CLT", "NZST": "NZST", "GMT": "GMT", "BOT": "BOT", "WARST": "WARST", "HAT": "HAT", "HADT": "HADT", "ACDT": "ACDT", "HEPMX": "HEPMX", "LHST": "LHST", "HNCU": "HNCU", "HKT": "HKT", "EDT": "EDT", "WITA": "WITA", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "GFT": "GFT", "HNT": "HNT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_NF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NF) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_NF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NF) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_NF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NF) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_NF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NF' and handles both Whole and Real numbers based on 'v' - func (en *en_NF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NF' -@@ -278,56 +195,7 @@ func (en *en_NF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_NF' -@@ -336,84 +204,33 @@ func (en *en_NF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_NF' -+func (en *en_NF) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_NF' --func (en *en_NF) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_NF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_NF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_NF) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_NG/en_NG.go b/en_NG/en_NG.go -index 1db9066..8223ad7 100644 ---- a/en_NG/en_NG.go -+++ b/en_NG/en_NG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_NG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_NG' locale - func New() locales.Translator { - return &en_NG{ -- locale: "en_NG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "₦", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "AKDT": "Alaska Daylight Time", "UYST": "Uruguay Summer Time", "ART": "Argentina Standard Time", "AWDT": "Australian Western Daylight Time", "MEZ": "Central European Standard Time", "GFT": "French Guiana Time", "ACST": "Australian Central Standard Time", "HECU": "Cuba Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "ARST": "Argentina Summer Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "VET": "Venezuela Time", "SRT": "Suriname Time", "AWST": "Australian Western Standard Time", "LHST": "Lord Howe Standard Time", "TMT": "Turkmenistan Standard Time", "COT": "Colombia Standard Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "CDT": "Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "BT": "Bhutan Time", "PST": "Pacific Standard Time", "HKST": "Hong Kong Summer Time", "LHDT": "Lord Howe Daylight Time", "GMT": "Greenwich Mean Time", "HEPMX": "Mexican Pacific Daylight Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "TMST": "Turkmenistan Summer Time", "WART": "Western Argentina Standard Time", "HNPMX": "Mexican Pacific Standard Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time", "EAT": "East Africa Time", "OEZ": "Eastern European Standard Time", "WAST": "West Africa Summer Time", "WIT": "Eastern Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "AEST": "Australian Eastern Standard Time", "CHAST": "Chatham Standard Time", "HNEG": "East Greenland Standard Time", "SGT": "Singapore Standard Time", "WIB": "Western Indonesia Time", "WESZ": "Western European Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZST": "New Zealand Standard Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "BOT": "Bolivia Time", "CAT": "Central Africa Time", "HNNOMX": "Northwest Mexico Standard Time", "HNOG": "West Greenland Standard Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "CLST": "Chile Summer Time", "WARST": "Western Argentina Summer Time", "UYT": "Uruguay Standard Time", "HEEG": "East Greenland Summer Time", "OESZ": "Eastern European Summer Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "HNT": "Newfoundland Standard Time", "EDT": "Eastern Daylight Time", "GYT": "Guyana Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "HAT": "Newfoundland Daylight Time", "HEOG": "West Greenland Summer Time", "WITA": "Central Indonesia Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "ACWST": "Australian Central Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLT": "Chile Standard Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "WAT": "West Africa Standard Time", "ECT": "Ecuador Time", "MDT": "Macau Summer Time", "CST": "Central Standard Time"}, -+ locale: "en_NG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "₦", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEST": "AEST", "UYT": "UYT", "WAST": "WAST", "EDT": "EDT", "WITA": "WITA", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "IST": "IST", "AKDT": "AKDT", "COST": "COST", "HENOMX": "HENOMX", "CAT": "CAT", "HNCU": "HNCU", "MESZ": "MESZ", "ACWST": "ACWST", "HEPMX": "HEPMX", "HNOG": "HNOG", "HEOG": "HEOG", "HADT": "HADT", "BT": "BT", "CLT": "CLT", "NZST": "NZST", "JST": "JST", "VET": "VET", "HECU": "HECU", "ChST": "ChST", "HNPMX": "HNPMX", "AWST": "AWST", "LHDT": "LHDT", "PDT": "PDT", "WIB": "WIB", "MDT": "MDT", "AWDT": "AWDT", "SGT": "SGT", "ARST": "ARST", "ACDT": "ACDT", "MEZ": "MEZ", "HNT": "HNT", "CDT": "CDT", "GMT": "GMT", "MST": "MST", "LHST": "LHST", "CHADT": "CHADT", "UYST": "UYST", "ACWDT": "ACWDT", "SAST": "SAST", "TMST": "TMST", "ADT": "ADT", "EAT": "EAT", "AEDT": "AEDT", "WEZ": "WEZ", "AKST": "AKST", "WART": "WART", "EST": "EST", "HAST": "HAST", "ACST": "ACST", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "HAT": "HAT", "HKT": "HKT", "TMT": "TMT", "BOT": "BOT", "CHAST": "CHAST", "WARST": "WARST", "CLST": "CLST", "JDT": "JDT", "WESZ": "WESZ", "WAT": "WAT", "OEZ": "OEZ", "GYT": "GYT", "NZDT": "NZDT", "ECT": "ECT", "ART": "ART", "HEEG": "HEEG", "HNPM": "HNPM", "PST": "PST", "AST": "AST", "SRT": "SRT", "GFT": "GFT", "WIT": "WIT", "COT": "COT", "HKST": "HKST", "CST": "CST", "MYT": "MYT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_NG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_NG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_NG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_NG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NG' and handles both Whole and Real numbers based on 'v' - func (en *en_NG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NG' -@@ -278,56 +195,7 @@ func (en *en_NG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_NG' -@@ -336,84 +204,33 @@ func (en *en_NG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_NG' -+func (en *en_NG) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_NG' --func (en *en_NG) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_NG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_NG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_NG) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_NG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_NG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_NG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_NG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_NL/en_NL.go b/en_NL/en_NL.go -index 641a953..a724f73 100644 ---- a/en_NL/en_NL.go -+++ b/en_NL/en_NL.go -@@ -49,31 +49,12 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: "( ", - currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HAST": "Hawaii-Aleutian Standard Time", "HEOG": "West Greenland Summer Time", "AWST": "Australian Western Standard Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "TMT": "Turkmenistan Standard Time", "UYST": "Uruguay Summer Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "WESZ": "Western European Summer Time", "LHDT": "Lord Howe Daylight Time", "ACDT": "Australian Central Daylight Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "AWDT": "Australian Western Daylight Time", "HNT": "Newfoundland Standard Time", "AEST": "Australian Eastern Standard Time", "JDT": "Japan Daylight Time", "CLT": "Chile Standard Time", "WAT": "West Africa Standard Time", "AST": "Atlantic Standard Time", "VET": "Venezuela Time", "PST": "Pacific Standard Time", "HNCU": "Cuba Standard Time", "AKDT": "Alaska Daylight Time", "EAT": "East Africa Time", "SGT": "Singapore Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "AEDT": "Australian Eastern Daylight Time", "WIT": "Eastern Indonesia Time", "HNOG": "West Greenland Standard Time", "SAST": "South Africa Standard Time", "BOT": "Bolivia Time", "COT": "Colombia Standard Time", "EDT": "Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "CDT": "Central Daylight Time", "NZST": "New Zealand Standard Time", "IST": "India Standard Time", "MEZ": "Central European Standard Time", "GMT": "Greenwich Mean Time", "HECU": "Cuba Daylight Time", "UYT": "Uruguay Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "LHST": "Lord Howe Standard Time", "HNEG": "East Greenland Standard Time", "OEZ": "Eastern European Standard Time", "WARST": "Western Argentina Summer Time", "SRT": "Suriname Time", "HKST": "Hong Kong Summer Time", "ChST": "Chamorro Standard Time", "GFT": "French Guiana Time", "HENOMX": "Northwest Mexico Daylight Time", "AKST": "Alaska Standard Time", "BT": "Bhutan Time", "WEZ": "Western European Standard Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "WAST": "West Africa Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "CST": "Central Standard Time", "CLST": "Chile Summer Time", "∅∅∅": "Amazon Summer Time", "ECT": "Ecuador Time", "CAT": "Central Africa Time", "OESZ": "Eastern European Summer Time", "PDT": "Pacific Daylight Time", "CHADT": "Chatham Daylight Time", "JST": "Japan Standard Time", "TMST": "Turkmenistan Summer Time", "WART": "Western Argentina Standard Time", "GYT": "Guyana Time", "MESZ": "Central European Summer Time", "HNPMX": "Mexican Pacific Standard Time", "MYT": "Malaysia Time", "WIB": "Western Indonesia Time", "ARST": "Argentina Summer Time", "WITA": "Central Indonesia Time", "HEEG": "East Greenland Summer Time", "ACST": "Australian Central Standard Time", "ACWST": "Australian Central Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time"}, -+ timezones: map[string]string{"AST": "AST", "HEPM": "HEPM", "HNT": "HNT", "CLST": "CLST", "CST": "CST", "NZDT": "NZDT", "WIB": "WIB", "ChST": "ChST", "JDT": "JDT", "PST": "PST", "CHAST": "CHAST", "HNOG": "HNOG", "NZST": "NZST", "UYST": "UYST", "CLT": "CLT", "AEST": "AEST", "WARST": "WARST", "HKST": "HKST", "TMT": "TMT", "WITA": "WITA", "HNEG": "HNEG", "AWDT": "AWDT", "AEDT": "AEDT", "AKST": "AKST", "WIT": "WIT", "GMT": "GMT", "SRT": "SRT", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "AKDT": "AKDT", "GYT": "GYT", "MST": "MST", "EAT": "EAT", "ACST": "ACST", "AWST": "AWST", "UYT": "UYT", "COST": "COST", "CDT": "CDT", "MYT": "MYT", "JST": "JST", "WAST": "WAST", "GFT": "GFT", "HKT": "HKT", "TMST": "TMST", "ART": "ART", "ACDT": "ACDT", "HNPM": "HNPM", "IST": "IST", "CHADT": "CHADT", "HECU": "HECU", "EDT": "EDT", "MDT": "MDT", "HADT": "HADT", "LHST": "LHST", "LHDT": "LHDT", "ACWDT": "ACWDT", "SGT": "SGT", "HNCU": "HNCU", "HEPMX": "HEPMX", "ADT": "ADT", "SAST": "SAST", "WART": "WART", "WESZ": "WESZ", "VET": "VET", "OESZ": "OESZ", "COT": "COT", "HEOG": "HEOG", "CAT": "CAT", "BT": "BT", "BOT": "BOT", "MEZ": "MEZ", "HEEG": "HEEG", "ARST": "ARST", "PDT": "PDT", "ACWST": "ACWST", "HNNOMX": "HNNOMX", "HAT": "HAT", "WAT": "WAT", "HAST": "HAST", "WEZ": "WEZ", "OEZ": "OEZ", "ECT": "ECT", "EST": "EST", "MESZ": "MESZ"}, - } - } -  -@@ -140,7 +121,7 @@ func (en *en_NL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NL) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -150,7 +131,7 @@ func (en *en_NL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NL) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -160,7 +141,7 @@ func (en *en_NL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NL) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -206,73 +187,13 @@ func (en *en_NL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NL' and handles both Whole and Real numbers based on 'v' - func (en *en_NL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NL' -@@ -280,7 +201,7 @@ func (en *en_NL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -342,7 +263,7 @@ func (en *en_NL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 4 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -417,17 +338,6 @@ func (en *en_NL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -436,17 +346,6 @@ func (en *en_NL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,17 +354,6 @@ func (en *en_NL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -474,19 +362,6 @@ func (en *en_NL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -495,28 +370,6 @@ func (en *en_NL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -525,35 +378,6 @@ func (en *en_NL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -562,40 +386,6 @@ func (en *en_NL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -604,44 +394,5 @@ func (en *en_NL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_NR/en_NR.go b/en_NR/en_NR.go -index 2f6ff75..cd64478 100644 ---- a/en_NR/en_NR.go -+++ b/en_NR/en_NR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_NR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_NR' locale - func New() locales.Translator { - return &en_NR{ -- locale: "en_NR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "PST": "Pacific Standard Time", "AWDT": "Australian Western Daylight Time", "TMST": "Turkmenistan Summer Time", "ECT": "Ecuador Time", "HNPMX": "Mexican Pacific Standard Time", "ADT": "Atlantic Daylight Time", "MEZ": "Central European Standard Time", "LHST": "Lord Howe Standard Time", "IST": "India Standard Time", "AKST": "Alaska Standard Time", "GYT": "Guyana Time", "WIT": "Eastern Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHAST": "Chatham Standard Time", "WAT": "West Africa Standard Time", "EAT": "East Africa Time", "WEZ": "Western European Standard Time", "HKST": "Hong Kong Summer Time", "GFT": "French Guiana Time", "CAT": "Central Africa Time", "HNCU": "Cuba Standard Time", "ARST": "Argentina Summer Time", "MDT": "Macau Summer Time", "UYT": "Uruguay Standard Time", "HEOG": "West Greenland Summer Time", "WESZ": "Western European Summer Time", "JST": "Japan Standard Time", "BOT": "Bolivia Time", "WART": "Western Argentina Standard Time", "SGT": "Singapore Standard Time", "AEST": "Australian Eastern Standard Time", "JDT": "Japan Daylight Time", "GMT": "Greenwich Mean Time", "MYT": "Malaysia Time", "BT": "Bhutan Time", "HECU": "Cuba Daylight Time", "MST": "Macau Standard Time", "CST": "Central Standard Time", "HKT": "Hong Kong Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "HNOG": "West Greenland Standard Time", "CHADT": "Chatham Daylight Time", "TMT": "Turkmenistan Standard Time", "OESZ": "Eastern European Summer Time", "COT": "Colombia Standard Time", "OEZ": "Eastern European Standard Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "CDT": "Central Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZST": "New Zealand Standard Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "WIB": "Western Indonesia Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "CLT": "Chile Standard Time", "ACDT": "Australian Central Daylight Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "PDT": "Pacific Daylight Time", "NZDT": "New Zealand Daylight Time", "MESZ": "Central European Summer Time", "COST": "Colombia Summer Time", "SRT": "Suriname Time", "WARST": "Western Argentina Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "HEEG": "East Greenland Summer Time", "WAST": "West Africa Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "UYST": "Uruguay Summer Time", "LHDT": "Lord Howe Daylight Time", "CLST": "Chile Summer Time", "HNEG": "East Greenland Standard Time", "AST": "Atlantic Standard Time", "WITA": "Central Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "∅∅∅": "Amazon Summer Time", "ACST": "Australian Central Standard Time", "EDT": "Eastern Daylight Time", "ACWST": "Australian Central Western Standard Time"}, -+ locale: "en_NR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNOG": "HNOG", "HAST": "HAST", "HENOMX": "HENOMX", "ACDT": "ACDT", "HNPM": "HNPM", "HEPM": "HEPM", "AWDT": "AWDT", "HNT": "HNT", "HKST": "HKST", "MEZ": "MEZ", "ACWST": "ACWST", "AEST": "AEST", "UYST": "UYST", "PDT": "PDT", "WESZ": "WESZ", "WIB": "WIB", "ARST": "ARST", "JDT": "JDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "WARST": "WARST", "GMT": "GMT", "CST": "CST", "ChST": "ChST", "MESZ": "MESZ", "HNPMX": "HNPMX", "OESZ": "OESZ", "CLT": "CLT", "AWST": "AWST", "LHDT": "LHDT", "SGT": "SGT", "VET": "VET", "WART": "WART", "COST": "COST", "ACST": "ACST", "WAST": "WAST", "AKST": "AKST", "OEZ": "OEZ", "SAST": "SAST", "TMST": "TMST", "MDT": "MDT", "ART": "ART", "HADT": "HADT", "COT": "COT", "CLST": "CLST", "BOT": "BOT", "EAT": "EAT", "CHAST": "CHAST", "GYT": "GYT", "HNEG": "HNEG", "MYT": "MYT", "HKT": "HKT", "NZDT": "NZDT", "BT": "BT", "HECU": "HECU", "WEZ": "WEZ", "WIT": "WIT", "∅∅∅": "∅∅∅", "EDT": "EDT", "CAT": "CAT", "WITA": "WITA", "SRT": "SRT", "WAT": "WAT", "MST": "MST", "CDT": "CDT", "NZST": "NZST", "AST": "AST", "LHST": "LHST", "AEDT": "AEDT", "CHADT": "CHADT", "IST": "IST", "PST": "PST", "HEPMX": "HEPMX", "HAT": "HAT", "HEOG": "HEOG", "EST": "EST", "ECT": "ECT", "JST": "JST", "AKDT": "AKDT", "GFT": "GFT", "TMT": "TMT", "ADT": "ADT", "HNNOMX": "HNNOMX", "HEEG": "HEEG", "UYT": "UYT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_NR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NR) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_NR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NR) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_NR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NR) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_NR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NR' and handles both Whole and Real numbers based on 'v' - func (en *en_NR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NR' -@@ -278,56 +195,7 @@ func (en *en_NR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_NR' -@@ -336,84 +204,33 @@ func (en *en_NR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_NR' -+func (en *en_NR) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_NR' --func (en *en_NR) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_NR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_NR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_NR) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_NU/en_NU.go b/en_NU/en_NU.go -index fa0e48b..b2a737f 100644 ---- a/en_NU/en_NU.go -+++ b/en_NU/en_NU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_NU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_NU' locale - func New() locales.Translator { - return &en_NU{ -- locale: "en_NU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNEG": "East Greenland Standard Time", "HNPMX": "Mexican Pacific Standard Time", "SRT": "Suriname Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "ACWST": "Australian Central Western Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HNT": "Newfoundland Standard Time", "ART": "Argentina Standard Time", "NZST": "New Zealand Standard Time", "WAST": "West Africa Summer Time", "EDT": "Eastern Daylight Time", "BT": "Bhutan Time", "IST": "India Standard Time", "ACST": "Australian Central Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "WITA": "Central Indonesia Time", "NZDT": "New Zealand Daylight Time", "WAT": "West Africa Standard Time", "ECT": "Ecuador Time", "GMT": "Greenwich Mean Time", "HENOMX": "Northwest Mexico Daylight Time", "AEST": "Australian Eastern Standard Time", "CHAST": "Chatham Standard Time", "WARST": "Western Argentina Summer Time", "AKDT": "Alaska Daylight Time", "AST": "Atlantic Standard Time", "EAT": "East Africa Time", "GYT": "Guyana Time", "MEZ": "Central European Standard Time", "EST": "Eastern Standard Time", "HKST": "Hong Kong Summer Time", "MESZ": "Central European Summer Time", "OEZ": "Eastern European Standard Time", "CAT": "Central Africa Time", "HNNOMX": "Northwest Mexico Standard Time", "MYT": "Malaysia Time", "HAT": "Newfoundland Daylight Time", "PDT": "Pacific Daylight Time", "CHADT": "Chatham Daylight Time", "COT": "Colombia Standard Time", "SGT": "Singapore Standard Time", "CDT": "Central Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHDT": "Lord Howe Daylight Time", "CST": "Central Standard Time", "ADT": "Atlantic Daylight Time", "WEZ": "Western European Standard Time", "TMST": "Turkmenistan Summer Time", "AKST": "Alaska Standard Time", "AWST": "Australian Western Standard Time", "TMT": "Turkmenistan Standard Time", "CLT": "Chile Standard Time", "HEEG": "East Greenland Summer Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "UYST": "Uruguay Summer Time", "WIB": "Western Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "SAST": "South Africa Standard Time", "∅∅∅": "Peru Summer Time", "COST": "Colombia Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "CLST": "Chile Summer Time", "AWDT": "Australian Western Daylight Time", "ChST": "Chamorro Standard Time", "BOT": "Bolivia Time", "HEOG": "West Greenland Summer Time", "WESZ": "Western European Summer Time", "HKT": "Hong Kong Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "JST": "Japan Standard Time", "GFT": "French Guiana Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "HNCU": "Cuba Standard Time", "WIT": "Eastern Indonesia Time", "HECU": "Cuba Daylight Time", "UYT": "Uruguay Standard Time", "PST": "Pacific Standard Time", "WART": "Western Argentina Standard Time", "VET": "Venezuela Time", "ARST": "Argentina Summer Time"}, -+ locale: "en_NU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "SGT": "SGT", "COST": "COST", "WIB": "WIB", "ChST": "ChST", "ART": "ART", "MEZ": "MEZ", "WART": "WART", "CHADT": "CHADT", "HEEG": "HEEG", "WAT": "WAT", "HKST": "HKST", "CLT": "CLT", "HNEG": "HNEG", "GYT": "GYT", "EDT": "EDT", "NZST": "NZST", "ECT": "ECT", "SRT": "SRT", "ACDT": "ACDT", "LHST": "LHST", "HNOG": "HNOG", "MESZ": "MESZ", "WIT": "WIT", "HKT": "HKT", "CLST": "CLST", "AWDT": "AWDT", "AKST": "AKST", "OESZ": "OESZ", "COT": "COT", "TMT": "TMT", "TMST": "TMST", "BOT": "BOT", "EAT": "EAT", "CHAST": "CHAST", "ACWDT": "ACWDT", "WEZ": "WEZ", "AKDT": "AKDT", "HEOG": "HEOG", "AWST": "AWST", "∅∅∅": "∅∅∅", "BT": "BT", "HNPMX": "HNPMX", "OEZ": "OEZ", "CDT": "CDT", "NZDT": "NZDT", "AST": "AST", "HEPM": "HEPM", "ARST": "ARST", "IST": "IST", "PST": "PST", "PDT": "PDT", "ACWST": "ACWST", "ADT": "ADT", "UYT": "UYT", "CST": "CST", "MDT": "MDT", "JST": "JST", "VET": "VET", "GFT": "GFT", "HAT": "HAT", "SAST": "SAST", "HADT": "HADT", "MYT": "MYT", "HNCU": "HNCU", "HNT": "HNT", "WARST": "WARST", "WESZ": "WESZ", "HNPM": "HNPM", "AEST": "AEST", "CAT": "CAT", "ACST": "ACST", "HENOMX": "HENOMX", "JDT": "JDT", "AEDT": "AEDT", "HEPMX": "HEPMX", "WITA": "WITA", "MST": "MST", "HAST": "HAST", "HNNOMX": "HNNOMX", "HECU": "HECU", "WAST": "WAST", "EST": "EST", "GMT": "GMT", "LHDT": "LHDT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_NU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NU) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_NU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NU) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_NU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NU) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_NU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NU' and handles both Whole and Real numbers based on 'v' - func (en *en_NU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NU' -@@ -278,56 +195,7 @@ func (en *en_NU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_NU' -@@ -336,84 +204,33 @@ func (en *en_NU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_NU' -+func (en *en_NU) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_NU' --func (en *en_NU) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_NU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_NU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_NU) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_NZ/en_NZ.go b/en_NZ/en_NZ.go -index 96b604d..fe8de86 100644 ---- a/en_NZ/en_NZ.go -+++ b/en_NZ/en_NZ.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_NZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_NZ' locale - func New() locales.Translator { - return &en_NZ{ -- locale: "en_NZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AST": "Atlantic Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CHADT": "Chatham Daylight Time", "CLT": "Chile Standard Time", "COT": "Colombia Standard Time", "GYT": "Guyana Time", "HNT": "Newfoundland Standard Time", "MEZ": "Central European Standard Time", "EAT": "East Africa Time", "AKDT": "Alaska Daylight Time", "ARST": "Argentina Summer Time", "HNOG": "West Greenland Standard Time", "HEOG": "West Greenland Summer Time", "WITA": "Central Indonesia Time", "CLST": "Chile Summer Time", "ECT": "Ecuador Time", "HEPMX": "Mexican Pacific Daylight Time", "EST": "Eastern Standard Time", "UYT": "Uruguay Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "WESZ": "Western European Summer Time", "ACWST": "Australian Central Western Standard Time", "WART": "Western Argentina Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HNCU": "Cuba Standard Time", "NZDT": "New Zealand Daylight Time", "OEZ": "Eastern European Standard Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "CAT": "Central Africa Time", "WARST": "Western Argentina Summer Time", "GMT": "Greenwich Mean Time", "ART": "Argentina Standard Time", "JST": "Japan Standard Time", "TMST": "Turkmenistan Summer Time", "AEST": "Australian Eastern Standard Time", "HNEG": "East Greenland Standard Time", "COST": "Colombia Summer Time", "MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "WIT": "Eastern Indonesia Time", "PST": "Pacific Standard Time", "NZST": "New Zealand Standard Time", "IST": "India Standard Time", "ChST": "Chamorro Standard Time", "WAT": "West Africa Standard Time", "SRT": "Suriname Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "HECU": "Cuba Daylight Time", "AWST": "Australian Western Standard Time", "AEDT": "Australian Eastern Daylight Time", "CHAST": "Chatham Standard Time", "WAST": "West Africa Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "JDT": "Japan Daylight Time", "HKST": "Hong Kong Summer Time", "WIB": "Western Indonesia Time", "WEZ": "Western European Standard Time", "SGT": "Singapore Standard Time", "MYT": "Malaysia Time", "ADT": "Atlantic Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SAST": "South Africa Standard Time", "CDT": "Central Daylight Time", "MDT": "Macau Summer Time", "VET": "Venezuela Time", "∅∅∅": "Amazon Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "CST": "Central Standard Time", "PDT": "Pacific Daylight Time", "LHDT": "Lord Howe Daylight Time", "ACST": "Australian Central Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EDT": "Eastern Daylight Time", "UYST": "Uruguay Summer Time", "LHST": "Lord Howe Standard Time", "MESZ": "Central European Summer Time", "AWDT": "Australian Western Daylight Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time"}, -+ locale: "en_NZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "CLST": "CLST", "AWST": "AWST", "NZST": "NZST", "AST": "AST", "MYT": "MYT", "WART": "WART", "WIB": "WIB", "CST": "CST", "ADT": "ADT", "OESZ": "OESZ", "TMST": "TMST", "UYST": "UYST", "HENOMX": "HENOMX", "AEST": "AEST", "ARST": "ARST", "PST": "PST", "SGT": "SGT", "SAST": "SAST", "MEZ": "MEZ", "AKDT": "AKDT", "COST": "COST", "AEDT": "AEDT", "ACST": "ACST", "HNEG": "HNEG", "AWDT": "AWDT", "CHAST": "CHAST", "ChST": "ChST", "HAST": "HAST", "HADT": "HADT", "JDT": "JDT", "CHADT": "CHADT", "WAST": "WAST", "HNT": "HNT", "WIT": "WIT", "MDT": "MDT", "HEOG": "HEOG", "BT": "BT", "HNCU": "HNCU", "HECU": "HECU", "AKST": "AKST", "HAT": "HAT", "HKST": "HKST", "CLT": "CLT", "JST": "JST", "NZDT": "NZDT", "LHST": "LHST", "HNPMX": "HNPMX", "WEZ": "WEZ", "EDT": "EDT", "HNNOMX": "HNNOMX", "MST": "MST", "SRT": "SRT", "HEPM": "HEPM", "TMT": "TMT", "GMT": "GMT", "EAT": "EAT", "MESZ": "MESZ", "HEEG": "HEEG", "UYT": "UYT", "GYT": "GYT", "COT": "COT", "HKT": "HKT", "BOT": "BOT", "ECT": "ECT", "WITA": "WITA", "∅∅∅": "∅∅∅", "PDT": "PDT", "ACWDT": "ACWDT", "WAT": "WAT", "HNOG": "HNOG", "EST": "EST", "ART": "ART", "HNPM": "HNPM", "IST": "IST", "ACWST": "ACWST", "VET": "VET", "OEZ": "OEZ", "GFT": "GFT", "WARST": "WARST", "ACDT": "ACDT", "WESZ": "WESZ", "CAT": "CAT", "CDT": "CDT", "LHDT": "LHDT"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_NZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_NZ) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_NZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_NZ) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_NZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_NZ) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_NZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_NZ' and handles both Whole and Real numbers based on 'v' - func (en *en_NZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_NZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_NZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_NZ' -@@ -278,56 +197,7 @@ func (en *en_NZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_NZ' -@@ -336,68 +206,7 @@ func (en *en_NZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_NZ' -@@ -455,17 +264,6 @@ func (en *en_NZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -474,19 +272,6 @@ func (en *en_NZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -495,13 +280,11 @@ func (en *en_NZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -509,13 +292,6 @@ func (en *en_NZ) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -525,13 +301,11 @@ func (en *en_NZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -546,13 +320,6 @@ func (en *en_NZ) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -562,13 +329,11 @@ func (en *en_NZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -585,14 +350,6 @@ func (en *en_NZ) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -604,13 +361,11 @@ func (en *en_NZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -627,14 +382,6 @@ func (en *en_NZ) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_PG/en_PG.go b/en_PG/en_PG.go -index 87f39d4..fab731b 100644 ---- a/en_PG/en_PG.go -+++ b/en_PG/en_PG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_PG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_PG' locale - func New() locales.Translator { - return &en_PG{ -- locale: "en_PG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "K", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GFT": "French Guiana Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "WEZ": "Western European Standard Time", "AWDT": "Australian Western Daylight Time", "CHAST": "Chatham Standard Time", "CHADT": "Chatham Daylight Time", "NZST": "New Zealand Standard Time", "VET": "Venezuela Time", "HNOG": "West Greenland Standard Time", "MESZ": "Central European Summer Time", "ARST": "Argentina Summer Time", "JST": "Japan Standard Time", "ACST": "Australian Central Standard Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "AEDT": "Australian Eastern Daylight Time", "HKT": "Hong Kong Standard Time", "LHDT": "Lord Howe Daylight Time", "CAT": "Central Africa Time", "ADT": "Atlantic Daylight Time", "UYST": "Uruguay Summer Time", "ACWDT": "Australian Central Western Daylight Time", "WITA": "Central Indonesia Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "ECT": "Ecuador Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HECU": "Cuba Daylight Time", "CST": "Central Standard Time", "AST": "Atlantic Standard Time", "LHST": "Lord Howe Standard Time", "SRT": "Suriname Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "MEZ": "Central European Standard Time", "JDT": "Japan Daylight Time", "ACDT": "Australian Central Daylight Time", "COT": "Colombia Standard Time", "UYT": "Uruguay Standard Time", "ACWST": "Australian Central Western Standard Time", "CLT": "Chile Standard Time", "TMT": "Turkmenistan Standard Time", "MDT": "Macau Summer Time", "PST": "Pacific Standard Time", "TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "MST": "Macau Standard Time", "CDT": "Central Daylight Time", "GYT": "Guyana Time", "AKST": "Alaska Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "BOT": "Bolivia Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "WIT": "Eastern Indonesia Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLST": "Chile Summer Time", "HNPMX": "Mexican Pacific Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "WESZ": "Western European Summer Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "OESZ": "Eastern European Summer Time", "GMT": "Greenwich Mean Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "HKST": "Hong Kong Summer Time", "OEZ": "Eastern European Standard Time", "∅∅∅": "Peru Summer Time", "EST": "Eastern Standard Time", "MYT": "Malaysia Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "HEEG": "East Greenland Summer Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "HEOG": "West Greenland Summer Time", "PDT": "Pacific Daylight Time", "HNEG": "East Greenland Standard Time"}, -+ locale: "en_PG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "K", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ARST": "ARST", "HNNOMX": "HNNOMX", "JST": "JST", "HEOG": "HEOG", "EDT": "EDT", "CLT": "CLT", "CLST": "CLST", "CDT": "CDT", "NZST": "NZST", "CHADT": "CHADT", "HNCU": "HNCU", "GMT": "GMT", "HEPM": "HEPM", "CHAST": "CHAST", "WAT": "WAT", "HKST": "HKST", "EAT": "EAT", "IST": "IST", "WAST": "WAST", "CST": "CST", "ADT": "ADT", "MEZ": "MEZ", "HEEG": "HEEG", "WESZ": "WESZ", "HNOG": "HNOG", "MST": "MST", "ART": "ART", "ACDT": "ACDT", "LHDT": "LHDT", "MYT": "MYT", "HNT": "HNT", "WART": "WART", "BOT": "BOT", "SRT": "SRT", "AEST": "AEST", "UYT": "UYT", "PST": "PST", "OEZ": "OEZ", "HAT": "HAT", "SAST": "SAST", "COST": "COST", "WIB": "WIB", "AWST": "AWST", "HAST": "HAST", "ACST": "ACST", "LHST": "LHST", "PDT": "PDT", "TMST": "TMST", "MDT": "MDT", "UYST": "UYST", "BT": "BT", "∅∅∅": "∅∅∅", "WITA": "WITA", "AST": "AST", "HADT": "HADT", "MESZ": "MESZ", "HNPM": "HNPM", "JDT": "JDT", "ACWDT": "ACWDT", "AKST": "AKST", "HENOMX": "HENOMX", "ACWST": "ACWST", "HEPMX": "HEPMX", "COT": "COT", "GFT": "GFT", "TMT": "TMT", "ECT": "ECT", "NZDT": "NZDT", "WEZ": "WEZ", "VET": "VET", "WIT": "WIT", "EST": "EST", "HKT": "HKT", "HNEG": "HNEG", "AWDT": "AWDT", "AEDT": "AEDT", "SGT": "SGT", "WARST": "WARST", "CAT": "CAT", "ChST": "ChST", "HECU": "HECU", "HNPMX": "HNPMX", "AKDT": "AKDT", "OESZ": "OESZ", "GYT": "GYT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_PG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_PG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_PG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_PG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_PG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_PG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_PG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_PG' and handles both Whole and Real numbers based on 'v' - func (en *en_PG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_PG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_PG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_PG' -@@ -278,56 +195,7 @@ func (en *en_PG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_PG' -@@ -336,84 +204,33 @@ func (en *en_PG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_PG' -+func (en *en_PG) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_PG' --func (en *en_PG) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_PG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_PG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_PG) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_PG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_PG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_PG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_PG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_PH/en_PH.go b/en_PH/en_PH.go -index c2ac99d..7e0a7cd 100644 ---- a/en_PH/en_PH.go -+++ b/en_PH/en_PH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_PH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_PH' locale - func New() locales.Translator { - return &en_PH{ -- locale: "en_PH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "₱", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CHADT": "Chatham Daylight Time", "WARST": "Western Argentina Summer Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "HKT": "Hong Kong Standard Time", "NZDT": "New Zealand Daylight Time", "HEEG": "East Greenland Summer Time", "ACST": "Australian Central Standard Time", "ADT": "Atlantic Daylight Time", "PDT": "Pacific Daylight Time", "HAT": "Newfoundland Daylight Time", "AEDT": "Australian Eastern Daylight Time", "GYT": "Guyana Time", "HEOG": "West Greenland Summer Time", "HKST": "Hong Kong Summer Time", "MEZ": "Central European Standard Time", "MESZ": "Central European Summer Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "CLT": "Chile Standard Time", "UYST": "Uruguay Summer Time", "LHDT": "Lord Howe Daylight Time", "JDT": "Japan Daylight Time", "OEZ": "Eastern European Standard Time", "AKDT": "Alaska Daylight Time", "CST": "Central Standard Time", "SRT": "Suriname Time", "WESZ": "Western European Summer Time", "AEST": "Australian Eastern Standard Time", "CDT": "Central Daylight Time", "ACDT": "Australian Central Daylight Time", "WART": "Western Argentina Standard Time", "ART": "Argentina Standard Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "WAST": "West Africa Summer Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "MYT": "Malaysia Time", "AST": "Atlantic Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "WIT": "Eastern Indonesia Time", "HNEG": "East Greenland Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "WEZ": "Western European Standard Time", "ACWDT": "Australian Central Western Daylight Time", "IST": "India Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "∅∅∅": "Amazon Summer Time", "JST": "Japan Standard Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "MDT": "Macau Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "SAST": "South Africa Standard Time", "UYT": "Uruguay Standard Time", "HNOG": "West Greenland Standard Time", "ChST": "Chamorro Standard Time", "TMST": "Turkmenistan Summer Time", "HECU": "Cuba Daylight Time", "EDT": "Eastern Daylight Time", "AKST": "Alaska Standard Time", "WIB": "Western Indonesia Time", "PST": "Pacific Standard Time", "HNT": "Newfoundland Standard Time", "TMT": "Turkmenistan Standard Time", "WAT": "West Africa Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "BT": "Bhutan Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "CLST": "Chile Summer Time", "COST": "Colombia Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "ACWST": "Australian Central Western Standard Time", "WITA": "Central Indonesia Time", "NZST": "New Zealand Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CHAST": "Chatham Standard Time"}, -+ locale: "en_PH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "₱", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "WEZ": "WEZ", "GYT": "GYT", "HNEG": "HNEG", "OEZ": "OEZ", "WIT": "WIT", "BT": "BT", "PST": "PST", "WAST": "WAST", "WART": "WART", "HKT": "HKT", "ART": "ART", "AST": "AST", "HECU": "HECU", "HEPMX": "HEPMX", "EST": "EST", "EDT": "EDT", "MDT": "MDT", "ACWDT": "ACWDT", "UYT": "UYT", "HNOG": "HNOG", "WITA": "WITA", "CDT": "CDT", "HNPM": "HNPM", "AWST": "AWST", "SGT": "SGT", "AKDT": "AKDT", "HKST": "HKST", "GMT": "GMT", "HAST": "HAST", "HEEG": "HEEG", "HENOMX": "HENOMX", "JDT": "JDT", "UYST": "UYST", "AKST": "AKST", "CHADT": "CHADT", "WESZ": "WESZ", "HNT": "HNT", "COT": "COT", "CLST": "CLST", "ChST": "ChST", "AEST": "AEST", "PDT": "PDT", "NZDT": "NZDT", "MST": "MST", "COST": "COST", "HEOG": "HEOG", "ECT": "ECT", "ACST": "ACST", "MYT": "MYT", "JST": "JST", "∅∅∅": "∅∅∅", "TMT": "TMT", "WARST": "WARST", "TMST": "TMST", "CAT": "CAT", "CLT": "CLT", "WIB": "WIB", "ARST": "ARST", "VET": "VET", "HAT": "HAT", "LHST": "LHST", "WAT": "WAT", "SAST": "SAST", "NZST": "NZST", "CST": "CST", "AWDT": "AWDT", "LHDT": "LHDT", "IST": "IST", "HNCU": "HNCU", "MESZ": "MESZ", "ACDT": "ACDT", "HADT": "HADT", "MEZ": "MEZ", "GFT": "GFT", "SRT": "SRT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "OESZ": "OESZ", "ADT": "ADT", "BOT": "BOT", "EAT": "EAT", "HEPM": "HEPM", "CHAST": "CHAST", "HNPMX": "HNPMX"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_PH) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_PH) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_PH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_PH) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_PH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_PH) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_PH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_PH) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_PH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_PH' and handles both Whole and Real numbers based on 'v' - func (en *en_PH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_PH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_PH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_PH' -@@ -278,56 +195,7 @@ func (en *en_PH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_PH' -@@ -336,84 +204,33 @@ func (en *en_PH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_PH' -+func (en *en_PH) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_PH' --func (en *en_PH) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_PH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_PH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_PH) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_PH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_PH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_PH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_PH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_PK/en_PK.go b/en_PK/en_PK.go -index 7b9c3d7..4907463 100644 ---- a/en_PK/en_PK.go -+++ b/en_PK/en_PK.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_PK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_PK' locale - func New() locales.Translator { - return &en_PK{ -- locale: "en_PK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "Rs", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNT": "Newfoundland Standard Time", "ACST": "Australian Central Standard Time", "WAT": "West Africa Standard Time", "COST": "Colombia Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "PDT": "Pacific Daylight Time", "AKST": "Alaska Standard Time", "WIB": "Western Indonesia Time", "MEZ": "Central European Standard Time", "BT": "Bhutan Time", "HNEG": "East Greenland Standard Time", "HEEG": "East Greenland Summer Time", "WARST": "Western Argentina Summer Time", "WITA": "Central Indonesia Time", "CHADT": "Chatham Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "HEOG": "West Greenland Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "HECU": "Cuba Daylight Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "JDT": "Japan Daylight Time", "ChST": "Chamorro Standard Time", "CAT": "Central Africa Time", "AEDT": "Australian Eastern Daylight Time", "JST": "Japan Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "WIT": "Eastern Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "HKT": "Hong Kong Standard Time", "NZDT": "New Zealand Daylight Time", "COT": "Colombia Standard Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "CHAST": "Chatham Standard Time", "OEZ": "Eastern European Standard Time", "SRT": "Suriname Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CLST": "Chile Summer Time", "WAST": "West Africa Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "GMT": "Greenwich Mean Time", "AST": "Atlantic Standard Time", "EAT": "East Africa Time", "CST": "Central Standard Time", "WESZ": "Western European Summer Time", "MESZ": "Central European Summer Time", "AEST": "Australian Eastern Standard Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CDT": "Central Daylight Time", "WART": "Western Argentina Standard Time", "PST": "Pacific Standard Time", "CLT": "Chile Standard Time", "WEZ": "Western European Standard Time", "ART": "Argentina Standard Time", "AWST": "Australian Western Standard Time", "IST": "India Standard Time", "BOT": "Bolivia Time", "HNCU": "Cuba Standard Time", "GYT": "Guyana Time", "ADT": "Atlantic Daylight Time", "OESZ": "Eastern European Summer Time", "VET": "Venezuela Time", "AWDT": "Australian Western Daylight Time", "TMST": "Turkmenistan Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "EDT": "Eastern Daylight Time", "MYT": "Malaysia Time", "HKST": "Hong Kong Summer Time", "GFT": "French Guiana Time", "ECT": "Ecuador Time", "ACWST": "Australian Central Western Standard Time", "HAT": "Newfoundland Daylight Time", "NZST": "New Zealand Standard Time", "SAST": "South Africa Standard Time", "UYT": "Uruguay Standard Time", "UYST": "Uruguay Summer Time", "HNOG": "West Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "∅∅∅": "Azores Summer Time", "ARST": "Argentina Summer Time", "TMT": "Turkmenistan Standard Time"}, -+ locale: "en_PK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "Rs", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"JST": "JST", "ACWDT": "ACWDT", "ACDT": "ACDT", "HENOMX": "HENOMX", "AWST": "AWST", "LHDT": "LHDT", "VET": "VET", "AKST": "AKST", "AKDT": "AKDT", "GYT": "GYT", "HNEG": "HNEG", "NZDT": "NZDT", "AEDT": "AEDT", "WESZ": "WESZ", "HECU": "HECU", "WAST": "WAST", "HEOG": "HEOG", "CLT": "CLT", "MDT": "MDT", "BOT": "BOT", "AWDT": "AWDT", "MESZ": "MESZ", "MYT": "MYT", "AEST": "AEST", "EST": "EST", "ADT": "ADT", "GMT": "GMT", "HADT": "HADT", "COT": "COT", "MST": "MST", "ART": "ART", "HNNOMX": "HNNOMX", "NZST": "NZST", "ACWST": "ACWST", "UYST": "UYST", "SGT": "SGT", "HNPMX": "HNPMX", "HAT": "HAT", "WARST": "WARST", "CAT": "CAT", "LHST": "LHST", "ARST": "ARST", "JDT": "JDT", "PST": "PST", "HNCU": "HNCU", "WAT": "WAT", "OEZ": "OEZ", "TMT": "TMT", "HAST": "HAST", "MEZ": "MEZ", "CHAST": "CHAST", "OESZ": "OESZ", "HNOG": "HNOG", "WITA": "WITA", "AST": "AST", "EAT": "EAT", "WART": "WART", "CLST": "CLST", "WIB": "WIB", "GFT": "GFT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "HKST": "HKST", "CDT": "CDT", "SRT": "SRT", "HEEG": "HEEG", "IST": "IST", "PDT": "PDT", "UYT": "UYT", "SAST": "SAST", "HKT": "HKT", "ChST": "ChST", "HEPM": "HEPM", "HNPM": "HNPM", "BT": "BT", "WIT": "WIT", "CST": "CST", "ACST": "ACST", "WEZ": "WEZ", "COST": "COST", "EDT": "EDT", "TMST": "TMST", "ECT": "ECT", "HNT": "HNT"}, - } - } -  -@@ -112,8 +91,8 @@ func (en *en_PK) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_PK) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +117,7 @@ func (en *en_PK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_PK) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_PK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_PK) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_PK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_PK) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_PK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_PK' and handles both Whole and Real numbers based on 'v' - func (en *en_PK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_PK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_PK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_PK' -@@ -278,56 +197,7 @@ func (en *en_PK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_PK' -@@ -336,68 +206,7 @@ func (en *en_PK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_PK' -@@ -405,17 +214,6 @@ func (en *en_PK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -447,17 +245,6 @@ func (en *en_PK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,19 +253,6 @@ func (en *en_PK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -487,13 +261,11 @@ func (en *en_PK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -501,13 +273,6 @@ func (en *en_PK) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -517,13 +282,11 @@ func (en *en_PK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -538,13 +301,6 @@ func (en *en_PK) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -554,13 +310,11 @@ func (en *en_PK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -577,14 +331,6 @@ func (en *en_PK) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -596,13 +342,11 @@ func (en *en_PK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -619,14 +363,6 @@ func (en *en_PK) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_PN/en_PN.go b/en_PN/en_PN.go -index 77645e6..f4d2e15 100644 ---- a/en_PN/en_PN.go -+++ b/en_PN/en_PN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_PN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_PN' locale - func New() locales.Translator { - return &en_PN{ -- locale: "en_PN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"MST": "Macau Standard Time", "UYT": "Uruguay Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HEOG": "West Greenland Summer Time", "∅∅∅": "Amazon Summer Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "ACDT": "Australian Central Daylight Time", "ACWST": "Australian Central Western Standard Time", "CHADT": "Chatham Daylight Time", "ECT": "Ecuador Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "PST": "Pacific Standard Time", "HNT": "Newfoundland Standard Time", "HNEG": "East Greenland Standard Time", "WAT": "West Africa Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HECU": "Cuba Daylight Time", "COT": "Colombia Standard Time", "AST": "Atlantic Standard Time", "SRT": "Suriname Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHAST": "Chatham Standard Time", "ACST": "Australian Central Standard Time", "EAT": "East Africa Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "BT": "Bhutan Time", "WITA": "Central Indonesia Time", "CAT": "Central Africa Time", "HNCU": "Cuba Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "TMST": "Turkmenistan Summer Time", "COST": "Colombia Summer Time", "WESZ": "Western European Summer Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "WEZ": "Western European Standard Time", "MESZ": "Central European Summer Time", "LHDT": "Lord Howe Daylight Time", "CST": "Central Standard Time", "AEST": "Australian Eastern Standard Time", "CDT": "Central Daylight Time", "HKST": "Hong Kong Summer Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "GMT": "Greenwich Mean Time", "HEPMX": "Mexican Pacific Daylight Time", "EDT": "Eastern Daylight Time", "AWST": "Australian Western Standard Time", "NZDT": "New Zealand Daylight Time", "CLT": "Chile Standard Time", "JDT": "Japan Daylight Time", "HAT": "Newfoundland Daylight Time", "ChST": "Chamorro Standard Time", "SGT": "Singapore Standard Time", "ADT": "Atlantic Daylight Time", "WIT": "Eastern Indonesia Time", "WARST": "Western Argentina Summer Time", "HNOG": "West Greenland Standard Time", "ACWDT": "Australian Central Western Daylight Time", "ART": "Argentina Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "ARST": "Argentina Summer Time", "MEZ": "Central European Standard Time", "IST": "India Standard Time", "CLST": "Chile Summer Time", "OEZ": "Eastern European Standard Time", "VET": "Venezuela Time", "PDT": "Pacific Daylight Time", "AEDT": "Australian Eastern Daylight Time", "HKT": "Hong Kong Standard Time", "NZST": "New Zealand Standard Time", "WAST": "West Africa Summer Time", "EST": "Eastern Standard Time", "AKST": "Alaska Standard Time"}, -+ locale: "en_PN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"IST": "IST", "HECU": "HECU", "ADT": "ADT", "HADT": "HADT", "WAT": "WAT", "AST": "AST", "ACWST": "ACWST", "CHADT": "CHADT", "PST": "PST", "HNOG": "HNOG", "MESZ": "MESZ", "PDT": "PDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "HNPMX": "HNPMX", "TMST": "TMST", "HAST": "HAST", "ECT": "ECT", "WIB": "WIB", "HNPM": "HNPM", "WEZ": "WEZ", "SGT": "SGT", "AKDT": "AKDT", "SAST": "SAST", "HKST": "HKST", "WITA": "WITA", "MEZ": "MEZ", "CHAST": "CHAST", "UYST": "UYST", "WARST": "WARST", "GYT": "GYT", "HEOG": "HEOG", "HEPMX": "HEPMX", "AKST": "AKST", "OEZ": "OEZ", "COT": "COT", "NZST": "NZST", "ChST": "ChST", "LHST": "LHST", "HNCU": "HNCU", "CST": "CST", "MST": "MST", "MDT": "MDT", "ART": "ART", "ACST": "ACST", "WESZ": "WESZ", "OESZ": "OESZ", "GFT": "GFT", "AWST": "AWST", "UYT": "UYT", "EST": "EST", "BOT": "BOT", "EAT": "EAT", "ACDT": "ACDT", "LHDT": "LHDT", "VET": "VET", "HKT": "HKT", "NZDT": "NZDT", "WIT": "WIT", "∅∅∅": "∅∅∅", "HAT": "HAT", "WART": "WART", "GMT": "GMT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "MYT": "MYT", "BT": "BT", "WAST": "WAST", "HNT": "HNT", "CLT": "CLT", "HEEG": "HEEG", "CAT": "CAT", "CLST": "CLST", "CDT": "CDT", "HNEG": "HNEG", "AWDT": "AWDT", "HEPM": "HEPM", "EDT": "EDT", "TMT": "TMT", "JST": "JST", "JDT": "JDT", "SRT": "SRT", "AEST": "AEST", "COST": "COST", "ARST": "ARST"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_PN) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_PN) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_PN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_PN) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_PN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_PN) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_PN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_PN) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_PN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_PN' and handles both Whole and Real numbers based on 'v' - func (en *en_PN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_PN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_PN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_PN' -@@ -278,56 +195,7 @@ func (en *en_PN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_PN' -@@ -336,84 +204,33 @@ func (en *en_PN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_PN' -+func (en *en_PN) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_PN' --func (en *en_PN) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_PN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_PN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_PN) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_PR/en_PR.go b/en_PR/en_PR.go -index f871dc7..671dca2 100644 ---- a/en_PR/en_PR.go -+++ b/en_PR/en_PR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_PR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_PR' locale - func New() locales.Translator { - return &en_PR{ -- locale: "en_PR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"COT": "Colombia Standard Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "EDT": "Eastern Daylight Time", "HKST": "Hong Kong Summer Time", "WITA": "Central Indonesia Time", "CLST": "Chile Summer Time", "ChST": "Chamorro Standard Time", "HNOG": "West Greenland Standard Time", "TMST": "Turkmenistan Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "SRT": "Suriname Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "WEZ": "Western European Standard Time", "HNEG": "East Greenland Standard Time", "BOT": "Bolivia Time", "EAT": "East Africa Time", "SGT": "Singapore Standard Time", "NZST": "New Zealand Standard Time", "WAT": "West Africa Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "ACWST": "Australian Central Western Standard Time", "HKT": "Hong Kong Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HEEG": "East Greenland Summer Time", "WAST": "West Africa Summer Time", "ACWDT": "Australian Central Western Daylight Time", "AEST": "Australian Eastern Standard Time", "AEDT": "Australian Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "ARST": "Argentina Summer Time", "HEOG": "West Greenland Summer Time", "PST": "Pacific Standard Time", "IST": "India Standard Time", "WART": "Western Argentina Standard Time", "MYT": "Malaysia Time", "VET": "Venezuela Time", "AST": "Atlantic Standard Time", "PDT": "Pacific Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "ECT": "Ecuador Time", "AWST": "Australian Western Standard Time", "∅∅∅": "Amazon Summer Time", "GMT": "Greenwich Mean Time", "EST": "Eastern Standard Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "GYT": "Guyana Time", "AWDT": "Australian Western Daylight Time", "CHADT": "Chatham Daylight Time", "LHDT": "Lord Howe Daylight Time", "CLT": "Chile Standard Time", "UYST": "Uruguay Summer Time", "BT": "Bhutan Time", "SAST": "South Africa Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "MST": "Macau Standard Time", "ART": "Argentina Standard Time", "WARST": "Western Argentina Summer Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "NZDT": "New Zealand Daylight Time", "ACST": "Australian Central Standard Time", "OEZ": "Eastern European Standard Time", "OESZ": "Eastern European Summer Time", "UYT": "Uruguay Standard Time", "MEZ": "Central European Standard Time", "GFT": "French Guiana Time", "AKST": "Alaska Standard Time", "CDT": "Central Daylight Time", "JDT": "Japan Daylight Time", "TMT": "Turkmenistan Standard Time", "ACDT": "Australian Central Daylight Time", "CAT": "Central Africa Time", "CHAST": "Chatham Standard Time", "MESZ": "Central European Summer Time", "LHST": "Lord Howe Standard Time", "JST": "Japan Standard Time", "MDT": "Macau Summer Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time"}, -+ locale: "en_PR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYT": "UYT", "ACWST": "ACWST", "WEZ": "WEZ", "WESZ": "WESZ", "OESZ": "OESZ", "GFT": "GFT", "HNT": "HNT", "ChST": "ChST", "MYT": "MYT", "PST": "PST", "BT": "BT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "COT": "COT", "HAST": "HAST", "MESZ": "MESZ", "HEEG": "HEEG", "HNPM": "HNPM", "TMT": "TMT", "EAT": "EAT", "LHST": "LHST", "CHAST": "CHAST", "WIB": "WIB", "NZST": "NZST", "AST": "AST", "HADT": "HADT", "JST": "JST", "AEDT": "AEDT", "MST": "MST", "ARST": "ARST", "AWDT": "AWDT", "HEPM": "HEPM", "JDT": "JDT", "CHADT": "CHADT", "AKST": "AKST", "HAT": "HAT", "ART": "ART", "HNOG": "HNOG", "TMST": "TMST", "COST": "COST", "ADT": "ADT", "BOT": "BOT", "ACST": "ACST", "LHDT": "LHDT", "ACWDT": "ACWDT", "VET": "VET", "HKT": "HKT", "MDT": "MDT", "CAT": "CAT", "UYST": "UYST", "EST": "EST", "WITA": "WITA", "GMT": "GMT", "∅∅∅": "∅∅∅", "SGT": "SGT", "WAST": "WAST", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "AWST": "AWST", "IST": "IST", "WIT": "WIT", "EDT": "EDT", "HKST": "HKST", "SRT": "SRT", "HECU": "HECU", "OEZ": "OEZ", "ACDT": "ACDT", "WAT": "WAT", "WART": "WART", "SAST": "SAST", "CLT": "CLT", "NZDT": "NZDT", "HNEG": "HNEG", "PDT": "PDT", "AEST": "AEST", "WARST": "WARST", "CLST": "CLST", "CDT": "CDT", "HENOMX": "HENOMX", "AKDT": "AKDT", "ECT": "ECT", "HNCU": "HNCU", "GYT": "GYT", "HEOG": "HEOG", "CST": "CST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_PR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_PR) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_PR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_PR) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_PR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_PR) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_PR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_PR' and handles both Whole and Real numbers based on 'v' - func (en *en_PR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_PR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_PR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_PR' -@@ -278,56 +195,7 @@ func (en *en_PR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_PR' -@@ -336,68 +204,7 @@ func (en *en_PR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_PR' -@@ -405,15 +212,15 @@ func (en *en_PR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_PR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_PR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_PR) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_PR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_PR) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_PR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_PR) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_PR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_PR) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_PR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_PR) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_PW/en_PW.go b/en_PW/en_PW.go -index ef217cb..c9b5b4e 100644 ---- a/en_PW/en_PW.go -+++ b/en_PW/en_PW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_PW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_PW' locale - func New() locales.Translator { - return &en_PW{ -- locale: "en_PW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"TMST": "Turkmenistan Summer Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "AKST": "Alaska Standard Time", "HAT": "Newfoundland Daylight Time", "PDT": "Pacific Daylight Time", "GFT": "French Guiana Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "WEZ": "Western European Standard Time", "HKST": "Hong Kong Summer Time", "SAST": "South Africa Standard Time", "UYST": "Uruguay Summer Time", "SRT": "Suriname Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MESZ": "Central European Summer Time", "OESZ": "Eastern European Summer Time", "CST": "Central Standard Time", "MYT": "Malaysia Time", "UYT": "Uruguay Standard Time", "HNT": "Newfoundland Standard Time", "ART": "Argentina Standard Time", "WARST": "Western Argentina Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "HEOG": "West Greenland Summer Time", "AEST": "Australian Eastern Standard Time", "CHAST": "Chatham Standard Time", "MEZ": "Central European Standard Time", "IST": "India Standard Time", "CLST": "Chile Summer Time", "HEEG": "East Greenland Summer Time", "AST": "Atlantic Standard Time", "ACWST": "Australian Central Western Standard Time", "CHADT": "Chatham Daylight Time", "BT": "Bhutan Time", "CLT": "Chile Standard Time", "∅∅∅": "Amazon Summer Time", "WAT": "West Africa Standard Time", "MST": "Macau Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "WIT": "Eastern Indonesia Time", "ChST": "Chamorro Standard Time", "HNEG": "East Greenland Standard Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "COST": "Colombia Summer Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHDT": "Lord Howe Daylight Time", "ACST": "Australian Central Standard Time", "MDT": "Macau Summer Time", "LHST": "Lord Howe Standard Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "OEZ": "Eastern European Standard Time", "ECT": "Ecuador Time", "GMT": "Greenwich Mean Time", "HECU": "Cuba Daylight Time", "NZDT": "New Zealand Daylight Time", "HNCU": "Cuba Standard Time", "GYT": "Guyana Time", "PST": "Pacific Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AEDT": "Australian Eastern Daylight Time", "NZST": "New Zealand Standard Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "HNPMX": "Mexican Pacific Standard Time", "ADT": "Atlantic Daylight Time", "ARST": "Argentina Summer Time", "HKT": "Hong Kong Standard Time", "JST": "Japan Standard Time", "SGT": "Singapore Standard Time", "EDT": "Eastern Daylight Time", "WITA": "Central Indonesia Time", "AWDT": "Australian Western Daylight Time", "JDT": "Japan Daylight Time", "WART": "Western Argentina Standard Time", "HNOG": "West Greenland Standard Time", "AWST": "Australian Western Standard Time"}, -+ locale: "en_PW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKT": "HKT", "MDT": "MDT", "SRT": "SRT", "ACWDT": "ACWDT", "WESZ": "WESZ", "HEOG": "HEOG", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "PST": "PST", "COST": "COST", "AST": "AST", "ARST": "ARST", "ACST": "ACST", "UYT": "UYT", "UYST": "UYST", "WAT": "WAT", "WAST": "WAST", "AKDT": "AKDT", "CST": "CST", "WIB": "WIB", "ART": "ART", "ACDT": "ACDT", "LHST": "LHST", "HNPM": "HNPM", "JST": "JST", "AKST": "AKST", "OESZ": "OESZ", "GFT": "GFT", "ADT": "ADT", "HAST": "HAST", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "WIT": "WIT", "ECT": "ECT", "MYT": "MYT", "SAST": "SAST", "GYT": "GYT", "EST": "EST", "CAT": "CAT", "CLST": "CLST", "HADT": "HADT", "HENOMX": "HENOMX", "SGT": "SGT", "HEPMX": "HEPMX", "WART": "WART", "NZST": "NZST", "COT": "COT", "TMT": "TMT", "NZDT": "NZDT", "ChST": "ChST", "JDT": "JDT", "CHADT": "CHADT", "VET": "VET", "HAT": "HAT", "CLT": "CLT", "MST": "MST", "AWDT": "AWDT", "IST": "IST", "HECU": "HECU", "EDT": "EDT", "CDT": "CDT", "HNEG": "HNEG", "HEEG": "HEEG", "LHDT": "LHDT", "HEPM": "HEPM", "HNCU": "HNCU", "BT": "BT", "HNPMX": "HNPMX", "WARST": "WARST", "HKST": "HKST", "ACWST": "ACWST", "BOT": "BOT", "PDT": "PDT", "WEZ": "WEZ", "HNT": "HNT", "TMST": "TMST", "WITA": "WITA", "OEZ": "OEZ", "HNOG": "HNOG", "GMT": "GMT", "EAT": "EAT", "MEZ": "MEZ", "AWST": "AWST", "AEST": "AEST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_PW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_PW) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_PW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_PW) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_PW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_PW) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_PW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_PW' and handles both Whole and Real numbers based on 'v' - func (en *en_PW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_PW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_PW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_PW' -@@ -278,56 +195,7 @@ func (en *en_PW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_PW' -@@ -336,84 +204,33 @@ func (en *en_PW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_PW' -+func (en *en_PW) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_PW' --func (en *en_PW) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_PW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_PW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_PW) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_PW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_PW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_PW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_PW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_RW/en_RW.go b/en_RW/en_RW.go -index 8dc9746..8aeaf25 100644 ---- a/en_RW/en_RW.go -+++ b/en_RW/en_RW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_RW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_RW' locale - func New() locales.Translator { - return &en_RW{ -- locale: "en_RW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"JDT": "Japan Daylight Time", "OEZ": "Eastern European Standard Time", "ECT": "Ecuador Time", "MDT": "Macau Summer Time", "VET": "Venezuela Time", "HECU": "Cuba Daylight Time", "ACWST": "Australian Central Western Standard Time", "HNOG": "West Greenland Standard Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "ACDT": "Australian Central Daylight Time", "PST": "Pacific Standard Time", "HNT": "Newfoundland Standard Time", "ARST": "Argentina Summer Time", "WITA": "Central Indonesia Time", "UYT": "Uruguay Standard Time", "AKST": "Alaska Standard Time", "AST": "Atlantic Standard Time", "GYT": "Guyana Time", "HADT": "Hawaii-Aleutian Daylight Time", "SRT": "Suriname Time", "OESZ": "Eastern European Summer Time", "WESZ": "Western European Summer Time", "CHADT": "Chatham Daylight Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "AKDT": "Alaska Daylight Time", "HKT": "Hong Kong Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZST": "New Zealand Standard Time", "HEOG": "West Greenland Summer Time", "MESZ": "Central European Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HNCU": "Cuba Standard Time", "BT": "Bhutan Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "COT": "Colombia Standard Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "JST": "Japan Standard Time", "WAST": "West Africa Summer Time", "GMT": "Greenwich Mean Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "MST": "Macau Standard Time", "TMST": "Turkmenistan Summer Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "WIB": "Western Indonesia Time", "HKST": "Hong Kong Summer Time", "LHST": "Lord Howe Standard Time", "ACWDT": "Australian Central Western Daylight Time", "ART": "Argentina Standard Time", "∅∅∅": "Amazon Summer Time", "HNEG": "East Greenland Standard Time", "GFT": "French Guiana Time", "WART": "Western Argentina Standard Time", "UYST": "Uruguay Summer Time", "CDT": "Central Daylight Time", "AWST": "Australian Western Standard Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "HEEG": "East Greenland Summer Time", "EAT": "East Africa Time", "PDT": "Pacific Daylight Time", "HAT": "Newfoundland Daylight Time", "AEST": "Australian Eastern Standard Time", "MEZ": "Central European Standard Time", "LHDT": "Lord Howe Daylight Time", "BOT": "Bolivia Time", "WAT": "West Africa Standard Time", "COST": "Colombia Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "WIT": "Eastern Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "TMT": "Turkmenistan Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "ADT": "Atlantic Daylight Time", "MYT": "Malaysia Time", "WEZ": "Western European Standard Time"}, -+ locale: "en_RW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AST": "AST", "BOT": "BOT", "SRT": "SRT", "AWST": "AWST", "MYT": "MYT", "AEDT": "AEDT", "HAT": "HAT", "COT": "COT", "EST": "EST", "EAT": "EAT", "HEPM": "HEPM", "ACWST": "ACWST", "PST": "PST", "CAT": "CAT", "ART": "ART", "JST": "JST", "SGT": "SGT", "WAT": "WAT", "WAST": "WAST", "GFT": "GFT", "CDT": "CDT", "MST": "MST", "HENOMX": "HENOMX", "ACDT": "ACDT", "HKST": "HKST", "CST": "CST", "AKDT": "AKDT", "NZST": "NZST", "HADT": "HADT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "OESZ": "OESZ", "TMT": "TMT", "WITA": "WITA", "ACST": "ACST", "HEPMX": "HEPMX", "AKST": "AKST", "COST": "COST", "ECT": "ECT", "NZDT": "NZDT", "ARST": "ARST", "HAST": "HAST", "AWDT": "AWDT", "LHDT": "LHDT", "HNCU": "HNCU", "WESZ": "WESZ", "WART": "WART", "TMST": "TMST", "ADT": "ADT", "LHST": "LHST", "CHAST": "CHAST", "WIT": "WIT", "CLST": "CLST", "GMT": "GMT", "MESZ": "MESZ", "HNEG": "HNEG", "IST": "IST", "BT": "BT", "GYT": "GYT", "HEEG": "HEEG", "AEST": "AEST", "UYT": "UYT", "∅∅∅": "∅∅∅", "VET": "VET", "HNOG": "HNOG", "HEOG": "HEOG", "MEZ": "MEZ", "HNT": "HNT", "WIB": "WIB", "JDT": "JDT", "CHADT": "CHADT", "UYST": "UYST", "HNPMX": "HNPMX", "WARST": "WARST", "MDT": "MDT", "PDT": "PDT", "HECU": "HECU", "WEZ": "WEZ", "OEZ": "OEZ", "SAST": "SAST", "ACWDT": "ACWDT", "EDT": "EDT", "HKT": "HKT", "CLT": "CLT", "ChST": "ChST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_RW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_RW) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_RW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_RW) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_RW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_RW) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_RW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_RW' and handles both Whole and Real numbers based on 'v' - func (en *en_RW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_RW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_RW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_RW' -@@ -278,56 +195,7 @@ func (en *en_RW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_RW' -@@ -336,84 +204,33 @@ func (en *en_RW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_RW' -+func (en *en_RW) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_RW' --func (en *en_RW) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_RW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_RW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_RW) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_SB/en_SB.go b/en_SB/en_SB.go -index c962097..2e24b97 100644 ---- a/en_SB/en_SB.go -+++ b/en_SB/en_SB.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SB struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SB' locale - func New() locales.Translator { - return &en_SB{ -- locale: "en_SB", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "$", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WART": "Western Argentina Standard Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "ADT": "Atlantic Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "CLT": "Chile Standard Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "MESZ": "Central European Summer Time", "HNEG": "East Greenland Standard Time", "ChST": "Chamorro Standard Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "SRT": "Suriname Time", "HKT": "Hong Kong Standard Time", "WAT": "West Africa Standard Time", "IST": "India Standard Time", "OEZ": "Eastern European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "PST": "Pacific Standard Time", "PDT": "Pacific Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "AST": "Atlantic Standard Time", "GYT": "Guyana Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "HKST": "Hong Kong Summer Time", "TMST": "Turkmenistan Summer Time", "MDT": "Macau Summer Time", "HEEG": "East Greenland Summer Time", "CDT": "Central Daylight Time", "HNOG": "West Greenland Standard Time", "AWDT": "Australian Western Daylight Time", "NZST": "New Zealand Standard Time", "HEOG": "West Greenland Summer Time", "CST": "Central Standard Time", "JST": "Japan Standard Time", "GFT": "French Guiana Time", "TMT": "Turkmenistan Standard Time", "ARST": "Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "∅∅∅": "Amazon Summer Time", "WARST": "Western Argentina Summer Time", "UYT": "Uruguay Standard Time", "SAST": "South Africa Standard Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "HAT": "Newfoundland Daylight Time", "LHST": "Lord Howe Standard Time", "MEZ": "Central European Standard Time", "ART": "Argentina Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "BT": "Bhutan Time", "COT": "Colombia Standard Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "HECU": "Cuba Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CHAST": "Chatham Standard Time", "BOT": "Bolivia Time", "CHADT": "Chatham Daylight Time", "CLST": "Chile Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "ACWST": "Australian Central Western Standard Time", "NZDT": "New Zealand Daylight Time", "JDT": "Japan Daylight Time", "AKST": "Alaska Standard Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "LHDT": "Lord Howe Daylight Time", "WITA": "Central Indonesia Time", "AEST": "Australian Eastern Standard Time", "ECT": "Ecuador Time", "COST": "Colombia Summer Time", "WIT": "Eastern Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "WEZ": "Western European Standard Time"}, -+ locale: "en_SB", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "$", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CAT": "CAT", "WITA": "WITA", "WEZ": "WEZ", "HECU": "HECU", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "CHAST": "CHAST", "MST": "MST", "ACST": "ACST", "HNPM": "HNPM", "JDT": "JDT", "COST": "COST", "HNEG": "HNEG", "BT": "BT", "HNPMX": "HNPMX", "SGT": "SGT", "WAST": "WAST", "ARST": "ARST", "SRT": "SRT", "EAT": "EAT", "AWST": "AWST", "IST": "IST", "HEPMX": "HEPMX", "ADT": "ADT", "AEDT": "AEDT", "HAT": "HAT", "SAST": "SAST", "HKT": "HKT", "CDT": "CDT", "MYT": "MYT", "AEST": "AEST", "UYST": "UYST", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "GYT": "GYT", "ECT": "ECT", "NZDT": "NZDT", "MEZ": "MEZ", "GMT": "GMT", "JST": "JST", "PST": "PST", "AKST": "AKST", "AKDT": "AKDT", "TMT": "TMT", "TMST": "TMST", "WIB": "WIB", "HEPM": "HEPM", "BOT": "BOT", "CST": "CST", "WESZ": "WESZ", "GFT": "GFT", "HNT": "HNT", "COT": "COT", "HAST": "HAST", "ACWST": "ACWST", "MDT": "MDT", "ART": "ART", "EDT": "EDT", "ACWDT": "ACWDT", "PDT": "PDT", "HKST": "HKST", "AST": "AST", "HENOMX": "HENOMX", "LHDT": "LHDT", "WART": "WART", "NZST": "NZST", "HEEG": "HEEG", "CHADT": "CHADT", "UYT": "UYT", "VET": "VET", "WAT": "WAT", "HEOG": "HEOG", "HADT": "HADT", "LHST": "LHST", "OESZ": "OESZ", "WIT": "WIT", "EST": "EST", "CLT": "CLT", "ACDT": "ACDT", "OEZ": "OEZ", "WARST": "WARST", "CLST": "CLST", "ChST": "ChST", "MESZ": "MESZ"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_SB) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_SB) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_SB) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SB) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SB) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SB) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SB) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SB) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SB) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SB' and handles both Whole and Real numbers based on 'v' - func (en *en_SB) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SB' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SB) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SB' -@@ -278,56 +195,7 @@ func (en *en_SB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SB' -@@ -336,84 +204,33 @@ func (en *en_SB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SB' -+func (en *en_SB) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SB' --func (en *en_SB) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SB) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_SB) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_SB) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_SB) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_SB) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_SC/en_SC.go b/en_SC/en_SC.go -index ffe570a..9c67882 100644 ---- a/en_SC/en_SC.go -+++ b/en_SC/en_SC.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SC' locale - func New() locales.Translator { - return &en_SC{ -- locale: "en_SC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"JST": "Japan Standard Time", "GFT": "French Guiana Time", "WAT": "West Africa Standard Time", "GMT": "Greenwich Mean Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HNCU": "Cuba Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PST": "Pacific Standard Time", "CHADT": "Chatham Daylight Time", "OEZ": "Eastern European Standard Time", "∅∅∅": "Peru Summer Time", "CAT": "Central Africa Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "AWST": "Australian Western Standard Time", "CLST": "Chile Summer Time", "MDT": "Macau Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "AST": "Atlantic Standard Time", "CDT": "Central Daylight Time", "WIT": "Eastern Indonesia Time", "ACWST": "Australian Central Western Standard Time", "TMT": "Turkmenistan Standard Time", "WAST": "West Africa Summer Time", "WARST": "Western Argentina Summer Time", "HNPMX": "Mexican Pacific Standard Time", "EDT": "Eastern Daylight Time", "UYST": "Uruguay Summer Time", "BT": "Bhutan Time", "PDT": "Pacific Daylight Time", "HKST": "Hong Kong Summer Time", "ECT": "Ecuador Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "COT": "Colombia Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "WEZ": "Western European Standard Time", "NZST": "New Zealand Standard Time", "IST": "India Standard Time", "ACDT": "Australian Central Daylight Time", "AKDT": "Alaska Daylight Time", "ADT": "Atlantic Daylight Time", "HNOG": "West Greenland Standard Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "MESZ": "Central European Summer Time", "HEEG": "East Greenland Summer Time", "AKST": "Alaska Standard Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "BOT": "Bolivia Time", "SRT": "Suriname Time", "HKT": "Hong Kong Standard Time", "AEDT": "Australian Eastern Daylight Time", "GYT": "Guyana Time", "ACWDT": "Australian Central Western Daylight Time", "LHST": "Lord Howe Standard Time", "NZDT": "New Zealand Daylight Time", "CLT": "Chile Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "WART": "Western Argentina Standard Time", "HECU": "Cuba Daylight Time", "ChST": "Chamorro Standard Time", "CST": "Central Standard Time", "WIB": "Western Indonesia Time", "JDT": "Japan Daylight Time", "LHDT": "Lord Howe Daylight Time", "SAST": "South Africa Standard Time", "OESZ": "Eastern European Summer Time", "MST": "Macau Standard Time", "ART": "Argentina Standard Time", "TMST": "Turkmenistan Summer Time", "COST": "Colombia Summer Time", "AEST": "Australian Eastern Standard Time", "HNEG": "East Greenland Standard Time", "HEOG": "West Greenland Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "ACST": "Australian Central Standard Time", "EST": "Eastern Standard Time", "MYT": "Malaysia Time", "UYT": "Uruguay Standard Time", "CHAST": "Chatham Standard Time", "MEZ": "Central European Standard Time", "EAT": "East Africa Time", "WITA": "Central Indonesia Time"}, -+ locale: "en_SC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAT": "HAT", "∅∅∅": "∅∅∅", "ARST": "ARST", "HNEG": "HNEG", "HEPMX": "HEPMX", "HECU": "HECU", "OESZ": "OESZ", "ADT": "ADT", "LHST": "LHST", "IST": "IST", "BT": "BT", "COT": "COT", "COST": "COST", "NZDT": "NZDT", "HENOMX": "HENOMX", "AEDT": "AEDT", "CLT": "CLT", "MDT": "MDT", "LHDT": "LHDT", "HEPM": "HEPM", "WEZ": "WEZ", "PDT": "PDT", "HNPMX": "HNPMX", "EDT": "EDT", "NZST": "NZST", "ART": "ART", "HNNOMX": "HNNOMX", "MYT": "MYT", "UYST": "UYST", "SGT": "SGT", "HKST": "HKST", "CAT": "CAT", "WIB": "WIB", "MST": "MST", "MESZ": "MESZ", "JST": "JST", "HKT": "HKT", "WITA": "WITA", "ChST": "ChST", "HEOG": "HEOG", "ACST": "ACST", "HEEG": "HEEG", "PST": "PST", "MEZ": "MEZ", "VET": "VET", "GFT": "GFT", "SAST": "SAST", "EST": "EST", "TMT": "TMT", "AST": "AST", "BOT": "BOT", "HNCU": "HNCU", "AKDT": "AKDT", "JDT": "JDT", "AEST": "AEST", "HNT": "HNT", "GYT": "GYT", "CLST": "CLST", "GMT": "GMT", "SRT": "SRT", "ACDT": "ACDT", "CHAST": "CHAST", "CHADT": "CHADT", "ACWDT": "ACWDT", "WAST": "WAST", "WIT": "WIT", "HADT": "HADT", "WART": "WART", "CDT": "CDT", "EAT": "EAT", "WESZ": "WESZ", "OEZ": "OEZ", "CST": "CST", "AWST": "AWST", "HNOG": "HNOG", "ACWST": "ACWST", "HAST": "HAST", "UYT": "UYT", "WAT": "WAT", "AKST": "AKST", "WARST": "WARST", "TMST": "TMST", "ECT": "ECT", "AWDT": "AWDT", "HNPM": "HNPM"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_SC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SC) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SC) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SC) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SC' and handles both Whole and Real numbers based on 'v' - func (en *en_SC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SC' -@@ -278,56 +195,7 @@ func (en *en_SC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SC' -@@ -336,84 +204,33 @@ func (en *en_SC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SC' -+func (en *en_SC) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SC' --func (en *en_SC) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SC) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_SD/en_SD.go b/en_SD/en_SD.go -index d90deea..5f92139 100644 ---- a/en_SD/en_SD.go -+++ b/en_SD/en_SD.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SD' locale - func New() locales.Translator { - return &en_SD{ -- locale: "en_SD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ARST": "Argentina Summer Time", "HKT": "Hong Kong Standard Time", "MEZ": "Central European Standard Time", "GFT": "French Guiana Time", "HECU": "Cuba Daylight Time", "EST": "Eastern Standard Time", "GMT": "Greenwich Mean Time", "UYST": "Uruguay Summer Time", "AEDT": "Australian Eastern Daylight Time", "NZST": "New Zealand Standard Time", "JST": "Japan Standard Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "AKDT": "Alaska Daylight Time", "HNOG": "West Greenland Standard Time", "AWDT": "Australian Western Daylight Time", "MYT": "Malaysia Time", "AKST": "Alaska Standard Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "ADT": "Atlantic Daylight Time", "UYT": "Uruguay Standard Time", "EDT": "Eastern Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "PDT": "Pacific Daylight Time", "ACWST": "Australian Central Western Standard Time", "AEST": "Australian Eastern Standard Time", "CHADT": "Chatham Daylight Time", "OEZ": "Eastern European Standard Time", "CHAST": "Chatham Standard Time", "NZDT": "New Zealand Daylight Time", "EAT": "East Africa Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "HNEG": "East Greenland Standard Time", "ART": "Argentina Standard Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time", "CDT": "Central Daylight Time", "VET": "Venezuela Time", "WEZ": "Western European Standard Time", "WESZ": "Western European Summer Time", "WITA": "Central Indonesia Time", "BOT": "Bolivia Time", "AST": "Atlantic Standard Time", "CLST": "Chile Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "SRT": "Suriname Time", "WIT": "Eastern Indonesia Time", "AWST": "Australian Western Standard Time", "MESZ": "Central European Summer Time", "SAST": "South Africa Standard Time", "ChST": "Chamorro Standard Time", "CAT": "Central Africa Time", "WAT": "West Africa Standard Time", "HAT": "Newfoundland Daylight Time", "WART": "Western Argentina Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "CST": "Central Standard Time", "GYT": "Guyana Time", "HEOG": "West Greenland Summer Time", "PST": "Pacific Standard Time", "HKST": "Hong Kong Summer Time", "CLT": "Chile Standard Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "BT": "Bhutan Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEEG": "East Greenland Summer Time", "OESZ": "Eastern European Summer Time", "WAST": "West Africa Summer Time", "ACWDT": "Australian Central Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "JDT": "Japan Daylight Time", "∅∅∅": "Amazon Summer Time", "ACST": "Australian Central Standard Time", "COT": "Colombia Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "WIB": "Western Indonesia Time"}, -+ locale: "en_SD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAT": "WAT", "GFT": "GFT", "EST": "EST", "MST": "MST", "HADT": "HADT", "WEZ": "WEZ", "LHST": "LHST", "HNCU": "HNCU", "HKT": "HKT", "SRT": "SRT", "SGT": "SGT", "AKST": "AKST", "SAST": "SAST", "COST": "COST", "CLST": "CLST", "WITA": "WITA", "HNT": "HNT", "ECT": "ECT", "HAST": "HAST", "HNEG": "HNEG", "HENOMX": "HENOMX", "CHAST": "CHAST", "UYST": "UYST", "OEZ": "OEZ", "GYT": "GYT", "CLT": "CLT", "BOT": "BOT", "HEEG": "HEEG", "HEOG": "HEOG", "HNPMX": "HNPMX", "HAT": "HAT", "HNOG": "HNOG", "EAT": "EAT", "MYT": "MYT", "WESZ": "WESZ", "ADT": "ADT", "VET": "VET", "WAST": "WAST", "AKDT": "AKDT", "OESZ": "OESZ", "EDT": "EDT", "ART": "ART", "PST": "PST", "ACWDT": "ACWDT", "TMT": "TMT", "ACDT": "ACDT", "CDT": "CDT", "NZDT": "NZDT", "AST": "AST", "IST": "IST", "WARST": "WARST", "CAT": "CAT", "ARST": "ARST", "UYT": "UYT", "CHADT": "CHADT", "BT": "BT", "WART": "WART", "∅∅∅": "∅∅∅", "MEZ": "MEZ", "LHDT": "LHDT", "AWDT": "AWDT", "HEPM": "HEPM", "JDT": "JDT", "AEST": "AEST", "CST": "CST", "GMT": "GMT", "ACST": "ACST", "WIT": "WIT", "MDT": "MDT", "WIB": "WIB", "JST": "JST", "HNPM": "HNPM", "ACWST": "ACWST", "AEDT": "AEDT", "HEPMX": "HEPMX", "COT": "COT", "NZST": "NZST", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "HECU": "HECU", "HKST": "HKST", "TMST": "TMST", "ChST": "ChST", "AWST": "AWST", "PDT": "PDT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_SD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SD) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SD) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SD) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SD' and handles both Whole and Real numbers based on 'v' - func (en *en_SD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SD' -@@ -278,56 +195,7 @@ func (en *en_SD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SD' -@@ -336,84 +204,33 @@ func (en *en_SD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SD' -+func (en *en_SD) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SD' --func (en *en_SD) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SD) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_SD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_SD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_SD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_SD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_SE/en_SE.go b/en_SE/en_SE.go -index 1e82d59..401dec4 100644 ---- a/en_SE/en_SE.go -+++ b/en_SE/en_SE.go -@@ -10,70 +10,48 @@ import ( - ) -  - type en_SE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ percentSuffix string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SE' locale - func New() locales.Translator { - return &en_SE{ -- locale: "en_SE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "kr", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"UYT": "Uruguay Standard Time", "AWST": "Australian Western Standard Time", "CLT": "Chile Standard Time", "JST": "Japan Standard Time", "SRT": "Suriname Time", "AEDT": "Australian Eastern Daylight Time", "CAT": "Central Africa Time", "HNNOMX": "Northwest Mexico Standard Time", "MYT": "Malaysia Time", "CLST": "Chile Summer Time", "JDT": "Japan Daylight Time", "GMT": "Greenwich Mean Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "HEOG": "West Greenland Summer Time", "HNEG": "East Greenland Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AKDT": "Alaska Daylight Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "SAST": "South Africa Standard Time", "WARST": "Western Argentina Summer Time", "MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "ADT": "Atlantic Daylight Time", "WITA": "Central Indonesia Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "HNOG": "West Greenland Standard Time", "AEST": "Australian Eastern Standard Time", "LHST": "Lord Howe Standard Time", "GFT": "French Guiana Time", "TMT": "Turkmenistan Standard Time", "WAST": "West Africa Summer Time", "ECT": "Ecuador Time", "NZST": "New Zealand Standard Time", "∅∅∅": "Amazon Summer Time", "HEEG": "East Greenland Summer Time", "MDT": "Macau Summer Time", "BT": "Bhutan Time", "HAT": "Newfoundland Daylight Time", "IST": "India Standard Time", "UYST": "Uruguay Summer Time", "GYT": "Guyana Time", "WIT": "Eastern Indonesia Time", "WEZ": "Western European Standard Time", "ACDT": "Australian Central Daylight Time", "OEZ": "Eastern European Standard Time", "HNCU": "Cuba Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNT": "Newfoundland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "HECU": "Cuba Daylight Time", "PST": "Pacific Standard Time", "HKT": "Hong Kong Standard Time", "MEZ": "Central European Standard Time", "ChST": "Chamorro Standard Time", "TMST": "Turkmenistan Summer Time", "SGT": "Singapore Standard Time", "ART": "Argentina Standard Time", "AWDT": "Australian Western Daylight Time", "LHDT": "Lord Howe Daylight Time", "EDT": "Eastern Daylight Time", "CDT": "Central Daylight Time", "CHADT": "Chatham Daylight Time", "WAT": "West Africa Standard Time", "OESZ": "Eastern European Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "PDT": "Pacific Daylight Time", "ACWST": "Australian Central Western Standard Time", "ARST": "Argentina Summer Time", "MESZ": "Central European Summer Time", "BOT": "Bolivia Time", "COST": "Colombia Summer Time", "WIB": "Western Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "ACST": "Australian Central Standard Time", "EAT": "East Africa Time"}, -+ locale: "en_SE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ group: " ", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "kr", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ percentSuffix: " ", -+ timezones: map[string]string{"WARST": "WARST", "COT": "COT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "LHDT": "LHDT", "OEZ": "OEZ", "GFT": "GFT", "MDT": "MDT", "ChST": "ChST", "ACDT": "ACDT", "SGT": "SGT", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "WITA": "WITA", "MST": "MST", "CHADT": "CHADT", "HEOG": "HEOG", "TMT": "TMT", "WAST": "WAST", "SAST": "SAST", "EDT": "EDT", "MYT": "MYT", "LHST": "LHST", "AEST": "AEST", "PST": "PST", "WAT": "WAT", "HADT": "HADT", "MESZ": "MESZ", "ACST": "ACST", "WART": "WART", "HKST": "HKST", "HECU": "HECU", "HNOG": "HNOG", "TMST": "TMST", "ART": "ART", "HEEG": "HEEG", "HENOMX": "HENOMX", "ACWST": "ACWST", "VET": "VET", "ARST": "ARST", "GMT": "GMT", "JST": "JST", "WIT": "WIT", "HNT": "HNT", "CHAST": "CHAST", "UYST": "UYST", "WESZ": "WESZ", "NZST": "NZST", "ECT": "ECT", "CDT": "CDT", "HAST": "HAST", "AWDT": "AWDT", "CST": "CST", "AWST": "AWST", "AKST": "AKST", "GYT": "GYT", "HKT": "HKT", "BT": "BT", "HNCU": "HNCU", "HNPMX": "HNPMX", "CAT": "CAT", "SRT": "SRT", "BOT": "BOT", "EAT": "EAT", "JDT": "JDT", "WEZ": "WEZ", "HAT": "HAT", "AST": "AST", "HNPM": "HNPM", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "CLT": "CLT", "COST": "COST", "EST": "EST", "CLST": "CLST", "NZDT": "NZDT", "WIB": "WIB", "ADT": "ADT", "UYT": "UYT", "HEPM": "HEPM", "AEDT": "AEDT", "IST": "IST", "PDT": "PDT"}, - } - } -  -@@ -140,7 +118,7 @@ func (en *en_SE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SE) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -150,7 +128,7 @@ func (en *en_SE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SE) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -160,7 +138,7 @@ func (en *en_SE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SE) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -206,51 +184,14 @@ func (en *en_SE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SE' and handles both Whole and Real numbers based on 'v' - func (en *en_SE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SE) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -+ l := len(s) + 2 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -284,58 +225,7 @@ func (en *en_SE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SE' -@@ -344,70 +234,7 @@ func (en *en_SE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_SE' -@@ -445,17 +272,6 @@ func (en *en_SE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -464,17 +280,6 @@ func (en *en_SE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,19 +288,6 @@ func (en *en_SE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -504,28 +296,6 @@ func (en *en_SE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -534,35 +304,6 @@ func (en *en_SE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -571,40 +312,6 @@ func (en *en_SE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -613,44 +320,5 @@ func (en *en_SE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_SG/en_SG.go b/en_SG/en_SG.go -index 71a72f1..aa1ac43 100644 ---- a/en_SG/en_SG.go -+++ b/en_SG/en_SG.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_SG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SG' locale - func New() locales.Translator { - return &en_SG{ -- locale: "en_SG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CLST": "Chile Summer Time", "OESZ": "Eastern European Summer Time", "HAT": "Newfoundland Daylight Time", "LHST": "Lord Howe Standard Time", "ADT": "Atlantic Daylight Time", "ART": "Argentina Standard Time", "TMST": "Turkmenistan Summer Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "COT": "Colombia Standard Time", "PDT": "Pacific Daylight Time", "CLT": "Chile Standard Time", "WAST": "West Africa Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "AWDT": "Australian Western Daylight Time", "AST": "Atlantic Standard Time", "UYT": "Uruguay Standard Time", "HKST": "Hong Kong Summer Time", "AWST": "Australian Western Standard Time", "WAT": "West Africa Standard Time", "HECU": "Cuba Daylight Time", "SAST": "South Africa Standard Time", "ACST": "Australian Central Standard Time", "VET": "Venezuela Time", "PST": "Pacific Standard Time", "NZDT": "New Zealand Daylight Time", "UYST": "Uruguay Summer Time", "AEDT": "Australian Eastern Daylight Time", "∅∅∅": "Amazon Summer Time", "EAT": "East Africa Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "BOT": "Bolivia Time", "ACWST": "Australian Central Western Standard Time", "NZST": "New Zealand Standard Time", "HNCU": "Cuba Standard Time", "AKDT": "Alaska Daylight Time", "AEST": "Australian Eastern Standard Time", "CHAST": "Chatham Standard Time", "HNEG": "East Greenland Standard Time", "ChST": "Chamorro Standard Time", "CAT": "Central Africa Time", "COST": "Colombia Summer Time", "SGT": "Singapore Standard Time", "ACWDT": "Australian Central Western Daylight Time", "WESZ": "Western European Summer Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "MDT": "Macau Summer Time", "AKST": "Alaska Standard Time", "CDT": "Central Daylight Time", "ARST": "Argentina Summer Time", "GFT": "French Guiana Time", "ECT": "Ecuador Time", "HNPMX": "Mexican Pacific Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "JST": "Japan Standard Time", "JDT": "Japan Daylight Time", "HEEG": "East Greenland Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNT": "Newfoundland Standard Time", "WEZ": "Western European Standard Time", "TMT": "Turkmenistan Standard Time", "ACDT": "Australian Central Daylight Time", "MST": "Macau Standard Time", "MYT": "Malaysia Time", "CHADT": "Chatham Daylight Time", "MEZ": "Central European Standard Time", "MESZ": "Central European Summer Time", "HEOG": "West Greenland Summer Time", "HKT": "Hong Kong Standard Time", "WITA": "Central Indonesia Time", "OEZ": "Eastern European Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "GMT": "Greenwich Mean Time", "SRT": "Suriname Time", "HNOG": "West Greenland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CST": "Central Standard Time", "WIB": "Western Indonesia Time", "WIT": "Eastern Indonesia Time", "BT": "Bhutan Time"}, -+ locale: "en_SG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"JDT": "JDT", "PDT": "PDT", "SAST": "SAST", "BOT": "BOT", "HEEG": "HEEG", "HENOMX": "HENOMX", "AKDT": "AKDT", "HNPMX": "HNPMX", "COT": "COT", "GYT": "GYT", "EDT": "EDT", "HKT": "HKT", "HNEG": "HNEG", "LHST": "LHST", "IST": "IST", "VET": "VET", "WITA": "WITA", "NZDT": "NZDT", "ARST": "ARST", "HADT": "HADT", "ACWDT": "ACWDT", "HNCU": "HNCU", "WAST": "WAST", "WIT": "WIT", "NZST": "NZST", "WIB": "WIB", "ADT": "ADT", "CLST": "CLST", "HAT": "HAT", "EST": "EST", "CLT": "CLT", "AST": "AST", "SRT": "SRT", "HEPM": "HEPM", "MYT": "MYT", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "TMST": "TMST", "HNPM": "HNPM", "ACWST": "ACWST", "WEZ": "WEZ", "OESZ": "OESZ", "GFT": "GFT", "ECT": "ECT", "MST": "MST", "ACST": "ACST", "ART": "ART", "MEZ": "MEZ", "HEOG": "HEOG", "HEPMX": "HEPMX", "HNT": "HNT", "WART": "WART", "HKST": "HKST", "ACDT": "ACDT", "AEDT": "AEDT", "HECU": "HECU", "LHDT": "LHDT", "UYST": "UYST", "WARST": "WARST", "TMT": "TMT", "GMT": "GMT", "AWST": "AWST", "∅∅∅": "∅∅∅", "UYT": "UYT", "PST": "PST", "SGT": "SGT", "AKST": "AKST", "HNOG": "HNOG", "CDT": "CDT", "MDT": "MDT", "AEST": "AEST", "JST": "JST", "CHADT": "CHADT", "WESZ": "WESZ", "COST": "COST", "CAT": "CAT", "ChST": "ChST", "EAT": "EAT", "HAST": "HAST", "CHAST": "CHAST", "WAT": "WAT", "OEZ": "OEZ", "CST": "CST", "AWDT": "AWDT", "BT": "BT"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_SG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_SG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_SG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_SG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SG' and handles both Whole and Real numbers based on 'v' - func (en *en_SG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SG' -@@ -278,56 +197,7 @@ func (en *en_SG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SG' -@@ -336,68 +206,7 @@ func (en *en_SG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_SG' -@@ -424,17 +233,6 @@ func (en *en_SG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +241,6 @@ func (en *en_SG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +249,6 @@ func (en *en_SG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,13 +257,11 @@ func (en *en_SG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +269,6 @@ func (en *en_SG) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +278,11 @@ func (en *en_SG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +297,6 @@ func (en *en_SG) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +306,11 @@ func (en *en_SG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +327,6 @@ func (en *en_SG) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +338,11 @@ func (en *en_SG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +359,6 @@ func (en *en_SG) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_SH/en_SH.go b/en_SH/en_SH.go -index 1ba9bd1..49011b0 100644 ---- a/en_SH/en_SH.go -+++ b/en_SH/en_SH.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_SH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SH' locale - func New() locales.Translator { - return &en_SH{ -- locale: "en_SH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "£", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"VET": "Venezuela Time", "OEZ": "Eastern European Standard Time", "∅∅∅": "Peru Summer Time", "COT": "Colombia Standard Time", "GMT": "Greenwich Mean Time", "ADT": "Atlantic Daylight Time", "WIB": "Western Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HNT": "Newfoundland Standard Time", "WARST": "Western Argentina Summer Time", "WIT": "Eastern Indonesia Time", "BT": "Bhutan Time", "NZST": "New Zealand Standard Time", "TMT": "Turkmenistan Standard Time", "WAST": "West Africa Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "PST": "Pacific Standard Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "OESZ": "Eastern European Summer Time", "AKDT": "Alaska Daylight Time", "CST": "Central Standard Time", "UYT": "Uruguay Standard Time", "ACWST": "Australian Central Western Standard Time", "NZDT": "New Zealand Daylight Time", "COST": "Colombia Summer Time", "AKST": "Alaska Standard Time", "HNOG": "West Greenland Standard Time", "SGT": "Singapore Standard Time", "CDT": "Central Daylight Time", "AEST": "Australian Eastern Standard Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "CAT": "Central Africa Time", "ACST": "Australian Central Standard Time", "ACDT": "Australian Central Daylight Time", "HNCU": "Cuba Standard Time", "AWST": "Australian Western Standard Time", "CLT": "Chile Standard Time", "ChST": "Chamorro Standard Time", "BOT": "Bolivia Time", "MESZ": "Central European Summer Time", "EAT": "East Africa Time", "WART": "Western Argentina Standard Time", "HECU": "Cuba Daylight Time", "UYST": "Uruguay Summer Time", "WEZ": "Western European Standard Time", "WESZ": "Western European Summer Time", "HEOG": "West Greenland Summer Time", "LHST": "Lord Howe Standard Time", "AST": "Atlantic Standard Time", "ART": "Argentina Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "LHDT": "Lord Howe Daylight Time", "TMST": "Turkmenistan Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HKST": "Hong Kong Summer Time", "GFT": "French Guiana Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "EDT": "Eastern Daylight Time", "MYT": "Malaysia Time", "PDT": "Pacific Daylight Time", "AEDT": "Australian Eastern Daylight Time", "EST": "Eastern Standard Time", "HAT": "Newfoundland Daylight Time", "WITA": "Central Indonesia Time", "MEZ": "Central European Standard Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "HEEG": "East Greenland Summer Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "SRT": "Suriname Time", "ARST": "Argentina Summer Time", "JST": "Japan Standard Time", "WAT": "West Africa Standard Time", "ECT": "Ecuador Time", "MST": "Macau Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AWDT": "Australian Western Daylight Time", "HKT": "Hong Kong Standard Time", "CLST": "Chile Summer Time"}, -+ locale: "en_SH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "£", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"HEPM": "HEPM", "HEPMX": "HEPMX", "WARST": "WARST", "HKST": "HKST", "TMST": "TMST", "CDT": "CDT", "AWDT": "AWDT", "HAST": "HAST", "AEST": "AEST", "CHADT": "CHADT", "BT": "BT", "WIT": "WIT", "TMT": "TMT", "EAT": "EAT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "VET": "VET", "HNOG": "HNOG", "EDT": "EDT", "CLT": "CLT", "ECT": "ECT", "MEZ": "MEZ", "ChST": "ChST", "JDT": "JDT", "HNCU": "HNCU", "ADT": "ADT", "HNNOMX": "HNNOMX", "PST": "PST", "GFT": "GFT", "HAT": "HAT", "COT": "COT", "CLST": "CLST", "CST": "CST", "GMT": "GMT", "HENOMX": "HENOMX", "MDT": "MDT", "HECU": "HECU", "HEOG": "HEOG", "HNPM": "HNPM", "MYT": "MYT", "UYT": "UYT", "ARST": "ARST", "BOT": "BOT", "IST": "IST", "HNPMX": "HNPMX", "SAST": "SAST", "ACST": "ACST", "CHAST": "CHAST", "SGT": "SGT", "WITA": "WITA", "WIB": "WIB", "JST": "JST", "HEEG": "HEEG", "UYST": "UYST", "WEZ": "WEZ", "OESZ": "OESZ", "HNT": "HNT", "GYT": "GYT", "NZST": "NZST", "HADT": "HADT", "NZDT": "NZDT", "ART": "ART", "MST": "MST", "ACWST": "ACWST", "LHDT": "LHDT", "AEDT": "AEDT", "ACWDT": "ACWDT", "WAST": "WAST", "AKDT": "AKDT", "OEZ": "OEZ", "HKT": "HKT", "CAT": "CAT", "SRT": "SRT", "HNEG": "HNEG", "PDT": "PDT", "WESZ": "WESZ", "AKST": "AKST", "COST": "COST", "ACDT": "ACDT", "LHST": "LHST", "WAT": "WAT", "WART": "WART", "EST": "EST", "AST": "AST", "AWST": "AWST"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_SH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SH) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_SH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SH) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_SH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SH) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_SH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SH' and handles both Whole and Real numbers based on 'v' - func (en *en_SH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SH' -@@ -278,56 +197,7 @@ func (en *en_SH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SH' -@@ -336,68 +206,7 @@ func (en *en_SH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_SH' -@@ -405,17 +214,6 @@ func (en *en_SH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_SH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_SH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_SH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/en_SI/en_SI.go b/en_SI/en_SI.go -index 0289ce6..4fd0ee4 100644 ---- a/en_SI/en_SI.go -+++ b/en_SI/en_SI.go -@@ -48,30 +48,11 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: " )", - currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CAT": "Central Africa Time", "WART": "Western Argentina Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "VET": "Venezuela Time", "HNT": "Newfoundland Standard Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "ChST": "Chamorro Standard Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "ACWDT": "Australian Central Western Daylight Time", "NZST": "New Zealand Standard Time", "CHAST": "Chatham Standard Time", "LHDT": "Lord Howe Daylight Time", "SAST": "South Africa Standard Time", "IST": "India Standard Time", "EDT": "Eastern Daylight Time", "WIB": "Western Indonesia Time", "HEOG": "West Greenland Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "UYST": "Uruguay Summer Time", "ACWST": "Australian Central Western Standard Time", "MEZ": "Central European Standard Time", "TMT": "Turkmenistan Standard Time", "OESZ": "Eastern European Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "PDT": "Pacific Daylight Time", "COST": "Colombia Summer Time", "AKDT": "Alaska Daylight Time", "CDT": "Central Daylight Time", "HNOG": "West Greenland Standard Time", "TMST": "Turkmenistan Summer Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "WAT": "West Africa Standard Time", "PST": "Pacific Standard Time", "JST": "Japan Standard Time", "GFT": "French Guiana Time", "ACST": "Australian Central Standard Time", "ACDT": "Australian Central Daylight Time", "AST": "Atlantic Standard Time", "AEST": "Australian Eastern Standard Time", "AWDT": "Australian Western Daylight Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "EAT": "East Africa Time", "ARST": "Argentina Summer Time", "WEZ": "Western European Standard Time", "ECT": "Ecuador Time", "HNCU": "Cuba Standard Time", "BT": "Bhutan Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "ADT": "Atlantic Daylight Time", "GYT": "Guyana Time", "UYT": "Uruguay Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "SRT": "Suriname Time", "ART": "Argentina Standard Time", "HKT": "Hong Kong Standard Time", "CLT": "Chile Standard Time", "MYT": "Malaysia Time", "HAT": "Newfoundland Daylight Time", "WESZ": "Western European Summer Time", "AWST": "Australian Western Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HECU": "Cuba Daylight Time", "SGT": "Singapore Standard Time", "HKST": "Hong Kong Summer Time", "WITA": "Central Indonesia Time", "AEDT": "Australian Eastern Daylight Time", "∅∅∅": "Amazon Summer Time", "WAST": "West Africa Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AKST": "Alaska Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZDT": "New Zealand Daylight Time", "CLST": "Chile Summer Time", "HEEG": "East Greenland Summer Time", "COT": "Colombia Standard Time", "WIT": "Eastern Indonesia Time", "MESZ": "Central European Summer Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time"}, -+ timezones: map[string]string{"CST": "CST", "HENOMX": "HENOMX", "LHST": "LHST", "UYST": "UYST", "HNPM": "HNPM", "WEZ": "WEZ", "HECU": "HECU", "OEZ": "OEZ", "CAT": "CAT", "GMT": "GMT", "MYT": "MYT", "ACWST": "ACWST", "AEST": "AEST", "WART": "WART", "HEOG": "HEOG", "HEEG": "HEEG", "BT": "BT", "TMST": "TMST", "CDT": "CDT", "MESZ": "MESZ", "VET": "VET", "NZDT": "NZDT", "HADT": "HADT", "WESZ": "WESZ", "HNCU": "HNCU", "HKST": "HKST", "WITA": "WITA", "MST": "MST", "MDT": "MDT", "CHAST": "CHAST", "SGT": "SGT", "HEPMX": "HEPMX", "OESZ": "OESZ", "GFT": "GFT", "WARST": "WARST", "ECT": "ECT", "ChST": "ChST", "LHDT": "LHDT", "PDT": "PDT", "AKST": "AKST", "ACDT": "ACDT", "IST": "IST", "WAST": "WAST", "AKDT": "AKDT", "GYT": "GYT", "EST": "EST", "AST": "AST", "EAT": "EAT", "CLT": "CLT", "CLST": "CLST", "SRT": "SRT", "JST": "JST", "BOT": "BOT", "HAST": "HAST", "AWDT": "AWDT", "WAT": "WAT", "HNT": "HNT", "∅∅∅": "∅∅∅", "EDT": "EDT", "WIB": "WIB", "PST": "PST", "HNPMX": "HNPMX", "HNOG": "HNOG", "HKT": "HKT", "MEZ": "MEZ", "UYT": "UYT", "WIT": "WIT", "COST": "COST", "ADT": "ADT", "ARST": "ARST", "TMT": "TMT", "HNEG": "HNEG", "JDT": "JDT", "AEDT": "AEDT", "COT": "COT", "ACST": "ACST", "AWST": "AWST", "ACWDT": "ACWDT", "HAT": "HAT", "HEPM": "HEPM", "CHADT": "CHADT", "SAST": "SAST", "NZST": "NZST", "ART": "ART", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -112,8 +93,8 @@ func (en *en_SI) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_SI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +119,7 @@ func (en *en_SI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +129,7 @@ func (en *en_SI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +139,7 @@ func (en *en_SI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +185,13 @@ func (en *en_SI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SI' and handles both Whole and Real numbers based on 'v' - func (en *en_SI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SI' -@@ -278,7 +199,7 @@ func (en *en_SI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -336,7 +257,7 @@ func (en *en_SI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -400,17 +321,6 @@ func (en *en_SI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +329,6 @@ func (en *en_SI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,17 +337,6 @@ func (en *en_SI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,19 +345,6 @@ func (en *en_SI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,28 +353,6 @@ func (en *en_SI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -508,35 +361,6 @@ func (en *en_SI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -545,40 +369,6 @@ func (en *en_SI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -587,44 +377,5 @@ func (en *en_SI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_SL/en_SL.go b/en_SL/en_SL.go -index 42c3e8c..414b86a 100644 ---- a/en_SL/en_SL.go -+++ b/en_SL/en_SL.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SL' locale - func New() locales.Translator { - return &en_SL{ -- locale: "en_SL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "Le", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNEG": "East Greenland Standard Time", "AWST": "Australian Western Standard Time", "ACWST": "Australian Central Western Standard Time", "AWDT": "Australian Western Daylight Time", "TMST": "Turkmenistan Summer Time", "ChST": "Chamorro Standard Time", "ACST": "Australian Central Standard Time", "OEZ": "Eastern European Standard Time", "HECU": "Cuba Daylight Time", "HNOG": "West Greenland Standard Time", "ECT": "Ecuador Time", "WART": "Western Argentina Standard Time", "SRT": "Suriname Time", "HKST": "Hong Kong Summer Time", "NZDT": "New Zealand Daylight Time", "SAST": "South Africa Standard Time", "CLST": "Chile Summer Time", "WAST": "West Africa Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "WEZ": "Western European Standard Time", "JST": "Japan Standard Time", "HNT": "Newfoundland Standard Time", "MEZ": "Central European Standard Time", "LHST": "Lord Howe Standard Time", "EAT": "East Africa Time", "WAT": "West Africa Standard Time", "COT": "Colombia Standard Time", "CST": "Central Standard Time", "ADT": "Atlantic Daylight Time", "UYST": "Uruguay Summer Time", "MYT": "Malaysia Time", "UYT": "Uruguay Standard Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "GYT": "Guyana Time", "PDT": "Pacific Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CHAST": "Chatham Standard Time", "HNCU": "Cuba Standard Time", "MST": "Macau Standard Time", "ARST": "Argentina Summer Time", "WESZ": "Western European Summer Time", "WITA": "Central Indonesia Time", "HNPM": "St. Pierre & Miquelon Standard Time", "ACWDT": "Australian Central Western Daylight Time", "∅∅∅": "Amazon Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "EST": "Eastern Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AST": "Atlantic Standard Time", "WIT": "Eastern Indonesia Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "HKT": "Hong Kong Standard Time", "TMT": "Turkmenistan Standard Time", "HEEG": "East Greenland Summer Time", "MDT": "Macau Summer Time", "AKST": "Alaska Standard Time", "AEDT": "Australian Eastern Daylight Time", "CLT": "Chile Standard Time", "CAT": "Central Africa Time", "CDT": "Central Daylight Time", "HAT": "Newfoundland Daylight Time", "HEOG": "West Greenland Summer Time", "JDT": "Japan Daylight Time", "GFT": "French Guiana Time", "GMT": "Greenwich Mean Time", "HADT": "Hawaii-Aleutian Daylight Time", "VET": "Venezuela Time", "MESZ": "Central European Summer Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "PST": "Pacific Standard Time", "CHADT": "Chatham Daylight Time", "LHDT": "Lord Howe Daylight Time", "WARST": "Western Argentina Summer Time", "SGT": "Singapore Standard Time", "NZST": "New Zealand Standard Time", "IST": "India Standard Time"}, -+ locale: "en_SL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "Le", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEST": "AEST", "UYST": "UYST", "HNT": "HNT", "WARST": "WARST", "HEOG": "HEOG", "EDT": "EDT", "TMST": "TMST", "JST": "JST", "WEZ": "WEZ", "AKST": "AKST", "GYT": "GYT", "HNNOMX": "HNNOMX", "AWST": "AWST", "AKDT": "AKDT", "CLST": "CLST", "WITA": "WITA", "CST": "CST", "MST": "MST", "WESZ": "WESZ", "HAT": "HAT", "HKT": "HKT", "ART": "ART", "GFT": "GFT", "COT": "COT", "MYT": "MYT", "ACWST": "ACWST", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "NZST": "NZST", "EAT": "EAT", "HADT": "HADT", "ACST": "ACST", "PST": "PST", "CHAST": "CHAST", "OEZ": "OEZ", "CLT": "CLT", "ADT": "ADT", "HAST": "HAST", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "COST": "COST", "CAT": "CAT", "ARST": "ARST", "MEZ": "MEZ", "WIB": "WIB", "UYT": "UYT", "VET": "VET", "WAT": "WAT", "OESZ": "OESZ", "CDT": "CDT", "ChST": "ChST", "EST": "EST", "AWDT": "AWDT", "LHST": "LHST", "AEDT": "AEDT", "WAST": "WAST", "HKST": "HKST", "MDT": "MDT", "NZDT": "NZDT", "BOT": "BOT", "HEEG": "HEEG", "PDT": "PDT", "SAST": "SAST", "TMT": "TMT", "AST": "AST", "MESZ": "MESZ", "HNEG": "HNEG", "HEPM": "HEPM", "HECU": "HECU", "WART": "WART", "SRT": "SRT", "ACDT": "ACDT", "JDT": "JDT", "BT": "BT", "HEPMX": "HEPMX", "ECT": "ECT", "HENOMX": "HENOMX", "HNPM": "HNPM", "IST": "IST", "SGT": "SGT", "WIT": "WIT", "HNOG": "HNOG", "GMT": "GMT", "LHDT": "LHDT", "CHADT": "CHADT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_SL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SL) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SL) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SL) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SL' and handles both Whole and Real numbers based on 'v' - func (en *en_SL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SL' -@@ -278,56 +195,7 @@ func (en *en_SL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SL' -@@ -336,84 +204,33 @@ func (en *en_SL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SL' -+func (en *en_SL) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SL' --func (en *en_SL) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SL) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_SL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_SL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_SL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_SL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_SS/en_SS.go b/en_SS/en_SS.go -index 2a24850..0ef0c37 100644 ---- a/en_SS/en_SS.go -+++ b/en_SS/en_SS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SS' locale - func New() locales.Translator { - return &en_SS{ -- locale: "en_SS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "£", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNNOMX": "Northwest Mexico Standard Time", "HECU": "Cuba Daylight Time", "CDT": "Central Daylight Time", "MEZ": "Central European Standard Time", "TMT": "Turkmenistan Standard Time", "ACWST": "Australian Central Western Standard Time", "HNOG": "West Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "HAT": "Newfoundland Daylight Time", "ARST": "Argentina Summer Time", "HNT": "Newfoundland Standard Time", "HEOG": "West Greenland Summer Time", "LHDT": "Lord Howe Daylight Time", "ChST": "Chamorro Standard Time", "AST": "Atlantic Standard Time", "UYST": "Uruguay Summer Time", "AKST": "Alaska Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PST": "Pacific Standard Time", "JST": "Japan Standard Time", "WAST": "West Africa Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "NZST": "New Zealand Standard Time", "HNEG": "East Greenland Standard Time", "OESZ": "Eastern European Summer Time", "GMT": "Greenwich Mean Time", "HNCU": "Cuba Standard Time", "WIB": "Western Indonesia Time", "HKT": "Hong Kong Standard Time", "CHAST": "Chatham Standard Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "MYT": "Malaysia Time", "VET": "Venezuela Time", "∅∅∅": "Amazon Summer Time", "ACWDT": "Australian Central Western Daylight Time", "MESZ": "Central European Summer Time", "CLST": "Chile Summer Time", "WART": "Western Argentina Standard Time", "PDT": "Pacific Daylight Time", "CHADT": "Chatham Daylight Time", "NZDT": "New Zealand Daylight Time", "CLT": "Chile Standard Time", "OEZ": "Eastern European Standard Time", "MST": "Macau Standard Time", "BT": "Bhutan Time", "GFT": "French Guiana Time", "CST": "Central Standard Time", "AEST": "Australian Eastern Standard Time", "HKST": "Hong Kong Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "AWST": "Australian Western Standard Time", "SAST": "South Africa Standard Time", "ECT": "Ecuador Time", "EAT": "East Africa Time", "COST": "Colombia Summer Time", "SGT": "Singapore Standard Time", "WITA": "Central Indonesia Time", "WEZ": "Western European Standard Time", "AEDT": "Australian Eastern Daylight Time", "LHST": "Lord Howe Standard Time", "IST": "India Standard Time", "ACST": "Australian Central Standard Time", "WAT": "West Africa Standard Time", "WARST": "Western Argentina Summer Time", "UYT": "Uruguay Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "TMST": "Turkmenistan Summer Time", "BOT": "Bolivia Time", "CAT": "Central Africa Time", "ADT": "Atlantic Daylight Time", "JDT": "Japan Daylight Time", "HEEG": "East Greenland Summer Time", "COT": "Colombia Standard Time", "HNPMX": "Mexican Pacific Standard Time", "SRT": "Suriname Time", "ART": "Argentina Standard Time", "AWDT": "Australian Western Daylight Time"}, -+ locale: "en_SS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GB£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "£", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAT": "HAT", "MDT": "MDT", "HENOMX": "HENOMX", "JST": "JST", "AEST": "AEST", "COST": "COST", "ACST": "ACST", "HECU": "HECU", "HEPMX": "HEPMX", "CAT": "CAT", "HADT": "HADT", "ACDT": "ACDT", "AEDT": "AEDT", "WESZ": "WESZ", "AKST": "AKST", "HNCU": "HNCU", "GYT": "GYT", "HNOG": "HNOG", "CDT": "CDT", "ChST": "ChST", "ART": "ART", "WEZ": "WEZ", "GFT": "GFT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "ADT": "ADT", "LHST": "LHST", "WARST": "WARST", "MST": "MST", "ARST": "ARST", "WART": "WART", "HNEG": "HNEG", "AWDT": "AWDT", "HNPMX": "HNPMX", "WAT": "WAT", "EST": "EST", "EDT": "EDT", "AST": "AST", "BOT": "BOT", "AWST": "AWST", "TMST": "TMST", "NZST": "NZST", "GMT": "GMT", "HEEG": "HEEG", "JDT": "JDT", "CHADT": "CHADT", "COT": "COT", "HEPM": "HEPM", "SGT": "SGT", "HAST": "HAST", "MEZ": "MEZ", "WIT": "WIT", "HKST": "HKST", "CLST": "CLST", "WITA": "WITA", "NZDT": "NZDT", "SRT": "SRT", "LHDT": "LHDT", "CST": "CST", "IST": "IST", "UYST": "UYST", "WAST": "WAST", "AKDT": "AKDT", "EAT": "EAT", "MESZ": "MESZ", "BT": "BT", "CLT": "CLT", "HNNOMX": "HNNOMX", "PDT": "PDT", "CHAST": "CHAST", "UYT": "UYT", "OEZ": "OEZ", "SAST": "SAST", "ECT": "ECT", "VET": "VET", "HNPM": "HNPM", "PST": "PST", "OESZ": "OESZ", "HNT": "HNT", "HKT": "HKT", "TMT": "TMT", "WIB": "WIB", "MYT": "MYT", "ACWST": "ACWST", "ACWDT": "ACWDT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_SS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SS) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SS) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SS) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SS' and handles both Whole and Real numbers based on 'v' - func (en *en_SS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SS' -@@ -278,56 +195,7 @@ func (en *en_SS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SS' -@@ -336,84 +204,33 @@ func (en *en_SS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SS' -+func (en *en_SS) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SS' --func (en *en_SS) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SS) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_SS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_SS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_SS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_SS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_SX/en_SX.go b/en_SX/en_SX.go -index 60491a5..635d87b 100644 ---- a/en_SX/en_SX.go -+++ b/en_SX/en_SX.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SX struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SX' locale - func New() locales.Translator { - return &en_SX{ -- locale: "en_SX", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "NAf.", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"GFT": "French Guiana Time", "MST": "Macau Standard Time", "ADT": "Atlantic Daylight Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "OESZ": "Eastern European Summer Time", "SRT": "Suriname Time", "HNOG": "West Greenland Standard Time", "CHADT": "Chatham Daylight Time", "WAT": "West Africa Standard Time", "EAT": "East Africa Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "JDT": "Japan Daylight Time", "CAT": "Central Africa Time", "LHDT": "Lord Howe Daylight Time", "HNEG": "East Greenland Standard Time", "HNCU": "Cuba Standard Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "GYT": "Guyana Time", "PST": "Pacific Standard Time", "WESZ": "Western European Summer Time", "HKST": "Hong Kong Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "COT": "Colombia Standard Time", "WAST": "West Africa Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "VET": "Venezuela Time", "OEZ": "Eastern European Standard Time", "ECT": "Ecuador Time", "ACST": "Australian Central Standard Time", "HECU": "Cuba Daylight Time", "SGT": "Singapore Standard Time", "AKDT": "Alaska Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "NZDT": "New Zealand Daylight Time", "WART": "Western Argentina Standard Time", "ACWST": "Australian Central Western Standard Time", "HEOG": "West Greenland Summer Time", "TMST": "Turkmenistan Summer Time", "ACDT": "Australian Central Daylight Time", "TMT": "Turkmenistan Standard Time", "ChST": "Chamorro Standard Time", "COST": "Colombia Summer Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "UYST": "Uruguay Summer Time", "WITA": "Central Indonesia Time", "AWST": "Australian Western Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HAT": "Newfoundland Daylight Time", "HEEG": "East Greenland Summer Time", "WARST": "Western Argentina Summer Time", "GMT": "Greenwich Mean Time", "HADT": "Hawaii-Aleutian Daylight Time", "AEDT": "Australian Eastern Daylight Time", "SAST": "South Africa Standard Time", "BOT": "Bolivia Time", "AKST": "Alaska Standard Time", "AST": "Atlantic Standard Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "AWDT": "Australian Western Daylight Time", "CHAST": "Chatham Standard Time", "CST": "Central Standard Time", "NZST": "New Zealand Standard Time", "LHST": "Lord Howe Standard Time", "WIT": "Eastern Indonesia Time", "ARST": "Argentina Summer Time", "IST": "India Standard Time", "MYT": "Malaysia Time", "∅∅∅": "Amazon Summer Time", "JST": "Japan Standard Time", "EST": "Eastern Standard Time", "CDT": "Central Daylight Time", "HNT": "Newfoundland Standard Time", "AEST": "Australian Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "UYT": "Uruguay Standard Time", "WIB": "Western Indonesia Time", "MEZ": "Central European Standard Time", "HNPMX": "Mexican Pacific Standard Time"}, -+ locale: "en_SX", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "NAf.", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "WIB": "WIB", "WAST": "WAST", "WARST": "WARST", "HNOG": "HNOG", "ECT": "ECT", "CHAST": "CHAST", "WESZ": "WESZ", "GYT": "GYT", "SAST": "SAST", "EDT": "EDT", "CST": "CST", "CDT": "CDT", "MESZ": "MESZ", "UYST": "UYST", "WEZ": "WEZ", "AWST": "AWST", "AWDT": "AWDT", "COT": "COT", "ARST": "ARST", "ACDT": "ACDT", "MYT": "MYT", "AEDT": "AEDT", "WART": "WART", "HEOG": "HEOG", "AKDT": "AKDT", "AST": "AST", "GMT": "GMT", "SRT": "SRT", "HEPM": "HEPM", "HEPMX": "HEPMX", "WAT": "WAT", "CAT": "CAT", "HECU": "HECU", "PDT": "PDT", "OEZ": "OEZ", "HKST": "HKST", "∅∅∅": "∅∅∅", "ChST": "ChST", "HNNOMX": "HNNOMX", "JDT": "JDT", "PST": "PST", "HNT": "HNT", "WIT": "WIT", "AEST": "AEST", "HNCU": "HNCU", "HKT": "HKT", "NZDT": "NZDT", "MEZ": "MEZ", "HEEG": "HEEG", "HNPM": "HNPM", "LHDT": "LHDT", "SGT": "SGT", "GFT": "GFT", "VET": "VET", "COST": "COST", "EST": "EST", "WITA": "WITA", "MDT": "MDT", "ACST": "ACST", "JST": "JST", "CHADT": "CHADT", "TMST": "TMST", "HADT": "HADT", "HNPMX": "HNPMX", "HAT": "HAT", "MST": "MST", "BOT": "BOT", "OESZ": "OESZ", "CLT": "CLT", "NZST": "NZST", "LHST": "LHST", "ACWDT": "ACWDT", "UYT": "UYT", "IST": "IST", "CLST": "CLST", "ADT": "ADT", "HAST": "HAST", "HNEG": "HNEG", "ACWST": "ACWST", "BT": "BT", "ART": "ART", "EAT": "EAT", "HENOMX": "HENOMX", "AKST": "AKST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_SX) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SX) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SX) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SX) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SX) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SX) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SX) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SX' and handles both Whole and Real numbers based on 'v' - func (en *en_SX) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SX' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SX) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SX' -@@ -278,56 +195,7 @@ func (en *en_SX) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SX' -@@ -336,84 +204,33 @@ func (en *en_SX) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SX' -+func (en *en_SX) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SX' --func (en *en_SX) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SX) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SX) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SX) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_SZ/en_SZ.go b/en_SZ/en_SZ.go -index acb1b84..a61f347 100644 ---- a/en_SZ/en_SZ.go -+++ b/en_SZ/en_SZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_SZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_SZ' locale - func New() locales.Translator { - return &en_SZ{ -- locale: "en_SZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "E", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AWST": "Australian Western Standard Time", "JDT": "Japan Daylight Time", "HNT": "Newfoundland Standard Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "HEOG": "West Greenland Summer Time", "PDT": "Pacific Daylight Time", "ACST": "Australian Central Standard Time", "ACDT": "Australian Central Daylight Time", "CLST": "Chile Summer Time", "ACWST": "Australian Central Western Standard Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "HAT": "Newfoundland Daylight Time", "CLT": "Chile Standard Time", "TMST": "Turkmenistan Summer Time", "UYT": "Uruguay Standard Time", "AEDT": "Australian Eastern Daylight Time", "WAT": "West Africa Standard Time", "MDT": "Macau Summer Time", "MYT": "Malaysia Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "WESZ": "Western European Summer Time", "ARST": "Argentina Summer Time", "TMT": "Turkmenistan Standard Time", "EDT": "Eastern Daylight Time", "CHADT": "Chatham Daylight Time", "CST": "Central Standard Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "MESZ": "Central European Summer Time", "NZDT": "New Zealand Daylight Time", "WART": "Western Argentina Standard Time", "AKST": "Alaska Standard Time", "VET": "Venezuela Time", "WIT": "Eastern Indonesia Time", "HEEG": "East Greenland Summer Time", "WAST": "West Africa Summer Time", "ACWDT": "Australian Central Western Daylight Time", "SAST": "South Africa Standard Time", "SRT": "Suriname Time", "CAT": "Central Africa Time", "UYST": "Uruguay Summer Time", "AST": "Atlantic Standard Time", "PST": "Pacific Standard Time", "WEZ": "Western European Standard Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "OESZ": "Eastern European Summer Time", "ADT": "Atlantic Daylight Time", "ChST": "Chamorro Standard Time", "EAT": "East Africa Time", "HEPMX": "Mexican Pacific Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "HKT": "Hong Kong Standard Time", "HNEG": "East Greenland Standard Time", "WARST": "Western Argentina Summer Time", "ECT": "Ecuador Time", "HNNOMX": "Northwest Mexico Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "CDT": "Central Daylight Time", "ART": "Argentina Standard Time", "MEZ": "Central European Standard Time", "∅∅∅": "Amazon Summer Time", "AEST": "Australian Eastern Standard Time", "GYT": "Guyana Time", "WIB": "Western Indonesia Time", "BT": "Bhutan Time", "AWDT": "Australian Western Daylight Time", "WITA": "Central Indonesia Time", "NZST": "New Zealand Standard Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "SGT": "Singapore Standard Time", "EST": "Eastern Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "JST": "Japan Standard Time", "COST": "Colombia Summer Time"}, -+ locale: "en_SZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "E", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "UYST": "UYST", "HECU": "HECU", "AKDT": "AKDT", "HNT": "HNT", "AST": "AST", "ChST": "ChST", "HNEG": "HNEG", "ART": "ART", "IST": "IST", "AEST": "AEST", "VET": "VET", "HEPMX": "HEPMX", "EST": "EST", "TMT": "TMT", "JST": "JST", "WARST": "WARST", "ECT": "ECT", "ACWDT": "ACWDT", "COT": "COT", "CLST": "CLST", "CST": "CST", "GFT": "GFT", "MESZ": "MESZ", "LHDT": "LHDT", "CLT": "CLT", "SRT": "SRT", "HNNOMX": "HNNOMX", "PDT": "PDT", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "ADT": "ADT", "ACST": "ACST", "WITA": "WITA", "WIB": "WIB", "GMT": "GMT", "HEOG": "HEOG", "HAST": "HAST", "MYT": "MYT", "HNCU": "HNCU", "AKST": "AKST", "HKST": "HKST", "MDT": "MDT", "HNPM": "HNPM", "AEDT": "AEDT", "CHADT": "CHADT", "HNPMX": "HNPMX", "WAT": "WAT", "HAT": "HAT", "HENOMX": "HENOMX", "HEPM": "HEPM", "GYT": "GYT", "EAT": "EAT", "WAST": "WAST", "COST": "COST", "CDT": "CDT", "ARST": "ARST", "HADT": "HADT", "UYT": "UYT", "SGT": "SGT", "NZDT": "NZDT", "CHAST": "CHAST", "JDT": "JDT", "HNOG": "HNOG", "EDT": "EDT", "NZST": "NZST", "MST": "MST", "LHST": "LHST", "BT": "BT", "WESZ": "WESZ", "OESZ": "OESZ", "MEZ": "MEZ", "HEEG": "HEEG", "AWDT": "AWDT", "HKT": "HKT", "CAT": "CAT", "BOT": "BOT", "AWST": "AWST", "PST": "PST", "OEZ": "OEZ", "WART": "WART", "WIT": "WIT", "SAST": "SAST", "TMST": "TMST", "ACDT": "ACDT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_SZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_SZ) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_SZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_SZ) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_SZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_SZ) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_SZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_SZ' and handles both Whole and Real numbers based on 'v' - func (en *en_SZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_SZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_SZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_SZ' -@@ -278,56 +195,7 @@ func (en *en_SZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_SZ' -@@ -336,84 +204,33 @@ func (en *en_SZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_SZ' -+func (en *en_SZ) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_SZ' --func (en *en_SZ) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_SZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_SZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_SZ) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_SZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_SZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_SZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_SZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_TC/en_TC.go b/en_TC/en_TC.go -index 95d4300..9e9e258 100644 ---- a/en_TC/en_TC.go -+++ b/en_TC/en_TC.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_TC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_TC' locale - func New() locales.Translator { - return &en_TC{ -- locale: "en_TC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AWDT": "Australian Western Daylight Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "EDT": "Eastern Daylight Time", "GYT": "Guyana Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "MEZ": "Central European Standard Time", "OESZ": "Eastern European Summer Time", "UYT": "Uruguay Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "PST": "Pacific Standard Time", "HKST": "Hong Kong Summer Time", "WITA": "Central Indonesia Time", "NZDT": "New Zealand Daylight Time", "∅∅∅": "Amazon Summer Time", "GFT": "French Guiana Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "HNOG": "West Greenland Standard Time", "TMT": "Turkmenistan Standard Time", "ACST": "Australian Central Standard Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "UYST": "Uruguay Summer Time", "WIB": "Western Indonesia Time", "NZST": "New Zealand Standard Time", "HNEG": "East Greenland Standard Time", "OEZ": "Eastern European Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "TMST": "Turkmenistan Summer Time", "HNCU": "Cuba Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "MESZ": "Central European Summer Time", "CHADT": "Chatham Daylight Time", "IST": "India Standard Time", "ECT": "Ecuador Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "AEDT": "Australian Eastern Daylight Time", "HECU": "Cuba Daylight Time", "ACWDT": "Australian Central Western Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "JST": "Japan Standard Time", "VET": "Venezuela Time", "HKT": "Hong Kong Standard Time", "CLT": "Chile Standard Time", "ACDT": "Australian Central Daylight Time", "MDT": "Macau Summer Time", "MYT": "Malaysia Time", "HADT": "Hawaii-Aleutian Daylight Time", "ARST": "Argentina Summer Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "COST": "Colombia Summer Time", "SGT": "Singapore Standard Time", "ADT": "Atlantic Daylight Time", "SRT": "Suriname Time", "SAST": "South Africa Standard Time", "CLST": "Chile Summer Time", "ACWST": "Australian Central Western Standard Time", "HEOG": "West Greenland Summer Time", "LHST": "Lord Howe Standard Time", "ChST": "Chamorro Standard Time", "AKST": "Alaska Standard Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "WIT": "Eastern Indonesia Time", "JDT": "Japan Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "MST": "Macau Standard Time", "CHAST": "Chatham Standard Time", "BOT": "Bolivia Time", "AEST": "Australian Eastern Standard Time", "LHDT": "Lord Howe Daylight Time", "HEEG": "East Greenland Summer Time", "WAST": "West Africa Summer Time", "PDT": "Pacific Daylight Time", "WEZ": "Western European Standard Time", "WESZ": "Western European Summer Time"}, -+ locale: "en_TC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EDT": "EDT", "CDT": "CDT", "HADT": "HADT", "AEDT": "AEDT", "OEZ": "OEZ", "IST": "IST", "BT": "BT", "VET": "VET", "COST": "COST", "TMT": "TMT", "MEZ": "MEZ", "ACST": "ACST", "HNPM": "HNPM", "ChST": "ChST", "SRT": "SRT", "AEST": "AEST", "HEPMX": "HEPMX", "TMST": "TMST", "MDT": "MDT", "ECT": "ECT", "EAT": "EAT", "HAST": "HAST", "∅∅∅": "∅∅∅", "BOT": "BOT", "AWST": "AWST", "UYST": "UYST", "EST": "EST", "GMT": "GMT", "HEPM": "HEPM", "ACWDT": "ACWDT", "AKDT": "AKDT", "ARST": "ARST", "WAST": "WAST", "CLST": "CLST", "CST": "CST", "GFT": "GFT", "HKST": "HKST", "MST": "MST", "NZST": "NZST", "WIB": "WIB", "HNEG": "HNEG", "OESZ": "OESZ", "HAT": "HAT", "HNPMX": "HNPMX", "WIT": "WIT", "COT": "COT", "ART": "ART", "HENOMX": "HENOMX", "MYT": "MYT", "WESZ": "WESZ", "AST": "AST", "PDT": "PDT", "HECU": "HECU", "WART": "WART", "PST": "PST", "SGT": "SGT", "CAT": "CAT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "UYT": "UYT", "HNCU": "HNCU", "AKST": "AKST", "GYT": "GYT", "HEOG": "HEOG", "ADT": "ADT", "LHDT": "LHDT", "ACWST": "ACWST", "WEZ": "WEZ", "HKT": "HKT", "LHST": "LHST", "JST": "JST", "HNT": "HNT", "WITA": "WITA", "MESZ": "MESZ", "JDT": "JDT", "WARST": "WARST", "AWDT": "AWDT", "CHAST": "CHAST", "NZDT": "NZDT", "SAST": "SAST", "HNOG": "HNOG", "CLT": "CLT", "ACDT": "ACDT", "CHADT": "CHADT", "WAT": "WAT"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_TC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_TC) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_TC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_TC) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_TC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_TC) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_TC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_TC' and handles both Whole and Real numbers based on 'v' - func (en *en_TC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_TC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_TC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_TC' -@@ -278,56 +195,7 @@ func (en *en_TC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_TC' -@@ -336,84 +204,33 @@ func (en *en_TC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_TC' -+func (en *en_TC) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_TC' --func (en *en_TC) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_TC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_TC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_TC) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_TC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_TC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_TC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_TC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_TK/en_TK.go b/en_TK/en_TK.go -index 7b7dd44..2a26d80 100644 ---- a/en_TK/en_TK.go -+++ b/en_TK/en_TK.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_TK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_TK' locale - func New() locales.Translator { - return &en_TK{ -- locale: "en_TK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"EAT": "East Africa Time", "WAT": "West Africa Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "MYT": "Malaysia Time", "UYT": "Uruguay Standard Time", "BT": "Bhutan Time", "ECT": "Ecuador Time", "HECU": "Cuba Daylight Time", "ACWST": "Australian Central Western Standard Time", "AWDT": "Australian Western Daylight Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "HEEG": "East Greenland Summer Time", "EDT": "Eastern Daylight Time", "PST": "Pacific Standard Time", "WITA": "Central Indonesia Time", "NZST": "New Zealand Standard Time", "CAT": "Central Africa Time", "WAST": "West Africa Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "MESZ": "Central European Summer Time", "HNEG": "East Greenland Standard Time", "ADT": "Atlantic Daylight Time", "WEZ": "Western European Standard Time", "AEDT": "Australian Eastern Daylight Time", "WARST": "Western Argentina Summer Time", "EST": "Eastern Standard Time", "AKDT": "Alaska Daylight Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HKT": "Hong Kong Standard Time", "CLT": "Chile Standard Time", "OEZ": "Eastern European Standard Time", "GMT": "Greenwich Mean Time", "CDT": "Central Daylight Time", "WIB": "Western Indonesia Time", "HADT": "Hawaii-Aleutian Daylight Time", "TMT": "Turkmenistan Standard Time", "GYT": "Guyana Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CHAST": "Chatham Standard Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "PDT": "Pacific Daylight Time", "ARST": "Argentina Summer Time", "HKST": "Hong Kong Summer Time", "CHADT": "Chatham Daylight Time", "HNOG": "West Greenland Standard Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "HNCU": "Cuba Standard Time", "MDT": "Macau Summer Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "∅∅∅": "Amazon Summer Time", "BOT": "Bolivia Time", "TMST": "Turkmenistan Summer Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "HNPMX": "Mexican Pacific Standard Time", "HEOG": "West Greenland Summer Time", "MEZ": "Central European Standard Time", "ACDT": "Australian Central Daylight Time", "MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "UYST": "Uruguay Summer Time", "SRT": "Suriname Time", "AEST": "Australian Eastern Standard Time", "CLST": "Chile Summer Time", "ChST": "Chamorro Standard Time", "GFT": "French Guiana Time", "ACST": "Australian Central Standard Time", "CST": "Central Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AST": "Atlantic Standard Time", "WIT": "Eastern Indonesia Time", "NZDT": "New Zealand Daylight Time"}, -+ locale: "en_TK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "$", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAT": "HAT", "WART": "WART", "GYT": "GYT", "EST": "EST", "HKT": "HKT", "CDT": "CDT", "SGT": "SGT", "VET": "VET", "LHDT": "LHDT", "JST": "JST", "ACWST": "ACWST", "ADT": "ADT", "ACDT": "ACDT", "AKDT": "AKDT", "OEZ": "OEZ", "AST": "AST", "WEZ": "WEZ", "WESZ": "WESZ", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "MYT": "MYT", "NZST": "NZST", "MEZ": "MEZ", "AWDT": "AWDT", "CHADT": "CHADT", "COST": "COST", "HADT": "HADT", "NZDT": "NZDT", "EAT": "EAT", "ACWDT": "ACWDT", "WARST": "WARST", "MDT": "MDT", "ART": "ART", "HENOMX": "HENOMX", "JDT": "JDT", "TMT": "TMT", "CST": "CST", "BT": "BT", "AEST": "AEST", "TMST": "TMST", "CAT": "CAT", "ACST": "ACST", "HNPM": "HNPM", "PDT": "PDT", "WAST": "WAST", "AKST": "AKST", "HEEG": "HEEG", "HNT": "HNT", "HAST": "HAST", "SRT": "SRT", "AWST": "AWST", "HECU": "HECU", "OESZ": "OESZ", "COT": "COT", "MST": "MST", "ECT": "ECT", "UYST": "UYST", "HNCU": "HNCU", "WIT": "WIT", "CHAST": "CHAST", "AEDT": "AEDT", "SAST": "SAST", "CLT": "CLT", "GFT": "GFT", "HKST": "HKST", "WIB": "WIB", "ChST": "ChST", "HNEG": "HNEG", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "HEPM": "HEPM", "WAT": "WAT", "EDT": "EDT", "GMT": "GMT", "ARST": "ARST", "UYT": "UYT", "IST": "IST", "HEPMX": "HEPMX", "HEOG": "HEOG", "WITA": "WITA", "BOT": "BOT", "LHST": "LHST", "PST": "PST", "HNOG": "HNOG", "CLST": "CLST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_TK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_TK) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_TK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_TK) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_TK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_TK) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_TK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_TK' and handles both Whole and Real numbers based on 'v' - func (en *en_TK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_TK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_TK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_TK' -@@ -278,56 +195,7 @@ func (en *en_TK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_TK' -@@ -336,84 +204,33 @@ func (en *en_TK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_TK' -+func (en *en_TK) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_TK' --func (en *en_TK) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_TK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_TK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_TK) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_TO/en_TO.go b/en_TO/en_TO.go -index e06d9e2..3f18534 100644 ---- a/en_TO/en_TO.go -+++ b/en_TO/en_TO.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_TO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_TO' locale - func New() locales.Translator { - return &en_TO{ -- locale: "en_TO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "T$", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"AKDT": "Alaska Daylight Time", "MDT": "Mountain Daylight Time", "WIB": "Western Indonesia Time", "ACWST": "Australian Central Western Standard Time", "HNT": "Newfoundland Standard Time", "AEST": "Australian Eastern Standard Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "HEOG": "West Greenland Summer Time", "AWST": "Australian Western Standard Time", "HKST": "Hong Kong Summer Time", "BOT": "Bolivia Time", "EDT": "Eastern Daylight Time", "WAT": "West Africa Standard Time", "SRT": "Suriname Time", "WESZ": "Western European Summer Time", "MEZ": "Central European Standard Time", "LHST": "Lord Howe Standard Time", "IST": "India Standard Time", "∅∅∅": "Amazon Summer Time", "JDT": "Japan Daylight Time", "OEZ": "Eastern European Standard Time", "CHAST": "Chatham Standard Time", "ChST": "Chamorro Standard Time", "EST": "Eastern Standard Time", "ACWDT": "Australian Central Western Daylight Time", "PST": "Pacific Standard Time", "NZDT": "New Zealand Daylight Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "MYT": "Malaysia Time", "HECU": "Cuba Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "BT": "Bhutan Time", "WEZ": "Western European Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "MESZ": "Central European Summer Time", "CLT": "Chile Standard Time", "HNEG": "East Greenland Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "ART": "Argentina Standard Time", "COST": "Colombia Summer Time", "HEEG": "East Greenland Summer Time", "VET": "Venezuela Time", "PDT": "Pacific Daylight Time", "HAT": "Newfoundland Daylight Time", "ARST": "Argentina Summer Time", "WITA": "Central Indonesia Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "ACST": "Australian Central Standard Time", "ACDT": "Australian Central Daylight Time", "CDT": "Central Daylight Time", "CLST": "Chile Summer Time", "JST": "Japan Standard Time", "GFT": "French Guiana Time", "WART": "Western Argentina Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "AKST": "Alaska Standard Time", "ADT": "Atlantic Daylight Time", "HNOG": "West Greenland Standard Time", "AWDT": "Australian Western Daylight Time", "WAST": "West Africa Summer Time", "ECT": "Ecuador Time", "WARST": "Western Argentina Summer Time", "COT": "Colombia Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "MST": "Mountain Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "UYT": "Uruguay Standard Time", "HKT": "Hong Kong Standard Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "UYST": "Uruguay Summer Time", "GYT": "Guyana Time", "AEDT": "Australian Eastern Daylight Time", "EAT": "East Africa Time", "OESZ": "Eastern European Summer Time", "GMT": "Greenwich Mean Time", "HNPMX": "Mexican Pacific Standard Time", "CST": "Central Standard Time", "WIT": "Eastern Indonesia Time", "TMST": "Turkmenistan Summer Time", "AST": "Atlantic Standard Time"}, -+ locale: "en_TO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "T$", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "CLT": "CLT", "BOT": "BOT", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "AKST": "AKST", "HAST": "HAST", "EDT": "EDT", "CDT": "CDT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "MST": "MST", "IST": "IST", "WITA": "WITA", "ADT": "ADT", "ACST": "ACST", "HNEG": "HNEG", "LHDT": "LHDT", "GFT": "GFT", "HADT": "HADT", "ACWST": "ACWST", "VET": "VET", "UYT": "UYT", "WAST": "WAST", "OEZ": "OEZ", "WART": "WART", "WIT": "WIT", "HENOMX": "HENOMX", "MESZ": "MESZ", "PST": "PST", "HAT": "HAT", "AEDT": "AEDT", "SGT": "SGT", "OESZ": "OESZ", "COT": "COT", "MDT": "MDT", "LHST": "LHST", "HEPM": "HEPM", "JST": "JST", "CHAST": "CHAST", "AKDT": "AKDT", "MYT": "MYT", "AWDT": "AWDT", "AEST": "AEST", "GYT": "GYT", "SAST": "SAST", "GMT": "GMT", "ART": "ART", "EAT": "EAT", "HNCU": "HNCU", "WAT": "WAT", "HNPMX": "HNPMX", "WEZ": "WEZ", "WARST": "WARST", "HKT": "HKT", "CLST": "CLST", "ACDT": "ACDT", "HEEG": "HEEG", "JDT": "JDT", "WIB": "WIB", "CST": "CST", "HEOG": "HEOG", "NZST": "NZST", "UYST": "UYST", "TMT": "TMT", "HNOG": "HNOG", "TMST": "TMST", "CAT": "CAT", "ECT": "ECT", "ChST": "ChST", "AWST": "AWST", "HECU": "HECU", "COST": "COST", "SRT": "SRT", "ARST": "ARST", "HKST": "HKST", "AST": "AST", "MEZ": "MEZ", "BT": "BT", "CHADT": "CHADT", "EST": "EST", "NZDT": "NZDT", "PDT": "PDT", "HEPMX": "HEPMX", "WESZ": "WESZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_TO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_TO) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_TO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_TO) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_TO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_TO) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_TO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_TO' and handles both Whole and Real numbers based on 'v' - func (en *en_TO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_TO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_TO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_TO' -@@ -278,56 +195,7 @@ func (en *en_TO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_TO' -@@ -336,84 +204,33 @@ func (en *en_TO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_TO' -+func (en *en_TO) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_TO' --func (en *en_TO) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_TO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_TO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_TO) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_TO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_TO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_TO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_TO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_TT/en_TT.go b/en_TT/en_TT.go -index 267c50b..88522f3 100644 ---- a/en_TT/en_TT.go -+++ b/en_TT/en_TT.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_TT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_TT' locale - func New() locales.Translator { - return &en_TT{ -- locale: "en_TT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "$", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HEPMX": "Mexican Pacific Daylight Time", "PDT": "Pacific Daylight Time", "WESZ": "Western European Summer Time", "ACWDT": "Australian Central Western Daylight Time", "TMT": "Turkmenistan Standard Time", "HEEG": "East Greenland Summer Time", "NZST": "New Zealand Standard Time", "CLT": "Chile Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "AKDT": "Alaska Daylight Time", "ACWST": "Australian Central Western Standard Time", "LHST": "Lord Howe Standard Time", "EDT": "Eastern Daylight Time", "MDT": "Macau Summer Time", "VET": "Venezuela Time", "AWST": "Australian Western Standard Time", "WITA": "Central Indonesia Time", "SAST": "South Africa Standard Time", "EAT": "East Africa Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "COST": "Colombia Summer Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "CST": "Central Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "IST": "India Standard Time", "WAST": "West Africa Summer Time", "AKST": "Alaska Standard Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "BOT": "Bolivia Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "GMT": "Greenwich Mean Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CLST": "Chile Summer Time", "GFT": "French Guiana Time", "AWDT": "Australian Western Daylight Time", "CHADT": "Chatham Daylight Time", "HNCU": "Cuba Standard Time", "HKST": "Hong Kong Summer Time", "∅∅∅": "Azores Summer Time", "PST": "Pacific Standard Time", "MEZ": "Central European Standard Time", "ACST": "Australian Central Standard Time", "HECU": "Cuba Daylight Time", "WIB": "Western Indonesia Time", "HAT": "Newfoundland Daylight Time", "AEST": "Australian Eastern Standard Time", "NZDT": "New Zealand Daylight Time", "JDT": "Japan Daylight Time", "TMST": "Turkmenistan Summer Time", "CAT": "Central Africa Time", "SGT": "Singapore Standard Time", "GYT": "Guyana Time", "CDT": "Central Daylight Time", "WEZ": "Western European Standard Time", "HNT": "Newfoundland Standard Time", "CHAST": "Chatham Standard Time", "WAT": "West Africa Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "WIT": "Eastern Indonesia Time", "HKT": "Hong Kong Standard Time", "MESZ": "Central European Summer Time", "JST": "Japan Standard Time", "ChST": "Chamorro Standard Time", "HNEG": "East Greenland Standard Time", "HNOG": "West Greenland Standard Time", "WARST": "Western Argentina Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "MST": "Macau Standard Time", "ADT": "Atlantic Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "SRT": "Suriname Time", "LHDT": "Lord Howe Daylight Time", "EST": "Eastern Standard Time", "OEZ": "Eastern European Standard Time", "UYT": "Uruguay Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HEOG": "West Greenland Summer Time", "ACDT": "Australian Central Daylight Time"}, -+ locale: "en_TT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "$", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WART": "WART", "COST": "COST", "NZDT": "NZDT", "UYT": "UYT", "PDT": "PDT", "AEST": "AEST", "EDT": "EDT", "CST": "CST", "ECT": "ECT", "WIB": "WIB", "BOT": "BOT", "ACDT": "ACDT", "LHDT": "LHDT", "HEPM": "HEPM", "SRT": "SRT", "TMT": "TMT", "HNPM": "HNPM", "JDT": "JDT", "HNT": "HNT", "ARST": "ARST", "MEZ": "MEZ", "AWST": "AWST", "AST": "AST", "WIT": "WIT", "SAST": "SAST", "CLST": "CLST", "ACWST": "ACWST", "VET": "VET", "HEPMX": "HEPMX", "OESZ": "OESZ", "EST": "EST", "HKT": "HKT", "MDT": "MDT", "∅∅∅": "∅∅∅", "CHAST": "CHAST", "HNCU": "HNCU", "ACST": "ACST", "HNEG": "HNEG", "BT": "BT", "HADT": "HADT", "MYT": "MYT", "OEZ": "OEZ", "WARST": "WARST", "GYT": "GYT", "HKST": "HKST", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "GFT": "GFT", "CLT": "CLT", "CDT": "CDT", "MST": "MST", "EAT": "EAT", "UYST": "UYST", "IST": "IST", "HAT": "HAT", "CAT": "CAT", "JST": "JST", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "AKST": "AKST", "TMST": "TMST", "ADT": "ADT", "ART": "ART", "MESZ": "MESZ", "AEDT": "AEDT", "WEZ": "WEZ", "HNOG": "HNOG", "ChST": "ChST", "HEEG": "HEEG", "HECU": "HECU", "WAST": "WAST", "AWDT": "AWDT", "SGT": "SGT", "PST": "PST", "CHADT": "CHADT", "AKDT": "AKDT", "WITA": "WITA", "NZST": "NZST", "HAST": "HAST", "HENOMX": "HENOMX", "LHST": "LHST", "GMT": "GMT", "WAT": "WAT", "COT": "COT", "HEOG": "HEOG"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_TT) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_TT) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_TT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_TT) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_TT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_TT) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_TT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_TT) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_TT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_TT' and handles both Whole and Real numbers based on 'v' - func (en *en_TT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_TT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_TT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_TT' -@@ -278,56 +195,7 @@ func (en *en_TT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_TT' -@@ -336,84 +204,33 @@ func (en *en_TT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_TT' -+func (en *en_TT) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_TT' --func (en *en_TT) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_TT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_TT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_TT) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_TT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_TT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_TT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_TT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_TV/en_TV.go b/en_TV/en_TV.go -index f1e869d..4f0f9b1 100644 ---- a/en_TV/en_TV.go -+++ b/en_TV/en_TV.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_TV struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_TV' locale - func New() locales.Translator { - return &en_TV{ -- locale: "en_TV", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"COST": "Colombia Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "ADT": "Atlantic Daylight Time", "WIB": "Western Indonesia Time", "JST": "Japan Standard Time", "HNEG": "East Greenland Standard Time", "ECT": "Ecuador Time", "WART": "Western Argentina Standard Time", "WIT": "Eastern Indonesia Time", "ARST": "Argentina Summer Time", "AEST": "Australian Eastern Standard Time", "VET": "Venezuela Time", "LHDT": "Lord Howe Daylight Time", "SAST": "South Africa Standard Time", "EAT": "East Africa Time", "COT": "Colombia Standard Time", "AST": "Atlantic Standard Time", "AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "WESZ": "Western European Summer Time", "AWDT": "Australian Western Daylight Time", "WAT": "West Africa Standard Time", "MDT": "Macau Summer Time", "GYT": "Guyana Time", "CDT": "Central Daylight Time", "PDT": "Pacific Daylight Time", "HECU": "Cuba Daylight Time", "AKST": "Alaska Standard Time", "WEZ": "Western European Standard Time", "CHADT": "Chatham Daylight Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "SGT": "Singapore Standard Time", "JDT": "Japan Daylight Time", "HNOG": "West Greenland Standard Time", "HNT": "Newfoundland Standard Time", "ART": "Argentina Standard Time", "MESZ": "Central European Summer Time", "TMT": "Turkmenistan Standard Time", "WAST": "West Africa Summer Time", "ACWDT": "Australian Central Western Daylight Time", "SRT": "Suriname Time", "WITA": "Central Indonesia Time", "CLST": "Chile Summer Time", "TMST": "Turkmenistan Summer Time", "OEZ": "Eastern European Standard Time", "MST": "Macau Standard Time", "HEEG": "East Greenland Summer Time", "ACDT": "Australian Central Daylight Time", "MYT": "Malaysia Time", "HAT": "Newfoundland Daylight Time", "MEZ": "Central European Standard Time", "NZST": "New Zealand Standard Time", "CHAST": "Chatham Standard Time", "IST": "India Standard Time", "UYT": "Uruguay Standard Time", "UYST": "Uruguay Summer Time", "CST": "Central Standard Time", "HKT": "Hong Kong Standard Time", "NZDT": "New Zealand Daylight Time", "BOT": "Bolivia Time", "OESZ": "Eastern European Summer Time", "HNCU": "Cuba Standard Time", "GFT": "French Guiana Time", "HNPMX": "Mexican Pacific Standard Time", "BT": "Bhutan Time", "AEDT": "Australian Eastern Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "∅∅∅": "Amazon Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "PST": "Pacific Standard Time", "ChST": "Chamorro Standard Time", "ACWST": "Australian Central Western Standard Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "GMT": "Greenwich Mean Time", "EST": "Eastern Standard Time", "EDT": "Eastern Daylight Time", "HEOG": "West Greenland Summer Time", "LHST": "Lord Howe Standard Time", "CLT": "Chile Standard Time", "WARST": "Western Argentina Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HKST": "Hong Kong Summer Time"}, -+ locale: "en_TV", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "NZST": "NZST", "HAST": "HAST", "MYT": "MYT", "JST": "JST", "HAT": "HAT", "TMST": "TMST", "ChST": "ChST", "PDT": "PDT", "AEST": "AEST", "WARST": "WARST", "EST": "EST", "MST": "MST", "OESZ": "OESZ", "WART": "WART", "HKT": "HKT", "HECU": "HECU", "GFT": "GFT", "COST": "COST", "EAT": "EAT", "LHDT": "LHDT", "BT": "BT", "ACWST": "ACWST", "AEDT": "AEDT", "HKST": "HKST", "HADT": "HADT", "PST": "PST", "WEZ": "WEZ", "SRT": "SRT", "ACST": "ACST", "WESZ": "WESZ", "WIT": "WIT", "AST": "AST", "BOT": "BOT", "EDT": "EDT", "HENOMX": "HENOMX", "UYT": "UYT", "WAT": "WAT", "GYT": "GYT", "SAST": "SAST", "HEOG": "HEOG", "CLT": "CLT", "CAT": "CAT", "HEPM": "HEPM", "AWST": "AWST", "SGT": "SGT", "OEZ": "OEZ", "HNOG": "HNOG", "GMT": "GMT", "ADT": "ADT", "MEZ": "MEZ", "HNPM": "HNPM", "JDT": "JDT", "ACWDT": "ACWDT", "MESZ": "MESZ", "WAST": "WAST", "TMT": "TMT", "ART": "ART", "HEEG": "HEEG", "WIB": "WIB", "VET": "VET", "WITA": "WITA", "MDT": "MDT", "HNNOMX": "HNNOMX", "LHST": "LHST", "CHADT": "CHADT", "UYST": "UYST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "AWDT": "AWDT", "HNPMX": "HNPMX", "HNT": "HNT", "ECT": "ECT", "NZDT": "NZDT", "CST": "CST", "CDT": "CDT", "CHAST": "CHAST", "HNCU": "HNCU", "HEPMX": "HEPMX", "AKDT": "AKDT", "COT": "COT", "ACDT": "ACDT", "IST": "IST", "AKST": "AKST", "ARST": "ARST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_TV) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_TV) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_TV) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_TV) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_TV) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_TV) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_TV) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_TV' and handles both Whole and Real numbers based on 'v' - func (en *en_TV) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_TV' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_TV) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_TV' -@@ -278,56 +195,7 @@ func (en *en_TV) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_TV' -@@ -336,84 +204,33 @@ func (en *en_TV) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_TV' -+func (en *en_TV) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_TV' --func (en *en_TV) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_TV) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_TV) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_TV) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_TZ/en_TZ.go b/en_TZ/en_TZ.go -index f7a0726..e18d2f6 100644 ---- a/en_TZ/en_TZ.go -+++ b/en_TZ/en_TZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_TZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_TZ' locale - func New() locales.Translator { - return &en_TZ{ -- locale: "en_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TSh", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"UYST": "Uruguay Summer Time", "HNOG": "West Greenland Standard Time", "IST": "India Standard Time", "OEZ": "Eastern European Standard Time", "ACST": "Australian Central Standard Time", "AEST": "Australian Eastern Standard Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "VET": "Venezuela Time", "HAST": "Hawaii-Aleutian Standard Time", "NZDT": "New Zealand Daylight Time", "BOT": "Bolivia Time", "OESZ": "Eastern European Summer Time", "AWDT": "Australian Western Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "MYT": "Malaysia Time", "UYT": "Uruguay Standard Time", "HKST": "Hong Kong Summer Time", "AEDT": "Australian Eastern Daylight Time", "CHAST": "Chatham Standard Time", "JST": "Japan Standard Time", "ChST": "Chamorro Standard Time", "AKDT": "Alaska Daylight Time", "CHADT": "Chatham Daylight Time", "HEEG": "East Greenland Summer Time", "MDT": "Macau Summer Time", "ADT": "Atlantic Daylight Time", "ACWST": "Australian Central Western Standard Time", "ARST": "Argentina Summer Time", "PDT": "Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "WART": "Western Argentina Standard Time", "EAT": "East Africa Time", "WARST": "Western Argentina Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "GYT": "Guyana Time", "HNEG": "East Greenland Standard Time", "TMT": "Turkmenistan Standard Time", "ACWDT": "Australian Central Western Daylight Time", "HNT": "Newfoundland Standard Time", "WAT": "West Africa Standard Time", "HNCU": "Cuba Standard Time", "AKST": "Alaska Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "MESZ": "Central European Summer Time", "CLT": "Chile Standard Time", "COST": "Colombia Summer Time", "WEZ": "Western European Standard Time", "HAT": "Newfoundland Daylight Time", "CAT": "Central Africa Time", "BT": "Bhutan Time", "PST": "Pacific Standard Time", "WITA": "Central Indonesia Time", "ACDT": "Australian Central Daylight Time", "ECT": "Ecuador Time", "WIB": "Western Indonesia Time", "LHDT": "Lord Howe Daylight Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "SGT": "Singapore Standard Time", "GMT": "Greenwich Mean Time", "MST": "Macau Standard Time", "EST": "Eastern Standard Time", "WIT": "Eastern Indonesia Time", "MEZ": "Central European Standard Time", "CLST": "Chile Summer Time", "TMST": "Turkmenistan Summer Time", "HECU": "Cuba Daylight Time", "WESZ": "Western European Summer Time", "ART": "Argentina Standard Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "GFT": "French Guiana Time", "WAST": "West Africa Summer Time", "EDT": "Eastern Daylight Time", "SRT": "Suriname Time", "HEOG": "West Greenland Summer Time", "HKT": "Hong Kong Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "∅∅∅": "Amazon Summer Time", "COT": "Colombia Standard Time"}, -+ locale: "en_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TSh", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EST": "EST", "ACST": "ACST", "HNPM": "HNPM", "PST": "PST", "HNCU": "HNCU", "WESZ": "WESZ", "HAT": "HAT", "WARST": "WARST", "ECT": "ECT", "∅∅∅": "∅∅∅", "TMST": "TMST", "GMT": "GMT", "JST": "JST", "JDT": "JDT", "HECU": "HECU", "HNPMX": "HNPMX", "WART": "WART", "HKT": "HKT", "CST": "CST", "OESZ": "OESZ", "GYT": "GYT", "HNEG": "HNEG", "HENOMX": "HENOMX", "AEDT": "AEDT", "IST": "IST", "OEZ": "OEZ", "CDT": "CDT", "CLT": "CLT", "NZST": "NZST", "NZDT": "NZDT", "MST": "MST", "MEZ": "MEZ", "ACWDT": "ACWDT", "EDT": "EDT", "HKST": "HKST", "EAT": "EAT", "WEZ": "WEZ", "COST": "COST", "HEOG": "HEOG", "SRT": "SRT", "WIT": "WIT", "TMT": "TMT", "MDT": "MDT", "UYT": "UYT", "AKDT": "AKDT", "WITA": "WITA", "WIB": "WIB", "CAT": "CAT", "ChST": "ChST", "HEPMX": "HEPMX", "HNOG": "HNOG", "SAST": "SAST", "ADT": "ADT", "HADT": "HADT", "ACDT": "ACDT", "MYT": "MYT", "HNT": "HNT", "ART": "ART", "LHDT": "LHDT", "CHADT": "CHADT", "COT": "COT", "ARST": "ARST", "PDT": "PDT", "WAST": "WAST", "HNNOMX": "HNNOMX", "AEST": "AEST", "UYST": "UYST", "AKST": "AKST", "HEEG": "HEEG", "LHST": "LHST", "HAST": "HAST", "HEPM": "HEPM", "AWST": "AWST", "BT": "BT", "CHAST": "CHAST", "AST": "AST", "BOT": "BOT", "MESZ": "MESZ", "AWDT": "AWDT", "ACWST": "ACWST", "VET": "VET", "SGT": "SGT", "WAT": "WAT", "GFT": "GFT", "CLST": "CLST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_TZ) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_TZ) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_TZ) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_TZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_TZ' and handles both Whole and Real numbers based on 'v' - func (en *en_TZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_TZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_TZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_TZ' -@@ -278,56 +195,7 @@ func (en *en_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_TZ' -@@ -336,84 +204,33 @@ func (en *en_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_TZ' -+func (en *en_TZ) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_TZ' --func (en *en_TZ) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_TZ) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_UG/en_UG.go b/en_UG/en_UG.go -index 91afed6..91f1887 100644 ---- a/en_UG/en_UG.go -+++ b/en_UG/en_UG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_UG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_UG' locale - func New() locales.Translator { - return &en_UG{ -- locale: "en_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "USh", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"LHDT": "Lord Howe Daylight Time", "OEZ": "Eastern European Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "HKST": "Hong Kong Summer Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "MEZ": "Central European Standard Time", "AKST": "Alaska Standard Time", "WIT": "Eastern Indonesia Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "NZDT": "New Zealand Daylight Time", "HECU": "Cuba Daylight Time", "EST": "Eastern Standard Time", "HNT": "Newfoundland Standard Time", "MESZ": "Central European Summer Time", "CLT": "Chile Standard Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "VET": "Venezuela Time", "JST": "Japan Standard Time", "CLST": "Chile Summer Time", "GFT": "French Guiana Time", "OESZ": "Eastern European Summer Time", "BT": "Bhutan Time", "CHAST": "Chatham Standard Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "UYST": "Uruguay Summer Time", "LHST": "Lord Howe Standard Time", "ACST": "Australian Central Standard Time", "MYT": "Malaysia Time", "AWDT": "Australian Western Daylight Time", "SAST": "South Africa Standard Time", "WART": "Western Argentina Standard Time", "ChST": "Chamorro Standard Time", "GYT": "Guyana Time", "SRT": "Suriname Time", "ACWST": "Australian Central Western Standard Time", "HNOG": "West Greenland Standard Time", "WEZ": "Western European Standard Time", "TMT": "Turkmenistan Standard Time", "WESZ": "Western European Summer Time", "WITA": "Central Indonesia Time", "HNEG": "East Greenland Standard Time", "WAST": "West Africa Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "HNCU": "Cuba Standard Time", "PST": "Pacific Standard Time", "∅∅∅": "Amazon Summer Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "WAT": "West Africa Standard Time", "HEOG": "West Greenland Summer Time", "PDT": "Pacific Daylight Time", "EDT": "Eastern Daylight Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "MST": "Mountain Standard Time", "NZST": "New Zealand Standard Time", "UYT": "Uruguay Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CHADT": "Chatham Daylight Time", "HEEG": "East Greenland Summer Time", "ECT": "Ecuador Time", "AST": "Atlantic Standard Time", "TMST": "Turkmenistan Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "AKDT": "Alaska Daylight Time", "WIB": "Western Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "AEDT": "Australian Eastern Daylight Time", "IST": "India Standard Time", "JDT": "Japan Daylight Time", "ADT": "Atlantic Daylight Time", "MDT": "Mountain Daylight Time", "HKT": "Hong Kong Standard Time", "AEST": "Australian Eastern Standard Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time"}, -+ locale: "en_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "USh", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SGT": "SGT", "WAT": "WAT", "HNOG": "HNOG", "TMST": "TMST", "CAT": "CAT", "CLT": "CLT", "HNEG": "HNEG", "PST": "PST", "HKST": "HKST", "SRT": "SRT", "∅∅∅": "∅∅∅", "VET": "VET", "AKST": "AKST", "WART": "WART", "WIT": "WIT", "HKT": "HKT", "LHST": "LHST", "ACWDT": "ACWDT", "HADT": "HADT", "BT": "BT", "UYT": "UYT", "WEZ": "WEZ", "HNCU": "HNCU", "HEPMX": "HEPMX", "BOT": "BOT", "CHADT": "CHADT", "WAST": "WAST", "ACWST": "ACWST", "OEZ": "OEZ", "GYT": "GYT", "MST": "MST", "AST": "AST", "GMT": "GMT", "MESZ": "MESZ", "LHDT": "LHDT", "IST": "IST", "OESZ": "OESZ", "CLST": "CLST", "ECT": "ECT", "ChST": "ChST", "HENOMX": "HENOMX", "AWDT": "AWDT", "UYST": "UYST", "ARST": "ARST", "AKDT": "AKDT", "HAT": "HAT", "EAT": "EAT", "ACST": "ACST", "JDT": "JDT", "EDT": "EDT", "CDT": "CDT", "ACDT": "ACDT", "HEEG": "HEEG", "AEST": "AEST", "HNPMX": "HNPMX", "CHAST": "CHAST", "HECU": "HECU", "WIB": "WIB", "HAST": "HAST", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "AWST": "AWST", "PDT": "PDT", "WARST": "WARST", "COST": "COST", "HEOG": "HEOG", "CST": "CST", "HNPM": "HNPM", "EST": "EST", "TMT": "TMT", "WITA": "WITA", "JST": "JST", "AEDT": "AEDT", "GFT": "GFT", "SAST": "SAST", "COT": "COT", "MDT": "MDT", "NZDT": "NZDT", "HEPM": "HEPM", "HNT": "HNT", "NZST": "NZST", "ADT": "ADT", "ART": "ART", "MYT": "MYT", "WESZ": "WESZ"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_UG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_UG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_UG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_UG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_UG' and handles both Whole and Real numbers based on 'v' - func (en *en_UG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_UG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_UG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_UG' -@@ -278,56 +195,7 @@ func (en *en_UG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_UG' -@@ -336,84 +204,33 @@ func (en *en_UG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_UG' -+func (en *en_UG) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_UG' --func (en *en_UG) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_UG) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -diff --git a/en_UM/en_UM.go b/en_UM/en_UM.go -index 5403639..2efaeac 100644 ---- a/en_UM/en_UM.go -+++ b/en_UM/en_UM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_UM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_UM' locale - func New() locales.Translator { - return &en_UM{ -- locale: "en_UM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNPMX": "Mexican Pacific Standard Time", "ADT": "Atlantic Daylight Time", "ACWST": "Australian Central Western Standard Time", "AWDT": "Australian Western Daylight Time", "HECU": "Cuba Daylight Time", "OEZ": "Eastern European Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "UYST": "Uruguay Summer Time", "AST": "Atlantic Standard Time", "JST": "Japan Standard Time", "HEEG": "East Greenland Summer Time", "GFT": "French Guiana Time", "WAT": "West Africa Standard Time", "OESZ": "Eastern European Summer Time", "HAT": "Newfoundland Daylight Time", "NZDT": "New Zealand Daylight Time", "SAST": "South Africa Standard Time", "MESZ": "Central European Summer Time", "LHDT": "Lord Howe Daylight Time", "IST": "India Standard Time", "WART": "Western Argentina Standard Time", "EDT": "Eastern Daylight Time", "BT": "Bhutan Time", "PST": "Pacific Standard Time", "HEOG": "West Greenland Summer Time", "MST": "Macau Standard Time", "UYT": "Uruguay Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "TMST": "Turkmenistan Summer Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "HNEG": "East Greenland Standard Time", "EST": "Eastern Standard Time", "WESZ": "Western European Summer Time", "HKST": "Hong Kong Summer Time", "CHADT": "Chatham Daylight Time", "MEZ": "Central European Standard Time", "ChST": "Chamorro Standard Time", "EAT": "East Africa Time", "GYT": "Guyana Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "HKT": "Hong Kong Standard Time", "AKDT": "Alaska Daylight Time", "CLST": "Chile Summer Time", "∅∅∅": "Amazon Summer Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "AEDT": "Australian Eastern Daylight Time", "NZST": "New Zealand Standard Time", "CLT": "Chile Standard Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "COT": "Colombia Standard Time", "GMT": "Greenwich Mean Time", "MYT": "Malaysia Time", "WEZ": "Western European Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CHAST": "Chatham Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNT": "Newfoundland Standard Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "TMT": "Turkmenistan Standard Time", "CDT": "Central Daylight Time", "WAST": "West Africa Summer Time", "MDT": "Macau Summer Time", "AKST": "Alaska Standard Time", "CST": "Central Standard Time", "WIB": "Western Indonesia Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "WITA": "Central Indonesia Time", "LHST": "Lord Howe Standard Time", "JDT": "Japan Daylight Time", "ECT": "Ecuador Time", "WIT": "Eastern Indonesia Time", "PDT": "Pacific Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "BOT": "Bolivia Time", "ACDT": "Australian Central Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "VET": "Venezuela Time", "SRT": "Suriname Time", "AEST": "Australian Eastern Standard Time"}, -+ locale: "en_UM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "LHST": "LHST", "LHDT": "LHDT", "AEDT": "AEDT", "CHAST": "CHAST", "CHADT": "CHADT", "HEOG": "HEOG", "MESZ": "MESZ", "GMT": "GMT", "COT": "COT", "ACST": "ACST", "HNPMX": "HNPMX", "AKST": "AKST", "GFT": "GFT", "HAT": "HAT", "WART": "WART", "HKST": "HKST", "BOT": "BOT", "NZST": "NZST", "ARST": "ARST", "WIB": "WIB", "SRT": "SRT", "HNPM": "HNPM", "HEPM": "HEPM", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "IST": "IST", "WAST": "WAST", "MDT": "MDT", "EDT": "EDT", "AKDT": "AKDT", "WITA": "WITA", "PDT": "PDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "HKT": "HKT", "MEZ": "MEZ", "HENOMX": "HENOMX", "WAT": "WAT", "ECT": "ECT", "ADT": "ADT", "HAST": "HAST", "JST": "JST", "UYST": "UYST", "COST": "COST", "HADT": "HADT", "HNEG": "HNEG", "WESZ": "WESZ", "OEZ": "OEZ", "WIT": "WIT", "EAT": "EAT", "WEZ": "WEZ", "GYT": "GYT", "CDT": "CDT", "AST": "AST", "BT": "BT", "MYT": "MYT", "ACWDT": "ACWDT", "OESZ": "OESZ", "WARST": "WARST", "EST": "EST", "CLT": "CLT", "HNNOMX": "HNNOMX", "AEST": "AEST", "HNCU": "HNCU", "SGT": "SGT", "TMT": "TMT", "TMST": "TMST", "ART": "ART", "HEEG": "HEEG", "CAT": "CAT", "CLST": "CLST", "ChST": "ChST", "HECU": "HECU", "VET": "VET", "SAST": "SAST", "CST": "CST", "JDT": "JDT", "AWST": "AWST", "UYT": "UYT", "NZDT": "NZDT", "ACDT": "ACDT", "PST": "PST", "HNT": "HNT", "MST": "MST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_UM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_UM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_UM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_UM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_UM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_UM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_UM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_UM' and handles both Whole and Real numbers based on 'v' - func (en *en_UM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_UM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_UM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_UM' -@@ -278,56 +195,7 @@ func (en *en_UM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_UM' -@@ -336,68 +204,7 @@ func (en *en_UM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_UM' -@@ -405,15 +212,15 @@ func (en *en_UM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_UM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_UM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_UM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_UM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_UM) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_UM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_UM) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_UM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_UM) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_UM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_UM) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_US/en_US.go b/en_US/en_US.go -index 923a618..ee19fcc 100644 ---- a/en_US/en_US.go -+++ b/en_US/en_US.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_US struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_US' locale - func New() locales.Translator { - return &en_US{ -- locale: "en_US", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"MESZ": "Central European Summer Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "GMT": "Greenwich Mean Time", "CST": "Central Standard Time", "WEZ": "Western European Standard Time", "PDT": "Pacific Daylight Time", "WIB": "Western Indonesia Time", "ART": "Argentina Standard Time", "SAST": "South Africa Standard Time", "ACDT": "Australian Central Daylight Time", "WAT": "West Africa Standard Time", "MST": "Macau Standard Time", "CDT": "Central Daylight Time", "ADT": "Atlantic Daylight Time", "HEEG": "East Greenland Summer Time", "COST": "Colombia Summer Time", "SGT": "Singapore Standard Time", "HNPMX": "Mexican Pacific Standard Time", "GYT": "Guyana Time", "VET": "Venezuela Time", "AST": "Atlantic Standard Time", "HNOG": "West Greenland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNT": "Newfoundland Standard Time", "AWDT": "Australian Western Daylight Time", "WESZ": "Western European Summer Time", "IST": "India Standard Time", "TMT": "Turkmenistan Standard Time", "BOT": "Bolivia Time", "ACST": "Australian Central Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "PST": "Pacific Standard Time", "LHDT": "Lord Howe Daylight Time", "CLT": "Chile Standard Time", "CHAST": "Chatham Standard Time", "∅∅∅": "Amazon Summer Time", "TMST": "Turkmenistan Summer Time", "COT": "Colombia Standard Time", "WIT": "Eastern Indonesia Time", "AWST": "Australian Western Standard Time", "AEST": "Australian Eastern Standard Time", "OESZ": "Eastern European Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "HKT": "Hong Kong Standard Time", "LHST": "Lord Howe Standard Time", "EDT": "Eastern Daylight Time", "AEDT": "Australian Eastern Daylight Time", "GFT": "French Guiana Time", "NZDT": "New Zealand Daylight Time", "CHADT": "Chatham Daylight Time", "MEZ": "Central European Standard Time", "WAST": "West Africa Summer Time", "HNCU": "Cuba Standard Time", "AKDT": "Alaska Daylight Time", "BT": "Bhutan Time", "ACWST": "Australian Central Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MDT": "Macau Summer Time", "HAT": "Newfoundland Daylight Time", "WITA": "Central Indonesia Time", "ChST": "Chamorro Standard Time", "CAT": "Central Africa Time", "ACWDT": "Australian Central Western Daylight Time", "HEOG": "West Greenland Summer Time", "CLST": "Chile Summer Time", "EAT": "East Africa Time", "OEZ": "Eastern European Standard Time", "UYT": "Uruguay Standard Time", "UYST": "Uruguay Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "WART": "Western Argentina Standard Time", "HECU": "Cuba Daylight Time", "MYT": "Malaysia Time", "ARST": "Argentina Summer Time", "NZST": "New Zealand Standard Time", "HKST": "Hong Kong Summer Time", "JST": "Japan Standard Time", "ECT": "Ecuador Time", "HNNOMX": "Northwest Mexico Standard Time", "WARST": "Western Argentina Summer Time", "EST": "Eastern Standard Time", "AKST": "Alaska Standard Time", "SRT": "Suriname Time"}, -+ locale: "en_US", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKT": "HKT", "CLT": "CLT", "CHADT": "CHADT", "UYT": "UYT", "UYST": "UYST", "HNPMX": "HNPMX", "GYT": "GYT", "EDT": "EDT", "MST": "MST", "ART": "ART", "HNT": "HNT", "COST": "COST", "TMT": "TMT", "SRT": "SRT", "ACWST": "ACWST", "VET": "VET", "OESZ": "OESZ", "WIB": "WIB", "CDT": "CDT", "ChST": "ChST", "LHST": "LHST", "AEST": "AEST", "CHAST": "CHAST", "AKDT": "AKDT", "OEZ": "OEZ", "WIT": "WIT", "AST": "AST", "IST": "IST", "WAT": "WAT", "CST": "CST", "NZDT": "NZDT", "HEPM": "HEPM", "ACST": "ACST", "HNEG": "HNEG", "AEDT": "AEDT", "SGT": "SGT", "AKST": "AKST", "GFT": "GFT", "HAT": "HAT", "BOT": "BOT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "MYT": "MYT", "BT": "BT", "CLST": "CLST", "HENOMX": "HENOMX", "HNPM": "HNPM", "JST": "JST", "WAST": "WAST", "COT": "COT", "JDT": "JDT", "AWDT": "AWDT", "WESZ": "WESZ", "CAT": "CAT", "ECT": "ECT", "ADT": "ADT", "MESZ": "MESZ", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "SAST": "SAST", "MDT": "MDT", "NZST": "NZST", "HAST": "HAST", "PST": "PST", "WARST": "WARST", "EST": "EST", "GMT": "GMT", "EAT": "EAT", "HADT": "HADT", "ACDT": "ACDT", "AWST": "AWST", "HNOG": "HNOG", "HKST": "HKST", "WITA": "WITA", "MEZ": "MEZ", "PDT": "PDT", "HEPMX": "HEPMX", "HEOG": "HEOG", "TMST": "TMST", "ACWDT": "ACWDT", "HNCU": "HNCU", "HECU": "HECU", "WART": "WART", "ARST": "ARST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_US) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_US) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_US) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_US) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_US) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_US) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_US) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_US' and handles both Whole and Real numbers based on 'v' - func (en *en_US) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_US' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_US) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_US' -@@ -278,56 +195,7 @@ func (en *en_US) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_US' -@@ -336,68 +204,7 @@ func (en *en_US) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_US' -@@ -405,15 +212,15 @@ func (en *en_US) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_US) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_US) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_US) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_US) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_US) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_US) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_US) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_US) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_US) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_US) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_US) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_US_POSIX/en_US_POSIX.go b/en_US_POSIX/en_US_POSIX.go -index 61f8489..982865c 100644 ---- a/en_US_POSIX/en_US_POSIX.go -+++ b/en_US_POSIX/en_US_POSIX.go -@@ -48,30 +48,13 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", - perMille: "0/00", - timeSeparator: ":", - inifinity: "INF", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"CHADT": "Chatham Daylight Time", "COST": "Colombia Summer Time", "UYT": "Uruguay Standard Time", "AKDT": "Alaska Daylight Time", "MST": "Mountain Standard Time", "AEST": "Australian Eastern Standard Time", "AWST": "Australian Western Standard Time", "WITA": "Central Indonesia Time", "UYST": "Uruguay Summer Time", "ACWST": "Australian Central Western Standard Time", "ECT": "Ecuador Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "HECU": "Cuba Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "NZDT": "New Zealand Daylight Time", "HNEG": "East Greenland Standard Time", "COT": "Colombia Standard Time", "EST": "Eastern Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CST": "Central Standard Time", "HNOG": "West Greenland Standard Time", "ACDT": "Australian Central Daylight Time", "AST": "Atlantic Standard Time", "HKST": "Hong Kong Summer Time", "HNT": "Newfoundland Standard Time", "WESZ": "Western European Summer Time", "LHDT": "Lord Howe Daylight Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "AEDT": "Australian Eastern Daylight Time", "VET": "Venezuela Time", "NZST": "New Zealand Standard Time", "BOT": "Bolivia Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "WIB": "Western Indonesia Time", "WEZ": "Western European Standard Time", "MESZ": "Central European Summer Time", "CLT": "Chile Standard Time", "CLST": "Chile Summer Time", "WAST": "West Africa Summer Time", "GYT": "Guyana Time", "HADT": "Hawaii-Aleutian Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "TMST": "Turkmenistan Summer Time", "CDT": "Central Daylight Time", "ARST": "Argentina Summer Time", "SRT": "Suriname Time", "AWDT": "Australian Western Daylight Time", "ACST": "Australian Central Standard Time", "MDT": "Mountain Daylight Time", "CHAST": "Chatham Standard Time", "TMT": "Turkmenistan Standard Time", "CAT": "Central Africa Time", "WAT": "West Africa Standard Time", "HNCU": "Cuba Standard Time", "WIT": "Eastern Indonesia Time", "HEOG": "West Greenland Summer Time", "LHST": "Lord Howe Standard Time", "IST": "India Standard Time", "WARST": "Western Argentina Summer Time", "AKST": "Alaska Standard Time", "BT": "Bhutan Time", "ACWDT": "Australian Central Western Daylight Time", "EDT": "Eastern Daylight Time", "ADT": "Atlantic Daylight Time", "MYT": "Malaysia Time", "PST": "Pacific Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "ChST": "Chamorro Standard Time", "HEEG": "East Greenland Summer Time", "OEZ": "Eastern European Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "ART": "Argentina Standard Time", "HAT": "Newfoundland Daylight Time", "HKT": "Hong Kong Standard Time", "MEZ": "Central European Standard Time", "JDT": "Japan Daylight Time", "∅∅∅": "Amazon Summer Time", "GFT": "French Guiana Time", "HENOMX": "Northwest Mexico Daylight Time", "PDT": "Pacific Daylight Time"}, -+ timezones: map[string]string{"VET": "VET", "HECU": "HECU", "WIT": "WIT", "SAST": "SAST", "GYT": "GYT", "EAT": "EAT", "ACDT": "ACDT", "AEST": "AEST", "EDT": "EDT", "MDT": "MDT", "ARST": "ARST", "AWDT": "AWDT", "EST": "EST", "HAT": "HAT", "ChST": "ChST", "HAST": "HAST", "JST": "JST", "ACWST": "ACWST", "WESZ": "WESZ", "AKDT": "AKDT", "WARST": "WARST", "HKST": "HKST", "CAT": "CAT", "ACST": "ACST", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "CLST": "CLST", "NZDT": "NZDT", "HNPMX": "HNPMX", "WAT": "WAT", "AKST": "AKST", "WITA": "WITA", "LHST": "LHST", "PDT": "PDT", "WEZ": "WEZ", "OESZ": "OESZ", "TMST": "TMST", "SRT": "SRT", "CLT": "CLT", "MESZ": "MESZ", "HNCU": "HNCU", "WAST": "WAST", "HADT": "HADT", "MST": "MST", "OEZ": "OEZ", "CDT": "CDT", "GMT": "GMT", "HEPM": "HEPM", "CHADT": "CHADT", "BT": "BT", "CHAST": "CHAST", "WART": "WART", "TMT": "TMT", "HNOG": "HNOG", "AST": "AST", "HNT": "HNT", "HEOG": "HEOG", "ART": "ART", "HNEG": "HNEG", "HEEG": "HEEG", "LHDT": "LHDT", "HKT": "HKT", "WIB": "WIB", "MYT": "MYT", "UYST": "UYST", "GFT": "GFT", "COT": "COT", "ADT": "ADT", "HENOMX": "HENOMX", "PST": "PST", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "SGT": "SGT", "COST": "COST", "NZST": "NZST", "ECT": "ECT", "MEZ": "MEZ", "HNPM": "HNPM", "UYT": "UYT", "BOT": "BOT", "HEPMX": "HEPMX", "CST": "CST", "AWST": "AWST", "JDT": "JDT", "IST": "IST"}, - } - } -  -@@ -138,7 +121,7 @@ func (en *en_US_POSIX) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_US_POSIX) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +131,7 @@ func (en *en_US_POSIX) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_US_POSIX) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +141,7 @@ func (en *en_US_POSIX) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_US_POSIX) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -205,7 +188,7 @@ func (en *en_US_POSIX) WeekdaysWide() []string { - func (en *en_US_POSIX) FmtNumber(num float64, v uint64) string { -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 -+ l := len(s) + 0 -  - b := make([]byte, 0, l) -  -@@ -235,7 +218,7 @@ func (en *en_US_POSIX) FmtNumber(num float64, v uint64) string { - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_US_POSIX) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -267,7 +250,7 @@ func (en *en_US_POSIX) FmtCurrency(num float64, v uint64, currency currency.Type -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 -+ l := len(s) + len(symbol) + 2 -  - b := make([]byte, 0, l) -  -@@ -318,7 +301,7 @@ func (en *en_US_POSIX) FmtAccounting(num float64, v uint64, currency currency.Ty -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 -+ l := len(s) + len(symbol) + 2 -  - b := make([]byte, 0, l) -  -@@ -380,17 +363,6 @@ func (en *en_US_POSIX) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -399,17 +371,6 @@ func (en *en_US_POSIX) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -418,17 +379,6 @@ func (en *en_US_POSIX) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,19 +387,6 @@ func (en *en_US_POSIX) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,28 +395,6 @@ func (en *en_US_POSIX) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -488,35 +403,6 @@ func (en *en_US_POSIX) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -525,40 +411,6 @@ func (en *en_US_POSIX) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -567,44 +419,5 @@ func (en *en_US_POSIX) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_VC/en_VC.go b/en_VC/en_VC.go -index 2fa6c50..69b11b0 100644 ---- a/en_VC/en_VC.go -+++ b/en_VC/en_VC.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_VC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_VC' locale - func New() locales.Translator { - return &en_VC{ -- locale: "en_VC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"HNT": "Newfoundland Standard Time", "AEDT": "Australian Eastern Daylight Time", "WITA": "Central Indonesia Time", "∅∅∅": "Peru Summer Time", "WART": "Western Argentina Standard Time", "MST": "Macau Standard Time", "AST": "Atlantic Standard Time", "ACWDT": "Australian Central Western Daylight Time", "IST": "India Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "CHAST": "Chatham Standard Time", "ChST": "Chamorro Standard Time", "HNCU": "Cuba Standard Time", "AKST": "Alaska Standard Time", "PST": "Pacific Standard Time", "ACWST": "Australian Central Western Standard Time", "HEOG": "West Greenland Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "WEZ": "Western European Standard Time", "JST": "Japan Standard Time", "EAT": "East Africa Time", "GMT": "Greenwich Mean Time", "MDT": "Macau Summer Time", "UYT": "Uruguay Standard Time", "WIB": "Western Indonesia Time", "VET": "Venezuela Time", "WESZ": "Western European Summer Time", "CHADT": "Chatham Daylight Time", "HNEG": "East Greenland Standard Time", "TMST": "Turkmenistan Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "AWST": "Australian Western Standard Time", "HKST": "Hong Kong Summer Time", "NZST": "New Zealand Standard Time", "HEEG": "East Greenland Summer Time", "COT": "Colombia Standard Time", "EDT": "Eastern Daylight Time", "AKDT": "Alaska Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HNPMX": "Mexican Pacific Standard Time", "UYST": "Uruguay Summer Time", "ARST": "Argentina Summer Time", "ACDT": "Australian Central Daylight Time", "CST": "Central Standard Time", "PDT": "Pacific Daylight Time", "AWDT": "Australian Western Daylight Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "BT": "Bhutan Time", "MYT": "Malaysia Time", "CDT": "Central Daylight Time", "ADT": "Atlantic Daylight Time", "GYT": "Guyana Time", "WIT": "Eastern Indonesia Time", "SGT": "Singapore Standard Time", "HECU": "Cuba Daylight Time", "EST": "Eastern Standard Time", "MESZ": "Central European Summer Time", "CLT": "Chile Standard Time", "ECT": "Ecuador Time", "HNOG": "West Greenland Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "SAST": "South Africa Standard Time", "HKT": "Hong Kong Standard Time", "JDT": "Japan Daylight Time", "TMT": "Turkmenistan Standard Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "OEZ": "Eastern European Standard Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "ACST": "Australian Central Standard Time", "NZDT": "New Zealand Daylight Time", "CLST": "Chile Summer Time", "CAT": "Central Africa Time", "OESZ": "Eastern European Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "SRT": "Suriname Time", "HAT": "Newfoundland Daylight Time", "WARST": "Western Argentina Summer Time", "COST": "Colombia Summer Time", "MEZ": "Central European Standard Time", "LHDT": "Lord Howe Daylight Time"}, -+ locale: "en_VC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "$", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHADT": "CHADT", "GFT": "GFT", "COST": "COST", "HKST": "HKST", "CLT": "CLT", "MST": "MST", "HEEG": "HEEG", "JDT": "JDT", "ECT": "ECT", "NZST": "NZST", "ACST": "ACST", "BT": "BT", "EST": "EST", "AEST": "AEST", "MESZ": "MESZ", "PDT": "PDT", "HNPMX": "HNPMX", "AKDT": "AKDT", "HAT": "HAT", "BOT": "BOT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "AST": "AST", "WITA": "WITA", "ART": "ART", "HEPMX": "HEPMX", "WEZ": "WEZ", "AKST": "AKST", "HECU": "HECU", "WART": "WART", "CAT": "CAT", "CST": "CST", "ARST": "ARST", "MDT": "MDT", "JST": "JST", "AWST": "AWST", "MEZ": "MEZ", "AEDT": "AEDT", "WESZ": "WESZ", "AWDT": "AWDT", "HNOG": "HNOG", "NZDT": "NZDT", "WARST": "WARST", "COT": "COT", "CLST": "CLST", "GMT": "GMT", "LHST": "LHST", "OESZ": "OESZ", "WIT": "WIT", "HAST": "HAST", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "IST": "IST", "VET": "VET", "HEOG": "HEOG", "EAT": "EAT", "LHDT": "LHDT", "CHAST": "CHAST", "GYT": "GYT", "TMT": "TMT", "TMST": "TMST", "EDT": "EDT", "HENOMX": "HENOMX", "HEPM": "HEPM", "ACWDT": "ACWDT", "HNCU": "HNCU", "HNT": "HNT", "HKT": "HKT", "WIB": "WIB", "HADT": "HADT", "PST": "PST", "UYST": "UYST", "MYT": "MYT", "UYT": "UYT", "SAST": "SAST", "SGT": "SGT", "WAT": "WAT", "WAST": "WAST", "OEZ": "OEZ", "CDT": "CDT", "SRT": "SRT", "HNPM": "HNPM", "ACWST": "ACWST", "ChST": "ChST", "ADT": "ADT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_VC) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_VC) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_VC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_VC) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_VC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_VC) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_VC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_VC) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_VC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_VC' and handles both Whole and Real numbers based on 'v' - func (en *en_VC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_VC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_VC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_VC' -@@ -278,56 +195,7 @@ func (en *en_VC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_VC' -@@ -336,84 +204,33 @@ func (en *en_VC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_VC' -+func (en *en_VC) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_VC' --func (en *en_VC) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_VC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_VC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_VC) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_VC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_VC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_VC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_VC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_VG/en_VG.go b/en_VG/en_VG.go -index 0f5541a..06b9f27 100644 ---- a/en_VG/en_VG.go -+++ b/en_VG/en_VG.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_VG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_VG' locale - func New() locales.Translator { - return &en_VG{ -- locale: "en_VG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WIB": "Western Indonesia Time", "ACWDT": "Australian Central Western Daylight Time", "ART": "Argentina Standard Time", "WITA": "Central Indonesia Time", "MESZ": "Central European Summer Time", "LHDT": "Lord Howe Daylight Time", "CLST": "Chile Summer Time", "GYT": "Guyana Time", "BOT": "Bolivia Time", "AST": "Atlantic Standard Time", "VET": "Venezuela Time", "JST": "Japan Standard Time", "HEEG": "East Greenland Summer Time", "ACDT": "Australian Central Daylight Time", "∅∅∅": "Peru Summer Time", "WARST": "Western Argentina Summer Time", "HNT": "Newfoundland Standard Time", "HKST": "Hong Kong Summer Time", "NZDT": "New Zealand Daylight Time", "CHADT": "Chatham Daylight Time", "TMST": "Turkmenistan Summer Time", "CAT": "Central Africa Time", "PDT": "Pacific Daylight Time", "AEDT": "Australian Eastern Daylight Time", "ACST": "Australian Central Standard Time", "SGT": "Singapore Standard Time", "CDT": "Central Daylight Time", "EDT": "Eastern Daylight Time", "AKST": "Alaska Standard Time", "HNOG": "West Greenland Standard Time", "HKT": "Hong Kong Standard Time", "CHAST": "Chatham Standard Time", "UYT": "Uruguay Standard Time", "EST": "Eastern Standard Time", "MDT": "Macau Summer Time", "HNPMX": "Mexican Pacific Standard Time", "CST": "Central Standard Time", "HAT": "Newfoundland Daylight Time", "AWDT": "Australian Western Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "PST": "Pacific Standard Time", "CLT": "Chile Standard Time", "ADT": "Atlantic Daylight Time", "COT": "Colombia Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "AWST": "Australian Western Standard Time", "GFT": "French Guiana Time", "TMT": "Turkmenistan Standard Time", "WAT": "West Africa Standard Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "OEZ": "Eastern European Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "MYT": "Malaysia Time", "WIT": "Eastern Indonesia Time", "ECT": "Ecuador Time", "LHST": "Lord Howe Standard Time", "ChST": "Chamorro Standard Time", "HNEG": "East Greenland Standard Time", "MEZ": "Central European Standard Time", "HNCU": "Cuba Standard Time", "HECU": "Cuba Daylight Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "WESZ": "Western European Summer Time", "HEOG": "West Greenland Summer Time", "IST": "India Standard Time", "EAT": "East Africa Time", "COST": "Colombia Summer Time", "GMT": "Greenwich Mean Time", "SRT": "Suriname Time", "AEST": "Australian Eastern Standard Time", "NZST": "New Zealand Standard Time", "WART": "Western Argentina Standard Time", "OESZ": "Eastern European Summer Time", "MST": "Macau Standard Time", "WEZ": "Western European Standard Time", "ACWST": "Australian Central Western Standard Time", "ARST": "Argentina Summer Time", "WAST": "West Africa Summer Time"}, -+ locale: "en_VG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"am", "pm"}, -+ periodsWide: []string{"am", "pm"}, -+ timezones: map[string]string{"ACST": "ACST", "ACDT": "ACDT", "UYST": "UYST", "WIT": "WIT", "WIB": "WIB", "AST": "AST", "WARST": "WARST", "COST": "COST", "TMT": "TMT", "EAT": "EAT", "IST": "IST", "CLST": "CLST", "LHDT": "LHDT", "PST": "PST", "SGT": "SGT", "ChST": "ChST", "MYT": "MYT", "EST": "EST", "HNPM": "HNPM", "HEPM": "HEPM", "JST": "JST", "HECU": "HECU", "WEZ": "WEZ", "HAT": "HAT", "HKST": "HKST", "WITA": "WITA", "GMT": "GMT", "MDT": "MDT", "JDT": "JDT", "VET": "VET", "COT": "COT", "CST": "CST", "ART": "ART", "HEEG": "HEEG", "AWST": "AWST", "∅∅∅": "∅∅∅", "PDT": "PDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HEOG": "HEOG", "HADT": "HADT", "NZST": "NZST", "WAST": "WAST", "AKST": "AKST", "ACWDT": "ACWDT", "HAST": "HAST", "MEZ": "MEZ", "BT": "BT", "SRT": "SRT", "OEZ": "OEZ", "ECT": "ECT", "HNPMX": "HNPMX", "LHST": "LHST", "ACWST": "ACWST", "AEST": "AEST", "CHAST": "CHAST", "CHADT": "CHADT", "WAT": "WAT", "AKDT": "AKDT", "ARST": "ARST", "CLT": "CLT", "NZDT": "NZDT", "HNT": "HNT", "HNCU": "HNCU", "GYT": "GYT", "HKT": "HKT", "ADT": "ADT", "BOT": "BOT", "AWDT": "AWDT", "WESZ": "WESZ", "GFT": "GFT", "SAST": "SAST", "EDT": "EDT", "TMST": "TMST", "MST": "MST", "AEDT": "AEDT", "WART": "WART", "HNOG": "HNOG", "HNEG": "HNEG", "HENOMX": "HENOMX", "MESZ": "MESZ", "UYT": "UYT", "CAT": "CAT", "CDT": "CDT", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_VG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_VG) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_VG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_VG) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_VG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_VG) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +183,13 @@ func (en *en_VG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_VG' and handles both Whole and Real numbers based on 'v' - func (en *en_VG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_VG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_VG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_VG' -@@ -278,56 +197,7 @@ func (en *en_VG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_VG' -@@ -336,68 +206,7 @@ func (en *en_VG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_VG' -@@ -405,17 +214,6 @@ func (en *en_VG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +222,6 @@ func (en *en_VG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +230,6 @@ func (en *en_VG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,19 +238,6 @@ func (en *en_VG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, en.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,13 +246,11 @@ func (en *en_VG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +258,6 @@ func (en *en_VG) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +267,11 @@ func (en *en_VG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +286,6 @@ func (en *en_VG) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +295,11 @@ func (en *en_VG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +316,6 @@ func (en *en_VG) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +327,11 @@ func (en *en_VG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +348,6 @@ func (en *en_VG) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_VI/en_VI.go b/en_VI/en_VI.go -index 8bc331f..301a857 100644 ---- a/en_VI/en_VI.go -+++ b/en_VI/en_VI.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_VI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_VI' locale - func New() locales.Translator { - return &en_VI{ -- locale: "en_VI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WIT": "Eastern Indonesia Time", "WESZ": "Western European Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "ECT": "Ecuador Time", "AST": "Atlantic Standard Time", "ACST": "Australian Central Standard Time", "WAT": "West Africa Standard Time", "IST": "India Standard Time", "ACDT": "Australian Central Daylight Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "EST": "Eastern Standard Time", "UYT": "Uruguay Standard Time", "HAT": "Newfoundland Daylight Time", "LHST": "Lord Howe Standard Time", "CAT": "Central Africa Time", "HNPMX": "Mexican Pacific Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "TMT": "Turkmenistan Standard Time", "COT": "Colombia Standard Time", "WARST": "Western Argentina Summer Time", "EDT": "Eastern Daylight Time", "MST": "Macau Standard Time", "CHAST": "Chatham Standard Time", "CLT": "Chile Standard Time", "JDT": "Japan Daylight Time", "HNEG": "East Greenland Standard Time", "WAST": "West Africa Summer Time", "WIB": "Western Indonesia Time", "ACWST": "Australian Central Western Standard Time", "CHADT": "Chatham Daylight Time", "SGT": "Singapore Standard Time", "HNCU": "Cuba Standard Time", "HEOG": "West Greenland Summer Time", "CLST": "Chile Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "SAST": "South Africa Standard Time", "JST": "Japan Standard Time", "EAT": "East Africa Time", "HECU": "Cuba Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "PST": "Pacific Standard Time", "HKT": "Hong Kong Standard Time", "UYST": "Uruguay Summer Time", "AKDT": "Alaska Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "HKST": "Hong Kong Summer Time", "HEEG": "East Greenland Summer Time", "ART": "Argentina Standard Time", "ARST": "Argentina Summer Time", "AWDT": "Australian Western Daylight Time", "WITA": "Central Indonesia Time", "OEZ": "Eastern European Standard Time", "COST": "Colombia Summer Time", "PDT": "Pacific Daylight Time", "HNT": "Newfoundland Standard Time", "MYT": "Malaysia Time", "VET": "Venezuela Time", "AEDT": "Australian Eastern Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "MEZ": "Central European Standard Time", "∅∅∅": "Amazon Summer Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "ACWDT": "Australian Central Western Daylight Time", "HNOG": "West Greenland Standard Time", "CST": "Central Standard Time", "GMT": "Greenwich Mean Time", "MDT": "Macau Summer Time", "AKST": "Alaska Standard Time", "CDT": "Central Daylight Time", "ADT": "Atlantic Daylight Time", "NZST": "New Zealand Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "LHDT": "Lord Howe Daylight Time", "NZDT": "New Zealand Daylight Time", "ChST": "Chamorro Standard Time", "GYT": "Guyana Time", "WEZ": "Western European Standard Time", "AEST": "Australian Eastern Standard Time", "TMST": "Turkmenistan Summer Time", "SRT": "Suriname Time", "AWST": "Australian Western Standard Time", "MESZ": "Central European Summer Time"}, -+ locale: "en_VI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAT": "WAT", "ECT": "ECT", "SRT": "SRT", "HAST": "HAST", "CHADT": "CHADT", "HNCU": "HNCU", "MEZ": "MEZ", "IST": "IST", "WAST": "WAST", "CLST": "CLST", "GFT": "GFT", "COT": "COT", "EDT": "EDT", "WIB": "WIB", "HADT": "HADT", "UYT": "UYT", "AEST": "AEST", "CHAST": "CHAST", "AEDT": "AEDT", "WESZ": "WESZ", "AKDT": "AKDT", "CDT": "CDT", "MESZ": "MESZ", "HNEG": "HNEG", "LHDT": "LHDT", "JDT": "JDT", "TMT": "TMT", "AKST": "AKST", "WARST": "WARST", "CLT": "CLT", "HECU": "HECU", "SAST": "SAST", "HKST": "HKST", "MST": "MST", "ADT": "ADT", "EAT": "EAT", "HENOMX": "HENOMX", "MYT": "MYT", "BOT": "BOT", "∅∅∅": "∅∅∅", "PDT": "PDT", "COST": "COST", "WEZ": "WEZ", "SGT": "SGT", "WITA": "WITA", "ChST": "ChST", "ART": "ART", "ARST": "ARST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "LHST": "LHST", "CAT": "CAT", "HNOG": "HNOG", "NZST": "NZST", "AST": "AST", "ACST": "ACST", "AWDT": "AWDT", "UYST": "UYST", "BT": "BT", "OEZ": "OEZ", "OESZ": "OESZ", "EST": "EST", "JST": "JST", "ACWST": "ACWST", "WIT": "WIT", "CST": "CST", "ACDT": "ACDT", "HEPM": "HEPM", "HAT": "HAT", "HNPMX": "HNPMX", "HNT": "HNT", "WART": "WART", "GYT": "GYT", "MDT": "MDT", "GMT": "GMT", "AWST": "AWST", "VET": "VET", "HEPMX": "HEPMX", "HKT": "HKT", "TMST": "TMST", "NZDT": "NZDT", "HNPM": "HNPM", "PST": "PST", "ACWDT": "ACWDT", "HEOG": "HEOG"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_VI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_VI) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_VI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_VI) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_VI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_VI) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_VI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_VI' and handles both Whole and Real numbers based on 'v' - func (en *en_VI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_VI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_VI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_VI' -@@ -278,56 +195,7 @@ func (en *en_VI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_VI' -@@ -336,68 +204,7 @@ func (en *en_VI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_VI' -@@ -405,15 +212,15 @@ func (en *en_VI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) - b = strconv.AppendInt(b, int64(t.Day()), 10) - b = append(b, []byte{0x2f}...) -+ b = strconv.AppendInt(b, int64(t.Month()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +231,14 @@ func (en *en_VI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, en.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ - b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -+ b = append(b, []byte{0x20}...) -+ b = append(b, en.monthsAbbreviated[t.Month()]...) -+ b = append(b, []byte{0x2c}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +254,14 @@ func (en *en_VI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +279,15 @@ func (en *en_VI) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ -+ if t.Day() < 10 { -+ b = append(b, '0') -+ } -+ -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,13 +303,11 @@ func (en *en_VI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -497,13 +315,6 @@ func (en *en_VI) FmtTimeShort(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -513,13 +324,11 @@ func (en *en_VI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -534,13 +343,6 @@ func (en *en_VI) FmtTimeMedium(t time.Time) string { - } -  - b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -  - return string(b) - } -@@ -550,13 +352,11 @@ func (en *en_VI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -573,14 +373,6 @@ func (en *en_VI) FmtTimeLong(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() - b = append(b, tz...) -  -@@ -592,13 +384,11 @@ func (en *en_VI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -+ if t.Hour() < 10 { -+ b = append(b, '0') - } -  -- b = strconv.AppendInt(b, int64(h), 10) -+ b = strconv.AppendInt(b, int64(t.Hour()), 10) - b = append(b, en.timeSeparator...) -  - if t.Minute() < 10 { -@@ -615,14 +405,6 @@ func (en *en_VI) FmtTimeFull(t time.Time) string { - b = strconv.AppendInt(b, int64(t.Second()), 10) - b = append(b, []byte{0x20}...) -  -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- - tz, _ := t.Zone() -  - if btz, ok := en.timezones[tz]; ok { -diff --git a/en_VU/en_VU.go b/en_VU/en_VU.go -index 5d3a779..0a365bd 100644 ---- a/en_VU/en_VU.go -+++ b/en_VU/en_VU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_VU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_VU' locale - func New() locales.Translator { - return &en_VU{ -- locale: "en_VU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VT", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"ACDT": "Australian Central Daylight Time", "COT": "Colombia Standard Time", "LHST": "Lord Howe Standard Time", "CHAST": "Chatham Standard Time", "MESZ": "Central European Summer Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "WIT": "Eastern Indonesia Time", "HKT": "Hong Kong Standard Time", "LHDT": "Lord Howe Daylight Time", "NZST": "New Zealand Standard Time", "HECU": "Cuba Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "AKDT": "Alaska Daylight Time", "BOT": "Bolivia Time", "GFT": "French Guiana Time", "WARST": "Western Argentina Summer Time", "CAT": "Central Africa Time", "HNNOMX": "Northwest Mexico Standard Time", "SGT": "Singapore Standard Time", "UYST": "Uruguay Summer Time", "WEZ": "Western European Standard Time", "HNT": "Newfoundland Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "WAT": "West Africa Standard Time", "CLST": "Chile Summer Time", "ACWDT": "Australian Central Western Daylight Time", "PST": "Pacific Standard Time", "AWST": "Australian Western Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MEZ": "Central European Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "WIB": "Western Indonesia Time", "PDT": "Pacific Daylight Time", "ChST": "Chamorro Standard Time", "GYT": "Guyana Time", "ACWST": "Australian Central Western Standard Time", "WITA": "Central Indonesia Time", "HNEG": "East Greenland Standard Time", "TMST": "Turkmenistan Summer Time", "IST": "India Standard Time", "HEOG": "West Greenland Summer Time", "CHADT": "Chatham Daylight Time", "JST": "Japan Standard Time", "ECT": "Ecuador Time", "HENOMX": "Northwest Mexico Daylight Time", "MDT": "Macau Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "WESZ": "Western European Summer Time", "∅∅∅": "Amazon Summer Time", "HEEG": "East Greenland Summer Time", "TMT": "Turkmenistan Standard Time", "OESZ": "Eastern European Summer Time", "HNOG": "West Greenland Standard Time", "EAT": "East Africa Time", "COST": "Colombia Summer Time", "EST": "Eastern Standard Time", "CDT": "Central Daylight Time", "UYT": "Uruguay Standard Time", "VET": "Venezuela Time", "SRT": "Suriname Time", "GMT": "Greenwich Mean Time", "HNCU": "Cuba Standard Time", "AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "AEDT": "Australian Eastern Daylight Time", "OEZ": "Eastern European Standard Time", "WART": "Western Argentina Standard Time", "NZDT": "New Zealand Daylight Time", "WAST": "West Africa Summer Time", "MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "MYT": "Malaysia Time", "ARST": "Argentina Summer Time", "HKST": "Hong Kong Summer Time", "CLT": "Chile Standard Time", "EDT": "Eastern Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "CST": "Central Standard Time", "HAT": "Newfoundland Daylight Time", "AWDT": "Australian Western Daylight Time", "ACST": "Australian Central Standard Time"}, -+ locale: "en_VU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VT", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "AKDT": "AKDT", "LHST": "LHST", "HAST": "HAST", "BT": "BT", "AEDT": "AEDT", "CHAST": "CHAST", "WART": "WART", "ECT": "ECT", "ART": "ART", "JDT": "JDT", "CHADT": "CHADT", "VET": "VET", "HNPMX": "HNPMX", "EST": "EST", "WITA": "WITA", "MDT": "MDT", "NZST": "NZST", "HNCU": "HNCU", "OESZ": "OESZ", "WARST": "WARST", "EAT": "EAT", "HEEG": "HEEG", "MEZ": "MEZ", "JST": "JST", "ACWDT": "ACWDT", "HECU": "HECU", "WIB": "WIB", "GMT": "GMT", "HADT": "HADT", "MESZ": "MESZ", "MYT": "MYT", "AWST": "AWST", "AEST": "AEST", "COST": "COST", "SAST": "SAST", "SRT": "SRT", "ACDT": "ACDT", "HEPM": "HEPM", "PST": "PST", "ACWST": "ACWST", "CLST": "CLST", "CST": "CST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "IST": "IST", "∅∅∅": "∅∅∅", "ACST": "ACST", "TMST": "TMST", "AWDT": "AWDT", "WAT": "WAT", "WAST": "WAST", "HEOG": "HEOG", "TMT": "TMT", "NZDT": "NZDT", "ChST": "ChST", "ARST": "ARST", "WIT": "WIT", "COT": "COT", "GYT": "GYT", "AST": "AST", "HKT": "HKT", "UYT": "UYT", "HAT": "HAT", "HNOG": "HNOG", "HNT": "HNT", "HKST": "HKST", "HNEG": "HNEG", "AKST": "AKST", "GFT": "GFT", "HNPM": "HNPM", "WEZ": "WEZ", "OEZ": "OEZ", "MST": "MST", "ADT": "ADT", "SGT": "SGT", "HEPMX": "HEPMX", "WESZ": "WESZ", "EDT": "EDT", "CDT": "CDT", "BOT": "BOT", "LHDT": "LHDT", "PDT": "PDT", "CLT": "CLT", "CAT": "CAT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_VU) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_VU) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_VU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_VU) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_VU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_VU) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_VU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_VU) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_VU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_VU' and handles both Whole and Real numbers based on 'v' - func (en *en_VU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_VU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_VU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_VU' -@@ -278,56 +195,7 @@ func (en *en_VU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_VU' -@@ -336,84 +204,33 @@ func (en *en_VU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_VU' -+func (en *en_VU) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_VU' --func (en *en_VU) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_VU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_VU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_VU) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_VU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_VU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_VU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_VU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_WS/en_WS.go b/en_WS/en_WS.go -index e441bcc..e05bb3d 100644 ---- a/en_WS/en_WS.go -+++ b/en_WS/en_WS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_WS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_WS' locale - func New() locales.Translator { - return &en_WS{ -- locale: "en_WS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WS$", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WESZ": "Western European Summer Time", "HEOG": "West Greenland Summer Time", "CHADT": "Chatham Daylight Time", "TMT": "Turkmenistan Standard Time", "OEZ": "Eastern European Standard Time", "WIB": "Western Indonesia Time", "WIT": "Eastern Indonesia Time", "LHDT": "Lord Howe Daylight Time", "SAST": "South Africa Standard Time", "OESZ": "Eastern European Summer Time", "HNPMX": "Mexican Pacific Standard Time", "MESZ": "Central European Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "HEEG": "East Greenland Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "WITA": "Central Indonesia Time", "WEZ": "Western European Standard Time", "WAT": "West Africa Standard Time", "MST": "Macau Standard Time", "AKST": "Alaska Standard Time", "UYT": "Uruguay Standard Time", "BT": "Bhutan Time", "AEST": "Australian Eastern Standard Time", "AWDT": "Australian Western Daylight Time", "HNPM": "St. Pierre & Miquelon Standard Time", "CAT": "Central Africa Time", "WARST": "Western Argentina Summer Time", "CST": "Central Standard Time", "ARST": "Argentina Summer Time", "MEZ": "Central European Standard Time", "ECT": "Ecuador Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "AST": "Atlantic Standard Time", "ACWDT": "Australian Central Western Daylight Time", "NZST": "New Zealand Standard Time", "CHAST": "Chatham Standard Time", "JST": "Japan Standard Time", "SGT": "Singapore Standard Time", "ACWST": "Australian Central Western Standard Time", "HNEG": "East Greenland Standard Time", "EAT": "East Africa Time", "WAST": "West Africa Summer Time", "MDT": "Macau Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "GYT": "Guyana Time", "VET": "Venezuela Time", "WART": "Western Argentina Standard Time", "EDT": "Eastern Daylight Time", "PST": "Pacific Standard Time", "GMT": "Greenwich Mean Time", "MYT": "Malaysia Time", "UYST": "Uruguay Summer Time", "COT": "Colombia Standard Time", "CLST": "Chile Summer Time", "GFT": "French Guiana Time", "ART": "Argentina Standard Time", "IST": "India Standard Time", "EST": "Eastern Standard Time", "HKT": "Hong Kong Standard Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "HKST": "Hong Kong Summer Time", "ADT": "Atlantic Daylight Time", "HADT": "Hawaii-Aleutian Daylight Time", "SRT": "Suriname Time", "PDT": "Pacific Daylight Time", "LHST": "Lord Howe Standard Time", "NZDT": "New Zealand Daylight Time", "CLT": "Chile Standard Time", "TMST": "Turkmenistan Summer Time", "ACST": "Australian Central Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HECU": "Cuba Daylight Time", "ACDT": "Australian Central Daylight Time", "AEDT": "Australian Eastern Daylight Time", "AWST": "Australian Western Standard Time", "ChST": "Chamorro Standard Time", "AKDT": "Alaska Daylight Time", "CDT": "Central Daylight Time", "HNOG": "West Greenland Standard Time", "JDT": "Japan Daylight Time", "BOT": "Bolivia Time", "COST": "Colombia Summer Time", "∅∅∅": "Amazon Summer Time"}, -+ locale: "en_WS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WS$", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHADT": "CHADT", "OESZ": "OESZ", "SRT": "SRT", "MYT": "MYT", "HNPM": "HNPM", "ACWST": "ACWST", "HECU": "HECU", "NZDT": "NZDT", "WARST": "WARST", "HNOG": "HNOG", "TMT": "TMT", "EAT": "EAT", "LHST": "LHST", "∅∅∅": "∅∅∅", "HAT": "HAT", "WAST": "WAST", "AKST": "AKST", "MDT": "MDT", "HAST": "HAST", "HEEG": "HEEG", "UYT": "UYT", "ACWDT": "ACWDT", "CDT": "CDT", "AWST": "AWST", "WAT": "WAT", "HKST": "HKST", "BT": "BT", "PDT": "PDT", "WEZ": "WEZ", "COST": "COST", "GMT": "GMT", "HNPMX": "HNPMX", "WITA": "WITA", "AST": "AST", "CST": "CST", "MST": "MST", "MEZ": "MEZ", "AEDT": "AEDT", "HKT": "HKT", "HEPMX": "HEPMX", "HEOG": "HEOG", "EST": "EST", "NZST": "NZST", "LHDT": "LHDT", "JDT": "JDT", "WESZ": "WESZ", "HEPM": "HEPM", "IST": "IST", "CHAST": "CHAST", "AKDT": "AKDT", "GFT": "GFT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "ARST": "ARST", "BOT": "BOT", "WART": "WART", "GYT": "GYT", "ART": "ART", "TMST": "TMST", "WIB": "WIB", "UYST": "UYST", "VET": "VET", "HNT": "HNT", "PST": "PST", "AEST": "AEST", "OEZ": "OEZ", "CLST": "CLST", "ChST": "ChST", "ACST": "ACST", "HNEG": "HNEG", "JST": "JST", "HADT": "HADT", "SAST": "SAST", "EDT": "EDT", "CAT": "CAT", "ECT": "ECT", "ADT": "ADT", "AWDT": "AWDT", "HNCU": "HNCU", "WIT": "WIT", "CLT": "CLT", "MESZ": "MESZ", "SGT": "SGT", "COT": "COT"}, - } - } -  -@@ -112,8 +89,8 @@ func (en *en_WS) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (en *en_WS) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod100 := math.Mod(n, 100) - nMod10 := math.Mod(n, 10) -+ nMod100 := math.Mod(n, 100) -  - if nMod10 == 1 && nMod100 != 11 { - return locales.PluralRuleOne -@@ -138,7 +115,7 @@ func (en *en_WS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_WS) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_WS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_WS) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_WS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_WS) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_WS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_WS' and handles both Whole and Real numbers based on 'v' - func (en *en_WS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_WS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_WS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_WS' -@@ -278,56 +195,7 @@ func (en *en_WS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_WS' -@@ -336,84 +204,33 @@ func (en *en_WS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_WS' -+func (en *en_WS) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_WS' --func (en *en_WS) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_WS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_WS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_WS) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_WS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_WS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_WS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_WS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_ZA/en_ZA.go b/en_ZA/en_ZA.go -index 70c0e18..5c68faf 100644 ---- a/en_ZA/en_ZA.go -+++ b/en_ZA/en_ZA.go -@@ -10,68 +10,47 @@ import ( - ) -  - type en_ZA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_ZA' locale - func New() locales.Translator { - return &en_ZA{ -- locale: "en_ZA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "R", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"SGT": "Singapore Standard Time", "UYT": "Uruguay Standard Time", "WIT": "Eastern Indonesia Time", "HKST": "Hong Kong Summer Time", "HNPM": "St. Pierre & Miquelon Standard Time", "EDT": "Eastern Daylight Time", "SAST": "South Africa Standard Time", "OEZ": "Eastern European Standard Time", "AKST": "Alaska Standard Time", "ACWDT": "Australian Central Western Daylight Time", "AEST": "Australian Eastern Standard Time", "LHST": "Lord Howe Standard Time", "CAT": "Central Africa Time", "MST": "Macau Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "HNT": "Newfoundland Standard Time", "ART": "Argentina Standard Time", "MEZ": "Central European Standard Time", "HECU": "Cuba Daylight Time", "PST": "Pacific Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "JDT": "Japan Daylight Time", "NZST": "New Zealand Standard Time", "TMT": "Turkmenistan Standard Time", "HENOMX": "Northwest Mexico Daylight Time", "WIB": "Western Indonesia Time", "VET": "Venezuela Time", "SRT": "Suriname Time", "WITA": "Central Indonesia Time", "GYT": "Guyana Time", "MESZ": "Central European Summer Time", "GFT": "French Guiana Time", "CHADT": "Chatham Daylight Time", "EAT": "East Africa Time", "WARST": "Western Argentina Summer Time", "HNPMX": "Mexican Pacific Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "ACWST": "Australian Central Western Standard Time", "ARST": "Argentina Summer Time", "GMT": "Greenwich Mean Time", "LHDT": "Lord Howe Daylight Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "WART": "Western Argentina Standard Time", "CLST": "Chile Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "CST": "Central Standard Time", "NZDT": "New Zealand Daylight Time", "IST": "India Standard Time", "HEEG": "East Greenland Summer Time", "PDT": "Pacific Daylight Time", "CLT": "Chile Standard Time", "COST": "Colombia Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HNCU": "Cuba Standard Time", "MDT": "Macau Summer Time", "AKDT": "Alaska Daylight Time", "BOT": "Bolivia Time", "TMST": "Turkmenistan Summer Time", "ACST": "Australian Central Standard Time", "UYST": "Uruguay Summer Time", "ADT": "Atlantic Daylight Time", "WESZ": "Western European Summer Time", "HAT": "Newfoundland Daylight Time", "CHAST": "Chatham Standard Time", "WAT": "West Africa Standard Time", "ChST": "Chamorro Standard Time", "ECT": "Ecuador Time", "COT": "Colombia Standard Time", "MYT": "Malaysia Time", "AST": "Atlantic Standard Time", "HEOG": "West Greenland Summer Time", "AWST": "Australian Western Standard Time", "WAST": "West Africa Summer Time", "EST": "Eastern Standard Time", "WEZ": "Western European Standard Time", "HNOG": "West Greenland Standard Time", "AEDT": "Australian Eastern Daylight Time", "AWDT": "Australian Western Daylight Time", "OESZ": "Eastern European Summer Time", "∅∅∅": "Acre Summer Time", "CDT": "Central Daylight Time", "BT": "Bhutan Time", "HKT": "Hong Kong Standard Time", "HNEG": "East Greenland Standard Time"}, -+ locale: "en_ZA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ decimal: ",", -+ group: " ", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "R", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMST": "TMST", "MDT": "MDT", "BOT": "BOT", "JST": "JST", "HEPM": "HEPM", "HKT": "HKT", "LHST": "LHST", "UYST": "UYST", "AKST": "AKST", "HNOG": "HNOG", "TMT": "TMT", "NZDT": "NZDT", "AST": "AST", "MESZ": "MESZ", "AEST": "AEST", "NZST": "NZST", "GMT": "GMT", "UYT": "UYT", "VET": "VET", "WAT": "WAT", "WARST": "WARST", "COT": "COT", "CDT": "CDT", "HNNOMX": "HNNOMX", "JDT": "JDT", "WAST": "WAST", "PST": "PST", "BT": "BT", "COST": "COST", "CLST": "CLST", "ART": "ART", "SRT": "SRT", "HAST": "HAST", "HADT": "HADT", "HAT": "HAT", "HKST": "HKST", "MEZ": "MEZ", "ACDT": "ACDT", "SGT": "SGT", "HECU": "HECU", "HNT": "HNT", "SAST": "SAST", "MYT": "MYT", "CHADT": "CHADT", "ACWDT": "ACWDT", "WEZ": "WEZ", "WART": "WART", "WIT": "WIT", "EDT": "EDT", "ECT": "ECT", "IST": "IST", "ACWST": "ACWST", "HEPMX": "HEPMX", "WESZ": "WESZ", "CLT": "CLT", "CST": "CST", "ARST": "ARST", "HNEG": "HNEG", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "HEOG": "HEOG", "MST": "MST", "HNCU": "HNCU", "CAT": "CAT", "EAT": "EAT", "AKDT": "AKDT", "WITA": "WITA", "AEDT": "AEDT", "PDT": "PDT", "OESZ": "OESZ", "GYT": "GYT", "WIB": "WIB", "ADT": "ADT", "ChST": "ChST", "LHDT": "LHDT", "HNPMX": "HNPMX", "AWST": "AWST", "OEZ": "OEZ", "GFT": "GFT", "EST": "EST", "ACST": "ACST", "HEEG": "HEEG", "HENOMX": "HENOMX", "AWDT": "AWDT", "HNPM": "HNPM"}, - } - } -  -@@ -138,7 +117,7 @@ func (en *en_ZA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_ZA) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (en *en_ZA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_ZA) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (en *en_ZA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_ZA) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +183,13 @@ func (en *en_ZA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_ZA' and handles both Whole and Real numbers based on 'v' - func (en *en_ZA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_ZA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_ZA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_ZA' -@@ -280,58 +197,7 @@ func (en *en_ZA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_ZA' -@@ -340,70 +206,7 @@ func (en *en_ZA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(en.group) - 1; j >= 0; j-- { -- b = append(b, en.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_ZA' -diff --git a/en_ZM/en_ZM.go b/en_ZM/en_ZM.go -index 8e6745c..6b59334 100644 ---- a/en_ZM/en_ZM.go -+++ b/en_ZM/en_ZM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_ZM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_ZM' locale - func New() locales.Translator { - return &en_ZM{ -- locale: "en_ZM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "K", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WIB": "Western Indonesia Time", "TMST": "Turkmenistan Summer Time", "CAT": "Central Africa Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "HNOG": "West Greenland Standard Time", "PDT": "Pacific Daylight Time", "HKST": "Hong Kong Summer Time", "NZST": "New Zealand Standard Time", "ChST": "Chamorro Standard Time", "∅∅∅": "Peru Summer Time", "HEPMX": "Mexican Pacific Daylight Time", "EST": "Eastern Standard Time", "NZDT": "New Zealand Daylight Time", "CHAST": "Chatham Standard Time", "CHADT": "Chatham Daylight Time", "SAST": "South Africa Standard Time", "TMT": "Turkmenistan Standard Time", "WARST": "Western Argentina Summer Time", "BT": "Bhutan Time", "WITA": "Central Indonesia Time", "COT": "Colombia Standard Time", "CDT": "Central Daylight Time", "MYT": "Malaysia Time", "HADT": "Hawaii-Aleutian Daylight Time", "LHDT": "Lord Howe Daylight Time", "WAT": "West Africa Standard Time", "WAST": "West Africa Summer Time", "ECT": "Ecuador Time", "JDT": "Japan Daylight Time", "ACWST": "Australian Central Western Standard Time", "BOT": "Bolivia Time", "HECU": "Cuba Daylight Time", "VET": "Venezuela Time", "WIT": "Eastern Indonesia Time", "LHST": "Lord Howe Standard Time", "HAT": "Newfoundland Daylight Time", "HEEG": "East Greenland Summer Time", "ACST": "Australian Central Standard Time", "SGT": "Singapore Standard Time", "UYST": "Uruguay Summer Time", "HNT": "Newfoundland Standard Time", "EDT": "Eastern Daylight Time", "AST": "Atlantic Standard Time", "AEDT": "Australian Eastern Daylight Time", "CLST": "Chile Summer Time", "EAT": "East Africa Time", "MDT": "Macau Summer Time", "ACWDT": "Australian Central Western Daylight Time", "HKT": "Hong Kong Standard Time", "MEZ": "Central European Standard Time", "COST": "Colombia Summer Time", "CST": "Central Standard Time", "AWDT": "Australian Western Daylight Time", "OEZ": "Eastern European Standard Time", "ART": "Argentina Standard Time", "AEST": "Australian Eastern Standard Time", "MESZ": "Central European Summer Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "WART": "Western Argentina Standard Time", "GMT": "Greenwich Mean Time", "HAST": "Hawaii-Aleutian Standard Time", "AKST": "Alaska Standard Time", "PST": "Pacific Standard Time", "IST": "India Standard Time", "OESZ": "Eastern European Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "HNPMX": "Mexican Pacific Standard Time", "HNEG": "East Greenland Standard Time", "GYT": "Guyana Time", "HEOG": "West Greenland Summer Time", "CLT": "Chile Standard Time", "GFT": "French Guiana Time", "MST": "Macau Standard Time", "UYT": "Uruguay Standard Time", "WEZ": "Western European Standard Time", "WESZ": "Western European Summer Time", "ARST": "Argentina Summer Time", "AWST": "Australian Western Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "AKDT": "Alaska Daylight Time", "ADT": "Atlantic Daylight Time", "SRT": "Suriname Time"}, -+ locale: "en_ZM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "K", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "UYST": "UYST", "WEZ": "WEZ", "OEZ": "OEZ", "COST": "COST", "WIB": "WIB", "CLST": "CLST", "HNNOMX": "HNNOMX", "AEST": "AEST", "AKDT": "AKDT", "HNT": "HNT", "SAST": "SAST", "HNOG": "HNOG", "CLT": "CLT", "CST": "CST", "HENOMX": "HENOMX", "HNPM": "HNPM", "ART": "ART", "HADT": "HADT", "LHST": "LHST", "∅∅∅": "∅∅∅", "WART": "WART", "COT": "COT", "TMST": "TMST", "EAT": "EAT", "HEPM": "HEPM", "NZDT": "NZDT", "ECT": "ECT", "ARST": "ARST", "ADT": "ADT", "MESZ": "MESZ", "MYT": "MYT", "IST": "IST", "ACWDT": "ACWDT", "SGT": "SGT", "GYT": "GYT", "TMT": "TMT", "ACST": "ACST", "JDT": "JDT", "AEDT": "AEDT", "CAT": "CAT", "UYT": "UYT", "EDT": "EDT", "MDT": "MDT", "ACDT": "ACDT", "HEEG": "HEEG", "HNCU": "HNCU", "WIT": "WIT", "WITA": "WITA", "CDT": "CDT", "VET": "VET", "HNPMX": "HNPMX", "HKT": "HKT", "MST": "MST", "NZST": "NZST", "BOT": "BOT", "HAST": "HAST", "PDT": "PDT", "ACWST": "ACWST", "WAST": "WAST", "GFT": "GFT", "EST": "EST", "AWST": "AWST", "HAT": "HAT", "SRT": "SRT", "LHDT": "LHDT", "PST": "PST", "WAT": "WAT", "AKST": "AKST", "GMT": "GMT", "JST": "JST", "BT": "BT", "HEOG": "HEOG", "AWDT": "AWDT", "CHAST": "CHAST", "CHADT": "CHADT", "WESZ": "WESZ", "HECU": "HECU", "HEPMX": "HEPMX", "HKST": "HKST", "MEZ": "MEZ", "OESZ": "OESZ", "WARST": "WARST", "AST": "AST", "ChST": "ChST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_ZM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_ZM) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_ZM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_ZM) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_ZM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_ZM) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_ZM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_ZM' and handles both Whole and Real numbers based on 'v' - func (en *en_ZM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_ZM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_ZM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_ZM' -@@ -278,56 +195,7 @@ func (en *en_ZM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_ZM' -@@ -336,84 +204,33 @@ func (en *en_ZM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -+ return string(append(append([]byte{}, symbol...), s...)) -+} -  -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -+// FmtDateShort returns the short date representation of 't' for 'en_ZM' -+func (en *en_ZM) FmtDateShort(t time.Time) string { -  -- } -+ b := make([]byte, 0, 32) -  -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -+ if t.Day() < 10 { -+ b = append(b, '0') - } -  -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x2f}...) -  -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -+ if t.Month() < 10 { -+ b = append(b, '0') - } -  -- return string(b) --} -- --// FmtDateShort returns the short date representation of 't' for 'en_ZM' --func (en *en_ZM) FmtDateShort(t time.Time) string { -- -- b := make([]byte, 0, 32) -- - b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -+ - b = append(b, []byte{0x2f}...) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -+ if t.Year() > 0 { -+ b = strconv.AppendInt(b, int64(t.Year()), 10) - } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -+ b = strconv.AppendInt(b, int64(t.Year()*-1), 10) - } -  - return string(b) -@@ -424,10 +241,10 @@ func (en *en_ZM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsAbbreviated[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -443,10 +260,10 @@ func (en *en_ZM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -464,10 +281,10 @@ func (en *en_ZM) FmtDateFull(t time.Time) string { -  - b = append(b, en.daysWide[t.Weekday()]...) - b = append(b, []byte{0x2c, 0x20}...) -+ b = strconv.AppendInt(b, int64(t.Day()), 10) -+ b = append(b, []byte{0x20}...) - b = append(b, en.monthsWide[t.Month()]...) - b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -  - if t.Year() > 0 { - b = strconv.AppendInt(b, int64(t.Year()), 10) -@@ -483,28 +300,6 @@ func (en *en_ZM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -513,35 +308,6 @@ func (en *en_ZM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -550,40 +316,6 @@ func (en *en_ZM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,44 +324,5 @@ func (en *en_ZM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, en.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, en.periodsAbbreviated[0]...) -- } else { -- b = append(b, en.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := en.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/en_ZW/en_ZW.go b/en_ZW/en_ZW.go -index d913e2a..259c186 100644 ---- a/en_ZW/en_ZW.go -+++ b/en_ZW/en_ZW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type en_ZW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'en_ZW' locale - func New() locales.Translator { - return &en_ZW{ -- locale: "en_ZW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, -- daysAbbreviated: []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"}, -- daysWide: []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"B", "A"}, -- erasWide: []string{"Before Christ", "Anno Domini"}, -- timezones: map[string]string{"WAST": "West Africa Summer Time", "MST": "Macau Standard Time", "MDT": "Macau Summer Time", "WITA": "Central Indonesia Time", "MYT": "Malaysia Time", "WIT": "Eastern Indonesia Time", "CHAST": "Chatham Standard Time", "SAST": "South Africa Standard Time", "HEEG": "East Greenland Summer Time", "OESZ": "Eastern European Summer Time", "ECT": "Ecuador Time", "ADT": "Atlantic Daylight Time", "BT": "Bhutan Time", "ART": "Argentina Standard Time", "LHST": "Lord Howe Standard Time", "NZST": "New Zealand Standard Time", "TMST": "Turkmenistan Summer Time", "WAT": "West Africa Standard Time", "SGT": "Singapore Standard Time", "HKT": "Hong Kong Standard Time", "EST": "Eastern Standard Time", "CST": "Central Standard Time", "CLT": "Chile Standard Time", "WART": "Western Argentina Standard Time", "COT": "Colombia Standard Time", "COST": "Colombia Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "HNCU": "Cuba Standard Time", "UYST": "Uruguay Summer Time", "WESZ": "Western European Summer Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "ChST": "Chamorro Standard Time", "GFT": "French Guiana Time", "UYT": "Uruguay Standard Time", "VET": "Venezuela Time", "PDT": "Pacific Daylight Time", "AWST": "Australian Western Standard Time", "HKST": "Hong Kong Summer Time", "IST": "India Standard Time", "CLST": "Chile Summer Time", "TMT": "Turkmenistan Standard Time", "GMT": "Greenwich Mean Time", "HEPMX": "Mexican Pacific Daylight Time", "HNOG": "West Greenland Standard Time", "CAT": "Central Africa Time", "AKDT": "Alaska Daylight Time", "ACWST": "Australian Central Western Standard Time", "WARST": "Western Argentina Summer Time", "AEDT": "Australian Eastern Daylight Time", "BOT": "Bolivia Time", "HNEG": "East Greenland Standard Time", "ACST": "Australian Central Standard Time", "HADT": "Hawaii-Aleutian Daylight Time", "ARST": "Argentina Summer Time", "HEOG": "West Greenland Summer Time", "AEST": "Australian Eastern Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "HECU": "Cuba Daylight Time", "HAST": "Hawaii-Aleutian Standard Time", "SRT": "Suriname Time", "ACWDT": "Australian Central Western Daylight Time", "NZDT": "New Zealand Daylight Time", "JST": "Japan Standard Time", "ACDT": "Australian Central Daylight Time", "PST": "Pacific Standard Time", "EAT": "East Africa Time", "OEZ": "Eastern European Standard Time", "EDT": "Eastern Daylight Time", "AKST": "Alaska Standard Time", "GYT": "Guyana Time", "HAT": "Newfoundland Daylight Time", "HNT": "Newfoundland Standard Time", "MESZ": "Central European Summer Time", "LHDT": "Lord Howe Daylight Time", "∅∅∅": "Amazon Summer Time", "HNNOMX": "Northwest Mexico Standard Time", "CDT": "Central Daylight Time", "WEZ": "Western European Standard Time", "MEZ": "Central European Standard Time", "CHADT": "Chatham Daylight Time", "JDT": "Japan Daylight Time", "HNPMX": "Mexican Pacific Standard Time", "AST": "Atlantic Standard Time", "WIB": "Western Indonesia Time", "AWDT": "Australian Western Daylight Time"}, -+ locale: "en_ZW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACDT": "ACDT", "JDT": "JDT", "LHST": "LHST", "MYT": "MYT", "ACWDT": "ACWDT", "SGT": "SGT", "OESZ": "OESZ", "HNT": "HNT", "GYT": "GYT", "AWDT": "AWDT", "HNPM": "HNPM", "CHAST": "CHAST", "ACWST": "ACWST", "OEZ": "OEZ", "WITA": "WITA", "MST": "MST", "NZDT": "NZDT", "EAT": "EAT", "GFT": "GFT", "HKT": "HKT", "CAT": "CAT", "BOT": "BOT", "UYST": "UYST", "IST": "IST", "PST": "PST", "WEZ": "WEZ", "JST": "JST", "COST": "COST", "HKST": "HKST", "CLT": "CLT", "CST": "CST", "NZST": "NZST", "ART": "ART", "HAST": "HAST", "HADT": "HADT", "WAT": "WAT", "WAST": "WAST", "AKDT": "AKDT", "TMT": "TMT", "SRT": "SRT", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "HEPM": "HEPM", "WESZ": "WESZ", "SAST": "SAST", "EDT": "EDT", "CLST": "CLST", "GMT": "GMT", "ARST": "ARST", "BT": "BT", "HEPMX": "HEPMX", "MDT": "MDT", "ECT": "ECT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "PDT": "PDT", "HNPMX": "HNPMX", "HNOG": "HNOG", "EST": "EST", "MEZ": "MEZ", "HENOMX": "HENOMX", "AWST": "AWST", "LHDT": "LHDT", "ADT": "ADT", "ACST": "ACST", "HAT": "HAT", "HEOG": "HEOG", "TMST": "TMST", "WIB": "WIB", "CDT": "CDT", "ChST": "ChST", "VET": "VET", "WIT": "WIT", "AEDT": "AEDT", "CHADT": "CHADT", "UYT": "UYT", "HECU": "HECU", "WART": "WART", "WARST": "WARST", "COT": "COT", "AST": "AST", "MESZ": "MESZ", "AEST": "AEST", "HNCU": "HNCU", "AKST": "AKST"}, - } - } -  -@@ -138,7 +115,7 @@ func (en *en_ZW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (en *en_ZW) MonthsAbbreviated() []string { -- return en.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +125,7 @@ func (en *en_ZW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (en *en_ZW) MonthsNarrow() []string { -- return en.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +135,7 @@ func (en *en_ZW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (en *en_ZW) MonthsWide() []string { -- return en.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,73 +181,13 @@ func (en *en_ZW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'en_ZW' and handles both Whole and Real numbers based on 'v' - func (en *en_ZW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'en_ZW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (en *en_ZW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, en.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_ZW' -@@ -278,56 +195,7 @@ func (en *en_ZW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, en.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_ZW' -@@ -336,68 +204,7 @@ func (en *en_ZW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := en.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, en.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, en.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, en.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, en.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, en.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'en_ZW' -diff --git a/eo/eo.go b/eo/eo.go -index 8c7888c..90f8d9e 100644 ---- a/eo/eo.go -+++ b/eo/eo.go -@@ -74,7 +74,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"aK", "pK"}, - erasNarrow: []string{"aK", "pK"}, - erasWide: []string{"aK", "pK"}, -- timezones: map[string]string{"HEOG": "HEOG", "HEPM": "HEPM", "HEEG": "HEEG", "WAST": "okcidenta afrika somera tempo", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HNOG": "HNOG", "JDT": "japana somera tempo", "COST": "COST", "SGT": "SGT", "WIT": "orienta indonezia tempo", "ACWDT": "centrokcidenta aŭstralia somera tempo", "ARST": "ARST", "JST": "japana norma tempo", "WAT": "okcidenta afrika norma tempo", "EST": "orienta nord-amerika norma tempo", "AWST": "okcidenta aŭstralia norma tempo", "LHDT": "LHDT", "IST": "barata tempo", "CDT": "centra nord-amerika somera tempo", "GYT": "GYT", "PST": "pacifika nord-amerika norma tempo", "PDT": "pacifika nord-amerika somera tempo", "MEZ": "centra eŭropa norma tempo", "CST": "centra nord-amerika norma tempo", "HADT": "HADT", "HNPM": "HNPM", "CLT": "CLT", "HENOMX": "HENOMX", "HAST": "HAST", "ACWST": "centrokcidenta aŭstralia norma tempo", "ART": "ART", "CLST": "CLST", "OEZ": "orienta eŭropa norma tempo", "MESZ": "centra eŭropa somera tempo", "SAST": "suda afrika tempo", "AKST": "AKST", "HKT": "HKT", "LHST": "LHST", "NZST": "NZST", "SRT": "SRT", "HKST": "HKST", "VET": "VET", "CHAST": "CHAST", "ACST": "centra aŭstralia norma tempo", "WARST": "WARST", "HECU": "HECU", "GMT": "universala tempo kunordigita", "AKDT": "AKDT", "UYT": "UYT", "HNCU": "HNCU", "MST": "MST", "AST": "atlantika nord-amerika norma tempo", "NZDT": "NZDT", "HNEG": "HNEG", "CAT": "centra afrika tempo", "WART": "WART", "WESZ": "okcidenta eŭropa somera tempo", "GFT": "GFT", "ACDT": "centra aŭstralia somera tempo", "AEST": "orienta aŭstralia norma tempo", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "UYST": "UYST", "BT": "BT", "HNT": "HNT", "HAT": "HAT", "TMST": "TMST", "EAT": "orienta afrika tempo", "OESZ": "orienta eŭropa somera tempo", "COT": "COT", "ADT": "atlantika nord-amerika somera tempo", "WITA": "centra indonezia tempo", "ChST": "ChST", "ECT": "ECT", "MDT": "MDT", "EDT": "orienta nord-amerika somera tempo", "AEDT": "orienta aŭstralia somera tempo", "TMT": "TMT", "MYT": "MYT", "WIB": "okcidenta indonezia tempo", "WEZ": "okcidenta eŭropa norma tempo", "AWDT": "okcidenta aŭstralia somera tempo", "BOT": "BOT"}, -+ timezones: map[string]string{"LHDT": "LHDT", "CHAST": "CHAST", "WESZ": "okcidenta eŭropa somera tempo", "HNCU": "HNCU", "ARST": "ARST", "HEPM": "HEPM", "OEZ": "orienta eŭropa norma tempo", "EDT": "orienta nord-amerika somera tempo", "BOT": "BOT", "SRT": "SRT", "HADT": "HADT", "HECU": "HECU", "CLT": "CLT", "MDT": "MDT", "IST": "barata tempo", "UYT": "UYT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WART": "WART", "SAST": "suda afrika tempo", "GMT": "universala tempo kunordigita", "HENOMX": "HENOMX", "MYT": "MYT", "AEDT": "orienta aŭstralia somera tempo", "WEZ": "okcidenta eŭropa norma tempo", "OESZ": "orienta eŭropa somera tempo", "HKT": "HKT", "ACDT": "centra aŭstralia somera tempo", "HNEG": "HNEG", "PDT": "pacifika nord-amerika somera tempo", "CHADT": "CHADT", "WAT": "okcidenta afrika norma tempo", "GYT": "GYT", "EST": "orienta nord-amerika norma tempo", "CLST": "CLST", "NZST": "NZST", "∅∅∅": "∅∅∅", "HNT": "HNT", "WIT": "orienta indonezia tempo", "HAST": "HAST", "LHST": "LHST", "ACWDT": "centrokcidenta aŭstralia somera tempo", "WAST": "okcidenta afrika somera tempo", "GFT": "GFT", "ART": "ART", "JDT": "japana somera tempo", "UYST": "UYST", "SGT": "SGT", "HEOG": "HEOG", "ECT": "ECT", "MESZ": "centra eŭropa somera tempo", "JST": "japana norma tempo", "AKST": "AKST", "TMT": "TMT", "WITA": "centra indonezia tempo", "CST": "centra nord-amerika norma tempo", "CDT": "centra nord-amerika somera tempo", "MEZ": "centra eŭropa norma tempo", "TMST": "TMST", "MST": "MST", "AWST": "okcidenta aŭstralia norma tempo", "AEST": "orienta aŭstralia norma tempo", "AKDT": "AKDT", "HNOG": "HNOG", "NZDT": "NZDT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "BT": "BT", "ACST": "centra aŭstralia norma tempo", "PST": "pacifika nord-amerika norma tempo", "WARST": "WARST", "CAT": "centra afrika tempo", "WIB": "okcidenta indonezia tempo", "AST": "atlantika nord-amerika norma tempo", "ADT": "atlantika nord-amerika somera tempo", "ChST": "ChST", "ACWST": "centrokcidenta aŭstralia norma tempo", "HAT": "HAT", "COT": "COT", "EAT": "orienta afrika tempo", "COST": "COST", "HKST": "HKST", "AWDT": "okcidenta aŭstralia somera tempo", "HNPM": "HNPM", "VET": "VET"}, - } - } -  -diff --git a/eo_001/eo_001.go b/eo_001/eo_001.go -index 359aeb6..a4254fb 100644 ---- a/eo_001/eo_001.go -+++ b/eo_001/eo_001.go -@@ -10,71 +10,45 @@ import ( - ) -  - type eo_001 struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'eo_001' locale - func New() locales.Translator { - return &eo_001{ -- locale: "eo_001", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "jan", "feb", "mar", "apr", "maj", "jun", "jul", "aŭg", "sep", "okt", "nov", "dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januaro", "februaro", "marto", "aprilo", "majo", "junio", "julio", "aŭgusto", "septembro", "oktobro", "novembro", "decembro"}, -- daysAbbreviated: []string{"di", "lu", "ma", "me", "ĵa", "ve", "sa"}, -- daysNarrow: []string{"D", "L", "M", "M", "Ĵ", "V", "S"}, -- daysWide: []string{"dimanĉo", "lundo", "mardo", "merkredo", "ĵaŭdo", "vendredo", "sabato"}, -- periodsAbbreviated: []string{"atm", "ptm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"atm", "ptm"}, -- erasAbbreviated: []string{"aK", "pK"}, -- erasNarrow: []string{"aK", "pK"}, -- erasWide: []string{"aK", "pK"}, -- timezones: map[string]string{"HEPMX": "HEPMX", "ADT": "atlantika nord-amerika somera tempo", "HEEG": "HEEG", "ACST": "centra aŭstralia norma tempo", "COT": "COT", "HEOG": "HEOG", "ACWDT": "centrokcidenta aŭstralia somera tempo", "AEST": "orienta aŭstralia norma tempo", "MESZ": "centra eŭropa somera tempo", "ChST": "ChST", "HAT": "HAT", "HEPM": "HEPM", "JDT": "japana somera tempo", "ECT": "ECT", "HNPMX": "HNPMX", "AST": "atlantika nord-amerika norma tempo", "AKST": "AKST", "VET": "VET", "WEZ": "okcidenta eŭropa norma tempo", "NZST": "NZST", "HNEG": "HNEG", "SGT": "SGT", "WART": "WART", "MDT": "MDT", "UYST": "UYST", "AKDT": "AKDT", "HNOG": "HNOG", "WESZ": "okcidenta eŭropa somera tempo", "∅∅∅": "∅∅∅", "GFT": "GFT", "WARST": "WARST", "HAST": "HAST", "ACWST": "centrokcidenta aŭstralia norma tempo", "HNT": "HNT", "SAST": "suda afrika tempo", "HNNOMX": "HNNOMX", "EST": "orienta nord-amerika norma tempo", "CDT": "centra nord-amerika somera tempo", "AWDT": "okcidenta aŭstralia somera tempo", "CHAST": "CHAST", "WAST": "okcidenta afrika somera tempo", "OESZ": "orienta eŭropa somera tempo", "COST": "COST", "GYT": "GYT", "HKT": "HKT", "HKST": "HKST", "TMT": "TMT", "ACDT": "centra aŭstralia somera tempo", "CAT": "centra afrika tempo", "GMT": "universala tempo kunordigita", "MST": "MST", "CHADT": "CHADT", "EDT": "orienta nord-amerika somera tempo", "CST": "centra nord-amerika norma tempo", "WIT": "orienta indonezia tempo", "ART": "ART", "PDT": "pacifika nord-amerika somera tempo", "CLT": "CLT", "BT": "BT", "PST": "pacifika nord-amerika norma tempo", "WITA": "centra indonezia tempo", "BOT": "BOT", "OEZ": "orienta eŭropa norma tempo", "MYT": "MYT", "LHDT": "LHDT", "CLST": "CLST", "HENOMX": "HENOMX", "HNCU": "HNCU", "SRT": "SRT", "EAT": "orienta afrika tempo", "WAT": "okcidenta afrika norma tempo", "AWST": "okcidenta aŭstralia norma tempo", "HNPM": "HNPM", "TMST": "TMST", "UYT": "UYT", "HADT": "HADT", "MEZ": "centra eŭropa norma tempo", "LHST": "LHST", "JST": "japana norma tempo", "HECU": "HECU", "WIB": "okcidenta indonezia tempo", "ARST": "ARST", "AEDT": "orienta aŭstralia somera tempo", "NZDT": "NZDT", "IST": "barata tempo"}, -+ locale: "eo_001", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HAT": "HAT", "MST": "MST", "MESZ": "MESZ", "AWST": "AWST", "PDT": "PDT", "OEZ": "OEZ", "WITA": "WITA", "CST": "CST", "JDT": "JDT", "HNCU": "HNCU", "HEOG": "HEOG", "WIB": "WIB", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "WAST": "WAST", "OESZ": "OESZ", "AST": "AST", "BT": "BT", "WART": "WART", "HNOG": "HNOG", "CLT": "CLT", "MEZ": "MEZ", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "HKT": "HKT", "GMT": "GMT", "ART": "ART", "LHST": "LHST", "CHADT": "CHADT", "UYT": "UYT", "PST": "PST", "TMT": "TMT", "CAT": "CAT", "EAT": "EAT", "ACWST": "ACWST", "ACWDT": "ACWDT", "AKST": "AKST", "GYT": "GYT", "ARST": "ARST", "HAST": "HAST", "JST": "JST", "IST": "IST", "SAST": "SAST", "COST": "COST", "HEEG": "HEEG", "HENOMX": "HENOMX", "HADT": "HADT", "HKST": "HKST", "ECT": "ECT", "ADT": "ADT", "SRT": "SRT", "HNEG": "HNEG", "HEPM": "HEPM", "AEST": "AEST", "UYST": "UYST", "HECU": "HECU", "WIT": "WIT", "CDT": "CDT", "NZDT": "NZDT", "AWDT": "AWDT", "WARST": "WARST", "EST": "EST", "EDT": "EDT", "NZST": "NZST", "LHDT": "LHDT", "AKDT": "AKDT", "HNT": "HNT", "MDT": "MDT", "ChST": "ChST", "MYT": "MYT", "CHAST": "CHAST", "WAT": "WAT", "GFT": "GFT", "COT": "COT", "CLST": "CLST", "AEDT": "AEDT", "SGT": "SGT", "VET": "VET", "TMST": "TMST", "BOT": "BOT", "ACST": "ACST", "HNPM": "HNPM"}, - } - } -  -@@ -127,7 +101,7 @@ func (eo *eo_001) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (eo *eo_001) MonthsAbbreviated() []string { -- return eo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -137,7 +111,7 @@ func (eo *eo_001) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (eo *eo_001) MonthsNarrow() []string { -- return eo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -147,7 +121,7 @@ func (eo *eo_001) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (eo *eo_001) MonthsWide() []string { -- return eo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,79 +167,13 @@ func (eo *eo_001) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'eo_001' and handles both Whole and Real numbers based on 'v' - func (eo *eo_001) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(eo.group) - 1; j >= 0; j-- { -- b = append(b, eo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(eo.minus) - 1; j >= 0; j-- { -- b = append(b, eo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'eo_001' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (eo *eo_001) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(eo.minus) - 1; j >= 0; j-- { -- b = append(b, eo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, eo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'eo_001' -@@ -273,42 +181,7 @@ func (eo *eo_001) FmtCurrency(num float64, v uint64, currency currency.Type) str -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := eo.currencies[currency] -- l := len(s) + len(symbol) + 7 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(eo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, eo.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- for j := len(eo.minus) - 1; j >= 0; j-- { -- b = append(b, eo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, eo.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'eo_001' -@@ -317,59 +190,7 @@ func (eo *eo_001) FmtAccounting(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := eo.currencies[currency] -- l := len(s) + len(symbol) + 7 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(eo.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, eo.currencyNegativePrefix[j]) -- } -- -- for j := len(eo.minus) - 1; j >= 0; j-- { -- b = append(b, eo.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(eo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, eo.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, eo.currencyNegativeSuffix...) -- } else { -- -- b = append(b, eo.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'eo_001' -@@ -377,28 +198,6 @@ func (eo *eo_001) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -407,22 +206,6 @@ func (eo *eo_001) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- b = append(b, eo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -431,22 +214,6 @@ func (eo *eo_001) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- b = append(b, eo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,21 +222,6 @@ func (eo *eo_001) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, eo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d, 0x61}...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, eo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,19 +230,6 @@ func (eo *eo_001) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -499,26 +238,6 @@ func (eo *eo_001) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, eo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -527,30 +246,6 @@ func (eo *eo_001) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, eo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -559,28 +254,5 @@ func (eo *eo_001) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2d, 0x61}...) -- b = append(b, []byte{0x20, 0x68, 0x6f, 0x72, 0x6f}...) -- b = append(b, []byte{0x20, 0x6b, 0x61, 0x6a}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, eo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := eo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/es/es.go b/es/es.go -index 8fbcf26..0b862a1 100644 ---- a/es/es.go -+++ b/es/es.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"a. C.", "d. C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"BT": "hora de Bután", "AEDT": "hora de verano de Australia oriental", "TMT": "hora estándar de Turkmenistán", "COT": "hora estándar de Colombia", "GMT": "hora del meridiano de Greenwich", "SAST": "hora de Sudáfrica", "CLST": "hora de verano de Chile", "ACDT": "hora de verano de Australia central", "OESZ": "hora de verano de Europa oriental", "∅∅∅": "hora de verano de Perú", "PDT": "hora de verano del Pacífico", "ART": "hora estándar de Argentina", "WITA": "hora de Indonesia central", "HEPMX": "hora de verano del Pacífico de México", "AKST": "hora estándar de Alaska", "MYT": "hora de Malasia", "WEZ": "hora estándar de Europa occidental", "ARST": "hora de verano de Argentina", "HEOG": "hora de verano de Groenlandia occidental", "EAT": "hora de África oriental", "OEZ": "hora estándar de Europa oriental", "MST": "Hora estándar de Macao", "WIB": "hora de Indonesia occidental", "WESZ": "hora de verano de Europa occidental", "AWDT": "hora de verano de Australia occidental", "SGT": "hora de Singapur", "PST": "hora estándar del Pacífico", "HKT": "hora estándar de Hong Kong", "HNPM": "hora estándar de San Pedro y Miquelón", "AEST": "hora estándar de Australia oriental", "HKST": "hora de verano de Hong Kong", "ACST": "hora estándar de Australia central", "COST": "hora de verano de Colombia", "HNNOMX": "hora estándar del noroeste de México", "ADT": "hora de verano del Atlántico", "VET": "hora de Venezuela", "HNT": "hora estándar de Terranova", "LHDT": "hora de verano de Lord Howe", "CLT": "hora estándar de Chile", "ECT": "hora de Ecuador", "EDT": "hora de verano oriental", "IST": "hora estándar de la India", "HEEG": "hora de verano de Groenlandia oriental", "GFT": "hora de la Guayana Francesa", "UYT": "hora estándar de Uruguay", "UYST": "hora de verano de Uruguay", "SRT": "hora de Surinam", "NZDT": "hora de verano de Nueva Zelanda", "HAST": "hora estándar de Hawái-Aleutiano", "WIT": "hora de Indonesia oriental", "HNCU": "hora estándar de Cuba", "GYT": "hora de Guyana", "CST": "hora estándar central", "AWST": "hora estándar de Australia occidental", "ChST": "hora estándar de Chamorro", "BOT": "hora de Bolivia", "HNEG": "hora estándar de Groenlandia oriental", "WAST": "hora de verano de África occidental", "MDT": "Hora de verano de Macao", "AKDT": "hora de verano de Alaska", "HEPM": "hora de verano de San Pedro y Miquelón", "JDT": "hora de verano de Japón", "TMST": "hora de verano de Turkmenistán", "CAT": "hora de África central", "WARST": "hora de verano de Argentina occidental", "AST": "hora estándar del Atlántico", "ACWST": "hora estándar de Australia centroccidental", "JST": "hora estándar de Japón", "NZST": "hora estándar de Nueva Zelanda", "CHAST": "hora estándar de Chatham", "HECU": "hora de verano de Cuba", "HNPMX": "hora estándar del Pacífico de México", "CDT": "hora de verano central", "ACWDT": "hora de verano de Australia centroccidental", "MEZ": "hora estándar de Europa central", "LHST": "hora estándar de Lord Howe", "HENOMX": "hora de verano del noroeste de México", "MESZ": "hora de verano de Europa central", "CHADT": "hora de verano de Chatham", "WAT": "hora estándar de África occidental", "WART": "hora estándar de Argentina occidental", "EST": "hora estándar oriental", "HADT": "hora de verano de Hawái-Aleutiano", "HAT": "hora de verano de Terranova", "HNOG": "hora estándar de Groenlandia occidental"}, -+ timezones: map[string]string{"MDT": "Hora de verano de Macao", "HAST": "hora estándar de Hawái-Aleutiano", "MYT": "hora de Malasia", "PDT": "hora de verano del Pacífico", "WAST": "hora de verano de África occidental", "TMST": "hora de verano de Turkmenistán", "AKST": "hora estándar de Alaska", "OESZ": "hora de verano de Europa oriental", "TMT": "hora estándar de Turkmenistán", "CAT": "hora de África central", "HAT": "hora de verano de Terranova", "COT": "hora estándar de Colombia", "COST": "hora de verano de Colombia", "JDT": "hora de verano de Japón", "BT": "hora de Bután", "ACWDT": "hora de verano de Australia centroccidental", "SGT": "hora de Singapur", "AKDT": "hora de verano de Alaska", "NZST": "hora estándar de Nueva Zelanda", "AST": "hora estándar del Atlántico", "WIB": "hora de Indonesia occidental", "AWDT": "hora de verano de Australia occidental", "UYT": "hora estándar de Uruguay", "AEDT": "hora de verano de Australia oriental", "WEZ": "hora estándar de Europa occidental", "CLT": "hora estándar de Chile", "WAT": "hora estándar de África occidental", "HNT": "hora estándar de Terranova", "ARST": "hora de verano de Argentina", "AWST": "hora estándar de Australia occidental", "HEPM": "hora de verano de San Pedro y Miquelón", "PST": "hora estándar del Pacífico", "CHAST": "hora estándar de Chatham", "HECU": "hora de verano de Cuba", "BOT": "hora de Bolivia", "CST": "hora estándar central", "MST": "Hora estándar de Macao", "MEZ": "hora estándar de Europa central", "ACST": "hora estándar de Australia central", "CHADT": "hora de verano de Chatham", "WESZ": "hora de verano de Europa occidental", "CLST": "hora de verano de Chile", "HEEG": "hora de verano de Groenlandia oriental", "WARST": "hora de verano de Argentina occidental", "WITA": "hora de Indonesia central", "ART": "hora estándar de Argentina", "ACDT": "hora de verano de Australia central", "HNPM": "hora estándar de San Pedro y Miquelón", "IST": "hora estándar de la India", "HEPMX": "hora de verano del Pacífico de México", "GMT": "hora del meridiano de Greenwich", "HNPMX": "hora estándar del Pacífico de México", "HKST": "hora de verano de Hong Kong", "ADT": "hora de verano del Atlántico", "HNEG": "hora estándar de Groenlandia oriental", "∅∅∅": "Hora de verano de Acre", "OEZ": "hora estándar de Europa oriental", "ECT": "hora de Ecuador", "GYT": "hora de Guyana", "SRT": "hora de Surinam", "MESZ": "hora de verano de Europa central", "HNNOMX": "hora estándar del noroeste de México", "UYST": "hora de verano de Uruguay", "AEST": "hora estándar de Australia oriental", "HNCU": "hora estándar de Cuba", "VET": "hora de Venezuela", "WIT": "hora de Indonesia oriental", "HKT": "hora estándar de Hong Kong", "ChST": "hora estándar de Chamorro", "HADT": "hora de verano de Hawái-Aleutiano", "LHST": "hora estándar de Lord Howe", "LHDT": "hora de verano de Lord Howe", "WART": "hora estándar de Argentina occidental", "HNOG": "hora estándar de Groenlandia occidental", "NZDT": "hora de verano de Nueva Zelanda", "HENOMX": "hora de verano del noroeste de México", "JST": "hora estándar de Japón", "GFT": "hora de la Guayana Francesa", "HEOG": "hora de verano de Groenlandia occidental", "CDT": "hora de verano central", "SAST": "hora de Sudáfrica", "EST": "hora estándar oriental", "EDT": "hora de verano oriental", "EAT": "hora de África oriental", "ACWST": "hora estándar de Australia centroccidental"}, - } - } -  -diff --git a/es_419/es_419.go b/es_419/es_419.go -index fee14d3..38dc7a7 100644 ---- a/es_419/es_419.go -+++ b/es_419/es_419.go -@@ -18,7 +18,6 @@ type es_419 struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,27 +48,15 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ".", - group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "E£", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "BsF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sep.", "oct.", "nov.", "dic."}, - monthsNarrow: []string{"", "e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, - daysNarrow: []string{"d", "l", "m", "m", "j", "v", "s"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a.m.", "p.m."}, - periodsNarrow: []string{"a.m.", "p.m."}, - periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"WIT": "hora de Indonesia oriental", "ART": "hora estándar de Argentina", "HADT": "hora de verano de Hawái-Aleutianas", "VET": "hora de Venezuela", "WESZ": "hora de verano de Europa occidental", "NZST": "hora estándar de Nueva Zelanda", "IST": "hora de India", "GYT": "hora de Guyana", "UYST": "hora de verano de Uruguay", "AKST": "hora estándar de Alaska", "MESZ": "hora de verano de Europa central", "HEEG": "hora de verano de Groenlandia oriental", "TMST": "hora de verano de Turkmenistán", "EST": "hora estándar oriental", "HAST": "hora estándar de Hawái-Aleutianas", "HEOG": "hora de verano de Groenlandia occidental", "NZDT": "hora de verano de Nueva Zelanda", "HNEG": "hora estándar de Groenlandia oriental", "CAT": "hora de África central", "COT": "hora estándar de Colombia", "WEZ": "hora estándar de Europa occidental", "HKT": "hora estándar de Hong Kong", "HEPM": "hora de verano de San Pedro y Miquelón", "CDT": "hora de verano central", "AST": "hora estándar del Atlántico", "WIB": "hora de Indonesia occidental", "HNOG": "hora estándar de Groenlandia occidental", "PST": "hora estándar del Pacífico", "ACWDT": "hora de verano de Australia centroccidental", "EAT": "hora de África oriental", "COST": "hora de verano de Colombia", "HNCU": "hora estándar de Cuba", "∅∅∅": "hora de verano de las Azores", "ADT": "hora de verano del Atlántico", "BOT": "hora de Bolivia", "TMT": "hora estándar de Turkmenistán", "ACST": "hora estándar de Australia central", "WART": "hora estándar de Argentina occidental", "HNNOMX": "hora estándar del noroeste de México", "HNPMX": "hora estándar del Pacífico de México", "CLST": "hora de verano de Chile", "JST": "hora estándar de Japón", "AEST": "hora estándar de Australia oriental", "CHAST": "hora estándar de Chatham", "WAST": "hora de verano de África occidental", "ECT": "hora de Ecuador", "WARST": "hora de verano de Argentina occidental", "MST": "Hora estándar de Macao", "BT": "hora de Bután", "ARST": "hora de verano de Argentina", "HENOMX": "hora de verano del noroeste de México", "MEZ": "hora estándar de Europa central", "CLT": "hora estándar de Chile", "UYT": "hora estándar de Uruguay", "AWST": "hora estándar de Australia occidental", "WITA": "hora de Indonesia central", "HEPMX": "hora de verano del Pacífico de México", "CST": "hora estándar central", "AEDT": "hora de verano de Australia oriental", "AKDT": "hora de verano de Alaska", "HAT": "hora de verano de Terranova", "HNPM": "hora estándar de San Pedro y Miquelón", "JDT": "hora de verano de Japón", "HECU": "hora de verano de Cuba", "EDT": "hora de verano oriental", "MYT": "hora de Malasia", "CHADT": "hora de verano de Chatham", "WAT": "hora estándar de África occidental", "OESZ": "hora de verano de Europa oriental", "LHST": "hora estándar de Lord Howe", "SGT": "hora de Singapur", "MDT": "Hora de verano de Macao", "HNT": "hora estándar de Terranova", "HKST": "hora de verano de Hong Kong", "ACDT": "hora de verano de Australia central", "OEZ": "hora estándar de Europa oriental", "GMT": "hora del meridiano de Greenwich", "PDT": "hora de verano del Pacífico", "ACWST": "hora estándar de Australia centroccidental", "SRT": "hora de Surinam", "AWDT": "hora de verano de Australia occidental", "GFT": "hora de la Guayana Francesa", "LHDT": "hora de verano de Lord Howe", "SAST": "hora de Sudáfrica", "ChST": "hora estándar de Chamorro"}, -+ timezones: map[string]string{"WAST": "WAST", "EST": "EST", "CLT": "CLT", "AST": "AST", "WESZ": "WESZ", "ARST": "ARST", "JST": "JST", "ACDT": "ACDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "GFT": "GFT", "EDT": "EDT", "CDT": "CDT", "SRT": "SRT", "ACWDT": "ACWDT", "HAT": "HAT", "HKT": "HKT", "GMT": "GMT", "MESZ": "MESZ", "PST": "PST", "WAT": "WAT", "HKST": "HKST", "NZDT": "NZDT", "IST": "hora de India", "HNPM": "HNPM", "AKST": "AKST", "WART": "WART", "ART": "ART", "ChST": "ChST", "MEZ": "MEZ", "HEPM": "HEPM", "MYT": "MYT", "TMST": "TMST", "ADT": "ADT", "HNEG": "HNEG", "LHST": "LHST", "UYT": "UYT", "PDT": "PDT", "WEZ": "WEZ", "VET": "VET", "EAT": "EAT", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "WIB": "WIB", "HADT": "hora de verano de Hawái-Aleutianas", "AWDT": "AWDT", "LHDT": "LHDT", "HNCU": "HNCU", "SAST": "SAST", "NZST": "NZST", "HAST": "hora estándar de Hawái-Aleutianas", "HNT": "HNT", "WIT": "WIT", "CHAST": "CHAST", "UYST": "UYST", "HECU": "HECU", "HNOG": "HNOG", "AEDT": "AEDT", "HNNOMX": "HNNOMX", "ACST": "ACST", "AEST": "AEST", "HEOG": "HEOG", "ECT": "ECT", "BOT": "BOT", "JDT": "JDT", "SGT": "SGT", "WARST": "WARST", "TMT": "TMT", "CST": "CST", "MDT": "MDT", "HENOMX": "HENOMX", "AKDT": "AKDT", "OESZ": "OESZ", "CAT": "CAT", "WITA": "WITA", "MST": "MST", "ACWST": "ACWST", "CHADT": "CHADT", "BT": "BT", "OEZ": "OEZ", "GYT": "GYT", "COT": "COT", "COST": "COST", "AWST": "AWST", "CLST": "CLST"}, - } - } -  -@@ -142,7 +129,7 @@ func (es *es_419) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_419) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +175,13 @@ func (es *es_419) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_419' and handles both Whole and Real numbers based on 'v' - func (es *es_419) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_419' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_419) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_419' -@@ -264,7 +189,7 @@ func (es *es_419) FmtCurrency(num float64, v uint64, currency currency.Type) str -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -322,7 +247,7 @@ func (es *es_419) FmtAccounting(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -387,17 +312,6 @@ func (es *es_419) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +320,6 @@ func (es *es_419) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,19 +328,6 @@ func (es *es_419) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,21 +336,6 @@ func (es *es_419) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_AR/es_AR.go b/es_AR/es_AR.go -index 70ae0b5..455bd64 100644 ---- a/es_AR/es_AR.go -+++ b/es_AR/es_AR.go -@@ -18,7 +18,6 @@ type es_AR struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -52,30 +51,16 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "$", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositivePrefix: " ", - currencyNegativePrefix: "( ", - currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, - daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"PDT": "hora de verano del Pacífico", "HEPM": "hora de verano de San Pedro y Miquelón", "GFT": "hora de la Guayana Francesa", "OEZ": "hora estándar de Europa oriental", "AKST": "hora estándar de Alaska", "CDT": "hora de verano central", "HEOG": "hora de verano de Groenlandia occidental", "SAST": "hora de Sudáfrica", "HNEG": "hora estándar de Groenlandia oriental", "HNNOMX": "hora estándar del noroeste de México", "AST": "hora estándar del Atlántico", "HAST": "hora estándar de Hawái-Aleutiano", "WIT": "hora de Indonesia oriental", "HNOG": "hora estándar de Groenlandia occidental", "HKT": "hora estándar de Hong Kong", "WITA": "hora de Indonesia central", "HNPMX": "hora estándar del Pacífico de México", "VET": "hora de Venezuela", "CHADT": "hora de verano de Chatham", "EDT": "hora de verano oriental", "UYST": "hora de verano de Uruguay", "ART": "hora estándar de Argentina", "LHDT": "hora de verano de Lord Howe", "ACST": "hora estándar de Australia central", "OESZ": "hora de verano de Europa oriental", "WARST": "hora de verano de Argentina occidental", "HEPMX": "hora de verano del Pacífico de México", "WIB": "hora de Indonesia occidental", "ARST": "hora de verano de Argentina", "ACWST": "hora estándar de Australia centroccidental", "LHST": "hora estándar de Lord Howe", "JST": "hora estándar de Japón", "BOT": "hora de Bolivia", "ECT": "hora de Ecuador", "CAT": "hora de África central", "MDT": "hora de verano de las Montañas", "COT": "hora estándar de Colombia", "GMT": "hora del meridiano de Greenwich", "AKDT": "hora de verano de Alaska", "CST": "hora estándar central", "WAST": "hora de verano de África occidental", "ACWDT": "hora de verano de Australia centroccidental", "TMT": "hora estándar de Turkmenistán", "BT": "hora de Bután", "HEEG": "hora de verano de Groenlandia oriental", "EST": "hora estándar oriental", "ADT": "hora de verano del Atlántico", "AEDT": "hora de verano de Australia oriental", "WESZ": "hora de verano de Europa occidental", "HNT": "hora estándar de Terranova", "AWDT": "hora de verano de Australia occidental", "SRT": "hora de Surinam", "CHAST": "hora estándar de Chatham", "GYT": "hora de Guyana", "NZDT": "hora de verano de Nueva Zelanda", "AEST": "hora estándar de Australia oriental", "EAT": "hora de África oriental", "HNCU": "hora estándar de Cuba", "HADT": "hora de verano de Hawái-Aleutiano", "JDT": "hora de verano de Japón", "CLST": "hora de verano de Chile", "WAT": "hora estándar de África occidental", "HENOMX": "hora de verano del noroeste de México", "UYT": "hora estándar de Uruguay", "MST": "hora estándar de las Montañas", "HAT": "hora de verano de Terranova", "HNPM": "hora estándar de San Pedro y Miquelón", "∅∅∅": "hora de verano del Amazonas", "ACDT": "hora de verano de Australia central", "COST": "hora de verano de Colombia", "SGT": "hora de Singapur", "HECU": "hora de verano de Cuba", "PST": "hora estándar del Pacífico", "MYT": "hora de Malasia", "HKST": "hora de verano de Hong Kong", "NZST": "hora estándar de Nueva Zelanda", "CLT": "hora estándar de Chile", "ChST": "hora estándar de Chamorro", "WART": "hora estándar de Argentina occidental", "AWST": "hora estándar de Australia occidental", "MEZ": "hora estándar de Europa central", "MESZ": "hora de verano de Europa central", "IST": "hora estándar de la India", "TMST": "hora de verano de Turkmenistán", "WEZ": "hora estándar de Europa occidental"}, -+ timezones: map[string]string{"HEEG": "HEEG", "HENOMX": "HENOMX", "LHDT": "LHDT", "ACWDT": "ACWDT", "WESZ": "WESZ", "WIT": "WIT", "ART": "ART", "AWDT": "AWDT", "IST": "IST", "UYT": "UYT", "WAT": "WAT", "HNNOMX": "HNNOMX", "WIB": "WIB", "MESZ": "MESZ", "AEDT": "AEDT", "CHADT": "CHADT", "SGT": "SGT", "WART": "WART", "CDT": "CDT", "HEPM": "HEPM", "CLT": "CLT", "ACST": "ACST", "PDT": "PDT", "HECU": "HECU", "HEPMX": "HEPMX", "SAST": "SAST", "HNEG": "HNEG", "ARST": "ARST", "PST": "PST", "HNT": "HNT", "HAT": "HAT", "COT": "COT", "CAT": "CAT", "AST": "AST", "MDT": "MDT", "ACDT": "ACDT", "HNCU": "HNCU", "CST": "CST", "ECT": "ECT", "BT": "BT", "AEST": "AEST", "HKST": "HKST", "NZST": "NZST", "BOT": "BOT", "AWST": "AWST", "ACWST": "ACWST", "AKDT": "AKDT", "HNOG": "HNOG", "HKT": "HKT", "GMT": "GMT", "MEZ": "MEZ", "AKST": "AKST", "OEZ": "OEZ", "COST": "COST", "EDT": "EDT", "TMT": "TMT", "MST": "MST", "ChST": "ChST", "LHST": "LHST", "MYT": "MYT", "WEZ": "WEZ", "WAST": "WAST", "WITA": "WITA", "HADT": "HADT", "JDT": "JDT", "∅∅∅": "∅∅∅", "UYST": "UYST", "OESZ": "OESZ", "GFT": "GFT", "HEOG": "HEOG", "HAST": "HAST", "EST": "EST", "VET": "VET", "HNPM": "HNPM", "WARST": "WARST", "TMST": "TMST", "SRT": "SRT", "HNPMX": "HNPMX", "CLST": "CLST", "NZDT": "NZDT", "EAT": "EAT", "JST": "JST", "CHAST": "CHAST", "GYT": "GYT", "ADT": "ADT"}, - } - } -  -@@ -128,7 +113,7 @@ func (es *es_AR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_AR) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +123,7 @@ func (es *es_AR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_AR) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +133,7 @@ func (es *es_AR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_AR) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,75 +179,13 @@ func (es *es_AR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_AR' and handles both Whole and Real numbers based on 'v' - func (es *es_AR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_AR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_AR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_AR' -@@ -270,7 +193,7 @@ func (es *es_AR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -332,7 +255,7 @@ func (es *es_AR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 5 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -407,17 +330,6 @@ func (es *es_AR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -426,17 +338,6 @@ func (es *es_AR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -445,19 +346,6 @@ func (es *es_AR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,21 +354,6 @@ func (es *es_AR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,15 +362,6 @@ func (es *es_AR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -506,22 +370,6 @@ func (es *es_AR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -530,26 +378,6 @@ func (es *es_AR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -558,32 +386,5 @@ func (es *es_AR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_BO/es_BO.go b/es_BO/es_BO.go -index 91a01da..b29529b 100644 ---- a/es_BO/es_BO.go -+++ b/es_BO/es_BO.go -@@ -10,70 +10,51 @@ import ( - ) -  - type es_BO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_BO' locale - func New() locales.Translator { - return &es_BO{ -- locale: "es_BO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "Bs", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"HEPMX": "hora de verano del Pacífico de México", "WEZ": "hora estándar de Europa occidental", "HEPM": "hora de verano de San Pedro y Miquelón", "GYT": "hora de Guyana", "HAST": "hora estándar de Hawái-Aleutiano", "BT": "hora de Bután", "ACST": "hora estándar de Australia central", "WAT": "hora estándar de África occidental", "SGT": "hora de Singapur", "MDT": "Hora de verano de Macao", "HNPM": "hora estándar de San Pedro y Miquelón", "HNT": "hora estándar de Terranova", "JDT": "hora de verano de Japón", "HNEG": "hora estándar de Groenlandia oriental", "TMT": "hora estándar de Turkmenistán", "ECT": "hora de Ecuador", "COST": "hora de verano de Colombia", "UYST": "hora de verano de Uruguay", "VET": "hora de Venezuela", "SAST": "hora de Sudáfrica", "GFT": "hora de la Guayana Francesa", "ACDT": "hora de verano de Australia central", "HNNOMX": "hora estándar del noroeste de México", "HENOMX": "hora de verano del noroeste de México", "MESZ": "hora de verano de Europa central", "CLT": "hora estándar de Chile", "CLST": "hora de verano de Chile", "NZST": "hora estándar de Nueva Zelanda", "CHAST": "hora estándar de Chatham", "ChST": "hora estándar de Chamorro", "EST": "hora estándar oriental", "AWDT": "hora de verano de Australia occidental", "WIB": "hora de Indonesia occidental", "HADT": "hora de verano de Hawái-Aleutiano", "SRT": "hora de Surinam", "WESZ": "hora de verano de Europa occidental", "TMST": "hora de verano de Turkmenistán", "WAST": "hora de verano de África occidental", "HNCU": "hora estándar de Cuba", "CDT": "hora de verano central", "LHST": "hora estándar de Lord Howe", "CST": "hora estándar central", "UYT": "hora estándar de Uruguay", "WIT": "hora de Indonesia oriental", "ART": "hora estándar de Argentina", "OESZ": "hora de verano de Europa oriental", "WART": "hora estándar de Argentina occidental", "HNPMX": "hora estándar del Pacífico de México", "MST": "Hora estándar de Macao", "MEZ": "hora estándar de Europa central", "HKST": "hora de verano de Hong Kong", "CHADT": "hora de verano de Chatham", "JST": "hora estándar de Japón", "AKST": "hora estándar de Alaska", "ADT": "hora de verano del Atlántico", "HAT": "hora de verano de Terranova", "ACWST": "hora estándar de Australia centroccidental", "WITA": "hora de Indonesia central", "COT": "hora estándar de Colombia", "GMT": "hora del meridiano de Greenwich", "EDT": "hora de verano oriental", "AST": "hora estándar del Atlántico", "AEST": "hora estándar de Australia oriental", "OEZ": "hora estándar de Europa oriental", "HNOG": "hora estándar de Groenlandia occidental", "PST": "hora estándar del Pacífico", "PDT": "hora de verano del Pacífico", "HEEG": "hora de verano de Groenlandia oriental", "AKDT": "hora de verano de Alaska", "MYT": "hora de Malasia", "HKT": "hora estándar de Hong Kong", "AEDT": "hora de verano de Australia oriental", "AWST": "hora estándar de Australia occidental", "NZDT": "hora de verano de Nueva Zelanda", "CAT": "hora de África central", "EAT": "hora de África oriental", "ACWDT": "hora de verano de Australia centroccidental", "HEOG": "hora de verano de Groenlandia occidental", "LHDT": "hora de verano de Lord Howe", "ARST": "hora de verano de Argentina", "IST": "hora estándar de la India", "∅∅∅": "hora de verano del Amazonas", "BOT": "hora de Bolivia", "WARST": "hora de verano de Argentina occidental", "HECU": "hora de verano de Cuba"}, -+ locale: "es_BO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "Bs", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "HECU": "HECU", "HNT": "HNT", "SAST": "SAST", "TMST": "TMST", "CST": "CST", "HENOMX": "HENOMX", "MEZ": "MEZ", "ACDT": "ACDT", "WEZ": "WEZ", "SGT": "SGT", "BOT": "BOT", "HADT": "HADT", "OESZ": "OESZ", "TMT": "TMT", "AEDT": "AEDT", "JST": "JST", "VET": "VET", "HAT": "HAT", "WART": "WART", "CLT": "CLT", "ARST": "ARST", "AWST": "AWST", "PDT": "PDT", "CHADT": "CHADT", "WAT": "WAT", "HEPM": "HEPM", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "UYT": "UYT", "COST": "COST", "EDT": "EDT", "HKT": "HKT", "MDT": "MDT", "EAT": "EAT", "WARST": "WARST", "CAT": "CAT", "PST": "PST", "WIT": "WIT", "WITA": "WITA", "ACST": "ACST", "AEST": "AEST", "HNCU": "HNCU", "HEPMX": "HEPMX", "GYT": "GYT", "COT": "COT", "HKST": "HKST", "CDT": "CDT", "ACWST": "ACWST", "NZDT": "NZDT", "MST": "MST", "HNEG": "HNEG", "MYT": "MYT", "AKST": "AKST", "AKDT": "AKDT", "WIB": "WIB", "ADT": "ADT", "SRT": "SRT", "MESZ": "MESZ", "LHST": "LHST", "HNPMX": "HNPMX", "OEZ": "OEZ", "HNOG": "HNOG", "CHAST": "CHAST", "BT": "BT", "ACWDT": "ACWDT", "UYST": "UYST", "WAST": "WAST", "EST": "EST", "NZST": "NZST", "AST": "AST", "JDT": "JDT", "LHDT": "LHDT", "WESZ": "WESZ", "AWDT": "AWDT", "HEEG": "HEEG", "IST": "IST", "GFT": "GFT", "HEOG": "HEOG", "GMT": "GMT", "ART": "ART", "HAST": "HAST", "ECT": "ECT", "ChST": "ChST", "CLST": "CLST"}, - } - } -  -@@ -126,7 +107,7 @@ func (es *es_BO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_BO) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +127,7 @@ func (es *es_BO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_BO) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +173,13 @@ func (es *es_BO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_BO' and handles both Whole and Real numbers based on 'v' - func (es *es_BO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_BO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_BO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_BO' -@@ -268,56 +187,7 @@ func (es *es_BO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_BO' -@@ -326,63 +196,7 @@ func (es *es_BO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_BO' -@@ -390,17 +204,6 @@ func (es *es_BO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -429,19 +232,6 @@ func (es *es_BO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,21 +240,6 @@ func (es *es_BO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,15 +248,6 @@ func (es *es_BO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -490,22 +256,6 @@ func (es *es_BO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -514,26 +264,6 @@ func (es *es_BO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -542,32 +272,5 @@ func (es *es_BO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_BR/es_BR.go b/es_BR/es_BR.go -index 8d0ea33..1a69164 100644 ---- a/es_BR/es_BR.go -+++ b/es_BR/es_BR.go -@@ -10,70 +10,45 @@ import ( - ) -  - type es_BR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_BR' locale - func New() locales.Translator { - return &es_BR{ -- locale: "es_BR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "R$", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"AEDT": "hora de verano de Australia oriental", "WART": "hora estándar de Argentina occidental", "HNPMX": "hora estándar del Pacífico de México", "ACWDT": "hora de verano de Australia centroccidental", "HKT": "hora estándar de Hong Kong", "CHAST": "hora estándar de Chatham", "ChST": "hora estándar de Chamorro", "GFT": "hora de la Guayana Francesa", "OESZ": "hora de verano de Europa oriental", "HNNOMX": "hora estándar del noroeste de México", "AKST": "hora estándar de Alaska", "WEZ": "hora estándar de Europa occidental", "HNT": "hora estándar de Terranova", "CLT": "hora estándar de Chile", "JST": "hora estándar de Japón", "EDT": "hora de verano oriental", "GMT": "hora del meridiano de Greenwich", "UYST": "hora de verano de Uruguay", "MESZ": "hora de verano de Europa central", "BOT": "hora de Bolivia", "WAT": "hora estándar de África occidental", "COT": "hora estándar de Colombia", "HEPMX": "hora de verano del Pacífico de México", "GYT": "hora de Guyana", "HNOG": "hora estándar de Groenlandia occidental", "HEOG": "hora de verano de Groenlandia occidental", "∅∅∅": "hora de verano del Amazonas", "HENOMX": "hora de verano del noroeste de México", "AWST": "hora estándar de Australia occidental", "LHDT": "hora de verano de Lord Howe", "ACST": "hora estándar de Australia central", "AKDT": "hora de verano de Alaska", "CST": "hora estándar central", "AST": "hora estándar del Atlántico", "SRT": "hora de Surinam", "HAT": "hora de verano de Terranova", "OEZ": "hora estándar de Europa oriental", "COST": "hora de verano de Colombia", "WIT": "hora de Indonesia oriental", "WESZ": "hora de verano de Europa occidental", "NZST": "hora estándar de Nueva Zelanda", "PDT": "hora de verano del Pacífico", "AWDT": "hora de verano de Australia occidental", "HKST": "hora de verano de Hong Kong", "HECU": "hora de verano de Cuba", "MYT": "hora de Malasia", "ACWST": "hora estándar de Australia centroccidental", "HEPM": "hora de verano de San Pedro y Miquelón", "ACDT": "hora de verano de Australia central", "HNCU": "hora estándar de Cuba", "MST": "hora estándar de las Montañas", "MEZ": "hora estándar de Europa central", "ECT": "hora de Ecuador", "CAT": "hora de África central", "EST": "hora estándar oriental", "VET": "hora de Venezuela", "HADT": "hora de verano de Hawái-Aleutiano", "HNPM": "hora estándar de San Pedro y Miquelón", "SAST": "hora de Sudáfrica", "HNEG": "hora estándar de Groenlandia oriental", "CDT": "hora de verano central", "ADT": "hora de verano del Atlántico", "AEST": "hora estándar de Australia oriental", "TMT": "hora estándar de Turkmenistán", "ARST": "hora de verano de Argentina", "PST": "hora estándar del Pacífico", "WITA": "hora de Indonesia central", "MDT": "hora de verano de las Montañas", "BT": "hora de Bután", "JDT": "hora de verano de Japón", "SGT": "hora de Singapur", "CLST": "hora de verano de Chile", "HEEG": "hora de verano de Groenlandia oriental", "WARST": "hora de verano de Argentina occidental", "HAST": "hora estándar de Hawái-Aleutiano", "LHST": "hora estándar de Lord Howe", "NZDT": "hora de verano de Nueva Zelanda", "CHADT": "hora de verano de Chatham", "IST": "hora estándar de la India", "WAST": "hora de verano de África occidental", "UYT": "hora estándar de Uruguay", "WIB": "hora de Indonesia occidental", "ART": "hora estándar de Argentina", "TMST": "hora de verano de Turkmenistán", "EAT": "hora de África oriental"}, -+ locale: "es_BR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "R$", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AST": "AST", "ACDT": "ACDT", "LHDT": "LHDT", "HEPMX": "HEPMX", "GYT": "GYT", "MST": "MST", "EAT": "EAT", "CHAST": "CHAST", "WEZ": "WEZ", "WART": "WART", "HKT": "HKT", "HKST": "HKST", "CLST": "CLST", "ADT": "ADT", "ACWST": "ACWST", "AEDT": "AEDT", "ChST": "ChST", "HAST": "HAST", "AKDT": "AKDT", "WARST": "WARST", "COST": "COST", "TMST": "TMST", "BOT": "BOT", "SRT": "SRT", "MEZ": "MEZ", "HEPM": "HEPM", "AWDT": "AWDT", "CDT": "CDT", "MDT": "MDT", "UYST": "UYST", "WAT": "WAT", "HNT": "HNT", "CLT": "CLT", "WIB": "WIB", "PST": "PST", "HNOG": "HNOG", "TMT": "TMT", "ARST": "ARST", "MESZ": "MESZ", "ACST": "ACST", "HNPM": "HNPM", "AWST": "AWST", "HNCU": "HNCU", "COT": "COT", "HADT": "HADT", "JST": "JST", "IST": "IST", "HEOG": "HEOG", "HNEG": "HNEG", "ART": "ART", "ACWDT": "ACWDT", "OEZ": "OEZ", "GFT": "GFT", "CST": "CST", "NZDT": "NZDT", "GMT": "GMT", "HEEG": "HEEG", "CHADT": "CHADT", "WESZ": "WESZ", "SAST": "SAST", "EST": "EST", "WITA": "WITA", "HECU": "HECU", "MYT": "MYT", "UYT": "UYT", "BT": "BT", "SGT": "SGT", "VET": "VET", "LHST": "LHST", "AEST": "AEST", "PDT": "PDT", "HNPMX": "HNPMX", "CAT": "CAT", "JDT": "JDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AKST": "AKST", "OESZ": "OESZ", "HAT": "HAT", "NZST": "NZST", "∅∅∅": "∅∅∅", "WAST": "WAST", "WIT": "WIT", "EDT": "EDT", "ECT": "ECT"}, - } - } -  -@@ -126,7 +101,7 @@ func (es *es_BR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_BR) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (es *es_BR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_BR) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (es *es_BR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_BR) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (es *es_BR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_BR' and handles both Whole and Real numbers based on 'v' - func (es *es_BR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_BR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_BR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_BR' -@@ -268,56 +181,7 @@ func (es *es_BR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_BR' -@@ -326,63 +190,7 @@ func (es *es_BR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_BR' -@@ -390,17 +198,6 @@ func (es *es_BR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +206,6 @@ func (es *es_BR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +214,6 @@ func (es *es_BR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +222,6 @@ func (es *es_BR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +230,6 @@ func (es *es_BR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +238,6 @@ func (es *es_BR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +246,6 @@ func (es *es_BR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +254,5 @@ func (es *es_BR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_CL/es_CL.go b/es_CL/es_CL.go -index 959a044..6e8e208 100644 ---- a/es_CL/es_CL.go -+++ b/es_CL/es_CL.go -@@ -18,7 +18,6 @@ type es_CL struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,27 +48,14 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "$", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, - daysShort: []string{"do", "lu", "ma", "mi", "ju", "vi", "sá"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"NZDT": "hora de verano de Nueva Zelanda", "HEEG": "hora de verano de Groenlandia oriental", "OESZ": "hora de verano de Europa oriental", "MDT": "Hora de verano de Macao", "SRT": "hora de Surinam", "MESZ": "hora de verano de Europa central", "LHDT": "hora de verano de Lord Howe", "JST": "hora estándar de Japón", "ACST": "hora estándar de Australia central", "EAT": "hora de África oriental", "SGT": "hora de Singapur", "AKST": "hora estándar de Alaska", "CHAST": "hora estándar de Chatham", "HNT": "hora estándar de Terranova", "HKT": "hora estándar de Hong Kong", "ECT": "hora de Ecuador", "OEZ": "hora estándar de Europa oriental", "GMT": "hora del meridiano de Greenwich", "ADT": "hora de verano del Atlántico", "HADT": "hora de verano de Hawái-Aleutiano", "HNOG": "hora estándar de Groenlandia occidental", "LHST": "hora estándar de Lord Howe", "TMST": "hora de verano de Turkmenistán", "ACDT": "hora de verano de Australia central", "BT": "hora de Bután", "ARST": "hora de verano de Argentina", "AWDT": "hora de verano de Australia occidental", "NZST": "hora estándar de Nueva Zelanda", "TMT": "hora estándar de Turkmenistán", "WARST": "hora de verano de Argentina occidental", "EDT": "hora de verano oriental", "MST": "Hora estándar de Macao", "UYT": "hora estándar de Uruguay", "ART": "hora estándar de Argentina", "HEPMX": "hora de verano del Pacífico de México", "CDT": "hora de verano central", "PDT": "hora de verano del Pacífico", "WESZ": "hora de verano de Europa occidental", "ACWDT": "hora de verano de Australia centroccidental", "HENOMX": "hora de verano del noroeste de México", "GYT": "hora de Guyana", "UYST": "hora de verano de Uruguay", "WEZ": "hora estándar de Europa occidental", "ACWST": "hora estándar de Australia centroccidental", "SAST": "hora de Sudáfrica", "CLST": "hora de verano de Chile", "GFT": "hora de la Guayana Francesa", "WIT": "hora de Indonesia oriental", "JDT": "hora de verano de Japón", "WAT": "hora estándar de África occidental", "AWST": "hora estándar de Australia occidental", "CLT": "hora estándar de Chile", "COT": "hora estándar de Colombia", "MYT": "hora de Malasia", "WIB": "hora de Indonesia occidental", "HEPM": "hora de verano de San Pedro y Miquelón", "HNCU": "hora estándar de Cuba", "HNPMX": "hora estándar del Pacífico de México", "HAST": "hora estándar de Hawái-Aleutiano", "WITA": "hora de Indonesia central", "WAST": "hora de verano de África occidental", "AKDT": "hora de verano de Alaska", "CST": "hora estándar central", "HNNOMX": "hora estándar del noroeste de México", "HECU": "hora de verano de Cuba", "EST": "hora estándar oriental", "VET": "hora de Venezuela", "HAT": "hora de verano de Terranova", "AEDT": "hora de verano de Australia oriental", "HNEG": "hora estándar de Groenlandia oriental", "HEOG": "hora de verano de Groenlandia occidental", "CHADT": "hora de verano de Chatham", "BOT": "hora de Bolivia", "CAT": "hora de África central", "WART": "hora estándar de Argentina occidental", "COST": "hora de verano de Colombia", "AEST": "hora estándar de Australia oriental", "IST": "hora estándar de la India", "MEZ": "hora estándar de Europa central", "∅∅∅": "hora de verano del Amazonas", "ChST": "hora estándar de Chamorro", "AST": "hora estándar del Atlántico", "PST": "hora estándar del Pacífico", "HKST": "hora de verano de Hong Kong", "HNPM": "hora estándar de San Pedro y Miquelón"}, -+ timezones: map[string]string{"CLT": "CLT", "CST": "CST", "MST": "MST", "ECT": "ECT", "SRT": "SRT", "HEEG": "HEEG", "CHADT": "CHADT", "OEZ": "OEZ", "GFT": "GFT", "COST": "COST", "CAT": "CAT", "CDT": "CDT", "HNOG": "HNOG", "ACST": "ACST", "AWST": "AWST", "LHDT": "LHDT", "ACWDT": "ACWDT", "WAST": "WAST", "AKDT": "AKDT", "WARST": "WARST", "NZST": "NZST", "HNPM": "HNPM", "HKST": "HKST", "WITA": "WITA", "WIB": "WIB", "ChST": "ChST", "BOT": "BOT", "NZDT": "NZDT", "ACDT": "ACDT", "JDT": "JDT", "∅∅∅": "∅∅∅", "IST": "IST", "AEST": "AEST", "CHAST": "CHAST", "WAT": "WAT", "ACWST": "ACWST", "WEZ": "WEZ", "MESZ": "MESZ", "HNPMX": "HNPMX", "HNT": "HNT", "MDT": "MDT", "ADT": "ADT", "GYT": "GYT", "GMT": "GMT", "ART": "ART", "LHST": "LHST", "JST": "JST", "SAST": "SAST", "HNNOMX": "HNNOMX", "PST": "PST", "HNCU": "HNCU", "HECU": "HECU", "HKT": "HKT", "EAT": "EAT", "HAST": "HAST", "HENOMX": "HENOMX", "AWDT": "AWDT", "VET": "VET", "HAT": "HAT", "AST": "AST", "HADT": "HADT", "MEZ": "MEZ", "PDT": "PDT", "WESZ": "WESZ", "EDT": "EDT", "HEPM": "HEPM", "OESZ": "OESZ", "COT": "COT", "EST": "EST", "HNEG": "HNEG", "SGT": "SGT", "WIT": "WIT", "TMT": "TMT", "TMST": "TMST", "ARST": "ARST", "MYT": "MYT", "BT": "BT", "AEDT": "AEDT", "AKST": "AKST", "WART": "WART", "HEOG": "HEOG", "CLST": "CLST", "UYT": "UYT", "UYST": "UYST", "HEPMX": "HEPMX"}, - } - } -  -@@ -132,7 +118,7 @@ func (es *es_CL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_CL) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +128,7 @@ func (es *es_CL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_CL) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +174,13 @@ func (es *es_CL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_CL' and handles both Whole and Real numbers based on 'v' - func (es *es_CL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_CL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_CL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_CL' -@@ -264,7 +188,7 @@ func (es *es_CL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -322,7 +246,7 @@ func (es *es_CL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -445,19 +369,6 @@ func (es *es_CL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,21 +377,6 @@ func (es *es_CL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,15 +385,6 @@ func (es *es_CL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -506,22 +393,6 @@ func (es *es_CL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -530,26 +401,6 @@ func (es *es_CL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -558,32 +409,5 @@ func (es *es_CL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_CO/es_CO.go b/es_CO/es_CO.go -index 920fadf..bc03847 100644 ---- a/es_CO/es_CO.go -+++ b/es_CO/es_CO.go -@@ -50,28 +50,16 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "$", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", - monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, - daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"ADT": "hora de verano del Atlántico", "AKDT": "hora de verano de Alaska", "JDT": "hora de verano de Japón", "EST": "hora estándar oriental", "LHDT": "hora de verano de Lord Howe", "HNEG": "hora estándar de Groenlandia oriental", "ACDT": "hora de verano de Australia central", "MST": "Hora estándar de Macao", "HAST": "hora estándar de Hawái-Aleutiano", "ACWDT": "hora de verano de Australia centroccidental", "AWST": "hora estándar de Australia occidental", "AWDT": "hora de verano de Australia occidental", "WAST": "hora de verano de África occidental", "CST": "hora estándar central", "GMT": "hora del meridiano de Greenwich", "HECU": "hora de verano de Cuba", "HEPMX": "hora de verano del Pacífico de México", "PDT": "hora de verano del Pacífico", "COST": "hora de verano de Colombia", "AEST": "hora estándar de Australia oriental", "WARST": "hora de verano de Argentina occidental", "AKST": "hora estándar de Alaska", "SRT": "hora de Surinam", "ACWST": "hora estándar de Australia centroccidental", "HNT": "hora estándar de Terranova", "CLST": "hora de verano de Chile", "WART": "hora estándar de Argentina occidental", "CHADT": "hora de verano de Chatham", "CLT": "hora estándar de Chile", "HEEG": "hora de verano de Groenlandia oriental", "HEOG": "hora de verano de Groenlandia occidental", "WIB": "hora de Indonesia occidental", "ART": "hora estándar de Argentina", "HKST": "hora de verano de Hong Kong", "ECT": "hora de Ecuador", "EDT": "hora de verano oriental", "HENOMX": "hora de verano del noroeste de México", "HNCU": "hora estándar de Cuba", "HNPMX": "hora estándar del Pacífico de México", "GYT": "hora de Guyana", "UYST": "hora de verano de Uruguay", "VET": "hora de Venezuela", "HNPM": "hora estándar de San Pedro y Miquelón", "COT": "hora estándar de Colombia", "TMST": "hora de verano de Turkmenistán", "WAT": "hora estándar de África occidental", "JST": "hora estándar de Japón", "MESZ": "hora de verano de Europa central", "NZST": "hora estándar de Nueva Zelanda", "NZDT": "hora de verano de Nueva Zelanda", "IST": "hora estándar de la India", "GFT": "hora de la Guayana Francesa", "SGT": "hora de Singapur", "AST": "hora estándar del Atlántico", "PST": "hora estándar del Pacífico", "EAT": "hora de África oriental", "MDT": "Hora de verano de Macao", "WIT": "hora de Indonesia oriental", "AEDT": "hora de verano de Australia oriental", "LHST": "hora estándar de Lord Howe", "CAT": "hora de África central", "OESZ": "hora de verano de Europa oriental", "UYT": "hora estándar de Uruguay", "CHAST": "hora estándar de Chatham", "BOT": "hora de Bolivia", "MYT": "hora de Malasia", "WESZ": "hora de verano de Europa occidental", "HAT": "hora de verano de Terranova", "SAST": "hora de Sudáfrica", "ChST": "hora estándar de Chamorro", "ACST": "hora estándar de Australia central", "HADT": "hora de verano de Hawái-Aleutiano", "BT": "hora de Bután", "HNOG": "hora estándar de Groenlandia occidental", "WEZ": "hora estándar de Europa occidental", "HKT": "hora estándar de Hong Kong", "HEPM": "hora de verano de San Pedro y Miquelón", "TMT": "hora estándar de Turkmenistán", "HNNOMX": "hora estándar del noroeste de México", "CDT": "hora de verano central", "ARST": "hora de verano de Argentina", "WITA": "hora de Indonesia central", "MEZ": "hora estándar de Europa central", "OEZ": "hora estándar de Europa oriental", "∅∅∅": "hora de verano de las Azores"}, -+ timezones: map[string]string{"UYST": "UYST", "HEPMX": "HEPMX", "ADT": "ADT", "CHADT": "CHADT", "ECT": "ECT", "CST": "CST", "AEDT": "AEDT", "WAST": "WAST", "OESZ": "OESZ", "WITA": "WITA", "HENOMX": "HENOMX", "SRT": "SRT", "BOT": "BOT", "HEEG": "HEEG", "HEPM": "HEPM", "LHST": "LHST", "SGT": "SGT", "CDT": "CDT", "AST": "AST", "NZST": "NZST", "MDT": "MDT", "MEZ": "MEZ", "MYT": "MYT", "AEST": "AEST", "HNT": "HNT", "TMT": "TMT", "CAT": "CAT", "NZDT": "NZDT", "ChST": "ChST", "ACWST": "ACWST", "HNCU": "HNCU", "WIT": "WIT", "SAST": "SAST", "HAST": "HAST", "MESZ": "MESZ", "HNPM": "HNPM", "BT": "BT", "WAT": "WAT", "OEZ": "OEZ", "ART": "ART", "ARST": "ARST", "HADT": "HADT", "JST": "JST", "JDT": "JDT", "AWDT": "AWDT", "IST": "IST", "HAT": "HAT", "WART": "WART", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "AKST": "AKST", "AKDT": "AKDT", "GFT": "GFT", "COT": "COT", "CLT": "CLT", "GMT": "GMT", "ACWDT": "ACWDT", "UYT": "UYT", "∅∅∅": "∅∅∅", "TMST": "TMST", "VET": "VET", "WARST": "WARST", "EAT": "EAT", "PDT": "PDT", "HECU": "HECU", "EDT": "EDT", "CHAST": "CHAST", "AWST": "AWST", "LHDT": "LHDT", "HNPMX": "HNPMX", "HEOG": "HEOG", "HKT": "HKT", "HKST": "HKST", "ACST": "ACST", "WEZ": "WEZ", "COST": "COST", "HNOG": "HNOG", "MST": "MST", "PST": "PST", "EST": "EST", "CLST": "CLST", "ACDT": "ACDT", "GYT": "GYT", "WIB": "WIB"}, - } - } -  -@@ -134,7 +122,7 @@ func (es *es_CO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_CO) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +132,7 @@ func (es *es_CO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_CO) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,49 +178,14 @@ func (es *es_CO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_CO' and handles both Whole and Real numbers based on 'v' - func (es *es_CO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_CO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_CO) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 1 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -264,7 +217,7 @@ func (es *es_CO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -326,7 +279,7 @@ func (es *es_CO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -449,19 +402,6 @@ func (es *es_CO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,21 +410,6 @@ func (es *es_CO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_CR/es_CR.go b/es_CR/es_CR.go -index 93042e4..de6c397 100644 ---- a/es_CR/es_CR.go -+++ b/es_CR/es_CR.go -@@ -10,70 +10,50 @@ import ( - ) -  - type es_CR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_CR' locale - func New() locales.Translator { - return &es_CR{ -- locale: "es_CR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "₡", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"CHADT": "hora de verano de Chatham", "ACST": "hora estándar de Australia central", "MST": "hora estándar de las Montañas", "HNPM": "hora estándar de San Pedro y Miquelón", "NZDT": "hora de verano de Nueva Zelanda", "CST": "hora estándar central", "ART": "hora estándar de Argentina", "WAT": "hora estándar de África occidental", "HNCU": "hora estándar de Cuba", "LHDT": "hora de verano de Lord Howe", "CLT": "hora estándar de Chile", "COST": "hora de verano de Colombia", "GYT": "hora de Guyana", "WESZ": "hora de verano de Europa occidental", "ACWST": "hora estándar de Australia centroccidental", "ACWDT": "hora de verano de Australia centroccidental", "EST": "hora estándar oriental", "EDT": "hora de verano oriental", "BT": "hora de Bután", "ARST": "hora de verano de Argentina", "JST": "hora estándar de Japón", "∅∅∅": "hora de verano del Amazonas", "MDT": "hora de verano de las Montañas", "PDT": "hora de verano del Pacífico", "SAST": "hora de Sudáfrica", "AEST": "hora estándar de Australia oriental", "ECT": "hora de Ecuador", "ADT": "hora de verano del Atlántico", "SGT": "hora de Singapur", "PST": "hora estándar del Pacífico", "LHST": "hora estándar de Lord Howe", "GFT": "hora de la Guayana Francesa", "CAT": "hora de África central", "COT": "hora estándar de Colombia", "HADT": "hora de verano de Hawái-Aleutiano", "AEDT": "hora de verano de Australia oriental", "BOT": "hora de Bolivia", "AKDT": "hora de verano de Alaska", "HEEG": "hora de verano de Groenlandia oriental", "TMT": "hora estándar de Turkmenistán", "OESZ": "hora de verano de Europa oriental", "ACDT": "hora de verano de Australia central", "WAST": "hora de verano de África occidental", "HNPMX": "hora estándar del Pacífico de México", "MYT": "hora de Malasia", "AKST": "hora estándar de Alaska", "HAST": "hora estándar de Hawái-Aleutiano", "SRT": "hora de Surinam", "ChST": "hora estándar de Chamorro", "OEZ": "hora estándar de Europa oriental", "WEZ": "hora estándar de Europa occidental", "NZST": "hora estándar de Nueva Zelanda", "JDT": "hora de verano de Japón", "HEPM": "hora de verano de San Pedro y Miquelón", "MEZ": "hora estándar de Europa central", "IST": "hora estándar de la India", "WARST": "hora de verano de Argentina occidental", "HEOG": "hora de verano de Groenlandia occidental", "AWDT": "hora de verano de Australia occidental", "WITA": "hora de Indonesia central", "AST": "hora estándar del Atlántico", "WIB": "hora de Indonesia occidental", "HNT": "hora estándar de Terranova", "WART": "hora estándar de Argentina occidental", "MESZ": "hora de verano de Europa central", "TMST": "hora de verano de Turkmenistán", "GMT": "hora del meridiano de Greenwich", "UYST": "hora de verano de Uruguay", "HNOG": "hora estándar de Groenlandia occidental", "HKT": "hora estándar de Hong Kong", "HKST": "hora de verano de Hong Kong", "CHAST": "hora estándar de Chatham", "EAT": "hora de África oriental", "UYT": "hora estándar de Uruguay", "WIT": "hora de Indonesia oriental", "HAT": "hora de verano de Terranova", "AWST": "hora estándar de Australia occidental", "HNNOMX": "hora estándar del noroeste de México", "HENOMX": "hora de verano del noroeste de México", "HECU": "hora de verano de Cuba", "HEPMX": "hora de verano del Pacífico de México", "CDT": "hora de verano central", "VET": "hora de Venezuela", "CLST": "hora de verano de Chile", "HNEG": "hora estándar de Groenlandia oriental"}, -+ locale: "es_CR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ decimal: ",", -+ group: " ", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "₡", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"MYT": "MYT", "WIT": "WIT", "HECU": "HECU", "HNOG": "HNOG", "TMT": "TMT", "MST": "MST", "WIB": "WIB", "UYT": "UYT", "ACWDT": "ACWDT", "HNCU": "HNCU", "AKST": "AKST", "GFT": "GFT", "CLT": "CLT", "ChST": "ChST", "PST": "PST", "HEPM": "HEPM", "HNPM": "HNPM", "AEDT": "AEDT", "VET": "VET", "WAT": "WAT", "WART": "WART", "WITA": "WITA", "AST": "AST", "MESZ": "MESZ", "EST": "EST", "HKST": "HKST", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "HENOMX": "HENOMX", "JDT": "JDT", "COT": "COT", "ADT": "ADT", "HAST": "HAST", "HEEG": "HEEG", "LHDT": "LHDT", "AKDT": "AKDT", "ARST": "ARST", "SRT": "SRT", "HNEG": "HNEG", "SGT": "SGT", "WAST": "WAST", "OEZ": "OEZ", "EDT": "EDT", "HKT": "HKT", "CST": "CST", "ART": "ART", "IST": "IST", "MDT": "MDT", "AWDT": "AWDT", "OESZ": "OESZ", "COST": "COST", "CDT": "CDT", "BT": "BT", "AEST": "AEST", "ACST": "ACST", "LHST": "LHST", "GYT": "GYT", "CAT": "CAT", "∅∅∅": "∅∅∅", "HADT": "HADT", "ACDT": "ACDT", "AWST": "AWST", "JST": "JST", "UYST": "UYST", "PDT": "PDT", "NZST": "NZST", "ECT": "ECT", "GMT": "GMT", "WARST": "WARST", "SAST": "SAST", "WEZ": "WEZ", "HNT": "HNT", "HAT": "HAT", "CHAST": "CHAST", "CHADT": "CHADT", "ACWST": "ACWST", "WESZ": "WESZ", "HEPMX": "HEPMX", "CLST": "CLST", "BOT": "BOT", "MEZ": "MEZ", "EAT": "EAT", "HEOG": "HEOG", "TMST": "TMST"}, - } - } -  -@@ -126,7 +106,7 @@ func (es *es_CR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_CR) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +116,7 @@ func (es *es_CR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_CR) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +126,7 @@ func (es *es_CR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_CR) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,77 +172,13 @@ func (es *es_CR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_CR' and handles both Whole and Real numbers based on 'v' - func (es *es_CR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(es.group) - 1; j >= 0; j-- { -- b = append(b, es.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_CR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_CR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_CR' -@@ -270,58 +186,7 @@ func (es *es_CR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(es.group) - 1; j >= 0; j-- { -- b = append(b, es.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_CR' -@@ -330,65 +195,7 @@ func (es *es_CR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(es.group) - 1; j >= 0; j-- { -- b = append(b, es.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_CR' -@@ -396,17 +203,6 @@ func (es *es_CR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -415,17 +211,6 @@ func (es *es_CR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,19 +219,6 @@ func (es *es_CR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,21 +227,6 @@ func (es *es_CR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,15 +235,6 @@ func (es *es_CR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -495,22 +243,6 @@ func (es *es_CR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (es *es_CR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -547,32 +259,5 @@ func (es *es_CR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_CU/es_CU.go b/es_CU/es_CU.go -index 5c74cda..8d8c676 100644 ---- a/es_CU/es_CU.go -+++ b/es_CU/es_CU.go -@@ -10,70 +10,45 @@ import ( - ) -  - type es_CU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_CU' locale - func New() locales.Translator { - return &es_CU{ -- locale: "es_CU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "$", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"MST": "Hora estándar de Macao", "AST": "hora estándar del Atlántico", "ART": "hora estándar de Argentina", "AEDT": "hora de verano de Australia oriental", "ACST": "hora estándar de Australia central", "WARST": "hora de verano de Argentina occidental", "HNNOMX": "hora estándar del noroeste de México", "VET": "hora de Venezuela", "PDT": "hora de verano del Pacífico", "JDT": "hora de verano de Japón", "COT": "hora estándar de Colombia", "HEPMX": "hora de verano del Pacífico de México", "PST": "hora estándar del Pacífico", "LHDT": "hora de verano de Lord Howe", "ACDT": "hora de verano de Australia central", "OEZ": "hora estándar de Europa oriental", "OESZ": "hora de verano de Europa oriental", "WAST": "hora de verano de África occidental", "EDT": "hora de verano oriental", "UYT": "hora estándar de Uruguay", "HEPM": "hora de verano de San Pedro y Miquelón", "COST": "hora de verano de Colombia", "MDT": "Hora de verano de Macao", "WITA": "hora de Indonesia central", "LHST": "hora estándar de Lord Howe", "NZDT": "hora de verano de Nueva Zelanda", "EAT": "hora de África oriental", "ADT": "hora de verano del Atlántico", "HNOG": "hora estándar de Groenlandia occidental", "AWDT": "hora de verano de Australia occidental", "NZST": "hora estándar de Nueva Zelanda", "HEEG": "hora de verano de Groenlandia oriental", "WAT": "hora estándar de África occidental", "SRT": "hora de Surinam", "BOT": "hora de Bolivia", "ACWST": "hora estándar de Australia centroccidental", "HNPM": "hora estándar de San Pedro y Miquelón", "CHAST": "hora estándar de Chatham", "EST": "hora estándar oriental", "HNPMX": "hora estándar del Pacífico de México", "UYST": "hora de verano de Uruguay", "ARST": "hora de verano de Argentina", "HKST": "hora de verano de Hong Kong", "GYT": "hora de Guyana", "TMST": "hora de verano de Turkmenistán", "GMT": "hora del meridiano de Greenwich", "MYT": "hora de Malasia", "HADT": "hora de verano de Hawái-Aleutiano", "HNT": "hora estándar de Terranova", "AWST": "hora estándar de Australia occidental", "MEZ": "hora estándar de Europa central", "TMT": "hora estándar de Turkmenistán", "CST": "hora estándar central", "WIT": "hora de Indonesia oriental", "HEOG": "hora de verano de Groenlandia occidental", "MESZ": "hora de verano de Europa central", "IST": "hora estándar de la India", "CLT": "hora estándar de Chile", "CLST": "hora de verano de Chile", "GFT": "hora de la Guayana Francesa", "ChST": "hora estándar de Chamorro", "HNEG": "hora estándar de Groenlandia oriental", "CAT": "hora de África central", "HENOMX": "hora de verano del noroeste de México", "HECU": "hora de verano de Cuba", "AKST": "hora estándar de Alaska", "WIB": "hora de Indonesia occidental", "HAT": "hora de verano de Terranova", "WEZ": "hora estándar de Europa occidental", "WESZ": "hora de verano de Europa occidental", "ACWDT": "hora de verano de Australia centroccidental", "CHADT": "hora de verano de Chatham", "SAST": "hora de Sudáfrica", "WART": "hora estándar de Argentina occidental", "HNCU": "hora estándar de Cuba", "CDT": "hora de verano central", "AKDT": "hora de verano de Alaska", "BT": "hora de Bután", "HKT": "hora estándar de Hong Kong", "JST": "hora estándar de Japón", "∅∅∅": "hora de verano del Amazonas", "ECT": "hora de Ecuador", "SGT": "hora de Singapur", "HAST": "hora estándar de Hawái-Aleutiano", "AEST": "hora estándar de Australia oriental"}, -+ locale: "es_CU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "$", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EDT": "EDT", "CAT": "CAT", "WIB": "WIB", "ACST": "ACST", "JDT": "JDT", "UYT": "UYT", "HNT": "HNT", "HNOG": "HNOG", "UYST": "UYST", "WAST": "WAST", "AKST": "AKST", "CLST": "CLST", "CST": "CST", "AST": "AST", "SGT": "SGT", "CLT": "CLT", "EAT": "EAT", "MEZ": "MEZ", "HNEG": "HNEG", "JST": "JST", "WESZ": "WESZ", "WITA": "WITA", "CDT": "CDT", "SRT": "SRT", "HNCU": "HNCU", "HAT": "HAT", "LHST": "LHST", "BT": "BT", "CHAST": "CHAST", "CHADT": "CHADT", "COST": "COST", "MDT": "MDT", "ECT": "ECT", "HENOMX": "HENOMX", "AWST": "AWST", "LHDT": "LHDT", "HEOG": "HEOG", "BOT": "BOT", "AWDT": "AWDT", "ACWDT": "ACWDT", "VET": "VET", "WARST": "WARST", "∅∅∅": "∅∅∅", "COT": "COT", "TMST": "TMST", "PDT": "PDT", "MYT": "MYT", "AEDT": "AEDT", "OESZ": "OESZ", "WART": "WART", "NZDT": "NZDT", "ChST": "ChST", "HAST": "HAST", "HEEG": "HEEG", "WAT": "WAT", "TMT": "TMT", "ADT": "ADT", "HNPM": "HNPM", "PST": "PST", "AKDT": "AKDT", "MST": "MST", "IST": "IST", "ACWST": "ACWST", "HNPMX": "HNPMX", "GYT": "GYT", "EST": "EST", "HKST": "HKST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "OEZ": "OEZ", "HKT": "HKT", "GMT": "GMT", "ARST": "ARST", "HEPM": "HEPM", "AEST": "AEST", "GFT": "GFT", "SAST": "SAST", "HADT": "HADT", "MESZ": "MESZ", "HEPMX": "HEPMX", "WIT": "WIT", "NZST": "NZST", "ART": "ART", "HECU": "HECU"}, - } - } -  -@@ -126,7 +101,7 @@ func (es *es_CU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_CU) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (es *es_CU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_CU) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (es *es_CU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_CU) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (es *es_CU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_CU' and handles both Whole and Real numbers based on 'v' - func (es *es_CU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_CU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_CU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_CU' -@@ -268,56 +181,7 @@ func (es *es_CU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_CU' -@@ -326,63 +190,7 @@ func (es *es_CU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_CU' -@@ -390,17 +198,6 @@ func (es *es_CU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +206,6 @@ func (es *es_CU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +214,6 @@ func (es *es_CU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +222,6 @@ func (es *es_CU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +230,6 @@ func (es *es_CU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +238,6 @@ func (es *es_CU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +246,6 @@ func (es *es_CU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +254,5 @@ func (es *es_CU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_DO/es_DO.go b/es_DO/es_DO.go -index 1cad34d..def193d 100644 ---- a/es_DO/es_DO.go -+++ b/es_DO/es_DO.go -@@ -48,30 +48,18 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "RD$", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: ")", - currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, - daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"", ""}, - periodsWide: []string{"a. m.", "p. m."}, - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"antes de la Era Común", "Era Común"}, -- timezones: map[string]string{"CLST": "hora de verano de Chile", "∅∅∅": "hora de verano del Amazonas", "HNNOMX": "hora estándar del noroeste de México", "EDT": "hora de verano oriental", "AKST": "hora estándar de Alaska", "WITA": "hora de Indonesia central", "AWST": "hora estándar de Australia occidental", "HEPM": "hora de verano de San Pedro y Miquelón", "WAT": "hora estándar de África occidental", "CDT": "hora de verano central", "ADT": "hora de verano del Atlántico", "WESZ": "hora de verano de Europa occidental", "HNOG": "hora estándar de Groenlandia occidental", "CAT": "hora de África central", "WAST": "hora de verano de África occidental", "GMT": "hora del meridiano de Greenwich", "HNPMX": "hora estándar del Pacífico de México", "UYST": "hora de verano de Uruguay", "AKDT": "hora de verano de Alaska", "HAT": "hora de verano de Terranova", "PDT": "hora de verano del Pacífico", "HNPM": "hora estándar de San Pedro y Miquelón", "HNCU": "hora estándar de Cuba", "EST": "hora estándar oriental", "MST": "Hora estándar de Macao", "MDT": "Hora de verano de Macao", "BT": "hora de Bután", "HNT": "hora estándar de Terranova", "WEZ": "hora estándar de Europa occidental", "JDT": "hora de verano de Japón", "WART": "hora estándar de Argentina occidental", "UYT": "hora estándar de Uruguay", "HAST": "hora estándar de Hawái-Aleutiano", "HKST": "hora de verano de Hong Kong", "NZST": "hora estándar de Nueva Zelanda", "SAST": "hora de Sudáfrica", "CLT": "hora estándar de Chile", "EAT": "hora de África oriental", "HEOG": "hora de verano de Groenlandia occidental", "HNEG": "hora estándar de Groenlandia oriental", "ACDT": "hora de verano de Australia central", "GYT": "hora de Guyana", "ChST": "hora estándar de Chamorro", "AEST": "hora estándar de Australia oriental", "CHADT": "hora de verano de Chatham", "HEEG": "hora de verano de Groenlandia oriental", "ECT": "hora de Ecuador", "VET": "hora de Venezuela", "HKT": "hora estándar de Hong Kong", "JST": "hora estándar de Japón", "HEPMX": "hora de verano del Pacífico de México", "HADT": "hora de verano de Hawái-Aleutiano", "LHST": "hora estándar de Lord Howe", "TMST": "hora de verano de Turkmenistán", "OESZ": "hora de verano de Europa oriental", "WARST": "hora de verano de Argentina occidental", "ART": "hora estándar de Argentina", "MEZ": "hora estándar de Europa central", "GFT": "hora de la Guayana Francesa", "COT": "hora estándar de Colombia", "COST": "hora de verano de Colombia", "ACWST": "hora estándar de Australia centroccidental", "MESZ": "hora de verano de Europa central", "LHDT": "hora de verano de Lord Howe", "NZDT": "hora de verano de Nueva Zelanda", "IST": "hora estándar de la India", "ACST": "hora estándar de Australia central", "HENOMX": "hora de verano del noroeste de México", "ARST": "hora de verano de Argentina", "WIB": "hora de Indonesia occidental", "AWDT": "hora de verano de Australia occidental", "PST": "hora estándar del Pacífico", "AEDT": "hora de verano de Australia oriental", "TMT": "hora estándar de Turkmenistán", "BOT": "hora de Bolivia", "OEZ": "hora estándar de Europa oriental", "CST": "hora estándar central", "MYT": "hora de Malasia", "WIT": "hora de Indonesia oriental", "AST": "hora estándar del Atlántico", "ACWDT": "hora de verano de Australia centroccidental", "CHAST": "hora estándar de Chatham", "SGT": "hora de Singapur", "HECU": "hora de verano de Cuba", "SRT": "hora de Surinam"}, -+ timezones: map[string]string{"CDT": "CDT", "AEST": "AEST", "HEPMX": "HEPMX", "SGT": "SGT", "TMST": "TMST", "CLT": "CLT", "ART": "ART", "ACDT": "ACDT", "CHADT": "CHADT", "UYT": "UYT", "TMT": "TMT", "HENOMX": "HENOMX", "WESZ": "WESZ", "AKST": "AKST", "MEZ": "MEZ", "MYT": "MYT", "WARST": "WARST", "WIT": "WIT", "GYT": "GYT", "CLST": "CLST", "ChST": "ChST", "HAST": "HAST", "HNPMX": "HNPMX", "EST": "EST", "WIB": "WIB", "MESZ": "MESZ", "HNEG": "HNEG", "CAT": "CAT", "MST": "MST", "HNOG": "HNOG", "HEOG": "HEOG", "HADT": "HADT", "AWDT": "AWDT", "HNT": "HNT", "WART": "WART", "COST": "COST", "ADT": "ADT", "GMT": "GMT", "BOT": "BOT", "HAT": "HAT", "EDT": "EDT", "ECT": "ECT", "JST": "JST", "LHDT": "LHDT", "AEDT": "AEDT", "NZDT": "NZDT", "ACST": "ACST", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "BT": "BT", "HECU": "HECU", "OESZ": "OESZ", "HKT": "HKT", "JDT": "JDT", "HNPM": "HNPM", "HEPM": "HEPM", "UYST": "UYST", "OEZ": "OEZ", "EAT": "EAT", "WEZ": "WEZ", "WITA": "WITA", "AWST": "AWST", "IST": "IST", "VET": "VET", "LHST": "LHST", "PST": "PST", "∅∅∅": "∅∅∅", "HKST": "HKST", "MDT": "MDT", "NZST": "NZST", "AST": "AST", "HEEG": "HEEG", "WAST": "WAST", "WAT": "WAT", "GFT": "GFT", "CST": "CST", "ARST": "ARST", "PDT": "PDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "SAST": "SAST", "COT": "COT", "SRT": "SRT", "CHAST": "CHAST", "ACWST": "ACWST"}, - } - } -  -@@ -124,7 +112,7 @@ func (es *es_DO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_DO) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +122,7 @@ func (es *es_DO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_DO) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +132,7 @@ func (es *es_DO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_DO) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,49 +178,14 @@ func (es *es_DO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_DO' and handles both Whole and Real numbers based on 'v' - func (es *es_DO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_DO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_DO) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -264,7 +217,7 @@ func (es *es_DO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -324,7 +277,7 @@ func (es *es_DO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -396,17 +349,6 @@ func (es *es_DO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -415,17 +357,6 @@ func (es *es_DO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,19 +365,6 @@ func (es *es_DO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,21 +373,6 @@ func (es *es_DO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_EA/es_EA.go b/es_EA/es_EA.go -index 5a9eca8..ac30dfa 100644 ---- a/es_EA/es_EA.go -+++ b/es_EA/es_EA.go -@@ -10,70 +10,45 @@ import ( - ) -  - type es_EA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_EA' locale - func New() locales.Translator { - return &es_EA{ -- locale: "es_EA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"ACWDT": "hora de verano de Australia centroccidental", "PDT": "hora de verano del Pacífico", "COT": "hora estándar de Colombia", "AEST": "hora estándar de Australia oriental", "HNPM": "hora estándar de San Pedro y Miquelón", "CHAST": "hora estándar de Chatham", "EAT": "hora de África oriental", "OEZ": "hora estándar de Europa oriental", "WEZ": "hora estándar de Europa occidental", "AWST": "hora estándar de Australia occidental", "AWDT": "hora de verano de Australia occidental", "COST": "hora de verano de Colombia", "WART": "hora estándar de Argentina occidental", "HAST": "hora estándar de Hawái-Aleutiano", "∅∅∅": "hora de verano del Amazonas", "SGT": "hora de Singapur", "BOT": "hora de Bolivia", "HNPMX": "hora estándar del Pacífico de México", "MYT": "hora de Malasia", "WESZ": "hora de verano de Europa occidental", "HKT": "hora estándar de Hong Kong", "NZST": "hora estándar de Nueva Zelanda", "HNEG": "hora estándar de Groenlandia oriental", "HNCU": "hora estándar de Cuba", "HADT": "hora de verano de Hawái-Aleutiano", "HEOG": "hora de verano de Groenlandia occidental", "IST": "hora estándar de la India", "CLT": "hora estándar de Chile", "CLST": "hora de verano de Chile", "TMT": "hora estándar de Turkmenistán", "CAT": "hora de África central", "WIT": "hora de Indonesia oriental", "SRT": "hora de Surinam", "HAT": "hora de verano de Terranova", "HNOG": "hora estándar de Groenlandia occidental", "HKST": "hora de verano de Hong Kong", "EST": "hora estándar oriental", "GMT": "hora del meridiano de Greenwich", "HEPMX": "hora de verano del Pacífico de México", "BT": "hora de Bután", "MEZ": "hora estándar de Europa central", "ChST": "hora estándar de Chamorro", "GFT": "hora de la Guayana Francesa", "MDT": "Hora de verano de Macao", "CDT": "hora de verano central", "ADT": "hora de verano del Atlántico", "WIB": "hora de Indonesia occidental", "ART": "hora estándar de Argentina", "ARST": "hora de verano de Argentina", "JDT": "hora de verano de Japón", "ACST": "hora estándar de Australia central", "UYT": "hora estándar de Uruguay", "PST": "hora estándar del Pacífico", "WITA": "hora de Indonesia central", "NZDT": "hora de verano de Nueva Zelanda", "CHADT": "hora de verano de Chatham", "HECU": "hora de verano de Cuba", "EDT": "hora de verano oriental", "WAST": "hora de verano de África occidental", "MST": "Hora estándar de Macao", "AST": "hora estándar del Atlántico", "ACWST": "hora estándar de Australia centroccidental", "HEEG": "hora de verano de Groenlandia oriental", "WAT": "hora estándar de África occidental", "HENOMX": "hora de verano del noroeste de México", "GYT": "hora de Guyana", "VET": "hora de Venezuela", "LHST": "hora estándar de Lord Howe", "ECT": "hora de Ecuador", "AKDT": "hora de verano de Alaska", "AEDT": "hora de verano de Australia oriental", "SAST": "hora de Sudáfrica", "ACDT": "hora de verano de Australia central", "HEPM": "hora de verano de San Pedro y Miquelón", "MESZ": "hora de verano de Europa central", "JST": "hora estándar de Japón", "OESZ": "hora de verano de Europa oriental", "HNNOMX": "hora estándar del noroeste de México", "WARST": "hora de verano de Argentina occidental", "AKST": "hora estándar de Alaska", "CST": "hora estándar central", "HNT": "hora estándar de Terranova", "LHDT": "hora de verano de Lord Howe", "TMST": "hora de verano de Turkmenistán", "UYST": "hora de verano de Uruguay"}, -+ locale: "es_EA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAST": "WAST", "GYT": "GYT", "HKT": "HKT", "TMT": "TMT", "ACDT": "ACDT", "JDT": "JDT", "PST": "PST", "SGT": "SGT", "HNCU": "HNCU", "ECT": "ECT", "HECU": "HECU", "HNOG": "HNOG", "ARST": "ARST", "HADT": "HADT", "CHADT": "CHADT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "TMST": "TMST", "CAT": "CAT", "WITA": "WITA", "MDT": "MDT", "HNEG": "HNEG", "AWST": "AWST", "AWDT": "AWDT", "IST": "IST", "WEZ": "WEZ", "VET": "VET", "AKST": "AKST", "MST": "MST", "WIB": "WIB", "LHST": "LHST", "HEPM": "HEPM", "WARST": "WARST", "HEOG": "HEOG", "EST": "EST", "NZDT": "NZDT", "MEZ": "MEZ", "HNPM": "HNPM", "AEST": "AEST", "WESZ": "WESZ", "WAT": "WAT", "AKDT": "AKDT", "GFT": "GFT", "EDT": "EDT", "NZST": "NZST", "GMT": "GMT", "UYT": "UYT", "UYST": "UYST", "HAT": "HAT", "WIT": "WIT", "BOT": "BOT", "CST": "CST", "ART": "ART", "HAST": "HAST", "HENOMX": "HENOMX", "COT": "COT", "CLST": "CLST", "JST": "JST", "ACWDT": "ACWDT", "AEDT": "AEDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HNT": "HNT", "ChST": "ChST", "MYT": "MYT", "ACWST": "ACWST", "SAST": "SAST", "COST": "COST", "CDT": "CDT", "AST": "AST", "BT": "BT", "HNPMX": "HNPMX", "WART": "WART", "ADT": "ADT", "EAT": "EAT", "PDT": "PDT", "OEZ": "OEZ", "SRT": "SRT", "HEEG": "HEEG", "HKST": "HKST", "CLT": "CLT", "ACST": "ACST", "LHDT": "LHDT"}, - } - } -  -@@ -126,7 +101,7 @@ func (es *es_EA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_EA) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (es *es_EA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_EA) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (es *es_EA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_EA) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (es *es_EA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_EA' and handles both Whole and Real numbers based on 'v' - func (es *es_EA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_EA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_EA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_EA' -@@ -268,56 +181,7 @@ func (es *es_EA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_EA' -@@ -326,63 +190,7 @@ func (es *es_EA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_EA' -@@ -390,17 +198,6 @@ func (es *es_EA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +206,6 @@ func (es *es_EA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +214,6 @@ func (es *es_EA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +222,6 @@ func (es *es_EA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +230,6 @@ func (es *es_EA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +238,6 @@ func (es *es_EA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +246,6 @@ func (es *es_EA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +254,5 @@ func (es *es_EA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_EC/es_EC.go b/es_EC/es_EC.go -index c021d3e..7dc6290 100644 ---- a/es_EC/es_EC.go -+++ b/es_EC/es_EC.go -@@ -18,7 +18,6 @@ type es_EC struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,27 +48,12 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"LHST": "hora estándar de Lord Howe", "UYT": "hora estándar de Uruguay", "HADT": "hora de verano de Hawái-Aleutiano", "ARST": "hora de verano de Argentina", "CLT": "hora estándar de Chile", "OESZ": "hora de verano de Europa oriental", "MYT": "hora de Malasia", "TMST": "hora de verano de Turkmenistán", "EAT": "hora de África oriental", "ART": "hora estándar de Argentina", "AWST": "hora estándar de Australia occidental", "NZDT": "hora de verano de Nueva Zelanda", "BOT": "hora de Bolivia", "CAT": "hora de África central", "MDT": "Hora de verano de Macao", "ACWST": "hora estándar de Australia centroccidental", "HAT": "hora de verano de Terranova", "WIB": "hora de Indonesia occidental", "HEOG": "hora de verano de Groenlandia occidental", "MEZ": "hora estándar de Europa central", "SAST": "hora de Sudáfrica", "JDT": "hora de verano de Japón", "WART": "hora estándar de Argentina occidental", "COST": "hora de verano de Colombia", "PST": "hora estándar del Pacífico", "WESZ": "hora de verano de Europa occidental", "VET": "hora de Venezuela", "HNNOMX": "hora estándar del noroeste de México", "ACWDT": "hora de verano de Australia centroccidental", "IST": "hora estándar de la India", "ChST": "hora estándar de Chamorro", "HENOMX": "hora de verano del noroeste de México", "AKST": "hora estándar de Alaska", "AKDT": "hora de verano de Alaska", "WIT": "hora de Indonesia oriental", "AEST": "hora estándar de Australia oriental", "JST": "hora estándar de Japón", "HNEG": "hora estándar de Groenlandia oriental", "WAT": "hora estándar de África occidental", "CHAST": "hora estándar de Chatham", "CLST": "hora de verano de Chile", "ADT": "hora de verano del Atlántico", "GYT": "hora de Guyana", "WITA": "hora de Indonesia central", "CDT": "hora de verano central", "HNT": "hora estándar de Terranova", "GMT": "hora del meridiano de Greenwich", "PDT": "hora de verano del Pacífico", "AEDT": "hora de verano de Australia oriental", "MESZ": "hora de verano de Europa central", "CHADT": "hora de verano de Chatham", "∅∅∅": "hora de verano del Amazonas", "OEZ": "hora estándar de Europa oriental", "WARST": "hora de verano de Argentina occidental", "CST": "hora estándar central", "HNPM": "hora estándar de San Pedro y Miquelón", "HEPM": "hora de verano de San Pedro y Miquelón", "AST": "hora estándar del Atlántico", "EST": "hora estándar oriental", "EDT": "hora de verano oriental", "MST": "Hora estándar de Macao", "HAST": "hora estándar de Hawái-Aleutiano", "BT": "hora de Bután", "SRT": "hora de Surinam", "LHDT": "hora de verano de Lord Howe", "HNCU": "hora estándar de Cuba", "HEEG": "hora de verano de Groenlandia oriental", "GFT": "hora de la Guayana Francesa", "TMT": "hora estándar de Turkmenistán", "WAST": "hora de verano de África occidental", "SGT": "hora de Singapur", "UYST": "hora de verano de Uruguay", "HNOG": "hora estándar de Groenlandia occidental", "NZST": "hora estándar de Nueva Zelanda", "ACST": "hora estándar de Australia central", "ACDT": "hora de verano de Australia central", "HECU": "hora de verano de Cuba", "HNPMX": "hora estándar del Pacífico de México", "WEZ": "hora estándar de Europa occidental", "HKST": "hora de verano de Hong Kong", "ECT": "hora de Ecuador", "COT": "hora estándar de Colombia", "HEPMX": "hora de verano del Pacífico de México", "AWDT": "hora de verano de Australia occidental", "HKT": "hora estándar de Hong Kong"}, -+ timezones: map[string]string{"WARST": "WARST", "EDT": "EDT", "GMT": "GMT", "PDT": "PDT", "AEDT": "AEDT", "HNNOMX": "HNNOMX", "UYST": "UYST", "HEPMX": "HEPMX", "HEOG": "HEOG", "EST": "EST", "HKT": "HKT", "CST": "CST", "MYT": "MYT", "JST": "JST", "PST": "PST", "HNOG": "HNOG", "TMT": "TMT", "CLST": "CLST", "CDT": "CDT", "BOT": "BOT", "MESZ": "MESZ", "ACDT": "ACDT", "LHST": "LHST", "LHDT": "LHDT", "WEZ": "WEZ", "CAT": "CAT", "WITA": "WITA", "MST": "MST", "NZST": "NZST", "EAT": "EAT", "HEEG": "HEEG", "CHADT": "CHADT", "WIT": "WIT", "ARST": "ARST", "WART": "WART", "GYT": "GYT", "ECT": "ECT", "SRT": "SRT", "MEZ": "MEZ", "HNPM": "HNPM", "JDT": "JDT", "HNCU": "HNCU", "SAST": "SAST", "ADT": "ADT", "IST": "IST", "WESZ": "WESZ", "SGT": "SGT", "AKDT": "AKDT", "GFT": "GFT", "HKST": "HKST", "MDT": "MDT", "WIB": "WIB", "ART": "ART", "ACST": "ACST", "AWDT": "AWDT", "ACWDT": "ACWDT", "HECU": "HECU", "WAT": "WAT", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "ChST": "ChST", "HEPM": "HEPM", "UYT": "UYT", "WAST": "WAST", "HNT": "HNT", "HAT": "HAT", "COT": "COT", "TMST": "TMST", "CLT": "CLT", "VET": "VET", "OEZ": "OEZ", "NZDT": "NZDT", "AST": "AST", "BT": "BT", "AKST": "AKST", "ACWST": "ACWST", "AEST": "AEST", "CHAST": "CHAST", "HNPMX": "HNPMX", "COST": "COST", "HAST": "HAST", "HADT": "HADT", "HNEG": "HNEG", "HENOMX": "HENOMX", "AWST": "AWST"}, - } - } -  -@@ -122,7 +106,7 @@ func (es *es_EC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_EC) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +116,7 @@ func (es *es_EC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_EC) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +126,7 @@ func (es *es_EC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_EC) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +172,13 @@ func (es *es_EC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_EC' and handles both Whole and Real numbers based on 'v' - func (es *es_EC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_EC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_EC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_EC' -@@ -264,7 +186,7 @@ func (es *es_EC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -322,7 +244,7 @@ func (es *es_EC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -387,17 +309,6 @@ func (es *es_EC) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +317,6 @@ func (es *es_EC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,19 +325,6 @@ func (es *es_EC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,21 +333,6 @@ func (es *es_EC) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,15 +341,6 @@ func (es *es_EC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -486,22 +349,6 @@ func (es *es_EC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -510,26 +357,6 @@ func (es *es_EC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -538,32 +365,5 @@ func (es *es_EC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_ES/es_ES.go b/es_ES/es_ES.go -index 905732c..4e53c10 100644 ---- a/es_ES/es_ES.go -+++ b/es_ES/es_ES.go -@@ -10,70 +10,45 @@ import ( - ) -  - type es_ES struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_ES' locale - func New() locales.Translator { - return &es_ES{ -- locale: "es_ES", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"HNPMX": "hora estándar del Pacífico de México", "ARST": "hora de verano de Argentina", "WESZ": "hora de verano de Europa occidental", "HEOG": "hora de verano de Groenlandia occidental", "CLT": "hora estándar de Chile", "ACDT": "hora de verano de Australia central", "WAST": "hora de verano de África occidental", "OESZ": "hora de verano de Europa oriental", "COST": "hora de verano de Colombia", "MDT": "Hora de verano de Macao", "AEDT": "hora de verano de Australia oriental", "HKST": "hora de verano de Hong Kong", "WITA": "hora de Indonesia central", "HNPM": "hora estándar de San Pedro y Miquelón", "HNEG": "hora estándar de Groenlandia oriental", "GYT": "hora de Guyana", "AWDT": "hora de verano de Australia occidental", "HKT": "hora estándar de Hong Kong", "MEZ": "hora estándar de Europa central", "BT": "hora de Bután", "TMST": "hora de verano de Turkmenistán", "CAT": "hora de África central", "WARST": "hora de verano de Argentina occidental", "EDT": "hora de verano oriental", "CDT": "hora de verano central", "MYT": "hora de Malasia", "JDT": "hora de verano de Japón", "UYT": "hora estándar de Uruguay", "WEZ": "hora estándar de Europa occidental", "HNOG": "hora estándar de Groenlandia occidental", "IST": "hora estándar de la India", "ACST": "hora estándar de Australia central", "UYST": "hora de verano de Uruguay", "SRT": "hora de Surinam", "ACWST": "hora estándar de Australia centroccidental", "CST": "hora estándar central", "LHDT": "hora de verano de Lord Howe", "∅∅∅": "hora de verano del Amazonas", "ChST": "hora estándar de Chamorro", "OEZ": "hora estándar de Europa oriental", "ECT": "hora de Ecuador", "HNNOMX": "hora estándar del noroeste de México", "HECU": "hora de verano de Cuba", "NZST": "hora estándar de Nueva Zelanda", "NZDT": "hora de verano de Nueva Zelanda", "GFT": "hora de la Guayana Francesa", "VET": "hora de Venezuela", "PST": "hora estándar del Pacífico", "CHADT": "hora de verano de Chatham", "WAT": "hora estándar de África occidental", "AKST": "hora estándar de Alaska", "PDT": "hora de verano del Pacífico", "MESZ": "hora de verano de Europa central", "LHST": "hora estándar de Lord Howe", "HNCU": "hora estándar de Cuba", "MST": "Hora estándar de Macao", "ACWDT": "hora de verano de Australia centroccidental", "JST": "hora estándar de Japón", "GMT": "hora del meridiano de Greenwich", "EST": "hora estándar oriental", "ADT": "hora de verano del Atlántico", "HAT": "hora de verano de Terranova", "SAST": "hora de Sudáfrica", "WART": "hora estándar de Argentina occidental", "HEPMX": "hora de verano del Pacífico de México", "HEPM": "hora de verano de San Pedro y Miquelón", "TMT": "hora estándar de Turkmenistán", "COT": "hora estándar de Colombia", "HAST": "hora estándar de Hawái-Aleutiano", "ART": "hora estándar de Argentina", "AEST": "hora estándar de Australia oriental", "CLST": "hora de verano de Chile", "HEEG": "hora de verano de Groenlandia oriental", "EAT": "hora de África oriental", "HADT": "hora de verano de Hawái-Aleutiano", "WIT": "hora de Indonesia oriental", "CHAST": "hora estándar de Chatham", "AKDT": "hora de verano de Alaska", "AST": "hora estándar del Atlántico", "HNT": "hora estándar de Terranova", "AWST": "hora estándar de Australia occidental", "BOT": "hora de Bolivia", "HENOMX": "hora de verano del noroeste de México", "SGT": "hora de Singapur", "WIB": "hora de Indonesia occidental"}, -+ locale: "es_ES", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIT": "WIT", "WITA": "WITA", "ACWDT": "ACWDT", "PST": "PST", "UYST": "UYST", "HAT": "HAT", "∅∅∅": "∅∅∅", "EDT": "EDT", "TMT": "TMT", "NZST": "NZST", "MEZ": "MEZ", "COT": "COT", "EAT": "EAT", "HENOMX": "HENOMX", "MYT": "MYT", "CHAST": "CHAST", "OEZ": "OEZ", "HKT": "HKT", "SRT": "SRT", "MESZ": "MESZ", "ACST": "ACST", "BT": "BT", "SGT": "SGT", "AWST": "AWST", "JST": "JST", "WAT": "WAT", "JDT": "JDT", "GFT": "GFT", "HNT": "HNT", "CLT": "CLT", "CLST": "CLST", "MST": "MST", "GMT": "GMT", "HEEG": "HEEG", "AEST": "AEST", "WEZ": "WEZ", "HNCU": "HNCU", "HECU": "HECU", "EST": "EST", "ART": "ART", "BOT": "BOT", "HEPM": "HEPM", "PDT": "PDT", "OESZ": "OESZ", "HNOG": "HNOG", "HEOG": "HEOG", "CST": "CST", "NZDT": "NZDT", "ECT": "ECT", "ADT": "ADT", "COST": "COST", "ChST": "ChST", "HAST": "HAST", "WESZ": "WESZ", "VET": "VET", "HEPMX": "HEPMX", "WARST": "WARST", "SAST": "SAST", "LHST": "LHST", "ACWST": "ACWST", "UYT": "UYT", "CDT": "CDT", "MDT": "MDT", "LHDT": "LHDT", "CHADT": "CHADT", "WART": "WART", "AST": "AST", "AWDT": "AWDT", "HNPM": "HNPM", "IST": "IST", "AKDT": "AKDT", "GYT": "GYT", "CAT": "CAT", "WIB": "WIB", "ACDT": "ACDT", "AKST": "AKST", "HKST": "HKST", "TMST": "TMST", "HADT": "HADT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "HNPMX": "HNPMX", "ARST": "ARST", "HNEG": "HNEG", "WAST": "WAST"}, - } - } -  -@@ -126,7 +101,7 @@ func (es *es_ES) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_ES) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (es *es_ES) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_ES) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (es *es_ES) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_ES) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (es *es_ES) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_ES' and handles both Whole and Real numbers based on 'v' - func (es *es_ES) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_ES' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_ES) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_ES' -@@ -268,56 +181,7 @@ func (es *es_ES) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_ES' -@@ -326,63 +190,7 @@ func (es *es_ES) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_ES' -@@ -390,17 +198,6 @@ func (es *es_ES) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +206,6 @@ func (es *es_ES) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +214,6 @@ func (es *es_ES) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +222,6 @@ func (es *es_ES) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +230,6 @@ func (es *es_ES) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +238,6 @@ func (es *es_ES) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +246,6 @@ func (es *es_ES) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +254,5 @@ func (es *es_ES) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_GQ/es_GQ.go b/es_GQ/es_GQ.go -index 041399b..66e1098 100644 ---- a/es_GQ/es_GQ.go -+++ b/es_GQ/es_GQ.go -@@ -18,7 +18,6 @@ type es_GQ struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -43,33 +42,13 @@ type es_GQ struct { - // New returns a new instance of translator for the 'es_GQ' locale - func New() locales.Translator { - return &es_GQ{ -- locale: "es_GQ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "FCFA", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"PDT": "hora de verano del Pacífico", "ART": "hora estándar de Argentina", "HEPM": "hora de verano de San Pedro y Miquelón", "IST": "hora estándar de la India", "HAST": "hora estándar de Hawái-Aleutiano", "PST": "hora estándar del Pacífico", "HADT": "hora de verano de Hawái-Aleutiano", "HEOG": "hora de verano de Groenlandia occidental", "WITA": "hora de Indonesia central", "LHST": "hora estándar de Lord Howe", "EDT": "hora de verano oriental", "HNPMX": "hora estándar del Pacífico de México", "ACWST": "hora estándar de Australia centroccidental", "ACWDT": "hora de verano de Australia centroccidental", "AWST": "hora estándar de Australia occidental", "HKST": "hora de verano de Hong Kong", "HNPM": "hora estándar de San Pedro y Miquelón", "SRT": "hora de Surinam", "WEZ": "hora estándar de Europa occidental", "MDT": "Hora de verano de Macao", "AEDT": "hora de verano de Australia oriental", "HKT": "hora estándar de Hong Kong", "SAST": "hora de Sudáfrica", "SGT": "hora de Singapur", "HNCU": "hora estándar de Cuba", "ECT": "hora de Ecuador", "HNNOMX": "hora estándar del noroeste de México", "UYST": "hora de verano de Uruguay", "ADT": "hora de verano del Atlántico", "GFT": "hora de la Guayana Francesa", "TMT": "hora estándar de Turkmenistán", "EAT": "hora de África oriental", "OESZ": "hora de verano de Europa oriental", "AKST": "hora estándar de Alaska", "ChST": "hora estándar de Chamorro", "ACST": "hora estándar de Australia central", "CHADT": "hora de verano de Chatham", "AKDT": "hora de verano de Alaska", "NZST": "hora estándar de Nueva Zelanda", "OEZ": "hora estándar de Europa oriental", "WART": "hora estándar de Argentina occidental", "MST": "Hora estándar de Macao", "UYT": "hora estándar de Uruguay", "VET": "hora de Venezuela", "WIT": "hora de Indonesia oriental", "ACDT": "hora de verano de Australia central", "CAT": "hora de África central", "LHDT": "hora de verano de Lord Howe", "BT": "hora de Bután", "HNOG": "hora estándar de Groenlandia occidental", "HENOMX": "hora de verano del noroeste de México", "HEPMX": "hora de verano del Pacífico de México", "AWDT": "hora de verano de Australia occidental", "∅∅∅": "hora de verano del Amazonas", "HEEG": "hora de verano de Groenlandia oriental", "GMT": "hora del meridiano de Greenwich", "WESZ": "hora de verano de Europa occidental", "JST": "hora estándar de Japón", "BOT": "hora de Bolivia", "WAST": "hora de verano de África occidental", "WARST": "hora de verano de Argentina occidental", "HECU": "hora de verano de Cuba", "GYT": "hora de Guyana", "CDT": "hora de verano central", "AST": "hora estándar del Atlántico", "JDT": "hora de verano de Japón", "HNEG": "hora estándar de Groenlandia oriental", "NZDT": "hora de verano de Nueva Zelanda", "WIB": "hora de Indonesia occidental", "MESZ": "hora de verano de Europa central", "MEZ": "hora estándar de Europa central", "COT": "hora estándar de Colombia", "EST": "hora estándar oriental", "WAT": "hora estándar de África occidental", "CST": "hora estándar central", "HNT": "hora estándar de Terranova", "HAT": "hora de verano de Terranova", "CHAST": "hora estándar de Chatham", "CLT": "hora estándar de Chile", "CLST": "hora de verano de Chile", "TMST": "hora de verano de Turkmenistán", "AEST": "hora estándar de Australia oriental", "ARST": "hora de verano de Argentina", "COST": "hora de verano de Colombia", "MYT": "hora de Malasia"}, -+ locale: "es_GQ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "FCFA", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "HAT": "HAT", "COST": "COST", "CLT": "CLT", "HNEG": "HNEG", "CHAST": "CHAST", "UYST": "UYST", "HKT": "HKT", "OEZ": "OEZ", "WARST": "WARST", "HADT": "HADT", "HECU": "HECU", "AST": "AST", "HEPMX": "HEPMX", "WAT": "WAT", "WAST": "WAST", "HNT": "HNT", "HNOG": "HNOG", "LHDT": "LHDT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "EDT": "EDT", "MDT": "MDT", "BOT": "BOT", "AKDT": "AKDT", "COT": "COT", "TMST": "TMST", "CLST": "CLST", "CST": "CST", "WIB": "WIB", "MESZ": "MESZ", "AEDT": "AEDT", "SAST": "SAST", "AKST": "AKST", "WART": "WART", "WIT": "WIT", "MST": "MST", "ACDT": "ACDT", "ACWST": "ACWST", "SGT": "SGT", "HAST": "HAST", "CDT": "CDT", "SRT": "SRT", "ChST": "ChST", "MEZ": "MEZ", "PDT": "PDT", "VET": "VET", "JDT": "JDT", "ARST": "ARST", "HEPM": "HEPM", "BT": "BT", "HNNOMX": "HNNOMX", "OESZ": "OESZ", "GYT": "GYT", "NZST": "NZST", "ADT": "ADT", "ART": "ART", "ACST": "ACST", "UYT": "UYT", "ACWDT": "ACWDT", "AWDT": "AWDT", "WITA": "WITA", "NZDT": "NZDT", "HEEG": "HEEG", "JST": "JST", "PST": "PST", "EST": "EST", "HNPMX": "HNPMX", "TMT": "TMT", "CAT": "CAT", "ECT": "ECT", "HENOMX": "HENOMX", "AWST": "AWST", "AEST": "AEST", "HNCU": "HNCU", "HNPM": "HNPM", "LHST": "LHST", "MYT": "MYT", "WESZ": "WESZ", "HEOG": "HEOG", "HKST": "HKST", "GMT": "GMT", "EAT": "EAT", "IST": "IST", "WEZ": "WEZ"}, - } - } -  -@@ -122,7 +101,7 @@ func (es *es_GQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_GQ) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (es *es_GQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_GQ) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (es *es_GQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_GQ) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +167,13 @@ func (es *es_GQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_GQ' and handles both Whole and Real numbers based on 'v' - func (es *es_GQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_GQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_GQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_GQ' -@@ -264,7 +181,7 @@ func (es *es_GQ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -322,7 +239,7 @@ func (es *es_GQ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -387,17 +304,6 @@ func (es *es_GQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +312,6 @@ func (es *es_GQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,19 +320,6 @@ func (es *es_GQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,21 +328,6 @@ func (es *es_GQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,15 +336,6 @@ func (es *es_GQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -486,22 +344,6 @@ func (es *es_GQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -510,26 +352,6 @@ func (es *es_GQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -538,32 +360,5 @@ func (es *es_GQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_GT/es_GT.go b/es_GT/es_GT.go -index c1a25eb..e5dc245 100644 ---- a/es_GT/es_GT.go -+++ b/es_GT/es_GT.go -@@ -18,7 +18,6 @@ type es_GT struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,31 +48,14 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "Q", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositiveSuffix: "K", - currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"JDT": "hora de verano de Japón", "COST": "hora de verano de Colombia", "GYT": "hora de Guyana", "SRT": "hora de Surinam", "HNT": "hora estándar de Terranova", "IST": "hora estándar de la India", "HEPM": "hora de verano de San Pedro y Miquelón", "SAST": "hora de Sudáfrica", "ChST": "hora estándar de Chamorro", "BOT": "hora de Bolivia", "CAT": "hora de África central", "MST": "hora estándar de las Montañas", "VET": "hora de Venezuela", "HAT": "hora de verano de Terranova", "HNPMX": "hora estándar del Pacífico de México", "ECT": "hora de Ecuador", "HADT": "hora de verano de Hawái-Aleutiano", "∅∅∅": "hora de verano del Amazonas", "OESZ": "hora de verano de Europa oriental", "TMST": "hora de verano de Turkmenistán", "ACST": "hora estándar de Australia central", "CST": "hora estándar central", "MDT": "hora de verano de las Montañas", "WESZ": "hora de verano de Europa occidental", "LHST": "hora estándar de Lord Howe", "WIB": "hora de Indonesia occidental", "AEST": "hora estándar de Australia oriental", "GFT": "hora de la Guayana Francesa", "TMT": "hora estándar de Turkmenistán", "HECU": "hora de verano de Cuba", "MYT": "hora de Malasia", "PST": "hora estándar del Pacífico", "HKST": "hora de verano de Hong Kong", "CLT": "hora estándar de Chile", "HEEG": "hora de verano de Groenlandia oriental", "AKST": "hora estándar de Alaska", "AWST": "hora estándar de Australia occidental", "CHAST": "hora estándar de Chatham", "JST": "hora estándar de Japón", "WARST": "hora de verano de Argentina occidental", "GMT": "hora del meridiano de Greenwich", "HNOG": "hora estándar de Groenlandia occidental", "MEZ": "hora estándar de Europa central", "ACDT": "hora de verano de Australia central", "LHDT": "hora de verano de Lord Howe", "HENOMX": "hora de verano del noroeste de México", "WART": "hora estándar de Argentina occidental", "SGT": "hora de Singapur", "AEDT": "hora de verano de Australia oriental", "NZST": "hora estándar de Nueva Zelanda", "MESZ": "hora de verano de Europa central", "ADT": "hora de verano del Atlántico", "UYST": "hora de verano de Uruguay", "AWDT": "hora de verano de Australia occidental", "WAST": "hora de verano de África occidental", "AST": "hora estándar del Atlántico", "NZDT": "hora de verano de Nueva Zelanda", "CHADT": "hora de verano de Chatham", "OEZ": "hora estándar de Europa oriental", "HNCU": "hora estándar de Cuba", "EST": "hora estándar oriental", "WIT": "hora de Indonesia oriental", "ACWST": "hora estándar de Australia centroccidental", "PDT": "hora de verano del Pacífico", "HAST": "hora estándar de Hawái-Aleutiano", "BT": "hora de Bután", "CDT": "hora de verano central", "COT": "hora estándar de Colombia", "HEPMX": "hora de verano del Pacífico de México", "HEOG": "hora de verano de Groenlandia occidental", "WAT": "hora estándar de África occidental", "HNNOMX": "hora estándar del noroeste de México", "HNEG": "hora estándar de Groenlandia oriental", "EAT": "hora de África oriental", "UYT": "hora estándar de Uruguay", "ARST": "hora de verano de Argentina", "HKT": "hora estándar de Hong Kong", "WITA": "hora de Indonesia central", "EDT": "hora de verano oriental", "AKDT": "hora de verano de Alaska", "ACWDT": "hora de verano de Australia centroccidental", "ART": "hora estándar de Argentina", "HNPM": "hora estándar de San Pedro y Miquelón", "WEZ": "hora estándar de Europa occidental", "CLST": "hora de verano de Chile"}, -+ timezones: map[string]string{"TMT": "TMT", "CLST": "CLST", "ADT": "ADT", "SRT": "SRT", "WAT": "WAT", "AKDT": "AKDT", "HAT": "HAT", "HEOG": "HEOG", "LHST": "LHST", "PDT": "PDT", "WARST": "WARST", "HEEG": "HEEG", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "NZDT": "NZDT", "EAT": "EAT", "UYST": "UYST", "HKT": "HKT", "AEST": "AEST", "AEDT": "AEDT", "UYT": "UYT", "HAST": "HAST", "MESZ": "MESZ", "JST": "JST", "HNOG": "HNOG", "TMST": "TMST", "CST": "CST", "MST": "MST", "NZST": "NZST", "MEZ": "MEZ", "AWDT": "AWDT", "LHDT": "LHDT", "OESZ": "OESZ", "COT": "COT", "SAST": "SAST", "EDT": "EDT", "HNCU": "HNCU", "WEZ": "WEZ", "CAT": "CAT", "CLT": "CLT", "CHADT": "CHADT", "PST": "PST", "BT": "BT", "WART": "WART", "ChST": "ChST", "ARST": "ARST", "HADT": "HADT", "AKST": "AKST", "HNT": "HNT", "MYT": "MYT", "VET": "VET", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "BOT": "BOT", "ACDT": "ACDT", "AWST": "AWST", "HNNOMX": "HNNOMX", "ACST": "ACST", "ACWDT": "ACWDT", "GFT": "GFT", "ECT": "ECT", "MDT": "MDT", "HNEG": "HNEG", "WIT": "WIT", "HNPM": "HNPM", "IST": "IST", "HECU": "HECU", "COST": "COST", "WITA": "WITA", "GMT": "GMT", "CHAST": "CHAST", "WAST": "WAST", "CDT": "CDT", "HENOMX": "HENOMX", "ACWST": "ACWST", "GYT": "GYT", "HKST": "HKST", "WIB": "WIB", "HEPM": "HEPM", "JDT": "JDT", "SGT": "SGT", "OEZ": "OEZ", "EST": "EST", "ART": "ART", "AST": "AST"}, - } - } -  -@@ -126,7 +108,7 @@ func (es *es_GT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_GT) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +118,7 @@ func (es *es_GT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_GT) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +128,7 @@ func (es *es_GT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_GT) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +174,13 @@ func (es *es_GT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_GT' and handles both Whole and Real numbers based on 'v' - func (es *es_GT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_GT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_GT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_GT' -@@ -268,7 +188,7 @@ func (es *es_GT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 3 -+ l := len(s) + len(symbol) + 1 -  - b := make([]byte, 0, l) -  -@@ -306,7 +226,7 @@ func (es *es_GT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 3 -+ l := len(s) + len(symbol) + 1 -  - b := make([]byte, 0, l) -  -@@ -406,19 +326,6 @@ func (es *es_GT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -427,21 +334,6 @@ func (es *es_GT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,15 +342,6 @@ func (es *es_GT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -467,22 +350,6 @@ func (es *es_GT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -491,26 +358,6 @@ func (es *es_GT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -519,32 +366,5 @@ func (es *es_GT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_HN/es_HN.go b/es_HN/es_HN.go -index a82fbc2..5c40370 100644 ---- a/es_HN/es_HN.go -+++ b/es_HN/es_HN.go -@@ -10,70 +10,48 @@ import ( - ) -  - type es_HN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_HN' locale - func New() locales.Translator { - return &es_HN{ -- locale: "es_HN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "L", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"SAST": "hora de Sudáfrica", "TMT": "hora estándar de Turkmenistán", "SGT": "hora de Singapur", "ADT": "hora de verano del Atlántico", "HNOG": "hora estándar de Groenlandia occidental", "HEOG": "hora de verano de Groenlandia occidental", "ACWDT": "hora de verano de Australia centroccidental", "ARST": "hora de verano de Argentina", "AWST": "hora estándar de Australia occidental", "AWDT": "hora de verano de Australia occidental", "HNNOMX": "hora estándar del noroeste de México", "AKDT": "hora de verano de Alaska", "UYST": "hora de verano de Uruguay", "CDT": "hora de verano central", "AST": "hora estándar del Atlántico", "VET": "hora de Venezuela", "HNPM": "hora estándar de San Pedro y Miquelón", "CHAST": "hora estándar de Chatham", "EAT": "hora de África oriental", "OEZ": "hora estándar de Europa oriental", "WESZ": "hora de verano de Europa occidental", "AEST": "hora estándar de Australia oriental", "TMST": "hora de verano de Turkmenistán", "GYT": "hora de Guyana", "EST": "hora estándar oriental", "LHDT": "hora de verano de Lord Howe", "CHADT": "hora de verano de Chatham", "HNEG": "hora estándar de Groenlandia oriental", "COST": "hora de verano de Colombia", "HNT": "hora estándar de Terranova", "ART": "hora estándar de Argentina", "HEPM": "hora de verano de San Pedro y Miquelón", "ACST": "hora estándar de Australia central", "COT": "hora estándar de Colombia", "HECU": "hora de verano de Cuba", "HAST": "hora estándar de Hawái-Aleutiano", "ACWST": "hora estándar de Australia centroccidental", "IST": "hora estándar de la India", "ACDT": "hora de verano de Australia central", "WARST": "hora de verano de Argentina occidental", "UYT": "hora estándar de Uruguay", "MDT": "Hora de verano de Macao", "HNPMX": "hora estándar del Pacífico de México", "WIB": "hora de Indonesia occidental", "WIT": "hora de Indonesia oriental", "NZST": "hora estándar de Nueva Zelanda", "WART": "hora estándar de Argentina occidental", "HENOMX": "hora de verano del noroeste de México", "HNCU": "hora estándar de Cuba", "PDT": "hora de verano del Pacífico", "WEZ": "hora estándar de Europa occidental", "HKST": "hora de verano de Hong Kong", "ECT": "hora de Ecuador", "MYT": "hora de Malasia", "SRT": "hora de Surinam", "GMT": "hora del meridiano de Greenwich", "PST": "hora estándar del Pacífico", "AEDT": "hora de verano de Australia oriental", "MEZ": "hora estándar de Europa central", "GFT": "hora de la Guayana Francesa", "CAT": "hora de África central", "ChST": "hora estándar de Chamorro", "OESZ": "hora de verano de Europa oriental", "MST": "Hora estándar de Macao", "HAT": "hora de verano de Terranova", "CLST": "hora de verano de Chile", "HEPMX": "hora de verano del Pacífico de México", "BT": "hora de Bután", "HKT": "hora estándar de Hong Kong", "WITA": "hora de Indonesia central", "JDT": "hora de verano de Japón", "HADT": "hora de verano de Hawái-Aleutiano", "MESZ": "hora de verano de Europa central", "LHST": "hora estándar de Lord Howe", "WAT": "hora estándar de África occidental", "AKST": "hora estándar de Alaska", "CST": "hora estándar central", "NZDT": "hora de verano de Nueva Zelanda", "∅∅∅": "hora de verano del Amazonas", "BOT": "hora de Bolivia", "EDT": "hora de verano oriental", "CLT": "hora estándar de Chile", "JST": "hora estándar de Japón", "HEEG": "hora de verano de Groenlandia oriental", "WAST": "hora de verano de África occidental"}, -+ locale: "es_HN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "L", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "OEZ": "OEZ", "WART": "WART", "CHADT": "CHADT", "AKST": "AKST", "WARST": "WARST", "LHST": "LHST", "HNPM": "HNPM", "IST": "IST", "GYT": "GYT", "EST": "EST", "CAT": "CAT", "CST": "CST", "ACDT": "ACDT", "HEEG": "HEEG", "HNPMX": "HNPMX", "AKDT": "AKDT", "HEOG": "HEOG", "HKT": "HKT", "ChST": "ChST", "HAST": "HAST", "MYT": "MYT", "HNT": "HNT", "COST": "COST", "HNOG": "HNOG", "EDT": "EDT", "CLT": "CLT", "MST": "MST", "HNEG": "HNEG", "AWDT": "AWDT", "CLST": "CLST", "JST": "JST", "BT": "BT", "AEST": "AEST", "WAT": "WAT", "WAST": "WAST", "SAST": "SAST", "AWST": "AWST", "JDT": "JDT", "UYST": "UYST", "HNCU": "HNCU", "HECU": "HECU", "NZST": "NZST", "ART": "ART", "PDT": "PDT", "GMT": "GMT", "ACST": "ACST", "PST": "PST", "OESZ": "OESZ", "CDT": "CDT", "ECT": "ECT", "HADT": "HADT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "WESZ": "WESZ", "SGT": "SGT", "GFT": "GFT", "HKST": "HKST", "BOT": "BOT", "MEZ": "MEZ", "MESZ": "MESZ", "AEDT": "AEDT", "WEZ": "WEZ", "HAT": "HAT", "COT": "COT", "ARST": "ARST", "EAT": "EAT", "ACWST": "ACWST", "TMT": "TMT", "WIB": "WIB", "HENOMX": "HENOMX", "NZDT": "NZDT", "AST": "AST", "SRT": "SRT", "HEPM": "HEPM", "UYT": "UYT", "VET": "VET", "WIT": "WIT", "WITA": "WITA", "ADT": "ADT", "MDT": "MDT", "LHDT": "LHDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "TMST": "TMST"}, - } - } -  -@@ -126,7 +104,7 @@ func (es *es_HN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_HN) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +114,7 @@ func (es *es_HN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_HN) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +124,7 @@ func (es *es_HN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_HN) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +170,13 @@ func (es *es_HN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_HN' and handles both Whole and Real numbers based on 'v' - func (es *es_HN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_HN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_HN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_HN' -@@ -268,56 +184,7 @@ func (es *es_HN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_HN' -@@ -326,63 +193,7 @@ func (es *es_HN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_HN' -@@ -390,17 +201,6 @@ func (es *es_HN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +209,6 @@ func (es *es_HN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -481,15 +270,6 @@ func (es *es_HN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -498,22 +278,6 @@ func (es *es_HN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -522,26 +286,6 @@ func (es *es_HN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -550,32 +294,5 @@ func (es *es_HN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_IC/es_IC.go b/es_IC/es_IC.go -index cbaa58d..59e065c 100644 ---- a/es_IC/es_IC.go -+++ b/es_IC/es_IC.go -@@ -10,70 +10,45 @@ import ( - ) -  - type es_IC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_IC' locale - func New() locales.Translator { - return &es_IC{ -- locale: "es_IC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"WIT": "hora de Indonesia oriental", "HEPM": "hora de verano de San Pedro y Miquelón", "COST": "hora de verano de Colombia", "HENOMX": "hora de verano del noroeste de México", "SGT": "hora de Singapur", "AKST": "hora estándar de Alaska", "WEZ": "hora estándar de Europa occidental", "AWST": "hora estándar de Australia occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "LHST": "hora estándar de Lord Howe", "TMT": "hora estándar de Turkmenistán", "ACST": "hora estándar de Australia central", "HEPMX": "hora de verano del Pacífico de México", "UYST": "hora de verano de Uruguay", "HEOG": "hora de verano de Groenlandia occidental", "ACWDT": "hora de verano de Australia centroccidental", "TMST": "hora de verano de Turkmenistán", "CAT": "hora de África central", "WAT": "hora estándar de África occidental", "WART": "hora estándar de Argentina occidental", "ADT": "hora de verano del Atlántico", "HKT": "hora estándar de Hong Kong", "MEZ": "hora estándar de Europa central", "LHDT": "hora de verano de Lord Howe", "JDT": "hora de verano de Japón", "EST": "hora estándar oriental", "CST": "hora estándar central", "CDT": "hora de verano central", "WESZ": "hora de verano de Europa occidental", "ECT": "hora de Ecuador", "MDT": "Hora de verano de Macao", "AKDT": "hora de verano de Alaska", "SRT": "hora de Surinam", "AWDT": "hora de verano de Australia occidental", "CHAST": "hora estándar de Chatham", "GFT": "hora de la Guayana Francesa", "HNNOMX": "hora estándar del noroeste de México", "GYT": "hora de Guyana", "HADT": "hora de verano de Hawái-Aleutiano", "ACWST": "hora estándar de Australia centroccidental", "HAT": "hora de verano de Terranova", "JST": "hora estándar de Japón", "MYT": "hora de Malasia", "VET": "hora de Venezuela", "∅∅∅": "hora de verano del Amazonas", "HNCU": "hora estándar de Cuba", "WIB": "hora de Indonesia occidental", "HNOG": "hora estándar de Groenlandia occidental", "ART": "hora estándar de Argentina", "WAST": "hora de verano de África occidental", "COT": "hora estándar de Colombia", "WITA": "hora de Indonesia central", "BOT": "hora de Bolivia", "EAT": "hora de África oriental", "MST": "Hora estándar de Macao", "AST": "hora estándar del Atlántico", "HNT": "hora estándar de Terranova", "AEST": "hora estándar de Australia oriental", "HKST": "hora de verano de Hong Kong", "HECU": "hora de verano de Cuba", "EDT": "hora de verano oriental", "CHADT": "hora de verano de Chatham", "SAST": "hora de Sudáfrica", "CLT": "hora estándar de Chile", "HEEG": "hora de verano de Groenlandia oriental", "CLST": "hora de verano de Chile", "OEZ": "hora estándar de Europa oriental", "WARST": "hora de verano de Argentina occidental", "UYT": "hora estándar de Uruguay", "HAST": "hora estándar de Hawái-Aleutiano", "BT": "hora de Bután", "ARST": "hora de verano de Argentina", "MESZ": "hora de verano de Europa central", "PST": "hora estándar del Pacífico", "NZDT": "hora de verano de Nueva Zelanda", "IST": "hora estándar de la India", "OESZ": "hora de verano de Europa oriental", "GMT": "hora del meridiano de Greenwich", "NZST": "hora estándar de Nueva Zelanda", "HNEG": "hora estándar de Groenlandia oriental", "HNPMX": "hora estándar del Pacífico de México", "PDT": "hora de verano del Pacífico", "AEDT": "hora de verano de Australia oriental", "ChST": "hora estándar de Chamorro", "ACDT": "hora de verano de Australia central"}, -+ locale: "es_IC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EDT": "EDT", "CLST": "CLST", "ADT": "ADT", "ART": "ART", "JDT": "JDT", "HNCU": "HNCU", "HNT": "HNT", "ECT": "ECT", "AEDT": "AEDT", "UYST": "UYST", "WAT": "WAT", "WARST": "WARST", "WIT": "WIT", "HNPM": "HNPM", "BT": "BT", "AEST": "AEST", "HNPMX": "HNPMX", "TMT": "TMT", "HADT": "HADT", "ACDT": "ACDT", "CHADT": "CHADT", "WESZ": "WESZ", "MDT": "MDT", "WIB": "WIB", "GMT": "GMT", "AWST": "AWST", "CHAST": "CHAST", "HAT": "HAT", "SAST": "SAST", "PST": "PST", "ACWST": "ACWST", "WEZ": "WEZ", "JST": "JST", "GYT": "GYT", "COT": "COT", "HEOG": "HEOG", "WITA": "WITA", "AST": "AST", "HENOMX": "HENOMX", "CDT": "CDT", "IST": "IST", "TMST": "TMST", "CAT": "CAT", "CST": "CST", "MST": "MST", "ChST": "ChST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "HKT": "HKT", "SRT": "SRT", "ACST": "ACST", "SGT": "SGT", "AKDT": "AKDT", "MEZ": "MEZ", "MESZ": "MESZ", "LHST": "LHST", "HECU": "HECU", "BOT": "BOT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "UYT": "UYT", "HEPMX": "HEPMX", "PDT": "PDT", "OESZ": "OESZ", "EST": "EST", "CLT": "CLT", "HNEG": "HNEG", "AWDT": "AWDT", "HEPM": "HEPM", "GFT": "GFT", "WART": "WART", "COST": "COST", "HNOG": "HNOG", "ARST": "ARST", "HEEG": "HEEG", "NZST": "NZST", "NZDT": "NZDT", "EAT": "EAT", "HAST": "HAST", "AKST": "AKST", "OEZ": "OEZ", "HKST": "HKST", "MYT": "MYT", "VET": "VET", "WAST": "WAST"}, - } - } -  -@@ -126,7 +101,7 @@ func (es *es_IC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_IC) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (es *es_IC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_IC) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (es *es_IC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_IC) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (es *es_IC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_IC' and handles both Whole and Real numbers based on 'v' - func (es *es_IC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_IC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_IC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_IC' -@@ -268,56 +181,7 @@ func (es *es_IC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_IC' -@@ -326,63 +190,7 @@ func (es *es_IC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_IC' -@@ -390,17 +198,6 @@ func (es *es_IC) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +206,6 @@ func (es *es_IC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +214,6 @@ func (es *es_IC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +222,6 @@ func (es *es_IC) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +230,6 @@ func (es *es_IC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +238,6 @@ func (es *es_IC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +246,6 @@ func (es *es_IC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +254,5 @@ func (es *es_IC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_MX/es_MX.go b/es_MX/es_MX.go -index 412c44a..92017b8 100644 ---- a/es_MX/es_MX.go -+++ b/es_MX/es_MX.go -@@ -10,68 +10,51 @@ import ( - ) -  - type es_MX struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_MX' locale - func New() locales.Translator { - return &es_MX{ -- locale: "es_MX", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "Af", "ALK", "ALL", "AMD", "Naf", "Kz", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "$a", "ATS", "AU$", "Afl.", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "Br", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "RD$", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "$", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "lei", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TL", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"do", "lu", "ma", "mi", "ju", "vi", "sá"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"EDT": "hora de verano oriental", "MDT": "Hora de verano de Macao", "HAT": "hora de verano de Terranova", "LHST": "Hora estándar de Lord Howe", "GFT": "Hora de la Guayana Francesa", "TMT": "Hora estándar de Turkmenistán", "ECT": "Hora de Ecuador", "HNNOMX": "hora estándar del noroeste de México", "ACWDT": "Hora de verano de Australia Centroccidental", "HEPM": "hora de verano de San Pedro y Miquelón", "HNEG": "hora estándar de Groenlandia oriental", "HKT": "hora estándar de Hong Kong", "SAST": "Hora de Sudáfrica", "CLT": "hora estándar de Chile", "JDT": "hora de verano de Japón", "EAT": "Hora de África Oriental", "HENOMX": "hora de verano del noroeste de México", "HEPMX": "hora de verano del Pacífico de México", "WEZ": "Hora estándar de Europa Occidental", "CHAST": "Hora estándar de Chatham", "CHADT": "Hora de verano de Chatham", "IST": "hora estándar de la India", "CLST": "hora de verano de Chile", "JST": "hora estándar de Japón", "ChST": "Hora estándar de Chamorro", "MYT": "hora de Malasia", "HNOG": "hora estándar de Groenlandia occidental", "HKST": "hora de verano de Hong Kong", "BOT": "hora de Bolivia", "WIB": "hora de Indonesia occidental", "VET": "Hora de Venezuela", "WESZ": "Hora de verano de Europa Occidental", "ACWST": "Hora estándar de Australia Centroccidental", "SGT": "hora de Singapur", "BT": "hora de Bután", "AEDT": "Hora de verano de Australia Oriental", "TMST": "Hora de verano de Turkmenistán", "CAT": "Hora de África Central", "WAT": "Hora estándar de África Occidental", "OESZ": "Hora de verano de Europa del Este", "HNCU": "hora estándar de Cuba", "ADT": "hora de verano del Atlántico", "PDT": "hora de verano del Pacífico", "HNT": "hora estándar de Terranova", "ART": "hora estándar de Argentina", "ARST": "hora de verano de Argentina", "AWST": "Hora estándar de Australia Occidental", "LHDT": "Hora de verano de Lord Howe", "NZDT": "Hora de verano de Nueva Zelanda", "EST": "hora estándar oriental", "CDT": "hora de verano central", "WIT": "hora de Indonesia oriental", "AWDT": "Hora de verano de Australia Occidental", "NZST": "Hora estándar de Nueva Zelanda", "GMT": "Hora del meridiano de Greenwich", "MST": "Hora estándar de Macao", "HNPMX": "hora estándar del Pacífico de México", "SRT": "Hora de Surinam", "HEEG": "hora de verano de Groenlandia oriental", "OEZ": "Hora estándar de Europa del Este", "UYT": "Hora estándar de Uruguay", "UYST": "Hora de verano de Uruguay", "PST": "hora estándar del Pacífico", "MEZ": "Hora estándar de Europa Central", "MESZ": "Hora de verano de Europa Central", "ACST": "Hora estándar de Australia Central", "CST": "hora estándar central", "COT": "Hora estándar de Colombia", "HEOG": "hora de verano de Groenlandia occidental", "ACDT": "Hora de verano de Australia Central", "WARST": "hora de verano de Argentina occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "WAST": "Hora de verano de África Occidental", "WART": "hora estándar de Argentina occidental", "AKST": "hora estándar de Alaska", "AST": "hora estándar del Atlántico", "HADT": "hora de verano de Hawái-Aleutiano", "∅∅∅": "hora de verano del Amazonas", "COST": "Hora de verano de Colombia", "HECU": "hora de verano de Cuba", "AKDT": "hora de verano de Alaska", "GYT": "Hora de Guyana", "HAST": "hora estándar de Hawái-Aleutiano", "AEST": "Hora estándar de Australia Oriental", "WITA": "hora de Indonesia central"}, -+ locale: "es_MX", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "Af", "ALK", "ALL", "AMD", "Naf", "Kz", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "$a", "ATS", "AU$", "Afl.", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "Br", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "RD$", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "$", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "lei", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TL", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"}, -+ daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -+ daysShort: []string{"do", "lu", "ma", "mi", "ju", "vi", "sá"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"CAT": "Hora de África Central", "ECT": "Hora de Ecuador", "ACST": "Hora estándar de Australia Central", "LHST": "Hora estándar de Lord Howe", "WAT": "Hora estándar de África Occidental", "HNT": "HNT", "EST": "EST", "MDT": "MDT", "HECU": "HECU", "CLT": "CLT", "SRT": "Hora de Surinam", "ACWST": "Hora estándar de Australia Centroccidental", "WAST": "Hora de verano de África Occidental", "HEOG": "HEOG", "MST": "MST", "UYST": "Hora de verano de Uruguay", "HNOG": "HNOG", "CLST": "CLST", "HADT": "HADT", "MEZ": "Hora estándar de Europa Central", "HEEG": "HEEG", "HENOMX": "HENOMX", "MYT": "MYT", "UYT": "Hora estándar de Uruguay", "HAT": "HAT", "SAST": "Hora de Sudáfrica", "GYT": "Hora de Guyana", "COST": "Hora de verano de Colombia", "EDT": "EDT", "WITA": "WITA", "HEPMX": "HEPMX", "WIT": "WIT", "∅∅∅": "Hora de verano de las Azores", "ChST": "Hora estándar de Chamorro", "ACDT": "Hora de verano de Australia Central", "WESZ": "Hora de verano de Europa Occidental", "TMST": "Hora de verano de Turkmenistán", "NZDT": "Hora de verano de Nueva Zelanda", "EAT": "Hora de África Oriental", "HNEG": "HNEG", "IST": "IST", "SGT": "SGT", "WARST": "WARST", "WEZ": "Hora estándar de Europa Occidental", "WART": "WART", "HKT": "HKT", "HKST": "HKST", "ART": "ART", "BOT": "BOT", "HAST": "HAST", "NZST": "Hora estándar de Nueva Zelanda", "AWDT": "Hora de verano de Australia Occidental", "ACWDT": "Hora de verano de Australia Centroccidental", "CHAST": "Hora estándar de Chatham", "OESZ": "Hora de verano de Europa del Este", "CDT": "CDT", "MESZ": "Hora de verano de Europa Central", "HNNOMX": "HNNOMX", "PST": "PST", "BT": "BT", "AEST": "Hora estándar de Australia Oriental", "HNPMX": "HNPMX", "AKST": "AKST", "AKDT": "AKDT", "GFT": "Hora de la Guayana Francesa", "TMT": "Hora estándar de Turkmenistán", "WIB": "WIB", "AWST": "Hora estándar de Australia Occidental", "LHDT": "Hora de verano de Lord Howe", "JST": "JST", "JDT": "JDT", "CHADT": "Hora de verano de Chatham", "CST": "CST", "PDT": "PDT", "HNCU": "HNCU", "OEZ": "Hora estándar de Europa del Este", "COT": "Hora estándar de Colombia", "GMT": "Hora del meridiano de Greenwich", "ARST": "ARST", "AST": "AST", "ADT": "ADT", "HNPM": "HNPM", "HEPM": "HEPM", "AEDT": "Hora de verano de Australia Oriental", "VET": "Hora de Venezuela"}, - } - } -  -@@ -134,7 +117,7 @@ func (es *es_MX) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_MX) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +127,7 @@ func (es *es_MX) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_MX) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,49 +173,14 @@ func (es *es_MX) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_MX' and handles both Whole and Real numbers based on 'v' - func (es *es_MX) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_MX' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_MX) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -264,56 +212,7 @@ func (es *es_MX) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_MX' -@@ -322,63 +221,7 @@ func (es *es_MX) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_MX' -@@ -444,19 +287,6 @@ func (es *es_MX) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,21 +295,6 @@ func (es *es_MX) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -488,15 +303,6 @@ func (es *es_MX) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,22 +311,6 @@ func (es *es_MX) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -529,26 +319,6 @@ func (es *es_MX) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -557,32 +327,5 @@ func (es *es_MX) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_NI/es_NI.go b/es_NI/es_NI.go -index 015a84f..1d60688 100644 ---- a/es_NI/es_NI.go -+++ b/es_NI/es_NI.go -@@ -10,70 +10,48 @@ import ( - ) -  - type es_NI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_NI' locale - func New() locales.Translator { - return &es_NI{ -- locale: "es_NI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "C$", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"BT": "hora de Bután", "SRT": "hora de Surinam", "HNOG": "hora estándar de Groenlandia occidental", "ACWDT": "hora de verano de Australia centroccidental", "MEZ": "hora estándar de Europa central", "NZDT": "hora de verano de Nueva Zelanda", "CHAST": "hora estándar de Chatham", "TMST": "hora de verano de Turkmenistán", "GFT": "hora de la Guayana Francesa", "GYT": "hora de Guyana", "UYT": "hora estándar de Uruguay", "HKST": "hora de verano de Hong Kong", "BOT": "hora de Bolivia", "OESZ": "hora de verano de Europa oriental", "COST": "hora de verano de Colombia", "HECU": "hora de verano de Cuba", "PST": "hora estándar del Pacífico", "∅∅∅": "hora de verano del Amazonas", "TMT": "hora estándar de Turkmenistán", "WIB": "hora de Indonesia occidental", "HNT": "hora estándar de Terranova", "HKT": "hora estándar de Hong Kong", "MST": "Hora estándar de Macao", "AKDT": "hora de verano de Alaska", "VET": "hora de Venezuela", "HNPM": "hora estándar de San Pedro y Miquelón", "HAST": "hora estándar de Hawái-Aleutiano", "HEOG": "hora de verano de Groenlandia occidental", "WESZ": "hora de verano de Europa occidental", "ACWST": "hora estándar de Australia centroccidental", "AEST": "hora estándar de Australia oriental", "ACDT": "hora de verano de Australia central", "ECT": "hora de Ecuador", "HENOMX": "hora de verano del noroeste de México", "GMT": "hora del meridiano de Greenwich", "AKST": "hora estándar de Alaska", "CST": "hora estándar central", "CDT": "hora de verano central", "HADT": "hora de verano de Hawái-Aleutiano", "WIT": "hora de Indonesia oriental", "JST": "hora estándar de Japón", "ChST": "hora estándar de Chamorro", "HEEG": "hora de verano de Groenlandia oriental", "HNPMX": "hora estándar del Pacífico de México", "LHDT": "hora de verano de Lord Howe", "JDT": "hora de verano de Japón", "ACST": "hora estándar de Australia central", "WAST": "hora de verano de África occidental", "ADT": "hora de verano del Atlántico", "ARST": "hora de verano de Argentina", "LHST": "hora estándar de Lord Howe", "IST": "hora estándar de la India", "CLT": "hora estándar de Chile", "PDT": "hora de verano del Pacífico", "WAT": "hora estándar de África occidental", "SGT": "hora de Singapur", "AST": "hora estándar del Atlántico", "WEZ": "hora estándar de Europa occidental", "MDT": "Hora de verano de Macao", "HEPMX": "hora de verano del Pacífico de México", "UYST": "hora de verano de Uruguay", "HEPM": "hora de verano de San Pedro y Miquelón", "MESZ": "hora de verano de Europa central", "CHADT": "hora de verano de Chatham", "SAST": "hora de Sudáfrica", "CLST": "hora de verano de Chile", "AWST": "hora estándar de Australia occidental", "AWDT": "hora de verano de Australia occidental", "NZST": "hora estándar de Nueva Zelanda", "OEZ": "hora estándar de Europa oriental", "COT": "hora estándar de Colombia", "EST": "hora estándar oriental", "MYT": "hora de Malasia", "WITA": "hora de Indonesia central", "HNEG": "hora estándar de Groenlandia oriental", "EAT": "hora de África oriental", "ART": "hora estándar de Argentina", "HAT": "hora de verano de Terranova", "AEDT": "hora de verano de Australia oriental", "CAT": "hora de África central", "HNNOMX": "hora estándar del noroeste de México", "HNCU": "hora estándar de Cuba", "WART": "hora estándar de Argentina occidental", "WARST": "hora de verano de Argentina occidental", "EDT": "hora de verano oriental"}, -+ locale: "es_NI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "C$", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"EAT": "EAT", "WESZ": "WESZ", "COT": "COT", "COST": "COST", "CDT": "CDT", "WIT": "WIT", "WITA": "WITA", "OESZ": "OESZ", "HEEG": "HEEG", "AWDT": "AWDT", "OEZ": "OEZ", "HAT": "HAT", "EDT": "EDT", "CAT": "CAT", "SRT": "SRT", "ACST": "ACST", "ACDT": "ACDT", "AEDT": "AEDT", "CHADT": "CHADT", "GMT": "GMT", "IST": "IST", "AEST": "AEST", "WAST": "WAST", "∅∅∅": "∅∅∅", "JDT": "JDT", "GFT": "GFT", "HNT": "HNT", "CLST": "CLST", "HENOMX": "HENOMX", "AST": "AST", "HAST": "HAST", "AWST": "AWST", "CHAST": "CHAST", "MST": "MST", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "HNCU": "HNCU", "AKST": "AKST", "SAST": "SAST", "CLT": "CLT", "MDT": "MDT", "ECT": "ECT", "BOT": "BOT", "HADT": "HADT", "LHST": "LHST", "MYT": "MYT", "PDT": "PDT", "ACWDT": "ACWDT", "CST": "CST", "HKST": "HKST", "AKDT": "AKDT", "HECU": "HECU", "WAT": "WAT", "WARST": "WARST", "UYST": "UYST", "WIB": "WIB", "ARST": "ARST", "MEZ": "MEZ", "HNPM": "HNPM", "HNOG": "HNOG", "HEOG": "HEOG", "HKT": "HKT", "NZDT": "NZDT", "TMT": "TMT", "HNEG": "HNEG", "HNPMX": "HNPMX", "ADT": "ADT", "LHDT": "LHDT", "JST": "JST", "WART": "WART", "EST": "EST", "TMST": "TMST", "ChST": "ChST", "ART": "ART", "PST": "PST", "BT": "BT", "VET": "VET", "HEPMX": "HEPMX", "NZST": "NZST", "ACWST": "ACWST", "UYT": "UYT", "WEZ": "WEZ", "SGT": "SGT", "GYT": "GYT", "MESZ": "MESZ"}, - } - } -  -@@ -126,7 +104,7 @@ func (es *es_NI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_NI) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +114,7 @@ func (es *es_NI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_NI) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +124,7 @@ func (es *es_NI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_NI) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +170,13 @@ func (es *es_NI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_NI' and handles both Whole and Real numbers based on 'v' - func (es *es_NI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_NI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_NI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_NI' -@@ -268,56 +184,7 @@ func (es *es_NI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_NI' -@@ -326,63 +193,7 @@ func (es *es_NI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_NI' -@@ -390,17 +201,6 @@ func (es *es_NI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +209,6 @@ func (es *es_NI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +217,6 @@ func (es *es_NI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +225,6 @@ func (es *es_NI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +233,6 @@ func (es *es_NI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +241,6 @@ func (es *es_NI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +249,6 @@ func (es *es_NI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +257,5 @@ func (es *es_NI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_PA/es_PA.go b/es_PA/es_PA.go -index 93cda0c..6ec67ee 100644 ---- a/es_PA/es_PA.go -+++ b/es_PA/es_PA.go -@@ -10,70 +10,49 @@ import ( - ) -  - type es_PA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_PA' locale - func New() locales.Translator { - return &es_PA{ -- locale: "es_PA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "B/.", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"LHDT": "hora de verano de Lord Howe", "NZST": "hora estándar de Nueva Zelanda", "SAST": "hora de Sudáfrica", "HNNOMX": "hora estándar del noroeste de México", "HNPMX": "hora estándar del Pacífico de México", "WIB": "hora de Indonesia occidental", "WITA": "hora de Indonesia central", "MDT": "Hora de verano de Macao", "CST": "hora estándar central", "HNOG": "hora estándar de Groenlandia occidental", "CHAST": "hora estándar de Chatham", "TMST": "hora de verano de Turkmenistán", "ACDT": "hora de verano de Australia central", "EAT": "hora de África oriental", "AKST": "hora estándar de Alaska", "ACWDT": "hora de verano de Australia centroccidental", "HNT": "hora estándar de Terranova", "COT": "hora estándar de Colombia", "LHST": "hora estándar de Lord Howe", "MESZ": "hora de verano de Europa central", "WAST": "hora de verano de África occidental", "ADT": "hora de verano del Atlántico", "ACWST": "hora estándar de Australia centroccidental", "PST": "hora estándar del Pacífico", "ARST": "hora de verano de Argentina", "CLT": "hora estándar de Chile", "GYT": "hora de Guyana", "UYT": "hora estándar de Uruguay", "HADT": "hora de verano de Hawái-Aleutiano", "WARST": "hora de verano de Argentina occidental", "WESZ": "hora de verano de Europa occidental", "HAT": "hora de verano de Terranova", "HEEG": "hora de verano de Groenlandia oriental", "AEST": "hora estándar de Australia oriental", "WAT": "hora estándar de África occidental", "CAT": "hora de África central", "EST": "hora estándar oriental", "AST": "hora estándar del Atlántico", "BT": "hora de Bután", "BOT": "hora de Bolivia", "EDT": "hora de verano oriental", "AKDT": "hora de verano de Alaska", "CLST": "hora de verano de Chile", "OEZ": "hora estándar de Europa oriental", "GMT": "hora del meridiano de Greenwich", "UYST": "hora de verano de Uruguay", "CHADT": "hora de verano de Chatham", "TMT": "hora estándar de Turkmenistán", "HNEG": "hora estándar de Groenlandia oriental", "GFT": "hora de la Guayana Francesa", "ECT": "hora de Ecuador", "MST": "Hora estándar de Macao", "ART": "hora estándar de Argentina", "HNPM": "hora estándar de San Pedro y Miquelón", "HEPM": "hora de verano de San Pedro y Miquelón", "SRT": "hora de Surinam", "PDT": "hora de verano del Pacífico", "AWST": "hora estándar de Australia occidental", "AWDT": "hora de verano de Australia occidental", "HKST": "hora de verano de Hong Kong", "JST": "hora estándar de Japón", "ChST": "hora estándar de Chamorro", "HEPMX": "hora de verano del Pacífico de México", "VET": "hora de Venezuela", "WEZ": "hora estándar de Europa occidental", "ACST": "hora estándar de Australia central", "COST": "hora de verano de Colombia", "HNCU": "hora estándar de Cuba", "CDT": "hora de verano central", "MYT": "hora de Malasia", "HEOG": "hora de verano de Groenlandia occidental", "NZDT": "hora de verano de Nueva Zelanda", "IST": "hora estándar de la India", "∅∅∅": "hora de verano del Amazonas", "HENOMX": "hora de verano del noroeste de México", "WART": "hora estándar de Argentina occidental", "WIT": "hora de Indonesia oriental", "HAST": "hora estándar de Hawái-Aleutiano", "HKT": "hora estándar de Hong Kong", "AEDT": "hora de verano de Australia oriental", "SGT": "hora de Singapur", "HECU": "hora de verano de Cuba", "MEZ": "hora estándar de Europa central", "JDT": "hora de verano de Japón", "OESZ": "hora de verano de Europa oriental"}, -+ locale: "es_PA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "B/.", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"IST": "IST", "PST": "PST", "WARST": "WARST", "NZST": "NZST", "ADT": "ADT", "JST": "JST", "HECU": "HECU", "SGT": "SGT", "OESZ": "OESZ", "ACST": "ACST", "BT": "BT", "AEST": "AEST", "HKST": "HKST", "WEZ": "WEZ", "TMT": "TMT", "TMST": "TMST", "CHAST": "CHAST", "UYT": "UYT", "HNCU": "HNCU", "AKST": "AKST", "GFT": "GFT", "AST": "AST", "HAST": "HAST", "LHST": "LHST", "GYT": "GYT", "EST": "EST", "AWST": "AWST", "ACWDT": "ACWDT", "VET": "VET", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WIB": "WIB", "MEZ": "MEZ", "JDT": "JDT", "HNT": "HNT", "NZDT": "NZDT", "AWDT": "AWDT", "HEOG": "HEOG", "EDT": "EDT", "HNPM": "HNPM", "WAT": "WAT", "COT": "COT", "∅∅∅": "∅∅∅", "WITA": "WITA", "ART": "ART", "HEPM": "HEPM", "OEZ": "OEZ", "WIT": "WIT", "ECT": "ECT", "CDT": "CDT", "MYT": "MYT", "ACWST": "ACWST", "HAT": "HAT", "CLT": "CLT", "MST": "MST", "ACDT": "ACDT", "AEDT": "AEDT", "WAST": "WAST", "COST": "COST", "HKT": "HKT", "SRT": "SRT", "HENOMX": "HENOMX", "LHDT": "LHDT", "MESZ": "MESZ", "HNOG": "HNOG", "SAST": "SAST", "UYST": "UYST", "WESZ": "WESZ", "CST": "CST", "HNEG": "HNEG", "HEEG": "HEEG", "GMT": "GMT", "EAT": "EAT", "HNNOMX": "HNNOMX", "WART": "WART", "CAT": "CAT", "CLST": "CLST", "MDT": "MDT", "HADT": "HADT", "CHADT": "CHADT", "PDT": "PDT", "AKDT": "AKDT", "ChST": "ChST", "ARST": "ARST", "BOT": "BOT"}, - } - } -  -@@ -126,7 +105,7 @@ func (es *es_PA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_PA) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +125,7 @@ func (es *es_PA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_PA) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +171,13 @@ func (es *es_PA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_PA' and handles both Whole and Real numbers based on 'v' - func (es *es_PA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_PA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_PA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_PA' -@@ -268,56 +185,7 @@ func (es *es_PA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_PA' -@@ -326,63 +194,7 @@ func (es *es_PA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_PA' -@@ -448,19 +260,6 @@ func (es *es_PA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,21 +268,6 @@ func (es *es_PA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_PE/es_PE.go b/es_PE/es_PE.go -index 39e33fd..77501ff 100644 ---- a/es_PE/es_PE.go -+++ b/es_PE/es_PE.go -@@ -10,70 +10,50 @@ import ( - ) -  - type es_PE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_PE' locale - func New() locales.Translator { - return &es_PE{ -- locale: "es_PE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "S/", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "set.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "setiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"AST": "hora estándar del Atlántico", "SRT": "hora de Surinam", "ART": "hora estándar de Argentina", "CLST": "hora de verano de Chile", "COST": "hora de verano de Colombia", "HNNOMX": "hora estándar del noroeste de México", "WARST": "hora de verano de Argentina occidental", "MYT": "hora de Malasia", "UYST": "hora de verano de Uruguay", "HNOG": "hora estándar de Groenlandia occidental", "CHADT": "hora de verano de Chatham", "ChST": "hora estándar de Chamorro", "EAT": "hora de África oriental", "ECT": "hora de Ecuador", "SGT": "hora de Singapur", "JST": "hora estándar de Japón", "HEEG": "hora de verano de Groenlandia oriental", "WESZ": "hora de verano de Europa occidental", "AWST": "hora estándar de Australia occidental", "WITA": "hora de Indonesia central", "CAT": "hora de África central", "HENOMX": "hora de verano del noroeste de México", "CHAST": "hora estándar de Chatham", "MEZ": "hora estándar de Europa central", "WART": "hora estándar de Argentina occidental", "WEZ": "hora estándar de Europa occidental", "NZDT": "hora de verano de Nueva Zelanda", "HNCU": "hora estándar de Cuba", "CLT": "hora estándar de Chile", "ACST": "hora estándar de Australia central", "CST": "hora estándar central", "LHDT": "hora de verano de Lord Howe", "ARST": "hora de verano de Argentina", "IST": "hora estándar de la India", "CDT": "hora de verano central", "UYT": "hora estándar de Uruguay", "BT": "hora de Bután", "HNT": "hora estándar de Terranova", "AEST": "hora estándar de Australia oriental", "MESZ": "hora de verano de Europa central", "JDT": "hora de verano de Japón", "TMST": "hora de verano de Turkmenistán", "OESZ": "hora de verano de Europa oriental", "AKST": "hora estándar de Alaska", "WIT": "hora de Indonesia oriental", "PST": "hora estándar del Pacífico", "AEDT": "hora de verano de Australia oriental", "LHST": "hora estándar de Lord Howe", "GMT": "hora del meridiano de Greenwich", "HNPMX": "hora estándar del Pacífico de México", "HAST": "hora estándar de Hawái-Aleutiano", "VET": "hora de Venezuela", "ACWST": "hora estándar de Australia centroccidental", "HAT": "hora de verano de Terranova", "AWDT": "hora de verano de Australia occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "WAT": "hora estándar de África occidental", "HECU": "hora de verano de Cuba", "WIB": "hora de Indonesia occidental", "HEPM": "hora de verano de San Pedro y Miquelón", "NZST": "hora estándar de Nueva Zelanda", "HNEG": "hora estándar de Groenlandia oriental", "ACDT": "hora de verano de Australia central", "AKDT": "hora de verano de Alaska", "HADT": "hora de verano de Hawái-Aleutiano", "ADT": "hora de verano del Atlántico", "PDT": "hora de verano del Pacífico", "TMT": "hora estándar de Turkmenistán", "HKST": "hora de verano de Hong Kong", "SAST": "hora de Sudáfrica", "MDT": "Hora de verano de Macao", "EST": "hora estándar oriental", "ACWDT": "hora de verano de Australia centroccidental", "GFT": "hora de la Guayana Francesa", "∅∅∅": "hora de verano de Perú", "MST": "Hora estándar de Macao", "HEOG": "hora de verano de Groenlandia occidental", "HEPMX": "hora de verano del Pacífico de México", "EDT": "hora de verano oriental", "GYT": "hora de Guyana", "HKT": "hora estándar de Hong Kong", "BOT": "hora de Bolivia", "WAST": "hora de verano de África occidental", "OEZ": "hora estándar de Europa oriental", "COT": "hora estándar de Colombia"}, -+ locale: "es_PE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "S/", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "set.", "oct.", "nov.", "dic."}, -+ monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "setiembre", "octubre", "noviembre", "diciembre"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"NZDT": "NZDT", "HENOMX": "HENOMX", "HNEG": "HNEG", "JDT": "JDT", "AWST": "AWST", "SGT": "SGT", "LHDT": "LHDT", "COT": "COT", "COST": "COST", "CLT": "CLT", "IST": "IST", "PDT": "PDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "GYT": "GYT", "NZST": "NZST", "HECU": "HECU", "EDT": "EDT", "TMST": "TMST", "WAT": "WAT", "CLST": "CLST", "CST": "CST", "MDT": "MDT", "ChST": "ChST", "HNPM": "HNPM", "LHST": "LHST", "AEDT": "AEDT", "WART": "WART", "∅∅∅": "∅∅∅", "WITA": "WITA", "ECT": "ECT", "ACST": "ACST", "BT": "BT", "HNT": "HNT", "SAST": "SAST", "AEST": "AEST", "CHAST": "CHAST", "ARST": "ARST", "GMT": "GMT", "MEZ": "MEZ", "WEZ": "WEZ", "WARST": "WARST", "ART": "ART", "SRT": "SRT", "HADT": "HADT", "ACWST": "ACWST", "UYT": "UYT", "HNPMX": "HNPMX", "CDT": "CDT", "MST": "MST", "EAT": "EAT", "ACDT": "ACDT", "MYT": "MYT", "ACWDT": "ACWDT", "UYST": "UYST", "WAST": "WAST", "CAT": "CAT", "WIB": "WIB", "AST": "AST", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "OEZ": "OEZ", "GFT": "GFT", "CHADT": "CHADT", "VET": "VET", "WIT": "WIT", "HEOG": "HEOG", "ADT": "ADT", "JST": "JST", "OESZ": "OESZ", "BOT": "BOT", "HEEG": "HEEG", "HNCU": "HNCU", "AKST": "AKST", "EST": "EST", "HKST": "HKST", "HEPM": "HEPM", "HAT": "HAT", "TMT": "TMT", "HAST": "HAST", "MESZ": "MESZ", "AWDT": "AWDT", "PST": "PST", "WESZ": "WESZ", "HKT": "HKT"}, - } - } -  -@@ -136,7 +116,7 @@ func (es *es_PE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_PE) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -192,75 +172,13 @@ func (es *es_PE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_PE' and handles both Whole and Real numbers based on 'v' - func (es *es_PE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_PE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_PE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_PE' -@@ -268,56 +186,7 @@ func (es *es_PE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_PE' -@@ -326,63 +195,7 @@ func (es *es_PE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_PE' -@@ -415,17 +228,6 @@ func (es *es_PE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,19 +236,6 @@ func (es *es_PE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,21 +244,6 @@ func (es *es_PE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,15 +252,6 @@ func (es *es_PE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -495,22 +260,6 @@ func (es *es_PE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -519,26 +268,6 @@ func (es *es_PE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -547,32 +276,5 @@ func (es *es_PE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_PH/es_PH.go b/es_PH/es_PH.go -index 4dba982..fa41ad0 100644 ---- a/es_PH/es_PH.go -+++ b/es_PH/es_PH.go -@@ -10,70 +10,45 @@ import ( - ) -  - type es_PH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_PH' locale - func New() locales.Translator { - return &es_PH{ -- locale: "es_PH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "₱", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"ChST": "hora estándar de Chamorro", "GFT": "hora de la Guayana Francesa", "HENOMX": "hora de verano del noroeste de México", "EDT": "hora de verano oriental", "UYT": "hora estándar de Uruguay", "HADT": "hora de verano de Hawái-Aleutiano", "HAT": "hora de verano de Terranova", "CHAST": "hora estándar de Chatham", "HNPMX": "hora estándar del Pacífico de México", "WIT": "hora de Indonesia oriental", "OEZ": "hora estándar de Europa oriental", "WART": "hora estándar de Argentina occidental", "HNOG": "hora estándar de Groenlandia occidental", "MESZ": "hora de verano de Europa central", "LHST": "hora estándar de Lord Howe", "NZST": "hora estándar de Nueva Zelanda", "CHADT": "hora de verano de Chatham", "CLST": "hora de verano de Chile", "TMT": "hora estándar de Turkmenistán", "HEPMX": "hora de verano del Pacífico de México", "HAST": "hora estándar de Hawái-Aleutiano", "HNT": "hora estándar de Terranova", "ART": "hora estándar de Argentina", "AEDT": "hora de verano de Australia oriental", "CDT": "hora de verano central", "SRT": "hora de Surinam", "ACST": "hora estándar de Australia central", "ADT": "hora de verano del Atlántico", "HNEG": "hora estándar de Groenlandia oriental", "EAT": "hora de África oriental", "COST": "hora de verano de Colombia", "NZDT": "hora de verano de Nueva Zelanda", "ACDT": "hora de verano de Australia central", "WAST": "hora de verano de África occidental", "HNCU": "hora estándar de Cuba", "HKT": "hora estándar de Hong Kong", "HECU": "hora de verano de Cuba", "AKST": "hora estándar de Alaska", "CST": "hora estándar central", "VET": "hora de Venezuela", "ACWST": "hora estándar de Australia centroccidental", "ARST": "hora de verano de Argentina", "PST": "hora estándar del Pacífico", "WEZ": "hora estándar de Europa occidental", "ACWDT": "hora de verano de Australia centroccidental", "HKST": "hora de verano de Hong Kong", "PDT": "hora de verano del Pacífico", "AWST": "hora estándar de Australia occidental", "OESZ": "hora de verano de Europa oriental", "EST": "hora estándar oriental", "MST": "Hora estándar de Macao", "MYT": "hora de Malasia", "UYST": "hora de verano de Uruguay", "AKDT": "hora de verano de Alaska", "MEZ": "hora estándar de Europa central", "JDT": "hora de verano de Japón", "HEEG": "hora de verano de Groenlandia oriental", "TMST": "hora de verano de Turkmenistán", "ECT": "hora de Ecuador", "SGT": "hora de Singapur", "AST": "hora estándar del Atlántico", "WIB": "hora de Indonesia occidental", "WESZ": "hora de verano de Europa occidental", "AEST": "hora estándar de Australia oriental", "WARST": "hora de verano de Argentina occidental", "BT": "hora de Bután", "HEPM": "hora de verano de San Pedro y Miquelón", "LHDT": "hora de verano de Lord Howe", "HNNOMX": "hora estándar del noroeste de México", "MDT": "Hora de verano de Macao", "HEOG": "hora de verano de Groenlandia occidental", "WITA": "hora de Indonesia central", "WAT": "hora estándar de África occidental", "CAT": "hora de África central", "AWDT": "hora de verano de Australia occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "SAST": "hora de Sudáfrica", "∅∅∅": "hora de verano del Amazonas", "BOT": "hora de Bolivia", "GMT": "hora del meridiano de Greenwich", "GYT": "hora de Guyana", "IST": "hora estándar de la India", "CLT": "hora estándar de Chile", "JST": "hora estándar de Japón", "COT": "hora estándar de Colombia"}, -+ locale: "es_PH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "₱", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZST": "NZST", "OESZ": "OESZ", "WIT": "WIT", "HNT": "HNT", "HNOG": "HNOG", "EDT": "EDT", "ART": "ART", "BT": "BT", "PDT": "PDT", "GFT": "GFT", "HAT": "HAT", "ACWDT": "ACWDT", "HECU": "HECU", "CAT": "CAT", "MDT": "MDT", "HENOMX": "HENOMX", "UYST": "UYST", "WARST": "WARST", "COST": "COST", "VET": "VET", "AKDT": "AKDT", "HEOG": "HEOG", "HNNOMX": "HNNOMX", "AWST": "AWST", "AWDT": "AWDT", "CHADT": "CHADT", "PST": "PST", "WITA": "WITA", "WESZ": "WESZ", "OEZ": "OEZ", "TMST": "TMST", "CLST": "CLST", "CST": "CST", "CHAST": "CHAST", "UYT": "UYT", "HNCU": "HNCU", "WART": "WART", "CLT": "CLT", "ADT": "ADT", "HADT": "HADT", "AKST": "AKST", "SAST": "SAST", "ECT": "ECT", "AEDT": "AEDT", "HNPMX": "HNPMX", "EST": "EST", "HKST": "HKST", "AST": "AST", "GYT": "GYT", "TMT": "TMT", "MESZ": "MESZ", "HNPM": "HNPM", "JST": "JST", "ChST": "ChST", "MST": "MST", "HAST": "HAST", "HNEG": "HNEG", "HEEG": "HEEG", "LHDT": "LHDT", "AEST": "AEST", "∅∅∅": "∅∅∅", "COT": "COT", "CDT": "CDT", "MEZ": "MEZ", "ACDT": "ACDT", "HEPM": "HEPM", "NZDT": "NZDT", "GMT": "GMT", "SRT": "SRT", "MYT": "MYT", "LHST": "LHST", "HKT": "HKT", "BOT": "BOT", "WAST": "WAST", "WEZ": "WEZ", "ACST": "ACST", "JDT": "JDT", "ACWST": "ACWST", "IST": "IST", "HEPMX": "HEPMX", "ARST": "ARST", "EAT": "EAT", "SGT": "SGT", "WAT": "WAT", "WIB": "WIB"}, - } - } -  -@@ -126,7 +101,7 @@ func (es *es_PH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_PH) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (es *es_PH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_PH) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (es *es_PH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_PH) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (es *es_PH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_PH' and handles both Whole and Real numbers based on 'v' - func (es *es_PH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_PH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_PH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_PH' -@@ -268,56 +181,7 @@ func (es *es_PH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_PH' -@@ -326,63 +190,7 @@ func (es *es_PH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_PH' -@@ -390,17 +198,6 @@ func (es *es_PH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +206,6 @@ func (es *es_PH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +214,6 @@ func (es *es_PH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +222,6 @@ func (es *es_PH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_PR/es_PR.go b/es_PR/es_PR.go -index 2a7b9e7..2e7c1bb 100644 ---- a/es_PR/es_PR.go -+++ b/es_PR/es_PR.go -@@ -10,70 +10,48 @@ import ( - ) -  - type es_PR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_PR' locale - func New() locales.Translator { - return &es_PR{ -- locale: "es_PR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"BT": "hora de Bután", "AWST": "hora estándar de Australia occidental", "AEST": "hora estándar de Australia oriental", "HNPM": "hora estándar de San Pedro y Miquelón", "CLT": "hora estándar de Chile", "HEEG": "hora de verano de Groenlandia oriental", "WART": "hora estándar de Argentina occidental", "HNCU": "hora estándar de Cuba", "LHDT": "hora de verano de Lord Howe", "MST": "Hora estándar de Macao", "HEPMX": "hora de verano del Pacífico de México", "AEDT": "hora de verano de Australia oriental", "HEPM": "hora de verano de San Pedro y Miquelón", "SAST": "hora de Sudáfrica", "ChST": "hora estándar de Chamorro", "CAT": "hora de África central", "WARST": "hora de verano de Argentina occidental", "LHST": "hora estándar de Lord Howe", "NZST": "hora estándar de Nueva Zelanda", "CDT": "hora de verano central", "GYT": "hora de Guyana", "UYT": "hora estándar de Uruguay", "AWDT": "hora de verano de Australia occidental", "BOT": "hora de Bolivia", "WAST": "hora de verano de África occidental", "OEZ": "hora estándar de Europa oriental", "COT": "hora estándar de Colombia", "HKST": "hora de verano de Hong Kong", "WITA": "hora de Indonesia central", "ACWDT": "hora de verano de Australia centroccidental", "GFT": "hora de la Guayana Francesa", "ACDT": "hora de verano de Australia central", "MDT": "Hora de verano de Macao", "AKDT": "hora de verano de Alaska", "HNNOMX": "hora estándar del noroeste de México", "UYST": "hora de verano de Uruguay", "WIT": "hora de Indonesia oriental", "ADT": "hora de verano del Atlántico", "WESZ": "hora de verano de Europa occidental", "ACWST": "hora estándar de Australia centroccidental", "HNT": "hora estándar de Terranova", "∅∅∅": "hora de verano del Amazonas", "OESZ": "hora de verano de Europa oriental", "GMT": "hora del meridiano de Greenwich", "AKST": "hora estándar de Alaska", "PST": "hora estándar del Pacífico", "MEZ": "hora estándar de Europa central", "EST": "hora estándar oriental", "CHADT": "hora de verano de Chatham", "SRT": "hora de Surinam", "HNOG": "hora estándar de Groenlandia occidental", "CHAST": "hora estándar de Chatham", "JDT": "hora de verano de Japón", "COST": "hora de verano de Colombia", "HNPMX": "hora estándar del Pacífico de México", "HAST": "hora estándar de Hawái-Aleutiano", "WEZ": "hora estándar de Europa occidental", "PDT": "hora de verano del Pacífico", "IST": "hora estándar de la India", "EDT": "hora de verano oriental", "VET": "hora de Venezuela", "HADT": "hora de verano de Hawái-Aleutiano", "EAT": "hora de África oriental", "HENOMX": "hora de verano del noroeste de México", "NZDT": "hora de verano de Nueva Zelanda", "HEOG": "hora de verano de Groenlandia occidental", "ARST": "hora de verano de Argentina", "JST": "hora estándar de Japón", "CST": "hora estándar central", "AST": "hora estándar del Atlántico", "WIB": "hora de Indonesia occidental", "ACST": "hora estándar de Australia central", "SGT": "hora de Singapur", "ART": "hora estándar de Argentina", "CLST": "hora de verano de Chile", "HNEG": "hora estándar de Groenlandia oriental", "TMT": "hora estándar de Turkmenistán", "MYT": "hora de Malasia", "HAT": "hora de verano de Terranova", "HKT": "hora estándar de Hong Kong", "MESZ": "hora de verano de Europa central", "TMST": "hora de verano de Turkmenistán", "WAT": "hora estándar de África occidental", "ECT": "hora de Ecuador", "HECU": "hora de verano de Cuba"}, -+ locale: "es_PR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"ARST": "ARST", "EAT": "EAT", "WART": "WART", "WITA": "WITA", "NZDT": "NZDT", "SRT": "SRT", "LHST": "LHST", "PDT": "PDT", "HKT": "HKT", "ADT": "ADT", "ART": "ART", "ACWDT": "ACWDT", "HNT": "HNT", "HEOG": "HEOG", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "VET": "VET", "SAST": "SAST", "MST": "MST", "ACST": "ACST", "JDT": "JDT", "HECU": "HECU", "CST": "CST", "HENOMX": "HENOMX", "AEST": "AEST", "WESZ": "WESZ", "WAT": "WAT", "HNOG": "HNOG", "CAT": "CAT", "HADT": "HADT", "MEZ": "MEZ", "WEZ": "WEZ", "PST": "PST", "AKDT": "AKDT", "CLST": "CLST", "HAST": "HAST", "ACDT": "ACDT", "HEEG": "HEEG", "CDT": "CDT", "UYST": "UYST", "HEPMX": "HEPMX", "GFT": "GFT", "GMT": "GMT", "MYT": "MYT", "WARST": "WARST", "EDT": "EDT", "CHAST": "CHAST", "OESZ": "OESZ", "HAT": "HAT", "AWST": "AWST", "IST": "IST", "ACWST": "ACWST", "AST": "AST", "ChST": "ChST", "HNEG": "HNEG", "HNPMX": "HNPMX", "GYT": "GYT", "SGT": "SGT", "AWDT": "AWDT", "HNPM": "HNPM", "HEPM": "HEPM", "UYT": "UYT", "WAST": "WAST", "WIT": "WIT", "WIB": "WIB", "MESZ": "MESZ", "LHDT": "LHDT", "JST": "JST", "AKST": "AKST", "OEZ": "OEZ", "COT": "COT", "COST": "COST", "HKST": "HKST", "MDT": "MDT", "HNNOMX": "HNNOMX", "BT": "BT", "NZST": "NZST", "ECT": "ECT", "TMT": "TMT", "TMST": "TMST", "CLT": "CLT", "EST": "EST", "BOT": "BOT", "AEDT": "AEDT", "HNCU": "HNCU"}, - } - } -  -@@ -126,7 +104,7 @@ func (es *es_PR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_PR) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +114,7 @@ func (es *es_PR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_PR) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +124,7 @@ func (es *es_PR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_PR) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +170,13 @@ func (es *es_PR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_PR' and handles both Whole and Real numbers based on 'v' - func (es *es_PR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_PR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_PR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_PR' -@@ -268,56 +184,7 @@ func (es *es_PR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_PR' -@@ -326,63 +193,7 @@ func (es *es_PR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_PR' -@@ -448,19 +259,6 @@ func (es *es_PR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,21 +267,6 @@ func (es *es_PR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_PY/es_PY.go b/es_PY/es_PY.go -index 6bde1fd..e4ed453 100644 ---- a/es_PY/es_PY.go -+++ b/es_PY/es_PY.go -@@ -18,7 +18,6 @@ type es_PY struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -51,29 +50,16 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "Gs.", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", - monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, - daysShort: []string{"do", "lu", "ma", "mi", "ju", "vi", "sa"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"LHDT": "hora de verano de Lord Howe", "CLT": "hora estándar de Chile", "HEEG": "hora de verano de Groenlandia oriental", "WAST": "hora de verano de África occidental", "WART": "hora estándar de Argentina occidental", "HNCU": "hora estándar de Cuba", "EST": "hora estándar oriental", "SAST": "hora de Sudáfrica", "TMST": "hora de verano de Turkmenistán", "WAT": "hora estándar de África occidental", "HENOMX": "hora de verano del noroeste de México", "AKST": "hora estándar de Alaska", "AWDT": "hora de verano de Australia occidental", "IST": "hora estándar de la India", "ECT": "hora de Ecuador", "HADT": "hora de verano de Hawái-Aleutiano", "GFT": "hora de la Guayana Francesa", "HNEG": "hora estándar de Groenlandia oriental", "CHADT": "hora de verano de Chatham", "PDT": "hora de verano del Pacífico", "HEPM": "hora de verano de San Pedro y Miquelón", "JDT": "hora de verano de Japón", "ChST": "hora estándar de Chamorro", "BT": "hora de Bután", "CDT": "hora de verano central", "HAST": "hora estándar de Hawái-Aleutiano", "ACWST": "hora estándar de Australia centroccidental", "MST": "Hora estándar de Macao", "HEPMX": "hora de verano del Pacífico de México", "MYT": "hora de Malasia", "WEZ": "hora estándar de Europa occidental", "EAT": "hora de África oriental", "COT": "hora estándar de Colombia", "HNPMX": "hora estándar del Pacífico de México", "WESZ": "hora de verano de Europa occidental", "ACWDT": "hora de verano de Australia centroccidental", "HKST": "hora de verano de Hong Kong", "HNPM": "hora estándar de San Pedro y Miquelón", "JST": "hora estándar de Japón", "BOT": "hora de Bolivia", "ACST": "hora estándar de Australia central", "HNT": "hora estándar de Terranova", "ACDT": "hora de verano de Australia central", "WITA": "hora de Indonesia central", "AWST": "hora estándar de Australia occidental", "NZDT": "hora de verano de Nueva Zelanda", "COST": "hora de verano de Colombia", "GMT": "hora del meridiano de Greenwich", "UYST": "hora de verano de Uruguay", "AEST": "hora estándar de Australia oriental", "LHST": "hora estándar de Lord Howe", "CAT": "hora de África central", "SGT": "hora de Singapur", "PST": "hora estándar del Pacífico", "MDT": "Hora de verano de Macao", "WIB": "hora de Indonesia occidental", "HNNOMX": "hora estándar del noroeste de México", "EDT": "hora de verano oriental", "ART": "hora estándar de Argentina", "HKT": "hora estándar de Hong Kong", "MEZ": "hora estándar de Europa central", "MESZ": "hora de verano de Europa central", "CLST": "hora de verano de Chile", "∅∅∅": "hora de verano del Amazonas", "TMT": "hora estándar de Turkmenistán", "ADT": "hora de verano del Atlántico", "OEZ": "hora estándar de Europa oriental", "SRT": "hora de Surinam", "CHAST": "hora estándar de Chatham", "NZST": "hora estándar de Nueva Zelanda", "WARST": "hora de verano de Argentina occidental", "HECU": "hora de verano de Cuba", "VET": "hora de Venezuela", "UYT": "hora estándar de Uruguay", "AKDT": "hora de verano de Alaska", "HAT": "hora de verano de Terranova", "HNOG": "hora estándar de Groenlandia occidental", "HEOG": "hora de verano de Groenlandia occidental", "AEDT": "hora de verano de Australia oriental", "OESZ": "hora de verano de Europa oriental", "GYT": "hora de Guyana", "AST": "hora estándar del Atlántico", "WIT": "hora de Indonesia oriental", "ARST": "hora de verano de Argentina", "CST": "hora estándar central"}, -+ timezones: map[string]string{"GFT": "GFT", "MST": "MST", "ART": "ART", "BOT": "BOT", "MEZ": "MEZ", "ACDT": "ACDT", "HEPM": "HEPM", "AKDT": "AKDT", "TMT": "TMT", "NZDT": "NZDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "SRT": "SRT", "ACST": "ACST", "LHST": "LHST", "AEST": "AEST", "CHADT": "CHADT", "WAT": "WAT", "COT": "COT", "HNPM": "HNPM", "AWST": "AWST", "HAT": "HAT", "MDT": "MDT", "∅∅∅": "∅∅∅", "TMST": "TMST", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "HNCU": "HNCU", "OESZ": "OESZ", "HNT": "HNT", "CAT": "CAT", "CLST": "CLST", "ADT": "ADT", "UYST": "UYST", "WEZ": "WEZ", "VET": "VET", "EDT": "EDT", "CST": "CST", "ACWST": "ACWST", "PDT": "PDT", "WAST": "WAST", "WART": "WART", "EST": "EST", "WIB": "WIB", "EAT": "EAT", "GYT": "GYT", "ECT": "ECT", "NZST": "NZST", "MYT": "MYT", "WESZ": "WESZ", "AKST": "AKST", "HADT": "HADT", "AWDT": "AWDT", "HNPMX": "HNPMX", "AST": "AST", "HENOMX": "HENOMX", "PST": "PST", "HKST": "HKST", "CDT": "CDT", "JDT": "JDT", "AEDT": "AEDT", "SGT": "SGT", "SAST": "SAST", "HKT": "HKT", "ChST": "ChST", "HNEG": "HNEG", "HEEG": "HEEG", "UYT": "UYT", "HECU": "HECU", "WARST": "WARST", "COST": "COST", "BT": "BT", "ARST": "ARST", "GMT": "GMT", "HAST": "HAST", "MESZ": "MESZ", "JST": "JST", "LHDT": "LHDT", "IST": "IST", "OEZ": "OEZ", "CLT": "CLT", "WITA": "WITA", "CHAST": "CHAST", "WIT": "WIT", "HEOG": "HEOG"}, - } - } -  -@@ -136,7 +122,7 @@ func (es *es_PY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_PY) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +132,7 @@ func (es *es_PY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_PY) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +178,13 @@ func (es *es_PY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_PY' and handles both Whole and Real numbers based on 'v' - func (es *es_PY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_PY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_PY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_PY' -@@ -268,7 +192,7 @@ func (es *es_PY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -330,7 +254,7 @@ func (es *es_PY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -403,17 +327,6 @@ func (es *es_PY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -422,17 +335,6 @@ func (es *es_PY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -441,19 +343,6 @@ func (es *es_PY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,21 +351,6 @@ func (es *es_PY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,15 +359,6 @@ func (es *es_PY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -502,22 +367,6 @@ func (es *es_PY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -526,26 +375,6 @@ func (es *es_PY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -554,32 +383,5 @@ func (es *es_PY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_SV/es_SV.go b/es_SV/es_SV.go -index 30aa0bb..3ffabe8 100644 ---- a/es_SV/es_SV.go -+++ b/es_SV/es_SV.go -@@ -10,70 +10,48 @@ import ( - ) -  - type es_SV struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_SV' locale - func New() locales.Translator { - return &es_SV{ -- locale: "es_SV", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"a. m.", "p. m."}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"SRT": "hora de Surinam", "EAT": "hora de África oriental", "WARST": "hora de verano de Argentina occidental", "ACDT": "hora de verano de Australia central", "MYT": "hora de Malasia", "ECT": "hora de Ecuador", "AKST": "hora estándar de Alaska", "HNOG": "hora estándar de Groenlandia occidental", "HKST": "hora de verano de Hong Kong", "JDT": "hora de verano de Japón", "ACST": "hora estándar de Australia central", "WAT": "hora estándar de África occidental", "HEEG": "hora de verano de Groenlandia oriental", "UYT": "hora estándar de Uruguay", "WIB": "hora de Indonesia occidental", "BT": "hora de Bután", "ACWST": "hora estándar de Australia centroccidental", "HNPM": "hora estándar de San Pedro y Miquelón", "HNEG": "hora estándar de Groenlandia oriental", "WESZ": "hora de verano de Europa occidental", "AEDT": "hora de verano de Australia oriental", "MEZ": "hora estándar de Europa central", "JST": "hora estándar de Japón", "AST": "hora estándar del Atlántico", "CST": "hora estándar central", "HEOG": "hora de verano de Groenlandia occidental", "HKT": "hora estándar de Hong Kong", "CHADT": "hora de verano de Chatham", "OESZ": "hora de verano de Europa oriental", "HNNOMX": "hora estándar del noroeste de México", "MST": "hora estándar de las Montañas", "MDT": "hora de verano de las Montañas", "CHAST": "hora estándar de Chatham", "TMT": "hora estándar de Turkmenistán", "WEZ": "hora estándar de Europa occidental", "SAST": "hora de Sudáfrica", "GFT": "hora de la Guayana Francesa", "CAT": "hora de África central", "SGT": "hora de Singapur", "GYT": "hora de Guyana", "AWDT": "hora de verano de Australia occidental", "NZST": "hora estándar de Nueva Zelanda", "TMST": "hora de verano de Turkmenistán", "WART": "hora estándar de Argentina occidental", "GMT": "hora del meridiano de Greenwich", "HAST": "hora estándar de Hawái-Aleutiano", "ART": "hora estándar de Argentina", "HEPM": "hora de verano de San Pedro y Miquelón", "BOT": "hora de Bolivia", "HNPMX": "hora estándar del Pacífico de México", "MESZ": "hora de verano de Europa central", "NZDT": "hora de verano de Nueva Zelanda", "ChST": "hora estándar de Chamorro", "HNCU": "hora estándar de Cuba", "HECU": "hora de verano de Cuba", "EST": "hora estándar oriental", "EDT": "hora de verano oriental", "HNT": "hora estándar de Terranova", "AEST": "hora estándar de Australia oriental", "LHDT": "hora de verano de Lord Howe", "∅∅∅": "hora de verano del Amazonas", "COT": "hora estándar de Colombia", "OEZ": "hora estándar de Europa oriental", "UYST": "hora de verano de Uruguay", "VET": "hora de Venezuela", "WIT": "hora de Indonesia oriental", "PST": "hora estándar del Pacífico", "HAT": "hora de verano de Terranova", "WITA": "hora de Indonesia central", "CDT": "hora de verano central", "PDT": "hora de verano del Pacífico", "IST": "hora estándar de la India", "CLT": "hora estándar de Chile", "HEPMX": "hora de verano del Pacífico de México", "AKDT": "hora de verano de Alaska", "COST": "hora de verano de Colombia", "HENOMX": "hora de verano del noroeste de México", "ADT": "hora de verano del Atlántico", "HADT": "hora de verano de Hawái-Aleutiano", "ACWDT": "hora de verano de Australia centroccidental", "AWST": "hora estándar de Australia occidental", "LHST": "hora estándar de Lord Howe", "CLST": "hora de verano de Chile", "ARST": "hora de verano de Argentina", "WAST": "hora de verano de África occidental"}, -+ locale: "es_SV", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"a. m.", "p. m."}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"ART": "ART", "HADT": "HADT", "CDT": "CDT", "WAT": "WAT", "HAT": "HAT", "COT": "COT", "HNOG": "HNOG", "HAST": "HAST", "BT": "BT", "HECU": "HECU", "OESZ": "OESZ", "HKST": "HKST", "ECT": "ECT", "BOT": "BOT", "AEST": "AEST", "WESZ": "WESZ", "HEEG": "HEEG", "LHST": "LHST", "IST": "IST", "HEPMX": "HEPMX", "WIT": "WIT", "TMT": "TMT", "CLT": "CLT", "EAT": "EAT", "WITA": "WITA", "MST": "MST", "SRT": "SRT", "ACST": "ACST", "WAST": "WAST", "HNT": "HNT", "COST": "COST", "CAT": "CAT", "JST": "JST", "AWDT": "AWDT", "CHAST": "CHAST", "VET": "VET", "AKST": "AKST", "TMST": "TMST", "EDT": "EDT", "MESZ": "MESZ", "CHADT": "CHADT", "HNCU": "HNCU", "OEZ": "OEZ", "WIB": "WIB", "CST": "CST", "LHDT": "LHDT", "HNEG": "HNEG", "UYT": "UYT", "EST": "EST", "HKT": "HKT", "MDT": "MDT", "ARST": "ARST", "HENOMX": "HENOMX", "MYT": "MYT", "JDT": "JDT", "AWST": "AWST", "∅∅∅": "∅∅∅", "CLST": "CLST", "NZST": "NZST", "ChST": "ChST", "UYST": "UYST", "SAST": "SAST", "GMT": "GMT", "PST": "PST", "GFT": "GFT", "ACWST": "ACWST", "PDT": "PDT", "AST": "AST", "HEPM": "HEPM", "ACWDT": "ACWDT", "HNPM": "HNPM", "HNPMX": "HNPMX", "WARST": "WARST", "HEOG": "HEOG", "GYT": "GYT", "NZDT": "NZDT", "MEZ": "MEZ", "ACDT": "ACDT", "AEDT": "AEDT", "SGT": "SGT", "WEZ": "WEZ", "AKDT": "AKDT", "WART": "WART", "ADT": "ADT", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -126,7 +104,7 @@ func (es *es_SV) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_SV) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +114,7 @@ func (es *es_SV) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_SV) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +124,7 @@ func (es *es_SV) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_SV) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +170,13 @@ func (es *es_SV) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_SV' and handles both Whole and Real numbers based on 'v' - func (es *es_SV) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_SV' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_SV) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_SV' -@@ -268,56 +184,7 @@ func (es *es_SV) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_SV' -@@ -326,63 +193,7 @@ func (es *es_SV) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_SV' -@@ -390,17 +201,6 @@ func (es *es_SV) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +209,6 @@ func (es *es_SV) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +217,6 @@ func (es *es_SV) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +225,6 @@ func (es *es_SV) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,15 +233,6 @@ func (es *es_SV) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -489,22 +241,6 @@ func (es *es_SV) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -513,26 +249,6 @@ func (es *es_SV) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,32 +257,5 @@ func (es *es_SV) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_US/es_US.go b/es_US/es_US.go -index c04dc0b..e3209f7 100644 ---- a/es_US/es_US.go -+++ b/es_US/es_US.go -@@ -10,70 +10,48 @@ import ( - ) -  - type es_US struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'es_US' locale - func New() locales.Translator { - return &es_US{ -- locale: "es_US", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "lei", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, -- periodsAbbreviated: []string{"a. m.", "p. m."}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"WART": "hora estándar de Argentina occidental", "GMT": "hora del meridiano de Greenwich", "EDT": "hora de verano oriental", "UYT": "hora estándar de Uruguay", "HEPM": "hora de verano de San Pedro y Miquelón", "CHADT": "hora de verano de Chatham", "JDT": "hora de verano de Japón", "HNEG": "hora estándar de Groenlandia oriental", "HADT": "hora de verano de Hawái-Aleutiano", "ACWDT": "hora de verano de Australia centroccidental", "MESZ": "hora de verano de Europa central", "EAT": "hora de África oriental", "EST": "hora estándar oriental", "GYT": "hora de Guyana", "HNT": "hora estándar de Terranova", "AWDT": "hora de verano de Australia occidental", "TMT": "hora estándar de Turkmenistán", "WAST": "hora de verano de África occidental", "ACWST": "hora estándar de Australia centroccidental", "MEZ": "hora estándar de Europa central", "WEZ": "hora estándar de Europa occidental", "AST": "hora estándar del Atlántico", "HNPM": "hora estándar de San Pedro y Miquelón", "ACDT": "hora de verano de Australia central", "HECU": "hora de verano de Cuba", "HEPMX": "hora de verano del Pacífico de México", "WARST": "hora de verano de Argentina occidental", "HAST": "hora estándar de Hawái-Aleutiano", "PST": "hora estándar del Pacífico", "LHST": "hora estándar de Lord Howe", "NZDT": "hora de verano de Nueva Zelanda", "CHAST": "hora estándar de Chatham", "WAT": "hora estándar de África occidental", "JST": "hora estándar de Japón", "AWST": "hora estándar de Australia occidental", "NZST": "hora estándar de Nueva Zelanda", "IST": "hora estándar de la India", "CLST": "hora de verano de Chile", "AEDT": "hora de verano de Australia oriental", "BOT": "hora de Bolivia", "AKDT": "hora de verano de Alaska", "HNOG": "hora estándar de Groenlandia occidental", "WITA": "hora de Indonesia central", "WIB": "hora de Indonesia occidental", "HAT": "hora de verano de Terranova", "ARST": "hora de verano de Argentina", "AEST": "hora estándar de Australia oriental", "LHDT": "hora de verano de Lord Howe", "HEEG": "hora de verano de Groenlandia oriental", "HENOMX": "hora de verano del noroeste de México", "UYST": "hora de verano de Uruguay", "ART": "hora estándar de Argentina", "HEOG": "hora de verano de Groenlandia occidental", "PDT": "hora de verano del Pacífico", "HKT": "hora estándar de Hong Kong", "TMST": "hora de verano de Turkmenistán", "CAT": "hora de África central", "MDT": "Hora de verano de Macao", "CLT": "hora estándar de Chile", "MYT": "hora de Malasia", "OEZ": "hora estándar de Europa oriental", "HNNOMX": "hora estándar del noroeste de México", "HNCU": "hora estándar de Cuba", "CDT": "hora de verano central", "MST": "Hora estándar de Macao", "HNPMX": "hora estándar del Pacífico de México", "AKST": "hora estándar de Alaska", "WESZ": "hora de verano de Europa occidental", "HKST": "hora de verano de Hong Kong", "SAST": "hora de Sudáfrica", "ECT": "hora de Ecuador", "SGT": "hora de Singapur", "WIT": "hora de Indonesia oriental", "SRT": "hora de Surinam", "BT": "hora de Bután", "∅∅∅": "hora de verano del Amazonas", "GFT": "hora de la Guayana Francesa", "COT": "hora estándar de Colombia", "ADT": "hora de verano del Atlántico", "CST": "hora estándar central", "VET": "hora de Venezuela", "ChST": "hora de Chamorro", "ACST": "hora estándar de Australia central", "OESZ": "hora de verano de Europa oriental", "COST": "hora de verano de Colombia"}, -+ locale: "es_US", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "lei", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"a. m.", "p. m."}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"a. m.", "p. m."}, -+ timezones: map[string]string{"EDT": "EDT", "WIB": "WIB", "ADT": "ADT", "HNEG": "HNEG", "ACWST": "ACWST", "HECU": "HECU", "HEPMX": "HEPMX", "AKST": "AKST", "OESZ": "OESZ", "WARST": "WARST", "HKST": "HKST", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "UYST": "UYST", "BT": "BT", "SRT": "SRT", "VET": "VET", "BOT": "BOT", "ACDT": "ACDT", "CHADT": "CHADT", "WEZ": "WEZ", "SGT": "SGT", "HAT": "HAT", "AST": "AST", "JST": "JST", "JDT": "JDT", "∅∅∅": "∅∅∅", "GYT": "GYT", "COST": "COST", "MST": "MST", "UYT": "UYT", "HNCU": "HNCU", "CLT": "CLT", "ECT": "ECT", "CDT": "CDT", "MDT": "MDT", "HAST": "HAST", "LHST": "LHST", "CHAST": "CHAST", "GFT": "GFT", "HNOG": "HNOG", "SAST": "SAST", "HEEG": "HEEG", "AWST": "AWST", "AKDT": "AKDT", "WITA": "WITA", "NZST": "NZST", "ChST": "hora de Chamorro", "HADT": "HADT", "HEPM": "HEPM", "PDT": "PDT", "OEZ": "OEZ", "WART": "WART", "TMT": "TMT", "CST": "CST", "ARST": "ARST", "MEZ": "MEZ", "HNT": "HNT", "CAT": "CAT", "HENOMX": "HENOMX", "IST": "IST", "HEOG": "HEOG", "MYT": "MYT", "ACWDT": "ACWDT", "AEST": "AEST", "AEDT": "AEDT", "HKT": "HKT", "NZDT": "NZDT", "EAT": "EAT", "ACST": "ACST", "PST": "PST", "HNPMX": "HNPMX", "WAT": "WAT", "COT": "COT", "EST": "EST", "ART": "ART", "GMT": "GMT", "AWDT": "AWDT", "LHDT": "LHDT", "WAST": "WAST", "WESZ": "WESZ", "WIT": "WIT", "TMST": "TMST", "CLST": "CLST", "HNPM": "HNPM"}, - } - } -  -@@ -126,7 +104,7 @@ func (es *es_US) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (es *es_US) MonthsAbbreviated() []string { -- return es.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +114,7 @@ func (es *es_US) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_US) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +124,7 @@ func (es *es_US) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_US) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +170,13 @@ func (es *es_US) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_US' and handles both Whole and Real numbers based on 'v' - func (es *es_US) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_US' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_US) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_US' -@@ -268,56 +184,7 @@ func (es *es_US) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, es.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_US' -@@ -326,63 +193,7 @@ func (es *es_US) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, es.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, es.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, es.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, es.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'es_US' -@@ -390,17 +201,6 @@ func (es *es_US) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -409,17 +209,6 @@ func (es *es_US) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +217,6 @@ func (es *es_US) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,21 +225,6 @@ func (es *es_US) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/es_UY/es_UY.go b/es_UY/es_UY.go -index 0062cc0..be7564b 100644 ---- a/es_UY/es_UY.go -+++ b/es_UY/es_UY.go -@@ -18,7 +18,6 @@ type es_UY struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -52,30 +51,17 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "$", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositivePrefix: " ", - currencyNegativePrefix: "( ", - currencyNegativeSuffix: ")", - monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "set.", "oct.", "nov.", "dic."}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, - monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "setiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"ART": "hora estándar de Argentina", "HEOG": "hora de verano de Groenlandia occidental", "AWST": "hora estándar de Australia occidental", "MEZ": "hora estándar de Europa central", "COST": "hora de verano de Colombia", "UYST": "hora de verano de Uruguay", "COT": "hora estándar de Colombia", "MYT": "hora de Malasia", "AKDT": "hora de verano de Alaska", "AWDT": "hora de verano de Australia occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "HNNOMX": "hora estándar del noroeste de México", "EDT": "hora de verano oriental", "AEDT": "hora de verano de Australia oriental", "HKT": "hora estándar de Hong Kong", "MESZ": "hora de verano de Europa central", "HEEG": "hora de verano de Groenlandia oriental", "GFT": "hora de la Guayana Francesa", "EAT": "hora de África oriental", "OEZ": "hora estándar de Europa oriental", "WART": "hora estándar de Argentina occidental", "EST": "hora estándar oriental", "AST": "hora estándar del Atlántico", "ADT": "hora de verano del Atlántico", "HNEG": "hora estándar de Groenlandia oriental", "WAST": "hora de verano de África occidental", "SGT": "hora de Singapur", "WEZ": "hora estándar de Europa occidental", "WESZ": "hora de verano de Europa occidental", "ACWST": "hora estándar de Australia centroccidental", "TMT": "hora estándar de Turkmenistán", "ACDT": "hora de verano de Australia central", "ECT": "hora de Ecuador", "HECU": "hora de verano de Cuba", "CDT": "hora de verano central", "HKST": "hora de verano de Hong Kong", "JST": "hora estándar de Japón", "WARST": "hora de verano de Argentina occidental", "HNCU": "hora estándar de Cuba", "HEPMX": "hora de verano del Pacífico de México", "CST": "hora estándar central", "SRT": "hora de Surinam", "CLST": "hora de verano de Chile", "CAT": "hora de África central", "WIB": "hora de Indonesia occidental", "PST": "hora estándar del Pacífico", "ACWDT": "hora de verano de Australia centroccidental", "HAT": "hora de verano de Terranova", "LHST": "hora estándar de Lord Howe", "CHAST": "hora estándar de Chatham", "CHADT": "hora de verano de Chatham", "JDT": "hora de verano de Japón", "CLT": "hora estándar de Chile", "ACST": "hora estándar de Australia central", "HNPMX": "hora estándar del Pacífico de México", "AKST": "hora estándar de Alaska", "HAST": "hora estándar de Hawái-Aleutiano", "NZDT": "hora de verano de Nueva Zelanda", "BOT": "hora de Bolivia", "NZST": "hora estándar de Nueva Zelanda", "WAT": "hora estándar de África occidental", "GMT": "hora del meridiano de Greenwich", "GYT": "hora de Guyana", "WIT": "hora de Indonesia oriental", "AEST": "hora estándar de Australia oriental", "WITA": "hora de Indonesia central", "LHDT": "hora de verano de Lord Howe", "∅∅∅": "hora de verano del Amazonas", "MST": "Hora estándar de Macao", "HEPM": "hora de verano de San Pedro y Miquelón", "TMST": "hora de verano de Turkmenistán", "OESZ": "hora de verano de Europa oriental", "ARST": "hora de verano de Argentina", "HNOG": "hora estándar de Groenlandia occidental", "HNT": "hora estándar de Terranova", "SAST": "hora de Sudáfrica", "HENOMX": "hora de verano del noroeste de México", "UYT": "hora estándar de Uruguay", "VET": "hora de Venezuela", "BT": "hora de Bután", "PDT": "hora de verano del Pacífico", "IST": "hora estándar de la India", "ChST": "hora estándar de Chamorro", "MDT": "Hora de verano de Macao", "HADT": "hora de verano de Hawái-Aleutiano"}, -+ timezones: map[string]string{"VET": "VET", "CST": "CST", "MDT": "MDT", "WIB": "WIB", "PST": "PST", "HENOMX": "HENOMX", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "EDT": "EDT", "ARST": "ARST", "HAST": "HAST", "MST": "MST", "NZDT": "NZDT", "SRT": "SRT", "ACST": "ACST", "WAT": "WAT", "OESZ": "OESZ", "HNT": "HNT", "GYT": "GYT", "AWST": "AWST", "HNPM": "HNPM", "HEPM": "HEPM", "IST": "IST", "SAST": "SAST", "COST": "COST", "HEPMX": "HEPMX", "HAT": "HAT", "TMST": "TMST", "CLT": "CLT", "NZST": "NZST", "AST": "AST", "SGT": "SGT", "AKDT": "AKDT", "OEZ": "OEZ", "HEOG": "HEOG", "ECT": "ECT", "COT": "COT", "ADT": "ADT", "JDT": "JDT", "MYT": "MYT", "BT": "BT", "AEDT": "AEDT", "ACDT": "ACDT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "LHST": "LHST", "WEZ": "WEZ", "WITA": "WITA", "HADT": "HADT", "MEZ": "MEZ", "ACWST": "ACWST", "AKST": "AKST", "EAT": "EAT", "AWDT": "AWDT", "UYST": "UYST", "HEEG": "HEEG", "JST": "JST", "HECU": "HECU", "GFT": "GFT", "WARST": "WARST", "WIT": "WIT", "ChST": "ChST", "WAST": "WAST", "TMT": "TMT", "ACWDT": "ACWDT", "WESZ": "WESZ", "HNPMX": "HNPMX", "HKT": "HKT", "HKST": "HKST", "CHAST": "CHAST", "PDT": "PDT", "BOT": "BOT", "HNOG": "HNOG", "EST": "EST", "CLST": "CLST", "CDT": "CDT", "AEST": "AEST", "WART": "WART", "CAT": "CAT", "MESZ": "MESZ", "UYT": "UYT", "GMT": "GMT", "ART": "ART", "CHADT": "CHADT", "HNCU": "HNCU"}, - } - } -  -@@ -138,7 +124,7 @@ func (es *es_UY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (es *es_UY) MonthsNarrow() []string { -- return es.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -194,75 +180,13 @@ func (es *es_UY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_UY' and handles both Whole and Real numbers based on 'v' - func (es *es_UY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_UY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_UY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_UY' -@@ -270,7 +194,7 @@ func (es *es_UY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -332,7 +256,7 @@ func (es *es_UY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 5 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -407,17 +331,6 @@ func (es *es_UY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -426,17 +339,6 @@ func (es *es_UY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -445,19 +347,6 @@ func (es *es_UY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,21 +355,6 @@ func (es *es_UY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,15 +363,6 @@ func (es *es_UY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -506,22 +371,6 @@ func (es *es_UY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -530,26 +379,6 @@ func (es *es_UY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -558,32 +387,5 @@ func (es *es_UY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, es.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := es.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/es_VE/es_VE.go b/es_VE/es_VE.go -index 4a01d09..1254a18 100644 ---- a/es_VE/es_VE.go -+++ b/es_VE/es_VE.go -@@ -18,7 +18,6 @@ type es_VE struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,27 +48,15 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "Bs.", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - monthsAbbreviated: []string{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."}, - monthsNarrow: []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}, -- daysAbbreviated: []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, - daysShort: []string{"Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"}, -- daysWide: []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"}, - periodsAbbreviated: []string{"a. m.", "p. m."}, - periodsNarrow: []string{"a. m.", "p. m."}, - periodsWide: []string{"a. m.", "p. m."}, -- erasAbbreviated: []string{"a. C.", "d. C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "después de Cristo"}, -- timezones: map[string]string{"WESZ": "hora de verano de Europa occidental", "TMST": "hora de verano de Turkmenistán", "ECT": "hora de Ecuador", "HNNOMX": "hora estándar del noroeste de México", "HNCU": "hora estándar de Cuba", "HNT": "hora estándar de Terranova", "AEST": "hora estándar de Australia oriental", "AEDT": "hora de verano de Australia oriental", "WAT": "hora estándar de África occidental", "COT": "hora estándar de Colombia", "HAST": "hora estándar de Hawái-Aleutiano", "ACWST": "hora estándar de Australia centroccidental", "ACWDT": "hora de verano de Australia centroccidental", "UYT": "hora estándar de Uruguay", "ARST": "hora de verano de Argentina", "HNOG": "hora estándar de Groenlandia occidental", "JDT": "hora de verano de Japón", "WART": "hora estándar de Argentina occidental", "COST": "hora de verano de Colombia", "CDT": "hora de verano central", "AWDT": "hora de verano de Australia occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "∅∅∅": "hora de verano del Amazonas", "HECU": "hora de verano de Cuba", "GYT": "hora de Guyana", "CST": "hora estándar central", "HEOG": "hora de verano de Groenlandia occidental", "OESZ": "hora de verano de Europa oriental", "EDT": "hora de verano oriental", "HNPMX": "hora estándar del Pacífico de México", "ADT": "hora de verano del Atlántico", "AKDT": "hora de verano de Alaska", "HAT": "hora de verano de Terranova", "WITA": "hora de Indonesia central", "MESZ": "hora de verano de Europa central", "JST": "hora estándar de Japón", "GMT": "hora del meridiano de Greenwich", "AST": "hora estándar del Atlántico", "PST": "hora estándar del Pacífico", "HEPM": "hora de verano de San Pedro y Miquelón", "LHDT": "hora de verano de Lord Howe", "NZST": "hora estándar de Nueva Zelanda", "CHAST": "hora estándar de Chatham", "EST": "hora estándar oriental", "WIB": "hora de Indonesia occidental", "HADT": "hora de verano de Hawái-Aleutiano", "WIT": "hora de Indonesia oriental", "WEZ": "hora estándar de Europa occidental", "BOT": "hora de Bolivia", "HNEG": "hora estándar de Groenlandia oriental", "CAT": "hora de África central", "HENOMX": "hora de verano del noroeste de México", "MYT": "hora de Malasia", "UYST": "hora de verano de Uruguay", "LHST": "hora estándar de Lord Howe", "CLT": "hora estándar de Chile", "CLST": "hora de verano de Chile", "TMT": "hora estándar de Turkmenistán", "ACST": "hora estándar de Australia central", "ACDT": "hora de verano de Australia central", "AKST": "hora estándar de Alaska", "VET": "hora de Venezuela", "HKT": "hora estándar de Hong Kong", "NZDT": "hora de verano de Nueva Zelanda", "CHADT": "hora de verano de Chatham", "IST": "hora estándar de la India", "BT": "hora de Bután", "HEEG": "hora de verano de Groenlandia oriental", "WAST": "hora de verano de África occidental", "WARST": "hora de verano de Argentina occidental", "SGT": "hora de Singapur", "MDT": "Hora de verano de Macao", "PDT": "hora de verano del Pacífico", "AWST": "hora estándar de Australia occidental", "SAST": "hora de Sudáfrica", "ChST": "hora estándar de Chamorro", "GFT": "hora de la Guayana Francesa", "EAT": "hora de África oriental", "ART": "hora estándar de Argentina", "MEZ": "hora estándar de Europa central", "OEZ": "hora estándar de Europa oriental", "HKST": "hora de verano de Hong Kong", "MST": "Hora estándar de Macao", "HEPMX": "hora de verano del Pacífico de México", "SRT": "hora de Surinam"}, -+ timezones: map[string]string{"JST": "JST", "HNOG": "HNOG", "SAST": "SAST", "HADT": "HADT", "HNEG": "HNEG", "VET": "VET", "AKST": "AKST", "WIB": "WIB", "ACWDT": "ACWDT", "PDT": "PDT", "CDT": "CDT", "MDT": "MDT", "HNPM": "HNPM", "AWST": "AWST", "WAT": "WAT", "WART": "WART", "CLT": "CLT", "CST": "CST", "MESZ": "MESZ", "HECU": "HECU", "∅∅∅": "∅∅∅", "GFT": "GFT", "NZST": "NZST", "ARST": "ARST", "SGT": "SGT", "HKT": "HKT", "ECT": "ECT", "AST": "AST", "HEPM": "HEPM", "MST": "MST", "ART": "ART", "HAST": "HAST", "HEEG": "HEEG", "AKDT": "AKDT", "OESZ": "OESZ", "WIT": "WIT", "NZDT": "NZDT", "MYT": "MYT", "HNPMX": "HNPMX", "CHADT": "CHADT", "BT": "BT", "IST": "IST", "CAT": "CAT", "WITA": "WITA", "HENOMX": "HENOMX", "LHDT": "LHDT", "EST": "EST", "MEZ": "MEZ", "WESZ": "WESZ", "GYT": "GYT", "EDT": "EDT", "BOT": "BOT", "AWDT": "AWDT", "WAST": "WAST", "OEZ": "OEZ", "HAT": "HAT", "COT": "COT", "HEPMX": "HEPMX", "AEST": "AEST", "WEZ": "WEZ", "TMT": "TMT", "ADT": "ADT", "HNNOMX": "HNNOMX", "LHST": "LHST", "HNCU": "HNCU", "COST": "COST", "ACWST": "ACWST", "AEDT": "AEDT", "CHAST": "CHAST", "HKST": "HKST", "EAT": "EAT", "UYT": "UYT", "HNT": "HNT", "TMST": "TMST", "JDT": "JDT", "UYST": "UYST", "PST": "PST", "CLST": "CLST", "ChST": "ChST", "GMT": "GMT", "SRT": "SRT", "WARST": "WARST", "HEOG": "HEOG", "ACST": "ACST", "ACDT": "ACDT"}, - } - } -  -@@ -142,7 +129,7 @@ func (es *es_VE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (es *es_VE) MonthsWide() []string { -- return es.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +175,13 @@ func (es *es_VE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'es_VE' and handles both Whole and Real numbers based on 'v' - func (es *es_VE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, es.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'es_VE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (es *es_VE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, es.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, es.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, es.percentSuffix...) -- -- b = append(b, es.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_VE' -@@ -264,7 +189,7 @@ func (es *es_VE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -322,7 +247,7 @@ func (es *es_VE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := es.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -387,17 +312,6 @@ func (es *es_VE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +320,6 @@ func (es *es_VE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,19 +328,6 @@ func (es *es_VE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,21 +336,6 @@ func (es *es_VE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, es.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, es.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/et/et.go b/et/et.go -index d183b7d..09e3abb 100644 ---- a/et/et.go -+++ b/et/et.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"eKr", "pKr"}, - erasNarrow: []string{"eKr", "pKr"}, - erasWide: []string{"enne Kristust", "pärast Kristust"}, -- timezones: map[string]string{"TMST": "Türkmenistani suveaeg", "COT": "Colombia standardaeg", "HENOMX": "Loode-Mehhiko suveaeg", "WITA": "Kesk-Indoneesia aeg", "JDT": "Jaapani suveaeg", "EAT": "Ida-Aafrika aeg", "WART": "Lääne-Argentina standardaeg", "WARST": "Lääne-Argentina suveaeg", "NZST": "Uus-Meremaa standardaeg", "∅∅∅": "Amazonase suveaeg", "ACDT": "Kesk-Austraalia suveaeg", "ECT": "Ecuadori aeg", "CHADT": "Chathami suveaeg", "VET": "Venezuela aeg", "ART": "Argentina standardaeg", "AWST": "Lääne-Austraalia standardaeg", "AWDT": "Lääne-Austraalia suveaeg", "MEZ": "Kesk-Euroopa standardaeg", "EDT": "Idaranniku suveaeg", "UYST": "Uruguay suveaeg", "WESZ": "Lääne-Euroopa suveaeg", "MESZ": "Kesk-Euroopa suveaeg", "COST": "Colombia suveaeg", "MST": "Mäestikuvööndi standardaeg", "ACWST": "Kesk-Lääne Austraalia standardaeg", "CLT": "Tšiili standardaeg", "HEEG": "Ida-Gröönimaa suveaeg", "UYT": "Uruguay standardaeg", "ACWDT": "Kesk-Lääne Austraalia suveaeg", "CHAST": "Chathami standardaeg", "SGT": "Singapuri standardaeg", "HADT": "Hawaii-Aleuudi suveaeg", "WIB": "Lääne-Indoneesia aeg", "HAST": "Hawaii-Aleuudi standardaeg", "HEOG": "Lääne-Gröönimaa suveaeg", "PST": "Vaikse ookeani standardaeg", "IST": "India aeg", "GMT": "Greenwichi aeg", "AKDT": "Alaska suveaeg", "LHDT": "Lord Howe’i suveaeg", "JST": "Jaapani standardaeg", "BOT": "Boliivia aeg", "WAT": "Lääne-Aafrika standardaeg", "OESZ": "Ida-Euroopa suveaeg", "HNCU": "Kuuba standardaeg", "CST": "Kesk-Ameerika standardaeg", "AKST": "Alaska standardaeg", "CDT": "Kesk-Ameerika suveaeg", "HNOG": "Lääne-Gröönimaa standardaeg", "LHST": "Lord Howe’i standardaeg", "SAST": "Lõuna-Aafrika standardaeg", "AST": "Atlandi standardaeg", "MYT": "Malaisia \u200b\u200baeg", "WIT": "Ida-Indoneesia aeg", "HAT": "Newfoundlandi suveaeg", "HKST": "Hongkongi suveaeg", "CLST": "Tšiili suveaeg", "TMT": "Türkmenistani standardaeg", "CAT": "Kesk-Aafrika aeg", "GYT": "Guyana aeg", "HECU": "Kuuba suveaeg", "EST": "Idaranniku standardaeg", "WAST": "Lääne-Aafrika suveaeg", "SRT": "Suriname aeg", "PDT": "Vaikse ookeani suveaeg", "WEZ": "Lääne-Euroopa standardaeg", "GFT": "Prantsuse Guajaana aeg", "HNPMX": "Mehhiko Vaikse ookeani standardaeg", "ADT": "Atlandi suveaeg", "HNNOMX": "Loode-Mehhiko standardaeg", "HNT": "Newfoundlandi standardaeg", "HNPM": "Saint-Pierre’i ja Miqueloni standardaeg", "NZDT": "Uus-Meremaa suveaeg", "ARST": "Argentina suveaeg", "AEST": "Ida-Austraalia standardaeg", "AEDT": "Ida-Austraalia suveaeg", "HKT": "Hongkongi standardaeg", "HEPM": "Saint-Pierre’i ja Miqueloni suveaeg", "BT": "Bhutani aeg", "ChST": "Tšamorro standardaeg", "HNEG": "Ida-Gröönimaa standardaeg", "ACST": "Kesk-Austraalia standardaeg", "OEZ": "Ida-Euroopa standardaeg", "HEPMX": "Mehhiko Vaikse ookeani suveaeg", "MDT": "Mäestikuvööndi suveaeg"}, -+ timezones: map[string]string{"SRT": "Suriname aeg", "MESZ": "Kesk-Euroopa suveaeg", "CDT": "Kesk-Ameerika suveaeg", "AEDT": "Ida-Austraalia suveaeg", "ART": "Argentina standardaeg", "HNEG": "Ida-Gröönimaa standardaeg", "HEEG": "Ida-Gröönimaa suveaeg", "JST": "Jaapani standardaeg", "∅∅∅": "Acre suveaeg", "HNPMX": "Mehhiko Vaikse ookeani standardaeg", "HAT": "Newfoundlandi suveaeg", "ARST": "Argentina suveaeg", "NZDT": "Uus-Meremaa suveaeg", "HNNOMX": "Loode-Mehhiko standardaeg", "CHAST": "Chathami standardaeg", "AEST": "Ida-Austraalia standardaeg", "WIB": "Lääne-Indoneesia aeg", "AWST": "Lääne-Austraalia standardaeg", "AWDT": "Lääne-Austraalia suveaeg", "LHDT": "Lord Howe’i suveaeg", "COST": "Colombia suveaeg", "WITA": "Kesk-Indoneesia aeg", "ECT": "Ecuadori aeg", "BOT": "Boliivia aeg", "ACWST": "Kesk-Lääne Austraalia standardaeg", "HECU": "Kuuba suveaeg", "HEPMX": "Mehhiko Vaikse ookeani suveaeg", "HNT": "Newfoundlandi standardaeg", "SAST": "Lõuna-Aafrika standardaeg", "HEOG": "Lääne-Gröönimaa suveaeg", "HKST": "Hongkongi suveaeg", "HAST": "Hawaii-Aleuudi standardaeg", "MEZ": "Kesk-Euroopa standardaeg", "HENOMX": "Loode-Mehhiko suveaeg", "PDT": "Vaikse ookeani suveaeg", "WAT": "Lääne-Aafrika standardaeg", "CLST": "Tšiili suveaeg", "HKT": "Hongkongi standardaeg", "CAT": "Kesk-Aafrika aeg", "ACDT": "Kesk-Austraalia suveaeg", "VET": "Venezuela aeg", "OESZ": "Ida-Euroopa suveaeg", "GFT": "Prantsuse Guajaana aeg", "EDT": "Idaranniku suveaeg", "MYT": "Malaisia \u200b\u200baeg", "GYT": "Guyana aeg", "CST": "Kesk-Ameerika standardaeg", "NZST": "Uus-Meremaa standardaeg", "ACWDT": "Kesk-Lääne Austraalia suveaeg", "WEZ": "Lääne-Euroopa standardaeg", "WART": "Lääne-Argentina standardaeg", "WIT": "Ida-Indoneesia aeg", "CLT": "Tšiili standardaeg", "HADT": "Hawaii-Aleuudi suveaeg", "LHST": "Lord Howe’i standardaeg", "UYT": "Uruguay standardaeg", "UYST": "Uruguay suveaeg", "HNCU": "Kuuba standardaeg", "ACST": "Kesk-Austraalia standardaeg", "CHADT": "Chathami suveaeg", "IST": "India aeg", "AST": "Atlandi standardaeg", "ADT": "Atlandi suveaeg", "GMT": "Greenwichi aeg", "MST": "Mäestikuvööndi standardaeg", "MDT": "Mäestikuvööndi suveaeg", "TMST": "Türkmenistani suveaeg", "EST": "Idaranniku standardaeg", "HNPM": "Saint-Pierre’i ja Miqueloni standardaeg", "AKST": "Alaska standardaeg", "WARST": "Lääne-Argentina suveaeg", "COT": "Colombia standardaeg", "HNOG": "Lääne-Gröönimaa standardaeg", "ChST": "Tšamorro standardaeg", "EAT": "Ida-Aafrika aeg", "JDT": "Jaapani suveaeg", "AKDT": "Alaska suveaeg", "OEZ": "Ida-Euroopa standardaeg", "WAST": "Lääne-Aafrika suveaeg", "TMT": "Türkmenistani standardaeg", "HEPM": "Saint-Pierre’i ja Miqueloni suveaeg", "PST": "Vaikse ookeani standardaeg", "BT": "Bhutani aeg", "WESZ": "Lääne-Euroopa suveaeg", "SGT": "Singapuri standardaeg"}, - } - } -  -diff --git a/et_EE/et_EE.go b/et_EE/et_EE.go -index 40ae0a8..a4f6594 100644 ---- a/et_EE/et_EE.go -+++ b/et_EE/et_EE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type et_EE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'et_EE' locale - func New() locales.Translator { - return &et_EE{ -- locale: "et_EE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jaan", "veebr", "märts", "apr", "mai", "juuni", "juuli", "aug", "sept", "okt", "nov", "dets"}, -- monthsNarrow: []string{"", "J", "V", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "jaanuar", "veebruar", "märts", "aprill", "mai", "juuni", "juuli", "august", "september", "oktoober", "november", "detsember"}, -- daysAbbreviated: []string{"P", "E", "T", "K", "N", "R", "L"}, -- daysNarrow: []string{"P", "E", "T", "K", "N", "R", "L"}, -- daysShort: []string{"P", "E", "T", "K", "N", "R", "L"}, -- daysWide: []string{"pühapäev", "esmaspäev", "teisipäev", "kolmapäev", "neljapäev", "reede", "laupäev"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"eKr", "pKr"}, -- erasNarrow: []string{"eKr", "pKr"}, -- erasWide: []string{"enne Kristust", "pärast Kristust"}, -- timezones: map[string]string{"MYT": "Malaisia \u200b\u200baeg", "AWST": "Lääne-Austraalia standardaeg", "TMST": "Türkmenistani suveaeg", "ADT": "Atlandi suveaeg", "ACST": "Kesk-Austraalia standardaeg", "ACDT": "Kesk-Austraalia suveaeg", "WAT": "Lääne-Aafrika standardaeg", "ECT": "Ecuadori aeg", "HENOMX": "Loode-Mehhiko suveaeg", "HNOG": "Lääne-Gröönimaa standardaeg", "HKT": "Hongkongi standardaeg", "JDT": "Jaapani suveaeg", "SGT": "Singapuri standardaeg", "HECU": "Kuuba suveaeg", "GYT": "Guyana aeg", "MEZ": "Kesk-Euroopa standardaeg", "∅∅∅": "Amazonase suveaeg", "OEZ": "Ida-Euroopa standardaeg", "WIT": "Ida-Indoneesia aeg", "BT": "Bhutani aeg", "CHADT": "Chathami suveaeg", "GFT": "Prantsuse Guajaana aeg", "EDT": "Idaranniku suveaeg", "ARST": "Argentina suveaeg", "WITA": "Kesk-Indoneesia aeg", "LHDT": "Lord Howe’i suveaeg", "CLST": "Tšiili suveaeg", "HNNOMX": "Loode-Mehhiko standardaeg", "UYT": "Uruguay standardaeg", "SRT": "Suriname aeg", "ACWDT": "Kesk-Lääne Austraalia suveaeg", "AEST": "Ida-Austraalia standardaeg", "HEPMX": "Mehhiko Vaikse ookeani suveaeg", "WESZ": "Lääne-Euroopa suveaeg", "HAT": "Newfoundlandi suveaeg", "HEEG": "Ida-Gröönimaa suveaeg", "HEPM": "Saint-Pierre’i ja Miqueloni suveaeg", "ChST": "Tšamorro standardaeg", "GMT": "Greenwichi aeg", "MDT": "MDT", "UYST": "Uruguay suveaeg", "WIB": "Lääne-Indoneesia aeg", "IST": "India aeg", "EAT": "Ida-Aafrika aeg", "COST": "Colombia suveaeg", "AKDT": "Alaska suveaeg", "CDT": "Kesk-Ameerika suveaeg", "HNPM": "Saint-Pierre’i ja Miqueloni standardaeg", "WAST": "Lääne-Aafrika suveaeg", "EST": "Idaranniku standardaeg", "PST": "Vaikse ookeani standardaeg", "AKST": "Alaska standardaeg", "CST": "Kesk-Ameerika standardaeg", "PDT": "Vaikse ookeani suveaeg", "HKST": "Hongkongi suveaeg", "CHAST": "Chathami standardaeg", "MESZ": "Kesk-Euroopa suveaeg", "WART": "Lääne-Argentina standardaeg", "HADT": "Hawaii-Aleuudi suveaeg", "HNT": "Newfoundlandi standardaeg", "ART": "Argentina standardaeg", "HNCU": "Kuuba standardaeg", "VET": "Venezuela aeg", "HEOG": "Lääne-Gröönimaa suveaeg", "AWDT": "Lääne-Austraalia suveaeg", "HNPMX": "Mehhiko Vaikse ookeani standardaeg", "NZST": "Uus-Meremaa standardaeg", "SAST": "Lõuna-Aafrika standardaeg", "TMT": "Türkmenistani standardaeg", "COT": "Colombia standardaeg", "MST": "MST", "AST": "Atlandi standardaeg", "WEZ": "Lääne-Euroopa standardaeg", "LHST": "Lord Howe’i standardaeg", "CAT": "Kesk-Aafrika aeg", "HNEG": "Ida-Gröönimaa standardaeg", "OESZ": "Ida-Euroopa suveaeg", "HAST": "Hawaii-Aleuudi standardaeg", "AEDT": "Ida-Austraalia suveaeg", "JST": "Jaapani standardaeg", "BOT": "Boliivia aeg", "WARST": "Lääne-Argentina suveaeg", "ACWST": "Kesk-Lääne Austraalia standardaeg", "NZDT": "Uus-Meremaa suveaeg", "CLT": "Tšiili standardaeg"}, -+ locale: "et_EE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAST": "WAST", "HAT": "HAT", "HEOG": "HEOG", "ECT": "ECT", "ACWST": "ACWST", "OESZ": "OESZ", "HNT": "HNT", "HKT": "HKT", "TMST": "TMST", "CAT": "CAT", "WIB": "WIB", "WARST": "WARST", "CHADT": "CHADT", "JST": "JST", "AEDT": "AEDT", "SGT": "SGT", "EST": "EST", "EDT": "EDT", "WITA": "WITA", "SRT": "SRT", "MEZ": "MEZ", "JDT": "JDT", "LHDT": "LHDT", "PDT": "PDT", "GFT": "GFT", "CST": "CST", "AWDT": "AWDT", "HEPMX": "HEPMX", "SAST": "SAST", "HNOG": "HNOG", "ARST": "ARST", "ACST": "ACST", "COT": "COT", "TMT": "TMT", "MST": "MST", "AWST": "AWST", "LHST": "LHST", "CHAST": "CHAST", "CLST": "CLST", "ChST": "ChST", "BOT": "BOT", "EAT": "EAT", "MESZ": "MESZ", "MYT": "MYT", "IST": "IST", "HNCU": "HNCU", "HECU": "HECU", "CDT": "CDT", "GMT": "GMT", "HNPM": "HNPM", "AEST": "AEST", "PST": "PST", "AKST": "AKST", "ADT": "ADT", "HNPMX": "HNPMX", "WAT": "WAT", "WART": "WART", "GYT": "GYT", "HKST": "HKST", "HENOMX": "HENOMX", "NZDT": "NZDT", "AST": "AST", "UYST": "UYST", "NZST": "NZST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "WIT": "WIT", "COST": "COST", "CLT": "CLT", "HADT": "HADT", "HEEG": "HEEG", "HEPM": "HEPM", "ACWDT": "ACWDT", "WEZ": "WEZ", "WESZ": "WESZ", "VET": "VET", "ART": "ART", "HAST": "HAST", "ACDT": "ACDT", "UYT": "UYT", "BT": "BT", "AKDT": "AKDT", "MDT": "MDT"}, - } - } -  -@@ -127,7 +102,7 @@ func (et *et_EE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (et *et_EE) MonthsAbbreviated() []string { -- return et.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -137,7 +112,7 @@ func (et *et_EE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (et *et_EE) MonthsNarrow() []string { -- return et.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -147,7 +122,7 @@ func (et *et_EE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (et *et_EE) MonthsWide() []string { -- return et.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,79 +168,13 @@ func (et *et_EE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'et_EE' and handles both Whole and Real numbers based on 'v' - func (et *et_EE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, et.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(et.group) - 1; j >= 0; j-- { -- b = append(b, et.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(et.minus) - 1; j >= 0; j-- { -- b = append(b, et.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'et_EE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (et *et_EE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, et.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(et.minus) - 1; j >= 0; j-- { -- b = append(b, et.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, et.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'et_EE' -@@ -273,60 +182,7 @@ func (et *et_EE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := et.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, et.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(et.group) - 1; j >= 0; j-- { -- b = append(b, et.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(et.minus) - 1; j >= 0; j-- { -- b = append(b, et.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, et.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, et.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'et_EE' -@@ -335,65 +191,7 @@ func (et *et_EE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := et.currencies[currency] -- l := len(s) + len(symbol) + 8 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, et.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(et.group) - 1; j >= 0; j-- { -- b = append(b, et.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, et.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, et.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, et.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, et.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'et_EE' -@@ -401,27 +199,6 @@ func (et *et_EE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -430,17 +207,6 @@ func (et *et_EE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, et.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,17 +215,6 @@ func (et *et_EE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, et.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -468,19 +223,6 @@ func (et *et_EE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, et.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, et.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,19 +231,6 @@ func (et *et_EE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -510,26 +239,6 @@ func (et *et_EE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -538,30 +247,6 @@ func (et *et_EE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -570,34 +255,5 @@ func (et *et_EE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, et.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := et.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/eu/eu.go b/eu/eu.go -index 558a824..53de889 100644 ---- a/eu/eu.go -+++ b/eu/eu.go -@@ -75,7 +75,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"K.a.", "K.o."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"K.a.", "Kristo ondoren"}, -- timezones: map[string]string{"HADT": "Hawaii-Aleutiar uharteetako udako ordutegia", "TMST": "Turkmenistango udako ordua", "OESZ": "Europa ekialdeko udako ordua", "HENOMX": "Mexikoko ipar-ekialdeko udako ordutegia", "AKDT": "Alaskako udako ordutegia", "ChST": "Chamorroko ordu estandarra", "HNEG": "Groenlandia ekialdeko ordutegi estandarra", "GYT": "Guyanako ordua", "TMT": "Turkmenistango ordu estandarra", "UYT": "Uruguayko ordu estandarra", "PST": "Ipar Amerikako Pazifikoko ordutegi estandarra", "UYST": "Uruguayko udako ordua", "LHDT": "Lord Howeko udako ordua", "CHADT": "Chathamgo udako ordua", "ECT": "Ekuadorreko ordua", "WARST": "Argentina mendebaldeko udako ordutegia", "ACWDT": "Australia erdi-mendebaldeko udako ordua", "HNT": "Ternuako ordutegi estandarra", "CLT": "Txileko ordu estandarra", "WIB": "Indonesia mendebaldeko ordua", "WIT": "Indonesia ekialdeko ordua", "PDT": "Ipar Amerikako Pazifikoko udako ordutegia", "MDT": "MDT", "ADT": "Atlantikoko udako ordutegia", "HAST": "Hawaii-Aleutiar uharteetako ordutegi estandarra", "BT": "Bhutango ordua", "LHST": "Lord Howeko ordu estandarra", "NZDT": "Zeelanda Berriko udako ordua", "CLST": "Txileko udako ordua", "WART": "Argentina mendebaldeko ordutegia estandarra", "HECU": "Kubako udako ordutegia", "AST": "Atlantikoko ordutegi estandarra", "HEOG": "Groenlandia mendebaldeko udako ordutegia", "MESZ": "Europa erdialdeko udako ordua", "CAT": "Afrika erdialdeko ordua", "WAT": "Afrika mendebaldeko ordu estandarra", "WAST": "Afrika mendebaldeko udako ordua", "EST": "Ipar Amerikako ekialdeko ordutegi estandarra", "CDT": "Ipar Amerikako erdialdeko udako ordutegia", "AEDT": "Australia ekialdeko udako ordua", "HEPMX": "Mexikoko Pazifikoko udako ordutegia", "HAT": "Ternuako udako ordutegia", "CHAST": "Chathamgo ordu estandarra", "JDT": "Japoniako udako ordua", "OEZ": "Europa ekialdeko ordu estandarra", "MST": "MST", "COT": "Kolonbiako ordu estandarra", "EDT": "Ipar Amerikako ekialdeko udako ordutegia", "ARST": "Argentinako udako ordutegia", "GMT": "Greenwich meridianoko ordua", "AWST": "Australia mendebaldeko ordu estandarra", "HNPM": "Saint-Pierre eta Mikeluneko ordutegi estandarra", "NZST": "Zeelanda Berriko ordu estandarra", "ACST": "Australia erdialdeko ordu estandarra", "EAT": "Afrika ekialdeko ordua", "MYT": "Malaysiako ordua", "VET": "Venezuelako ordua", "WEZ": "Europa mendebaldeko ordu estandarra", "HKT": "Hong Kongo ordu estandarra", "SRT": "Surinamgo ordua", "WESZ": "Europa mendebaldeko udako ordua", "HNOG": "Groenlandia mendebaldeko ordutegi estandarra", "AWDT": "Australia mendebaldeko udako ordua", "MEZ": "Europa erdialdeko ordu estandarra", "IST": "Indiako ordua", "∅∅∅": "Amazoniako udako ordutegia", "AKST": "Alaskako ordutegi estandarra", "ACWST": "Australia erdi-mendebaldeko ordu estandarra", "ART": "Argentinako ordutegi estandarra", "AEST": "Australia ekialdeko ordu estandarra", "HKST": "Hong Kongo udako ordua", "SAST": "Afrika hegoaldeko ordua", "SGT": "Singapurreko ordu estandarra", "HNPMX": "Mexikoko Pazifikoko ordutegi estandarra", "CST": "Ipar Amerikako erdialdeko ordu estandarra", "WITA": "Indonesia erdialdeko ordua", "COST": "Kolonbiako udako ordua", "HEPM": "Saint-Pierre eta Mikeluneko udako ordutegia", "BOT": "Boliviako ordutegia", "HEEG": "Groenlandia ekialdeko udako ordutegia", "ACDT": "Australia erdialdeko udako ordua", "JST": "Japoniako ordu estandarra", "GFT": "Guyana Frantseseko ordua", "HNNOMX": "Mexikoko ipar-ekialdeko ordutegi estandarra", "HNCU": "Kubako ordutegi estandarra"}, -+ timezones: map[string]string{"GMT": "Greenwich meridianoko ordua", "ARST": "Argentinako udako ordutegia", "HADT": "Hawaii-Aleutiar uharteetako udako ordutegia", "JDT": "Japoniako udako ordua", "UYT": "Uruguayko ordu estandarra", "WAST": "Afrika mendebaldeko udako ordua", "ADT": "Atlantikoko udako ordutegia", "NZDT": "Zeelanda Berriko udako ordua", "ACST": "Australia erdialdeko ordu estandarra", "AKDT": "Alaskako udako ordutegia", "WITA": "Indonesia erdialdeko ordua", "CLST": "Txileko udako ordua", "WESZ": "Europa mendebaldeko udako ordua", "HNCU": "Kubako ordutegi estandarra", "WIB": "Indonesia mendebaldeko ordua", "ChST": "Chamorroko ordu estandarra", "AWDT": "Australia mendebaldeko udako ordua", "PST": "Ipar Amerikako Pazifikoko ordutegi estandarra", "BT": "Bhutango ordua", "CST": "Ipar Amerikako erdialdeko ordu estandarra", "ECT": "Ekuadorreko ordua", "AWST": "Australia mendebaldeko ordu estandarra", "LHST": "Lord Howeko ordu estandarra", "EDT": "Ipar Amerikako ekialdeko udako ordutegia", "TMT": "Turkmenistango ordu estandarra", "AEST": "Australia ekialdeko ordu estandarra", "MYT": "Malaysiako ordua", "HEPM": "Saint-Pierre eta Mikeluneko udako ordutegia", "ACDT": "Australia erdialdeko udako ordua", "WARST": "Argentina mendebaldeko udako ordutegia", "CLT": "Txileko ordu estandarra", "HEOG": "Groenlandia mendebaldeko udako ordutegia", "HKST": "Hong Kongo udako ordua", "CDT": "Ipar Amerikako erdialdeko udako ordutegia", "BOT": "Boliviako ordutegia", "JST": "Japoniako ordu estandarra", "PDT": "Ipar Amerikako Pazifikoko udako ordutegia", "GFT": "Guyana Frantseseko ordua", "GYT": "Guyanako ordua", "ACWST": "Australia erdi-mendebaldeko ordu estandarra", "NZST": "Zeelanda Berriko ordu estandarra", "SGT": "Singapurreko ordu estandarra", "SAST": "Afrika hegoaldeko ordua", "WIT": "Indonesia ekialdeko ordua", "COT": "Kolonbiako ordu estandarra", "AST": "Atlantikoko ordutegi estandarra", "ART": "Argentinako ordutegi estandarra", "SRT": "Surinamgo ordua", "EAT": "Afrika ekialdeko ordua", "VET": "Venezuelako ordua", "HECU": "Kubako udako ordutegia", "HENOMX": "Mexikoko ipar-ekialdeko udako ordutegia", "CHAST": "Chathamgo ordu estandarra", "UYST": "Uruguayko udako ordua", "HNEG": "Groenlandia ekialdeko ordutegi estandarra", "HNNOMX": "Mexikoko ipar-ekialdeko ordutegi estandarra", "HAST": "Hawaii-Aleutiar uharteetako ordutegi estandarra", "LHDT": "Lord Howeko udako ordua", "ACWDT": "Australia erdi-mendebaldeko udako ordua", "HAT": "Ternuako udako ordutegia", "MST": "MST", "OESZ": "Europa ekialdeko udako ordua", "WART": "Argentina mendebaldeko ordutegia estandarra", "MESZ": "Europa erdialdeko udako ordua", "WEZ": "Europa mendebaldeko ordu estandarra", "WAT": "Afrika mendebaldeko ordu estandarra", "COST": "Kolonbiako udako ordua", "AEDT": "Australia ekialdeko udako ordua", "EST": "Ipar Amerikako ekialdeko ordutegi estandarra", "HKT": "Hong Kongo ordu estandarra", "TMST": "Turkmenistango udako ordua", "MDT": "MDT", "HNPM": "Saint-Pierre eta Mikeluneko ordutegi estandarra", "IST": "Indiako ordua", "HNPMX": "Mexikoko Pazifikoko ordutegi estandarra", "HNOG": "Groenlandia mendebaldeko ordutegi estandarra", "HEEG": "Groenlandia ekialdeko udako ordutegia", "CHADT": "Chathamgo udako ordua", "∅∅∅": "Amazoniako udako ordutegia", "MEZ": "Europa erdialdeko ordu estandarra", "OEZ": "Europa ekialdeko ordu estandarra", "HNT": "Ternuako ordutegi estandarra", "CAT": "Afrika erdialdeko ordua", "HEPMX": "Mexikoko Pazifikoko udako ordutegia", "AKST": "Alaskako ordutegi estandarra"}, - } - } -  -diff --git a/eu_ES/eu_ES.go b/eu_ES/eu_ES.go -index 94cd950..3e1105b 100644 ---- a/eu_ES/eu_ES.go -+++ b/eu_ES/eu_ES.go -@@ -10,72 +10,45 @@ import ( - ) -  - type eu_ES struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentPrefix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'eu_ES' locale - func New() locales.Translator { - return &eu_ES{ -- locale: "eu_ES", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentPrefix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "urt.", "ots.", "mar.", "api.", "mai.", "eka.", "uzt.", "abu.", "ira.", "urr.", "aza.", "abe."}, -- monthsNarrow: []string{"", "U", "O", "M", "A", "M", "E", "U", "A", "I", "U", "A", "A"}, -- monthsWide: []string{"", "urtarrila", "otsaila", "martxoa", "apirila", "maiatza", "ekaina", "uztaila", "abuztua", "iraila", "urria", "azaroa", "abendua"}, -- daysAbbreviated: []string{"ig.", "al.", "ar.", "az.", "og.", "or.", "lr."}, -- daysNarrow: []string{"I", "A", "A", "A", "O", "O", "L"}, -- daysShort: []string{"ig.", "al.", "ar.", "az.", "og.", "or.", "lr."}, -- daysWide: []string{"igandea", "astelehena", "asteartea", "asteazkena", "osteguna", "ostirala", "larunbata"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"g", "a"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"K.a.", "K.o."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"K.a.", "Kristo ondoren"}, -- timezones: map[string]string{"CAT": "Afrika erdialdeko ordua", "WIB": "Indonesia mendebaldeko ordua", "BT": "Bhutango ordua", "HEPM": "Saint-Pierre eta Mikeluneko udako ordutegia", "LHST": "Lord Howeko ordu estandarra", "LHDT": "Lord Howeko udako ordua", "ECT": "Ekuadorreko ordua", "WAST": "Afrika mendebaldeko udako ordua", "WEZ": "Europa mendebaldeko ordu estandarra", "CHAST": "Chathamgo ordu estandarra", "MEZ": "Europa erdialdeko ordu estandarra", "JST": "Japoniako ordu estandarra", "WAT": "Afrika mendebaldeko ordu estandarra", "PST": "Ipar Amerikako Pazifikoko ordutegi estandarra", "PDT": "Ipar Amerikako Pazifikoko udako ordutegia", "AKDT": "Alaskako udako ordutegia", "UYST": "Uruguayko udako ordua", "WESZ": "Europa mendebaldeko udako ordua", "ACWDT": "Australia erdi-mendebaldeko udako ordua", "AKST": "Alaskako ordutegi estandarra", "MESZ": "Europa erdialdeko udako ordua", "TMST": "Turkmenistango udako ordua", "HEPMX": "Mexikoko Pazifikoko udako ordutegia", "EDT": "Ipar Amerikako ekialdeko udako ordutegia", "OESZ": "Europa ekialdeko udako ordua", "CST": "Ipar Amerikako erdialdeko ordu estandarra", "HKT": "Hong Kongo ordu estandarra", "HNPM": "Saint-Pierre eta Mikeluneko ordutegi estandarra", "NZDT": "Zeelanda Berriko udako ordua", "SAST": "Afrika hegoaldeko ordua", "ACST": "Australia erdialdeko ordu estandarra", "HKST": "Hong Kongo udako ordua", "EAT": "Afrika ekialdeko ordua", "WARST": "Argentina mendebaldeko udako ordutegia", "AST": "Atlantikoko ordutegi estandarra", "HNT": "Ternuako ordutegi estandarra", "WIT": "Indonesia ekialdeko ordua", "AWDT": "Australia mendebaldeko udako ordua", "COT": "Kolonbiako ordu estandarra", "ACWST": "Australia erdi-mendebaldeko ordu estandarra", "AEDT": "Australia ekialdeko udako ordua", "ChST": "Chamorroko ordu estandarra", "CDT": "Ipar Amerikako erdialdeko udako ordutegia", "HNOG": "Groenlandia mendebaldeko ordutegi estandarra", "CLST": "Txileko udako ordua", "AEST": "Australia ekialdeko ordu estandarra", "HADT": "Hawaii-Aleutiar uharteetako udako ordutegia", "WITA": "Indonesia erdialdeko ordua", "GMT": "Greenwich meridianoko ordua", "MST": "MST", "HNPMX": "Mexikoko Pazifikoko ordutegi estandarra", "UYT": "Uruguayko ordu estandarra", "HAST": "Hawaii-Aleutiar uharteetako ordutegi estandarra", "HAT": "Ternuako udako ordutegia", "IST": "Indiako ordua", "GFT": "Guyana Frantseseko ordua", "HENOMX": "Mexikoko ipar-ekialdeko udako ordutegia", "VET": "Venezuelako ordua", "MYT": "Malaysiako ordua", "HEOG": "Groenlandia mendebaldeko udako ordutegia", "NZST": "Zeelanda Berriko ordu estandarra", "CLT": "Txileko ordu estandarra", "EST": "Ipar Amerikako ekialdeko ordutegi estandarra", "GYT": "Guyanako ordua", "SRT": "Surinamgo ordua", "ARST": "Argentinako udako ordutegia", "BOT": "Boliviako ordutegia", "COST": "Kolonbiako udako ordua", "HECU": "Kubako udako ordutegia", "ADT": "Atlantikoko udako ordutegia", "SGT": "Singapurreko ordu estandarra", "HNCU": "Kubako ordutegi estandarra", "MDT": "MDT", "ART": "Argentinako ordutegi estandarra", "TMT": "Turkmenistango ordu estandarra", "ACDT": "Australia erdialdeko udako ordua", "OEZ": "Europa ekialdeko ordu estandarra", "HNNOMX": "Mexikoko ipar-ekialdeko ordutegi estandarra", "HEEG": "Groenlandia ekialdeko udako ordutegia", "WART": "Argentina mendebaldeko ordutegia estandarra", "AWST": "Australia mendebaldeko ordu estandarra", "CHADT": "Chathamgo udako ordua", "∅∅∅": "Amazoniako udako ordutegia", "JDT": "Japoniako udako ordua", "HNEG": "Groenlandia ekialdeko ordutegi estandarra"}, -+ locale: "eu_ES", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ECT": "ECT", "MEZ": "MEZ", "WART": "WART", "WIT": "WIT", "WITA": "WITA", "WIB": "WIB", "HNPM": "HNPM", "CST": "CST", "NZDT": "NZDT", "HEEG": "HEEG", "JDT": "JDT", "HNCU": "HNCU", "TMST": "TMST", "CAT": "CAT", "HENOMX": "HENOMX", "AEST": "AEST", "MYT": "MYT", "IST": "IST", "WEZ": "WEZ", "WAT": "WAT", "AWDT": "AWDT", "LHST": "LHST", "LHDT": "LHDT", "UYT": "UYT", "HAT": "HAT", "NZST": "NZST", "ADT": "ADT", "ACDT": "ACDT", "SGT": "SGT", "COST": "COST", "HEPM": "HEPM", "AEDT": "AEDT", "BT": "BT", "ACWST": "ACWST", "CDT": "CDT", "AST": "AST", "CHAST": "CHAST", "PST": "PST", "GMT": "GMT", "HADT": "HADT", "HNEG": "HNEG", "OESZ": "OESZ", "GFT": "GFT", "HNT": "HNT", "EST": "EST", "∅∅∅": "∅∅∅", "AKST": "AKST", "MST": "MST", "HNNOMX": "HNNOMX", "VET": "VET", "SAST": "SAST", "CLST": "CLST", "ChST": "ChST", "MESZ": "MESZ", "AWST": "AWST", "WAST": "WAST", "HEOG": "HEOG", "HKT": "HKT", "ARST": "ARST", "ART": "ART", "JST": "JST", "HEPMX": "HEPMX", "HECU": "HECU", "WARST": "WARST", "HNOG": "HNOG", "HKST": "HKST", "MDT": "MDT", "GYT": "GYT", "SRT": "SRT", "EAT": "EAT", "WESZ": "WESZ", "HNPMX": "HNPMX", "TMT": "TMT", "CHADT": "CHADT", "UYST": "UYST", "PDT": "PDT", "COT": "COT", "EDT": "EDT", "BOT": "BOT", "HAST": "HAST", "ACWDT": "ACWDT", "AKDT": "AKDT", "OEZ": "OEZ", "CLT": "CLT", "ACST": "ACST"}, - } - } -  -@@ -128,7 +101,7 @@ func (eu *eu_ES) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (eu *eu_ES) MonthsAbbreviated() []string { -- return eu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +111,7 @@ func (eu *eu_ES) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (eu *eu_ES) MonthsNarrow() []string { -- return eu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +121,7 @@ func (eu *eu_ES) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (eu *eu_ES) MonthsWide() []string { -- return eu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,90 +167,13 @@ func (eu *eu_ES) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'eu_ES' and handles both Whole and Real numbers based on 'v' - func (eu *eu_ES) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, eu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, eu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'eu_ES' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (eu *eu_ES) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eu.decimal[0]) -- inWhole = true -- -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, eu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, eu.minus[0]) -- } -- -- for j := len(eu.percentPrefix) - 1; j >= 0; j-- { -- b = append(b, eu.percentPrefix[j]) -- } -- -- b = append(b, eu.percent[0]) -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'eu_ES' -@@ -285,56 +181,7 @@ func (eu *eu_ES) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := eu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, eu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, eu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, eu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, eu.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'eu_ES' -@@ -343,63 +190,7 @@ func (eu *eu_ES) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := eu.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, eu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, eu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, eu.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, eu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, eu.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, eu.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'eu_ES' -@@ -407,17 +198,6 @@ func (eu *eu_ES) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -426,17 +206,6 @@ func (eu *eu_ES) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, eu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -445,19 +214,6 @@ func (eu *eu_ES) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x28, 0x65}...) -- b = append(b, []byte{0x29, 0x6b, 0x6f}...) -- b = append(b, []byte{0x20}...) -- b = append(b, eu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -466,21 +222,6 @@ func (eu *eu_ES) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x28, 0x65}...) -- b = append(b, []byte{0x29, 0x6b, 0x6f}...) -- b = append(b, []byte{0x20}...) -- b = append(b, eu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, eu.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -489,19 +230,6 @@ func (eu *eu_ES) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -510,26 +238,6 @@ func (eu *eu_ES) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -538,32 +246,6 @@ func (eu *eu_ES) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -572,36 +254,5 @@ func (eu *eu_ES) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, eu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := eu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/ewo/ewo.go b/ewo/ewo.go -index 66bec8f..6c0dd44 100644 ---- a/ewo/ewo.go -+++ b/ewo/ewo.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"oyk", "ayk"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"osúsúa Yésus kiri", "ámvus Yésus Kirís"}, -- timezones: map[string]string{"AKST": "AKST", "HNOG": "HNOG", "WITA": "WITA", "CAT": "CAT", "HNPMX": "HNPMX", "ACWST": "ACWST", "CHADT": "CHADT", "HEPM": "HEPM", "MEZ": "MEZ", "MESZ": "MESZ", "HEEG": "HEEG", "TMST": "TMST", "MDT": "MDT", "UYT": "UYT", "PST": "PST", "WAST": "WAST", "EDT": "EDT", "HKT": "HKT", "HNEG": "HNEG", "NZST": "NZST", "CHAST": "CHAST", "WART": "WART", "ADT": "ADT", "HADT": "HADT", "VET": "VET", "WAT": "WAT", "ACWDT": "ACWDT", "HAT": "HAT", "CLT": "CLT", "LHDT": "LHDT", "JST": "JST", "ACDT": "ACDT", "EAT": "EAT", "COST": "COST", "MST": "MST", "AKDT": "AKDT", "WIT": "WIT", "WARST": "WARST", "EST": "EST", "WEZ": "WEZ", "JDT": "JDT", "LHST": "LHST", "BOT": "BOT", "GFT": "GFT", "TMT": "TMT", "OEZ": "OEZ", "HNCU": "HNCU", "AEST": "AEST", "AWDT": "AWDT", "COT": "COT", "HNNOMX": "HNNOMX", "GYT": "GYT", "WESZ": "WESZ", "ChST": "ChST", "WIB": "WIB", "CLST": "CLST", "HENOMX": "HENOMX", "IST": "IST", "HAST": "HAST", "PDT": "PDT", "HKST": "HKST", "HEOG": "HEOG", "HNT": "HNT", "ARST": "ARST", "AEDT": "AEDT", "HNPM": "HNPM", "HECU": "HECU", "BT": "BT", "SRT": "SRT", "NZDT": "NZDT", "SAST": "SAST", "ACST": "ACST", "OESZ": "OESZ", "ECT": "ECT", "GMT": "GMT", "HEPMX": "HEPMX", "AST": "AST", "SGT": "SGT", "∅∅∅": "∅∅∅", "MYT": "MYT", "ART": "ART", "AWST": "AWST", "UYST": "UYST", "CST": "CST", "CDT": "CDT"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "GFT": "GFT", "EDT": "EDT", "NZDT": "NZDT", "JDT": "JDT", "MYT": "MYT", "ADT": "ADT", "HEPMX": "HEPMX", "AKDT": "AKDT", "HEOG": "HEOG", "GYT": "GYT", "HKST": "HKST", "WITA": "WITA", "UYST": "UYST", "WAST": "WAST", "WIB": "WIB", "ChST": "ChST", "CLST": "CLST", "GMT": "GMT", "JST": "JST", "CHADT": "CHADT", "OESZ": "OESZ", "ARST": "ARST", "AST": "AST", "HADT": "HADT", "MEZ": "MEZ", "ACWDT": "ACWDT", "PDT": "PDT", "CST": "CST", "NZST": "NZST", "PST": "PST", "SGT": "SGT", "SAST": "SAST", "HKT": "HKT", "ACDT": "ACDT", "HNPM": "HNPM", "HEPM": "HEPM", "AEDT": "AEDT", "UYT": "UYT", "WARST": "WARST", "MST": "MST", "ART": "ART", "BOT": "BOT", "ACST": "ACST", "LHST": "LHST", "IST": "IST", "WIT": "WIT", "EST": "EST", "SRT": "SRT", "HAST": "HAST", "HNNOMX": "HNNOMX", "AEST": "AEST", "VET": "VET", "WAT": "WAT", "MDT": "MDT", "HENOMX": "HENOMX", "HNEG": "HNEG", "CAT": "CAT", "CDT": "CDT", "HEEG": "HEEG", "LHDT": "LHDT", "EAT": "EAT", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "HNT": "HNT", "WART": "WART", "TMT": "TMT", "TMST": "TMST", "CHAST": "CHAST", "BT": "BT", "WESZ": "WESZ", "COST": "COST", "CLT": "CLT", "MESZ": "MESZ", "AWDT": "AWDT", "ACWST": "ACWST", "WEZ": "WEZ", "AKST": "AKST", "HAT": "HAT", "ECT": "ECT", "AWST": "AWST", "HNCU": "HNCU", "HECU": "HECU", "HNOG": "HNOG", "COT": "COT"}, - } - } -  -diff --git a/ewo_CM/ewo_CM.go b/ewo_CM/ewo_CM.go -index 2213149..c1c7225 100644 ---- a/ewo_CM/ewo_CM.go -+++ b/ewo_CM/ewo_CM.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ewo_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ewo_CM' locale - func New() locales.Translator { - return &ewo_CM{ -- locale: "ewo_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ngo", "ngb", "ngl", "ngn", "ngt", "ngs", "ngz", "ngm", "nge", "nga", "ngad", "ngab"}, -- monthsNarrow: []string{"", "o", "b", "l", "n", "t", "s", "z", "m", "e", "a", "d", "b"}, -- monthsWide: []string{"", "ngɔn osú", "ngɔn bɛ̌", "ngɔn lála", "ngɔn nyina", "ngɔn tána", "ngɔn saməna", "ngɔn zamgbála", "ngɔn mwom", "ngɔn ebulú", "ngɔn awóm", "ngɔn awóm ai dziá", "ngɔn awóm ai bɛ̌"}, -- daysAbbreviated: []string{"sɔ́n", "mɔ́n", "smb", "sml", "smn", "fúl", "sér"}, -- daysNarrow: []string{"s", "m", "s", "s", "s", "f", "s"}, -- daysWide: []string{"sɔ́ndɔ", "mɔ́ndi", "sɔ́ndɔ məlú mə́bɛ̌", "sɔ́ndɔ məlú mə́lɛ́", "sɔ́ndɔ məlú mə́nyi", "fúladé", "séradé"}, -- periodsAbbreviated: []string{"kíkíríg", "ngəgógəle"}, -- periodsWide: []string{"kíkíríg", "ngəgógəle"}, -- erasAbbreviated: []string{"oyk", "ayk"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"osúsúa Yésus kiri", "ámvus Yésus Kirís"}, -- timezones: map[string]string{"WARST": "WARST", "WESZ": "WESZ", "AWST": "AWST", "HKT": "HKT", "HEPM": "HEPM", "NZST": "NZST", "CLT": "CLT", "TMST": "TMST", "CHAST": "CHAST", "WART": "WART", "UYT": "UYT", "UYST": "UYST", "ACWDT": "ACWDT", "ACST": "ACST", "HENOMX": "HENOMX", "HAT": "HAT", "MEZ": "MEZ", "HEEG": "HEEG", "SRT": "SRT", "WAT": "WAT", "AKDT": "AKDT", "HAST": "HAST", "PST": "PST", "TMT": "TMT", "EAT": "EAT", "AKST": "AKST", "ADT": "ADT", "AWDT": "AWDT", "WITA": "WITA", "HNCU": "HNCU", "HECU": "HECU", "WIB": "WIB", "ART": "ART", "IST": "IST", "SAST": "SAST", "EST": "EST", "GYT": "GYT", "HNT": "HNT", "LHST": "LHST", "OEZ": "OEZ", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "CHADT": "CHADT", "BOT": "BOT", "AST": "AST", "BT": "BT", "WEZ": "WEZ", "HNOG": "HNOG", "HEOG": "HEOG", "PDT": "PDT", "HKST": "HKST", "CLST": "CLST", "HADT": "HADT", "HNPM": "HNPM", "MESZ": "MESZ", "MYT": "MYT", "AEST": "AEST", "JST": "JST", "CDT": "CDT", "MST": "MST", "ARST": "ARST", "LHDT": "LHDT", "GFT": "GFT", "WAST": "WAST", "CAT": "CAT", "COST": "COST", "HEPMX": "HEPMX", "EDT": "EDT", "VET": "VET", "ChST": "ChST", "ACDT": "ACDT", "SGT": "SGT", "GMT": "GMT", "CST": "CST", "WIT": "WIT", "AEDT": "AEDT", "OESZ": "OESZ", "COT": "COT", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "JDT": "JDT", "ECT": "ECT", "NZDT": "NZDT", "HNEG": "HNEG", "MDT": "MDT"}, -+ locale: "ewo_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "SGT": "SGT", "WAST": "WAST", "OESZ": "OESZ", "HKST": "HKST", "BT": "BT", "OEZ": "OEZ", "MST": "MST", "ChST": "ChST", "MEZ": "MEZ", "UYT": "UYT", "COST": "COST", "GYT": "GYT", "CDT": "CDT", "EAT": "EAT", "HEEG": "HEEG", "MYT": "MYT", "CHADT": "CHADT", "PST": "PST", "NZDT": "NZDT", "WIB": "WIB", "AST": "AST", "SRT": "SRT", "HAST": "HAST", "AEST": "AEST", "AEDT": "AEDT", "VET": "VET", "HNT": "HNT", "HKT": "HKT", "HADT": "HADT", "HNEG": "HNEG", "NZST": "NZST", "ADT": "ADT", "MESZ": "MESZ", "HEPM": "HEPM", "JST": "JST", "AWDT": "AWDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "LHDT": "LHDT", "HECU": "HECU", "EST": "EST", "ART": "ART", "HNNOMX": "HNNOMX", "LHST": "LHST", "WARST": "WARST", "TMT": "TMT", "CAT": "CAT", "ECT": "ECT", "IST": "IST", "PDT": "PDT", "HNPMX": "HNPMX", "WIT": "WIT", "ACDT": "ACDT", "HNPM": "HNPM", "WEZ": "WEZ", "WESZ": "WESZ", "CLT": "CLT", "WITA": "WITA", "TMST": "TMST", "BOT": "BOT", "HENOMX": "HENOMX", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "WART": "WART", "SAST": "SAST", "AKDT": "AKDT", "GFT": "GFT", "HEOG": "HEOG", "EDT": "EDT", "ACST": "ACST", "JDT": "JDT", "AWST": "AWST", "ARST": "ARST", "GMT": "GMT", "HNOG": "HNOG", "CST": "CST", "ACWST": "ACWST", "AKST": "AKST", "CLST": "CLST", "WAT": "WAT", "HAT": "HAT", "COT": "COT", "MDT": "MDT"}, - } - } -  -@@ -111,7 +94,7 @@ func (ewo *ewo_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ewo *ewo_CM) MonthsAbbreviated() []string { -- return ewo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -121,7 +104,7 @@ func (ewo *ewo_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ewo *ewo_CM) MonthsNarrow() []string { -- return ewo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -131,7 +114,7 @@ func (ewo *ewo_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ewo *ewo_CM) MonthsWide() []string { -- return ewo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -177,75 +160,13 @@ func (ewo *ewo_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ewo_CM' and handles both Whole and Real numbers based on 'v' - func (ewo *ewo_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ewo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ewo.group) - 1; j >= 0; j-- { -- b = append(b, ewo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ewo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ewo_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ewo *ewo_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ewo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ewo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ewo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ewo_CM' -@@ -253,58 +174,7 @@ func (ewo *ewo_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ewo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ewo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ewo.group) - 1; j >= 0; j-- { -- b = append(b, ewo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ewo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ewo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ewo.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ewo_CM' -@@ -313,65 +183,7 @@ func (ewo *ewo_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ewo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ewo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ewo.group) - 1; j >= 0; j-- { -- b = append(b, ewo.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ewo.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ewo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ewo.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ewo.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ewo_CM' -@@ -379,17 +191,6 @@ func (ewo *ewo_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -398,17 +199,6 @@ func (ewo *ewo_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ewo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -417,17 +207,6 @@ func (ewo *ewo_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ewo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -436,19 +215,6 @@ func (ewo *ewo_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ewo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ewo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,19 +223,6 @@ func (ewo *ewo_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -478,26 +231,6 @@ func (ewo *ewo_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -506,30 +239,6 @@ func (ewo *ewo_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -538,34 +247,5 @@ func (ewo *ewo_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ewo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ewo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fa/fa.go b/fa/fa.go -index 951a3b1..8ece098 100644 ---- a/fa/fa.go -+++ b/fa/fa.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ق.م.", "م."}, - erasNarrow: []string{"ق", "م"}, - erasWide: []string{"قبل از میلاد", "میلادی"}, -- timezones: map[string]string{"HADT": "وقت تابستانی هاوایی‐الوشن", "OESZ": "وقت تابستانی شرق اروپا", "ECT": "وقت اکوادور", "HNNOMX": "وقت عادی شمال غرب مکزیک", "HENOMX": "وقت تابستانی شمال غرب مکزیک", "HNPMX": "وقت عادی شرق مکزیک", "MDT": "وقت تابستانی کوهستانی امریکا", "ACWST": "وقت عادی مرکز-غرب استرالیا", "HNOG": "وقت عادی غرب گرینلند", "WITA": "وقت مرکز اندونزی", "NZDT": "وقت تابستانی زلاند نو", "IST": "وقت هند", "WARST": "وقت تابستانی غرب آرژانتین", "BT": "وقت بوتان", "PDT": "وقت تابستانی غرب امریکا", "HEOG": "وقت تابستانی غرب گرینلند", "MESZ": "وقت تابستانی مرکز اروپا", "HEEG": "وقت تابستانی شرق گرینلند", "ACST": "وقت عادی مرکز استرالیا", "PST": "وقت عادی غرب امریکا", "AWDT": "وقت تابستانی غرب استرالیا", "JST": "وقت عادی ژاپن", "WAST": "وقت تابستانی غرب افریقا", "COT": "وقت عادی کلمبیا", "EDT": "وقت تابستانی شرق امریکا", "GFT": "وقت گویان فرانسه", "EAT": "وقت شرق افریقا", "OEZ": "وقت عادی شرق اروپا", "AKST": "وقت عادی آلاسکا", "SRT": "وقت سورینام", "SGT": "وقت سنگاپور", "UYST": "وقت تابستانی اروگوئه", "HAST": "وقت عادی هاوایی‐الوشن", "HNPM": "وقت عادی سنت\u200cپیر و میکلون", "JDT": "وقت تابستانی ژاپن", "TMT": "وقت عادی ترکمنستان", "MYT": "وقت مالزی", "CLST": "وقت تابستانی شیلی", "∅∅∅": "وقت تابستانی آمازون", "HAT": "وقت تابستانی نیوفاندلند", "EST": "وقت عادی شرق امریکا", "UYT": "وقت عادی اروگوئه", "CDT": "وقت تابستانی مرکز امریکا", "AST": "وقت عادی آتلانتیک", "CST": "وقت عادی مرکز امریکا", "WIB": "وقت غرب اندونزی", "HNT": "وقت عادی نیوفاندلند", "ARST": "وقت تابستانی آرژانتین", "HKT": "وقت عادی هنگ\u200cکنگ", "SAST": "وقت عادی جنوب افریقا", "ChST": "وقت عادی چامورو", "HNCU": "وقت عادی کوبا", "LHDT": "وقت تابستانی لردهو", "ADT": "وقت تابستانی آتلانتیک", "WEZ": "وقت عادی غرب اروپا", "MEZ": "وقت عادی مرکز اروپا", "TMST": "وقت تابستانی ترکمنستان", "GMT": "وقت گرینویچ", "ACWDT": "وقت تابستانی مرکز-غرب استرالیا", "CAT": "وقت مرکز افریقا", "WAT": "وقت عادی غرب افریقا", "WART": "وقت عادی غرب آرژانتین", "COST": "وقت تابستانی کلمبیا", "HEPMX": "وقت تابستانی شرق مکزیک", "MST": "وقت عادی کوهستانی امریکا", "VET": "وقت ونزوئلا", "ART": "وقت عادی آرژانتین", "HEPM": "وقت تابستانی سنت\u200cپیر و میکلون", "LHST": "وقت عادی لردهو", "NZST": "وقت عادی زلاند نو", "HECU": "وقت تابستانی کوبا", "AKDT": "وقت تابستانی آلاسکا", "ACDT": "وقت تابستانی مرکز استرالیا", "WESZ": "وقت تابستانی غرب اروپا", "AEDT": "وقت تابستانی شرق استرالیا", "CHAST": "وقت عادی چت\u200cهام", "CHADT": "وقت تابستانی چت\u200cهام", "CLT": "وقت عادی شیلی", "BOT": "وقت بولیوی", "HNEG": "وقت عادی شرق گرینلند", "WIT": "وقت شرق اندونزی", "AEST": "وقت عادی شرق استرالیا", "AWST": "وقت عادی غرب استرالیا", "HKST": "وقت تابستانی هنگ\u200cکنگ", "GYT": "وقت گویان"}, -+ timezones: map[string]string{"WESZ": "وقت تابستانی غرب اروپا", "WIT": "وقت شرق اندونزی", "HEOG": "وقت تابستانی غرب گرینلند", "MYT": "وقت مالزی", "JST": "وقت عادی ژاپن", "HNNOMX": "وقت عادی شمال غرب مکزیک", "SRT": "وقت سورینام", "EAT": "وقت شرق افریقا", "ACST": "وقت عادی مرکز استرالیا", "ACDT": "وقت تابستانی مرکز استرالیا", "GYT": "وقت گویان", "HNOG": "وقت عادی غرب گرینلند", "HKST": "وقت تابستانی هنگ\u200cکنگ", "NZDT": "وقت تابستانی زلاند نو", "HNT": "وقت عادی نیوفاندلند", "WAST": "وقت تابستانی غرب افریقا", "∅∅∅": "وقت تابستانی برازیلیا", "WITA": "وقت مرکز اندونزی", "CST": "وقت عادی مرکز امریکا", "AST": "وقت عادی آتلانتیک", "CLST": "وقت تابستانی شیلی", "MEZ": "وقت عادی مرکز اروپا", "JDT": "وقت تابستانی ژاپن", "PST": "وقت عادی غرب امریکا", "HEEG": "وقت تابستانی شرق گرینلند", "HNPM": "وقت عادی سنت\u200cپیر و میکلون", "UYST": "وقت تابستانی اروگوئه", "IST": "وقت هند", "HKT": "وقت عادی هنگ\u200cکنگ", "MDT": "وقت تابستانی ماکائو", "ADT": "وقت تابستانی آتلانتیک", "ChST": "وقت عادی چامورو", "WEZ": "وقت عادی غرب اروپا", "AKST": "وقت عادی آلاسکا", "OESZ": "وقت تابستانی شرق اروپا", "LHST": "وقت عادی لردهو", "GFT": "وقت گویان فرانسه", "CLT": "وقت عادی شیلی", "WIB": "وقت غرب اندونزی", "BOT": "وقت بولیوی", "HENOMX": "وقت تابستانی شمال غرب مکزیک", "EST": "وقت عادی شرق امریکا", "CAT": "وقت مرکز افریقا", "HADT": "وقت تابستانی هاوایی‐الوشن", "PDT": "وقت تابستانی غرب امریکا", "HNEG": "وقت عادی شرق گرینلند", "AWDT": "وقت تابستانی غرب استرالیا", "LHDT": "وقت تابستانی لردهو", "BT": "وقت بوتان", "GMT": "وقت گرینویچ", "ART": "وقت عادی آرژانتین", "ARST": "وقت تابستانی آرژانتین", "HAST": "وقت عادی هاوایی‐الوشن", "ACWST": "وقت عادی مرکز-غرب استرالیا", "ACWDT": "وقت تابستانی مرکز-غرب استرالیا", "WAT": "وقت عادی غرب افریقا", "WARST": "وقت تابستانی غرب آرژانتین", "CDT": "وقت تابستانی مرکز امریکا", "MST": "وقت عادی ماکائو", "NZST": "وقت عادی زلاند نو", "SGT": "وقت سنگاپور", "HNCU": "وقت عادی کوبا", "AKDT": "وقت تابستانی آلاسکا", "HAT": "وقت تابستانی نیوفاندلند", "OEZ": "وقت عادی شرق اروپا", "WART": "وقت عادی غرب آرژانتین", "MESZ": "وقت تابستانی مرکز اروپا", "UYT": "وقت عادی اروگوئه", "AEST": "وقت عادی شرق استرالیا", "VET": "وقت ونزوئلا", "SAST": "وقت عادی جنوب افریقا", "CHAST": "وقت عادی چت\u200cهام", "HEPMX": "وقت تابستانی شرق مکزیک", "TMST": "وقت تابستانی ترکمنستان", "AWST": "وقت عادی غرب استرالیا", "HEPM": "وقت تابستانی سنت\u200cپیر و میکلون", "AEDT": "وقت تابستانی شرق استرالیا", "COT": "وقت عادی کلمبیا", "COST": "وقت تابستانی کلمبیا", "EDT": "وقت تابستانی شرق امریکا", "TMT": "وقت عادی ترکمنستان", "HNPMX": "وقت عادی شرق مکزیک", "ECT": "وقت اکوادور", "CHADT": "وقت تابستانی چت\u200cهام", "HECU": "وقت تابستانی کوبا"}, - } - } -  -diff --git a/fa_AF/fa_AF.go b/fa_AF/fa_AF.go -index b76b3f0..5672523 100644 ---- a/fa_AF/fa_AF.go -+++ b/fa_AF/fa_AF.go -@@ -48,30 +48,17 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: "٫", -- group: "٬", -- minus: "‎−", -- percent: "‎٪", -- perMille: "؉", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", - monthsAbbreviated: []string{"", "جنو", "فبروری", "مارچ", "اپریل", "می", "جون", "جول", "اگست", "سپتمبر", "اکتوبر", "نومبر", "دسم"}, - monthsNarrow: []string{"", "ج", "ف", "م", "ا", "م", "ج", "ج", "ا", "س", "ا", "ن", "د"}, - monthsWide: []string{"", "جنوری", "فبروری", "مارچ", "اپریل", "می", "جون", "جولای", "اگست", "سپتمبر", "اکتوبر", "نومبر", "دسمبر"}, -- daysAbbreviated: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- daysNarrow: []string{"ی", "د", "س", "چ", "پ", "ج", "ش"}, -- daysShort: []string{"۱ش", "۲ش", "۳ش", "۴ش", "۵ش", "ج", "ش"}, -- daysWide: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, - periodsAbbreviated: []string{"", ""}, - periodsNarrow: []string{"", ""}, - periodsWide: []string{"", ""}, -- erasAbbreviated: []string{"ق.م.", "م."}, -- erasNarrow: []string{"ق", "م"}, -- erasWide: []string{"قبل از میلاد", "میلادی"}, -- timezones: map[string]string{"ARST": "وقت تابستانی آرژانتین", "LHST": "وقت عادی لردهو", "CHADT": "وقت تابستانی چت\u200cهام", "SGT": "وقت سنگاپور", "∅∅∅": "وقت تابستانی آمازون", "ACDT": "وقت تابستانی مرکز استرالیا", "AWDT": "وقت تابستانی غرب استرالیا", "HKST": "وقت تابستانی هنگ\u200cکنگ", "AST": "وقت عادی آتلانتیک", "GYT": "وقت گویان", "ACWDT": "وقت تابستانی مرکز-غرب استرالیا", "WITA": "وقت مرکز اندونزی", "MST": "وقت عادی ماکائو", "HADT": "وقت تابستانی هاوایی‐الوشن", "ACWST": "وقت عادی مرکز-غرب استرالیا", "ART": "وقت عادی آرژانتین", "CLST": "وقت تابستانی شیلی", "OESZ": "وقت تابستانی شرق اروپا", "CST": "وقت عادی مرکز امریکا", "WIB": "وقت غرب اندونزی", "PDT": "وقت تابستانی غرب امریکا", "HECU": "وقت تابستانی کوبا", "NZST": "وقت عادی زلاند نو", "VET": "وقت ونزوئلا", "IST": "وقت هند", "JDT": "وقت تابستانی ژاپن", "BT": "وقت بوتان", "SRT": "وقت سورینام", "WEZ": "وقت عادی غرب اروپا", "AWST": "وقت عادی غرب استرالیا", "HEPM": "وقت تابستانی سنت\u200cپیر و میکلون", "MEZ": "وقت عادی مرکز اروپا", "TMST": "وقت تابستانی ترکمنستان", "HNNOMX": "وقت عادی شمال غرب مکزیک", "HENOMX": "وقت تابستانی شمال غرب مکزیک", "EDT": "وقت تابستانی شرق امریکا", "LHDT": "وقت تابستانی لردهو", "WAT": "وقت عادی غرب افریقا", "MDT": "وقت تابستانی ماکائو", "ADT": "وقت تابستانی آتلانتیک", "HAST": "وقت عادی هاوایی‐الوشن", "MESZ": "وقت تابستانی مرکز اروپا", "GFT": "وقت گویان فرانسه", "ACST": "وقت عادی مرکز استرالیا", "ECT": "وقت اکوادور", "WESZ": "وقت تابستانی غرب اروپا", "HAT": "وقت تابستانی نیوفاندلند", "HEOG": "وقت تابستانی غرب گرینلند", "AEDT": "وقت تابستانی شرق استرالیا", "JST": "وقت عادی ژاپن", "ChST": "وقت عادی چامورو", "CAT": "وقت مرکز افریقا", "COT": "وقت عادی کلمبیا", "HNPMX": "وقت عادی شرق مکزیک", "HEPMX": "وقت تابستانی شرق مکزیک", "MYT": "وقت مالزی", "NZDT": "وقت تابستانی زلاند نو", "HEEG": "وقت تابستانی شرق گرینلند", "WARST": "وقت تابستانی غرب آرژانتین", "COST": "وقت تابستانی کلمبیا", "HNCU": "وقت عادی کوبا", "EST": "وقت عادی شرق امریکا", "UYT": "وقت عادی اروگوئه", "UYST": "وقت تابستانی اروگوئه", "CDT": "وقت تابستانی مرکز امریکا", "WIT": "وقت شرق اندونزی", "PST": "وقت عادی غرب امریکا", "HKT": "وقت عادی هنگ\u200cکنگ", "CLT": "وقت عادی شیلی", "HNEG": "وقت عادی شرق گرینلند", "TMT": "وقت عادی ترکمنستان", "AKST": "وقت عادی آلاسکا", "HNT": "وقت عادی نیوفاندلند", "HNOG": "وقت عادی غرب گرینلند", "CHAST": "وقت عادی چت\u200cهام", "SAST": "وقت عادی جنوب افریقا", "WART": "وقت عادی غرب آرژانتین", "AKDT": "وقت تابستانی آلاسکا", "GMT": "وقت گرینویچ", "AEST": "وقت عادی شرق استرالیا", "HNPM": "وقت عادی سنت\u200cپیر و میکلون", "BOT": "وقت بولیوی", "EAT": "وقت شرق افریقا", "WAST": "وقت تابستانی غرب افریقا", "OEZ": "وقت عادی شرق اروپا"}, -+ timezones: map[string]string{"PDT": "PDT", "AEST": "AEST", "WESZ": "WESZ", "WIT": "WIT", "CLST": "CLST", "HNPM": "HNPM", "WEZ": "WEZ", "MDT": "MDT", "WIB": "WIB", "ChST": "ChST", "WITA": "WITA", "EAT": "EAT", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "AEDT": "AEDT", "HNPMX": "HNPMX", "HKT": "HKT", "BT": "BT", "ACWDT": "ACWDT", "VET": "VET", "WAT": "WAT", "WART": "WART", "EST": "EST", "EDT": "EDT", "CDT": "CDT", "HNEG": "HNEG", "HEEG": "HEEG", "HECU": "HECU", "COT": "COT", "HNOG": "HNOG", "MST": "MST", "ART": "ART", "MEZ": "MEZ", "PST": "PST", "CAT": "CAT", "UYT": "UYT", "HNCU": "HNCU", "HEPMX": "HEPMX", "NZST": "NZST", "SAST": "SAST", "SRT": "SRT", "HAST": "HAST", "ACST": "ACST", "HENOMX": "HENOMX", "MYT": "MYT", "IST": "IST", "AKST": "AKST", "BOT": "BOT", "HADT": "HADT", "CHADT": "CHADT", "WAST": "WAST", "HAT": "HAT", "COST": "COST", "ADT": "ADT", "SGT": "SGT", "OEZ": "OEZ", "GFT": "GFT", "CLT": "CLT", "HNT": "HNT", "TMST": "TMST", "AST": "AST", "GMT": "GMT", "ACDT": "ACDT", "JST": "JST", "OESZ": "OESZ", "WARST": "WARST", "GYT": "GYT", "LHDT": "LHDT", "HEPM": "HEPM", "HEOG": "HEOG", "NZDT": "NZDT", "LHST": "LHST", "TMT": "TMT", "ACWST": "ACWST", "AKDT": "AKDT", "HKST": "HKST", "MESZ": "MESZ", "AWST": "AWST", "CHAST": "CHAST", "UYST": "UYST", "∅∅∅": "∅∅∅", "ECT": "ECT", "JDT": "JDT", "CST": "CST", "ARST": "ARST"}, - } - } -  -@@ -191,83 +178,13 @@ func (fa *fa_AF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fa_AF' and handles both Whole and Real numbers based on 'v' - func (fa *fa_AF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 8 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fa.group) - 1; j >= 0; j-- { -- b = append(b, fa.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fa_AF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fa *fa_AF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 13 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fa.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fa_AF' -@@ -275,7 +192,7 @@ func (fa *fa_AF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fa.currencies[currency] -- l := len(s) + len(symbol) + 10 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -283,18 +200,14 @@ func (fa *fa_AF) FmtCurrency(num float64, v uint64, currency currency.Type) stri - for i := len(s) - 1; i >= 0; i-- { -  - if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -+ b = append(b, fa.decimal[0]) - inWhole = true - continue - } -  - if inWhole { - if count == 3 { -- for j := len(fa.group) - 1; j >= 0; j-- { -- b = append(b, fa.group[j]) -- } -+ b = append(b, fa.group[0]) - count = 1 - } else { - count++ -@@ -313,9 +226,7 @@ func (fa *fa_AF) FmtCurrency(num float64, v uint64, currency currency.Type) stri - } -  - if num < 0 { -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -+ b = append(b, fa.minus[0]) - } -  - // reverse -@@ -343,7 +254,7 @@ func (fa *fa_AF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fa.currencies[currency] -- l := len(s) + len(symbol) + 10 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -351,18 +262,14 @@ func (fa *fa_AF) FmtAccounting(num float64, v uint64, currency currency.Type) st - for i := len(s) - 1; i >= 0; i-- { -  - if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -+ b = append(b, fa.decimal[0]) - inWhole = true - continue - } -  - if inWhole { - if count == 3 { -- for j := len(fa.group) - 1; j >= 0; j-- { -- b = append(b, fa.group[j]) -- } -+ b = append(b, fa.group[0]) - count = 1 - } else { - count++ -@@ -382,9 +289,7 @@ func (fa *fa_AF) FmtAccounting(num float64, v uint64, currency currency.Type) st - b = append(b, fa.currencyNegativePrefix[j]) - } -  -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -+ b = append(b, fa.minus[0]) -  - } else { -  -@@ -422,17 +327,6 @@ func (fa *fa_AF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -441,17 +335,6 @@ func (fa *fa_AF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fa.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +343,6 @@ func (fa *fa_AF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +351,6 @@ func (fa *fa_AF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fa.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,15 +359,6 @@ func (fa *fa_AF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -517,22 +367,6 @@ func (fa *fa_AF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -541,28 +375,6 @@ func (fa *fa_AF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -571,32 +383,5 @@ func (fa *fa_AF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fa.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/fa_IR/fa_IR.go b/fa_IR/fa_IR.go -index 5d1b1d8..d45b3ae 100644 ---- a/fa_IR/fa_IR.go -+++ b/fa_IR/fa_IR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type fa_IR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fa_IR' locale - func New() locales.Translator { - return &fa_IR{ -- locale: "fa_IR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: "٫", -- group: "٬", -- minus: "‎−", -- percent: "‎٪", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: "‎", -- currencyNegativePrefix: "‎", -- monthsAbbreviated: []string{"", "ژانویهٔ", "فوریهٔ", "مارس", "آوریل", "مهٔ", "ژوئن", "ژوئیهٔ", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"}, -- monthsNarrow: []string{"", "ژ", "ف", "م", "آ", "م", "ژ", "ژ", "ا", "س", "ا", "ن", "د"}, -- monthsWide: []string{"", "ژانویهٔ", "فوریهٔ", "مارس", "آوریل", "مهٔ", "ژوئن", "ژوئیهٔ", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"}, -- daysAbbreviated: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- daysNarrow: []string{"ی", "د", "س", "چ", "پ", "ج", "ش"}, -- daysShort: []string{"۱ش", "۲ش", "۳ش", "۴ش", "۵ش", "ج", "ش"}, -- daysWide: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- periodsAbbreviated: []string{"ق.ظ.", "ب.ظ."}, -- periodsNarrow: []string{"ق", "ب"}, -- periodsWide: []string{"قبل\u200cازظهر", "بعدازظهر"}, -- erasAbbreviated: []string{"ق.م.", "م."}, -- erasNarrow: []string{"ق", "م"}, -- erasWide: []string{"قبل از میلاد", "میلادی"}, -- timezones: map[string]string{"HNPM": "وقت عادی سنت\u200cپیر و میکلون", "CHADT": "وقت تابستانی چت\u200cهام", "IST": "وقت هند", "TMT": "وقت عادی ترکمنستان", "EAT": "وقت شرق افریقا", "ART": "وقت عادی آرژانتین", "AWST": "وقت عادی غرب استرالیا", "WARST": "وقت تابستانی غرب آرژانتین", "MYT": "وقت مالزی", "HKST": "وقت تابستانی هنگ\u200cکنگ", "JST": "وقت عادی ژاپن", "HNNOMX": "وقت عادی شمال غرب مکزیک", "AKDT": "وقت تابستانی آلاسکا", "MESZ": "وقت تابستانی مرکز اروپا", "WIB": "وقت غرب اندونزی", "ACST": "وقت عادی مرکز استرالیا", "ACDT": "وقت تابستانی مرکز استرالیا", "OEZ": "وقت عادی شرق اروپا", "HNCU": "وقت عادی کوبا", "HAST": "وقت عادی هاوایی‐الوشن", "ARST": "وقت تابستانی آرژانتین", "AEST": "وقت عادی شرق استرالیا", "SRT": "وقت سورینام", "WITA": "وقت مرکز اندونزی", "HEPM": "وقت تابستانی سنت\u200cپیر و میکلون", "CHAST": "وقت عادی چت\u200cهام", "∅∅∅": "وقت تابستانی آمازون", "TMST": "وقت تابستانی ترکمنستان", "ECT": "وقت اکوادور", "HECU": "وقت تابستانی کوبا", "LHDT": "وقت تابستانی لردهو", "WAST": "وقت تابستانی غرب افریقا", "UYT": "وقت عادی اروگوئه", "CST": "وقت عادی مرکز امریکا", "CDT": "وقت تابستانی مرکز امریکا", "WESZ": "وقت تابستانی غرب اروپا", "ACWST": "وقت عادی مرکز-غرب استرالیا", "HAT": "وقت تابستانی نیوفاندلند", "NZDT": "وقت تابستانی زلاند نو", "CLT": "وقت عادی شیلی", "GFT": "وقت گویان فرانسه", "HNPMX": "وقت عادی شرق مکزیک", "ADT": "وقت تابستانی آتلانتیک", "HADT": "وقت تابستانی هاوایی‐الوشن", "VET": "وقت ونزوئلا", "PST": "وقت عادی غرب امریکا", "HNT": "وقت عادی نیوفاندلند", "AEDT": "وقت تابستانی شرق استرالیا", "HKT": "وقت عادی هنگ\u200cکنگ", "SAST": "وقت عادی جنوب افریقا", "CLST": "وقت تابستانی شیلی", "SGT": "وقت سنگاپور", "AST": "وقت عادی آتلانتیک", "GYT": "وقت گویان", "UYST": "وقت تابستانی اروگوئه", "AKST": "وقت عادی آلاسکا", "WIT": "وقت شرق اندونزی", "BOT": "وقت بولیوی", "WAT": "وقت عادی غرب افریقا", "OESZ": "وقت تابستانی شرق اروپا", "COT": "وقت عادی کلمبیا", "COST": "وقت تابستانی کلمبیا", "ACWDT": "وقت تابستانی مرکز-غرب استرالیا", "LHST": "وقت عادی لردهو", "HNEG": "وقت عادی شرق گرینلند", "WART": "وقت عادی غرب آرژانتین", "GMT": "وقت گرینویچ", "EST": "وقت عادی شرق امریکا", "HEPMX": "وقت تابستانی شرق مکزیک", "BT": "وقت بوتان", "MEZ": "وقت عادی مرکز اروپا", "NZST": "وقت عادی زلاند نو", "JDT": "وقت تابستانی ژاپن", "HENOMX": "وقت تابستانی شمال غرب مکزیک", "MDT": "وقت تابستانی ماکائو", "PDT": "وقت تابستانی غرب امریکا", "WEZ": "وقت عادی غرب اروپا", "AWDT": "وقت تابستانی غرب استرالیا", "HEEG": "وقت تابستانی شرق گرینلند", "CAT": "وقت مرکز افریقا", "EDT": "وقت تابستانی شرق امریکا", "HNOG": "وقت عادی غرب گرینلند", "ChST": "وقت عادی چامورو", "MST": "وقت عادی ماکائو", "HEOG": "وقت تابستانی غرب گرینلند"}, -+ locale: "fa_IR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SRT": "SRT", "BT": "BT", "UYT": "UYT", "∅∅∅": "∅∅∅", "EDT": "EDT", "AWST": "AWST", "LHST": "LHST", "LHDT": "LHDT", "HEPM": "HEPM", "PST": "PST", "ACWST": "ACWST", "CHADT": "CHADT", "HAT": "HAT", "COST": "COST", "MDT": "MDT", "ARST": "ARST", "BOT": "BOT", "MEZ": "MEZ", "ACDT": "ACDT", "JDT": "JDT", "IST": "IST", "ACWDT": "ACWDT", "AEST": "AEST", "HNT": "HNT", "NZDT": "NZDT", "MYT": "MYT", "HNPM": "HNPM", "OEZ": "OEZ", "CHAST": "CHAST", "VET": "VET", "OESZ": "OESZ", "CDT": "CDT", "WEZ": "WEZ", "AKST": "AKST", "HEOG": "HEOG", "HKST": "HKST", "CST": "CST", "PDT": "PDT", "AEDT": "AEDT", "WIT": "WIT", "SAST": "SAST", "HEPMX": "HEPMX", "WAST": "WAST", "GFT": "GFT", "GYT": "GYT", "EST": "EST", "TMT": "TMT", "GMT": "GMT", "ART": "ART", "JST": "JST", "COT": "COT", "HKT": "HKT", "TMST": "TMST", "WITA": "WITA", "ADT": "ADT", "HNEG": "HNEG", "HENOMX": "HENOMX", "SGT": "SGT", "NZST": "NZST", "WESZ": "WESZ", "HNCU": "HNCU", "HNPMX": "HNPMX", "EAT": "EAT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "CAT": "CAT", "ECT": "ECT", "HADT": "HADT", "MESZ": "MESZ", "AWDT": "AWDT", "WAT": "WAT", "HNOG": "HNOG", "WIB": "WIB", "HAST": "HAST", "ACST": "ACST", "UYST": "UYST", "WARST": "WARST", "CLT": "CLT", "ChST": "ChST", "CLST": "CLST", "MST": "MST", "AST": "AST", "HECU": "HECU", "AKDT": "AKDT", "WART": "WART"}, - } - } -  -@@ -125,7 +102,7 @@ func (fa *fa_IR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fa *fa_IR) MonthsAbbreviated() []string { -- return fa.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +112,7 @@ func (fa *fa_IR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fa *fa_IR) MonthsNarrow() []string { -- return fa.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -145,7 +122,7 @@ func (fa *fa_IR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fa *fa_IR) MonthsWide() []string { -- return fa.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,83 +168,13 @@ func (fa *fa_IR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fa_IR' and handles both Whole and Real numbers based on 'v' - func (fa *fa_IR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 8 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fa.group) - 1; j >= 0; j-- { -- b = append(b, fa.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fa_IR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fa *fa_IR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 13 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fa.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fa_IR' -@@ -275,66 +182,7 @@ func (fa *fa_IR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fa.currencies[currency] -- l := len(s) + len(symbol) + 11 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fa.group) - 1; j >= 0; j-- { -- b = append(b, fa.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fa.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, fa.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fa_IR' -@@ -343,78 +191,7 @@ func (fa *fa_IR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fa.currencies[currency] -- l := len(s) + len(symbol) + 11 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(fa.decimal) - 1; j >= 0; j-- { -- b = append(b, fa.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fa.group) - 1; j >= 0; j-- { -- b = append(b, fa.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fa.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, fa.currencyNegativePrefix[j]) -- } -- -- for j := len(fa.minus) - 1; j >= 0; j-- { -- b = append(b, fa.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fa.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, fa.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fa_IR' -@@ -422,17 +199,6 @@ func (fa *fa_IR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -441,17 +207,6 @@ func (fa *fa_IR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fa.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +215,6 @@ func (fa *fa_IR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +223,6 @@ func (fa *fa_IR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fa.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,15 +231,6 @@ func (fa *fa_IR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -517,22 +239,6 @@ func (fa *fa_IR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -541,28 +247,6 @@ func (fa *fa_IR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -571,32 +255,5 @@ func (fa *fa_IR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fa.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/ff/ff.go b/ff/ff.go -index 8af14a0..e52d449 100644 ---- a/ff/ff.go -+++ b/ff/ff.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"H-I", "C-I"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Hade Iisa", "Caggal Iisa"}, -- timezones: map[string]string{"TMT": "TMT", "WARST": "WARST", "HNT": "HNT", "CLT": "CLT", "CLST": "CLST", "AKDT": "AKDT", "MESZ": "MESZ", "HNPM": "HNPM", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "COST": "COST", "AEST": "AEST", "CAT": "CAT", "SRT": "SRT", "JDT": "JDT", "TMST": "TMST", "ChST": "ChST", "BOT": "BOT", "CST": "CST", "UYST": "UYST", "WIT": "WIT", "WESZ": "WESZ", "GMT": "GMT", "SGT": "SGT", "EST": "EST", "AKST": "AKST", "HEPM": "HEPM", "HEOG": "HEOG", "HKT": "HKT", "∅∅∅": "∅∅∅", "EDT": "EDT", "AST": "AST", "UYT": "UYT", "WAST": "WAST", "CHADT": "CHADT", "MEZ": "MEZ", "ACST": "ACST", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HAT": "HAT", "WEZ": "WEZ", "NZST": "NZST", "HEEG": "HEEG", "EAT": "EAT", "HAST": "HAST", "ARST": "ARST", "WIB": "WIB", "ACWST": "ACWST", "WITA": "WITA", "AEDT": "AEDT", "GFT": "GFT", "ECT": "ECT", "HEPMX": "HEPMX", "ADT": "ADT", "LHST": "LHST", "GYT": "GYT", "VET": "VET", "HKST": "HKST", "LHDT": "LHDT", "HNCU": "HNCU", "MST": "MST", "MYT": "MYT", "AWST": "AWST", "HNOG": "HNOG", "NZDT": "NZDT", "JST": "JST", "HNEG": "HNEG", "OEZ": "OEZ", "HNPMX": "HNPMX", "ART": "ART", "PDT": "PDT", "CHAST": "CHAST", "SAST": "SAST", "IST": "IST", "WART": "WART", "BT": "BT", "AWDT": "AWDT", "WAT": "WAT", "COT": "COT", "CDT": "CDT", "PST": "PST", "OESZ": "OESZ", "HECU": "HECU", "MDT": "MDT", "HADT": "HADT"}, -+ timezones: map[string]string{"ACWST": "ACWST", "OEZ": "OEZ", "HNPM": "HNPM", "JDT": "JDT", "CHADT": "CHADT", "HNOG": "HNOG", "HEEG": "HEEG", "AWDT": "AWDT", "SAST": "SAST", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "MDT": "MDT", "WIB": "WIB", "LHST": "LHST", "MESZ": "MESZ", "HNEG": "HNEG", "CHAST": "CHAST", "HEPMX": "HEPMX", "CST": "CST", "AST": "AST", "EAT": "EAT", "WEZ": "WEZ", "CAT": "CAT", "WITA": "WITA", "MEZ": "MEZ", "AWST": "AWST", "BT": "BT", "WART": "WART", "ARST": "ARST", "HADT": "HADT", "AEST": "AEST", "ACST": "ACST", "IST": "IST", "PST": "PST", "VET": "VET", "HECU": "HECU", "ART": "ART", "SRT": "SRT", "HAST": "HAST", "WIT": "WIT", "EDT": "EDT", "EST": "EST", "ECT": "ECT", "AKST": "AKST", "WARST": "WARST", "HNCU": "HNCU", "HEOG": "HEOG", "HKT": "HKT", "NZDT": "NZDT", "UYST": "UYST", "ACWDT": "ACWDT", "BOT": "BOT", "WAST": "WAST", "HAT": "HAT", "TMST": "TMST", "ADT": "ADT", "MYT": "MYT", "GFT": "GFT", "HNNOMX": "HNNOMX", "PDT": "PDT", "TMT": "TMT", "COST": "COST", "HKST": "HKST", "MST": "MST", "HNT": "HNT", "GYT": "GYT", "WAT": "WAT", "OESZ": "OESZ", "CLST": "CLST", "GMT": "GMT", "LHDT": "LHDT", "AEDT": "AEDT", "HNPMX": "HNPMX", "AKDT": "AKDT", "ACDT": "ACDT", "JST": "JST", "SGT": "SGT", "HENOMX": "HENOMX", "HEPM": "HEPM", "UYT": "UYT", "COT": "COT", "CLT": "CLT", "CDT": "CDT", "NZST": "NZST", "ChST": "ChST"}, - } - } -  -diff --git a/ff_CM/ff_CM.go b/ff_CM/ff_CM.go -index 7252f14..4a7b95a 100644 ---- a/ff_CM/ff_CM.go -+++ b/ff_CM/ff_CM.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ff_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ff_CM' locale - func New() locales.Translator { - return &ff_CM{ -- locale: "ff_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "sii", "col", "mbo", "see", "duu", "kor", "mor", "juk", "slt", "yar", "jol", "bow"}, -- monthsNarrow: []string{"", "s", "c", "m", "s", "d", "k", "m", "j", "s", "y", "j", "b"}, -- monthsWide: []string{"", "siilo", "colte", "mbooy", "seeɗto", "duujal", "korse", "morso", "juko", "siilto", "yarkomaa", "jolal", "bowte"}, -- daysAbbreviated: []string{"dew", "aaɓ", "maw", "nje", "naa", "mwd", "hbi"}, -- daysNarrow: []string{"d", "a", "m", "n", "n", "m", "h"}, -- daysWide: []string{"dewo", "aaɓnde", "mawbaare", "njeslaare", "naasaande", "mawnde", "hoore-biir"}, -- periodsAbbreviated: []string{"subaka", "kikiiɗe"}, -- periodsWide: []string{"subaka", "kikiiɗe"}, -- erasAbbreviated: []string{"H-I", "C-I"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Hade Iisa", "Caggal Iisa"}, -- timezones: map[string]string{"GYT": "GYT", "HADT": "HADT", "PST": "PST", "ACWST": "ACWST", "EAT": "EAT", "HECU": "HECU", "HEPMX": "HEPMX", "HAST": "HAST", "ACWDT": "ACWDT", "JST": "JST", "CAT": "CAT", "WAT": "WAT", "BOT": "BOT", "GFT": "GFT", "WAST": "WAST", "MST": "MST", "WITA": "WITA", "NZST": "NZST", "CHADT": "CHADT", "CLST": "CLST", "UYT": "UYT", "SRT": "SRT", "WIT": "WIT", "HNOG": "HNOG", "AEST": "AEST", "AWDT": "AWDT", "EST": "EST", "ARST": "ARST", "∅∅∅": "∅∅∅", "SGT": "SGT", "MDT": "MDT", "COST": "COST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HEOG": "HEOG", "MEZ": "MEZ", "NZDT": "NZDT", "JDT": "JDT", "CHAST": "CHAST", "SAST": "SAST", "GMT": "GMT", "BT": "BT", "HNT": "HNT", "ART": "ART", "MESZ": "MESZ", "LHDT": "LHDT", "HKT": "HKT", "HKST": "HKST", "EDT": "EDT", "WART": "WART", "AWST": "AWST", "HEPM": "HEPM", "CLT": "CLT", "HNEG": "HNEG", "TMST": "TMST", "OESZ": "OESZ", "UYST": "UYST", "ADT": "ADT", "WESZ": "WESZ", "HAT": "HAT", "AEDT": "AEDT", "ChST": "ChST", "HNPM": "HNPM", "IST": "IST", "COT": "COT", "CST": "CST", "HNPMX": "HNPMX", "AKDT": "AKDT", "PDT": "PDT", "LHST": "LHST", "ACST": "ACST", "ACDT": "ACDT", "MYT": "MYT", "CDT": "CDT", "WIB": "WIB", "VET": "VET", "WEZ": "WEZ", "HEEG": "HEEG", "OEZ": "OEZ", "ECT": "ECT", "AST": "AST", "TMT": "TMT", "WARST": "WARST", "HENOMX": "HENOMX", "AKST": "AKST"}, -+ locale: "ff_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNCU": "HNCU", "HECU": "HECU", "WAT": "WAT", "GYT": "GYT", "SRT": "SRT", "MEZ": "MEZ", "HEPM": "HEPM", "AKST": "AKST", "OEZ": "OEZ", "JST": "JST", "IST": "IST", "VET": "VET", "TMT": "TMT", "CLST": "CLST", "CST": "CST", "ACWST": "ACWST", "HNT": "HNT", "WART": "WART", "EAT": "EAT", "ACDT": "ACDT", "PDT": "PDT", "CLT": "CLT", "CDT": "CDT", "ChST": "ChST", "WEZ": "WEZ", "HKST": "HKST", "WITA": "WITA", "ADT": "ADT", "HAST": "HAST", "HNEG": "HNEG", "HNPM": "HNPM", "CHAST": "CHAST", "CHADT": "CHADT", "GFT": "GFT", "CAT": "CAT", "MESZ": "MESZ", "HEEG": "HEEG", "HAT": "HAT", "EDT": "EDT", "HKT": "HKT", "NZST": "NZST", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "WAST": "WAST", "WARST": "WARST", "HNOG": "HNOG", "EST": "EST", "NZDT": "NZDT", "AST": "AST", "HADT": "HADT", "ACST": "ACST", "BT": "BT", "UYST": "UYST", "TMST": "TMST", "MYT": "MYT", "COST": "COST", "HEOG": "HEOG", "BOT": "BOT", "PST": "PST", "AKDT": "AKDT", "AEST": "AEST", "COT": "COT", "MDT": "MDT", "WIB": "WIB", "ART": "ART", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "OESZ": "OESZ", "SAST": "SAST", "MST": "MST", "SGT": "SGT", "HEPMX": "HEPMX", "WIT": "WIT", "ECT": "ECT", "AWST": "AWST", "AWDT": "AWDT", "LHST": "LHST", "LHDT": "LHDT", "JDT": "JDT", "UYT": "UYT", "WESZ": "WESZ", "GMT": "GMT", "ARST": "ARST"}, - } - } -  -@@ -119,7 +102,7 @@ func (ff *ff_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ff *ff_CM) MonthsAbbreviated() []string { -- return ff.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +112,7 @@ func (ff *ff_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ff *ff_CM) MonthsNarrow() []string { -- return ff.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +122,7 @@ func (ff *ff_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ff *ff_CM) MonthsWide() []string { -- return ff.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,58 +182,7 @@ func (ff *ff_CM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ff.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ff.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ff_CM' -@@ -259,65 +191,7 @@ func (ff *ff_CM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ff.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ff.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ff.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ff_CM' -@@ -325,17 +199,6 @@ func (ff *ff_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +207,6 @@ func (ff *ff_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +215,6 @@ func (ff *ff_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +223,6 @@ func (ff *ff_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ff.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +231,6 @@ func (ff *ff_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +239,6 @@ func (ff *ff_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +247,6 @@ func (ff *ff_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +255,5 @@ func (ff *ff_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ff.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ff_GN/ff_GN.go b/ff_GN/ff_GN.go -index 87b5ba0..3dd1f0f 100644 ---- a/ff_GN/ff_GN.go -+++ b/ff_GN/ff_GN.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ff_GN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ff_GN' locale - func New() locales.Translator { - return &ff_GN{ -- locale: "ff_GN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "FG", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "sii", "col", "mbo", "see", "duu", "kor", "mor", "juk", "slt", "yar", "jol", "bow"}, -- monthsNarrow: []string{"", "s", "c", "m", "s", "d", "k", "m", "j", "s", "y", "j", "b"}, -- monthsWide: []string{"", "siilo", "colte", "mbooy", "seeɗto", "duujal", "korse", "morso", "juko", "siilto", "yarkomaa", "jolal", "bowte"}, -- daysAbbreviated: []string{"dew", "aaɓ", "maw", "nje", "naa", "mwd", "hbi"}, -- daysNarrow: []string{"d", "a", "m", "n", "n", "m", "h"}, -- daysWide: []string{"dewo", "aaɓnde", "mawbaare", "njeslaare", "naasaande", "mawnde", "hoore-biir"}, -- periodsAbbreviated: []string{"subaka", "kikiiɗe"}, -- periodsWide: []string{"subaka", "kikiiɗe"}, -- erasAbbreviated: []string{"H-I", "C-I"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Hade Iisa", "Caggal Iisa"}, -- timezones: map[string]string{"EAT": "EAT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "HNOG": "HNOG", "WITA": "WITA", "NZDT": "NZDT", "IST": "IST", "JST": "JST", "GYT": "GYT", "WEZ": "WEZ", "ACWST": "ACWST", "SAST": "SAST", "CST": "CST", "HNT": "HNT", "JDT": "JDT", "ACST": "ACST", "WART": "WART", "CDT": "CDT", "AST": "AST", "AEST": "AEST", "HEPM": "HEPM", "LHDT": "LHDT", "CLT": "CLT", "GFT": "GFT", "CAT": "CAT", "MDT": "MDT", "AKDT": "AKDT", "PST": "PST", "WESZ": "WESZ", "MEZ": "MEZ", "NZST": "NZST", "TMT": "TMT", "SGT": "SGT", "VET": "VET", "WIT": "WIT", "OESZ": "OESZ", "HENOMX": "HENOMX", "HNCU": "HNCU", "EDT": "EDT", "MST": "MST", "SRT": "SRT", "AEDT": "AEDT", "CHADT": "CHADT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HNPM": "HNPM", "LHST": "LHST", "ECT": "ECT", "WARST": "WARST", "COST": "COST", "GMT": "GMT", "ChST": "ChST", "HNEG": "HNEG", "HAST": "HAST", "ART": "ART", "EST": "EST", "AWDT": "AWDT", "HKST": "HKST", "∅∅∅": "∅∅∅", "UYT": "UYT", "HADT": "HADT", "HEOG": "HEOG", "AWST": "AWST", "HKT": "HKT", "WAT": "WAT", "HECU": "HECU", "AKST": "AKST", "PDT": "PDT", "ARST": "ARST", "BOT": "BOT", "TMST": "TMST", "WAST": "WAST", "OEZ": "OEZ", "CHAST": "CHAST", "HEEG": "HEEG", "MYT": "MYT", "UYST": "UYST", "ADT": "ADT", "BT": "BT", "HAT": "HAT", "MESZ": "MESZ", "CLST": "CLST", "ACDT": "ACDT", "COT": "COT", "WIB": "WIB"}, -+ locale: "ff_GN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "FG", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAST": "WAST", "WART": "WART", "HEOG": "HEOG", "CST": "CST", "GMT": "GMT", "OESZ": "OESZ", "MDT": "MDT", "HADT": "HADT", "ACST": "ACST", "AWDT": "AWDT", "IST": "IST", "ACWST": "ACWST", "VET": "VET", "WARST": "WARST", "COST": "COST", "CAT": "CAT", "WIB": "WIB", "NZST": "NZST", "AST": "AST", "PST": "PST", "HECU": "HECU", "HNT": "HNT", "NZDT": "NZDT", "ARST": "ARST", "HAT": "HAT", "SAST": "SAST", "GYT": "GYT", "HKT": "HKT", "ART": "ART", "CDT": "CDT", "HAST": "HAST", "MYT": "MYT", "HNPM": "HNPM", "HNPMX": "HNPMX", "AKST": "AKST", "OEZ": "OEZ", "CLST": "CLST", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "PDT": "PDT", "AKDT": "AKDT", "WIT": "WIT", "BOT": "BOT", "EAT": "EAT", "HKST": "HKST", "TMT": "TMT", "AWST": "AWST", "EST": "EST", "CLT": "CLT", "ADT": "ADT", "HEEG": "HEEG", "LHDT": "LHDT", "HEPMX": "HEPMX", "SGT": "SGT", "TMST": "TMST", "ACDT": "ACDT", "JST": "JST", "AEST": "AEST", "UYT": "UYT", "WEZ": "WEZ", "HNCU": "HNCU", "SRT": "SRT", "HENOMX": "HENOMX", "CHADT": "CHADT", "UYST": "UYST", "EDT": "EDT", "ChST": "ChST", "WAT": "WAT", "GFT": "GFT", "HNNOMX": "HNNOMX", "JDT": "JDT", "HEPM": "HEPM", "CHAST": "CHAST", "BT": "BT", "HNEG": "HNEG", "AEDT": "AEDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "WITA": "WITA", "MST": "MST", "MESZ": "MESZ", "LHST": "LHST", "ECT": "ECT", "WESZ": "WESZ", "COT": "COT"}, - } - } -  -@@ -119,7 +102,7 @@ func (ff *ff_GN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ff *ff_GN) MonthsAbbreviated() []string { -- return ff.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +112,7 @@ func (ff *ff_GN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ff *ff_GN) MonthsNarrow() []string { -- return ff.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +122,7 @@ func (ff *ff_GN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ff *ff_GN) MonthsWide() []string { -- return ff.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,58 +182,7 @@ func (ff *ff_GN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ff.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ff.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ff_GN' -@@ -259,65 +191,7 @@ func (ff *ff_GN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ff.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ff.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ff.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ff_GN' -@@ -325,17 +199,6 @@ func (ff *ff_GN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +207,6 @@ func (ff *ff_GN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +215,6 @@ func (ff *ff_GN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +223,6 @@ func (ff *ff_GN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ff.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +231,6 @@ func (ff *ff_GN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +239,6 @@ func (ff *ff_GN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +247,6 @@ func (ff *ff_GN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +255,5 @@ func (ff *ff_GN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ff.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ff_MR/ff_MR.go b/ff_MR/ff_MR.go -index af3cb35..3e17a5c 100644 ---- a/ff_MR/ff_MR.go -+++ b/ff_MR/ff_MR.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ff_MR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ff_MR' locale - func New() locales.Translator { - return &ff_MR{ -- locale: "ff_MR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "UM", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "sii", "col", "mbo", "see", "duu", "kor", "mor", "juk", "slt", "yar", "jol", "bow"}, -- monthsNarrow: []string{"", "s", "c", "m", "s", "d", "k", "m", "j", "s", "y", "j", "b"}, -- monthsWide: []string{"", "siilo", "colte", "mbooy", "seeɗto", "duujal", "korse", "morso", "juko", "siilto", "yarkomaa", "jolal", "bowte"}, -- daysAbbreviated: []string{"dew", "aaɓ", "maw", "nje", "naa", "mwd", "hbi"}, -- daysNarrow: []string{"d", "a", "m", "n", "n", "m", "h"}, -- daysWide: []string{"dewo", "aaɓnde", "mawbaare", "njeslaare", "naasaande", "mawnde", "hoore-biir"}, -- periodsAbbreviated: []string{"subaka", "kikiiɗe"}, -- periodsWide: []string{"subaka", "kikiiɗe"}, -- erasAbbreviated: []string{"H-I", "C-I"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Hade Iisa", "Caggal Iisa"}, -- timezones: map[string]string{"AST": "AST", "UYST": "UYST", "SAST": "SAST", "COST": "COST", "ACWST": "ACWST", "CLST": "CLST", "HENOMX": "HENOMX", "AEDT": "AEDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WESZ": "WESZ", "NZDT": "NZDT", "CHADT": "CHADT", "CLT": "CLT", "HNCU": "HNCU", "HECU": "HECU", "AKST": "AKST", "VET": "VET", "HEOG": "HEOG", "AWDT": "AWDT", "ECT": "ECT", "HAST": "HAST", "SRT": "SRT", "PST": "PST", "HNT": "HNT", "MEZ": "MEZ", "MESZ": "MESZ", "EST": "EST", "UYT": "UYT", "HADT": "HADT", "ART": "ART", "HNPM": "HNPM", "NZST": "NZST", "TMST": "TMST", "HNNOMX": "HNNOMX", "AWST": "AWST", "LHST": "LHST", "IST": "IST", "HEEG": "HEEG", "TMT": "TMT", "WAT": "WAT", "MST": "MST", "MDT": "MDT", "WIT": "WIT", "ACWDT": "ACWDT", "HAT": "HAT", "ARST": "ARST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "AKDT": "AKDT", "CST": "CST", "MYT": "MYT", "BT": "BT", "ACST": "ACST", "CAT": "CAT", "WARST": "WARST", "AEST": "AEST", "HKST": "HKST", "LHDT": "LHDT", "JST": "JST", "JDT": "JDT", "ACDT": "ACDT", "GFT": "GFT", "WITA": "WITA", "HNEG": "HNEG", "WAST": "WAST", "ChST": "ChST", "HNOG": "HNOG", "CDT": "CDT", "WEZ": "WEZ", "HKT": "HKT", "BOT": "BOT", "EAT": "EAT", "WART": "WART", "COT": "COT", "GYT": "GYT", "WIB": "WIB", "OEZ": "OEZ", "SGT": "SGT", "EDT": "EDT", "ADT": "ADT", "PDT": "PDT", "HEPM": "HEPM", "CHAST": "CHAST", "GMT": "GMT"}, -+ locale: "ff_MR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "UM", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MESZ": "MESZ", "CAT": "CAT", "ECT": "ECT", "WIB": "WIB", "AWDT": "AWDT", "CHADT": "CHADT", "HAT": "HAT", "WIT": "WIT", "HNOG": "HNOG", "CLST": "CLST", "CDT": "CDT", "ACST": "ACST", "HECU": "HECU", "HNPMX": "HNPMX", "PST": "PST", "PDT": "PDT", "HNEG": "HNEG", "HEEG": "HEEG", "HEPM": "HEPM", "GMT": "GMT", "CHAST": "CHAST", "HEPMX": "HEPMX", "WITA": "WITA", "MST": "MST", "ACDT": "ACDT", "LHST": "LHST", "UYT": "UYT", "UYST": "UYST", "TMT": "TMT", "NZST": "NZST", "ADT": "ADT", "LHDT": "LHDT", "IST": "IST", "SGT": "SGT", "VET": "VET", "HNT": "HNT", "HEOG": "HEOG", "CST": "CST", "HKT": "HKT", "HNPM": "HNPM", "BT": "BT", "WESZ": "WESZ", "HNCU": "HNCU", "WAT": "WAT", "WARST": "WARST", "COT": "COT", "TMST": "TMST", "ARST": "ARST", "BOT": "BOT", "MEZ": "MEZ", "AEST": "AEST", "ACWST": "ACWST", "GFT": "GFT", "AST": "AST", "HNNOMX": "HNNOMX", "AWST": "AWST", "ACWDT": "ACWDT", "WEZ": "WEZ", "WART": "WART", "GYT": "GYT", "HADT": "HADT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "AKST": "AKST", "ChST": "ChST", "NZDT": "NZDT", "JST": "JST", "WAST": "WAST", "SAST": "SAST", "COST": "COST", "EDT": "EDT", "HKST": "HKST", "CLT": "CLT", "EAT": "EAT", "JDT": "JDT", "AKDT": "AKDT", "OEZ": "OEZ", "SRT": "SRT", "HAST": "HAST", "HENOMX": "HENOMX", "MYT": "MYT", "OESZ": "OESZ", "EST": "EST", "MDT": "MDT", "ART": "ART"}, - } - } -  -@@ -119,7 +102,7 @@ func (ff *ff_MR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ff *ff_MR) MonthsAbbreviated() []string { -- return ff.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +112,7 @@ func (ff *ff_MR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ff *ff_MR) MonthsNarrow() []string { -- return ff.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +122,7 @@ func (ff *ff_MR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ff *ff_MR) MonthsWide() []string { -- return ff.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,58 +182,7 @@ func (ff *ff_MR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ff.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ff.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ff_MR' -@@ -259,65 +191,7 @@ func (ff *ff_MR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ff.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ff.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ff.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ff_MR' -@@ -325,17 +199,6 @@ func (ff *ff_MR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +207,6 @@ func (ff *ff_MR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +215,6 @@ func (ff *ff_MR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +223,6 @@ func (ff *ff_MR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ff.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/ff_SN/ff_SN.go b/ff_SN/ff_SN.go -index 48ade0d..ad53ec1 100644 ---- a/ff_SN/ff_SN.go -+++ b/ff_SN/ff_SN.go -@@ -10,62 +10,45 @@ import ( - ) -  - type ff_SN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ff_SN' locale - func New() locales.Translator { - return &ff_SN{ -- locale: "ff_SN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "sii", "col", "mbo", "see", "duu", "kor", "mor", "juk", "slt", "yar", "jol", "bow"}, -- monthsNarrow: []string{"", "s", "c", "m", "s", "d", "k", "m", "j", "s", "y", "j", "b"}, -- monthsWide: []string{"", "siilo", "colte", "mbooy", "seeɗto", "duujal", "korse", "morso", "juko", "siilto", "yarkomaa", "jolal", "bowte"}, -- daysAbbreviated: []string{"dew", "aaɓ", "maw", "nje", "naa", "mwd", "hbi"}, -- daysNarrow: []string{"d", "a", "m", "n", "n", "m", "h"}, -- daysWide: []string{"dewo", "aaɓnde", "mawbaare", "njeslaare", "naasaande", "mawnde", "hoore-biir"}, -- periodsAbbreviated: []string{"subaka", "kikiiɗe"}, -- periodsWide: []string{"subaka", "kikiiɗe"}, -- erasAbbreviated: []string{"H-I", "C-I"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Hade Iisa", "Caggal Iisa"}, -- timezones: map[string]string{"CDT": "CDT", "HEOG": "HEOG", "JDT": "JDT", "ADT": "ADT", "CHAST": "CHAST", "HAST": "HAST", "BT": "BT", "ART": "ART", "WESZ": "WESZ", "ACWST": "ACWST", "CHADT": "CHADT", "CLST": "CLST", "GFT": "GFT", "EAT": "EAT", "AST": "AST", "AWDT": "AWDT", "SAST": "SAST", "COT": "COT", "MYT": "MYT", "LHDT": "LHDT", "JST": "JST", "CLT": "CLT", "WAT": "WAT", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "MST": "MST", "PDT": "PDT", "ACWDT": "ACWDT", "TMST": "TMST", "ChST": "ChST", "AKST": "AKST", "LHST": "LHST", "MEZ": "MEZ", "IST": "IST", "HNEG": "HNEG", "HEEG": "HEEG", "EDT": "EDT", "WIB": "WIB", "AEST": "AEST", "WITA": "WITA", "HNOG": "HNOG", "HNT": "HNT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "MDT": "MDT", "UYST": "UYST", "WIT": "WIT", "SRT": "SRT", "AWST": "AWST", "HEPM": "HEPM", "CAT": "CAT", "SGT": "SGT", "HNCU": "HNCU", "HECU": "HECU", "GYT": "GYT", "VET": "VET", "BOT": "BOT", "ECT": "ECT", "PST": "PST", "MESZ": "MESZ", "NZST": "NZST", "COST": "COST", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "AKDT": "AKDT", "HKT": "HKT", "HNPM": "HNPM", "ACST": "ACST", "WART": "WART", "EST": "EST", "ARST": "ARST", "AEDT": "AEDT", "HKST": "HKST", "WAST": "WAST", "HEPMX": "HEPMX", "UYT": "UYT", "HADT": "HADT", "WEZ": "WEZ", "TMT": "TMT", "WARST": "WARST", "GMT": "GMT", "CST": "CST", "HAT": "HAT", "NZDT": "NZDT"}, -+ locale: "ff_SN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JST": "JST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HAT": "HAT", "NZDT": "NZDT", "CST": "CST", "HAST": "HAST", "CHADT": "CHADT", "HEOG": "HEOG", "HKST": "HKST", "SRT": "SRT", "HEEG": "HEEG", "ACWDT": "ACWDT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "WAT": "WAT", "HNT": "HNT", "GYT": "GYT", "AWDT": "AWDT", "WESZ": "WESZ", "CLT": "CLT", "HNPM": "HNPM", "JDT": "JDT", "IST": "IST", "COT": "COT", "EST": "EST", "EDT": "EDT", "ADT": "ADT", "ART": "ART", "HNEG": "HNEG", "AKDT": "AKDT", "OESZ": "OESZ", "TMST": "TMST", "WITA": "WITA", "HKT": "HKT", "CLST": "CLST", "AST": "AST", "HENOMX": "HENOMX", "MYT": "MYT", "AWST": "AWST", "TMT": "TMT", "WIB": "WIB", "HADT": "HADT", "MESZ": "MESZ", "ECT": "ECT", "ChST": "ChST", "LHST": "LHST", "UYST": "UYST", "VET": "VET", "WARST": "WARST", "COST": "COST", "SAST": "SAST", "HEPM": "HEPM", "AEST": "AEST", "AKST": "AKST", "WART": "WART", "MDT": "MDT", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "GFT": "GFT", "EAT": "EAT", "ACDT": "ACDT", "LHDT": "LHDT", "CHAST": "CHAST", "SGT": "SGT", "HECU": "HECU", "CAT": "CAT", "ARST": "ARST", "GMT": "GMT", "PDT": "PDT", "BT": "BT", "WAST": "WAST", "WIT": "WIT", "MST": "MST", "NZST": "NZST", "BOT": "BOT", "ACST": "ACST", "PST": "PST", "WEZ": "WEZ", "OEZ": "OEZ", "HNOG": "HNOG", "CDT": "CDT", "MEZ": "MEZ", "ACWST": "ACWST", "UYT": "UYT"}, - } - } -  -@@ -119,7 +102,7 @@ func (ff *ff_SN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ff *ff_SN) MonthsAbbreviated() []string { -- return ff.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +112,7 @@ func (ff *ff_SN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ff *ff_SN) MonthsNarrow() []string { -- return ff.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +122,7 @@ func (ff *ff_SN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ff *ff_SN) MonthsWide() []string { -- return ff.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,58 +182,7 @@ func (ff *ff_SN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ff.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ff.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ff_SN' -@@ -259,65 +191,7 @@ func (ff *ff_SN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ff.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ff.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ff.group) - 1; j >= 0; j-- { -- b = append(b, ff.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ff.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ff.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ff.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ff.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ff_SN' -@@ -325,17 +199,6 @@ func (ff *ff_SN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +207,6 @@ func (ff *ff_SN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +215,6 @@ func (ff *ff_SN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +223,6 @@ func (ff *ff_SN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ff.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ff.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +231,6 @@ func (ff *ff_SN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +239,6 @@ func (ff *ff_SN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +247,6 @@ func (ff *ff_SN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +255,5 @@ func (ff *ff_SN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ff.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ff.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fi/fi.go b/fi/fi.go -index 99ebf4d..4ad55c8 100644 ---- a/fi/fi.go -+++ b/fi/fi.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"eKr.", "jKr."}, - erasNarrow: []string{"eKr", "jKr"}, - erasWide: []string{"ennen Kristuksen syntymää", "jälkeen Kristuksen syntymän"}, -- timezones: map[string]string{"AWST": "Länsi-Australian normaaliaika", "NZDT": "Uuden-Seelannin kesäaika", "TMT": "Turkmenistanin normaaliaika", "WART": "Länsi-Argentiinan normaaliaika", "HENOMX": "Luoteis-Meksikon kesäaika", "UYT": "Uruguayn normaaliaika", "AEST": "Itä-Australian normaaliaika", "HKT": "Hongkongin normaaliaika", "CLST": "Chilen kesäaika", "OEZ": "Itä-Euroopan normaaliaika", "WAST": "Länsi-Afrikan kesäaika", "ART": "Argentiinan normaaliaika", "ACWDT": "Läntisen Keski-Australian kesäaika", "HKST": "Hongkongin kesäaika", "HNEG": "Itä-Grönlannin normaaliaika", "MST": "Macaon normaaliaika", "MDT": "Macaon kesäaika", "HEPMX": "Meksikon Tyynenmeren kesäaika", "HAST": "Havaijin-Aleuttien normaaliaika", "HEOG": "Länsi-Grönlannin kesäaika", "PST": "Yhdysvaltain Tyynenmeren normaaliaika", "MESZ": "Keski-Euroopan kesäaika", "SAST": "Etelä-Afrikan aika", "WAT": "Länsi-Afrikan normaaliaika", "WARST": "Länsi-Argentiinan kesäaika", "COT": "Kolumbian normaaliaika", "BT": "Bhutanin aika", "GMT": "Greenwichin normaaliaika", "CHADT": "Chathamin kesäaika", "EST": "Yhdysvaltain itäinen normaaliaika", "CHAST": "Chathamin normaaliaika", "WITA": "Keski-Indonesian aika", "GFT": "Ranskan Guayanan aika", "ChST": "Tšamorron aika", "BOT": "Bolivian aika", "HEEG": "Itä-Grönlannin kesäaika", "ACDT": "Keski-Australian kesäaika", "HNCU": "Kuuban normaaliaika", "WESZ": "Länsi-Euroopan kesäaika", "HNPMX": "Meksikon Tyynenmeren normaaliaika", "CST": "Yhdysvaltain keskinen normaaliaika", "HECU": "Kuuban kesäaika", "SRT": "Surinamen aika", "HNOG": "Länsi-Grönlannin normaaliaika", "NZST": "Uuden-Seelannin normaaliaika", "EDT": "Yhdysvaltain itäinen kesäaika", "CDT": "Yhdysvaltain keskinen kesäaika", "VET": "Venezuelan aika", "ACST": "Keski-Australian normaaliaika", "ECT": "Ecuadorin aika", "ADT": "Kanadan Atlantin kesäaika", "WIB": "Länsi-Indonesian aika", "AWDT": "Länsi-Australian kesäaika", "AEDT": "Itä-Australian kesäaika", "∅∅∅": "Amazonin kesäaika", "EAT": "Itä-Afrikan aika", "COST": "Kolumbian kesäaika", "SGT": "Singaporen aika", "UYST": "Uruguayn kesäaika", "HADT": "Havaijin-Aleuttien kesäaika", "JST": "Japanin normaaliaika", "GYT": "Guyanan aika", "AKST": "Alaskan normaaliaika", "ARST": "Argentiinan kesäaika", "MEZ": "Keski-Euroopan normaaliaika", "HNT": "Newfoundlandin normaaliaika", "LHDT": "Lord Howen kesäaika", "IST": "Intian aika", "CAT": "Keski-Afrikan aika", "HNPM": "Saint-Pierren ja Miquelonin normaaliaika", "HNNOMX": "Luoteis-Meksikon normaaliaika", "AKDT": "Alaskan kesäaika", "CLT": "Chilen normaaliaika", "MYT": "Malesian aika", "OESZ": "Itä-Euroopan kesäaika", "PDT": "Yhdysvaltain Tyynenmeren kesäaika", "WEZ": "Länsi-Euroopan normaaliaika", "WIT": "Itä-Indonesian aika", "ACWST": "Läntisen Keski-Australian normaaliaika", "HEPM": "Saint-Pierren ja Miquelonin kesäaika", "LHST": "Lord Howen normaaliaika", "JDT": "Japanin kesäaika", "TMST": "Turkmenistanin kesäaika", "AST": "Kanadan Atlantin normaaliaika", "HAT": "Newfoundlandin kesäaika"}, -+ timezones: map[string]string{"HEOG": "Länsi-Grönlannin kesäaika", "WITA": "Keski-Indonesian aika", "JST": "Japanin normaaliaika", "AEDT": "Itä-Australian kesäaika", "UYT": "Uruguayn normaaliaika", "HAT": "Newfoundlandin kesäaika", "HNOG": "Länsi-Grönlannin normaaliaika", "EDT": "Yhdysvaltain itäinen kesäaika", "HNNOMX": "Luoteis-Meksikon normaaliaika", "UYST": "Uruguayn kesäaika", "HECU": "Kuuban kesäaika", "NZST": "Uuden-Seelannin normaaliaika", "WIB": "Länsi-Indonesian aika", "CST": "Yhdysvaltain keskinen normaaliaika", "ARST": "Argentiinan kesäaika", "HNEG": "Itä-Grönlannin normaaliaika", "MESZ": "Keski-Euroopan kesäaika", "ACWDT": "Läntisen Keski-Australian kesäaika", "VET": "Venezuelan aika", "HEPMX": "Meksikon Tyynenmeren kesäaika", "WAST": "Länsi-Afrikan kesäaika", "EST": "Yhdysvaltain itäinen normaaliaika", "COST": "Kolumbian kesäaika", "SAST": "Etelä-Afrikan aika", "BOT": "Bolivian aika", "JDT": "Japanin kesäaika", "LHST": "Lord Howen normaaliaika", "PDT": "Yhdysvaltain Tyynenmeren kesäaika", "SGT": "Singaporen aika", "WIT": "Itä-Indonesian aika", "CLST": "Chilen kesäaika", "ART": "Argentiinan normaaliaika", "HEEG": "Itä-Grönlannin kesäaika", "HNCU": "Kuuban normaaliaika", "WEZ": "Länsi-Euroopan normaaliaika", "∅∅∅": "Amazonin kesäaika", "OESZ": "Itä-Euroopan kesäaika", "AKDT": "Alaskan kesäaika", "HEPM": "Saint-Pierren ja Miquelonin kesäaika", "AEST": "Itä-Australian normaaliaika", "AWST": "Länsi-Australian normaaliaika", "ACWST": "Läntisen Keski-Australian normaaliaika", "OEZ": "Itä-Euroopan normaaliaika", "GFT": "Ranskan Guayanan aika", "SRT": "Surinamen aika", "HNPM": "Saint-Pierren ja Miquelonin normaaliaika", "BT": "Bhutanin aika", "CHADT": "Chathamin kesäaika", "IST": "Intian aika", "HNPMX": "Meksikon Tyynenmeren normaaliaika", "HKST": "Hongkongin kesäaika", "EAT": "Itä-Afrikan aika", "AWDT": "Länsi-Australian kesäaika", "AKST": "Alaskan normaaliaika", "HKT": "Hongkongin normaaliaika", "HADT": "Havaijin-Aleuttien kesäaika", "HENOMX": "Luoteis-Meksikon kesäaika", "MYT": "Malesian aika", "GYT": "Guyanan aika", "CAT": "Keski-Afrikan aika", "ADT": "Kanadan Atlantin kesäaika", "GMT": "Greenwichin normaaliaika", "ECT": "Ecuadorin aika", "MDT": "Macaon kesäaika", "LHDT": "Lord Howen kesäaika", "HNT": "Newfoundlandin normaaliaika", "WARST": "Länsi-Argentiinan kesäaika", "TMT": "Turkmenistanin normaaliaika", "NZDT": "Uuden-Seelannin kesäaika", "WESZ": "Länsi-Euroopan kesäaika", "CLT": "Chilen normaaliaika", "CDT": "Yhdysvaltain keskinen kesäaika", "HAST": "Havaijin-Aleuttien normaaliaika", "ACDT": "Keski-Australian kesäaika", "CHAST": "Chathamin normaaliaika", "WART": "Länsi-Argentiinan normaaliaika", "COT": "Kolumbian normaaliaika", "ChST": "Tšamorron aika", "AST": "Kanadan Atlantin normaaliaika", "ACST": "Keski-Australian normaaliaika", "PST": "Yhdysvaltain Tyynenmeren normaaliaika", "WAT": "Länsi-Afrikan normaaliaika", "TMST": "Turkmenistanin kesäaika", "MST": "Macaon normaaliaika", "MEZ": "Keski-Euroopan normaaliaika"}, - } - } -  -diff --git a/fi_FI/fi_FI.go b/fi_FI/fi_FI.go -index 9c6a707..033f84d 100644 ---- a/fi_FI/fi_FI.go -+++ b/fi_FI/fi_FI.go -@@ -10,70 +10,45 @@ import ( - ) -  - type fi_FI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fi_FI' locale - func New() locales.Translator { - return &fi_FI{ -- locale: "fi_FI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "tammik.", "helmik.", "maalisk.", "huhtik.", "toukok.", "kesäk.", "heinäk.", "elok.", "syysk.", "lokak.", "marrask.", "jouluk."}, -- monthsNarrow: []string{"", "T", "H", "M", "H", "T", "K", "H", "E", "S", "L", "M", "J"}, -- monthsWide: []string{"", "tammikuuta", "helmikuuta", "maaliskuuta", "huhtikuuta", "toukokuuta", "kesäkuuta", "heinäkuuta", "elokuuta", "syyskuuta", "lokakuuta", "marraskuuta", "joulukuuta"}, -- daysAbbreviated: []string{"su", "ma", "ti", "ke", "to", "pe", "la"}, -- daysNarrow: []string{"S", "M", "T", "K", "T", "P", "L"}, -- daysShort: []string{"su", "ma", "ti", "ke", "to", "pe", "la"}, -- daysWide: []string{"sunnuntaina", "maanantaina", "tiistaina", "keskiviikkona", "torstaina", "perjantaina", "lauantaina"}, -- periodsAbbreviated: []string{"ap.", "ip."}, -- periodsNarrow: []string{"ap.", "ip."}, -- periodsWide: []string{"ap.", "ip."}, -- erasAbbreviated: []string{"eKr.", "jKr."}, -- erasNarrow: []string{"eKr", "jKr"}, -- erasWide: []string{"ennen Kristuksen syntymää", "jälkeen Kristuksen syntymän"}, -- timezones: map[string]string{"JDT": "Japanin kesäaika", "UYT": "Uruguayn normaaliaika", "UYST": "Uruguayn kesäaika", "HNT": "Newfoundlandin normaaliaika", "ACWDT": "Läntisen Keski-Australian kesäaika", "HNPM": "Saint-Pierren ja Miquelonin normaaliaika", "HENOMX": "Luoteis-Meksikon kesäaika", "PDT": "Yhdysvaltain Tyynenmeren kesäaika", "AEST": "Itä-Australian normaaliaika", "WAT": "Länsi-Afrikan normaaliaika", "AKST": "Alaskan normaaliaika", "ACWST": "Läntisen Keski-Australian normaaliaika", "NZST": "Uuden-Seelannin normaaliaika", "ECT": "Ecuadorin aika", "ART": "Argentiinan normaaliaika", "WEZ": "Länsi-Euroopan normaaliaika", "WARST": "Länsi-Argentiinan kesäaika", "COT": "Kolumbian normaaliaika", "GMT": "Greenwichin normaaliaika", "WIB": "Länsi-Indonesian aika", "LHST": "Lord Howen normaaliaika", "HEEG": "Itä-Grönlannin kesäaika", "SGT": "Singaporen aika", "HAT": "Newfoundlandin kesäaika", "HNOG": "Länsi-Grönlannin normaaliaika", "MEZ": "Keski-Euroopan normaaliaika", "HNCU": "Kuuban normaaliaika", "EDT": "Yhdysvaltain itäinen kesäaika", "MDT": "Macaon kesäaika", "CST": "Yhdysvaltain keskinen normaaliaika", "GYT": "Guyanan aika", "HADT": "Havaijin-Aleuttien kesäaika", "AWDT": "Länsi-Australian kesäaika", "HEPM": "Saint-Pierren ja Miquelonin kesäaika", "SAST": "Etelä-Afrikan aika", "JST": "Japanin normaaliaika", "CLT": "Chilen normaaliaika", "OEZ": "Itä-Euroopan normaaliaika", "HNPMX": "Meksikon Tyynenmeren normaaliaika", "HKST": "Hongkongin kesäaika", "AKDT": "Alaskan kesäaika", "WITA": "Keski-Indonesian aika", "CHADT": "Chathamin kesäaika", "NZDT": "Uuden-Seelannin kesäaika", "∅∅∅": "Amazonin kesäaika", "ACDT": "Keski-Australian kesäaika", "WAST": "Länsi-Afrikan kesäaika", "WART": "Länsi-Argentiinan normaaliaika", "SRT": "Surinamen aika", "HEOG": "Länsi-Grönlannin kesäaika", "GFT": "Ranskan Guayanan aika", "TMT": "Turkmenistanin normaaliaika", "ChST": "Tšamorron aika", "OESZ": "Itä-Euroopan kesäaika", "EST": "Yhdysvaltain itäinen normaaliaika", "ADT": "Kanadan Atlantin kesäaika", "PST": "Yhdysvaltain Tyynenmeren normaaliaika", "AWST": "Länsi-Australian normaaliaika", "HEPMX": "Meksikon Tyynenmeren kesäaika", "WESZ": "Länsi-Euroopan kesäaika", "IST": "Intian aika", "CLST": "Chilen kesäaika", "BOT": "Bolivian aika", "HNEG": "Itä-Grönlannin normaaliaika", "CAT": "Keski-Afrikan aika", "BT": "Bhutanin aika", "HKT": "Hongkongin normaaliaika", "CHAST": "Chathamin normaaliaika", "MESZ": "Keski-Euroopan kesäaika", "HNNOMX": "Luoteis-Meksikon normaaliaika", "HECU": "Kuuban kesäaika", "AST": "Kanadan Atlantin normaaliaika", "WIT": "Itä-Indonesian aika", "COST": "Kolumbian kesäaika", "VET": "Venezuelan aika", "TMST": "Turkmenistanin kesäaika", "HAST": "Havaijin-Aleuttien normaaliaika", "ARST": "Argentiinan kesäaika", "AEDT": "Itä-Australian kesäaika", "LHDT": "Lord Howen kesäaika", "ACST": "Keski-Australian normaaliaika", "EAT": "Itä-Afrikan aika", "MST": "Macaon normaaliaika", "CDT": "Yhdysvaltain keskinen kesäaika", "MYT": "Malesian aika"}, -+ locale: "fi_FI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ChST": "ChST", "EAT": "EAT", "MYT": "MYT", "JDT": "JDT", "ACWST": "ACWST", "AEDT": "AEDT", "GFT": "GFT", "CAT": "CAT", "SGT": "SGT", "VET": "VET", "EDT": "EDT", "AWDT": "AWDT", "LHDT": "LHDT", "WARST": "WARST", "GYT": "GYT", "HADT": "HADT", "HNEG": "HNEG", "CLT": "CLT", "CST": "CST", "HKST": "HKST", "CLST": "CLST", "HNCU": "HNCU", "WAST": "WAST", "HNOG": "HNOG", "HEOG": "HEOG", "ECT": "ECT", "AST": "AST", "HNT": "HNT", "COST": "COST", "∅∅∅": "∅∅∅", "NZDT": "NZDT", "MST": "MST", "HAST": "HAST", "UYT": "UYT", "WESZ": "WESZ", "OEZ": "OEZ", "TMT": "TMT", "WIT": "WIT", "HKT": "HKT", "ADT": "ADT", "GMT": "GMT", "BT": "BT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HAT": "HAT", "IST": "IST", "TMST": "TMST", "HNPM": "HNPM", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "CHADT": "CHADT", "ACWDT": "ACWDT", "EST": "EST", "WIB": "WIB", "SAST": "SAST", "MDT": "MDT", "ART": "ART", "BOT": "BOT", "MEZ": "MEZ", "MESZ": "MESZ", "AKST": "AKST", "WART": "WART", "PST": "PST", "AEST": "AEST", "HNPMX": "HNPMX", "NZST": "NZST", "SRT": "SRT", "COT": "COT", "WITA": "WITA", "HEEG": "HEEG", "AWST": "AWST", "JST": "JST", "PDT": "PDT", "WAT": "WAT", "AKDT": "AKDT", "WEZ": "WEZ", "HENOMX": "HENOMX", "CDT": "CDT", "ACST": "ACST", "CHAST": "CHAST", "UYST": "UYST", "HECU": "HECU", "ARST": "ARST", "LHST": "LHST"}, - } - } -  -@@ -127,7 +102,7 @@ func (fi *fi_FI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fi *fi_FI) MonthsAbbreviated() []string { -- return fi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -137,7 +112,7 @@ func (fi *fi_FI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fi *fi_FI) MonthsNarrow() []string { -- return fi.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -147,7 +122,7 @@ func (fi *fi_FI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fi *fi_FI) MonthsWide() []string { -- return fi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,81 +168,13 @@ func (fi *fi_FI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fi_FI' and handles both Whole and Real numbers based on 'v' - func (fi *fi_FI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fi.group) - 1; j >= 0; j-- { -- b = append(b, fi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fi.minus) - 1; j >= 0; j-- { -- b = append(b, fi.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fi_FI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fi *fi_FI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fi.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fi.minus) - 1; j >= 0; j-- { -- b = append(b, fi.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fi.percentSuffix...) -- -- b = append(b, fi.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fi_FI' -@@ -275,60 +182,7 @@ func (fi *fi_FI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fi.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fi.group) - 1; j >= 0; j-- { -- b = append(b, fi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fi.minus) - 1; j >= 0; j-- { -- b = append(b, fi.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fi.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fi_FI' -@@ -337,67 +191,7 @@ func (fi *fi_FI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fi.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fi.group) - 1; j >= 0; j-- { -- b = append(b, fi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(fi.minus) - 1; j >= 0; j-- { -- b = append(b, fi.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fi.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fi.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fi_FI' -@@ -405,17 +199,6 @@ func (fi *fi_FI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -424,17 +207,6 @@ func (fi *fi_FI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +215,6 @@ func (fi *fi_FI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, fi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,18 +223,6 @@ func (fi *fi_FI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x63, 0x63, 0x63, 0x63, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, fi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,15 +231,6 @@ func (fi *fi_FI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -499,22 +239,6 @@ func (fi *fi_FI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -523,26 +247,6 @@ func (fi *fi_FI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -551,30 +255,5 @@ func (fi *fi_FI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fi.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fil/fil.go b/fil/fil.go -index 1c20afa..00852fb 100644 ---- a/fil/fil.go -+++ b/fil/fil.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"BC", "AD"}, -- timezones: map[string]string{"MDT": "MDT", "HEOG": "Oras sa Tag-init ng Kanlurang Greenland", "HKT": "Standard na Oras sa Hong Kong", "MESZ": "Oras sa Tag-init ng Gitnang Europe", "CLST": "Oras sa Tag-init ng Chile", "WART": "Standard na Oras sa Kanlurang Argentina", "COT": "Standard na Oras sa Colombia", "EST": "Eastern na Standard na Oras", "ACWST": "Standard Time ng Gitnang Kanluran ng Australya", "HAT": "Daylight Time sa Newfoundland", "AEST": "Standard Time ng Silangang Australya", "ChST": "Standard na Oras sa Chamorro", "HECU": "Daylight Time sa Cuba", "AKDT": "Daylight Time sa Alaska", "AST": "Standard na Oras sa Atlantiko", "WESZ": "Oras sa Tag-init ng Kanlurang Europe", "OEZ": "Standard na Oras sa Silangang Europe", "HNNOMX": "Standard na Oras sa Hilagang-kanlurang Mexico", "AKST": "Standard na Oras sa Alaska", "MYT": "Oras ng Malaysia", "UYT": "Standard na Oras sa Uruguay", "WIB": "Oras ng Kanlurang Indonesiya", "BT": "Oras sa Bhutan", "ART": "Standard na Oras sa Argentina", "CAT": "Oras sa Gitnang Africa", "SGT": "Standard na Oras sa Singapore", "CDT": "Sentral na Daylight Time", "SAST": "Oras sa Timog Africa", "HEEG": "Oras sa Tag-init ng Silangang Greenland", "HEPM": "Daylight Time sa Saint Pierre and Miquelon", "CHAST": "Standard na Oras sa Chatham", "IST": "Standard na Oras sa Bhutan", "CLT": "Standard na Oras sa Chile", "HNEG": "Standard na Oras sa Silangang Greenland", "WIT": "Oras ng Silangang Indonesiya", "VET": "Oras sa Venezuela", "AWDT": "Daylight Time sa Kanlurang Australya", "∅∅∅": "Oras sa Tag-init ng Peru", "NZDT": "Daylight Time sa New Zealand", "HAST": "Standard na Oras sa Hawaii-Aleutian", "PDT": "Daylight Time sa Pasipiko", "ACDT": "Daylight Time ng Gitnang Australya", "CST": "Sentral na Karaniwang Oras", "GYT": "Oras sa Guyana", "TMT": "Standard na Oras sa Turkmenistan", "AEDT": "Daylight Time ng Silangang Australya", "NZST": "Standard na Oras sa New Zealand", "BOT": "Oras sa Bolivia", "EDT": "Eastern Daylight Time", "HADT": "Oras sa Tag-init ng Hawaii-Aleutian", "HKST": "Oras sa Tag-init ng Hong Kong", "COST": "Oras sa Tag-init ng Colombia", "HNPMX": "Standard na Oras sa Pasipiko ng Mexico", "HNT": "Standard na Oras sa Newfoundland", "HENOMX": "Daylight Time sa Hilagang-kanlurang Mexico", "WEZ": "Standard na Oras sa Kanlurang Europe", "ARST": "Oras sa Tag-init ng Argentina", "HNPM": "Standard na Oras sa Saint Pierre and Miquelon", "LHDT": "Daylight Time sa Lorde Howe", "ECT": "Oras sa Ecuador", "GMT": "Greenwich Mean Time", "UYST": "Oras sa Tag-init ng Uruguay", "AWST": "Standard Time ng Kanlurang Australya", "JST": "Standard na Oras sa Japan", "GFT": "Oras sa French Guiana", "OESZ": "Oras sa Tag-init ng Silangang Europe", "EAT": "Oras sa Silangang Africa", "WITA": "Oras ng Gitnang Indonesiya", "WARST": "Oras sa Tag-init ng Kanlurang Argentina", "ACWDT": "Daylight Time ng Gitnang Kanluran ng Australya", "ACST": "Standard Time ng Gitnang Australya", "SRT": "Oras sa Suriname", "HNOG": "Standard na Oras sa Kanlurang Greenland", "PST": "Standard na Oras sa Pasipiko", "CHADT": "Daylight Time sa Chatham", "MEZ": "Standard na Oras sa Gitnang Europe", "WAST": "Oras sa Tag-init ng Kanlurang Africa", "HNCU": "Standard na Oras sa Cuba", "ADT": "Daylight Time sa Atlantiko", "LHST": "Standard na Oras sa Lord Howe", "JDT": "Daylight Time sa Japan", "TMST": "Oras sa Tag-init ng Turkmenistan", "WAT": "Standard na Oras sa Kanlurang Africa", "HEPMX": "Daylight Time sa Pasipiko ng Mexico", "MST": "MST"}, -+ timezones: map[string]string{"WARST": "Oras sa Tag-init ng Kanlurang Argentina", "COST": "Oras sa Tag-init ng Colombia", "ChST": "Standard na Oras sa Chamorro", "UYST": "Oras sa Tag-init ng Uruguay", "HNT": "Standard na Oras sa Newfoundland", "CLST": "Oras sa Tag-init ng Chile", "CST": "Sentral na Karaniwang Oras", "HNPM": "Standard na Oras sa Saint Pierre and Miquelon", "AEDT": "Daylight Time ng Silangang Australya", "OESZ": "Oras sa Tag-init ng Silangang Europe", "WIB": "Oras ng Kanlurang Indonesiya", "HADT": "Oras sa Tag-init ng Hawaii-Aleutian", "LHST": "Standard na Oras sa Lord Howe", "PDT": "Daylight Time sa Pasipiko", "CHAST": "Standard na Oras sa Chatham", "SAST": "Oras sa Timog Africa", "GYT": "Oras sa Guyana", "COT": "Standard na Oras sa Colombia", "∅∅∅": "Oras sa Tag-init ng Brasilia", "GMT": "Greenwich Mean Time", "ART": "Standard na Oras sa Argentina", "CHADT": "Daylight Time sa Chatham", "BT": "Oras sa Bhutan", "ACWST": "Standard Time ng Gitnang Kanluran ng Australya", "HECU": "Daylight Time sa Cuba", "WAT": "Standard na Oras sa Kanlurang Africa", "WAST": "Oras sa Tag-init ng Kanlurang Africa", "CAT": "Oras sa Gitnang Africa", "ECT": "Oras sa Ecuador", "MEZ": "Standard na Oras sa Gitnang Europe", "TMST": "Oras sa Tag-init ng Turkmenistan", "ARST": "Oras sa Tag-init ng Argentina", "ACDT": "Daylight Time ng Gitnang Australya", "HEPMX": "Daylight Time sa Pasipiko ng Mexico", "HAT": "Daylight Time sa Newfoundland", "WITA": "Oras ng Gitnang Indonesiya", "NZDT": "Daylight Time sa New Zealand", "HEEG": "Oras sa Tag-init ng Silangang Greenland", "JDT": "Daylight Time sa Japan", "AKST": "Standard na Oras sa Alaska", "HNOG": "Standard na Oras sa Kanlurang Greenland", "EST": "Eastern na Standard na Oras", "HKT": "Standard na Oras sa Hong Kong", "CDT": "Sentral na Daylight Time", "HAST": "Standard na Oras sa Hawaii-Aleutian", "ACST": "Standard Time ng Gitnang Australya", "HNNOMX": "Standard na Oras sa Hilagang-kanlurang Mexico", "HENOMX": "Daylight Time sa Hilagang-kanlurang Mexico", "AEST": "Standard Time ng Silangang Australya", "WESZ": "Oras sa Tag-init ng Kanlurang Europe", "OEZ": "Standard na Oras sa Silangang Europe", "MDT": "MDT", "ADT": "Daylight Time sa Atlantiko", "AWDT": "Daylight Time sa Kanlurang Australya", "SRT": "Oras sa Suriname", "EAT": "Oras sa Silangang Africa", "AWST": "Standard Time ng Kanlurang Australya", "LHDT": "Daylight Time sa Lorde Howe", "HEPM": "Daylight Time sa Saint Pierre and Miquelon", "JST": "Standard na Oras sa Japan", "IST": "Standard na Oras sa Bhutan", "SGT": "Standard na Oras sa Singapore", "HNCU": "Standard na Oras sa Cuba", "WIT": "Oras ng Silangang Indonesiya", "AST": "Standard na Oras sa Atlantiko", "GFT": "Oras sa French Guiana", "CLT": "Standard na Oras sa Chile", "HNEG": "Standard na Oras sa Silangang Greenland", "PST": "Standard na Oras sa Pasipiko", "ACWDT": "Daylight Time ng Gitnang Kanluran ng Australya", "HNPMX": "Standard na Oras sa Pasipiko ng Mexico", "EDT": "Eastern Daylight Time", "TMT": "Standard na Oras sa Turkmenistan", "BOT": "Oras sa Bolivia", "MESZ": "Oras sa Tag-init ng Gitnang Europe", "AKDT": "Daylight Time sa Alaska", "HKST": "Oras sa Tag-init ng Hong Kong", "MST": "MST", "NZST": "Standard na Oras sa New Zealand", "WEZ": "Standard na Oras sa Kanlurang Europe", "VET": "Oras sa Venezuela", "WART": "Standard na Oras sa Kanlurang Argentina", "HEOG": "Oras sa Tag-init ng Kanlurang Greenland", "MYT": "Oras ng Malaysia", "UYT": "Standard na Oras sa Uruguay"}, - } - } -  -diff --git a/fil_PH/fil_PH.go b/fil_PH/fil_PH.go -index 9d90635..788a7aa 100644 ---- a/fil_PH/fil_PH.go -+++ b/fil_PH/fil_PH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type fil_PH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fil_PH' locale - func New() locales.Translator { - return &fil_PH{ -- locale: "fil_PH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Ene", "Peb", "Mar", "Abr", "May", "Hun", "Hul", "Ago", "Set", "Okt", "Nob", "Dis"}, -- monthsNarrow: []string{"", "Ene", "Peb", "Mar", "Abr", "May", "Hun", "Hul", "Ago", "Set", "Okt", "Nob", "Dis"}, -- monthsWide: []string{"", "Enero", "Pebrero", "Marso", "Abril", "Mayo", "Hunyo", "Hulyo", "Agosto", "Setyembre", "Oktubre", "Nobyembre", "Disyembre"}, -- daysAbbreviated: []string{"Lin", "Lun", "Mar", "Miy", "Huw", "Biy", "Sab"}, -- daysNarrow: []string{"Lin", "Lun", "Mar", "Miy", "Huw", "Biy", "Sab"}, -- daysShort: []string{"Li", "Lu", "Ma", "Mi", "Hu", "Bi", "Sa"}, -- daysWide: []string{"Linggo", "Lunes", "Martes", "Miyerkules", "Huwebes", "Biyernes", "Sabado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"BC", "AD"}, -- timezones: map[string]string{"AEDT": "Daylight Time ng Silangang Australya", "NZDT": "Daylight Time sa New Zealand", "ACDT": "Daylight Time ng Gitnang Australya", "HENOMX": "Daylight Time sa Hilagang-kanlurang Mexico", "VET": "Oras sa Venezuela", "OESZ": "Oras sa Tag-init ng Silangang Europe", "WARST": "Oras sa Tag-init ng Kanlurang Argentina", "ARST": "Oras sa Tag-init ng Argentina", "HAT": "Daylight Time sa Newfoundland", "JST": "Standard na Oras sa Japan", "HECU": "Daylight Time sa Cuba", "GMT": "Greenwich Mean Time", "ACWST": "Standard Time ng Gitnang Kanluran ng Australya", "ADT": "Daylight Time sa Atlantiko", "UYT": "Standard na Oras sa Uruguay", "WIB": "Oras ng Kanlurang Indonesiya", "SRT": "Oras sa Suriname", "LHDT": "Daylight Time sa Lorde Howe", "IST": "Standard na Oras sa Bhutan", "GFT": "Oras sa French Guiana", "EST": "Eastern na Standard na Oras", "HNOG": "Standard na Oras sa Kanlurang Greenland", "WAT": "Standard na Oras sa Kanlurang Africa", "ECT": "Oras sa Ecuador", "HKST": "Oras sa Tag-init ng Hong Kong", "BT": "Oras sa Bhutan", "HNPM": "Standard na Oras sa Saint Pierre and Miquelon", "EDT": "Eastern Daylight Time", "AKST": "Standard na Oras sa Alaska", "WIT": "Oras ng Silangang Indonesiya", "MDT": "MDT", "AWDT": "Daylight Time sa Kanlurang Australya", "WART": "Standard na Oras sa Kanlurang Argentina", "WESZ": "Oras sa Tag-init ng Kanlurang Europe", "HKT": "Standard na Oras sa Hong Kong", "WITA": "Oras ng Gitnang Indonesiya", "CHAST": "Standard na Oras sa Chatham", "JDT": "Daylight Time sa Japan", "TMST": "Oras sa Tag-init ng Turkmenistan", "HNNOMX": "Standard na Oras sa Hilagang-kanlurang Mexico", "AEST": "Standard Time ng Silangang Australya", "LHST": "Standard na Oras sa Lord Howe", "HNEG": "Standard na Oras sa Silangang Greenland", "HNPMX": "Standard na Oras sa Pasipiko ng Mexico", "ART": "Standard na Oras sa Argentina", "AST": "Standard na Oras sa Atlantiko", "MYT": "Oras ng Malaysia", "PST": "Standard na Oras sa Pasipiko", "HEPM": "Daylight Time sa Saint Pierre and Miquelon", "CLST": "Oras sa Tag-init ng Chile", "COT": "Standard na Oras sa Colombia", "HNCU": "Standard na Oras sa Cuba", "HADT": "Oras sa Tag-init ng Hawaii-Aleutian", "NZST": "Standard na Oras sa New Zealand", "MESZ": "Oras sa Tag-init ng Gitnang Europe", "∅∅∅": "Oras sa Tag-init ng Amazon", "COST": "Oras sa Tag-init ng Colombia", "CST": "Sentral na Karaniwang Oras", "HAST": "Standard na Oras sa Hawaii-Aleutian", "MEZ": "Standard na Oras sa Gitnang Europe", "SAST": "Oras sa Timog Africa", "OEZ": "Standard na Oras sa Silangang Europe", "CAT": "Oras sa Gitnang Africa", "GYT": "Oras sa Guyana", "ACWDT": "Daylight Time ng Gitnang Kanluran ng Australya", "HNT": "Standard na Oras sa Newfoundland", "PDT": "Daylight Time sa Pasipiko", "HEEG": "Oras sa Tag-init ng Silangang Greenland", "ACST": "Standard Time ng Gitnang Australya", "WAST": "Oras sa Tag-init ng Kanlurang Africa", "MST": "MST", "AWST": "Standard Time ng Kanlurang Australya", "CHADT": "Daylight Time sa Chatham", "CDT": "Sentral na Daylight Time", "HEPMX": "Daylight Time sa Pasipiko ng Mexico", "HEOG": "Oras sa Tag-init ng Kanlurang Greenland", "WEZ": "Standard na Oras sa Kanlurang Europe", "TMT": "Standard na Oras sa Turkmenistan", "ChST": "Standard na Oras sa Chamorro", "BOT": "Oras sa Bolivia", "EAT": "Oras sa Silangang Africa", "CLT": "Standard na Oras sa Chile", "SGT": "Standard na Oras sa Singapore", "AKDT": "Daylight Time sa Alaska", "UYST": "Oras sa Tag-init ng Uruguay"}, -+ locale: "fil_PH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COST": "COST", "HKT": "HKT", "TMST": "TMST", "CAT": "CAT", "CLT": "CLT", "HAST": "HAST", "JST": "JST", "HAT": "HAT", "ADT": "ADT", "OESZ": "OESZ", "ARST": "ARST", "UYT": "UYT", "AEDT": "AEDT", "HECU": "HECU", "WESZ": "WESZ", "COT": "COT", "MDT": "MDT", "GMT": "GMT", "MYT": "MYT", "∅∅∅": "∅∅∅", "CHAST": "CHAST", "CST": "CST", "ChST": "ChST", "AWDT": "AWDT", "HEPM": "HEPM", "ACWST": "ACWST", "AKST": "AKST", "GYT": "GYT", "HEOG": "HEOG", "ACST": "ACST", "ACDT": "ACDT", "WAT": "WAT", "WITA": "WITA", "MST": "MST", "NZDT": "NZDT", "BOT": "BOT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "EST": "EST", "CLST": "CLST", "NZST": "NZST", "SRT": "SRT", "EDT": "EDT", "WIB": "WIB", "JDT": "JDT", "PDT": "PDT", "HNCU": "HNCU", "OEZ": "OEZ", "ECT": "ECT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "HKST": "HKST", "EAT": "EAT", "LHST": "LHST", "WARST": "WARST", "AKDT": "AKDT", "HNOG": "HNOG", "LHDT": "LHDT", "HNPM": "HNPM", "ACWDT": "ACWDT", "AWST": "AWST", "SGT": "SGT", "GFT": "GFT", "ART": "ART", "HADT": "HADT", "HNEG": "HNEG", "HEEG": "HEEG", "UYST": "UYST", "AEST": "AEST", "WAST": "WAST", "WART": "WART", "AST": "AST", "HENOMX": "HENOMX", "IST": "IST", "VET": "VET", "CHADT": "CHADT", "SAST": "SAST", "HNT": "HNT", "WIT": "WIT", "TMT": "TMT", "CDT": "CDT", "MEZ": "MEZ", "PST": "PST", "BT": "BT"}, - } - } -  -@@ -148,7 +125,7 @@ func (fil *fil_PH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fil *fil_PH) MonthsAbbreviated() []string { -- return fil.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -158,7 +135,7 @@ func (fil *fil_PH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fil *fil_PH) MonthsNarrow() []string { -- return fil.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -168,7 +145,7 @@ func (fil *fil_PH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fil *fil_PH) MonthsWide() []string { -- return fil.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -214,73 +191,13 @@ func (fil *fil_PH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fil_PH' and handles both Whole and Real numbers based on 'v' - func (fil *fil_PH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fil.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fil.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fil.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fil_PH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fil *fil_PH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fil.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fil.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fil.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fil_PH' -@@ -288,56 +205,7 @@ func (fil *fil_PH) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fil.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fil.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fil.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, fil.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fil.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fil_PH' -@@ -346,68 +214,7 @@ func (fil *fil_PH) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fil.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fil.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fil.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, fil.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fil.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fil.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fil_PH' -@@ -415,17 +222,6 @@ func (fil *fil_PH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -434,17 +230,6 @@ func (fil *fil_PH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fil.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -453,17 +238,6 @@ func (fil *fil_PH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fil.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,19 +246,6 @@ func (fil *fil_PH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fil.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, fil.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -493,28 +254,6 @@ func (fil *fil_PH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, fil.periodsAbbreviated[0]...) -- } else { -- b = append(b, fil.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -523,35 +262,6 @@ func (fil *fil_PH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, fil.periodsAbbreviated[0]...) -- } else { -- b = append(b, fil.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -560,40 +270,6 @@ func (fil *fil_PH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, fil.periodsAbbreviated[0]...) -- } else { -- b = append(b, fil.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,44 +278,5 @@ func (fil *fil_PH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fil.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, fil.periodsAbbreviated[0]...) -- } else { -- b = append(b, fil.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fil.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fo/fo.go b/fo/fo.go -index 88bfff8..90f3350 100644 ---- a/fo/fo.go -+++ b/fo/fo.go -@@ -75,7 +75,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "e.Kr."}, - erasNarrow: []string{"fKr", "eKr"}, - erasWide: []string{"fyri Krist", "eftir Krist"}, -- timezones: map[string]string{"WIB": "Vestur Indonesia tíð", "HKST": "Hong Kong summartíð", "HNPM": "St. Pierre & Miquelon vanlig tíð", "LHDT": "Lord Howe summartíð", "AKDT": "Alaska summartíð", "COST": "Kolombia summartíð", "CST": "Central vanlig tíð", "BT": "Butan tíð", "HAT": "Newfoundland summartíð", "MESZ": "Miðevropa summartíð", "JDT": "Japan summartíð", "OESZ": "Eysturevropa summartíð", "HAST": "Hawaii-Aleutian vanlig tíð", "SRT": "Surinam tíð", "HEPM": "St. Pierre & Miquelon summartíð", "AST": "Atlantic vanlig tíð", "UYST": "Uruguai summartíð", "HNOG": "Vestur grønlendsk vanlig tíð", "NZDT": "Nýsæland summartíð", "TMT": "Turkmenistan vanlig tíð", "OEZ": "Eysturevropa vanlig tíð", "HNPMX": "Mexican Pacific vanlig tíð", "MDT": "Mountain summartíð", "WESZ": "Vesturevropa summartíð", "AWDT": "vestur Avstralia summartíð", "IST": "India tíð", "WAT": "Vesturafrika vanlig tíð", "HNEG": "Eystur grønlendsk vanlig tíð", "HNCU": "Cuba vanlig tíð", "ADT": "Atlantic summartíð", "MST": "Mountain vanlig tíð", "ARST": "Argentina summartíð", "PST": "Pacific vanlig tíð", "AEST": "eystur Avstralia vanlig tíð", "JST": "Japan vanlig tíð", "PDT": "Pacific summartíð", "HNNOMX": "Northwest Mexico vanlig tíð", "ECT": "Ekvador tíð", "MYT": "Malaisia tíð", "UYT": "Uruguai vanlig tíð", "VET": "Venesuela tíð", "CHADT": "Chatham summartíð", "SAST": "Suðurafrika vanlig tíð", "CLT": "Kili vanlig tíð", "CLST": "Kili summartíð", "ACWDT": "miðvestur Avstralia summartíð", "CHAST": "Chatham vanlig tíð", "BOT": "Bolivia tíð", "HENOMX": "Northwest Mexico summartíð", "CDT": "Central summartíð", "ACWST": "miðvestur Avstralia vanlig tíð", "ART": "Argentina vanlig tíð", "HKT": "Hong Kong vanlig tíð", "AEDT": "eystur Avstralia summartíð", "COT": "Kolombia vanlig tíð", "WIT": "Eystur Indonesia tíð", "WITA": "Mið Indonesia tíð", "∅∅∅": "Amasona summartíð", "EAT": "Eysturafrika tíð", "EST": "Eastern vanlig tíð", "HADT": "Hawaii-Aleutian summartíð", "WEZ": "Vesturevropa vanlig tíð", "LHST": "Lord Howe vanlig tíð", "WART": "Vestur Argentina vanlig tíð", "HECU": "Cuba summartíð", "HEPMX": "Mexican Pacific summartíð", "GYT": "Gujana tíð", "HEOG": "Vestur grønlendsk summartíð", "AWST": "vestur Avstralia vanlig tíð", "GFT": "Franska Gujana tíð", "ChST": "Chamorro vanlig tíð", "SGT": "Singapor tíð", "NZST": "Nýsæland vanlig tíð", "WAST": "Vesturafrika summartíð", "EDT": "Eastern summartíð", "HNT": "Newfoundland vanlig tíð", "TMST": "Turkmenistan summartíð", "ACST": "mið Avstralia vanlig tíð", "CAT": "Miðafrika tíð", "AKST": "Alaska vanlig tíð", "MEZ": "Miðevropa vanlig tíð", "HEEG": "Eystur grønlendsk summartíð", "ACDT": "mið Avstralia summartíð", "WARST": "Vestur Argentina summartíð", "GMT": "Greenwich Mean tíð"}, -+ timezones: map[string]string{"MST": "MST", "ChST": "Chamorro vanlig tíð", "BOT": "Bolivia tíð", "HAST": "Hawaii-Aleutian vanlig tíð", "HNEG": "Eystur grønlendsk vanlig tíð", "HNNOMX": "Northwest Mexico vanlig tíð", "∅∅∅": "Brasilia summartíð", "HKST": "Hong Kong summartíð", "AKDT": "Alaska summartíð", "HNT": "Newfoundland vanlig tíð", "HAT": "Newfoundland summartíð", "HENOMX": "Northwest Mexico summartíð", "AEST": "eystur Avstralia vanlig tíð", "GYT": "Gujana tíð", "WAT": "Vesturafrika vanlig tíð", "LHST": "Lord Howe vanlig tíð", "LHDT": "Lord Howe summartíð", "CHADT": "Chatham summartíð", "ACWDT": "miðvestur Avstralia summartíð", "WESZ": "Vesturevropa summartíð", "HEOG": "Vestur grønlendsk summartíð", "EST": "Eastern vanlig tíð", "AST": "Atlantic vanlig tíð", "JST": "Japan vanlig tíð", "OESZ": "Eysturevropa summartíð", "HNOG": "Vestur grønlendsk vanlig tíð", "MDT": "MDT", "CHAST": "Chatham vanlig tíð", "WARST": "Vestur Argentina summartíð", "CLT": "Kili vanlig tíð", "WITA": "Mið Indonesia tíð", "HNPM": "St. Pierre & Miquelon vanlig tíð", "CLST": "Kili summartíð", "MESZ": "Miðevropa summartíð", "HEPM": "St. Pierre & Miquelon summartíð", "WEZ": "Vesturevropa vanlig tíð", "VET": "Venesuela tíð", "HEPMX": "Mexican Pacific summartíð", "HADT": "Hawaii-Aleutian summartíð", "HEEG": "Eystur grønlendsk summartíð", "WAST": "Vesturafrika summartíð", "SRT": "Surinam tíð", "HNPMX": "Mexican Pacific vanlig tíð", "NZST": "Nýsæland vanlig tíð", "NZDT": "Nýsæland summartíð", "ART": "Argentina vanlig tíð", "AWST": "vestur Avstralia vanlig tíð", "AWDT": "vestur Avstralia summartíð", "ACWST": "miðvestur Avstralia vanlig tíð", "COST": "Kolombia summartíð", "HKT": "Hong Kong vanlig tíð", "AEDT": "eystur Avstralia summartíð", "MEZ": "Miðevropa vanlig tíð", "UYST": "Uruguai summartíð", "PDT": "Pacific summartíð", "EDT": "Eastern summartíð", "GMT": "Greenwich Mean tíð", "HNCU": "Cuba vanlig tíð", "WIB": "Vestur Indonesia tíð", "IST": "India tíð", "TMST": "Turkmenistan summartíð", "CDT": "Central summartíð", "GFT": "Franska Gujana tíð", "SAST": "Suðurafrika vanlig tíð", "COT": "Kolombia vanlig tíð", "PST": "Pacific vanlig tíð", "WIT": "Eystur Indonesia tíð", "TMT": "Turkmenistan vanlig tíð", "JDT": "Japan summartíð", "ARST": "Argentina summartíð", "ACDT": "mið Avstralia summartíð", "UYT": "Uruguai vanlig tíð", "BT": "Butan tíð", "SGT": "Singapor tíð", "WART": "Vestur Argentina vanlig tíð", "CST": "Central vanlig tíð", "ADT": "Atlantic summartíð", "AKST": "Alaska vanlig tíð", "OEZ": "Eysturevropa vanlig tíð", "ECT": "Ekvador tíð", "ACST": "mið Avstralia vanlig tíð", "MYT": "Malaisia tíð", "HECU": "Cuba summartíð", "CAT": "Miðafrika tíð", "EAT": "Eysturafrika tíð"}, - } - } -  -diff --git a/fo_DK/fo_DK.go b/fo_DK/fo_DK.go -index 84d2454..61b5f54 100644 ---- a/fo_DK/fo_DK.go -+++ b/fo_DK/fo_DK.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fo_DK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fo_DK' locale - func New() locales.Translator { - return &fo_DK{ -- locale: "fo_DK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "kr.", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "mars", "apríl", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"}, -- daysAbbreviated: []string{"sun.", "mán.", "týs.", "mik.", "hós.", "frí.", "ley."}, -- daysNarrow: []string{"S", "M", "T", "M", "H", "F", "L"}, -- daysShort: []string{"su.", "má.", "tý.", "mi.", "hó.", "fr.", "le."}, -- daysWide: []string{"sunnudagur", "mánadagur", "týsdagur", "mikudagur", "hósdagur", "fríggjadagur", "leygardagur"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"fKr", "eKr"}, -- erasWide: []string{"fyri Krist", "eftir Krist"}, -- timezones: map[string]string{"∅∅∅": "Amasona summartíð", "HNPMX": "Mexican Pacific vanlig tíð", "WEZ": "Vesturevropa vanlig tíð", "LHST": "Lord Howe vanlig tíð", "CHAST": "Chatham vanlig tíð", "CHADT": "Chatham summartíð", "CAT": "Miðafrika tíð", "MDT": "MDT", "UYT": "Uruguai vanlig tíð", "ARST": "Argentina summartíð", "TMT": "Turkmenistan vanlig tíð", "TMST": "Turkmenistan summartíð", "WART": "Vestur Argentina vanlig tíð", "WARST": "Vestur Argentina summartíð", "VET": "Venesuela tíð", "BT": "Butan tíð", "SRT": "Surinam tíð", "IST": "India tíð", "OEZ": "Eysturevropa vanlig tíð", "GFT": "Franska Gujana tíð", "EAT": "Eysturafrika tíð", "COST": "Kolombia summartíð", "EDT": "Eastern summartíð", "MST": "MST", "MESZ": "Miðevropa summartíð", "NZST": "Nýsæland vanlig tíð", "CLT": "Kili vanlig tíð", "SGT": "Singapor tíð", "CLST": "Kili summartíð", "ACST": "mið Avstralia vanlig tíð", "ACDT": "mið Avstralia summartíð", "HNNOMX": "Northwest Mexico vanlig tíð", "CST": "Central vanlig tíð", "WIB": "Vestur Indonesia tíð", "ART": "Argentina vanlig tíð", "HEPM": "St. Pierre & Miquelon summartíð", "OESZ": "Eysturevropa summartíð", "HEPMX": "Mexican Pacific summartíð", "HADT": "Hawaii-Aleutian summartíð", "AWST": "vestur Avstralia vanlig tíð", "NZDT": "Nýsæland summartíð", "HEEG": "Eystur grønlendsk summartíð", "WAST": "Vesturafrika summartíð", "AKDT": "Alaska summartíð", "HAST": "Hawaii-Aleutian vanlig tíð", "HNEG": "Eystur grønlendsk vanlig tíð", "HENOMX": "Northwest Mexico summartíð", "HEOG": "Vestur grønlendsk summartíð", "WITA": "Mið Indonesia tíð", "ChST": "Chamorro vanlig tíð", "WIT": "Eystur Indonesia tíð", "HNOG": "Vestur grønlendsk vanlig tíð", "AEDT": "eystur Avstralia summartíð", "HKST": "Hong Kong summartíð", "ECT": "Ekvador tíð", "GMT": "Greenwich Mean tíð", "HNCU": "Cuba vanlig tíð", "AST": "Atlantic vanlig tíð", "PDT": "Pacific summartíð", "LHDT": "Lord Howe summartíð", "WAT": "Vesturafrika vanlig tíð", "AKST": "Alaska vanlig tíð", "ADT": "Atlantic summartíð", "GYT": "Gujana tíð", "BOT": "Bolivia tíð", "HECU": "Cuba summartíð", "EST": "Eastern vanlig tíð", "UYST": "Uruguai summartíð", "AEST": "eystur Avstralia vanlig tíð", "MEZ": "Miðevropa vanlig tíð", "SAST": "Suðurafrika vanlig tíð", "JDT": "Japan summartíð", "PST": "Pacific vanlig tíð", "WESZ": "Vesturevropa summartíð", "ACWDT": "miðvestur Avstralia summartíð", "HNT": "Newfoundland vanlig tíð", "HAT": "Newfoundland summartíð", "HKT": "Hong Kong vanlig tíð", "JST": "Japan vanlig tíð", "COT": "Kolombia vanlig tíð", "CDT": "Central summartíð", "MYT": "Malaisia tíð", "ACWST": "miðvestur Avstralia vanlig tíð", "AWDT": "vestur Avstralia summartíð", "HNPM": "St. Pierre & Miquelon vanlig tíð"}, -+ locale: "fo_DK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "kr.", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "MST": "MST", "MESZ": "MESZ", "ACWST": "ACWST", "NZDT": "NZDT", "ChST": "ChST", "MYT": "MYT", "PDT": "PDT", "LHST": "LHST", "HEPM": "HEPM", "JST": "JST", "WIT": "WIT", "WIB": "WIB", "GMT": "GMT", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "ARST": "ARST", "HAST": "HAST", "CHADT": "CHADT", "WEZ": "WEZ", "HEEG": "HEEG", "LHDT": "LHDT", "ACWDT": "ACWDT", "WAT": "WAT", "WARST": "WARST", "SAST": "SAST", "MDT": "MDT", "ACDT": "ACDT", "ACST": "ACST", "HENOMX": "HENOMX", "IST": "IST", "VET": "VET", "HAT": "HAT", "HKST": "HKST", "CLT": "CLT", "SRT": "SRT", "GFT": "GFT", "HNT": "HNT", "TMST": "TMST", "CST": "CST", "SGT": "SGT", "AST": "AST", "MEZ": "MEZ", "AWST": "AWST", "GYT": "GYT", "HNOG": "HNOG", "EDT": "EDT", "CDT": "CDT", "HEPMX": "HEPMX", "AKST": "AKST", "COT": "COT", "EST": "EST", "NZST": "NZST", "AWDT": "AWDT", "UYT": "UYT", "BT": "BT", "HNCU": "HNCU", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "BOT": "BOT", "EAT": "EAT", "JDT": "JDT", "WAST": "WAST", "COST": "COST", "UYST": "UYST", "AEDT": "AEDT", "HECU": "HECU", "HNPM": "HNPM", "AEST": "AEST", "OESZ": "OESZ", "HEOG": "HEOG", "ECT": "ECT", "ADT": "ADT", "AKDT": "AKDT", "CLST": "CLST", "WITA": "WITA", "HNEG": "HNEG", "PST": "PST", "HKT": "HKT", "CAT": "CAT", "ART": "ART", "OEZ": "OEZ", "WART": "WART", "HADT": "HADT", "CHAST": "CHAST"}, - } - } -  -@@ -128,7 +101,7 @@ func (fo *fo_DK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fo *fo_DK) MonthsAbbreviated() []string { -- return fo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +111,7 @@ func (fo *fo_DK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fo *fo_DK) MonthsNarrow() []string { -- return fo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +121,7 @@ func (fo *fo_DK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fo *fo_DK) MonthsWide() []string { -- return fo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,79 +167,13 @@ func (fo *fo_DK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fo_DK' and handles both Whole and Real numbers based on 'v' - func (fo *fo_DK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fo.minus) - 1; j >= 0; j-- { -- b = append(b, fo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fo_DK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fo *fo_DK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fo.minus) - 1; j >= 0; j-- { -- b = append(b, fo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fo.percentSuffix...) -- -- b = append(b, fo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fo_DK' -@@ -274,58 +181,7 @@ func (fo *fo_DK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fo.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fo.minus) - 1; j >= 0; j-- { -- b = append(b, fo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fo.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fo_DK' -@@ -334,63 +190,7 @@ func (fo *fo_DK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fo.currencies[currency] -- l := len(s) + len(symbol) + 8 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fo.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fo.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fo.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fo_DK' -@@ -398,27 +198,6 @@ func (fo *fo_DK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -427,27 +206,6 @@ func (fo *fo_DK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,17 +214,6 @@ func (fo *fo_DK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, fo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,19 +222,6 @@ func (fo *fo_DK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, fo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -496,19 +230,6 @@ func (fo *fo_DK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -517,26 +238,6 @@ func (fo *fo_DK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -545,30 +246,6 @@ func (fo *fo_DK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -577,34 +254,5 @@ func (fo *fo_DK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fo_FO/fo_FO.go b/fo_FO/fo_FO.go -index 4967bd9..ccb77e5 100644 ---- a/fo_FO/fo_FO.go -+++ b/fo_FO/fo_FO.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fo_FO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fo_FO' locale - func New() locales.Translator { - return &fo_FO{ -- locale: "fo_FO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "mars", "apríl", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"}, -- daysAbbreviated: []string{"sun.", "mán.", "týs.", "mik.", "hós.", "frí.", "ley."}, -- daysNarrow: []string{"S", "M", "T", "M", "H", "F", "L"}, -- daysShort: []string{"su.", "má.", "tý.", "mi.", "hó.", "fr.", "le."}, -- daysWide: []string{"sunnudagur", "mánadagur", "týsdagur", "mikudagur", "hósdagur", "fríggjadagur", "leygardagur"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"fKr", "eKr"}, -- erasWide: []string{"fyri Krist", "eftir Krist"}, -- timezones: map[string]string{"TMT": "Turkmenistan vanlig tíð", "GYT": "Gujana tíð", "COT": "Kolombia vanlig tíð", "HAT": "Newfoundland summartíð", "WAST": "Vesturafrika summartíð", "HEPM": "St. Pierre & Miquelon summartíð", "HNOG": "Vestur grønlendsk vanlig tíð", "EAT": "Eysturafrika tíð", "WART": "Vestur Argentina vanlig tíð", "HECU": "Cuba summartíð", "HNT": "Newfoundland vanlig tíð", "CHAST": "Chatham vanlig tíð", "JDT": "Japan summartíð", "ACST": "mið Avstralia vanlig tíð", "WIB": "Vestur Indonesia tíð", "GFT": "Franska Gujana tíð", "CAT": "Miðafrika tíð", "HADT": "Hawaii-Aleutian summartíð", "AEST": "eystur Avstralia vanlig tíð", "HNPM": "St. Pierre & Miquelon vanlig tíð", "MESZ": "Miðevropa summartíð", "IST": "India tíð", "HEPMX": "Mexican Pacific summartíð", "HENOMX": "Northwest Mexico summartíð", "CDT": "Central summartíð", "AKDT": "Alaska summartíð", "WIT": "Eystur Indonesia tíð", "ACWDT": "miðvestur Avstralia summartíð", "HNEG": "Eystur grønlendsk vanlig tíð", "COST": "Kolombia summartíð", "MYT": "Malaisia tíð", "WEZ": "Vesturevropa vanlig tíð", "HKT": "Hong Kong vanlig tíð", "ACDT": "mið Avstralia summartíð", "SGT": "Singapor tíð", "MST": "MST", "UYT": "Uruguai vanlig tíð", "HEOG": "Vestur grønlendsk summartíð", "HNNOMX": "Northwest Mexico vanlig tíð", "ART": "Argentina vanlig tíð", "WESZ": "Vesturevropa summartíð", "ACWST": "miðvestur Avstralia vanlig tíð", "AWDT": "vestur Avstralia summartíð", "HKST": "Hong Kong summartíð", "CHADT": "Chatham summartíð", "MEZ": "Miðevropa vanlig tíð", "BT": "Butan tíð", "TMST": "Turkmenistan summartíð", "CLST": "Kili summartíð", "BOT": "Bolivia tíð", "JST": "Japan vanlig tíð", "∅∅∅": "Peru summartíð", "EDT": "Eastern summartíð", "AST": "Atlantic vanlig tíð", "UYST": "Uruguai summartíð", "AEDT": "eystur Avstralia summartíð", "LHST": "Lord Howe vanlig tíð", "NZST": "Nýsæland vanlig tíð", "ECT": "Ekvador tíð", "SAST": "Suðurafrika vanlig tíð", "NZDT": "Nýsæland summartíð", "HNCU": "Cuba vanlig tíð", "CST": "Central vanlig tíð", "HAST": "Hawaii-Aleutian vanlig tíð", "ChST": "Chamorro vanlig tíð", "WAT": "Vesturafrika vanlig tíð", "EST": "Eastern vanlig tíð", "AKST": "Alaska vanlig tíð", "SRT": "Surinam tíð", "PDT": "Pacific summartíð", "HEEG": "Eystur grønlendsk summartíð", "OESZ": "Eysturevropa summartíð", "WARST": "Vestur Argentina summartíð", "MDT": "MDT", "HNPMX": "Mexican Pacific vanlig tíð", "PST": "Pacific vanlig tíð", "AWST": "vestur Avstralia vanlig tíð", "LHDT": "Lord Howe summartíð", "CLT": "Kili vanlig tíð", "OEZ": "Eysturevropa vanlig tíð", "ADT": "Atlantic summartíð", "VET": "Venesuela tíð", "ARST": "Argentina summartíð", "WITA": "Mið Indonesia tíð", "GMT": "Greenwich Mean tíð"}, -+ locale: "fo_FO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EST": "EST", "CLT": "CLT", "CLST": "CLST", "HADT": "HADT", "AWST": "AWST", "SRT": "SRT", "HENOMX": "HENOMX", "HNCU": "HNCU", "ART": "ART", "ACDT": "ACDT", "JDT": "JDT", "WEZ": "WEZ", "AKST": "AKST", "CAT": "CAT", "NZDT": "NZDT", "CHADT": "CHADT", "OESZ": "OESZ", "WITA": "WITA", "VET": "VET", "AKDT": "AKDT", "WARST": "WARST", "GYT": "GYT", "HKST": "HKST", "TMT": "TMT", "CDT": "CDT", "HEEG": "HEEG", "HAT": "HAT", "COST": "COST", "SGT": "SGT", "WAST": "WAST", "TMST": "TMST", "AST": "AST", "HNEG": "HNEG", "LHST": "LHST", "AEST": "AEST", "AEDT": "AEDT", "WIT": "WIT", "ChST": "ChST", "ARST": "ARST", "MEZ": "MEZ", "ACST": "ACST", "MYT": "MYT", "ACWDT": "ACWDT", "MST": "MST", "ADT": "ADT", "HNPM": "HNPM", "CHAST": "CHAST", "PST": "PST", "WIB": "WIB", "MDT": "MDT", "IST": "IST", "BT": "BT", "HNOG": "HNOG", "JST": "JST", "LHDT": "LHDT", "CST": "CST", "GMT": "GMT", "UYST": "UYST", "SAST": "SAST", "HECU": "HECU", "OEZ": "OEZ", "HKT": "HKT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "UYT": "UYT", "HNPMX": "HNPMX", "HEOG": "HEOG", "EDT": "EDT", "∅∅∅": "∅∅∅", "HAST": "HAST", "HEPM": "HEPM", "ACWST": "ACWST", "HNT": "HNT", "NZST": "NZST", "EAT": "EAT", "HEPMX": "HEPMX", "WESZ": "WESZ", "WART": "WART", "COT": "COT", "ECT": "ECT", "BOT": "BOT", "PDT": "PDT", "WAT": "WAT", "GFT": "GFT"}, - } - } -  -@@ -128,7 +101,7 @@ func (fo *fo_FO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fo *fo_FO) MonthsAbbreviated() []string { -- return fo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +111,7 @@ func (fo *fo_FO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fo *fo_FO) MonthsNarrow() []string { -- return fo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +121,7 @@ func (fo *fo_FO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fo *fo_FO) MonthsWide() []string { -- return fo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,79 +167,13 @@ func (fo *fo_FO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fo_FO' and handles both Whole and Real numbers based on 'v' - func (fo *fo_FO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fo.minus) - 1; j >= 0; j-- { -- b = append(b, fo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fo_FO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fo *fo_FO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fo.minus) - 1; j >= 0; j-- { -- b = append(b, fo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fo.percentSuffix...) -- -- b = append(b, fo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fo_FO' -@@ -274,58 +181,7 @@ func (fo *fo_FO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fo.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(fo.minus) - 1; j >= 0; j-- { -- b = append(b, fo.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fo.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fo_FO' -@@ -334,63 +190,7 @@ func (fo *fo_FO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fo.currencies[currency] -- l := len(s) + len(symbol) + 8 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fo.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fo.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fo.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fo_FO' -@@ -398,27 +198,6 @@ func (fo *fo_FO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -427,27 +206,6 @@ func (fo *fo_FO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,17 +214,6 @@ func (fo *fo_FO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, fo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,19 +222,6 @@ func (fo *fo_FO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, fo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -496,19 +230,6 @@ func (fo *fo_FO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -517,26 +238,6 @@ func (fo *fo_FO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -545,30 +246,6 @@ func (fo *fo_FO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -577,34 +254,5 @@ func (fo *fo_FO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr/fr.go b/fr/fr.go -index f4fa648..0753971 100644 ---- a/fr/fr.go -+++ b/fr/fr.go -@@ -75,7 +75,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, - erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, - erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"SGT": "heure de Singapour", "MST": "heure normale de Macao", "UYT": "heure normale de l’Uruguay", "GFT": "heure de la Guyane française", "ACST": "heure normale du centre de l’Australie", "SAST": "heure normale d’Afrique méridionale", "IST": "heure de l’Inde", "JDT": "heure d’été du Japon", "WARST": "heure d’été de l’Ouest argentin", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "AST": "heure normale de l’Atlantique", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "ACWST": "heure normale du centre-ouest de l’Australie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "AKDT": "heure d’été de l’Alaska", "HNOG": "heure normale de l’Ouest du Groenland", "CLST": "heure d’été du Chili", "TMST": "heure d’été du Turkménistan", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "HNEG": "heure normale de l’Est du Groenland", "WAT": "heure normale d’Afrique de l’Ouest", "ECT": "heure de l’Équateur", "GMT": "heure moyenne de Greenwich", "BT": "heure du Bhoutan", "HEOG": "heure d’été de l’Ouest du Groenland", "HNT": "heure normale de Terre-Neuve", "MDT": "heure d’été de Macao", "UYST": "heure d’été de l’Uruguay", "HNCU": "heure normale de Cuba", "CST": "heure normale du centre nord-américain", "AEDT": "heure d’été de l’Est de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "COT": "heure normale de Colombie", "ART": "heure normale d’Argentine", "CAT": "heure normale d’Afrique centrale", "WIB": "heure de l’Ouest indonésien", "LHST": "heure normale de Lord Howe", "CHAST": "heure normale des îles Chatham", "CLT": "heure normale du Chili", "∅∅∅": "heure d’été de l’Amazonie", "OEZ": "heure normale d’Europe de l’Est", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "WART": "heure normale de l’Ouest argentin", "MYT": "heure de la Malaisie", "MEZ": "heure normale d’Europe centrale", "MESZ": "heure d’été d’Europe centrale", "NZDT": "heure d’été de la Nouvelle-Zélande", "JST": "heure normale du Japon", "EST": "heure normale de l’Est nord-américain", "PDT": "heure d’été du Pacifique", "WESZ": "heure d’été d’Europe de l’Ouest", "ARST": "heure d’été de l’Argentine", "HEPMX": "heure d’été du Pacifique mexicain", "LHDT": "heure d’été de Lord Howe", "WAST": "heure d’été d’Afrique de l’Ouest", "HAT": "heure d’été de Terre-Neuve", "HKT": "heure normale de Hong Kong", "CHADT": "heure d’été des îles Chatham", "HEEG": "heure d’été de l’Est du Groenland", "TMT": "heure normale du Turkménistan", "COST": "heure d’été de Colombie", "PST": "heure normale du Pacifique nord-américain", "AEST": "heure normale de l’Est de l’Australie", "HKST": "heure d’été de Hong Kong", "AKST": "heure normale de l’Alaska", "WEZ": "heure normale d’Europe de l’Ouest", "EAT": "heure normale d’Afrique de l’Est", "GYT": "heure du Guyana", "BOT": "heure de Bolivie", "OESZ": "heure d’été d’Europe de l’Est", "CDT": "heure d’été du Centre", "ADT": "heure d’été de l’Atlantique", "WIT": "heure de l’Est indonésien", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "ChST": "heure des Chamorro", "HNPMX": "heure normale du Pacifique mexicain", "VET": "heure du Venezuela", "WITA": "heure du Centre indonésien", "ACDT": "heure d’été du centre de l’Australie", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HECU": "heure d’été de Cuba"}, -+ timezones: map[string]string{"JST": "heure normale du Japon", "HNPMX": "heure normale du Pacifique mexicain", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "WESZ": "heure d’été d’Europe de l’Ouest", "HEPMX": "heure d’été du Pacifique mexicain", "TMST": "heure d’été du Turkménistan", "SRT": "heure du Suriname", "UYT": "heure normale de l’Uruguay", "GYT": "heure du Guyana", "EST": "heure normale de l’Est nord-américain", "CHADT": "heure d’été des îles Chatham", "HECU": "heure d’été de Cuba", "HNOG": "heure normale de l’Ouest du Groenland", "AEDT": "heure d’été de l’Est de l’Australie", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "PDT": "heure d’été du Pacifique", "WEZ": "heure normale d’Europe de l’Ouest", "HNCU": "heure normale de Cuba", "HKST": "heure d’été de Hong Kong", "ARST": "heure d’été de l’Argentine", "CDT": "heure d’été du Centre", "NZST": "heure normale de la Nouvelle-Zélande", "GMT": "heure moyenne de Greenwich", "BOT": "heure de Bolivie", "ACWST": "heure normale du centre-ouest de l’Australie", "OESZ": "heure d’été d’Europe de l’Est", "WITA": "heure du Centre indonésien", "ADT": "heure d’été de l’Atlantique", "AWDT": "heure d’été de l’Ouest de l’Australie", "VET": "heure du Venezuela", "AST": "heure normale de l’Atlantique", "EAT": "heure normale d’Afrique de l’Est", "MEZ": "heure normale d’Europe centrale", "∅∅∅": "heure d’été de l’Acre", "CHAST": "heure normale des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "CAT": "heure normale d’Afrique centrale", "CLT": "heure normale du Chili", "MST": "heure normale de Macao", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "IST": "heure de l’Inde", "OEZ": "heure normale d’Europe de l’Est", "MDT": "heure d’été de Macao", "ART": "heure normale d’Argentine", "HEEG": "heure d’été de l’Est du Groenland", "BT": "heure du Bhoutan", "GFT": "heure de la Guyane française", "HNT": "heure normale de Terre-Neuve", "WIT": "heure de l’Est indonésien", "TMT": "heure normale du Turkménistan", "ECT": "heure de l’Équateur", "AKDT": "heure d’été de l’Alaska", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACDT": "heure d’été du centre de l’Australie", "MYT": "heure de la Malaisie", "SGT": "heure de Singapour", "WAT": "heure normale d’Afrique de l’Ouest", "AKST": "heure normale de l’Alaska", "WARST": "heure d’été de l’Ouest argentin", "CST": "heure normale du centre nord-américain", "AWST": "heure normale de l’Ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "PST": "heure normale du Pacifique nord-américain", "ACWDT": "heure d’été du centre-ouest de l’Australie", "WART": "heure normale de l’Ouest argentin", "CLST": "heure d’été du Chili", "MESZ": "heure d’été d’Europe centrale", "ACST": "heure normale du centre de l’Australie", "JDT": "heure d’été du Japon", "HAT": "heure d’été de Terre-Neuve", "COST": "heure d’été de Colombie", "HEOG": "heure d’été de l’Ouest du Groenland", "HKT": "heure normale de Hong Kong", "ChST": "heure des Chamorro", "HNEG": "heure normale de l’Est du Groenland", "LHST": "heure normale de Lord Howe", "LHDT": "heure d’été de Lord Howe", "AEST": "heure normale de l’Est de l’Australie", "UYST": "heure d’été de l’Uruguay", "EDT": "heure d’été de l’Est", "WIB": "heure de l’Ouest indonésien", "WAST": "heure d’été d’Afrique de l’Ouest", "COT": "heure normale de Colombie", "NZDT": "heure d’été de la Nouvelle-Zélande"}, - } - } -  -diff --git a/fr_BE/fr_BE.go b/fr_BE/fr_BE.go -index 646a1f5..d38acac 100644 ---- a/fr_BE/fr_BE.go -+++ b/fr_BE/fr_BE.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_BE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_BE' locale - func New() locales.Translator { - return &fr_BE{ -- locale: "fr_BE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"AWDT": "heure d’été de l’Ouest de l’Australie", "HEEG": "heure d’été de l’Est du Groenland", "OESZ": "heure d’été d’Europe de l’Est", "HEPMX": "heure d’été du Pacifique mexicain", "UYST": "heure d’été de l’Uruguay", "SRT": "heure du Suriname", "ACWST": "heure normale du centre-ouest de l’Australie", "ChST": "heure des Chamorro", "WIB": "heure de l’Ouest indonésien", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "WARST": "heure d’été de l’Ouest argentin", "AKST": "heure normale de l’Alaska", "ADT": "heure d’été de l’Atlantique", "MYT": "heure de la Malaisie", "HKST": "heure d’été de Hong Kong", "AWST": "heure normale de l’Ouest de l’Australie", "CHAST": "heure normale des îles Chatham", "JST": "heure normale du Japon", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HNOG": "heure normale de l’Ouest du Groenland", "NZST": "heure normale de la Nouvelle-Zélande", "CAT": "heure normale d’Afrique centrale", "MEZ": "heure normale d’Europe centrale", "LHST": "heure normale de Lord Howe", "LHDT": "heure d’été de Lord Howe", "HNT": "heure normale de Terre-Neuve", "PST": "heure normale du Pacifique nord-américain", "MESZ": "heure d’été d’Europe centrale", "SAST": "heure normale d’Afrique méridionale", "IST": "heure de l’Inde", "CLST": "heure d’été du Chili", "CST": "heure normale du centre nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "AEST": "heure normale de l’Est de l’Australie", "HKT": "heure normale de Hong Kong", "WITA": "heure du Centre indonésien", "ACST": "heure normale du centre de l’Australie", "WAT": "heure normale d’Afrique de l’Ouest", "WEZ": "heure normale d’Europe de l’Ouest", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "CDT": "heure d’été du Centre", "UYT": "heure normale de l’Uruguay", "COST": "heure d’été de Colombie", "ARST": "heure d’été de l’Argentine", "BOT": "heure de Bolivie", "HNEG": "heure normale de l’Est du Groenland", "SGT": "heure de Singapour", "GYT": "heure du Guyana", "WIT": "heure de l’Est indonésien", "∅∅∅": "heure d’été de l’Amazonie", "HAST": "heure normale d’Hawaii - Aléoutiennes", "BT": "heure du Bhoutan", "HEOG": "heure d’été de l’Ouest du Groenland", "TMST": "heure d’été du Turkménistan", "WART": "heure normale de l’Ouest argentin", "HECU": "heure d’été de Cuba", "MST": "heure normale des Rocheuses", "EAT": "heure normale d’Afrique de l’Est", "OEZ": "heure normale d’Europe de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "VET": "heure du Venezuela", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "GFT": "heure de la Guyane française", "WAST": "heure d’été d’Afrique de l’Ouest", "GMT": "heure moyenne de Greenwich", "AEDT": "heure d’été de l’Est de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "HNCU": "heure normale de Cuba", "EST": "heure normale de l’Est nord-américain", "EDT": "heure d’été de l’Est", "AKDT": "heure d’été de l’Alaska", "PDT": "heure d’été du Pacifique", "NZDT": "heure d’été de la Nouvelle-Zélande", "CHADT": "heure d’été des îles Chatham", "JDT": "heure d’été du Japon", "ART": "heure normale d’Argentine", "WESZ": "heure d’été d’Europe de l’Ouest", "CLT": "heure normale du Chili", "TMT": "heure normale du Turkménistan", "ECT": "heure de l’Équateur", "COT": "heure normale de Colombie", "MDT": "heure d’été des Rocheuses"}, -+ locale: "fr_BE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "PDT": "PDT", "CHADT": "CHADT", "ARST": "ARST", "AWDT": "AWDT", "LHDT": "LHDT", "OESZ": "OESZ", "HNOG": "HNOG", "WITA": "WITA", "GMT": "GMT", "MEZ": "MEZ", "HEEG": "HEEG", "HNT": "HNT", "EDT": "EDT", "CLST": "CLST", "WAST": "WAST", "COST": "COST", "CAT": "CAT", "NZST": "NZST", "HAST": "HAST", "SGT": "SGT", "WAT": "WAT", "ACWDT": "ACWDT", "EST": "EST", "CLT": "CLT", "ECT": "ECT", "MST": "MST", "HNPM": "HNPM", "JST": "JST", "TMT": "TMT", "TMST": "TMST", "WIB": "WIB", "AST": "AST", "BOT": "BOT", "OEZ": "OEZ", "AKST": "AKST", "WART": "WART", "HKT": "HKT", "ChST": "ChST", "UYT": "UYT", "BT": "BT", "MDT": "MDT", "WEZ": "WEZ", "NZDT": "NZDT", "CHAST": "CHAST", "HECU": "HECU", "WIT": "WIT", "WESZ": "WESZ", "WARST": "WARST", "GYT": "GYT", "HADT": "HADT", "HNNOMX": "HNNOMX", "AEST": "AEST", "HEOG": "HEOG", "CST": "CST", "CDT": "CDT", "ART": "ART", "VET": "VET", "AKDT": "AKDT", "HNEG": "HNEG", "PST": "PST", "GFT": "GFT", "AEDT": "AEDT", "HEPMX": "HEPMX", "HKST": "HKST", "SRT": "SRT", "MYT": "MYT", "UYST": "UYST", "IST": "IST", "ACWST": "ACWST", "HNPMX": "HNPMX", "HAT": "HAT", "COT": "COT", "EAT": "EAT", "ACST": "ACST", "ACDT": "ACDT", "HNCU": "HNCU", "MESZ": "MESZ", "HEPM": "HEPM", "JDT": "JDT", "LHST": "LHST", "SAST": "SAST", "ADT": "ADT", "HENOMX": "HENOMX", "AWST": "AWST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_BE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_BE) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_BE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_BE) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_BE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_BE) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_BE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_BE' and handles both Whole and Real numbers based on 'v' - func (fr *fr_BE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_BE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_BE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BE' -@@ -291,58 +200,7 @@ func (fr *fr_BE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BE' -@@ -351,65 +209,7 @@ func (fr *fr_BE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_BE' -@@ -442,17 +242,6 @@ func (fr *fr_BE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,17 +250,6 @@ func (fr *fr_BE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,19 +258,6 @@ func (fr *fr_BE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,19 +266,6 @@ func (fr *fr_BE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -522,26 +274,6 @@ func (fr *fr_BE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -550,30 +282,6 @@ func (fr *fr_BE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -diff --git a/fr_BF/fr_BF.go b/fr_BF/fr_BF.go -index 4ab90b7..648f743 100644 ---- a/fr_BF/fr_BF.go -+++ b/fr_BF/fr_BF.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_BF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_BF' locale - func New() locales.Translator { - return &fr_BF{ -- locale: "fr_BF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"SAST": "heure normale d’Afrique méridionale", "JST": "heure normale du Japon", "ACDT": "heure d’été du centre de l’Australie", "AST": "heure normale de l’Atlantique", "ADT": "heure d’été de l’Atlantique", "BT": "heure du Bhoutan", "WEZ": "heure normale d’Europe de l’Ouest", "CHADT": "heure d’été des îles Chatham", "GYT": "heure du Guyana", "PDT": "heure d’été du Pacifique", "MEZ": "heure normale d’Europe centrale", "JDT": "heure d’été du Japon", "ACST": "heure normale du centre de l’Australie", "HEEG": "heure d’été de l’Est du Groenland", "TMST": "heure d’été du Turkménistan", "HECU": "heure d’été de Cuba", "HNPMX": "heure normale du Pacifique mexicain", "WIB": "heure de l’Ouest indonésien", "WIT": "heure de l’Est indonésien", "ART": "heure normale d’Argentine", "CLT": "heure normale du Chili", "WESZ": "heure d’été d’Europe de l’Ouest", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "OEZ": "heure normale d’Europe de l’Est", "ECT": "heure de l’Équateur", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "UYST": "heure d’été de l’Uruguay", "WITA": "heure du Centre indonésien", "NZDT": "heure d’été de la Nouvelle-Zélande", "TMT": "heure normale du Turkménistan", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "SRT": "heure du Suriname", "HNOG": "heure normale de l’Ouest du Groenland", "AEST": "heure normale de l’Est de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "WARST": "heure d’été de l’Ouest argentin", "MYT": "heure de la Malaisie", "CST": "heure normale du centre nord-américain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HNT": "heure normale de Terre-Neuve", "IST": "heure de l’Inde", "ARST": "heure d’été de l’Argentine", "LHST": "heure normale de Lord Howe", "BOT": "heure de Bolivie", "AWDT": "heure d’été de l’Ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "EAT": "heure normale d’Afrique de l’Est", "EST": "heure normale de l’Est nord-américain", "MDT": "heure d’été de Macao", "HEPMX": "heure d’été du Pacifique mexicain", "UYT": "heure normale de l’Uruguay", "VET": "heure du Venezuela", "GMT": "heure moyenne de Greenwich", "HNCU": "heure normale de Cuba", "MST": "heure normale de Macao", "CHAST": "heure normale des îles Chatham", "∅∅∅": "heure d’été de l’Amazonie", "GFT": "heure de la Guyane française", "MESZ": "heure d’été d’Europe centrale", "SGT": "heure de Singapour", "WART": "heure normale de l’Ouest argentin", "COST": "heure d’été de Colombie", "CDT": "heure d’été du Centre", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "HEOG": "heure d’été de l’Ouest du Groenland", "HNEG": "heure normale de l’Est du Groenland", "ChST": "heure des Chamorro", "CAT": "heure normale d’Afrique centrale", "WAST": "heure d’été d’Afrique de l’Ouest", "AKDT": "heure d’été de l’Alaska", "AWST": "heure normale de l’Ouest de l’Australie", "HKST": "heure d’été de Hong Kong", "LHDT": "heure d’été de Lord Howe", "CLST": "heure d’été du Chili", "PST": "heure normale du Pacifique nord-américain", "HKT": "heure normale de Hong Kong", "WAT": "heure normale d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACWST": "heure normale du centre-ouest de l’Australie"}, -+ locale: "fr_BF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "IST": "IST", "ACWST": "ACWST", "CHADT": "CHADT", "HKT": "HKT", "CLST": "CLST", "HNPM": "HNPM", "AKST": "AKST", "ECT": "ECT", "GMT": "GMT", "SRT": "SRT", "WITA": "WITA", "BT": "BT", "OEZ": "OEZ", "WIT": "WIT", "SAST": "SAST", "COST": "COST", "HNOG": "HNOG", "EST": "EST", "NZDT": "NZDT", "EAT": "EAT", "AWDT": "AWDT", "JST": "JST", "HECU": "HECU", "AKDT": "AKDT", "MDT": "MDT", "ARST": "ARST", "HADT": "HADT", "GFT": "GFT", "CDT": "CDT", "ChST": "ChST", "HNEG": "HNEG", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "HNT": "HNT", "COT": "COT", "HEPM": "HEPM", "PST": "PST", "AEST": "AEST", "CST": "CST", "AWST": "AWST", "MYT": "MYT", "WAST": "WAST", "HAT": "HAT", "WARST": "WARST", "JDT": "JDT", "PDT": "PDT", "WEZ": "WEZ", "WART": "WART", "HEOG": "HEOG", "HAST": "HAST", "UYT": "UYT", "WESZ": "WESZ", "HKST": "HKST", "CAT": "CAT", "BOT": "BOT", "MESZ": "MESZ", "LHDT": "LHDT", "CHAST": "CHAST", "UYST": "UYST", "VET": "VET", "MST": "MST", "HENOMX": "HENOMX", "SGT": "SGT", "HEPMX": "HEPMX", "OESZ": "OESZ", "GYT": "GYT", "AST": "AST", "MEZ": "MEZ", "AEDT": "AEDT", "TMST": "TMST", "CLT": "CLT", "NZST": "NZST", "ACDT": "ACDT", "WIB": "WIB", "ADT": "ADT", "ACST": "ACST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "WAT": "WAT", "EDT": "EDT", "TMT": "TMT", "ART": "ART"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_BF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_BF) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_BF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_BF) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_BF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_BF) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_BF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_BF' and handles both Whole and Real numbers based on 'v' - func (fr *fr_BF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_BF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_BF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BF' -@@ -291,58 +200,7 @@ func (fr *fr_BF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BF' -@@ -351,65 +209,7 @@ func (fr *fr_BF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_BF' -@@ -417,27 +217,6 @@ func (fr *fr_BF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_BF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_BF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_BF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_BF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_BF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_BF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_BF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_BI/fr_BI.go b/fr_BI/fr_BI.go -index 07aeda5..e1477b6 100644 ---- a/fr_BI/fr_BI.go -+++ b/fr_BI/fr_BI.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_BI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_BI' locale - func New() locales.Translator { - return &fr_BI{ -- locale: "fr_BI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "FBu", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HNPM": "heure normale de Saint-Pierre-et-Miquelon", "COT": "heure normale de Colombie", "SGT": "heure de Singapour", "CST": "heure normale du centre nord-américain", "HKST": "heure d’été de Hong Kong", "LHST": "heure normale de Lord Howe", "IST": "heure de l’Inde", "∅∅∅": "heure d’été de l’Amazonie", "WIB": "heure de l’Ouest indonésien", "ChST": "heure des Chamorro", "AKST": "heure normale de l’Alaska", "WEZ": "heure normale d’Europe de l’Ouest", "HNOG": "heure normale de l’Ouest du Groenland", "CHADT": "heure d’été des îles Chatham", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "AKDT": "heure d’été de l’Alaska", "PST": "heure normale du Pacifique nord-américain", "AEDT": "heure d’été de l’Est de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "EDT": "heure d’été de l’Est", "MESZ": "heure d’été d’Europe centrale", "NZDT": "heure d’été de la Nouvelle-Zélande", "ADT": "heure d’été de l’Atlantique", "ACWST": "heure normale du centre-ouest de l’Australie", "ECT": "heure de l’Équateur", "HNCU": "heure normale de Cuba", "EST": "heure normale de l’Est nord-américain", "UYST": "heure d’été de l’Uruguay", "CDT": "heure d’été du Centre", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "OESZ": "heure d’été d’Europe de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "GYT": "heure du Guyana", "BT": "heure du Bhoutan", "HNEG": "heure normale de l’Est du Groenland", "TMST": "heure d’été du Turkménistan", "PDT": "heure d’été du Pacifique", "WESZ": "heure d’été d’Europe de l’Ouest", "WITA": "heure du Centre indonésien", "CLST": "heure d’été du Chili", "JDT": "heure d’été du Japon", "GFT": "heure de la Guyane française", "COST": "heure d’été de Colombie", "MST": "heure normale de Macao", "VET": "heure du Venezuela", "CLT": "heure normale du Chili", "CAT": "heure normale d’Afrique centrale", "HEPMX": "heure d’été du Pacifique mexicain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HEOG": "heure d’été de l’Ouest du Groenland", "UYT": "heure normale de l’Uruguay", "WIT": "heure de l’Est indonésien", "MEZ": "heure normale d’Europe centrale", "TMT": "heure normale du Turkménistan", "ACST": "heure normale du centre de l’Australie", "WARST": "heure d’été de l’Ouest argentin", "HECU": "heure d’été de Cuba", "MDT": "heure d’été de Macao", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HNT": "heure normale de Terre-Neuve", "ART": "heure normale d’Argentine", "AWST": "heure normale de l’Ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "CHAST": "heure normale des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "EAT": "heure normale d’Afrique de l’Est", "WAT": "heure normale d’Afrique de l’Ouest", "WART": "heure normale de l’Ouest argentin", "GMT": "heure moyenne de Greenwich", "SRT": "heure du Suriname", "ARST": "heure d’été de l’Argentine", "AEST": "heure normale de l’Est de l’Australie", "LHDT": "heure d’été de Lord Howe", "HEEG": "heure d’été de l’Est du Groenland", "WAST": "heure d’été d’Afrique de l’Ouest", "HKT": "heure normale de Hong Kong", "AWDT": "heure d’été de l’Ouest de l’Australie", "JST": "heure normale du Japon", "BOT": "heure de Bolivie", "OEZ": "heure normale d’Europe de l’Est", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "AST": "heure normale de l’Atlantique", "MYT": "heure de la Malaisie"}, -+ locale: "fr_BI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "FBu", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ChST": "ChST", "ART": "ART", "BOT": "BOT", "LHST": "LHST", "HAT": "HAT", "∅∅∅": "∅∅∅", "SAST": "SAST", "GYT": "GYT", "VET": "VET", "CLT": "CLT", "HENOMX": "HENOMX", "MYT": "MYT", "HEPMX": "HEPMX", "HNNOMX": "HNNOMX", "JST": "JST", "CHADT": "CHADT", "GFT": "GFT", "HKST": "HKST", "CLST": "CLST", "ECT": "ECT", "HNOG": "HNOG", "HNEG": "HNEG", "AWST": "AWST", "HECU": "HECU", "EST": "EST", "CST": "CST", "WAST": "WAST", "EAT": "EAT", "MESZ": "MESZ", "JDT": "JDT", "IST": "IST", "WIT": "WIT", "HKT": "HKT", "WITA": "WITA", "ADT": "ADT", "AKDT": "AKDT", "HNT": "HNT", "HEEG": "HEEG", "HEPM": "HEPM", "ACWDT": "ACWDT", "UYT": "UYT", "WAT": "WAT", "OEZ": "OEZ", "GMT": "GMT", "LHDT": "LHDT", "BT": "BT", "HEOG": "HEOG", "ACST": "ACST", "ACDT": "ACDT", "WEZ": "WEZ", "OESZ": "OESZ", "EDT": "EDT", "MEZ": "MEZ", "HNCU": "HNCU", "HAST": "HAST", "CHAST": "CHAST", "COT": "COT", "COST": "COST", "TMST": "TMST", "WIB": "WIB", "SGT": "SGT", "NZST": "NZST", "AST": "AST", "AWDT": "AWDT", "PDT": "PDT", "HNPMX": "HNPMX", "CDT": "CDT", "MDT": "MDT", "ARST": "ARST", "AEST": "AEST", "HADT": "HADT", "AEDT": "AEDT", "PST": "PST", "WART": "WART", "WARST": "WARST", "NZDT": "NZDT", "MST": "MST", "TMT": "TMT", "ACWST": "ACWST", "WESZ": "WESZ", "AKST": "AKST", "CAT": "CAT", "SRT": "SRT", "HNPM": "HNPM", "UYST": "UYST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_BI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_BI) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_BI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_BI) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_BI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_BI) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_BI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_BI' and handles both Whole and Real numbers based on 'v' - func (fr *fr_BI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_BI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_BI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BI' -@@ -291,58 +200,7 @@ func (fr *fr_BI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BI' -@@ -351,65 +209,7 @@ func (fr *fr_BI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_BI' -@@ -417,27 +217,6 @@ func (fr *fr_BI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_BI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_BI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_BI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_BI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_BI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_BI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_BI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_BJ/fr_BJ.go b/fr_BJ/fr_BJ.go -index 66c9075..e3de1ce 100644 ---- a/fr_BJ/fr_BJ.go -+++ b/fr_BJ/fr_BJ.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_BJ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_BJ' locale - func New() locales.Translator { - return &fr_BJ{ -- locale: "fr_BJ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"UYST": "heure d’été de l’Uruguay", "WEZ": "heure normale d’Europe de l’Ouest", "ACWDT": "heure d’été du centre-ouest de l’Australie", "CLT": "heure normale du Chili", "HECU": "heure d’été de Cuba", "MYT": "heure de la Malaisie", "GYT": "heure du Guyana", "HNOG": "heure normale de l’Ouest du Groenland", "PST": "heure normale du Pacifique nord-américain", "HKST": "heure d’été de Hong Kong", "ACDT": "heure d’été du centre de l’Australie", "WAST": "heure d’été d’Afrique de l’Ouest", "SGT": "heure de Singapour", "EST": "heure normale de l’Est nord-américain", "HAT": "heure d’été de Terre-Neuve", "AEST": "heure normale de l’Est de l’Australie", "TMST": "heure d’été du Turkménistan", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "ART": "heure normale d’Argentine", "ACWST": "heure normale du centre-ouest de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "BOT": "heure de Bolivie", "WAT": "heure normale d’Afrique de l’Ouest", "HNPMX": "heure normale du Pacifique mexicain", "AKST": "heure normale de l’Alaska", "ARST": "heure d’été de l’Argentine", "MEZ": "heure normale d’Europe centrale", "OESZ": "heure d’été d’Europe de l’Est", "UYT": "heure normale de l’Uruguay", "HKT": "heure normale de Hong Kong", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "LHDT": "heure d’été de Lord Howe", "IST": "heure de l’Inde", "HNEG": "heure normale de l’Est du Groenland", "HEPMX": "heure d’été du Pacifique mexicain", "HNT": "heure normale de Terre-Neuve", "AWDT": "heure d’été de l’Ouest de l’Australie", "∅∅∅": "heure d’été de l’Amazonie", "COST": "heure d’été de Colombie", "WIB": "heure de l’Ouest indonésien", "TMT": "heure normale du Turkménistan", "HEEG": "heure d’été de l’Est du Groenland", "CDT": "heure d’été du Centre", "WIT": "heure de l’Est indonésien", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "HNCU": "heure normale de Cuba", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AWST": "heure normale de l’Ouest de l’Australie", "JST": "heure normale du Japon", "OEZ": "heure normale d’Europe de l’Est", "AST": "heure normale de l’Atlantique", "VET": "heure du Venezuela", "SRT": "heure du Suriname", "HEOG": "heure d’été de l’Ouest du Groenland", "AKDT": "heure d’été de l’Alaska", "WITA": "heure du Centre indonésien", "LHST": "heure normale de Lord Howe", "ChST": "heure des Chamorro", "ACST": "heure normale du centre de l’Australie", "PDT": "heure d’été du Pacifique", "CST": "heure normale du centre nord-américain", "AEDT": "heure d’été de l’Est de l’Australie", "SAST": "heure normale d’Afrique méridionale", "JDT": "heure d’été du Japon", "CLST": "heure d’été du Chili", "ECT": "heure de l’Équateur", "WARST": "heure d’été de l’Ouest argentin", "EDT": "heure d’été de l’Est", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "WESZ": "heure d’été d’Europe de l’Ouest", "MESZ": "heure d’été d’Europe centrale", "CHAST": "heure normale des îles Chatham", "CHADT": "heure d’été des îles Chatham", "CAT": "heure normale d’Afrique centrale", "COT": "heure normale de Colombie", "GMT": "heure moyenne de Greenwich", "ADT": "heure d’été de l’Atlantique", "EAT": "heure normale d’Afrique de l’Est", "BT": "heure du Bhoutan", "MDT": "heure d’été de Macao", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "GFT": "heure de la Guyane française", "WART": "heure normale de l’Ouest argentin", "MST": "heure normale de Macao"}, -+ locale: "fr_BJ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "LHDT": "LHDT", "UYT": "UYT", "IST": "IST", "OESZ": "OESZ", "COT": "COT", "CAT": "CAT", "ACDT": "ACDT", "HNOG": "HNOG", "WIB": "WIB", "MESZ": "MESZ", "WAST": "WAST", "TMT": "TMT", "CDT": "CDT", "CHADT": "CHADT", "HNT": "HNT", "ECT": "ECT", "ADT": "ADT", "BT": "BT", "WESZ": "WESZ", "HAT": "HAT", "HKT": "HKT", "CLST": "CLST", "MDT": "MDT", "HNPM": "HNPM", "JDT": "JDT", "HECU": "HECU", "AKST": "AKST", "AKDT": "AKDT", "WITA": "WITA", "MST": "MST", "WIT": "WIT", "HENOMX": "HENOMX", "HAST": "HAST", "HADT": "HADT", "LHST": "LHST", "UYST": "UYST", "WARST": "WARST", "ARST": "ARST", "HEEG": "HEEG", "AST": "AST", "BOT": "BOT", "HNNOMX": "HNNOMX", "EDT": "EDT", "TMST": "TMST", "HEPM": "HEPM", "CHAST": "CHAST", "PST": "PST", "PDT": "PDT", "AEDT": "AEDT", "WEZ": "WEZ", "∅∅∅": "∅∅∅", "GMT": "GMT", "HEPMX": "HEPMX", "EAT": "EAT", "AWDT": "AWDT", "VET": "VET", "WART": "WART", "NZST": "NZST", "ART": "ART", "ACWDT": "ACWDT", "AEST": "AEST", "ACST": "ACST", "JST": "JST", "CLT": "CLT", "CST": "CST", "HNPMX": "HNPMX", "GFT": "GFT", "COST": "COST", "HEOG": "HEOG", "HKST": "HKST", "ChST": "ChST", "MYT": "MYT", "MEZ": "MEZ", "HNEG": "HNEG", "HNCU": "HNCU", "SAST": "SAST", "GYT": "GYT", "EST": "EST", "SRT": "SRT", "SGT": "SGT", "WAT": "WAT", "OEZ": "OEZ", "NZDT": "NZDT", "ACWST": "ACWST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_BJ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_BJ) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_BJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_BJ) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_BJ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_BJ) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_BJ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_BJ' and handles both Whole and Real numbers based on 'v' - func (fr *fr_BJ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_BJ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_BJ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BJ' -@@ -291,58 +200,7 @@ func (fr *fr_BJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BJ' -@@ -351,65 +209,7 @@ func (fr *fr_BJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_BJ' -@@ -417,27 +217,6 @@ func (fr *fr_BJ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_BJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_BJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_BJ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_BJ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_BJ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_BJ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_BJ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_BL/fr_BL.go b/fr_BL/fr_BL.go -index 6c902f1..0acc5ff 100644 ---- a/fr_BL/fr_BL.go -+++ b/fr_BL/fr_BL.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_BL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_BL' locale - func New() locales.Translator { - return &fr_BL{ -- locale: "fr_BL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"LHST": "heure normale de Lord Howe", "COT": "heure normale de Colombie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HEEG": "heure d’été de l’Est du Groenland", "ECT": "heure de l’Équateur", "OEZ": "heure normale d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "UYT": "heure normale de l’Uruguay", "JDT": "heure d’été du Japon", "EST": "heure normale de l’Est nord-américain", "WIT": "heure de l’Est indonésien", "AWST": "heure normale de l’Ouest de l’Australie", "CHAST": "heure normale des îles Chatham", "HNCU": "heure normale de Cuba", "MYT": "heure de la Malaisie", "WIB": "heure de l’Ouest indonésien", "MESZ": "heure d’été d’Europe centrale", "CHADT": "heure d’été des îles Chatham", "TMT": "heure normale du Turkménistan", "ChST": "heure des Chamorro", "COST": "heure d’été de Colombie", "MDT": "heure d’été de Macao", "ARST": "heure d’été de l’Argentine", "LHDT": "heure d’été de Lord Howe", "WAST": "heure d’été d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "AKST": "heure normale de l’Alaska", "HNT": "heure normale de Terre-Neuve", "SAST": "heure normale d’Afrique méridionale", "IST": "heure de l’Inde", "CAT": "heure normale d’Afrique centrale", "HECU": "heure d’été de Cuba", "HNPMX": "heure normale du Pacifique mexicain", "HKST": "heure d’été de Hong Kong", "MEZ": "heure normale d’Europe centrale", "∅∅∅": "heure d’été de l’Amazonie", "GFT": "heure de la Guyane française", "GMT": "heure moyenne de Greenwich", "AST": "heure normale de l’Atlantique", "UYST": "heure d’été de l’Uruguay", "BT": "heure du Bhoutan", "PDT": "heure d’été du Pacifique", "WEZ": "heure normale d’Europe de l’Ouest", "HAT": "heure d’été de Terre-Neuve", "CLST": "heure d’été du Chili", "HNEG": "heure normale de l’Est du Groenland", "EAT": "heure normale d’Afrique de l’Est", "SGT": "heure de Singapour", "EDT": "heure d’été de l’Est", "MST": "heure normale de Macao", "HKT": "heure normale de Hong Kong", "GYT": "heure du Guyana", "HNOG": "heure normale de l’Ouest du Groenland", "ACWST": "heure normale du centre-ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "HEPMX": "heure d’été du Pacifique mexicain", "TMST": "heure d’été du Turkménistan", "ACDT": "heure d’été du centre de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "CST": "heure normale du centre nord-américain", "VET": "heure du Venezuela", "PST": "heure normale du Pacifique nord-américain", "WESZ": "heure d’été d’Europe de l’Ouest", "WITA": "heure du Centre indonésien", "NZDT": "heure d’été de la Nouvelle-Zélande", "ACST": "heure normale du centre de l’Australie", "WAT": "heure normale d’Afrique de l’Ouest", "WARST": "heure d’été de l’Ouest argentin", "AKDT": "heure d’été de l’Alaska", "ART": "heure normale d’Argentine", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "JST": "heure normale du Japon", "BOT": "heure de Bolivie", "OESZ": "heure d’été d’Europe de l’Est", "ADT": "heure d’été de l’Atlantique", "CDT": "heure d’été du Centre", "HAST": "heure normale d’Hawaii - Aléoutiennes", "CLT": "heure normale du Chili", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "HEOG": "heure d’été de l’Ouest du Groenland", "AEST": "heure normale de l’Est de l’Australie"}, -+ locale: "fr_BL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHAST": "CHAST", "WEZ": "WEZ", "HKST": "HKST", "JDT": "JDT", "MEZ": "MEZ", "WAT": "WAT", "EST": "EST", "GMT": "GMT", "ART": "ART", "AWDT": "AWDT", "CHADT": "CHADT", "PST": "PST", "PDT": "PDT", "VET": "VET", "WARST": "WARST", "ECT": "ECT", "HNOG": "HNOG", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "AWST": "AWST", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "OESZ": "OESZ", "GYT": "GYT", "WITA": "WITA", "AST": "AST", "EAT": "EAT", "CDT": "CDT", "ADT": "ADT", "HADT": "HADT", "LHDT": "LHDT", "HNCU": "HNCU", "OEZ": "OEZ", "GFT": "GFT", "CAT": "CAT", "ARST": "ARST", "HENOMX": "HENOMX", "HNPM": "HNPM", "HEPM": "HEPM", "JST": "JST", "ACWST": "ACWST", "AEST": "AEST", "HNPMX": "HNPMX", "SRT": "SRT", "HEPMX": "HEPMX", "EDT": "EDT", "CLST": "CLST", "IST": "IST", "ACDT": "ACDT", "HNEG": "HNEG", "ACWDT": "ACWDT", "WAST": "WAST", "HEOG": "HEOG", "MST": "MST", "ACST": "ACST", "AEDT": "AEDT", "COT": "COT", "MESZ": "MESZ", "HKT": "HKT", "TMST": "TMST", "BOT": "BOT", "WIT": "WIT", "SAST": "SAST", "COST": "COST", "CLT": "CLT", "BT": "BT", "HAST": "HAST", "HEEG": "HEEG", "UYT": "UYT", "WESZ": "WESZ", "HNT": "HNT", "HAT": "HAT", "NZST": "NZST", "ChST": "ChST", "LHST": "LHST", "MYT": "MYT", "UYST": "UYST", "HECU": "HECU", "SGT": "SGT", "AKST": "AKST", "WIB": "WIB", "MDT": "MDT", "WART": "WART", "TMT": "TMT", "CST": "CST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_BL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_BL) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_BL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_BL) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_BL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_BL) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_BL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_BL' and handles both Whole and Real numbers based on 'v' - func (fr *fr_BL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_BL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_BL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BL' -@@ -291,58 +200,7 @@ func (fr *fr_BL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_BL' -@@ -351,65 +209,7 @@ func (fr *fr_BL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_BL' -@@ -417,27 +217,6 @@ func (fr *fr_BL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_BL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_BL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_BL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_BL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_BL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_BL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_BL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_CA/fr_CA.go b/fr_CA/fr_CA.go -index a039690..c4e19c4 100644 ---- a/fr_CA/fr_CA.go -+++ b/fr_CA/fr_CA.go -@@ -18,7 +18,6 @@ type fr_CA struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,31 +48,18 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{2, 6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$\u00a0AU", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "$", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "$\u00a0HK", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "¥", "KES", "KGS", "KHR", "CF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "C$", "NLG", "NOK", "NPR", "$\u00a0NZ", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$\u00a0SG", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TL", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$\u00a0US", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZK", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositiveSuffix: " mn ", - currencyNegativeSuffix: " mn ", - monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juill.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, - periodsAbbreviated: []string{"a.m.", "p.m."}, - periodsNarrow: []string{"a", "p"}, - periodsWide: []string{"a.m.", "p.m."}, - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"avant l’ère chrétienne", "de l’ère chrétienne"}, -- timezones: map[string]string{"EAT": "Heure d’Afrique orientale", "HENOMX": "heure avancée du Nord-Ouest du Mexique", "GMT": "heure moyenne de Greenwich", "SRT": "heure du Suriname", "SAST": "heure normale d’Afrique du Sud", "ACST": "heure normale du centre de l’Australie", "PDT": "heure avancée du Pacifique", "CHAST": "heure normale des Îles Chatham", "WAT": "heure normale d’Afrique de l’Ouest", "WAST": "heure avancée d’Afrique de l’Ouest", "ECT": "heure de l’Équateur", "AEST": "heure normale de l’Est de l’Australie", "HKT": "heure normale de Hong Kong", "MEZ": "heure normale d’Europe centrale", "TMT": "heure normale du Turkménistan", "SGT": "heure de Singapour", "BT": "heure du Bhoutan", "WEZ": "heure normale d’Europe de l’Ouest", "HAT": "heure avancée de Terre-Neuve", "HNOG": "heure normale de l’Ouest du Groenland", "CST": "heure normale du Centre", "AST": "heure normale de l’Atlantique", "PST": "heure normale du Pacifique", "HKST": "heure avancée de Hong Kong", "HNCU": "heure normale de Cuba", "CDT": "heure avancée du Centre", "ART": "heure normale d’Argentine", "LHST": "heure normale de Lord Howe", "NZDT": "heure avancée de la Nouvelle-Zélande", "OEZ": "heure normale d’Europe de l’Est", "OESZ": "heure avancée d’Europe de l’Est", "HAST": "heure normale d’Hawaï-Aléoutiennes", "AEDT": "heure avancée de l’Est de l’Australie", "IST": "heure de l’Inde", "CLT": "heure normale du Chili", "GFT": "heure de Guyane française", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "UYST": "heure avancée de l’Uruguay", "LHDT": "heure avancée de Lord Howe", "WART": "heure normale de l’Ouest argentin", "EDT": "heure avancée de l’Est", "MYT": "heure de la Malaisie", "WESZ": "heure avancée d’Europe de l’Ouest", "AWST": "heure normale de l’Ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CLST": "heure avancée du Chili", "BOT": "heure de Bolivie", "ACDT": "heure avancée du centre de l’Australie", "HEPMX": "heure avancée du Pacifique mexicain", "COST": "heure avancée de Colombie", "ADT": "heure avancée de l’Atlantique", "HADT": "heure avancée d’Hawaï-Aléoutiennes", "CHADT": "heure avancée des Îles Chatham", "TMST": "heure avancée du Turkménistan", "UYT": "heure normale de l’Uruguay", "WIT": "heure de l’Est indonésien", "ACWDT": "heure avancée du centre-ouest de l’Australie", "JDT": "heure avancée du Japon", "ChST": "heure des Chamorro", "HECU": "heure avancée de Cuba", "VET": "heure du Venezuela", "GYT": "heure du Guyana", "ACWST": "heure normale du centre-ouest de l’Australie", "HEOG": "heure avancée de l’Ouest du Groenland", "WARST": "heure avancée de l’Ouest argentin", "MDT": "heure avancée de Macao", "HNEG": "heure normale de l’Est du Groenland", "JST": "heure normale du Japon", "HNT": "heure normale de Terre-Neuve", "WITA": "heure du Centre indonésien", "MESZ": "heure avancée d’Europe centrale", "NZST": "heure normale de la Nouvelle-Zélande", "CAT": "heure d’Afrique centrale", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "MST": "heure normale de Macao", "HNPMX": "heure normale du Pacifique mexicain", "AKDT": "heure avancée de l’Alaska", "WIB": "heure de l’Ouest indonésien", "ARST": "heure avancée de l’Argentine", "AWDT": "heure avancée de l’Ouest de l’Australie", "HEPM": "heure avancée de Saint-Pierre-et-Miquelon", "∅∅∅": "heure avancée de l’Amazonie", "EST": "heure normale de l’Est", "HEEG": "heure avancée de l’Est du Groenland"}, -+ timezones: map[string]string{"MDT": "heure avancée de Macao", "AST": "heure normale de l’Atlantique", "SRT": "SRT", "EAT": "Heure d’Afrique orientale", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "WART": "heure normale de l’Ouest argentin", "HEOG": "heure avancée de l’Ouest du Groenland", "CAT": "heure d’Afrique centrale", "IST": "IST", "ACST": "heure normale du centre de l’Australie", "HNOG": "heure normale de l’Ouest du Groenland", "EST": "heure normale de l’Est", "WIB": "WIB", "MEZ": "heure normale d’Europe centrale", "MYT": "MYT", "AKDT": "heure avancée de l’Alaska", "HAT": "heure avancée de Terre-Neuve", "COST": "heure avancée de Colombie", "JST": "heure normale du Japon", "WAT": "heure normale d’Afrique de l’Ouest", "HKST": "heure avancée de Hong Kong", "HNPMX": "heure normale du Pacifique mexicain", "HNCU": "heure normale de Cuba", "HNT": "heure normale de Terre-Neuve", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "CHAST": "heure normale des Îles Chatham", "PST": "heure normale du Pacifique", "ACWST": "heure normale du centre-ouest de l’Australie", "UYT": "heure normale de l’Uruguay", "WARST": "heure avancée de l’Ouest argentin", "TMT": "heure normale du Turkménistan", "EDT": "heure avancée de l’Est", "NZST": "heure normale de la Nouvelle-Zélande", "MESZ": "heure avancée d’Europe centrale", "LHST": "heure normale de Lord Howe", "PDT": "heure avancée du Pacifique", "BT": "BT", "∅∅∅": "heure avancée de l’Amazonie", "WAST": "heure avancée d’Afrique de l’Ouest", "HKT": "heure normale de Hong Kong", "WESZ": "heure avancée d’Europe de l’Ouest", "LHDT": "heure avancée de Lord Howe", "GFT": "heure de Guyane française", "WIT": "WIT", "HEEG": "heure avancée de l’Est du Groenland", "ARST": "heure avancée de l’Argentine", "AWDT": "heure avancée de l’Ouest de l’Australie", "WEZ": "heure normale d’Europe de l’Ouest", "ACWDT": "heure avancée du centre-ouest de l’Australie", "AEDT": "heure avancée de l’Est de l’Australie", "SGT": "SGT", "OESZ": "heure avancée d’Europe de l’Est", "ART": "heure normale d’Argentine", "JDT": "heure avancée du Japon", "HAST": "heure normale d’Hawaï-Aléoutiennes", "GYT": "GYT", "ECT": "ECT", "ChST": "ChST", "GMT": "GMT", "ACDT": "heure avancée du centre de l’Australie", "SAST": "heure normale d’Afrique du Sud", "CLT": "heure normale du Chili", "CDT": "heure avancée du Centre", "BOT": "BOT", "HNEG": "heure normale de l’Est du Groenland", "UYST": "heure avancée de l’Uruguay", "OEZ": "heure normale d’Europe de l’Est", "COT": "heure normale de Colombie", "TMST": "heure avancée du Turkménistan", "HADT": "heure avancée d’Hawaï-Aléoutiennes", "HENOMX": "heure avancée du Nord-Ouest du Mexique", "VET": "VET", "CLST": "heure avancée du Chili", "WITA": "WITA", "CST": "heure normale du Centre", "CHADT": "heure avancée des Îles Chatham", "HECU": "heure avancée de Cuba", "HEPMX": "heure avancée du Pacifique mexicain", "ADT": "heure avancée de l’Atlantique", "HEPM": "heure avancée de Saint-Pierre-et-Miquelon", "AWST": "heure normale de l’Ouest de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "AKST": "heure normale de l’Alaska", "MST": "heure normale de Macao", "NZDT": "heure avancée de la Nouvelle-Zélande"}, - } - } -  -@@ -155,7 +141,7 @@ func (fr *fr_CA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CA) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -165,7 +151,7 @@ func (fr *fr_CA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CA) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -211,77 +197,13 @@ func (fr *fr_CA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CA' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CA' -@@ -289,7 +211,7 @@ func (fr *fr_CA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 8 -+ l := len(s) + len(symbol) + 6 -  - b := make([]byte, 0, l) -  -@@ -325,7 +247,7 @@ func (fr *fr_CA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 8 -+ l := len(s) + len(symbol) + 6 -  - b := make([]byte, 0, l) -  -@@ -397,17 +319,6 @@ func (fr *fr_CA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,17 +327,6 @@ func (fr *fr_CA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,19 +335,6 @@ func (fr *fr_CA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,26 +365,6 @@ func (fr *fr_CA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -506,30 +373,6 @@ func (fr *fr_CA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -538,34 +381,5 @@ func (fr *fr_CA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_CD/fr_CD.go b/fr_CD/fr_CD.go -index 872c47c..ee4781f 100644 ---- a/fr_CD/fr_CD.go -+++ b/fr_CD/fr_CD.go -@@ -10,72 +10,46 @@ import ( - ) -  - type fr_CD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_CD' locale - func New() locales.Translator { - return &fr_CD{ -- locale: "fr_CD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "FC", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"MDT": "heure d’été de Macao", "UYST": "heure d’été de l’Uruguay", "LHDT": "heure d’été de Lord Howe", "HNEG": "heure normale de l’Est du Groenland", "GMT": "heure moyenne de Greenwich", "UYT": "heure normale de l’Uruguay", "AWST": "heure normale de l’Ouest de l’Australie", "TMT": "heure normale du Turkménistan", "TMST": "heure d’été du Turkménistan", "WAT": "heure normale d’Afrique de l’Ouest", "HNCU": "heure normale de Cuba", "ADT": "heure d’été de l’Atlantique", "VET": "heure du Venezuela", "ART": "heure normale d’Argentine", "IST": "heure de l’Inde", "ACST": "heure normale du centre de l’Australie", "HEPMX": "heure d’été du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HNPMX": "heure normale du Pacifique mexicain", "ACWST": "heure normale du centre-ouest de l’Australie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "PDT": "heure d’été du Pacifique", "JST": "heure normale du Japon", "CLT": "heure normale du Chili", "BOT": "heure de Bolivie", "HKST": "heure d’été de Hong Kong", "AEDT": "heure d’été de l’Est de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CHADT": "heure d’été des îles Chatham", "∅∅∅": "heure d’été de l’Amazonie", "EDT": "heure d’été de l’Est", "WEZ": "heure normale d’Europe de l’Ouest", "GFT": "heure de la Guyane française", "COST": "heure d’été de Colombie", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "EST": "heure normale de l’Est nord-américain", "WITA": "heure du Centre indonésien", "AEST": "heure normale de l’Est de l’Australie", "CAT": "heure normale d’Afrique centrale", "EAT": "heure normale d’Afrique de l’Est", "HNT": "heure normale de Terre-Neuve", "HAT": "heure d’été de Terre-Neuve", "JDT": "heure d’été du Japon", "WIT": "heure de l’Est indonésien", "HECU": "heure d’été de Cuba", "MST": "heure normale de Macao", "AKDT": "heure d’été de l’Alaska", "GYT": "heure du Guyana", "CHAST": "heure normale des îles Chatham", "LHST": "heure normale de Lord Howe", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "CDT": "heure d’été du Centre", "HNOG": "heure normale de l’Ouest du Groenland", "NZST": "heure normale de la Nouvelle-Zélande", "ECT": "heure de l’Équateur", "MYT": "heure de la Malaisie", "OEZ": "heure normale d’Europe de l’Est", "SGT": "heure de Singapour", "WAST": "heure d’été d’Afrique de l’Ouest", "CST": "heure normale du centre nord-américain", "HEOG": "heure d’été de l’Ouest du Groenland", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "SAST": "heure normale d’Afrique méridionale", "HEEG": "heure d’été de l’Est du Groenland", "CLST": "heure d’été du Chili", "WIB": "heure de l’Ouest indonésien", "PST": "heure normale du Pacifique nord-américain", "WESZ": "heure d’été d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "AWDT": "heure d’été de l’Ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "MESZ": "heure d’été d’Europe centrale", "ARST": "heure d’été de l’Argentine", "WARST": "heure d’été de l’Ouest argentin", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACDT": "heure d’été du centre de l’Australie", "OESZ": "heure d’été d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "BT": "heure du Bhoutan", "NZDT": "heure d’été de la Nouvelle-Zélande", "ChST": "heure des Chamorro"}, -+ locale: "fr_CD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "FC", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"VET": "VET", "WITA": "WITA", "WIB": "WIB", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "AWST": "AWST", "EDT": "EDT", "ART": "ART", "HENOMX": "HENOMX", "WAT": "WAT", "GYT": "GYT", "HKST": "HKST", "CHAST": "CHAST", "UYST": "UYST", "AKST": "AKST", "TMT": "TMT", "WAST": "WAST", "EST": "EST", "ARST": "ARST", "ADT": "ADT", "PST": "PST", "CHADT": "CHADT", "COST": "COST", "CAT": "CAT", "EAT": "EAT", "ACST": "ACST", "LHST": "LHST", "JDT": "JDT", "TMST": "TMST", "MST": "MST", "ACDT": "ACDT", "HNOG": "HNOG", "HEOG": "HEOG", "NZDT": "NZDT", "HNEG": "HNEG", "SGT": "SGT", "HKT": "HKT", "OESZ": "OESZ", "HAT": "HAT", "BOT": "BOT", "IST": "IST", "HNPMX": "HNPMX", "AKDT": "AKDT", "GFT": "GFT", "BT": "BT", "AEST": "AEST", "WART": "WART", "ECT": "ECT", "CDT": "CDT", "SRT": "SRT", "HADT": "HADT", "HEEG": "HEEG", "MDT": "MDT", "JST": "JST", "HECU": "HECU", "CLST": "CLST", "CST": "CST", "AST": "AST", "MYT": "MYT", "PDT": "PDT", "COT": "COT", "HAST": "HAST", "AWDT": "AWDT", "WIT": "WIT", "NZST": "NZST", "GMT": "GMT", "MEZ": "MEZ", "ACWST": "ACWST", "OEZ": "OEZ", "WEZ": "WEZ", "WESZ": "WESZ", "ChST": "ChST", "HNPM": "HNPM", "ACWDT": "ACWDT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "WARST": "WARST", "HNT": "HNT", "SAST": "SAST", "LHDT": "LHDT", "HEPM": "HEPM", "UYT": "UYT", "HNCU": "HNCU", "HEPMX": "HEPMX", "CLT": "CLT"}, - } - } -  -@@ -147,7 +121,7 @@ func (fr *fr_CD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_CD) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +131,7 @@ func (fr *fr_CD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CD) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +141,7 @@ func (fr *fr_CD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CD) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +187,13 @@ func (fr *fr_CD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CD' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CD' -@@ -291,58 +201,7 @@ func (fr *fr_CD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CD' -@@ -351,65 +210,7 @@ func (fr *fr_CD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_CD' -@@ -417,27 +218,6 @@ func (fr *fr_CD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +226,6 @@ func (fr *fr_CD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +234,6 @@ func (fr *fr_CD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +242,6 @@ func (fr *fr_CD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +250,6 @@ func (fr *fr_CD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +258,6 @@ func (fr *fr_CD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +266,6 @@ func (fr *fr_CD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +274,5 @@ func (fr *fr_CD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_CF/fr_CF.go b/fr_CF/fr_CF.go -index 99378b8..b88e8dd 100644 ---- a/fr_CF/fr_CF.go -+++ b/fr_CF/fr_CF.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_CF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_CF' locale - func New() locales.Translator { - return &fr_CF{ -- locale: "fr_CF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"SRT": "heure du Suriname", "MEZ": "heure normale d’Europe centrale", "CLST": "heure d’été du Chili", "WAST": "heure d’été d’Afrique de l’Ouest", "SGT": "heure de Singapour", "HECU": "heure d’été de Cuba", "AST": "heure normale de l’Atlantique", "ADT": "heure d’été de l’Atlantique", "HKT": "heure normale de Hong Kong", "WITA": "heure du Centre indonésien", "COST": "heure d’été de Colombie", "WARST": "heure d’été de l’Ouest argentin", "MST": "heure normale de Macao", "ARST": "heure d’été de l’Argentine", "HAT": "heure d’été de Terre-Neuve", "ACDT": "heure d’été du centre de l’Australie", "WAT": "heure normale d’Afrique de l’Ouest", "CST": "heure normale du centre nord-américain", "GMT": "heure moyenne de Greenwich", "HAST": "heure normale d’Hawaii - Aléoutiennes", "WEZ": "heure normale d’Europe de l’Ouest", "WESZ": "heure d’été d’Europe de l’Ouest", "ACWST": "heure normale du centre-ouest de l’Australie", "HKST": "heure d’été de Hong Kong", "OEZ": "heure normale d’Europe de l’Est", "LHST": "heure normale de Lord Howe", "LHDT": "heure d’été de Lord Howe", "JST": "heure normale du Japon", "GYT": "heure du Guyana", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HNPMX": "heure normale du Pacifique mexicain", "AEST": "heure normale de l’Est de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "HNEG": "heure normale de l’Est du Groenland", "ACST": "heure normale du centre de l’Australie", "WART": "heure normale de l’Ouest argentin", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HEOG": "heure d’été de l’Ouest du Groenland", "PST": "heure normale du Pacifique nord-américain", "CHADT": "heure d’été des îles Chatham", "HEEG": "heure d’été de l’Est du Groenland", "∅∅∅": "heure d’été du Pérou", "TMT": "heure normale du Turkménistan", "TMST": "heure d’été du Turkménistan", "WIT": "heure de l’Est indonésien", "AKST": "heure normale de l’Alaska", "WIB": "heure de l’Ouest indonésien", "HNT": "heure normale de Terre-Neuve", "NZDT": "heure d’été de la Nouvelle-Zélande", "CHAST": "heure normale des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "IST": "heure de l’Inde", "HNCU": "heure normale de Cuba", "GFT": "heure de la Guyane française", "BT": "heure du Bhoutan", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "MYT": "heure de la Malaisie", "ART": "heure normale d’Argentine", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "EDT": "heure d’été de l’Est", "MDT": "heure d’été de Macao", "AWDT": "heure d’été de l’Ouest de l’Australie", "MESZ": "heure d’été d’Europe centrale", "BOT": "heure de Bolivie", "ECT": "heure de l’Équateur", "EST": "heure normale de l’Est nord-américain", "HEPMX": "heure d’été du Pacifique mexicain", "VET": "heure du Venezuela", "AWST": "heure normale de l’Ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "CAT": "heure normale d’Afrique centrale", "UYT": "heure normale de l’Uruguay", "UYST": "heure d’été de l’Uruguay", "AKDT": "heure d’été de l’Alaska", "CLT": "heure normale du Chili", "ChST": "heure des Chamorro", "OESZ": "heure d’été d’Europe de l’Est", "COT": "heure normale de Colombie", "CDT": "heure d’été du Centre", "HNOG": "heure normale de l’Ouest du Groenland", "PDT": "heure d’été du Pacifique", "JDT": "heure d’été du Japon", "EAT": "heure normale d’Afrique de l’Est"}, -+ locale: "fr_CF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHADT": "CHADT", "PDT": "PDT", "AKST": "AKST", "WARST": "WARST", "EDT": "EDT", "CLT": "CLT", "GMT": "GMT", "HADT": "HADT", "ACST": "ACST", "WITA": "WITA", "WAST": "WAST", "AWDT": "AWDT", "LHDT": "LHDT", "BT": "BT", "ACWST": "ACWST", "WESZ": "WESZ", "NZST": "NZST", "ChST": "ChST", "BOT": "BOT", "COST": "COST", "CLST": "CLST", "HEOG": "HEOG", "HENOMX": "HENOMX", "UYT": "UYT", "GFT": "GFT", "JST": "JST", "JDT": "JDT", "MESZ": "MESZ", "AWST": "AWST", "HEPM": "HEPM", "ART": "ART", "HAST": "HAST", "MEZ": "MEZ", "ACWDT": "ACWDT", "HECU": "HECU", "MST": "MST", "MDT": "MDT", "WIB": "WIB", "HNPM": "HNPM", "AEDT": "AEDT", "HEPMX": "HEPMX", "HNT": "HNT", "WIT": "WIT", "ECT": "ECT", "ADT": "ADT", "HNEG": "HNEG", "HKT": "HKT", "CAT": "CAT", "EAT": "EAT", "HNNOMX": "HNNOMX", "OESZ": "OESZ", "SGT": "SGT", "SRT": "SRT", "MYT": "MYT", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "OEZ": "OEZ", "HNOG": "HNOG", "NZDT": "NZDT", "AST": "AST", "AEST": "AEST", "GYT": "GYT", "COT": "COT", "HKST": "HKST", "UYST": "UYST", "IST": "IST", "WEZ": "WEZ", "WAT": "WAT", "WART": "WART", "TMT": "TMT", "CHAST": "CHAST", "VET": "VET", "HNCU": "HNCU", "PST": "PST", "HNPMX": "HNPMX", "TMST": "TMST", "CDT": "CDT", "ARST": "ARST", "LHST": "LHST", "HAT": "HAT", "SAST": "SAST", "EST": "EST", "CST": "CST", "HEEG": "HEEG", "AKDT": "AKDT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_CF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_CF) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_CF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CF) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_CF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CF) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_CF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CF' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CF' -@@ -291,58 +200,7 @@ func (fr *fr_CF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CF' -@@ -351,65 +209,7 @@ func (fr *fr_CF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_CF' -@@ -417,27 +217,6 @@ func (fr *fr_CF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_CF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_CF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_CF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_CF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_CF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_CF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_CF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_CG/fr_CG.go b/fr_CG/fr_CG.go -index 86650e7..c43a800 100644 ---- a/fr_CG/fr_CG.go -+++ b/fr_CG/fr_CG.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_CG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_CG' locale - func New() locales.Translator { - return &fr_CG{ -- locale: "fr_CG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HEOG": "heure d’été de l’Ouest du Groenland", "NZDT": "heure d’été de la Nouvelle-Zélande", "CLT": "heure normale du Chili", "HNEG": "heure normale de l’Est du Groenland", "GMT": "heure moyenne de Greenwich", "GYT": "heure du Guyana", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "OEZ": "heure normale d’Europe de l’Est", "UYT": "heure normale de l’Uruguay", "WIB": "heure de l’Ouest indonésien", "TMT": "heure normale du Turkménistan", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "JST": "heure normale du Japon", "ADT": "heure d’été de l’Atlantique", "VET": "heure du Venezuela", "ART": "heure normale d’Argentine", "COST": "heure d’été de Colombie", "MDT": "heure d’été de Macao", "HNOG": "heure normale de l’Ouest du Groenland", "ECT": "heure de l’Équateur", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HNT": "heure normale de Terre-Neuve", "JDT": "heure d’été du Japon", "UYST": "heure d’été de l’Uruguay", "ACDT": "heure d’été du centre de l’Australie", "WAST": "heure d’été d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "WART": "heure normale de l’Ouest argentin", "WARST": "heure d’été de l’Ouest argentin", "AWST": "heure normale de l’Ouest de l’Australie", "LHST": "heure normale de Lord Howe", "CLST": "heure d’été du Chili", "ChST": "heure des Chamorro", "ACST": "heure normale du centre de l’Australie", "AKST": "heure normale de l’Alaska", "ARST": "heure d’été de l’Argentine", "HKT": "heure normale de Hong Kong", "SAST": "heure normale d’Afrique méridionale", "PDT": "heure d’été du Pacifique", "WITA": "heure du Centre indonésien", "AWDT": "heure d’été de l’Ouest de l’Australie", "EST": "heure normale de l’Est nord-américain", "MST": "heure normale de Macao", "WIT": "heure de l’Est indonésien", "CHADT": "heure d’été des îles Chatham", "HEEG": "heure d’été de l’Est du Groenland", "GFT": "heure de la Guyane française", "BOT": "heure de Bolivie", "WAT": "heure normale d’Afrique de l’Ouest", "COT": "heure normale de Colombie", "HECU": "heure d’été de Cuba", "SGT": "heure de Singapour", "AEST": "heure normale de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale", "TMST": "heure d’été du Turkménistan", "∅∅∅": "heure d’été des Açores", "HEPMX": "heure d’été du Pacifique mexicain", "AKDT": "heure d’été de l’Alaska", "ACWST": "heure normale du centre-ouest de l’Australie", "OESZ": "heure d’été d’Europe de l’Est", "EAT": "heure normale d’Afrique de l’Est", "BT": "heure du Bhoutan", "WEZ": "heure normale d’Europe de l’Ouest", "AEDT": "heure d’été de l’Est de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "HNPMX": "heure normale du Pacifique mexicain", "CST": "heure normale du centre nord-américain", "MYT": "heure de la Malaisie", "LHDT": "heure d’été de Lord Howe", "CAT": "heure normale d’Afrique centrale", "HAST": "heure normale d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "HAT": "heure d’été de Terre-Neuve", "CHAST": "heure normale des îles Chatham", "IST": "heure de l’Inde", "HNCU": "heure normale de Cuba", "CDT": "heure d’été du Centre", "AST": "heure normale de l’Atlantique", "WESZ": "heure d’été d’Europe de l’Ouest", "HKST": "heure d’été de Hong Kong", "MESZ": "heure d’été d’Europe centrale", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "PST": "heure normale du Pacifique nord-américain"}, -+ locale: "fr_CG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKT": "HKT", "NZDT": "NZDT", "AST": "AST", "PDT": "PDT", "JST": "JST", "HAT": "HAT", "CAT": "CAT", "CST": "CST", "ECT": "ECT", "LHST": "LHST", "HEPM": "HEPM", "JDT": "JDT", "AEST": "AEST", "AEDT": "AEDT", "SAST": "SAST", "GMT": "GMT", "MST": "MST", "HNPMX": "HNPMX", "WARST": "WARST", "EDT": "EDT", "NZST": "NZST", "AWDT": "AWDT", "HENOMX": "HENOMX", "OESZ": "OESZ", "GYT": "GYT", "COST": "COST", "CLT": "CLT", "WITA": "WITA", "SRT": "SRT", "WAST": "WAST", "CDT": "CDT", "HNCU": "HNCU", "EST": "EST", "TMST": "TMST", "MEZ": "MEZ", "ACWDT": "ACWDT", "SGT": "SGT", "HNOG": "HNOG", "EAT": "EAT", "ACST": "ACST", "HEEG": "HEEG", "PST": "PST", "AKDT": "AKDT", "WART": "WART", "HEOG": "HEOG", "BOT": "BOT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "MYT": "MYT", "CHADT": "CHADT", "UYT": "UYT", "WEZ": "WEZ", "OEZ": "OEZ", "HAST": "HAST", "HNT": "HNT", "ACDT": "ACDT", "WIT": "WIT", "ADT": "ADT", "MDT": "MDT", "HNPM": "HNPM", "ACWST": "ACWST", "CHAST": "CHAST", "CLST": "CLST", "ChST": "ChST", "ART": "ART", "HNEG": "HNEG", "ARST": "ARST", "AWST": "AWST", "LHDT": "LHDT", "UYST": "UYST", "WAT": "WAT", "TMT": "TMT", "WIB": "WIB", "HADT": "HADT", "HEPMX": "HEPMX", "AKST": "AKST", "COT": "COT", "BT": "BT", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "VET": "VET", "HECU": "HECU", "GFT": "GFT", "HKST": "HKST", "IST": "IST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_CG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_CG) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_CG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CG) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_CG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CG) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_CG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CG' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CG' -@@ -291,58 +200,7 @@ func (fr *fr_CG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CG' -@@ -351,65 +209,7 @@ func (fr *fr_CG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_CG' -@@ -417,27 +217,6 @@ func (fr *fr_CG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_CG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_CG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_CG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_CG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_CG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_CG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_CG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_CH/fr_CH.go b/fr_CH/fr_CH.go -index 479cf68..155e88a 100644 ---- a/fr_CH/fr_CH.go -+++ b/fr_CH/fr_CH.go -@@ -49,29 +49,14 @@ func New() locales.Translator { - pluralsOrdinal: []locales.PluralRule{2, 6}, - pluralsRange: []locales.PluralRule{2, 6}, - decimal: ".", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, - periodsAbbreviated: []string{"", ""}, - periodsNarrow: []string{"", ""}, - periodsWide: []string{"", ""}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"OESZ": "heure d’été d’Europe de l’Est", "WIT": "heure de l’Est indonésien", "ARST": "heure d’été de l’Argentine", "WESZ": "heure d’été d’Europe de l’Ouest", "EST": "heure normale de l’Est nord-américain", "AKDT": "heure d’été de l’Alaska", "PST": "heure normale du Pacifique nord-américain", "ACWDT": "heure d’été du centre-ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "LHDT": "heure d’été de Lord Howe", "CLST": "heure d’été du Chili", "HNEG": "heure normale de l’Est du Groenland", "GFT": "heure de la Guyane française", "BOT": "heure de Bolivie", "BT": "heure du Bhoutan", "AWDT": "heure d’été de l’Ouest de l’Australie", "GMT": "heure moyenne de Greenwich", "SGT": "heure de Singapour", "UYST": "heure d’été de l’Uruguay", "WEZ": "heure normale d’Europe de l’Ouest", "HNPMX": "heure normale du Pacifique mexicain", "VET": "heure du Venezuela", "HEOG": "heure d’été de l’Ouest du Groenland", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "SAST": "heure normale d’Afrique méridionale", "JDT": "heure d’été du Japon", "∅∅∅": "heure d’été du Pérou", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "CST": "heure normale du centre nord-américain", "ADT": "heure d’été de l’Atlantique", "HKT": "heure normale de Hong Kong", "ACST": "heure normale du centre de l’Australie", "MYT": "heure de la Malaisie", "ACWST": "heure normale du centre-ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "AKST": "heure normale de l’Alaska", "HAST": "heure normale d’Hawaii - Aléoutiennes", "PDT": "heure d’été du Pacifique", "CHAST": "heure normale des îles Chatham", "ACDT": "heure d’été du centre de l’Australie", "WAST": "heure d’été d’Afrique de l’Ouest", "WART": "heure normale de l’Ouest argentin", "COST": "heure d’été de Colombie", "WAT": "heure normale d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HECU": "heure d’été de Cuba", "AEST": "heure normale de l’Est de l’Australie", "MST": "heure normale de Macao", "UYT": "heure normale de l’Uruguay", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "TMST": "heure d’été du Turkménistan", "EAT": "heure normale d’Afrique de l’Est", "COT": "heure normale de Colombie", "HNCU": "heure normale de Cuba", "LHST": "heure normale de Lord Howe", "JST": "heure normale du Japon", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "HEPMX": "heure d’été du Pacifique mexicain", "ART": "heure normale d’Argentine", "NZDT": "heure d’été de la Nouvelle-Zélande", "CLT": "heure normale du Chili", "ChST": "heure des Chamorro", "WIB": "heure de l’Ouest indonésien", "SRT": "heure du Suriname", "HNOG": "heure normale de l’Ouest du Groenland", "CHADT": "heure d’été des îles Chatham", "IST": "heure de l’Inde", "ECT": "heure de l’Équateur", "WARST": "heure d’été de l’Ouest argentin", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "AEDT": "heure d’été de l’Est de l’Australie", "EDT": "heure d’été de l’Est", "MDT": "heure d’été de Macao", "HKST": "heure d’été de Hong Kong", "WITA": "heure du Centre indonésien", "AWST": "heure normale de l’Ouest de l’Australie", "MESZ": "heure d’été d’Europe centrale", "TMT": "heure normale du Turkménistan", "CDT": "heure d’été du Centre", "AST": "heure normale de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "CAT": "heure normale d’Afrique centrale", "GYT": "heure du Guyana"}, -+ timezones: map[string]string{"UYT": "UYT", "ADT": "ADT", "HEPM": "HEPM", "AEDT": "AEDT", "WESZ": "WESZ", "SGT": "SGT", "HNPMX": "HNPMX", "GYT": "GYT", "COST": "COST", "MST": "MST", "ACWDT": "ACWDT", "SRT": "SRT", "MESZ": "MESZ", "HENOMX": "HENOMX", "WIB": "WIB", "CHADT": "CHADT", "UYST": "UYST", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "WITA": "WITA", "ChST": "ChST", "LHDT": "LHDT", "AKDT": "AKDT", "COT": "COT", "HKST": "HKST", "CDT": "CDT", "NZST": "NZST", "IST": "IST", "BOT": "BOT", "HAST": "HAST", "HNT": "HNT", "WAST": "WAST", "CLT": "CLT", "CLST": "CLST", "HADT": "HADT", "HEPMX": "HEPMX", "HEOG": "HEOG", "TMT": "TMT", "ARST": "ARST", "EAT": "EAT", "MYT": "MYT", "WARST": "WARST", "AST": "AST", "AKST": "AKST", "BT": "BT", "CHAST": "CHAST", "HNCU": "HNCU", "ACST": "ACST", "PDT": "PDT", "WAT": "WAT", "EDT": "EDT", "NZDT": "NZDT", "HNEG": "HNEG", "HECU": "HECU", "JST": "JST", "VET": "VET", "OESZ": "OESZ", "HAT": "HAT", "AWST": "AWST", "GMT": "GMT", "HNNOMX": "HNNOMX", "GFT": "GFT", "ACWST": "ACWST", "SAST": "SAST", "HNOG": "HNOG", "EST": "EST", "HKT": "HKT", "CAT": "CAT", "MDT": "MDT", "LHST": "LHST", "JDT": "JDT", "AEST": "AEST", "MEZ": "MEZ", "HEEG": "HEEG", "HNPM": "HNPM", "PST": "PST", "OEZ": "OEZ", "WART": "WART", "WIT": "WIT", "TMST": "TMST", "CST": "CST", "ECT": "ECT", "AWDT": "AWDT", "ACDT": "ACDT", "ART": "ART"}, - } - } -  -@@ -143,7 +128,7 @@ func (fr *fr_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_CH) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +138,7 @@ func (fr *fr_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CH) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +148,7 @@ func (fr *fr_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CH) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,51 +194,14 @@ func (fr *fr_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CH' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CH) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 1 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -285,7 +233,7 @@ func (fr *fr_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -300,9 +248,7 @@ func (fr *fr_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - if inWhole { - if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -+ b = append(b, fr.group[0]) - count = 1 - } else { - count++ -@@ -349,7 +295,7 @@ func (fr *fr_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -364,9 +310,7 @@ func (fr *fr_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - if inWhole { - if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -+ b = append(b, fr.group[0]) - count = 1 - } else { - count++ -@@ -453,17 +397,6 @@ func (fr *fr_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,17 +405,6 @@ func (fr *fr_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -512,19 +434,6 @@ func (fr *fr_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -533,26 +442,6 @@ func (fr *fr_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -561,30 +450,6 @@ func (fr *fr_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -diff --git a/fr_CI/fr_CI.go b/fr_CI/fr_CI.go -index 1a2b384..21fd0a7 100644 ---- a/fr_CI/fr_CI.go -+++ b/fr_CI/fr_CI.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_CI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_CI' locale - func New() locales.Translator { - return &fr_CI{ -- locale: "fr_CI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"JST": "heure normale du Japon", "HEEG": "heure d’été de l’Est du Groenland", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACWST": "heure normale du centre-ouest de l’Australie", "HKST": "heure d’été de Hong Kong", "CHADT": "heure d’été des îles Chatham", "WARST": "heure d’été de l’Ouest argentin", "UYT": "heure normale de l’Uruguay", "ART": "heure normale d’Argentine", "AWST": "heure normale de l’Ouest de l’Australie", "∅∅∅": "heure d’été de l’Amazonie", "ChST": "heure des Chamorro", "HKT": "heure normale de Hong Kong", "LHST": "heure normale de Lord Howe", "WAST": "heure d’été d’Afrique de l’Ouest", "WART": "heure normale de l’Ouest argentin", "HECU": "heure d’été de Cuba", "WIT": "heure de l’Est indonésien", "ACWDT": "heure d’été du centre-ouest de l’Australie", "TMST": "heure d’été du Turkménistan", "WIB": "heure de l’Ouest indonésien", "HAST": "heure normale d’Hawaii - Aléoutiennes", "CHAST": "heure normale des îles Chatham", "CST": "heure normale du centre nord-américain", "WITA": "heure du Centre indonésien", "LHDT": "heure d’été de Lord Howe", "SAST": "heure normale d’Afrique méridionale", "HNEG": "heure normale de l’Est du Groenland", "ACST": "heure normale du centre de l’Australie", "COT": "heure normale de Colombie", "AEST": "heure normale de l’Est de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "HEPMX": "heure d’été du Pacifique mexicain", "NZST": "heure normale de la Nouvelle-Zélande", "CLT": "heure normale du Chili", "AKST": "heure normale de l’Alaska", "GYT": "heure du Guyana", "BT": "heure du Bhoutan", "SRT": "heure du Suriname", "WESZ": "heure d’été d’Europe de l’Ouest", "HNT": "heure normale de Terre-Neuve", "CAT": "heure normale d’Afrique centrale", "WAT": "heure normale d’Afrique de l’Ouest", "SGT": "heure de Singapour", "EDT": "heure d’été de l’Est", "MDT": "heure d’été de Macao", "MYT": "heure de la Malaisie", "WEZ": "heure normale d’Europe de l’Ouest", "ACDT": "heure d’été du centre de l’Australie", "VET": "heure du Venezuela", "HNPMX": "heure normale du Pacifique mexicain", "HAT": "heure d’été de Terre-Neuve", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "BOT": "heure de Bolivie", "GFT": "heure de la Guyane française", "HNCU": "heure normale de Cuba", "AWDT": "heure d’été de l’Ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "JDT": "heure d’été du Japon", "TMT": "heure normale du Turkménistan", "EAT": "heure normale d’Afrique de l’Est", "COST": "heure d’été de Colombie", "UYST": "heure d’été de l’Uruguay", "HEOG": "heure d’été de l’Ouest du Groenland", "NZDT": "heure d’été de la Nouvelle-Zélande", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "PDT": "heure d’été du Pacifique", "OESZ": "heure d’été d’Europe de l’Est", "AKDT": "heure d’été de l’Alaska", "PST": "heure normale du Pacifique nord-américain", "ECT": "heure de l’Équateur", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "GMT": "heure moyenne de Greenwich", "EST": "heure normale de l’Est nord-américain", "CDT": "heure d’été du Centre", "AST": "heure normale de l’Atlantique", "HNOG": "heure normale de l’Ouest du Groenland", "CLST": "heure d’été du Chili", "MESZ": "heure d’été d’Europe centrale", "IST": "heure de l’Inde", "OEZ": "heure normale d’Europe de l’Est", "MST": "heure normale de Macao", "ADT": "heure d’été de l’Atlantique", "ARST": "heure d’été de l’Argentine", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon"}, -+ locale: "fr_CI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAST": "WAST", "HKT": "HKT", "HECU": "HECU", "WESZ": "WESZ", "AKST": "AKST", "AWDT": "AWDT", "WIT": "WIT", "HEOG": "HEOG", "CAT": "CAT", "MDT": "MDT", "ARST": "ARST", "EAT": "EAT", "HEPMX": "HEPMX", "WAT": "WAT", "CDT": "CDT", "HADT": "HADT", "HEEG": "HEEG", "JST": "JST", "CLT": "CLT", "AEDT": "AEDT", "CHAST": "CHAST", "HNPM": "HNPM", "CHADT": "CHADT", "UYST": "UYST", "HNPMX": "HNPMX", "NZDT": "NZDT", "CST": "CST", "SRT": "SRT", "HAST": "HAST", "BT": "BT", "WIB": "WIB", "ART": "ART", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "ECT": "ECT", "VET": "VET", "WEZ": "WEZ", "GMT": "GMT", "LHDT": "LHDT", "MYT": "MYT", "HNCU": "HNCU", "SAST": "SAST", "MST": "MST", "ACST": "ACST", "LHST": "LHST", "AEST": "AEST", "PDT": "PDT", "ACWDT": "ACWDT", "WARST": "WARST", "HAT": "HAT", "HKST": "HKST", "TMT": "TMT", "AST": "AST", "ADT": "ADT", "GFT": "GFT", "EDT": "EDT", "CLST": "CLST", "HNEG": "HNEG", "AWST": "AWST", "ChST": "ChST", "WART": "WART", "OESZ": "OESZ", "HNT": "HNT", "COT": "COT", "EST": "EST", "∅∅∅": "∅∅∅", "PST": "PST", "SGT": "SGT", "HNOG": "HNOG", "IST": "IST", "OEZ": "OEZ", "GYT": "GYT", "COST": "COST", "ACWST": "ACWST", "AKDT": "AKDT", "TMST": "TMST", "NZST": "NZST", "HENOMX": "HENOMX", "MESZ": "MESZ", "JDT": "JDT", "UYT": "UYT", "WITA": "WITA", "BOT": "BOT", "MEZ": "MEZ", "HEPM": "HEPM"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_CI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_CI) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_CI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CI) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_CI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CI) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_CI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CI' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CI' -@@ -291,58 +200,7 @@ func (fr *fr_CI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CI' -@@ -351,65 +209,7 @@ func (fr *fr_CI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_CI' -@@ -417,27 +217,6 @@ func (fr *fr_CI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_CI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_CI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_CI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_CI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_CI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_CI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_CI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_CM/fr_CM.go b/fr_CM/fr_CM.go -index 32df8ef..d28f3e1 100644 ---- a/fr_CM/fr_CM.go -+++ b/fr_CM/fr_CM.go -@@ -10,72 +10,48 @@ import ( - ) -  - type fr_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_CM' locale - func New() locales.Translator { - return &fr_CM{ -- locale: "fr_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"mat.", "soir"}, -- periodsNarrow: []string{"mat.", "soir"}, -- periodsWide: []string{"matin", "soir"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"VET": "heure du Venezuela", "ARST": "heure d’été de l’Argentine", "AWDT": "heure d’été de l’Ouest de l’Australie", "UYT": "heure normale de l’Uruguay", "EAT": "heure normale d’Afrique de l’Est", "WAST": "heure d’été d’Afrique de l’Ouest", "CDT": "heure d’été du Centre", "HAT": "heure d’été de Terre-Neuve", "AWST": "heure normale de l’Ouest de l’Australie", "WITA": "heure du Centre indonésien", "LHDT": "heure d’été de Lord Howe", "SAST": "heure normale d’Afrique méridionale", "HEEG": "heure d’été de l’Est du Groenland", "AKDT": "heure d’été de l’Alaska", "ChST": "heure des Chamorro", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "EST": "heure normale de l’Est nord-américain", "UYST": "heure d’été de l’Uruguay", "WIB": "heure de l’Ouest indonésien", "HNEG": "heure normale de l’Est du Groenland", "TMT": "heure normale du Turkménistan", "COT": "heure normale de Colombie", "BT": "heure du Bhoutan", "HNT": "heure normale de Terre-Neuve", "AEST": "heure normale de l’Est de l’Australie", "MESZ": "heure d’été d’Europe centrale", "NZDT": "heure d’été de la Nouvelle-Zélande", "MST": "heure normale de Macao", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "JDT": "heure d’été du Japon", "WART": "heure normale de l’Ouest argentin", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "AKST": "heure normale de l’Alaska", "WIT": "heure de l’Est indonésien", "MEZ": "heure normale d’Europe centrale", "ADT": "heure d’été de l’Atlantique", "MDT": "heure d’été de Macao", "HNOG": "heure normale de l’Ouest du Groenland", "NZST": "heure normale de la Nouvelle-Zélande", "BOT": "heure de Bolivie", "GMT": "heure moyenne de Greenwich", "SGT": "heure de Singapour", "ART": "heure normale d’Argentine", "IST": "heure de l’Inde", "JST": "heure normale du Japon", "CST": "heure normale du centre nord-américain", "OEZ": "heure normale d’Europe de l’Est", "ECT": "heure de l’Équateur", "WARST": "heure d’été de l’Ouest argentin", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HKT": "heure normale de Hong Kong", "CHAST": "heure normale des îles Chatham", "GFT": "heure de la Guyane française", "WAT": "heure normale d’Afrique de l’Ouest", "WESZ": "heure d’été d’Europe de l’Ouest", "ACWST": "heure normale du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "LHST": "heure normale de Lord Howe", "∅∅∅": "heure d’été de l’Amazonie", "ACST": "heure normale du centre de l’Australie", "COST": "heure d’été de Colombie", "SRT": "heure du Suriname", "PST": "heure normale du Pacifique nord-américain", "PDT": "heure d’été du Pacifique", "WEZ": "heure normale d’Europe de l’Ouest", "CHADT": "heure d’été des îles Chatham", "HNCU": "heure normale de Cuba", "HECU": "heure d’été de Cuba", "HEPMX": "heure d’été du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "CLT": "heure normale du Chili", "TMST": "heure d’été du Turkménistan", "OESZ": "heure d’été d’Europe de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "CLST": "heure d’été du Chili", "ACDT": "heure d’été du centre de l’Australie", "EDT": "heure d’été de l’Est", "HEOG": "heure d’été de l’Ouest du Groenland", "HKST": "heure d’été de Hong Kong", "CAT": "heure normale d’Afrique centrale", "GYT": "heure du Guyana", "MYT": "heure de la Malaisie"}, -+ locale: "fr_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"mat.", "soir"}, -+ periodsNarrow: []string{"mat.", "soir"}, -+ periodsWide: []string{"matin", "soir"}, -+ timezones: map[string]string{"MST": "MST", "ChST": "ChST", "HNEG": "HNEG", "WESZ": "WESZ", "COST": "COST", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "HKST": "HKST", "WAT": "WAT", "ECT": "ECT", "MEZ": "MEZ", "HEPMX": "HEPMX", "SGT": "SGT", "EDT": "EDT", "WIB": "WIB", "EAT": "EAT", "BT": "BT", "OEZ": "OEZ", "COT": "COT", "TMT": "TMT", "MDT": "MDT", "ADT": "ADT", "SRT": "SRT", "AKDT": "AKDT", "HNT": "HNT", "SAST": "SAST", "TMST": "TMST", "NZDT": "NZDT", "GFT": "GFT", "HEOG": "HEOG", "ARST": "ARST", "AWDT": "AWDT", "UYT": "UYT", "HAT": "HAT", "CLST": "CLST", "CAT": "CAT", "HEEG": "HEEG", "JDT": "JDT", "AEDT": "AEDT", "UYST": "UYST", "CLT": "CLT", "WITA": "WITA", "NZST": "NZST", "HADT": "HADT", "MYT": "MYT", "AKST": "AKST", "OESZ": "OESZ", "WIT": "WIT", "ACST": "ACST", "ACDT": "ACDT", "GMT": "GMT", "HENOMX": "HENOMX", "PST": "PST", "HNPM": "HNPM", "JST": "JST", "ACWDT": "ACWDT", "CHAST": "CHAST", "GYT": "GYT", "HKT": "HKT", "EST": "EST", "LHDT": "LHDT", "IST": "IST", "CHADT": "CHADT", "WARST": "WARST", "CDT": "CDT", "MESZ": "MESZ", "PDT": "PDT", "HNCU": "HNCU", "HECU": "HECU", "HNPMX": "HNPMX", "WAST": "WAST", "AST": "AST", "HNNOMX": "HNNOMX", "LHST": "LHST", "AEST": "AEST", "WART": "WART", "ART": "ART", "HAST": "HAST", "VET": "VET", "WEZ": "WEZ", "CST": "CST", "BOT": "BOT", "HEPM": "HEPM", "ACWST": "ACWST", "AWST": "AWST"}, - } - } -  -@@ -147,7 +123,7 @@ func (fr *fr_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_CM) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +133,7 @@ func (fr *fr_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_CM) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +143,7 @@ func (fr *fr_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_CM) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +189,13 @@ func (fr *fr_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CM' and handles both Whole and Real numbers based on 'v' - func (fr *fr_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CM' -@@ -291,58 +203,7 @@ func (fr *fr_CM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CM' -@@ -351,65 +212,7 @@ func (fr *fr_CM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_CM' -@@ -417,27 +220,6 @@ func (fr *fr_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +228,6 @@ func (fr *fr_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +236,6 @@ func (fr *fr_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +244,6 @@ func (fr *fr_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +252,6 @@ func (fr *fr_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +260,6 @@ func (fr *fr_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +268,6 @@ func (fr *fr_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +276,5 @@ func (fr *fr_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_DJ/fr_DJ.go b/fr_DJ/fr_DJ.go -index 498a5ce..c8269ed 100644 ---- a/fr_DJ/fr_DJ.go -+++ b/fr_DJ/fr_DJ.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_DJ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_DJ' locale - func New() locales.Translator { - return &fr_DJ{ -- locale: "fr_DJ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "Fdj", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"ChST": "heure des Chamorro", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "HNT": "heure normale de Terre-Neuve", "HAT": "heure d’été de Terre-Neuve", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "MESZ": "heure d’été d’Europe centrale", "CAT": "heure normale d’Afrique centrale", "WAST": "heure d’été d’Afrique de l’Ouest", "OEZ": "heure normale d’Europe de l’Est", "OESZ": "heure d’été d’Europe de l’Est", "PDT": "heure d’été du Pacifique", "WEZ": "heure normale d’Europe de l’Ouest", "HEOG": "heure d’été de l’Ouest du Groenland", "HKT": "heure normale de Hong Kong", "WART": "heure normale de l’Ouest argentin", "COST": "heure d’été de Colombie", "SRT": "heure du Suriname", "LHDT": "heure d’été de Lord Howe", "BOT": "heure de Bolivie", "TMST": "heure d’été du Turkménistan", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "PST": "heure normale du Pacifique nord-américain", "MEZ": "heure normale d’Europe centrale", "ARST": "heure d’été de l’Argentine", "HNCU": "heure normale de Cuba", "MDT": "heure d’été de Macao", "HEPMX": "heure d’été du Pacifique mexicain", "ACWST": "heure normale du centre-ouest de l’Australie", "WITA": "heure du Centre indonésien", "JST": "heure normale du Japon", "GFT": "heure de la Guyane française", "SGT": "heure de Singapour", "HNPMX": "heure normale du Pacifique mexicain", "ART": "heure normale d’Argentine", "LHST": "heure normale de Lord Howe", "CHAST": "heure normale des îles Chatham", "CLST": "heure d’été du Chili", "HEEG": "heure d’été de l’Est du Groenland", "WARST": "heure d’été de l’Ouest argentin", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EST": "heure normale de l’Est nord-américain", "MST": "heure normale de Macao", "MYT": "heure de la Malaisie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "NZDT": "heure d’été de la Nouvelle-Zélande", "EAT": "heure normale d’Afrique de l’Est", "VET": "heure du Venezuela", "BT": "heure du Bhoutan", "HNOG": "heure normale de l’Ouest du Groenland", "AEST": "heure normale de l’Est de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "HKST": "heure d’été de Hong Kong", "WAT": "heure normale d’Afrique de l’Ouest", "ADT": "heure d’été de l’Atlantique", "WIT": "heure de l’Est indonésien", "AWST": "heure normale de l’Ouest de l’Australie", "SAST": "heure normale d’Afrique méridionale", "ECT": "heure de l’Équateur", "EDT": "heure d’été de l’Est", "UYST": "heure d’été de l’Uruguay", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WESZ": "heure d’été d’Europe de l’Ouest", "CLT": "heure normale du Chili", "∅∅∅": "heure d’été de l’Amazonie", "JDT": "heure d’été du Japon", "TMT": "heure normale du Turkménistan", "ACST": "heure normale du centre de l’Australie", "HECU": "heure d’été de Cuba", "CST": "heure normale du centre nord-américain", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "CHADT": "heure d’été des îles Chatham", "GMT": "heure moyenne de Greenwich", "AKDT": "heure d’été de l’Alaska", "CDT": "heure d’été du Centre", "GYT": "heure du Guyana", "AWDT": "heure d’été de l’Ouest de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "WIB": "heure de l’Ouest indonésien", "IST": "heure de l’Inde", "HNEG": "heure normale de l’Est du Groenland", "UYT": "heure normale de l’Uruguay", "AST": "heure normale de l’Atlantique"}, -+ locale: "fr_DJ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "Fdj", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "MESZ": "MESZ", "JDT": "JDT", "HEPM": "HEPM", "TMT": "TMT", "WIB": "WIB", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "WIT": "WIT", "AWST": "AWST", "GFT": "GFT", "HKT": "HKT", "CAT": "CAT", "JST": "JST", "AWDT": "AWDT", "AEDT": "AEDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "AKST": "AKST", "OEZ": "OEZ", "EDT": "EDT", "CLT": "CLT", "GMT": "GMT", "ARST": "ARST", "SRT": "SRT", "AKDT": "AKDT", "HNT": "HNT", "WARST": "WARST", "WITA": "WITA", "BOT": "BOT", "AEST": "AEST", "UYT": "UYT", "PST": "PST", "HECU": "HECU", "GYT": "GYT", "COST": "COST", "CDT": "CDT", "HAST": "HAST", "HEEG": "HEEG", "HNPMX": "HNPMX", "SAST": "SAST", "MEZ": "MEZ", "HENOMX": "HENOMX", "LHST": "LHST", "HNPM": "HNPM", "HKST": "HKST", "NZDT": "NZDT", "AST": "AST", "EAT": "EAT", "HNEG": "HNEG", "TMST": "TMST", "CST": "CST", "WART": "WART", "MDT": "MDT", "ACST": "ACST", "CHAST": "CHAST", "CHADT": "CHADT", "UYST": "UYST", "PDT": "PDT", "OESZ": "OESZ", "HNOG": "HNOG", "MST": "MST", "ACDT": "ACDT", "VET": "VET", "HAT": "HAT", "HEOG": "HEOG", "CLST": "CLST", "ART": "ART", "LHDT": "LHDT", "MYT": "MYT", "SGT": "SGT", "NZST": "NZST", "ChST": "ChST", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "WEZ": "WEZ", "WAT": "WAT", "WAST": "WAST", "COT": "COT", "ADT": "ADT", "IST": "IST", "WESZ": "WESZ", "EST": "EST", "ECT": "ECT", "BT": "BT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_DJ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_DJ) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_DJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_DJ) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_DJ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_DJ) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_DJ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_DJ' and handles both Whole and Real numbers based on 'v' - func (fr *fr_DJ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_DJ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_DJ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_DJ' -@@ -291,58 +200,7 @@ func (fr *fr_DJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_DJ' -@@ -351,65 +209,7 @@ func (fr *fr_DJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_DJ' -@@ -417,27 +217,6 @@ func (fr *fr_DJ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_DJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_DJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_DJ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_DZ/fr_DZ.go b/fr_DZ/fr_DZ.go -index 008eaf0..9c939f5 100644 ---- a/fr_DZ/fr_DZ.go -+++ b/fr_DZ/fr_DZ.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_DZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_DZ' locale - func New() locales.Translator { - return &fr_DZ{ -- locale: "fr_DZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DA", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"∅∅∅": "heure d’été de l’Amazonie", "AKST": "heure normale de l’Alaska", "CDT": "heure d’été du Centre", "WIB": "heure de l’Ouest indonésien", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AWDT": "heure d’été de l’Ouest de l’Australie", "CAT": "heure normale d’Afrique centrale", "PDT": "heure d’été du Pacifique", "HKST": "heure d’été de Hong Kong", "WITA": "heure du Centre indonésien", "CHADT": "heure d’été des îles Chatham", "GFT": "heure de la Guyane française", "VET": "heure du Venezuela", "WIT": "heure de l’Est indonésien", "BT": "heure du Bhoutan", "AWST": "heure normale de l’Ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "TMT": "heure normale du Turkménistan", "COST": "heure d’été de Colombie", "AST": "heure normale de l’Atlantique", "ADT": "heure d’été de l’Atlantique", "ART": "heure normale d’Argentine", "CHAST": "heure normale des îles Chatham", "COT": "heure normale de Colombie", "HNOG": "heure normale de l’Ouest du Groenland", "AEDT": "heure d’été de l’Est de l’Australie", "LHST": "heure normale de Lord Howe", "GMT": "heure moyenne de Greenwich", "HNPMX": "heure normale du Pacifique mexicain", "LHDT": "heure d’été de Lord Howe", "IST": "heure de l’Inde", "EAT": "heure normale d’Afrique de l’Est", "ChST": "heure des Chamorro", "TMST": "heure d’été du Turkménistan", "WAT": "heure normale d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "EDT": "heure d’été de l’Est", "MDT": "heure d’été des Rocheuses", "AEST": "heure normale de l’Est de l’Australie", "CLST": "heure d’été du Chili", "AKDT": "heure d’été de l’Alaska", "HNEG": "heure normale de l’Est du Groenland", "WAST": "heure d’été d’Afrique de l’Ouest", "WARST": "heure d’été de l’Ouest argentin", "HECU": "heure d’été de Cuba", "MYT": "heure de la Malaisie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "HNT": "heure normale de Terre-Neuve", "HKT": "heure normale de Hong Kong", "BOT": "heure de Bolivie", "ACST": "heure normale du centre de l’Australie", "SRT": "heure du Suriname", "PST": "heure normale du Pacifique nord-américain", "WESZ": "heure d’été d’Europe de l’Ouest", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "HNCU": "heure normale de Cuba", "EST": "heure normale de l’Est nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "CLT": "heure normale du Chili", "JST": "heure normale du Japon", "HAT": "heure d’été de Terre-Neuve", "SAST": "heure normale d’Afrique méridionale", "ECT": "heure de l’Équateur", "SGT": "heure de Singapour", "GYT": "heure du Guyana", "UYST": "heure d’été de l’Uruguay", "ACWST": "heure normale du centre-ouest de l’Australie", "WEZ": "heure normale d’Europe de l’Ouest", "MESZ": "heure d’été d’Europe centrale", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "ACDT": "heure d’été du centre de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "JDT": "heure d’été du Japon", "UYT": "heure normale de l’Uruguay", "HEOG": "heure d’été de l’Ouest du Groenland", "MEZ": "heure normale d’Europe centrale", "WART": "heure normale de l’Ouest argentin", "HEPMX": "heure d’été du Pacifique mexicain", "CST": "heure normale du centre nord-américain", "MST": "heure normale des Rocheuses", "ARST": "heure d’été de l’Argentine"}, -+ locale: "fr_DZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DA", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OEZ": "OEZ", "GFT": "GFT", "HAT": "HAT", "WARST": "WARST", "SRT": "SRT", "HAST": "HAST", "WAST": "WAST", "AKDT": "AKDT", "VET": "VET", "PST": "PST", "WEZ": "WEZ", "HEOG": "HEOG", "HNPM": "HNPM", "JDT": "JDT", "ACWDT": "ACWDT", "ChST": "ChST", "LHST": "LHST", "ARST": "ARST", "ACST": "ACST", "HENOMX": "HENOMX", "WITA": "WITA", "NZST": "NZST", "JST": "JST", "HECU": "HECU", "HEPMX": "HEPMX", "CAT": "CAT", "CLT": "CLT", "MST": "MST", "HEPM": "HEPM", "HNPMX": "HNPMX", "OESZ": "OESZ", "CLST": "CLST", "TMST": "TMST", "EAT": "EAT", "HADT": "HADT", "HNEG": "HNEG", "WAT": "WAT", "EST": "EST", "MEZ": "MEZ", "AWDT": "AWDT", "MYT": "MYT", "AEST": "AEST", "GYT": "GYT", "CST": "CST", "ECT": "ECT", "ADT": "ADT", "MESZ": "MESZ", "LHDT": "LHDT", "CHAST": "CHAST", "UYST": "UYST", "∅∅∅": "∅∅∅", "EDT": "EDT", "BT": "BT", "ART": "ART", "CHADT": "CHADT", "HNCU": "HNCU", "AKST": "AKST", "COT": "COT", "PDT": "PDT", "WIT": "WIT", "WIB": "WIB", "NZDT": "NZDT", "AST": "AST", "AWST": "AWST", "ACWST": "ACWST", "SGT": "SGT", "WART": "WART", "SAST": "SAST", "TMT": "TMT", "CDT": "CDT", "MDT": "MDT", "GMT": "GMT", "BOT": "BOT", "HNNOMX": "HNNOMX", "HNT": "HNT", "HNOG": "HNOG", "AEDT": "AEDT", "HKST": "HKST", "ACDT": "ACDT", "UYT": "UYT", "WESZ": "WESZ", "COST": "COST", "HKT": "HKT", "HEEG": "HEEG", "IST": "IST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_DZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_DZ) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_DZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_DZ) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_DZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_DZ) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_DZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_DZ' and handles both Whole and Real numbers based on 'v' - func (fr *fr_DZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_DZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_DZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_DZ' -@@ -291,58 +200,7 @@ func (fr *fr_DZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_DZ' -@@ -351,65 +209,7 @@ func (fr *fr_DZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_DZ' -@@ -417,27 +217,6 @@ func (fr *fr_DZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_DZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_DZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_DZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_FR/fr_FR.go b/fr_FR/fr_FR.go -index a33ad67..fd9d9ab 100644 ---- a/fr_FR/fr_FR.go -+++ b/fr_FR/fr_FR.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_FR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_FR' locale - func New() locales.Translator { - return &fr_FR{ -- locale: "fr_FR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"BT": "heure du Bhoutan", "OESZ": "heure d’été d’Europe de l’Est", "ARST": "heure d’été de l’Argentine", "NZDT": "heure d’été de la Nouvelle-Zélande", "EDT": "heure d’été de l’Est", "WIB": "heure de l’Ouest indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "ACWST": "heure normale du centre-ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "TMST": "heure d’été du Turkménistan", "COT": "heure normale de Colombie", "HNCU": "heure normale de Cuba", "UYT": "heure normale de l’Uruguay", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ART": "heure normale d’Argentine", "HKT": "heure normale de Hong Kong", "CHADT": "heure d’été des îles Chatham", "ChST": "heure des Chamorro", "CAT": "heure normale d’Afrique centrale", "HEPMX": "heure d’été du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "PDT": "heure d’été du Pacifique", "AEDT": "heure d’été de l’Est de l’Australie", "BOT": "heure de Bolivie", "WART": "heure normale de l’Ouest argentin", "SGT": "heure de Singapour", "HKST": "heure d’été de Hong Kong", "IST": "heure de l’Inde", "ACST": "heure normale du centre de l’Australie", "EST": "heure normale de l’Est nord-américain", "VET": "heure du Venezuela", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AWST": "heure normale de l’Ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "HNEG": "heure normale de l’Est du Groenland", "WAT": "heure normale d’Afrique de l’Ouest", "OEZ": "heure normale d’Europe de l’Est", "COST": "heure d’été de Colombie", "AKST": "heure normale de l’Alaska", "AEST": "heure normale de l’Est de l’Australie", "JDT": "heure d’été du Japon", "∅∅∅": "heure d’été de l’Amazonie", "ACDT": "heure d’été du centre de l’Australie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "AKDT": "heure d’été de l’Alaska", "HNOG": "heure normale de l’Ouest du Groenland", "WITA": "heure du Centre indonésien", "CLST": "heure d’été du Chili", "TMT": "heure normale du Turkménistan", "WIT": "heure de l’Est indonésien", "HNT": "heure normale de Terre-Neuve", "CLT": "heure normale du Chili", "GMT": "heure moyenne de Greenwich", "SRT": "heure du Suriname", "JST": "heure normale du Japon", "WARST": "heure d’été de l’Ouest argentin", "MDT": "heure d’été de Macao", "HNPMX": "heure normale du Pacifique mexicain", "CDT": "heure d’été du Centre", "WAST": "heure d’été d’Afrique de l’Ouest", "ECT": "heure de l’Équateur", "CST": "heure normale du centre nord-américain", "PST": "heure normale du Pacifique nord-américain", "HEEG": "heure d’été de l’Est du Groenland", "LHDT": "heure d’été de Lord Howe", "MESZ": "heure d’été d’Europe centrale", "EAT": "heure normale d’Afrique de l’Est", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "LHST": "heure normale de Lord Howe", "GFT": "heure de la Guyane française", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "GYT": "heure du Guyana", "HAT": "heure d’été de Terre-Neuve", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MEZ": "heure normale d’Europe centrale", "MST": "heure normale de Macao", "WESZ": "heure d’été d’Europe de l’Ouest", "CHAST": "heure normale des îles Chatham", "HECU": "heure d’été de Cuba", "ADT": "heure d’été de l’Atlantique", "MYT": "heure de la Malaisie", "UYST": "heure d’été de l’Uruguay", "HEOG": "heure d’été de l’Ouest du Groenland", "SAST": "heure normale d’Afrique méridionale"}, -+ locale: "fr_FR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "GMT": "GMT", "ARST": "ARST", "HAST": "HAST", "BT": "BT", "HEPMX": "HEPMX", "SGT": "SGT", "HECU": "HECU", "WART": "WART", "∅∅∅": "∅∅∅", "MEZ": "MEZ", "JST": "JST", "JDT": "JDT", "UYT": "UYT", "OEZ": "OEZ", "HNT": "HNT", "HAT": "HAT", "MDT": "MDT", "HNNOMX": "HNNOMX", "HKST": "HKST", "WIB": "WIB", "PDT": "PDT", "AKST": "AKST", "GYT": "GYT", "HEOG": "HEOG", "EST": "EST", "AST": "AST", "AEST": "AEST", "WEZ": "WEZ", "COT": "COT", "HKT": "HKT", "CDT": "CDT", "CHAST": "CHAST", "WESZ": "WESZ", "HEEG": "HEEG", "ACWDT": "ACWDT", "GFT": "GFT", "WIT": "WIT", "COST": "COST", "NZST": "NZST", "ART": "ART", "SRT": "SRT", "ChST": "ChST", "HNPM": "HNPM", "AWDT": "AWDT", "LHST": "LHST", "OESZ": "OESZ", "TMST": "TMST", "CLST": "CLST", "CST": "CST", "ADT": "ADT", "HENOMX": "HENOMX", "MYT": "MYT", "PST": "PST", "HNOG": "HNOG", "MESZ": "MESZ", "LHDT": "LHDT", "UYST": "UYST", "ACWST": "ACWST", "WARST": "WARST", "TMT": "TMT", "HNPMX": "HNPMX", "EDT": "EDT", "CLT": "CLT", "NZDT": "NZDT", "AWST": "AWST", "BOT": "BOT", "ACDT": "ACDT", "HEPM": "HEPM", "AEDT": "AEDT", "HNCU": "HNCU", "AKDT": "AKDT", "WITA": "WITA", "WAT": "WAT", "CHADT": "CHADT", "IST": "IST", "CAT": "CAT", "MST": "MST", "ECT": "ECT", "EAT": "EAT", "HADT": "HADT", "HNEG": "HNEG", "ACST": "ACST", "VET": "VET", "WAST": "WAST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_FR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_FR) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_FR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_FR) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_FR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_FR) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_FR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_FR' and handles both Whole and Real numbers based on 'v' - func (fr *fr_FR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_FR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_FR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_FR' -@@ -291,58 +200,7 @@ func (fr *fr_FR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_FR' -@@ -351,65 +209,7 @@ func (fr *fr_FR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_FR' -@@ -417,27 +217,6 @@ func (fr *fr_FR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_FR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_FR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_FR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_FR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_FR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_FR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_FR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_GA/fr_GA.go b/fr_GA/fr_GA.go -index 0753434..1211f9f 100644 ---- a/fr_GA/fr_GA.go -+++ b/fr_GA/fr_GA.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_GA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_GA' locale - func New() locales.Translator { - return &fr_GA{ -- locale: "fr_GA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"OEZ": "heure normale d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "∅∅∅": "heure d’été de l’Amazonie", "WAT": "heure normale d’Afrique de l’Ouest", "HAT": "heure d’été de Terre-Neuve", "ART": "heure normale d’Argentine", "MEZ": "heure normale d’Europe centrale", "ACWDT": "heure d’été du centre-ouest de l’Australie", "CLST": "heure d’été du Chili", "ECT": "heure de l’Équateur", "SGT": "heure de Singapour", "HNPMX": "heure normale du Pacifique mexicain", "UYST": "heure d’été de l’Uruguay", "SRT": "heure du Suriname", "HKT": "heure normale de Hong Kong", "WITA": "heure du Centre indonésien", "HNOG": "heure normale de l’Ouest du Groenland", "CHAST": "heure normale des îles Chatham", "WAST": "heure d’été d’Afrique de l’Ouest", "ADT": "heure d’été de l’Atlantique", "WIB": "heure de l’Ouest indonésien", "WIT": "heure de l’Est indonésien", "AEST": "heure normale de l’Est de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "HEEG": "heure d’été de l’Est du Groenland", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "CST": "heure normale du centre nord-américain", "MYT": "heure de la Malaisie", "AWDT": "heure d’été de l’Ouest de l’Australie", "JDT": "heure d’été du Japon", "HEOG": "heure d’été de l’Ouest du Groenland", "IST": "heure de l’Inde", "BT": "heure du Bhoutan", "WARST": "heure d’été de l’Ouest argentin", "HEPMX": "heure d’été du Pacifique mexicain", "MST": "heure normale de Macao", "CAT": "heure normale d’Afrique centrale", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "TMT": "heure normale du Turkménistan", "TMST": "heure d’été du Turkménistan", "COT": "heure normale de Colombie", "LHST": "heure normale de Lord Howe", "LHDT": "heure d’été de Lord Howe", "EDT": "heure d’été de l’Est", "AKST": "heure normale de l’Alaska", "CDT": "heure d’été du Centre", "ACWST": "heure normale du centre-ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "JST": "heure normale du Japon", "SAST": "heure normale d’Afrique méridionale", "ACST": "heure normale du centre de l’Australie", "AST": "heure normale de l’Atlantique", "AWST": "heure normale de l’Ouest de l’Australie", "CHADT": "heure d’été des îles Chatham", "COST": "heure d’été de Colombie", "GYT": "heure du Guyana", "PST": "heure normale du Pacifique nord-américain", "HKST": "heure d’été de Hong Kong", "OESZ": "heure d’été d’Europe de l’Est", "EST": "heure normale de l’Est nord-américain", "ARST": "heure d’été de l’Argentine", "MESZ": "heure d’été d’Europe centrale", "EAT": "heure normale d’Afrique de l’Est", "ChST": "heure des Chamorro", "GMT": "heure moyenne de Greenwich", "AKDT": "heure d’été de l’Alaska", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WEZ": "heure normale d’Europe de l’Ouest", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "HNEG": "heure normale de l’Est du Groenland", "BOT": "heure de Bolivie", "HNCU": "heure normale de Cuba", "HECU": "heure d’été de Cuba", "PDT": "heure d’été du Pacifique", "WESZ": "heure d’été d’Europe de l’Ouest", "NZDT": "heure d’été de la Nouvelle-Zélande", "GFT": "heure de la Guyane française", "VET": "heure du Venezuela", "ACDT": "heure d’été du centre de l’Australie", "HAST": "heure normale d’Hawaii - Aléoutiennes", "MDT": "heure d’été de Macao", "UYT": "heure normale de l’Uruguay", "HNT": "heure normale de Terre-Neuve", "NZST": "heure normale de la Nouvelle-Zélande", "CLT": "heure normale du Chili"}, -+ locale: "fr_GA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEDT": "AEDT", "VET": "VET", "HAT": "HAT", "ChST": "ChST", "JST": "JST", "PDT": "PDT", "HNOG": "HNOG", "IST": "IST", "GFT": "GFT", "OESZ": "OESZ", "HNPM": "HNPM", "SGT": "SGT", "WESZ": "WESZ", "OEZ": "OEZ", "WART": "WART", "NZST": "NZST", "NZDT": "NZDT", "ACDT": "ACDT", "ACST": "ACST", "HADT": "HADT", "LHST": "LHST", "MYT": "MYT", "BT": "BT", "UYT": "UYT", "ECT": "ECT", "ART": "ART", "BOT": "BOT", "SAST": "SAST", "HKST": "HKST", "CLT": "CLT", "HNPMX": "HNPMX", "WEZ": "WEZ", "HEOG": "HEOG", "JDT": "JDT", "WITA": "WITA", "ADT": "ADT", "HAST": "HAST", "EAT": "EAT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "ACWDT": "ACWDT", "CHADT": "CHADT", "UYST": "UYST", "MST": "MST", "MDT": "MDT", "CST": "CST", "HNT": "HNT", "COT": "COT", "EDT": "EDT", "GMT": "GMT", "HEPM": "HEPM", "AEST": "AEST", "COST": "COST", "TMT": "TMT", "HNEG": "HNEG", "AWDT": "AWDT", "WARST": "WARST", "HNCU": "HNCU", "GYT": "GYT", "WIB": "WIB", "ARST": "ARST", "WAST": "WAST", "AWST": "AWST", "PST": "PST", "CHAST": "CHAST", "HEPMX": "HEPMX", "HKT": "HKT", "HEEG": "HEEG", "HENOMX": "HENOMX", "LHDT": "LHDT", "CAT": "CAT", "SRT": "SRT", "MESZ": "MESZ", "HECU": "HECU", "AST": "AST", "AKST": "AKST", "TMST": "TMST", "CLST": "CLST", "ACWST": "ACWST", "AKDT": "AKDT", "WAT": "WAT", "EST": "EST", "CDT": "CDT", "∅∅∅": "∅∅∅", "WIT": "WIT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_GA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_GA) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_GA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_GA) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_GA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_GA) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_GA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_GA' and handles both Whole and Real numbers based on 'v' - func (fr *fr_GA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_GA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_GA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GA' -@@ -291,58 +200,7 @@ func (fr *fr_GA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GA' -@@ -351,65 +209,7 @@ func (fr *fr_GA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_GA' -@@ -417,27 +217,6 @@ func (fr *fr_GA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_GA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_GA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_GA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_GA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_GA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_GA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_GA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_GF/fr_GF.go b/fr_GF/fr_GF.go -index 2ec45eb..352e914 100644 ---- a/fr_GF/fr_GF.go -+++ b/fr_GF/fr_GF.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_GF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_GF' locale - func New() locales.Translator { - return &fr_GF{ -- locale: "fr_GF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"WART": "heure normale de l’Ouest argentin", "HNCU": "heure normale de Cuba", "ART": "heure normale d’Argentine", "HKST": "heure d’été de Hong Kong", "AKDT": "heure d’été de l’Alaska", "WESZ": "heure d’été d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "AWST": "heure normale de l’Ouest de l’Australie", "AST": "heure normale de l’Atlantique", "WIT": "heure de l’Est indonésien", "HNT": "heure normale de Terre-Neuve", "CST": "heure normale du centre nord-américain", "UYT": "heure normale de l’Uruguay", "WEZ": "heure normale d’Europe de l’Ouest", "SAST": "heure normale d’Afrique méridionale", "CLST": "heure d’été du Chili", "HEEG": "heure d’été de l’Est du Groenland", "WAST": "heure d’été d’Afrique de l’Ouest", "ACST": "heure normale du centre de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "HNOG": "heure normale de l’Ouest du Groenland", "OEZ": "heure normale d’Europe de l’Est", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZDT": "heure d’été de la Nouvelle-Zélande", "CHAST": "heure normale des îles Chatham", "HNEG": "heure normale de l’Est du Groenland", "UYST": "heure d’été de l’Uruguay", "WIB": "heure de l’Ouest indonésien", "VET": "heure du Venezuela", "WITA": "heure du Centre indonésien", "GFT": "heure de la Guyane française", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "COT": "heure normale de Colombie", "GYT": "heure du Guyana", "AWDT": "heure d’été de l’Ouest de l’Australie", "LHST": "heure normale de Lord Howe", "JST": "heure normale du Japon", "CLT": "heure normale du Chili", "MYT": "heure de la Malaisie", "IST": "heure de l’Inde", "AKST": "heure normale de l’Alaska", "PDT": "heure d’été du Pacifique", "ACWDT": "heure d’été du centre-ouest de l’Australie", "∅∅∅": "heure d’été de l’Amazonie", "JDT": "heure d’été du Japon", "CAT": "heure normale d’Afrique centrale", "BT": "heure du Bhoutan", "BOT": "heure de Bolivie", "ACDT": "heure d’été du centre de l’Australie", "SRT": "heure du Suriname", "ACWST": "heure normale du centre-ouest de l’Australie", "EDT": "heure d’été de l’Est", "MST": "heure normale de Macao", "AEST": "heure normale de l’Est de l’Australie", "ECT": "heure de l’Équateur", "COST": "heure d’été de Colombie", "HECU": "heure d’été de Cuba", "HEPMX": "heure d’été du Pacifique mexicain", "PST": "heure normale du Pacifique nord-américain", "MEZ": "heure normale d’Europe centrale", "SGT": "heure de Singapour", "CDT": "heure d’été du Centre", "ADT": "heure d’été de l’Atlantique", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EST": "heure normale de l’Est nord-américain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "MESZ": "heure d’été d’Europe centrale", "TMST": "heure d’été du Turkménistan", "ChST": "heure des Chamorro", "WAT": "heure normale d’Afrique de l’Ouest", "HEOG": "heure d’été de l’Ouest du Groenland", "ARST": "heure d’été de l’Argentine", "AEDT": "heure d’été de l’Est de l’Australie", "CHADT": "heure d’été des îles Chatham", "LHDT": "heure d’été de Lord Howe", "WARST": "heure d’été de l’Ouest argentin", "HAT": "heure d’été de Terre-Neuve", "GMT": "heure moyenne de Greenwich", "MDT": "heure d’été de Macao", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "TMT": "heure normale du Turkménistan", "OESZ": "heure d’été d’Europe de l’Est"}, -+ locale: "fr_GF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SRT": "SRT", "MEZ": "MEZ", "TMT": "TMT", "CLST": "CLST", "CAT": "CAT", "NZDT": "NZDT", "WARST": "WARST", "WIT": "WIT", "∅∅∅": "∅∅∅", "HKT": "HKT", "AKDT": "AKDT", "WAST": "WAST", "ECT": "ECT", "HNPM": "HNPM", "IST": "IST", "AKST": "AKST", "PDT": "PDT", "UYST": "UYST", "WART": "WART", "SAST": "SAST", "TMST": "TMST", "MESZ": "MESZ", "JDT": "JDT", "ACWST": "ACWST", "AEST": "AEST", "CDT": "CDT", "ART": "ART", "ARST": "ARST", "ACST": "ACST", "WESZ": "WESZ", "COT": "COT", "MST": "MST", "ADT": "ADT", "LHST": "LHST", "HEOG": "HEOG", "HENOMX": "HENOMX", "AWST": "AWST", "SGT": "SGT", "JST": "JST", "UYT": "UYT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HAT": "HAT", "COST": "COST", "HNOG": "HNOG", "CHAST": "CHAST", "HNNOMX": "HNNOMX", "PST": "PST", "VET": "VET", "HAST": "HAST", "EAT": "EAT", "ACWDT": "ACWDT", "EST": "EST", "WITA": "WITA", "MDT": "MDT", "NZST": "NZST", "OEZ": "OEZ", "BOT": "BOT", "HNEG": "HNEG", "CHADT": "CHADT", "HECU": "HECU", "HNT": "HNT", "ChST": "ChST", "LHDT": "LHDT", "HEPM": "HEPM", "EDT": "EDT", "CLT": "CLT", "HADT": "HADT", "BT": "BT", "ACDT": "ACDT", "MYT": "MYT", "AEDT": "AEDT", "HNCU": "HNCU", "GYT": "GYT", "HKST": "HKST", "WIB": "WIB", "AST": "AST", "WEZ": "WEZ", "WAT": "WAT", "OESZ": "OESZ", "GFT": "GFT", "CST": "CST", "GMT": "GMT", "HEEG": "HEEG", "AWDT": "AWDT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_GF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_GF) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_GF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_GF) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_GF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_GF) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_GF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_GF' and handles both Whole and Real numbers based on 'v' - func (fr *fr_GF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_GF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_GF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GF' -@@ -291,58 +200,7 @@ func (fr *fr_GF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GF' -@@ -351,65 +209,7 @@ func (fr *fr_GF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_GF' -@@ -417,27 +217,6 @@ func (fr *fr_GF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_GF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_GF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_GF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_GF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_GF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_GF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_GF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_GN/fr_GN.go b/fr_GN/fr_GN.go -index ebb8000..c272374 100644 ---- a/fr_GN/fr_GN.go -+++ b/fr_GN/fr_GN.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_GN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_GN' locale - func New() locales.Translator { - return &fr_GN{ -- locale: "fr_GN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "FG", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"UYST": "heure d’été de l’Uruguay", "PST": "heure normale du Pacifique nord-américain", "LHDT": "heure d’été de Lord Howe", "NZDT": "heure d’été de la Nouvelle-Zélande", "OEZ": "heure normale d’Europe de l’Est", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "SGT": "heure de Singapour", "MST": "heure normale de Macao", "ECT": "heure de l’Équateur", "SAST": "heure normale d’Afrique méridionale", "HECU": "heure d’été de Cuba", "MDT": "heure d’été de Macao", "UYT": "heure normale de l’Uruguay", "ARST": "heure d’été de l’Argentine", "HNOG": "heure normale de l’Ouest du Groenland", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "IST": "heure de l’Inde", "OESZ": "heure d’été d’Europe de l’Est", "WARST": "heure d’été de l’Ouest argentin", "HNT": "heure normale de Terre-Neuve", "ART": "heure normale d’Argentine", "HEPMX": "heure d’été du Pacifique mexicain", "AKDT": "heure d’été de l’Alaska", "CLST": "heure d’été du Chili", "WAT": "heure normale d’Afrique de l’Ouest", "HAT": "heure d’été de Terre-Neuve", "WITA": "heure du Centre indonésien", "MESZ": "heure d’été d’Europe centrale", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ACWST": "heure normale du centre-ouest de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "JDT": "heure d’été du Japon", "HNCU": "heure normale de Cuba", "EDT": "heure d’été de l’Est", "ADT": "heure d’été de l’Atlantique", "HNEG": "heure normale de l’Est du Groenland", "GFT": "heure de la Guyane française", "TMST": "heure d’été du Turkménistan", "LHST": "heure normale de Lord Howe", "CHADT": "heure d’été des îles Chatham", "TMT": "heure normale du Turkménistan", "WAST": "heure d’été d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "SRT": "heure du Suriname", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "AEDT": "heure d’été de l’Est de l’Australie", "ACST": "heure normale du centre de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "CAT": "heure normale d’Afrique centrale", "WIB": "heure de l’Ouest indonésien", "VET": "heure du Venezuela", "HEOG": "heure d’été de l’Ouest du Groenland", "BT": "heure du Bhoutan", "WESZ": "heure d’été d’Europe de l’Ouest", "PDT": "heure d’été du Pacifique", "CLT": "heure normale du Chili", "ChST": "heure des Chamorro", "∅∅∅": "heure d’été des Açores", "CDT": "heure d’été du Centre", "MYT": "heure de la Malaisie", "ACDT": "heure d’été du centre de l’Australie", "CHAST": "heure normale des îles Chatham", "EST": "heure normale de l’Est nord-américain", "AKST": "heure normale de l’Alaska", "GYT": "heure du Guyana", "MEZ": "heure normale d’Europe centrale", "HEEG": "heure d’été de l’Est du Groenland", "COT": "heure normale de Colombie", "GMT": "heure moyenne de Greenwich", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "HKT": "heure normale de Hong Kong", "HKST": "heure d’été de Hong Kong", "JST": "heure normale du Japon", "HNPMX": "heure normale du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WIT": "heure de l’Est indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "NZST": "heure normale de la Nouvelle-Zélande", "BOT": "heure de Bolivie", "COST": "heure d’été de Colombie", "WART": "heure normale de l’Ouest argentin", "CST": "heure normale du centre nord-américain"}, -+ locale: "fr_GN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "FG", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "ChST": "ChST", "HEPM": "HEPM", "WAT": "WAT", "WAST": "WAST", "EAT": "EAT", "HECU": "HECU", "UYST": "UYST", "WESZ": "WESZ", "SGT": "SGT", "OEZ": "OEZ", "HEEG": "HEEG", "HENOMX": "HENOMX", "ACWST": "ACWST", "WEZ": "WEZ", "WIT": "WIT", "CLT": "CLT", "PDT": "PDT", "HKST": "HKST", "NZDT": "NZDT", "BOT": "BOT", "AEST": "AEST", "HNPMX": "HNPMX", "COST": "COST", "HEOG": "HEOG", "HAST": "HAST", "AWDT": "AWDT", "JDT": "JDT", "HEPMX": "HEPMX", "EST": "EST", "CLST": "CLST", "TMT": "TMT", "CAT": "CAT", "HNPM": "HNPM", "AKST": "AKST", "∅∅∅": "∅∅∅", "TMST": "TMST", "GMT": "GMT", "MESZ": "MESZ", "LHST": "LHST", "IST": "IST", "BT": "BT", "MST": "MST", "ECT": "ECT", "WIB": "WIB", "HNNOMX": "HNNOMX", "UYT": "UYT", "CHAST": "CHAST", "EDT": "EDT", "MDT": "MDT", "HKT": "HKT", "WITA": "WITA", "CST": "CST", "MEZ": "MEZ", "GYT": "GYT", "HNOG": "HNOG", "JST": "JST", "HNEG": "HNEG", "AWST": "AWST", "ACWDT": "ACWDT", "HNCU": "HNCU", "WART": "WART", "COT": "COT", "HADT": "HADT", "ART": "ART", "ACDT": "ACDT", "MYT": "MYT", "AEDT": "AEDT", "AKDT": "AKDT", "OESZ": "OESZ", "CDT": "CDT", "AST": "AST", "GFT": "GFT", "LHDT": "LHDT", "PST": "PST", "CHADT": "CHADT", "SRT": "SRT", "ACST": "ACST", "ADT": "ADT", "ARST": "ARST", "VET": "VET", "HAT": "HAT", "WARST": "WARST", "SAST": "SAST", "NZST": "NZST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_GN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_GN) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_GN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_GN) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_GN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_GN) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_GN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_GN' and handles both Whole and Real numbers based on 'v' - func (fr *fr_GN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_GN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_GN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GN' -@@ -291,58 +200,7 @@ func (fr *fr_GN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GN' -@@ -351,65 +209,7 @@ func (fr *fr_GN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_GN' -@@ -417,27 +217,6 @@ func (fr *fr_GN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_GN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_GN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_GN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_GN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_GN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_GN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_GN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_GP/fr_GP.go b/fr_GP/fr_GP.go -index 59c8e5f..6d2e1d9 100644 ---- a/fr_GP/fr_GP.go -+++ b/fr_GP/fr_GP.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_GP struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_GP' locale - func New() locales.Translator { - return &fr_GP{ -- locale: "fr_GP", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"PST": "heure normale du Pacifique nord-américain", "OEZ": "heure normale d’Europe de l’Est", "CST": "heure normale du centre nord-américain", "CDT": "heure d’été du Centre", "MYT": "heure de la Malaisie", "WITA": "heure du Centre indonésien", "MESZ": "heure d’été d’Europe centrale", "CAT": "heure normale d’Afrique centrale", "BOT": "heure de Bolivie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "AKST": "heure normale de l’Alaska", "AKDT": "heure d’été de l’Alaska", "GFT": "heure de la Guyane française", "TMT": "heure normale du Turkménistan", "ECT": "heure de l’Équateur", "COT": "heure normale de Colombie", "VET": "heure du Venezuela", "ART": "heure normale d’Argentine", "EAT": "heure normale d’Afrique de l’Est", "HEPMX": "heure d’été du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "ChST": "heure des Chamorro", "ACDT": "heure d’été du centre de l’Australie", "SGT": "heure de Singapour", "WIB": "heure de l’Ouest indonésien", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HAT": "heure d’été de Terre-Neuve", "ARST": "heure d’été de l’Argentine", "WEZ": "heure normale d’Europe de l’Ouest", "HNPMX": "heure normale du Pacifique mexicain", "HEEG": "heure d’été de l’Est du Groenland", "PDT": "heure d’été du Pacifique", "WESZ": "heure d’été d’Europe de l’Ouest", "AWST": "heure normale de l’Ouest de l’Australie", "CHADT": "heure d’été des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HKST": "heure d’été de Hong Kong", "AEDT": "heure d’été de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale", "CLT": "heure normale du Chili", "ACST": "heure normale du centre de l’Australie", "EST": "heure normale de l’Est nord-américain", "GYT": "heure du Guyana", "MST": "heure normale des Rocheuses", "JDT": "heure d’été du Japon", "HNEG": "heure normale de l’Est du Groenland", "WAST": "heure d’été d’Afrique de l’Ouest", "COST": "heure d’été de Colombie", "ACWST": "heure normale du centre-ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "LHST": "heure normale de Lord Howe", "ADT": "heure d’été de l’Atlantique", "WIT": "heure de l’Est indonésien", "HNOG": "heure normale de l’Ouest du Groenland", "HEOG": "heure d’été de l’Ouest du Groenland", "EDT": "heure d’été de l’Est", "AEST": "heure normale de l’Est de l’Australie", "CHAST": "heure normale des îles Chatham", "JST": "heure normale du Japon", "IST": "heure de l’Inde", "TMST": "heure d’été du Turkménistan", "WAT": "heure normale d’Afrique de l’Ouest", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HNT": "heure normale de Terre-Neuve", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZDT": "heure d’été de la Nouvelle-Zélande", "HECU": "heure d’été de Cuba", "MDT": "heure d’été des Rocheuses", "SRT": "heure du Suriname", "AWDT": "heure d’été de l’Ouest de l’Australie", "LHDT": "heure d’été de Lord Howe", "HNCU": "heure normale de Cuba", "UYT": "heure normale de l’Uruguay", "HAST": "heure normale d’Hawaii - Aléoutiennes", "∅∅∅": "heure d’été de l’Amazonie", "OESZ": "heure d’été d’Europe de l’Est", "WARST": "heure d’été de l’Ouest argentin", "GMT": "heure moyenne de Greenwich", "BT": "heure du Bhoutan", "HKT": "heure normale de Hong Kong", "CLST": "heure d’été du Chili", "WART": "heure normale de l’Ouest argentin", "UYST": "heure d’été de l’Uruguay"}, -+ locale: "fr_GP", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WART": "WART", "OESZ": "OESZ", "HECU": "HECU", "WAST": "WAST", "HNT": "HNT", "ACST": "ACST", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "AST": "AST", "MEZ": "MEZ", "AEST": "AEST", "ARST": "ARST", "COST": "COST", "AEDT": "AEDT", "SAST": "SAST", "GYT": "GYT", "HKST": "HKST", "HNPM": "HNPM", "VET": "VET", "WIT": "WIT", "MST": "MST", "GMT": "GMT", "JDT": "JDT", "UYST": "UYST", "WEZ": "WEZ", "OEZ": "OEZ", "HEOG": "HEOG", "CAT": "CAT", "ACDT": "ACDT", "PST": "PST", "ACWDT": "ACWDT", "SGT": "SGT", "AKDT": "AKDT", "HAT": "HAT", "EST": "EST", "ART": "ART", "EAT": "EAT", "∅∅∅": "∅∅∅", "HKT": "HKT", "CLT": "CLT", "MDT": "MDT", "NZST": "NZST", "HADT": "HADT", "HEPMX": "HEPMX", "AWDT": "AWDT", "EDT": "EDT", "CLST": "CLST", "NZDT": "NZDT", "AWST": "AWST", "HEPM": "HEPM", "IST": "IST", "PDT": "PDT", "WESZ": "WESZ", "WAT": "WAT", "AKST": "AKST", "GFT": "GFT", "MYT": "MYT", "WIB": "WIB", "SRT": "SRT", "WARST": "WARST", "ACWST": "ACWST", "COT": "COT", "WITA": "WITA", "ECT": "ECT", "JST": "JST", "HNOG": "HNOG", "TMST": "TMST", "CST": "CST", "CDT": "CDT", "MESZ": "MESZ", "HNEG": "HNEG", "HEEG": "HEEG", "HNPMX": "HNPMX", "LHDT": "LHDT", "TMT": "TMT", "BOT": "BOT", "LHST": "LHST", "CHADT": "CHADT", "UYT": "UYT", "HNCU": "HNCU", "HAST": "HAST", "BT": "BT", "ChST": "ChST", "HENOMX": "HENOMX", "ADT": "ADT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_GP) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_GP) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_GP) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_GP) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_GP) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_GP) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_GP) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_GP' and handles both Whole and Real numbers based on 'v' - func (fr *fr_GP) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_GP' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_GP) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GP' -@@ -291,58 +200,7 @@ func (fr *fr_GP) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GP' -@@ -351,65 +209,7 @@ func (fr *fr_GP) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_GP' -@@ -417,27 +217,6 @@ func (fr *fr_GP) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_GP) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_GP) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_GP) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_GP) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_GP) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_GP) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_GP) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_GQ/fr_GQ.go b/fr_GQ/fr_GQ.go -index d7f1d0a..7fbef9c 100644 ---- a/fr_GQ/fr_GQ.go -+++ b/fr_GQ/fr_GQ.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_GQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_GQ' locale - func New() locales.Translator { - return &fr_GQ{ -- locale: "fr_GQ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HNPM": "heure normale de Saint-Pierre-et-Miquelon", "COST": "heure d’été de Colombie", "MDT": "heure d’été de Macao", "HNPMX": "heure normale du Pacifique mexicain", "WIT": "heure de l’Est indonésien", "PDT": "heure d’été du Pacifique", "HKT": "heure normale de Hong Kong", "WAST": "heure d’été d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "EDT": "heure d’été de l’Est", "HEPMX": "heure d’été du Pacifique mexicain", "WIB": "heure de l’Ouest indonésien", "VET": "heure du Venezuela", "HEEG": "heure d’été de l’Est du Groenland", "MYT": "heure de la Malaisie", "HNOG": "heure normale de l’Ouest du Groenland", "ACDT": "heure d’été du centre de l’Australie", "WAT": "heure normale d’Afrique de l’Ouest", "HNT": "heure normale de Terre-Neuve", "SAST": "heure normale d’Afrique méridionale", "UYST": "heure d’été de l’Uruguay", "CHADT": "heure d’été des îles Chatham", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "UYT": "heure normale de l’Uruguay", "HAT": "heure d’été de Terre-Neuve", "JST": "heure normale du Japon", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "WART": "heure normale de l’Ouest argentin", "GYT": "heure du Guyana", "LHST": "heure normale de Lord Howe", "IST": "heure de l’Inde", "GFT": "heure de la Guyane française", "CAT": "heure normale d’Afrique centrale", "MESZ": "heure d’été d’Europe centrale", "EAT": "heure normale d’Afrique de l’Est", "AST": "heure normale de l’Atlantique", "SRT": "heure du Suriname", "WEZ": "heure normale d’Europe de l’Ouest", "AEDT": "heure d’été de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale", "OEZ": "heure normale d’Europe de l’Est", "HNCU": "heure normale de Cuba", "ACWST": "heure normale du centre-ouest de l’Australie", "ARST": "heure d’été de l’Argentine", "CLT": "heure normale du Chili", "TMST": "heure d’été du Turkménistan", "ACST": "heure normale du centre de l’Australie", "ADT": "heure d’été de l’Atlantique", "ART": "heure normale d’Argentine", "GMT": "heure moyenne de Greenwich", "HECU": "heure d’été de Cuba", "HEOG": "heure d’été de l’Ouest du Groenland", "AWST": "heure normale de l’Ouest de l’Australie", "ECT": "heure de l’Équateur", "SGT": "heure de Singapour", "MST": "heure normale de Macao", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie", "BOT": "heure de Bolivie", "WARST": "heure d’été de l’Ouest argentin", "WITA": "heure du Centre indonésien", "CLST": "heure d’été du Chili", "ChST": "heure des Chamorro", "EST": "heure normale de l’Est nord-américain", "AKST": "heure normale de l’Alaska", "AKDT": "heure d’été de l’Alaska", "WESZ": "heure d’été d’Europe de l’Ouest", "AEST": "heure normale de l’Est de l’Australie", "TMT": "heure normale du Turkménistan", "COT": "heure normale de Colombie", "CDT": "heure d’été du Centre", "BT": "heure du Bhoutan", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "∅∅∅": "heure d’été de l’Amazonie", "JDT": "heure d’été du Japon", "CST": "heure normale du centre nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "PST": "heure normale du Pacifique nord-américain", "HKST": "heure d’été de Hong Kong", "LHDT": "heure d’été de Lord Howe", "AWDT": "heure d’été de l’Ouest de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "CHAST": "heure normale des îles Chatham", "HNEG": "heure normale de l’Est du Groenland"}, -+ locale: "fr_GQ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BT": "BT", "WAT": "WAT", "NZDT": "NZDT", "GMT": "GMT", "AWDT": "AWDT", "PST": "PST", "HECU": "HECU", "TMT": "TMT", "CLST": "CLST", "MDT": "MDT", "JST": "JST", "CHADT": "CHADT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HKST": "HKST", "ART": "ART", "HNNOMX": "HNNOMX", "ACST": "ACST", "WART": "WART", "WIB": "WIB", "CDT": "CDT", "HAST": "HAST", "HAT": "HAT", "SAST": "SAST", "HKT": "HKT", "HADT": "HADT", "GFT": "GFT", "HNCU": "HNCU", "HNPMX": "HNPMX", "WIT": "WIT", "∅∅∅": "∅∅∅", "ECT": "ECT", "MYT": "MYT", "VET": "VET", "AKDT": "AKDT", "CAT": "CAT", "HENOMX": "HENOMX", "AEDT": "AEDT", "COST": "COST", "EAT": "EAT", "WEZ": "WEZ", "HNT": "HNT", "WARST": "WARST", "CST": "CST", "HNEG": "HNEG", "JDT": "JDT", "ACDT": "ACDT", "HEPM": "HEPM", "LHDT": "LHDT", "EST": "EST", "ChST": "ChST", "SRT": "SRT", "PDT": "PDT", "MEZ": "MEZ", "LHST": "LHST", "AEST": "AEST", "MESZ": "MESZ", "IST": "IST", "OEZ": "OEZ", "ARST": "ARST", "BOT": "BOT", "WAST": "WAST", "COT": "COT", "HEOG": "HEOG", "TMST": "TMST", "CLT": "CLT", "WITA": "WITA", "GYT": "GYT", "WESZ": "WESZ", "AKST": "AKST", "NZST": "NZST", "AST": "AST", "ACWST": "ACWST", "CHAST": "CHAST", "UYT": "UYT", "HNOG": "HNOG", "EDT": "EDT", "ADT": "ADT", "AWST": "AWST", "ACWDT": "ACWDT", "UYST": "UYST", "SGT": "SGT", "MST": "MST", "HEEG": "HEEG", "HNPM": "HNPM"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_GQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_GQ) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_GQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_GQ) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_GQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_GQ) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_GQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_GQ' and handles both Whole and Real numbers based on 'v' - func (fr *fr_GQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_GQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_GQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GQ' -@@ -291,58 +200,7 @@ func (fr *fr_GQ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_GQ' -@@ -351,65 +209,7 @@ func (fr *fr_GQ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_GQ' -@@ -417,27 +217,6 @@ func (fr *fr_GQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_GQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_GQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_GQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_GQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_GQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_GQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_GQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_HT/fr_HT.go b/fr_HT/fr_HT.go -index 5984bec..77f711f 100644 ---- a/fr_HT/fr_HT.go -+++ b/fr_HT/fr_HT.go -@@ -10,72 +10,46 @@ import ( - ) -  - type fr_HT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_HT' locale - func New() locales.Translator { - return &fr_HT{ -- locale: "fr_HT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "G", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"", ""}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"GMT": "heure moyenne de Greenwich", "VET": "heure du Venezuela", "HNOG": "heure normale de l’Ouest du Groenland", "WAST": "heure d’été d’Afrique de l’Ouest", "AKST": "heure normale de l’Alaska", "WIT": "heure de l’Est indonésien", "WESZ": "heure d’été d’Europe de l’Ouest", "ARST": "heure d’été de l’Argentine", "CHAST": "heure normale des îles Chatham", "WAT": "heure normale d’Afrique de l’Ouest", "COST": "heure d’été de Colombie", "EDT": "heure d’été de l’Est", "CDT": "heure d’été du Centre", "ADT": "heure d’été de l’Atlantique", "HAT": "heure d’été de Terre-Neuve", "PST": "heure normale du Pacifique nord-américain", "CLST": "heure d’été du Chili", "BOT": "heure de Bolivie", "EAT": "heure normale d’Afrique de l’Est", "SRT": "heure du Suriname", "HNT": "heure normale de Terre-Neuve", "LHST": "heure normale de Lord Howe", "CAT": "heure normale d’Afrique centrale", "MYT": "heure de la Malaisie", "HKT": "heure normale de Hong Kong", "ChST": "heure des Chamorro", "CST": "heure normale du centre nord-américain", "WIB": "heure de l’Ouest indonésien", "HAST": "heure normale d’Hawaii - Aléoutiennes", "PDT": "heure d’été du Pacifique", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "UYST": "heure d’été de l’Uruguay", "MESZ": "heure d’été d’Europe centrale", "ACST": "heure normale du centre de l’Australie", "WARST": "heure d’été de l’Ouest argentin", "HECU": "heure d’été de Cuba", "AKDT": "heure d’été de l’Alaska", "UYT": "heure normale de l’Uruguay", "ACWST": "heure normale du centre-ouest de l’Australie", "CLT": "heure normale du Chili", "WEZ": "heure normale d’Europe de l’Ouest", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "GFT": "heure de la Guyane française", "SGT": "heure de Singapour", "MST": "heure normale de Macao", "EST": "heure normale de l’Est nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "BT": "heure du Bhoutan", "OESZ": "heure d’été d’Europe de l’Est", "ECT": "heure de l’Équateur", "WART": "heure normale de l’Ouest argentin", "∅∅∅": "heure d’été des Açores", "HEEG": "heure d’été de l’Est du Groenland", "MEZ": "heure normale d’Europe centrale", "IST": "heure de l’Inde", "SAST": "heure normale d’Afrique méridionale", "MDT": "heure d’été de Macao", "HKST": "heure d’été de Hong Kong", "WITA": "heure du Centre indonésien", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZDT": "heure d’été de la Nouvelle-Zélande", "JDT": "heure d’été du Japon", "HNEG": "heure normale de l’Est du Groenland", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HNCU": "heure normale de Cuba", "GYT": "heure du Guyana", "ART": "heure normale d’Argentine", "AWST": "heure normale de l’Ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "TMST": "heure d’été du Turkménistan", "OEZ": "heure normale d’Europe de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "HEPMX": "heure d’été du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "LHDT": "heure d’été de Lord Howe", "TMT": "heure normale du Turkménistan", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "CHADT": "heure d’été des îles Chatham", "JST": "heure normale du Japon", "HEOG": "heure d’été de l’Ouest du Groenland", "AWDT": "heure d’été de l’Ouest de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "COT": "heure normale de Colombie"}, -+ locale: "fr_HT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "G", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsWide: []string{"", ""}, -+ timezones: map[string]string{"ChST": "ChST", "CLT": "CLT", "AWDT": "AWDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "WIT": "WIT", "GYT": "GYT", "CAT": "CAT", "WIB": "WIB", "EAT": "EAT", "HENOMX": "HENOMX", "LHST": "LHST", "PDT": "PDT", "HNPMX": "HNPMX", "TMST": "TMST", "TMT": "TMT", "NZST": "NZST", "GMT": "GMT", "BOT": "BOT", "PST": "PST", "SAST": "SAST", "HKT": "HKT", "HKST": "HKST", "AST": "AST", "ARST": "ARST", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "JST": "JST", "UYT": "UYT", "MST": "MST", "MYT": "MYT", "CHADT": "CHADT", "HNOG": "HNOG", "MESZ": "MESZ", "COT": "COT", "EST": "EST", "ECT": "ECT", "BT": "BT", "ACWDT": "ACWDT", "HNCU": "HNCU", "HNT": "HNT", "HEOG": "HEOG", "CST": "CST", "SRT": "SRT", "HNEG": "HNEG", "HNPM": "HNPM", "HAST": "HAST", "AEST": "AEST", "AEDT": "AEDT", "OESZ": "OESZ", "AKST": "AKST", "WART": "WART", "ADT": "ADT", "HADT": "HADT", "AWST": "AWST", "WESZ": "WESZ", "VET": "VET", "WAT": "WAT", "WARST": "WARST", "COST": "COST", "WITA": "WITA", "ART": "ART", "HEEG": "HEEG", "IST": "IST", "WEZ": "WEZ", "HECU": "HECU", "NZDT": "NZDT", "OEZ": "OEZ", "HAT": "HAT", "MDT": "MDT", "MEZ": "MEZ", "ACST": "ACST", "JDT": "JDT", "UYST": "UYST", "WAST": "WAST", "CLST": "CLST", "CDT": "CDT", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "AKDT": "AKDT", "GFT": "GFT", "ACDT": "ACDT", "SGT": "SGT", "EDT": "EDT"}, - } - } -  -@@ -147,7 +121,7 @@ func (fr *fr_HT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_HT) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +131,7 @@ func (fr *fr_HT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_HT) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +141,7 @@ func (fr *fr_HT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_HT) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +187,13 @@ func (fr *fr_HT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_HT' and handles both Whole and Real numbers based on 'v' - func (fr *fr_HT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_HT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_HT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_HT' -@@ -291,58 +201,7 @@ func (fr *fr_HT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_HT' -@@ -351,65 +210,7 @@ func (fr *fr_HT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_HT' -@@ -417,27 +218,6 @@ func (fr *fr_HT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +226,6 @@ func (fr *fr_HT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +234,6 @@ func (fr *fr_HT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +242,6 @@ func (fr *fr_HT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +250,6 @@ func (fr *fr_HT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +258,6 @@ func (fr *fr_HT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +266,6 @@ func (fr *fr_HT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +274,5 @@ func (fr *fr_HT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_KM/fr_KM.go b/fr_KM/fr_KM.go -index 2aa3aee..f9a9f54 100644 ---- a/fr_KM/fr_KM.go -+++ b/fr_KM/fr_KM.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_KM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_KM' locale - func New() locales.Translator { - return &fr_KM{ -- locale: "fr_KM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "CF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"MYT": "heure de la Malaisie", "ACWST": "heure normale du centre-ouest de l’Australie", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "COST": "heure d’été de Colombie", "ADT": "heure d’été de l’Atlantique", "WITA": "heure du Centre indonésien", "MESZ": "heure d’été d’Europe centrale", "IST": "heure de l’Inde", "EDT": "heure d’été de l’Est", "SRT": "heure du Suriname", "HNOG": "heure normale de l’Ouest du Groenland", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "BOT": "heure de Bolivie", "OESZ": "heure d’été d’Europe de l’Est", "PDT": "heure d’été du Pacifique", "WESZ": "heure d’été d’Europe de l’Ouest", "HNT": "heure normale de Terre-Neuve", "ACST": "heure normale du centre de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "TMST": "heure d’été du Turkménistan", "ACDT": "heure d’été du centre de l’Australie", "HNEG": "heure normale de l’Est du Groenland", "VET": "heure du Venezuela", "WIT": "heure de l’Est indonésien", "LHDT": "heure d’été de Lord Howe", "SAST": "heure normale d’Afrique méridionale", "TMT": "heure normale du Turkménistan", "WAST": "heure d’été d’Afrique de l’Ouest", "WART": "heure normale de l’Ouest argentin", "MST": "heure normale de Macao", "HEPMX": "heure d’été du Pacifique mexicain", "CDT": "heure d’été du Centre", "WEZ": "heure normale d’Europe de l’Ouest", "HAT": "heure d’été de Terre-Neuve", "CLST": "heure d’été du Chili", "ChST": "heure des Chamorro", "WIB": "heure de l’Ouest indonésien", "UYST": "heure d’été de l’Uruguay", "AST": "heure normale de l’Atlantique", "PST": "heure normale du Pacifique nord-américain", "AWDT": "heure d’été de l’Ouest de l’Australie", "WAT": "heure normale d’Afrique de l’Ouest", "UYT": "heure normale de l’Uruguay", "HEOG": "heure d’été de l’Ouest du Groenland", "NZDT": "heure d’été de la Nouvelle-Zélande", "EST": "heure normale de l’Est nord-américain", "NZST": "heure normale de la Nouvelle-Zélande", "CAT": "heure normale d’Afrique centrale", "GMT": "heure moyenne de Greenwich", "AKST": "heure normale de l’Alaska", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "CHAST": "heure normale des îles Chatham", "JDT": "heure d’été du Japon", "WARST": "heure d’été de l’Ouest argentin", "COT": "heure normale de Colombie", "ECT": "heure de l’Équateur", "AKDT": "heure d’été de l’Alaska", "BT": "heure du Bhoutan", "ARST": "heure d’été de l’Argentine", "AWST": "heure normale de l’Ouest de l’Australie", "CLT": "heure normale du Chili", "CHADT": "heure d’été des îles Chatham", "∅∅∅": "heure d’été de l’Amazonie", "GFT": "heure de la Guyane française", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "ART": "heure normale d’Argentine", "HKST": "heure d’été de Hong Kong", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "MEZ": "heure normale d’Europe centrale", "SGT": "heure de Singapour", "HNPMX": "heure normale du Pacifique mexicain", "CST": "heure normale du centre nord-américain", "JST": "heure normale du Japon", "MDT": "heure d’été de Macao", "GYT": "heure du Guyana", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HECU": "heure d’été de Cuba", "AEST": "heure normale de l’Est de l’Australie", "HKT": "heure normale de Hong Kong", "LHST": "heure normale de Lord Howe", "HNCU": "heure normale de Cuba"}, -+ locale: "fr_KM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "CF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "SRT": "SRT", "HNPM": "HNPM", "OEZ": "OEZ", "WESZ": "WESZ", "AKST": "AKST", "HEOG": "HEOG", "ADT": "ADT", "UYT": "UYT", "PST": "PST", "AEST": "AEST", "HECU": "HECU", "HKST": "HKST", "HEEG": "HEEG", "AWST": "AWST", "WEZ": "WEZ", "AWDT": "AWDT", "PDT": "PDT", "CLST": "CLST", "NZDT": "NZDT", "AST": "AST", "EAT": "EAT", "HADT": "HADT", "HNEG": "HNEG", "ART": "ART", "HAT": "HAT", "GYT": "GYT", "VET": "VET", "WAT": "WAT", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "IST": "IST", "ACWDT": "ACWDT", "COT": "COT", "TMST": "TMST", "ChST": "ChST", "MYT": "MYT", "ACWST": "ACWST", "WIT": "WIT", "SGT": "SGT", "AKDT": "AKDT", "WARST": "WARST", "BOT": "BOT", "HAST": "HAST", "HEPM": "HEPM", "WIB": "WIB", "CHADT": "CHADT", "WART": "WART", "CST": "CST", "WITA": "WITA", "WAST": "WAST", "COST": "COST", "EDT": "EDT", "ECT": "ECT", "GMT": "GMT", "JST": "JST", "BT": "BT", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "MST": "MST", "HENOMX": "HENOMX", "UYST": "UYST", "LHST": "LHST", "CHAST": "CHAST", "HNOG": "HNOG", "MEZ": "MEZ", "ACST": "ACST", "ACDT": "ACDT", "EST": "EST", "NZST": "NZST", "ARST": "ARST", "MDT": "MDT", "LHDT": "LHDT", "HNT": "HNT", "CDT": "CDT", "JDT": "JDT", "GFT": "GFT", "TMT": "TMT", "HKT": "HKT", "CAT": "CAT", "CLT": "CLT", "MESZ": "MESZ", "HNPMX": "HNPMX", "HEPMX": "HEPMX"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_KM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_KM) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_KM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_KM) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_KM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_KM) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_KM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_KM' and handles both Whole and Real numbers based on 'v' - func (fr *fr_KM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_KM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_KM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_KM' -@@ -291,58 +200,7 @@ func (fr *fr_KM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_KM' -@@ -351,65 +209,7 @@ func (fr *fr_KM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_KM' -@@ -417,27 +217,6 @@ func (fr *fr_KM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_KM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_KM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_KM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_KM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_KM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_KM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_KM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_LU/fr_LU.go b/fr_LU/fr_LU.go -index 40c3deb..62ce12b 100644 ---- a/fr_LU/fr_LU.go -+++ b/fr_LU/fr_LU.go -@@ -10,72 +10,46 @@ import ( - ) -  - type fr_LU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_LU' locale - func New() locales.Translator { - return &fr_LU{ -- locale: "fr_LU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "F", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"BOT": "heure de Bolivie", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "OESZ": "heure d’été d’Europe de l’Est", "MST": "heure normale de Macao", "TMT": "heure normale du Turkménistan", "ECT": "heure de l’Équateur", "HEPMX": "heure d’été du Pacifique mexicain", "WIB": "heure de l’Ouest indonésien", "HAT": "heure d’été de Terre-Neuve", "HNOG": "heure normale de l’Ouest du Groenland", "PDT": "heure d’été du Pacifique", "WEZ": "heure normale d’Europe de l’Ouest", "WITA": "heure du Centre indonésien", "NZST": "heure normale de la Nouvelle-Zélande", "WART": "heure normale de l’Ouest argentin", "UYT": "heure normale de l’Uruguay", "WIT": "heure de l’Est indonésien", "AWDT": "heure d’été de l’Ouest de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "JST": "heure normale du Japon", "ACDT": "heure d’été du centre de l’Australie", "ADT": "heure d’été de l’Atlantique", "GYT": "heure du Guyana", "MESZ": "heure d’été d’Europe centrale", "HNEG": "heure normale de l’Est du Groenland", "VET": "heure du Venezuela", "ART": "heure normale d’Argentine", "MEZ": "heure normale d’Europe centrale", "LHDT": "heure d’été de Lord Howe", "∅∅∅": "heure d’été de l’Amazonie", "TMST": "heure d’été du Turkménistan", "ACST": "heure normale du centre de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CLST": "heure d’été du Chili", "SRT": "heure du Suriname", "GFT": "heure de la Guyane française", "WARST": "heure d’été de l’Ouest argentin", "CDT": "heure d’été du Centre", "PST": "heure normale du Pacifique nord-américain", "MYT": "heure de la Malaisie", "HNT": "heure normale de Terre-Neuve", "HKST": "heure d’été de Hong Kong", "CLT": "heure normale du Chili", "ChST": "heure des Chamorro", "GMT": "heure moyenne de Greenwich", "HNCU": "heure normale de Cuba", "AKST": "heure normale de l’Alaska", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "EAT": "heure normale d’Afrique de l’Est", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EST": "heure normale de l’Est nord-américain", "EDT": "heure d’été de l’Est", "MDT": "heure d’été de Macao", "CST": "heure normale du centre nord-américain", "AEDT": "heure d’été de l’Est de l’Australie", "IST": "heure de l’Inde", "WAST": "heure d’été d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "AST": "heure normale de l’Atlantique", "UYST": "heure d’été de l’Uruguay", "ARST": "heure d’été de l’Argentine", "ACWST": "heure normale du centre-ouest de l’Australie", "HKT": "heure normale de Hong Kong", "CHADT": "heure d’été des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "WAT": "heure normale d’Afrique de l’Ouest", "COT": "heure normale de Colombie", "COST": "heure d’été de Colombie", "SGT": "heure de Singapour", "BT": "heure du Bhoutan", "HEOG": "heure d’été de l’Ouest du Groenland", "WESZ": "heure d’été d’Europe de l’Ouest", "CHAST": "heure normale des îles Chatham", "LHST": "heure normale de Lord Howe", "HECU": "heure d’été de Cuba", "HNPMX": "heure normale du Pacifique mexicain", "AKDT": "heure d’été de l’Alaska", "AWST": "heure normale de l’Ouest de l’Australie", "JDT": "heure d’été du Japon", "CAT": "heure normale d’Afrique centrale", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie"}, -+ locale: "fr_LU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "F", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "TMT": "TMT", "ChST": "ChST", "ECT": "ECT", "HNEG": "HNEG", "HENOMX": "HENOMX", "IST": "IST", "PDT": "PDT", "WAT": "WAT", "OEZ": "OEZ", "WARST": "WARST", "ART": "ART", "CDT": "CDT", "EAT": "EAT", "HNNOMX": "HNNOMX", "AWST": "AWST", "UYT": "UYT", "WESZ": "WESZ", "HNPMX": "HNPMX", "CAT": "CAT", "LHDT": "LHDT", "ACWDT": "ACWDT", "HAT": "HAT", "COT": "COT", "TMST": "TMST", "MST": "MST", "WEZ": "WEZ", "SGT": "SGT", "WAST": "WAST", "AKDT": "AKDT", "COST": "COST", "HKST": "HKST", "ARST": "ARST", "HEEG": "HEEG", "AWDT": "AWDT", "VET": "VET", "GYT": "GYT", "EST": "EST", "GMT": "GMT", "MYT": "MYT", "HEPM": "HEPM", "CHAST": "CHAST", "HECU": "HECU", "HNT": "HNT", "CLT": "CLT", "ADT": "ADT", "WIB": "WIB", "ACWST": "ACWST", "AEST": "AEST", "UYST": "UYST", "AKST": "AKST", "WIT": "WIT", "WITA": "WITA", "NZST": "NZST", "BOT": "BOT", "HADT": "HADT", "LHST": "LHST", "HNPM": "HNPM", "GFT": "GFT", "HNOG": "HNOG", "SRT": "SRT", "AEDT": "AEDT", "HNCU": "HNCU", "OESZ": "OESZ", "CLST": "CLST", "JDT": "JDT", "PST": "PST", "HKT": "HKT", "JST": "JST", "SAST": "SAST", "MDT": "MDT", "ACDT": "ACDT", "EDT": "EDT", "CST": "CST", "NZDT": "NZDT", "AST": "AST", "CHADT": "CHADT", "HEOG": "HEOG", "HAST": "HAST", "MEZ": "MEZ", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "ACST": "ACST", "BT": "BT", "WART": "WART"}, - } - } -  -@@ -147,7 +121,7 @@ func (fr *fr_LU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_LU) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +131,7 @@ func (fr *fr_LU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_LU) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +141,7 @@ func (fr *fr_LU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_LU) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,75 +187,13 @@ func (fr *fr_LU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_LU' and handles both Whole and Real numbers based on 'v' - func (fr *fr_LU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_LU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_LU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_LU' -@@ -289,56 +201,7 @@ func (fr *fr_LU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_LU' -@@ -347,63 +210,7 @@ func (fr *fr_LU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_LU' -@@ -411,27 +218,6 @@ func (fr *fr_LU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,17 +226,6 @@ func (fr *fr_LU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -459,17 +234,6 @@ func (fr *fr_LU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,19 +242,6 @@ func (fr *fr_LU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -499,19 +250,6 @@ func (fr *fr_LU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -520,26 +258,6 @@ func (fr *fr_LU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -548,30 +266,6 @@ func (fr *fr_LU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -580,34 +274,5 @@ func (fr *fr_LU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_MA/fr_MA.go b/fr_MA/fr_MA.go -index 95bee04..2d65fea 100644 ---- a/fr_MA/fr_MA.go -+++ b/fr_MA/fr_MA.go -@@ -10,72 +10,48 @@ import ( - ) -  - type fr_MA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MA' locale - func New() locales.Translator { - return &fr_MA{ -- locale: "fr_MA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "fév.", "mar.", "avr.", "mai", "jui.", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HEPMX": "heure d’été du Pacifique mexicain", "WIT": "heure de l’Est indonésien", "BT": "heure du Bhoutan", "PDT": "heure d’été du Pacifique", "WEZ": "heure normale d’Europe de l’Ouest", "AWST": "heure normale de l’Ouest de l’Australie", "SAST": "heure normale d’Afrique méridionale", "ChST": "heure des Chamorro", "WARST": "heure d’été de l’Ouest argentin", "COT": "heure normale de Colombie", "SRT": "heure du Suriname", "PST": "heure normale du Pacifique nord-américain", "LHDT": "heure d’été de Lord Howe", "∅∅∅": "heure d’été de l’Amazonie", "ECT": "heure de l’Équateur", "EST": "heure normale de l’Est nord-américain", "MYT": "heure de la Malaisie", "HAT": "heure d’été de Terre-Neuve", "LHST": "heure normale de Lord Howe", "TMST": "heure d’été du Turkménistan", "WAST": "heure d’été d’Afrique de l’Ouest", "AEDT": "heure d’été de l’Est de l’Australie", "IST": "heure de l’Inde", "JST": "heure normale du Japon", "EDT": "heure d’été de l’Est", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HKT": "heure normale de Hong Kong", "NZST": "heure normale de la Nouvelle-Zélande", "CLT": "heure normale du Chili", "BOT": "heure de Bolivie", "COST": "heure d’été de Colombie", "HECU": "heure d’été de Cuba", "MST": "heure normale de Macao", "UYST": "heure d’été de l’Uruguay", "HEEG": "heure d’été de l’Est du Groenland", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "ACWST": "heure normale du centre-ouest de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "MDT": "heure d’été de Macao", "WIB": "heure de l’Ouest indonésien", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MEZ": "heure normale d’Europe centrale", "NZDT": "heure d’été de la Nouvelle-Zélande", "EAT": "heure normale d’Afrique de l’Est", "OEZ": "heure normale d’Europe de l’Est", "HNCU": "heure normale de Cuba", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WESZ": "heure d’été d’Europe de l’Ouest", "HNOG": "heure normale de l’Ouest du Groenland", "HEOG": "heure d’été de l’Ouest du Groenland", "HKST": "heure d’été de Hong Kong", "AWDT": "heure d’été de l’Ouest de l’Australie", "CHADT": "heure d’été des îles Chatham", "HNEG": "heure normale de l’Est du Groenland", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HNPMX": "heure normale du Pacifique mexicain", "CDT": "heure d’été du Centre", "UYT": "heure normale de l’Uruguay", "GFT": "heure de la Guyane française", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "JDT": "heure d’été du Japon", "TMT": "heure normale du Turkménistan", "OESZ": "heure d’été d’Europe de l’Est", "WITA": "heure du Centre indonésien", "MESZ": "heure d’été d’Europe centrale", "AKST": "heure normale de l’Alaska", "CST": "heure normale du centre nord-américain", "VET": "heure du Venezuela", "CLST": "heure d’été du Chili", "WART": "heure normale de l’Ouest argentin", "AST": "heure normale de l’Atlantique", "ADT": "heure d’été de l’Atlantique", "ARST": "heure d’été de l’Argentine", "AKDT": "heure d’été de l’Alaska", "GYT": "heure du Guyana", "CHAST": "heure normale des îles Chatham", "ACST": "heure normale du centre de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "CAT": "heure normale d’Afrique centrale", "WAT": "heure normale d’Afrique de l’Ouest", "SGT": "heure de Singapour", "ACWDT": "heure d’été du centre-ouest de l’Australie", "ART": "heure normale d’Argentine", "GMT": "heure moyenne de Greenwich", "HNT": "heure normale de Terre-Neuve"}, -+ locale: "fr_MA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "jan.", "fév.", "mar.", "avr.", "mai", "jui.", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -+ periodsWide: []string{"a.m.", "p.m."}, -+ timezones: map[string]string{"LHST": "LHST", "UYST": "UYST", "OEZ": "OEZ", "COST": "COST", "WIB": "WIB", "CDT": "CDT", "ChST": "ChST", "HAT": "HAT", "JDT": "JDT", "LHDT": "LHDT", "PDT": "PDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "EST": "EST", "HNPM": "HNPM", "UYT": "UYT", "SGT": "SGT", "WAST": "WAST", "AKDT": "AKDT", "MST": "MST", "ARST": "ARST", "GMT": "GMT", "HKST": "HKST", "HECU": "HECU", "HNPMX": "HNPMX", "WESZ": "WESZ", "SRT": "SRT", "MESZ": "MESZ", "ACDT": "ACDT", "HENOMX": "HENOMX", "CHAST": "CHAST", "AKST": "AKST", "TMST": "TMST", "BOT": "BOT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HADT": "HADT", "CHADT": "CHADT", "NZDT": "NZDT", "ADT": "ADT", "HAST": "HAST", "WEZ": "WEZ", "TMT": "TMT", "WARST": "WARST", "AST": "AST", "ACWST": "ACWST", "WART": "WART", "BT": "BT", "IST": "IST", "PST": "PST", "VET": "VET", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "CLST": "CLST", "NZST": "NZST", "GFT": "GFT", "HNT": "HNT", "SAST": "SAST", "WAT": "WAT", "COT": "COT", "ECT": "ECT", "CST": "CST", "MYT": "MYT", "WITA": "WITA", "JST": "JST", "OESZ": "OESZ", "EDT": "EDT", "CLT": "CLT", "MDT": "MDT", "HEEG": "HEEG", "ACST": "ACST", "HEPM": "HEPM", "GYT": "GYT", "AEST": "AEST", "AEDT": "AEDT", "WIT": "WIT", "HEOG": "HEOG", "MEZ": "MEZ", "AWST": "AWST", "AWDT": "AWDT", "HEPMX": "HEPMX", "HKT": "HKT", "CAT": "CAT", "ART": "ART", "EAT": "EAT"}, - } - } -  -@@ -157,7 +133,7 @@ func (fr *fr_MA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MA) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +143,7 @@ func (fr *fr_MA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MA) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,75 +189,13 @@ func (fr *fr_MA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MA' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MA' -@@ -289,56 +203,7 @@ func (fr *fr_MA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MA' -@@ -347,63 +212,7 @@ func (fr *fr_MA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MA' -@@ -411,27 +220,6 @@ func (fr *fr_MA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,17 +228,6 @@ func (fr *fr_MA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -459,17 +236,6 @@ func (fr *fr_MA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,19 +244,6 @@ func (fr *fr_MA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -499,19 +252,6 @@ func (fr *fr_MA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -520,26 +260,6 @@ func (fr *fr_MA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -548,30 +268,6 @@ func (fr *fr_MA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -580,34 +276,5 @@ func (fr *fr_MA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_MC/fr_MC.go b/fr_MC/fr_MC.go -index 6467961..61c0488 100644 ---- a/fr_MC/fr_MC.go -+++ b/fr_MC/fr_MC.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_MC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MC' locale - func New() locales.Translator { - return &fr_MC{ -- locale: "fr_MC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"JDT": "heure d’été du Japon", "BT": "heure du Bhoutan", "HNT": "heure normale de Terre-Neuve", "ART": "heure normale d’Argentine", "AEST": "heure normale de l’Est de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "ECT": "heure de l’Équateur", "HNPMX": "heure normale du Pacifique mexicain", "AKDT": "heure d’été de l’Alaska", "HEOG": "heure d’été de l’Ouest du Groenland", "WAT": "heure normale d’Afrique de l’Ouest", "WAST": "heure d’été d’Afrique de l’Ouest", "OEZ": "heure normale d’Europe de l’Est", "AST": "heure normale de l’Atlantique", "WIB": "heure de l’Ouest indonésien", "WESZ": "heure d’été d’Europe de l’Ouest", "MESZ": "heure d’été d’Europe centrale", "LHDT": "heure d’été de Lord Howe", "ChST": "heure des Chamorro", "CST": "heure normale du centre nord-américain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HKT": "heure normale de Hong Kong", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "IST": "heure de l’Inde", "WARST": "heure d’été de l’Ouest argentin", "HNCU": "heure normale de Cuba", "HAT": "heure d’été de Terre-Neuve", "ARST": "heure d’été de l’Argentine", "JST": "heure normale du Japon", "GFT": "heure de la Guyane française", "TMST": "heure d’été du Turkménistan", "ACDT": "heure d’été du centre de l’Australie", "CDT": "heure d’été du Centre", "ADT": "heure d’été de l’Atlantique", "UYST": "heure d’été de l’Uruguay", "VET": "heure du Venezuela", "PST": "heure normale du Pacifique nord-américain", "BOT": "heure de Bolivie", "CAT": "heure normale d’Afrique centrale", "COST": "heure d’été de Colombie", "EST": "heure normale de l’Est nord-américain", "GYT": "heure du Guyana", "HNOG": "heure normale de l’Ouest du Groenland", "HEEG": "heure d’été de l’Est du Groenland", "LHST": "heure normale de Lord Howe", "SAST": "heure normale d’Afrique méridionale", "GMT": "heure moyenne de Greenwich", "SGT": "heure de Singapour", "MDT": "heure d’été de Macao", "HEPMX": "heure d’été du Pacifique mexicain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACWST": "heure normale du centre-ouest de l’Australie", "CLT": "heure normale du Chili", "∅∅∅": "heure d’été de l’Amazonie", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "UYT": "heure normale de l’Uruguay", "AWDT": "heure d’été de l’Ouest de l’Australie", "HKST": "heure d’été de Hong Kong", "HNEG": "heure normale de l’Est du Groenland", "TMT": "heure normale du Turkménistan", "EAT": "heure normale d’Afrique de l’Est", "NZST": "heure normale de la Nouvelle-Zélande", "NZDT": "heure d’été de la Nouvelle-Zélande", "OESZ": "heure d’été d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "HECU": "heure d’été de Cuba", "CHADT": "heure d’été des îles Chatham", "MYT": "heure de la Malaisie", "SRT": "heure du Suriname", "PDT": "heure d’été du Pacifique", "CHAST": "heure normale des îles Chatham", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "MST": "heure normale de Macao", "WIT": "heure de l’Est indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "CLST": "heure d’été du Chili", "ACST": "heure normale du centre de l’Australie", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "WITA": "heure du Centre indonésien", "HNPM": "heure normale de Saint-Pierre-et-Miquelon"}, -+ locale: "fr_MC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GYT": "GYT", "CLT": "CLT", "CDT": "CDT", "MST": "MST", "HEPM": "HEPM", "HNPMX": "HNPMX", "AKST": "AKST", "WESZ": "WESZ", "GFT": "GFT", "WITA": "WITA", "ECT": "ECT", "ADT": "ADT", "ACWST": "ACWST", "CHADT": "CHADT", "UYT": "UYT", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "LHST": "LHST", "HNCU": "HNCU", "HAT": "HAT", "CST": "CST", "ARST": "ARST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "BT": "BT", "WEZ": "WEZ", "WARST": "WARST", "COT": "COT", "ChST": "ChST", "EAT": "EAT", "SGT": "SGT", "VET": "VET", "HNT": "HNT", "WIT": "WIT", "WIB": "WIB", "AST": "AST", "HENOMX": "HENOMX", "AEDT": "AEDT", "CHAST": "CHAST", "UYST": "UYST", "HKT": "HKT", "AWDT": "AWDT", "COST": "COST", "HECU": "HECU", "TMST": "TMST", "BOT": "BOT", "SRT": "SRT", "HADT": "HADT", "PDT": "PDT", "ACWDT": "ACWDT", "WART": "WART", "HNOG": "HNOG", "EST": "EST", "HKST": "HKST", "MEZ": "MEZ", "HNPM": "HNPM", "AEST": "AEST", "HEPMX": "HEPMX", "HAST": "HAST", "PST": "PST", "CLST": "CLST", "GMT": "GMT", "AWST": "AWST", "JST": "JST", "OESZ": "OESZ", "HEOG": "HEOG", "MDT": "MDT", "NZST": "NZST", "NZDT": "NZDT", "ART": "ART", "WAST": "WAST", "AKDT": "AKDT", "EDT": "EDT", "MESZ": "MESZ", "ACST": "ACST", "LHDT": "LHDT", "MYT": "MYT", "CAT": "CAT", "HNEG": "HNEG", "JDT": "JDT", "WAT": "WAT", "OEZ": "OEZ", "SAST": "SAST", "TMT": "TMT", "IST": "IST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_MC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_MC) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_MC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MC) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_MC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MC) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_MC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MC' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MC' -@@ -291,58 +200,7 @@ func (fr *fr_MC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MC' -@@ -351,65 +209,7 @@ func (fr *fr_MC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MC' -@@ -417,27 +217,6 @@ func (fr *fr_MC) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_MC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_MC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_MC) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_MC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_MC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_MC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_MC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_MF/fr_MF.go b/fr_MF/fr_MF.go -index a5e5673..8e29fbd 100644 ---- a/fr_MF/fr_MF.go -+++ b/fr_MF/fr_MF.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_MF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MF' locale - func New() locales.Translator { - return &fr_MF{ -- locale: "fr_MF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HKT": "heure normale de Hong Kong", "ECT": "heure de l’Équateur", "AWST": "heure normale de l’Ouest de l’Australie", "WAT": "heure normale d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "HECU": "heure d’été de Cuba", "WEZ": "heure normale d’Europe de l’Ouest", "LHST": "heure normale de Lord Howe", "LHDT": "heure d’été de Lord Howe", "CLST": "heure d’été du Chili", "HEEG": "heure d’été de l’Est du Groenland", "NZST": "heure normale de la Nouvelle-Zélande", "AKDT": "heure d’été de l’Alaska", "PST": "heure normale du Pacifique nord-américain", "PDT": "heure d’été du Pacifique", "MESZ": "heure d’été d’Europe centrale", "TMT": "heure normale du Turkménistan", "WARST": "heure d’été de l’Ouest argentin", "ART": "heure normale d’Argentine", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZDT": "heure d’été de la Nouvelle-Zélande", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HAT": "heure d’été de Terre-Neuve", "CAT": "heure normale d’Afrique centrale", "HNPMX": "heure normale du Pacifique mexicain", "EDT": "heure d’été de l’Est", "UYT": "heure normale de l’Uruguay", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "BT": "heure du Bhoutan", "SAST": "heure normale d’Afrique méridionale", "CLT": "heure normale du Chili", "ARST": "heure d’été de l’Argentine", "CST": "heure normale du centre nord-américain", "AST": "heure normale de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "HEOG": "heure d’été de l’Ouest du Groenland", "JDT": "heure d’été du Japon", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "WIB": "heure de l’Ouest indonésien", "ACST": "heure normale du centre de l’Australie", "OEZ": "heure normale d’Europe de l’Est", "MST": "heure normale de Macao", "HEPMX": "heure d’été du Pacifique mexicain", "VET": "heure du Venezuela", "WIT": "heure de l’Est indonésien", "SRT": "heure du Suriname", "ACWDT": "heure d’été du centre-ouest de l’Australie", "GFT": "heure de la Guyane française", "WART": "heure normale de l’Ouest argentin", "UYST": "heure d’été de l’Uruguay", "WITA": "heure du Centre indonésien", "HNEG": "heure normale de l’Est du Groenland", "HNCU": "heure normale de Cuba", "COT": "heure normale de Colombie", "WESZ": "heure d’été d’Europe de l’Ouest", "∅∅∅": "heure d’été de l’Amazonie", "ChST": "heure des Chamorro", "COST": "heure d’été de Colombie", "GMT": "heure moyenne de Greenwich", "HKST": "heure d’été de Hong Kong", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "ACDT": "heure d’été du centre de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "ADT": "heure d’été de l’Atlantique", "MYT": "heure de la Malaisie", "CHADT": "heure d’été des îles Chatham", "MEZ": "heure normale d’Europe centrale", "JST": "heure normale du Japon", "AKST": "heure normale de l’Alaska", "GYT": "heure du Guyana", "HNOG": "heure normale de l’Ouest du Groenland", "CHAST": "heure normale des îles Chatham", "SGT": "heure de Singapour", "EST": "heure normale de l’Est nord-américain", "WAST": "heure d’été d’Afrique de l’Ouest", "CDT": "heure d’été du Centre", "AWDT": "heure d’été de l’Ouest de l’Australie", "IST": "heure de l’Inde", "BOT": "heure de Bolivie", "AEST": "heure normale de l’Est de l’Australie", "TMST": "heure d’été du Turkménistan", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AEDT": "heure d’été de l’Est de l’Australie", "MDT": "heure d’été de Macao", "ACWST": "heure normale du centre-ouest de l’Australie"}, -+ locale: "fr_MF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYT": "UYT", "HNT": "HNT", "∅∅∅": "∅∅∅", "LHDT": "LHDT", "MYT": "MYT", "HNCU": "HNCU", "WITA": "WITA", "ChST": "ChST", "ARST": "ARST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "AKST": "AKST", "GFT": "GFT", "MEZ": "MEZ", "BOT": "BOT", "HADT": "HADT", "TMST": "TMST", "NZST": "NZST", "NZDT": "NZDT", "MDT": "MDT", "HNEG": "HNEG", "VET": "VET", "EST": "EST", "MST": "MST", "ACST": "ACST", "PST": "PST", "HAST": "HAST", "AWDT": "AWDT", "HNPM": "HNPM", "IST": "IST", "WEZ": "WEZ", "WESZ": "WESZ", "SGT": "SGT", "HNPMX": "HNPMX", "HENOMX": "HENOMX", "WART": "WART", "COST": "COST", "AKDT": "AKDT", "HKST": "HKST", "TMT": "TMT", "JDT": "JDT", "ECT": "ECT", "LHST": "LHST", "ACWDT": "ACWDT", "HECU": "HECU", "SAST": "SAST", "ART": "ART", "JST": "JST", "AEST": "AEST", "AEDT": "AEDT", "CHADT": "CHADT", "WAT": "WAT", "OEZ": "OEZ", "HAT": "HAT", "CST": "CST", "HEPM": "HEPM", "HEPMX": "HEPMX", "COT": "COT", "EDT": "EDT", "CLST": "CLST", "GMT": "GMT", "UYST": "UYST", "EAT": "EAT", "HEEG": "HEEG", "OESZ": "OESZ", "WIT": "WIT", "GYT": "GYT", "HKT": "HKT", "CLT": "CLT", "SRT": "SRT", "ADT": "ADT", "CDT": "CDT", "HEOG": "HEOG", "HNOG": "HNOG", "AWST": "AWST", "PDT": "PDT", "BT": "BT", "CHAST": "CHAST", "WARST": "WARST", "MESZ": "MESZ", "WAST": "WAST", "CAT": "CAT", "WIB": "WIB", "AST": "AST", "ACWST": "ACWST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_MF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_MF) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_MF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MF) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_MF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MF) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_MF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MF' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MF' -@@ -291,58 +200,7 @@ func (fr *fr_MF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MF' -@@ -351,65 +209,7 @@ func (fr *fr_MF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MF' -@@ -417,27 +217,6 @@ func (fr *fr_MF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_MF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_MF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_MF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_MF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_MF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_MF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_MF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_MG/fr_MG.go b/fr_MG/fr_MG.go -index ab797d8..0fc6963 100644 ---- a/fr_MG/fr_MG.go -+++ b/fr_MG/fr_MG.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_MG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MG' locale - func New() locales.Translator { - return &fr_MG{ -- locale: "fr_MG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "Ar", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HAST": "heure normale d’Hawaii - Aléoutiennes", "WITA": "heure du Centre indonésien", "MESZ": "heure d’été d’Europe centrale", "LHDT": "heure d’été de Lord Howe", "EDT": "heure d’été de l’Est", "PST": "heure normale du Pacifique nord-américain", "AEST": "heure normale de l’Est de l’Australie", "HKT": "heure normale de Hong Kong", "COST": "heure d’été de Colombie", "HAT": "heure d’été de Terre-Neuve", "HNCU": "heure normale de Cuba", "CDT": "heure d’été du Centre", "TMST": "heure d’été du Turkménistan", "WAST": "heure d’été d’Afrique de l’Ouest", "MYT": "heure de la Malaisie", "WEZ": "heure normale d’Europe de l’Ouest", "CLT": "heure normale du Chili", "HNEG": "heure normale de l’Est du Groenland", "BOT": "heure de Bolivie", "EAT": "heure normale d’Afrique de l’Est", "UYST": "heure d’été de l’Uruguay", "HNT": "heure normale de Terre-Neuve", "CHAST": "heure normale des îles Chatham", "CHADT": "heure d’été des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "ChST": "heure des Chamorro", "TMT": "heure normale du Turkménistan", "WARST": "heure d’été de l’Ouest argentin", "MST": "heure normale de Macao", "ART": "heure normale d’Argentine", "AWDT": "heure d’été de l’Ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "OEZ": "heure normale d’Europe de l’Est", "SRT": "heure du Suriname", "PDT": "heure d’été du Pacifique", "ACWDT": "heure d’été du centre-ouest de l’Australie", "CLST": "heure d’été du Chili", "GFT": "heure de la Guyane française", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "MDT": "heure d’été de Macao", "UYT": "heure normale de l’Uruguay", "AKDT": "heure d’été de l’Alaska", "ADT": "heure d’été de l’Atlantique", "WESZ": "heure d’été d’Europe de l’Ouest", "AWST": "heure normale de l’Ouest de l’Australie", "HKST": "heure d’été de Hong Kong", "ACST": "heure normale du centre de l’Australie", "HNPMX": "heure normale du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "VET": "heure du Venezuela", "BT": "heure du Bhoutan", "HEOG": "heure d’été de l’Ouest du Groenland", "LHST": "heure normale de Lord Howe", "NZST": "heure normale de la Nouvelle-Zélande", "∅∅∅": "heure d’été du Pérou", "CAT": "heure normale d’Afrique centrale", "WART": "heure normale de l’Ouest argentin", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "GMT": "heure moyenne de Greenwich", "WIB": "heure de l’Ouest indonésien", "HEPMX": "heure d’été du Pacifique mexicain", "CST": "heure normale du centre nord-américain", "WIT": "heure de l’Est indonésien", "ARST": "heure d’été de l’Argentine", "HNOG": "heure normale de l’Ouest du Groenland", "NZDT": "heure d’été de la Nouvelle-Zélande", "OESZ": "heure d’été d’Europe de l’Est", "COT": "heure normale de Colombie", "HECU": "heure d’été de Cuba", "EST": "heure normale de l’Est nord-américain", "HEEG": "heure d’été de l’Est du Groenland", "WAT": "heure normale d’Afrique de l’Ouest", "ECT": "heure de l’Équateur", "GYT": "heure du Guyana", "ACWST": "heure normale du centre-ouest de l’Australie", "IST": "heure de l’Inde", "ACDT": "heure d’été du centre de l’Australie", "SGT": "heure de Singapour", "AEDT": "heure d’été de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale", "JST": "heure normale du Japon", "JDT": "heure d’été du Japon", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "AKST": "heure normale de l’Alaska", "HADT": "heure d’été d’Hawaii - Aléoutiennes"}, -+ locale: "fr_MG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "Ar", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "TMT": "TMT", "CLST": "CLST", "ADT": "ADT", "AWDT": "AWDT", "ACWST": "ACWST", "HAT": "HAT", "WART": "WART", "AST": "AST", "PDT": "PDT", "HNPM": "HNPM", "ACWDT": "ACWDT", "SAST": "SAST", "HNEG": "HNEG", "LHDT": "LHDT", "JDT": "JDT", "VET": "VET", "HEEG": "HEEG", "WIT": "WIT", "ART": "ART", "SRT": "SRT", "COT": "COT", "HEOG": "HEOG", "GYT": "GYT", "LHST": "LHST", "CHADT": "CHADT", "HECU": "HECU", "HEPMX": "HEPMX", "WAST": "WAST", "HKT": "HKT", "CLT": "CLT", "MEZ": "MEZ", "MESZ": "MESZ", "ACST": "ACST", "WEZ": "WEZ", "EDT": "EDT", "ARST": "ARST", "EAT": "EAT", "MYT": "MYT", "BT": "BT", "HNOG": "HNOG", "HKST": "HKST", "WITA": "WITA", "MDT": "MDT", "AWST": "AWST", "∅∅∅": "∅∅∅", "IST": "IST", "CHAST": "CHAST", "CAT": "CAT", "BOT": "BOT", "WARST": "WARST", "NZST": "NZST", "PST": "PST", "UYT": "UYT", "UYST": "UYST", "WESZ": "WESZ", "WIB": "WIB", "HADT": "HADT", "ACDT": "ACDT", "HENOMX": "HENOMX", "HEPM": "HEPM", "JST": "JST", "COST": "COST", "TMST": "TMST", "GMT": "GMT", "MST": "MST", "ChST": "ChST", "AEDT": "AEDT", "SGT": "SGT", "HNCU": "HNCU", "HNPMX": "HNPMX", "OEZ": "OEZ", "HNT": "HNT", "CST": "CST", "HNNOMX": "HNNOMX", "AKST": "AKST", "AKDT": "AKDT", "OESZ": "OESZ", "CDT": "CDT", "NZDT": "NZDT", "ECT": "ECT", "WAT": "WAT", "AEST": "AEST", "EST": "EST", "HAST": "HAST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_MG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_MG) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_MG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MG) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_MG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MG) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_MG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MG' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MG' -@@ -291,58 +200,7 @@ func (fr *fr_MG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MG' -@@ -351,65 +209,7 @@ func (fr *fr_MG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MG' -@@ -417,27 +217,6 @@ func (fr *fr_MG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_MG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_MG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_MG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_MG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_MG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_MG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_MG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_ML/fr_ML.go b/fr_ML/fr_ML.go -index 54b0991..94a937c 100644 ---- a/fr_ML/fr_ML.go -+++ b/fr_ML/fr_ML.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_ML struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_ML' locale - func New() locales.Translator { - return &fr_ML{ -- locale: "fr_ML", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"TMST": "heure d’été du Turkménistan", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "SGT": "heure de Singapour", "UYT": "heure normale de l’Uruguay", "AKDT": "heure d’été de l’Alaska", "MST": "heure normale des Rocheuses", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HKST": "heure d’été de Hong Kong", "HEPMX": "heure d’été du Pacifique mexicain", "WEZ": "heure normale d’Europe de l’Ouest", "WAT": "heure normale d’Afrique de l’Ouest", "PDT": "heure d’été du Pacifique", "LHST": "heure normale de Lord Howe", "JST": "heure normale du Japon", "EST": "heure normale de l’Est nord-américain", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACWST": "heure normale du centre-ouest de l’Australie", "CLT": "heure normale du Chili", "WARST": "heure d’été de l’Ouest argentin", "AWST": "heure normale de l’Ouest de l’Australie", "HKT": "heure normale de Hong Kong", "LHDT": "heure d’été de Lord Howe", "EDT": "heure d’été de l’Est", "NZDT": "heure d’été de la Nouvelle-Zélande", "SAST": "heure normale d’Afrique méridionale", "BOT": "heure de Bolivie", "CST": "heure normale du centre nord-américain", "ADT": "heure d’été de l’Atlantique", "VET": "heure du Venezuela", "WIT": "heure de l’Est indonésien", "SRT": "heure du Suriname", "CAT": "heure normale d’Afrique centrale", "BT": "heure du Bhoutan", "ARST": "heure d’été de l’Argentine", "AEST": "heure normale de l’Est de l’Australie", "MESZ": "heure d’été d’Europe centrale", "∅∅∅": "heure d’été de l’Amazonie", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "HEOG": "heure d’été de l’Ouest du Groenland", "MEZ": "heure normale d’Europe centrale", "CHAST": "heure normale des îles Chatham", "CLST": "heure d’été du Chili", "HNEG": "heure normale de l’Est du Groenland", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "HECU": "heure d’été de Cuba", "EAT": "heure normale d’Afrique de l’Est", "WAST": "heure d’été d’Afrique de l’Ouest", "AST": "heure normale de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "HAT": "heure d’été de Terre-Neuve", "ART": "heure normale d’Argentine", "ACST": "heure normale du centre de l’Australie", "UYST": "heure d’été de l’Uruguay", "GYT": "heure du Guyana", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CHADT": "heure d’été des îles Chatham", "TMT": "heure normale du Turkménistan", "OESZ": "heure d’été d’Europe de l’Est", "HNCU": "heure normale de Cuba", "AKST": "heure normale de l’Alaska", "MDT": "heure d’été des Rocheuses", "AEDT": "heure d’été de l’Est de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "GFT": "heure de la Guyane française", "WESZ": "heure d’été d’Europe de l’Ouest", "WITA": "heure du Centre indonésien", "COT": "heure normale de Colombie", "GMT": "heure moyenne de Greenwich", "WART": "heure normale de l’Ouest argentin", "CDT": "heure d’été du Centre", "HNOG": "heure normale de l’Ouest du Groenland", "IST": "heure de l’Inde", "JDT": "heure d’été du Japon", "ECT": "heure de l’Équateur", "ACDT": "heure d’été du centre de l’Australie", "COST": "heure d’été de Colombie", "HNPMX": "heure normale du Pacifique mexicain", "MYT": "heure de la Malaisie", "WIB": "heure de l’Ouest indonésien", "PST": "heure normale du Pacifique nord-américain", "AWDT": "heure d’été de l’Ouest de l’Australie", "ChST": "heure des Chamorro"}, -+ locale: "fr_ML", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OESZ": "OESZ", "WARST": "WARST", "GYT": "GYT", "EST": "EST", "ChST": "ChST", "JST": "JST", "SGT": "SGT", "CAT": "CAT", "NZDT": "NZDT", "AWST": "AWST", "PST": "PST", "UYT": "UYT", "GFT": "GFT", "∅∅∅": "∅∅∅", "HAST": "HAST", "MEZ": "MEZ", "SAST": "SAST", "COT": "COT", "MYT": "MYT", "HEPMX": "HEPMX", "WITA": "WITA", "MST": "MST", "HECU": "HECU", "WAST": "WAST", "WART": "WART", "WIT": "WIT", "HEOG": "HEOG", "ADT": "ADT", "JDT": "JDT", "ACWST": "ACWST", "HNPMX": "HNPMX", "CLST": "CLST", "ART": "ART", "ARST": "ARST", "MESZ": "MESZ", "ACWDT": "ACWDT", "NZST": "NZST", "SRT": "SRT", "PDT": "PDT", "AKST": "AKST", "AKDT": "AKDT", "TMT": "TMT", "TMST": "TMST", "CST": "CST", "BOT": "BOT", "ACST": "ACST", "ACDT": "ACDT", "HEEG": "HEEG", "HKST": "HKST", "EAT": "EAT", "AWDT": "AWDT", "LHST": "LHST", "HNCU": "HNCU", "EDT": "EDT", "HADT": "HADT", "HNNOMX": "HNNOMX", "HAT": "HAT", "COST": "COST", "WIB": "WIB", "HENOMX": "HENOMX", "BT": "BT", "AEST": "AEST", "WESZ": "WESZ", "HNOG": "HNOG", "LHDT": "LHDT", "HNPM": "HNPM", "IST": "IST", "AEDT": "AEDT", "UYST": "UYST", "WEZ": "WEZ", "CLT": "CLT", "ECT": "ECT", "CHAST": "CHAST", "CHADT": "CHADT", "WAT": "WAT", "OEZ": "OEZ", "HNT": "HNT", "HKT": "HKT", "CDT": "CDT", "AST": "AST", "GMT": "GMT", "HNEG": "HNEG", "VET": "VET", "MDT": "MDT", "HEPM": "HEPM"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_ML) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_ML) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_ML) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_ML) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_ML) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_ML) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_ML) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_ML' and handles both Whole and Real numbers based on 'v' - func (fr *fr_ML) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_ML' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_ML) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_ML' -@@ -291,58 +200,7 @@ func (fr *fr_ML) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_ML' -@@ -351,65 +209,7 @@ func (fr *fr_ML) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_ML' -@@ -417,27 +217,6 @@ func (fr *fr_ML) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_ML) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_ML) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_ML) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_ML) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_ML) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_ML) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_ML) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_MQ/fr_MQ.go b/fr_MQ/fr_MQ.go -index 423db2c..3e9e269 100644 ---- a/fr_MQ/fr_MQ.go -+++ b/fr_MQ/fr_MQ.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_MQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MQ' locale - func New() locales.Translator { - return &fr_MQ{ -- locale: "fr_MQ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"ECT": "heure de l’Équateur", "HEPMX": "heure d’été du Pacifique mexicain", "MYT": "heure de la Malaisie", "AWDT": "heure d’été de l’Ouest de l’Australie", "LHDT": "heure d’été de Lord Howe", "CHADT": "heure d’été des îles Chatham", "CLT": "heure normale du Chili", "OEZ": "heure normale d’Europe de l’Est", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "WIT": "heure de l’Est indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "CHAST": "heure normale des îles Chatham", "AST": "heure normale de l’Atlantique", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "SAST": "heure normale d’Afrique méridionale", "HNEG": "heure normale de l’Est du Groenland", "TMT": "heure normale du Turkménistan", "WAT": "heure normale d’Afrique de l’Ouest", "EST": "heure normale de l’Est nord-américain", "UYST": "heure d’été de l’Uruguay", "PST": "heure normale du Pacifique nord-américain", "HEEG": "heure d’été de l’Est du Groenland", "TMST": "heure d’été du Turkménistan", "ACDT": "heure d’été du centre de l’Australie", "ART": "heure normale d’Argentine", "ARST": "heure d’été de l’Argentine", "NZST": "heure normale de la Nouvelle-Zélande", "ChST": "heure des Chamorro", "GMT": "heure moyenne de Greenwich", "ACWST": "heure normale du centre-ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "MESZ": "heure d’été d’Europe centrale", "∅∅∅": "heure d’été de l’Amazonie", "WAST": "heure d’été d’Afrique de l’Ouest", "MDT": "heure d’été de Macao", "UYT": "heure normale de l’Uruguay", "SRT": "heure du Suriname", "ADT": "heure d’été de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "HAT": "heure d’été de Terre-Neuve", "WITA": "heure du Centre indonésien", "OESZ": "heure d’été d’Europe de l’Est", "COT": "heure normale de Colombie", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "MST": "heure normale de Macao", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AKDT": "heure d’été de l’Alaska", "PDT": "heure d’été du Pacifique", "AEDT": "heure d’été de l’Est de l’Australie", "HKST": "heure d’été de Hong Kong", "LHST": "heure normale de Lord Howe", "HECU": "heure d’été de Cuba", "WIB": "heure de l’Ouest indonésien", "HNOG": "heure normale de l’Ouest du Groenland", "CDT": "heure d’été du Centre", "AWST": "heure normale de l’Ouest de l’Australie", "JST": "heure normale du Japon", "BOT": "heure de Bolivie", "GFT": "heure de la Guyane française", "WART": "heure normale de l’Ouest argentin", "HNPMX": "heure normale du Pacifique mexicain", "CST": "heure normale du centre nord-américain", "CLST": "heure d’été du Chili", "JDT": "heure d’été du Japon", "WARST": "heure d’été de l’Ouest argentin", "EDT": "heure d’été de l’Est", "VET": "heure du Venezuela", "HNCU": "heure normale de Cuba", "IST": "heure de l’Inde", "ACST": "heure normale du centre de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "BT": "heure du Bhoutan", "HEOG": "heure d’été de l’Ouest du Groenland", "NZDT": "heure d’été de la Nouvelle-Zélande", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "CAT": "heure normale d’Afrique centrale", "COST": "heure d’été de Colombie", "SGT": "heure de Singapour", "GYT": "heure du Guyana", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "AKST": "heure normale de l’Alaska", "WESZ": "heure d’été d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "MEZ": "heure normale d’Europe centrale"}, -+ locale: "fr_MQ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZST": "NZST", "CHADT": "CHADT", "OEZ": "OEZ", "HAT": "HAT", "TMT": "TMT", "ARST": "ARST", "MESZ": "MESZ", "HNEG": "HNEG", "HNCU": "HNCU", "WITA": "WITA", "HENOMX": "HENOMX", "AEST": "AEST", "PST": "PST", "WAST": "WAST", "CLST": "CLST", "AST": "AST", "LHST": "LHST", "AEDT": "AEDT", "HEPMX": "HEPMX", "WARST": "WARST", "CST": "CST", "SRT": "SRT", "HADT": "HADT", "HEEG": "HEEG", "AWST": "AWST", "IST": "IST", "EDT": "EDT", "ChST": "ChST", "HECU": "HECU", "AKST": "AKST", "NZDT": "NZDT", "ADT": "ADT", "HNPM": "HNPM", "PDT": "PDT", "WEZ": "WEZ", "AKDT": "AKDT", "HNOG": "HNOG", "ART": "ART", "HNNOMX": "HNNOMX", "SGT": "SGT", "HKST": "HKST", "HAST": "HAST", "ACST": "ACST", "UYT": "UYT", "HNPMX": "HNPMX", "WESZ": "WESZ", "WIT": "WIT", "LHDT": "LHDT", "VET": "VET", "SAST": "SAST", "HKT": "HKT", "MST": "MST", "GMT": "GMT", "ACWDT": "ACWDT", "UYST": "UYST", "EST": "EST", "∅∅∅": "∅∅∅", "ECT": "ECT", "BOT": "BOT", "JST": "JST", "JDT": "JDT", "WAT": "WAT", "GFT": "GFT", "WART": "WART", "HEOG": "HEOG", "COT": "COT", "CAT": "CAT", "CLT": "CLT", "CDT": "CDT", "AWDT": "AWDT", "HNT": "HNT", "GYT": "GYT", "TMST": "TMST", "MEZ": "MEZ", "MYT": "MYT", "ACWST": "ACWST", "BT": "BT", "OESZ": "OESZ", "COST": "COST", "WIB": "WIB", "MDT": "MDT", "EAT": "EAT", "HEPM": "HEPM", "ACDT": "ACDT", "CHAST": "CHAST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_MQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_MQ) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_MQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MQ) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_MQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MQ) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_MQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MQ' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MQ' -@@ -291,58 +200,7 @@ func (fr *fr_MQ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MQ' -@@ -351,65 +209,7 @@ func (fr *fr_MQ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MQ' -@@ -417,27 +217,6 @@ func (fr *fr_MQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_MQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_MQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_MQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_MQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_MQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_MQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_MQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_MR/fr_MR.go b/fr_MR/fr_MR.go -index c9d5fca..2592227 100644 ---- a/fr_MR/fr_MR.go -+++ b/fr_MR/fr_MR.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_MR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MR' locale - func New() locales.Translator { - return &fr_MR{ -- locale: "fr_MR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "UM", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"AEST": "heure normale de l’Est de l’Australie", "WITA": "heure du Centre indonésien", "CAT": "heure normale d’Afrique centrale", "COST": "heure d’été de Colombie", "ACWST": "heure normale du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "SAST": "heure normale d’Afrique méridionale", "ChST": "heure des Chamorro", "WESZ": "heure d’été d’Europe de l’Ouest", "OEZ": "heure normale d’Europe de l’Est", "EDT": "heure d’été de l’Est", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HECU": "heure d’été de Cuba", "MST": "heure normale de Macao", "MYT": "heure de la Malaisie", "UYT": "heure normale de l’Uruguay", "AKST": "heure normale de l’Alaska", "WAST": "heure d’été d’Afrique de l’Ouest", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "MESZ": "heure d’été d’Europe centrale", "CLT": "heure normale du Chili", "NZST": "heure normale de la Nouvelle-Zélande", "TMST": "heure d’été du Turkménistan", "WART": "heure normale de l’Ouest argentin", "HNOG": "heure normale de l’Ouest du Groenland", "LHDT": "heure d’été de Lord Howe", "AWDT": "heure d’été de l’Ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "LHST": "heure normale de Lord Howe", "WARST": "heure d’été de l’Ouest argentin", "HEPMX": "heure d’été du Pacifique mexicain", "VET": "heure du Venezuela", "CST": "heure normale du centre nord-américain", "BT": "heure du Bhoutan", "WIB": "heure de l’Ouest indonésien", "HNT": "heure normale de Terre-Neuve", "HKT": "heure normale de Hong Kong", "BOT": "heure de Bolivie", "HNCU": "heure normale de Cuba", "EST": "heure normale de l’Est nord-américain", "AKDT": "heure d’été de l’Alaska", "CDT": "heure d’été du Centre", "ADT": "heure d’été de l’Atlantique", "SRT": "heure du Suriname", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "OESZ": "heure d’été d’Europe de l’Est", "MDT": "heure d’été de Macao", "GYT": "heure du Guyana", "NZDT": "heure d’été de la Nouvelle-Zélande", "CLST": "heure d’été du Chili", "HNEG": "heure normale de l’Est du Groenland", "WEZ": "heure normale d’Europe de l’Ouest", "TMT": "heure normale du Turkménistan", "ACST": "heure normale du centre de l’Australie", "SGT": "heure de Singapour", "UYST": "heure d’été de l’Uruguay", "WIT": "heure de l’Est indonésien", "HEOG": "heure d’été de l’Ouest du Groenland", "PDT": "heure d’été du Pacifique", "HAT": "heure d’été de Terre-Neuve", "AWST": "heure normale de l’Ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "∅∅∅": "heure d’été du Pérou", "HNPMX": "heure normale du Pacifique mexicain", "AST": "heure normale de l’Atlantique", "GFT": "heure de la Guyane française", "ACDT": "heure d’été du centre de l’Australie", "CHADT": "heure d’été des îles Chatham", "JST": "heure normale du Japon", "JDT": "heure d’été du Japon", "COT": "heure normale de Colombie", "ART": "heure normale d’Argentine", "EAT": "heure normale d’Afrique de l’Est", "WAT": "heure normale d’Afrique de l’Ouest", "ECT": "heure de l’Équateur", "IST": "heure de l’Inde", "HEEG": "heure d’été de l’Est du Groenland", "GMT": "heure moyenne de Greenwich", "PST": "heure normale du Pacifique nord-américain", "HKST": "heure d’été de Hong Kong", "CHAST": "heure normale des îles Chatham", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie", "ARST": "heure d’été de l’Argentine"}, -+ locale: "fr_MR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "UM", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAST": "WAST", "WART": "WART", "CLST": "CLST", "NZST": "NZST", "GMT": "GMT", "ChST": "ChST", "SRT": "SRT", "HAST": "HAST", "WARST": "WARST", "TMST": "TMST", "HNNOMX": "HNNOMX", "UYST": "UYST", "HEPMX": "HEPMX", "HAT": "HAT", "COT": "COT", "MDT": "MDT", "HNEG": "HNEG", "IST": "IST", "PDT": "PDT", "HECU": "HECU", "OEZ": "OEZ", "JST": "JST", "UYT": "UYT", "BT": "BT", "ACWDT": "ACWDT", "GYT": "GYT", "NZDT": "NZDT", "JDT": "JDT", "WEZ": "WEZ", "MESZ": "MESZ", "HEEG": "HEEG", "HNPM": "HNPM", "VET": "VET", "EST": "EST", "CLT": "CLT", "LHDT": "LHDT", "WIT": "WIT", "EDT": "EDT", "MST": "MST", "MEZ": "MEZ", "HENOMX": "HENOMX", "MYT": "MYT", "AKST": "AKST", "HNOG": "HNOG", "WIB": "WIB", "AST": "AST", "HEPM": "HEPM", "CHADT": "CHADT", "COST": "COST", "ADT": "ADT", "ART": "ART", "AEST": "AEST", "PST": "PST", "SGT": "SGT", "HNCU": "HNCU", "AKDT": "AKDT", "SAST": "SAST", "HKT": "HKT", "WITA": "WITA", "OESZ": "OESZ", "GFT": "GFT", "CAT": "CAT", "CDT": "CDT", "WESZ": "WESZ", "HNT": "HNT", "HKST": "HKST", "HADT": "HADT", "ACDT": "ACDT", "AEDT": "AEDT", "CHAST": "CHAST", "ACWST": "ACWST", "WAT": "WAT", "HEOG": "HEOG", "TMT": "TMT", "CST": "CST", "BOT": "BOT", "EAT": "EAT", "ACST": "ACST", "AWST": "AWST", "AWDT": "AWDT", "LHST": "LHST", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "ECT": "ECT", "ARST": "ARST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_MR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_MR) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_MR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MR) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_MR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MR) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_MR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MR' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MR' -@@ -291,58 +200,7 @@ func (fr *fr_MR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MR' -@@ -351,65 +209,7 @@ func (fr *fr_MR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MR' -@@ -417,27 +217,6 @@ func (fr *fr_MR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_MR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_MR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_MR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_MU/fr_MU.go b/fr_MU/fr_MU.go -index 09ac44a..5be904f 100644 ---- a/fr_MU/fr_MU.go -+++ b/fr_MU/fr_MU.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_MU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_MU' locale - func New() locales.Translator { - return &fr_MU{ -- locale: "fr_MU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "Rs", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"CAT": "heure normale d’Afrique centrale", "WART": "heure normale de l’Ouest argentin", "GYT": "heure du Guyana", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MESZ": "heure d’été d’Europe centrale", "LHDT": "heure d’été de Lord Howe", "CLST": "heure d’été du Chili", "WAT": "heure normale d’Afrique de l’Ouest", "WAST": "heure d’été d’Afrique de l’Ouest", "WIT": "heure de l’Est indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "AWDT": "heure d’été de l’Ouest de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "JDT": "heure d’été du Japon", "OESZ": "heure d’été d’Europe de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "HEPMX": "heure d’été du Pacifique mexicain", "EST": "heure normale de l’Est nord-américain", "MYT": "heure de la Malaisie", "PST": "heure normale du Pacifique nord-américain", "HECU": "heure d’été de Cuba", "PDT": "heure d’été du Pacifique", "EAT": "heure normale d’Afrique de l’Est", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AEDT": "heure d’été de l’Est de l’Australie", "TMT": "heure normale du Turkménistan", "UYST": "heure d’été de l’Uruguay", "ACWST": "heure normale du centre-ouest de l’Australie", "HEOG": "heure d’été de l’Ouest du Groenland", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "COST": "heure d’été de Colombie", "HNCU": "heure normale de Cuba", "∅∅∅": "heure d’été des Açores", "AKST": "heure normale de l’Alaska", "WESZ": "heure d’été d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "ACST": "heure normale du centre de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "OEZ": "heure normale d’Europe de l’Est", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HNOG": "heure normale de l’Ouest du Groenland", "CHAST": "heure normale des îles Chatham", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "MST": "heure normale de Macao", "AKDT": "heure d’été de l’Alaska", "AST": "heure normale de l’Atlantique", "SAST": "heure normale d’Afrique méridionale", "BOT": "heure de Bolivie", "GMT": "heure moyenne de Greenwich", "ART": "heure normale d’Argentine", "JST": "heure normale du Japon", "HNEG": "heure normale de l’Est du Groenland", "ChST": "heure des Chamorro", "HNT": "heure normale de Terre-Neuve", "HEEG": "heure d’été de l’Est du Groenland", "BT": "heure du Bhoutan", "SRT": "heure du Suriname", "AWST": "heure normale de l’Ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "LHST": "heure normale de Lord Howe", "GFT": "heure de la Guyane française", "COT": "heure normale de Colombie", "UYT": "heure normale de l’Uruguay", "WIB": "heure de l’Ouest indonésien", "HAT": "heure d’été de Terre-Neuve", "ARST": "heure d’été de l’Argentine", "WITA": "heure du Centre indonésien", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CLT": "heure normale du Chili", "MDT": "heure d’été de Macao", "VET": "heure du Venezuela", "CHADT": "heure d’été des îles Chatham", "TMST": "heure d’été du Turkménistan", "SGT": "heure de Singapour", "CST": "heure normale du centre nord-américain", "CDT": "heure d’été du Centre", "ADT": "heure d’été de l’Atlantique", "IST": "heure de l’Inde", "ECT": "heure de l’Équateur", "WARST": "heure d’été de l’Ouest argentin", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HKST": "heure d’été de Hong Kong", "AEST": "heure normale de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale"}, -+ locale: "fr_MU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "Rs", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PDT": "PDT", "AKST": "AKST", "HAT": "HAT", "ECT": "ECT", "MYT": "MYT", "ChST": "ChST", "JST": "JST", "HNPM": "HNPM", "WARST": "WARST", "CAT": "CAT", "MST": "MST", "AST": "AST", "NZST": "NZST", "EAT": "EAT", "HAST": "HAST", "LHST": "LHST", "LHDT": "LHDT", "EST": "EST", "HKST": "HKST", "WIB": "WIB", "SRT": "SRT", "HNOG": "HNOG", "HKT": "HKT", "TMT": "TMT", "TMST": "TMST", "WITA": "WITA", "AEDT": "AEDT", "UYST": "UYST", "AKDT": "AKDT", "COST": "COST", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "IST": "IST", "WEZ": "WEZ", "WESZ": "WESZ", "CLST": "CLST", "HADT": "HADT", "OESZ": "OESZ", "EDT": "EDT", "CLT": "CLT", "WIT": "WIT", "HNEG": "HNEG", "AWST": "AWST", "AEST": "AEST", "CHAST": "CHAST", "HEPMX": "HEPMX", "SGT": "SGT", "HECU": "HECU", "MDT": "MDT", "NZDT": "NZDT", "MESZ": "MESZ", "ACDT": "ACDT", "UYT": "UYT", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "SAST": "SAST", "CDT": "CDT", "ADT": "ADT", "BOT": "BOT", "HEEG": "HEEG", "HENOMX": "HENOMX", "AWDT": "AWDT", "PST": "PST", "WAT": "WAT", "GFT": "GFT", "HEPM": "HEPM", "HNT": "HNT", "GMT": "GMT", "MEZ": "MEZ", "ACST": "ACST", "ACWDT": "ACWDT", "HNCU": "HNCU", "CST": "CST", "HNPMX": "HNPMX", "VET": "VET", "OEZ": "OEZ", "WART": "WART", "HEOG": "HEOG", "ART": "ART", "ARST": "ARST", "JDT": "JDT", "BT": "BT", "WAST": "WAST", "GYT": "GYT", "COT": "COT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_MU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_MU) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_MU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_MU) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_MU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_MU) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_MU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_MU' and handles both Whole and Real numbers based on 'v' - func (fr *fr_MU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_MU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_MU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MU' -@@ -291,58 +200,7 @@ func (fr *fr_MU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_MU' -@@ -351,65 +209,7 @@ func (fr *fr_MU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_MU' -@@ -417,27 +217,6 @@ func (fr *fr_MU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_MU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_MU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_MU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_MU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_MU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_MU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_MU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_NC/fr_NC.go b/fr_NC/fr_NC.go -index 66d4bdf..a7f35f7 100644 ---- a/fr_NC/fr_NC.go -+++ b/fr_NC/fr_NC.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_NC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_NC' locale - func New() locales.Translator { - return &fr_NC{ -- locale: "fr_NC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"EST": "heure normale de l’Est nord-américain", "WESZ": "heure d’été d’Europe de l’Ouest", "AWDT": "heure d’été de l’Ouest de l’Australie", "CLST": "heure d’été du Chili", "OEZ": "heure normale d’Europe de l’Est", "∅∅∅": "heure d’été de l’Amazonie", "NZDT": "heure d’été de la Nouvelle-Zélande", "UYST": "heure d’été de l’Uruguay", "ART": "heure normale d’Argentine", "HEOG": "heure d’été de l’Ouest du Groenland", "EAT": "heure normale d’Afrique de l’Est", "AKDT": "heure d’été de l’Alaska", "GMT": "heure moyenne de Greenwich", "EDT": "heure d’été de l’Est", "CDT": "heure d’été du Centre", "WITA": "heure du Centre indonésien", "AEDT": "heure d’été de l’Est de l’Australie", "CHADT": "heure d’été des îles Chatham", "BOT": "heure de Bolivie", "TMST": "heure d’été du Turkménistan", "ACWST": "heure normale du centre-ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "SAST": "heure normale d’Afrique méridionale", "TMT": "heure normale du Turkménistan", "HAST": "heure normale d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "BT": "heure du Bhoutan", "CLT": "heure normale du Chili", "GYT": "heure du Guyana", "HNPMX": "heure normale du Pacifique mexicain", "WIT": "heure de l’Est indonésien", "PST": "heure normale du Pacifique nord-américain", "NZST": "heure normale de la Nouvelle-Zélande", "ACST": "heure normale du centre de l’Australie", "WARST": "heure d’été de l’Ouest argentin", "WAST": "heure d’été d’Afrique de l’Ouest", "SGT": "heure de Singapour", "MYT": "heure de la Malaisie", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "AWST": "heure normale de l’Ouest de l’Australie", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "GFT": "heure de la Guyane française", "ACDT": "heure d’été du centre de l’Australie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "WART": "heure normale de l’Ouest argentin", "MST": "heure normale de Macao", "UYT": "heure normale de l’Uruguay", "ARST": "heure d’été de l’Argentine", "CHAST": "heure normale des îles Chatham", "JDT": "heure d’été du Japon", "HEEG": "heure d’été de l’Est du Groenland", "ADT": "heure d’été de l’Atlantique", "WIB": "heure de l’Ouest indonésien", "AEST": "heure normale de l’Est de l’Australie", "CAT": "heure normale d’Afrique centrale", "CST": "heure normale du centre nord-américain", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HNT": "heure normale de Terre-Neuve", "OESZ": "heure d’été d’Europe de l’Est", "HECU": "heure d’été de Cuba", "MDT": "heure d’été de Macao", "WEZ": "heure normale d’Europe de l’Ouest", "PDT": "heure d’été du Pacifique", "HNEG": "heure normale de l’Est du Groenland", "HNCU": "heure normale de Cuba", "VET": "heure du Venezuela", "LHDT": "heure d’été de Lord Howe", "MESZ": "heure d’été d’Europe centrale", "JST": "heure normale du Japon", "ECT": "heure de l’Équateur", "COST": "heure d’été de Colombie", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "AST": "heure normale de l’Atlantique", "HKT": "heure normale de Hong Kong", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MEZ": "heure normale d’Europe centrale", "ChST": "heure des Chamorro", "COT": "heure normale de Colombie", "IST": "heure de l’Inde", "LHST": "heure normale de Lord Howe", "HEPMX": "heure d’été du Pacifique mexicain", "AKST": "heure normale de l’Alaska", "HKST": "heure d’été de Hong Kong", "WAT": "heure normale d’Afrique de l’Ouest", "HNOG": "heure normale de l’Ouest du Groenland"}, -+ locale: "fr_NC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BOT": "BOT", "ACDT": "ACDT", "PDT": "PDT", "VET": "VET", "AKST": "AKST", "HNT": "HNT", "CLST": "CLST", "HEEG": "HEEG", "ACST": "ACST", "COT": "COT", "GYT": "GYT", "HKST": "HKST", "HAST": "HAST", "HEPM": "HEPM", "SGT": "SGT", "AKDT": "AKDT", "HNOG": "HNOG", "AWDT": "AWDT", "CHAST": "CHAST", "WART": "WART", "ART": "ART", "ACWST": "ACWST", "CLT": "CLT", "JDT": "JDT", "HECU": "HECU", "HNPMX": "HNPMX", "CAT": "CAT", "HNPM": "HNPM", "TMST": "TMST", "EDT": "EDT", "ADT": "ADT", "MESZ": "MESZ", "HNCU": "HNCU", "OESZ": "OESZ", "TMT": "TMT", "HAT": "HAT", "SAST": "SAST", "EST": "EST", "NZDT": "NZDT", "GMT": "GMT", "HNEG": "HNEG", "WAT": "WAT", "WAST": "WAST", "IST": "IST", "HEPMX": "HEPMX", "HENOMX": "HENOMX", "JST": "JST", "PST": "PST", "CDT": "CDT", "ARST": "ARST", "EAT": "EAT", "AWST": "AWST", "LHDT": "LHDT", "UYST": "UYST", "WEZ": "WEZ", "WIT": "WIT", "CST": "CST", "CHADT": "CHADT", "WARST": "WARST", "HEOG": "HEOG", "HKT": "HKT", "WITA": "WITA", "WIB": "WIB", "MST": "MST", "∅∅∅": "∅∅∅", "GFT": "GFT", "BT": "BT", "ECT": "ECT", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "OEZ": "OEZ", "NZST": "NZST", "SRT": "SRT", "LHST": "LHST", "ChST": "ChST", "AST": "AST", "MEZ": "MEZ", "MYT": "MYT", "ACWDT": "ACWDT", "AEST": "AEST", "AEDT": "AEDT", "UYT": "UYT", "MDT": "MDT", "HADT": "HADT", "COST": "COST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_NC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_NC) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_NC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_NC) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_NC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_NC) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_NC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_NC' and handles both Whole and Real numbers based on 'v' - func (fr *fr_NC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_NC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_NC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_NC' -@@ -291,58 +200,7 @@ func (fr *fr_NC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_NC' -@@ -351,65 +209,7 @@ func (fr *fr_NC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_NC' -@@ -417,27 +217,6 @@ func (fr *fr_NC) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_NC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_NC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_NC) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_NC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_NC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_NC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_NC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_NE/fr_NE.go b/fr_NE/fr_NE.go -index a6c6e33..45bbdf7 100644 ---- a/fr_NE/fr_NE.go -+++ b/fr_NE/fr_NE.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_NE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_NE' locale - func New() locales.Translator { - return &fr_NE{ -- locale: "fr_NE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"WARST": "heure d’été de l’Ouest argentin", "HECU": "heure d’été de Cuba", "MST": "heure normale de Macao", "UYT": "heure normale de l’Uruguay", "HKST": "heure d’été de Hong Kong", "MESZ": "heure d’été d’Europe centrale", "AWST": "heure normale de l’Ouest de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "WART": "heure normale de l’Ouest argentin", "ECT": "heure de l’Équateur", "AST": "heure normale de l’Atlantique", "GYT": "heure du Guyana", "HAT": "heure d’été de Terre-Neuve", "ACST": "heure normale du centre de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "CLT": "heure normale du Chili", "HEEG": "heure d’été de l’Est du Groenland", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "COST": "heure d’été de Colombie", "CST": "heure normale du centre nord-américain", "JST": "heure normale du Japon", "CLST": "heure d’été du Chili", "∅∅∅": "heure d’été des Açores", "WIT": "heure de l’Est indonésien", "ART": "heure normale d’Argentine", "AEST": "heure normale de l’Est de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "HNEG": "heure normale de l’Est du Groenland", "TMT": "heure normale du Turkménistan", "EST": "heure normale de l’Est nord-américain", "WIB": "heure de l’Ouest indonésien", "HAST": "heure normale d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "PDT": "heure d’été du Pacifique", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "LHST": "heure normale de Lord Howe", "WAT": "heure normale d’Afrique de l’Ouest", "HEPMX": "heure d’été du Pacifique mexicain", "EDT": "heure d’été de l’Est", "MYT": "heure de la Malaisie", "ARST": "heure d’été de l’Argentine", "HKT": "heure normale de Hong Kong", "COT": "heure normale de Colombie", "GFT": "heure de la Guyane française", "OEZ": "heure normale d’Europe de l’Est", "UYST": "heure d’été de l’Uruguay", "AWDT": "heure d’été de l’Ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MEZ": "heure normale d’Europe centrale", "JDT": "heure d’été du Japon", "MDT": "heure d’été de Macao", "VET": "heure du Venezuela", "HEOG": "heure d’été de l’Ouest du Groenland", "WEZ": "heure normale d’Europe de l’Ouest", "CAT": "heure normale d’Afrique centrale", "AKST": "heure normale de l’Alaska", "ADT": "heure d’été de l’Atlantique", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "SGT": "heure de Singapour", "BT": "heure du Bhoutan", "ACWDT": "heure d’été du centre-ouest de l’Australie", "WESZ": "heure d’été d’Europe de l’Ouest", "NZDT": "heure d’été de la Nouvelle-Zélande", "CHAST": "heure normale des îles Chatham", "WAST": "heure d’été d’Afrique de l’Ouest", "GMT": "heure moyenne de Greenwich", "CDT": "heure d’été du Centre", "ACWST": "heure normale du centre-ouest de l’Australie", "WITA": "heure du Centre indonésien", "AEDT": "heure d’été de l’Est de l’Australie", "HNCU": "heure normale de Cuba", "AKDT": "heure d’été de l’Alaska", "HNOG": "heure normale de l’Ouest du Groenland", "IST": "heure de l’Inde", "OESZ": "heure d’été d’Europe de l’Est", "HNT": "heure normale de Terre-Neuve", "PST": "heure normale du Pacifique nord-américain", "LHDT": "heure d’été de Lord Howe", "ChST": "heure des Chamorro", "BOT": "heure de Bolivie", "HNPMX": "heure normale du Pacifique mexicain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "CHADT": "heure d’été des îles Chatham", "SAST": "heure normale d’Afrique méridionale", "TMST": "heure d’été du Turkménistan"}, -+ locale: "fr_NE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COST": "COST", "WESZ": "WESZ", "HENOMX": "HENOMX", "HAT": "HAT", "HKST": "HKST", "GMT": "GMT", "EAT": "EAT", "MYT": "MYT", "PDT": "PDT", "ACWDT": "ACWDT", "EST": "EST", "WITA": "WITA", "ECT": "ECT", "BOT": "BOT", "HEPM": "HEPM", "UYT": "UYT", "WIT": "WIT", "CLT": "CLT", "CST": "CST", "HNEG": "HNEG", "AWST": "AWST", "CHAST": "CHAST", "WEZ": "WEZ", "HNCU": "HNCU", "MST": "MST", "ACDT": "ACDT", "AWDT": "AWDT", "CHADT": "CHADT", "UYST": "UYST", "AKST": "AKST", "WART": "WART", "EDT": "EDT", "HAST": "HAST", "MEZ": "MEZ", "BT": "BT", "ACWST": "ACWST", "HNOG": "HNOG", "HKT": "HKT", "TMT": "TMT", "CAT": "CAT", "NZST": "NZST", "AEST": "AEST", "OEZ": "OEZ", "WARST": "WARST", "TMST": "TMST", "CDT": "CDT", "MESZ": "MESZ", "PST": "PST", "AKDT": "AKDT", "CLST": "CLST", "ADT": "ADT", "ART": "ART", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "VET": "VET", "NZDT": "NZDT", "JST": "JST", "OESZ": "OESZ", "ACST": "ACST", "HEEG": "HEEG", "SGT": "SGT", "HNPMX": "HNPMX", "SAST": "SAST", "AST": "AST", "HNPM": "HNPM", "JDT": "JDT", "IST": "IST", "∅∅∅": "∅∅∅", "MDT": "MDT", "LHST": "LHST", "HNT": "HNT", "GYT": "GYT", "ARST": "ARST", "AEDT": "AEDT", "HEPMX": "HEPMX", "WAT": "WAT", "WAST": "WAST", "COT": "COT", "WIB": "WIB", "SRT": "SRT", "HADT": "HADT", "HECU": "HECU", "GFT": "GFT", "HEOG": "HEOG", "ChST": "ChST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_NE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_NE) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_NE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_NE) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_NE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_NE) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_NE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_NE' and handles both Whole and Real numbers based on 'v' - func (fr *fr_NE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_NE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_NE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_NE' -@@ -291,58 +200,7 @@ func (fr *fr_NE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_NE' -@@ -351,65 +209,7 @@ func (fr *fr_NE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_NE' -@@ -417,27 +217,6 @@ func (fr *fr_NE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_NE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_NE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_NE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_NE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_NE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_NE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_NE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_PF/fr_PF.go b/fr_PF/fr_PF.go -index c440d81..0d1645c 100644 ---- a/fr_PF/fr_PF.go -+++ b/fr_PF/fr_PF.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_PF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_PF' locale - func New() locales.Translator { - return &fr_PF{ -- locale: "fr_PF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HENOMX": "heure d’été du Nord-Ouest du Mexique", "AST": "heure normale de l’Atlantique", "PST": "heure normale du Pacifique nord-américain", "PDT": "heure d’été du Pacifique", "CLST": "heure d’été du Chili", "ACST": "heure normale du centre de l’Australie", "EST": "heure normale de l’Est nord-américain", "GYT": "heure du Guyana", "MYT": "heure de la Malaisie", "UYT": "heure normale de l’Uruguay", "IST": "heure de l’Inde", "CLT": "heure normale du Chili", "COST": "heure d’été de Colombie", "EDT": "heure d’été de l’Est", "CDT": "heure d’été du Centre", "WEZ": "heure normale d’Europe de l’Ouest", "ACWST": "heure normale du centre-ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "OESZ": "heure d’été d’Europe de l’Est", "MST": "heure normale de Macao", "SGT": "heure de Singapour", "MDT": "heure d’été de Macao", "HNPMX": "heure normale du Pacifique mexicain", "AWST": "heure normale de l’Ouest de l’Australie", "TMT": "heure normale du Turkménistan", "ChST": "heure des Chamorro", "HEOG": "heure d’été de l’Ouest du Groenland", "LHDT": "heure d’été de Lord Howe", "CHAST": "heure normale des îles Chatham", "GMT": "heure moyenne de Greenwich", "SRT": "heure du Suriname", "HNT": "heure normale de Terre-Neuve", "HNOG": "heure normale de l’Ouest du Groenland", "HNEG": "heure normale de l’Est du Groenland", "BT": "heure du Bhoutan", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WESZ": "heure d’été d’Europe de l’Ouest", "ACWDT": "heure d’été du centre-ouest de l’Australie", "LHST": "heure normale de Lord Howe", "AKST": "heure normale de l’Alaska", "WIB": "heure de l’Ouest indonésien", "ART": "heure normale d’Argentine", "AEST": "heure normale de l’Est de l’Australie", "HNCU": "heure normale de Cuba", "WIT": "heure de l’Est indonésien", "ECT": "heure de l’Équateur", "CAT": "heure normale d’Afrique centrale", "CST": "heure normale du centre nord-américain", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MESZ": "heure d’été d’Europe centrale", "JST": "heure normale du Japon", "ACDT": "heure d’été du centre de l’Australie", "OEZ": "heure normale d’Europe de l’Est", "UYST": "heure d’été de l’Uruguay", "JDT": "heure d’été du Japon", "NZDT": "heure d’été de la Nouvelle-Zélande", "WITA": "heure du Centre indonésien", "MEZ": "heure normale d’Europe centrale", "SAST": "heure normale d’Afrique méridionale", "GFT": "heure de la Guyane française", "VET": "heure du Venezuela", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "WARST": "heure d’été de l’Ouest argentin", "ARST": "heure d’été de l’Argentine", "BOT": "heure de Bolivie", "HEEG": "heure d’été de l’Est du Groenland", "ADT": "heure d’été de l’Atlantique", "AWDT": "heure d’été de l’Ouest de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "HEPMX": "heure d’été du Pacifique mexicain", "AKDT": "heure d’été de l’Alaska", "HAT": "heure d’été de Terre-Neuve", "HKT": "heure normale de Hong Kong", "∅∅∅": "heure d’été de l’Amazonie", "WAST": "heure d’été d’Afrique de l’Ouest", "COT": "heure normale de Colombie", "WART": "heure normale de l’Ouest argentin", "HECU": "heure d’été de Cuba", "HKST": "heure d’été de Hong Kong", "AEDT": "heure d’été de l’Est de l’Australie", "CHADT": "heure d’été des îles Chatham", "TMST": "heure d’été du Turkménistan", "WAT": "heure normale d’Afrique de l’Ouest"}, -+ locale: "fr_PF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "HNT": "HNT", "TMST": "TMST", "CDT": "CDT", "HAST": "HAST", "AWST": "AWST", "AWDT": "AWDT", "AEST": "AEST", "EST": "EST", "LHST": "LHST", "BT": "BT", "WESZ": "WESZ", "WEZ": "WEZ", "SGT": "SGT", "NZST": "NZST", "ECT": "ECT", "SRT": "SRT", "ACDT": "ACDT", "IST": "IST", "UYST": "UYST", "WAST": "WAST", "HNEG": "HNEG", "AKDT": "AKDT", "AEDT": "AEDT", "UYT": "UYT", "TMT": "TMT", "ADT": "ADT", "ART": "ART", "BOT": "BOT", "ACWST": "ACWST", "ACWDT": "ACWDT", "SAST": "SAST", "MYT": "MYT", "HNPM": "HNPM", "OESZ": "OESZ", "GFT": "GFT", "GMT": "GMT", "ChST": "ChST", "PST": "PST", "HECU": "HECU", "CAT": "CAT", "CLT": "CLT", "CLST": "CLST", "WART": "WART", "WARST": "WARST", "WIT": "WIT", "EDT": "EDT", "EAT": "EAT", "HEPM": "HEPM", "OEZ": "OEZ", "COST": "COST", "CST": "CST", "MST": "MST", "WIB": "WIB", "MEZ": "MEZ", "HAT": "HAT", "AKST": "AKST", "HKT": "HKT", "MESZ": "MESZ", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "JST": "JST", "HNPMX": "HNPMX", "COT": "COT", "HNOG": "HNOG", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "AST": "AST", "HADT": "HADT", "WITA": "WITA", "NZDT": "NZDT", "HNCU": "HNCU", "HENOMX": "HENOMX", "CHAST": "CHAST", "VET": "VET", "WAT": "WAT", "MDT": "MDT", "ACST": "ACST", "JDT": "JDT", "CHADT": "CHADT", "GYT": "GYT", "HKST": "HKST", "ARST": "ARST", "PDT": "PDT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_PF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_PF) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_PF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_PF) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_PF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_PF) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_PF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_PF' and handles both Whole and Real numbers based on 'v' - func (fr *fr_PF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_PF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_PF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_PF' -@@ -291,58 +200,7 @@ func (fr *fr_PF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_PF' -@@ -351,65 +209,7 @@ func (fr *fr_PF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_PF' -@@ -417,27 +217,6 @@ func (fr *fr_PF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_PF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_PF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_PF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_PF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_PF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_PF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_PF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_PM/fr_PM.go b/fr_PM/fr_PM.go -index e218b12..a00024b 100644 ---- a/fr_PM/fr_PM.go -+++ b/fr_PM/fr_PM.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_PM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_PM' locale - func New() locales.Translator { - return &fr_PM{ -- locale: "fr_PM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"NZST": "heure normale de la Nouvelle-Zélande", "GFT": "heure de la Guyane française", "CAT": "heure normale d’Afrique centrale", "WAT": "heure normale d’Afrique de l’Ouest", "HNCU": "heure normale de Cuba", "EST": "heure normale de l’Est nord-américain", "MST": "heure normale de Macao", "WIB": "heure de l’Ouest indonésien", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "SRT": "heure du Suriname", "∅∅∅": "heure d’été de l’Amazonie", "TMT": "heure normale du Turkménistan", "OEZ": "heure normale d’Europe de l’Est", "PST": "heure normale du Pacifique nord-américain", "PDT": "heure d’été du Pacifique", "HKST": "heure d’été de Hong Kong", "MEZ": "heure normale d’Europe centrale", "BOT": "heure de Bolivie", "HNEG": "heure normale de l’Est du Groenland", "ACDT": "heure d’été du centre de l’Australie", "IST": "heure de l’Inde", "ChST": "heure des Chamorro", "OESZ": "heure d’été d’Europe de l’Est", "MDT": "heure d’été de Macao", "AWST": "heure normale de l’Ouest de l’Australie", "CLST": "heure d’été du Chili", "WAST": "heure d’été d’Afrique de l’Ouest", "COST": "heure d’été de Colombie", "CDT": "heure d’été du Centre", "CHAST": "heure normale des îles Chatham", "MYT": "heure de la Malaisie", "LHDT": "heure d’été de Lord Howe", "CLT": "heure normale du Chili", "WART": "heure normale de l’Ouest argentin", "WEZ": "heure normale d’Europe de l’Ouest", "HNT": "heure normale de Terre-Neuve", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "MESZ": "heure d’été d’Europe centrale", "EDT": "heure d’été de l’Est", "HEPMX": "heure d’été du Pacifique mexicain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HKT": "heure normale de Hong Kong", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "SGT": "heure de Singapour", "HECU": "heure d’été de Cuba", "AKDT": "heure d’été de l’Alaska", "WESZ": "heure d’été d’Europe de l’Ouest", "HNOG": "heure normale de l’Ouest du Groenland", "JDT": "heure d’été du Japon", "WARST": "heure d’été de l’Ouest argentin", "AST": "heure normale de l’Atlantique", "AWDT": "heure d’été de l’Ouest de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "SAST": "heure normale d’Afrique méridionale", "ECT": "heure de l’Équateur", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "BT": "heure du Bhoutan", "ART": "heure normale d’Argentine", "LHST": "heure normale de Lord Howe", "CHADT": "heure d’été des îles Chatham", "JST": "heure normale du Japon", "EAT": "heure normale d’Afrique de l’Est", "ACWST": "heure normale du centre-ouest de l’Australie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HEOG": "heure d’été de l’Ouest du Groenland", "AEDT": "heure d’été de l’Est de l’Australie", "COT": "heure normale de Colombie", "UYT": "heure normale de l’Uruguay", "UYST": "heure d’été de l’Uruguay", "GYT": "heure du Guyana", "WIT": "heure de l’Est indonésien", "ARST": "heure d’été de l’Argentine", "WITA": "heure du Centre indonésien", "HEEG": "heure d’été de l’Est du Groenland", "TMST": "heure d’été du Turkménistan", "ACST": "heure normale du centre de l’Australie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "AKST": "heure normale de l’Alaska", "ADT": "heure d’été de l’Atlantique", "AEST": "heure normale de l’Est de l’Australie", "GMT": "heure moyenne de Greenwich", "HNPMX": "heure normale du Pacifique mexicain", "CST": "heure normale du centre nord-américain", "VET": "heure du Venezuela", "HAT": "heure d’été de Terre-Neuve"}, -+ locale: "fr_PM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MST": "MST", "HAT": "HAT", "CST": "CST", "OEZ": "OEZ", "EST": "EST", "ARST": "ARST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HECU": "HECU", "NZST": "NZST", "GMT": "GMT", "AWST": "AWST", "HNCU": "HNCU", "HNPMX": "HNPMX", "TMST": "TMST", "AWDT": "AWDT", "IST": "IST", "AKST": "AKST", "HNOG": "HNOG", "HKT": "HKT", "ACST": "ACST", "JDT": "JDT", "CHAST": "CHAST", "CLT": "CLT", "CAT": "CAT", "NZDT": "NZDT", "ADT": "ADT", "HNEG": "HNEG", "MYT": "MYT", "JST": "JST", "ACWST": "ACWST", "WIB": "WIB", "ChST": "ChST", "UYT": "UYT", "EDT": "EDT", "WESZ": "WESZ", "CDT": "CDT", "GYT": "GYT", "COT": "COT", "LHDT": "LHDT", "HEPM": "HEPM", "AEDT": "AEDT", "VET": "VET", "WART": "WART", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "COST": "COST", "HAST": "HAST", "HNPM": "HNPM", "ACWDT": "ACWDT", "WEZ": "WEZ", "OESZ": "OESZ", "HEPMX": "HEPMX", "HNT": "HNT", "WITA": "WITA", "BOT": "BOT", "SRT": "SRT", "HADT": "HADT", "PST": "PST", "SGT": "SGT", "GFT": "GFT", "WARST": "WARST", "TMT": "TMT", "MDT": "MDT", "ACDT": "ACDT", "MESZ": "MESZ", "LHST": "LHST", "BT": "BT", "EAT": "EAT", "AEST": "AEST", "WAST": "WAST", "SAST": "SAST", "HKST": "HKST", "AST": "AST", "WIT": "WIT", "HEOG": "HEOG", "CLST": "CLST", "WAT": "WAT", "ECT": "ECT", "ART": "ART", "MEZ": "MEZ", "PDT": "PDT", "CHADT": "CHADT", "UYST": "UYST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_PM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_PM) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_PM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_PM) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_PM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_PM) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_PM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_PM' and handles both Whole and Real numbers based on 'v' - func (fr *fr_PM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_PM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_PM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_PM' -@@ -291,58 +200,7 @@ func (fr *fr_PM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_PM' -@@ -351,65 +209,7 @@ func (fr *fr_PM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_PM' -@@ -417,27 +217,6 @@ func (fr *fr_PM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_PM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_PM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_PM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_PM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_PM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_PM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_PM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_RE/fr_RE.go b/fr_RE/fr_RE.go -index d399f0f..9dc2bfc 100644 ---- a/fr_RE/fr_RE.go -+++ b/fr_RE/fr_RE.go -@@ -10,72 +10,47 @@ import ( - ) -  - type fr_RE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_RE' locale - func New() locales.Translator { - return &fr_RE{ -- locale: "fr_RE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"", ""}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"BOT": "heure de Bolivie", "EAT": "heure normale d’Afrique de l’Est", "UYT": "heure normale de l’Uruguay", "HAST": "heure normale d’Hawaii - Aléoutiennes", "WITA": "heure du Centre indonésien", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "WAST": "heure d’été d’Afrique de l’Ouest", "AST": "heure normale de l’Atlantique", "BT": "heure du Bhoutan", "WEZ": "heure normale d’Europe de l’Ouest", "ACWST": "heure normale du centre-ouest de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "COST": "heure d’été de Colombie", "∅∅∅": "heure d’été des Açores", "GYT": "heure du Guyana", "UYST": "heure d’été de l’Uruguay", "HNEG": "heure normale de l’Est du Groenland", "ECT": "heure de l’Équateur", "WARST": "heure d’été de l’Ouest argentin", "HAT": "heure d’été de Terre-Neuve", "CHAST": "heure normale des îles Chatham", "ChST": "heure des Chamorro", "VET": "heure du Venezuela", "HEOG": "heure d’été de l’Ouest du Groenland", "AEDT": "heure d’été de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale", "CLST": "heure d’été du Chili", "GMT": "heure moyenne de Greenwich", "WIB": "heure de l’Ouest indonésien", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "AEST": "heure normale de l’Est de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "HKST": "heure d’été de Hong Kong", "OESZ": "heure d’été d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "MYT": "heure de la Malaisie", "SRT": "heure du Suriname", "HKT": "heure normale de Hong Kong", "ACWDT": "heure d’été du centre-ouest de l’Australie", "CLT": "heure normale du Chili", "JDT": "heure d’été du Japon", "HECU": "heure d’été de Cuba", "HNOG": "heure normale de l’Ouest du Groenland", "WESZ": "heure d’été d’Europe de l’Ouest", "ARST": "heure d’été de l’Argentine", "AWST": "heure normale de l’Ouest de l’Australie", "LHST": "heure normale de Lord Howe", "NZDT": "heure d’été de la Nouvelle-Zélande", "IST": "heure de l’Inde", "HNCU": "heure normale de Cuba", "CDT": "heure d’été du Centre", "PDT": "heure d’été du Pacifique", "TMT": "heure normale du Turkménistan", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "CHADT": "heure d’été des îles Chatham", "MESZ": "heure d’été d’Europe centrale", "NZST": "heure normale de la Nouvelle-Zélande", "GFT": "heure de la Guyane française", "TMST": "heure d’été du Turkménistan", "CAT": "heure normale d’Afrique centrale", "HNPMX": "heure normale du Pacifique mexicain", "WIT": "heure de l’Est indonésien", "HNT": "heure normale de Terre-Neuve", "AKDT": "heure d’été de l’Alaska", "ART": "heure normale d’Argentine", "ACST": "heure normale du centre de l’Australie", "EDT": "heure d’été de l’Est", "MDT": "heure d’été de Macao", "HEPMX": "heure d’été du Pacifique mexicain", "HEEG": "heure d’été de l’Est du Groenland", "WAT": "heure normale d’Afrique de l’Ouest", "OEZ": "heure normale d’Europe de l’Est", "SAST": "heure normale d’Afrique méridionale", "SGT": "heure de Singapour", "ADT": "heure d’été de l’Atlantique", "AWDT": "heure d’été de l’Ouest de l’Australie", "PST": "heure normale du Pacifique nord-américain", "COT": "heure normale de Colombie", "MST": "heure normale de Macao", "AKST": "heure normale de l’Alaska", "CST": "heure normale du centre nord-américain", "EST": "heure normale de l’Est nord-américain", "LHDT": "heure d’été de Lord Howe", "JST": "heure normale du Japon"}, -+ locale: "fr_RE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"", ""}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"OESZ": "OESZ", "HAT": "HAT", "WITA": "WITA", "HEPMX": "HEPMX", "EST": "EST", "HKT": "HKT", "HKST": "HKST", "TMST": "TMST", "CAT": "CAT", "CDT": "CDT", "AKDT": "AKDT", "LHDT": "LHDT", "HNPM": "HNPM", "COT": "COT", "CLST": "CLST", "EAT": "EAT", "HADT": "HADT", "MEZ": "MEZ", "HNCU": "HNCU", "WAST": "WAST", "WART": "WART", "ARST": "ARST", "MDT": "MDT", "AEDT": "AEDT", "NZST": "NZST", "AEST": "AEST", "JDT": "JDT", "PST": "PST", "HNPMX": "HNPMX", "HNEG": "HNEG", "HECU": "HECU", "GYT": "GYT", "CST": "CST", "∅∅∅": "∅∅∅", "HENOMX": "HENOMX", "HEPM": "HEPM", "CHAST": "CHAST", "AKST": "AKST", "COST": "COST", "NZDT": "NZDT", "HAST": "HAST", "CHADT": "CHADT", "UYT": "UYT", "UYST": "UYST", "WEZ": "WEZ", "OEZ": "OEZ", "AST": "AST", "GMT": "GMT", "HEEG": "HEEG", "SRT": "SRT", "ACDT": "ACDT", "AWDT": "AWDT", "MYT": "MYT", "IST": "IST", "SGT": "SGT", "WAT": "WAT", "MST": "MST", "ART": "ART", "HEOG": "HEOG", "ACWDT": "ACWDT", "HNT": "HNT", "LHST": "LHST", "AWST": "AWST", "ACWST": "ACWST", "VET": "VET", "HNOG": "HNOG", "WIB": "WIB", "ECT": "ECT", "ADT": "ADT", "ChST": "ChST", "JST": "JST", "ACST": "ACST", "WESZ": "WESZ", "SAST": "SAST", "CLT": "CLT", "MESZ": "MESZ", "BT": "BT", "WIT": "WIT", "TMT": "TMT", "HNNOMX": "HNNOMX", "PDT": "PDT", "GFT": "GFT", "WARST": "WARST", "EDT": "EDT", "BOT": "BOT"}, - } - } -  -@@ -147,7 +122,7 @@ func (fr *fr_RE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_RE) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +132,7 @@ func (fr *fr_RE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_RE) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +142,7 @@ func (fr *fr_RE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_RE) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +188,13 @@ func (fr *fr_RE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_RE' and handles both Whole and Real numbers based on 'v' - func (fr *fr_RE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_RE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_RE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_RE' -@@ -291,58 +202,7 @@ func (fr *fr_RE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_RE' -@@ -351,65 +211,7 @@ func (fr *fr_RE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_RE' -@@ -417,27 +219,6 @@ func (fr *fr_RE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +227,6 @@ func (fr *fr_RE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +235,6 @@ func (fr *fr_RE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +243,6 @@ func (fr *fr_RE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +251,6 @@ func (fr *fr_RE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +259,6 @@ func (fr *fr_RE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +267,6 @@ func (fr *fr_RE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +275,5 @@ func (fr *fr_RE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_RW/fr_RW.go b/fr_RW/fr_RW.go -index 69048d6..0e869ef 100644 ---- a/fr_RW/fr_RW.go -+++ b/fr_RW/fr_RW.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_RW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_RW' locale - func New() locales.Translator { - return &fr_RW{ -- locale: "fr_RW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"WEZ": "heure normale d’Europe de l’Ouest", "WESZ": "heure d’été d’Europe de l’Ouest", "LHDT": "heure d’été de Lord Howe", "MST": "heure normale de Macao", "HNT": "heure normale de Terre-Neuve", "EDT": "heure d’été de l’Est", "GYT": "heure du Guyana", "AEDT": "heure d’été de l’Est de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "NZST": "heure normale de la Nouvelle-Zélande", "NZDT": "heure d’été de la Nouvelle-Zélande", "JST": "heure normale du Japon", "OESZ": "heure d’été d’Europe de l’Est", "CHADT": "heure d’été des îles Chatham", "WARST": "heure d’été de l’Ouest argentin", "COST": "heure d’été de Colombie", "VET": "heure du Venezuela", "ACST": "heure normale du centre de l’Australie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "MDT": "heure d’été de Macao", "CST": "heure normale du centre nord-américain", "UYT": "heure normale de l’Uruguay", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "PST": "heure normale du Pacifique nord-américain", "HKT": "heure normale de Hong Kong", "∅∅∅": "heure d’été de l’Amazonie", "HEPMX": "heure d’été du Pacifique mexicain", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HNPMX": "heure normale du Pacifique mexicain", "WIT": "heure de l’Est indonésien", "HEEG": "heure d’été de l’Est du Groenland", "ECT": "heure de l’Équateur", "HEOG": "heure d’été de l’Ouest du Groenland", "MEZ": "heure normale d’Europe centrale", "ACWST": "heure normale du centre-ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "GMT": "heure moyenne de Greenwich", "CAT": "heure normale d’Afrique centrale", "WART": "heure normale de l’Ouest argentin", "ChST": "heure des Chamorro", "HECU": "heure d’été de Cuba", "BT": "heure du Bhoutan", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "IST": "heure de l’Inde", "CLT": "heure normale du Chili", "WITA": "heure du Centre indonésien", "TMST": "heure d’été du Turkménistan", "EAT": "heure normale d’Afrique de l’Est", "PDT": "heure d’été du Pacifique", "OEZ": "heure normale d’Europe de l’Est", "SRT": "heure du Suriname", "WIB": "heure de l’Ouest indonésien", "AEST": "heure normale de l’Est de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MESZ": "heure d’été d’Europe centrale", "SAST": "heure normale d’Afrique méridionale", "WAST": "heure d’été d’Afrique de l’Ouest", "SGT": "heure de Singapour", "HNCU": "heure normale de Cuba", "CDT": "heure d’été du Centre", "ACWDT": "heure d’été du centre-ouest de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "JDT": "heure d’été du Japon", "HNEG": "heure normale de l’Est du Groenland", "AKST": "heure normale de l’Alaska", "AKDT": "heure d’été de l’Alaska", "AST": "heure normale de l’Atlantique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ART": "heure normale d’Argentine", "HKST": "heure d’été de Hong Kong", "CLST": "heure d’été du Chili", "EST": "heure normale de l’Est nord-américain", "CHAST": "heure normale des îles Chatham", "ACDT": "heure d’été du centre de l’Australie", "COT": "heure normale de Colombie", "BOT": "heure de Bolivie", "WAT": "heure normale d’Afrique de l’Ouest", "ADT": "heure d’été de l’Atlantique", "MYT": "heure de la Malaisie", "UYST": "heure d’été de l’Uruguay", "ARST": "heure d’été de l’Argentine", "GFT": "heure de la Guyane française", "TMT": "heure normale du Turkménistan", "HNOG": "heure normale de l’Ouest du Groenland", "LHST": "heure normale de Lord Howe"}, -+ locale: "fr_RW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "HEPMX": "HEPMX", "OEZ": "OEZ", "ChST": "ChST", "ACWST": "ACWST", "AEST": "AEST", "SGT": "SGT", "HADT": "HADT", "LHDT": "LHDT", "HEEG": "HEEG", "HNOG": "HNOG", "HKT": "HKT", "ACST": "ACST", "MYT": "MYT", "WESZ": "WESZ", "WAT": "WAT", "GFT": "GFT", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "HAT": "HAT", "HNNOMX": "HNNOMX", "ECT": "ECT", "LHST": "LHST", "HNPM": "HNPM", "CHAST": "CHAST", "OESZ": "OESZ", "COT": "COT", "COST": "COST", "ART": "ART", "WARST": "WARST", "GYT": "GYT", "AKDT": "AKDT", "HEOG": "HEOG", "PST": "PST", "ADT": "ADT", "JST": "JST", "BT": "BT", "AEDT": "AEDT", "CLST": "CLST", "ARST": "ARST", "MST": "MST", "NZDT": "NZDT", "BOT": "BOT", "AWDT": "AWDT", "IST": "IST", "VET": "VET", "SAST": "SAST", "EDT": "EDT", "WEZ": "WEZ", "MEZ": "MEZ", "WAST": "WAST", "HKST": "HKST", "GMT": "GMT", "ACDT": "ACDT", "HNCU": "HNCU", "WART": "WART", "WIB": "WIB", "CLT": "CLT", "CAT": "CAT", "WITA": "WITA", "EAT": "EAT", "MESZ": "MESZ", "JDT": "JDT", "WIT": "WIT", "HNT": "HNT", "HECU": "HECU", "AKST": "AKST", "MDT": "MDT", "HENOMX": "HENOMX", "AWST": "AWST", "PDT": "PDT", "CHADT": "CHADT", "TMT": "TMT", "TMST": "TMST", "SRT": "SRT", "HNEG": "HNEG", "HEPM": "HEPM", "NZST": "NZST", "CST": "CST", "AST": "AST", "HAST": "HAST", "UYT": "UYT", "HNPMX": "HNPMX", "EST": "EST", "CDT": "CDT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_RW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_RW) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_RW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_RW) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_RW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_RW) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_RW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_RW' and handles both Whole and Real numbers based on 'v' - func (fr *fr_RW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_RW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_RW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_RW' -@@ -291,58 +200,7 @@ func (fr *fr_RW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_RW' -@@ -351,65 +209,7 @@ func (fr *fr_RW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_RW' -@@ -417,27 +217,6 @@ func (fr *fr_RW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_RW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_RW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_RW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_RW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_RW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_RW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_RW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_SC/fr_SC.go b/fr_SC/fr_SC.go -index 0b9d90b..ac95dd3 100644 ---- a/fr_SC/fr_SC.go -+++ b/fr_SC/fr_SC.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_SC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_SC' locale - func New() locales.Translator { - return &fr_SC{ -- locale: "fr_SC", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"NZDT": "heure d’été de la Nouvelle-Zélande", "WIB": "heure de l’Ouest indonésien", "SGT": "heure de Singapour", "MDT": "heure d’été de Macao", "CST": "heure normale du centre nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HAT": "heure d’été de Terre-Neuve", "HEOG": "heure d’été de l’Ouest du Groenland", "HNEG": "heure normale de l’Est du Groenland", "HECU": "heure d’été de Cuba", "ChST": "heure des Chamorro", "EAT": "heure normale d’Afrique de l’Est", "EST": "heure normale de l’Est nord-américain", "BT": "heure du Bhoutan", "ACWST": "heure normale du centre-ouest de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "JST": "heure normale du Japon", "TMST": "heure d’été du Turkménistan", "HNCU": "heure normale de Cuba", "CDT": "heure d’été du Centre", "ARST": "heure d’été de l’Argentine", "HKST": "heure d’été de Hong Kong", "AEDT": "heure d’été de l’Est de l’Australie", "LHST": "heure normale de Lord Howe", "JDT": "heure d’été du Japon", "ECT": "heure de l’Équateur", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "AST": "heure normale de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "PDT": "heure d’été du Pacifique", "GFT": "heure de la Guyane française", "WAST": "heure d’été d’Afrique de l’Ouest", "MESZ": "heure d’été d’Europe centrale", "ACST": "heure normale du centre de l’Australie", "ACDT": "heure d’été du centre de l’Australie", "GYT": "heure du Guyana", "SRT": "heure du Suriname", "HNOG": "heure normale de l’Ouest du Groenland", "CHAST": "heure normale des îles Chatham", "MEZ": "heure normale d’Europe centrale", "ACWDT": "heure d’été du centre-ouest de l’Australie", "CHADT": "heure d’été des îles Chatham", "BOT": "heure de Bolivie", "MST": "heure normale de Macao", "AKDT": "heure d’été de l’Alaska", "ART": "heure normale d’Argentine", "LHDT": "heure d’été de Lord Howe", "TMT": "heure normale du Turkménistan", "OESZ": "heure d’été d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "HNPMX": "heure normale du Pacifique mexicain", "HEPMX": "heure d’été du Pacifique mexicain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "VET": "heure du Venezuela", "∅∅∅": "heure d’été de l’Amazonie", "HEEG": "heure d’été de l’Est du Groenland", "WEZ": "heure normale d’Europe de l’Ouest", "WESZ": "heure d’été d’Europe de l’Ouest", "CAT": "heure normale d’Afrique centrale", "IST": "heure de l’Inde", "OEZ": "heure normale d’Europe de l’Est", "ADT": "heure d’été de l’Atlantique", "WITA": "heure du Centre indonésien", "WARST": "heure d’été de l’Ouest argentin", "GMT": "heure moyenne de Greenwich", "AKST": "heure normale de l’Alaska", "HKT": "heure normale de Hong Kong", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "COST": "heure d’été de Colombie", "AWDT": "heure d’été de l’Ouest de l’Australie", "UYT": "heure normale de l’Uruguay", "AWST": "heure normale de l’Ouest de l’Australie", "WIT": "heure de l’Est indonésien", "NZST": "heure normale de la Nouvelle-Zélande", "CLT": "heure normale du Chili", "COT": "heure normale de Colombie", "UYST": "heure d’été de l’Uruguay", "PST": "heure normale du Pacifique nord-américain", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "WAT": "heure normale d’Afrique de l’Ouest", "MYT": "heure de la Malaisie", "SAST": "heure normale d’Afrique méridionale", "CLST": "heure d’été du Chili"}, -+ locale: "fr_SC", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MYT": "MYT", "HNOG": "HNOG", "TMT": "TMT", "NZST": "NZST", "NZDT": "NZDT", "LHST": "LHST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "WITA": "WITA", "MST": "MST", "WIB": "WIB", "UYT": "UYT", "HNPMX": "HNPMX", "WAST": "WAST", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "CST": "CST", "MESZ": "MESZ", "CHAST": "CHAST", "PST": "PST", "GYT": "GYT", "ChST": "ChST", "ART": "ART", "EAT": "EAT", "WARST": "WARST", "TMST": "TMST", "HNPM": "HNPM", "JST": "JST", "BT": "BT", "MEZ": "MEZ", "HNEG": "HNEG", "WART": "WART", "WEZ": "WEZ", "VET": "VET", "GFT": "GFT", "HEOG": "HEOG", "HADT": "HADT", "AWST": "AWST", "UYST": "UYST", "AKST": "AKST", "EDT": "EDT", "BOT": "BOT", "ACWDT": "ACWDT", "HECU": "HECU", "MDT": "MDT", "AWDT": "AWDT", "HNCU": "HNCU", "ACST": "ACST", "PDT": "PDT", "SGT": "SGT", "IST": "IST", "AEST": "AEST", "CLST": "CLST", "ECT": "ECT", "ARST": "ARST", "SAST": "SAST", "COT": "COT", "HKT": "HKT", "CLT": "CLT", "HENOMX": "HENOMX", "WAT": "WAT", "HEPMX": "HEPMX", "HAT": "HAT", "HAST": "HAST", "HEEG": "HEEG", "CHADT": "CHADT", "AST": "AST", "SRT": "SRT", "OEZ": "OEZ", "LHDT": "LHDT", "AEDT": "AEDT", "WESZ": "WESZ", "HNT": "HNT", "WIT": "WIT", "CAT": "CAT", "CDT": "CDT", "GMT": "GMT", "EST": "EST", "HKST": "HKST", "AKDT": "AKDT", "COST": "COST", "ADT": "ADT", "JDT": "JDT", "ACWST": "ACWST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_SC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_SC) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_SC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_SC) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_SC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_SC) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_SC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_SC' and handles both Whole and Real numbers based on 'v' - func (fr *fr_SC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_SC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_SC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_SC' -@@ -291,58 +200,7 @@ func (fr *fr_SC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_SC' -@@ -351,65 +209,7 @@ func (fr *fr_SC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_SC' -@@ -417,27 +217,6 @@ func (fr *fr_SC) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_SC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_SC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_SC) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_SC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_SC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_SC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_SC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_SN/fr_SN.go b/fr_SN/fr_SN.go -index 1b9cdf2..e1de6f4 100644 ---- a/fr_SN/fr_SN.go -+++ b/fr_SN/fr_SN.go -@@ -10,72 +10,47 @@ import ( - ) -  - type fr_SN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_SN' locale - func New() locales.Translator { - return &fr_SN{ -- locale: "fr_SN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"", ""}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"ECT": "heure de l’Équateur", "UYT": "heure normale de l’Uruguay", "UYST": "heure d’été de l’Uruguay", "WESZ": "heure d’été d’Europe de l’Ouest", "ACWDT": "heure d’été du centre-ouest de l’Australie", "∅∅∅": "heure d’été de l’Amazonie", "GFT": "heure de la Guyane française", "WAT": "heure normale d’Afrique de l’Ouest", "WIT": "heure de l’Est indonésien", "ARST": "heure d’été de l’Argentine", "MESZ": "heure d’été d’Europe centrale", "NZST": "heure normale de la Nouvelle-Zélande", "AKDT": "heure d’été de l’Alaska", "OESZ": "heure d’été d’Europe de l’Est", "GMT": "heure moyenne de Greenwich", "AWDT": "heure d’été de l’Ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "CLST": "heure d’été du Chili", "JST": "heure normale du Japon", "CAT": "heure normale d’Afrique centrale", "WIB": "heure de l’Ouest indonésien", "ART": "heure normale d’Argentine", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HAT": "heure d’été de Terre-Neuve", "ACST": "heure normale du centre de l’Australie", "HNCU": "heure normale de Cuba", "AST": "heure normale de l’Atlantique", "HNOG": "heure normale de l’Ouest du Groenland", "NZDT": "heure d’été de la Nouvelle-Zélande", "JDT": "heure d’été du Japon", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "MDT": "heure d’été des Rocheuses", "PDT": "heure d’été du Pacifique", "WITA": "heure du Centre indonésien", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HEPMX": "heure d’été du Pacifique mexicain", "SGT": "heure de Singapour", "LHST": "heure normale de Lord Howe", "BOT": "heure de Bolivie", "EAT": "heure normale d’Afrique de l’Est", "MST": "heure normale des Rocheuses", "SRT": "heure du Suriname", "ACWST": "heure normale du centre-ouest de l’Australie", "HNT": "heure normale de Terre-Neuve", "AEST": "heure normale de l’Est de l’Australie", "WART": "heure normale de l’Ouest argentin", "COST": "heure d’été de Colombie", "HECU": "heure d’été de Cuba", "MYT": "heure de la Malaisie", "GYT": "heure du Guyana", "HEOG": "heure d’été de l’Ouest du Groenland", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CLT": "heure normale du Chili", "ACDT": "heure d’été du centre de l’Australie", "EST": "heure normale de l’Est nord-américain", "ChST": "heure des Chamorro", "CST": "heure normale du centre nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HNEG": "heure normale de l’Est du Groenland", "WARST": "heure d’été de l’Ouest argentin", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "HNPMX": "heure normale du Pacifique mexicain", "ADT": "heure d’été de l’Atlantique", "VET": "heure du Venezuela", "WEZ": "heure normale d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "CHADT": "heure d’été des îles Chatham", "TMST": "heure d’été du Turkménistan", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "AEDT": "heure d’été de l’Est de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "CHAST": "heure normale des îles Chatham", "IST": "heure de l’Inde", "WAST": "heure d’été d’Afrique de l’Ouest", "BT": "heure du Bhoutan", "AWST": "heure normale de l’Ouest de l’Australie", "LHDT": "heure d’été de Lord Howe", "CDT": "heure d’été du Centre", "PST": "heure normale du Pacifique nord-américain", "HKST": "heure d’été de Hong Kong", "SAST": "heure normale d’Afrique méridionale", "TMT": "heure normale du Turkménistan", "EDT": "heure d’été de l’Est"}, -+ locale: "fr_SN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"", ""}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"MDT": "MDT", "MEZ": "MEZ", "HENOMX": "HENOMX", "UYT": "UYT", "AEDT": "AEDT", "AKST": "AKST", "HNOG": "HNOG", "HNCU": "HNCU", "WITA": "WITA", "NZST": "NZST", "NZDT": "NZDT", "AWDT": "AWDT", "HNPM": "HNPM", "JDT": "JDT", "AEST": "AEST", "WAST": "WAST", "HKST": "HKST", "PDT": "PDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "CAT": "CAT", "LHDT": "LHDT", "COST": "COST", "CLT": "CLT", "HNNOMX": "HNNOMX", "CST": "CST", "AST": "AST", "WIB": "WIB", "ADT": "ADT", "HAST": "HAST", "EST": "EST", "HKT": "HKT", "MST": "MST", "VET": "VET", "TMT": "TMT", "CDT": "CDT", "ACST": "ACST", "LHST": "LHST", "ACWST": "ACWST", "AKDT": "AKDT", "GFT": "GFT", "HEPM": "HEPM", "WEZ": "WEZ", "OESZ": "OESZ", "SAST": "SAST", "TMST": "TMST", "GMT": "GMT", "MYT": "MYT", "WESZ": "WESZ", "HNT": "HNT", "HEEG": "HEEG", "CHADT": "CHADT", "MESZ": "MESZ", "ACDT": "ACDT", "BT": "BT", "WARST": "WARST", "HNEG": "HNEG", "ECT": "ECT", "UYST": "UYST", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "WART": "WART", "GYT": "GYT", "EDT": "EDT", "ChST": "ChST", "ART": "ART", "BOT": "BOT", "SRT": "SRT", "SGT": "SGT", "WIT": "WIT", "HADT": "HADT", "PST": "PST", "WAT": "WAT", "OEZ": "OEZ", "HAT": "HAT", "COT": "COT", "HEOG": "HEOG", "CLST": "CLST", "HECU": "HECU", "HEPMX": "HEPMX", "AWST": "AWST", "JST": "JST", "IST": "IST", "ARST": "ARST", "EAT": "EAT"}, - } - } -  -@@ -147,7 +122,7 @@ func (fr *fr_SN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_SN) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +132,7 @@ func (fr *fr_SN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_SN) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +142,7 @@ func (fr *fr_SN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_SN) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +188,13 @@ func (fr *fr_SN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_SN' and handles both Whole and Real numbers based on 'v' - func (fr *fr_SN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_SN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_SN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_SN' -@@ -291,58 +202,7 @@ func (fr *fr_SN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_SN' -@@ -351,65 +211,7 @@ func (fr *fr_SN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_SN' -@@ -417,27 +219,6 @@ func (fr *fr_SN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +227,6 @@ func (fr *fr_SN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +235,6 @@ func (fr *fr_SN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +243,6 @@ func (fr *fr_SN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +251,6 @@ func (fr *fr_SN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +259,6 @@ func (fr *fr_SN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +267,6 @@ func (fr *fr_SN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +275,5 @@ func (fr *fr_SN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_SY/fr_SY.go b/fr_SY/fr_SY.go -index c4352ab..ed7a977 100644 ---- a/fr_SY/fr_SY.go -+++ b/fr_SY/fr_SY.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_SY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_SY' locale - func New() locales.Translator { - return &fr_SY{ -- locale: "fr_SY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "LS", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"WART": "heure normale de l’Ouest argentin", "UYT": "heure normale de l’Uruguay", "ARST": "heure d’été de l’Argentine", "AEST": "heure normale de l’Est de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "CLT": "heure normale du Chili", "TMST": "heure d’été du Turkménistan", "HNEG": "heure normale de l’Est du Groenland", "WAST": "heure d’été d’Afrique de l’Ouest", "AKDT": "heure d’été de l’Alaska", "WIB": "heure de l’Ouest indonésien", "SRT": "heure du Suriname", "HAT": "heure d’été de Terre-Neuve", "HKST": "heure d’été de Hong Kong", "LHDT": "heure d’été de Lord Howe", "HEEG": "heure d’été de l’Est du Groenland", "HNCU": "heure normale de Cuba", "EST": "heure normale de l’Est nord-américain", "MST": "heure normale de Macao", "HNOG": "heure normale de l’Ouest du Groenland", "PST": "heure normale du Pacifique nord-américain", "MEZ": "heure normale d’Europe centrale", "LHST": "heure normale de Lord Howe", "ECT": "heure de l’Équateur", "NZDT": "heure d’été de la Nouvelle-Zélande", "ACDT": "heure d’été du centre de l’Australie", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "ADT": "heure d’été de l’Atlantique", "AKST": "heure normale de l’Alaska", "GFT": "heure de la Guyane française", "SAST": "heure normale d’Afrique méridionale", "OESZ": "heure d’été d’Europe de l’Est", "∅∅∅": "heure d’été du Pérou", "SGT": "heure de Singapour", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WESZ": "heure d’été d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "NZST": "heure normale de la Nouvelle-Zélande", "COST": "heure d’été de Colombie", "CHADT": "heure d’été des îles Chatham", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "JDT": "heure d’été du Japon", "IST": "heure de l’Inde", "WARST": "heure d’été de l’Ouest argentin", "COT": "heure normale de Colombie", "HECU": "heure d’été de Cuba", "CDT": "heure d’été du Centre", "ACWST": "heure normale du centre-ouest de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "CHAST": "heure normale des îles Chatham", "WAT": "heure normale d’Afrique de l’Ouest", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EDT": "heure d’été de l’Est", "HNPMX": "heure normale du Pacifique mexicain", "WEZ": "heure normale d’Europe de l’Ouest", "ACWDT": "heure d’été du centre-ouest de l’Australie", "ACST": "heure normale du centre de l’Australie", "EAT": "heure normale d’Afrique de l’Est", "VET": "heure du Venezuela", "WITA": "heure du Centre indonésien", "CST": "heure normale du centre nord-américain", "GYT": "heure du Guyana", "BOT": "heure de Bolivie", "ART": "heure normale d’Argentine", "AWST": "heure normale de l’Ouest de l’Australie", "JST": "heure normale du Japon", "OEZ": "heure normale d’Europe de l’Est", "CAT": "heure normale d’Afrique centrale", "GMT": "heure moyenne de Greenwich", "MDT": "heure d’été de Macao", "MYT": "heure de la Malaisie", "WIT": "heure de l’Est indonésien", "HNT": "heure normale de Terre-Neuve", "TMT": "heure normale du Turkménistan", "ChST": "heure des Chamorro", "HEPMX": "heure d’été du Pacifique mexicain", "HEOG": "heure d’été de l’Ouest du Groenland", "MESZ": "heure d’été d’Europe centrale", "AST": "heure normale de l’Atlantique", "UYST": "heure d’été de l’Uruguay", "BT": "heure du Bhoutan", "PDT": "heure d’été du Pacifique", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CLST": "heure d’été du Chili"}, -+ locale: "fr_SY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "LS", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MYT": "MYT", "AKST": "AKST", "WARST": "WARST", "EST": "EST", "ART": "ART", "WITA": "WITA", "AST": "AST", "GMT": "GMT", "HEPMX": "HEPMX", "OEZ": "OEZ", "HNT": "HNT", "COST": "COST", "HKST": "HKST", "HENOMX": "HENOMX", "PDT": "PDT", "NZDT": "NZDT", "HEPM": "HEPM", "ACWST": "ACWST", "HNCU": "HNCU", "COT": "COT", "ACWDT": "ACWDT", "VET": "VET", "ADT": "ADT", "HNEG": "HNEG", "WAST": "WAST", "EAT": "EAT", "HEEG": "HEEG", "ACDT": "ACDT", "CHAST": "CHAST", "ARST": "ARST", "SRT": "SRT", "ChST": "ChST", "HAST": "HAST", "HADT": "HADT", "HNOG": "HNOG", "TMT": "TMT", "TMST": "TMST", "NZST": "NZST", "CST": "CST", "MEZ": "MEZ", "MESZ": "MESZ", "AWST": "AWST", "AEST": "AEST", "WESZ": "WESZ", "HAT": "HAT", "EDT": "EDT", "AWDT": "AWDT", "OESZ": "OESZ", "ECT": "ECT", "MST": "MST", "HNPM": "HNPM", "LHST": "LHST", "GFT": "GFT", "GYT": "GYT", "CLT": "CLT", "SAST": "SAST", "HKT": "HKT", "CLST": "CLST", "JST": "JST", "JDT": "JDT", "CHADT": "CHADT", "IST": "IST", "HNPMX": "HNPMX", "HNNOMX": "HNNOMX", "ACST": "ACST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "HECU": "HECU", "CAT": "CAT", "MDT": "MDT", "BOT": "BOT", "UYT": "UYT", "WEZ": "WEZ", "SGT": "SGT", "WIT": "WIT", "HEOG": "HEOG", "BT": "BT", "AKDT": "AKDT", "WIB": "WIB", "CDT": "CDT", "AEDT": "AEDT", "UYST": "UYST", "PST": "PST", "WAT": "WAT", "WART": "WART"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_SY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_SY) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_SY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_SY) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_SY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_SY) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_SY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_SY' and handles both Whole and Real numbers based on 'v' - func (fr *fr_SY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_SY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_SY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_SY' -@@ -291,58 +200,7 @@ func (fr *fr_SY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_SY' -@@ -351,65 +209,7 @@ func (fr *fr_SY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_SY' -@@ -417,27 +217,6 @@ func (fr *fr_SY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_SY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_SY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_SY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_TD/fr_TD.go b/fr_TD/fr_TD.go -index 70a4684..ffc67b3 100644 ---- a/fr_TD/fr_TD.go -+++ b/fr_TD/fr_TD.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_TD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_TD' locale - func New() locales.Translator { - return &fr_TD{ -- locale: "fr_TD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"AST": "heure normale de l’Atlantique", "HKST": "heure d’été de Hong Kong", "LHST": "heure normale de Lord Howe", "IST": "heure de l’Inde", "WIB": "heure de l’Ouest indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "HNOG": "heure normale de l’Ouest du Groenland", "AWST": "heure normale de l’Ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "CHAST": "heure normale des îles Chatham", "JST": "heure normale du Japon", "CAT": "heure normale d’Afrique centrale", "SGT": "heure de Singapour", "UYT": "heure normale de l’Uruguay", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ART": "heure normale d’Argentine", "ACST": "heure normale du centre de l’Australie", "HEPMX": "heure d’été du Pacifique mexicain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HKT": "heure normale de Hong Kong", "WAST": "heure d’été d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "EST": "heure normale de l’Est nord-américain", "HNPMX": "heure normale du Pacifique mexicain", "AKDT": "heure d’été de l’Alaska", "GYT": "heure du Guyana", "PDT": "heure d’été du Pacifique", "AWDT": "heure d’été de l’Ouest de l’Australie", "CHADT": "heure d’été des îles Chatham", "JDT": "heure d’été du Japon", "WAT": "heure normale d’Afrique de l’Ouest", "EDT": "heure d’été de l’Est", "ADT": "heure d’été de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "HAT": "heure d’été de Terre-Neuve", "HEOG": "heure d’été de l’Ouest du Groenland", "MESZ": "heure d’été d’Europe centrale", "HNEG": "heure normale de l’Est du Groenland", "EAT": "heure normale d’Afrique de l’Est", "ECT": "heure de l’Équateur", "WART": "heure normale de l’Ouest argentin", "WIT": "heure de l’Est indonésien", "BT": "heure du Bhoutan", "LHDT": "heure d’été de Lord Howe", "CLT": "heure normale du Chili", "TMST": "heure d’été du Turkménistan", "MYT": "heure de la Malaisie", "ChST": "heure des Chamorro", "TMT": "heure normale du Turkménistan", "HECU": "heure d’été de Cuba", "WESZ": "heure d’été d’Europe de l’Ouest", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "CLST": "heure d’été du Chili", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "CST": "heure normale du centre nord-américain", "SRT": "heure du Suriname", "AEST": "heure normale de l’Est de l’Australie", "MEZ": "heure normale d’Europe centrale", "NZDT": "heure d’été de la Nouvelle-Zélande", "ACWST": "heure normale du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "GFT": "heure de la Guyane française", "HNCU": "heure normale de Cuba", "MST": "heure normale de Macao", "MDT": "heure d’été de Macao", "CDT": "heure d’été du Centre", "VET": "heure du Venezuela", "∅∅∅": "heure d’été de l’Amazonie", "OEZ": "heure normale d’Europe de l’Est", "GMT": "heure moyenne de Greenwich", "WITA": "heure du Centre indonésien", "HEEG": "heure d’été de l’Est du Groenland", "COT": "heure normale de Colombie", "UYST": "heure d’été de l’Uruguay", "AKST": "heure normale de l’Alaska", "ARST": "heure d’été de l’Argentine", "SAST": "heure normale d’Afrique méridionale", "BOT": "heure de Bolivie", "ACDT": "heure d’été du centre de l’Australie", "WARST": "heure d’été de l’Ouest argentin", "COST": "heure d’été de Colombie", "PST": "heure normale du Pacifique nord-américain", "ACWDT": "heure d’été du centre-ouest de l’Australie"}, -+ locale: "fr_TD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNCU": "HNCU", "∅∅∅": "∅∅∅", "IST": "IST", "HKT": "HKT", "JDT": "JDT", "WAST": "WAST", "HNOG": "HNOG", "CLST": "CLST", "GMT": "GMT", "HAST": "HAST", "HNT": "HNT", "WARST": "WARST", "EDT": "EDT", "HNNOMX": "HNNOMX", "LHST": "LHST", "OEZ": "OEZ", "AKST": "AKST", "OESZ": "OESZ", "CST": "CST", "ADT": "ADT", "HNPM": "HNPM", "CDT": "CDT", "HEPMX": "HEPMX", "HKST": "HKST", "ACST": "ACST", "CAT": "CAT", "ECT": "ECT", "ART": "ART", "ACDT": "ACDT", "PDT": "PDT", "GFT": "GFT", "CLT": "CLT", "WITA": "WITA", "NZDT": "NZDT", "PST": "PST", "VET": "VET", "SGT": "SGT", "TMT": "TMT", "EST": "EST", "ChST": "ChST", "HEPM": "HEPM", "UYST": "UYST", "UYT": "UYT", "HECU": "HECU", "AKDT": "AKDT", "SRT": "SRT", "JST": "JST", "AWDT": "AWDT", "LHDT": "LHDT", "WAT": "WAT", "WART": "WART", "COST": "COST", "SAST": "SAST", "NZST": "NZST", "ARST": "ARST", "MEZ": "MEZ", "ACWDT": "ACWDT", "EAT": "EAT", "HADT": "HADT", "HNEG": "HNEG", "AEST": "AEST", "CHAST": "CHAST", "HEOG": "HEOG", "TMST": "TMST", "MDT": "MDT", "HEEG": "HEEG", "BT": "BT", "AEDT": "AEDT", "WEZ": "WEZ", "GYT": "GYT", "WIB": "WIB", "MST": "MST", "AST": "AST", "ACWST": "ACWST", "CHADT": "CHADT", "WIT": "WIT", "MESZ": "MESZ", "MYT": "MYT", "AWST": "AWST", "WESZ": "WESZ", "HAT": "HAT", "COT": "COT", "BOT": "BOT", "HENOMX": "HENOMX", "HNPMX": "HNPMX"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_TD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_TD) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_TD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_TD) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_TD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_TD) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_TD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_TD' and handles both Whole and Real numbers based on 'v' - func (fr *fr_TD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_TD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_TD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TD' -@@ -291,58 +200,7 @@ func (fr *fr_TD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TD' -@@ -351,65 +209,7 @@ func (fr *fr_TD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_TD' -@@ -417,27 +217,6 @@ func (fr *fr_TD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_TD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_TD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_TD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_TG/fr_TG.go b/fr_TG/fr_TG.go -index 172f76c..cbd0b87 100644 ---- a/fr_TG/fr_TG.go -+++ b/fr_TG/fr_TG.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_TG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_TG' locale - func New() locales.Translator { - return &fr_TG{ -- locale: "fr_TG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"AEDT": "heure d’été de l’Est de l’Australie", "MESZ": "heure d’été d’Europe centrale", "JDT": "heure d’été du Japon", "BOT": "heure de Bolivie", "CAT": "heure normale d’Afrique centrale", "CST": "heure normale du centre nord-américain", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "CHAST": "heure normale des îles Chatham", "ChST": "heure des Chamorro", "OESZ": "heure d’été d’Europe de l’Est", "AST": "heure normale de l’Atlantique", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "CHADT": "heure d’été des îles Chatham", "COT": "heure normale de Colombie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "UYST": "heure d’été de l’Uruguay", "WIT": "heure de l’Est indonésien", "AWST": "heure normale de l’Ouest de l’Australie", "SAST": "heure normale d’Afrique méridionale", "HNCU": "heure normale de Cuba", "PDT": "heure d’été du Pacifique", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "LHDT": "heure d’été de Lord Howe", "NZST": "heure normale de la Nouvelle-Zélande", "ACDT": "heure d’été du centre de l’Australie", "GMT": "heure moyenne de Greenwich", "HNT": "heure normale de Terre-Neuve", "HKST": "heure d’été de Hong Kong", "EDT": "heure d’été de l’Est", "ADT": "heure d’été de l’Atlantique", "ART": "heure normale d’Argentine", "ARST": "heure d’été de l’Argentine", "LHST": "heure normale de Lord Howe", "NZDT": "heure d’été de la Nouvelle-Zélande", "WAT": "heure normale d’Afrique de l’Ouest", "HNPMX": "heure normale du Pacifique mexicain", "VET": "heure du Venezuela", "HNOG": "heure normale de l’Ouest du Groenland", "HEEG": "heure d’été de l’Est du Groenland", "BT": "heure du Bhoutan", "PST": "heure normale du Pacifique nord-américain", "WESZ": "heure d’été d’Europe de l’Ouest", "MEZ": "heure normale d’Europe centrale", "IST": "heure de l’Inde", "SRT": "heure du Suriname", "HEOG": "heure d’été de l’Ouest du Groenland", "AEST": "heure normale de l’Est de l’Australie", "JST": "heure normale du Japon", "SGT": "heure de Singapour", "MDT": "heure d’été de Macao", "WEZ": "heure normale d’Europe de l’Ouest", "HNEG": "heure normale de l’Est du Groenland", "WART": "heure normale de l’Ouest argentin", "MST": "heure normale de Macao", "CDT": "heure d’été du Centre", "ACST": "heure normale du centre de l’Australie", "OEZ": "heure normale d’Europe de l’Est", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "UYT": "heure normale de l’Uruguay", "HAT": "heure d’été de Terre-Neuve", "HKT": "heure normale de Hong Kong", "WITA": "heure du Centre indonésien", "GFT": "heure de la Guyane française", "ECT": "heure de l’Équateur", "WARST": "heure d’été de l’Ouest argentin", "COST": "heure d’été de Colombie", "EST": "heure normale de l’Est nord-américain", "HAST": "heure normale d’Hawaii - Aléoutiennes", "CLST": "heure d’été du Chili", "∅∅∅": "heure d’été de l’Amazonie", "AKDT": "heure d’été de l’Alaska", "MYT": "heure de la Malaisie", "TMST": "heure d’été du Turkménistan", "EAT": "heure normale d’Afrique de l’Est", "HECU": "heure d’été de Cuba", "WIB": "heure de l’Ouest indonésien", "ACWST": "heure normale du centre-ouest de l’Australie", "CLT": "heure normale du Chili", "TMT": "heure normale du Turkménistan", "WAST": "heure d’été d’Afrique de l’Ouest", "HEPMX": "heure d’été du Pacifique mexicain", "AKST": "heure normale de l’Alaska", "GYT": "heure du Guyana", "AWDT": "heure d’été de l’Ouest de l’Australie"}, -+ locale: "fr_TG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "MYT": "MYT", "SGT": "SGT", "GYT": "GYT", "ACDT": "ACDT", "HAST": "HAST", "ACWDT": "ACWDT", "WAST": "WAST", "SRT": "SRT", "EAT": "EAT", "ARST": "ARST", "CAT": "CAT", "ADT": "ADT", "CDT": "CDT", "NZST": "NZST", "BT": "BT", "CHAST": "CHAST", "VET": "VET", "TMT": "TMT", "CLT": "CLT", "HNEG": "HNEG", "HNCU": "HNCU", "CLST": "CLST", "MST": "MST", "HNNOMX": "HNNOMX", "JDT": "JDT", "UYT": "UYT", "WEZ": "WEZ", "WESZ": "WESZ", "HECU": "HECU", "SAST": "SAST", "COST": "COST", "GFT": "GFT", "HNPM": "HNPM", "HEPM": "HEPM", "JST": "JST", "MDT": "MDT", "NZDT": "NZDT", "HEEG": "HEEG", "AWDT": "AWDT", "UYST": "UYST", "HEOG": "HEOG", "WIB": "WIB", "CST": "CST", "LHST": "LHST", "IST": "IST", "PDT": "PDT", "HNPMX": "HNPMX", "WIT": "WIT", "∅∅∅": "∅∅∅", "GMT": "GMT", "PST": "PST", "OESZ": "OESZ", "WITA": "WITA", "AST": "AST", "HADT": "HADT", "HNT": "HNT", "HKST": "HKST", "HENOMX": "HENOMX", "LHDT": "LHDT", "AEST": "AEST", "CHADT": "CHADT", "HEPMX": "HEPMX", "AKDT": "AKDT", "COT": "COT", "ChST": "ChST", "WART": "WART", "ACST": "ACST", "TMST": "TMST", "ART": "ART", "ACWST": "ACWST", "AEDT": "AEDT", "WAT": "WAT", "HAT": "HAT", "EST": "EST", "EDT": "EDT", "HKT": "HKT", "ECT": "ECT", "BOT": "BOT", "MEZ": "MEZ", "OEZ": "OEZ", "WARST": "WARST", "HNOG": "HNOG", "MESZ": "MESZ", "AKST": "AKST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_TG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_TG) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_TG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_TG) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_TG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_TG) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_TG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_TG' and handles both Whole and Real numbers based on 'v' - func (fr *fr_TG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_TG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_TG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TG' -@@ -291,58 +200,7 @@ func (fr *fr_TG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TG' -@@ -351,65 +209,7 @@ func (fr *fr_TG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -[31m- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_TG' -@@ -417,27 +217,6 @@ func (fr *fr_TG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_TG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_TG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_TG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_TG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_TG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_TG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_TG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_TN/fr_TN.go b/fr_TN/fr_TN.go -index 16d0d9d..413f1a3 100644 ---- a/fr_TN/fr_TN.go -+++ b/fr_TN/fr_TN.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_TN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_TN' locale - func New() locales.Translator { - return &fr_TN{ -- locale: "fr_TN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "DT", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"MDT": "heure d’été des Rocheuses", "ART": "heure normale d’Argentine", "CHAST": "heure normale des îles Chatham", "IST": "heure de l’Inde", "WAT": "heure normale d’Afrique de l’Ouest", "WARST": "heure d’été de l’Ouest argentin", "HAST": "heure normale d’Hawaii - Aléoutiennes", "LHDT": "heure d’été de Lord Howe", "CHADT": "heure d’été des îles Chatham", "BOT": "heure de Bolivie", "ACST": "heure normale du centre de l’Australie", "HNEG": "heure normale de l’Est du Groenland", "EAT": "heure normale d’Afrique de l’Est", "CAT": "heure normale d’Afrique centrale", "CDT": "heure d’été du Centre", "UYT": "heure normale de l’Uruguay", "TMT": "heure normale du Turkménistan", "ChST": "heure des Chamorro", "HEPMX": "heure d’été du Pacifique mexicain", "WIB": "heure de l’Ouest indonésien", "PST": "heure normale du Pacifique nord-américain", "HKT": "heure normale de Hong Kong", "MEZ": "heure normale d’Europe centrale", "MESZ": "heure d’été d’Europe centrale", "AWDT": "heure d’été de l’Ouest de l’Australie", "HNCU": "heure normale de Cuba", "JST": "heure normale du Japon", "OEZ": "heure normale d’Europe de l’Est", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "GMT": "heure moyenne de Greenwich", "WEZ": "heure normale d’Europe de l’Ouest", "CLST": "heure d’été du Chili", "ECT": "heure de l’Équateur", "HECU": "heure d’été de Cuba", "HNPMX": "heure normale du Pacifique mexicain", "MST": "heure normale des Rocheuses", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "ARST": "heure d’été de l’Argentine", "PDT": "heure d’été du Pacifique", "AEST": "heure normale de l’Est de l’Australie", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "SGT": "heure de Singapour", "EST": "heure normale de l’Est nord-américain", "VET": "heure du Venezuela", "HNT": "heure normale de Terre-Neuve", "SAST": "heure normale d’Afrique méridionale", "TMST": "heure d’été du Turkménistan", "COST": "heure d’été de Colombie", "ADT": "heure d’été de l’Atlantique", "∅∅∅": "heure d’été de l’Amazonie", "AST": "heure normale de l’Atlantique", "MYT": "heure de la Malaisie", "WIT": "heure de l’Est indonésien", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HAT": "heure d’été de Terre-Neuve", "HNOG": "heure normale de l’Ouest du Groenland", "AWST": "heure normale de l’Ouest de l’Australie", "ACWST": "heure normale du centre-ouest de l’Australie", "WITA": "heure du Centre indonésien", "NZDT": "heure d’été de la Nouvelle-Zélande", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "NZST": "heure normale de la Nouvelle-Zélande", "ACDT": "heure d’été du centre de l’Australie", "COT": "heure normale de Colombie", "HEOG": "heure d’été de l’Ouest du Groenland", "JDT": "heure d’été du Japon", "WART": "heure normale de l’Ouest argentin", "AKDT": "heure d’été de l’Alaska", "WAST": "heure d’été d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "EDT": "heure d’été de l’Est", "SRT": "heure du Suriname", "BT": "heure du Bhoutan", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "LHST": "heure normale de Lord Howe", "HEEG": "heure d’été de l’Est du Groenland", "AKST": "heure normale de l’Alaska", "HKST": "heure d’été de Hong Kong", "CLT": "heure normale du Chili", "CST": "heure normale du centre nord-américain", "UYST": "heure d’été de l’Uruguay", "WESZ": "heure d’été d’Europe de l’Ouest", "AEDT": "heure d’été de l’Est de l’Australie", "GFT": "heure de la Guyane française", "GYT": "heure du Guyana"}, -+ locale: "fr_TN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "DT", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "ACWDT": "ACWDT", "AEDT": "AEDT", "UYST": "UYST", "∅∅∅": "∅∅∅", "CST": "CST", "HADT": "HADT", "AWDT": "AWDT", "HEOG": "HEOG", "CLST": "CLST", "PDT": "PDT", "TMST": "TMST", "CLT": "CLT", "MDT": "MDT", "MYT": "MYT", "PST": "PST", "VET": "VET", "AKDT": "AKDT", "HAT": "HAT", "LHDT": "LHDT", "EDT": "EDT", "CDT": "CDT", "ADT": "ADT", "GMT": "GMT", "LHST": "LHST", "HECU": "HECU", "WEZ": "WEZ", "COST": "COST", "HNOG": "HNOG", "NZDT": "NZDT", "ARST": "ARST", "BOT": "BOT", "WAT": "WAT", "COT": "COT", "HKST": "HKST", "AWST": "AWST", "UYT": "UYT", "HEPMX": "HEPMX", "ChST": "ChST", "HNPMX": "HNPMX", "HNPM": "HNPM", "HEPM": "HEPM", "GFT": "GFT", "WARST": "WARST", "EAT": "EAT", "HNEG": "HNEG", "ACST": "ACST", "MST": "MST", "HNCU": "HNCU", "CHADT": "CHADT", "SGT": "SGT", "AKST": "AKST", "WIT": "WIT", "SAST": "SAST", "AST": "AST", "HEEG": "HEEG", "AEST": "AEST", "TMT": "TMT", "BT": "BT", "IST": "IST", "OESZ": "OESZ", "JST": "JST", "ECT": "ECT", "HAST": "HAST", "ACDT": "ACDT", "WESZ": "WESZ", "WITA": "WITA", "MEZ": "MEZ", "JDT": "JDT", "ART": "ART", "HENOMX": "HENOMX", "WAST": "WAST", "HNT": "HNT", "GYT": "GYT", "EST": "EST", "HKT": "HKT", "CAT": "CAT", "MESZ": "MESZ", "CHAST": "CHAST", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "WART": "WART", "NZST": "NZST", "WIB": "WIB", "SRT": "SRT"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_TN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_TN) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_TN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_TN) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_TN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_TN) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_TN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_TN' and handles both Whole and Real numbers based on 'v' - func (fr *fr_TN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_TN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_TN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TN' -@@ -291,58 +200,7 @@ func (fr *fr_TN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TN' -@@ -351,65 +209,7 @@ func (fr *fr_TN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_TN' -@@ -417,27 +217,6 @@ func (fr *fr_TN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_TN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_TN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_TN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_VU/fr_VU.go b/fr_VU/fr_VU.go -index e22d390..87625d9 100644 ---- a/fr_VU/fr_VU.go -+++ b/fr_VU/fr_VU.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_VU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_VU' locale - func New() locales.Translator { - return &fr_VU{ -- locale: "fr_VU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VT", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"WART": "heure normale de l’Ouest argentin", "WARST": "heure d’été de l’Ouest argentin", "CHADT": "heure d’été des îles Chatham", "HAT": "heure d’été de Terre-Neuve", "HKST": "heure d’été de Hong Kong", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "GMT": "heure moyenne de Greenwich", "MST": "heure normale de Macao", "SAST": "heure normale d’Afrique méridionale", "TMT": "heure normale du Turkménistan", "GYT": "heure du Guyana", "UYST": "heure d’été de l’Uruguay", "WESZ": "heure d’été d’Europe de l’Ouest", "ADT": "heure d’été de l’Atlantique", "HNOG": "heure normale de l’Ouest du Groenland", "AEST": "heure normale de l’Est de l’Australie", "NZDT": "heure d’été de la Nouvelle-Zélande", "CLT": "heure normale du Chili", "COT": "heure normale de Colombie", "HECU": "heure d’été de Cuba", "AKDT": "heure d’été de l’Alaska", "CHAST": "heure normale des îles Chatham", "CLST": "heure d’été du Chili", "HEPMX": "heure d’été du Pacifique mexicain", "WEZ": "heure normale d’Europe de l’Ouest", "MESZ": "heure d’été d’Europe centrale", "IST": "heure de l’Inde", "∅∅∅": "heure d’été du Pérou", "CST": "heure normale du centre nord-américain", "PST": "heure normale du Pacifique nord-américain", "ARST": "heure d’été de l’Argentine", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "MEZ": "heure normale d’Europe centrale", "WIT": "heure de l’Est indonésien", "ACWST": "heure normale du centre-ouest de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "EST": "heure normale de l’Est nord-américain", "AST": "heure normale de l’Atlantique", "HEOG": "heure d’été de l’Ouest du Groenland", "JST": "heure normale du Japon", "ChST": "heure des Chamorro", "EAT": "heure normale d’Afrique de l’Est", "WAST": "heure d’été d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "LHDT": "heure d’été de Lord Howe", "BOT": "heure de Bolivie", "HEEG": "heure d’été de l’Est du Groenland", "TMST": "heure d’été du Turkménistan", "WAT": "heure normale d’Afrique de l’Ouest", "COST": "heure d’été de Colombie", "MYT": "heure de la Malaisie", "NZST": "heure normale de la Nouvelle-Zélande", "OESZ": "heure d’été d’Europe de l’Est", "MDT": "heure d’été de Macao", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "SRT": "heure du Suriname", "HNT": "heure normale de Terre-Neuve", "ECT": "heure de l’Équateur", "AKST": "heure normale de l’Alaska", "CDT": "heure d’été du Centre", "GFT": "heure de la Guyane française", "ACDT": "heure d’été du centre de l’Australie", "UYT": "heure normale de l’Uruguay", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "WITA": "heure du Centre indonésien", "JDT": "heure d’été du Japon", "SGT": "heure de Singapour", "HNCU": "heure normale de Cuba", "ART": "heure normale d’Argentine", "PDT": "heure d’été du Pacifique", "AEDT": "heure d’été de l’Est de l’Australie", "AWDT": "heure d’été de l’Ouest de l’Australie", "HKT": "heure normale de Hong Kong", "LHST": "heure normale de Lord Howe", "OEZ": "heure normale d’Europe de l’Est", "WIB": "heure de l’Ouest indonésien", "VET": "heure du Venezuela", "HNEG": "heure normale de l’Est du Groenland", "ACST": "heure normale du centre de l’Australie", "HAST": "heure normale d’Hawaii - Aléoutiennes", "BT": "heure du Bhoutan", "ACWDT": "heure d’été du centre-ouest de l’Australie", "CAT": "heure normale d’Afrique centrale", "EDT": "heure d’été de l’Est", "HNPMX": "heure normale du Pacifique mexicain"}, -+ locale: "fr_VU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VT", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAT": "HAT", "WIT": "WIT", "HKT": "HKT", "WITA": "WITA", "MESZ": "MESZ", "GFT": "GFT", "MDT": "MDT", "NZDT": "NZDT", "AST": "AST", "HAST": "HAST", "HEPM": "HEPM", "HECU": "HECU", "WART": "WART", "TMST": "TMST", "∅∅∅": "∅∅∅", "EAT": "EAT", "HENOMX": "HENOMX", "CLST": "CLST", "JST": "JST", "HNT": "HNT", "GYT": "GYT", "EST": "EST", "OESZ": "OESZ", "SAST": "SAST", "WIB": "WIB", "HADT": "HADT", "AEST": "AEST", "UYT": "UYT", "COT": "COT", "HNPM": "HNPM", "JDT": "JDT", "AWST": "AWST", "ACWDT": "ACWDT", "BT": "BT", "WAT": "WAT", "AKDT": "AKDT", "CLT": "CLT", "GMT": "GMT", "MYT": "MYT", "WAST": "WAST", "TMT": "TMT", "CAT": "CAT", "MST": "MST", "PDT": "PDT", "AKST": "AKST", "CST": "CST", "HNNOMX": "HNNOMX", "HNEG": "HNEG", "ACWST": "ACWST", "UYST": "UYST", "WARST": "WARST", "COST": "COST", "HKST": "HKST", "CDT": "CDT", "ARST": "ARST", "MEZ": "MEZ", "ACST": "ACST", "LHST": "LHST", "HEOG": "HEOG", "EDT": "EDT", "ART": "ART", "LHDT": "LHDT", "CHAST": "CHAST", "WEZ": "WEZ", "ECT": "ECT", "BOT": "BOT", "AWDT": "AWDT", "CHADT": "CHADT", "IST": "IST", "HNCU": "HNCU", "WESZ": "WESZ", "SGT": "SGT", "VET": "VET", "HNOG": "HNOG", "NZST": "NZST", "ADT": "ADT", "ACDT": "ACDT", "HEEG": "HEEG", "AEDT": "AEDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "OEZ": "OEZ", "ChST": "ChST", "SRT": "SRT", "PST": "PST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_VU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_VU) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_VU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_VU) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_VU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_VU) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_VU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_VU' and handles both Whole and Real numbers based on 'v' - func (fr *fr_VU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_VU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_VU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_VU' -@@ -291,58 +200,7 @@ func (fr *fr_VU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_VU' -@@ -351,65 +209,7 @@ func (fr *fr_VU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_VU' -@@ -417,27 +217,6 @@ func (fr *fr_VU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_VU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_VU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_VU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/fr_WF/fr_WF.go b/fr_WF/fr_WF.go -index 3ce777e..477652a 100644 ---- a/fr_WF/fr_WF.go -+++ b/fr_WF/fr_WF.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_WF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_WF' locale - func New() locales.Translator { - return &fr_WF{ -- locale: "fr_WF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"CAT": "heure normale d’Afrique centrale", "WAT": "heure normale d’Afrique de l’Ouest", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "CDT": "heure d’été du Centre", "SGT": "heure de Singapour", "HECU": "heure d’été de Cuba", "MST": "heure normale de Macao", "HNPMX": "heure normale du Pacifique mexicain", "ART": "heure normale d’Argentine", "CHAST": "heure normale des îles Chatham", "WART": "heure normale de l’Ouest argentin", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "GYT": "heure du Guyana", "HAST": "heure normale d’Hawaii - Aléoutiennes", "AKST": "heure normale de l’Alaska", "CST": "heure normale du centre nord-américain", "ADT": "heure d’été de l’Atlantique", "BT": "heure du Bhoutan", "OEZ": "heure normale d’Europe de l’Est", "COST": "heure d’été de Colombie", "EDT": "heure d’été de l’Est", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "VET": "heure du Venezuela", "ACWST": "heure normale du centre-ouest de l’Australie", "AEDT": "heure d’été de l’Est de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "HNEG": "heure normale de l’Est du Groenland", "PDT": "heure d’été du Pacifique", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "WAST": "heure d’été d’Afrique de l’Ouest", "OESZ": "heure d’été d’Europe de l’Est", "WIT": "heure de l’Est indonésien", "PST": "heure normale du Pacifique nord-américain", "MEZ": "heure normale d’Europe centrale", "LHDT": "heure d’été de Lord Howe", "CHADT": "heure d’été des îles Chatham", "HNOG": "heure normale de l’Ouest du Groenland", "MESZ": "heure d’été d’Europe centrale", "LHST": "heure normale de Lord Howe", "AKDT": "heure d’été de l’Alaska", "SRT": "heure du Suriname", "HEOG": "heure d’été de l’Ouest du Groenland", "UYT": "heure normale de l’Uruguay", "UYST": "heure d’été de l’Uruguay", "BOT": "heure de Bolivie", "EAT": "heure normale d’Afrique de l’Est", "EST": "heure normale de l’Est nord-américain", "AST": "heure normale de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "WITA": "heure du Centre indonésien", "IST": "heure de l’Inde", "JDT": "heure d’été du Japon", "ChST": "heure des Chamorro", "WARST": "heure d’été de l’Ouest argentin", "MYT": "heure de la Malaisie", "WIB": "heure de l’Ouest indonésien", "WEZ": "heure normale d’Europe de l’Ouest", "SAST": "heure normale d’Afrique méridionale", "CLST": "heure d’été du Chili", "∅∅∅": "heure d’été de l’Amazonie", "CLT": "heure normale du Chili", "HEEG": "heure d’été de l’Est du Groenland", "HEPMX": "heure d’été du Pacifique mexicain", "HAT": "heure d’été de Terre-Neuve", "ARST": "heure d’été de l’Argentine", "AEST": "heure normale de l’Est de l’Australie", "HKST": "heure d’été de Hong Kong", "NZST": "heure normale de la Nouvelle-Zélande", "NZDT": "heure d’été de la Nouvelle-Zélande", "TMT": "heure normale du Turkménistan", "ACDT": "heure d’été du centre de l’Australie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "MDT": "heure d’été de Macao", "HNCU": "heure normale de Cuba", "AWDT": "heure d’été de l’Ouest de l’Australie", "GFT": "heure de la Guyane française", "ECT": "heure de l’Équateur", "GMT": "heure moyenne de Greenwich", "TMST": "heure d’été du Turkménistan", "ACST": "heure normale du centre de l’Australie", "COT": "heure normale de Colombie", "WESZ": "heure d’été d’Europe de l’Ouest", "HKT": "heure normale de Hong Kong", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "JST": "heure normale du Japon"}, -+ locale: "fr_WF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "WESZ": "WESZ", "HECU": "HECU", "AST": "AST", "BOT": "BOT", "CST": "CST", "LHST": "LHST", "∅∅∅": "∅∅∅", "CAT": "CAT", "EDT": "EDT", "HADT": "HADT", "BT": "BT", "AEDT": "AEDT", "AKDT": "AKDT", "HNT": "HNT", "MESZ": "MESZ", "CHADT": "CHADT", "UYST": "UYST", "ACWDT": "ACWDT", "WAST": "WAST", "WARST": "WARST", "HKT": "HKT", "ChST": "ChST", "HNCU": "HNCU", "WEZ": "WEZ", "SGT": "SGT", "MDT": "MDT", "NZST": "NZST", "WIB": "WIB", "LHDT": "LHDT", "SAST": "SAST", "HKST": "HKST", "CDT": "CDT", "EAT": "EAT", "HNNOMX": "HNNOMX", "AKST": "AKST", "WIT": "WIT", "MST": "MST", "AWST": "AWST", "COT": "COT", "CLST": "CLST", "HEEG": "HEEG", "VET": "VET", "TMST": "TMST", "ADT": "ADT", "HNOG": "HNOG", "NZDT": "NZDT", "ACST": "ACST", "HNEG": "HNEG", "HENOMX": "HENOMX", "HNPM": "HNPM", "OESZ": "OESZ", "GYT": "GYT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "CHAST": "CHAST", "PDT": "PDT", "WITA": "WITA", "ECT": "ECT", "ART": "ART", "ACDT": "ACDT", "WAT": "WAT", "WART": "WART", "ARST": "ARST", "JST": "JST", "PST": "PST", "EST": "EST", "CLT": "CLT", "SRT": "SRT", "ACWST": "ACWST", "OEZ": "OEZ", "TMT": "TMT", "GMT": "GMT", "JDT": "JDT", "HAT": "HAT", "HEOG": "HEOG", "HAST": "HAST", "AWDT": "AWDT", "MYT": "MYT", "HEPM": "HEPM", "UYT": "UYT", "IST": "IST", "GFT": "GFT", "COST": "COST", "AEST": "AEST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_WF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_WF) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_WF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_WF) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_WF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_WF) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_WF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_WF' and handles both Whole and Real numbers based on 'v' - func (fr *fr_WF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_WF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_WF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_WF' -@@ -291,58 +200,7 @@ func (fr *fr_WF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_WF' -@@ -351,65 +209,7 @@ func (fr *fr_WF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_WF' -@@ -417,27 +217,6 @@ func (fr *fr_WF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_WF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_WF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_WF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_WF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_WF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_WF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_WF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fr_YT/fr_YT.go b/fr_YT/fr_YT.go -index 4adffa1..e3850c5 100644 ---- a/fr_YT/fr_YT.go -+++ b/fr_YT/fr_YT.go -@@ -10,72 +10,45 @@ import ( - ) -  - type fr_YT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fr_YT' locale - func New() locales.Translator { - return &fr_YT{ -- locale: "fr_YT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"}, -- daysAbbreviated: []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"di", "lu", "ma", "me", "je", "ve", "sa"}, -- daysWide: []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. J.-C.", "ap. J.-C."}, -- erasNarrow: []string{"av. J.-C.", "ap. J.-C."}, -- erasWide: []string{"avant Jésus-Christ", "après Jésus-Christ"}, -- timezones: map[string]string{"HEPMX": "heure d’été du Pacifique mexicain", "UYT": "heure normale de l’Uruguay", "WEZ": "heure normale d’Europe de l’Ouest", "ChST": "heure des Chamorro", "GFT": "heure de la Guyane française", "WAT": "heure normale d’Afrique de l’Ouest", "∅∅∅": "heure d’été de Brasilia", "CDT": "heure d’été du Centre", "VET": "heure du Venezuela", "AEST": "heure normale de l’Est de l’Australie", "WITA": "heure du Centre indonésien", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "IST": "heure de l’Inde", "CLST": "heure d’été du Chili", "COST": "heure d’été de Colombie", "EDT": "heure d’été de l’Est", "SRT": "heure du Suriname", "HKT": "heure normale de Hong Kong", "OESZ": "heure d’été d’Europe de l’Est", "COT": "heure normale de Colombie", "AKST": "heure normale de l’Alaska", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "PST": "heure normale du Pacifique nord-américain", "HEOG": "heure d’été de l’Ouest du Groenland", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "ACDT": "heure d’été du centre de l’Australie", "GMT": "heure moyenne de Greenwich", "WESZ": "heure d’été d’Europe de l’Ouest", "HAT": "heure d’été de Terre-Neuve", "HEEG": "heure d’été de l’Est du Groenland", "OEZ": "heure normale d’Europe de l’Est", "WARST": "heure d’été de l’Ouest argentin", "SGT": "heure de Singapour", "AST": "heure normale de l’Atlantique", "HNT": "heure normale de Terre-Neuve", "HNEG": "heure normale de l’Est du Groenland", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HAST": "heure normale d’Hawaii - Aléoutiennes", "ACWDT": "heure d’été du centre-ouest de l’Australie", "LHDT": "heure d’été de Lord Howe", "JST": "heure normale du Japon", "TMST": "heure d’été du Turkménistan", "UYST": "heure d’été de l’Uruguay", "MYT": "heure de la Malaisie", "WIT": "heure de l’Est indonésien", "AWDT": "heure d’été de l’Ouest de l’Australie", "EST": "heure normale de l’Est nord-américain", "ACWST": "heure normale du centre-ouest de l’Australie", "ARST": "heure d’été de l’Argentine", "WIB": "heure de l’Ouest indonésien", "GYT": "heure du Guyana", "HKST": "heure d’été de Hong Kong", "CST": "heure normale du centre nord-américain", "HNCU": "heure normale de Cuba", "CHADT": "heure d’été des îles Chatham", "CLT": "heure normale du Chili", "TMT": "heure normale du Turkménistan", "ECT": "heure de l’Équateur", "WART": "heure normale de l’Ouest argentin", "HNPMX": "heure normale du Pacifique mexicain", "HNOG": "heure normale de l’Ouest du Groenland", "MESZ": "heure d’été d’Europe centrale", "SAST": "heure normale d’Afrique méridionale", "ACST": "heure normale du centre de l’Australie", "MST": "heure normale de Macao", "AKDT": "heure d’été de l’Alaska", "ADT": "heure d’été de l’Atlantique", "NZST": "heure normale de la Nouvelle-Zélande", "CAT": "heure normale d’Afrique centrale", "EAT": "heure normale d’Afrique de l’Est", "HECU": "heure d’été de Cuba", "BT": "heure du Bhoutan", "PDT": "heure d’été du Pacifique", "CHAST": "heure normale des îles Chatham", "JDT": "heure d’été du Japon", "BOT": "heure de Bolivie", "MDT": "heure d’été de Macao", "ART": "heure normale d’Argentine", "AEDT": "heure d’été de l’Est de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "LHST": "heure normale de Lord Howe", "NZDT": "heure d’été de la Nouvelle-Zélande", "WAST": "heure d’été d’Afrique de l’Ouest", "HENOMX": "heure d’été du Nord-Ouest du Mexique"}, -+ locale: "fr_YT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "AEDT": "AEDT", "EST": "EST", "CLST": "CLST", "ACST": "ACST", "ACDT": "ACDT", "MESZ": "MESZ", "CAT": "CAT", "GMT": "GMT", "HAST": "HAST", "HNNOMX": "HNNOMX", "PDT": "PDT", "GFT": "GFT", "TMT": "TMT", "UYST": "UYST", "AKST": "AKST", "WIT": "WIT", "HKST": "HKST", "MDT": "MDT", "LHDT": "LHDT", "ACWST": "ACWST", "CHAST": "CHAST", "ECT": "ECT", "COT": "COT", "HADT": "HADT", "AWST": "AWST", "WESZ": "WESZ", "HNT": "HNT", "IST": "IST", "WART": "WART", "HAT": "HAT", "MST": "MST", "SRT": "SRT", "LHST": "LHST", "AWDT": "AWDT", "UYT": "UYT", "HNOG": "HNOG", "NZST": "NZST", "HNEG": "HNEG", "HEOG": "HEOG", "HEEG": "HEEG", "SGT": "SGT", "HECU": "HECU", "HNPMX": "HNPMX", "CST": "CST", "EAT": "EAT", "BT": "BT", "HEPMX": "HEPMX", "NZDT": "NZDT", "ACWDT": "ACWDT", "AEST": "AEST", "COST": "COST", "WAST": "WAST", "HKT": "HKT", "WITA": "WITA", "ART": "ART", "ARST": "ARST", "HEPM": "HEPM", "AKDT": "AKDT", "WAT": "WAT", "GYT": "GYT", "TMST": "TMST", "EDT": "EDT", "ChST": "ChST", "HENOMX": "HENOMX", "HNCU": "HNCU", "OESZ": "OESZ", "CLT": "CLT", "PST": "PST", "OEZ": "OEZ", "SAST": "SAST", "WIB": "WIB", "CDT": "CDT", "MYT": "MYT", "JST": "JST", "JDT": "JDT", "AST": "AST", "ADT": "ADT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "VET": "VET", "BOT": "BOT", "CHADT": "CHADT", "WEZ": "WEZ", "WARST": "WARST"}, - } - } -  -@@ -147,7 +120,7 @@ func (fr *fr_YT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fr *fr_YT) MonthsAbbreviated() []string { -- return fr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -157,7 +130,7 @@ func (fr *fr_YT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fr *fr_YT) MonthsNarrow() []string { -- return fr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -167,7 +140,7 @@ func (fr *fr_YT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fr *fr_YT) MonthsWide() []string { -- return fr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -213,77 +186,13 @@ func (fr *fr_YT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_YT' and handles both Whole and Real numbers based on 'v' - func (fr *fr_YT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_YT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fr *fr_YT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fr.percentSuffix...) -- -- b = append(b, fr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_YT' -@@ -291,58 +200,7 @@ func (fr *fr_YT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, fr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_YT' -@@ -351,65 +209,7 @@ func (fr *fr_YT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(fr.group) - 1; j >= 0; j-- { -- b = append(b, fr.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, fr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, fr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fr_YT' -@@ -417,27 +217,6 @@ func (fr *fr_YT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +225,6 @@ func (fr *fr_YT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +233,6 @@ func (fr *fr_YT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (fr *fr_YT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +249,6 @@ func (fr *fr_YT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +257,6 @@ func (fr *fr_YT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +265,6 @@ func (fr *fr_YT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +273,5 @@ func (fr *fr_YT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fur/fur.go b/fur/fur.go -index 16be12d..a9528ab 100644 ---- a/fur/fur.go -+++ b/fur/fur.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"pdC", "ddC"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"JDT": "JDT", "HNEG": "HNEG", "WARST": "WARST", "UYST": "UYST", "WIT": "WIT", "SRT": "SRT", "HEOG": "HEOG", "PDT": "PDT", "ACWST": "ACWST", "HEPM": "HEPM", "NZDT": "NZDT", "AKST": "AKST", "ChST": "ChST", "CHADT": "CHADT", "CLT": "CLT", "BOT": "BOT", "ARST": "ARST", "HNPM": "HNPM", "GFT": "GFT", "ECT": "ECT", "AEST": "AEST", "PST": "PST", "HNCU": "HNCU", "EST": "EST", "ADT": "ADT", "CST": "CST", "AEDT": "AEDT", "OEZ": "Ore standard de Europe orientâl", "COT": "COT", "HNPMX": "HNPMX", "GYT": "GYT", "ACWDT": "ACWDT", "AWST": "AWST", "EAT": "EAT", "HECU": "HECU", "BT": "BT", "MST": "MST", "AWDT": "AWDT", "MEZ": "Ore standard de Europe centrâl", "HEEG": "HEEG", "WAST": "WAST", "UYT": "UYT", "WEZ": "Ore standard de Europe ocidentâl", "TMST": "TMST", "ACDT": "ACDT", "COST": "COST", "VET": "VET", "MYT": "MYT", "CDT": "CDT", "TMT": "TMT", "WAT": "WAT", "HEPMX": "HEPMX", "AKDT": "AKDT", "ART": "ART", "HNOG": "HNOG", "HAT": "HAT", "JST": "JST", "CAT": "CAT", "WART": "WART", "HENOMX": "HENOMX", "AST": "AST", "SGT": "SGT", "MESZ": "Ore estive de Europe centrâl", "HAST": "HAST", "LHST": "LHST", "CHAST": "CHAST", "IST": "IST", "∅∅∅": "∅∅∅", "ACST": "ACST", "HNNOMX": "HNNOMX", "MDT": "MDT", "HKST": "HKST", "CLST": "CLST", "OESZ": "Ore estive de Europe orientâl", "WESZ": "Ore estive de Europe ocidentâl", "HADT": "HADT", "HNT": "HNT", "HKT": "HKT", "WITA": "WITA", "LHDT": "LHDT", "NZST": "NZST", "SAST": "SAST", "WIB": "WIB", "EDT": "EDT", "GMT": "GMT"}, -+ timezones: map[string]string{"TMT": "TMT", "EST": "EST", "GMT": "GMT", "BOT": "BOT", "LHST": "LHST", "AEST": "AEST", "UYST": "UYST", "HNOG": "HNOG", "CDT": "CDT", "AWST": "AWST", "GFT": "GFT", "WIT": "WIT", "CST": "CST", "EAT": "EAT", "HEEG": "HEEG", "WAT": "WAT", "MST": "MST", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "NZST": "NZST", "HNPM": "HNPM", "HEPM": "HEPM", "JDT": "JDT", "AEDT": "AEDT", "UYT": "UYT", "HEPMX": "HEPMX", "HAT": "HAT", "EDT": "EDT", "MDT": "MDT", "HADT": "HADT", "ACDT": "ACDT", "PST": "PST", "VET": "VET", "HAST": "HAST", "AKDT": "AKDT", "CAT": "CAT", "AWDT": "AWDT", "WIB": "WIB", "MEZ": "Ore standard de Europe centrâl", "COST": "COST", "HEOG": "HEOG", "CLT": "CLT", "ARST": "ARST", "HNEG": "HNEG", "MYT": "MYT", "OESZ": "Ore estive de Europe orientâl", "HNT": "HNT", "SAST": "SAST", "ACST": "ACST", "WEZ": "Ore standard de Europe ocidentâl", "GYT": "GYT", "HNPMX": "HNPMX", "TMST": "TMST", "ChST": "ChST", "HENOMX": "HENOMX", "PDT": "PDT", "SGT": "SGT", "CHADT": "CHADT", "IST": "IST", "HECU": "HECU", "OEZ": "Ore standard de Europe orientâl", "HKT": "HKT", "WITA": "WITA", "ACWST": "ACWST", "CHAST": "CHAST", "HNNOMX": "HNNOMX", "JST": "JST", "AST": "AST", "BT": "BT", "AKST": "AKST", "ADT": "ADT", "WESZ": "Ore estive de Europe ocidentâl", "CLST": "CLST", "MESZ": "Ore estive de Europe centrâl", "NZDT": "NZDT", "ART": "ART", "LHDT": "LHDT", "ECT": "ECT", "SRT": "SRT", "WART": "WART", "WARST": "WARST", "COT": "COT", "HKST": "HKST", "ACWDT": "ACWDT", "WAST": "WAST"}, - } - } -  -diff --git a/fur_IT/fur_IT.go b/fur_IT/fur_IT.go -index 829034e..64b35ea 100644 ---- a/fur_IT/fur_IT.go -+++ b/fur_IT/fur_IT.go -@@ -10,66 +10,45 @@ import ( - ) -  - type fur_IT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fur_IT' locale - func New() locales.Translator { - return &fur_IT{ -- locale: "fur_IT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Zen", "Fev", "Mar", "Avr", "Mai", "Jug", "Lui", "Avo", "Set", "Otu", "Nov", "Dic"}, -- monthsNarrow: []string{"", "Z", "F", "M", "A", "M", "J", "L", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Zenâr", "Fevrâr", "Març", "Avrîl", "Mai", "Jugn", "Lui", "Avost", "Setembar", "Otubar", "Novembar", "Dicembar"}, -- daysAbbreviated: []string{"dom", "lun", "mar", "mie", "joi", "vin", "sab"}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysWide: []string{"domenie", "lunis", "martars", "miercus", "joibe", "vinars", "sabide"}, -- periodsAbbreviated: []string{"a.", "p."}, -- periodsWide: []string{"a.", "p."}, -- erasAbbreviated: []string{"pdC", "ddC"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WAT": "WAT", "MEZ": "Ore standard de Europe centrâl", "CLT": "CLT", "BOT": "BOT", "AEDT": "AEDT", "NZDT": "NZDT", "HEPMX": "HEPMX", "CDT": "CDT", "HNOG": "HNOG", "WITA": "WITA", "EDT": "EDT", "HNEG": "HNEG", "OEZ": "Ore standard de Europe orientâl", "CAT": "CAT", "HENOMX": "HENOMX", "CST": "CST", "VET": "VET", "ACWDT": "ACWDT", "MDT": "MDT", "SRT": "SRT", "ACWST": "ACWST", "WIT": "WIT", "BT": "BT", "HAT": "HAT", "JDT": "JDT", "ECT": "ECT", "AKST": "AKST", "UYST": "UYST", "WIB": "WIB", "GMT": "GMT", "EST": "EST", "IST": "IST", "ACST": "ACST", "AST": "AST", "GYT": "GYT", "HEOG": "HEOG", "CHADT": "CHADT", "JST": "JST", "SGT": "SGT", "CLST": "CLST", "TMT": "TMT", "WART": "WART", "ART": "ART", "PDT": "PDT", "HKT": "HKT", "MYT": "MYT", "HNT": "HNT", "ACDT": "ACDT", "OESZ": "Ore estive de Europe orientâl", "COST": "COST", "HECU": "HECU", "HADT": "HADT", "WEZ": "Ore standard de Europe ocidentâl", "∅∅∅": "∅∅∅", "ChST": "ChST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HNPMX": "HNPMX", "ADT": "ADT", "UYT": "UYT", "HNPM": "HNPM", "LHST": "LHST", "LHDT": "LHDT", "EAT": "EAT", "WARST": "WARST", "AKDT": "AKDT", "AEST": "AEST", "AWDT": "AWDT", "SAST": "SAST", "GFT": "GFT", "MST": "MST", "PST": "PST", "HKST": "HKST", "HEPM": "HEPM", "NZST": "NZST", "WAST": "WAST", "COT": "COT", "HAST": "HAST", "ARST": "ARST", "WESZ": "Ore estive de Europe ocidentâl", "HEEG": "HEEG", "TMST": "TMST", "AWST": "AWST", "CHAST": "CHAST", "MESZ": "Ore estive de Europe centrâl"}, -+ locale: "fur_IT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEST": "AEST", "HKT": "HKT", "TMT": "TMT", "CLST": "CLST", "ARST": "ARST", "SRT": "SRT", "LHDT": "LHDT", "AEDT": "AEDT", "ChST": "ChST", "HNPM": "HNPM", "BT": "BT", "HNCU": "HNCU", "SGT": "SGT", "WAT": "WAT", "AKDT": "AKDT", "HKST": "HKST", "ART": "ART", "AWDT": "AWDT", "LHST": "LHST", "MYT": "MYT", "ACWDT": "ACWDT", "WEZ": "WEZ", "WARST": "WARST", "WIB": "WIB", "UYST": "UYST", "HEOG": "HEOG", "HEPM": "HEPM", "IST": "IST", "PST": "PST", "PDT": "PDT", "SAST": "SAST", "COT": "COT", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "HNPMX": "HNPMX", "GFT": "GFT", "WART": "WART", "HADT": "HADT", "ACST": "ACST", "ACWST": "ACWST", "CHAST": "CHAST", "WIT": "WIT", "MST": "MST", "MESZ": "MESZ", "HNEG": "HNEG", "AWST": "AWST", "HEPMX": "HEPMX", "WAST": "WAST", "MEZ": "MEZ", "VET": "VET", "HNOG": "HNOG", "WITA": "WITA", "CDT": "CDT", "NZST": "NZST", "NZDT": "NZDT", "ADT": "ADT", "EST": "EST", "TMST": "TMST", "CAT": "CAT", "CST": "CST", "AST": "AST", "COST": "COST", "JST": "JST", "UYT": "UYT", "∅∅∅": "∅∅∅", "HECU": "HECU", "AKST": "AKST", "OEZ": "OEZ", "HAT": "HAT", "EDT": "EDT", "GMT": "GMT", "EAT": "EAT", "HAST": "HAST", "JDT": "JDT", "GYT": "GYT", "ECT": "ECT", "MDT": "MDT", "ACDT": "ACDT", "OESZ": "OESZ", "HNT": "HNT", "HEEG": "HEEG", "WESZ": "WESZ", "HENOMX": "HENOMX", "CLT": "CLT", "BOT": "BOT"}, - } - } -  -@@ -122,7 +101,7 @@ func (fur *fur_IT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fur *fur_IT) MonthsAbbreviated() []string { -- return fur.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (fur *fur_IT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fur *fur_IT) MonthsNarrow() []string { -- return fur.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (fur *fur_IT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fur *fur_IT) MonthsWide() []string { -- return fur.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,73 +167,13 @@ func (fur *fur_IT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fur_IT' and handles both Whole and Real numbers based on 'v' - func (fur *fur_IT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fur.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fur_IT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fur *fur_IT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fur.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fur.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fur.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fur_IT' -@@ -262,60 +181,7 @@ func (fur *fur_IT) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fur.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fur.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, fur.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, fur.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fur.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fur_IT' -@@ -324,72 +190,7 @@ func (fur *fur_IT) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fur.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fur.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, fur.currencyNegativePrefix[j]) -- } -- -- b = append(b, fur.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fur.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, fur.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fur.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fur_IT' -@@ -397,27 +198,6 @@ func (fur *fur_IT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -426,27 +206,6 @@ func (fur *fur_IT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,19 +214,6 @@ func (fur *fur_IT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x69}...) -- b = append(b, []byte{0x20}...) -- b = append(b, fur.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x61, 0x6c}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -476,21 +222,6 @@ func (fur *fur_IT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fur.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x69}...) -- b = append(b, []byte{0x20}...) -- b = append(b, fur.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x61, 0x6c}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -499,19 +230,6 @@ func (fur *fur_IT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -520,26 +238,6 @@ func (fur *fur_IT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -548,30 +246,6 @@ func (fur *fur_IT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -580,34 +254,5 @@ func (fur *fur_IT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fur.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/fy/fy.go b/fy/fy.go -index 4a65510..d1b400f 100644 ---- a/fy/fy.go -+++ b/fy/fy.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "n.Kr."}, - erasNarrow: []string{"f.K.", "n.K."}, - erasWide: []string{"Foar Kristus", "nei Kristus"}, -- timezones: map[string]string{"EST": "Eastern-standerttiid", "EDT": "Eastern-simmertiid", "UYST": "Uruguayaanske simmertiid", "CAT": "Sintraal-Afrikaanske tiid", "HNCU": "Kubaanske standerttiid", "PDT": "Pasifik-simmertiid", "WESZ": "West-Europeeske simmertiid", "AWST": "West-Australyske standerttiid", "ACDT": "Midden-Australyske simmertiid", "∅∅∅": "Peruaanske simmertiid", "AST": "Atlantic-standerttiid", "WIB": "West-Yndonezyske tiid", "HADT": "Hawaii-Aleoetyske simmertiid", "WITA": "Sintraal-Yndonezyske tiid", "ECT": "Ecuadoraanske tiid", "OEZ": "East-Europeeske standerttiid", "HNPMX": "HNPMX", "PST": "Pasifik-standerttiid", "NZST": "Nij-Seelânske standerttiid", "CHAST": "Chatham standerttiid", "LHST": "Lord Howe-eilânske standerttiid", "HNNOMX": "HNNOMX", "ADT": "Atlantic-simmertiid", "UYT": "Uruguayaanske standerttiid", "AKDT": "Alaska-simmertiid", "BT": "Bhutaanske tiid", "HNOG": "West-Groenlânske standerttiid", "CST": "Central-standerttiid", "WEZ": "West-Europeeske standerttiid", "TMT": "Turkmeense standerttiid", "HEEG": "East-Groenlânske simmertiid", "OESZ": "East-Europeeske simmertiid", "COST": "Kolombiaanske simmertiid", "HEPMX": "HEPMX", "MYT": "Maleisyske tiid", "HKT": "Hongkongse standerttiid", "BOT": "Boliviaanske tiid", "AEDT": "East-Australyske simmertiid", "HKST": "Hongkongse simmertiid", "WAT": "West-Afrikaanske standerttiid", "MDT": "Macause simmertiid", "ART": "Argentynske standerttiid", "AEST": "East-Australyske standerttiid", "AWDT": "West-Australyske simmertiid", "EAT": "East-Afrikaanske tiid", "WARST": "West-Argentynske simmertiid", "HEOG": "West-Groenlânske simmertiid", "IST": "Yndiaaske tiid", "GYT": "Guyaanske tiid", "ACWST": "Midden-Australyske westelijke standerttiid", "HAT": "Newfoundlânske-simmertiid", "HNPM": "Saint Pierre en Miquelon-standerttiid", "AKST": "Alaska-standerttiid", "HAST": "Hawaii-Aleoetyske standerttiid", "ACWDT": "Midden-Australyske westelijke simmertiid", "HNT": "Newfoundlânske-standerttiid", "SAST": "Sûd-Afrikaanske tiid", "JDT": "Japanske simmertiid", "WAST": "West-Afrikaanske simmertiid", "WART": "West-Argentynske standerttiid", "VET": "Fenezolaanske tiid", "HEPM": "Saint Pierre en Miquelon-simmertiid", "MESZ": "Midden-Europeeske simmertiid", "WIT": "East-Yndonezyske tiid", "SRT": "Surinaamske tiid", "TMST": "Turkmeense simmertiid", "GFT": "Frâns-Guyaanske tiid", "COT": "Kolombiaanske standerttiid", "HENOMX": "HENOMX", "GMT": "Greenwich Mean Time", "SGT": "Singaporese standerttiid", "CLST": "Sileenske simmertiid", "ChST": "Chamorro-tiid", "MST": "Macause standerttiid", "ARST": "Argentynske simmertiid", "CLT": "Sileenske standerttiid", "CHADT": "Chatham simmertiid", "HNEG": "East-Groenlânske standerttiid", "ACST": "Midden-Australyske standerttiid", "HECU": "Kubaanske simmertiid", "CDT": "Central-simmertiid", "MEZ": "Midden-Europeeske standerttiid", "NZDT": "Nij-Seelânske simmertiid", "LHDT": "Lord Howe-eilânske simmertiid", "JST": "Japanske standerttiid"}, -+ timezones: map[string]string{"HNOG": "West-Groenlânske standerttiid", "CLT": "Sileenske standerttiid", "WITA": "Sintraal-Yndonezyske tiid", "HADT": "Hawaii-Aleoetyske simmertiid", "CHAST": "Chatham standerttiid", "∅∅∅": "Acre-simmertiid", "WEZ": "West-Europeeske standerttiid", "WESZ": "West-Europeeske simmertiid", "EDT": "Eastern-simmertiid", "NZST": "Nij-Seelânske standerttiid", "ARST": "Argentynske simmertiid", "AWST": "West-Australyske standerttiid", "ACWDT": "Midden-Australyske westelijke simmertiid", "VET": "Fenezolaanske tiid", "HECU": "Kubaanske simmertiid", "OESZ": "East-Europeeske simmertiid", "MYT": "Maleisyske tiid", "LHST": "Lord Howe-eilânske standerttiid", "PST": "Pasifik-standerttiid", "GFT": "Frâns-Guyaanske tiid", "WART": "West-Argentynske standerttiid", "HKT": "Hongkongse standerttiid", "BT": "Bhutaanske tiid", "CAT": "Sintraal-Afrikaanske tiid", "AWDT": "West-Australyske simmertiid", "SAST": "Sûd-Afrikaanske tiid", "SRT": "Surinaamske tiid", "ECT": "Ecuadoraanske tiid", "GMT": "Greenwich Mean Time", "EAT": "East-Afrikaanske tiid", "HNNOMX": "HNNOMX", "AEST": "East-Australyske standerttiid", "GYT": "Guyaanske tiid", "COST": "Kolombiaanske simmertiid", "TMST": "Turkmeense simmertiid", "ART": "Argentynske standerttiid", "HAST": "Hawaii-Aleoetyske standerttiid", "UYST": "Uruguayaanske simmertiid", "IST": "Yndiaaske tiid", "HNPMX": "HNPMX", "EST": "Eastern-standerttiid", "PDT": "Pasifik-simmertiid", "COT": "Kolombiaanske standerttiid", "CST": "Central-standerttiid", "BOT": "Boliviaanske tiid", "WAT": "West-Afrikaanske standerttiid", "OEZ": "East-Europeeske standerttiid", "MESZ": "Midden-Europeeske simmertiid", "ACST": "Midden-Australyske standerttiid", "HNCU": "Kubaanske standerttiid", "WARST": "West-Argentynske simmertiid", "WIT": "East-Yndonezyske tiid", "HEOG": "West-Groenlânske simmertiid", "HEPM": "Saint Pierre en Miquelon-simmertiid", "AKST": "Alaska-standerttiid", "MDT": "Macause simmertiid", "WIB": "West-Yndonezyske tiid", "MEZ": "Midden-Europeeske standerttiid", "HNPM": "Saint Pierre en Miquelon-standerttiid", "CHADT": "Chatham simmertiid", "HAT": "Newfoundlânske-simmertiid", "AST": "Atlantic-standerttiid", "ChST": "Chamorro-tiid", "HENOMX": "HENOMX", "HKST": "Hongkongse simmertiid", "TMT": "Turkmeense standerttiid", "CLST": "Sileenske simmertiid", "ACDT": "Midden-Australyske simmertiid", "MST": "Macause standerttiid", "HEEG": "East-Groenlânske simmertiid", "UYT": "Uruguayaanske standerttiid", "AEDT": "East-Australyske simmertiid", "HEPMX": "HEPMX", "WAST": "West-Afrikaanske simmertiid", "HNEG": "East-Groenlânske standerttiid", "LHDT": "Lord Howe-eilânske simmertiid", "JST": "Japanske standerttiid", "SGT": "Singaporese standerttiid", "HNT": "Newfoundlânske-standerttiid", "NZDT": "Nij-Seelânske simmertiid", "ADT": "Atlantic-simmertiid", "ACWST": "Midden-Australyske westelijke standerttiid", "AKDT": "Alaska-simmertiid", "CDT": "Central-simmertiid", "JDT": "Japanske simmertiid"}, - } - } -  -diff --git a/fy_NL/fy_NL.go b/fy_NL/fy_NL.go -index af27e39..10e60b5 100644 ---- a/fy_NL/fy_NL.go -+++ b/fy_NL/fy_NL.go -@@ -10,70 +10,45 @@ import ( - ) -  - type fy_NL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'fy_NL' locale - func New() locales.Translator { - return &fy_NL{ -- locale: "fy_NL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: "( ", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mrt", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Jannewaris", "Febrewaris", "Maart", "April", "Maaie", "Juny", "July", "Augustus", "Septimber", "Oktober", "Novimber", "Desimber"}, -- daysAbbreviated: []string{"si", "mo", "ti", "wo", "to", "fr", "so"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"si", "mo", "ti", "wo", "to", "fr", "so"}, -- daysWide: []string{"snein", "moandei", "tiisdei", "woansdei", "tongersdei", "freed", "sneon"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"f.Kr.", "n.Kr."}, -- erasNarrow: []string{"f.K.", "n.K."}, -- erasWide: []string{"Foar Kristus", "nei Kristus"}, -- timezones: map[string]string{"HNOG": "West-Groenlânske standerttiid", "HNCU": "Kubaanske standerttiid", "UYST": "Uruguayaanske simmertiid", "WIB": "West-Yndonezyske tiid", "MST": "Mountain-standerttiid", "WAST": "West-Afrikaanske simmertiid", "HENOMX": "HENOMX", "SGT": "Singaporese standerttiid", "HAST": "Hawaii-Aleoetyske standerttiid", "NZST": "Nij-Seelânske standerttiid", "ACDT": "Midden-Australyske simmertiid", "ACST": "Midden-Australyske standerttiid", "OEZ": "East-Europeeske standerttiid", "CAT": "Sintraal-Afrikaanske tiid", "HNNOMX": "HNNOMX", "COT": "Kolombiaanske standerttiid", "HNPM": "Saint Pierre en Miquelon-standerttiid", "HEPM": "Saint Pierre en Miquelon-simmertiid", "NZDT": "Nij-Seelânske simmertiid", "PDT": "Pasifik-simmertiid", "AEST": "East-Australyske standerttiid", "AWDT": "West-Australyske simmertiid", "MEZ": "Midden-Europeeske standerttiid", "GFT": "Frâns-Guyaanske tiid", "CST": "Central-standerttiid", "AST": "Atlantic-standerttiid", "BT": "Bhutaanske tiid", "HEPMX": "HEPMX", "AKDT": "Alaska-simmertiid", "ADT": "Atlantic-simmertiid", "IST": "Yndiaaske tiid", "TMST": "Turkmeense simmertiid", "HECU": "Kubaanske simmertiid", "UYT": "Uruguayaanske standerttiid", "ACWDT": "Midden-Australyske westelijke simmertiid", "LHST": "Lord Howe-eilânske standerttiid", "ARST": "Argentynske simmertiid", "EST": "Eastern-standerttiid", "CDT": "Central-simmertiid", "SRT": "Surinaamske tiid", "HNT": "Newfoundlânske-standerttiid", "ChST": "Chamorro-tiid", "HNPMX": "HNPMX", "AKST": "Alaska-standerttiid", "MDT": "Mountain-simmertiid", "WEZ": "West-Europeeske standerttiid", "COST": "Kolombiaanske simmertiid", "MYT": "Maleisyske tiid", "WESZ": "West-Europeeske simmertiid", "CHAST": "Chatham standerttiid", "ECT": "Ecuadoraanske tiid", "EDT": "Eastern-simmertiid", "WIT": "East-Yndonezyske tiid", "HEOG": "West-Groenlânske simmertiid", "HNEG": "East-Groenlânske standerttiid", "ART": "Argentynske standerttiid", "AWST": "West-Australyske standerttiid", "JST": "Japanske standerttiid", "JDT": "Japanske simmertiid", "WAT": "West-Afrikaanske standerttiid", "EAT": "East-Afrikaanske tiid", "GMT": "Greenwich Mean Time", "HKST": "Hongkongse simmertiid", "AEDT": "East-Australyske simmertiid", "CHADT": "Chatham simmertiid", "TMT": "Turkmeense standerttiid", "BOT": "Boliviaanske tiid", "WART": "West-Argentynske standerttiid", "HAT": "Newfoundlânske-simmertiid", "PST": "Pasifik-standerttiid", "HEEG": "East-Groenlânske simmertiid", "ACWST": "Midden-Australyske westelijke standerttiid", "CLST": "Sileenske simmertiid", "HKT": "Hongkongse standerttiid", "WITA": "Sintraal-Yndonezyske tiid", "MESZ": "Midden-Europeeske simmertiid", "LHDT": "Lord Howe-eilânske simmertiid", "SAST": "Sûd-Afrikaanske tiid", "GYT": "Guyaanske tiid", "HADT": "Hawaii-Aleoetyske simmertiid", "VET": "Fenezolaanske tiid", "WARST": "West-Argentynske simmertiid", "∅∅∅": "Amazone-simmertiid", "CLT": "Sileenske standerttiid", "OESZ": "East-Europeeske simmertiid"}, -+ locale: "fy_NL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIB": "WIB", "HNPM": "HNPM", "JDT": "JDT", "HNCU": "HNCU", "HECU": "HECU", "EST": "EST", "HEPM": "HEPM", "WESZ": "WESZ", "CDT": "CDT", "AEST": "AEST", "AKDT": "AKDT", "HNOG": "HNOG", "MST": "MST", "NZST": "NZST", "HEEG": "HEEG", "LHDT": "LHDT", "VET": "VET", "EDT": "EDT", "ADT": "ADT", "AWDT": "AWDT", "OEZ": "OEZ", "ARST": "ARST", "HNNOMX": "HNNOMX", "SGT": "SGT", "HNPMX": "HNPMX", "ART": "ART", "ACST": "ACST", "HEOG": "HEOG", "CLST": "CLST", "MDT": "MDT", "HAST": "HAST", "HADT": "HADT", "MYT": "MYT", "BT": "BT", "CHAST": "CHAST", "HAT": "HAT", "WARST": "WARST", "WIT": "WIT", "COT": "COT", "CAT": "CAT", "GYT": "GYT", "MESZ": "MESZ", "LHST": "LHST", "ACWDT": "ACWDT", "AEDT": "AEDT", "WEZ": "WEZ", "WAST": "WAST", "OESZ": "OESZ", "CLT": "CLT", "ECT": "ECT", "GMT": "GMT", "PST": "PST", "WAT": "WAT", "SAST": "SAST", "IST": "IST", "ACWST": "ACWST", "HEPMX": "HEPMX", "COST": "COST", "TMST": "TMST", "MEZ": "MEZ", "HENOMX": "HENOMX", "PDT": "PDT", "HKST": "HKST", "HNT": "HNT", "BOT": "BOT", "ACDT": "ACDT", "HNEG": "HNEG", "AWST": "AWST", "JST": "JST", "UYST": "UYST", "AKST": "AKST", "WART": "WART", "TMT": "TMT", "WITA": "WITA", "GFT": "GFT", "CST": "CST", "NZDT": "NZDT", "ChST": "ChST", "SRT": "SRT", "EAT": "EAT", "CHADT": "CHADT", "UYT": "UYT", "AST": "AST", "∅∅∅": "∅∅∅", "HKT": "HKT"}, - } - } -  -@@ -127,7 +102,7 @@ func (fy *fy_NL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (fy *fy_NL) MonthsAbbreviated() []string { -- return fy.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -137,7 +112,7 @@ func (fy *fy_NL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (fy *fy_NL) MonthsNarrow() []string { -- return fy.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -147,7 +122,7 @@ func (fy *fy_NL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (fy *fy_NL) MonthsWide() []string { -- return fy.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,73 +168,13 @@ func (fy *fy_NL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'fy_NL' and handles both Whole and Real numbers based on 'v' - func (fy *fy_NL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'fy_NL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (fy *fy_NL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fy.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, fy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, fy.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fy_NL' -@@ -267,60 +182,7 @@ func (fy *fy_NL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fy.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fy.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, fy.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, fy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fy_NL' -@@ -329,74 +191,7 @@ func (fy *fy_NL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := fy.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, fy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, fy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fy.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, fy.currencyNegativePrefix[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(fy.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, fy.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, fy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, fy.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'fy_NL' -@@ -404,27 +199,6 @@ func (fy *fy_NL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -433,17 +207,6 @@ func (fy *fy_NL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fy.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,17 +215,6 @@ func (fy *fy_NL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +223,6 @@ func (fy *fy_NL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, fy.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, fy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -492,19 +231,6 @@ func (fy *fy_NL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -513,26 +239,6 @@ func (fy *fy_NL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -541,30 +247,6 @@ func (fy *fy_NL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -573,34 +255,5 @@ func (fy *fy_NL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, fy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := fy.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ga/ga.go b/ga/ga.go -index dd650a4..c408bcf 100644 ---- a/ga/ga.go -+++ b/ga/ga.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"RC", "AD"}, - erasNarrow: []string{"RC", "AD"}, - erasWide: []string{"Roimh Chríost", "Anno Domini"}, -- timezones: map[string]string{"HKST": "Am Samhraidh Hong Cong", "IST": "Am Caighdeánach na hIndia", "HECU": "Am Samhraidh Chúba", "EST": "Am Caighdeánach an Oirthir", "HNPMX": "Am Caighdeánach Meicsiceach an Aigéin Chiúin", "CDT": "Am Samhraidh Lárnach", "MST": "Am Caighdeánach na Sléibhte", "AEDT": "Am Samhraidh Oirthear na hAstráile", "ECT": "Am Eacuadór", "COT": "Am Caighdeánach na Colóime", "SGT": "Am Caighdeánach Shingeapór", "BT": "Am na Bútáine", "WEZ": "Am Caighdeánach Iarthar na hEorpa", "MEZ": "Am Caighdeánach Lár na hEorpa", "SRT": "Am Shuranam", "ACWST": "Am Caighdeánach Mheániarthar na hAstráile", "HNT": "Am Caighdeánach Thalamh an Éisc", "AWDT": "Am Samhraidh Iarthar na hAstráile", "LHDT": "Am Samhraidh Lord Howe", "CST": "Am Caighdeánach Lárnach", "VET": "Am Veiniséala", "WIT": "Am Oirthear na hIndinéise", "CAT": "Am Lár na hAfraice", "MESZ": "Am Samhraidh Lár na hEorpa", "JST": "Am Caighdeánach na Seapáine", "WAST": "Am Samhraidh Iarthar na hAfraice", "HNNOMX": "Am Caighdeánach Iarthuaisceart Mheicsiceo", "GFT": "Am Ghuáin na Fraince", "TMST": "Am Samhraidh na Tuircméanastáine", "WAT": "Am Caighdeánach Iarthar na hAfraice", "ACST": "Am Caighdeánach Lár na hAstráile", "AEST": "Am Caighdeánach Oirthear na hAstráile", "AWST": "Am Caighdeánach Iarthar na hAstráile", "CLST": "Am Samhraidh na Sile", "HNCU": "Am Caighdeánach Chúba", "MYT": "Am na Malaeisia", "ART": "Am Caighdeánach na hAirgintíne", "∅∅∅": "Am Samhraidh na hAmasóine", "UYST": "Am Samhraidh Uragua", "AKST": "Am Caighdeánach Alasca", "HADT": "Am Samhraidh Haváí-Ailiúit", "TMT": "Am Caighdeánach na Tuircméanastáine", "OEZ": "Am Caighdeánach Oirthear na hEorpa", "WART": "Am Caighdeánach Iarthar na hAirgintíne", "HENOMX": "Am Samhraidh Iarthuaisceart Mheicsiceo", "ADT": "Am Samhraidh an Atlantaigh", "PDT": "Am Samhraidh an Aigéin Chiúin", "HNOG": "Am Caighdeánach Iarthar na Graonlainne", "EAT": "Am Oirthear na hAfraice", "EDT": "Am Samhraidh an Oirthir", "NZDT": "Am Samhraidh na Nua-Shéalainne", "HEEG": "Am Samhraidh Oirthear na Graonlainne", "COST": "Am Samhraidh na Colóime", "LHST": "Am Caighdeánach Lord Howe", "JDT": "Am Samhraidh na Seapáine", "ChST": "Am Caighdeánach Seamórach", "MDT": "Am Samhraidh na Sléibhte", "HEOG": "Am Samhraidh Iarthar na Graonlainne", "HNPM": "Am Caighdeánach Saint-Pierre-et-Miquelon", "ARST": "Am Samhraidh na hAirgintíne", "HKT": "Am Caighdeánach Hong Cong", "OESZ": "Am Samhraidh Oirthear na hEorpa", "UYT": "Am Caighdeánach Uragua", "HAST": "Am Caighdeánach Haváí-Ailiúit", "WESZ": "Am Samhraidh Iarthar na hEorpa", "CHADT": "Am Samhraidh Chatham", "BOT": "Am na Bolaive", "HNEG": "Am Caighdeánach Oirthear na Graonlainne", "ACDT": "Am Samhraidh Lár na hAstráile", "WARST": "Am Samhraidh Iarthar na hAirgintíne", "GYT": "Am na Guáine", "ACWDT": "Am Samhraidh Mheániarthar na hAstráile", "HAT": "Am Samhraidh Thalamh an Éisc", "PST": "Am Caighdeánach an Aigéin Chiúin", "HEPM": "Am Samhraidh Saint-Pierre-et-Miquelon", "NZST": "Am Caighdeánach na Nua-Shéalainne", "CHAST": "Am Caighdeánach Chatham", "HEPMX": "Am Samhraidh Meicsiceach an Aigéin Chiúin", "AKDT": "Am Samhraidh Alasca", "AST": "Am Caighdeánach an Atlantaigh", "WIB": "Am Iarthar na hIndinéise", "GMT": "Meán-Am Greenwich", "WITA": "Am Lár na hIndinéise", "SAST": "Am Caighdeánach na hAfraice Theas", "CLT": "Am Caighdeánach na Sile"}, -+ timezones: map[string]string{"ADT": "Am Samhraidh an Atlantaigh", "HENOMX": "Am Samhraidh Iarthuaisceart Mheicsiceo", "MEZ": "Am Caighdeánach Lár na hEorpa", "ACDT": "Am Samhraidh Lár na hAstráile", "HNEG": "Am Caighdeánach Oirthear na Graonlainne", "WESZ": "Am Samhraidh Iarthar na hEorpa", "HNCU": "Am Caighdeánach Chúba", "TMT": "Am Caighdeánach na Tuircméanastáine", "CLT": "Am Caighdeánach na Sile", "GFT": "Am Ghuáin na Fraince", "WITA": "Am Lár na hIndinéise", "BOT": "Am na Bolaive", "AEDT": "Am Samhraidh Oirthear na hAstráile", "AWST": "Am Caighdeánach Iarthar na hAstráile", "HNPMX": "Am Caighdeánach Meicsiceach an Aigéin Chiúin", "HNOG": "Am Caighdeánach Iarthar na Graonlainne", "ECT": "Am Eacuadór", "ChST": "Am Caighdeánach Seamórach", "CAT": "Am Lár na hAfraice", "MYT": "Am na Malaeisia", "ACWDT": "Am Samhraidh Mheániarthar na hAstráile", "HEEG": "Am Samhraidh Oirthear na Graonlainne", "ACWST": "Am Caighdeánach Mheániarthar na hAstráile", "AKST": "Am Caighdeánach Alasca", "HAT": "Am Samhraidh Thalamh an Éisc", "WIT": "Am Oirthear na hIndinéise", "ART": "Am Caighdeánach na hAirgintíne", "SGT": "Am Caighdeánach Shingeapór", "LHDT": "Am Samhraidh Lord Howe", "MDT": "Am Samhraidh Mhacao", "AST": "Am Caighdeánach an Atlantaigh", "UYST": "Am Samhraidh Uragua", "HECU": "Am Samhraidh Chúba", "∅∅∅": "Am Samhraidh na hAmasóine", "WAT": "Am Caighdeánach Iarthar na hAfraice", "OESZ": "Am Samhraidh Oirthear na hEorpa", "HEPM": "Am Samhraidh Saint-Pierre-et-Miquelon", "WARST": "Am Samhraidh Iarthar na hAirgintíne", "COST": "Am Samhraidh na Colóime", "NZDT": "Am Samhraidh na Nua-Shéalainne", "EAT": "Am Oirthear na hAfraice", "VET": "Am Veiniséala", "EDT": "Am Samhraidh an Oirthir", "CHAST": "Am Caighdeánach Chatham", "CHADT": "Am Samhraidh Chatham", "COT": "Am Caighdeánach na Colóime", "IST": "Am Caighdeánach na hIndia", "ARST": "Am Samhraidh na hAirgintíne", "JST": "Am Caighdeánach na Seapáine", "PDT": "Am Samhraidh an Aigéin Chiúin", "AEST": "Am Caighdeánach Oirthear na hAstráile", "WEZ": "Am Caighdeánach Iarthar na hEorpa", "WAST": "Am Samhraidh Iarthar na hAfraice", "HKST": "Am Samhraidh Hong Cong", "WIB": "Am Iarthar na hIndinéise", "GMT": "Meán-Am Greenwich", "HNPM": "Am Caighdeánach Saint-Pierre-et-Miquelon", "JDT": "Am Samhraidh na Seapáine", "AKDT": "Am Samhraidh Alasca", "WART": "Am Caighdeánach Iarthar na hAirgintíne", "HKT": "Am Caighdeánach Hong Cong", "TMST": "Am Samhraidh na Tuircméanastáine", "SRT": "Am Shuranam", "HADT": "Am Samhraidh Haváí-Ailiúit", "MESZ": "Am Samhraidh Lár na hEorpa", "HNNOMX": "Am Caighdeánach Iarthuaisceart Mheicsiceo", "SAST": "Am Caighdeánach na hAfraice Theas", "EST": "Am Caighdeánach an Oirthir", "CLST": "Am Samhraidh na Sile", "CST": "Am Caighdeánach Lárnach", "PST": "Am Caighdeánach an Aigéin Chiúin", "BT": "Am na Bútáine", "AWDT": "Am Samhraidh Iarthar na hAstráile", "LHST": "Am Caighdeánach Lord Howe", "HNT": "Am Caighdeánach Thalamh an Éisc", "MST": "Am Caighdeánach Mhacao", "NZST": "Am Caighdeánach na Nua-Shéalainne", "HAST": "Am Caighdeánach Haváí-Ailiúit", "CDT": "Am Samhraidh Lárnach", "ACST": "Am Caighdeánach Lár na hAstráile", "UYT": "Am Caighdeánach Uragua", "HEPMX": "Am Samhraidh Meicsiceach an Aigéin Chiúin", "OEZ": "Am Caighdeánach Oirthear na hEorpa", "GYT": "Am na Guáine", "HEOG": "Am Samhraidh Iarthar na Graonlainne"}, - } - } -  -diff --git a/ga_IE/ga_IE.go b/ga_IE/ga_IE.go -index 8cc79fa..ea727ba 100644 ---- a/ga_IE/ga_IE.go -+++ b/ga_IE/ga_IE.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ga_IE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ga_IE' locale - func New() locales.Translator { - return &ga_IE{ -- locale: "ga_IE", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 3, 4, 5, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Ean", "Feabh", "Márta", "Aib", "Beal", "Meith", "Iúil", "Lún", "MFómh", "DFómh", "Samh", "Noll"}, -- monthsNarrow: []string{"", "E", "F", "M", "A", "B", "M", "I", "L", "M", "D", "S", "N"}, -- monthsWide: []string{"", "Eanáir", "Feabhra", "Márta", "Aibreán", "Bealtaine", "Meitheamh", "Iúil", "Lúnasa", "Meán Fómhair", "Deireadh Fómhair", "Samhain", "Nollaig"}, -- daysAbbreviated: []string{"Domh", "Luan", "Máirt", "Céad", "Déar", "Aoine", "Sath"}, -- daysNarrow: []string{"D", "L", "M", "C", "D", "A", "S"}, -- daysShort: []string{"Do", "Lu", "Má", "Cé", "Dé", "Ao", "Sa"}, -- daysWide: []string{"Dé Domhnaigh", "Dé Luain", "Dé Máirt", "Dé Céadaoin", "Déardaoin", "Dé hAoine", "Dé Sathairn"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"RC", "AD"}, -- erasNarrow: []string{"RC", "AD"}, -- erasWide: []string{"Roimh Chríost", "Anno Domini"}, -- timezones: map[string]string{"GFT": "Am Ghuáin na Fraince", "EAT": "Am Oirthear na hAfraice", "ACWST": "Am Caighdeánach Mheániarthar na hAstráile", "GMT": "Meán-Am Greenwich", "SGT": "Am Caighdeánach Shingeapór", "AKST": "Am Caighdeánach Alasca", "MST": "Am Caighdeánach na Sléibhte", "BT": "Am na Bútáine", "WITA": "Am Lár na hIndinéise", "HEPM": "Am Samhraidh Saint-Pierre-et-Miquelon", "TMST": "Am Samhraidh na Tuircméanastáine", "HEPMX": "Am Samhraidh Meicsiceach an Aigéin Chiúin", "CST": "Am Caighdeánach Lárnach", "WIB": "Am Iarthar na hIndinéise", "ART": "Am Caighdeánach na hAirgintíne", "CLT": "Am Caighdeánach na Sile", "∅∅∅": "Am Samhraidh na hAmasóine", "EST": "Am Caighdeánach an Oirthir", "HKT": "Am Caighdeánach Hong Cong", "ChST": "Am Caighdeánach Seamórach", "HNEG": "Am Caighdeánach Oirthear na Graonlainne", "HEEG": "Am Samhraidh Oirthear na Graonlainne", "WAT": "Am Caighdeánach Iarthar na hAfraice", "AST": "Am Caighdeánach an Atlantaigh", "HAST": "Am Caighdeánach Haváí-Ailiúit", "HNOG": "Am Caighdeánach Iarthar na Graonlainne", "MESZ": "Am Samhraidh Lár na hEorpa", "TMT": "Am Caighdeánach na Tuircméanastáine", "AWST": "Am Caighdeánach Iarthar na hAstráile", "AWDT": "Am Samhraidh Iarthar na hAstráile", "NZST": "Am Caighdeánach na Nua-Shéalainne", "SAST": "Am Caighdeánach na hAfraice Theas", "IST": "Am Caighdeánach na hIndia", "MYT": "Am na Malaeisia", "UYT": "Am Caighdeánach Uragua", "UYST": "Am Samhraidh Uragua", "WAST": "Am Samhraidh Iarthar na hAfraice", "COST": "Am Samhraidh na Colóime", "HNNOMX": "Am Caighdeánach Iarthuaisceart Mheicsiceo", "ACST": "Am Caighdeánach Lár na hAstráile", "GYT": "Am na Guáine", "HADT": "Am Samhraidh Haváí-Ailiúit", "WEZ": "Am Caighdeánach Iarthar na hEorpa", "CHADT": "Am Samhraidh Chatham", "CLST": "Am Samhraidh na Sile", "WART": "Am Caighdeánach Iarthar na hAirgintíne", "AKDT": "Am Samhraidh Alasca", "ARST": "Am Samhraidh na hAirgintíne", "HNPM": "Am Caighdeánach Saint-Pierre-et-Miquelon", "HNT": "Am Caighdeánach Thalamh an Éisc", "AEDT": "Am Samhraidh Oirthear na hAstráile", "EDT": "Am Samhraidh an Oirthir", "ADT": "Am Samhraidh an Atlantaigh", "WIT": "Am Oirthear na hIndinéise", "HEOG": "Am Samhraidh Iarthar na Graonlainne", "WESZ": "Am Samhraidh Iarthar na hEorpa", "HAT": "Am Samhraidh Thalamh an Éisc", "NZDT": "Am Samhraidh na Nua-Shéalainne", "COT": "Am Caighdeánach na Colóime", "HNCU": "Am Caighdeánach Chúba", "PST": "Am Caighdeánach an Aigéin Chiúin", "AEST": "Am Caighdeánach Oirthear na hAstráile", "BOT": "Am na Bolaive", "HKST": "Am Samhraidh Hong Cong", "LHDT": "Am Samhraidh Lord Howe", "CHAST": "Am Caighdeánach Chatham", "JST": "Am Caighdeánach na Seapáine", "CAT": "Am Lár na hAfraice", "MDT": "Am Samhraidh na Sléibhte", "VET": "Am Veiniséala", "PDT": "Am Samhraidh an Aigéin Chiúin", "OEZ": "Am Caighdeánach Oirthear na hEorpa", "HNPMX": "Am Caighdeánach Meicsiceach an Aigéin Chiúin", "ECT": "Am Eacuadór", "WARST": "Am Samhraidh Iarthar na hAirgintíne", "SRT": "Am Shuranam", "ACDT": "Am Samhraidh Lár na hAstráile", "OESZ": "Am Samhraidh Oirthear na hEorpa", "JDT": "Am Samhraidh na Seapáine", "CDT": "Am Samhraidh Lárnach", "ACWDT": "Am Samhraidh Mheániarthar na hAstráile", "LHST": "Am Caighdeánach Lord Howe", "MEZ": "Am Caighdeánach Lár na hEorpa", "HENOMX": "Am Samhraidh Iarthuaisceart Mheicsiceo", "HECU": "Am Samhraidh Chúba"}, -+ locale: "ga_IE", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 3, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "HNNOMX": "HNNOMX", "LHST": "LHST", "IST": "IST", "BT": "BT", "UYST": "UYST", "HECU": "HECU", "CST": "CST", "GYT": "GYT", "HNPMX": "HNPMX", "ECT": "ECT", "JDT": "JDT", "PST": "PST", "ACWST": "ACWST", "HNT": "HNT", "WART": "WART", "WIT": "WIT", "MDT": "MDT", "HKST": "HKST", "AWST": "AWST", "WAST": "WAST", "HENOMX": "HENOMX", "MESZ": "MESZ", "HEPM": "HEPM", "VET": "VET", "HEPMX": "HEPMX", "MEZ": "MEZ", "CHADT": "CHADT", "EDT": "EDT", "EAT": "EAT", "HADT": "HADT", "MYT": "MYT", "∅∅∅": "∅∅∅", "SGT": "SGT", "COT": "COT", "CLST": "CLST", "CDT": "CDT", "HEOG": "HEOG", "ARST": "ARST", "BOT": "BOT", "HNCU": "HNCU", "COST": "COST", "HKT": "HKT", "TMST": "TMST", "AST": "AST", "JST": "JST", "WEZ": "WEZ", "AKDT": "AKDT", "OESZ": "OESZ", "EST": "EST", "WITA": "WITA", "ADT": "ADT", "HEEG": "HEEG", "UYT": "UYT", "GFT": "GFT", "CLT": "CLT", "ACDT": "ACDT", "HAST": "HAST", "PDT": "PDT", "CAT": "CAT", "NZST": "NZST", "HNOG": "HNOG", "TMT": "TMT", "CHAST": "CHAST", "HAT": "HAT", "LHDT": "LHDT", "HNPM": "HNPM", "AEDT": "AEDT", "WESZ": "WESZ", "WAT": "WAT", "AKST": "AKST", "OEZ": "OEZ", "AWDT": "AWDT", "ChST": "ChST", "SRT": "SRT", "SAST": "SAST", "MST": "MST", "WIB": "WIB", "GMT": "GMT", "ART": "ART", "ACST": "ACST", "ACWDT": "ACWDT", "AEST": "AEST", "WARST": "WARST", "NZDT": "NZDT"}, - } - } -  -@@ -176,7 +153,7 @@ func (ga *ga_IE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ga *ga_IE) MonthsAbbreviated() []string { -- return ga.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -186,7 +163,7 @@ func (ga *ga_IE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ga *ga_IE) MonthsNarrow() []string { -- return ga.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -196,7 +173,7 @@ func (ga *ga_IE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ga *ga_IE) MonthsWide() []string { -- return ga.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -242,73 +219,13 @@ func (ga *ga_IE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ga_IE' and handles both Whole and Real numbers based on 'v' - func (ga *ga_IE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ga.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ga.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ga.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ga_IE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ga *ga_IE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ga.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ga.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ga.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ga_IE' -@@ -316,56 +233,7 @@ func (ga *ga_IE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ga.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ga.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ga.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ga.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ga.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ga_IE' -@@ -374,68 +242,7 @@ func (ga *ga_IE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ga.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ga.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ga.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ga.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ga.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ga.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ga_IE' -@@ -443,27 +250,6 @@ func (ga *ga_IE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,17 +258,6 @@ func (ga *ga_IE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ga.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,17 +266,6 @@ func (ga *ga_IE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ga.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -510,19 +274,6 @@ func (ga *ga_IE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ga.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ga.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -531,19 +282,6 @@ func (ga *ga_IE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -552,26 +290,6 @@ func (ga *ga_IE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -580,30 +298,6 @@ func (ga *ga_IE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -612,34 +306,5 @@ func (ga *ga_IE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ga.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ga.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gd/gd.go b/gd/gd.go -index 113ed6b..1925bcb 100644 ---- a/gd/gd.go -+++ b/gd/gd.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"RC", "AD"}, - erasNarrow: []string{"R", "A"}, - erasWide: []string{"Ro Chrìosta", "An dèidh Chrìosta"}, -- timezones: map[string]string{"BT": "Àm Butàin", "∅∅∅": "Tìde samhraidh Amasoin", "EAT": "Àm Afraga an Ear", "ADT": "Tìde samhraidh a’ Chuain Siar", "VET": "Àm na Bheiniseala", "SGT": "Àm Singeapòr", "UYST": "Tìde samhraidh Uruguaidh", "HEPM": "Tìde Samhraidh Saint Pierre agus Miquelon", "CHAST": "Bun-àm Chatham", "WAT": "Bun-àm Afraga an Iar", "COT": "Bun-àm Coloimbia", "GMT": "Greenwich Mean Time", "MDT": "Tìde samhraidh Macàthu", "EDT": "Tìde samhraidh Aimeireaga a Tuath an Ear", "AKST": "Bun-àm Alaska", "IST": "Àm nan Innseachan", "GFT": "Àm Guidheàna na Frainge", "HAT": "Tìde samhraidh Talamh an Èisg", "MEZ": "Bun-àm Meadhan na Roinn-Eòrpa", "TMT": "Bun-àm Turcmanastàin", "TMST": "Tìde samhraidh Turcmanastàin", "WEZ": "Bun-àm na Roinn-Eòrpa an Iar", "HNPMX": "Bun-àm a’ Chuain Sèimh Mheagsago", "ART": "Bun-àm na h-Argantaine", "AWDT": "Tìde samhraidh Astràilia an Iar", "HNNOMX": "Bun-àm Mheagsago an Iar-thuath", "HEPMX": "Tìde samhraidh a’ Chuain Sèimh Mheagsago", "AKDT": "Tìde samhraidh Alaska", "CDT": "Tìde samhraidh Meadhan Aimeireaga a Tuath", "NZST": "Bun-àm Shealainn Nuaidh", "SAST": "Àm Afraga a Deas", "JST": "Bun-àm na Seapaine", "WAST": "Tìde Samhraidh Afraga an Iar", "HADT": "Tìde Samhraidh nan Eileanan Hawai’i ’s Aleutach", "AWST": "Bun-àm Astràilia an Iar", "AST": "Bun-àm a’ Chuain Siar", "HAST": "Bun-àm nan Eileanan Hawai’i ’s Aleutach", "ACWST": "Bun-àm Meadhan Astràilia an Iar", "PDT": "Tìde samhraidh a’ Chuain Sèimh", "CLT": "Bun-àm na Sile", "ACST": "Bun-àm Meadhan Astràilia", "ECT": "Àm Eacuadoir", "COST": "Tìde samhraidh Coloimbia", "HKT": "Bun-àm Hong Kong", "EST": "Bun-àm Aimeireaga a Tuath an Ear", "UYT": "Bun-àm Uruguaidh", "WIB": "Àm nan Innd-Innse an Iar", "HNT": "Bun-àm Talamh an Èisg", "CLST": "Tìde samhraidh na Sile", "BOT": "Àm Boilibhia", "HENOMX": "Tìde samhraidh Mheagsago an Iar-thuath", "HNCU": "Bun-àm Cùba", "HEOG": "Tìde samhraidh na Graonlainn an Iar", "AEST": "Bun-àm Astràilia an Ear", "ACDT": "Tìde samhraidh Meadhan Astràilia", "HECU": "Tìde samhraidh Cùba", "WART": "Bun-àm na h-Argantaine Siaraich", "WITA": "Àm Meadhan nan Innd-Innse", "HNPM": "Bun-àm Saint Pierre agus Miquelon", "LHST": "Bun-àm Lord Howe", "HEEG": "Tìde samhraidh na Graonlainn an Ear", "HKST": "Tìde samhraidh Hong Kong", "WARST": "Tìde samhraidh na h-Argantaine Siaraich", "ARST": "Tìde samhraidh na h-Argantaine", "AEDT": "Tìde samhraidh Astràilia an Ear", "NZDT": "Tìde samhraidh Shealainn Nuaidh", "MESZ": "Tìde samhraidh Meadhan na Roinn-Eòrpa", "HNEG": "Bun-àm na Graonlainn an Ear", "OEZ": "Bun-àm na Roinn-Eòrpa an Ear", "ACWDT": "Tìde samhraidh Meadhan Astràilia an Iar", "CST": "Bun-àm Meadhan Aimeireaga a Tuath", "WIT": "Àm nan Innd-Innse an Ear", "SRT": "Àm Suranaim", "WESZ": "Tìde samhraidh na Roinn-Eòrpa an Iar", "LHDT": "Tìde samhraidh Lord Howe", "MST": "Bun-àm Macàthu", "CAT": "Àm Meadhan Afraga", "GYT": "Àm Guidheàna", "MYT": "Àm Mhalaidhsea", "HNOG": "Bun-àm na Graonlainn an Iar", "CHADT": "Tìde samhraidh Chatham", "JDT": "Tìde samhraidh na Seapaine", "ChST": "Àm Chamorro", "OESZ": "Tìde samhraidh na Roinn-Eòrpa an Ear", "PST": "Bun-àm a’ Chuain Sèimh"}, -+ timezones: map[string]string{"AKST": "Bun-àm Alaska", "WITA": "Àm Meadhan nan Innd-Innse", "MDT": "Tìde samhraidh Macàthu", "ECT": "Àm Eacuadoir", "SRT": "Àm Suranaim", "IST": "Àm nan Innseachan", "HADT": "Tìde Samhraidh nan Eileanan Hawai’i ’s Aleutach", "ACST": "Bun-àm Meadhan Astràilia", "LHST": "Bun-àm Lord Howe", "AEST": "Bun-àm Astràilia an Ear", "CHAST": "Bun-àm Chatham", "PST": "Bun-àm a’ Chuain Sèimh", "JDT": "Tìde samhraidh na Seapaine", "UYST": "Tìde samhraidh Uruguaidh", "GFT": "Àm Guidheàna na Frainge", "HKST": "Tìde samhraidh Hong Kong", "NZST": "Bun-àm Shealainn Nuaidh", "ADT": "Tìde samhraidh a’ Chuain Siar", "ARST": "Tìde samhraidh na h-Argantaine", "HNNOMX": "Bun-àm Mheagsago an Iar-thuath", "WAT": "Bun-àm Afraga an Iar", "MST": "Bun-àm Macàthu", "GMT": "Greenwich Mean Time", "TMT": "Bun-àm Turcmanastàin", "NZDT": "Tìde samhraidh Shealainn Nuaidh", "AST": "Bun-àm a’ Chuain Siar", "AWDT": "Tìde samhraidh Astràilia an Iar", "WAST": "Tìde Samhraidh Afraga an Iar", "HNT": "Bun-àm Talamh an Èisg", "TMST": "Tìde samhraidh Turcmanastàin", "CLST": "Tìde samhraidh na Sile", "EAT": "Àm Afraga an Ear", "MESZ": "Tìde samhraidh Meadhan na Roinn-Eòrpa", "MEZ": "Bun-àm Meadhan na Roinn-Eòrpa", "LHDT": "Tìde samhraidh Lord Howe", "OESZ": "Tìde samhraidh na Roinn-Eòrpa an Ear", "WART": "Bun-àm na h-Argantaine Siaraich", "∅∅∅": "Tìde samhraidh Bhrasilia", "CST": "Bun-àm Meadhan Aimeireaga a Tuath", "CDT": "Tìde samhraidh Meadhan Aimeireaga a Tuath", "ART": "Bun-àm na h-Argantaine", "HNPM": "Bun-àm Saint Pierre agus Miquelon", "HENOMX": "Tìde samhraidh Mheagsago an Iar-thuath", "MYT": "Àm Mhalaidhsea", "VET": "Àm na Bheiniseala", "SAST": "Àm Afraga a Deas", "HEEG": "Tìde samhraidh na Graonlainn an Ear", "WARST": "Tìde samhraidh na h-Argantaine Siaraich", "ACDT": "Tìde samhraidh Meadhan Astràilia", "JST": "Bun-àm na Seapaine", "HEPM": "Tìde Samhraidh Saint Pierre agus Miquelon", "UYT": "Bun-àm Uruguaidh", "AKDT": "Tìde samhraidh Alaska", "GYT": "Àm Guidheàna", "COT": "Bun-àm Coloimbia", "HEPMX": "Tìde samhraidh a’ Chuain Sèimh Mheagsago", "PDT": "Tìde samhraidh a’ Chuain Sèimh", "WIT": "Àm nan Innd-Innse an Ear", "COST": "Tìde samhraidh Coloimbia", "HKT": "Bun-àm Hong Kong", "CAT": "Àm Meadhan Afraga", "CLT": "Bun-àm na Sile", "HAST": "Bun-àm nan Eileanan Hawai’i ’s Aleutach", "HNOG": "Bun-àm na Graonlainn an Iar", "EDT": "Tìde samhraidh Aimeireaga a Tuath an Ear", "CHADT": "Tìde samhraidh Chatham", "HECU": "Tìde samhraidh Cùba", "OEZ": "Bun-àm na Roinn-Eòrpa an Ear", "WIB": "Àm nan Innd-Innse an Iar", "ChST": "Àm Chamorro", "ACWDT": "Tìde samhraidh Meadhan Astràilia an Iar", "HNPMX": "Bun-àm a’ Chuain Sèimh Mheagsago", "WEZ": "Bun-àm na Roinn-Eòrpa an Iar", "HEOG": "Tìde samhraidh na Graonlainn an Iar", "HNEG": "Bun-àm na Graonlainn an Ear", "AEDT": "Tìde samhraidh Astràilia an Ear", "BT": "Àm Butàin", "ACWST": "Bun-àm Meadhan Astràilia an Iar", "HNCU": "Bun-àm Cùba", "HAT": "Tìde samhraidh Talamh an Èisg", "EST": "Bun-àm Aimeireaga a Tuath an Ear", "BOT": "Àm Boilibhia", "AWST": "Bun-àm Astràilia an Iar", "WESZ": "Tìde samhraidh na Roinn-Eòrpa an Iar", "SGT": "Àm Singeapòr"}, - } - } -  -diff --git a/gd_GB/gd_GB.go b/gd_GB/gd_GB.go -index 489f164..484d0cc 100644 ---- a/gd_GB/gd_GB.go -+++ b/gd_GB/gd_GB.go -@@ -10,68 +10,45 @@ import ( - ) -  - type gd_GB struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'gd_GB' locale - func New() locales.Translator { - return &gd_GB{ -- locale: "gd_GB", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Faoi", "Gearr", "Màrt", "Gibl", "Cèit", "Ògmh", "Iuch", "Lùna", "Sult", "Dàmh", "Samh", "Dùbh"}, -- monthsNarrow: []string{"", "F", "G", "M", "G", "C", "Ò", "I", "L", "S", "D", "S", "D"}, -- monthsWide: []string{"", "dhen Fhaoilleach", "dhen Ghearran", "dhen Mhàrt", "dhen Ghiblean", "dhen Chèitean", "dhen Ògmhios", "dhen Iuchar", "dhen Lùnastal", "dhen t-Sultain", "dhen Dàmhair", "dhen t-Samhain", "dhen Dùbhlachd"}, -- daysAbbreviated: []string{"DiD", "DiL", "DiM", "DiC", "Dia", "Dih", "DiS"}, -- daysNarrow: []string{"D", "L", "M", "C", "A", "H", "S"}, -- daysShort: []string{"Dò", "Lu", "Mà", "Ci", "Da", "hA", "Sa"}, -- daysWide: []string{"DiDòmhnaich", "DiLuain", "DiMàirt", "DiCiadain", "DiarDaoin", "DihAoine", "DiSathairne"}, -- periodsAbbreviated: []string{"m", "f"}, -- periodsNarrow: []string{"m", "f"}, -- periodsWide: []string{"m", "f"}, -- erasAbbreviated: []string{"RC", "AD"}, -- erasNarrow: []string{"R", "A"}, -- erasWide: []string{"Ro Chrìosta", "An dèidh Chrìosta"}, -- timezones: map[string]string{"MST": "Bun-àm Macàthu", "WIT": "Àm nan Innd-Innse an Ear", "HEOG": "Tìde samhraidh na Graonlainn an Iar", "HEPM": "Tìde Samhraidh Saint Pierre agus Miquelon", "GFT": "Àm Guidheàna na Frainge", "WART": "Bun-àm na h-Argantaine Siaraich", "∅∅∅": "Tìde samhraidh Pearù", "UYT": "Bun-àm Uruguaidh", "WITA": "Àm Meadhan nan Innd-Innse", "AEST": "Bun-àm Astràilia an Ear", "HNPM": "Bun-àm Saint Pierre agus Miquelon", "HNEG": "Bun-àm na Graonlainn an Ear", "OESZ": "Tìde samhraidh na Roinn-Eòrpa an Ear", "BOT": "Àm Boilibhia", "HNNOMX": "Bun-àm Mheagsago an Iar-thuath", "HNT": "Bun-àm Talamh an Èisg", "PST": "Bun-àm a’ Chuain Sèimh", "HADT": "Tìde Samhraidh nan Eileanan Hawai’i ’s Aleutach", "ACWDT": "Tìde samhraidh Meadhan Astràilia an Iar", "MYT": "Àm Mhalaidhsea", "ARST": "Tìde samhraidh na h-Argantaine", "LHST": "Bun-àm Lord Howe", "MESZ": "Tìde samhraidh Meadhan na Roinn-Eòrpa", "TMST": "Tìde samhraidh Turcmanastàin", "HNPMX": "Bun-àm a’ Chuain Sèimh Mheagsago", "HENOMX": "Tìde samhraidh Mheagsago an Iar-thuath", "AWDT": "Tìde samhraidh Astràilia an Iar", "ChST": "Àm Chamorro", "COST": "Tìde samhraidh Coloimbia", "VET": "Àm na Bheiniseala", "NZDT": "Tìde samhraidh Shealainn Nuaidh", "CST": "Bun-àm Meadhan Aimeireaga a Tuath", "WIB": "Àm nan Innd-Innse an Iar", "WESZ": "Tìde samhraidh na Roinn-Eòrpa an Iar", "PDT": "Tìde samhraidh a’ Chuain Sèimh", "LHDT": "Tìde samhraidh Lord Howe", "NZST": "Bun-àm Shealainn Nuaidh", "CLT": "Bun-àm na Sile", "CLST": "Tìde samhraidh na Sile", "ACDT": "Tìde samhraidh Meadhan Astràilia", "AKDT": "Tìde samhraidh Alaska", "COT": "Bun-àm Coloimbia", "WARST": "Tìde samhraidh na h-Argantaine Siaraich", "GYT": "Àm Guidheàna", "HAST": "Bun-àm nan Eileanan Hawai’i ’s Aleutach", "ACST": "Bun-àm Meadhan Astràilia", "OEZ": "Bun-àm na Roinn-Eòrpa an Ear", "BT": "Àm Butàin", "ACWST": "Bun-àm Meadhan Astràilia an Iar", "JDT": "Tìde samhraidh na Seapaine", "WAST": "Tìde Samhraidh Afraga an Iar", "MDT": "Tìde samhraidh Macàthu", "AEDT": "Tìde samhraidh Astràilia an Ear", "IST": "Àm nan Innseachan", "CDT": "Tìde samhraidh Meadhan Aimeireaga a Tuath", "HKT": "Bun-àm Hong Kong", "EST": "Bun-àm Aimeireaga a Tuath an Ear", "AKST": "Bun-àm Alaska", "AST": "Bun-àm a’ Chuain Siar", "SRT": "Àm Suranaim", "AWST": "Bun-àm Astràilia an Iar", "MEZ": "Bun-àm Meadhan na Roinn-Eòrpa", "GMT": "Greenwich Mean Time", "HEPMX": "Tìde samhraidh a’ Chuain Sèimh Mheagsago", "ECT": "Àm Eacuadoir", "HECU": "Tìde samhraidh Cùba", "UYST": "Tìde samhraidh Uruguaidh", "HAT": "Tìde samhraidh Talamh an Èisg", "ART": "Bun-àm na h-Argantaine", "HKST": "Tìde samhraidh Hong Kong", "TMT": "Bun-àm Turcmanastàin", "WAT": "Bun-àm Afraga an Iar", "JST": "Bun-àm na Seapaine", "SGT": "Àm Singeapòr", "EDT": "Tìde samhraidh Aimeireaga a Tuath an Ear", "ADT": "Tìde samhraidh a’ Chuain Siar", "HNOG": "Bun-àm na Graonlainn an Iar", "CHAST": "Bun-àm Chatham", "CHADT": "Tìde samhraidh Chatham", "HEEG": "Tìde samhraidh na Graonlainn an Ear", "CAT": "Àm Meadhan Afraga", "WEZ": "Bun-àm na Roinn-Eòrpa an Iar", "SAST": "Àm Afraga a Deas", "EAT": "Àm Afraga an Ear", "HNCU": "Bun-àm Cùba"}, -+ locale: "gd_GB", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "CDT": "CDT", "MEZ": "MEZ", "SGT": "SGT", "GFT": "GFT", "WITA": "WITA", "NZDT": "NZDT", "ADT": "ADT", "WART": "WART", "HADT": "HADT", "HEEG": "HEEG", "BT": "BT", "AKST": "AKST", "OEZ": "OEZ", "HNT": "HNT", "HAT": "HAT", "WARST": "WARST", "SRT": "SRT", "WAT": "WAT", "EST": "EST", "HKT": "HKT", "TMT": "TMT", "AST": "AST", "GMT": "GMT", "ACDT": "ACDT", "JST": "JST", "MYT": "MYT", "ACWST": "ACWST", "WEZ": "WEZ", "OESZ": "OESZ", "ECT": "ECT", "HENOMX": "HENOMX", "HNPM": "HNPM", "HEPMX": "HEPMX", "CAT": "CAT", "CLT": "CLT", "MDT": "MDT", "NZST": "NZST", "BOT": "BOT", "UYT": "UYT", "COT": "COT", "HNOG": "HNOG", "EDT": "EDT", "WIB": "WIB", "MESZ": "MESZ", "ACWDT": "ACWDT", "HECU": "HECU", "AKDT": "AKDT", "MST": "MST", "AEST": "AEST", "UYST": "UYST", "TMST": "TMST", "EAT": "EAT", "HNNOMX": "HNNOMX", "IST": "IST", "HEOG": "HEOG", "ART": "ART", "ARST": "ARST", "LHST": "LHST", "HNCU": "HNCU", "ChST": "ChST", "JDT": "JDT", "AWST": "AWST", "HEPM": "HEPM", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "ACST": "ACST", "LHDT": "LHDT", "PST": "PST", "VET": "VET", "WAST": "WAST", "WIT": "WIT", "CST": "CST", "AEDT": "AEDT", "CHADT": "CHADT", "HNPMX": "HNPMX", "COST": "COST", "AWDT": "AWDT", "WESZ": "WESZ", "SAST": "SAST", "CLST": "CLST", "HAST": "HAST", "PDT": "PDT", "GYT": "GYT", "HKST": "HKST"}, - } - } -  -@@ -128,7 +105,7 @@ func (gd *gd_GB) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gd *gd_GB) MonthsAbbreviated() []string { -- return gd.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +115,7 @@ func (gd *gd_GB) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (gd *gd_GB) MonthsNarrow() []string { -- return gd.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +125,7 @@ func (gd *gd_GB) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gd *gd_GB) MonthsWide() []string { -- return gd.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,73 +171,13 @@ func (gd *gd_GB) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'gd_GB' and handles both Whole and Real numbers based on 'v' - func (gd *gd_GB) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gd.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gd.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gd.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'gd_GB' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (gd *gd_GB) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gd.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gd.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, gd.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gd_GB' -@@ -268,56 +185,7 @@ func (gd *gd_GB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gd.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gd.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gd.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, gd.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gd.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gd_GB' -@@ -326,68 +194,7 @@ func (gd *gd_GB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gd.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gd.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gd.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, gd.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gd.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, gd.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gd_GB' -@@ -395,27 +202,6 @@ func (gd *gd_GB) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -424,17 +210,6 @@ func (gd *gd_GB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, gd.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,18 +218,6 @@ func (gd *gd_GB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x6d, 0x68}...) -- b = append(b, []byte{0x20}...) -- b = append(b, gd.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,20 +226,6 @@ func (gd *gd_GB) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gd.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x6d, 0x68}...) -- b = append(b, []byte{0x20}...) -- b = append(b, gd.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,19 +234,6 @@ func (gd *gd_GB) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -506,26 +242,6 @@ func (gd *gd_GB) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -534,30 +250,6 @@ func (gd *gd_GB) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -566,34 +258,5 @@ func (gd *gd_GB) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gd.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gd.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gl/gl.go b/gl/gl.go -index 54dbf53..4067de9 100644 ---- a/gl/gl.go -+++ b/gl/gl.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"a.C.", "d.C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"antes de Cristo", "despois de Cristo"}, -- timezones: map[string]string{"CAT": "Horario de África Central", "WAST": "Horario de verán de África Occidental", "WIB": "Horario de Indonesia Occidental", "PST": "Horario estándar do Pacífico, Norteamérica", "ACWDT": "Horario de verán de Australia Occidental Central", "AEDT": "Horario de verán de Australia Oriental", "AWST": "Horario estándar de Australia Occidental", "CLT": "Horario estándar de Chile", "HNNOMX": "Horario estándar de México Noroeste", "UYST": "Horario de verán de Uruguai", "AWDT": "Horario de verán de Australia Occidental", "HNPM": "Horario estándar de Saint Pierre e Miquelon", "HEPM": "Horario de verán de Saint Pierre e Miquelon", "NZST": "Horario estándar de Nova Zelandia", "SAST": "Horario estándar de África do Sur", "CLST": "Horario de verán de Chile", "OESZ": "Horario de verán de Europa Oriental", "HENOMX": "Horario de verán de México Noroeste", "GMT": "Horario do meridiano de Greenwich", "GYT": "Horario da Güiana", "HADT": "Horario de verán de Hawai-Aleutiano", "COT": "Horario estándar de Colombia", "HAST": "Horario estándar de Hawai-Aleutiano", "CHAST": "Horario estándar de Chatham", "IST": "Horario estándar da India", "BOT": "Horario de Bolivia", "OEZ": "Horario estándar de Europa Oriental", "ADT": "Horario de verán do Atlántico", "BT": "Horario de Bután", "HNT": "Horario estándar de Terranova", "WIT": "Horario de Indonesia Oriental", "ACWST": "Horario estándar de Australia Occidental Central", "AEST": "Horario estándar de Australia Oriental", "MEZ": "Horario estándar de Europa Central", "LHST": "Horario estándar de Lord Howe", "ACST": "Horario estándar de Australia Central", "HECU": "Horario de verán de Cuba", "EAT": "Horario de África Oriental", "EST": "Horario estándar do leste, Norteamérica", "MYT": "Horario de Malaisia", "CST": "Horario estándar central, Norteamérica", "HNOG": "Horario estándar de Groenlandia Occidental", "MESZ": "Horario de verán de Europa Central", "∅∅∅": "Horario de verán do Amazonas", "TMST": "Horario de verán de Turcomenistán", "VET": "Horario de Venezuela", "CHADT": "Horario de verán de Chatham", "CDT": "Horario de verán central, Norteamérica", "JDT": "Horario de verán do Xapón", "WAT": "Horario estándar de África Occidental", "SGT": "Horario estándar de Singapur", "HNCU": "Horario estándar de Cuba", "HNPMX": "Horario estándar do Pacífico mexicano", "AST": "Horario estándar do Atlántico", "WESZ": "Horario de verán de Europa Occidental", "HKT": "Horario estándar de Hong Kong", "WITA": "Horario de Indonesia Central", "GFT": "Horario da Güiana Francesa", "ECT": "Horario de Ecuador", "WARST": "Horario de verán de Arxentina Occidental", "MST": "MST", "NZDT": "Horario de verán de Nova Zelandia", "HEEG": "Horario de verán de Groenlandia Oriental", "ACDT": "Horario de verán de Australia Central", "ART": "Horario estándar de Arxentina", "HEOG": "Horario de verán de Groenlandia Occidental", "PDT": "Horario de verán do Pacífico, Norteamérica", "JST": "Horario estándar do Xapón", "HNEG": "Horario estándar de Groenlandia Oriental", "UYT": "Horario estándar de Uruguai", "AKST": "Horario estándar de Alasca", "ARST": "Horario de verán de Arxentina", "WEZ": "Horario estándar de Europa Occidental", "TMT": "Horario estándar de Turcomenistán", "COST": "Horario de verán de Colombia", "MDT": "MDT", "HEPMX": "Horario de verán do Pacífico mexicano", "AKDT": "Horario de verán de Alasca", "SRT": "Horario de Suriname", "HKST": "Horario de verán de Hong Kong", "LHDT": "Horario de verán de Lord Howe", "ChST": "Horario estándar chamorro", "WART": "Horario estándar de Arxentina Occidental", "EDT": "Horario de verán do leste, Norteamérica", "HAT": "Horario de verán de Terranova"}, -+ timezones: map[string]string{"LHDT": "Horario de verán de Lord Howe", "HEPM": "Horario de verán de Saint Pierre e Miquelon", "JDT": "Horario de verán do Xapón", "BT": "Horario de Bután", "NZST": "Horario estándar de Nova Zelandia", "BOT": "Horario de Bolivia", "HAST": "Horario estándar de Hawai-Aleutiano", "HEEG": "Horario de verán de Groenlandia Oriental", "HECU": "Horario de verán de Cuba", "WAST": "Horario de verán de África Occidental", "CDT": "Horario de verán central, Norteamérica", "AEDT": "Horario de verán de Australia Oriental", "HNCU": "Horario estándar de Cuba", "WAT": "Horario estándar de África Occidental", "WESZ": "Horario de verán de Europa Occidental", "OESZ": "Horario de verán de Europa Oriental", "HEOG": "Horario de verán de Groenlandia Occidental", "HKST": "Horario de verán de Hong Kong", "ACDT": "Horario de verán de Australia Central", "AWDT": "Horario de verán de Australia Occidental", "LHST": "Horario estándar de Lord Howe", "SAST": "Horario estándar de África do Sur", "COST": "Horario de verán de Colombia", "EST": "Horario estándar do leste, Norteamérica", "HKT": "Horario estándar de Hong Kong", "MDT": "MDT", "ACST": "Horario estándar de Australia Central", "MYT": "Horario de Malaisia", "ACWST": "Horario estándar de Australia Occidental Central", "WARST": "Horario de verán de Arxentina Occidental", "GYT": "Horario da Güiana", "TMST": "Horario de verán de Turcomenistán", "WITA": "Horario de Indonesia Central", "CST": "Horario estándar central, Norteamérica", "NZDT": "Horario de verán de Nova Zelandia", "HNPMX": "Horario estándar do Pacífico mexicano", "AKST": "Horario estándar de Alasca", "GMT": "Horario do meridiano de Greenwich", "HNEG": "Horario estándar de Groenlandia Oriental", "UYT": "Horario estándar de Uruguai", "IST": "Horario estándar da India", "ART": "Horario estándar de Arxentina", "EAT": "Horario de África Oriental", "HENOMX": "Horario de verán de México Noroeste", "COT": "Horario estándar de Colombia", "HNPM": "Horario estándar de Saint Pierre e Miquelon", "PST": "Horario estándar do Pacífico, Norteamérica", "ACWDT": "Horario de verán de Australia Occidental Central", "OEZ": "Horario estándar de Europa Oriental", "CAT": "Horario de África Central", "MST": "MST", "ADT": "Horario de verán do Atlántico", "ARST": "Horario de verán de Arxentina", "HNT": "Horario estándar de Terranova", "CLST": "Horario de verán de Chile", "∅∅∅": "Horario de verán das Azores", "PDT": "Horario de verán do Pacífico, Norteamérica", "HEPMX": "Horario de verán do Pacífico mexicano", "CLT": "Horario estándar de Chile", "WIB": "Horario de Indonesia Occidental", "SRT": "Horario de Suriname", "AWST": "Horario estándar de Australia Occidental", "ECT": "Horario de Ecuador", "CHAST": "Horario estándar de Chatham", "WEZ": "Horario estándar de Europa Occidental", "VET": "Horario de Venezuela", "HAT": "Horario de verán de Terranova", "WART": "Horario estándar de Arxentina Occidental", "HNOG": "Horario estándar de Groenlandia Occidental", "AST": "Horario estándar do Atlántico", "JST": "Horario estándar do Xapón", "UYST": "Horario de verán de Uruguai", "AEST": "Horario estándar de Australia Oriental", "HNNOMX": "Horario estándar de México Noroeste", "CHADT": "Horario de verán de Chatham", "WIT": "Horario de Indonesia Oriental", "GFT": "Horario da Güiana Francesa", "EDT": "Horario de verán do leste, Norteamérica", "MEZ": "Horario estándar de Europa Central", "SGT": "Horario estándar de Singapur", "AKDT": "Horario de verán de Alasca", "TMT": "Horario estándar de Turcomenistán", "ChST": "Horario estándar chamorro", "HADT": "Horario de verán de Hawai-Aleutiano", "MESZ": "Horario de verán de Europa Central"}, - } - } -  -diff --git a/gl_ES/gl_ES.go b/gl_ES/gl_ES.go -index 7d3c49b..53c114e 100644 ---- a/gl_ES/gl_ES.go -+++ b/gl_ES/gl_ES.go -@@ -10,70 +10,45 @@ import ( - ) -  - type gl_ES struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'gl_ES' locale - func New() locales.Translator { - return &gl_ES{ -- locale: "gl_ES", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "xan.", "feb.", "mar.", "abr.", "maio", "xuño", "xul.", "ago.", "set.", "out.", "nov.", "dec."}, -- monthsNarrow: []string{"", "x.", "f.", "m.", "a.", "m.", "x.", "x.", "a.", "s.", "o.", "n.", "d."}, -- monthsWide: []string{"", "xaneiro", "febreiro", "marzo", "abril", "maio", "xuño", "xullo", "agosto", "setembro", "outubro", "novembro", "decembro"}, -- daysAbbreviated: []string{"dom.", "luns", "mar.", "mér.", "xov.", "ven.", "sáb."}, -- daysNarrow: []string{"d.", "l.", "m.", "m.", "x.", "v.", "s."}, -- daysShort: []string{"dom.", "luns", "mar.", "mér.", "xov.", "ven.", "sáb."}, -- daysWide: []string{"domingo", "luns", "martes", "mércores", "xoves", "venres", "sábado"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "despois de Cristo"}, -- timezones: map[string]string{"TMT": "Horario estándar de Turcomenistán", "ACST": "Horario estándar de Australia Central", "AEST": "Horario estándar de Australia Oriental", "MST": "MST", "VET": "Horario de Venezuela", "ARST": "Horario de verán de Arxentina", "HNCU": "Horario estándar de Cuba", "BT": "Horario de Bután", "PST": "Horario estándar do Pacífico, Norteamérica", "ACWDT": "Horario de verán de Australia Occidental Central", "HNT": "Horario estándar de Terranova", "ChST": "Horario estándar chamorro", "WART": "Horario estándar de Arxentina Occidental", "ART": "Horario estándar de Arxentina", "HEOG": "Horario de verán de Groenlandia Occidental", "AWST": "Horario estándar de Australia Occidental", "HADT": "Horario de verán de Hawai-Aleutiano", "SRT": "Horario de Suriname", "AEDT": "Horario de verán de Australia Oriental", "HKT": "Horario estándar de Hong Kong", "LHST": "Horario estándar de Lord Howe", "BOT": "Horario de Bolivia", "HEEG": "Horario de verán de Groenlandia Oriental", "TMST": "Horario de verán de Turcomenistán", "UYT": "Horario estándar de Uruguai", "EDT": "Horario de verán do leste, Norteamérica", "AST": "Horario estándar do Atlántico", "WESZ": "Horario de verán de Europa Occidental", "CHADT": "Horario de verán de Chatham", "WARST": "Horario de verán de Arxentina Occidental", "GMT": "Horario do meridiano de Greenwich", "HECU": "Horario de verán de Cuba", "∅∅∅": "Horario de verán das Azores", "HNPMX": "Horario estándar do Pacífico mexicano", "ADT": "Horario de verán do Atlántico", "HKST": "Horario de verán de Hong Kong", "JST": "Horario estándar do Xapón", "HENOMX": "Horario de verán de México Noroeste", "WAT": "Horario estándar de África Occidental", "HEPM": "Horario de verán de Saint Pierre e Miquelon", "CDT": "Horario de verán central, Norteamérica", "MDT": "MDT", "UYST": "Horario de verán de Uruguai", "HAST": "Horario estándar de Hawai-Aleutiano", "WIT": "Horario de Indonesia Oriental", "PDT": "Horario de verán do Pacífico, Norteamérica", "MESZ": "Horario de verán de Europa Central", "NZST": "Horario estándar de Nova Zelandia", "SGT": "Horario estándar de Singapur", "CHAST": "Horario estándar de Chatham", "OESZ": "Horario de verán de Europa Oriental", "NZDT": "Horario de verán de Nova Zelandia", "WIB": "Horario de Indonesia Occidental", "HEPMX": "Horario de verán do Pacífico mexicano", "MYT": "Horario de Malaisia", "GFT": "Horario da Güiana Francesa", "EAT": "Horario de África Oriental", "AKST": "Horario estándar de Alasca", "IST": "Horario estándar da India", "HNEG": "Horario estándar de Groenlandia Oriental", "CAT": "Horario de África Central", "HNNOMX": "Horario estándar de México Noroeste", "GYT": "Horario da Güiana", "WEZ": "Horario estándar de Europa Occidental", "HAT": "Horario de verán de Terranova", "AWDT": "Horario de verán de Australia Occidental", "SAST": "Horario estándar de África do Sur", "CST": "Horario estándar central, Norteamérica", "ACWST": "Horario estándar de Australia Occidental Central", "LHDT": "Horario de verán de Lord Howe", "CLST": "Horario de verán de Chile", "ACDT": "Horario de verán de Australia Central", "COST": "Horario de verán de Colombia", "HNOG": "Horario estándar de Groenlandia Occidental", "HNPM": "Horario estándar de Saint Pierre e Miquelon", "MEZ": "Horario estándar de Europa Central", "CLT": "Horario estándar de Chile", "WAST": "Horario de verán de África Occidental", "OEZ": "Horario estándar de Europa Oriental", "COT": "Horario estándar de Colombia", "AKDT": "Horario de verán de Alasca", "WITA": "Horario de Indonesia Central", "JDT": "Horario de verán do Xapón", "ECT": "Horario de Ecuador", "EST": "Horario estándar do leste, Norteamérica"}, -+ locale: "gl_ES", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "WITA": "WITA", "ECT": "ECT", "HAST": "HAST", "AEDT": "AEDT", "CHADT": "CHADT", "SGT": "SGT", "WAT": "WAT", "EDT": "EDT", "JDT": "JDT", "ACWST": "ACWST", "ChST": "ChST", "WEZ": "WEZ", "AKST": "AKST", "OESZ": "OESZ", "NZDT": "NZDT", "EAT": "EAT", "ACDT": "ACDT", "BT": "BT", "SAST": "SAST", "ACST": "ACST", "AWDT": "AWDT", "HEPMX": "HEPMX", "WESZ": "WESZ", "HNOG": "HNOG", "WIB": "WIB", "GMT": "GMT", "BOT": "BOT", "MYT": "MYT", "AEST": "AEST", "CLST": "CLST", "CST": "CST", "JST": "JST", "HEPM": "HEPM", "HECU": "HECU", "AST": "AST", "SRT": "SRT", "PDT": "PDT", "HAT": "HAT", "WARST": "WARST", "CDT": "CDT", "HADT": "HADT", "WART": "WART", "COT": "COT", "HEOG": "HEOG", "TMT": "TMT", "MDT": "MDT", "UYST": "UYST", "CAT": "CAT", "HEEG": "HEEG", "CHAST": "CHAST", "UYT": "UYT", "HNT": "HNT", "∅∅∅": "∅∅∅", "NZST": "NZST", "AWST": "AWST", "HNPM": "HNPM", "HNCU": "HNCU", "GYT": "GYT", "ART": "ART", "HNNOMX": "HNNOMX", "WAST": "WAST", "AKDT": "AKDT", "VET": "VET", "WIT": "WIT", "COST": "COST", "HKST": "HKST", "TMST": "TMST", "MEZ": "MEZ", "LHST": "LHST", "HNPMX": "HNPMX", "EST": "EST", "ADT": "ADT", "ARST": "ARST", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "OEZ": "OEZ", "PST": "PST", "HKT": "HKT", "CLT": "CLT", "MST": "MST", "MESZ": "MESZ", "HNEG": "HNEG", "LHDT": "LHDT", "IST": "IST"}, - } - } -  -@@ -138,7 +113,7 @@ func (gl *gl_ES) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gl *gl_ES) MonthsAbbreviated() []string { -- return gl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (gl *gl_ES) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (gl *gl_ES) MonthsNarrow() []string { -- return gl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (gl *gl_ES) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gl *gl_ES) MonthsWide() []string { -- return gl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (gl *gl_ES) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'gl_ES' and handles both Whole and Real numbers based on 'v' - func (gl *gl_ES) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'gl_ES' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (gl *gl_ES) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, gl.percentSuffix...) -- -- b = append(b, gl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gl_ES' -@@ -280,56 +193,7 @@ func (gl *gl_ES) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, gl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gl_ES' -@@ -338,63 +202,7 @@ func (gl *gl_ES) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, gl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, gl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, gl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gl_ES' -@@ -402,27 +210,6 @@ func (gl *gl_ES) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,19 +218,6 @@ func (gl *gl_ES) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, gl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,19 +226,6 @@ func (gl *gl_ES) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, gl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,21 +234,6 @@ func (gl *gl_ES) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, gl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -496,19 +242,6 @@ func (gl *gl_ES) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -517,26 +250,6 @@ func (gl *gl_ES) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -545,30 +258,6 @@ func (gl *gl_ES) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -577,34 +266,5 @@ func (gl *gl_ES) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gsw/gsw.go b/gsw/gsw.go -index 17ecf4f..9b00a82 100644 ---- a/gsw/gsw.go -+++ b/gsw/gsw.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v. Chr.", "n. Chr."}, - erasNarrow: []string{"v. Chr.", "n. Chr."}, - erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"HNOG": "HNOG", "HNPM": "HNPM", "COT": "COT", "EDT": "EDT", "HNT": "HNT", "ARST": "ARST", "LHST": "LHST", "ACST": "ACST", "EAT": "Oschtafrikanischi Ziit", "WAST": "Weschtafrikanischi Summerziit", "UYST": "UYST", "ACWDT": "ACWDT", "HAST": "HAST", "MESZ": "Mitteleuropäischi Summerziit", "∅∅∅": "Amazonas-Summerziit", "CST": "Amerika-Zentraal Schtandardziit", "MDT": "MDT", "HEEG": "HEEG", "OESZ": "Oschteuropäischi Summerziit", "WART": "WART", "HEPMX": "HEPMX", "WESZ": "Weschteuropäischi Summerziit", "HKT": "HKT", "CAT": "Zentralafrikanischi Ziit", "GYT": "GYT", "WIT": "WIT", "PDT": "PDT", "AEST": "AEST", "CHADT": "CHADT", "WAT": "Weschtafrikanischi Schtandardziit", "AKST": "Alaska-Schtandardziit", "AKDT": "Alaska-Summerziit", "SRT": "SRT", "HENOMX": "HENOMX", "MYT": "MYT", "ACWST": "ACWST", "ADT": "ADT", "EST": "EST", "BT": "BT", "PST": "PST", "AWDT": "AWDT", "HKST": "HKST", "IST": "IST", "JST": "JST", "UYT": "UYT", "HADT": "HADT", "AWST": "AWST", "HEPM": "HEPM", "MEZ": "Mitteleuropäischi Schtandardziit", "LHDT": "LHDT", "SAST": "Süüdafrikanischi ziit", "GFT": "GFT", "TMT": "TMT", "AEDT": "AEDT", "GMT": "GMT", "HNPMX": "HNPMX", "CHAST": "CHAST", "CLST": "CLST", "ChST": "ChST", "WIB": "WIB", "WEZ": "Weschteuropäischi Schtandardziit", "ECT": "ECT", "COST": "COST", "HNCU": "HNCU", "MST": "MST", "HNNOMX": "HNNOMX", "HAT": "HAT", "HEOG": "HEOG", "WITA": "WITA", "NZDT": "NZDT", "HNEG": "HNEG", "TMST": "TMST", "OEZ": "Oschteuropäischi Schtandardziit", "WARST": "WARST", "VET": "VET", "AST": "AST", "SGT": "SGT", "NZST": "NZST", "CLT": "CLT", "JDT": "JDT", "BOT": "BOT", "ACDT": "ACDT", "HECU": "HECU", "CDT": "Amerika-Zentraal Summerziit", "ART": "ART"}, -+ timezones: map[string]string{"WEZ": "Weschteuropäischi Schtandardziit", "AKST": "Alaska-Schtandardziit", "HKT": "HKT", "ART": "ART", "HNNOMX": "HNNOMX", "HEEG": "HEEG", "BT": "BT", "SGT": "SGT", "WAST": "Weschtafrikanischi Summerziit", "GFT": "GFT", "WART": "WART", "CLST": "CLST", "LHDT": "LHDT", "GYT": "GYT", "EST": "EST", "WIB": "WIB", "HADT": "HADT", "∅∅∅": "∅∅∅", "HEPM": "HEPM", "IST": "IST", "ACWDT": "ACWDT", "PDT": "PDT", "ACWST": "ACWST", "HNCU": "HNCU", "HEPMX": "HEPMX", "HEOG": "HEOG", "EDT": "EDT", "EAT": "Oschtafrikanischi Ziit", "JST": "JST", "CST": "Amerika-Zentraal Schtandardziit", "ADT": "ADT", "ChST": "ChST", "HNPM": "HNPM", "MST": "MST", "BOT": "BOT", "LHST": "LHST", "AEST": "AEST", "SAST": "Süüdafrikanischi ziit", "COT": "COT", "HKST": "HKST", "CDT": "Amerika-Zentraal Summerziit", "AEDT": "AEDT", "WESZ": "Weschteuropäischi Summerziit", "NZDT": "NZDT", "VET": "VET", "HNPMX": "HNPMX", "AWST": "AWST", "AWDT": "AWDT", "WITA": "WITA", "NZST": "NZST", "GMT": "GMT", "MYT": "MYT", "MESZ": "Mitteleuropäischi Summerziit", "UYST": "UYST", "HAT": "HAT", "WIT": "WIT", "CLT": "CLT", "ARST": "ARST", "OEZ": "Oschteuropäischi Schtandardziit", "WARST": "WARST", "HNEG": "HNEG", "HAST": "HAST", "CHAST": "CHAST", "OESZ": "Oschteuropäischi Summerziit", "HNOG": "HNOG", "TMST": "TMST", "AST": "AST", "HENOMX": "HENOMX", "JDT": "JDT", "UYT": "UYT", "HECU": "HECU", "CAT": "Zentralafrikanischi Ziit", "MEZ": "Mitteleuropäischi Schtandardziit", "ACST": "ACST", "ACDT": "ACDT", "CHADT": "CHADT", "WAT": "Weschtafrikanischi Schtandardziit", "MDT": "MDT", "ECT": "ECT", "SRT": "SRT", "PST": "PST", "AKDT": "Alaska-Summerziit", "HNT": "HNT", "COST": "COST", "TMT": "TMT"}, - } - } -  -diff --git a/gsw_CH/gsw_CH.go b/gsw_CH/gsw_CH.go -index 17fc5dc..87b764c 100644 ---- a/gsw_CH/gsw_CH.go -+++ b/gsw_CH/gsw_CH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type gsw_CH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'gsw_CH' locale - func New() locales.Translator { - return &gsw_CH{ -- locale: "gsw_CH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: "’", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "Auguscht", "Septämber", "Oktoober", "Novämber", "Dezämber"}, -- daysAbbreviated: []string{"Su.", "Mä.", "Zi.", "Mi.", "Du.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysWide: []string{"Sunntig", "Määntig", "Ziischtig", "Mittwuch", "Dunschtig", "Friitig", "Samschtig"}, -- periodsAbbreviated: []string{"v.m.", "n.m."}, -- periodsWide: []string{"vorm.", "nam."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"WAST": "Weschtafrikanischi Summerziit", "OESZ": "Oschteuropäischi Summerziit", "WARST": "WARST", "GMT": "GMT", "UYST": "UYST", "HNOG": "HNOG", "HADT": "HADT", "HENOMX": "HENOMX", "EST": "EST", "CST": "Amerika-Zentraal Schtandardziit", "WIB": "WIB", "LHDT": "LHDT", "TMT": "TMT", "CAT": "Zentralafrikanischi Ziit", "AKDT": "Alaska-Summerziit", "SRT": "SRT", "HNPM": "HNPM", "AWST": "AWST", "HNEG": "HNEG", "GFT": "GFT", "COST": "COST", "HECU": "HECU", "MST": "MST", "HNT": "HNT", "ADT": "ADT", "IST": "IST", "JDT": "JDT", "ACDT": "ACDT", "COT": "COT", "ART": "ART", "MEZ": "Mitteleuropäischi Schtandardziit", "CHAST": "CHAST", "ChST": "ChST", "BOT": "BOT", "VET": "VET", "PDT": "PDT", "ACWDT": "ACWDT", "SGT": "SGT", "AEST": "AEST", "CHADT": "CHADT", "ARST": "ARST", "AWDT": "AWDT", "HKST": "HKST", "NZST": "NZST", "TMST": "TMST", "HEPMX": "HEPMX", "MYT": "MYT", "CDT": "Amerika-Zentraal Summerziit", "OEZ": "Oschteuropäischi Schtandardziit", "GYT": "GYT", "WESZ": "Weschteuropäischi Summerziit", "HEEG": "HEEG", "WEZ": "Weschteuropäischi Schtandardziit", "HAT": "HAT", "AEDT": "AEDT", "EDT": "EDT", "MDT": "MDT", "HAST": "HAST", "WAT": "Weschtafrikanischi Schtandardziit", "HNCU": "HNCU", "HEOG": "HEOG", "HEPM": "HEPM", "WART": "WART", "MESZ": "Mitteleuropäischi Summerziit", "LHST": "LHST", "CLST": "CLST", "WIT": "WIT", "HKT": "HKT", "SAST": "Süüdafrikanischi ziit", "JST": "JST", "ECT": "ECT", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "UYT": "UYT", "HNNOMX": "HNNOMX", "EAT": "Oschtafrikanischi Ziit", "PST": "PST", "WITA": "WITA", "NZDT": "NZDT", "ACWST": "ACWST", "CLT": "CLT", "ACST": "ACST", "AKST": "Alaska-Schtandardziit", "AST": "AST", "BT": "BT"}, -+ locale: "gsw_CH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MST": "MST", "ART": "ART", "CLT": "CLT", "ARST": "ARST", "HNPM": "HNPM", "AWDT": "AWDT", "HNEG": "HNEG", "HEPM": "HEPM", "AKST": "AKST", "EST": "EST", "CHADT": "CHADT", "UYST": "UYST", "WART": "WART", "ACWDT": "ACWDT", "AEST": "AEST", "∅∅∅": "∅∅∅", "WAST": "WAST", "SRT": "SRT", "HNNOMX": "HNNOMX", "AWST": "AWST", "VET": "VET", "OESZ": "OESZ", "GFT": "GFT", "ECT": "ECT", "HAST": "HAST", "PDT": "PDT", "WEZ": "WEZ", "EDT": "EDT", "MESZ": "MESZ", "LHDT": "LHDT", "AEDT": "AEDT", "HEEG": "HEEG", "HNPMX": "HNPMX", "MDT": "MDT", "GMT": "GMT", "BOT": "BOT", "HADT": "HADT", "WIT": "WIT", "UYT": "UYT", "HNCU": "HNCU", "WESZ": "WESZ", "WITA": "WITA", "NZST": "NZST", "JST": "JST", "ACWST": "ACWST", "HNT": "HNT", "WARST": "WARST", "HNOG": "HNOG", "HKT": "HKT", "CAT": "CAT", "ChST": "ChST", "SGT": "SGT", "OEZ": "OEZ", "CLST": "CLST", "IST": "IST", "ADT": "ADT", "MEZ": "MEZ", "CHAST": "CHAST", "HENOMX": "HENOMX", "ACST": "ACST", "PST": "PST", "HECU": "HECU", "WAT": "WAT", "WIB": "WIB", "CST": "CST", "AST": "AST", "AKDT": "AKDT", "HEOG": "HEOG", "TMT": "TMT", "HEPMX": "HEPMX", "NZDT": "NZDT", "ACDT": "ACDT", "BT": "BT", "GYT": "GYT", "HKST": "HKST", "CDT": "CDT", "MYT": "MYT", "COST": "COST", "HAT": "HAT", "COT": "COT", "SAST": "SAST", "TMST": "TMST", "EAT": "EAT", "JDT": "JDT", "LHST": "LHST"}, - } - } -  -@@ -124,7 +101,7 @@ func (gsw *gsw_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gsw *gsw_CH) MonthsAbbreviated() []string { -- return gsw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (gsw *gsw_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (gsw *gsw_CH) MonthsNarrow() []string { -- return gsw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (gsw *gsw_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gsw *gsw_CH) MonthsWide() []string { -- return gsw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,81 +167,13 @@ func (gsw *gsw_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'gsw_CH' and handles both Whole and Real numbers based on 'v' - func (gsw *gsw_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'gsw_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (gsw *gsw_CH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, gsw.percentSuffix...) -- -- b = append(b, gsw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gsw_CH' -@@ -272,60 +181,7 @@ func (gsw *gsw_CH) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gsw.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gsw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, gsw.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gsw_CH' -@@ -334,67 +190,7 @@ func (gsw *gsw_CH) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gsw.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gsw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, gsw.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, gsw.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gsw_CH' -@@ -402,27 +198,6 @@ func (gsw *gsw_CH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +206,6 @@ func (gsw *gsw_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +214,6 @@ func (gsw *gsw_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, gsw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +222,6 @@ func (gsw *gsw_CH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gsw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, gsw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +230,6 @@ func (gsw *gsw_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +238,6 @@ func (gsw *gsw_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +246,6 @@ func (gsw *gsw_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +254,5 @@ func (gsw *gsw_CH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gsw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gsw_FR/gsw_FR.go b/gsw_FR/gsw_FR.go -index 16f4440..ce1fbcf 100644 ---- a/gsw_FR/gsw_FR.go -+++ b/gsw_FR/gsw_FR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type gsw_FR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'gsw_FR' locale - func New() locales.Translator { - return &gsw_FR{ -- locale: "gsw_FR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: "’", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "Auguscht", "Septämber", "Oktoober", "Novämber", "Dezämber"}, -- daysAbbreviated: []string{"Su.", "Mä.", "Zi.", "Mi.", "Du.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysWide: []string{"Sunntig", "Määntig", "Ziischtig", "Mittwuch", "Dunschtig", "Friitig", "Samschtig"}, -- periodsAbbreviated: []string{"v.m.", "n.m."}, -- periodsWide: []string{"vorm.", "nam."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"PST": "PST", "ACWST": "ACWST", "AEDT": "AEDT", "TMST": "TMST", "AKDT": "Alaska-Summerziit", "VET": "VET", "NZDT": "NZDT", "ACST": "ACST", "HEPMX": "HEPMX", "ADT": "ADT", "UYT": "UYT", "AWST": "AWST", "OEZ": "Oschteuropäischi Schtandardziit", "HNPMX": "HNPMX", "AST": "AST", "LHDT": "LHDT", "JST": "JST", "COT": "COT", "MST": "MST", "UYST": "UYST", "BT": "BT", "CAT": "Zentralafrikanischi Ziit", "COST": "COST", "HKT": "HKT", "MESZ": "Mitteleuropäischi Summerziit", "LHST": "LHST", "WIT": "WIT", "ARST": "ARST", "JDT": "JDT", "ACDT": "ACDT", "HAST": "HAST", "AEST": "AEST", "NZST": "NZST", "BOT": "BOT", "HEEG": "HEEG", "WAT": "Weschtafrikanischi Schtandardziit", "WIB": "WIB", "GYT": "GYT", "PDT": "PDT", "ACWDT": "ACWDT", "MEZ": "Mitteleuropäischi Schtandardziit", "CLT": "CLT", "EAT": "Oschtafrikanischi Ziit", "SGT": "SGT", "CST": "Amerika-Zentraal Schtandardziit", "HNOG": "HNOG", "WEZ": "Weschteuropäischi Schtandardziit", "HEPM": "HEPM", "∅∅∅": "Amazonas-Summerziit", "WAST": "Weschtafrikanischi Summerziit", "WARST": "WARST", "MYT": "MYT", "SRT": "SRT", "HAT": "HAT", "GFT": "GFT", "ChST": "ChST", "HENOMX": "HENOMX", "HNCU": "HNCU", "HECU": "HECU", "WESZ": "Weschteuropäischi Summerziit", "CHAST": "CHAST", "IST": "IST", "TMT": "TMT", "OESZ": "Oschteuropäischi Summerziit", "HADT": "HADT", "WITA": "WITA", "WART": "WART", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "ECT": "ECT", "EST": "EST", "EDT": "EDT", "CDT": "Amerika-Zentraal Summerziit", "AKST": "Alaska-Schtandardziit", "HEOG": "HEOG", "HKST": "HKST", "MDT": "MDT", "GMT": "GMT", "HNT": "HNT", "ART": "ART", "HNPM": "HNPM", "CHADT": "CHADT", "SAST": "Süüdafrikanischi ziit", "CLST": "CLST", "HNEG": "HNEG"}, -+ locale: "gsw_FR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COST": "COST", "HNOG": "HNOG", "HKT": "HKT", "SGT": "SGT", "OEZ": "OEZ", "WART": "WART", "CDT": "CDT", "AST": "AST", "GMT": "GMT", "HEEG": "HEEG", "HEPM": "HEPM", "EDT": "EDT", "PST": "PST", "AKDT": "AKDT", "WITA": "WITA", "HADT": "HADT", "ACST": "ACST", "HNNOMX": "HNNOMX", "HEOG": "HEOG", "ARST": "ARST", "HNEG": "HNEG", "BOT": "BOT", "JDT": "JDT", "UYST": "UYST", "HKST": "HKST", "WIB": "WIB", "ECT": "ECT", "OESZ": "OESZ", "WIT": "WIT", "∅∅∅": "∅∅∅", "TMT": "TMT", "MESZ": "MESZ", "ACDT": "ACDT", "EST": "EST", "CST": "CST", "CHADT": "CHADT", "HEPMX": "HEPMX", "HNT": "HNT", "TMST": "TMST", "NZST": "NZST", "ART": "ART", "JST": "JST", "LHST": "LHST", "CHAST": "CHAST", "VET": "VET", "MST": "MST", "ADT": "ADT", "AEDT": "AEDT", "ACWST": "ACWST", "WESZ": "WESZ", "HNCU": "HNCU", "CLST": "CLST", "MEZ": "MEZ", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HAT": "HAT", "CAT": "CAT", "NZDT": "NZDT", "HAST": "HAST", "AWDT": "AWDT", "HNPM": "HNPM", "AEST": "AEST", "UYT": "UYT", "WAST": "WAST", "SAST": "SAST", "GYT": "GYT", "COT": "COT", "MDT": "MDT", "ChST": "ChST", "SRT": "SRT", "EAT": "EAT", "LHDT": "LHDT", "HECU": "HECU", "WAT": "WAT", "AKST": "AKST", "GFT": "GFT", "CLT": "CLT", "AWST": "AWST", "IST": "IST", "PDT": "PDT", "HNPMX": "HNPMX", "WARST": "WARST", "MYT": "MYT", "BT": "BT", "WEZ": "WEZ"}, - } - } -  -@@ -124,7 +101,7 @@ func (gsw *gsw_FR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gsw *gsw_FR) MonthsAbbreviated() []string { -- return gsw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (gsw *gsw_FR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (gsw *gsw_FR) MonthsNarrow() []string { -- return gsw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (gsw *gsw_FR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gsw *gsw_FR) MonthsWide() []string { -- return gsw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,81 +167,13 @@ func (gsw *gsw_FR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'gsw_FR' and handles both Whole and Real numbers based on 'v' - func (gsw *gsw_FR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'gsw_FR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (gsw *gsw_FR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, gsw.percentSuffix...) -- -- b = append(b, gsw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gsw_FR' -@@ -272,60 +181,7 @@ func (gsw *gsw_FR) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gsw.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gsw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, gsw.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gsw_FR' -@@ -334,67 +190,7 @@ func (gsw *gsw_FR) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gsw.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gsw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, gsw.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, gsw.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gsw_FR' -@@ -402,27 +198,6 @@ func (gsw *gsw_FR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +206,6 @@ func (gsw *gsw_FR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +214,6 @@ func (gsw *gsw_FR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, gsw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +222,6 @@ func (gsw *gsw_FR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gsw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, gsw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +230,6 @@ func (gsw *gsw_FR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +238,6 @@ func (gsw *gsw_FR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +246,6 @@ func (gsw *gsw_FR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +254,5 @@ func (gsw *gsw_FR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gsw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gsw_LI/gsw_LI.go b/gsw_LI/gsw_LI.go -index 2a13738..c5e8e36 100644 ---- a/gsw_LI/gsw_LI.go -+++ b/gsw_LI/gsw_LI.go -@@ -10,68 +10,45 @@ import ( - ) -  - type gsw_LI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'gsw_LI' locale - func New() locales.Translator { - return &gsw_LI{ -- locale: "gsw_LI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: "’", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "Auguscht", "Septämber", "Oktoober", "Novämber", "Dezämber"}, -- daysAbbreviated: []string{"Su.", "Mä.", "Zi.", "Mi.", "Du.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysWide: []string{"Sunntig", "Määntig", "Ziischtig", "Mittwuch", "Dunschtig", "Friitig", "Samschtig"}, -- periodsAbbreviated: []string{"v.m.", "n.m."}, -- periodsWide: []string{"vorm.", "nam."}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"v. Chr.", "n. Chr."}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"WESZ": "Weschteuropäischi Summerziit", "ART": "ART", "NZDT": "NZDT", "CLST": "CLST", "EAT": "Oschtafrikanischi Ziit", "ECT": "ECT", "COST": "COST", "CDT": "Amerika-Zentraal Summerziit", "SRT": "SRT", "JDT": "JDT", "TMT": "TMT", "ACWST": "ACWST", "HAT": "HAT", "CHADT": "CHADT", "ACDT": "ACDT", "ADT": "ADT", "GYT": "GYT", "WIT": "WIT", "HADT": "HADT", "HKT": "HKT", "HNPM": "HNPM", "CHAST": "CHAST", "TMST": "TMST", "COT": "COT", "MESZ": "Mitteleuropäischi Summerziit", "PST": "PST", "HNCU": "HNCU", "CST": "Amerika-Zentraal Schtandardziit", "GFT": "GFT", "CAT": "Zentralafrikanischi Ziit", "BT": "BT", "NZST": "NZST", "BOT": "BOT", "AKDT": "Alaska-Summerziit", "ChST": "ChST", "OEZ": "Oschteuropäischi Schtandardziit", "OESZ": "Oschteuropäischi Summerziit", "HEOG": "HEOG", "JST": "JST", "HNEG": "HNEG", "HNPMX": "HNPMX", "EDT": "EDT", "WIB": "WIB", "VET": "VET", "ARST": "ARST", "AWST": "AWST", "SAST": "Süüdafrikanischi ziit", "MST": "MST", "AEST": "AEST", "MEZ": "Mitteleuropäischi Schtandardziit", "UYST": "UYST", "WEZ": "Weschteuropäischi Schtandardziit", "AKST": "Alaska-Schtandardziit", "HAST": "HAST", "ACWDT": "ACWDT", "LHST": "LHST", "WAT": "Weschtafrikanischi Schtandardziit", "EST": "EST", "WAST": "Weschtafrikanischi Summerziit", "HECU": "HECU", "GMT": "GMT", "MDT": "MDT", "HNT": "HNT", "HNOG": "HNOG", "IST": "IST", "ACST": "ACST", "WITA": "WITA", "WART": "WART", "PDT": "PDT", "AEDT": "AEDT", "HNNOMX": "HNNOMX", "AST": "AST", "SGT": "SGT", "AWDT": "AWDT", "HEPM": "HEPM", "LHDT": "LHDT", "HEEG": "HEEG", "WARST": "WARST", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "MYT": "MYT", "UYT": "UYT", "HKST": "HKST", "CLT": "CLT", "∅∅∅": "Amazonas-Summerziit"}, -+ locale: "gsw_LI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OESZ": "OESZ", "MDT": "MDT", "HAST": "HAST", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "COT": "COT", "HEOG": "HEOG", "EDT": "EDT", "AWST": "AWST", "WARST": "WARST", "TMST": "TMST", "CST": "CST", "ECT": "ECT", "ADT": "ADT", "GMT": "GMT", "ARST": "ARST", "HNPM": "HNPM", "HENOMX": "HENOMX", "AEST": "AEST", "UYT": "UYT", "WEZ": "WEZ", "WITA": "WITA", "MYT": "MYT", "TMT": "TMT", "HEPM": "HEPM", "BT": "BT", "UYST": "UYST", "JST": "JST", "NZST": "NZST", "ART": "ART", "HNPMX": "HNPMX", "HNCU": "HNCU", "AKDT": "AKDT", "HKST": "HKST", "NZDT": "NZDT", "ChST": "ChST", "SRT": "SRT", "HEEG": "HEEG", "LHST": "LHST", "WAT": "WAT", "HAT": "HAT", "COST": "COST", "CDT": "CDT", "IST": "IST", "WART": "WART", "GYT": "GYT", "EST": "EST", "HKT": "HKT", "CLST": "CLST", "HADT": "HADT", "ACST": "ACST", "PDT": "PDT", "SGT": "SGT", "HNT": "HNT", "BOT": "BOT", "CHADT": "CHADT", "ACWST": "ACWST", "CHAST": "CHAST", "VET": "VET", "GFT": "GFT", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "JDT": "JDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "CLT": "CLT", "WIB": "WIB", "AST": "AST", "EAT": "EAT", "WESZ": "WESZ", "PST": "PST", "OEZ": "OEZ", "SAST": "SAST", "CAT": "CAT", "MESZ": "MESZ", "HNEG": "HNEG", "AWDT": "AWDT", "WIT": "WIT", "MST": "MST", "WAST": "WAST", "ACWDT": "ACWDT", "HECU": "HECU", "AKST": "AKST", "ACDT": "ACDT", "LHDT": "LHDT"}, - } - } -  -@@ -124,7 +101,7 @@ func (gsw *gsw_LI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gsw *gsw_LI) MonthsAbbreviated() []string { -- return gsw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (gsw *gsw_LI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (gsw *gsw_LI) MonthsNarrow() []string { -- return gsw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (gsw *gsw_LI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gsw *gsw_LI) MonthsWide() []string { -- return gsw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,81 +167,13 @@ func (gsw *gsw_LI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'gsw_LI' and handles both Whole and Real numbers based on 'v' - func (gsw *gsw_LI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'gsw_LI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (gsw *gsw_LI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, gsw.percentSuffix...) -- -- b = append(b, gsw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gsw_LI' -@@ -272,60 +181,7 @@ func (gsw *gsw_LI) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gsw.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gsw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, gsw.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gsw_LI' -@@ -334,67 +190,7 @@ func (gsw *gsw_LI) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gsw.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gsw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(gsw.group) - 1; j >= 0; j-- { -- b = append(b, gsw.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(gsw.minus) - 1; j >= 0; j-- { -- b = append(b, gsw.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gsw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, gsw.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, gsw.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gsw_LI' -@@ -402,27 +198,6 @@ func (gsw *gsw_LI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,27 +206,6 @@ func (gsw *gsw_LI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,17 +214,6 @@ func (gsw *gsw_LI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, gsw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,19 +222,6 @@ func (gsw *gsw_LI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gsw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, gsw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -500,19 +230,6 @@ func (gsw *gsw_LI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +238,6 @@ func (gsw *gsw_LI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +246,6 @@ func (gsw *gsw_LI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +254,5 @@ func (gsw *gsw_LI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gsw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gsw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gu/gu.go b/gu/gu.go -index 128fa0e..b2dfd1a 100644 ---- a/gu/gu.go -+++ b/gu/gu.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ઈ.સ.પૂર્વે", "ઈ.સ."}, - erasNarrow: []string{"ઇ સ પુ", "ઇસ"}, - erasWide: []string{"ઈસવીસન પૂર્વે", "ઇસવીસન"}, -- timezones: map[string]string{"HKT": "હોંગ કોંગ માનક સમય", "BOT": "બોલિવિયા સમય", "WAT": "પશ્ચિમ આફ્રિકા માનક સમય", "AWST": "ઓસ્ટ્રેલિયન પશ્ચિમી પ્રમાણભૂત સમય", "ACST": "ઓસ્ટ્રેલિયન મધ્ય પ્રમાણભૂત સમય", "COT": "કોલંબિયા માનક સમય", "HNNOMX": "ઉત્તરપશ્ચિમ મેક્સિકો માનક સમય", "AKDT": "અલાસ્કા દિવસ સમય", "ACWDT": "ઓસ્ટ્રેલિયન મધ્ય પશ્ચિમી દિવસ સમય", "PST": "ઉત્તર અમેરિકન પેસિફિક પ્રમાણભૂત સમય", "PDT": "ઉત્તર અમેરિકન પેસિફિક દિવસ સમય", "HEPM": "સેંટ પીએરે એન્ડ મિકીલોન દિવસ સમય", "WAST": "પશ્ચિમ આફ્રિકા ગ્રીષ્મ સમય", "OEZ": "પૂર્વી યુરોપિયન માનક સમય", "WIB": "પશ્ચિમી ઇન્ડોનેશિયા સમય", "WITA": "મધ્ય ઇન્ડોનેશિયા સમય", "CLT": "ચિલી માનક સમય", "ACDT": "ઓસ્ટ્રેલિયન મધ્ય દિવસ સમય", "HENOMX": "ઉત્તરપશ્ચિમ મેક્સિકો દિવસ સમય", "TMT": "તુર્કમેનિસ્તાન માનક સમય", "TMST": "તુર્કમેનિસ્તાન ગ્રીષ્મ સમય", "WART": "પશ્ચિમી અર્જેન્ટીના માનક સમય", "CDT": "ઉત્તર અમેરિકન મધ્ય દિવસ સમય", "WESZ": "પશ્ચિમી યુરોપિયન ગ્રીષ્મ સમય", "CHADT": "ચેતહામ દિવસ સમય", "HNEG": "પૂર્વ ગ્રીનલેન્ડ માનક સમય", "HEEG": "પૂર્વ ગ્રીનલેન્ડ ગ્રીષ્મ સમય", "MEZ": "મધ્ય યુરોપિયન માનક સમય", "CLST": "ચિલી ગ્રીષ્મ સમય", "HNT": "ન્યૂફાઉન્ડલેન્ડ પ્રમાણભૂત સમય", "HNPM": "સેંટ પીએરે એન્ડ મિકીલોન માનક સમય", "HNPMX": "મેક્સીકન પેસિફિક માનક સમય", "BT": "ભૂટાન સમય", "EDT": "ઉત્તર અમેરિકન પૂર્વી દિવસ સમય", "ADT": "અટલાન્ટિક દિવસ સમય", "HNOG": "પશ્ચિમ ગ્રીનલેન્ડ માનક સમય", "JDT": "જાપાન દિવસ સમય", "EAT": "પૂર્વ આફ્રિકા સમય", "COST": "કોલંબિયા ગ્રીષ્મ સમય", "NZDT": "ન્યુઝીલેન્ડ દિવસ સમય", "CHAST": "ચેતહામ માનક સમય", "IST": "ભારતીય માનક સમય", "GFT": "ફ્રેન્ચ ગયાના સમય", "∅∅∅": "પેરુ ગ્રીષ્મ સમય", "VET": "વેનેઝુએલા સમય", "HAT": "ન્યૂફાઉન્ડલેન્ડ દિવસ સમય", "ChST": "કેમોરો માનક સમય", "UYST": "ઉરૂગ્વે ગ્રીષ્મ સમય", "WARST": "પશ્ચિમી અર્જેન્ટીના ગ્રીષ્મ સમય", "GYT": "ગયાના સમય", "MYT": "મલેશિયા સમય", "HAST": "હવાઇ-એલ્યુશિઅન માનક સમય", "HEOG": "પશ્ચિમ ગ્રીનલેન્ડ ગ્રીષ્મ સમય", "LHST": "લોર્ડ હોવ પ્રમાણભૂત સમય", "HEPMX": "મેક્સીકન પેસિફિક દિવસ સમય", "AKST": "અલાસ્કા પ્રમાણભૂત સમય", "WEZ": "પશ્ચિમી યુરોપિયન માનક સમય", "AWDT": "ઓસ્ટ્રેલિયન પશ્ચિમી દિવસ સમય", "MESZ": "મધ્ય યુરોપિયન ગ્રીષ્મ સમય", "OESZ": "પૂર્વી યુરોપીયન ગ્રીષ્મ સમય", "ACWST": "ઓસ્ટ્રેલિયન મધ્ય પશ્ચિમી પ્રમાણભૂત સમય", "SAST": "દક્ષિણ આફ્રિકા માનક સમય", "JST": "જાપાન માનક સમય", "AST": "અટલાન્ટિક પ્રમાણભૂત સમય", "ART": "અર્જેન્ટીના માનક સમય", "MDT": "મકાઉ ગ્રીષ્મ સમય", "CAT": "મધ્ય આફ્રિકા સમય", "HECU": "ક્યૂબા દિવસ સમય", "EST": "ઉત્તર અમેરિકન પૂર્વી પ્રમાણભૂત સમય", "MST": "મકાઉ પ્રમાણભૂત સમય", "UYT": "ઉરૂગ્વે માનક સમય", "WIT": "પૂર્વીય ઇન્ડોનેશિયા સમય", "HADT": "હવાઇ-એલ્યુશિઅન દિવસ સમય", "ARST": "આર્જેન્ટીના ગ્રીષ્મ સમય", "ECT": "એક્વાડોર સમય", "HNCU": "ક્યૂબા માનક સમય", "AEST": "ઓસ્ટ્રેલિયન પૂર્વીય પ્રમાણભૂત સમય", "LHDT": "લોર્ડ હોવ દિવસ સમય", "CST": "ઉત્તર અમેરિકન કેન્દ્રિય પ્રમાણભૂત સમય", "SRT": "સૂરીનામ સમય", "HKST": "હોંગ કોંગ ગ્રીષ્મ સમય", "AEDT": "ઓસ્ટ્રેલિયન પૂર્વીય દિવસ સમય", "NZST": "ન્યુઝીલેન્ડ માનક સમય", "GMT": "ગ્રીનવિચ મધ્યમ સમય", "SGT": "સિંગાપુર માનક સમય"}, -+ timezones: map[string]string{"AEST": "ઓસ્ટ્રેલિયન પૂર્વીય પ્રમાણભૂત સમય", "MYT": "મલેશિયા સમય", "HEPM": "સેંટ પીએરે એન્ડ મિકીલોન દિવસ સમય", "AWST": "ઓસ્ટ્રેલિયન પશ્ચિમી પ્રમાણભૂત સમય", "AWDT": "ઓસ્ટ્રેલિયન પશ્ચિમી દિવસ સમય", "WART": "પશ્ચિમી અર્જેન્ટીના માનક સમય", "BOT": "બોલિવિયા સમય", "HENOMX": "ઉત્તરપશ્ચિમ મેક્સિકો દિવસ સમય", "MESZ": "મધ્ય યુરોપિયન ગ્રીષ્મ સમય", "COT": "કોલંબિયા માનક સમય", "SAST": "દક્ષિણ આફ્રિકા માનક સમય", "TMT": "તુર્કમેનિસ્તાન માનક સમય", "CAT": "મધ્ય આફ્રિકા સમય", "EAT": "પૂર્વ આફ્રિકા સમય", "HNNOMX": "ઉત્તરપશ્ચિમ મેક્સિકો માનક સમય", "VET": "વેનેઝુએલા સમય", "HNCU": "ક્યૂબા માનક સમય", "OEZ": "પૂર્વી યુરોપિયન માનક સમય", "CST": "ઉત્તર અમેરિકન કેન્દ્રિય પ્રમાણભૂત સમય", "HNPM": "સેંટ પીએરે એન્ડ મિકીલોન માનક સમય", "UYT": "ઉરૂગ્વે માનક સમય", "SGT": "સિંગાપુર માનક સમય", "HNEG": "પૂર્વ ગ્રીનલેન્ડ માનક સમય", "GYT": "ગયાના સમય", "EST": "ઉત્તર અમેરિકન પૂર્વી પ્રમાણભૂત સમય", "AKST": "અલાસ્કા પ્રમાણભૂત સમય", "AKDT": "અલાસ્કા દિવસ સમય", "GFT": "ફ્રેન્ચ ગયાના સમય", "HNOG": "પશ્ચિમ ગ્રીનલેન્ડ માનક સમય", "JST": "જાપાન માનક સમય", "ACWST": "ઓસ્ટ્રેલિયન મધ્ય પશ્ચિમી પ્રમાણભૂત સમય", "UYST": "ઉરૂગ્વે ગ્રીષ્મ સમય", "HECU": "ક્યૂબા દિવસ સમય", "HAT": "ન્યૂફાઉન્ડલેન્ડ દિવસ સમય", "EDT": "ઉત્તર અમેરિકન પૂર્વી દિવસ સમય", "LHDT": "લોર્ડ હોવ દિવસ સમય", "CHAST": "ચેતહામ માનક સમય", "IST": "ભારતીય માનક સમય", "WAST": "પશ્ચિમ આફ્રિકા ગ્રીષ્મ સમય", "WITA": "મધ્ય ઇન્ડોનેશિયા સમય", "GMT": "ગ્રીનવિચ મધ્યમ સમય", "ChST": "કેમોરો માનક સમય", "AST": "અટલાન્ટિક પ્રમાણભૂત સમય", "MEZ": "મધ્ય યુરોપિયન માનક સમય", "LHST": "લોર્ડ હોવ પ્રમાણભૂત સમય", "BT": "ભૂટાન સમય", "WEZ": "પશ્ચિમી યુરોપિયન માનક સમય", "OESZ": "પૂર્વી યુરોપીયન ગ્રીષ્મ સમય", "WIT": "પૂર્વીય ઇન્ડોનેશિયા સમય", "HEOG": "પશ્ચિમ ગ્રીનલેન્ડ ગ્રીષ્મ સમય", "NZST": "ન્યુઝીલેન્ડ માનક સમય", "HADT": "હવાઇ-એલ્યુશિઅન દિવસ સમય", "∅∅∅": "એકર ગ્રીષ્મ સમય", "HNPMX": "મેક્સીકન પેસિફિક માનક સમય", "AEDT": "ઓસ્ટ્રેલિયન પૂર્વીય દિવસ સમય", "WARST": "પશ્ચિમી અર્જેન્ટીના ગ્રીષ્મ સમય", "HKST": "હોંગ કોંગ ગ્રીષ્મ સમય", "NZDT": "ન્યુઝીલેન્ડ દિવસ સમય", "WIB": "પશ્ચિમી ઇન્ડોનેશિયા સમય", "MDT": "ઉત્તર અમેરિકન માઉન્ટન દિવસ સમય", "JDT": "જાપાન દિવસ સમય", "ACWDT": "ઓસ્ટ્રેલિયન મધ્ય પશ્ચિમી દિવસ સમય", "ART": "અર્જેન્ટીના માનક સમય", "HAST": "હવાઇ-એલ્યુશિઅન માનક સમય", "CLST": "ચિલી ગ્રીષ્મ સમય", "ECT": "એક્વાડોર સમય", "HNT": "ન્યૂફાઉન્ડલેન્ડ પ્રમાણભૂત સમય", "CDT": "ઉત્તર અમેરિકન મધ્ય દિવસ સમય", "ARST": "આર્જેન્ટીના ગ્રીષ્મ સમય", "MST": "ઉત્તર અમેરિકન માઉન્ટન પ્રમાણભૂત સમય", "HEEG": "પૂર્વ ગ્રીનલેન્ડ ગ્રીષ્મ સમય", "WESZ": "પશ્ચિમી યુરોપિયન ગ્રીષ્મ સમય", "HKT": "હોંગ કોંગ માનક સમય", "TMST": "તુર્કમેનિસ્તાન ગ્રીષ્મ સમય", "CLT": "ચિલી માનક સમય", "ADT": "અટલાન્ટિક દિવસ સમય", "SRT": "સૂરીનામ સમય", "PDT": "ઉત્તર અમેરિકન પેસિફિક દિવસ સમય", "HEPMX": "મેક્સીકન પેસિફિક દિવસ સમય", "CHADT": "ચેતહામ દિવસ સમય", "WAT": "પશ્ચિમ આફ્રિકા માનક સમય", "COST": "કોલંબિયા ગ્રીષ્મ સમય", "ACST": "ઓસ્ટ્રેલિયન મધ્ય પ્રમાણભૂત સમય", "ACDT": "ઓસ્ટ્રેલિયન મધ્ય દિવસ સમય", "PST": "ઉત્તર અમેરિકન પેસિફિક પ્રમાણભૂત સમય"}, - } - } -  -diff --git a/gu_IN/gu_IN.go b/gu_IN/gu_IN.go -index d5f014d..209b202 100644 ---- a/gu_IN/gu_IN.go -+++ b/gu_IN/gu_IN.go -@@ -42,32 +42,13 @@ type gu_IN struct { - // New returns a new instance of translator for the 'gu_IN' locale - func New() locales.Translator { - return &gu_IN{ -- locale: "gu_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "જાન્યુ", "ફેબ્રુ", "માર્ચ", "એપ્રિલ", "મે", "જૂન", "જુલાઈ", "ઑગસ્ટ", "સપ્ટે", "ઑક્ટો", "નવે", "ડિસે"}, -- monthsNarrow: []string{"", "જા", "ફે", "મા", "એ", "મે", "જૂ", "જુ", "ઑ", "સ", "ઑ", "ન", "ડિ"}, -- monthsWide: []string{"", "જાન્યુઆરી", "ફેબ્રુઆરી", "માર્ચ", "એપ્રિલ", "મે", "જૂન", "જુલાઈ", "ઑગસ્ટ", "સપ્ટેમ્બર", "ઑક્ટોબર", "નવેમ્બર", "ડિસેમ્બર"}, -- daysAbbreviated: []string{"રવિ", "સોમ", "મંગળ", "બુધ", "ગુરુ", "શુક્ર", "શનિ"}, -- daysNarrow: []string{"ર", "સો", "મં", "બુ", "ગુ", "શુ", "શ"}, -- daysShort: []string{"ર", "સો", "મં", "બુ", "ગુ", "શુ", "શ"}, -- daysWide: []string{"રવિવાર", "સોમવાર", "મંગળવાર", "બુધવાર", "ગુરુવાર", "શુક્રવાર", "શનિવાર"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"ઈ.સ.પૂર્વે", "ઈ.સ."}, -- erasNarrow: []string{"ઇ સ પુ", "ઇસ"}, -- erasWide: []string{"ઈસવીસન પૂર્વે", "ઇસવીસન"}, -- timezones: map[string]string{"WIB": "પશ્ચિમી ઇન્ડોનેશિયા સમય", "HADT": "હવાઇ-એલ્યુશિઅન દિવસ સમય", "ARST": "આર્જેન્ટીના ગ્રીષ્મ સમય", "AWST": "ઓસ્ટ્રેલિયન પશ્ચિમી પ્રમાણભૂત સમય", "CLT": "ચિલી માનક સમય", "GFT": "ફ્રેન્ચ ગયાના સમય", "EST": "ઉત્તર અમેરિકન પૂર્વી પ્રમાણભૂત સમય", "MST": "મકાઉ પ્રમાણભૂત સમય", "JST": "જાપાન માનક સમય", "CDT": "ઉત્તર અમેરિકન મધ્ય દિવસ સમય", "HNT": "ન્યૂફાઉન્ડલેન્ડ પ્રમાણભૂત સમય", "HEPM": "સેંટ પીએરે એન્ડ મિકીલોન દિવસ સમય", "LHDT": "લોર્ડ હોવ દિવસ સમય", "ECT": "એક્વાડોર સમય", "BT": "ભૂટાન સમય", "WESZ": "પશ્ચિમી યુરોપિયન ગ્રીષ્મ સમય", "ACWDT": "ઓસ્ટ્રેલિયન મધ્ય પશ્ચિમી દિવસ સમય", "PST": "ઉત્તર અમેરિકન પેસિફિક પ્રમાણભૂત સમય", "IST": "ભારતીય માનક સમય", "CAT": "મધ્ય આફ્રિકા સમય", "COST": "કોલંબિયા ગ્રીષ્મ સમય", "ADT": "અટલાન્ટિક દિવસ સમય", "GYT": "ગયાના સમય", "HNPM": "સેંટ પીએરે એન્ડ મિકીલોન માનક સમય", "TMST": "તુર્કમેનિસ્તાન ગ્રીષ્મ સમય", "AKDT": "અલાસ્કા દિવસ સમય", "HAST": "હવાઇ-એલ્યુશિઅન માનક સમય", "WEZ": "પશ્ચિમી યુરોપિયન માનક સમય", "HECU": "ક્યૂબા દિવસ સમય", "MYT": "મલેશિયા સમય", "HAT": "ન્યૂફાઉન્ડલેન્ડ દિવસ સમય", "HKST": "હોંગ કોંગ ગ્રીષ્મ સમય", "CHAST": "ચેતહામ માનક સમય", "CHADT": "ચેતહામ દિવસ સમય", "SAST": "દક્ષિણ આફ્રિકા માનક સમય", "ACST": "ઓસ્ટ્રેલિયન મધ્ય પ્રમાણભૂત સમય", "AEDT": "ઓસ્ટ્રેલિયન પૂર્વીય દિવસ સમય", "LHST": "લોર્ડ હોવ પ્રમાણભૂત સમય", "JDT": "જાપાન દિવસ સમય", "WITA": "મધ્ય ઇન્ડોનેશિયા સમય", "NZST": "ન્યુઝીલેન્ડ માનક સમય", "NZDT": "ન્યુઝીલેન્ડ દિવસ સમય", "WAST": "પશ્ચિમ આફ્રિકા ગ્રીષ્મ સમય", "EAT": "પૂર્વ આફ્રિકા સમય", "WARST": "પશ્ચિમી અર્જેન્ટીના ગ્રીષ્મ સમય", "MDT": "મકાઉ ગ્રીષ્મ સમય", "∅∅∅": "એમેઝોન ગ્રીષ્મ સમય", "CLST": "ચિલી ગ્રીષ્મ સમય", "ChST": "કેમોરો માનક સમય", "WAT": "પશ્ચિમ આફ્રિકા માનક સમય", "HEPMX": "મેક્સીકન પેસિફિક દિવસ સમય", "HEOG": "પશ્ચિમ ગ્રીનલેન્ડ ગ્રીષ્મ સમય", "AWDT": "ઓસ્ટ્રેલિયન પશ્ચિમી દિવસ સમય", "MEZ": "મધ્ય યુરોપિયન માનક સમય", "MESZ": "મધ્ય યુરોપિયન ગ્રીષ્મ સમય", "OESZ": "પૂર્વી યુરોપીયન ગ્રીષ્મ સમય", "HNNOMX": "ઉત્તરપશ્ચિમ મેક્સિકો માનક સમય", "HEEG": "પૂર્વ ગ્રીનલેન્ડ ગ્રીષ્મ સમય", "SGT": "સિંગાપુર માનક સમય", "AKST": "અલાસ્કા પ્રમાણભૂત સમય", "UYST": "ઉરૂગ્વે ગ્રીષ્મ સમય", "UYT": "ઉરૂગ્વે માનક સમય", "ACWST": "ઓસ્ટ્રેલિયન મધ્ય પશ્ચિમી પ્રમાણભૂત સમય", "ART": "અર્જેન્ટીના માનક સમય", "BOT": "બોલિવિયા સમય", "OEZ": "પૂર્વી યુરોપિયન માનક સમય", "HNCU": "ક્યૂબા માનક સમય", "HNPMX": "મેક્સીકન પેસિફિક માનક સમય", "AST": "અટલાન્ટિક પ્રમાણભૂત સમય", "SRT": "સૂરીનામ સમય", "PDT": "ઉત્તર અમેરિકન પેસિફિક દિવસ સમય", "WART": "પશ્ચિમી અર્જેન્ટીના માનક સમય", "COT": "કોલંબિયા માનક સમય", "EDT": "ઉત્તર અમેરિકન પૂર્વી દિવસ સમય", "CST": "ઉત્તર અમેરિકન કેન્દ્રિય પ્રમાણભૂત સમય", "HNOG": "પશ્ચિમ ગ્રીનલેન્ડ માનક સમય", "AEST": "ઓસ્ટ્રેલિયન પૂર્વીય પ્રમાણભૂત સમય", "TMT": "તુર્કમેનિસ્તાન માનક સમય", "ACDT": "ઓસ્ટ્રેલિયન મધ્ય દિવસ સમય", "WIT": "પૂર્વીય ઇન્ડોનેશિયા સમય", "VET": "વેનેઝુએલા સમય", "HNEG": "પૂર્વ ગ્રીનલેન્ડ માનક સમય", "HENOMX": "ઉત્તરપશ્ચિમ મેક્સિકો દિવસ સમય", "GMT": "ગ્રીનવિચ મધ્યમ સમય", "HKT": "હોંગ કોંગ માનક સમય"}, -+ locale: "gu_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ChST": "ChST", "HAST": "HAST", "MEZ": "MEZ", "AWST": "AWST", "HAT": "HAT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "BT": "BT", "HECU": "HECU", "GYT": "GYT", "CAT": "CAT", "NZDT": "NZDT", "AST": "AST", "GFT": "GFT", "WARST": "WARST", "COT": "COT", "TMST": "TMST", "ACST": "ACST", "LHDT": "LHDT", "HEPM": "HEPM", "AEST": "AEST", "PST": "PST", "VET": "VET", "AKDT": "AKDT", "ADT": "ADT", "MYT": "MYT", "HKT": "HKT", "WIB": "WIB", "NZST": "NZST", "HNEG": "HNEG", "JST": "JST", "ACWDT": "ACWDT", "ARST": "ARST", "JDT": "JDT", "HNPMX": "HNPMX", "WEZ": "WEZ", "WAST": "WAST", "OEZ": "OEZ", "EAT": "EAT", "AKST": "AKST", "EDT": "EDT", "CLT": "CLT", "ECT": "ECT", "GMT": "GMT", "ACDT": "ACDT", "CHAST": "CHAST", "IST": "IST", "HEPMX": "HEPMX", "CDT": "CDT", "UYST": "UYST", "PDT": "PDT", "HNCU": "HNCU", "OESZ": "OESZ", "WIT": "WIT", "SAST": "SAST", "MDT": "MDT", "HENOMX": "HENOMX", "WESZ": "WESZ", "HNT": "HNT", "COST": "COST", "HKST": "HKST", "CST": "CST", "HEEG": "HEEG", "LHST": "LHST", "UYT": "UYT", "ACWST": "ACWST", "WAT": "WAT", "HEOG": "HEOG", "WITA": "WITA", "CHADT": "CHADT", "SGT": "SGT", "WART": "WART", "HNOG": "HNOG", "CLST": "CLST", "ART": "ART", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "TMT": "TMT", "MST": "MST", "SRT": "SRT", "EST": "EST", "BOT": "BOT", "HADT": "HADT", "MESZ": "MESZ", "AWDT": "AWDT"}, - } - } -  -@@ -145,7 +126,7 @@ func (gu *gu_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gu *gu_IN) MonthsAbbreviated() []string { -- return gu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -155,7 +136,7 @@ func (gu *gu_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (gu *gu_IN) MonthsNarrow() []string { -- return gu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -165,7 +146,7 @@ func (gu *gu_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gu *gu_IN) MonthsWide() []string { -- return gu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -211,82 +192,13 @@ func (gu *gu_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'gu_IN' and handles both Whole and Real numbers based on 'v' - func (gu *gu_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, gu.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'gu_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (gu *gu_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, gu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, gu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gu_IN' -@@ -294,56 +206,7 @@ func (gu *gu_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gu.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, gu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gu_IN' -@@ -352,64 +215,7 @@ func (gu *gu_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gu.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, gu.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gu_IN' -@@ -417,17 +223,6 @@ func (gu *gu_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -436,17 +231,6 @@ func (gu *gu_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, gu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,17 +239,6 @@ func (gu *gu_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, gu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -474,19 +247,6 @@ func (gu *gu_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, gu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -495,32 +255,6 @@ func (gu *gu_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, gu.periodsAbbreviated[0]...) -- } else { -- b = append(b, gu.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -529,39 +263,6 @@ func (gu *gu_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, gu.periodsAbbreviated[0]...) -- } else { -- b = append(b, gu.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -570,44 +271,6 @@ func (gu *gu_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, gu.periodsAbbreviated[0]...) -- } else { -- b = append(b, gu.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -616,48 +279,5 @@ func (gu *gu_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, gu.periodsAbbreviated[0]...) -- } else { -- b = append(b, gu.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/guz/guz.go b/guz/guz.go -index 8a4e34e..d34e282 100644 ---- a/guz/guz.go -+++ b/guz/guz.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"YA", "YK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Yeso ataiborwa", "Yeso kaiboirwe"}, -- timezones: map[string]string{"SRT": "SRT", "HAT": "HAT", "HEOG": "HEOG", "MESZ": "MESZ", "CLT": "CLT", "UYT": "UYT", "BT": "BT", "HNOG": "HNOG", "OESZ": "OESZ", "COT": "COT", "COST": "COST", "VET": "VET", "HNT": "HNT", "HEPM": "HEPM", "MEZ": "MEZ", "CLST": "CLST", "BOT": "BOT", "EAT": "EAT", "EST": "EST", "MDT": "MDT", "ACWST": "ACWST", "WITA": "WITA", "HNPM": "HNPM", "NZDT": "NZDT", "IST": "IST", "WARST": "WARST", "PDT": "PDT", "HADT": "HADT", "WESZ": "WESZ", "AWDT": "AWDT", "HKT": "HKT", "SAST": "SAST", "GFT": "GFT", "ACST": "ACST", "GYT": "GYT", "WAST": "WAST", "AKDT": "AKDT", "MYT": "MYT", "HNCU": "HNCU", "HECU": "HECU", "HENOMX": "HENOMX", "WIT": "WIT", "WEZ": "WEZ", "JST": "JST", "TMST": "TMST", "HEEG": "HEEG", "WART": "WART", "HNNOMX": "HNNOMX", "HAST": "HAST", "HEPMX": "HEPMX", "UYST": "UYST", "MST": "MST", "ARST": "ARST", "ACWDT": "ACWDT", "AWST": "AWST", "NZST": "NZST", "TMT": "TMT", "CST": "CST", "WAT": "WAT", "SGT": "SGT", "ACDT": "ACDT", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "AST": "AST", "LHST": "LHST", "CHAST": "CHAST", "EDT": "EDT", "HNPMX": "HNPMX", "AKST": "AKST", "AEST": "AEST", "AEDT": "AEDT", "HKST": "HKST", "CHADT": "CHADT", "OEZ": "OEZ", "PST": "PST", "ART": "ART", "JDT": "JDT", "ChST": "ChST", "HNEG": "HNEG", "WIB": "WIB", "ADT": "ADT", "CAT": "CAT", "GMT": "GMT", "CDT": "CDT", "ECT": "ECT"}, -+ timezones: map[string]string{"PDT": "PDT", "WESZ": "WESZ", "WAT": "WAT", "ARST": "ARST", "HEEG": "HEEG", "ADT": "ADT", "LHDT": "LHDT", "UYT": "UYT", "HNCU": "HNCU", "TMST": "TMST", "CDT": "CDT", "GMT": "GMT", "HECU": "HECU", "AKST": "AKST", "PST": "PST", "ACWDT": "ACWDT", "HAT": "HAT", "EST": "EST", "HAST": "HAST", "JDT": "JDT", "EDT": "EDT", "MEZ": "MEZ", "HNPM": "HNPM", "AEDT": "AEDT", "WAST": "WAST", "GFT": "GFT", "HNT": "HNT", "MDT": "MDT", "HADT": "HADT", "MYT": "MYT", "HEPM": "HEPM", "UYST": "UYST", "WARST": "WARST", "TMT": "TMT", "WITA": "WITA", "ChST": "ChST", "ACWST": "ACWST", "HKT": "HKT", "ART": "ART", "BOT": "BOT", "HNEG": "HNEG", "OESZ": "OESZ", "SAST": "SAST", "AWDT": "AWDT", "IST": "IST", "CHAST": "CHAST", "GYT": "GYT", "HEOG": "HEOG", "HKST": "HKST", "NZDT": "NZDT", "CAT": "CAT", "MST": "MST", "AST": "AST", "EAT": "EAT", "BT": "BT", "SGT": "SGT", "AKDT": "AKDT", "HNOG": "HNOG", "CLT": "CLT", "CHADT": "CHADT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AWST": "AWST", "AEST": "AEST", "COST": "COST", "CST": "CST", "SRT": "SRT", "ACDT": "ACDT", "CLST": "CLST", "NZST": "NZST", "ACST": "ACST", "WEZ": "WEZ", "∅∅∅": "∅∅∅", "WIT": "WIT", "COT": "COT", "JST": "JST", "HNPMX": "HNPMX", "WART": "WART", "ECT": "ECT", "LHST": "LHST", "MESZ": "MESZ", "VET": "VET", "HEPMX": "HEPMX", "OEZ": "OEZ", "WIB": "WIB"}, - } - } -  -diff --git a/guz_KE/guz_KE.go b/guz_KE/guz_KE.go -index a83a504..954d6d9 100644 ---- a/guz_KE/guz_KE.go -+++ b/guz_KE/guz_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type guz_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'guz_KE' locale - func New() locales.Translator { - return &guz_KE{ -- locale: "guz_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Can", "Feb", "Mac", "Apr", "Mei", "Jun", "Cul", "Agt", "Sep", "Okt", "Nob", "Dis"}, -- monthsNarrow: []string{"", "C", "F", "M", "A", "M", "J", "C", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Chanuari", "Feburari", "Machi", "Apiriri", "Mei", "Juni", "Chulai", "Agosti", "Septemba", "Okitoba", "Nobemba", "Disemba"}, -- daysAbbreviated: []string{"Cpr", "Ctt", "Cmn", "Cmt", "Ars", "Icm", "Est"}, -- daysNarrow: []string{"C", "C", "C", "C", "A", "I", "E"}, -- daysWide: []string{"Chumapiri", "Chumatato", "Chumaine", "Chumatano", "Aramisi", "Ichuma", "Esabato"}, -- periodsAbbreviated: []string{"Ma", "Mo"}, -- periodsWide: []string{"Mambia", "Mog"}, -- erasAbbreviated: []string{"YA", "YK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Yeso ataiborwa", "Yeso kaiboirwe"}, -- timezones: map[string]string{"HEOG": "HEOG", "JDT": "JDT", "ChST": "ChST", "HECU": "HECU", "WIB": "WIB", "COT": "COT", "EDT": "EDT", "SAST": "SAST", "TMST": "TMST", "ACDT": "ACDT", "HNPMX": "HNPMX", "HADT": "HADT", "ARST": "ARST", "CLST": "CLST", "GFT": "GFT", "ACST": "ACST", "WAST": "WAST", "OEZ": "OEZ", "SGT": "SGT", "MST": "MST", "MESZ": "MESZ", "IST": "IST", "HEPMX": "HEPMX", "AST": "AST", "HNOG": "HNOG", "HKST": "HKST", "WART": "WART", "CDT": "CDT", "VET": "VET", "LHDT": "LHDT", "CHAST": "CHAST", "OESZ": "OESZ", "EST": "EST", "AKST": "AKST", "HEPM": "HEPM", "CLT": "CLT", "HEEG": "HEEG", "HNCU": "HNCU", "GYT": "GYT", "MYT": "MYT", "UYST": "UYST", "AKDT": "AKDT", "CST": "CST", "WIT": "WIT", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "ADT": "ADT", "PDT": "PDT", "WEZ": "WEZ", "ACWDT": "ACWDT", "HAT": "HAT", "LHST": "LHST", "BOT": "BOT", "COST": "COST", "GMT": "GMT", "MDT": "MDT", "BT": "BT", "HNEG": "HNEG", "WAT": "WAT", "HNT": "HNT", "AEST": "AEST", "JST": "JST", "TMT": "TMT", "ECT": "ECT", "CAT": "CAT", "EAT": "EAT", "ART": "ART", "WESZ": "WESZ", "ACWST": "ACWST", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "HENOMX": "HENOMX", "HAST": "HAST", "AEDT": "AEDT", "UYT": "UYT", "SRT": "SRT", "PST": "PST", "MEZ": "MEZ", "NZST": "NZST", "CHADT": "CHADT", "AWST": "AWST", "HKT": "HKT", "WITA": "WITA", "NZDT": "NZDT", "WARST": "WARST"}, -+ locale: "guz_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ART": "ART", "AWST": "AWST", "HEPM": "HEPM", "OESZ": "OESZ", "SRT": "SRT", "ACDT": "ACDT", "SGT": "SGT", "HECU": "HECU", "GYT": "GYT", "TMT": "TMT", "ADT": "ADT", "ChST": "ChST", "IST": "IST", "PST": "PST", "GFT": "GFT", "CLT": "CLT", "HNEG": "HNEG", "JST": "JST", "AEST": "AEST", "CHAST": "CHAST", "AKST": "AKST", "SAST": "SAST", "HAST": "HAST", "HKST": "HKST", "CST": "CST", "EAT": "EAT", "BT": "BT", "EDT": "EDT", "ARST": "ARST", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "WAST": "WAST", "AKDT": "AKDT", "WARST": "WARST", "HEOG": "HEOG", "NZDT": "NZDT", "WIB": "WIB", "BOT": "BOT", "ACST": "ACST", "AWDT": "AWDT", "EST": "EST", "GMT": "GMT", "COST": "COST", "MDT": "MDT", "WESZ": "WESZ", "CLST": "CLST", "CDT": "CDT", "LHST": "LHST", "LHDT": "LHDT", "JDT": "JDT", "CHADT": "CHADT", "HNCU": "HNCU", "HNT": "HNT", "HNOG": "HNOG", "ECT": "ECT", "AST": "AST", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "MYT": "MYT", "UYT": "UYT", "WEZ": "WEZ", "MST": "MST", "VET": "VET", "WAT": "WAT", "WART": "WART", "CAT": "CAT", "MEZ": "MEZ", "HNPM": "HNPM", "PDT": "PDT", "AEDT": "AEDT", "HNPMX": "HNPMX", "COT": "COT", "HKT": "HKT", "NZST": "NZST", "HENOMX": "HENOMX", "ACWST": "ACWST", "HEPMX": "HEPMX", "OEZ": "OEZ", "HAT": "HAT", "WIT": "WIT", "HADT": "HADT", "ACWDT": "ACWDT", "UYST": "UYST", "TMST": "TMST", "WITA": "WITA"}, - } - } -  -@@ -109,7 +94,7 @@ func (guz *guz_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (guz *guz_KE) MonthsAbbreviated() []string { -- return guz.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (guz *guz_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (guz *guz_KE) MonthsNarrow() []string { -- return guz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (guz *guz_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (guz *guz_KE) MonthsWide() []string { -- return guz.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (guz *guz_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := guz.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, guz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, guz.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, guz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, guz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'guz_KE' -@@ -247,68 +183,7 @@ func (guz *guz_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := guz.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, guz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, guz.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, guz.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, guz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, guz.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'guz_KE' -@@ -316,27 +191,6 @@ func (guz *guz_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (guz *guz_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, guz.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (guz *guz_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, guz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (guz *guz_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, guz.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, guz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (guz *guz_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (guz *guz_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (guz *guz_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (guz *guz_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, guz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := guz.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/gv/gv.go b/gv/gv.go -index 79826f0..3fe39fa 100644 ---- a/gv/gv.go -+++ b/gv/gv.go -@@ -57,7 +57,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"RC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"GFT": "GFT", "HNNOMX": "HNNOMX", "WART": "WART", "AKDT": "AKDT", "PST": "PST", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "CLT": "CLT", "OESZ": "OESZ", "ECT": "ECT", "HENOMX": "HENOMX", "HECU": "HECU", "AKST": "AKST", "ADT": "ADT", "MESZ": "MESZ", "BOT": "BOT", "HNT": "HNT", "PDT": "PDT", "WIB": "WIB", "HADT": "HADT", "EST": "EST", "ACWST": "ACWST", "WIT": "WIT", "ARST": "ARST", "WITA": "WITA", "JDT": "JDT", "WARST": "WARST", "SRT": "SRT", "MDT": "MDT", "UYT": "UYT", "WESZ": "WESZ", "HEEG": "HEEG", "OEZ": "OEZ", "HNEG": "HNEG", "SGT": "SGT", "BT": "BT", "CHADT": "CHADT", "CLST": "CLST", "MST": "MST", "AST": "AST", "CHAST": "CHAST", "COST": "COST", "ACST": "ACST", "COT": "COT", "CDT": "CDT", "UYST": "UYST", "VET": "VET", "HNPM": "HNPM", "NZST": "NZST", "HNCU": "HNCU", "HEOG": "HEOG", "AEDT": "AEDT", "ACDT": "ACDT", "WAT": "WAT", "WAST": "WAST", "CAT": "CAT", "CST": "CST", "ACWDT": "ACWDT", "HAT": "HAT", "HEPM": "HEPM", "LHST": "LHST", "JST": "JST", "EAT": "EAT", "GYT": "GYT", "HKST": "HKST", "AWST": "AWST", "NZDT": "NZDT", "IST": "IST", "GMT": "GMT", "HNPMX": "HNPMX", "HAST": "HAST", "HKT": "HKT", "AEST": "AEST", "SAST": "SAST", "ChST": "ChST", "MYT": "MYT", "ART": "ART", "WEZ": "WEZ", "MEZ": "MEZ", "TMST": "TMST", "HNOG": "HNOG", "TMT": "TMT", "EDT": "EDT", "LHDT": "LHDT", "HEPMX": "HEPMX"}, -+ timezones: map[string]string{"MESZ": "MESZ", "VET": "VET", "COT": "COT", "HEOG": "HEOG", "MDT": "MDT", "JDT": "JDT", "MST": "MST", "ECT": "ECT", "ART": "ART", "SRT": "SRT", "HADT": "HADT", "LHDT": "LHDT", "AEDT": "AEDT", "HNCU": "HNCU", "CST": "CST", "CLT": "CLT", "CLST": "CLST", "EDT": "EDT", "HEPM": "HEPM", "UYST": "UYST", "ACWST": "ACWST", "TMST": "TMST", "CAT": "CAT", "NZDT": "NZDT", "ARST": "ARST", "CHADT": "CHADT", "IST": "IST", "PDT": "PDT", "HECU": "HECU", "HKT": "HKT", "ChST": "ChST", "SGT": "SGT", "∅∅∅": "∅∅∅", "COST": "COST", "HKST": "HKST", "HNPM": "HNPM", "HENOMX": "HENOMX", "AWST": "AWST", "HNPMX": "HNPMX", "BOT": "BOT", "HAST": "HAST", "UYT": "UYT", "WEZ": "WEZ", "WAST": "WAST", "AKDT": "AKDT", "OEZ": "OEZ", "EST": "EST", "AST": "AST", "AEST": "AEST", "PST": "PST", "WART": "WART", "WARST": "WARST", "NZST": "NZST", "HEEG": "HEEG", "ADT": "ADT", "EAT": "EAT", "AWDT": "AWDT", "LHST": "LHST", "HEPMX": "HEPMX", "AKST": "AKST", "GFT": "GFT", "WITA": "WITA", "HNOG": "HNOG", "SAST": "SAST", "HAT": "HAT", "HNNOMX": "HNNOMX", "GYT": "GYT", "ACWDT": "ACWDT", "CDT": "CDT", "MEZ": "MEZ", "HNEG": "HNEG", "MYT": "MYT", "CHAST": "CHAST", "BT": "BT", "WESZ": "WESZ", "WIB": "WIB", "WAT": "WAT", "ACST": "ACST", "ACDT": "ACDT", "JST": "JST", "OESZ": "OESZ", "HNT": "HNT", "WIT": "WIT", "TMT": "TMT", "GMT": "GMT"}, - } - } -  -diff --git a/gv_IM/gv_IM.go b/gv_IM/gv_IM.go -index 92c6689..7c0bdff 100644 ---- a/gv_IM/gv_IM.go -+++ b/gv_IM/gv_IM.go -@@ -42,22 +42,13 @@ type gv_IM struct { - // New returns a new instance of translator for the 'gv_IM' locale - func New() locales.Translator { - return &gv_IM{ -- locale: "gv_IM", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "J-guer", "T-arree", "Mayrnt", "Avrril", "Boaldyn", "M-souree", "J-souree", "Luanistyn", "M-fouyir", "J-fouyir", "M-Houney", "M-Nollick"}, -- monthsWide: []string{"", "Jerrey-geuree", "Toshiaght-arree", "Mayrnt", "Averil", "Boaldyn", "Mean-souree", "Jerrey-souree", "Luanistyn", "Mean-fouyir", "Jerrey-fouyir", "Mee Houney", "Mee ny Nollick"}, -- daysAbbreviated: []string{"Jed", "Jel", "Jem", "Jerc", "Jerd", "Jeh", "Jes"}, -- daysWide: []string{"Jedoonee", "Jelhein", "Jemayrt", "Jercean", "Jerdein", "Jeheiney", "Jesarn"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"RC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CHADT": "CHADT", "JDT": "JDT", "ACST": "ACST", "WAST": "WAST", "AWST": "AWST", "AEDT": "AEDT", "HEPM": "HEPM", "NZST": "NZST", "CAT": "CAT", "AKST": "AKST", "ADT": "ADT", "ACWDT": "ACWDT", "HEOG": "HEOG", "NZDT": "NZDT", "JST": "JST", "AKDT": "AKDT", "GYT": "GYT", "UYST": "UYST", "HKT": "HKT", "MESZ": "MESZ", "TMST": "TMST", "GMT": "GMT", "MDT": "MDT", "EDT": "EDT", "EST": "EST", "LHST": "LHST", "WARST": "WARST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "BOT": "BOT", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "EAT": "EAT", "CHAST": "CHAST", "CLT": "CLT", "CLST": "CLST", "ACDT": "ACDT", "SRT": "SRT", "BT": "BT", "ARST": "ARST", "AWDT": "AWDT", "ECT": "ECT", "COST": "COST", "MST": "MST", "HNCU": "HNCU", "WEZ": "WEZ", "ACWST": "ACWST", "AEST": "AEST", "WART": "WART", "OESZ": "OESZ", "CST": "CST", "AST": "AST", "WIT": "WIT", "HNOG": "HNOG", "HNPM": "HNPM", "MEZ": "MEZ", "TMT": "TMT", "UYT": "UYT", "IST": "IST", "HENOMX": "HENOMX", "HECU": "HECU", "CDT": "CDT", "PDT": "PDT", "ChST": "ChST", "OEZ": "OEZ", "WAT": "WAT", "COT": "COT", "SGT": "SGT", "WIB": "WIB", "PST": "PST", "WITA": "WITA", "LHDT": "LHDT", "SAST": "SAST", "ART": "ART", "GFT": "GFT", "VET": "VET", "HADT": "HADT", "HNEG": "HNEG", "MYT": "MYT", "HAST": "HAST", "WESZ": "WESZ", "HNT": "HNT", "HAT": "HAT", "HKST": "HKST"}, -+ locale: "gv_IM", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "AST": "AST", "MDT": "MDT", "HEPM": "HEPM", "ACWDT": "ACWDT", "CHADT": "CHADT", "IST": "IST", "WART": "WART", "COST": "COST", "ECT": "ECT", "CDT": "CDT", "SRT": "SRT", "HADT": "HADT", "HENOMX": "HENOMX", "WESZ": "WESZ", "HAT": "HAT", "TMT": "TMT", "WIB": "WIB", "ACDT": "ACDT", "UYT": "UYT", "BT": "BT", "GFT": "GFT", "HNT": "HNT", "MST": "MST", "EAT": "EAT", "JST": "JST", "ADT": "ADT", "CLT": "CLT", "JDT": "JDT", "MYT": "MYT", "HKST": "HKST", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "HNOG": "HNOG", "WITA": "WITA", "HNPMX": "HNPMX", "AKDT": "AKDT", "HAST": "HAST", "AEST": "AEST", "PST": "PST", "HKT": "HKT", "ACWST": "ACWST", "MEZ": "MEZ", "HNPM": "HNPM", "CHAST": "CHAST", "PDT": "PDT", "AKST": "AKST", "GYT": "GYT", "EST": "EST", "ARST": "ARST", "MESZ": "MESZ", "AWST": "AWST", "AWDT": "AWDT", "WAT": "WAT", "WARST": "WARST", "CAT": "CAT", "OESZ": "OESZ", "WIT": "WIT", "HEOG": "HEOG", "BOT": "BOT", "HNCU": "HNCU", "SGT": "SGT", "VET": "VET", "WAST": "WAST", "COT": "COT", "LHST": "LHST", "NZDT": "NZDT", "ART": "ART", "HECU": "HECU", "HEPMX": "HEPMX", "NZST": "NZST", "HEEG": "HEEG", "LHDT": "LHDT", "UYST": "UYST", "SAST": "SAST", "EDT": "EDT", "TMST": "TMST", "ACST": "ACST", "CST": "CST", "GMT": "GMT", "ChST": "ChST", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "WEZ": "WEZ", "CLST": "CLST"}, - } - } -  -@@ -119,7 +110,7 @@ func (gv *gv_IM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (gv *gv_IM) MonthsAbbreviated() []string { -- return gv.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -139,7 +130,7 @@ func (gv *gv_IM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (gv *gv_IM) MonthsWide() []string { -- return gv.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,56 +190,7 @@ func (gv *gv_IM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gv.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gv.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, gv.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gv_IM' -@@ -257,64 +199,7 @@ func (gv *gv_IM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := gv.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, gv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, gv.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, gv.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, gv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'gv_IM' -@@ -322,27 +207,6 @@ func (gv *gv_IM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -351,22 +215,6 @@ func (gv *gv_IM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gv.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -375,21 +223,6 @@ func (gv *gv_IM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, gv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -398,24 +231,6 @@ func (gv *gv_IM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, gv.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, gv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -424,19 +239,6 @@ func (gv *gv_IM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -445,26 +247,6 @@ func (gv *gv_IM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -473,30 +255,6 @@ func (gv *gv_IM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -505,34 +263,5 @@ func (gv *gv_IM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, gv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := gv.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ha/ha.go b/ha/ha.go -index 35922af..596a87c 100644 ---- a/ha/ha.go -+++ b/ha/ha.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KHAI", "BHAI"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kafin haihuwar annab", "Bayan haihuwar annab"}, -- timezones: map[string]string{"HNPM": "HNPM", "HNNOMX": "HNNOMX", "SGT": "SGT", "HNPMX": "HNPMX", "HAST": "HAST", "HNOG": "HNOG", "AEDT": "AEDT", "CHAST": "CHAST", "ACDT": "ACDT", "CAT": "CAT", "HECU": "HECU", "EST": "EST", "EDT": "EDT", "MDT": "MDT", "AST": "AST", "CDT": "CDT", "ACWST": "ACWST", "SRT": "SRT", "∅∅∅": "∅∅∅", "BOT": "BOT", "HEOG": "HEOG", "PDT": "PDT", "ACWDT": "ACWDT", "HKST": "HKST", "SAST": "SAST", "GFT": "GFT", "COT": "COT", "MYT": "MYT", "ARST": "ARST", "NZST": "NZST", "TMT": "TMT", "HNEG": "HNEG", "HEPMX": "HEPMX", "HADT": "HADT", "VET": "VET", "BT": "BT", "LHDT": "LHDT", "CLT": "CLT", "ChST": "ChST", "MESZ": "MESZ", "CHADT": "CHADT", "OEZ": "OEZ", "COST": "COST", "WIB": "WIB", "WITA": "WITA", "IST": "IST", "AKST": "AKST", "AEST": "AEST", "AWDT": "AWDT", "HEPM": "HEPM", "MEZ": "MEZ", "OESZ": "OESZ", "AKDT": "AKDT", "WESZ": "WESZ", "JDT": "JDT", "CLST": "CLST", "ECT": "ECT", "UYT": "UYT", "UYST": "UYST", "CST": "CST", "ART": "ART", "WEZ": "WEZ", "ACST": "ACST", "AWST": "AWST", "LHST": "LHST", "EAT": "EAT", "HENOMX": "HENOMX", "GYT": "GYT", "HAT": "HAT", "HKT": "HKT", "NZDT": "NZDT", "JST": "JST", "TMST": "TMST", "WAT": "WAT", "WART": "WART", "HNCU": "HNCU", "PST": "PST", "HEEG": "HEEG", "GMT": "GMT", "HNT": "HNT", "WAST": "WAST", "WARST": "WARST", "MST": "MST", "ADT": "ADT", "WIT": "WIT"}, -+ timezones: map[string]string{"ACST": "ACST", "AWDT": "AWDT", "UYST": "UYST", "ACWST": "ACWST", "WAST": "WAST", "GMT": "GMT", "BOT": "BOT", "HAST": "HAST", "CAT": "CAT", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "WIB": "WIB", "EST": "EST", "ARST": "ARST", "AEDT": "AEDT", "COST": "COST", "HNPMX": "HNPMX", "OESZ": "OESZ", "HNT": "HNT", "HEEG": "HEEG", "JDT": "JDT", "WEZ": "WEZ", "ACWDT": "ACWDT", "AKST": "AKST", "HAT": "HAT", "HNNOMX": "HNNOMX", "VET": "VET", "GFT": "GFT", "WART": "WART", "WARST": "WARST", "ChST": "ChST", "SRT": "SRT", "MESZ": "MESZ", "CST": "CST", "HNOG": "HNOG", "HKT": "HKT", "HKST": "HKST", "CHADT": "CHADT", "AKDT": "AKDT", "GYT": "GYT", "CDT": "CDT", "NZDT": "NZDT", "MYT": "MYT", "PDT": "PDT", "WIT": "WIT", "UYT": "UYT", "BT": "BT", "SGT": "SGT", "SAST": "SAST", "COT": "COT", "ADT": "ADT", "HENOMX": "HENOMX", "LHST": "LHST", "TMT": "TMT", "OEZ": "OEZ", "NZST": "NZST", "HNPM": "HNPM", "WESZ": "WESZ", "WAT": "WAT", "HADT": "HADT", "WITA": "WITA", "ART": "ART", "JST": "JST", "LHDT": "LHDT", "HECU": "HECU", "EDT": "EDT", "TMST": "TMST", "CLT": "CLT", "CLST": "CLST", "HNEG": "HNEG", "IST": "IST", "HNCU": "HNCU", "AWST": "AWST", "AEST": "AEST", "HEPMX": "HEPMX", "HEOG": "HEOG", "AST": "AST", "MST": "MST", "MDT": "MDT", "PST": "PST", "CHAST": "CHAST", "ECT": "ECT", "EAT": "EAT", "ACDT": "ACDT", "HEPM": "HEPM"}, - } - } -  -diff --git a/ha_GH/ha_GH.go b/ha_GH/ha_GH.go -index 3aec70a..8e6e558 100644 ---- a/ha_GH/ha_GH.go -+++ b/ha_GH/ha_GH.go -@@ -10,64 +10,45 @@ import ( - ) -  - type ha_GH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ha_GH' locale - func New() locales.Translator { - return &ha_GH{ -- locale: "ha_GH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GH₵", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Fab", "Mar", "Afi", "May", "Yun", "Yul", "Agu", "Sat", "Okt", "Nuw", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "Y", "Y", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janairu", "Faburairu", "Maris", "Afirilu", "Mayu", "Yuni", "Yuli", "Agusta", "Satumba", "Oktoba", "Nuwamba", "Disamba"}, -- daysAbbreviated: []string{"Lah", "Lit", "Tal", "Lar", "Alh", "Jum", "Asa"}, -- daysNarrow: []string{"L", "L", "T", "L", "A", "J", "A"}, -- daysShort: []string{"Lh", "Li", "Ta", "Lr", "Al", "Ju", "As"}, -- daysWide: []string{"Lahadi", "Litinin", "Talata", "Laraba", "Alhamis", "Jummaʼa", "Asabar"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"KHAI", "BHAI"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kafin haihuwar annab", "Bayan haihuwar annab"}, -- timezones: map[string]string{"PST": "PST", "NZDT": "NZDT", "CST": "CST", "UYT": "UYT", "AKST": "AKST", "CLT": "CLT", "CLST": "CLST", "WART": "WART", "WARST": "WARST", "HECU": "HECU", "HAST": "HAST", "HEOG": "HEOG", "LHDT": "LHDT", "NZST": "NZST", "CAT": "CAT", "∅∅∅": "∅∅∅", "AST": "AST", "HENOMX": "HENOMX", "GMT": "GMT", "MYT": "MYT", "ACST": "ACST", "WAT": "WAT", "COT": "COT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "SAST": "SAST", "ADT": "ADT", "EST": "EST", "MST": "MST", "AKDT": "AKDT", "HNOG": "HNOG", "MEZ": "MEZ", "ChST": "ChST", "ACDT": "ACDT", "WIB": "WIB", "HADT": "HADT", "WIT": "WIT", "AWST": "AWST", "EDT": "EDT", "HNPMX": "HNPMX", "CDT": "CDT", "TMST": "TMST", "OEZ": "OEZ", "OESZ": "OESZ", "BT": "BT", "ACWST": "ACWST", "ARST": "ARST", "GFT": "GFT", "HEPMX": "HEPMX", "VET": "VET", "HNT": "HNT", "HKST": "HKST", "JST": "JST", "TMT": "TMT", "IST": "IST", "BOT": "BOT", "EAT": "EAT", "WESZ": "WESZ", "AWDT": "AWDT", "HKT": "HKT", "LHST": "LHST", "COST": "COST", "SGT": "SGT", "MDT": "MDT", "PDT": "PDT", "HNPM": "HNPM", "CHADT": "CHADT", "JDT": "JDT", "WEZ": "WEZ", "ART": "ART", "HNEG": "HNEG", "WAST": "WAST", "ECT": "ECT", "UYST": "UYST", "SRT": "SRT", "HAT": "HAT", "AEST": "AEST", "HEPM": "HEPM", "GYT": "GYT", "AEDT": "AEDT", "WITA": "WITA", "MESZ": "MESZ", "HEEG": "HEEG", "CHAST": "CHAST", "HNCU": "HNCU"}, -+ locale: "ha_GH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GH₵", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZDT": "NZDT", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "HECU": "HECU", "SGT": "SGT", "AKDT": "AKDT", "HAT": "HAT", "HENOMX": "HENOMX", "HEPM": "HEPM", "JDT": "JDT", "AEST": "AEST", "CHADT": "CHADT", "GYT": "GYT", "HKT": "HKT", "TMT": "TMT", "WITA": "WITA", "GMT": "GMT", "ACDT": "ACDT", "PST": "PST", "PDT": "PDT", "WAST": "WAST", "COST": "COST", "HEOG": "HEOG", "CST": "CST", "WAT": "WAT", "ARST": "ARST", "SRT": "SRT", "WEZ": "WEZ", "TMST": "TMST", "CAT": "CAT", "UYT": "UYT", "IST": "IST", "WART": "WART", "ADT": "ADT", "MESZ": "MESZ", "LHST": "LHST", "MEZ": "MEZ", "LHDT": "LHDT", "MYT": "MYT", "WARST": "WARST", "MST": "MST", "AST": "AST", "EAT": "EAT", "WIB": "WIB", "BOT": "BOT", "AWDT": "AWDT", "AEDT": "AEDT", "OEZ": "OEZ", "COT": "COT", "HKST": "HKST", "CLT": "CLT", "VET": "VET", "HEPMX": "HEPMX", "WIT": "WIT", "ChST": "ChST", "HAST": "HAST", "UYST": "UYST", "ACWST": "ACWST", "HNCU": "HNCU", "WESZ": "WESZ", "AKST": "AKST", "OESZ": "OESZ", "HADT": "HADT", "ACST": "ACST", "HNOG": "HNOG", "MDT": "MDT", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "JST": "JST", "AWST": "AWST", "BT": "BT", "ECT": "ECT", "CDT": "CDT", "GFT": "GFT", "HNT": "HNT", "EST": "EST", "EDT": "EDT", "NZST": "NZST", "HNEG": "HNEG", "HEEG": "HEEG", "HNPMX": "HNPMX", "SAST": "SAST", "CLST": "CLST", "ART": "ART", "HNPM": "HNPM"}, - } - } -  -@@ -120,7 +101,7 @@ func (ha *ha_GH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ha *ha_GH) MonthsAbbreviated() []string { -- return ha.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +111,7 @@ func (ha *ha_GH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ha *ha_GH) MonthsNarrow() []string { -- return ha.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -140,7 +121,7 @@ func (ha *ha_GH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ha *ha_GH) MonthsWide() []string { -- return ha.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,73 +167,13 @@ func (ha *ha_GH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ha_GH' and handles both Whole and Real numbers based on 'v' - func (ha *ha_GH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ha_GH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ha *ha_GH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ha.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ha_GH' -@@ -260,60 +181,7 @@ func (ha *ha_GH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ha.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ha.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ha_GH' -@@ -322,72 +190,7 @@ func (ha *ha_GH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ha.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyNegativePrefix[j]) -- } -- -- b = append(b, ha.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ha.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ha_GH' -@@ -395,17 +198,6 @@ func (ha *ha_GH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -414,17 +206,6 @@ func (ha *ha_GH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,17 +214,6 @@ func (ha *ha_GH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,19 +222,6 @@ func (ha *ha_GH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ha.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,19 +230,6 @@ func (ha *ha_GH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -494,26 +238,6 @@ func (ha *ha_GH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -522,30 +246,6 @@ func (ha *ha_GH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -554,34 +254,5 @@ func (ha *ha_GH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ha.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ha_NE/ha_NE.go b/ha_NE/ha_NE.go -index 12734aa..703a616 100644 ---- a/ha_NE/ha_NE.go -+++ b/ha_NE/ha_NE.go -@@ -10,64 +10,45 @@ import ( - ) -  - type ha_NE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ha_NE' locale - func New() locales.Translator { - return &ha_NE{ -- locale: "ha_NE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Fab", "Mar", "Afi", "May", "Yun", "Yul", "Agu", "Sat", "Okt", "Nuw", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "Y", "Y", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janairu", "Faburairu", "Maris", "Afirilu", "Mayu", "Yuni", "Yuli", "Agusta", "Satumba", "Oktoba", "Nuwamba", "Disamba"}, -- daysAbbreviated: []string{"Lah", "Lit", "Tal", "Lar", "Alh", "Jum", "Asa"}, -- daysNarrow: []string{"L", "L", "T", "L", "A", "J", "A"}, -- daysShort: []string{"Lh", "Li", "Ta", "Lr", "Al", "Ju", "As"}, -- daysWide: []string{"Lahadi", "Litinin", "Talata", "Laraba", "Alhamis", "Jummaʼa", "Asabar"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"KHAI", "BHAI"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kafin haihuwar annab", "Bayan haihuwar annab"}, -- timezones: map[string]string{"CHAST": "CHAST", "MEZ": "MEZ", "CLST": "CLST", "TMT": "TMT", "ECT": "ECT", "COST": "COST", "EST": "EST", "AWST": "AWST", "LHDT": "LHDT", "GFT": "GFT", "UYST": "UYST", "AWDT": "AWDT", "HEEG": "HEEG", "WART": "WART", "EDT": "EDT", "NZST": "NZST", "ACST": "ACST", "CAT": "CAT", "HENOMX": "HENOMX", "VET": "VET", "HAT": "HAT", "HNOG": "HNOG", "MESZ": "MESZ", "ACDT": "ACDT", "OEZ": "OEZ", "HNT": "HNT", "HNPM": "HNPM", "ADT": "ADT", "HNEG": "HNEG", "WAT": "WAT", "WAST": "WAST", "GYT": "GYT", "HADT": "HADT", "ART": "ART", "WEZ": "WEZ", "AEST": "AEST", "EAT": "EAT", "MST": "MST", "MDT": "MDT", "CST": "CST", "AKST": "AKST", "AKDT": "AKDT", "ARST": "ARST", "HNNOMX": "HNNOMX", "SGT": "SGT", "BT": "BT", "SRT": "SRT", "JST": "JST", "WARST": "WARST", "AST": "AST", "HAST": "HAST", "HEOG": "HEOG", "NZDT": "NZDT", "COT": "COT", "WIB": "WIB", "HKST": "HKST", "SAST": "SAST", "CLT": "CLT", "UYT": "UYT", "∅∅∅": "∅∅∅", "WIT": "WIT", "PDT": "PDT", "IST": "IST", "ChST": "ChST", "GMT": "GMT", "HNPMX": "HNPMX", "MYT": "MYT", "ACWDT": "ACWDT", "AEDT": "AEDT", "CHADT": "CHADT", "LHST": "LHST", "JDT": "JDT", "CDT": "CDT", "PST": "PST", "WESZ": "WESZ", "WITA": "WITA", "HKT": "HKT", "HEPM": "HEPM", "TMST": "TMST", "BOT": "BOT", "OESZ": "OESZ", "HNCU": "HNCU", "HECU": "HECU", "HEPMX": "HEPMX", "ACWST": "ACWST"}, -+ locale: "ha_NE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "HAT": "HAT", "GMT": "GMT", "SRT": "SRT", "PST": "PST", "HKST": "HKST", "WITA": "WITA", "HADT": "HADT", "VET": "VET", "ChST": "ChST", "HNPM": "HNPM", "IST": "IST", "WART": "WART", "CHADT": "CHADT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "JDT": "JDT", "LHST": "LHST", "AEST": "AEST", "HNPMX": "HNPMX", "WAT": "WAT", "MDT": "MDT", "NZDT": "NZDT", "HNT": "HNT", "HEPM": "HEPM", "WAST": "WAST", "COST": "COST", "ECT": "ECT", "AST": "AST", "MST": "MST", "HENOMX": "HENOMX", "TMT": "TMT", "HAST": "HAST", "LHDT": "LHDT", "CHAST": "CHAST", "TMST": "TMST", "CST": "CST", "JST": "JST", "AWST": "AWST", "HECU": "HECU", "HNOG": "HNOG", "EDT": "EDT", "HKT": "HKT", "WIB": "WIB", "ADT": "ADT", "ACDT": "ACDT", "UYT": "UYT", "AKDT": "AKDT", "WARST": "WARST", "WIT": "WIT", "HEOG": "HEOG", "CAT": "CAT", "HEEG": "HEEG", "BT": "BT", "WEZ": "WEZ", "WESZ": "WESZ", "SGT": "SGT", "SAST": "SAST", "CDT": "CDT", "PDT": "PDT", "AWDT": "AWDT", "UYST": "UYST", "ACWDT": "ACWDT", "OEZ": "OEZ", "COT": "COT", "EST": "EST", "ACST": "ACST", "NZST": "NZST", "ARST": "ARST", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "GYT": "GYT", "CLT": "CLT", "ART": "ART", "BOT": "BOT", "AEDT": "AEDT", "HEPMX": "HEPMX", "HNCU": "HNCU", "OESZ": "OESZ", "GFT": "GFT", "MYT": "MYT", "MESZ": "MESZ", "AKST": "AKST", "CLST": "CLST", "EAT": "EAT"}, - } - } -  -@@ -120,7 +101,7 @@ func (ha *ha_NE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ha *ha_NE) MonthsAbbreviated() []string { -- return ha.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +111,7 @@ func (ha *ha_NE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ha *ha_NE) MonthsNarrow() []string { -- return ha.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -140,7 +121,7 @@ func (ha *ha_NE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ha *ha_NE) MonthsWide() []string { -- return ha.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,73 +167,13 @@ func (ha *ha_NE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ha_NE' and handles both Whole and Real numbers based on 'v' - func (ha *ha_NE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ha_NE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ha *ha_NE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ha.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ha_NE' -@@ -260,60 +181,7 @@ func (ha *ha_NE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ha.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ha.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ha_NE' -@@ -322,72 +190,7 @@ func (ha *ha_NE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ha.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyNegativePrefix[j]) -- } -- -- b = append(b, ha.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ha.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ha_NE' -@@ -395,17 +198,6 @@ func (ha *ha_NE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -414,17 +206,6 @@ func (ha *ha_NE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,17 +214,6 @@ func (ha *ha_NE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,19 +222,6 @@ func (ha *ha_NE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ha.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,19 +230,6 @@ func (ha *ha_NE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -494,26 +238,6 @@ func (ha *ha_NE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -522,30 +246,6 @@ func (ha *ha_NE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -554,34 +254,5 @@ func (ha *ha_NE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ha.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ha_NG/ha_NG.go b/ha_NG/ha_NG.go -index ce29474..f90328c 100644 ---- a/ha_NG/ha_NG.go -+++ b/ha_NG/ha_NG.go -@@ -10,64 +10,45 @@ import ( - ) -  - type ha_NG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ha_NG' locale - func New() locales.Translator { - return &ha_NG{ -- locale: "ha_NG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Fab", "Mar", "Afi", "May", "Yun", "Yul", "Agu", "Sat", "Okt", "Nuw", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "Y", "Y", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janairu", "Faburairu", "Maris", "Afirilu", "Mayu", "Yuni", "Yuli", "Agusta", "Satumba", "Oktoba", "Nuwamba", "Disamba"}, -- daysAbbreviated: []string{"Lah", "Lit", "Tal", "Lar", "Alh", "Jum", "Asa"}, -- daysNarrow: []string{"L", "L", "T", "L", "A", "J", "A"}, -- daysShort: []string{"Lh", "Li", "Ta", "Lr", "Al", "Ju", "As"}, -- daysWide: []string{"Lahadi", "Litinin", "Talata", "Laraba", "Alhamis", "Jummaʼa", "Asabar"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"KHAI", "BHAI"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kafin haihuwar annab", "Bayan haihuwar annab"}, -- timezones: map[string]string{"CHAST": "CHAST", "∅∅∅": "∅∅∅", "CAT": "CAT", "GYT": "GYT", "ACWST": "ACWST", "ACST": "ACST", "CHADT": "CHADT", "BT": "BT", "AWDT": "AWDT", "MESZ": "MESZ", "HNCU": "HNCU", "AKST": "AKST", "CDT": "CDT", "WIT": "WIT", "NZST": "NZST", "IST": "IST", "TMT": "TMT", "AST": "AST", "WIB": "WIB", "HEOG": "HEOG", "WESZ": "WESZ", "HKT": "HKT", "MEZ": "MEZ", "JDT": "JDT", "WAST": "WAST", "COST": "COST", "HENOMX": "HENOMX", "SRT": "SRT", "MDT": "MDT", "HNPMX": "HNPMX", "GMT": "GMT", "ARST": "ARST", "WITA": "WITA", "JST": "JST", "ChST": "ChST", "HNEG": "HNEG", "OEZ": "OEZ", "UYT": "UYT", "HNT": "HNT", "HKST": "HKST", "CLST": "CLST", "COT": "COT", "SGT": "SGT", "UYST": "UYST", "AWST": "AWST", "ACDT": "ACDT", "ECT": "ECT", "WART": "WART", "WARST": "WARST", "MYT": "MYT", "HADT": "HADT", "HNPM": "HNPM", "HEPM": "HEPM", "LHDT": "LHDT", "PDT": "PDT", "SAST": "SAST", "CLT": "CLT", "HEEG": "HEEG", "EST": "EST", "HAST": "HAST", "AEST": "AEST", "LHST": "LHST", "CST": "CST", "ACWDT": "ACWDT", "TMST": "TMST", "EDT": "EDT", "MST": "MST", "AEDT": "AEDT", "PST": "PST", "NZDT": "NZDT", "EAT": "EAT", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "VET": "VET", "ART": "ART", "HNOG": "HNOG", "BOT": "BOT", "WAT": "WAT", "ADT": "ADT", "WEZ": "WEZ", "GFT": "GFT", "OESZ": "OESZ", "HECU": "HECU", "HEPMX": "HEPMX", "HAT": "HAT"}, -+ locale: "ha_NG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZDT": "NZDT", "HENOMX": "HENOMX", "AEST": "AEST", "MESZ": "MESZ", "ACWDT": "ACWDT", "HECU": "HECU", "OEZ": "OEZ", "HKT": "HKT", "CDT": "CDT", "MDT": "MDT", "HAST": "HAST", "HAT": "HAT", "COST": "COST", "ACDT": "ACDT", "AWST": "AWST", "UYT": "UYT", "WAT": "WAT", "TMT": "TMT", "TMST": "TMST", "CLT": "CLT", "HEEG": "HEEG", "JDT": "JDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "OESZ": "OESZ", "MYT": "MYT", "LHST": "LHST", "VET": "VET", "AKST": "AKST", "PST": "PST", "COT": "COT", "NZST": "NZST", "CST": "CST", "HNEG": "HNEG", "JST": "JST", "WIB": "WIB", "ChST": "ChST", "ADT": "ADT", "IST": "IST", "AWDT": "AWDT", "AEDT": "AEDT", "WAST": "WAST", "SAST": "SAST", "WITA": "WITA", "ARST": "ARST", "BOT": "BOT", "ACST": "ACST", "HNCU": "HNCU", "WART": "WART", "EST": "EST", "HKST": "HKST", "SRT": "SRT", "PDT": "PDT", "HNOG": "HNOG", "AST": "AST", "EAT": "EAT", "ACWST": "ACWST", "SGT": "SGT", "WEZ": "WEZ", "WESZ": "WESZ", "ECT": "ECT", "BT": "BT", "CHAST": "CHAST", "CHADT": "CHADT", "UYST": "UYST", "HEOG": "HEOG", "CLST": "CLST", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "HEPM": "HEPM", "GYT": "GYT", "CAT": "CAT", "MST": "MST", "HADT": "HADT", "GFT": "GFT", "WARST": "WARST", "EDT": "EDT", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "HNT": "HNT", "WIT": "WIT", "ART": "ART", "GMT": "GMT", "HNPM": "HNPM", "LHDT": "LHDT"}, - } - } -  -@@ -120,7 +101,7 @@ func (ha *ha_NG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ha *ha_NG) MonthsAbbreviated() []string { -- return ha.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +111,7 @@ func (ha *ha_NG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ha *ha_NG) MonthsNarrow() []string { -- return ha.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -140,7 +121,7 @@ func (ha *ha_NG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ha *ha_NG) MonthsWide() []string { -- return ha.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,73 +167,13 @@ func (ha *ha_NG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ha_NG' and handles both Whole and Real numbers based on 'v' - func (ha *ha_NG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ha_NG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ha *ha_NG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ha.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ha_NG' -@@ -260,60 +181,7 @@ func (ha *ha_NG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ha.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, ha.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ha.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ha_NG' -@@ -322,72 +190,7 @@ func (ha *ha_NG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ha.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ha.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ha.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyNegativePrefix[j]) -- } -- -- b = append(b, ha.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ha.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ha.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ha.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ha_NG' -@@ -395,17 +198,6 @@ func (ha *ha_NG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -414,17 +206,6 @@ func (ha *ha_NG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,17 +214,6 @@ func (ha *ha_NG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,19 +222,6 @@ func (ha *ha_NG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ha.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ha.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,19 +230,6 @@ func (ha *ha_NG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -494,26 +238,6 @@ func (ha *ha_NG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -522,30 +246,6 @@ func (ha *ha_NG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -554,34 +254,5 @@ func (ha *ha_NG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ha.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ha.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/haw/haw.go b/haw/haw.go -index ad90353..76333a0 100644 ---- a/haw/haw.go -+++ b/haw/haw.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"BCE", "CE"}, -- timezones: map[string]string{"WESZ": "WESZ", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "EDT": "EDT", "LHDT": "LHDT", "WARST": "WARST", "AST": "AST", "UYST": "UYST", "WIT": "WIT", "PDT": "PDT", "HKST": "HKST", "AEST": "AEST", "MST": "MST", "CST": "CST", "UYT": "UYT", "WAT": "WAT", "HENOMX": "HENOMX", "HNOG": "HNOG", "AKDT": "AKDT", "CDT": "CDT", "GYT": "GYT", "ChST": "ChST", "HAST": "HAST", "WITA": "WITA", "SAST": "SAST", "SRT": "SRT", "HEEG": "HEEG", "CLT": "CLT", "OEZ": "OEZ", "WART": "WART", "EST": "EST", "ARST": "ARST", "∅∅∅": "∅∅∅", "EAT": "EAT", "COT": "COT", "HECU": "HECU", "HADT": "HADT", "HAT": "HAT", "CLST": "CLST", "WEZ": "WEZ", "JST": "JST", "ACST": "ACST", "CAT": "CAT", "COST": "COST", "WIB": "WIB", "HNT": "HNT", "ART": "ART", "BOT": "BOT", "ECT": "ECT", "HEOG": "HEOG", "HNPM": "HNPM", "GFT": "GFT", "AEDT": "AEDT", "JDT": "JDT", "SGT": "SGT", "HNPMX": "HNPMX", "ACWST": "ACWST", "ACWDT": "ACWDT", "NZDT": "NZDT", "CHADT": "CHADT", "TMST": "TMST", "MDT": "MDT", "BT": "BT", "HEPM": "HEPM", "AWST": "AWST", "MESZ": "MESZ", "LHST": "LHST", "HNEG": "HNEG", "AKST": "AKST", "ADT": "ADT", "MYT": "MYT", "ACDT": "ACDT", "WAST": "WAST", "GMT": "GMT", "HEPMX": "HEPMX", "PST": "PST", "AWDT": "AWDT", "CHAST": "CHAST", "IST": "IST", "TMT": "TMT", "OESZ": "OESZ", "VET": "VET", "HKT": "HKT", "NZST": "NZST"}, -+ timezones: map[string]string{"VET": "VET", "CAT": "CAT", "ECT": "ECT", "WIB": "WIB", "MDT": "MDT", "HEPM": "HEPM", "PDT": "PDT", "WAT": "WAT", "HEOG": "HEOG", "EDT": "EDT", "HAST": "HAST", "MESZ": "MESZ", "AWDT": "AWDT", "PST": "PST", "HEPMX": "HEPMX", "CLT": "CLT", "WITA": "WITA", "MST": "MST", "HADT": "HADT", "HNPMX": "HNPMX", "GFT": "GFT", "HAT": "HAT", "ADT": "ADT", "CHAST": "CHAST", "WAST": "WAST", "HNPM": "HNPM", "AKST": "AKST", "HNOG": "HNOG", "TMST": "TMST", "HKT": "HKT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "HNCU": "HNCU", "HECU": "HECU", "AKDT": "AKDT", "HNT": "HNT", "CDT": "CDT", "BOT": "BOT", "JDT": "JDT", "AEDT": "AEDT", "WEZ": "WEZ", "MEZ": "MEZ", "AEST": "AEST", "∅∅∅": "∅∅∅", "NZST": "NZST", "CST": "CST", "ChST": "ChST", "AST": "AST", "HENOMX": "HENOMX", "COST": "COST", "TMT": "TMT", "HKST": "HKST", "WIT": "WIT", "EST": "EST", "GMT": "GMT", "EAT": "EAT", "BT": "BT", "ACWDT": "ACWDT", "CHADT": "CHADT", "NZDT": "NZDT", "HNEG": "HNEG", "ACDT": "ACDT", "OEZ": "OEZ", "CLST": "CLST", "SGT": "SGT", "GYT": "GYT", "HEEG": "HEEG", "MYT": "MYT", "SAST": "SAST", "ART": "ART", "ARST": "ARST", "SRT": "SRT", "AWST": "AWST", "OESZ": "OESZ", "JST": "JST", "UYT": "UYT", "UYST": "UYST", "WARST": "WARST", "COT": "COT", "WART": "WART", "ACST": "ACST", "LHST": "LHST", "ACWST": "ACWST", "IST": "IST", "WESZ": "WESZ"}, - } - } -  -diff --git a/haw_US/haw_US.go b/haw_US/haw_US.go -index 90ffa64..7414b39 100644 ---- a/haw_US/haw_US.go -+++ b/haw_US/haw_US.go -@@ -10,68 +10,45 @@ import ( - ) -  - type haw_US struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'haw_US' locale - func New() locales.Translator { - return &haw_US{ -- locale: "haw_US", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Ian.", "Pep.", "Mal.", "ʻAp.", "Mei", "Iun.", "Iul.", "ʻAu.", "Kep.", "ʻOk.", "Now.", "Kek."}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Ianuali", "Pepeluali", "Malaki", "ʻApelila", "Mei", "Iune", "Iulai", "ʻAukake", "Kepakemapa", "ʻOkakopa", "Nowemapa", "Kekemapa"}, -- daysAbbreviated: []string{"LP", "P1", "P2", "P3", "P4", "P5", "P6"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"LP", "P1", "P2", "P3", "P4", "P5", "P6"}, -- daysWide: []string{"Lāpule", "Poʻakahi", "Poʻalua", "Poʻakolu", "Poʻahā", "Poʻalima", "Poʻaono"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"BCE", "CE"}, -- timezones: map[string]string{"ACWDT": "ACWDT", "AEST": "AEST", "MESZ": "MESZ", "HNCU": "HNCU", "WIB": "WIB", "PST": "PST", "AEDT": "AEDT", "CLT": "CLT", "OEZ": "OEZ", "AWST": "AWST", "CLST": "CLST", "ECT": "ECT", "CAT": "CAT", "HECU": "HECU", "MDT": "MDT", "HNPM": "HNPM", "LHST": "LHST", "CHADT": "CHADT", "SGT": "SGT", "AST": "AST", "CST": "CST", "MYT": "MYT", "AKDT": "AKDT", "ARST": "ARST", "WESZ": "WESZ", "HKST": "HKST", "LHDT": "LHDT", "CHAST": "CHAST", "GYT": "GYT", "AWDT": "AWDT", "WITA": "WITA", "MEZ": "MEZ", "WARST": "WARST", "COST": "COST", "HEPMX": "HEPMX", "HNOG": "HNOG", "HKT": "HKT", "JST": "JST", "ChST": "ChST", "HAST": "HAST", "WIT": "WIT", "COT": "COT", "EST": "EST", "HEOG": "HEOG", "WEZ": "WEZ", "HEPM": "HEPM", "TMST": "TMST", "HNEG": "HNEG", "GFT": "GFT", "HNT": "HNT", "SAST": "SAST", "EAT": "EAT", "HNPMX": "HNPMX", "SRT": "SRT", "ART": "ART", "TMT": "TMT", "EDT": "EDT", "UYT": "UYT", "HADT": "HADT", "HAT": "HAT", "ACST": "ACST", "OESZ": "OESZ", "WART": "WART", "ADT": "ADT", "UYST": "UYST", "WAT": "WAT", "WAST": "WAST", "VET": "VET", "BT": "BT", "NZDT": "NZDT", "JDT": "JDT", "ACDT": "ACDT", "HENOMX": "HENOMX", "GMT": "GMT", "MST": "MST", "PDT": "PDT", "ACWST": "ACWST", "NZST": "NZST", "∅∅∅": "∅∅∅", "BOT": "BOT", "HEEG": "HEEG", "IST": "IST", "HNNOMX": "HNNOMX", "AKST": "AKST", "CDT": "CDT"}, -+ locale: "haw_US", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BOT": "BOT", "BT": "BT", "HEPMX": "HEPMX", "GYT": "GYT", "NZST": "NZST", "NZDT": "NZDT", "GMT": "GMT", "HNNOMX": "HNNOMX", "JDT": "JDT", "ACWST": "ACWST", "AKDT": "AKDT", "CAT": "CAT", "WITA": "WITA", "AWST": "AWST", "∅∅∅": "∅∅∅", "WIT": "WIT", "HNOG": "HNOG", "HEOG": "HEOG", "ECT": "ECT", "CDT": "CDT", "AST": "AST", "SRT": "SRT", "WAT": "WAT", "WAST": "WAST", "AKST": "AKST", "HKT": "HKT", "MST": "MST", "MEZ": "MEZ", "SAST": "SAST", "HKST": "HKST", "CHAST": "CHAST", "PST": "PST", "COST": "COST", "TMST": "TMST", "ADT": "ADT", "MYT": "MYT", "JST": "JST", "HNCU": "HNCU", "WESZ": "WESZ", "CST": "CST", "UYT": "UYT", "HNPMX": "HNPMX", "EST": "EST", "WIB": "WIB", "ART": "ART", "OEZ": "OEZ", "ARST": "ARST", "MDT": "MDT", "HAST": "HAST", "ACST": "ACST", "VET": "VET", "HECU": "HECU", "EDT": "EDT", "CLST": "CLST", "HNEG": "HNEG", "HNPM": "HNPM", "LHDT": "LHDT", "AEST": "AEST", "AEDT": "AEDT", "HADT": "HADT", "HENOMX": "HENOMX", "AWDT": "AWDT", "WEZ": "WEZ", "ChST": "ChST", "MESZ": "MESZ", "SGT": "SGT", "HNT": "HNT", "WARST": "WARST", "TMT": "TMT", "EAT": "EAT", "CHADT": "CHADT", "LHST": "LHST", "WART": "WART", "CLT": "CLT", "HEPM": "HEPM", "PDT": "PDT", "OESZ": "OESZ", "GFT": "GFT", "HAT": "HAT", "HEEG": "HEEG", "ACDT": "ACDT", "ACWDT": "ACWDT", "UYST": "UYST", "IST": "IST", "COT": "COT"}, - } - } -  -@@ -124,7 +101,7 @@ func (haw *haw_US) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (haw *haw_US) MonthsAbbreviated() []string { -- return haw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (haw *haw_US) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (haw *haw_US) MonthsNarrow() []string { -- return haw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (haw *haw_US) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (haw *haw_US) MonthsWide() []string { -- return haw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +167,13 @@ func (haw *haw_US) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'haw_US' and handles both Whole and Real numbers based on 'v' - func (haw *haw_US) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, haw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, haw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, haw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'haw_US' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (haw *haw_US) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, haw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, haw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, haw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'haw_US' -@@ -264,56 +181,7 @@ func (haw *haw_US) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := haw.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, haw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, haw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, haw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, haw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'haw_US' -@@ -322,68 +190,7 @@ func (haw *haw_US) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := haw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, haw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, haw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, haw.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, haw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, haw.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'haw_US' -@@ -391,17 +198,6 @@ func (haw *haw_US) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -410,17 +206,6 @@ func (haw *haw_US) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, haw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -429,17 +214,6 @@ func (haw *haw_US) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, haw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -448,19 +222,6 @@ func (haw *haw_US) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, haw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, haw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,28 +230,6 @@ func (haw *haw_US) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, haw.periodsAbbreviated[0]...) -- } else { -- b = append(b, haw.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -499,35 +238,6 @@ func (haw *haw_US) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, haw.periodsAbbreviated[0]...) -- } else { -- b = append(b, haw.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -536,40 +246,6 @@ func (haw *haw_US) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, haw.periodsAbbreviated[0]...) -- } else { -- b = append(b, haw.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -578,44 +254,5 @@ func (haw *haw_US) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, haw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, haw.periodsAbbreviated[0]...) -- } else { -- b = append(b, haw.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := haw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/he/he.go b/he/he.go -index da31c26..8371912 100644 ---- a/he/he.go -+++ b/he/he.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"לפנה״ס", "לספירה"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"JST": "שעון יפן (חורף)", "HNNOMX": "שעון צפון-מערב מקסיקו (חורף)", "MST": "שעון חורף מקאו", "SRT": "שעון סורינאם", "HAT": "שעון ניופאונדלנד (קיץ)", "IST": "שעון הודו", "EST": "שעון החוף המזרחי (חורף)", "ADT": "שעון האוקיינוס האטלנטי (קיץ)", "HNOG": "שעון מערב גרינלנד (חורף)", "MEZ": "שעון מרכז אירופה (חורף)", "HEEG": "שעון מזרח גרינלנד (קיץ)", "WAT": "שעון מערב אפריקה (חורף)", "MDT": "שעון קיץ מקאו", "WESZ": "שעון מערב אירופה (קיץ)", "NZDT": "שעון ניו זילנד (קיץ)", "GFT": "שעון גיאנה הצרפתית", "WART": "שעון מערב ארגנטינה (חורף)", "HNCU": "שעון קובה (חורף)", "HNPMX": "שעון מערב מקסיקו (חורף)", "WEZ": "שעון מערב אירופה (חורף)", "AEDT": "שעון מזרח אוסטרליה (קיץ)", "HKST": "שעון הונג קונג (קיץ)", "ChST": "שעון צ׳אמורו", "OEZ": "שעון מזרח אירופה (חורף)", "WARST": "שעון מערב ארגנטינה (קיץ)", "COST": "שעון קולומביה (קיץ)", "HECU": "שעון קובה (קיץ)", "VET": "שעון ונצואלה", "AWDT": "שעון מערב אוסטרליה (קיץ)", "SAST": "שעון דרום אפריקה", "CST": "שעון מרכז ארה״ב (חורף)", "TMST": "שעון טורקמניסטן (קיץ)", "ACWDT": "שעון מרכז-מערב אוסטרליה (קיץ)", "ARST": "שעון ארגנטינה (קיץ)", "AWST": "שעון מערב אוסטרליה (חורף)", "AKDT": "שעון אלסקה (קיץ)", "HADT": "שעון האיים האלאוטיים הוואי (קיץ)", "ACST": "שעון מרכז אוסטרליה (חורף)", "MYT": "שעון מלזיה", "UYT": "שעון אורוגוואי (חורף)", "CDT": "שעון מרכז ארה״ב (קיץ)", "AST": "שעון האוקיינוס האטלנטי (חורף)", "MESZ": "שעון מרכז אירופה (קיץ)", "CHADT": "שעון צ׳טהאם (קיץ)", "CAT": "שעון מרכז אפריקה", "ECT": "שעון אקוודור", "SGT": "שעון סינגפור", "BT": "שעון בהוטן", "WITA": "שעון מרכז אינדונזיה", "LHDT": "שעון אי הלורד האו (קיץ)", "HNPM": "שעון סנט פייר ומיקלון (חורף)", "HEPM": "שעון סנט פייר ומיקלון (קיץ)", "CLT": "שעון צ׳ילה (חורף)", "∅∅∅": "שעון אמזונס (קיץ)", "TMT": "שעון טורקמניסטן (חורף)", "HEOG": "שעון מערב גרינלנד (קיץ)", "ART": "שעון ארגנטינה (חורף)", "HKT": "שעון הונג קונג (חורף)", "WIB": "שעון מערב אינדונזיה", "ACDT": "שעון מרכז אוסטרליה (קיץ)", "OESZ": "שעון מזרח אירופה (קיץ)", "COT": "שעון קולומביה (חורף)", "HNEG": "שעון מזרח גרינלנד (חורף)", "GYT": "שעון גיאנה", "LHST": "שעון אי הלורד האו (חורף)", "CHAST": "שעון צ׳טהאם (חורף)", "JDT": "שעון יפן (קיץ)", "AKST": "שעון אלסקה (חורף)", "HAST": "שעון האיים האלאוטיים הוואי (חורף)", "CLST": "שעון צ׳ילה (קיץ)", "WAST": "שעון מערב אפריקה (קיץ)", "HEPMX": "שעון מערב מקסיקו (קיץ)", "ACWST": "שעון מרכז-מערב אוסטרליה (חורף)", "BOT": "שעון בוליביה", "EDT": "שעון החוף המזרחי (קיץ)", "HENOMX": "שעון צפון-מערב מקסיקו (קיץ)", "UYST": "שעון אורוגוואי (קיץ)", "PDT": "שעון מערב ארה״ב (קיץ)", "HNT": "שעון ניופאונדלנד (חורף)", "EAT": "שעון מזרח אפריקה", "GMT": "שעון גריניץ׳\u200f", "WIT": "שעון מזרח אינדונזיה", "PST": "שעון מערב ארה״ב (חורף)", "NZST": "שעון ניו זילנד (חורף)", "AEST": "שעון מזרח אוסטרליה (חורף)"}, -+ timezones: map[string]string{"PDT": "שעון מערב ארה״ב (קיץ)", "HEPMX": "שעון מערב מקסיקו (קיץ)", "SAST": "שעון דרום אפריקה", "EST": "שעון החוף המזרחי (חורף)", "NZST": "שעון ניו זילנד (חורף)", "ADT": "שעון האוקיינוס האטלנטי (קיץ)", "HEPM": "שעון סנט פייר ומיקלון (קיץ)", "HKT": "שעון הונג קונג (חורף)", "HENOMX": "שעון צפון-מערב מקסיקו (קיץ)", "AWST": "שעון מערב אוסטרליה (חורף)", "UYST": "שעון אורוגוואי (קיץ)", "ACDT": "שעון מרכז אוסטרליה (קיץ)", "AWDT": "שעון מערב אוסטרליה (קיץ)", "WAST": "שעון מערב אפריקה (קיץ)", "GFT": "שעון גיאנה הצרפתית", "CDT": "שעון מרכז ארה״ב (קיץ)", "NZDT": "שעון ניו זילנד (קיץ)", "WIB": "שעון מערב אינדונזיה", "HAST": "שעון האיים האלאוטיים הוואי (חורף)", "ARST": "שעון ארגנטינה (קיץ)", "BOT": "שעון בוליביה", "VET": "שעון ונצואלה", "HNPMX": "שעון מערב מקסיקו (חורף)", "OESZ": "שעון מזרח אירופה (קיץ)", "COST": "שעון קולומביה (קיץ)", "HNOG": "שעון מערב גרינלנד (חורף)", "CLST": "שעון צ׳ילה (קיץ)", "UYT": "שעון אורוגוואי (חורף)", "HECU": "שעון קובה (קיץ)", "TMT": "שעון טורקמניסטן (חורף)", "CAT": "שעון מרכז אפריקה", "MST": "שעון חורף מקאו", "LHST": "שעון אי הלורד האו (חורף)", "CHADT": "שעון צ׳טהאם (קיץ)", "WIT": "שעון מזרח אינדונזיה", "HEOG": "שעון מערב גרינלנד (קיץ)", "MEZ": "שעון מרכז אירופה (חורף)", "LHDT": "שעון אי הלורד האו (קיץ)", "MYT": "שעון מלזיה", "JST": "שעון יפן (חורף)", "AKDT": "שעון אלסקה (קיץ)", "ChST": "שעון צ׳אמורו", "HADT": "שעון האיים האלאוטיים הוואי (קיץ)", "AEST": "שעון מזרח אוסטרליה (חורף)", "SGT": "שעון סינגפור", "WITA": "שעון מרכז אינדונזיה", "HNPM": "שעון סנט פייר ומיקלון (חורף)", "BT": "שעון בהוטן", "∅∅∅": "שעון אמזונס (קיץ)", "OEZ": "שעון מזרח אירופה (חורף)", "HAT": "שעון ניופאונדלנד (קיץ)", "GYT": "שעון גיאנה", "HEEG": "שעון מזרח גרינלנד (קיץ)", "HNCU": "שעון קובה (חורף)", "AKST": "שעון אלסקה (חורף)", "HNEG": "שעון מזרח גרינלנד (חורף)", "JDT": "שעון יפן (קיץ)", "IST": "שעון הודו", "AEDT": "שעון מזרח אוסטרליה (קיץ)", "WEZ": "שעון מערב אירופה (חורף)", "HKST": "שעון הונג קונג (קיץ)", "ECT": "שעון אקוודור", "AST": "שעון האוקיינוס האטלנטי (חורף)", "SRT": "שעון סורינאם", "ACWDT": "שעון מרכז-מערב אוסטרליה (קיץ)", "HNT": "שעון ניופאונדלנד (חורף)", "WART": "שעון מערב ארגנטינה (חורף)", "COT": "שעון קולומביה (חורף)", "TMST": "שעון טורקמניסטן (קיץ)", "CLT": "שעון צ׳ילה (חורף)", "MESZ": "שעון מרכז אירופה (קיץ)", "WESZ": "שעון מערב אירופה (קיץ)", "WAT": "שעון מערב אפריקה (חורף)", "WARST": "שעון מערב ארגנטינה (קיץ)", "CST": "שעון מרכז ארה״ב (חורף)", "MDT": "שעון קיץ מקאו", "ACST": "שעון מרכז אוסטרליה (חורף)", "ART": "שעון ארגנטינה (חורף)", "HNNOMX": "שעון צפון-מערב מקסיקו (חורף)", "PST": "שעון מערב ארה״ב (חורף)", "EDT": "שעון החוף המזרחי (קיץ)", "GMT": "שעון גריניץ׳\u200f", "EAT": "שעון מזרח אפריקה", "ACWST": "שעון מרכז-מערב אוסטרליה (חורף)", "CHAST": "שעון צ׳טהאם (חורף)"}, - } - } -  -diff --git a/he_IL/he_IL.go b/he_IL/he_IL.go -index 6d5da2f..bfee389 100644 ---- a/he_IL/he_IL.go -+++ b/he_IL/he_IL.go -@@ -10,68 +10,45 @@ import ( - ) -  - type he_IL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'he_IL' locale - func New() locales.Translator { - return &he_IL{ -- locale: "he_IL", -- pluralsCardinal: []locales.PluralRule{2, 3, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{5, 6}, -- decimal: ".", -- group: ",", -- minus: "‎-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ינו׳", "פבר׳", "מרץ", "אפר׳", "מאי", "יוני", "יולי", "אוג׳", "ספט׳", "אוק׳", "נוב׳", "דצמ׳"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"}, -- daysAbbreviated: []string{"יום א׳", "יום ב׳", "יום ג׳", "יום ד׳", "יום ה׳", "יום ו׳", "שבת"}, -- daysNarrow: []string{"א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"}, -- daysShort: []string{"א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"}, -- daysWide: []string{"יום ראשון", "יום שני", "יום שלישי", "יום רביעי", "יום חמישי", "יום שישי", "יום שבת"}, -- periodsAbbreviated: []string{"לפנה״צ", "אחה״צ"}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"לפנה״צ", "אחה״צ"}, -- erasAbbreviated: []string{"לפנה״ס", "לספירה"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"AEDT": "שעון מזרח אוסטרליה (קיץ)", "LHDT": "שעון אי הלורד האו (קיץ)", "WAT": "שעון מערב אפריקה (חורף)", "HENOMX": "שעון צפון-מערב מקסיקו (קיץ)", "WESZ": "שעון מערב אירופה (קיץ)", "WITA": "שעון מרכז אינדונזיה", "AEST": "שעון מזרח אוסטרליה (חורף)", "WARST": "שעון מערב ארגנטינה (קיץ)", "GMT": "שעון גריניץ׳\u200f", "HADT": "שעון האיים האלאוטיים הוואי (קיץ)", "PDT": "שעון מערב ארה״ב (קיץ)", "NZDT": "שעון ניו זילנד (קיץ)", "ACDT": "שעון מרכז אוסטרליה (קיץ)", "COST": "שעון קולומביה (קיץ)", "HNCU": "שעון קובה (חורף)", "HNPMX": "שעון מערב מקסיקו (חורף)", "HAST": "שעון האיים האלאוטיים הוואי (חורף)", "OESZ": "שעון מזרח אירופה (קיץ)", "CDT": "שעון מרכז ארה״ב (קיץ)", "UYST": "שעון אורוגוואי (קיץ)", "CHAST": "שעון צ׳טהאם (חורף)", "NZST": "שעון ניו זילנד (חורף)", "ADT": "שעון האוקיינוס האטלנטי (קיץ)", "GYT": "שעון גיאנה", "WIT": "שעון מזרח אינדונזיה", "SRT": "שעון סורינאם", "CHADT": "שעון צ׳טהאם (קיץ)", "LHST": "שעון אי הלורד האו (חורף)", "WAST": "שעון מערב אפריקה (קיץ)", "COT": "שעון קולומביה (חורף)", "UYT": "שעון אורוגוואי (חורף)", "AKST": "שעון אלסקה (חורף)", "AWDT": "שעון מערב אוסטרליה (קיץ)", "BOT": "שעון בוליביה", "OEZ": "שעון מזרח אירופה (חורף)", "SGT": "שעון סינגפור", "MST": "שעון חורף מקאו", "AKDT": "שעון אלסקה (קיץ)", "HEOG": "שעון מערב גרינלנד (קיץ)", "MDT": "שעון קיץ מקאו", "ART": "שעון ארגנטינה (חורף)", "MEZ": "שעון מרכז אירופה (חורף)", "SAST": "שעון דרום אפריקה", "IST": "שעון הודו", "JST": "שעון יפן (חורף)", "EAT": "שעון מזרח אפריקה", "EDT": "שעון החוף המזרחי (קיץ)", "CLST": "שעון צ׳ילה (קיץ)", "TMT": "שעון טורקמניסטן (חורף)", "HEPMX": "שעון מערב מקסיקו (קיץ)", "HKT": "שעון הונג קונג (חורף)", "HEPM": "שעון סנט פייר ומיקלון (קיץ)", "TMST": "שעון טורקמניסטן (קיץ)", "ACST": "שעון מרכז אוסטרליה (חורף)", "CAT": "שעון מרכז אפריקה", "VET": "שעון ונצואלה", "ACWST": "שעון מרכז-מערב אוסטרליה (חורף)", "WEZ": "שעון מערב אירופה (חורף)", "ACWDT": "שעון מרכז-מערב אוסטרליה (קיץ)", "HNPM": "שעון סנט פייר ומיקלון (חורף)", "WART": "שעון מערב ארגנטינה (חורף)", "HNNOMX": "שעון צפון-מערב מקסיקו (חורף)", "EST": "שעון החוף המזרחי (חורף)", "HNT": "שעון ניופאונדלנד (חורף)", "ARST": "שעון ארגנטינה (קיץ)", "CLT": "שעון צ׳ילה (חורף)", "HEEG": "שעון מזרח גרינלנד (קיץ)", "HECU": "שעון קובה (קיץ)", "HAT": "שעון ניופאונדלנד (קיץ)", "AST": "שעון האוקיינוס האטלנטי (חורף)", "BT": "שעון בהוטן", "PST": "שעון מערב ארה״ב (חורף)", "AWST": "שעון מערב אוסטרליה (חורף)", "MESZ": "שעון מרכז אירופה (קיץ)", "JDT": "שעון יפן (קיץ)", "∅∅∅": "שעון אמזונס (קיץ)", "ChST": "שעון צ׳אמורו", "ECT": "שעון אקוודור", "HNOG": "שעון מערב גרינלנד (חורף)", "GFT": "שעון גיאנה הצרפתית", "HNEG": "שעון מזרח גרינלנד (חורף)", "CST": "שעון מרכז ארה״ב (חורף)", "MYT": "שעון מלזיה", "WIB": "שעון מערב אינדונזיה", "HKST": "שעון הונג קונג (קיץ)"}, -+ locale: "he_IL", -+ pluralsCardinal: []locales.PluralRule{2, 3, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JST": "JST", "AWDT": "AWDT", "BT": "BT", "PDT": "PDT", "WAST": "WAST", "OEZ": "OEZ", "SRT": "SRT", "MYT": "MYT", "WITA": "WITA", "AST": "AST", "HNPM": "HNPM", "CHAST": "CHAST", "AKDT": "AKDT", "TMST": "TMST", "EST": "EST", "CST": "CST", "GFT": "GFT", "NZST": "NZST", "WIB": "WIB", "HNNOMX": "HNNOMX", "JDT": "JDT", "AEDT": "AEDT", "AKST": "AKST", "WIT": "WIT", "MST": "MST", "WESZ": "WESZ", "EDT": "EDT", "HNEG": "HNEG", "WEZ": "WEZ", "COST": "COST", "ACWST": "ACWST", "EAT": "EAT", "HEPMX": "HEPMX", "SGT": "SGT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "MDT": "MDT", "HENOMX": "HENOMX", "LHDT": "LHDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "CDT": "CDT", "HAST": "HAST", "HADT": "HADT", "MESZ": "MESZ", "HEPM": "HEPM", "UYST": "UYST", "HECU": "HECU", "HKST": "HKST", "BOT": "BOT", "OESZ": "OESZ", "ACST": "ACST", "HNCU": "HNCU", "GMT": "GMT", "UYT": "UYT", "CLT": "CLT", "ARST": "ARST", "ChST": "ChST", "IST": "IST", "COT": "COT", "TMT": "TMT", "GYT": "GYT", "CAT": "CAT", "MEZ": "MEZ", "CHADT": "CHADT", "PST": "PST", "HNPMX": "HNPMX", "HNT": "HNT", "WART": "WART", "ECT": "ECT", "LHST": "LHST", "HAT": "HAT", "HKT": "HKT", "ACDT": "ACDT", "SAST": "SAST", "HEEG": "HEEG", "NZDT": "NZDT", "ART": "ART", "ADT": "ADT", "AWST": "AWST", "AEST": "AEST", "VET": "VET", "WARST": "WARST", "CLST": "CLST", "WAT": "WAT"}, - } - } -  -@@ -157,7 +134,7 @@ func (he *he_IL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (he *he_IL) MonthsAbbreviated() []string { -- return he.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +144,7 @@ func (he *he_IL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (he *he_IL) MonthsNarrow() []string { -- return he.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +154,7 @@ func (he *he_IL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (he *he_IL) MonthsWide() []string { -- return he.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,77 +200,13 @@ func (he *he_IL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'he_IL' and handles both Whole and Real numbers based on 'v' - func (he *he_IL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, he.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, he.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(he.minus) - 1; j >= 0; j-- { -- b = append(b, he.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'he_IL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (he *he_IL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, he.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(he.minus) - 1; j >= 0; j-- { -- b = append(b, he.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, he.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'he_IL' -@@ -301,58 +214,7 @@ func (he *he_IL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := he.currencies[currency] -- l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, he.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, he.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(he.minus) - 1; j >= 0; j-- { -- b = append(b, he.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, he.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, he.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'he_IL' -@@ -361,65 +223,7 @@ func (he *he_IL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := he.currencies[currency] -- l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, he.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, he.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(he.minus) - 1; j >= 0; j-- { -- b = append(b, he.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, he.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, he.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, he.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'he_IL' -@@ -427,17 +231,6 @@ func (he *he_IL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +239,6 @@ func (he *he_IL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0xd7, 0x91}...) -- b = append(b, he.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +247,6 @@ func (he *he_IL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0xd7, 0x91}...) -- b = append(b, he.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +255,6 @@ func (he *he_IL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, he.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0xd7, 0x91}...) -- b = append(b, he.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,15 +263,6 @@ func (he *he_IL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -522,22 +271,6 @@ func (he *he_IL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -546,26 +279,6 @@ func (he *he_IL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -574,30 +287,5 @@ func (he *he_IL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, he.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := he.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/hi/hi.go b/hi/hi.go -index 78da528..7560e50 100644 ---- a/hi/hi.go -+++ b/hi/hi.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ईसा-पूर्व", "ईस्वी"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ईसा-पूर्व", "ईसवी सन"}, -- timezones: map[string]string{"MST": "MST", "MDT": "MDT", "WIT": "पूर्वी इंडोनेशिया समय", "ART": "अर्जेंटीना मानक समय", "HNEG": "पूर्वी ग्रीनलैंड मानक समय", "TMT": "तुर्कमेनिस्तान मानक समय", "COT": "कोलंबिया मानक समय", "HAST": "हवाई–आल्यूशन मानक समय", "WESZ": "पश्चिमी यूरोपीय ग्रीष्\u200dमकालीन समय", "ACWST": "ऑस्\u200dट्रेलियाई केंद्रीय पश्चिमी मानक समय", "HEEG": "पूर्वी ग्रीनलैंड ग्रीष्मकालीन समय", "LHST": "लॉर्ड होवे मानक समय", "EST": "उत्तरी अमेरिकी पूर्वी मानक समय", "CST": "उत्तरी अमेरिकी केंद्रीय मानक समय", "GYT": "गुयाना समय", "WIB": "पश्चिमी इंडोनेशिया समय", "SRT": "सूरीनाम समय", "PST": "उत्तरी अमेरिकी प्रशांत मानक समय", "WEZ": "पश्चिमी यूरोपीय मानक समय", "NZST": "न्यूज़ीलैंड मानक समय", "ChST": "चामोरो मानक समय", "HEPMX": "मेक्सिकन प्रशांत डेलाइट समय", "CHAST": "चैथम मानक समय", "IST": "भारतीय मानक समय", "CLST": "चिली ग्रीष्मकालीन समय", "JDT": "जापान डेलाइट समय", "ECT": "इक्वाडोर समय", "UYT": "उरुग्वे मानक समय", "AEDT": "ऑस्\u200dट्रेलियाई पूर्वी डेलाइट समय", "CLT": "चिली मानक समय", "GFT": "फ़्रेंच गुयाना समय", "ACDT": "ऑस्\u200dट्रेलियाई केंद्रीय डेलाइट समय", "CDT": "उत्तरी अमेरिकी केंद्रीय डेलाइट समय", "AWDT": "ऑस्ट्रेलियाई पश्चिमी डेलाइट समय", "SAST": "दक्षिण अफ़्रीका समय", "JST": "जापान मानक समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन समय", "HEPM": "सेंट पियरे और मिकेलान डेलाइट समय", "CAT": "मध्य अफ़्रीका समय", "WART": "पश्चिमी अर्जेंटीना मानक समय", "ARST": "अर्जेंटीना ग्रीष्मकालीन समय", "HKST": "हाँग काँग ग्रीष्मकालीन समय", "MESZ": "मध्\u200dय यूरोपीय ग्रीष्\u200dमकालीन समय", "LHDT": "लॉर्ड होवे डेलाइट समय", "WAT": "पश्चिम अफ़्रीका मानक समय", "HADT": "हवाई–आल्यूशन डेलाइट समय", "ACWDT": "ऑस्\u200dट्रेलियाई केंद्रीय पश्चिमी डेलाइट समय", "HNOG": "पश्चिमी ग्रीनलैंड मानक समय", "WITA": "मध्य इंडोनेशिया समय", "∅∅∅": "अमेज़न ग्रीष्मकालीन समय", "EAT": "पूर्वी अफ़्रीका समय", "HENOMX": "उत्तर पश्चिमी मेक्सिको डेलाइट समय", "AEST": "ऑस्\u200dट्रेलियाई पूर्वी मानक समय", "AKST": "अलास्\u200dका मानक समय", "MYT": "मलेशिया समय", "PDT": "उत्तरी अमेरिकी प्रशांत डेलाइट समय", "HAT": "न्यूफ़ाउंडलैंड डेलाइट समय", "EDT": "उत्तरी अमेरिकी पूर्वी डेलाइट समय", "HNPMX": "मेक्सिकन प्रशांत मानक समय", "HKT": "हाँग काँग मानक समय", "MEZ": "मध्य यूरोपीय मानक समय", "OEZ": "पूर्वी यूरोपीय मानक समय", "OESZ": "पूर्वी यूरोपीय ग्रीष्मकालीन समय", "SGT": "सिंगापुर समय", "AST": "अटलांटिक मानक समय", "CHADT": "चैथम डेलाइट समय", "BOT": "बोलीविया समय", "GMT": "ग्रीनविच मीन टाइम", "ADT": "अटलांटिक डेलाइट समय", "VET": "वेनेज़ुएला समय", "COST": "कोलंबिया ग्रीष्मकालीन समय", "HNNOMX": "उत्तर पश्चिमी मेक्सिको मानक समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "BT": "भूटान समय", "HNT": "न्यूफ़ाउंडलैंड मानक समय", "NZDT": "न्यूज़ीलैंड डेलाइट समय", "WARST": "पश्चिमी अर्जेंटीना ग्रीष्मकालीन समय", "HNCU": "क्यूबा मानक समय", "HECU": "क्यूबा डेलाइट समय", "AKDT": "अलास्\u200dका डेलाइट समय", "HEOG": "पश्चिमी ग्रीनलैंड ग्रीष्मकालीन समय", "AWST": "ऑस्ट्रेलियाई पश्चिमी मानक समय", "HNPM": "सेंट पियरे और मिकेलान मानक समय", "ACST": "ऑस्\u200dट्रेलियाई केंद्रीय मानक समय", "WAST": "पश्चिम अफ़्रीका ग्रीष्मकालीन समय"}, -+ timezones: map[string]string{"EDT": "उत्तरी अमेरिकी पूर्वी डेलाइट समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन समय", "WITA": "मध्य इंडोनेशिया समय", "NZDT": "न्यूज़ीलैंड डेलाइट समय", "ADT": "अटलांटिक डेलाइट समय", "COST": "कोलंबिया ग्रीष्मकालीन समय", "HEOG": "पश्चिमी ग्रीनलैंड ग्रीष्मकालीन समय", "WIB": "पश्चिमी इंडोनेशिया समय", "HNEG": "पूर्वी ग्रीनलैंड मानक समय", "HNCU": "क्यूबा मानक समय", "SAST": "दक्षिण अफ़्रीका समय", "HADT": "हवाई–आल्यूशन डेलाइट समय", "HEPM": "सेंट पियरे और मिकेलान डेलाइट समय", "UYT": "उरुग्वे मानक समय", "AEDT": "ऑस्\u200dट्रेलियाई पूर्वी डेलाइट समय", "AKST": "अलास्\u200dका मानक समय", "WART": "पश्चिमी अर्जेंटीना मानक समय", "HNOG": "पश्चिमी ग्रीनलैंड मानक समय", "HKT": "हाँग काँग मानक समय", "TMT": "तुर्कमेनिस्तान मानक समय", "LHST": "लॉर्ड होवे मानक समय", "WARST": "पश्चिमी अर्जेंटीना ग्रीष्मकालीन समय", "CAT": "मध्य अफ़्रीका समय", "CLST": "चिली ग्रीष्मकालीन समय", "LHDT": "लॉर्ड होवे डेलाइट समय", "GFT": "फ़्रेंच गुयाना समय", "CDT": "उत्तरी अमेरिकी केंद्रीय डेलाइट समय", "ARST": "अर्जेंटीना ग्रीष्मकालीन समय", "HNPM": "सेंट पियरे और मिकेलान मानक समय", "PST": "उत्तरी अमेरिकी प्रशांत मानक समय", "AKDT": "अलास्\u200dका डेलाइट समय", "HAT": "न्यूफ़ाउंडलैंड डेलाइट समय", "EAT": "पूर्वी अफ़्रीका समय", "MESZ": "मध्\u200dय यूरोपीय ग्रीष्\u200dमकालीन समय", "AEST": "ऑस्\u200dट्रेलियाई पूर्वी मानक समय", "HEPMX": "मेक्सिकन प्रशांत डेलाइट समय", "ChST": "चामोरो मानक समय", "ACWST": "ऑस्\u200dट्रेलियाई केंद्रीय पश्चिमी मानक समय", "WIT": "पूर्वी इंडोनेशिया समय", "HKST": "हाँग काँग ग्रीष्मकालीन समय", "CLT": "चिली मानक समय", "CST": "उत्तरी अमेरिकी केंद्रीय मानक समय", "HAST": "हवाई–आल्यूशन मानक समय", "PDT": "उत्तरी अमेरिकी प्रशांत डेलाइट समय", "WAST": "पश्चिम अफ़्रीका ग्रीष्मकालीन समय", "COT": "कोलंबिया मानक समय", "IST": "भारतीय मानक समय", "SGT": "सिंगापुर समय", "HECU": "क्यूबा डेलाइट समय", "HNPMX": "मेक्सिकन प्रशांत मानक समय", "AWDT": "ऑस्ट्रेलियाई पश्चिमी डेलाइट समय", "HNT": "न्यूफ़ाउंडलैंड मानक समय", "GYT": "गुयाना समय", "MST": "MST", "NZST": "न्यूज़ीलैंड मानक समय", "ECT": "इक्वाडोर समय", "AST": "अटलांटिक मानक समय", "WESZ": "पश्चिमी यूरोपीय ग्रीष्\u200dमकालीन समय", "OEZ": "पूर्वी यूरोपीय मानक समय", "ART": "अर्जेंटीना मानक समय", "HEEG": "पूर्वी ग्रीनलैंड ग्रीष्मकालीन समय", "MYT": "मलेशिया समय", "CHAST": "चैथम मानक समय", "CHADT": "चैथम डेलाइट समय", "EST": "उत्तरी अमेरिकी पूर्वी मानक समय", "GMT": "ग्रीनविच मीन टाइम", "MEZ": "मध्य यूरोपीय मानक समय", "ACDT": "ऑस्\u200dट्रेलियाई केंद्रीय डेलाइट समय", "OESZ": "पूर्वी यूरोपीय ग्रीष्मकालीन समय", "SRT": "सूरीनाम समय", "AWST": "ऑस्ट्रेलियाई पश्चिमी मानक समय", "JDT": "जापान डेलाइट समय", "WEZ": "पश्चिमी यूरोपीय मानक समय", "WAT": "पश्चिम अफ़्रीका मानक समय", "∅∅∅": "ब्राजीलिया ग्रीष्मकालीन समय", "BOT": "बोलीविया समय", "ACST": "ऑस्\u200dट्रेलियाई केंद्रीय मानक समय", "HNNOMX": "उत्तर पश्चिमी मेक्सिको मानक समय", "BT": "भूटान समय", "MDT": "MDT", "HENOMX": "उत्तर पश्चिमी मेक्सिको डेलाइट समय", "JST": "जापान मानक समय", "ACWDT": "ऑस्\u200dट्रेलियाई केंद्रीय पश्चिमी डेलाइट समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "VET": "वेनेज़ुएला समय"}, - } - } -  -diff --git a/hi_IN/hi_IN.go b/hi_IN/hi_IN.go -index 2b68742..c92d974 100644 ---- a/hi_IN/hi_IN.go -+++ b/hi_IN/hi_IN.go -@@ -42,32 +42,13 @@ type hi_IN struct { - // New returns a new instance of translator for the 'hi_IN' locale - func New() locales.Translator { - return &hi_IN{ -- locale: "hi_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "जन॰", "फ़र॰", "मार्च", "अप्रैल", "मई", "जून", "जुल॰", "अग॰", "सित॰", "अक्तू॰", "नव॰", "दिस॰"}, -- monthsNarrow: []string{"", "ज", "फ़", "मा", "अ", "म", "जू", "जु", "अ", "सि", "अ", "न", "दि"}, -- monthsWide: []string{"", "जनवरी", "फ़रवरी", "मार्च", "अप्रैल", "मई", "जून", "जुलाई", "अगस्त", "सितंबर", "अक्तूबर", "नवंबर", "दिसंबर"}, -- daysAbbreviated: []string{"रवि", "सोम", "मंगल", "बुध", "गुरु", "शुक्र", "शनि"}, -- daysNarrow: []string{"र", "सो", "मं", "बु", "गु", "शु", "श"}, -- daysShort: []string{"र", "सो", "मं", "बु", "गु", "शु", "श"}, -- daysWide: []string{"रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"}, -- periodsAbbreviated: []string{"पूर्वाह्न", "अपराह्न"}, -- periodsNarrow: []string{"पू", "अ"}, -- periodsWide: []string{"पूर्वाह्न", "अपराह्न"}, -- erasAbbreviated: []string{"ईसा-पूर्व", "ईस्वी"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ईसा-पूर्व", "ईसवी सन"}, -- timezones: map[string]string{"WAST": "पश्चिम अफ़्रीका ग्रीष्मकालीन समय", "COT": "कोलंबिया मानक समय", "AWST": "ऑस्ट्रेलियाई पश्चिमी मानक समय", "JDT": "जापान डेलाइट समय", "HNPMX": "मेक्सिकन प्रशांत मानक समय", "HNT": "न्यूफ़ाउंडलैंड मानक समय", "HKST": "हाँग काँग ग्रीष्मकालीन समय", "AEST": "ऑस्\u200dट्रेलियाई पूर्वी मानक समय", "MEZ": "मध्य यूरोपीय मानक समय", "MESZ": "मध्\u200dय यूरोपीय ग्रीष्\u200dमकालीन समय", "LHDT": "लॉर्ड होवे डेलाइट समय", "HNEG": "पूर्वी ग्रीनलैंड मानक समय", "CAT": "मध्य अफ़्रीका समय", "AST": "अटलांटिक मानक समय", "WIB": "पश्चिमी इंडोनेशिया समय", "HECU": "क्यूबा डेलाइट समय", "WIT": "पूर्वी इंडोनेशिया समय", "AEDT": "ऑस्\u200dट्रेलियाई पूर्वी डेलाइट समय", "AWDT": "ऑस्ट्रेलियाई पश्चिमी डेलाइट समय", "ARST": "अर्जेंटीना ग्रीष्मकालीन समय", "∅∅∅": "पेरू ग्रीष्मकालीन समय", "WART": "पश्चिमी अर्जेंटीना मानक समय", "CDT": "उत्तरी अमेरिकी केंद्रीय डेलाइट समय", "ART": "अर्जेंटीना मानक समय", "SRT": "सूरीनाम समय", "NZDT": "न्यूज़ीलैंड डेलाइट समय", "WARST": "पश्चिमी अर्जेंटीना ग्रीष्मकालीन समय", "MYT": "मलेशिया समय", "UYT": "उरुग्वे मानक समय", "HADT": "हवाई–आल्यूशन डेलाइट समय", "AKST": "अलास्\u200dका मानक समय", "AKDT": "अलास्\u200dका डेलाइट समय", "HNPM": "सेंट पियरे और मिकेलान मानक समय", "LHST": "लॉर्ड होवे मानक समय", "BOT": "बोलीविया समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "HAT": "न्यूफ़ाउंडलैंड डेलाइट समय", "ACWDT": "ऑस्\u200dट्रेलियाई केंद्रीय पश्चिमी डेलाइट समय", "ACWST": "ऑस्\u200dट्रेलियाई केंद्रीय पश्चिमी मानक समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन समय", "OESZ": "पूर्वी यूरोपीय ग्रीष्मकालीन समय", "SGT": "सिंगापुर समय", "ADT": "अटलांटिक डेलाइट समय", "WEZ": "पश्चिमी यूरोपीय मानक समय", "HEPM": "सेंट पियरे और मिकेलान डेलाइट समय", "IST": "भारतीय मानक समय", "CLST": "चिली ग्रीष्मकालीन समय", "GFT": "फ़्रेंच गुयाना समय", "ECT": "इक्वाडोर समय", "HNCU": "क्यूबा मानक समय", "BT": "भूटान समय", "EST": "उत्तरी अमेरिकी पूर्वी मानक समय", "MDT": "MDT", "CST": "उत्तरी अमेरिकी केंद्रीय मानक समय", "HNOG": "पश्चिमी ग्रीनलैंड मानक समय", "HEEG": "पूर्वी ग्रीनलैंड ग्रीष्मकालीन समय", "ACDT": "ऑस्\u200dट्रेलियाई केंद्रीय डेलाइट समय", "EAT": "पूर्वी अफ़्रीका समय", "HEPMX": "मेक्सिकन प्रशांत डेलाइट समय", "PDT": "उत्तरी अमेरिकी प्रशांत डेलाइट समय", "CHADT": "चैथम डेलाइट समय", "HKT": "हाँग काँग मानक समय", "ChST": "चामोरो मानक समय", "EDT": "उत्तरी अमेरिकी पूर्वी डेलाइट समय", "MST": "MST", "WESZ": "पश्चिमी यूरोपीय ग्रीष्\u200dमकालीन समय", "HNNOMX": "उत्तर पश्चिमी मेक्सिको मानक समय", "HAST": "हवाई–आल्यूशन मानक समय", "VET": "वेनेज़ुएला समय", "CLT": "चिली मानक समय", "GMT": "ग्रीनविच मीन टाइम", "GYT": "गुयाना समय", "HEOG": "पश्चिमी ग्रीनलैंड ग्रीष्मकालीन समय", "TMT": "तुर्कमेनिस्तान मानक समय", "OEZ": "पूर्वी यूरोपीय मानक समय", "HENOMX": "उत्तर पश्चिमी मेक्सिको डेलाइट समय", "COST": "कोलंबिया ग्रीष्मकालीन समय", "NZST": "न्यूज़ीलैंड मानक समय", "CHAST": "चैथम मानक समय", "SAST": "दक्षिण अफ़्रीका समय", "JST": "जापान मानक समय", "ACST": "ऑस्\u200dट्रेलियाई केंद्रीय मानक समय", "WAT": "पश्चिम अफ़्रीका मानक समय", "PST": "उत्तरी अमेरिकी प्रशांत मानक समय", "WITA": "मध्य इंडोनेशिया समय"}, -+ locale: "hi_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZST": "NZST", "HNPM": "HNPM", "LHDT": "LHDT", "PST": "PST", "GFT": "GFT", "WARST": "WARST", "HNOG": "HNOG", "HKST": "HKST", "ACWDT": "ACWDT", "UYST": "UYST", "HECU": "HECU", "GYT": "GYT", "CST": "CST", "AWDT": "AWDT", "ACWST": "ACWST", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "JDT": "JDT", "HNT": "HNT", "HEOG": "HEOG", "COST": "COST", "EST": "EST", "WIB": "WIB", "HADT": "HADT", "PDT": "PDT", "BT": "BT", "AKDT": "AKDT", "TMT": "TMT", "SRT": "SRT", "CHAST": "CHAST", "HENOMX": "HENOMX", "MYT": "MYT", "AEDT": "AEDT", "CHADT": "CHADT", "OEZ": "OEZ", "GMT": "GMT", "UYT": "UYT", "WEZ": "WEZ", "WAT": "WAT", "AST": "AST", "HNEG": "HNEG", "ACDT": "ACDT", "AWST": "AWST", "HNPMX": "HNPMX", "COT": "COT", "CAT": "CAT", "ART": "ART", "ChST": "ChST", "BOT": "BOT", "HNCU": "HNCU", "WESZ": "WESZ", "SGT": "SGT", "WART": "WART", "CLST": "CLST", "∅∅∅": "∅∅∅", "SAST": "SAST", "CLT": "CLT", "ECT": "ECT", "MST": "MST", "MDT": "MDT", "ADT": "ADT", "VET": "VET", "OESZ": "OESZ", "CDT": "CDT", "MESZ": "MESZ", "AKST": "AKST", "WIT": "WIT", "WITA": "WITA", "HEEG": "HEEG", "HEPMX": "HEPMX", "LHST": "LHST", "AEST": "AEST", "IST": "IST", "EDT": "EDT", "TMST": "TMST", "ARST": "ARST", "EAT": "EAT", "ACST": "ACST", "HEPM": "HEPM", "JST": "JST", "WAST": "WAST", "HAT": "HAT", "HKT": "HKT", "NZDT": "NZDT", "HAST": "HAST"}, - } - } -  -@@ -145,7 +126,7 @@ func (hi *hi_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (hi *hi_IN) MonthsAbbreviated() []string { -- return hi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -155,7 +136,7 @@ func (hi *hi_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (hi *hi_IN) MonthsNarrow() []string { -- return hi.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -165,7 +146,7 @@ func (hi *hi_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (hi *hi_IN) MonthsWide() []string { -- return hi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -211,82 +192,13 @@ func (hi *hi_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'hi_IN' and handles both Whole and Real numbers based on 'v' - func (hi *hi_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, hi.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'hi_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (hi *hi_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hi.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, hi.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'hi_IN' -@@ -294,65 +206,7 @@ func (hi *hi_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hi.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, hi.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, hi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'hi_IN' -@@ -361,73 +215,7 @@ func (hi *hi_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hi.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, hi.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, hi.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'hi_IN' -@@ -435,17 +223,6 @@ func (hi *hi_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -454,27 +231,6 @@ func (hi *hi_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,17 +239,6 @@ func (hi *hi_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, hi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -502,19 +247,6 @@ func (hi *hi_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, hi.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, hi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -523,28 +255,6 @@ func (hi *hi_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, hi.periodsAbbreviated[0]...) -- } else { -- b = append(b, hi.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -553,35 +263,6 @@ func (hi *hi_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, hi.periodsAbbreviated[0]...) -- } else { -- b = append(b, hi.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -590,40 +271,6 @@ func (hi *hi_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, hi.periodsAbbreviated[0]...) -- } else { -- b = append(b, hi.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -632,44 +279,5 @@ func (hi *hi_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, hi.periodsAbbreviated[0]...) -- } else { -- b = append(b, hi.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := hi.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/hr/hr.go b/hr/hr.go -index 5fa3fc0..5eecf26 100644 ---- a/hr/hr.go -+++ b/hr/hr.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"pr. Kr.", "po. Kr."}, - erasNarrow: []string{"pr.n.e.", "AD"}, - erasWide: []string{"prije Krista", "poslije Krista"}, -- timezones: map[string]string{"HADT": "havajsko-aleutsko ljetno vrijeme", "WESZ": "zapadnoeuropsko ljetno vrijeme", "SAST": "južnoafričko vrijeme", "IST": "indijsko vrijeme", "TMST": "turkmenistansko ljetno vrijeme", "EST": "istočno standardno vrijeme", "HEPMX": "meksičko pacifičko ljetno vrijeme", "SRT": "surinamsko vrijeme", "NZDT": "novozelandsko ljetno vrijeme", "UYST": "urugvajsko ljetno vrijeme", "COT": "kolumbijsko standardno vrijeme", "EDT": "istočno ljetno vrijeme", "GYT": "gvajansko vrijeme", "LHST": "standardno vrijeme otoka Lord Howe", "JDT": "japansko ljetno vrijeme", "GMT": "univerzalno vrijeme", "AKST": "aljaško standardno vrijeme", "CST": "središnje standardno vrijeme", "GFT": "vrijeme Francuske Gvajane", "WART": "zapadno-argentinsko standardno vrijeme", "WARST": "zapadno-argentinsko ljetno vrijeme", "WEZ": "zapadnoeuropsko standardno vrijeme", "ECT": "ekvadorsko vrijeme", "CDT": "središnje ljetno vrijeme", "HAT": "newfoundlandsko ljetno vrijeme", "∅∅∅": "amazonsko ljetno vrijeme", "SGT": "singapursko vrijeme", "AKDT": "aljaško ljetno vrijeme", "MYT": "malezijsko vrijeme", "ACWDT": "australsko središnje zapadno ljetno vrijeme", "WITA": "srednjoindonezijsko vrijeme", "MEZ": "srednjoeuropsko standardno vrijeme", "CHADT": "ljetno vrijeme Chathama", "JST": "japansko standardno vrijeme", "EAT": "istočnoafričko vrijeme", "HENOMX": "sjeverozapadno meksičko ljetno vrijeme", "UYT": "urugvajsko standardno vrijeme", "AST": "atlantsko standardno vrijeme", "ART": "argentinsko standardno vrijeme", "AEST": "istočnoaustralsko standardno vrijeme", "MESZ": "srednjoeuropsko ljetno vrijeme", "NZST": "novozelandsko standardno vrijeme", "CLST": "čileansko ljetno vrijeme", "TMT": "turkmenistansko standardno vrijeme", "CAT": "srednjoafričko vrijeme", "WIT": "istočnoindonezijsko vrijeme", "ARST": "argentinsko ljetno vrijeme", "AWST": "zapadnoaustralsko standardno vrijeme", "ACDT": "srednjoaustralsko ljetno vrijeme", "HNPM": "standardno vrijeme za Sveti Petar i Mikelon", "CHAST": "standardno vrijeme Chathama", "HNEG": "istočnogrenlandsko standardno vrijeme", "WAST": "zapadnoafričko ljetno vrijeme", "OESZ": "istočnoeuropsko ljetno vrijeme", "ADT": "atlantsko ljetno vrijeme", "WIB": "zapadnoindonezijsko vrijeme", "HNT": "newfoundlandsko standardno vrijeme", "HEOG": "zapadnogrenlandsko ljetno vrijeme", "LHDT": "ljetno vrijeme otoka Lord Howe", "ChST": "standardno vrijeme Chamorra", "HEEG": "istočnogrenlandsko ljetno vrijeme", "HNCU": "kubansko standardno vrijeme", "VET": "venezuelsko vrijeme", "BT": "butansko vrijeme", "HEPM": "ljetno vrijeme za Sveti Petar i Mikelon", "ACST": "srednjoaustralsko standardno vrijeme", "WAT": "zapadnoafričko standardno vrijeme", "COST": "kolumbijsko ljetno vrijeme", "HAST": "havajsko-aleutsko standardno vrijeme", "HKST": "hongkonško ljetno vrijeme", "CLT": "čileansko standardno vrijeme", "HNNOMX": "sjeverozapadno meksičko standardno vrijeme", "MST": "standardno makaosko vrijeme", "HECU": "kubansko ljetno vrijeme", "PDT": "pacifičko ljetno vrijeme", "ACWST": "australsko središnje zapadno standardno vrijeme", "HNOG": "zapadnogrenlandsko standardno vrijeme", "AEDT": "istočnoaustralsko ljetno vrijeme", "AWDT": "zapadnoaustralsko ljetno vrijeme", "BOT": "bolivijsko vrijeme", "OEZ": "istočnoeuropsko standardno vrijeme", "HNPMX": "meksičko pacifičko standardno vrijeme", "PST": "pacifičko standardno vrijeme", "HKT": "hongkonško standardno vrijeme", "MDT": "ljetno makaosko vrijeme"}, -+ timezones: map[string]string{"WIB": "zapadnoindonezijsko vrijeme", "ARST": "argentinsko ljetno vrijeme", "IST": "indijsko vrijeme", "AEDT": "istočnoaustralsko ljetno vrijeme", "HNOG": "zapadnogrenlandsko standardno vrijeme", "MESZ": "srednjoeuropsko ljetno vrijeme", "TMST": "turkmenistansko ljetno vrijeme", "GMT": "univerzalno vrijeme", "HAT": "newfoundlandsko ljetno vrijeme", "WIT": "istočnoindonezijsko vrijeme", "WITA": "srednjoindonezijsko vrijeme", "JDT": "japansko ljetno vrijeme", "BT": "butansko vrijeme", "HECU": "kubansko ljetno vrijeme", "EST": "istočno standardno vrijeme", "EDT": "istočno ljetno vrijeme", "ART": "argentinsko standardno vrijeme", "HNT": "newfoundlandsko standardno vrijeme", "COT": "kolumbijsko standardno vrijeme", "PDT": "pacifičko ljetno vrijeme", "CHADT": "ljetno vrijeme Chathama", "AKDT": "aljaško ljetno vrijeme", "HKST": "hongkonško ljetno vrijeme", "CAT": "srednjoafričko vrijeme", "MEZ": "srednjoeuropsko standardno vrijeme", "AWDT": "zapadnoaustralsko ljetno vrijeme", "SAST": "južnoafričko vrijeme", "OEZ": "istočnoeuropsko standardno vrijeme", "HKT": "hongkonško standardno vrijeme", "SRT": "surinamsko vrijeme", "∅∅∅": "Acre ljetno vrijeme", "ACWDT": "australsko središnje zapadno ljetno vrijeme", "WESZ": "zapadnoeuropsko ljetno vrijeme", "HNCU": "kubansko standardno vrijeme", "TMT": "turkmenistansko standardno vrijeme", "NZST": "novozelandsko standardno vrijeme", "HAST": "havajsko-aleutsko standardno vrijeme", "ACDT": "srednjoaustralsko ljetno vrijeme", "CHAST": "standardno vrijeme Chathama", "HADT": "havajsko-aleutsko ljetno vrijeme", "AEST": "istočnoaustralsko standardno vrijeme", "AKST": "aljaško standardno vrijeme", "CST": "središnje standardno vrijeme", "ECT": "ekvadorsko vrijeme", "HEEG": "istočnogrenlandsko ljetno vrijeme", "WEZ": "zapadnoeuropsko standardno vrijeme", "GYT": "gvajansko vrijeme", "HNPMX": "meksičko pacifičko standardno vrijeme", "WAST": "zapadnoafričko ljetno vrijeme", "CDT": "središnje ljetno vrijeme", "AST": "atlantsko standardno vrijeme", "HENOMX": "sjeverozapadno meksičko ljetno vrijeme", "HEPM": "ljetno vrijeme za Sveti Petar i Mikelon", "UYT": "urugvajsko standardno vrijeme", "JST": "japansko standardno vrijeme", "PST": "pacifičko standardno vrijeme", "SGT": "singapursko vrijeme", "VET": "venezuelsko vrijeme", "WART": "zapadno-argentinsko standardno vrijeme", "MDT": "planinsko ljetno vrijeme", "ACST": "srednjoaustralsko standardno vrijeme", "AWST": "zapadnoaustralsko standardno vrijeme", "CLT": "čileansko standardno vrijeme", "NZDT": "novozelandsko ljetno vrijeme", "COST": "kolumbijsko ljetno vrijeme", "ADT": "atlantsko ljetno vrijeme", "BOT": "bolivijsko vrijeme", "EAT": "istočnoafričko vrijeme", "MYT": "malezijsko vrijeme", "MST": "planinsko standardno vrijeme", "GFT": "vrijeme Francuske Gvajane", "ChST": "standardno vrijeme Chamorra", "WAT": "zapadnoafričko standardno vrijeme", "OESZ": "istočnoeuropsko ljetno vrijeme", "WARST": "zapadno-argentinsko ljetno vrijeme", "HNNOMX": "sjeverozapadno meksičko standardno vrijeme", "HNPM": "standardno vrijeme za Sveti Petar i Mikelon", "ACWST": "australsko središnje zapadno standardno vrijeme", "UYST": "urugvajsko ljetno vrijeme", "HEPMX": "meksičko pacifičko ljetno vrijeme", "HEOG": "zapadnogrenlandsko ljetno vrijeme", "CLST": "čileansko ljetno vrijeme", "HNEG": "istočnogrenlandsko standardno vrijeme", "LHST": "standardno vrijeme otoka Lord Howe", "LHDT": "ljetno vrijeme otoka Lord Howe"}, - } - } -  -diff --git a/hr_BA/hr_BA.go b/hr_BA/hr_BA.go -index 50ab93c..69ff52a 100644 ---- a/hr_BA/hr_BA.go -+++ b/hr_BA/hr_BA.go -@@ -10,68 +10,46 @@ import ( - ) -  - type hr_BA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'hr_BA' locale - func New() locales.Translator { - return &hr_BA{ -- locale: "hr_BA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "KM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "sij", "velj", "ožu", "tra", "svi", "lip", "srp", "kol", "ruj", "lis", "stu", "pro"}, -- monthsNarrow: []string{"", "1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", "9.", "10.", "11.", "12."}, -- monthsWide: []string{"", "siječnja", "veljače", "ožujka", "travnja", "svibnja", "lipnja", "srpnja", "kolovoza", "rujna", "listopada", "studenoga", "prosinca"}, -- daysAbbreviated: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysNarrow: []string{"N", "P", "U", "S", "Č", "P", "S"}, -- daysShort: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysWide: []string{"nedjelja", "ponedjeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"pr. Kr.", "po. Kr."}, -- erasNarrow: []string{"pr.n.e.", "AD"}, -- erasWide: []string{"prije Krista", "poslije Krista"}, -- timezones: map[string]string{"MDT": "ljetno makaosko vrijeme", "SRT": "surinamsko vrijeme", "HNT": "newfoundlandsko standardno vrijeme", "AEDT": "istočnoaustralsko ljetno vrijeme", "WITA": "srednjoindonezijsko vrijeme", "MEZ": "srednjoeuropsko standardno vrijeme", "LHST": "standardno vrijeme otoka Lord Howe", "OESZ": "istočnoeuropsko ljetno vrijeme", "CLST": "čileansko ljetno vrijeme", "LHDT": "ljetno vrijeme otoka Lord Howe", "AWST": "zapadnoaustralsko standardno vrijeme", "ChST": "standardno vrijeme Chamorra", "PDT": "pacifičko ljetno vrijeme", "COST": "kolumbijsko ljetno vrijeme", "AKST": "aljaško standardno vrijeme", "WESZ": "zapadnoeuropsko ljetno vrijeme", "HEPM": "ljetno vrijeme za Sveti Petar i Mikelon", "NZDT": "novozelandsko ljetno vrijeme", "CHADT": "ljetno vrijeme Chathama", "WART": "zapadno-argentinsko standardno vrijeme", "MESZ": "srednjoeuropsko ljetno vrijeme", "JST": "japansko standardno vrijeme", "EST": "istočno standardno vrijeme", "COT": "kolumbijsko standardno vrijeme", "ARST": "argentinsko ljetno vrijeme", "CLT": "čileansko standardno vrijeme", "TMST": "turkmenistansko ljetno vrijeme", "WAST": "zapadnoafričko ljetno vrijeme", "WAT": "zapadnoafričko standardno vrijeme", "MST": "standardno makaosko vrijeme", "CDT": "središnje ljetno vrijeme", "HEEG": "istočnogrenlandsko ljetno vrijeme", "ACST": "srednjoaustralsko standardno vrijeme", "EDT": "istočno ljetno vrijeme", "UYT": "urugvajsko standardno vrijeme", "AKDT": "aljaško ljetno vrijeme", "PST": "pacifičko standardno vrijeme", "HAT": "newfoundlandsko ljetno vrijeme", "IST": "indijsko vrijeme", "∅∅∅": "peruansko ljetno vrijeme", "HKT": "hongkonško standardno vrijeme", "CHAST": "standardno vrijeme Chathama", "AEST": "istočnoaustralsko standardno vrijeme", "HEPMX": "meksičko pacifičko ljetno vrijeme", "UYST": "urugvajsko ljetno vrijeme", "HAST": "havajsko-aleutsko standardno vrijeme", "VET": "venezuelsko vrijeme", "WIT": "istočnoindonezijsko vrijeme", "SAST": "južnoafričko vrijeme", "HNCU": "kubansko standardno vrijeme", "HECU": "kubansko ljetno vrijeme", "WIB": "zapadnoindonezijsko vrijeme", "HNOG": "zapadnogrenlandsko standardno vrijeme", "HKST": "hongkonško ljetno vrijeme", "HNPM": "standardno vrijeme za Sveti Petar i Mikelon", "NZST": "novozelandsko standardno vrijeme", "ECT": "ekvadorsko vrijeme", "HNPMX": "meksičko pacifičko standardno vrijeme", "ART": "argentinsko standardno vrijeme", "JDT": "japansko ljetno vrijeme", "BOT": "bolivijsko vrijeme", "SGT": "singapursko vrijeme", "GMT": "univerzalno vrijeme", "BT": "butansko vrijeme", "AWDT": "zapadnoaustralsko ljetno vrijeme", "WARST": "zapadno-argentinsko ljetno vrijeme", "OEZ": "istočnoeuropsko standardno vrijeme", "HENOMX": "sjeverozapadno meksičko ljetno vrijeme", "CST": "središnje standardno vrijeme", "HADT": "havajsko-aleutsko ljetno vrijeme", "HEOG": "zapadnogrenlandsko ljetno vrijeme", "WEZ": "zapadnoeuropsko standardno vrijeme", "CAT": "srednjoafričko vrijeme", "AST": "atlantsko standardno vrijeme", "ADT": "atlantsko ljetno vrijeme", "TMT": "turkmenistansko standardno vrijeme", "ACDT": "srednjoaustralsko ljetno vrijeme", "HNNOMX": "sjeverozapadno meksičko standardno vrijeme", "GYT": "gvajansko vrijeme", "MYT": "malezijsko vrijeme", "ACWST": "australsko središnje zapadno standardno vrijeme", "ACWDT": "australsko središnje zapadno ljetno vrijeme", "HNEG": "istočnogrenlandsko standardno vrijeme", "GFT": "vrijeme Francuske Gvajane", "EAT": "istočnoafričko vrijeme"}, -+ locale: "hr_BA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "KM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ daysNarrow: []string{"N", "P", "U", "S", "Č", "P", "S"}, -+ timezones: map[string]string{"COST": "COST", "JST": "JST", "AWDT": "AWDT", "WESZ": "WESZ", "BT": "BT", "AEST": "AEST", "UYT": "UYT", "COT": "COT", "ECT": "ECT", "ART": "ART", "HNPM": "HNPM", "EDT": "EDT", "HNPMX": "HNPMX", "AKDT": "AKDT", "WART": "WART", "CHAST": "CHAST", "PDT": "PDT", "WAT": "WAT", "HAT": "HAT", "NZDT": "NZDT", "AST": "AST", "ACWST": "ACWST", "AWST": "AWST", "AKST": "AKST", "OESZ": "OESZ", "GYT": "GYT", "BOT": "BOT", "MESZ": "MESZ", "HEPM": "HEPM", "ARST": "ARST", "CHADT": "CHADT", "PST": "PST", "∅∅∅": "∅∅∅", "CAT": "CAT", "CDT": "CDT", "ACWDT": "ACWDT", "UYST": "UYST", "SGT": "SGT", "WIT": "WIT", "HKST": "HKST", "MST": "MST", "EAT": "EAT", "HADT": "HADT", "JDT": "JDT", "TMST": "TMST", "WITA": "WITA", "WIB": "WIB", "MYT": "MYT", "HNOG": "HNOG", "HEOG": "HEOG", "HKT": "HKT", "CST": "CST", "MEZ": "MEZ", "WEZ": "WEZ", "EST": "EST", "CLST": "CLST", "HECU": "HECU", "TMT": "TMT", "HEEG": "HEEG", "LHDT": "LHDT", "OEZ": "OEZ", "WARST": "WARST", "CLT": "CLT", "NZST": "NZST", "ChST": "ChST", "VET": "VET", "GFT": "GFT", "ADT": "ADT", "ACST": "ACST", "LHST": "LHST", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "HNT": "HNT", "SAST": "SAST", "MDT": "MDT", "HAST": "HAST", "HNEG": "HNEG", "WAST": "WAST", "SRT": "SRT", "HENOMX": "HENOMX", "AEDT": "AEDT", "HEPMX": "HEPMX", "GMT": "GMT", "IST": "IST", "HNCU": "HNCU"}, - } - } -  -@@ -101,8 +79,8 @@ func (hr *hr_BA) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - n := math.Abs(num) - i := int64(n) - f := locales.F(n, v) -- iMod10 := i % 10 - iMod100 := i % 100 -+ iMod10 := i % 10 - fMod10 := f % 10 - fMod100 := f % 100 -  -@@ -155,7 +133,7 @@ func (hr *hr_BA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (hr *hr_BA) MonthsAbbreviated() []string { -- return hr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -165,7 +143,7 @@ func (hr *hr_BA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (hr *hr_BA) MonthsNarrow() []string { -- return hr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -175,7 +153,7 @@ func (hr *hr_BA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (hr *hr_BA) MonthsWide() []string { -- return hr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -221,73 +199,13 @@ func (hr *hr_BA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'hr_BA' and handles both Whole and Real numbers based on 'v' - func (hr *hr_BA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'hr_BA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (hr *hr_BA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, hr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'hr_BA' -@@ -295,56 +213,7 @@ func (hr *hr_BA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, hr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'hr_BA' -@@ -353,63 +222,7 @@ func (hr *hr_BA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, hr.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, hr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, hr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'hr_BA' -@@ -438,19 +251,6 @@ func (hr *hr_BA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -459,19 +259,6 @@ func (hr *hr_BA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -480,21 +267,6 @@ func (hr *hr_BA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, hr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -503,19 +275,6 @@ func (hr *hr_BA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -524,26 +283,6 @@ func (hr *hr_BA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -552,30 +291,6 @@ func (hr *hr_BA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -584,36 +299,5 @@ func (hr *hr_BA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := hr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/hr_HR/hr_HR.go b/hr_HR/hr_HR.go -index e488be6..639c2a0 100644 ---- a/hr_HR/hr_HR.go -+++ b/hr_HR/hr_HR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type hr_HR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'hr_HR' locale - func New() locales.Translator { - return &hr_HR{ -- locale: "hr_HR", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "sij", "velj", "ožu", "tra", "svi", "lip", "srp", "kol", "ruj", "lis", "stu", "pro"}, -- monthsNarrow: []string{"", "1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", "9.", "10.", "11.", "12."}, -- monthsWide: []string{"", "siječnja", "veljače", "ožujka", "travnja", "svibnja", "lipnja", "srpnja", "kolovoza", "rujna", "listopada", "studenoga", "prosinca"}, -- daysAbbreviated: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysNarrow: []string{"N", "P", "U", "S", "Č", "P", "S"}, -- daysShort: []string{"ned", "pon", "uto", "sri", "čet", "pet", "sub"}, -- daysWide: []string{"nedjelja", "ponedjeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"pr. Kr.", "po. Kr."}, -- erasNarrow: []string{"pr.n.e.", "AD"}, -- erasWide: []string{"prije Krista", "poslije Krista"}, -- timezones: map[string]string{"UYT": "urugvajsko standardno vrijeme", "VET": "venezuelsko vrijeme", "HAT": "newfoundlandsko ljetno vrijeme", "CHAST": "standardno vrijeme Chathama", "SGT": "singapursko vrijeme", "WART": "zapadno-argentinsko standardno vrijeme", "MST": "standardno makaosko vrijeme", "NZDT": "novozelandsko ljetno vrijeme", "ACST": "srednjoaustralsko standardno vrijeme", "ACDT": "srednjoaustralsko ljetno vrijeme", "∅∅∅": "peruansko ljetno vrijeme", "ChST": "standardno vrijeme Chamorra", "CLT": "čileansko standardno vrijeme", "HEPMX": "meksičko pacifičko ljetno vrijeme", "ADT": "atlantsko ljetno vrijeme", "WIB": "zapadnoindonezijsko vrijeme", "HEPM": "ljetno vrijeme za Sveti Petar i Mikelon", "CAT": "srednjoafričko vrijeme", "MYT": "malezijsko vrijeme", "WEZ": "zapadnoeuropsko standardno vrijeme", "HKST": "hongkonško ljetno vrijeme", "CDT": "središnje ljetno vrijeme", "ARST": "argentinsko ljetno vrijeme", "SAST": "južnoafričko vrijeme", "GFT": "vrijeme Francuske Gvajane", "MDT": "ljetno makaosko vrijeme", "COST": "kolumbijsko ljetno vrijeme", "HAST": "havajsko-aleutsko standardno vrijeme", "WIT": "istočnoindonezijsko vrijeme", "PST": "pacifičko standardno vrijeme", "ART": "argentinsko standardno vrijeme", "AWST": "zapadnoaustralsko standardno vrijeme", "WARST": "zapadno-argentinsko ljetno vrijeme", "PDT": "pacifičko ljetno vrijeme", "ACWST": "australsko središnje zapadno standardno vrijeme", "CHADT": "ljetno vrijeme Chathama", "IST": "indijsko vrijeme", "JST": "japansko standardno vrijeme", "HNPMX": "meksičko pacifičko standardno vrijeme", "HECU": "kubansko ljetno vrijeme", "AKST": "aljaško standardno vrijeme", "HADT": "havajsko-aleutsko ljetno vrijeme", "MEZ": "srednjoeuropsko standardno vrijeme", "LHST": "standardno vrijeme otoka Lord Howe", "CLST": "čileansko ljetno vrijeme", "TMST": "turkmenistansko ljetno vrijeme", "ECT": "ekvadorsko vrijeme", "NZST": "novozelandsko standardno vrijeme", "HEEG": "istočnogrenlandsko ljetno vrijeme", "HNPM": "standardno vrijeme za Sveti Petar i Mikelon", "HNCU": "kubansko standardno vrijeme", "EST": "istočno standardno vrijeme", "CST": "središnje standardno vrijeme", "BT": "butansko vrijeme", "SRT": "surinamsko vrijeme", "ACWDT": "australsko središnje zapadno ljetno vrijeme", "HNNOMX": "sjeverozapadno meksičko standardno vrijeme", "HENOMX": "sjeverozapadno meksičko ljetno vrijeme", "AWDT": "zapadnoaustralsko ljetno vrijeme", "BOT": "bolivijsko vrijeme", "HNEG": "istočnogrenlandsko standardno vrijeme", "TMT": "turkmenistansko standardno vrijeme", "OESZ": "istočnoeuropsko ljetno vrijeme", "EDT": "istočno ljetno vrijeme", "AST": "atlantsko standardno vrijeme", "WESZ": "zapadnoeuropsko ljetno vrijeme", "AEST": "istočnoaustralsko standardno vrijeme", "HKT": "hongkonško standardno vrijeme", "WITA": "srednjoindonezijsko vrijeme", "LHDT": "ljetno vrijeme otoka Lord Howe", "WAST": "zapadnoafričko ljetno vrijeme", "GMT": "univerzalno vrijeme", "AKDT": "aljaško ljetno vrijeme", "GYT": "gvajansko vrijeme", "JDT": "japansko ljetno vrijeme", "EAT": "istočnoafričko vrijeme", "AEDT": "istočnoaustralsko ljetno vrijeme", "WAT": "zapadnoafričko standardno vrijeme", "COT": "kolumbijsko standardno vrijeme", "UYST": "urugvajsko ljetno vrijeme", "HNT": "newfoundlandsko standardno vrijeme", "HNOG": "zapadnogrenlandsko standardno vrijeme", "HEOG": "zapadnogrenlandsko ljetno vrijeme", "MESZ": "srednjoeuropsko ljetno vrijeme", "OEZ": "istočnoeuropsko standardno vrijeme"}, -+ locale: "hr_HR", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MST": "MST", "HNPM": "HNPM", "WEZ": "WEZ", "WAT": "WAT", "CLST": "CLST", "CST": "CST", "ART": "ART", "SRT": "SRT", "UYST": "UYST", "PST": "PST", "HNPMX": "HNPMX", "WIT": "WIT", "GYT": "GYT", "TMST": "TMST", "EAT": "EAT", "AWST": "AWST", "LHST": "LHST", "ACWST": "ACWST", "SGT": "SGT", "HKT": "HKT", "HEEG": "HEEG", "HEPMX": "HEPMX", "AKST": "AKST", "ADT": "ADT", "MEZ": "MEZ", "HAT": "HAT", "HNEG": "HNEG", "BT": "BT", "HNOG": "HNOG", "HKST": "HKST", "MDT": "MDT", "MYT": "MYT", "CHADT": "CHADT", "WIB": "WIB", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "AEDT": "AEDT", "UYT": "UYT", "VET": "VET", "GFT": "GFT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "COT": "COT", "EST": "EST", "NZST": "NZST", "ACWDT": "ACWDT", "HNCU": "HNCU", "WAST": "WAST", "OESZ": "OESZ", "WITA": "WITA", "HENOMX": "HENOMX", "MESZ": "MESZ", "ACST": "ACST", "ACDT": "ACDT", "HEPM": "HEPM", "AWDT": "AWDT", "AKDT": "AKDT", "COST": "COST", "ECT": "ECT", "CDT": "CDT", "ARST": "ARST", "BOT": "BOT", "JST": "JST", "AEST": "AEST", "SAST": "SAST", "EDT": "EDT", "TMT": "TMT", "CAT": "CAT", "GMT": "GMT", "AST": "AST", "WESZ": "WESZ", "WART": "WART", "HAST": "HAST", "JDT": "JDT", "CHAST": "CHAST", "OEZ": "OEZ", "HNT": "HNT", "ChST": "ChST", "IST": "IST", "PDT": "PDT", "CLT": "CLT", "HADT": "HADT", "HECU": "HECU", "WARST": "WARST"}, - } - } -  -@@ -101,8 +78,8 @@ func (hr *hr_HR) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - n := math.Abs(num) - i := int64(n) - f := locales.F(n, v) -- iMod10 := i % 10 - iMod100 := i % 100 -+ iMod10 := i % 10 - fMod10 := f % 10 - fMod100 := f % 100 -  -@@ -155,7 +132,7 @@ func (hr *hr_HR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (hr *hr_HR) MonthsAbbreviated() []string { -- return hr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -165,7 +142,7 @@ func (hr *hr_HR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (hr *hr_HR) MonthsNarrow() []string { -- return hr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -175,7 +152,7 @@ func (hr *hr_HR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (hr *hr_HR) MonthsWide() []string { -- return hr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -221,73 +198,13 @@ func (hr *hr_HR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'hr_HR' and handles both Whole and Real numbers based on 'v' - func (hr *hr_HR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'hr_HR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (hr *hr_HR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, hr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'hr_HR' -@@ -295,56 +212,7 @@ func (hr *hr_HR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, hr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'hr_HR' -@@ -353,63 +221,7 @@ func (hr *hr_HR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, hr.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, hr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, hr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'hr_HR' -@@ -417,29 +229,6 @@ func (hr *hr_HR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -448,19 +237,6 @@ func (hr *hr_HR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -469,19 +245,6 @@ func (hr *hr_HR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -490,21 +253,6 @@ func (hr *hr_HR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, hr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -513,19 +261,6 @@ func (hr *hr_HR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -534,26 +269,6 @@ func (hr *hr_HR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,30 +277,6 @@ func (hr *hr_HR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -594,36 +285,5 @@ func (hr *hr_HR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := hr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/hsb/hsb.go b/hsb/hsb.go -index ed30a21..d8ad6f3 100644 ---- a/hsb/hsb.go -+++ b/hsb/hsb.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"př.Chr.n.", "po Chr.n."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"před Chrystowym narodźenjom", "po Chrystowym narodźenju"}, -- timezones: map[string]string{"HNCU": "kubaski standardny čas", "MST": "MST", "AST": "atlantiski standardny čas", "WIB": "zapadoindoneski čas", "ACWDT": "sjedźozapadny awstralski lětni čas", "NZDT": "nowoseelandski lětni čas", "CAT": "centralnoafriski čas", "GMT": "Greenwichski čas", "EST": "sewjeroameriski wuchodny standardny čas", "ADT": "atlantiski lětni čas", "AKDT": "alaskaski lětni čas", "VET": "venezuelski čas", "ART": "argentinski standardny čas", "OEZ": "wuchodoeuropski standardny čas", "HNNOMX": "mexiski sewjerozapadny standardny čas", "HADT": "hawaiisko-aleutski lětni čas", "HKST": "Hongkongski lětni čas", "JST": "japanski standardny čas", "BOT": "boliwiski čas", "ACDT": "srjedźoawstralski lětni čas", "LHST": "standardny čas kupy Lord-Howe", "LHDT": "lětni čas kupy Lord-Howe", "CHAST": "chathamski standardny čas", "COST": "kolumbiski lětni čas", "MDT": "MDT", "WEZ": "zapadoeuropski standardny čas", "WESZ": "zapadoeuropski lětni čas", "MEZ": "srjedźoeuropski standardny čas", "WARST": "zapadoargentinski lětni čas", "WITA": "srjedźoindoneski čas", "SAST": "južnoafriski čas", "SGT": "Singapurski čas", "GYT": "guyanski čas", "HNEG": "wuchodogrönlandski standardny čas", "MESZ": "srjedźoeuropski lětni čas", "MYT": "malajziski čas", "WIT": "wuchodoindoneski", "PDT": "sewjeroameriski pacifiski lětni čas", "ACWST": "srjedźozapadny awstralski standardny čas", "HNT": "nowofundlandski standardny čas", "AEDT": "wuchodoawstralski lětni čas", "HEPM": "lětni čas kupow St. Pierre a Miquelon", "CHADT": "chathamski lětni čas", "∅∅∅": "peruski lětni čas", "PST": "sewjeroameriski pacifiski standardny čas", "AWDT": "zapadoawstralski lětni čas", "ACST": "srjedźoawstralski standardny čas", "WAT": "zapadoafriski standardny čas", "OESZ": "wuchodoeuropski lětni čas", "UYT": "uruguayski standardny čas", "AKST": "alaskaski standardny čas", "CLST": "chilski lětni čas", "EAT": "wuchodoafriski čas", "BT": "bhutanski čas", "ARST": "argentinski lětni čas", "HEOG": "zapadogrönlandski lětni čas", "AWST": "zapadoawstralski standardny čas", "HNPM": "standardny čas kupow St. Pierre a Miquelon", "IST": "indiski čas", "WAST": "zapadoafriski lětni čas", "HECU": "kubaski lětni čas", "SRT": "surinamski čas", "HAT": "nowofundlandski lětni čas", "TMT": "turkmenski standardny čas", "HEPMX": "mexiski pacifiski lětni čas", "CDT": "sewjeroameriski centralny lětni čas", "HAST": "hawaiisko-aleutski standardny čas", "NZST": "nowoseelandski standardny čas", "ECT": "ekwadorski čas", "HNOG": "zapadogrönlandski standardny čas", "JDT": "japanski lětni čas", "CLT": "chilski standardny čas", "HEEG": "wuchodogrönlandski lětni čas", "GFT": "francoskoguyanski čas", "HENOMX": "mexiski sewjerozapadny lětni čas", "EDT": "sewjeroameriski wuchodny lětni čas", "HNPMX": "mexiski pacifiski standardny čas", "UYST": "uruguayski lětni čas", "CST": "sewjeroameriski centralny standardny čas", "TMST": "turkmenski lětni čas", "WART": "zapadoargentinski standardny čas", "COT": "kolumbiski standardny čas", "AEST": "wuchodoawstralski standardny čas", "HKT": "Hongkongski standardny čas", "ChST": "chamorroski čas"}, -+ timezones: map[string]string{"CDT": "sewjeroameriski centralny lětni čas", "HADT": "hawaiisko-aleutski lětni čas", "BT": "bhutanski čas", "GYT": "guyanski čas", "AST": "atlantiski standardny čas", "SRT": "surinamski čas", "AWST": "zapadoawstralski standardny čas", "AWDT": "zapadoawstralski lětni čas", "HNPM": "standardny čas kupow St. Pierre a Miquelon", "JST": "japanski standardny čas", "WART": "zapadoargentinski standardny čas", "CLT": "chilski standardny čas", "PST": "sewjeroameriski pacifiski standardny čas", "OESZ": "wuchodoeuropski lětni čas", "SAST": "južnoafriski čas", "∅∅∅": "acorski lětni čas", "MDT": "MDT", "IST": "indiski čas", "HKT": "Hongkongski standardny čas", "NZST": "nowoseelandski standardny čas", "LHST": "standardny čas kupy Lord-Howe", "ACWDT": "sjedźozapadny awstralski lětni čas", "CHADT": "chathamski lětni čas", "AKST": "alaskaski standardny čas", "HNT": "nowofundlandski standardny čas", "EST": "sewjeroameriski wuchodny standardny čas", "BOT": "boliwiski čas", "HNNOMX": "mexiski sewjerozapadny standardny čas", "HEPM": "lětni čas kupow St. Pierre a Miquelon", "GFT": "francoskoguyanski čas", "COT": "kolumbiski standardny čas", "CAT": "centralnoafriski čas", "MESZ": "srjedźoeuropski lětni čas", "ACDT": "srjedźoawstralski lětni čas", "HEEG": "wuchodogrönlandski lětni čas", "JDT": "japanski lětni čas", "VET": "venezuelski čas", "HAT": "nowofundlandski lětni čas", "HNOG": "zapadogrönlandski standardny čas", "ChST": "chamorroski čas", "MYT": "malajziski čas", "WEZ": "zapadoeuropski standardny čas", "WAT": "zapadoafriski standardny čas", "TMST": "turkmenski lětni čas", "WITA": "srjedźoindoneski čas", "ARST": "argentinski lětni čas", "HNEG": "wuchodogrönlandski standardny čas", "CHAST": "chathamski standardny čas", "HNCU": "kubaski standardny čas", "WIT": "wuchodoindoneski", "WARST": "zapadoargentinski lětni čas", "MST": "MST", "ART": "argentinski standardny čas", "EAT": "wuchodoafriski čas", "AEST": "wuchodoawstralski standardny čas", "AEDT": "wuchodoawstralski lětni čas", "UYT": "uruguayski standardny čas", "HNPMX": "mexiski pacifiski standardny čas", "COST": "kolumbiski lětni čas", "HEPMX": "mexiski pacifiski lětni čas", "NZDT": "nowoseelandski lětni čas", "HAST": "hawaiisko-aleutski standardny čas", "ACST": "srjedźoawstralski standardny čas", "LHDT": "lětni čas kupy Lord-Howe", "ACWST": "srjedźozapadny awstralski standardny čas", "UYST": "uruguayski lětni čas", "SGT": "Singapurski čas", "AKDT": "alaskaski lětni čas", "CLST": "chilski lětni čas", "HECU": "kubaski lětni čas", "HKST": "Hongkongski lětni čas", "TMT": "turkmenski standardny čas", "CST": "sewjeroameriski centralny standardny čas", "WIB": "zapadoindoneski čas", "EDT": "sewjeroameriski wuchodny lětni čas", "ECT": "ekwadorski čas", "HENOMX": "mexiski sewjerozapadny lětni čas", "WESZ": "zapadoeuropski lětni čas", "WAST": "zapadoafriski lětni čas", "ADT": "atlantiski lětni čas", "GMT": "Greenwichski čas", "MEZ": "srjedźoeuropski standardny čas", "PDT": "sewjeroameriski pacifiski lětni čas", "OEZ": "wuchodoeuropski standardny čas", "HEOG": "zapadogrönlandski lětni čas"}, - } - } -  -diff --git a/hsb_DE/hsb_DE.go b/hsb_DE/hsb_DE.go -index d6bdbd8..97e4b3f 100644 ---- a/hsb_DE/hsb_DE.go -+++ b/hsb_DE/hsb_DE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type hsb_DE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'hsb_DE' locale - func New() locales.Translator { - return &hsb_DE{ -- locale: "hsb_DE", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "měr.", "apr.", "mej.", "jun.", "jul.", "awg.", "sep.", "okt.", "now.", "dec."}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januara", "februara", "měrca", "apryla", "meje", "junija", "julija", "awgusta", "septembra", "oktobra", "nowembra", "decembra"}, -- daysAbbreviated: []string{"nje", "pón", "wut", "srj", "štw", "pja", "sob"}, -- daysNarrow: []string{"n", "p", "w", "s", "š", "p", "s"}, -- daysShort: []string{"nj", "pó", "wu", "sr", "št", "pj", "so"}, -- daysWide: []string{"njedźela", "póndźela", "wutora", "srjeda", "štwórtk", "pjatk", "sobota"}, -- periodsAbbreviated: []string{"dopołdnja", "popołdnju"}, -- periodsNarrow: []string{"dop.", "pop."}, -- periodsWide: []string{"dopołdnja", "popołdnju"}, -- erasAbbreviated: []string{"př.Chr.n.", "po Chr.n."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"před Chrystowym narodźenjom", "po Chrystowym narodźenju"}, -- timezones: map[string]string{"HAT": "nowofundlandski lětni čas", "ARST": "argentinski lětni čas", "HNPM": "standardny čas kupow St. Pierre a Miquelon", "NZDT": "nowoseelandski lětni čas", "JST": "japanski standardny čas", "BT": "bhutanski čas", "WEZ": "zapadoeuropski standardny čas", "WESZ": "zapadoeuropski lětni čas", "WIB": "zapadoindoneski čas", "TMST": "turkmenski lětni čas", "OESZ": "wuchodoeuropski lětni čas", "HNCU": "kubaski standardny čas", "AKDT": "alaskaski lětni čas", "HAST": "hawaiisko-aleutski standardny čas", "AWDT": "zapadoawstralski lětni čas", "MEZ": "srjedźoeuropski standardny čas", "TMT": "turkmenski standardny čas", "ACDT": "srjedźoawstralski lětni čas", "HNT": "nowofundlandski standardny čas", "BOT": "boliwiski čas", "HEEG": "wuchodogrönlandski lětni čas", "HKT": "Hongkongski standardny čas", "EST": "sewjeroameriski wuchodny standardny čas", "MYT": "malajziski čas", "CHAST": "chathamski standardny čas", "SGT": "Singapurski čas", "HECU": "kubaski lětni čas", "VET": "venezuelski čas", "AEDT": "wuchodoawstralski lětni čas", "HKST": "Hongkongski lětni čas", "∅∅∅": "Amaconaski lětni čas", "ACST": "srjedźoawstralski standardny čas", "OEZ": "wuchodoeuropski standardny čas", "SRT": "surinamski čas", "HEOG": "zapadogrönlandski lětni čas", "LHDT": "lětni čas kupy Lord-Howe", "AST": "atlantiski standardny čas", "ACWDT": "sjedźozapadny awstralski lětni čas", "CHADT": "chathamski lětni čas", "HNNOMX": "mexiski sewjerozapadny standardny čas", "EAT": "wuchodoafriski čas", "COST": "kolumbiski lětni čas", "UYT": "uruguayski standardny čas", "WITA": "srjedźoindoneski čas", "IST": "indiski čas", "CLST": "chilski lětni čas", "WART": "zapadoargentinski standardny čas", "EDT": "sewjeroameriski wuchodny lětni čas", "MST": "MST", "UYST": "uruguayski lětni čas", "AKST": "alaskaski standardny čas", "HADT": "hawaiisko-aleutski lětni čas", "JDT": "japanski lětni čas", "WAST": "zapadoafriski lětni čas", "CST": "sewjeroameriski centralny standardny čas", "ADT": "atlantiski lětni čas", "HNPMX": "mexiski pacifiski standardny čas", "AEST": "wuchodoawstralski standardny čas", "CAT": "centralnoafriski čas", "WAT": "zapadoafriski standardny čas", "GMT": "Greenwichski čas", "HEPMX": "mexiski pacifiski lětni čas", "CDT": "sewjeroameriski centralny lětni čas", "GYT": "guyanski čas", "HEPM": "lětni čas kupow St. Pierre a Miquelon", "SAST": "južnoafriski čas", "ChST": "chamorroski čas", "HENOMX": "mexiski sewjerozapadny lětni čas", "AWST": "zapadoawstralski standardny čas", "MESZ": "srjedźoeuropski lětni čas", "ECT": "ekwadorski čas", "WIT": "wuchodoindoneski", "ACWST": "srjedźozapadny awstralski standardny čas", "HNEG": "wuchodogrönlandski standardny čas", "CLT": "chilski standardny čas", "MDT": "MDT", "PST": "sewjeroameriski pacifiski standardny čas", "ART": "argentinski standardny čas", "HNOG": "zapadogrönlandski standardny čas", "GFT": "francoskoguyanski čas", "WARST": "zapadoargentinski lětni čas", "COT": "kolumbiski standardny čas", "PDT": "sewjeroameriski pacifiski lětni čas", "LHST": "standardny čas kupy Lord-Howe", "NZST": "nowoseelandski standardny čas"}, -+ locale: "hsb_DE", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "HADT": "HADT", "HEEG": "HEEG", "OEZ": "OEZ", "MST": "MST", "UYST": "UYST", "AKDT": "AKDT", "WAT": "WAT", "CST": "CST", "NZST": "NZST", "MESZ": "MESZ", "AWDT": "AWDT", "LHST": "LHST", "HEPM": "HEPM", "AEST": "AEST", "CAT": "CAT", "GYT": "GYT", "TMT": "TMT", "SGT": "SGT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "EDT": "EDT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "CHADT": "CHADT", "GFT": "GFT", "HEOG": "HEOG", "EST": "EST", "ARST": "ARST", "ACST": "ACST", "VET": "VET", "HKST": "HKST", "CLST": "CLST", "AST": "AST", "PST": "PST", "ACWST": "ACWST", "AKST": "AKST", "COST": "COST", "CDT": "CDT", "MDT": "MDT", "HNEG": "HNEG", "HENOMX": "HENOMX", "HNCU": "HNCU", "ECT": "ECT", "BOT": "BOT", "AWST": "AWST", "CHAST": "CHAST", "WIT": "WIT", "WEZ": "WEZ", "HAT": "HAT", "TMST": "TMST", "MEZ": "MEZ", "MYT": "MYT", "JST": "JST", "JDT": "JDT", "UYT": "UYT", "WESZ": "WESZ", "SAST": "SAST", "CLT": "CLT", "WIB": "WIB", "ADT": "ADT", "ChST": "ChST", "SRT": "SRT", "EAT": "EAT", "HNNOMX": "HNNOMX", "HNT": "HNT", "ACWDT": "ACWDT", "OESZ": "OESZ", "WARST": "WARST", "WART": "WART", "NZDT": "NZDT", "GMT": "GMT", "HAST": "HAST", "IST": "IST", "PDT": "PDT", "BT": "BT", "WAST": "WAST", "COT": "COT", "ART": "ART", "ACDT": "ACDT", "LHDT": "LHDT", "HECU": "HECU", "HNOG": "HNOG", "HKT": "HKT"}, - } - } -  -@@ -134,7 +109,7 @@ func (hsb *hsb_DE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (hsb *hsb_DE) MonthsAbbreviated() []string { -- return hsb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -144,7 +119,7 @@ func (hsb *hsb_DE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (hsb *hsb_DE) MonthsNarrow() []string { -- return hsb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -154,7 +129,7 @@ func (hsb *hsb_DE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (hsb *hsb_DE) MonthsWide() []string { -- return hsb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -200,75 +175,13 @@ func (hsb *hsb_DE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'hsb_DE' and handles both Whole and Real numbers based on 'v' - func (hsb *hsb_DE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hsb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hsb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hsb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'hsb_DE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (hsb *hsb_DE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hsb.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hsb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, hsb.percentSuffix...) -- -- b = append(b, hsb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'hsb_DE' -@@ -276,56 +189,7 @@ func (hsb *hsb_DE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hsb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hsb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hsb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hsb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hsb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, hsb.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'hsb_DE' -@@ -334,63 +198,7 @@ func (hsb *hsb_DE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hsb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hsb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, hsb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, hsb.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hsb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, hsb.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, hsb.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'hsb_DE' -@@ -398,17 +206,6 @@ func (hsb *hsb_DE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -417,17 +214,6 @@ func (hsb *hsb_DE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -436,17 +222,6 @@ func (hsb *hsb_DE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hsb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,19 +230,6 @@ func (hsb *hsb_DE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, hsb.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hsb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -476,17 +238,6 @@ func (hsb *hsb_DE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20, 0x68, 0x6f, 0x64, 0xc5, 0xba}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -495,22 +246,6 @@ func (hsb *hsb_DE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -519,26 +254,6 @@ func (hsb *hsb_DE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -547,30 +262,5 @@ func (hsb *hsb_DE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hsb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := hsb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/hu/hu.go b/hu/hu.go -index 440e200..361ab0a 100644 ---- a/hu/hu.go -+++ b/hu/hu.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"i. e.", "i. sz."}, - erasNarrow: []string{"ie.", "isz."}, - erasWide: []string{"időszámításunk előtt", "időszámításunk szerint"}, -- timezones: map[string]string{"HNOG": "nyugat-grönlandi téli idő", "CDT": "középső államokbeli nyári idő", "UYST": "uruguayi nyári idő", "TMST": "türkmenisztáni nyári idő", "WAT": "nyugat-afrikai téli idő", "OEZ": "kelet-európai téli idő", "HENOMX": "északnyugat-mexikói nyári idő", "AKST": "alaszkai zónaidő", "AKDT": "alaszkai nyári idő", "WIT": "kelet-indonéziai idő", "ACWDT": "közép-nyugat-ausztráliai nyári idő", "WITA": "közép-indonéziai idő", "MEZ": "közép-európai téli idő", "IST": "indiai téli idő", "JDT": "japán nyári idő", "ACWST": "közép-nyugat-ausztráliai téli idő", "HNT": "új-fundlandi zónaidő", "NZST": "új-zélandi téli idő", "EAT": "kelet-afrikai téli idő", "ECT": "ecuadori téli idő", "MYT": "malajziai idő", "UYT": "uruguayi téli idő", "WEZ": "nyugat-európai téli idő", "HAT": "új-fundlandi nyári idő", "HNPM": "Saint Pierre és Miquelon-i zónaidő", "MESZ": "közép-európai nyári idő", "COT": "kolumbiai téli idő", "EDT": "keleti államokbeli nyári idő", "HAST": "hawaii-aleuti téli idő", "SRT": "szurinámi idő", "HNPMX": "mexikói csendes-óceáni zónaidő", "PDT": "csendes-óceáni nyári idő", "HKT": "hongkongi téli idő", "HKST": "hongkongi nyári idő", "CHADT": "chathami nyári idő", "CLST": "chilei nyári idő", "HNEG": "kelet-grönlandi téli idő", "WAST": "nyugat-afrikai nyári idő", "GMT": "greenwichi középidő, téli idő", "PST": "csendes-óceáni zónaidő", "ART": "argentínai téli idő", "OESZ": "kelet-európai nyári idő", "∅∅∅": "perui nyári idő", "HNNOMX": "északnyugat-mexikói zónaidő", "CST": "középső államokbeli zónaidő", "AWST": "nyugat-ausztráliai téli idő", "AWDT": "nyugat-ausztráliai nyári idő", "ChST": "chamorrói téli idő", "AST": "atlanti-óceáni zónaidő", "LHDT": "Lord Howe-szigeti nyári idő", "JST": "japán téli idő", "SGT": "szingapúri téli idő", "HADT": "hawaii-aleuti nyári idő", "AEST": "kelet-ausztráliai téli idő", "CLT": "chilei téli idő", "ACST": "közép-ausztráliai téli idő", "GYT": "guyanai téli idő", "VET": "venezuelai idő", "HEOG": "nyugat-grönlandi nyári idő", "LHST": "Lord Howe-szigeti téli idő", "SAST": "dél-afrikai téli idő", "BOT": "bolíviai téli idő", "HEEG": "kelet-grönlandi nyári idő", "WART": "nyugat-argentínai téli idő", "WARST": "nyugat-argentínai nyári idő", "HECU": "kubai nyári idő", "EST": "keleti államokbeli zónaidő", "MST": "Macaui zónaidő", "MDT": "Macaui nyári idő", "WIB": "nyugat-indonéziai téli idő", "BT": "butáni idő", "ARST": "Argentínai nyári idő", "ACDT": "közép-ausztráliai nyári idő", "HNCU": "kubai téli idő", "AEDT": "kelet-ausztráliai nyári idő", "CHAST": "chathami téli idő", "TMT": "türkmenisztáni téli idő", "CAT": "közép-afrikai téli idő", "COST": "kolumbiai nyári idő", "HEPMX": "mexikói csendes-óceáni nyári idő", "WESZ": "nyugat-európai nyári idő", "NZDT": "új-zélandi nyári idő", "GFT": "francia-guianai idő", "ADT": "atlanti-óceáni nyári idő", "HEPM": "Saint Pierre és Miquelon-i nyári idő"}, -+ timezones: map[string]string{"GYT": "guyanai téli idő", "AST": "atlanti-óceáni zónaidő", "SAST": "dél-afrikai téli idő", "CLT": "chilei téli idő", "WESZ": "nyugat-európai nyári idő", "HNT": "új-fundlandi zónaidő", "HAT": "új-fundlandi nyári idő", "COST": "kolumbiai nyári idő", "HKT": "hongkongi téli idő", "CHAST": "chathami téli idő", "CHADT": "chathami nyári idő", "HEPMX": "mexikói csendes-óceáni nyári idő", "WIB": "nyugat-indonéziai téli idő", "NZDT": "új-zélandi nyári idő", "ARST": "Argentínai nyári idő", "SRT": "szurinámi idő", "HADT": "hawaii-aleuti nyári idő", "ACST": "közép-ausztráliai téli idő", "LHST": "Lord Howe-szigeti téli idő", "HNOG": "nyugat-grönlandi téli idő", "ACDT": "közép-ausztráliai nyári idő", "HNPM": "Saint Pierre és Miquelon-i zónaidő", "UYT": "uruguayi téli idő", "PDT": "csendes-óceáni nyári idő", "ACWST": "közép-nyugat-ausztráliai téli idő", "SGT": "szingapúri téli idő", "HNCU": "kubai téli idő", "WAST": "nyugat-afrikai nyári idő", "MST": "Macaui zónaidő", "ECT": "ecuadori téli idő", "GMT": "greenwichi középidő, téli idő", "BOT": "bolíviai téli idő", "JDT": "japán nyári idő", "LHDT": "Lord Howe-szigeti nyári idő", "MYT": "malajziai idő", "AKST": "alaszkai zónaidő", "GFT": "francia-guianai idő", "CLST": "chilei nyári idő", "CDT": "középső államokbeli nyári idő", "ADT": "atlanti-óceáni nyári idő", "HAST": "hawaii-aleuti téli idő", "BT": "butáni idő", "OESZ": "kelet-európai nyári idő", "HEOG": "nyugat-grönlandi nyári idő", "MDT": "Macaui nyári idő", "ChST": "chamorrói téli idő", "EAT": "kelet-afrikai téli idő", "MEZ": "közép-európai téli idő", "AEST": "kelet-ausztráliai téli idő", "AEDT": "kelet-ausztráliai nyári idő", "HNPMX": "mexikói csendes-óceáni zónaidő", "WEZ": "nyugat-európai téli idő", "WAT": "nyugat-afrikai téli idő", "EST": "keleti államokbeli zónaidő", "AWST": "nyugat-ausztráliai téli idő", "UYST": "uruguayi nyári idő", "ACWDT": "közép-nyugat-ausztráliai nyári idő", "AKDT": "alaszkai nyári idő", "CST": "középső államokbeli zónaidő", "MESZ": "közép-európai nyári idő", "AWDT": "nyugat-ausztráliai nyári idő", "OEZ": "kelet-európai téli idő", "WARST": "nyugat-argentínai nyári idő", "∅∅∅": "brazíliai nyári idő", "NZST": "új-zélandi téli idő", "ART": "argentínai téli idő", "HEEG": "kelet-grönlandi nyári idő", "HECU": "kubai nyári idő", "WIT": "kelet-indonéziai idő", "CAT": "közép-afrikai téli idő", "HNNOMX": "északnyugat-mexikói zónaidő", "IST": "indiai téli idő", "HKST": "hongkongi nyári idő", "HENOMX": "északnyugat-mexikói nyári idő", "JST": "japán téli idő", "WART": "nyugat-argentínai téli idő", "EDT": "keleti államokbeli nyári idő", "TMST": "türkmenisztáni nyári idő", "VET": "venezuelai idő", "COT": "kolumbiai téli idő", "TMT": "türkmenisztáni téli idő", "WITA": "közép-indonéziai idő", "HNEG": "kelet-grönlandi téli idő", "HEPM": "Saint Pierre és Miquelon-i nyári idő", "PST": "csendes-óceáni zónaidő"}, - } - } -  -diff --git a/hu_HU/hu_HU.go b/hu_HU/hu_HU.go -index c1db47b..1783b4d 100644 ---- a/hu_HU/hu_HU.go -+++ b/hu_HU/hu_HU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type hu_HU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'hu_HU' locale - func New() locales.Translator { - return &hu_HU{ -- locale: "hu_HU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "febr.", "márc.", "ápr.", "máj.", "jún.", "júl.", "aug.", "szept.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "Á", "M", "J", "J", "A", "Sz", "O", "N", "D"}, -- monthsWide: []string{"", "január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"}, -- daysAbbreviated: []string{"V", "H", "K", "Sze", "Cs", "P", "Szo"}, -- daysNarrow: []string{"V", "H", "K", "Sz", "Cs", "P", "Sz"}, -- daysShort: []string{"V", "H", "K", "Sze", "Cs", "P", "Szo"}, -- daysWide: []string{"vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"}, -- periodsAbbreviated: []string{"de.", "du."}, -- periodsNarrow: []string{"de.", "du."}, -- periodsWide: []string{"de.", "du."}, -- erasAbbreviated: []string{"i. e.", "i. sz."}, -- erasNarrow: []string{"ie.", "isz."}, -- erasWide: []string{"időszámításunk előtt", "időszámításunk szerint"}, -- timezones: map[string]string{"HECU": "kubai nyári idő", "UYST": "uruguayi nyári idő", "HNNOMX": "északnyugat-mexikói zónaidő", "HNCU": "kubai téli idő", "AKST": "alaszkai zónaidő", "PDT": "csendes-óceáni nyári idő", "HKST": "hongkongi nyári idő", "ACDT": "közép-ausztráliai nyári idő", "CDT": "középső államokbeli nyári idő", "WIT": "kelet-indonéziai idő", "WEZ": "nyugat-európai téli idő", "ARST": "Argentínai nyári idő", "EAT": "kelet-afrikai téli idő", "GMT": "greenwichi középidő, téli idő", "ADT": "atlanti-óceáni nyári idő", "VET": "venezuelai idő", "ACST": "közép-ausztráliai téli idő", "MYT": "malajziai idő", "UYT": "uruguayi téli idő", "HAST": "hawaii-aleuti téli idő", "LHST": "Lord Howe-szigeti téli idő", "JDT": "japán nyári idő", "OESZ": "kelet-európai nyári idő", "HENOMX": "északnyugat-mexikói nyári idő", "AWST": "nyugat-ausztráliai téli idő", "MESZ": "közép-európai nyári idő", "WART": "nyugat-argentínai téli idő", "CST": "középső államokbeli zónaidő", "ACWST": "közép-nyugat-ausztráliai téli idő", "HAT": "új-fundlandi nyári idő", "AWDT": "nyugat-ausztráliai nyári idő", "HEPM": "Saint Pierre és Miquelon-i nyári idő", "∅∅∅": "amazóniai nyári idő", "WAST": "nyugat-afrikai nyári idő", "SGT": "szingapúri téli idő", "EST": "keleti államokbeli zónaidő", "HNT": "új-fundlandi zónaidő", "IST": "indiai téli idő", "CLT": "chilei téli idő", "CAT": "közép-afrikai téli idő", "EDT": "keleti államokbeli nyári idő", "WIB": "nyugat-indonéziai téli idő", "AEST": "kelet-ausztráliai téli idő", "MST": "Macaui zónaidő", "WESZ": "nyugat-európai nyári idő", "LHDT": "Lord Howe-szigeti nyári idő", "NZST": "új-zélandi téli idő", "CHAST": "chathami téli idő", "ChST": "chamorrói téli idő", "HEEG": "kelet-grönlandi nyári idő", "COT": "kolumbiai téli idő", "NZDT": "új-zélandi nyári idő", "WAT": "nyugat-afrikai téli idő", "BT": "butáni idő", "HEOG": "nyugat-grönlandi nyári idő", "HKT": "hongkongi téli idő", "TMST": "türkmenisztáni nyári idő", "OEZ": "kelet-európai téli idő", "ECT": "ecuadori téli idő", "SRT": "szurinámi idő", "ART": "argentínai téli idő", "AEDT": "kelet-ausztráliai nyári idő", "CHADT": "chathami nyári idő", "TMT": "türkmenisztáni téli idő", "MDT": "Macaui nyári idő", "HADT": "hawaii-aleuti nyári idő", "PST": "csendes-óceáni zónaidő", "SAST": "dél-afrikai téli idő", "HNEG": "kelet-grönlandi téli idő", "WARST": "nyugat-argentínai nyári idő", "AST": "atlanti-óceáni zónaidő", "ACWDT": "közép-nyugat-ausztráliai nyári idő", "HNPM": "Saint Pierre és Miquelon-i zónaidő", "MEZ": "közép-európai téli idő", "CLST": "chilei nyári idő", "COST": "kolumbiai nyári idő", "HEPMX": "mexikói csendes-óceáni nyári idő", "AKDT": "alaszkai nyári idő", "WITA": "közép-indonéziai idő", "JST": "japán téli idő", "BOT": "bolíviai téli idő", "GFT": "francia-guianai idő", "HNPMX": "mexikói csendes-óceáni zónaidő", "GYT": "guyanai téli idő", "HNOG": "nyugat-grönlandi téli idő"}, -+ locale: "hu_HU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CAT": "CAT", "NZST": "NZST", "AST": "AST", "GMT": "GMT", "HENOMX": "HENOMX", "AWDT": "AWDT", "WAT": "WAT", "WIT": "WIT", "LHST": "LHST", "BT": "BT", "VET": "VET", "HEPMX": "HEPMX", "AKST": "AKST", "HNOG": "HNOG", "PST": "PST", "HNPMX": "HNPMX", "SRT": "SRT", "HAST": "HAST", "HADT": "HADT", "AWST": "AWST", "JDT": "JDT", "CHADT": "CHADT", "GYT": "GYT", "HKST": "HKST", "ADT": "ADT", "AEDT": "AEDT", "AKDT": "AKDT", "CLST": "CLST", "ART": "ART", "HECU": "HECU", "SAST": "SAST", "TMST": "TMST", "CST": "CST", "MESZ": "MESZ", "UYT": "UYT", "WEZ": "WEZ", "HNT": "HNT", "HEOG": "HEOG", "WITA": "WITA", "MST": "MST", "NZDT": "NZDT", "ECT": "ECT", "HNCU": "HNCU", "GFT": "GFT", "ACDT": "ACDT", "MYT": "MYT", "WIB": "WIB", "BOT": "BOT", "SGT": "SGT", "ARST": "ARST", "HNPM": "HNPM", "PDT": "PDT", "CHAST": "CHAST", "HEPM": "HEPM", "COT": "COT", "MDT": "MDT", "WAST": "WAST", "WART": "WART", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "IST": "IST", "AEST": "AEST", "WESZ": "WESZ", "EST": "EST", "HKT": "HKT", "CLT": "CLT", "CDT": "CDT", "ChST": "ChST", "UYST": "UYST", "ACWST": "ACWST", "HEEG": "HEEG", "COST": "COST", "ACWDT": "ACWDT", "OEZ": "OEZ", "LHDT": "LHDT", "EDT": "EDT", "TMT": "TMT", "HAT": "HAT", "ACST": "ACST", "JST": "JST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "MEZ": "MEZ", "WARST": "WARST", "EAT": "EAT"}, - } - } -  -@@ -142,7 +119,7 @@ func (hu *hu_HU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (hu *hu_HU) MonthsAbbreviated() []string { -- return hu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -152,7 +129,7 @@ func (hu *hu_HU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (hu *hu_HU) MonthsNarrow() []string { -- return hu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -162,7 +139,7 @@ func (hu *hu_HU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (hu *hu_HU) MonthsWide() []string { -- return hu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -208,75 +185,13 @@ func (hu *hu_HU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'hu_HU' and handles both Whole and Real numbers based on 'v' - func (hu *hu_HU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(hu.group) - 1; j >= 0; j-- { -- b = append(b, hu.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'hu_HU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (hu *hu_HU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, hu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'hu_HU' -@@ -284,58 +199,7 @@ func (hu *hu_HU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(hu.group) - 1; j >= 0; j-- { -- b = append(b, hu.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, hu.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'hu_HU' -@@ -344,65 +208,7 @@ func (hu *hu_HU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(hu.group) - 1; j >= 0; j-- { -- b = append(b, hu.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, hu.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, hu.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, hu.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'hu_HU' -@@ -410,29 +216,6 @@ func (hu *hu_HU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -441,18 +224,6 @@ func (hu *hu_HU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -461,18 +232,6 @@ func (hu *hu_HU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -481,19 +240,6 @@ func (hu *hu_HU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, hu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x2c, 0x20}...) -- b = append(b, hu.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -502,15 +248,6 @@ func (hu *hu_HU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,22 +256,6 @@ func (hu *hu_HU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -543,26 +264,6 @@ func (hu *hu_HU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,30 +272,5 @@ func (hu *hu_HU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := hu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/hy/hy.go b/hy/hy.go -index 58a2858..0377512 100644 ---- a/hy/hy.go -+++ b/hy/hy.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Քրիստոսից առաջ", "Քրիստոսից հետո"}, -- timezones: map[string]string{"GMT": "Գրինվիչի ժամանակ", "SGT": "Սինգապուրի ժամանակ", "HECU": "Կուբայի ամառային ժամանակ", "UYST": "Ուրուգվայի ամառային ժամանակ", "HNT": "Նյուֆաունդլենդի ստանդարտ ժամանակ", "HEPM": "Սեն Պիեռ և Միքելոնի ամառային ժամանակ", "CLT": "Չիլիի ստանդարտ ժամանակ", "HAT": "Նյուֆաունդլենդի ամառային ժամանակ", "AEDT": "Արևելյան Ավստրալիայի ամառային ժամանակ", "WITA": "Կենտրոնական Ինդոնեզիայի ժամանակ", "LHDT": "Լորդ Հաուի ամառային ժամանակ", "CHAST": "Չաթեմ կղզու ստանդարտ ժամանակ", "ChST": "Չամոռոյի ժամանակ", "EDT": "Արևելյան Ամերիկայի ամառային ժամանակ", "HEPMX": "Մեքսիկայի խաղաղօվկիանոսյան ամառային ժամանակ", "AKDT": "Ալյասկայի ամառային ժամանակ", "HADT": "Հավայան-ալեության ամառային ժամանակ", "AWST": "Արևմտյան Ավստրալիայի ստանդարտ ժամանակ", "ACST": "Կենտրոնական Ավստրալիայի ստանդարտ ժամանակ", "MST": "MST", "AKST": "Ալյասկայի ստանդարտ ժամանակ", "AST": "Ատլանտյան ստանդարտ ժամանակ", "HAST": "Հավայան-ալեության ստանդարտ ժամանակ", "HNPM": "Սեն Պիեռ և Միքելոնի ստանդարտ ժամանակ", "LHST": "Լորդ Հաուի ստանդարտ ժամանակ", "HNEG": "Արևելյան Գրենլանդիայի ստանդարտ ժամանակ", "WAST": "Արևմտյան Աֆրիկայի ամառային ժամանակ", "COST": "Կոլումբիայի ամառային ժամանակ", "ADT": "Ատլանտյան ամառային ժամանակ", "ARST": "Արգենտինայի ամառային ժամանակ", "NZST": "Նոր Զելանդիայի ստանդարտ ժամանակ", "IST": "Հնդկաստանի ստանդարտ ժամանակ", "JST": "Ճապոնիայի ստանդարտ ժամանակ", "GFT": "Ֆրանսիական Գվիանայի ժամանակ", "CAT": "Կենտրոնական Աֆրիկայի ժամանակ", "COT": "Կոլումբիայի ստանդարտ ժամանակ", "HNNOMX": "Հյուսիսարևմտյան Մեքսիկայի ստանդարտ ժամանակ", "HENOMX": "Հյուսիսարևմտյան Մեքսիկայի ամառային ժամանակ", "AEST": "Արևելյան Ավստրալիայի ստանդարտ ժամանակ", "AWDT": "Արևմտյան Ավստրալիայի ամառային ժամանակ", "CLST": "Չիլիի ամառային ժամանակ", "ACDT": "Կենտրոնական Ավստրալիայի ամառային ժամանակ", "WARST": "Արևմտյան Արգենտինայի ամառային ժամանակ", "WAT": "Արևմտյան Աֆրիկայի ստանդարտ ժամանակ", "OESZ": "Արևելյան Եվրոպայի ամառային ժամանակ", "CHADT": "Չաթեմ կղզու ամառային ժամանակ", "WART": "Արևմտյան Արգենտինայի ստնադարտ ժամանակ", "MYT": "Մալայզիայի ժամանակ", "PST": "Խաղաղօվկիանոսյան ստանդարտ ժամանակ", "PDT": "Խաղաղօվկիանոսյան ամառային ժամանակ", "EAT": "Արևելյան Աֆրիկայի ժամանակ", "VET": "Վենեսուելայի ժամանակ", "SRT": "Սուրինամի ժամանակ", "HKT": "Հոնկոնգի ստանդարտ ժամանակ", "BOT": "Բոլիվիայի ժամանակ", "TMT": "Թուրքմենստանի ստանդարտ ժամանակ", "HNPMX": "Մեքսիկայի խաղաղօվկիանոսյան ստանդարտ ժամանակ", "HEEG": "Արևելյան Գրենլանդիայի ամառային ժամանակ", "EST": "Արևելյան Ամերիկայի ստանդարտ ժամանակ", "WEZ": "Արևմտյան Եվրոպայի ստանդարտ ժամանակ", "ACWDT": "Կենտրոնական Ավստրալիայի արևմտյան ամառային ժամանակ", "∅∅∅": "Պերուի ամառային ժամանակ", "HNOG": "Արևմտյան Գրենլանդիայի ստանդարտ ժամանակ", "NZDT": "Նոր Զելանդիայի ամառային ժամանակ", "SAST": "Հարավային Աֆրիկայի ժամանակ", "MDT": "MDT", "ACWST": "Կենտրոնական Ավստրալիայի արևմտյան ստանդարտ ժամանակ", "MESZ": "Կենտրոնական Եվրոպայի ամառային ժամանակ", "JDT": "Ճապոնիայի ամառային ժամանակ", "MEZ": "Կենտրոնական Եվրոպայի ստանդարտ ժամանակ", "ECT": "Էկվադորի ժամանակ", "HNCU": "Կուբայի ստանդարտ ժամանակ", "UYT": "Ուրուգվայի ստանդարտ ժամանակ", "CST": "Կենտրոնական Ամերիկայի ստանդարտ ժամանակ", "CDT": "Կենտրոնական Ամերիկայի ամառային ժամանակ", "GYT": "Գայանայի ժամանակ", "BT": "Բութանի ժամանակ", "TMST": "Թուրքմենստանի ամառային ժամանակ", "OEZ": "Արևելյան Եվրոպայի ստանդարտ ժամանակ", "WIB": "Արևմտյան Ինդոնեզիայի ժամանակ", "WIT": "Արևելյան Ինդոնեզիայի ժամանակ", "WESZ": "Արևմտյան Եվրոպայի ամառային ժամանակ", "ART": "Արգենտինայի ստնադարտ ժամանակ", "HEOG": "Արևմտյան Գրենլանդիայի ամառային ժամանակ", "HKST": "Հոնկոնգի ամառային ժամանակ"}, -+ timezones: map[string]string{"VET": "Վենեսուելայի ժամանակ", "EST": "Արևելյան Ամերիկայի ստանդարտ ժամանակ", "WITA": "Կենտրոնական Ինդոնեզիայի ժամանակ", "MEZ": "Կենտրոնական Եվրոպայի ստանդարտ ժամանակ", "HNEG": "Արևելյան Գրենլանդիայի ստանդարտ ժամանակ", "JST": "Ճապոնիայի ստանդարտ ժամանակ", "HNPMX": "Մեքսիկայի խաղաղօվկիանոսյան ստանդարտ ժամանակ", "HEPMX": "Մեքսիկայի խաղաղօվկիանոսյան ամառային ժամանակ", "WARST": "Արևմտյան Արգենտինայի ամառային ժամանակ", "HKST": "Հոնկոնգի ամառային ժամանակ", "ART": "Արգենտինայի ստնադարտ ժամանակ", "SRT": "Սուրինամի ժամանակ", "CHADT": "Չաթեմ կղզու ամառային ժամանակ", "PDT": "Խաղաղօվկիանոսյան ամառային ժամանակ", "HNCU": "Կուբայի ստանդարտ ժամանակ", "EDT": "Արևելյան Ամերիկայի ամառային ժամանակ", "EAT": "Արևելյան Աֆրիկայի ժամանակ", "HENOMX": "Հյուսիսարևմտյան Մեքսիկայի ամառային ժամանակ", "HEPM": "Սեն Պիեռ և Միքելոնի ամառային ժամանակ", "WEZ": "Արևմտյան Եվրոպայի ստանդարտ ժամանակ", "HNOG": "Արևմտյան Գրենլանդիայի ստանդարտ ժամանակ", "SAST": "Հարավային Աֆրիկայի ժամանակ", "COST": "Կոլումբիայի ամառային ժամանակ", "CLST": "Չիլիի ամառային ժամանակ", "NZST": "Նոր Զելանդիայի ստանդարտ ժամանակ", "SGT": "Սինգապուրի ժամանակ", "WART": "Արևմտյան Արգենտինայի ստնադարտ ժամանակ", "MYT": "Մալայզիայի ժամանակ", "AEDT": "Արևելյան Ավստրալիայի ամառային ժամանակ", "CHAST": "Չաթեմ կղզու ստանդարտ ժամանակ", "BT": "Բութանի ժամանակ", "HKT": "Հոնկոնգի ստանդարտ ժամանակ", "HNPM": "Սեն Պիեռ և Միքելոնի ստանդարտ ժամանակ", "HNT": "Նյուֆաունդլենդի ստանդարտ ժամանակ", "HADT": "Հավայան-ալեության ամառային ժամանակ", "ACST": "Կենտրոնական Ավստրալիայի ստանդարտ ժամանակ", "HEEG": "Արևելյան Գրենլանդիայի ամառային ժամանակ", "AWDT": "Արևմտյան Ավստրալիայի ամառային ժամանակ", "WESZ": "Արևմտյան Եվրոպայի ամառային ժամանակ", "AKST": "Ալյասկայի ստանդարտ ժամանակ", "OESZ": "Արևելյան Եվրոպայի ամառային ժամանակ", "MESZ": "Կենտրոնական Եվրոպայի ամառային ժամանակ", "∅∅∅": "Ամազոնյան ամառային ժամանակ", "WIT": "Արևելյան Ինդոնեզիայի ժամանակ", "CLT": "Չիլիի ստանդարտ ժամանակ", "AST": "Ատլանտյան ստանդարտ ժամանակ", "ADT": "Ատլանտյան ամառային ժամանակ", "LHDT": "Լորդ Հաուի ամառային ժամանակ", "PST": "Խաղաղօվկիանոսյան ստանդարտ ժամանակ", "WAST": "Արևմտյան Աֆրիկայի ամառային ժամանակ", "CAT": "Կենտրոնական Աֆրիկայի ժամանակ", "ChST": "Չամոռոյի ժամանակ", "HNNOMX": "Հյուսիսարևմտյան Մեքսիկայի ստանդարտ ժամանակ", "ACWST": "Կենտրոնական Ավստրալիայի արևմտյան ստանդարտ ժամանակ", "WAT": "Արևմտյան Աֆրիկայի ստանդարտ ժամանակ", "AKDT": "Ալյասկայի ամառային ժամանակ", "GFT": "Ֆրանսիական Գվիանայի ժամանակ", "TMST": "Թուրքմենստանի ամառային ժամանակ", "MDT": "MDT", "JDT": "Ճապոնիայի ամառային ժամանակ", "ECT": "Էկվադորի ժամանակ", "MST": "MST", "GYT": "Գայանայի ժամանակ", "TMT": "Թուրքմենստանի ստանդարտ ժամանակ", "GMT": "Գրինվիչի ժամանակ", "UYST": "Ուրուգվայի ամառային ժամանակ", "IST": "Հնդկաստանի ստանդարտ ժամանակ", "HAT": "Նյուֆաունդլենդի ամառային ժամանակ", "NZDT": "Նոր Զելանդիայի ամառային ժամանակ", "ARST": "Արգենտինայի ամառային ժամանակ", "HAST": "Հավայան-ալեության ստանդարտ ժամանակ", "AEST": "Արևելյան Ավստրալիայի ստանդարտ ժամանակ", "WIB": "Արևմտյան Ինդոնեզիայի ժամանակ", "CDT": "Կենտրոնական Ամերիկայի ամառային ժամանակ", "BOT": "Բոլիվիայի ժամանակ", "ACDT": "Կենտրոնական Ավստրալիայի ամառային ժամանակ", "AWST": "Արևմտյան Ավստրալիայի ստանդարտ ժամանակ", "LHST": "Լորդ Հաուի ստանդարտ ժամանակ", "HECU": "Կուբայի ամառային ժամանակ", "OEZ": "Արևելյան Եվրոպայի ստանդարտ ժամանակ", "HEOG": "Արևմտյան Գրենլանդիայի ամառային ժամանակ", "COT": "Կոլումբիայի ստանդարտ ժամանակ", "CST": "Կենտրոնական Ամերիկայի ստանդարտ ժամանակ", "ACWDT": "Կենտրոնական Ավստրալիայի արևմտյան ամառային ժամանակ", "UYT": "Ուրուգվայի ստանդարտ ժամանակ"}, - } - } -  -diff --git a/hy_AM/hy_AM.go b/hy_AM/hy_AM.go -index da696d0..3b7ce81 100644 ---- a/hy_AM/hy_AM.go -+++ b/hy_AM/hy_AM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type hy_AM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'hy_AM' locale - func New() locales.Translator { - return &hy_AM{ -- locale: "hy_AM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "հնվ", "փտվ", "մրտ", "ապր", "մյս", "հնս", "հլս", "օգս", "սեպ", "հոկ", "նոյ", "դեկ"}, -- monthsNarrow: []string{"", "Հ", "Փ", "Մ", "Ա", "Մ", "Հ", "Հ", "Օ", "Ս", "Հ", "Ն", "Դ"}, -- monthsWide: []string{"", "հունվարի", "փետրվարի", "մարտի", "ապրիլի", "մայիսի", "հունիսի", "հուլիսի", "օգոստոսի", "սեպտեմբերի", "հոկտեմբերի", "նոյեմբերի", "դեկտեմբերի"}, -- daysAbbreviated: []string{"կիր", "երկ", "երք", "չրք", "հնգ", "ուր", "շբթ"}, -- daysNarrow: []string{"Կ", "Ե", "Ե", "Չ", "Հ", "Ո", "Շ"}, -- daysShort: []string{"կր", "եկ", "եք", "չք", "հգ", "ու", "շբ"}, -- daysWide: []string{"կիրակի", "երկուշաբթի", "երեքշաբթի", "չորեքշաբթի", "հինգշաբթի", "ուրբաթ", "շաբաթ"}, -- periodsAbbreviated: []string{"ԿԱ", "ԿՀ"}, -- periodsNarrow: []string{"ա", "հ"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Քրիստոսից առաջ", "Քրիստոսից հետո"}, -- timezones: map[string]string{"AEST": "Արևելյան Ավստրալիայի ստանդարտ ժամանակ", "HNPM": "Սեն Պիեռ և Միքելոնի ստանդարտ ժամանակ", "HEPM": "Սեն Պիեռ և Միքելոնի ամառային ժամանակ", "CHAST": "Չաթեմ կղզու ստանդարտ ժամանակ", "CLST": "Չիլիի ամառային ժամանակ", "BOT": "Բոլիվիայի ժամանակ", "AKST": "Ալյասկայի ստանդարտ ժամանակ", "ACDT": "Կենտրոնական Ավստրալիայի ամառային ժամանակ", "WAST": "Արևմտյան Աֆրիկայի ամառային ժամանակ", "UYT": "Ուրուգվայի ստանդարտ ժամանակ", "GYT": "Գայանայի ժամանակ", "IST": "Հնդկաստանի ստանդարտ ժամանակ", "HNEG": "Արևելյան Գրենլանդիայի ստանդարտ ժամանակ", "ADT": "Ատլանտյան ամառային ժամանակ", "VET": "Վենեսուելայի ժամանակ", "WEZ": "Արևմտյան Եվրոպայի ստանդարտ ժամանակ", "LHST": "Լորդ Հաուի ստանդարտ ժամանակ", "TMT": "Թուրքմենստանի ստանդարտ ժամանակ", "OESZ": "Արևելյան Եվրոպայի ամառային ժամանակ", "MDT": "MDT", "AKDT": "Ալյասկայի ամառային ժամանակ", "WIB": "Արևմտյան Ինդոնեզիայի ժամանակ", "OEZ": "Արևելյան Եվրոպայի ստանդարտ ժամանակ", "CDT": "Կենտրոնական Ամերիկայի ամառային ժամանակ", "CAT": "Կենտրոնական Աֆրիկայի ժամանակ", "ECT": "Էկվադորի ժամանակ", "GMT": "Գրինվիչի ժամանակ", "ART": "Արգենտինայի ստնադարտ ժամանակ", "WAT": "Արևմտյան Աֆրիկայի ստանդարտ ժամանակ", "COST": "Կոլումբիայի ամառային ժամանակ", "HAT": "Նյուֆաունդլենդի ամառային ժամանակ", "HKT": "Հոնկոնգի ստանդարտ ժամանակ", "HNT": "Նյուֆաունդլենդի ստանդարտ ժամանակ", "ARST": "Արգենտինայի ամառային ժամանակ", "MESZ": "Կենտրոնական Եվրոպայի ամառային ժամանակ", "NZDT": "Նոր Զելանդիայի ամառային ժամանակ", "JDT": "Ճապոնիայի ամառային ժամանակ", "EAT": "Արևելյան Աֆրիկայի ժամանակ", "MYT": "Մալայզիայի ժամանակ", "ACWST": "Կենտրոնական Ավստրալիայի արևմտյան ստանդարտ ժամանակ", "COT": "Կոլումբիայի ստանդարտ ժամանակ", "HENOMX": "Հյուսիսարևմտյան Մեքսիկայի ամառային ժամանակ", "AST": "Ատլանտյան ստանդարտ ժամանակ", "ACWDT": "Կենտրոնական Ավստրալիայի արևմտյան ամառային ժամանակ", "HEOG": "Արևմտյան Գրենլանդիայի ամառային ժամանակ", "WIT": "Արևելյան Ինդոնեզիայի ժամանակ", "NZST": "Նոր Զելանդիայի ստանդարտ ժամանակ", "SAST": "Հարավային Աֆրիկայի ժամանակ", "∅∅∅": "Ամազոնյան ամառային ժամանակ", "WART": "Արևմտյան Արգենտինայի ստնադարտ ժամանակ", "HECU": "Կուբայի ամառային ժամանակ", "HADT": "Հավայան-ալեության ամառային ժամանակ", "CHADT": "Չաթեմ կղզու ամառային ժամանակ", "ACST": "Կենտրոնական Ավստրալիայի ստանդարտ ժամանակ", "HNNOMX": "Հյուսիսարևմտյան Մեքսիկայի ստանդարտ ժամանակ", "UYST": "Ուրուգվայի ամառային ժամանակ", "WESZ": "Արևմտյան Եվրոպայի ամառային ժամանակ", "PST": "Խաղաղօվկիանոսյան ստանդարտ ժամանակ", "PDT": "Խաղաղօվկիանոսյան ամառային ժամանակ", "GFT": "Ֆրանսիական Գվիանայի ժամանակ", "WARST": "Արևմտյան Արգենտինայի ամառային ժամանակ", "EDT": "Արևելյան Ամերիկայի ամառային ժամանակ", "MST": "MST", "HNPMX": "Մեքսիկայի խաղաղօվկիանոսյան ստանդարտ ժամանակ", "SRT": "Սուրինամի ժամանակ", "AEDT": "Արևելյան Ավստրալիայի ամառային ժամանակ", "AWST": "Արևմտյան Ավստրալիայի ստանդարտ ժամանակ", "AWDT": "Արևմտյան Ավստրալիայի ամառային ժամանակ", "HKST": "Հոնկոնգի ամառային ժամանակ", "WITA": "Կենտրոնական Ինդոնեզիայի ժամանակ", "EST": "Արևելյան Ամերիկայի ստանդարտ ժամանակ", "HEPMX": "Մեքսիկայի խաղաղօվկիանոսյան ամառային ժամանակ", "HNCU": "Կուբայի ստանդարտ ժամանակ", "BT": "Բութանի ժամանակ", "HNOG": "Արևմտյան Գրենլանդիայի ստանդարտ ժամանակ", "LHDT": "Լորդ Հաուի ամառային ժամանակ", "CLT": "Չիլիի ստանդարտ ժամանակ", "JST": "Ճապոնիայի ստանդարտ ժամանակ", "TMST": "Թուրքմենստանի ամառային ժամանակ", "SGT": "Սինգապուրի ժամանակ", "HAST": "Հավայան-ալեության ստանդարտ ժամանակ", "MEZ": "Կենտրոնական Եվրոպայի ստանդարտ ժամանակ", "ChST": "Չամոռոյի ժամանակ", "HEEG": "Արևելյան Գրենլանդիայի ամառային ժամանակ", "CST": "Կենտրոնական Ամերիկայի ստանդարտ ժամանակ"}, -+ locale: "hy_AM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "LHDT": "LHDT", "CHADT": "CHADT", "WITA": "WITA", "HNEG": "HNEG", "HNT": "HNT", "HEOG": "HEOG", "TMST": "TMST", "CAT": "CAT", "HEPMX": "HEPMX", "ACDT": "ACDT", "HEEG": "HEEG", "HEPM": "HEPM", "IST": "IST", "AKST": "AKST", "HKT": "HKT", "HAST": "HAST", "AEST": "AEST", "JDT": "JDT", "ChST": "ChST", "MST": "MST", "AWST": "AWST", "MYT": "MYT", "WART": "WART", "EST": "EST", "WIB": "WIB", "ARST": "ARST", "BOT": "BOT", "EAT": "EAT", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "WAST": "WAST", "HKST": "HKST", "TMT": "TMT", "GMT": "GMT", "SRT": "SRT", "HADT": "HADT", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "OESZ": "OESZ", "WARST": "WARST", "WIT": "WIT", "ART": "ART", "NZDT": "NZDT", "CST": "CST", "WEZ": "WEZ", "OEZ": "OEZ", "COST": "COST", "NZST": "NZST", "ADT": "ADT", "MEZ": "MEZ", "BT": "BT", "CDT": "CDT", "AST": "AST", "UYT": "UYT", "HECU": "HECU", "SGT": "SGT", "GFT": "GFT", "HAT": "HAT", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "COT": "COT", "HENOMX": "HENOMX", "ACST": "ACST", "HNPM": "HNPM", "CHAST": "CHAST", "VET": "VET", "SAST": "SAST", "GYT": "GYT", "EDT": "EDT", "MDT": "MDT", "ECT": "ECT", "PST": "PST", "WAT": "WAT", "JST": "JST", "UYST": "UYST", "PDT": "PDT", "HNCU": "HNCU", "AKDT": "AKDT", "MESZ": "MESZ", "ACWST": "ACWST", "AEDT": "AEDT", "CLT": "CLT", "CLST": "CLST", "LHST": "LHST"}, - } - } -  -@@ -143,7 +120,7 @@ func (hy *hy_AM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (hy *hy_AM) MonthsAbbreviated() []string { -- return hy.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +130,7 @@ func (hy *hy_AM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (hy *hy_AM) MonthsNarrow() []string { -- return hy.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +140,7 @@ func (hy *hy_AM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (hy *hy_AM) MonthsWide() []string { -- return hy.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,75 +186,13 @@ func (hy *hy_AM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'hy_AM' and handles both Whole and Real numbers based on 'v' - func (hy *hy_AM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(hy.group) - 1; j >= 0; j-- { -- b = append(b, hy.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'hy_AM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (hy *hy_AM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hy.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, hy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, hy.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'hy_AM' -@@ -285,62 +200,7 @@ func (hy *hy_AM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hy.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(hy.group) - 1; j >= 0; j-- { -- b = append(b, hy.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(hy.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, hy.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, hy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'hy_AM' -@@ -349,74 +209,7 @@ func (hy *hy_AM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := hy.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, hy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(hy.group) - 1; j >= 0; j-- { -- b = append(b, hy.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(hy.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, hy.currencyNegativePrefix[j]) -- } -- -- b = append(b, hy.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(hy.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, hy.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, hy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'hy_AM' -@@ -424,27 +217,6 @@ func (hy *hy_AM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -453,23 +225,6 @@ func (hy *hy_AM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, hy.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd5, 0xa9, 0x2e}...) -- - return string(b) - } -  -@@ -478,23 +233,6 @@ func (hy *hy_AM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, hy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd5, 0xa9, 0x2e}...) -- - return string(b) - } -  -@@ -503,19 +241,6 @@ func (hy *hy_AM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd5, 0xa9, 0x2e, 0x20}...) -- b = append(b, hy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, hy.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -524,19 +249,6 @@ func (hy *hy_AM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +257,6 @@ func (hy *hy_AM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +265,6 @@ func (hy *hy_AM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +273,5 @@ func (hy *hy_AM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, hy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := hy.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/id/id.go b/id/id.go -index 4905a8a..4214171 100644 ---- a/id/id.go -+++ b/id/id.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"SM", "M"}, - erasNarrow: []string{"SM", "M"}, - erasWide: []string{"Sebelum Masehi", "Masehi"}, -- timezones: map[string]string{"JDT": "Waktu Musim Panas Jepang", "TMT": "Waktu Standar Turkmenistan", "ChST": "Waktu Standar Chamorro", "HECU": "Waktu Musim Panas Kuba", "EST": "Waktu Standar Timur", "AKDT": "Waktu Musim Panas Alaska", "SAST": "Waktu Standar Afrika Selatan", "JST": "Waktu Standar Jepang", "GYT": "Waktu Guyana", "WIT": "Waktu Indonesia Timur", "AEDT": "Waktu Musim Panas Timur Australia", "HEPM": "Waktu Musim Panas Saint Pierre dan Miquelon", "WARST": "Waktu Musim Panas Argentina Bagian Barat", "COT": "Waktu Standar Kolombia", "ACDT": "Waktu Musim Panas Tengah Australia", "HNCU": "Waktu Standar Kuba", "ARST": "Waktu Musim Panas Argentina", "AWST": "Waktu Standar Barat Australia", "CHAST": "Waktu Standar Chatham", "BOT": "Waktu Bolivia", "UYT": "Waktu Standar Uruguay", "HAST": "Waktu Standar Hawaii-Aleutian", "AWDT": "Waktu Musim Panas Barat Australia", "MESZ": "Waktu Musim Panas Eropa Tengah", "ECT": "Waktu Ekuador", "WART": "Waktu Standar Argentina Bagian Barat", "MST": "Waktu Standar Makau", "CDT": "Waktu Musim Panas Tengah", "SRT": "Waktu Suriname", "NZST": "Waktu Standar Selandia Baru", "HNEG": "Waktu Standar Greenland Timur", "HEEG": "Waktu Musim Panas Greenland Timur", "WAST": "Waktu Musim Panas Afrika Barat", "OESZ": "Waktu Musim Panas Eropa Timur", "ART": "Waktu Standar Argentina", "HEOG": "Waktu Musim Panas Greenland Barat", "LHST": "Waktu Standar Lord Howe", "CLST": "Waktu Musim Panas Cile", "EAT": "Waktu Afrika Timur", "ADT": "Waktu Musim Panas Atlantik", "BT": "Waktu Bhutan", "PDT": "Waktu Musim Panas Pasifik", "ACST": "Waktu Standar Tengah Australia", "CAT": "Waktu Afrika Tengah", "WIB": "Waktu Indonesia Barat", "WEZ": "Waktu Standar Eropa Barat", "HNNOMX": "Waktu Standar Meksiko Barat Laut", "CST": "Waktu Standar Tengah", "COST": "Waktu Musim Panas Kolombia", "MYT": "Waktu Malaysia", "PST": "Waktu Standar Pasifik", "HKT": "Waktu Standar Hong Kong", "LHDT": "Waktu Musim Panas Lord Howe", "IST": "Waktu India", "HAT": "Waktu Musim Panas Newfoundland", "HNOG": "Waktu Standar Greenland Barat", "MDT": "Waktu Musim Panas Makau", "UYST": "Waktu Musim Panas Uruguay", "HADT": "Waktu Musim Panas Hawaii-Aleutian", "CHADT": "Waktu Musim Panas Chatham", "EDT": "Waktu Musim Panas Timur", "HEPMX": "Waktu Musim Panas Pasifik Meksiko", "WITA": "Waktu Indonesia Tengah", "∅∅∅": "Waktu Musim Panas Amazon", "SGT": "Waktu Standar Singapura", "AST": "Waktu Standar Atlantik", "VET": "Waktu Venezuela", "HNT": "Waktu Standar Newfoundland", "HKST": "Waktu Musim Panas Hong Kong", "NZDT": "Waktu Musim Panas Selandia Baru", "WAT": "Waktu Standar Afrika Barat", "TMST": "Waktu Musim Panas Turkmenistan", "OEZ": "Waktu Standar Eropa Timur", "HENOMX": "Waktu Musim Panas Meksiko Barat Laut", "GMT": "Greenwich Mean Time", "HNPMX": "Waktu Standar Pasifik Meksiko", "ACWDT": "Waktu Musim Panas Barat Tengah Australia", "CLT": "Waktu Standar Cile", "GFT": "Waktu Guyana Prancis", "WESZ": "Waktu Musim Panas Eropa Barat", "HNPM": "Waktu Standar Saint Pierre dan Miquelon", "ACWST": "Waktu Standar Barat Tengah Australia", "AEST": "Waktu Standar Timur Australia", "MEZ": "Waktu Standar Eropa Tengah", "AKST": "Waktu Standar Alaska"}, -+ timezones: map[string]string{"CLT": "Waktu Standar Cile", "MST": "Waktu Standar Pegunungan", "ACDT": "Waktu Musim Panas Tengah Australia", "JDT": "Waktu Musim Panas Jepang", "PDT": "Waktu Musim Panas Pasifik", "BT": "Waktu Bhutan", "HAT": "Waktu Musim Panas Newfoundland", "MDT": "Waktu Musim Panas Pegunungan", "MEZ": "Waktu Standar Eropa Tengah", "AWST": "Waktu Standar Barat Australia", "SGT": "Waktu Standar Singapura", "GFT": "Waktu Guyana Prancis", "CST": "Waktu Standar Tengah", "ChST": "Waktu Standar Chamorro", "HENOMX": "Waktu Musim Panas Meksiko Barat Laut", "MYT": "Waktu Malaysia", "WAST": "Waktu Musim Panas Afrika Barat", "CAT": "Waktu Afrika Tengah", "WITA": "Waktu Indonesia Tengah", "SRT": "Waktu Suriname", "WAT": "Waktu Standar Afrika Barat", "HNPMX": "Waktu Standar Pasifik Meksiko", "WIT": "Waktu Indonesia Timur", "COT": "Waktu Standar Kolombia", "HKST": "Waktu Musim Panas Hong Kong", "ADT": "Waktu Musim Panas Atlantik", "GMT": "Greenwich Mean Time", "LHST": "Waktu Standar Lord Howe", "CHADT": "Waktu Musim Panas Chatham", "AEDT": "Waktu Musim Panas Timur Australia", "WEZ": "Waktu Standar Eropa Barat", "AKST": "Waktu Standar Alaska", "UYST": "Waktu Musim Panas Uruguay", "CDT": "Waktu Musim Panas Tengah", "NZDT": "Waktu Musim Panas Selandia Baru", "ART": "Waktu Standar Argentina", "BOT": "Waktu Bolivia", "HEPM": "Waktu Musim Panas Saint Pierre dan Miquelon", "∅∅∅": "Waktu Musim Panas Acre", "IST": "Waktu India", "OEZ": "Waktu Standar Eropa Timur", "HNPM": "Waktu Standar Saint Pierre dan Miquelon", "HNCU": "Waktu Standar Kuba", "HEPMX": "Waktu Musim Panas Pasifik Meksiko", "HNOG": "Waktu Standar Greenland Barat", "ECT": "Waktu Ekuador", "ARST": "Waktu Musim Panas Argentina", "HEEG": "Waktu Musim Panas Greenland Timur", "ACWDT": "Waktu Musim Panas Barat Tengah Australia", "HNT": "Waktu Standar Newfoundland", "GYT": "Waktu Guyana", "NZST": "Waktu Standar Selandia Baru", "AKDT": "Waktu Musim Panas Alaska", "HEOG": "Waktu Musim Panas Greenland Barat", "TMT": "Waktu Standar Turkmenistan", "HADT": "Waktu Musim Panas Hawaii-Aleutian", "MESZ": "Waktu Musim Panas Eropa Tengah", "ACST": "Waktu Standar Tengah Australia", "ACWST": "Waktu Standar Barat Tengah Australia", "AEST": "Waktu Standar Timur Australia", "TMST": "Waktu Musim Panas Turkmenistan", "HNNOMX": "Waktu Standar Meksiko Barat Laut", "PST": "Waktu Standar Pasifik", "EST": "Waktu Standar Timur", "HKT": "Waktu Standar Hong Kong", "EAT": "Waktu Afrika Timur", "HNEG": "Waktu Standar Greenland Timur", "AWDT": "Waktu Musim Panas Barat Australia", "LHDT": "Waktu Musim Panas Lord Howe", "VET": "Waktu Venezuela", "WARST": "Waktu Musim Panas Argentina Bagian Barat", "SAST": "Waktu Standar Afrika Selatan", "CLST": "Waktu Musim Panas Cile", "JST": "Waktu Standar Jepang", "CHAST": "Waktu Standar Chatham", "UYT": "Waktu Standar Uruguay", "EDT": "Waktu Musim Panas Timur", "WIB": "Waktu Indonesia Barat", "COST": "Waktu Musim Panas Kolombia", "AST": "Waktu Standar Atlantik", "HAST": "Waktu Standar Hawaii-Aleutian", "WESZ": "Waktu Musim Panas Eropa Barat", "HECU": "Waktu Musim Panas Kuba", "OESZ": "Waktu Musim Panas Eropa Timur", "WART": "Waktu Standar Argentina Bagian Barat"}, - } - } -  -diff --git a/id_ID/id_ID.go b/id_ID/id_ID.go -index 8d61937..866c7c7 100644 ---- a/id_ID/id_ID.go -+++ b/id_ID/id_ID.go -@@ -42,32 +42,13 @@ type id_ID struct { - // New returns a new instance of translator for the 'id_ID' locale - func New() locales.Translator { - return &id_ID{ -- locale: "id_ID", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agt", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"}, -- daysAbbreviated: []string{"Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"}, -- daysNarrow: []string{"M", "S", "S", "R", "K", "J", "S"}, -- daysShort: []string{"Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"}, -- daysWide: []string{"Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"SM", "M"}, -- erasNarrow: []string{"SM", "M"}, -- erasWide: []string{"Sebelum Masehi", "Masehi"}, -- timezones: map[string]string{"HNT": "Waktu Standar Newfoundland", "IST": "Waktu India", "∅∅∅": "Waktu Musim Panas Amazon", "HEEG": "Waktu Musim Panas Greenland Timur", "WARST": "Waktu Musim Panas Argentina Bagian Barat", "HEPMX": "Waktu Musim Panas Pasifik Meksiko", "ADT": "Waktu Musim Panas Atlantik", "OEZ": "Waktu Standar Eropa Timur", "GMT": "Greenwich Mean Time", "UYST": "Waktu Musim Panas Uruguay", "WEZ": "Waktu Standar Eropa Barat", "HEPM": "Waktu Musim Panas Saint Pierre dan Miquelon", "HADT": "Waktu Musim Panas Hawaii-Aleutian", "MEZ": "Waktu Standar Eropa Tengah", "ChST": "Waktu Standar Chamorro", "TMST": "Waktu Musim Panas Turkmenistan", "MST": "Waktu Standar Makau", "CDT": "Waktu Musim Panas Tengah", "MYT": "Waktu Malaysia", "MESZ": "Waktu Musim Panas Eropa Tengah", "SRT": "Waktu Suriname", "ARST": "Waktu Musim Panas Argentina", "CAT": "Waktu Afrika Tengah", "HECU": "Waktu Musim Panas Kuba", "HNPMX": "Waktu Standar Pasifik Meksiko", "BT": "Waktu Bhutan", "PDT": "Waktu Musim Panas Pasifik", "HNPM": "Waktu Standar Saint Pierre dan Miquelon", "NZDT": "Waktu Musim Panas Selandia Baru", "ACDT": "Waktu Musim Panas Tengah Australia", "UYT": "Waktu Standar Uruguay", "PST": "Waktu Standar Pasifik", "AWDT": "Waktu Musim Panas Barat Australia", "EAT": "Waktu Afrika Timur", "HAT": "Waktu Musim Panas Newfoundland", "AWST": "Waktu Standar Barat Australia", "LHST": "Waktu Standar Lord Howe", "AKST": "Waktu Standar Alaska", "CST": "Waktu Standar Tengah", "WAT": "Waktu Standar Afrika Barat", "ECT": "Waktu Ekuador", "HNOG": "Waktu Standar Greenland Barat", "TMT": "Waktu Standar Turkmenistan", "AKDT": "Waktu Musim Panas Alaska", "LHDT": "Waktu Musim Panas Lord Howe", "NZST": "Waktu Standar Selandia Baru", "CLT": "Waktu Standar Cile", "JDT": "Waktu Musim Panas Jepang", "BOT": "Waktu Bolivia", "GFT": "Waktu Guyana Prancis", "AEST": "Waktu Standar Timur Australia", "WITA": "Waktu Indonesia Tengah", "SAST": "Waktu Standar Afrika Selatan", "OESZ": "Waktu Musim Panas Eropa Timur", "WART": "Waktu Standar Argentina Bagian Barat", "EDT": "Waktu Musim Panas Timur", "ART": "Waktu Standar Argentina", "AEDT": "Waktu Musim Panas Timur Australia", "HKT": "Waktu Standar Hong Kong", "CLST": "Waktu Musim Panas Cile", "WAST": "Waktu Musim Panas Afrika Barat", "HENOMX": "Waktu Musim Panas Meksiko Barat Laut", "SGT": "Waktu Standar Singapura", "WIB": "Waktu Indonesia Barat", "HEOG": "Waktu Musim Panas Greenland Barat", "AST": "Waktu Standar Atlantik", "HAST": "Waktu Standar Hawaii-Aleutian", "CHAST": "Waktu Standar Chatham", "CHADT": "Waktu Musim Panas Chatham", "HNEG": "Waktu Standar Greenland Timur", "COT": "Waktu Standar Kolombia", "COST": "Waktu Musim Panas Kolombia", "HNNOMX": "Waktu Standar Meksiko Barat Laut", "WIT": "Waktu Indonesia Timur", "ACWST": "Waktu Standar Barat Tengah Australia", "JST": "Waktu Standar Jepang", "EST": "Waktu Standar Timur", "MDT": "Waktu Musim Panas Makau", "GYT": "Waktu Guyana", "VET": "Waktu Venezuela", "ACST": "Waktu Standar Tengah Australia", "HNCU": "Waktu Standar Kuba", "WESZ": "Waktu Musim Panas Eropa Barat", "ACWDT": "Waktu Musim Panas Barat Tengah Australia", "HKST": "Waktu Musim Panas Hong Kong"}, -+ locale: "id_ID", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "OESZ": "OESZ", "WIT": "WIT", "SAST": "SAST", "ECT": "ECT", "ARST": "ARST", "EAT": "EAT", "UYST": "UYST", "CLST": "CLST", "HNEG": "HNEG", "HEOG": "HEOG", "HEPM": "HEPM", "AEDT": "AEDT", "CHADT": "CHADT", "ACWDT": "ACWDT", "WAT": "WAT", "COT": "COT", "CAT": "CAT", "HNPM": "HNPM", "HAST": "HAST", "MESZ": "MESZ", "GMT": "GMT", "PST": "PST", "VET": "VET", "GFT": "GFT", "CST": "CST", "UYT": "UYT", "MYT": "MYT", "BT": "BT", "SGT": "SGT", "WART": "WART", "HKT": "HKT", "ACDT": "ACDT", "JDT": "JDT", "IST": "IST", "PDT": "PDT", "HAT": "HAT", "CLT": "CLT", "ADT": "ADT", "SRT": "SRT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "GYT": "GYT", "COST": "COST", "TMST": "TMST", "WITA": "WITA", "WIB": "WIB", "AST": "AST", "WARST": "WARST", "WEZ": "WEZ", "HECU": "HECU", "AKDT": "AKDT", "EST": "EST", "MEZ": "MEZ", "ACST": "ACST", "AWDT": "AWDT", "HADT": "HADT", "ART": "ART", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "CDT": "CDT", "MDT": "MDT", "JST": "JST", "ACWST": "ACWST", "WESZ": "WESZ", "HNT": "HNT", "HEEG": "HEEG", "CHAST": "CHAST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WAST": "WAST", "AKST": "AKST", "MST": "MST", "ChST": "ChST", "LHST": "LHST", "AEST": "AEST", "TMT": "TMT", "NZST": "NZST", "AWST": "AWST", "BOT": "BOT", "HNOG": "HNOG", "EDT": "EDT", "HKST": "HKST", "NZDT": "NZDT", "OEZ": "OEZ"}, - } - } -  -@@ -113,7 +94,7 @@ func (id *id_ID) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (id *id_ID) MonthsAbbreviated() []string { -- return id.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (id *id_ID) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (id *id_ID) MonthsNarrow() []string { -- return id.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (id *id_ID) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (id *id_ID) MonthsWide() []string { -- return id.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (id *id_ID) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'id_ID' and handles both Whole and Real numbers based on 'v' - func (id *id_ID) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, id.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, id.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, id.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'id_ID' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (id *id_ID) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, id.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, id.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, id.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'id_ID' -@@ -253,56 +174,7 @@ func (id *id_ID) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := id.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, id.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, id.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, id.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, id.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'id_ID' -@@ -311,64 +183,7 @@ func (id *id_ID) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := id.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, id.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, id.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, id.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, id.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'id_ID' -@@ -376,27 +191,6 @@ func (id *id_ID) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -405,17 +199,6 @@ func (id *id_ID) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, id.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -424,17 +207,6 @@ func (id *id_ID) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, id.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,24 +215,6 @@ func (id *id_ID) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, id.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, id.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +223,6 @@ func (id *id_ID) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -490,26 +231,6 @@ func (id *id_ID) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -518,30 +239,6 @@ func (id *id_ID) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -550,34 +247,5 @@ func (id *id_ID) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := id.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ig/ig.go b/ig/ig.go -index cffc159..b69f29c 100644 ---- a/ig/ig.go -+++ b/ig/ig.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"T.K.", "A.K."}, - erasNarrow: []string{"T.K.", "A.K."}, - erasWide: []string{"Tupu Kristi", "Afọ Kristi"}, -- timezones: map[string]string{"HNPMX": "HNPMX", "ADT": "ADT", "MESZ": "MESZ", "NZST": "NZST", "EDT": "EDT", "UYST": "UYST", "SRT": "SRT", "EST": "EST", "HNOG": "HNOG", "CHADT": "CHADT", "JDT": "JDT", "HAST": "HAST", "BT": "BT", "WEZ": "WEZ", "WITA": "WITA", "SAST": "SAST", "GFT": "GFT", "TMT": "TMT", "PDT": "PDT", "AEST": "AEST", "EAT": "EAT", "TMST": "TMST", "HEPMX": "HEPMX", "CST": "CST", "GYT": "GYT", "AWDT": "AWDT", "MEZ": "MEZ", "HNEG": "HNEG", "HEEG": "HEEG", "WART": "WART", "AKDT": "AKDT", "PST": "PST", "ARST": "ARST", "HKT": "HKT", "HNNOMX": "HNNOMX", "UYT": "UYT", "VET": "VET", "ACWST": "ACWST", "ACWDT": "ACWDT", "HKST": "HKST", "HNPM": "HNPM", "ChST": "ChST", "MST": "MST", "CLT": "CLT", "JST": "JST", "WAT": "WAT", "OESZ": "OESZ", "ECT": "ECT", "SGT": "SGT", "WIT": "WIT", "IST": "IST", "CAT": "CAT", "COST": "COST", "HENOMX": "HENOMX", "HNCU": "HNCU", "AEDT": "AEDT", "ACDT": "ACDT", "GMT": "GMT", "HECU": "HECU", "MDT": "MDT", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "LHST": "LHST", "NZDT": "NZDT", "BOT": "BOT", "ACST": "ACST", "WAST": "WAST", "CDT": "CDT", "MYT": "MYT", "WIB": "WIB", "HAT": "HAT", "HEOG": "HEOG", "CHAST": "CHAST", "CLST": "CLST", "HADT": "HADT", "WESZ": "WESZ", "ART": "ART", "AWST": "AWST", "OEZ": "OEZ", "WARST": "WARST", "COT": "COT", "AKST": "AKST", "AST": "AST", "HNT": "HNT", "HEPM": "HEPM"}, -+ timezones: map[string]string{"COST": "COST", "HKST": "HKST", "TMST": "TMST", "ARST": "ARST", "GMT": "GMT", "HADT": "HADT", "HNEG": "HNEG", "HEPM": "HEPM", "LHST": "LHST", "PDT": "PDT", "EDT": "EDT", "ECT": "ECT", "ACST": "ACST", "LHDT": "LHDT", "WIT": "WIT", "CLT": "CLT", "CST": "CST", "CDT": "CDT", "ACDT": "ACDT", "ACWST": "ACWST", "AEST": "AEST", "HEPMX": "HEPMX", "AKST": "AKST", "SAST": "SAST", "COT": "COT", "HNNOMX": "HNNOMX", "JDT": "JDT", "AKDT": "AKDT", "GFT": "GFT", "∅∅∅": "∅∅∅", "ART": "ART", "BOT": "BOT", "CHAST": "CHAST", "OESZ": "OESZ", "GYT": "GYT", "TMT": "TMT", "AWDT": "AWDT", "UYST": "UYST", "ChST": "ChST", "JST": "JST", "AWST": "AWST", "ACWDT": "ACWDT", "WEZ": "WEZ", "WAST": "WAST", "WART": "WART", "HNOG": "HNOG", "EST": "EST", "CAT": "CAT", "HEEG": "HEEG", "SGT": "SGT", "AST": "AST", "HENOMX": "HENOMX", "BT": "BT", "VET": "VET", "WAT": "WAT", "CLST": "CLST", "WITA": "WITA", "NZST": "NZST", "HNPM": "HNPM", "CHADT": "CHADT", "HAT": "HAT", "WARST": "WARST", "HKT": "HKT", "WIB": "WIB", "MST": "MST", "MEZ": "MEZ", "AEDT": "AEDT", "UYT": "UYT", "IST": "IST", "HNPMX": "HNPMX", "WESZ": "WESZ", "HNT": "HNT", "ADT": "ADT", "MYT": "MYT", "OEZ": "OEZ", "MDT": "MDT", "HAST": "HAST", "MESZ": "MESZ", "PST": "PST", "HEOG": "HEOG", "NZDT": "NZDT", "SRT": "SRT", "EAT": "EAT", "HNCU": "HNCU", "HECU": "HECU"}, - } - } -  -diff --git a/ig_NG/ig_NG.go b/ig_NG/ig_NG.go -index a4fb976..aed10a6 100644 ---- a/ig_NG/ig_NG.go -+++ b/ig_NG/ig_NG.go -@@ -18,7 +18,6 @@ type ig_NG struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -43,31 +42,13 @@ type ig_NG struct { - // New returns a new instance of translator for the 'ig_NG' locale - func New() locales.Translator { - return &ig_NG{ -- locale: "ig_NG", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: "٫", -- group: "٬", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "Jen", "Feb", "Maa", "Epr", "Mee", "Juu", "Jul", "Ọgọ", "Sep", "Ọkt", "Nov", "Dis"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Jenụwarị", "Febrụwarị", "Maachị", "Eprel", "Mee", "Juun", "Julaị", "Ọgọọst", "Septemba", "Ọktoba", "Novemba", "Disemba"}, -- daysAbbreviated: []string{"Ụka", "Mọn", "Tiu", "Wen", "Tọọ", "Fraị", "Sat"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Ụka", "Mọn", "Tiu", "Wen", "Tọọ", "Fraị", "Sat"}, -- daysWide: []string{"Mbọsị Ụka", "Mọnde", "Tiuzdee", "Wenezdee", "Tọọzdee", "Fraịdee", "Satọdee"}, -- periodsAbbreviated: []string{"A.M.", "P.M."}, -- periodsNarrow: []string{"A.M.", "P.M."}, -- periodsWide: []string{"A.M.", "P.M."}, -- erasAbbreviated: []string{"T.K.", "A.K."}, -- erasNarrow: []string{"T.K.", "A.K."}, -- erasWide: []string{"Tupu Kristi", "Afọ Kristi"}, -- timezones: map[string]string{"ACWST": "ACWST", "CHAST": "CHAST", "CHADT": "CHADT", "HENOMX": "HENOMX", "PDT": "PDT", "AEDT": "AEDT", "HKT": "HKT", "IST": "IST", "ECT": "ECT", "UYT": "UYT", "WIT": "WIT", "ART": "ART", "ACDT": "ACDT", "WARST": "WARST", "HADT": "HADT", "JDT": "JDT", "GMT": "GMT", "HEPMX": "HEPMX", "WITA": "WITA", "BT": "BT", "AWDT": "AWDT", "CLST": "CLST", "JST": "JST", "HEEG": "HEEG", "EAT": "EAT", "WART": "WART", "VET": "VET", "MYT": "MYT", "OESZ": "OESZ", "CDT": "CDT", "WAT": "WAT", "HNEG": "HNEG", "COST": "COST", "HNPMX": "HNPMX", "ADT": "ADT", "GYT": "GYT", "NZDT": "NZDT", "BOT": "BOT", "PST": "PST", "ACWDT": "ACWDT", "MEZ": "MEZ", "AST": "AST", "SRT": "SRT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "TMT": "TMT", "TMST": "TMST", "ACST": "ACST", "CAT": "CAT", "SGT": "SGT", "HAST": "HAST", "AKDT": "AKDT", "UYST": "UYST", "AKST": "AKST", "HAT": "HAT", "EST": "EST", "EDT": "EDT", "MST": "MST", "CST": "CST", "HNT": "HNT", "MESZ": "MESZ", "NZST": "NZST", "ChST": "ChST", "COT": "COT", "WIB": "WIB", "WESZ": "WESZ", "ARST": "ARST", "AEST": "AEST", "HKST": "HKST", "HNPM": "HNPM", "SAST": "SAST", "OEZ": "OEZ", "MDT": "MDT", "WEZ": "WEZ", "CLT": "CLT", "GFT": "GFT", "WAST": "WAST", "HNCU": "HNCU", "HECU": "HECU", "AWST": "AWST", "LHST": "LHST", "HNOG": "HNOG", "LHDT": "LHDT", "HNNOMX": "HNNOMX", "HEPM": "HEPM"}, -+ locale: "ig_NG", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "EDT": "EDT", "NZDT": "NZDT", "HNPM": "HNPM", "VET": "VET", "WARST": "WARST", "CAT": "CAT", "ACWDT": "ACWDT", "HECU": "HECU", "HNPMX": "HNPMX", "TMST": "TMST", "NZST": "NZST", "MYT": "MYT", "OESZ": "OESZ", "WIB": "WIB", "HADT": "HADT", "SAST": "SAST", "OEZ": "OEZ", "ACST": "ACST", "ACDT": "ACDT", "HNEG": "HNEG", "SGT": "SGT", "ARST": "ARST", "GYT": "GYT", "LHST": "LHST", "CHADT": "CHADT", "WAST": "WAST", "AKDT": "AKDT", "CST": "CST", "ADT": "ADT", "GMT": "GMT", "ART": "ART", "HKT": "HKT", "ECT": "ECT", "WEZ": "WEZ", "WESZ": "WESZ", "CDT": "CDT", "AWDT": "AWDT", "IST": "IST", "AKST": "AKST", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "WITA": "WITA", "MST": "MST", "HNCU": "HNCU", "JST": "JST", "UYT": "UYT", "BT": "BT", "COT": "COT", "CLST": "CLST", "EAT": "EAT", "MEZ": "MEZ", "LHDT": "LHDT", "MESZ": "MESZ", "WIT": "WIT", "HNOG": "HNOG", "EST": "EST", "HKST": "HKST", "HEEG": "HEEG", "HAT": "HAT", "AEST": "AEST", "CHAST": "CHAST", "WAT": "WAT", "WART": "WART", "AST": "AST", "SRT": "SRT", "HNNOMX": "HNNOMX", "AWST": "AWST", "COST": "COST", "BOT": "BOT", "HEPM": "HEPM", "JDT": "JDT", "PST": "PST", "TMT": "TMT", "CLT": "CLT", "MDT": "MDT", "ChST": "ChST", "ACWST": "ACWST", "AEDT": "AEDT", "HNT": "HNT", "HEOG": "HEOG", "HAST": "HAST", "HENOMX": "HENOMX", "UYST": "UYST", "PDT": "PDT"}, - } - } -  -@@ -113,7 +94,7 @@ func (ig *ig_NG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ig *ig_NG) MonthsAbbreviated() []string { -- return ig.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (ig *ig_NG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ig *ig_NG) MonthsNarrow() []string { -- return ig.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (ig *ig_NG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ig *ig_NG) MonthsWide() []string { -- return ig.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,81 +160,13 @@ func (ig *ig_NG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ig_NG' and handles both Whole and Real numbers based on 'v' - func (ig *ig_NG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ig.decimal) - 1; j >= 0; j-- { -- b = append(b, ig.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ig.group) - 1; j >= 0; j-- { -- b = append(b, ig.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ig.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ig_NG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ig *ig_NG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ig.decimal) - 1; j >= 0; j-- { -- b = append(b, ig.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ig.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ig.percentSuffix...) -- -- b = append(b, ig.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ig_NG' -@@ -261,60 +174,7 @@ func (ig *ig_NG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ig.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ig.decimal) - 1; j >= 0; j-- { -- b = append(b, ig.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ig.group) - 1; j >= 0; j-- { -- b = append(b, ig.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ig.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ig.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ig_NG' -@@ -323,68 +183,7 @@ func (ig *ig_NG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ig.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ig.decimal) - 1; j >= 0; j-- { -- b = append(b, ig.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ig.group) - 1; j >= 0; j-- { -- b = append(b, ig.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ig.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ig.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ig_NG' -@@ -392,27 +191,6 @@ func (ig *ig_NG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -421,17 +199,6 @@ func (ig *ig_NG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ig.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,17 +207,6 @@ func (ig *ig_NG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ig.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -459,19 +215,6 @@ func (ig *ig_NG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ig.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ig.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,19 +223,6 @@ func (ig *ig_NG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -501,26 +231,6 @@ func (ig *ig_NG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -529,30 +239,6 @@ func (ig *ig_NG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -561,34 +247,5 @@ func (ig *ig_NG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ig.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ig.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ii/ii.go b/ii/ii.go -index a30ad35..c55da5c 100644 ---- a/ii/ii.go -+++ b/ii/ii.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ꃅꋊꂿ", "ꃅꋊꊂ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"NZDT": "NZDT", "OEZ": "OEZ", "MST": "MST", "GYT": "GYT", "ART": "ART", "WITA": "WITA", "HNPM": "HNPM", "MEZ": "MEZ", "LHST": "LHST", "AST": "AST", "HEOG": "HEOG", "AWDT": "AWDT", "CHAST": "CHAST", "WAST": "WAST", "HNOG": "HNOG", "HKT": "HKT", "CAT": "CAT", "HEPMX": "HEPMX", "VET": "VET", "BT": "BT", "HNT": "HNT", "AWST": "AWST", "HKST": "HKST", "ECT": "ECT", "HENOMX": "HENOMX", "SGT": "SGT", "ADT": "ADT", "WIB": "WIB", "HADT": "HADT", "ACST": "ACST", "CHADT": "CHADT", "WART": "WART", "WARST": "WARST", "COT": "COT", "AKST": "AKST", "MYT": "MYT", "HAT": "HAT", "HEPM": "HEPM", "SAST": "SAST", "LHDT": "LHDT", "EST": "EST", "EDT": "EDT", "MDT": "MDT", "WEZ": "WEZ", "ACWST": "ACWST", "ARST": "ARST", "MESZ": "MESZ", "BOT": "BOT", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "UYT": "UYT", "CLST": "CLST", "HNEG": "HNEG", "WAT": "WAT", "COST": "COST", "PDT": "PDT", "ChST": "ChST", "ACDT": "ACDT", "OESZ": "OESZ", "HNCU": "HNCU", "CST": "CST", "CDT": "CDT", "WIT": "WIT", "NZST": "NZST", "GMT": "GMT", "UYST": "UYST", "SRT": "SRT", "PST": "PST", "CLT": "CLT", "JST": "JST", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "IST": "IST", "TMT": "TMT", "GFT": "GFT", "EAT": "EAT", "HECU": "HECU", "HAST": "HAST", "ACWDT": "ACWDT", "AEST": "AEST", "AEDT": "AEDT", "HEEG": "HEEG", "HNPMX": "HNPMX", "JDT": "JDT", "TMST": "TMST"}, -+ timezones: map[string]string{"COST": "COST", "CLST": "CLST", "MESZ": "MESZ", "HNPM": "HNPM", "CHADT": "CHADT", "CDT": "CDT", "MEZ": "MEZ", "IST": "IST", "WART": "WART", "TMST": "TMST", "GMT": "GMT", "MYT": "MYT", "AEDT": "AEDT", "BT": "BT", "HNPMX": "HNPMX", "SGT": "SGT", "CAT": "CAT", "CLT": "CLT", "WIB": "WIB", "MDT": "MDT", "NZDT": "NZDT", "AST": "AST", "ACWST": "ACWST", "OESZ": "OESZ", "WIT": "WIT", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "AWDT": "AWDT", "VET": "VET", "OEZ": "OEZ", "CST": "CST", "ECT": "ECT", "JST": "JST", "JDT": "JDT", "LHDT": "LHDT", "AKDT": "AKDT", "HNOG": "HNOG", "HKT": "HKT", "HADT": "HADT", "ACDT": "ACDT", "AEST": "AEST", "PST": "PST", "HECU": "HECU", "WARST": "WARST", "EDT": "EDT", "HAST": "HAST", "CHAST": "CHAST", "WAT": "WAT", "WAST": "WAST", "NZST": "NZST", "BOT": "BOT", "SRT": "SRT", "EAT": "EAT", "HKST": "HKST", "UYT": "UYT", "HEPMX": "HEPMX", "WEZ": "WEZ", "ADT": "ADT", "HENOMX": "HENOMX", "UYST": "UYST", "AKST": "AKST", "GYT": "GYT", "MST": "MST", "ARST": "ARST", "HEOG": "HEOG", "EST": "EST", "WITA": "WITA", "HNEG": "HNEG", "AWST": "AWST", "COT": "COT", "ART": "ART", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "SAST": "SAST", "ACST": "ACST", "PDT": "PDT", "WESZ": "WESZ", "GFT": "GFT", "TMT": "TMT", "ChST": "ChST", "LHST": "LHST", "HEPM": "HEPM", "ACWDT": "ACWDT", "HNT": "HNT", "HAT": "HAT"}, - } - } -  -diff --git a/ii_CN/ii_CN.go b/ii_CN/ii_CN.go -index 0fc819b..8adbfa8 100644 ---- a/ii_CN/ii_CN.go -+++ b/ii_CN/ii_CN.go -@@ -10,64 +10,45 @@ import ( - ) -  - type ii_CN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ii_CN' locale - func New() locales.Translator { - return &ii_CN{ -- locale: "ii_CN", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ꋍꆪ", "ꑍꆪ", "ꌕꆪ", "ꇖꆪ", "ꉬꆪ", "ꃘꆪ", "ꏃꆪ", "ꉆꆪ", "ꈬꆪ", "ꊰꆪ", "ꊰꊪꆪ", "ꊰꑋꆪ"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "ꋍꆪ", "ꑍꆪ", "ꌕꆪ", "ꇖꆪ", "ꉬꆪ", "ꃘꆪ", "ꏃꆪ", "ꉆꆪ", "ꈬꆪ", "ꊰꆪ", "ꊰꊪꆪ", "ꊰꑋꆪ"}, -- daysAbbreviated: []string{"ꑭꆏ", "ꆏꋍ", "ꆏꑍ", "ꆏꌕ", "ꆏꇖ", "ꆏꉬ", "ꆏꃘ"}, -- daysNarrow: []string{"ꆏ", "ꋍ", "ꑍ", "ꌕ", "ꇖ", "ꉬ", "ꃘ"}, -- daysWide: []string{"ꑭꆏꑍ", "ꆏꊂꋍ", "ꆏꊂꑍ", "ꆏꊂꌕ", "ꆏꊂꇖ", "ꆏꊂꉬ", "ꆏꊂꃘ"}, -- periodsAbbreviated: []string{"ꎸꄑ", "ꁯꋒ"}, -- periodsWide: []string{"ꎸꄑ", "ꁯꋒ"}, -- erasAbbreviated: []string{"ꃅꋊꂿ", "ꃅꋊꊂ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNPM": "HNPM", "HEPMX": "HEPMX", "JDT": "JDT", "ChST": "ChST", "OESZ": "OESZ", "HECU": "HECU", "AKST": "AKST", "ADT": "ADT", "HENOMX": "HENOMX", "ACWST": "ACWST", "HEPM": "HEPM", "NZDT": "NZDT", "GFT": "GFT", "TMT": "TMT", "WARST": "WARST", "COST": "COST", "CHAST": "CHAST", "CAT": "CAT", "HNPMX": "HNPMX", "VET": "VET", "SAST": "SAST", "IST": "IST", "∅∅∅": "∅∅∅", "UYST": "UYST", "AEST": "AEST", "AEDT": "AEDT", "MESZ": "MESZ", "HEEG": "HEEG", "WAT": "WAT", "COT": "COT", "EST": "EST", "MEZ": "MEZ", "ACDT": "ACDT", "HAST": "HAST", "BT": "BT", "ART": "ART", "AWST": "AWST", "CST": "CST", "HNOG": "HNOG", "HEOG": "HEOG", "CLT": "CLT", "WAST": "WAST", "MYT": "MYT", "UYT": "UYT", "HAT": "HAT", "CLST": "CLST", "ACST": "ACST", "GMT": "GMT", "HNCU": "HNCU", "SRT": "SRT", "PST": "PST", "WEZ": "WEZ", "ACWDT": "ACWDT", "HKT": "HKT", "WITA": "WITA", "NZST": "NZST", "CDT": "CDT", "AST": "AST", "MST": "MST", "WESZ": "WESZ", "AWDT": "AWDT", "LHST": "LHST", "WART": "WART", "SGT": "SGT", "AKDT": "AKDT", "WIB": "WIB", "HADT": "HADT", "WIT": "WIT", "PDT": "PDT", "HKST": "HKST", "ECT": "ECT", "MDT": "MDT", "LHDT": "LHDT", "JST": "JST", "EAT": "EAT", "HNT": "HNT", "CHADT": "CHADT", "BOT": "BOT", "TMST": "TMST", "OEZ": "OEZ", "EDT": "EDT", "GYT": "GYT", "ARST": "ARST", "HNEG": "HNEG", "HNNOMX": "HNNOMX"}, -+ locale: "ii_CN", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AST": "AST", "ADT": "ADT", "ChST": "ChST", "HEPM": "HEPM", "PST": "PST", "AEST": "AEST", "EDT": "EDT", "NZST": "NZST", "VET": "VET", "GFT": "GFT", "CHAST": "CHAST", "HNCU": "HNCU", "WIT": "WIT", "NZDT": "NZDT", "BT": "BT", "WAST": "WAST", "JDT": "JDT", "WESZ": "WESZ", "ACST": "ACST", "UYST": "UYST", "ACWST": "ACWST", "HEPMX": "HEPMX", "OESZ": "OESZ", "HAT": "HAT", "CAT": "CAT", "CLST": "CLST", "GYT": "GYT", "WEZ": "WEZ", "OEZ": "OEZ", "HAST": "HAST", "AEDT": "AEDT", "AWDT": "AWDT", "IST": "IST", "WART": "WART", "SAST": "SAST", "GMT": "GMT", "SRT": "SRT", "WITA": "WITA", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HECU": "HECU", "AKDT": "AKDT", "HADT": "HADT", "HNEG": "HNEG", "HNPMX": "HNPMX", "WIB": "WIB", "JST": "JST", "MEZ": "MEZ", "LHST": "LHST", "AKST": "AKST", "EST": "EST", "CST": "CST", "HEEG": "HEEG", "UYT": "UYT", "WAT": "WAT", "COST": "COST", "HNOG": "HNOG", "ARST": "ARST", "ACDT": "ACDT", "ART": "ART", "BOT": "BOT", "AWST": "AWST", "SGT": "SGT", "WARST": "WARST", "COT": "COT", "TMT": "TMT", "TMST": "TMST", "MESZ": "MESZ", "HKT": "HKT", "CDT": "CDT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "HNPM": "HNPM", "CLT": "CLT", "∅∅∅": "∅∅∅", "MDT": "MDT", "ECT": "ECT", "MYT": "MYT", "HKST": "HKST", "MST": "MST", "CHADT": "CHADT", "HNT": "HNT", "HEOG": "HEOG", "EAT": "EAT", "PDT": "PDT"}, - } - } -  -@@ -113,7 +94,7 @@ func (ii *ii_CN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ii *ii_CN) MonthsAbbreviated() []string { -- return ii.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (ii *ii_CN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ii *ii_CN) MonthsNarrow() []string { -- return ii.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (ii *ii_CN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ii *ii_CN) MonthsWide() []string { -- return ii.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (ii *ii_CN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ii_CN' and handles both Whole and Real numbers based on 'v' - func (ii *ii_CN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ii.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ii.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ii.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ii_CN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ii *ii_CN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ii.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ii.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ii.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ii_CN' -@@ -253,60 +174,7 @@ func (ii *ii_CN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ii.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ii.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ii.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ii.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ii.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, ii.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ii.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ii_CN' -@@ -315,72 +183,7 @@ func (ii *ii_CN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ii.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ii.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ii.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ii.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ii.currencyNegativePrefix[j]) -- } -- -- b = append(b, ii.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ii.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ii.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ii.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ii_CN' -@@ -388,28 +191,6 @@ func (ii *ii_CN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -418,17 +199,6 @@ func (ii *ii_CN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ii.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -437,17 +207,6 @@ func (ii *ii_CN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ii.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -456,19 +215,6 @@ func (ii *ii_CN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ii.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ii.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -477,28 +223,6 @@ func (ii *ii_CN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ii.periodsAbbreviated[0]...) -- } else { -- b = append(b, ii.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -507,35 +231,6 @@ func (ii *ii_CN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ii.periodsAbbreviated[0]...) -- } else { -- b = append(b, ii.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -544,40 +239,6 @@ func (ii *ii_CN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ii.periodsAbbreviated[0]...) -- } else { -- b = append(b, ii.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,44 +247,5 @@ func (ii *ii_CN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ii.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ii.periodsAbbreviated[0]...) -- } else { -- b = append(b, ii.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ii.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/is/is.go b/is/is.go -index 594baad..7838dfa 100644 ---- a/is/is.go -+++ b/is/is.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "e.Kr."}, - erasNarrow: []string{"f.k.", "e.k."}, - erasWide: []string{"fyrir Krist", "eftir Krist"}, -- timezones: map[string]string{"VET": "Venesúelatími", "MESZ": "Sumartími í Mið-Evrópu", "GFT": "Tími í Frönsku Gvæjana", "EAT": "Austur-Afríkutími", "CST": "Staðaltími í miðhluta Bandaríkjanna og Kanada", "HEOG": "Sumartími á Vestur-Grænlandi", "PDT": "Sumartími á Kyrrahafssvæðinu", "ACWDT": "Sumartími í miðvesturhluta Ástralíu", "AWST": "Staðaltími í Vestur-Ástralíu", "CHAST": "Staðaltími í Chatham", "IST": "Indlandstími", "UYT": "Staðaltími í Úrúgvæ", "AEST": "Staðaltími í Austur-Ástralíu", "NZST": "Staðaltími á Nýja-Sjálandi", "NZDT": "Sumartími á Nýja-Sjálandi", "ACST": "Staðaltími í Mið-Ástralíu", "HNNOMX": "Staðaltími í Norðvestur-Mexíkó", "HNCU": "Staðaltími á Kúbu", "HEPMX": "Sumartími í Mexíkó á Kyrrahafssvæðinu", "BT": "Bútantími", "HNOG": "Staðaltími á Vestur-Grænlandi", "WEZ": "Staðaltími í Vestur-Evrópu", "ChST": "Chamorro-staðaltími", "SGT": "Singapúrtími", "EDT": "Sumartími í austurhluta Bandaríkjanna og Kanada", "WESZ": "Sumartími í Vestur-Evrópu", "SAST": "Suður-Afríkutími", "OESZ": "Sumartími í Austur-Evrópu", "AKST": "Staðaltími í Alaska", "HADT": "Sumartími á Havaí og Aleúta", "ACWST": "Staðaltími í miðvesturhluta Ástralíu", "∅∅∅": "Sumartími á Amasónsvæðinu", "WAT": "Staðaltími í Vestur-Afríku", "EST": "Staðaltími í austurhluta Bandaríkjanna og Kanada", "WIB": "Vestur-Indónesíutími", "ART": "Staðaltími í Argentínu", "JDT": "Sumartími í Japan", "TMST": "Sumartími í Túrkmenistan", "WAST": "Sumartími í Vestur-Afríku", "WARST": "Sumartími í Vestur-Argentínu", "WIT": "Austur-Indónesíutími", "AWDT": "Sumartími í Vestur-Ástralíu", "MEZ": "Staðaltími í Mið-Evrópu", "CLT": "Staðaltími í Síle", "TMT": "Staðaltími í Túrkmenistan", "ACDT": "Sumartími í Mið-Ástralíu", "OEZ": "Staðaltími í Austur-Evrópu", "UYST": "Sumartími í Úrúgvæ", "ADT": "Sumartími á Atlantshafssvæðinu", "SRT": "Súrinamtími", "HNT": "Staðaltími á Nýfundnalandi", "HEPM": "Sumartími á Sankti Pierre og Miquelon", "JST": "Staðaltími í Japan", "HEEG": "Sumartími á Austur-Grænlandi", "ECT": "Ekvadortími", "WART": "Staðaltími í Vestur-Argentínu", "CHADT": "Sumartími í Chatham", "HNPMX": "Staðaltími í Mexíkó á Kyrrahafssvæðinu", "HKT": "Staðaltími í Hong Kong", "HNEG": "Staðaltími á Austur-Grænlandi", "COST": "Sumartími í Kólumbíu", "CDT": "Sumartími í miðhluta Bandaríkjanna og Kanada", "AST": "Staðaltími á Atlantshafssvæðinu", "MYT": "Malasíutími", "WITA": "Mið-Indónesíutími", "HKST": "Sumartími í Hong Kong", "HNPM": "Staðaltími á Sankti Pierre og Miquelon", "CLST": "Sumartími í Síle", "AKDT": "Sumartími í Alaska", "ARST": "Sumartími í Argentínu", "LHDT": "Sumartími á Lord Howe-eyju", "GMT": "Greenwich-staðaltími", "HECU": "Sumartími á Kúbu", "MST": "MST", "MDT": "MDT", "HAT": "Sumartími á Nýfundnalandi", "AEDT": "Sumartími í Austur-Ástralíu", "LHST": "Staðaltími á Lord Howe-eyju", "CAT": "Mið-Afríkutími", "GYT": "Gvæjanatími", "HAST": "Staðaltími á Havaí og Aleúta", "PST": "Staðaltími á Kyrrahafssvæðinu", "BOT": "Bólivíutími", "COT": "Staðaltími í Kólumbíu", "HENOMX": "Sumartími í Norðvestur-Mexíkó"}, -+ timezones: map[string]string{"BOT": "Bólivíutími", "HNEG": "Staðaltími á Austur-Grænlandi", "CAT": "Mið-Afríkutími", "WIB": "Vestur-Indónesíutími", "HEEG": "Sumartími á Austur-Grænlandi", "WARST": "Sumartími í Vestur-Argentínu", "CLT": "Staðaltími í Síle", "ACWDT": "Sumartími í miðvesturhluta Ástralíu", "HNT": "Staðaltími á Nýfundnalandi", "TMST": "Sumartími í Túrkmenistan", "MESZ": "Sumartími í Mið-Evrópu", "LHST": "Staðaltími á Lord Howe-eyju", "IST": "Indlandstími", "ACST": "Staðaltími í Mið-Ástralíu", "WESZ": "Sumartími í Vestur-Evrópu", "SGT": "Singapúrtími", "VET": "Venesúelatími", "COST": "Sumartími í Kólumbíu", "CLST": "Sumartími í Síle", "NZST": "Staðaltími á Nýja-Sjálandi", "HAST": "Staðaltími á Havaí og Aleúta", "HADT": "Sumartími á Havaí og Aleúta", "ACDT": "Sumartími í Mið-Ástralíu", "ADT": "Sumartími á Atlantshafssvæðinu", "WAT": "Staðaltími í Vestur-Afríku", "OESZ": "Sumartími í Austur-Evrópu", "WIT": "Austur-Indónesíutími", "MEZ": "Staðaltími í Mið-Evrópu", "AEDT": "Sumartími í Austur-Ástralíu", "WEZ": "Staðaltími í Vestur-Evrópu", "GFT": "Tími í Frönsku Gvæjana", "WART": "Staðaltími í Vestur-Argentínu", "EST": "Staðaltími í austurhluta Bandaríkjanna og Kanada", "ChST": "Chamorro-staðaltími", "HNPM": "Staðaltími á Sankti Pierre og Miquelon", "CHADT": "Sumartími í Chatham", "UYST": "Sumartími í Úrúgvæ", "∅∅∅": "∅∅∅", "HNCU": "Staðaltími á Kúbu", "CDT": "Sumartími í miðhluta Bandaríkjanna og Kanada", "HNPMX": "Staðaltími í Mexíkó á Kyrrahafssvæðinu", "AKDT": "Sumartími í Alaska", "HAT": "Sumartími á Nýfundnalandi", "HNOG": "Staðaltími á Vestur-Grænlandi", "HKT": "Staðaltími í Hong Kong", "NZDT": "Sumartími á Nýja-Sjálandi", "UYT": "Staðaltími í Úrúgvæ", "BT": "Bútantími", "HECU": "Sumartími á Kúbu", "OEZ": "Staðaltími í Austur-Evrópu", "TMT": "Staðaltími í Túrkmenistan", "ARST": "Sumartími í Argentínu", "HENOMX": "Sumartími í Norðvestur-Mexíkó", "CHAST": "Staðaltími í Chatham", "ACWST": "Staðaltími í miðvesturhluta Ástralíu", "SAST": "Suður-Afríkutími", "ECT": "Ekvadortími", "AST": "Staðaltími á Atlantshafssvæðinu", "ART": "Staðaltími í Argentínu", "AWDT": "Sumartími í Vestur-Ástralíu", "HEPM": "Sumartími á Sankti Pierre og Miquelon", "AEST": "Staðaltími í Austur-Ástralíu", "MDT": "Sumartími í Klettafjöllum", "MYT": "Malasíutími", "COT": "Staðaltími í Kólumbíu", "HEPMX": "Sumartími í Mexíkó á Kyrrahafssvæðinu", "WAST": "Sumartími í Vestur-Afríku", "WITA": "Mið-Indónesíutími", "GMT": "Greenwich-staðaltími", "EAT": "Austur-Afríkutími", "LHDT": "Sumartími á Lord Howe-eyju", "PST": "Staðaltími á Kyrrahafssvæðinu", "HEOG": "Sumartími á Vestur-Grænlandi", "HKST": "Sumartími í Hong Kong", "MST": "Staðaltími í Klettafjöllum", "JDT": "Sumartími í Japan", "AKST": "Staðaltími í Alaska", "JST": "Staðaltími í Japan", "PDT": "Sumartími á Kyrrahafssvæðinu", "GYT": "Gvæjanatími", "EDT": "Sumartími í austurhluta Bandaríkjanna og Kanada", "CST": "Staðaltími í miðhluta Bandaríkjanna og Kanada", "SRT": "Súrinamtími", "HNNOMX": "Staðaltími í Norðvestur-Mexíkó", "AWST": "Staðaltími í Vestur-Ástralíu"}, - } - } -  -diff --git a/is_IS/is_IS.go b/is_IS/is_IS.go -index 2a2687e..8388131 100644 ---- a/is_IS/is_IS.go -+++ b/is_IS/is_IS.go -@@ -10,68 +10,45 @@ import ( - ) -  - type is_IS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'is_IS' locale - func New() locales.Translator { - return &is_IS{ -- locale: "is_IS", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "maí", "jún.", "júl.", "ágú.", "sep.", "okt.", "nóv.", "des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "Á", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janúar", "febrúar", "mars", "apríl", "maí", "júní", "júlí", "ágúst", "september", "október", "nóvember", "desember"}, -- daysAbbreviated: []string{"sun.", "mán.", "þri.", "mið.", "fim.", "fös.", "lau."}, -- daysNarrow: []string{"S", "M", "Þ", "M", "F", "F", "L"}, -- daysShort: []string{"su.", "má.", "þr.", "mi.", "fi.", "fö.", "la."}, -- daysWide: []string{"sunnudagur", "mánudagur", "þriðjudagur", "miðvikudagur", "fimmtudagur", "föstudagur", "laugardagur"}, -- periodsAbbreviated: []string{"f.h.", "e.h."}, -- periodsNarrow: []string{"f.", "e."}, -- periodsWide: []string{"f.h.", "e.h."}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.k.", "e.k."}, -- erasWide: []string{"fyrir Krist", "eftir Krist"}, -- timezones: map[string]string{"MST": "MST", "HKT": "Staðaltími í Hong Kong", "OESZ": "Sumartími í Austur-Evrópu", "OEZ": "Staðaltími í Austur-Evrópu", "ECT": "Ekvadortími", "EAT": "Austur-Afríkutími", "HECU": "Sumartími á Kúbu", "CST": "Staðaltími í miðhluta Bandaríkjanna og Kanada", "PDT": "Sumartími á Kyrrahafssvæðinu", "CHAST": "Staðaltími í Chatham", "LHDT": "Sumartími á Lord Howe-eyju", "HNNOMX": "Staðaltími í Norðvestur-Mexíkó", "JST": "Staðaltími í Japan", "JDT": "Sumartími í Japan", "HEEG": "Sumartími á Austur-Grænlandi", "∅∅∅": "Sumartími á Asóreyjum", "SGT": "Singapúrtími", "AEST": "Staðaltími í Austur-Ástralíu", "AEDT": "Sumartími í Austur-Ástralíu", "AWST": "Staðaltími í Vestur-Ástralíu", "ChST": "Chamorro-staðaltími", "GFT": "Tími í Frönsku Gvæjana", "HNCU": "Staðaltími á Kúbu", "EDT": "Sumartími í austurhluta Bandaríkjanna og Kanada", "HNPM": "Staðaltími á Sankti Pierre og Miquelon", "NZDT": "Sumartími á Nýja-Sjálandi", "MESZ": "Sumartími í Mið-Evrópu", "WARST": "Sumartími í Vestur-Argentínu", "ACWDT": "Sumartími í miðvesturhluta Ástralíu", "HAT": "Sumartími á Nýfundnalandi", "IST": "Indlandstími", "HNEG": "Staðaltími á Austur-Grænlandi", "CAT": "Mið-Afríkutími", "AKST": "Staðaltími í Alaska", "WIT": "Austur-Indónesíutími", "VET": "Venesúelatími", "WEZ": "Staðaltími í Vestur-Evrópu", "LHST": "Staðaltími á Lord Howe-eyju", "AKDT": "Sumartími í Alaska", "HAST": "Staðaltími á Havaí og Aleúta", "SRT": "Súrinamtími", "MEZ": "Staðaltími í Mið-Evrópu", "WAT": "Staðaltími í Vestur-Afríku", "WART": "Staðaltími í Vestur-Argentínu", "HEPMX": "Sumartími í Mexíkó á Kyrrahafssvæðinu", "HADT": "Sumartími á Havaí og Aleúta", "HEOG": "Sumartími á Vestur-Grænlandi", "AWDT": "Sumartími í Vestur-Ástralíu", "ACDT": "Sumartími í Mið-Ástralíu", "HEPM": "Sumartími á Sankti Pierre og Miquelon", "CLST": "Sumartími í Síle", "TMST": "Sumartími í Túrkmenistan", "GYT": "Gvæjanatími", "UYT": "Staðaltími í Úrúgvæ", "HNT": "Staðaltími á Nýfundnalandi", "HKST": "Sumartími í Hong Kong", "WITA": "Mið-Indónesíutími", "MYT": "Malasíutími", "CHADT": "Sumartími í Chatham", "ACST": "Staðaltími í Mið-Ástralíu", "COT": "Staðaltími í Kólumbíu", "HNPMX": "Staðaltími í Mexíkó á Kyrrahafssvæðinu", "EST": "Staðaltími í austurhluta Bandaríkjanna og Kanada", "WIB": "Vestur-Indónesíutími", "HNOG": "Staðaltími á Vestur-Grænlandi", "COST": "Sumartími í Kólumbíu", "AST": "Staðaltími á Atlantshafssvæðinu", "WESZ": "Sumartími í Vestur-Evrópu", "NZST": "Staðaltími á Nýja-Sjálandi", "HENOMX": "Sumartími í Norðvestur-Mexíkó", "ARST": "Sumartími í Argentínu", "CLT": "Staðaltími í Síle", "GMT": "Greenwich-staðaltími", "CDT": "Sumartími í miðhluta Bandaríkjanna og Kanada", "ADT": "Sumartími á Atlantshafssvæðinu", "ACWST": "Staðaltími í miðvesturhluta Ástralíu", "ART": "Staðaltími í Argentínu", "UYST": "Sumartími í Úrúgvæ", "PST": "Staðaltími á Kyrrahafssvæðinu", "SAST": "Suður-Afríkutími", "TMT": "Staðaltími í Túrkmenistan", "WAST": "Sumartími í Vestur-Afríku", "MDT": "MDT", "BT": "Bútantími", "BOT": "Bólivíutími"}, -+ locale: "is_IS", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GYT": "GYT", "COST": "COST", "ARST": "ARST", "PDT": "PDT", "PST": "PST", "HAT": "HAT", "SAST": "SAST", "AWDT": "AWDT", "WIT": "WIT", "MESZ": "MESZ", "AEST": "AEST", "HEOG": "HEOG", "MST": "MST", "HNEG": "HNEG", "JST": "JST", "BT": "BT", "AKDT": "AKDT", "EDT": "EDT", "NZST": "NZST", "AST": "AST", "MYT": "MYT", "WITA": "WITA", "ADT": "ADT", "ChST": "ChST", "WAST": "WAST", "WART": "WART", "NZDT": "NZDT", "HENOMX": "HENOMX", "LHST": "LHST", "LHDT": "LHDT", "ACWST": "ACWST", "WESZ": "WESZ", "VET": "VET", "CLT": "CLT", "CST": "CST", "HAST": "HAST", "BOT": "BOT", "HEPM": "HEPM", "HNOG": "HNOG", "CAT": "CAT", "HADT": "HADT", "IST": "IST", "ACWDT": "ACWDT", "HNT": "HNT", "HKST": "HKST", "CLST": "CLST", "MDT": "MDT", "MEZ": "MEZ", "ACST": "ACST", "AEDT": "AEDT", "COT": "COT", "EAT": "EAT", "UYT": "UYT", "AKST": "AKST", "TMT": "TMT", "TMST": "TMST", "ART": "ART", "HEEG": "HEEG", "JDT": "JDT", "CHADT": "CHADT", "WEZ": "WEZ", "HNCU": "HNCU", "HEPMX": "HEPMX", "WAT": "WAT", "OEZ": "OEZ", "AWST": "AWST", "SRT": "SRT", "GMT": "GMT", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "SGT": "SGT", "WARST": "WARST", "HKT": "HKT", "ECT": "ECT", "ACDT": "ACDT", "HECU": "HECU", "HNPMX": "HNPMX", "WIB": "WIB", "CHAST": "CHAST", "UYST": "UYST", "OESZ": "OESZ", "GFT": "GFT", "EST": "EST", "CDT": "CDT", "HNPM": "HNPM"}, - } - } -  -@@ -141,7 +118,7 @@ func (is *is_IS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (is *is_IS) MonthsAbbreviated() []string { -- return is.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -151,7 +128,7 @@ func (is *is_IS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (is *is_IS) MonthsNarrow() []string { -- return is.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -161,7 +138,7 @@ func (is *is_IS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (is *is_IS) MonthsWide() []string { -- return is.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -207,73 +184,13 @@ func (is *is_IS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'is_IS' and handles both Whole and Real numbers based on 'v' - func (is *is_IS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, is.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, is.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, is.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'is_IS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (is *is_IS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, is.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, is.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, is.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'is_IS' -@@ -281,56 +198,7 @@ func (is *is_IS) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := is.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, is.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, is.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, is.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, is.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, is.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'is_IS' -@@ -339,63 +207,7 @@ func (is *is_IS) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := is.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, is.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, is.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, is.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, is.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, is.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, is.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'is_IS' -@@ -403,17 +215,6 @@ func (is *is_IS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -422,17 +223,6 @@ func (is *is_IS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, is.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -441,17 +231,6 @@ func (is *is_IS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, is.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,19 +239,6 @@ func (is *is_IS) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, is.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, is.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -481,19 +247,6 @@ func (is *is_IS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -502,26 +255,6 @@ func (is *is_IS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -530,30 +263,6 @@ func (is *is_IS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -562,34 +271,5 @@ func (is *is_IS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, is.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := is.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/it/it.go b/it/it.go -index c93d019..e5bad77 100644 ---- a/it/it.go -+++ b/it/it.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"a.C.", "d.C."}, - erasNarrow: []string{"aC", "dC"}, - erasWide: []string{"avanti Cristo", "dopo Cristo"}, -- timezones: map[string]string{"MST": "MST", "CDT": "Ora legale centrale USA", "HNOG": "Ora standard della Groenlandia occidentale", "HEOG": "Ora legale della Groenlandia occidentale", "OEZ": "Ora standard dell’Europa orientale", "SRT": "Ora del Suriname", "WESZ": "Ora legale dell’Europa occidentale", "ARST": "Ora legale dell’Argentina", "COST": "Ora legale della Colombia", "LHDT": "Ora legale di Lord Howe", "NZDT": "Ora legale della Nuova Zelanda", "BOT": "Ora della Bolivia", "GMT": "Ora del meridiano di Greenwich", "GYT": "Ora della Guyana", "HAST": "Ora standard delle Isole Hawaii-Aleutine", "VET": "Ora del Venezuela", "WITA": "Ora dell’Indonesia centrale", "EAT": "Ora dell’Africa orientale", "HNPMX": "Ora standard del Pacifico (Messico)", "MYT": "Ora della Malesia", "WIT": "Ora dell’Indonesia orientale", "HNNOMX": "Ora standard del Messico nord-occidentale", "HENOMX": "Ora legale del Messico nord-occidentale", "∅∅∅": "∅∅∅", "HEPMX": "Ora legale del Pacifico (Messico)", "WEZ": "Ora standard dell’Europa occidentale", "ART": "Ora standard dell’Argentina", "SAST": "Ora dell’Africa meridionale", "PST": "Ora standard del Pacifico USA", "AWST": "Ora standard dell’Australia occidentale", "WART": "Ora standard dell’Argentina occidentale", "CHAST": "Ora standard delle Chatham", "WARST": "Ora legale dell’Argentina occidentale", "EDT": "Ora legale orientale USA", "MDT": "MDT", "PDT": "Ora legale del Pacifico USA", "ACWDT": "Ora legale dell’Australia centroccidentale", "AWDT": "Ora legale dell’Australia occidentale", "ECT": "Ora dell’Ecuador", "HECU": "Ora legale di Cuba", "AST": "Ora standard dell’Atlantico", "ACWST": "Ora standard dell’Australia centroccidentale", "LHST": "Ora standard di Lord Howe", "ACST": "Ora standard dell’Australia centrale", "COT": "Ora standard della Colombia", "EST": "Ora standard orientale USA", "AKST": "Ora standard dell’Alaska", "WIB": "Ora dell’Indonesia occidentale", "CLST": "Ora legale del Cile", "JST": "Ora standard del Giappone", "HADT": "Ora legale delle Isole Hawaii-Aleutine", "HNT": "Ora standard di Terranova", "ACDT": "Ora legale dell’Australia centrale", "CAT": "Ora dell’Africa centrale", "HEEG": "Ora legale della Groenlandia orientale", "AKDT": "Ora legale dell’Alaska", "AEST": "Ora standard dell’Australia orientale", "HKT": "Ora standard di Hong Kong", "HEPM": "Ora legale di Saint-Pierre e Miquelon", "MEZ": "Ora standard dell’Europa centrale", "JDT": "Ora legale del Giappone", "SGT": "Ora di Singapore", "HNCU": "Ora standard di Cuba", "UYST": "Ora legale dell’Uruguay", "CHADT": "Ora legale delle Chatham", "IST": "Ora standard dell’India", "WAST": "Ora legale dell’Africa occidentale", "CST": "Ora standard centrale USA", "ADT": "Ora legale dell’Atlantico", "HNPM": "Ora standard di Saint-Pierre e Miquelon", "NZST": "Ora standard della Nuova Zelanda", "WAT": "Ora standard dell’Africa occidentale", "BT": "Ora del Bhutan", "AEDT": "Ora legale dell’Australia orientale", "HKST": "Ora legale di Hong Kong", "GFT": "Ora della Guiana francese", "OESZ": "Ora legale dell’Europa orientale", "TMST": "Ora legale del Turkmenistan", "UYT": "Ora standard dell’Uruguay", "HAT": "Ora legale di Terranova", "MESZ": "Ora legale dell’Europa centrale", "HNEG": "Ora standard della Groenlandia orientale", "TMT": "Ora standard del Turkmenistan", "CLT": "Ora standard del Cile", "ChST": "Ora di Chamorro"}, -+ timezones: map[string]string{"HAST": "Ora standard delle Isole Hawaii-Aleutine", "ACWST": "Ora standard dell’Australia centroccidentale", "NZDT": "Ora legale della Nuova Zelanda", "ECT": "Ora dell’Ecuador", "ChST": "Ora di Chamorro", "WART": "Ora standard dell’Argentina occidentale", "GYT": "Ora della Guyana", "EST": "Ora standard orientale USA", "CAT": "Ora dell’Africa centrale", "CLT": "Ora standard del Cile", "HNOG": "Ora standard della Groenlandia occidentale", "CST": "Ora standard centrale USA", "MEZ": "Ora standard dell’Europa centrale", "JST": "Ora standard del Giappone", "SGT": "Ora di Singapore", "GFT": "Ora della Guiana francese", "SAST": "Ora dell’Africa meridionale", "TMST": "Ora legale del Turkmenistan", "CHAST": "Ora standard delle Chatham", "HNPMX": "Ora standard del Pacifico (Messico)", "EDT": "Ora legale orientale USA", "MST": "Ora standard Montagne Rocciose USA", "EAT": "Ora dell’Africa orientale", "HENOMX": "Ora legale del Messico nord-occidentale", "UYT": "Ora standard dell’Uruguay", "ACWDT": "Ora legale dell’Australia centroccidentale", "CLST": "Ora legale del Cile", "NZST": "Ora standard della Nuova Zelanda", "COT": "Ora standard della Colombia", "HEOG": "Ora legale della Groenlandia occidentale", "AWST": "Ora standard dell’Australia occidentale", "LHST": "Ora standard di Lord Howe", "CHADT": "Ora legale delle Chatham", "HECU": "Ora legale di Cuba", "WAT": "Ora standard dell’Africa occidentale", "AWDT": "Ora legale dell’Australia occidentale", "PST": "Ora standard del Pacifico USA", "HEPMX": "Ora legale del Pacifico (Messico)", "HAT": "Ora legale di Terranova", "ARST": "Ora legale dell’Argentina", "WARST": "Ora legale dell’Argentina occidentale", "SRT": "Ora del Suriname", "HADT": "Ora legale delle Isole Hawaii-Aleutine", "MYT": "Ora della Malesia", "UYST": "Ora legale dell’Uruguay", "AKST": "Ora standard dell’Alaska", "HEEG": "Ora legale della Groenlandia orientale", "OESZ": "Ora legale dell’Europa orientale", "HKST": "Ora legale di Hong Kong", "WITA": "Ora dell’Indonesia centrale", "AKDT": "Ora legale dell’Alaska", "HNT": "Ora standard di Terranova", "HKT": "Ora standard di Hong Kong", "MESZ": "Ora legale dell’Europa centrale", "ACST": "Ora standard dell’Australia centrale", "ACDT": "Ora legale dell’Australia centrale", "JDT": "Ora legale del Giappone", "WEZ": "Ora standard dell’Europa occidentale", "ART": "Ora standard dell’Argentina", "GMT": "Ora del meridiano di Greenwich", "BOT": "Ora della Bolivia", "HNEG": "Ora standard della Groenlandia orientale", "AEDT": "Ora legale dell’Australia orientale", "HNCU": "Ora standard di Cuba", "CDT": "Ora legale centrale USA", "IST": "Ora standard dell’India", "VET": "Ora del Venezuela", "WIT": "Ora dell’Indonesia orientale", "AST": "Ora standard dell’Atlantico", "PDT": "Ora legale del Pacifico USA", "WAST": "Ora legale dell’Africa occidentale", "WIB": "Ora dell’Indonesia occidentale", "HEPM": "Ora legale di Saint-Pierre e Miquelon", "BT": "Ora del Bhutan", "TMT": "Ora standard del Turkmenistan", "ADT": "Ora legale dell’Atlantico", "MDT": "Ora legale Montagne Rocciose USA", "LHDT": "Ora legale di Lord Howe", "HNPM": "Ora standard di Saint-Pierre e Miquelon", "AEST": "Ora standard dell’Australia orientale", "COST": "Ora legale della Colombia", "HNNOMX": "Ora standard del Messico nord-occidentale", "∅∅∅": "∅∅∅", "WESZ": "Ora legale dell’Europa occidentale", "OEZ": "Ora standard dell’Europa orientale"}, - } - } -  -diff --git a/it_CH/it_CH.go b/it_CH/it_CH.go -index d03e89e..4611e47 100644 ---- a/it_CH/it_CH.go -+++ b/it_CH/it_CH.go -@@ -50,28 +50,11 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{2, 6}, - decimal: ".", - group: "'", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"}, -- monthsNarrow: []string{"", "G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"}, -- daysAbbreviated: []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, -- daysNarrow: []string{"D", "L", "M", "M", "G", "V", "S"}, -- daysShort: []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, -- daysWide: []string{"domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"m.", "p."}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"avanti Cristo", "dopo Cristo"}, -- timezones: map[string]string{"HKST": "Ora legale di Hong Kong", "ADT": "Ora legale dell’Atlantico", "HNPM": "Ora standard di Saint-Pierre e Miquelon", "CHAST": "Ora standard delle Chatham", "CAT": "Ora dell’Africa centrale", "HECU": "Ora legale di Cuba", "WESZ": "Ora legale dell’Europa occidentale", "ACWDT": "Ora legale dell’Australia centroccidentale", "ACDT": "Ora legale dell’Australia centrale", "WIT": "Ora dell’Indonesia orientale", "WARST": "Ora legale dell’Argentina occidentale", "AKDT": "Ora legale dell’Alaska", "AEDT": "Ora legale dell’Australia orientale", "CLT": "Ora standard del Cile", "TMT": "Ora standard del Turkmenistan", "MYT": "Ora della Malesia", "UYST": "Ora legale dell’Uruguay", "AKST": "Ora standard dell’Alaska", "AEST": "Ora standard dell’Australia orientale", "JDT": "Ora legale del Giappone", "ChST": "Ora di Chamorro", "HNEG": "Ora standard della Groenlandia orientale", "HENOMX": "Ora legale del Messico nord-occidentale", "CST": "Ora standard centrale USA", "BT": "Ora del Bhutan", "HNOG": "Ora standard della Groenlandia occidentale", "PST": "Ora standard del Pacifico USA", "GFT": "Ora della Guiana francese", "TMST": "Ora legale del Turkmenistan", "UYT": "Ora standard dell’Uruguay", "HADT": "Ora legale delle Isole Hawaii-Aleutine", "CLST": "Ora legale del Cile", "BOT": "Ora della Bolivia", "∅∅∅": "Ora legale dell’Amazzonia", "OESZ": "Ora legale dell’Europa orientale", "GMT": "Ora del meridiano di Greenwich", "HNPMX": "Ora standard del Pacifico (Messico)", "HEOG": "Ora legale della Groenlandia occidentale", "AWDT": "Ora legale dell’Australia occidentale", "LHST": "Ora standard di Lord Howe", "IST": "Ora standard dell’India", "WAT": "Ora standard dell’Africa occidentale", "OEZ": "Ora standard dell’Europa orientale", "MDT": "MDT", "HAST": "Ora standard delle Isole Hawaii-Aleutine", "PDT": "Ora legale del Pacifico USA", "ARST": "Ora legale dell’Argentina", "COST": "Ora legale della Colombia", "HEPMX": "Ora legale del Pacifico (Messico)", "HEEG": "Ora legale della Groenlandia orientale", "CDT": "Ora legale centrale USA", "NZST": "Ora standard della Nuova Zelanda", "NZDT": "Ora legale della Nuova Zelanda", "WART": "Ora standard dell’Argentina occidentale", "COT": "Ora standard della Colombia", "WIB": "Ora dell’Indonesia occidentale", "ACWST": "Ora standard dell’Australia centroccidentale", "MESZ": "Ora legale dell’Europa centrale", "LHDT": "Ora legale di Lord Howe", "WAST": "Ora legale dell’Africa occidentale", "SGT": "Ora di Singapore", "HNCU": "Ora standard di Cuba", "GYT": "Ora della Guyana", "WEZ": "Ora standard dell’Europa occidentale", "HNT": "Ora standard di Terranova", "CHADT": "Ora legale delle Chatham", "ACST": "Ora standard dell’Australia centrale", "EST": "Ora standard orientale USA", "MST": "MST", "VET": "Ora del Venezuela", "ART": "Ora standard dell’Argentina", "MEZ": "Ora standard dell’Europa centrale", "HNNOMX": "Ora standard del Messico nord-occidentale", "EDT": "Ora legale orientale USA", "HAT": "Ora legale di Terranova", "AWST": "Ora standard dell’Australia occidentale", "HEPM": "Ora legale di Saint-Pierre e Miquelon", "SAST": "Ora dell’Africa meridionale", "JST": "Ora standard del Giappone", "EAT": "Ora dell’Africa orientale", "ECT": "Ora dell’Ecuador", "AST": "Ora standard dell’Atlantico", "HKT": "Ora standard di Hong Kong", "WITA": "Ora dell’Indonesia centrale", "SRT": "Ora del Suriname"}, -+ timezones: map[string]string{"HKT": "HKT", "IST": "IST", "PST": "PST", "BT": "BT", "OEZ": "OEZ", "TMT": "TMT", "AWST": "AWST", "AWDT": "AWDT", "HNPM": "HNPM", "UYT": "UYT", "SGT": "SGT", "AST": "AST", "MESZ": "MESZ", "HEEG": "HEEG", "HNCU": "HNCU", "HECU": "HECU", "AKST": "AKST", "HEOG": "HEOG", "HAST": "HAST", "LHST": "LHST", "UYST": "UYST", "COT": "COT", "ACDT": "ACDT", "AEDT": "AEDT", "GYT": "GYT", "ARST": "ARST", "BOT": "BOT", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "WAT": "WAT", "CDT": "CDT", "NZDT": "NZDT", "ART": "ART", "CAT": "CAT", "AEST": "AEST", "CHADT": "CHADT", "COST": "COST", "WIB": "WIB", "ACST": "ACST", "JST": "JST", "OESZ": "OESZ", "HNT": "HNT", "WART": "WART", "WIT": "WIT", "HKST": "HKST", "CST": "CST", "ACWDT": "ACWDT", "VET": "VET", "HADT": "HADT", "MEZ": "MEZ", "MYT": "MYT", "WESZ": "WESZ", "MST": "MST", "ECT": "ECT", "GMT": "GMT", "ACWST": "ACWST", "CLT": "CLT", "MDT": "MDT", "EAT": "EAT", "HEPM": "HEPM", "GFT": "GFT", "HNOG": "HNOG", "TMST": "TMST", "ADT": "ADT", "LHDT": "LHDT", "PDT": "PDT", "NZST": "NZST", "WAST": "WAST", "AKDT": "AKDT", "HNEG": "HNEG", "JDT": "JDT", "HEPMX": "HEPMX", "WEZ": "WEZ", "WARST": "WARST", "WITA": "WITA", "HENOMX": "HENOMX", "CHAST": "CHAST", "SAST": "SAST", "EST": "EST", "EDT": "EDT", "ChST": "ChST", "SRT": "SRT", "HAT": "HAT", "HNNOMX": "HNNOMX", "CLST": "CLST"}, - } - } -  -@@ -143,7 +126,7 @@ func (it *it_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (it *it_CH) MonthsAbbreviated() []string { -- return it.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +136,7 @@ func (it *it_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (it *it_CH) MonthsNarrow() []string { -- return it.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +146,7 @@ func (it *it_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (it *it_CH) MonthsWide() []string { -- return it.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,73 +192,13 @@ func (it *it_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'it_CH' and handles both Whole and Real numbers based on 'v' - func (it *it_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'it_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (it *it_CH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, it.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'it_CH' -@@ -283,7 +206,7 @@ func (it *it_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := it.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -345,7 +268,7 @@ func (it *it_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := it.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -466,17 +389,6 @@ func (it *it_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -506,19 +418,6 @@ func (it *it_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -527,26 +426,6 @@ func (it *it_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -555,30 +434,6 @@ func (it *it_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -587,34 +442,5 @@ func (it *it_CH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := it.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/it_IT/it_IT.go b/it_IT/it_IT.go -index d9f3ded..11470ca 100644 ---- a/it_IT/it_IT.go -+++ b/it_IT/it_IT.go -@@ -10,68 +10,45 @@ import ( - ) -  - type it_IT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'it_IT' locale - func New() locales.Translator { - return &it_IT{ -- locale: "it_IT", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"}, -- monthsNarrow: []string{"", "G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"}, -- daysAbbreviated: []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, -- daysNarrow: []string{"D", "L", "M", "M", "G", "V", "S"}, -- daysShort: []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, -- daysWide: []string{"domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"m.", "p."}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"avanti Cristo", "dopo Cristo"}, -- timezones: map[string]string{"CHADT": "Ora legale delle Chatham", "∅∅∅": "Ora legale dell’Amazzonia", "GMT": "Ora del meridiano di Greenwich", "SGT": "Ora di Singapore", "EST": "Ora standard orientale USA", "ACWST": "Ora standard dell’Australia centroccidentale", "ARST": "Ora legale dell’Argentina", "NZST": "Ora standard della Nuova Zelanda", "COST": "Ora legale della Colombia", "HEPMX": "Ora legale del Pacifico (Messico)", "UYST": "Ora legale dell’Uruguay", "HADT": "Ora legale delle Isole Hawaii-Aleutine", "ACWDT": "Ora legale dell’Australia centroccidentale", "IST": "Ora standard dell’India", "UYT": "Ora standard dell’Uruguay", "BT": "Ora del Bhutan", "AEDT": "Ora legale dell’Australia orientale", "SAST": "Ora dell’Africa meridionale", "HECU": "Ora legale di Cuba", "ART": "Ora standard dell’Argentina", "HNPM": "Ora standard di Saint-Pierre e Miquelon", "WESZ": "Ora legale dell’Europa occidentale", "HNOG": "Ora standard della Groenlandia occidentale", "HEOG": "Ora legale della Groenlandia occidentale", "WITA": "Ora dell’Indonesia centrale", "HNT": "Ora standard di Terranova", "CHAST": "Ora standard delle Chatham", "ACDT": "Ora legale dell’Australia centrale", "OESZ": "Ora legale dell’Europa orientale", "AST": "Ora standard dell’Atlantico", "MYT": "Ora della Malesia", "WEZ": "Ora standard dell’Europa occidentale", "WIT": "Ora dell’Indonesia orientale", "HKST": "Ora legale di Hong Kong", "WART": "Ora standard dell’Argentina occidentale", "HNNOMX": "Ora standard del Messico nord-occidentale", "MST": "MST", "AKST": "Ora standard dell’Alaska", "AKDT": "Ora legale dell’Alaska", "ADT": "Ora legale dell’Atlantico", "CLT": "Ora standard del Cile", "JDT": "Ora legale del Giappone", "COT": "Ora standard della Colombia", "GYT": "Ora della Guyana", "MEZ": "Ora standard dell’Europa centrale", "LHST": "Ora standard di Lord Howe", "LHDT": "Ora legale di Lord Howe", "GFT": "Ora della Guiana francese", "HKT": "Ora standard di Hong Kong", "AWST": "Ora standard dell’Australia occidentale", "HEPM": "Ora legale di Saint-Pierre e Miquelon", "JST": "Ora standard del Giappone", "BOT": "Ora della Bolivia", "CDT": "Ora legale centrale USA", "HAST": "Ora standard delle Isole Hawaii-Aleutine", "HAT": "Ora legale di Terranova", "NZDT": "Ora legale della Nuova Zelanda", "ECT": "Ora dell’Ecuador", "HNCU": "Ora standard di Cuba", "MESZ": "Ora legale dell’Europa centrale", "ChST": "Ora di Chamorro", "HNEG": "Ora standard della Groenlandia orientale", "TMST": "Ora legale del Turkmenistan", "WAT": "Ora standard dell’Africa occidentale", "CLST": "Ora legale del Cile", "CAT": "Ora dell’Africa centrale", "HNPMX": "Ora standard del Pacifico (Messico)", "WIB": "Ora dell’Indonesia occidentale", "CST": "Ora standard centrale USA", "PDT": "Ora legale del Pacifico USA", "ACST": "Ora standard dell’Australia centrale", "OEZ": "Ora standard dell’Europa orientale", "WARST": "Ora legale dell’Argentina occidentale", "HENOMX": "Ora legale del Messico nord-occidentale", "EDT": "Ora legale orientale USA", "MDT": "MDT", "AEST": "Ora standard dell’Australia orientale", "AWDT": "Ora legale dell’Australia occidentale", "WAST": "Ora legale dell’Africa occidentale", "PST": "Ora standard del Pacifico USA", "HEEG": "Ora legale della Groenlandia orientale", "TMT": "Ora standard del Turkmenistan", "EAT": "Ora dell’Africa orientale", "VET": "Ora del Venezuela", "SRT": "Ora del Suriname"}, -+ locale: "it_IT", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MDT": "MDT", "SRT": "SRT", "JST": "JST", "AEST": "AEST", "WEZ": "WEZ", "TMST": "TMST", "EDT": "EDT", "AWDT": "AWDT", "CHAST": "CHAST", "IST": "IST", "WART": "WART", "HENOMX": "HENOMX", "HNPM": "HNPM", "UYST": "UYST", "∅∅∅": "∅∅∅", "MESZ": "MESZ", "WITA": "WITA", "LHST": "LHST", "PST": "PST", "ACWDT": "ACWDT", "HAT": "HAT", "HNOG": "HNOG", "COST": "COST", "CLST": "CLST", "BOT": "BOT", "HAST": "HAST", "HEPM": "HEPM", "UYT": "UYT", "AKDT": "AKDT", "HNT": "HNT", "CHADT": "CHADT", "HNCU": "HNCU", "HEPMX": "HEPMX", "EAT": "EAT", "AEDT": "AEDT", "EST": "EST", "NZST": "NZST", "ART": "ART", "HNPMX": "HNPMX", "WAT": "WAT", "OEZ": "OEZ", "OESZ": "OESZ", "HKST": "HKST", "ADT": "ADT", "ACST": "ACST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "AKST": "AKST", "GFT": "GFT", "ACDT": "ACDT", "SGT": "SGT", "WESZ": "WESZ", "WIT": "WIT", "COT": "COT", "AST": "AST", "MEZ": "MEZ", "PDT": "PDT", "CAT": "CAT", "GMT": "GMT", "BT": "BT", "WARST": "WARST", "NZDT": "NZDT", "ECT": "ECT", "CST": "CST", "ARST": "ARST", "MYT": "MYT", "HEOG": "HEOG", "HKT": "HKT", "JDT": "JDT", "ACWST": "ACWST", "VET": "VET", "WAST": "WAST", "LHDT": "LHDT", "WIB": "WIB", "HEEG": "HEEG", "SAST": "SAST", "CLT": "CLT", "TMT": "TMT", "HECU": "HECU", "CDT": "CDT", "ChST": "ChST", "HADT": "HADT", "AWST": "AWST", "GYT": "GYT", "MST": "MST"}, - } - } -  -@@ -143,7 +120,7 @@ func (it *it_IT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (it *it_IT) MonthsAbbreviated() []string { -- return it.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +130,7 @@ func (it *it_IT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (it *it_IT) MonthsNarrow() []string { -- return it.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +140,7 @@ func (it *it_IT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (it *it_IT) MonthsWide() []string { -- return it.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,73 +186,13 @@ func (it *it_IT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'it_IT' and handles both Whole and Real numbers based on 'v' - func (it *it_IT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'it_IT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (it *it_IT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, it.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'it_IT' -@@ -283,56 +200,7 @@ func (it *it_IT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := it.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, it.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, it.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'it_IT' -@@ -341,63 +209,7 @@ func (it *it_IT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := it.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, it.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, it.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, it.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, it.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'it_IT' -@@ -405,27 +217,6 @@ func (it *it_IT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -434,21 +225,6 @@ func (it *it_IT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,17 +233,6 @@ func (it *it_IT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -476,19 +241,6 @@ func (it *it_IT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, it.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -497,19 +249,6 @@ func (it *it_IT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -518,26 +257,6 @@ func (it *it_IT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -546,30 +265,6 @@ func (it *it_IT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -578,34 +273,5 @@ func (it *it_IT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := it.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/it_SM/it_SM.go b/it_SM/it_SM.go -index 1a04acc..2e1d8f4 100644 ---- a/it_SM/it_SM.go -+++ b/it_SM/it_SM.go -@@ -10,68 +10,45 @@ import ( - ) -  - type it_SM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'it_SM' locale - func New() locales.Translator { - return &it_SM{ -- locale: "it_SM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"}, -- monthsNarrow: []string{"", "G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"}, -- daysAbbreviated: []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, -- daysNarrow: []string{"D", "L", "M", "M", "G", "V", "S"}, -- daysShort: []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"}, -- daysWide: []string{"domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"m.", "p."}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"aC", "dC"}, -- erasWide: []string{"avanti Cristo", "dopo Cristo"}, -- timezones: map[string]string{"AEDT": "Ora legale dell’Australia orientale", "NZST": "Ora standard della Nuova Zelanda", "ACDT": "Ora legale dell’Australia centrale", "EDT": "Ora legale orientale USA", "AWST": "Ora standard dell’Australia occidentale", "EAT": "Ora dell’Africa orientale", "HAST": "Ora standard delle Isole Hawaii-Aleutine", "ARST": "Ora legale dell’Argentina", "HKT": "Ora standard di Hong Kong", "SGT": "Ora di Singapore", "MST": "MST", "AKDT": "Ora legale dell’Alaska", "ACWDT": "Ora legale dell’Australia centroccidentale", "WITA": "Ora dell’Indonesia centrale", "HNPM": "Ora standard di Saint-Pierre e Miquelon", "AKST": "Ora standard dell’Alaska", "AST": "Ora standard dell’Atlantico", "HADT": "Ora legale delle Isole Hawaii-Aleutine", "ACWST": "Ora standard dell’Australia centroccidentale", "ADT": "Ora legale dell’Atlantico", "HNOG": "Ora standard della Groenlandia occidentale", "HKST": "Ora legale di Hong Kong", "LHDT": "Ora legale di Lord Howe", "TMT": "Ora standard del Turkmenistan", "GMT": "Ora del meridiano di Greenwich", "CST": "Ora standard centrale USA", "HNCU": "Ora standard di Cuba", "HECU": "Ora legale di Cuba", "UYT": "Ora standard dell’Uruguay", "AWDT": "Ora legale dell’Australia occidentale", "CLT": "Ora standard del Cile", "CLST": "Ora legale del Cile", "ChST": "Ora di Chamorro", "WARST": "Ora legale dell’Argentina occidentale", "ECT": "Ora dell’Ecuador", "WART": "Ora standard dell’Argentina occidentale", "HNT": "Ora standard di Terranova", "PST": "Ora standard del Pacifico USA", "LHST": "Ora standard di Lord Howe", "SAST": "Ora dell’Africa meridionale", "WESZ": "Ora legale dell’Europa occidentale", "EST": "Ora standard orientale USA", "UYST": "Ora legale dell’Uruguay", "CHAST": "Ora standard delle Chatham", "WAST": "Ora legale dell’Africa occidentale", "OEZ": "Ora standard dell’Europa orientale", "HNNOMX": "Ora standard del Messico nord-occidentale", "HNEG": "Ora standard della Groenlandia orientale", "MDT": "MDT", "GYT": "Ora della Guyana", "HAT": "Ora legale di Terranova", "NZDT": "Ora legale della Nuova Zelanda", "IST": "Ora standard dell’India", "JST": "Ora standard del Giappone", "BOT": "Ora della Bolivia", "HEPM": "Ora legale di Saint-Pierre e Miquelon", "CAT": "Ora dell’Africa centrale", "HENOMX": "Ora legale del Messico nord-occidentale", "MYT": "Ora della Malesia", "WIB": "Ora dell’Indonesia occidentale", "COST": "Ora legale della Colombia", "HEPMX": "Ora legale del Pacifico (Messico)", "HEOG": "Ora legale della Groenlandia occidentale", "AEST": "Ora standard dell’Australia orientale", "COT": "Ora standard della Colombia", "VET": "Ora del Venezuela", "WIT": "Ora dell’Indonesia orientale", "SRT": "Ora del Suriname", "MEZ": "Ora standard dell’Europa centrale", "HEEG": "Ora legale della Groenlandia orientale", "TMST": "Ora legale del Turkmenistan", "ACST": "Ora standard dell’Australia centrale", "WEZ": "Ora standard dell’Europa occidentale", "PDT": "Ora legale del Pacifico USA", "ART": "Ora standard dell’Argentina", "CHADT": "Ora legale delle Chatham", "MESZ": "Ora legale dell’Europa centrale", "OESZ": "Ora legale dell’Europa orientale", "BT": "Ora del Bhutan", "JDT": "Ora legale del Giappone", "WAT": "Ora standard dell’Africa occidentale", "HNPMX": "Ora standard del Pacifico (Messico)", "∅∅∅": "Ora legale dell’Amazzonia", "GFT": "Ora della Guiana francese", "CDT": "Ora legale centrale USA"}, -+ locale: "it_SM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "WART": "WART", "WARST": "WARST", "NZDT": "NZDT", "CST": "CST", "HEPM": "HEPM", "COST": "COST", "NZST": "NZST", "LHST": "LHST", "AKDT": "AKDT", "AEST": "AEST", "WAT": "WAT", "AKST": "AKST", "HEOG": "HEOG", "MYT": "MYT", "AWST": "AWST", "AWDT": "AWDT", "SGT": "SGT", "EDT": "EDT", "MDT": "MDT", "CHAST": "CHAST", "PST": "PST", "HKT": "HKT", "ART": "ART", "HNPM": "HNPM", "HEPMX": "HEPMX", "AEDT": "AEDT", "GFT": "GFT", "WIT": "WIT", "HKST": "HKST", "WITA": "WITA", "MEZ": "MEZ", "JST": "JST", "TMST": "TMST", "CDT": "CDT", "HNCU": "HNCU", "TMT": "TMT", "UYST": "UYST", "SAST": "SAST", "HADT": "HADT", "MESZ": "MESZ", "BT": "BT", "WEZ": "WEZ", "HAT": "HAT", "WIB": "WIB", "ADT": "ADT", "VET": "VET", "UYT": "UYT", "PDT": "PDT", "HECU": "HECU", "ECT": "ECT", "ARST": "ARST", "HNEG": "HNEG", "HNPMX": "HNPMX", "COT": "COT", "HNOG": "HNOG", "ChST": "ChST", "ACST": "ACST", "∅∅∅": "∅∅∅", "EST": "EST", "ACWST": "ACWST", "ACWDT": "ACWDT", "WAST": "WAST", "BOT": "BOT", "CHADT": "CHADT", "HNT": "HNT", "CAT": "CAT", "CLST": "CLST", "MST": "MST", "GMT": "GMT", "SRT": "SRT", "EAT": "EAT", "ACDT": "ACDT", "CLT": "CLT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "IST": "IST", "HENOMX": "HENOMX", "JDT": "JDT", "OEZ": "OEZ", "OESZ": "OESZ", "GYT": "GYT", "AST": "AST", "HAST": "HAST", "HEEG": "HEEG"}, - } - } -  -@@ -143,7 +120,7 @@ func (it *it_SM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (it *it_SM) MonthsAbbreviated() []string { -- return it.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +130,7 @@ func (it *it_SM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (it *it_SM) MonthsNarrow() []string { -- return it.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +140,7 @@ func (it *it_SM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (it *it_SM) MonthsWide() []string { -- return it.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,73 +186,13 @@ func (it *it_SM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'it_SM' and handles both Whole and Real numbers based on 'v' - func (it *it_SM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'it_SM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (it *it_SM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, it.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'it_SM' -@@ -283,56 +200,7 @@ func (it *it_SM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := it.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, it.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, it.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, it.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'it_SM' -@@ -341,63 +209,7 @@ func (it *it_SM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := it.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, it.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, it.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, it.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, it.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, it.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, it.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'it_SM' -@@ -405,27 +217,6 @@ func (it *it_SM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -434,21 +225,6 @@ func (it *it_SM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,17 +233,6 @@ func (it *it_SM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -476,19 +241,6 @@ func (it *it_SM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, it.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, it.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -497,19 +249,6 @@ func (it *it_SM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -518,26 +257,6 @@ func (it *it_SM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -546,30 +265,6 @@ func (it *it_SM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -578,34 +273,5 @@ func (it *it_SM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, it.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := it.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ja/ja.go b/ja/ja.go -index 70dcdc0..24dd576 100644 ---- a/ja/ja.go -+++ b/ja/ja.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"紀元前", "西暦"}, - erasNarrow: []string{"BC", "AD"}, - erasWide: []string{"紀元前", "西暦"}, -- timezones: map[string]string{"CLT": "チリ標準時", "HAT": "ニューファンドランド夏時間", "AWST": "オーストラリア西部標準時", "WITA": "インドネシア中部時間", "GYT": "ガイアナ時間", "UYST": "ウルグアイ夏時間", "CDT": "アメリカ中部夏時間", "ADT": "大西洋夏時間", "HNNOMX": "メキシコ北西部標準時", "SGT": "シンガポール標準時", "MST": "マカオ標準時", "WART": "西部アルゼンチン標準時", "AKST": "アラスカ標準時", "AEST": "オーストラリア東部標準時", "AEDT": "オーストラリア東部夏時間", "IST": "インド標準時", "SRT": "スリナム時間", "BOT": "ボリビア時間", "HNEG": "グリーンランド東部標準時", "CLST": "チリ夏時間", "GFT": "仏領ギアナ時間", "AKDT": "アラスカ夏時間", "AST": "大西洋標準時", "HNT": "ニューファンドランド標準時", "NZST": "ニュージーランド標準時", "CHAST": "チャタム標準時", "EST": "アメリカ東部標準時", "UYT": "ウルグアイ標準時", "HKST": "香港夏時間", "WAST": "西アフリカ夏時間", "HNCU": "キューバ標準時", "GMT": "グリニッジ標準時", "EDT": "アメリカ東部夏時間", "MYT": "マレーシア時間", "MEZ": "中央ヨーロッパ標準時", "JDT": "日本夏時間", "WARST": "西部アルゼンチン夏時間", "WAT": "西アフリカ標準時", "∅∅∅": "アマゾン夏時間", "TMT": "トルクメニスタン標準時", "TMST": "トルクメニスタン夏時間", "MESZ": "中央ヨーロッパ夏時間", "NZDT": "ニュージーランド夏時間", "CHADT": "チャタム夏時間", "ACST": "オーストラリア中部標準時", "CAT": "中央アフリカ時間", "WIT": "インドネシア東部時間", "BT": "ブータン時間", "HNOG": "グリーンランド西部標準時", "EAT": "東アフリカ時間", "COT": "コロンビア標準時", "HENOMX": "メキシコ北西部夏時間", "MDT": "マカオ夏時間", "HNPMX": "メキシコ太平洋標準時", "PDT": "アメリカ太平洋夏時間", "WEZ": "西ヨーロッパ標準時", "OESZ": "東ヨーロッパ夏時間", "HKT": "香港標準時", "COST": "コロンビア夏時間", "ACWST": "オーストラリア中西部標準時", "AWDT": "オーストラリア西部夏時間", "HEPMX": "メキシコ太平洋夏時間", "CST": "アメリカ中部標準時", "HAST": "ハワイ・アリューシャン標準時", "ACWDT": "オーストラリア中西部夏時間", "OEZ": "東ヨーロッパ標準時", "PST": "アメリカ太平洋標準時", "JST": "日本標準時", "ChST": "チャモロ時間", "LHST": "ロードハウ標準時", "SAST": "南アフリカ標準時", "ACDT": "オーストラリア中部夏時間", "HECU": "キューバ夏時間", "WIB": "インドネシア西部時間", "VET": "ベネズエラ時間", "WESZ": "西ヨーロッパ夏時間", "HNPM": "サンピエール・ミクロン標準時", "ARST": "アルゼンチン夏時間", "HEPM": "サンピエール・ミクロン夏時間", "LHDT": "ロードハウ夏時間", "HEEG": "グリーンランド東部夏時間", "ECT": "エクアドル時間", "HADT": "ハワイ・アリューシャン夏時間", "HEOG": "グリーンランド西部夏時間", "ART": "アルゼンチン標準時"}, -+ timezones: map[string]string{"LHST": "ロードハウ標準時", "WEZ": "西ヨーロッパ標準時", "WESZ": "西ヨーロッパ夏時間", "COT": "コロンビア標準時", "HEOG": "グリーンランド西部夏時間", "CLST": "チリ夏時間", "NZST": "ニュージーランド標準時", "ECT": "エクアドル時間", "CHAST": "チャタム標準時", "HECU": "キューバ夏時間", "OESZ": "東ヨーロッパ夏時間", "HNT": "ニューファンドランド標準時", "ART": "アルゼンチン標準時", "HENOMX": "メキシコ北西部夏時間", "OEZ": "東ヨーロッパ標準時", "HKST": "香港夏時間", "CST": "アメリカ中部標準時", "HNNOMX": "メキシコ北西部標準時", "JST": "日本標準時", "AWST": "オーストラリア西部標準時", "COST": "コロンビア夏時間", "TMT": "トルクメニスタン標準時", "WIB": "インドネシア西部時間", "MEZ": "中央ヨーロッパ標準時", "ACST": "オーストラリア中部標準時", "WIT": "インドネシア東部時間", "CLT": "チリ標準時", "ADT": "大西洋夏時間", "BOT": "ボリビア時間", "SRT": "スリナム時間", "AWDT": "オーストラリア西部夏時間", "UYST": "ウルグアイ夏時間", "SGT": "シンガポール標準時", "HNOG": "グリーンランド西部標準時", "HAST": "ハワイ・アリューシャン標準時", "MESZ": "中央ヨーロッパ夏時間", "HNEG": "グリーンランド東部標準時", "HEEG": "グリーンランド東部夏時間", "AEDT": "オーストラリア東部夏時間", "PST": "アメリカ太平洋標準時", "WAT": "西アフリカ標準時", "WITA": "インドネシア中部時間", "AST": "大西洋標準時", "UYT": "ウルグアイ標準時", "TMST": "トルクメニスタン夏時間", "VET": "ベネズエラ時間", "WAST": "西アフリカ夏時間", "AKDT": "アラスカ夏時間", "SAST": "南アフリカ標準時", "CAT": "中央アフリカ時間", "ACDT": "オーストラリア中部夏時間", "JDT": "日本夏時間", "IST": "インド標準時", "EDT": "アメリカ東部夏時間", "EAT": "東アフリカ時間", "HEPM": "サンピエール・ミクロン夏時間", "PDT": "アメリカ太平洋夏時間", "BT": "ブータン時間", "HKT": "香港標準時", "GMT": "グリニッジ標準時", "ChST": "チャモロ時間", "HADT": "ハワイ・アリューシャン夏時間", "HNPM": "サンピエール・ミクロン標準時", "NZDT": "ニュージーランド夏時間", "AEST": "オーストラリア東部標準時", "MYT": "マレーシア時間", "ACWST": "オーストラリア中西部標準時", "ARST": "アルゼンチン夏時間", "CHADT": "チャタム夏時間", "HEPMX": "メキシコ太平洋夏時間", "HNCU": "キューバ標準時", "HAT": "ニューファンドランド夏時間", "WARST": "西部アルゼンチン夏時間", "GYT": "ガイアナ時間", "AKST": "アラスカ標準時", "CDT": "アメリカ中部夏時間", "MST": "マカオ標準時", "MDT": "マカオ夏時間", "LHDT": "ロードハウ夏時間", "∅∅∅": "アクレ夏時間", "ACWDT": "オーストラリア中西部夏時間", "HNPMX": "メキシコ太平洋標準時", "GFT": "仏領ギアナ時間", "WART": "西部アルゼンチン標準時", "EST": "アメリカ東部標準時"}, - } - } -  -diff --git a/ja_JP/ja_JP.go b/ja_JP/ja_JP.go -index b0bdd07..886c96e 100644 ---- a/ja_JP/ja_JP.go -+++ b/ja_JP/ja_JP.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ja_JP struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ja_JP' locale - func New() locales.Translator { - return &ja_JP{ -- locale: "ja_JP", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- daysAbbreviated: []string{"日", "月", "火", "水", "木", "金", "土"}, -- daysNarrow: []string{"日", "月", "火", "水", "木", "金", "土"}, -- daysShort: []string{"日", "月", "火", "水", "木", "金", "土"}, -- daysWide: []string{"日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"}, -- periodsAbbreviated: []string{"午前", "午後"}, -- periodsNarrow: []string{"午前", "午後"}, -- periodsWide: []string{"午前", "午後"}, -- erasAbbreviated: []string{"紀元前", "西暦"}, -- erasNarrow: []string{"BC", "AD"}, -- erasWide: []string{"紀元前", "西暦"}, -- timezones: map[string]string{"HEOG": "グリーンランド西部夏時間", "LHST": "ロードハウ標準時", "WART": "西部アルゼンチン標準時", "MYT": "マレーシア時間", "AWST": "オーストラリア西部標準時", "HNPM": "サンピエール・ミクロン標準時", "HEEG": "グリーンランド東部夏時間", "CST": "アメリカ中部標準時", "VET": "ベネズエラ時間", "OESZ": "東ヨーロッパ夏時間", "HADT": "ハワイ・アリューシャン夏時間", "ACDT": "オーストラリア中部夏時間", "OEZ": "東ヨーロッパ標準時", "COST": "コロンビア夏時間", "HEPMX": "メキシコ太平洋夏時間", "CHADT": "チャタム夏時間", "JST": "日本標準時", "GFT": "仏領ギアナ時間", "GMT": "グリニッジ標準時", "MDT": "マカオ夏時間", "WIT": "インドネシア東部時間", "HKT": "香港標準時", "CLST": "チリ夏時間", "∅∅∅": "アマゾン夏時間", "UYST": "ウルグアイ夏時間", "HENOMX": "メキシコ北西部夏時間", "AKST": "アラスカ標準時", "PST": "アメリカ太平洋標準時", "IST": "インド標準時", "JDT": "日本夏時間", "ChST": "チャモロ時間", "CAT": "中央アフリカ時間", "ECT": "エクアドル時間", "EDT": "アメリカ東部夏時間", "AEST": "オーストラリア東部標準時", "HKST": "香港夏時間", "MESZ": "中央ヨーロッパ夏時間", "CLT": "チリ標準時", "WAT": "西アフリカ標準時", "ACST": "オーストラリア中部標準時", "WARST": "西部アルゼンチン夏時間", "HNNOMX": "メキシコ北西部標準時", "HAST": "ハワイ・アリューシャン標準時", "SRT": "スリナム時間", "HNOG": "グリーンランド西部標準時", "ACWDT": "オーストラリア中西部夏時間", "ARST": "アルゼンチン夏時間", "CDT": "アメリカ中部夏時間", "ADT": "大西洋夏時間", "GYT": "ガイアナ時間", "BT": "ブータン時間", "WESZ": "西ヨーロッパ夏時間", "HAT": "ニューファンドランド夏時間", "ART": "アルゼンチン標準時", "MST": "マカオ標準時", "AKDT": "アラスカ夏時間", "AST": "大西洋標準時", "WEZ": "西ヨーロッパ標準時", "WITA": "インドネシア中部時間", "HNEG": "グリーンランド東部標準時", "TMT": "トルクメニスタン標準時", "WAST": "西アフリカ夏時間", "PDT": "アメリカ太平洋夏時間", "ACWST": "オーストラリア中西部標準時", "HNCU": "キューバ標準時", "HEPM": "サンピエール・ミクロン夏時間", "LHDT": "ロードハウ夏時間", "CHAST": "チャタム標準時", "EAT": "東アフリカ時間", "SGT": "シンガポール標準時", "NZDT": "ニュージーランド夏時間", "BOT": "ボリビア時間", "TMST": "トルクメニスタン夏時間", "HECU": "キューバ夏時間", "HNPMX": "メキシコ太平洋標準時", "MEZ": "中央ヨーロッパ標準時", "COT": "コロンビア標準時", "EST": "アメリカ東部標準時", "WIB": "インドネシア西部時間", "UYT": "ウルグアイ標準時", "HNT": "ニューファンドランド標準時", "AEDT": "オーストラリア東部夏時間", "AWDT": "オーストラリア西部夏時間", "NZST": "ニュージーランド標準時", "SAST": "南アフリカ標準時"}, -+ locale: "ja_JP", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "BT": "BT", "HNCU": "HNCU", "WEZ": "WEZ", "COST": "COST", "SAST": "SAST", "AKDT": "AKDT", "HKST": "HKST", "ART": "ART", "EDT": "EDT", "HEPM": "HEPM", "LHST": "LHST", "AKST": "AKST", "HNT": "HNT", "TMT": "TMT", "AEDT": "AEDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "NZDT": "NZDT", "MST": "MST", "JST": "JST", "HEOG": "HEOG", "ADT": "ADT", "EST": "EST", "CST": "CST", "ACDT": "ACDT", "UYST": "UYST", "IST": "IST", "HNPMX": "HNPMX", "GFT": "GFT", "SRT": "SRT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "PDT": "PDT", "OESZ": "OESZ", "HKT": "HKT", "MYT": "MYT", "ACWST": "ACWST", "TMST": "TMST", "ARST": "ARST", "EAT": "EAT", "BOT": "BOT", "AWDT": "AWDT", "HECU": "HECU", "HEPMX": "HEPMX", "SGT": "SGT", "CAT": "CAT", "WAST": "WAST", "WIT": "WIT", "CLT": "CLT", "HENOMX": "HENOMX", "MESZ": "MESZ", "HNPM": "HNPM", "PST": "PST", "VET": "VET", "WIB": "WIB", "AST": "AST", "AEST": "AEST", "UYT": "UYT", "WAT": "WAT", "NZST": "NZST", "CDT": "CDT", "WART": "WART", "COT": "COT", "WITA": "WITA", "HNEG": "HNEG", "JDT": "JDT", "AWST": "AWST", "WESZ": "WESZ", "GYT": "GYT", "ACWDT": "ACWDT", "CHADT": "CHADT", "WARST": "WARST", "ECT": "ECT", "HADT": "HADT", "HEEG": "HEEG", "MEZ": "MEZ", "MDT": "MDT", "ChST": "ChST", "GMT": "GMT", "ACST": "ACST", "OEZ": "OEZ", "HAT": "HAT", "HNOG": "HNOG", "HAST": "HAST"}, - } - } -  -@@ -117,7 +94,7 @@ func (ja *ja_JP) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ja *ja_JP) MonthsAbbreviated() []string { -- return ja.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (ja *ja_JP) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ja *ja_JP) MonthsNarrow() []string { -- return ja.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (ja *ja_JP) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ja *ja_JP) MonthsWide() []string { -- return ja.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (ja *ja_JP) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ja_JP' and handles both Whole and Real numbers based on 'v' - func (ja *ja_JP) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ja.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ja.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ja.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ja_JP' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ja *ja_JP) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ja.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ja.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ja.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ja_JP' -@@ -257,56 +174,7 @@ func (ja *ja_JP) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ja.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ja.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ja.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ja.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ja.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ja_JP' -@@ -315,68 +183,7 @@ func (ja *ja_JP) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ja.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ja.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ja.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ja.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ja.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ja.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ja_JP' -@@ -384,28 +191,6 @@ func (ja *ja_JP) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -414,28 +199,6 @@ func (ja *ja_JP) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -444,18 +207,6 @@ func (ja *ja_JP) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -464,19 +215,6 @@ func (ja *ja_JP) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, ja.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -485,15 +223,6 @@ func (ja *ja_JP) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ja.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -502,22 +231,6 @@ func (ja *ja_JP) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ja.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ja.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -526,26 +239,6 @@ func (ja *ja_JP) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ja.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ja.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -554,30 +247,5 @@ func (ja *ja_JP) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0xe6, 0x99, 0x82}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0xe5, 0x88, 0x86}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0xe7, 0xa7, 0x92, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ja.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/jgo/jgo.go b/jgo/jgo.go -index b4d5475..5af327e 100644 ---- a/jgo/jgo.go -+++ b/jgo/jgo.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"tsɛttsɛt mɛŋguꞌ mi ɛ́ lɛɛnɛ Kɛlísɛtɔ gɔ ńɔ́", "tsɛttsɛt mɛŋguꞌ mi ɛ́ fúnɛ Kɛlísɛtɔ tɔ́ mɔ́"}, -- timezones: map[string]string{"AEDT": "AEDT", "CHADT": "CHADT", "ACST": "ACST", "HENOMX": "HENOMX", "ChST": "ChST", "MYT": "MYT", "UYT": "UYT", "PDT": "PDT", "CHAST": "CHAST", "MESZ": "MESZ", "CLST": "CLST", "HNEG": "HNEG", "UYST": "UYST", "BOT": "BOT", "ECT": "ECT", "EAT": "EAT", "BT": "BT", "HKT": "HKT", "NZST": "NZST", "∅∅∅": "∅∅∅", "TMT": "TMT", "AKDT": "AKDT", "ACDT": "ACDT", "OESZ": "OESZ", "WARST": "WARST", "HNT": "HNT", "HEOG": "HEOG", "WEZ": "WEZ", "AWST": "AWST", "HNPM": "HNPM", "HNPMX": "HNPMX", "EDT": "EDT", "GYT": "GYT", "HADT": "HADT", "HKST": "HKST", "SAST": "SAST", "HEEG": "HEEG", "SRT": "SRT", "JDT": "JDT", "IST": "IST", "GFT": "GFT", "GMT": "GMT", "ADT": "ADT", "WIB": "WIB", "AWDT": "AWDT", "AST": "AST", "WIT": "WIT", "WITA": "WITA", "OEZ": "OEZ", "CAT": "CAT", "EST": "EST", "HAT": "HAT", "ART": "ART", "COT": "COT", "HECU": "HECU", "CDT": "CDT", "ACWST": "ACWST", "WESZ": "WESZ", "HEPM": "HEPM", "WAT": "WAT", "HNCU": "HNCU", "HEPMX": "HEPMX", "VET": "VET", "ACWDT": "ACWDT", "NZDT": "NZDT", "LHDT": "LHDT", "WAST": "WAST", "MDT": "MDT", "PST": "PST", "AEST": "AEST", "WART": "WART", "MEZ": "MEZ", "COST": "COST", "AKST": "AKST", "MST": "MST", "HAST": "HAST", "HNOG": "HNOG", "JST": "JST", "CLT": "CLT", "CST": "CST", "ARST": "ARST", "LHST": "LHST", "TMST": "TMST", "HNNOMX": "HNNOMX", "SGT": "SGT"}, -+ timezones: map[string]string{"AWDT": "AWDT", "UYST": "UYST", "AKDT": "AKDT", "GFT": "GFT", "ECT": "ECT", "ART": "ART", "HNNOMX": "HNNOMX", "PST": "PST", "ACWST": "ACWST", "WAST": "WAST", "OESZ": "OESZ", "GYT": "GYT", "MDT": "MDT", "HEEG": "HEEG", "LHST": "LHST", "∅∅∅": "∅∅∅", "AEST": "AEST", "WARST": "WARST", "HNEG": "HNEG", "CHADT": "CHADT", "CLST": "CLST", "ARST": "ARST", "HECU": "HECU", "WAT": "WAT", "HNT": "HNT", "CDT": "CDT", "HADT": "HADT", "WART": "WART", "EST": "EST", "NZDT": "NZDT", "WIB": "WIB", "EAT": "EAT", "MST": "MST", "LHDT": "LHDT", "BT": "BT", "HAT": "HAT", "HNOG": "HNOG", "HKT": "HKT", "TMT": "TMT", "TMST": "TMST", "ACWDT": "ACWDT", "VET": "VET", "HEPMX": "HEPMX", "ACDT": "ACDT", "OEZ": "OEZ", "WIT": "WIT", "CST": "CST", "AST": "AST", "JDT": "JDT", "PDT": "PDT", "WEZ": "WEZ", "COT": "COT", "CAT": "CAT", "MYT": "MYT", "AKST": "AKST", "HEOG": "HEOG", "HENOMX": "HENOMX", "JST": "JST", "SGT": "SGT", "SAST": "SAST", "CLT": "CLT", "WITA": "WITA", "BOT": "BOT", "HAST": "HAST", "AEDT": "AEDT", "COST": "COST", "NZST": "NZST", "GMT": "GMT", "ChST": "ChST", "ACST": "ACST", "HNCU": "HNCU", "IST": "IST", "HNPMX": "HNPMX", "SRT": "SRT", "MESZ": "MESZ", "HKST": "HKST", "AWST": "AWST", "HNPM": "HNPM", "HEPM": "HEPM", "CHAST": "CHAST", "UYT": "UYT", "WESZ": "WESZ", "EDT": "EDT", "ADT": "ADT", "MEZ": "MEZ"}, - } - } -  -diff --git a/jgo_CM/jgo_CM.go b/jgo_CM/jgo_CM.go -index ab9ff98..003b671 100644 ---- a/jgo_CM/jgo_CM.go -+++ b/jgo_CM/jgo_CM.go -@@ -10,66 +10,45 @@ import ( - ) -  - type jgo_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'jgo_CM' locale - func New() locales.Translator { - return &jgo_CM{ -- locale: "jgo_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Nduŋmbi Saŋ", "Pɛsaŋ Pɛ́pá", "Pɛsaŋ Pɛ́tát", "Pɛsaŋ Pɛ́nɛ́kwa", "Pɛsaŋ Pataa", "Pɛsaŋ Pɛ́nɛ́ntúkú", "Pɛsaŋ Saambá", "Pɛsaŋ Pɛ́nɛ́fɔm", "Pɛsaŋ Pɛ́nɛ́pfúꞋú", "Pɛsaŋ Nɛgɛ́m", "Pɛsaŋ Ntsɔ̌pmɔ́", "Pɛsaŋ Ntsɔ̌ppá"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Nduŋmbi Saŋ", "Pɛsaŋ Pɛ́pá", "Pɛsaŋ Pɛ́tát", "Pɛsaŋ Pɛ́nɛ́kwa", "Pɛsaŋ Pataa", "Pɛsaŋ Pɛ́nɛ́ntúkú", "Pɛsaŋ Saambá", "Pɛsaŋ Pɛ́nɛ́fɔm", "Pɛsaŋ Pɛ́nɛ́pfúꞋú", "Pɛsaŋ Nɛgɛ́m", "Pɛsaŋ Ntsɔ̌pmɔ́", "Pɛsaŋ Ntsɔ̌ppá"}, -- daysAbbreviated: []string{"Sɔ́ndi", "Mɔ́ndi", "Ápta Mɔ́ndi", "Wɛ́nɛsɛdɛ", "Tɔ́sɛdɛ", "Fɛlâyɛdɛ", "Sásidɛ"}, -- daysNarrow: []string{"Sɔ́", "Mɔ́", "ÁM", "Wɛ́", "Tɔ́", "Fɛ", "Sá"}, -- daysWide: []string{"Sɔ́ndi", "Mɔ́ndi", "Ápta Mɔ́ndi", "Wɛ́nɛsɛdɛ", "Tɔ́sɛdɛ", "Fɛlâyɛdɛ", "Sásidɛ"}, -- periodsAbbreviated: []string{"mbaꞌmbaꞌ", "ŋka mbɔ́t nji"}, -- periodsWide: []string{"mbaꞌmbaꞌ", "ŋka mbɔ́t nji"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"tsɛttsɛt mɛŋguꞌ mi ɛ́ lɛɛnɛ Kɛlísɛtɔ gɔ ńɔ́", "tsɛttsɛt mɛŋguꞌ mi ɛ́ fúnɛ Kɛlísɛtɔ tɔ́ mɔ́"}, -- timezones: map[string]string{"JST": "JST", "ACST": "ACST", "HNCU": "HNCU", "PDT": "PDT", "HEPM": "HEPM", "NZDT": "NZDT", "HAT": "HAT", "HKT": "HKT", "OESZ": "OESZ", "AKDT": "AKDT", "MYT": "MYT", "BT": "BT", "GFT": "GFT", "UYST": "UYST", "HNOG": "HNOG", "CLST": "CLST", "WAST": "WAST", "SRT": "SRT", "ACWST": "ACWST", "TMT": "TMT", "BOT": "BOT", "CAT": "CAT", "WITA": "WITA", "AWDT": "AWDT", "SAST": "SAST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "EDT": "EDT", "GYT": "GYT", "WIT": "WIT", "HENOMX": "HENOMX", "SGT": "SGT", "PST": "PST", "HKST": "HKST", "HNPM": "HNPM", "CHAST": "CHAST", "CHADT": "CHADT", "HNPMX": "HNPMX", "EST": "EST", "HADT": "HADT", "MEZ": "MEZ", "ChST": "ChST", "ECT": "ECT", "CST": "CST", "ADT": "ADT", "WAT": "WAT", "MESZ": "MESZ", "WARST": "WARST", "AST": "AST", "ART": "ART", "HEOG": "HEOG", "EAT": "EAT", "MST": "MST", "TMST": "TMST", "ACDT": "ACDT", "HAST": "HAST", "AEST": "AEST", "LHST": "LHST", "IST": "IST", "CLT": "CLT", "HEPMX": "HEPMX", "AKST": "AKST", "CDT": "CDT", "OEZ": "OEZ", "WART": "WART", "HNT": "HNT", "AWST": "AWST", "HECU": "HECU", "COST": "COST", "GMT": "GMT", "ARST": "ARST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "WEZ": "WEZ", "COT": "COT", "MDT": "MDT", "UYT": "UYT", "WIB": "WIB", "AEDT": "AEDT", "NZST": "NZST", "LHDT": "LHDT", "JDT": "JDT", "VET": "VET", "ACWDT": "ACWDT", "WESZ": "WESZ"}, -+ locale: "jgo_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "ACWDT": "ACWDT", "VET": "VET", "WART": "WART", "CAT": "CAT", "NZST": "NZST", "HEEG": "HEEG", "IST": "IST", "GYT": "GYT", "WITA": "WITA", "ChST": "ChST", "AEDT": "AEDT", "AEST": "AEST", "HECU": "HECU", "AKST": "AKST", "SAST": "SAST", "NZDT": "NZDT", "SRT": "SRT", "ACDT": "ACDT", "SGT": "SGT", "WAST": "WAST", "EDT": "EDT", "ART": "ART", "GMT": "GMT", "UYST": "UYST", "HNEG": "HNEG", "LHDT": "LHDT", "CHADT": "CHADT", "PDT": "PDT", "HAT": "HAT", "∅∅∅": "∅∅∅", "TMT": "TMT", "HAST": "HAST", "MESZ": "MESZ", "JST": "JST", "COT": "COT", "CLT": "CLT", "ECT": "ECT", "HADT": "HADT", "UYT": "UYT", "WEZ": "WEZ", "OEZ": "OEZ", "HKT": "HKT", "MYT": "MYT", "AWST": "AWST", "MEZ": "MEZ", "HNPM": "HNPM", "HEPM": "HEPM", "WIT": "WIT", "WIB": "WIB", "CDT": "CDT", "AST": "AST", "CST": "CST", "EAT": "EAT", "HEPMX": "HEPMX", "WESZ": "WESZ", "OESZ": "OESZ", "HNT": "HNT", "WARST": "WARST", "TMST": "TMST", "HENOMX": "HENOMX", "AWDT": "AWDT", "GFT": "GFT", "HEOG": "HEOG", "HKST": "HKST", "BOT": "BOT", "EST": "EST", "MST": "MST", "BT": "BT", "HNPMX": "HNPMX", "PST": "PST", "HNCU": "HNCU", "WAT": "WAT", "CLST": "CLST", "ADT": "ADT", "JDT": "JDT", "CHAST": "CHAST", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "COST": "COST", "MDT": "MDT", "ARST": "ARST", "LHST": "LHST", "ACST": "ACST", "AKDT": "AKDT"}, - } - } -  -@@ -122,7 +101,7 @@ func (jgo *jgo_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (jgo *jgo_CM) MonthsAbbreviated() []string { -- return jgo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (jgo *jgo_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (jgo *jgo_CM) MonthsNarrow() []string { -- return jgo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (jgo *jgo_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (jgo *jgo_CM) MonthsWide() []string { -- return jgo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,73 +167,13 @@ func (jgo *jgo_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'jgo_CM' and handles both Whole and Real numbers based on 'v' - func (jgo *jgo_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, jgo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, jgo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, jgo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'jgo_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (jgo *jgo_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, jgo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, jgo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, jgo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'jgo_CM' -@@ -262,60 +181,7 @@ func (jgo *jgo_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := jgo.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, jgo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, jgo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(jgo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, jgo.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, jgo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, jgo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'jgo_CM' -@@ -324,72 +190,7 @@ func (jgo *jgo_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := jgo.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, jgo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, jgo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(jgo.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, jgo.currencyNegativePrefix[j]) -- } -- -- b = append(b, jgo.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(jgo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, jgo.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, jgo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'jgo_CM' -@@ -397,28 +198,6 @@ func (jgo *jgo_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -427,17 +206,6 @@ func (jgo *jgo_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, jgo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -446,17 +214,6 @@ func (jgo *jgo_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, jgo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -465,25 +222,6 @@ func (jgo *jgo_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, jgo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, jgo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -492,19 +230,6 @@ func (jgo *jgo_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -513,26 +238,6 @@ func (jgo *jgo_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -541,30 +246,6 @@ func (jgo *jgo_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -573,34 +254,5 @@ func (jgo *jgo_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, jgo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := jgo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/jmc/jmc.go b/jmc/jmc.go -index bcb3eb4..e09c2a3 100644 ---- a/jmc/jmc.go -+++ b/jmc/jmc.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Kristu", "Baada ya Kristu"}, -- timezones: map[string]string{"AKDT": "AKDT", "HAT": "HAT", "ART": "ART", "MESZ": "MESZ", "TMST": "TMST", "WARST": "WARST", "HECU": "HECU", "UYT": "UYT", "LHST": "LHST", "ACST": "ACST", "ACDT": "ACDT", "WIB": "WIB", "ARST": "ARST", "BT": "BT", "WEZ": "WEZ", "GFT": "GFT", "EAT": "EAT", "HNCU": "HNCU", "MYT": "MYT", "NZST": "NZST", "CAT": "CAT", "GMT": "GMT", "HAST": "HAST", "WIT": "WIT", "AEST": "AEST", "AEDT": "AEDT", "WAT": "WAT", "SGT": "SGT", "HEPMX": "HEPMX", "ACWDT": "ACWDT", "AWDT": "AWDT", "NZDT": "NZDT", "SAST": "SAST", "HNEG": "HNEG", "HEEG": "HEEG", "HNPMX": "HNPMX", "PST": "PST", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "GYT": "GYT", "CLST": "CLST", "CDT": "CDT", "ADT": "ADT", "VET": "VET", "CHAST": "CHAST", "BOT": "BOT", "WAST": "WAST", "EST": "EST", "MDT": "MDT", "AKST": "AKST", "IST": "IST", "HADT": "HADT", "HNOG": "HNOG", "WESZ": "WESZ", "AWST": "AWST", "∅∅∅": "∅∅∅", "HEOG": "HEOG", "HKT": "HKT", "ChST": "ChST", "HNT": "HNT", "WITA": "WITA", "MEZ": "MEZ", "AST": "AST", "SRT": "SRT", "ACWST": "ACWST", "HKST": "HKST", "WART": "WART", "COT": "COT", "COST": "COST", "UYST": "UYST", "HNPM": "HNPM", "CHADT": "CHADT", "HEPM": "HEPM", "LHDT": "LHDT", "JST": "JST", "JDT": "JDT", "TMT": "TMT", "ECT": "ECT", "EDT": "EDT", "CST": "CST", "HENOMX": "HENOMX", "MST": "MST", "OESZ": "OESZ", "PDT": "PDT", "CLT": "CLT"}, -+ timezones: map[string]string{"CLT": "CLT", "NZDT": "NZDT", "ACDT": "ACDT", "MYT": "MYT", "AKDT": "AKDT", "COST": "COST", "SAST": "SAST", "COT": "COT", "CLST": "CLST", "GMT": "GMT", "MEZ": "MEZ", "IST": "IST", "HECU": "HECU", "WIT": "WIT", "GFT": "GFT", "WITA": "WITA", "MST": "MST", "WIB": "WIB", "UYT": "UYT", "UYST": "UYST", "PDT": "PDT", "ART": "ART", "AWDT": "AWDT", "LHDT": "LHDT", "CAT": "CAT", "GYT": "GYT", "SRT": "SRT", "MESZ": "MESZ", "JST": "JST", "BT": "BT", "OESZ": "OESZ", "WARST": "WARST", "HKT": "HKT", "ChST": "ChST", "CHAST": "CHAST", "PST": "PST", "ACWDT": "ACWDT", "AEST": "AEST", "HNOG": "HNOG", "TMT": "TMT", "CST": "CST", "ARST": "ARST", "HEPM": "HEPM", "WAST": "WAST", "HAT": "HAT", "CHADT": "CHADT", "WAT": "WAT", "HEOG": "HEOG", "MDT": "MDT", "ECT": "ECT", "BOT": "BOT", "EAT": "EAT", "HAST": "HAST", "HEEG": "HEEG", "LHST": "LHST", "JDT": "JDT", "EDT": "EDT", "HADT": "HADT", "HNPM": "HNPM", "WESZ": "WESZ", "AKST": "AKST", "CDT": "CDT", "HNT": "HNT", "AST": "AST", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "EST": "EST", "TMST": "TMST", "HNEG": "HNEG", "AWST": "AWST", "WEZ": "WEZ", "SGT": "SGT", "HNCU": "HNCU", "ADT": "ADT", "ACST": "ACST", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "WART": "WART", "HKST": "HKST", "NZST": "NZST", "ACWST": "ACWST", "VET": "VET", "HNPMX": "HNPMX", "HEPMX": "HEPMX"}, - } - } -  -diff --git a/jmc_TZ/jmc_TZ.go b/jmc_TZ/jmc_TZ.go -index 2630ba6..57c4893 100644 ---- a/jmc_TZ/jmc_TZ.go -+++ b/jmc_TZ/jmc_TZ.go -@@ -42,24 +42,13 @@ type jmc_TZ struct { - // New returns a new instance of translator for the 'jmc_TZ' locale - func New() locales.Translator { - return &jmc_TZ{ -- locale: "jmc_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprilyi", "Mei", "Junyi", "Julyai", "Agusti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"J", "J", "J", "J", "A", "I", "J"}, -- daysWide: []string{"Jumapilyi", "Jumatatuu", "Jumanne", "Jumatanu", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"utuko", "kyiukonyi"}, -- periodsWide: []string{"utuko", "kyiukonyi"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristu", "Baada ya Kristu"}, -- timezones: map[string]string{"OEZ": "OEZ", "LHDT": "LHDT", "MEZ": "MEZ", "TMT": "TMT", "AWST": "AWST", "HEPM": "HEPM", "CHAST": "CHAST", "WAT": "WAT", "HENOMX": "HENOMX", "MST": "MST", "HAST": "HAST", "WEZ": "WEZ", "COST": "COST", "SGT": "SGT", "HEPMX": "HEPMX", "TMST": "TMST", "ACST": "ACST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "AST": "AST", "ARST": "ARST", "HKST": "HKST", "EDT": "EDT", "UYST": "UYST", "HAT": "HAT", "JST": "JST", "WAST": "WAST", "ECT": "ECT", "SAST": "SAST", "GFT": "GFT", "WIB": "WIB", "HADT": "HADT", "CLT": "CLT", "PDT": "PDT", "CLST": "CLST", "JDT": "JDT", "MDT": "MDT", "AKST": "AKST", "ADT": "ADT", "GYT": "GYT", "ACWST": "ACWST", "HEEG": "HEEG", "WART": "WART", "VET": "VET", "CHADT": "CHADT", "BOT": "BOT", "HNT": "HNT", "HNOG": "HNOG", "PST": "PST", "EAT": "EAT", "HNPMX": "HNPMX", "EST": "EST", "CST": "CST", "WESZ": "WESZ", "WITA": "WITA", "AEST": "AEST", "AKDT": "AKDT", "SRT": "SRT", "ACWDT": "ACWDT", "ART": "ART", "AWDT": "AWDT", "NZDT": "NZDT", "HECU": "HECU", "BT": "BT", "HKT": "HKT", "LHST": "LHST", "NZST": "NZST", "∅∅∅": "∅∅∅", "GMT": "GMT", "WIT": "WIT", "OESZ": "OESZ", "MYT": "MYT", "AEDT": "AEDT", "HNPM": "HNPM", "CAT": "CAT", "CDT": "CDT", "ChST": "ChST", "ACDT": "ACDT", "IST": "IST", "COT": "COT", "WARST": "WARST", "UYT": "UYT", "HEOG": "HEOG", "MESZ": "MESZ"}, -+ locale: "jmc_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNCU": "HNCU", "OESZ": "OESZ", "NZDT": "NZDT", "HNEG": "HNEG", "HENOMX": "HENOMX", "MYT": "MYT", "LHDT": "LHDT", "HEPMX": "HEPMX", "CLST": "CLST", "WIB": "WIB", "ACST": "ACST", "HEPM": "HEPM", "AEST": "AEST", "IST": "IST", "HNPMX": "HNPMX", "WAST": "WAST", "OEZ": "OEZ", "GYT": "GYT", "HADT": "HADT", "BT": "BT", "ACWST": "ACWST", "NZST": "NZST", "CDT": "CDT", "MDT": "MDT", "GMT": "GMT", "ARST": "ARST", "SRT": "SRT", "CHADT": "CHADT", "WEZ": "WEZ", "AKST": "AKST", "GFT": "GFT", "WART": "WART", "HAT": "HAT", "COT": "COT", "COST": "COST", "HAST": "HAST", "HNPM": "HNPM", "UYT": "UYT", "HNOG": "HNOG", "HKT": "HKT", "ADT": "ADT", "HECU": "HECU", "AST": "AST", "EAT": "EAT", "AWDT": "AWDT", "UYST": "UYST", "JST": "JST", "AWST": "AWST", "ECT": "ECT", "ACDT": "ACDT", "HEEG": "HEEG", "LHST": "LHST", "WARST": "WARST", "TMST": "TMST", "WIT": "WIT", "HNT": "HNT", "CLT": "CLT", "CST": "CST", "BOT": "BOT", "MESZ": "MESZ", "AKDT": "AKDT", "EST": "EST", "VET": "VET", "HEOG": "HEOG", "TMT": "TMT", "PDT": "PDT", "∅∅∅": "∅∅∅", "SGT": "SGT", "ART": "ART", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "WESZ": "WESZ", "ACWDT": "ACWDT", "WITA": "WITA", "MST": "MST", "WAT": "WAT", "SAST": "SAST", "CAT": "CAT", "CHAST": "CHAST", "HKST": "HKST", "EDT": "EDT", "ChST": "ChST", "MEZ": "MEZ", "JDT": "JDT", "PST": "PST"}, - } - } -  -@@ -112,7 +101,7 @@ func (jmc *jmc_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (jmc *jmc_TZ) MonthsAbbreviated() []string { -- return jmc.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (jmc *jmc_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (jmc *jmc_TZ) MonthsNarrow() []string { -- return jmc.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (jmc *jmc_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (jmc *jmc_TZ) MonthsWide() []string { -- return jmc.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,56 +181,7 @@ func (jmc *jmc_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := jmc.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, jmc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, jmc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, jmc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, jmc.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'jmc_TZ' -@@ -250,64 +190,7 @@ func (jmc *jmc_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := jmc.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, jmc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, jmc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, jmc.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, jmc.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'jmc_TZ' -@@ -315,27 +198,6 @@ func (jmc *jmc_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +206,6 @@ func (jmc *jmc_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, jmc.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +214,6 @@ func (jmc *jmc_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, jmc.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +222,6 @@ func (jmc *jmc_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, jmc.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, jmc.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +230,6 @@ func (jmc *jmc_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +238,6 @@ func (jmc *jmc_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +246,6 @@ func (jmc *jmc_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +254,5 @@ func (jmc *jmc_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, jmc.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := jmc.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ka/ka.go b/ka/ka.go -index 2b7116e..74434b7 100644 ---- a/ka/ka.go -+++ b/ka/ka.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ძვ. წ.", "ახ. წ."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ძველი წელთაღრიცხვით", "ახალი წელთაღრიცხვით"}, -- timezones: map[string]string{"WEZ": "დასავლეთ ევროპის სტანდარტული დრო", "HNT": "ნიუფაუნდლენდის სტანდარტული დრო", "AEDT": "აღმოსავლეთ ავსტრალიის ზაფხულის დრო", "OEZ": "აღმოსავლეთ ევროპის სტანდარტული დრო", "WART": "დასავლეთ არგენტინის სტანდარტული დრო", "WARST": "დასავლეთ არგენტინის ზაფხულის დრო", "HEPMX": "მექსიკის წყნარი ოკეანის ზაფხულის დრო", "AST": "ატლანტიკის ოკეანის სტანდარტული დრო", "UYT": "ურუგვაის სტანდარტული დრო", "HNPM": "სენ-პიერის და მიკელონის სტანდარტული დრო", "SGT": "სინგაპურის დრო", "HNCU": "კუბის სტანდარტული დრო", "UYST": "ურუგვაის ზაფხულის დრო", "BT": "ბუტანის დრო", "HEOG": "დასავლეთ გრენლანდიის ზაფხულის დრო", "CLT": "ჩილეს სტანდარტული დრო", "CLST": "ჩილეს ზაფხულის დრო", "HNEG": "აღმოსავლეთ გრენლანდიის სტანდარტული დრო", "TMST": "თურქმენეთის ზაფხულის დრო", "SRT": "სურინამის დრო", "MESZ": "ცენტრალური ევროპის ზაფხულის დრო", "CHADT": "ჩატემის ზაფხულის დრო", "ACST": "ავსტრალიის ცენტრალური სტანდარტული დრო", "PDT": "ჩრდილოეთ ამერიკის წყნარი ოკეანის ზაფხულის დრო", "AWST": "დასავლეთ ავსტრალიის სტანდარტული დრო", "HKT": "ჰონკონგის სტანდარტული დრო", "EAT": "აღმოსავლეთ აფრიკის დრო", "WAT": "დასავლეთ აფრიკის სტანდარტული დრო", "HENOMX": "ჩრდილო-დასავლეთ მექსიკის ზაფხულის დრო", "MDT": "ჩრდილოეთ ამერიკის მაუნთინის ზაფხულის დრო", "ARST": "არგენტინის ზაფხულის დრო", "HEPM": "სენ-პიერის და მიკელონის ზაფხულის დრო", "MEZ": "ცენტრალური ევროპის სტანდარტული დრო", "BOT": "ბოლივიის დრო", "MST": "ჩრდილოეთ ამერიკის მაუნთინის სტანდარტული დრო", "WIT": "აღმოსავლეთ ინდონეზიის დრო", "IST": "ინდოეთის დრო", "JST": "იაპონიის სტანდარტული დრო", "ChST": "ჩამოროს დრო", "EST": "ჩრდილოეთ ამერიკის აღმოსავლეთის სტანდარტული დრო", "ECT": "ეკვადორის დრო", "AKST": "ალასკის სტანდარტული დრო", "CDT": "ჩრდილოეთ ამერიკის ცენტრალური ზაფხულის დრო", "GYT": "გაიანის დრო", "PST": "ჩრდილოეთ ამერიკის წყნარი ოკეანის სტანდარტული დრო", "ACWDT": "ცენტრალური და დასავლეთ ავსტრალიის ზაფხულის დრო", "LHDT": "ლორდ-ჰაუს ზაფხულის დრო", "TMT": "თურქმენეთის სტანდარტული დრო", "VET": "ვენესუელის დრო", "AWDT": "დასავლეთ ავსტრალიის ზაფხულის დრო", "WITA": "ცენტრალური ინდონეზიის დრო", "HNNOMX": "ჩრდილო-დასავლეთ მექსიკის დრო", "ADT": "ატლანტიკის ოკეანის ზაფხულის დრო", "NZST": "ახალი ზელანდიის სტანდარტული დრო", "SAST": "სამხრეთ აფრიკის დრო", "ACDT": "ავსტრალიის ცენტრალური ზაფხულის დრო", "CST": "ჩრდილოეთ ამერიკის ცენტრალური სტანდარტული დრო", "HAST": "ჰავაისა და ალეუტის სტანდარტული დრო", "HADT": "ჰავაისა და ალეუტის ზაფხულის დრო", "LHST": "ლორდ-ჰაუს სტანდარტული დრო", "HEEG": "აღმოსავლეთ გრენლანდიის ზაფხულის დრო", "GFT": "საფრანგეთის გვიანის დრო", "HECU": "კუბის ზაფხულის დრო", "COST": "კოლუმბიის ზაფხულის დრო", "MYT": "მალაიზიის დრო", "ART": "არგენტინის სტანდარტული დრო", "CHAST": "ჩატემის სტანდარტული დრო", "WAST": "დასავლეთ აფრიკის ზაფხულის დრო", "AKDT": "ალასკის ზაფხულის დრო", "WESZ": "დასავლეთ ევროპის ზაფხულის დრო", "ACWST": "ცენტრალური და დასავლეთ ავსტრალიის სტანდარტული დრო", "HAT": "ნიუფაუნდლენდის ზაფხულის დრო", "HKST": "ჰონკონგის ზაფხულის დრო", "JDT": "იაპონიის ზაფხულის დრო", "CAT": "ცენტრალური აფრიკის დრო", "OESZ": "აღმოსავლეთ ევროპის ზაფხულის დრო", "HNOG": "დასავლეთ გრენლანდიის სტანდარტული დრო", "AEST": "აღმოსავლეთ ავსტრალიის სტანდარტული დრო", "NZDT": "ახალი ზელანდიის ზაფხულის დრო", "∅∅∅": "ამაზონიის ზაფხულის დრო", "COT": "კოლუმბიის სტანდარტული დრო", "EDT": "ჩრდილოეთ ამერიკის აღმოსავლეთის ზაფხულის დრო", "HNPMX": "მექსიკის წყნარი ოკეანის სტანდარტული დრო", "WIB": "დასავლეთ ინდონეზიის დრო", "GMT": "გრინვიჩის საშუალო დრო"}, -+ timezones: map[string]string{"HKT": "ჰონკონგის სტანდარტული დრო", "ARST": "არგენტინის ზაფხულის დრო", "MESZ": "ცენტრალური ევროპის ზაფხულის დრო", "ACST": "ავსტრალიის ცენტრალური სტანდარტული დრო", "AWST": "დასავლეთ ავსტრალიის სტანდარტული დრო", "HNCU": "კუბის სტანდარტული დრო", "HEOG": "დასავლეთ გრენლანდიის ზაფხულის დრო", "UYT": "ურუგვაის სტანდარტული დრო", "WESZ": "დასავლეთ ევროპის ზაფხულის დრო", "GFT": "საფრანგეთის გვიანის დრო", "COT": "კოლუმბიის სტანდარტული დრო", "ADT": "ატლანტიკის ოკეანის ზაფხულის დრო", "HENOMX": "ჩრდილო-დასავლეთ მექსიკის ზაფხულის დრო", "WARST": "დასავლეთ არგენტინის ზაფხულის დრო", "TMT": "თურქმენეთის სტანდარტული დრო", "WEZ": "დასავლეთ ევროპის სტანდარტული დრო", "SAST": "სამხრეთ აფრიკის დრო", "ChST": "ჩამოროს დრო", "HNEG": "აღმოსავლეთ გრენლანდიის სტანდარტული დრო", "MYT": "მალაიზიის დრო", "AWDT": "დასავლეთ ავსტრალიის ზაფხულის დრო", "UYST": "ურუგვაის ზაფხულის დრო", "WITA": "ცენტრალური ინდონეზიის დრო", "CDT": "ჩრდილოეთ ამერიკის ცენტრალური ზაფხულის დრო", "MDT": "MDT", "ACWDT": "ცენტრალური და დასავლეთ ავსტრალიის ზაფხულის დრო", "PST": "ჩრდილოეთ ამერიკის წყნარი ოკეანის სტანდარტული დრო", "WAST": "დასავლეთ აფრიკის ზაფხულის დრო", "HNOG": "დასავლეთ გრენლანდიის სტანდარტული დრო", "CAT": "ცენტრალური აფრიკის დრო", "HAST": "ჰავაისა და ალეუტის სტანდარტული დრო", "HNPMX": "მექსიკის წყნარი ოკეანის სტანდარტული დრო", "SGT": "სინგაპურის დრო", "OESZ": "აღმოსავლეთ ევროპის ზაფხულის დრო", "HKST": "ჰონკონგის ზაფხულის დრო", "CLT": "ჩილეს სტანდარტული დრო", "HNPM": "სენ-პიერის და მიკელონის სტანდარტული დრო", "ACWST": "ცენტრალური და დასავლეთ ავსტრალიის სტანდარტული დრო", "WART": "დასავლეთ არგენტინის სტანდარტული დრო", "EAT": "აღმოსავლეთ აფრიკის დრო", "AKST": "ალასკის სტანდარტული დრო", "TMST": "თურქმენეთის ზაფხულის დრო", "HNNOMX": "ჩრდილო-დასავლეთ მექსიკის დრო", "ACDT": "ავსტრალიის ცენტრალური ზაფხულის დრო", "AEDT": "აღმოსავლეთ ავსტრალიის ზაფხულის დრო", "CHAST": "ჩატემის სტანდარტული დრო", "PDT": "ჩრდილოეთ ამერიკის წყნარი ოკეანის ზაფხულის დრო", "EDT": "ჩრდილოეთ ამერიკის აღმოსავლეთის ზაფხულის დრო", "WIB": "დასავლეთ ინდონეზიის დრო", "SRT": "სურინამის დრო", "HEPM": "სენ-პიერის და მიკელონის ზაფხულის დრო", "∅∅∅": "∅∅∅", "HECU": "კუბის ზაფხულის დრო", "HNT": "ნიუფაუნდლენდის სტანდარტული დრო", "HAT": "ნიუფაუნდლენდის ზაფხულის დრო", "LHDT": "ლორდ-ჰაუს ზაფხულის დრო", "NZDT": "ახალი ზელანდიის ზაფხულის დრო", "GMT": "გრინვიჩის საშუალო დრო", "ART": "არგენტინის სტანდარტული დრო", "AST": "ატლანტიკის ოკეანის სტანდარტული დრო", "HADT": "ჰავაისა და ალეუტის ზაფხულის დრო", "HEEG": "აღმოსავლეთ გრენლანდიის ზაფხულის დრო", "CHADT": "ჩატემის ზაფხულის დრო", "GYT": "გაიანის დრო", "EST": "ჩრდილოეთ ამერიკის აღმოსავლეთის სტანდარტული დრო", "MST": "MST", "OEZ": "აღმოსავლეთ ევროპის სტანდარტული დრო", "MEZ": "ცენტრალური ევროპის სტანდარტული დრო", "JST": "იაპონიის სტანდარტული დრო", "LHST": "ლორდ-ჰაუს სტანდარტული დრო", "IST": "ინდოეთის დრო", "WAT": "დასავლეთ აფრიკის სტანდარტული დრო", "CST": "ჩრდილოეთ ამერიკის ცენტრალური სტანდარტული დრო", "BOT": "ბოლივიის დრო", "AEST": "აღმოსავლეთ ავსტრალიის სტანდარტული დრო", "AKDT": "ალასკის ზაფხულის დრო", "CLST": "ჩილეს ზაფხულის დრო", "NZST": "ახალი ზელანდიის სტანდარტული დრო", "ECT": "ეკვადორის დრო", "COST": "კოლუმბიის ზაფხულის დრო", "JDT": "იაპონიის ზაფხულის დრო", "BT": "ბუტანის დრო", "VET": "ვენესუელის დრო", "HEPMX": "მექსიკის წყნარი ოკეანის ზაფხულის დრო", "WIT": "აღმოსავლეთ ინდონეზიის დრო"}, - } - } -  -diff --git a/ka_GE/ka_GE.go b/ka_GE/ka_GE.go -index 5a0f9d1..fd045bf 100644 ---- a/ka_GE/ka_GE.go -+++ b/ka_GE/ka_GE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type ka_GE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ka_GE' locale - func New() locales.Translator { - return &ka_GE{ -- locale: "ka_GE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "იან", "თებ", "მარ", "აპრ", "მაი", "ივნ", "ივლ", "აგვ", "სექ", "ოქტ", "ნოე", "დეკ"}, -- monthsNarrow: []string{"", "ი", "თ", "მ", "ა", "მ", "ი", "ი", "ა", "ს", "ო", "ნ", "დ"}, -- monthsWide: []string{"", "იანვარი", "თებერვალი", "მარტი", "აპრილი", "მაისი", "ივნისი", "ივლისი", "აგვისტო", "სექტემბერი", "ოქტომბერი", "ნოემბერი", "დეკემბერი"}, -- daysAbbreviated: []string{"კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"}, -- daysNarrow: []string{"კ", "ო", "ს", "ო", "ხ", "პ", "შ"}, -- daysShort: []string{"კვ", "ორ", "სმ", "ოთ", "ხთ", "პრ", "შბ"}, -- daysWide: []string{"კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"ძვ. წ.", "ახ. წ."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ძველი წელთაღრიცხვით", "ახალი წელთაღრიცხვით"}, -- timezones: map[string]string{"CHADT": "ჩატემის ზაფხულის დრო", "WAT": "დასავლეთ აფრიკის სტანდარტული დრო", "BT": "ბუტანის დრო", "HNOG": "დასავლეთ გრენლანდიის სტანდარტული დრო", "HECU": "კუბის ზაფხულის დრო", "CLT": "ჩილეს სტანდარტული დრო", "GFT": "საფრანგეთის გვიანის დრო", "ACWDT": "ცენტრალური და დასავლეთ ავსტრალიის ზაფხულის დრო", "ART": "არგენტინის სტანდარტული დრო", "SAST": "სამხრეთ აფრიკის დრო", "ACDT": "ავსტრალიის ცენტრალური ზაფხულის დრო", "COT": "კოლუმბიის სტანდარტული დრო", "CST": "ჩრდილოეთ ამერიკის ცენტრალური სტანდარტული დრო", "SRT": "სურინამის დრო", "PST": "ჩრდილოეთ ამერიკის წყნარი ოკეანის სტანდარტული დრო", "CDT": "ჩრდილოეთ ამერიკის ცენტრალური ზაფხულის დრო", "HAST": "ჰავაისა და ალეუტის სტანდარტული დრო", "HKST": "ჰონკონგის ზაფხულის დრო", "WITA": "ცენტრალური ინდონეზიის დრო", "NZST": "ახალი ზელანდიის სტანდარტული დრო", "IST": "ინდოეთის დრო", "EAT": "აღმოსავლეთ აფრიკის დრო", "HENOMX": "ჩრდილო-დასავლეთ მექსიკის ზაფხულის დრო", "MDT": "ჩრდილოეთ ამერიკის მაუნთინის ზაფხულის დრო", "HADT": "ჰავაისა და ალეუტის ზაფხულის დრო", "MEZ": "ცენტრალური ევროპის სტანდარტული დრო", "CHAST": "ჩატემის სტანდარტული დრო", "ECT": "ეკვადორის დრო", "HNPMX": "მექსიკის წყნარი ოკეანის სტანდარტული დრო", "AST": "ატლანტიკის ოკეანის სტანდარტული დრო", "MST": "ჩრდილოეთ ამერიკის მაუნთინის სტანდარტული დრო", "VET": "ვენესუელის დრო", "WAST": "დასავლეთ აფრიკის ზაფხულის დრო", "HNNOMX": "ჩრდილო-დასავლეთ მექსიკის დრო", "AKST": "ალასკის სტანდარტული დრო", "AKDT": "ალასკის ზაფხულის დრო", "WESZ": "დასავლეთ ევროპის ზაფხულის დრო", "MESZ": "ცენტრალური ევროპის ზაფხულის დრო", "WARST": "დასავლეთ არგენტინის ზაფხულის დრო", "HEPMX": "მექსიკის წყნარი ოკეანის ზაფხულის დრო", "UYT": "ურუგვაის სტანდარტული დრო", "WIT": "აღმოსავლეთ ინდონეზიის დრო", "HEEG": "აღმოსავლეთ გრენლანდიის ზაფხულის დრო", "ACST": "ავსტრალიის ცენტრალური სტანდარტული დრო", "ADT": "ატლანტიკის ოკეანის ზაფხულის დრო", "WEZ": "დასავლეთ ევროპის სტანდარტული დრო", "JDT": "იაპონიის ზაფხულის დრო", "AWST": "დასავლეთ ავსტრალიის სტანდარტული დრო", "LHDT": "ლორდ-ჰაუს ზაფხულის დრო", "∅∅∅": "ამაზონიის ზაფხულის დრო", "JST": "იაპონიის სტანდარტული დრო", "HNEG": "აღმოსავლეთ გრენლანდიის სტანდარტული დრო", "COST": "კოლუმბიის ზაფხულის დრო", "GMT": "გრინვიჩის საშუალო დრო", "HNPM": "სენ-პიერის და მიკელონის სტანდარტული დრო", "LHST": "ლორდ-ჰაუს სტანდარტული დრო", "UYST": "ურუგვაის ზაფხულის დრო", "HNCU": "კუბის სტანდარტული დრო", "EST": "ჩრდილოეთ ამერიკის აღმოსავლეთის სტანდარტული დრო", "ChST": "ჩამოროს დრო", "OEZ": "აღმოსავლეთ ევროპის სტანდარტული დრო", "OESZ": "აღმოსავლეთ ევროპის ზაფხულის დრო", "ACWST": "ცენტრალური და დასავლეთ ავსტრალიის სტანდარტული დრო", "CLST": "ჩილეს ზაფხულის დრო", "HKT": "ჰონკონგის სტანდარტული დრო", "HEPM": "სენ-პიერის და მიკელონის ზაფხულის დრო", "WART": "დასავლეთ არგენტინის სტანდარტული დრო", "GYT": "გაიანის დრო", "MYT": "მალაიზიის დრო", "WIB": "დასავლეთ ინდონეზიის დრო", "ARST": "არგენტინის ზაფხულის დრო", "HEOG": "დასავლეთ გრენლანდიის ზაფხულის დრო", "AEDT": "აღმოსავლეთ ავსტრალიის ზაფხულის დრო", "NZDT": "ახალი ზელანდიის ზაფხულის დრო", "BOT": "ბოლივიის დრო", "TMT": "თურქმენეთის სტანდარტული დრო", "PDT": "ჩრდილოეთ ამერიკის წყნარი ოკეანის ზაფხულის დრო", "HNT": "ნიუფაუნდლენდის სტანდარტული დრო", "AWDT": "დასავლეთ ავსტრალიის ზაფხულის დრო", "TMST": "თურქმენეთის ზაფხულის დრო", "CAT": "ცენტრალური აფრიკის დრო", "SGT": "სინგაპურის დრო", "EDT": "ჩრდილოეთ ამერიკის აღმოსავლეთის ზაფხულის დრო", "HAT": "ნიუფაუნდლენდის ზაფხულის დრო", "AEST": "აღმოსავლეთ ავსტრალიის სტანდარტული დრო"}, -+ locale: "ka_GE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "PDT": "PDT", "WAT": "WAT", "WART": "WART", "SRT": "SRT", "HEEG": "HEEG", "AWST": "AWST", "WESZ": "WESZ", "ChST": "ChST", "AKST": "AKST", "WITA": "WITA", "CST": "CST", "AEDT": "AEDT", "HECU": "HECU", "GMT": "GMT", "BT": "BT", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "WIT": "WIT", "TMT": "TMT", "CLT": "CLT", "WEZ": "WEZ", "LHDT": "LHDT", "IST": "IST", "WARST": "WARST", "GYT": "GYT", "AST": "AST", "PST": "PST", "ARST": "ARST", "AEST": "AEST", "CLST": "CLST", "WIB": "WIB", "NZST": "NZST", "MDT": "MDT", "ART": "ART", "HNEG": "HNEG", "OESZ": "OESZ", "HEOG": "HEOG", "EDT": "EDT", "∅∅∅": "∅∅∅", "ECT": "ECT", "HENOMX": "HENOMX", "JDT": "JDT", "UYT": "UYT", "HNPMX": "HNPMX", "SGT": "SGT", "EST": "EST", "HKT": "HKT", "WAST": "WAST", "AKDT": "AKDT", "MYT": "MYT", "ACWDT": "ACWDT", "VET": "VET", "COT": "COT", "NZDT": "NZDT", "EAT": "EAT", "HADT": "HADT", "ACST": "ACST", "ACWST": "ACWST", "UYST": "UYST", "GFT": "GFT", "HAT": "HAT", "CAT": "CAT", "BOT": "BOT", "SAST": "SAST", "HEPM": "HEPM", "JST": "JST", "OEZ": "OEZ", "HNOG": "HNOG", "TMST": "TMST", "HKST": "HKST", "HAST": "HAST", "HNPM": "HNPM", "CHAST": "CHAST", "HNCU": "HNCU", "HEPMX": "HEPMX", "MST": "MST", "ADT": "ADT", "HNT": "HNT", "COST": "COST", "CDT": "CDT", "MEZ": "MEZ", "CHADT": "CHADT", "MESZ": "MESZ", "LHST": "LHST"}, - } - } -  -@@ -148,7 +123,7 @@ func (ka *ka_GE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ka *ka_GE) MonthsAbbreviated() []string { -- return ka.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -158,7 +133,7 @@ func (ka *ka_GE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ka *ka_GE) MonthsNarrow() []string { -- return ka.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -168,7 +143,7 @@ func (ka *ka_GE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ka *ka_GE) MonthsWide() []string { -- return ka.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -214,77 +189,13 @@ func (ka *ka_GE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ka_GE' and handles both Whole and Real numbers based on 'v' - func (ka *ka_GE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ka.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ka.group) - 1; j >= 0; j-- { -- b = append(b, ka.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ka.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ka_GE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ka *ka_GE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ka.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ka.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ka.percentSuffix...) -- -- b = append(b, ka.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ka_GE' -@@ -292,58 +203,7 @@ func (ka *ka_GE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ka.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ka.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ka.group) - 1; j >= 0; j-- { -- b = append(b, ka.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ka.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ka.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ka.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ka_GE' -@@ -352,65 +212,7 @@ func (ka *ka_GE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ka.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ka.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ka.group) - 1; j >= 0; j-- { -- b = append(b, ka.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ka.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ka.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ka.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ka.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ka_GE' -@@ -418,27 +220,6 @@ func (ka *ka_GE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -447,17 +228,6 @@ func (ka *ka_GE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ka.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,17 +236,6 @@ func (ka *ka_GE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ka.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,24 +244,6 @@ func (ka *ka_GE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ka.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ka.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -511,19 +252,6 @@ func (ka *ka_GE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -532,26 +260,6 @@ func (ka *ka_GE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -560,30 +268,6 @@ func (ka *ka_GE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,34 +276,5 @@ func (ka *ka_GE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ka.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ka.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kab/kab.go b/kab/kab.go -index 0b6e9e2..290319e 100644 ---- a/kab/kab.go -+++ b/kab/kab.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"snd. T.Ɛ", "sld. T.Ɛ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"send talalit n Ɛisa", "seld talalit n Ɛisa"}, -- timezones: map[string]string{"EAT": "EAT", "ECT": "ECT", "MYT": "MYT", "BT": "BT", "HNT": "HNT", "GFT": "GFT", "CAT": "CAT", "CHADT": "CHADT", "TMT": "TMT", "COST": "COST", "MST": "MST", "VET": "VET", "SRT": "SRT", "PDT": "PDT", "WITA": "WITA", "EDT": "EDT", "CDT": "CDT", "HADT": "HADT", "WESZ": "WESZ", "LHDT": "LHDT", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "BOT": "BOT", "ACDT": "ACDT", "OESZ": "OESZ", "WARST": "WARST", "COT": "COT", "ACST": "ACST", "UYT": "UYT", "UYST": "UYST", "HNOG": "HNOG", "ARST": "ARST", "JST": "JST", "AWDT": "AWDT", "HKST": "HKST", "WAT": "WAT", "EST": "EST", "AKDT": "AKDT", "ADT": "ADT", "HAST": "HAST", "AEST": "AEST", "WART": "WART", "CLT": "CLT", "WAST": "WAST", "GMT": "GMT", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "AWST": "AWST", "MEZ": "MEZ", "GYT": "GYT", "NZDT": "NZDT", "HENOMX": "HENOMX", "HECU": "HECU", "AKST": "AKST", "LHST": "LHST", "SAST": "SAST", "TMST": "TMST", "SGT": "SGT", "HEPM": "HEPM", "MESZ": "MESZ", "HNCU": "HNCU", "PST": "PST", "ACWST": "ACWST", "IST": "IST", "CST": "CST", "HEOG": "HEOG", "ART": "ART", "CHAST": "CHAST", "AST": "AST", "WIT": "WIT", "NZST": "NZST", "CLST": "CLST", "HEEG": "HEEG", "HKT": "HKT", "JDT": "JDT", "HNEG": "HNEG", "MDT": "MDT", "HNPMX": "HNPMX", "WIB": "WIB", "HAT": "HAT", "AEDT": "AEDT", "HEPMX": "HEPMX", "ACWDT": "ACWDT", "HNPM": "HNPM", "ChST": "ChST"}, -+ timezones: map[string]string{"MESZ": "MESZ", "ACWST": "ACWST", "GMT": "GMT", "MEZ": "MEZ", "TMT": "TMT", "ACDT": "ACDT", "LHDT": "LHDT", "UYST": "UYST", "HNT": "HNT", "GYT": "GYT", "LHST": "LHST", "HNCU": "HNCU", "HECU": "HECU", "OEZ": "OEZ", "NZDT": "NZDT", "HENOMX": "HENOMX", "UYT": "UYT", "WARST": "WARST", "COST": "COST", "PST": "PST", "PDT": "PDT", "HNPM": "HNPM", "HEPM": "HEPM", "HNEG": "HNEG", "JST": "JST", "IST": "IST", "AEST": "AEST", "CAT": "CAT", "CLT": "CLT", "CST": "CST", "AST": "AST", "AWST": "AWST", "AKST": "AKST", "EDT": "EDT", "GFT": "GFT", "WART": "WART", "MST": "MST", "ADT": "ADT", "VET": "VET", "HNPMX": "HNPMX", "WAST": "WAST", "AKDT": "AKDT", "HADT": "HADT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "OESZ": "OESZ", "HAST": "HAST", "TMST": "TMST", "MDT": "MDT", "CHADT": "CHADT", "HEPMX": "HEPMX", "WAT": "WAT", "EST": "EST", "AEDT": "AEDT", "CDT": "CDT", "ART": "ART", "BT": "BT", "HEOG": "HEOG", "HKT": "HKT", "ChST": "ChST", "ARST": "ARST", "AWDT": "AWDT", "JDT": "JDT", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "WITA": "WITA", "CHAST": "CHAST", "EAT": "EAT", "MYT": "MYT", "COT": "COT", "HKST": "HKST", "ECT": "ECT", "BOT": "BOT", "SRT": "SRT", "ACST": "ACST", "WIT": "WIT", "SAST": "SAST", "ACWDT": "ACWDT", "WEZ": "WEZ", "CLST": "CLST", "NZST": "NZST", "WIB": "WIB", "SGT": "SGT", "HAT": "HAT", "HNOG": "HNOG"}, - } - } -  -diff --git a/kab_DZ/kab_DZ.go b/kab_DZ/kab_DZ.go -index 64488f6..8e87971 100644 ---- a/kab_DZ/kab_DZ.go -+++ b/kab_DZ/kab_DZ.go -@@ -42,26 +42,13 @@ type kab_DZ struct { - // New returns a new instance of translator for the 'kab_DZ' locale - func New() locales.Translator { - return &kab_DZ{ -- locale: "kab_DZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Yen", "Fur", "Meɣ", "Yeb", "May", "Yun", "Yul", "Ɣuc", "Cte", "Tub", "Nun", "Duǧ"}, -- monthsNarrow: []string{"", "Y", "F", "M", "Y", "M", "Y", "Y", "Ɣ", "C", "T", "N", "D"}, -- monthsWide: []string{"", "Yennayer", "Fuṛar", "Meɣres", "Yebrir", "Mayyu", "Yunyu", "Yulyu", "Ɣuct", "Ctembeṛ", "Tubeṛ", "Nunembeṛ", "Duǧembeṛ"}, -- daysAbbreviated: []string{"Yan", "San", "Kraḍ", "Kuẓ", "Sam", "Sḍis", "Say"}, -- daysNarrow: []string{"Y", "S", "K", "K", "S", "S", "S"}, -- daysWide: []string{"Yanass", "Sanass", "Kraḍass", "Kuẓass", "Samass", "Sḍisass", "Sayass"}, -- periodsAbbreviated: []string{"n tufat", "n tmeddit"}, -- periodsWide: []string{"n tufat", "n tmeddit"}, -- erasAbbreviated: []string{"snd. T.Ɛ", "sld. T.Ɛ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"send talalit n Ɛisa", "seld talalit n Ɛisa"}, -- timezones: map[string]string{"WESZ": "WESZ", "OEZ": "OEZ", "AKST": "AKST", "HADT": "HADT", "HEPMX": "HEPMX", "ACST": "ACST", "HECU": "HECU", "HNPMX": "HNPMX", "TMT": "TMT", "SRT": "SRT", "AST": "AST", "JST": "JST", "JDT": "JDT", "TMST": "TMST", "HAST": "HAST", "SAST": "SAST", "HNCU": "HNCU", "MST": "MST", "EST": "EST", "MYT": "MYT", "PST": "PST", "COST": "COST", "MDT": "MDT", "WIB": "WIB", "WIT": "WIT", "ART": "ART", "ACDT": "ACDT", "HKST": "HKST", "WITA": "WITA", "IST": "IST", "BOT": "BOT", "EAT": "EAT", "COT": "COT", "WARST": "WARST", "HKT": "HKT", "CDT": "CDT", "MEZ": "MEZ", "GMT": "GMT", "HNT": "HNT", "AEST": "AEST", "HNEG": "HNEG", "HEEG": "HEEG", "ChST": "ChST", "GYT": "GYT", "UYT": "UYT", "HEPM": "HEPM", "LHST": "LHST", "NZDT": "NZDT", "WAST": "WAST", "ECT": "ECT", "CAT": "CAT", "AKDT": "AKDT", "HEOG": "HEOG", "AEDT": "AEDT", "WART": "WART", "SGT": "SGT", "ACWST": "ACWST", "GFT": "GFT", "CLT": "CLT", "WAT": "WAT", "HNNOMX": "HNNOMX", "VET": "VET", "BT": "BT", "HNOG": "HNOG", "PDT": "PDT", "NZST": "NZST", "LHDT": "LHDT", "CHADT": "CHADT", "HENOMX": "HENOMX", "EDT": "EDT", "UYST": "UYST", "ACWDT": "ACWDT", "AWDT": "AWDT", "HNPM": "HNPM", "CLST": "CLST", "ADT": "ADT", "HAT": "HAT", "ARST": "ARST", "AWST": "AWST", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "CST": "CST", "WEZ": "WEZ", "CHAST": "CHAST"}, -+ locale: "kab_DZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "AKDT": "AKDT", "OESZ": "OESZ", "WARST": "WARST", "NZDT": "NZDT", "BOT": "BOT", "HENOMX": "HENOMX", "PDT": "PDT", "GYT": "GYT", "ADT": "ADT", "HAST": "HAST", "HADT": "HADT", "HNNOMX": "HNNOMX", "HEOG": "HEOG", "CHAST": "CHAST", "CHADT": "CHADT", "HNT": "HNT", "AST": "AST", "LHST": "LHST", "EDT": "EDT", "TMST": "TMST", "MST": "MST", "ART": "ART", "∅∅∅": "∅∅∅", "CDT": "CDT", "EAT": "EAT", "MESZ": "MESZ", "ACDT": "ACDT", "GFT": "GFT", "SAST": "SAST", "WEZ": "WEZ", "CAT": "CAT", "CLT": "CLT", "CLST": "CLST", "WIB": "WIB", "AWDT": "AWDT", "PST": "PST", "COT": "COT", "ChST": "ChST", "IST": "IST", "UYST": "UYST", "HNCU": "HNCU", "HECU": "HECU", "WAST": "WAST", "HNOG": "HNOG", "HKT": "HKT", "ECT": "ECT", "HNPM": "HNPM", "SRT": "SRT", "ACWDT": "ACWDT", "AEDT": "AEDT", "HEPMX": "HEPMX", "NZST": "NZST", "GMT": "GMT", "AWST": "AWST", "BT": "BT", "WESZ": "WESZ", "VET": "VET", "OEZ": "OEZ", "WIT": "WIT", "HKST": "HKST", "TMT": "TMT", "JST": "JST", "ACST": "ACST", "WITA": "WITA", "HAT": "HAT", "AEST": "AEST", "ACWST": "ACWST", "EST": "EST", "ARST": "ARST", "LHDT": "LHDT", "MDT": "MDT", "MYT": "MYT", "UYT": "UYT", "SGT": "SGT", "WAT": "WAT", "WART": "WART", "CST": "CST", "HEPM": "HEPM", "AKST": "AKST", "COST": "COST", "MEZ": "MEZ", "HNEG": "HNEG", "HEEG": "HEEG", "JDT": "JDT"}, - } - } -  -@@ -115,7 +102,7 @@ func (kab *kab_DZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kab *kab_DZ) MonthsAbbreviated() []string { -- return kab.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -125,7 +112,7 @@ func (kab *kab_DZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kab *kab_DZ) MonthsNarrow() []string { -- return kab.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -135,7 +122,7 @@ func (kab *kab_DZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kab *kab_DZ) MonthsWide() []string { -- return kab.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -195,56 +182,7 @@ func (kab *kab_DZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kab.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kab.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kab.group) - 1; j >= 0; j-- { -- b = append(b, kab.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kab.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kab.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kab_DZ' -@@ -253,63 +191,7 @@ func (kab *kab_DZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kab.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kab.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kab.group) - 1; j >= 0; j-- { -- b = append(b, kab.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, kab.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kab.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kab_DZ' -@@ -317,17 +199,6 @@ func (kab *kab_DZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -336,17 +207,6 @@ func (kab *kab_DZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kab.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -355,17 +215,6 @@ func (kab *kab_DZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kab.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -374,19 +223,6 @@ func (kab *kab_DZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kab.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kab.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -395,28 +231,6 @@ func (kab *kab_DZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kab.periodsAbbreviated[0]...) -- } else { -- b = append(b, kab.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -425,35 +239,6 @@ func (kab *kab_DZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kab.periodsAbbreviated[0]...) -- } else { -- b = append(b, kab.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -462,40 +247,6 @@ func (kab *kab_DZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kab.periodsAbbreviated[0]...) -- } else { -- b = append(b, kab.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -504,44 +255,5 @@ func (kab *kab_DZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kab.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kab.periodsAbbreviated[0]...) -- } else { -- b = append(b, kab.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kab.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kam/kam.go b/kam/kam.go -index f4d4412..cf42af4 100644 ---- a/kam/kam.go -+++ b/kam/kam.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"MY", "IY"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Mbee wa Yesũ", "Ĩtina wa Yesũ"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "ECT": "ECT", "WIB": "WIB", "HADT": "HADT", "MESZ": "MESZ", "SAST": "SAST", "JST": "JST", "HENOMX": "HENOMX", "IST": "IST", "CLT": "CLT", "HECU": "HECU", "GYT": "GYT", "WEZ": "WEZ", "HAT": "HAT", "ARST": "ARST", "AKST": "AKST", "AST": "AST", "HNEG": "HNEG", "TMT": "TMT", "WARST": "WARST", "HNPMX": "HNPMX", "UYT": "UYT", "HNNOMX": "HNNOMX", "VET": "VET", "AWST": "AWST", "NZST": "NZST", "PDT": "PDT", "WESZ": "WESZ", "WAST": "WAST", "OEZ": "OEZ", "COT": "COT", "COST": "COST", "CDT": "CDT", "SRT": "SRT", "TMST": "TMST", "EAT": "EAT", "WAT": "WAT", "WART": "WART", "HNPM": "HNPM", "AWDT": "AWDT", "HEPM": "HEPM", "ACST": "ACST", "ACDT": "ACDT", "MST": "MST", "MDT": "MDT", "BT": "BT", "AEDT": "AEDT", "LHST": "LHST", "GFT": "GFT", "SGT": "SGT", "HKST": "HKST", "BOT": "BOT", "CAT": "CAT", "HNCU": "HNCU", "EDT": "EDT", "HAST": "HAST", "UYST": "UYST", "MYT": "MYT", "WIT": "WIT", "ACWDT": "ACWDT", "HKT": "HKT", "ADT": "ADT", "PST": "PST", "ACWST": "ACWST", "ART": "ART", "HNOG": "HNOG", "LHDT": "LHDT", "CHADT": "CHADT", "CLST": "CLST", "ChST": "ChST", "HEEG": "HEEG", "AKDT": "AKDT", "CST": "CST", "CHAST": "CHAST", "HEPMX": "HEPMX", "HEOG": "HEOG", "AEST": "AEST", "WITA": "WITA", "NZDT": "NZDT", "JDT": "JDT", "OESZ": "OESZ", "GMT": "GMT", "EST": "EST", "HNT": "HNT", "MEZ": "MEZ"}, -+ timezones: map[string]string{"AWDT": "AWDT", "UYST": "UYST", "WART": "WART", "WARST": "WARST", "HNOG": "HNOG", "MST": "MST", "HADT": "HADT", "WEZ": "WEZ", "SGT": "SGT", "WIB": "WIB", "MDT": "MDT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "HEPM": "HEPM", "PDT": "PDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "WITA": "WITA", "AST": "AST", "HNEG": "HNEG", "CHADT": "CHADT", "HNCU": "HNCU", "HEEG": "HEEG", "HENOMX": "HENOMX", "MYT": "MYT", "HNPM": "HNPM", "HNPMX": "HNPMX", "WAT": "WAT", "GMT": "GMT", "ACWST": "ACWST", "AEST": "AEST", "WESZ": "WESZ", "HECU": "HECU", "HNT": "HNT", "CLT": "CLT", "CST": "CST", "ARST": "ARST", "BOT": "BOT", "MEZ": "MEZ", "JST": "JST", "JDT": "JDT", "BT": "BT", "UYT": "UYT", "ECT": "ECT", "ChST": "ChST", "EAT": "EAT", "LHST": "LHST", "CHAST": "CHAST", "AKDT": "AKDT", "ART": "ART", "ACST": "ACST", "IST": "IST", "VET": "VET", "COT": "COT", "CLST": "CLST", "CDT": "CDT", "NZDT": "NZDT", "ACDT": "ACDT", "TMT": "TMT", "SRT": "SRT", "AWST": "AWST", "PST": "PST", "OESZ": "OESZ", "HAT": "HAT", "GYT": "GYT", "NZST": "NZST", "HAST": "HAST", "AEDT": "AEDT", "WAST": "WAST", "EST": "EST", "HKT": "HKT", "MESZ": "MESZ", "EDT": "EDT", "TMST": "TMST", "ADT": "ADT", "AKST": "AKST", "GFT": "GFT", "WIT": "WIT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "SAST": "SAST", "COST": "COST", "HKST": "HKST", "CAT": "CAT"}, - } - } -  -diff --git a/kam_KE/kam_KE.go b/kam_KE/kam_KE.go -index 9f74ba6..20fe782 100644 ---- a/kam_KE/kam_KE.go -+++ b/kam_KE/kam_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type kam_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kam_KE' locale - func New() locales.Translator { - return &kam_KE{ -- locale: "kam_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Mbe", "Kel", "Ktũ", "Kan", "Ktn", "Tha", "Moo", "Nya", "Knd", "Ĩku", "Ĩkm", "Ĩkl"}, -- monthsNarrow: []string{"", "M", "K", "K", "K", "K", "T", "M", "N", "K", "Ĩ", "Ĩ", "Ĩ"}, -- monthsWide: []string{"", "Mwai wa mbee", "Mwai wa kelĩ", "Mwai wa katatũ", "Mwai wa kana", "Mwai wa katano", "Mwai wa thanthatũ", "Mwai wa muonza", "Mwai wa nyaanya", "Mwai wa kenda", "Mwai wa ĩkumi", "Mwai wa ĩkumi na ĩmwe", "Mwai wa ĩkumi na ilĩ"}, -- daysAbbreviated: []string{"Wky", "Wkw", "Wkl", "Wtũ", "Wkn", "Wtn", "Wth"}, -- daysNarrow: []string{"Y", "W", "E", "A", "A", "A", "A"}, -- daysWide: []string{"Wa kyumwa", "Wa kwambĩlĩlya", "Wa kelĩ", "Wa katatũ", "Wa kana", "Wa katano", "Wa thanthatũ"}, -- periodsAbbreviated: []string{"Ĩyakwakya", "Ĩyawĩoo"}, -- periodsWide: []string{"Ĩyakwakya", "Ĩyawĩoo"}, -- erasAbbreviated: []string{"MY", "IY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Mbee wa Yesũ", "Ĩtina wa Yesũ"}, -- timezones: map[string]string{"WITA": "WITA", "LHST": "LHST", "HNCU": "HNCU", "HNPMX": "HNPMX", "CDT": "CDT", "HAST": "HAST", "WIT": "WIT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "HADT": "HADT", "HNT": "HNT", "ADT": "ADT", "HAT": "HAT", "HKST": "HKST", "LHDT": "LHDT", "CHADT": "CHADT", "GFT": "GFT", "EST": "EST", "MESZ": "MESZ", "CAT": "CAT", "GYT": "GYT", "PDT": "PDT", "HKT": "HKT", "CHAST": "CHAST", "ChST": "ChST", "TMST": "TMST", "EAT": "EAT", "COST": "COST", "UYT": "UYT", "HNOG": "HNOG", "HEPM": "HEPM", "HEEG": "HEEG", "ART": "ART", "ARST": "ARST", "AWST": "AWST", "NZST": "NZST", "HNEG": "HNEG", "ECT": "ECT", "WART": "WART", "WEZ": "WEZ", "IST": "IST", "CLT": "CLT", "ACDT": "ACDT", "WARST": "WARST", "AKST": "AKST", "PST": "PST", "AKDT": "AKDT", "AST": "AST", "ACWST": "ACWST", "WAT": "WAT", "COT": "COT", "SGT": "SGT", "HECU": "HECU", "MST": "MST", "CST": "CST", "VET": "VET", "ACWDT": "ACWDT", "AEST": "AEST", "AEDT": "AEDT", "MEZ": "MEZ", "BOT": "BOT", "WAST": "WAST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "BT": "BT", "AWDT": "AWDT", "CLST": "CLST", "JST": "JST", "TMT": "TMT", "OESZ": "OESZ", "EDT": "EDT", "WIB": "WIB", "SRT": "SRT", "WESZ": "WESZ", "HNPM": "HNPM", "NZDT": "NZDT", "SAST": "SAST", "ACST": "ACST", "OEZ": "OEZ", "UYST": "UYST", "JDT": "JDT", "GMT": "GMT", "MDT": "MDT", "HEPMX": "HEPMX", "MYT": "MYT"}, -+ locale: "kam_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "UYT": "UYT", "VET": "VET", "WESZ": "WESZ", "HNT": "HNT", "MDT": "MDT", "ART": "ART", "ARST": "ARST", "WIB": "WIB", "HEPM": "HEPM", "WIT": "WIT", "ChST": "ChST", "ACST": "ACST", "AEST": "AEST", "WAST": "WAST", "HAT": "HAT", "HEOG": "HEOG", "HAST": "HAST", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "CHAST": "CHAST", "HNCU": "HNCU", "WARST": "WARST", "AST": "AST", "HNNOMX": "HNNOMX", "PDT": "PDT", "OESZ": "OESZ", "CLT": "CLT", "WITA": "WITA", "JDT": "JDT", "OEZ": "OEZ", "SRT": "SRT", "AKST": "AKST", "CLST": "CLST", "CAT": "CAT", "ECT": "ECT", "CST": "CST", "CDT": "CDT", "GYT": "GYT", "TMST": "TMST", "EAT": "EAT", "MESZ": "MESZ", "PST": "PST", "AWST": "AWST", "COT": "COT", "HNOG": "HNOG", "CHADT": "CHADT", "WART": "WART", "HKST": "HKST", "TMT": "TMT", "NZST": "NZST", "HEEG": "HEEG", "BT": "BT", "GFT": "GFT", "HADT": "HADT", "JST": "JST", "HEPMX": "HEPMX", "ACDT": "ACDT", "MEZ": "MEZ", "ACWST": "ACWST", "BOT": "BOT", "HECU": "HECU", "WEZ": "WEZ", "AEDT": "AEDT", "SGT": "SGT", "WAT": "WAT", "HKT": "HKT", "EDT": "EDT", "NZDT": "NZDT", "ADT": "ADT", "HNPM": "HNPM", "ACWDT": "ACWDT", "UYST": "UYST", "IST": "IST", "SAST": "SAST", "MST": "MST", "HNEG": "HNEG", "LHDT": "LHDT", "HNPMX": "HNPMX", "AKDT": "AKDT", "COST": "COST", "EST": "EST", "GMT": "GMT", "MYT": "MYT", "AWDT": "AWDT"}, - } - } -  -@@ -109,7 +94,7 @@ func (kam *kam_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kam *kam_KE) MonthsAbbreviated() []string { -- return kam.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (kam *kam_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kam *kam_KE) MonthsNarrow() []string { -- return kam.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (kam *kam_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kam *kam_KE) MonthsWide() []string { -- return kam.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (kam *kam_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kam.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kam.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kam.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, kam.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kam.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kam_KE' -@@ -247,68 +183,7 @@ func (kam *kam_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kam.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kam.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kam.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, kam.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kam.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, kam.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kam_KE' -@@ -316,27 +191,6 @@ func (kam *kam_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (kam *kam_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kam.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (kam *kam_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kam.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (kam *kam_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kam.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kam.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (kam *kam_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (kam *kam_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (kam *kam_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (kam *kam_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kam.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kam.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kde/kde.go b/kde/kde.go -index 8f09636..531080e 100644 ---- a/kde/kde.go -+++ b/kde/kde.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AY", "NY"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Akanapawa Yesu", "Nankuida Yesu"}, -- timezones: map[string]string{"IST": "IST", "JST": "JST", "TMT": "TMT", "WART": "WART", "HNNOMX": "HNNOMX", "WIT": "WIT", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "HNPMX": "HNPMX", "AST": "AST", "CST": "CST", "VET": "VET", "HENOMX": "HENOMX", "GYT": "GYT", "BT": "BT", "PST": "PST", "AEDT": "AEDT", "AWDT": "AWDT", "CLST": "CLST", "ECT": "ECT", "WIB": "WIB", "AWST": "AWST", "MYT": "MYT", "EAT": "EAT", "WAT": "WAT", "HEOG": "HEOG", "WEZ": "WEZ", "MESZ": "MESZ", "JDT": "JDT", "BOT": "BOT", "ACDT": "ACDT", "COST": "COST", "UYT": "UYT", "AEST": "AEST", "HEPM": "HEPM", "HEEG": "HEEG", "COT": "COT", "UYST": "UYST", "EDT": "EDT", "MDT": "MDT", "HNOG": "HNOG", "LHDT": "LHDT", "ChST": "ChST", "WAST": "WAST", "OESZ": "OESZ", "HNCU": "HNCU", "HKST": "HKST", "CHAST": "CHAST", "CLT": "CLT", "HADT": "HADT", "ART": "ART", "WESZ": "WESZ", "ACWDT": "ACWDT", "HECU": "HECU", "HEPMX": "HEPMX", "WITA": "WITA", "HNEG": "HNEG", "AKDT": "AKDT", "SRT": "SRT", "HNPM": "HNPM", "CHADT": "CHADT", "TMST": "TMST", "ACST": "ACST", "ADT": "ADT", "HNT": "HNT", "HAT": "HAT", "CDT": "CDT", "LHST": "LHST", "NZST": "NZST", "CAT": "CAT", "GMT": "GMT", "ARST": "ARST", "MEZ": "MEZ", "NZDT": "NZDT", "SAST": "SAST", "PDT": "PDT", "WARST": "WARST", "SGT": "SGT", "AKST": "AKST", "HAST": "HAST", "ACWST": "ACWST", "HKT": "HKT", "GFT": "GFT", "EST": "EST", "MST": "MST"}, -+ timezones: map[string]string{"AEDT": "AEDT", "HECU": "HECU", "GFT": "GFT", "CDT": "CDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "VET": "VET", "HNCU": "HNCU", "WAST": "WAST", "WART": "WART", "WITA": "WITA", "ARST": "ARST", "CHADT": "CHADT", "WEZ": "WEZ", "AEST": "AEST", "PDT": "PDT", "HEPMX": "HEPMX", "HKT": "HKT", "NZDT": "NZDT", "HEEG": "HEEG", "ACWST": "ACWST", "MEZ": "MEZ", "MYT": "MYT", "HAT": "HAT", "GYT": "GYT", "ADT": "ADT", "HNEG": "HNEG", "HNPMX": "HNPMX", "WESZ": "WESZ", "WAT": "WAT", "OEZ": "OEZ", "HNT": "HNT", "BOT": "BOT", "EDT": "EDT", "AWST": "AWST", "UYST": "UYST", "IST": "IST", "PST": "PST", "BT": "BT", "AKDT": "AKDT", "HNOG": "HNOG", "NZST": "NZST", "ChST": "ChST", "EAT": "EAT", "ACST": "ACST", "WARST": "WARST", "GMT": "GMT", "AWDT": "AWDT", "HNPM": "HNPM", "EST": "EST", "TMST": "TMST", "CLT": "CLT", "MST": "MST", "MDT": "MDT", "ACWDT": "ACWDT", "AKST": "AKST", "COST": "COST", "CAT": "CAT", "AST": "AST", "CHAST": "CHAST", "HEOG": "HEOG", "HKST": "HKST", "ECT": "ECT", "LHST": "LHST", "MESZ": "MESZ", "UYT": "UYT", "∅∅∅": "∅∅∅", "TMT": "TMT", "CST": "CST", "ART": "ART", "ACDT": "ACDT", "JDT": "JDT", "LHDT": "LHDT", "HEPM": "HEPM", "SGT": "SGT", "CLST": "CLST", "WIB": "WIB", "SRT": "SRT", "HAST": "HAST", "HADT": "HADT", "JST": "JST", "OESZ": "OESZ", "WIT": "WIT", "SAST": "SAST", "COT": "COT"}, - } - } -  -diff --git a/kde_TZ/kde_TZ.go b/kde_TZ/kde_TZ.go -index 651593e..2a0e5b4 100644 ---- a/kde_TZ/kde_TZ.go -+++ b/kde_TZ/kde_TZ.go -@@ -10,60 +10,45 @@ import ( - ) -  - type kde_TZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kde_TZ' locale - func New() locales.Translator { - return &kde_TZ{ -- locale: "kde_TZ", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Mwedi Ntandi", "Mwedi wa Pili", "Mwedi wa Tatu", "Mwedi wa Nchechi", "Mwedi wa Nnyano", "Mwedi wa Nnyano na Umo", "Mwedi wa Nnyano na Mivili", "Mwedi wa Nnyano na Mitatu", "Mwedi wa Nnyano na Nchechi", "Mwedi wa Nnyano na Nnyano", "Mwedi wa Nnyano na Nnyano na U", "Mwedi wa Nnyano na Nnyano na M"}, -- daysAbbreviated: []string{"Ll2", "Ll3", "Ll4", "Ll5", "Ll6", "Ll7", "Ll1"}, -- daysNarrow: []string{"2", "3", "4", "5", "6", "7", "1"}, -- daysWide: []string{"Liduva lyapili", "Liduva lyatatu", "Liduva lyanchechi", "Liduva lyannyano", "Liduva lyannyano na linji", "Liduva lyannyano na mavili", "Liduva litandi"}, -- periodsAbbreviated: []string{"Muhi", "Chilo"}, -- periodsWide: []string{"Muhi", "Chilo"}, -- erasAbbreviated: []string{"AY", "NY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Akanapawa Yesu", "Nankuida Yesu"}, -- timezones: map[string]string{"ACDT": "ACDT", "HECU": "HECU", "MYT": "MYT", "CDT": "CDT", "WIB": "WIB", "BT": "BT", "BOT": "BOT", "GFT": "GFT", "JST": "JST", "EDT": "EDT", "PST": "PST", "HAT": "HAT", "AWDT": "AWDT", "HKST": "HKST", "CHADT": "CHADT", "HNNOMX": "HNNOMX", "SRT": "SRT", "NZST": "NZST", "ART": "ART", "HKT": "HKT", "UYT": "UYT", "HNPM": "HNPM", "WART": "WART", "MDT": "MDT", "AWST": "AWST", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "GYT": "GYT", "ADT": "ADT", "WESZ": "WESZ", "NZDT": "NZDT", "OEZ": "OEZ", "EST": "EST", "HENOMX": "HENOMX", "SGT": "SGT", "HNCU": "HNCU", "UYST": "UYST", "HAST": "HAST", "ACWST": "ACWST", "HNEG": "HNEG", "COT": "COT", "HEPM": "HEPM", "MESZ": "MESZ", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WEZ": "WEZ", "LHST": "LHST", "ChST": "ChST", "TMST": "TMST", "ACST": "ACST", "GMT": "GMT", "MST": "MST", "ACWDT": "ACWDT", "CLST": "CLST", "HEEG": "HEEG", "TMT": "TMT", "HEOG": "HEOG", "AEST": "AEST", "WITA": "WITA", "CST": "CST", "HNOG": "HNOG", "COST": "COST", "AKST": "AKST", "WIT": "WIT", "WAT": "WAT", "OESZ": "OESZ", "ARST": "ARST", "IST": "IST", "LHDT": "LHDT", "CHAST": "CHAST", "SAST": "SAST", "JDT": "JDT", "EAT": "EAT", "AST": "AST", "HADT": "HADT", "VET": "VET", "HNT": "HNT", "CAT": "CAT", "AKDT": "AKDT", "WARST": "WARST", "PDT": "PDT", "CLT": "CLT", "WAST": "WAST", "ECT": "ECT"}, -+ locale: "kde_TZ", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHADT": "CHADT", "IST": "IST", "HNCU": "HNCU", "HECU": "HECU", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "HEPM": "HEPM", "EST": "EST", "NZDT": "NZDT", "SRT": "SRT", "MEZ": "MEZ", "COT": "COT", "OESZ": "OESZ", "WARST": "WARST", "HEOG": "HEOG", "HKT": "HKT", "NZST": "NZST", "ChST": "ChST", "HAST": "HAST", "HAT": "HAT", "TMST": "TMST", "WIB": "WIB", "ART": "ART", "WEZ": "WEZ", "AWST": "AWST", "PST": "PST", "PDT": "PDT", "SGT": "SGT", "TMT": "TMT", "CAT": "CAT", "ADT": "ADT", "ACST": "ACST", "CLT": "CLT", "CST": "CST", "ECT": "ECT", "HEPMX": "HEPMX", "EDT": "EDT", "HKST": "HKST", "BT": "BT", "WESZ": "WESZ", "WAST": "WAST", "BOT": "BOT", "UYST": "UYST", "HNT": "HNT", "GYT": "GYT", "GFT": "GFT", "WITA": "WITA", "MDT": "MDT", "AST": "AST", "HEEG": "HEEG", "HNPMX": "HNPMX", "AKST": "AKST", "AKDT": "AKDT", "SAST": "SAST", "HNEG": "HNEG", "CHAST": "CHAST", "UYT": "UYT", "VET": "VET", "MESZ": "MESZ", "AWDT": "AWDT", "JST": "JST", "HNOG": "HNOG", "HENOMX": "HENOMX", "LHST": "LHST", "MYT": "MYT", "AEDT": "AEDT", "WIT": "WIT", "CLST": "CLST", "∅∅∅": "∅∅∅", "MST": "MST", "EAT": "EAT", "WART": "WART", "ARST": "ARST", "LHDT": "LHDT", "ACWST": "ACWST", "AEST": "AEST", "ACWDT": "ACWDT", "WAT": "WAT", "OEZ": "OEZ", "COST": "COST", "CDT": "CDT", "GMT": "GMT", "HADT": "HADT", "JDT": "JDT"}, - } - } -  -@@ -109,7 +94,7 @@ func (kde *kde_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kde *kde_TZ) MonthsAbbreviated() []string { -- return kde.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (kde *kde_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kde *kde_TZ) MonthsNarrow() []string { -- return kde.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (kde *kde_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kde *kde_TZ) MonthsWide() []string { -- return kde.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (kde *kde_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kde.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kde.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kde.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, kde.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kde.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kde_TZ' -@@ -247,68 +183,7 @@ func (kde *kde_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kde.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kde.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kde.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, kde.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kde.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, kde.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kde_TZ' -@@ -316,27 +191,6 @@ func (kde *kde_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (kde *kde_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kde.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (kde *kde_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kde.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (kde *kde_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kde.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kde.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (kde *kde_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (kde *kde_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (kde *kde_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (kde *kde_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kde.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kde.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kea/kea.go b/kea/kea.go -index 9ac927a..3c3cdcb 100644 ---- a/kea/kea.go -+++ b/kea/kea.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AK", "DK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Antis di Kristu", "Dispos di Kristu"}, -- timezones: map[string]string{"WAST": "Ora di Verão di Afrika Osidental", "CHADT": "CHADT", "CDT": "Ora Sentral di Verãu", "HKT": "HKT", "AEDT": "Ora di Verãu di Australia Oriental", "JST": "JST", "LHDT": "LHDT", "ECT": "ECT", "SGT": "SGT", "EST": "Ora Oriental Padrãu", "WEZ": "Ora Padrãu di Europa Osidental", "NZDT": "NZDT", "ACDT": "Ora di Verãu di Australia Sentral", "AST": "Ora Padrãu di Atlantiku", "ARST": "ARST", "COST": "COST", "ACWST": "Ora Padrãu di Australia Sentru-Osidental", "JDT": "JDT", "TMT": "TMT", "ACWDT": "Ora di Verãu di Australia Sentru-Osidental", "ART": "ART", "MESZ": "Ora di Verãu di Europa Sentral", "OESZ": "Ora di Verãu di Europa Oriental", "WARST": "WARST", "EDT": "Ora Oriental di Verãu", "ADT": "Ora di Verãu di Atlantiku", "HADT": "HADT", "HNEG": "HNEG", "WAT": "Ora Padrãu di Afrika Osidental", "AKDT": "AKDT", "HKST": "HKST", "WITA": "WITA", "AWST": "Ora Padrãu di Australia Osidental", "CLT": "CLT", "HEEG": "HEEG", "HNPMX": "HNPMX", "UYT": "UYT", "PST": "Ora di Pasifiku Padrãu", "WESZ": "Ora di Verãu di Europa Osidental", "HEPM": "HEPM", "MDT": "MDT", "VET": "VET", "CHAST": "CHAST", "GFT": "GFT", "CLST": "CLST", "OEZ": "Ora Padrãu di Europa Oriental", "COT": "COT", "MYT": "MYT", "HNOG": "HNOG", "PDT": "Ora di Pasifiku di Verãu", "AWDT": "Ora di Verãu di Australia Osidental", "TMST": "TMST", "ChST": "ChST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AKST": "AKST", "CST": "Ora Sentral Padrãu", "UYST": "UYST", "HEOG": "HEOG", "AEST": "Ora Padrãu di Australia Oriental", "SAST": "Ora di Sul di Afrika", "HECU": "HECU", "GMT": "GMT", "WIT": "WIT", "SRT": "SRT", "HAT": "HAT", "BT": "BT", "LHST": "LHST", "ACST": "Ora Padrãu di Australia Sentral", "WART": "WART", "MST": "MST", "GYT": "GYT", "HAST": "HAST", "EAT": "Ora di Afrika Oriental", "HEPMX": "HEPMX", "HNPM": "HNPM", "NZST": "NZST", "CAT": "Ora di Afrika Sentral", "HNCU": "HNCU", "MEZ": "Ora Padrãu di Europa Sentral", "IST": "IST", "BOT": "BOT", "∅∅∅": "∅∅∅", "WIB": "WIB", "HNT": "HNT"}, -+ timezones: map[string]string{"ACWDT": "Ora di Verãu di Australia Sentru-Osidental", "HEPMX": "HEPMX", "EDT": "Ora Oriental di Verãu", "HENOMX": "HENOMX", "AWST": "Ora Padrãu di Australia Osidental", "LHDT": "LHDT", "JST": "JST", "PST": "Ora di Pasifiku Padrãu", "ChST": "ChST", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "OEZ": "Ora Padrãu di Europa Oriental", "CLST": "CLST", "SRT": "SRT", "WEZ": "Ora Padrãu di Europa Osidental", "COT": "COT", "ECT": "ECT", "ART": "ART", "OESZ": "Ora di Verãu di Europa Oriental", "EST": "Ora Oriental Padrãu", "WIB": "WIB", "WAT": "Ora Padrãu di Afrika Osidental", "AKDT": "AKDT", "CAT": "Ora di Afrika Sentral", "CLT": "CLT", "WITA": "WITA", "ACST": "Ora Padrãu di Australia Sentral", "PDT": "Ora di Pasifiku di Verãu", "AKST": "AKST", "SAST": "Ora di Sul di Afrika", "COST": "COST", "CST": "Ora Sentral Padrãu", "MDT": "MDT", "ACDT": "Ora di Verãu di Australia Sentral", "MYT": "MYT", "HEPM": "HEPM", "BT": "BT", "GFT": "GFT", "MEZ": "Ora Padrãu di Europa Sentral", "LHST": "LHST", "HNT": "HNT", "WIT": "WIT", "ARST": "ARST", "HNOG": "HNOG", "HKST": "HKST", "CDT": "Ora Sentral di Verãu", "AST": "Ora Padrãu di Atlantiku", "NZST": "NZST", "ACWST": "Ora Padrãu di Australia Sentru-Osidental", "WESZ": "Ora di Verãu di Europa Osidental", "SGT": "SGT", "HECU": "HECU", "HNPMX": "HNPMX", "WARST": "WARST", "GYT": "GYT", "MST": "MST", "MESZ": "Ora di Verãu di Europa Sentral", "HEEG": "HEEG", "UYST": "UYST", "IST": "IST", "HNCU": "HNCU", "CHADT": "CHADT", "UYT": "UYT", "AEST": "Ora Padrãu di Australia Oriental", "TMT": "TMT", "ADT": "Ora di Verãu di Atlantiku", "NZDT": "NZDT", "GMT": "GMT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "AEDT": "Ora di Verãu di Australia Oriental", "TMST": "TMST", "HAT": "HAT", "BOT": "BOT", "EAT": "Ora di Afrika Oriental", "VET": "VET", "HAST": "HAST", "HADT": "HADT", "HKT": "HKT", "AWDT": "Ora di Verãu di Australia Osidental", "JDT": "JDT", "WAST": "Ora di Verão di Afrika Osidental", "WART": "WART", "HEOG": "HEOG"}, - } - } -  -diff --git a/kea_CV/kea_CV.go b/kea_CV/kea_CV.go -index 7c4c9f1..5b4d78b 100644 ---- a/kea_CV/kea_CV.go -+++ b/kea_CV/kea_CV.go -@@ -10,70 +10,45 @@ import ( - ) -  - type kea_CV struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kea_CV' locale - func New() locales.Translator { - return &kea_CV{ -- locale: "kea_CV", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Otu", "Nuv", "Diz"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janeru", "Febreru", "Marsu", "Abril", "Maiu", "Junhu", "Julhu", "Agostu", "Setenbru", "Otubru", "Nuvenbru", "Dizenbru"}, -- daysAbbreviated: []string{"dum", "sig", "ter", "kua", "kin", "ses", "sab"}, -- daysNarrow: []string{"D", "S", "T", "K", "K", "S", "S"}, -- daysShort: []string{"du", "si", "te", "ku", "ki", "se", "sa"}, -- daysWide: []string{"dumingu", "sigunda-fera", "tersa-fera", "kuarta-fera", "kinta-fera", "sesta-fera", "sabadu"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"am", "pm"}, -- erasAbbreviated: []string{"AK", "DK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Antis di Kristu", "Dispos di Kristu"}, -- timezones: map[string]string{"PST": "Ora di Pasifiku Padrãu", "HADT": "HADT", "SRT": "SRT", "VET": "VET", "WIT": "WIT", "HNPM": "HNPM", "SAST": "Ora di Sul di Afrika", "COT": "COT", "HNPMX": "HNPMX", "WAT": "Ora Padrãu di Afrika Osidental", "WART": "WART", "HAST": "HAST", "ACWDT": "Ora di Verãu di Australia Sentru-Osidental", "AEDT": "Ora di Verãu di Australia Oriental", "IST": "IST", "TMT": "TMT", "∅∅∅": "∅∅∅", "MDT": "MDT", "AKST": "AKST", "AST": "Ora Padrãu di Atlantiku", "HNT": "HNT", "NZST": "NZST", "HNCU": "HNCU", "EDT": "Ora Oriental di Verãu", "MST": "MST", "HKT": "HKT", "GFT": "GFT", "ACST": "Ora Padrãu di Australia Sentral", "WITA": "WITA", "HEPM": "HEPM", "MESZ": "Ora di Verãu di Europa Sentral", "EAT": "Ora di Afrika Oriental", "WESZ": "Ora di Verãu di Europa Osidental", "WAST": "Ora di Verão di Afrika Osidental", "BT": "BT", "HNOG": "HNOG", "HAT": "HAT", "AEST": "Ora Padrãu di Australia Oriental", "JST": "JST", "ChST": "ChST", "TMST": "TMST", "OESZ": "Ora di Verãu di Europa Oriental", "ECT": "ECT", "GMT": "GMT", "GYT": "GYT", "WIB": "WIB", "PDT": "Ora di Pasifiku di Verãu", "ACDT": "Ora di Verãu di Australia Sentral", "CAT": "Ora di Afrika Sentral", "CHAST": "CHAST", "CHADT": "CHADT", "HENOMX": "HENOMX", "EST": "Ora Oriental Padrãu", "NZDT": "NZDT", "CLT": "CLT", "WARST": "WARST", "HNNOMX": "HNNOMX", "HECU": "HECU", "AKDT": "AKDT", "HEOG": "HEOG", "ART": "ART", "AWST": "Ora Padrãu di Australia Osidental", "AWDT": "Ora di Verãu di Australia Osidental", "HNEG": "HNEG", "COST": "COST", "LHST": "LHST", "HKST": "HKST", "CLST": "CLST", "HEPMX": "HEPMX", "ADT": "Ora di Verãu di Atlantiku", "JDT": "JDT", "SGT": "SGT", "WEZ": "Ora Padrãu di Europa Osidental", "CDT": "Ora Sentral di Verãu", "UYT": "UYT", "CST": "Ora Sentral Padrãu", "MYT": "MYT", "UYST": "UYST", "ACWST": "Ora Padrãu di Australia Sentru-Osidental", "ARST": "ARST", "BOT": "BOT", "HEEG": "HEEG", "OEZ": "Ora Padrãu di Europa Oriental", "MEZ": "Ora Padrãu di Europa Sentral", "LHDT": "LHDT"}, -+ locale: "kea_CV", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "WIT": "WIT", "HAT": "HAT", "HNOG": "HNOG", "CLT": "CLT", "ChST": "ChST", "HEEG": "HEEG", "LHST": "LHST", "MST": "MST", "NZST": "NZST", "HECU": "HECU", "CLST": "CLST", "AST": "AST", "BT": "BT", "SGT": "SGT", "WART": "WART", "COT": "COT", "HEOG": "HEOG", "JDT": "JDT", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "MESZ": "MESZ", "WAST": "WAST", "GMT": "GMT", "ACST": "ACST", "HNEG": "HNEG", "GFT": "GFT", "OEZ": "OEZ", "HADT": "HADT", "UYT": "UYT", "VET": "VET", "CHADT": "CHADT", "MDT": "MDT", "HENOMX": "HENOMX", "CHAST": "CHAST", "EST": "EST", "HEPM": "HEPM", "AEST": "AEST", "IST": "IST", "WITA": "WITA", "MYT": "MYT", "ACWDT": "ACWDT", "WESZ": "WESZ", "EAT": "EAT", "HNT": "HNT", "HKST": "HKST", "TMT": "TMT", "TMST": "TMST", "ECT": "ECT", "SRT": "SRT", "HAST": "HAST", "HNCU": "HNCU", "WEZ": "WEZ", "WAT": "WAT", "OESZ": "OESZ", "WARST": "WARST", "ACDT": "ACDT", "PDT": "PDT", "ACWST": "ACWST", "ADT": "ADT", "COST": "COST", "AKDT": "AKDT", "SAST": "SAST", "NZDT": "NZDT", "CDT": "CDT", "AKST": "AKST", "HNPM": "HNPM", "AEDT": "AEDT", "HKT": "HKT", "WIB": "WIB", "ARST": "ARST", "BOT": "BOT", "AWST": "AWST", "AWDT": "AWDT", "UYST": "UYST", "CAT": "CAT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "JST": "JST", "HNPMX": "HNPMX", "GYT": "GYT", "EDT": "EDT", "CST": "CST", "ART": "ART", "PST": "PST"}, - } - } -  -@@ -119,7 +94,7 @@ func (kea *kea_CV) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kea *kea_CV) MonthsAbbreviated() []string { -- return kea.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +104,7 @@ func (kea *kea_CV) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kea *kea_CV) MonthsNarrow() []string { -- return kea.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +114,7 @@ func (kea *kea_CV) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kea *kea_CV) MonthsWide() []string { -- return kea.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,75 +160,13 @@ func (kea *kea_CV) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'kea_CV' and handles both Whole and Real numbers based on 'v' - func (kea *kea_CV) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kea.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kea.group) - 1; j >= 0; j-- { -- b = append(b, kea.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kea.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'kea_CV' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (kea *kea_CV) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kea.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kea.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, kea.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'kea_CV' -@@ -261,58 +174,7 @@ func (kea *kea_CV) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kea.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kea.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kea.group) - 1; j >= 0; j-- { -- b = append(b, kea.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kea.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kea.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, kea.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kea_CV' -@@ -321,65 +183,7 @@ func (kea *kea_CV) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kea.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kea.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kea.group) - 1; j >= 0; j-- { -- b = append(b, kea.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, kea.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kea.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, kea.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, kea.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kea_CV' -@@ -387,17 +191,6 @@ func (kea *kea_CV) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -406,17 +199,6 @@ func (kea *kea_CV) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kea.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,19 +207,6 @@ func (kea *kea_CV) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x69}...) -- b = append(b, []byte{0x20}...) -- b = append(b, kea.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x69}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,21 +215,6 @@ func (kea *kea_CV) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kea.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x69}...) -- b = append(b, []byte{0x20}...) -- b = append(b, kea.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x69}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +223,6 @@ func (kea *kea_CV) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -490,26 +231,6 @@ func (kea *kea_CV) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -518,30 +239,6 @@ func (kea *kea_CV) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -550,34 +247,5 @@ func (kea *kea_CV) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kea.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kea.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/khq/khq.go b/khq/khq.go -index 81399b3..4d29dad 100644 ---- a/khq/khq.go -+++ b/khq/khq.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"IJ", "IZ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Isaa jine", "Isaa jamanoo"}, -- timezones: map[string]string{"PDT": "PDT", "HEEG": "HEEG", "ECT": "ECT", "WAT": "WAT", "EST": "EST", "MDT": "MDT", "HEOG": "HEOG", "AST": "AST", "ACWDT": "ACWDT", "HKST": "HKST", "MESZ": "MESZ", "CHADT": "CHADT", "WAST": "WAST", "UYST": "UYST", "AKDT": "AKDT", "BT": "BT", "HNT": "HNT", "HAT": "HAT", "AWDT": "AWDT", "LHDT": "LHDT", "TMST": "TMST", "ACDT": "ACDT", "COT": "COT", "HNPMX": "HNPMX", "GYT": "GYT", "AEDT": "AEDT", "AWST": "AWST", "CHAST": "CHAST", "SGT": "SGT", "EDT": "EDT", "HAST": "HAST", "HKT": "HKT", "∅∅∅": "∅∅∅", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HEPM": "HEPM", "MEZ": "MEZ", "NZDT": "NZDT", "IST": "IST", "CLT": "CLT", "EAT": "EAT", "TMT": "TMT", "CAT": "CAT", "UYT": "UYT", "ART": "ART", "PST": "PST", "WITA": "WITA", "NZST": "NZST", "GFT": "GFT", "WART": "WART", "CST": "CST", "VET": "VET", "ARST": "ARST", "WEZ": "WEZ", "WARST": "WARST", "WIT": "WIT", "SRT": "SRT", "WESZ": "WESZ", "HEPMX": "HEPMX", "CDT": "CDT", "ACWST": "ACWST", "AEST": "AEST", "LHST": "LHST", "CLST": "CLST", "BOT": "BOT", "MYT": "MYT", "HNOG": "HNOG", "JDT": "JDT", "HNEG": "HNEG", "OEZ": "OEZ", "OESZ": "OESZ", "COST": "COST", "HECU": "HECU", "WIB": "WIB", "HADT": "HADT", "JST": "JST", "HENOMX": "HENOMX", "GMT": "GMT", "MST": "MST", "ADT": "ADT", "AKST": "AKST", "HNPM": "HNPM", "SAST": "SAST", "ChST": "ChST", "ACST": "ACST"}, -+ timezones: map[string]string{"CLST": "CLST", "NZDT": "NZDT", "LHDT": "LHDT", "PDT": "PDT", "BT": "BT", "SGT": "SGT", "OESZ": "OESZ", "CLT": "CLT", "HAST": "HAST", "MESZ": "MESZ", "HNEG": "HNEG", "PST": "PST", "HNPMX": "HNPMX", "MDT": "MDT", "AEST": "AEST", "IST": "IST", "ART": "ART", "HEOG": "HEOG", "EAT": "EAT", "LHST": "LHST", "HECU": "HECU", "GYT": "GYT", "HKT": "HKT", "WITA": "WITA", "WEZ": "WEZ", "WAT": "WAT", "HNOG": "HNOG", "EST": "EST", "HENOMX": "HENOMX", "GMT": "GMT", "BOT": "BOT", "ACDT": "ACDT", "HEEG": "HEEG", "HAT": "HAT", "WARST": "WARST", "WIT": "WIT", "WIB": "WIB", "CST": "CST", "AST": "AST", "ADT": "ADT", "ChST": "ChST", "HNNOMX": "HNNOMX", "AWST": "AWST", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "UYST": "UYST", "CHADT": "CHADT", "OEZ": "OEZ", "JDT": "JDT", "JST": "JST", "AEDT": "AEDT", "VET": "VET", "HNCU": "HNCU", "WAST": "WAST", "GFT": "GFT", "TMT": "TMT", "CAT": "CAT", "ARST": "ARST", "HNT": "HNT", "ECT": "ECT", "MEZ": "MEZ", "ACST": "ACST", "HNPM": "HNPM", "CHAST": "CHAST", "WESZ": "WESZ", "EDT": "EDT", "TMST": "TMST", "SRT": "SRT", "MST": "MST", "UYT": "UYT", "ACWDT": "ACWDT", "AKST": "AKST", "WART": "WART", "SAST": "SAST", "COT": "COT", "HEPM": "HEPM", "HEPMX": "HEPMX", "HADT": "HADT", "NZST": "NZST", "MYT": "MYT", "AKDT": "AKDT", "COST": "COST", "HKST": "HKST", "CDT": "CDT"}, - } - } -  -diff --git a/khq_ML/khq_ML.go b/khq_ML/khq_ML.go -index 72b63c2..5551067 100644 ---- a/khq_ML/khq_ML.go -+++ b/khq_ML/khq_ML.go -@@ -42,25 +42,13 @@ type khq_ML struct { - // New returns a new instance of translator for the 'khq_ML' locale - func New() locales.Translator { - return &khq_ML{ -- locale: "khq_ML", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Žan", "Fee", "Mar", "Awi", "Me", "Žuw", "Žuy", "Ut", "Sek", "Okt", "Noo", "Dee"}, -- monthsNarrow: []string{"", "Ž", "F", "M", "A", "M", "Ž", "Ž", "U", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Žanwiye", "Feewiriye", "Marsi", "Awiril", "Me", "Žuweŋ", "Žuyye", "Ut", "Sektanbur", "Oktoobur", "Noowanbur", "Deesanbur"}, -- daysAbbreviated: []string{"Alh", "Ati", "Ata", "Ala", "Alm", "Alj", "Ass"}, -- daysNarrow: []string{"H", "T", "T", "L", "L", "L", "S"}, -- daysWide: []string{"Alhadi", "Atini", "Atalata", "Alarba", "Alhamiisa", "Aljuma", "Assabdu"}, -- periodsAbbreviated: []string{"Adduha", "Aluula"}, -- periodsWide: []string{"Adduha", "Aluula"}, -- erasAbbreviated: []string{"IJ", "IZ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Isaa jine", "Isaa jamanoo"}, -- timezones: map[string]string{"CDT": "CDT", "AEDT": "AEDT", "HKT": "HKT", "ChST": "ChST", "ACDT": "ACDT", "WARST": "WARST", "UYT": "UYT", "HNCU": "HNCU", "UYST": "UYST", "AWST": "AWST", "ACST": "ACST", "AST": "AST", "HEOG": "HEOG", "JST": "JST", "JDT": "JDT", "MST": "MST", "MDT": "MDT", "ADT": "ADT", "PDT": "PDT", "HKST": "HKST", "∅∅∅": "∅∅∅", "MYT": "MYT", "CLT": "CLT", "TMT": "TMT", "HNPMX": "HNPMX", "WESZ": "WESZ", "ART": "ART", "MEZ": "MEZ", "CLST": "CLST", "CAT": "CAT", "OESZ": "OESZ", "SRT": "SRT", "HNT": "HNT", "NZDT": "NZDT", "WAT": "WAT", "COT": "COT", "GMT": "GMT", "HECU": "HECU", "WIB": "WIB", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "IST": "IST", "BOT": "BOT", "WAST": "WAST", "WIT": "WIT", "PST": "PST", "HEPMX": "HEPMX", "AKDT": "AKDT", "AEST": "AEST", "AWDT": "AWDT", "LHST": "LHST", "SAST": "SAST", "TMST": "TMST", "HENOMX": "HENOMX", "HAT": "HAT", "ARST": "ARST", "CHADT": "CHADT", "EAT": "EAT", "ECT": "ECT", "HADT": "HADT", "ACWST": "ACWST", "HNPM": "HNPM", "NZST": "NZST", "COST": "COST", "EDT": "EDT", "GYT": "GYT", "HNOG": "HNOG", "CST": "CST", "MESZ": "MESZ", "LHDT": "LHDT", "HNEG": "HNEG", "HEEG": "HEEG", "GFT": "GFT", "AKST": "AKST", "WEZ": "WEZ", "WITA": "WITA", "OEZ": "OEZ", "WART": "WART", "EST": "EST", "VET": "VET", "BT": "BT", "CHAST": "CHAST", "SGT": "SGT", "HAST": "HAST", "ACWDT": "ACWDT"}, -+ locale: "khq_ML", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"IST": "IST", "PDT": "PDT", "ACWST": "ACWST", "AEST": "AEST", "CST": "CST", "HNNOMX": "HNNOMX", "MYT": "MYT", "CHAST": "CHAST", "WAST": "WAST", "MST": "MST", "OEZ": "OEZ", "CLST": "CLST", "EAT": "EAT", "MEZ": "MEZ", "PST": "PST", "WARST": "WARST", "WITA": "WITA", "MDT": "MDT", "ChST": "ChST", "WESZ": "WESZ", "WART": "WART", "EST": "EST", "TMST": "TMST", "ECT": "ECT", "SRT": "SRT", "HNEG": "HNEG", "HEEG": "HEEG", "AEDT": "AEDT", "WAT": "WAT", "TMT": "TMT", "ARST": "ARST", "BOT": "BOT", "JST": "JST", "OESZ": "OESZ", "HEOG": "HEOG", "EDT": "EDT", "CLT": "CLT", "LHDT": "LHDT", "UYT": "UYT", "HAT": "HAT", "HADT": "HADT", "LHST": "LHST", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "HNCU": "HNCU", "HNT": "HNT", "GMT": "GMT", "BT": "BT", "SGT": "SGT", "HEPMX": "HEPMX", "AKST": "AKST", "GFT": "GFT", "HNOG": "HNOG", "ACST": "ACST", "UYST": "UYST", "WIT": "WIT", "GYT": "GYT", "NZST": "NZST", "WIB": "WIB", "HNPM": "HNPM", "HEPM": "HEPM", "JDT": "JDT", "HKT": "HKT", "CAT": "CAT", "CDT": "CDT", "ART": "ART", "ACDT": "ACDT", "HENOMX": "HENOMX", "HECU": "HECU", "COST": "COST", "AWST": "AWST", "HNPMX": "HNPMX", "AKDT": "AKDT", "NZDT": "NZDT", "ADT": "ADT", "MESZ": "MESZ", "CHADT": "CHADT", "SAST": "SAST", "COT": "COT", "AST": "AST", "HAST": "HAST", "AWDT": "AWDT", "ACWDT": "ACWDT", "VET": "VET", "HKST": "HKST"}, - } - } -  -@@ -106,7 +94,7 @@ func (khq *khq_ML) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (khq *khq_ML) MonthsAbbreviated() []string { -- return khq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -116,7 +104,7 @@ func (khq *khq_ML) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (khq *khq_ML) MonthsNarrow() []string { -- return khq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -126,7 +114,7 @@ func (khq *khq_ML) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (khq *khq_ML) MonthsWide() []string { -- return khq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,56 +174,7 @@ func (khq *khq_ML) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := khq.currencies[currency] -- l := len(s) + len(symbol) + 0 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, khq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(khq.group) - 1; j >= 0; j-- { -- b = append(b, khq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, khq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, khq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'khq_ML' -@@ -244,63 +183,7 @@ func (khq *khq_ML) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := khq.currencies[currency] -- l := len(s) + len(symbol) + 0 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, khq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(khq.group) - 1; j >= 0; j-- { -- b = append(b, khq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, khq.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, khq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'khq_ML' -@@ -308,17 +191,6 @@ func (khq *khq_ML) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -327,17 +199,6 @@ func (khq *khq_ML) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, khq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -346,17 +207,6 @@ func (khq *khq_ML) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, khq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -365,19 +215,6 @@ func (khq *khq_ML) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, khq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, khq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -386,19 +223,6 @@ func (khq *khq_ML) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -407,26 +231,6 @@ func (khq *khq_ML) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -435,30 +239,6 @@ func (khq *khq_ML) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -467,34 +247,5 @@ func (khq *khq_ML) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, khq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := khq.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ki/ki.go b/ki/ki.go -index 7160be6..7cfda1f 100644 ---- a/ki/ki.go -+++ b/ki/ki.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"MK", "TK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Mbere ya Kristo", "Thutha wa Kristo"}, -- timezones: map[string]string{"MDT": "MDT", "HEPM": "HEPM", "IST": "IST", "HEEG": "HEEG", "EAT": "EAT", "COST": "COST", "ADT": "ADT", "PST": "PST", "HEOG": "HEOG", "JST": "JST", "HENOMX": "HENOMX", "EDT": "EDT", "HEPMX": "HEPMX", "WEZ": "WEZ", "LHST": "LHST", "GFT": "GFT", "WAST": "WAST", "OEZ": "OEZ", "OESZ": "OESZ", "WARST": "WARST", "AST": "AST", "COT": "COT", "BT": "BT", "AEDT": "AEDT", "JDT": "JDT", "HNPMX": "HNPMX", "CAT": "CAT", "AKDT": "AKDT", "CST": "CST", "HADT": "HADT", "SRT": "SRT", "ACWDT": "ACWDT", "WITA": "WITA", "HNPM": "HNPM", "HAT": "HAT", "HECU": "HECU", "BOT": "BOT", "AKST": "AKST", "VET": "VET", "WESZ": "WESZ", "ARST": "ARST", "NZST": "NZST", "NZDT": "NZDT", "ChST": "ChST", "ECT": "ECT", "SGT": "SGT", "WIB": "WIB", "AWDT": "AWDT", "EST": "EST", "HNT": "HNT", "HNOG": "HNOG", "CHAST": "CHAST", "MYT": "MYT", "CLST": "CLST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "GMT": "GMT", "AEST": "AEST", "HKT": "HKT", "CHADT": "CHADT", "SAST": "SAST", "WAT": "WAT", "UYST": "UYST", "ART": "ART", "MESZ": "MESZ", "ACST": "ACST", "GYT": "GYT", "CLT": "CLT", "HNCU": "HNCU", "MST": "MST", "HAST": "HAST", "PDT": "PDT", "LHDT": "LHDT", "TMT": "TMT", "TMST": "TMST", "WART": "WART", "UYT": "UYT", "CDT": "CDT", "WIT": "WIT", "ACWST": "ACWST", "AWST": "AWST", "HKST": "HKST", "MEZ": "MEZ"}, -+ timezones: map[string]string{"ART": "ART", "HEPMX": "HEPMX", "WAT": "WAT", "WARST": "WARST", "WIT": "WIT", "WIB": "WIB", "CHADT": "CHADT", "SGT": "SGT", "HKST": "HKST", "JDT": "JDT", "PST": "PST", "BT": "BT", "AEST": "AEST", "HAT": "HAT", "ACDT": "ACDT", "UYST": "UYST", "HECU": "HECU", "AKST": "AKST", "EDT": "EDT", "ChST": "ChST", "BOT": "BOT", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "ACWDT": "ACWDT", "NZST": "NZST", "IST": "IST", "OEZ": "OEZ", "TMT": "TMT", "HEPM": "HEPM", "HNPMX": "HNPMX", "HNOG": "HNOG", "CDT": "CDT", "SRT": "SRT", "EAT": "EAT", "HAST": "HAST", "LHST": "LHST", "SAST": "SAST", "GYT": "GYT", "COT": "COT", "NZDT": "NZDT", "MESZ": "MESZ", "ACST": "ACST", "AKDT": "AKDT", "HNT": "HNT", "COST": "COST", "MYT": "MYT", "PDT": "PDT", "OESZ": "OESZ", "EST": "EST", "CAT": "CAT", "HNEG": "HNEG", "HNPM": "HNPM", "WESZ": "WESZ", "CLST": "CLST", "WITA": "WITA", "TMST": "TMST", "ARST": "ARST", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "HNCU": "HNCU", "WAST": "WAST", "HENOMX": "HENOMX", "JST": "JST", "WART": "WART", "CST": "CST", "MST": "MST", "AST": "AST", "HADT": "HADT", "HEEG": "HEEG", "ADT": "ADT", "GMT": "GMT", "CHAST": "CHAST", "AWST": "AWST", "LHDT": "LHDT", "WEZ": "WEZ", "VET": "VET", "HEOG": "HEOG", "MDT": "MDT", "ECT": "ECT", "AWDT": "AWDT", "GFT": "GFT", "HKT": "HKT", "MEZ": "MEZ", "UYT": "UYT", "CLT": "CLT"}, - } - } -  -diff --git a/ki_KE/ki_KE.go b/ki_KE/ki_KE.go -index f9ee453..74d127c 100644 ---- a/ki_KE/ki_KE.go -+++ b/ki_KE/ki_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type ki_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ki_KE' locale - func New() locales.Translator { - return &ki_KE{ -- locale: "ki_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "JEN", "WKR", "WGT", "WKN", "WTN", "WTD", "WMJ", "WNN", "WKD", "WIK", "WMW", "DIT"}, -- monthsNarrow: []string{"", "J", "K", "G", "K", "G", "G", "M", "K", "K", "I", "I", "D"}, -- monthsWide: []string{"", "Njenuarĩ", "Mwere wa kerĩ", "Mwere wa gatatũ", "Mwere wa kana", "Mwere wa gatano", "Mwere wa gatandatũ", "Mwere wa mũgwanja", "Mwere wa kanana", "Mwere wa kenda", "Mwere wa ikũmi", "Mwere wa ikũmi na ũmwe", "Ndithemba"}, -- daysAbbreviated: []string{"KMA", "NTT", "NMN", "NMT", "ART", "NMA", "NMM"}, -- daysNarrow: []string{"K", "N", "N", "N", "A", "N", "N"}, -- daysWide: []string{"Kiumia", "Njumatatũ", "Njumaine", "Njumatana", "Aramithi", "Njumaa", "Njumamothi"}, -- periodsAbbreviated: []string{"Kiroko", "Hwaĩ-inĩ"}, -- periodsWide: []string{"Kiroko", "Hwaĩ-inĩ"}, -- erasAbbreviated: []string{"MK", "TK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Mbere ya Kristo", "Thutha wa Kristo"}, -- timezones: map[string]string{"PST": "PST", "HEPM": "HEPM", "HEPMX": "HEPMX", "WIT": "WIT", "HAST": "HAST", "HAT": "HAT", "CLT": "CLT", "∅∅∅": "∅∅∅", "COT": "COT", "GMT": "GMT", "PDT": "PDT", "HENOMX": "HENOMX", "HECU": "HECU", "HNPMX": "HNPMX", "ACWDT": "ACWDT", "IST": "IST", "HNEG": "HNEG", "WAT": "WAT", "COST": "COST", "HEOG": "HEOG", "WAST": "WAST", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "WART": "WART", "CDT": "CDT", "AST": "AST", "HADT": "HADT", "AKDT": "AKDT", "WIB": "WIB", "BT": "BT", "ART": "ART", "AEST": "AEST", "EAT": "EAT", "ECT": "ECT", "WARST": "WARST", "AKST": "AKST", "SAST": "SAST", "JST": "JST", "HEEG": "HEEG", "ACWST": "ACWST", "CHAST": "CHAST", "MEZ": "MEZ", "BOT": "BOT", "ACDT": "ACDT", "SGT": "SGT", "CST": "CST", "WEZ": "WEZ", "LHST": "LHST", "CHADT": "CHADT", "MESZ": "MESZ", "ChST": "ChST", "MST": "MST", "EST": "EST", "ADT": "ADT", "HKT": "HKT", "OEZ": "OEZ", "CAT": "CAT", "HNCU": "HNCU", "UYST": "UYST", "ARST": "ARST", "HNOG": "HNOG", "TMT": "TMT", "MYT": "MYT", "UYT": "UYT", "WESZ": "WESZ", "AWDT": "AWDT", "AEDT": "AEDT", "NZDT": "NZDT", "TMST": "TMST", "ACST": "ACST", "SRT": "SRT", "AWST": "AWST", "LHDT": "LHDT", "OESZ": "OESZ", "MDT": "MDT", "GYT": "GYT", "VET": "VET", "NZST": "NZST", "GFT": "GFT", "HNT": "HNT", "HKST": "HKST", "WITA": "WITA", "CLST": "CLST", "JDT": "JDT", "EDT": "EDT"}, -+ locale: "ki_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AST": "AST", "SRT": "SRT", "EAT": "EAT", "AKST": "AKST", "WAST": "WAST", "EDT": "EDT", "MST": "MST", "HNPM": "HNPM", "HNEG": "HNEG", "MEZ": "MEZ", "BT": "BT", "AEST": "AEST", "VET": "VET", "CAT": "CAT", "WIB": "WIB", "PDT": "PDT", "UYT": "UYT", "TMT": "TMT", "PST": "PST", "NZST": "NZST", "HAST": "HAST", "MESZ": "MESZ", "OEZ": "OEZ", "HNT": "HNT", "LHDT": "LHDT", "AWST": "AWST", "HEPMX": "HEPMX", "WESZ": "WESZ", "TMST": "TMST", "EST": "EST", "ECT": "ECT", "ACWST": "ACWST", "COT": "COT", "MDT": "MDT", "ACST": "ACST", "AEDT": "AEDT", "WAT": "WAT", "HNOG": "HNOG", "ARST": "ARST", "CST": "CST", "ADT": "ADT", "MYT": "MYT", "IST": "IST", "WEZ": "WEZ", "OESZ": "OESZ", "WARST": "WARST", "HENOMX": "HENOMX", "JST": "JST", "CHAST": "CHAST", "GYT": "GYT", "HKT": "HKT", "SAST": "SAST", "CDT": "CDT", "ART": "ART", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "WIT": "WIT", "HAT": "HAT", "CLT": "CLT", "WITA": "WITA", "CHADT": "CHADT", "SGT": "SGT", "GFT": "GFT", "HEOG": "HEOG", "LHST": "LHST", "AWDT": "AWDT", "UYST": "UYST", "HECU": "HECU", "HNPMX": "HNPMX", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "HKST": "HKST", "JDT": "JDT", "ChST": "ChST", "HEEG": "HEEG", "CLST": "CLST", "HADT": "HADT", "HEPM": "HEPM", "WART": "WART", "COST": "COST", "BOT": "BOT", "ACDT": "ACDT", "HNCU": "HNCU", "NZDT": "NZDT", "GMT": "GMT"}, - } - } -  -@@ -109,7 +94,7 @@ func (ki *ki_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ki *ki_KE) MonthsAbbreviated() []string { -- return ki.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (ki *ki_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ki *ki_KE) MonthsNarrow() []string { -- return ki.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (ki *ki_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ki *ki_KE) MonthsWide() []string { -- return ki.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (ki *ki_KE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ki.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ki.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ki.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ki.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ki.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ki_KE' -@@ -247,68 +183,7 @@ func (ki *ki_KE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ki.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ki.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ki.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ki.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ki.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ki.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ki_KE' -@@ -316,27 +191,6 @@ func (ki *ki_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (ki *ki_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ki.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (ki *ki_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ki.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (ki *ki_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ki.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ki.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (ki *ki_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (ki *ki_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (ki *ki_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (ki *ki_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ki.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ki.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kk/kk.go b/kk/kk.go -index c2579ad..d86e197 100644 ---- a/kk/kk.go -+++ b/kk/kk.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"б.з.д.", "б.з."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Біздің заманымызға дейін", "Біздің заманымыз"}, -- timezones: map[string]string{"GFT": "Француз Гвианасы уақыты", "OEZ": "Шығыс Еуропа стандартты уақыты", "SRT": "Суринам уақыты", "WEZ": "Батыс Еуропа стандартты уақыты", "NZST": "Жаңа Зеландия стандартты уақыты", "JDT": "Жапония жазғы уақыты", "TMT": "Түрікменстан стандартты уақыты", "HEPMX": "Мексика жазғы Тынық мұхит уақыты", "EDT": "Солтүстік Америка жазғы шығыс уақыты", "AKDT": "Аляска жазғы уақыты", "AEDT": "Австралия жазғы шығыс уақыты", "CHADT": "Чатем жазғы уақыты", "LHDT": "Лорд-Хау жазғы уақыты", "WIT": "Шығыс Индонезия уақыты", "HADT": "Гавай және Алеут аралдары жазғы уақыты", "WESZ": "Батыс Еуропа жазғы уақыты", "HECU": "Куба жазғы уақыты", "CST": "Солтүстік Америка стандартты орталық уақыты", "AST": "Атлантика стандартты уақыты", "GYT": "Гайана уақыты", "UYT": "Уругвай стандартты уақыты", "ACDT": "Австралия жазғы орталық уақыты", "HNPMX": "Мексика стандартты Тынық мұхит уақыты", "ECT": "Эквадор уақыты", "COT": "Колумбия стандартты уақыты", "WITA": "Орталық Индонезия уақыты", "∅∅∅": "Амазон жазғы уақыты", "HNEG": "Шығыс Гренландия стандартты уақыты", "WART": "Батыс Аргентина стандартты уақыты", "WIB": "Батыс Индонезия уақыты", "HAST": "Гавай және Алеут аралдары стандартты уақыты", "ARST": "Аргентина жазғы уақыты", "MESZ": "Орталық Еуропа жазғы уақыты", "HEEG": "Шығыс Гренландия жазғы уақыты", "HNNOMX": "Солтүстік-Батыс Мексика стандартты уақыты", "HENOMX": "Солтүстік-Батыс Мексика жазғы уақыты", "AKST": "Аляска стандартты уақыты", "VET": "Венесуэла уақыты", "IST": "Үндістан стандартты уақыты", "JST": "Жапония стандартты уақыты", "EST": "Солтүстік Америка стандартты шығыс уақыты", "HEOG": "Батыс Гренландия жазғы уақыты", "HNPM": "Сен-Пьер және Микелон стандартты уақыты", "CLT": "Чили стандартты уақыты", "TMST": "Түрікменстан жазғы уақыты", "LHST": "Лорд-Хау стандартты уақыты", "CLST": "Чили жазғы уақыты", "WAST": "Батыс Африка жазғы уақыты", "COST": "Колумбия жазғы уақыты", "HNCU": "Куба стандартты уақыты", "BT": "Бутан уақыты", "NZDT": "Жаңа Зеландия жазғы уақыты", "CHAST": "Чатем стандартты уақыты", "ACWDT": "Австралия жазғы орталық-батыс уақыты", "AWST": "Австралия стандартты батыс уақыты", "WARST": "Батыс Аргентина жазғы уақыты", "MST": "MST", "PDT": "Солтүстік Америка жазғы Тынық мұхиты уақыты", "AWDT": "Австралия жазғы батыс уақыты", "HEPM": "Сен-Пьер және Микелон жазғы уақыты", "SAST": "Оңтүстік Африка уақыты", "ACST": "Австралия стандартты орталық уақыты", "ADT": "Атлантика жазғы уақыты", "ACWST": "Австралия стандартты орталық-батыс уақыты", "WAT": "Батыс Африка стандартты уақыты", "CDT": "Солтүстік Америка жазғы орталық уақыты", "PST": "Солтүстік Америка стандартты Тынық мұхиты уақыты", "HKT": "Гонконг стандартты уақыты", "SGT": "Сингапур стандартты уақыты", "MYT": "Малайзия уақыты", "HNT": "Ньюфаундленд стандартты уақыты", "HNOG": "Батыс Гренландия стандартты уақыты", "AEST": "Австралия стандартты шығыс уақыты", "OESZ": "Шығыс Еуропа жазғы уақыты", "UYST": "Уругвай жазғы уақыты", "CAT": "Орталық Африка уақыты", "MDT": "MDT", "ART": "Аргентина стандартты уақыты", "MEZ": "Орталық Еуропа стандартты уақыты", "BOT": "Боливия уақыты", "GMT": "Гринвич уақыты", "HAT": "Ньюфаундленд жазғы уақыты", "HKST": "Гонконг жазғы уақыты", "ChST": "Чаморро стандартты уақыты", "EAT": "Шығыс Африка уақыты"}, -+ timezones: map[string]string{"AWDT": "Австралия жазғы батыс уақыты", "AKST": "Аляска стандартты уақыты", "ACDT": "Австралия жазғы орталық уақыты", "ECT": "Эквадор уақыты", "BT": "Бутан уақыты", "HAT": "Ньюфаундленд жазғы уақыты", "WARST": "Батыс Аргентина жазғы уақыты", "SAST": "Оңтүстік Африка уақыты", "COST": "Колумбия жазғы уақыты", "HKST": "Гонконг жазғы уақыты", "NZDT": "Жаңа Зеландия жазғы уақыты", "CLST": "Чили жазғы уақыты", "HEPM": "Сен-Пьер және Микелон жазғы уақыты", "UYST": "Уругвай жазғы уақыты", "PDT": "Солтүстік Америка жазғы Тынық мұхиты уақыты", "HNCU": "Куба стандартты уақыты", "HECU": "Куба жазғы уақыты", "WAST": "Батыс Африка жазғы уақыты", "MDT": "MDT", "ChST": "Чаморро стандартты уақыты", "ARST": "Аргентина жазғы уақыты", "ACST": "Австралия стандартты орталық уақыты", "LHDT": "Лорд-Хау жазғы уақыты", "ACWST": "Австралия стандартты орталық-батыс уақыты", "OESZ": "Шығыс Еуропа жазғы уақыты", "COT": "Колумбия стандартты уақыты", "ADT": "Атлантика жазғы уақыты", "HEOG": "Батыс Гренландия жазғы уақыты", "AST": "Атлантика стандартты уақыты", "GMT": "Гринвич уақыты", "HENOMX": "Солтүстік-Батыс Мексика жазғы уақыты", "LHST": "Лорд-Хау стандартты уақыты", "PST": "Солтүстік Америка стандартты Тынық мұхиты уақыты", "HEPMX": "Мексика жазғы Тынық мұхит уақыты", "VET": "Венесуэла уақыты", "CDT": "Солтүстік Америка жазғы орталық уақыты", "EDT": "Солтүстік Америка жазғы шығыс уақыты", "WIT": "Шығыс Индонезия уақыты", "AWST": "Австралия стандартты батыс уақыты", "AEST": "Австралия стандартты шығыс уақыты", "AEDT": "Австралия жазғы шығыс уақыты", "∅∅∅": "∅∅∅", "TMT": "Түрікменстан стандартты уақыты", "CAT": "Орталық Африка уақыты", "HADT": "Гавай және Алеут аралдары жазғы уақыты", "MST": "MST", "BOT": "Боливия уақыты", "WESZ": "Батыс Еуропа жазғы уақыты", "GFT": "Француз Гвианасы уақыты", "HKT": "Гонконг стандартты уақыты", "CST": "Солтүстік Америка стандартты орталық уақыты", "OEZ": "Шығыс Еуропа стандартты уақыты", "HNT": "Ньюфаундленд стандартты уақыты", "WART": "Батыс Аргентина стандартты уақыты", "EST": "Солтүстік Америка стандартты шығыс уақыты", "JDT": "Жапония жазғы уақыты", "WEZ": "Батыс Еуропа стандартты уақыты", "JST": "Жапония стандартты уақыты", "MESZ": "Орталық Еуропа жазғы уақыты", "AKDT": "Аляска жазғы уақыты", "GYT": "Гайана уақыты", "EAT": "Шығыс Африка уақыты", "SRT": "Суринам уақыты", "HNNOMX": "Солтүстік-Батыс Мексика стандартты уақыты", "HNPM": "Сен-Пьер және Микелон стандартты уақыты", "CHADT": "Чатем жазғы уақыты", "ACWDT": "Австралия жазғы орталық-батыс уақыты", "SGT": "Сингапур стандартты уақыты", "WIB": "Батыс Индонезия уақыты", "CHAST": "Чатем стандартты уақыты", "WAT": "Батыс Африка стандартты уақыты", "HNEG": "Шығыс Гренландия стандартты уақыты", "HAST": "Гавай және Алеут аралдары стандартты уақыты", "MEZ": "Орталық Еуропа стандартты уақыты", "HEEG": "Шығыс Гренландия жазғы уақыты", "IST": "Үндістан стандартты уақыты", "HNPMX": "Мексика стандартты Тынық мұхит уақыты", "WITA": "Орталық Индонезия уақыты", "NZST": "Жаңа Зеландия стандартты уақыты", "MYT": "Малайзия уақыты", "TMST": "Түрікменстан жазғы уақыты", "CLT": "Чили стандартты уақыты", "ART": "Аргентина стандартты уақыты", "HNOG": "Батыс Гренландия стандартты уақыты", "UYT": "Уругвай стандартты уақыты"}, - } - } -  -diff --git a/kk_KZ/kk_KZ.go b/kk_KZ/kk_KZ.go -index 4da0e89..516f5df 100644 ---- a/kk_KZ/kk_KZ.go -+++ b/kk_KZ/kk_KZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type kk_KZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kk_KZ' locale - func New() locales.Translator { - return &kk_KZ{ -- locale: "kk_KZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "қаң.", "ақп.", "нау.", "сәу.", "мам.", "мау.", "шіл.", "там.", "қыр.", "қаз.", "қар.", "жел."}, -- monthsNarrow: []string{"", "Қ", "А", "Н", "С", "М", "М", "Ш", "Т", "Қ", "Қ", "Қ", "Ж"}, -- monthsWide: []string{"", "қаңтар", "ақпан", "наурыз", "сәуір", "мамыр", "маусым", "шілде", "тамыз", "қыркүйек", "қазан", "қараша", "желтоқсан"}, -- daysAbbreviated: []string{"Жс", "Дс", "Сс", "Ср", "Бс", "Жм", "Сб"}, -- daysNarrow: []string{"Ж", "Д", "С", "С", "Б", "Ж", "С"}, -- daysShort: []string{"Жс", "Дс", "Сс", "Ср", "Бс", "Жм", "Сб"}, -- daysWide: []string{"жексенбі", "дүйсенбі", "сейсенбі", "сәрсенбі", "бейсенбі", "жұма", "сенбі"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"б.з.д.", "б.з."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Біздің заманымызға дейін", "Біздің заманымыз"}, -- timezones: map[string]string{"MST": "MST", "GYT": "Гайана уақыты", "WESZ": "Батыс Еуропа жазғы уақыты", "ACWST": "Австралия стандартты орталық-батыс уақыты", "CHADT": "Чатем жазғы уақыты", "∅∅∅": "Перу жазғы уақыты", "SGT": "Сингапур стандартты уақыты", "CST": "Солтүстік Америка стандартты орталық уақыты", "AST": "Атлантика стандартты уақыты", "HENOMX": "Солтүстік-Батыс Мексика жазғы уақыты", "UYT": "Уругвай стандартты уақыты", "WIB": "Батыс Индонезия уақыты", "ACWDT": "Австралия жазғы орталық-батыс уақыты", "ARST": "Аргентина жазғы уақыты", "AWDT": "Австралия жазғы батыс уақыты", "WARST": "Батыс Аргентина жазғы уақыты", "EAT": "Шығыс Африка уақыты", "WAST": "Батыс Африка жазғы уақыты", "HAST": "Гавай және Алеут аралдары стандартты уақыты", "SRT": "Суринам уақыты", "HAT": "Ньюфаундленд жазғы уақыты", "CAT": "Орталық Африка уақыты", "OESZ": "Шығыс Еуропа жазғы уақыты", "ADT": "Атлантика жазғы уақыты", "VET": "Венесуэла уақыты", "MEZ": "Орталық Еуропа стандартты уақыты", "ChST": "Чаморро стандартты уақыты", "AKST": "Аляска стандартты уақыты", "UYST": "Уругвай жазғы уақыты", "PST": "Солтүстік Америка стандартты Тынық мұхиты уақыты", "WITA": "Орталық Индонезия уақыты", "HEPM": "Сен-Пьер және Микелон жазғы уақыты", "MESZ": "Орталық Еуропа жазғы уақыты", "WAT": "Батыс Африка стандартты уақыты", "AKDT": "Аляска жазғы уақыты", "HNT": "Ньюфаундленд стандартты уақыты", "ART": "Аргентина стандартты уақыты", "AWST": "Австралия стандартты батыс уақыты", "HNPM": "Сен-Пьер және Микелон стандартты уақыты", "JST": "Жапония стандартты уақыты", "JDT": "Жапония жазғы уақыты", "IST": "Үндістан стандартты уақыты", "ACDT": "Австралия жазғы орталық уақыты", "WART": "Батыс Аргентина стандартты уақыты", "EDT": "Солтүстік Америка жазғы шығыс уақыты", "MDT": "MDT", "HADT": "Гавай және Алеут аралдары жазғы уақыты", "LHST": "Лорд-Хау стандартты уақыты", "TMT": "Түрікменстан стандартты уақыты", "EST": "Солтүстік Америка стандартты шығыс уақыты", "WEZ": "Батыс Еуропа стандартты уақыты", "HNOG": "Батыс Гренландия стандартты уақыты", "CHAST": "Чатем стандартты уақыты", "LHDT": "Лорд-Хау жазғы уақыты", "NZST": "Жаңа Зеландия стандартты уақыты", "HNEG": "Шығыс Гренландия стандартты уақыты", "ACST": "Австралия стандартты орталық уақыты", "HEPMX": "Мексика жазғы Тынық мұхит уақыты", "BT": "Бутан уақыты", "HEOG": "Батыс Гренландия жазғы уақыты", "HKST": "Гонконг жазғы уақыты", "SAST": "Оңтүстік Африка уақыты", "CLT": "Чили стандартты уақыты", "TMST": "Түрікменстан жазғы уақыты", "COT": "Колумбия стандартты уақыты", "HNNOMX": "Солтүстік-Батыс Мексика стандартты уақыты", "MYT": "Малайзия уақыты", "AEST": "Австралия стандартты шығыс уақыты", "NZDT": "Жаңа Зеландия жазғы уақыты", "BOT": "Боливия уақыты", "GFT": "Француз Гвианасы уақыты", "PDT": "Солтүстік Америка жазғы Тынық мұхиты уақыты", "CLST": "Чили жазғы уақыты", "COST": "Колумбия жазғы уақыты", "HNCU": "Куба стандартты уақыты", "HECU": "Куба жазғы уақыты", "HNPMX": "Мексика стандартты Тынық мұхит уақыты", "CDT": "Солтүстік Америка жазғы орталық уақыты", "HKT": "Гонконг стандартты уақыты", "HEEG": "Шығыс Гренландия жазғы уақыты", "OEZ": "Шығыс Еуропа стандартты уақыты", "ECT": "Эквадор уақыты", "GMT": "Гринвич уақыты", "WIT": "Шығыс Индонезия уақыты", "AEDT": "Австралия жазғы шығыс уақыты"}, -+ locale: "kk_KZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "GYT": "GYT", "CLT": "CLT", "NZST": "NZST", "PDT": "PDT", "HEPMX": "HEPMX", "SGT": "SGT", "WART": "WART", "HEOG": "HEOG", "TMT": "TMT", "HNEG": "HNEG", "OEZ": "OEZ", "WARST": "WARST", "CAT": "CAT", "EAT": "EAT", "LHDT": "LHDT", "HEPM": "HEPM", "CHADT": "CHADT", "IST": "IST", "PST": "PST", "ACWDT": "ACWDT", "OESZ": "OESZ", "HAT": "HAT", "CDT": "CDT", "NZDT": "NZDT", "GMT": "GMT", "MESZ": "MESZ", "UYT": "UYT", "∅∅∅": "∅∅∅", "WIT": "WIT", "HNOG": "HNOG", "TMST": "TMST", "WITA": "WITA", "BOT": "BOT", "WIB": "WIB", "ARST": "ARST", "JDT": "JDT", "CHAST": "CHAST", "BT": "BT", "ACWST": "ACWST", "HEEG": "HEEG", "AKDT": "AKDT", "HKST": "HKST", "ECT": "ECT", "HADT": "HADT", "WESZ": "WESZ", "EDT": "EDT", "AEDT": "AEDT", "HECU": "HECU", "WAT": "WAT", "COST": "COST", "EST": "EST", "HKT": "HKT", "JST": "JST", "AKST": "AKST", "HNT": "HNT", "LHST": "LHST", "COT": "COT", "ChST": "ChST", "SRT": "SRT", "ACDT": "ACDT", "WEZ": "WEZ", "VET": "VET", "CST": "CST", "MST": "MST", "ADT": "ADT", "AWST": "AWST", "AWDT": "AWDT", "HNPM": "HNPM", "HNCU": "HNCU", "MYT": "MYT", "AEST": "AEST", "HNPMX": "HNPMX", "WAST": "WAST", "SAST": "SAST", "CLST": "CLST", "MEZ": "MEZ", "HENOMX": "HENOMX", "GFT": "GFT", "MDT": "MDT", "AST": "AST", "ART": "ART", "HAST": "HAST", "ACST": "ACST", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -143,7 +120,7 @@ func (kk *kk_KZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kk *kk_KZ) MonthsAbbreviated() []string { -- return kk.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +130,7 @@ func (kk *kk_KZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kk *kk_KZ) MonthsNarrow() []string { -- return kk.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +140,7 @@ func (kk *kk_KZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kk *kk_KZ) MonthsWide() []string { -- return kk.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,75 +186,13 @@ func (kk *kk_KZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'kk_KZ' and handles both Whole and Real numbers based on 'v' - func (kk *kk_KZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kk.group) - 1; j >= 0; j-- { -- b = append(b, kk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'kk_KZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (kk *kk_KZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kk.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, kk.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'kk_KZ' -@@ -285,58 +200,7 @@ func (kk *kk_KZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kk.group) - 1; j >= 0; j-- { -- b = append(b, kk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, kk.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kk_KZ' -@@ -345,65 +209,7 @@ func (kk *kk_KZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(kk.group) - 1; j >= 0; j-- { -- b = append(b, kk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, kk.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, kk.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, kk.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kk_KZ' -@@ -411,27 +217,6 @@ func (kk *kk_KZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -440,23 +225,6 @@ func (kk *kk_KZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb6}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kk.monthsAbbreviated[t.Month()]...) -- - return string(b) - } -  -@@ -465,18 +233,6 @@ func (kk *kk_KZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb6}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kk.monthsWide[t.Month()]...) -- - return string(b) - } -  -@@ -485,20 +241,6 @@ func (kk *kk_KZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb6}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, kk.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -507,19 +249,6 @@ func (kk *kk_KZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -528,26 +257,6 @@ func (kk *kk_KZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -556,30 +265,6 @@ func (kk *kk_KZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -588,34 +273,5 @@ func (kk *kk_KZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kk.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kkj/kkj.go b/kkj/kkj.go -index fc090e9..a333600 100644 ---- a/kkj/kkj.go -+++ b/kkj/kkj.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - daysNarrow: []string{"so", "lu", "ma", "mɛ", "ye", "va", "ms"}, - daysShort: []string{"sɔndi", "lundi", "mardi", "mɛrkɛrɛdi", "yedi", "vaŋdɛrɛdi", "mɔnɔ sɔndi"}, - daysWide: []string{"sɔndi", "lundi", "mardi", "mɛrkɛrɛdi", "yedi", "vaŋdɛrɛdi", "mɔnɔ sɔndi"}, -- timezones: map[string]string{"EST": "EST", "HNPMX": "HNPMX", "GYT": "GYT", "BT": "BT", "MESZ": "MESZ", "ChST": "ChST", "HEEG": "HEEG", "WAST": "WAST", "ACWDT": "ACWDT", "HAT": "HAT", "UYT": "UYT", "AST": "AST", "ART": "ART", "AEST": "AEST", "LHDT": "LHDT", "WART": "WART", "MST": "MST", "HKT": "HKT", "ARST": "ARST", "AWST": "AWST", "MEZ": "MEZ", "LHST": "LHST", "HEPMX": "HEPMX", "HAST": "HAST", "HNEG": "HNEG", "EAT": "EAT", "UYST": "UYST", "AKST": "AKST", "WEZ": "WEZ", "NZST": "NZST", "CHAST": "CHAST", "SGT": "SGT", "MYT": "MYT", "GMT": "GMT", "HKST": "HKST", "WITA": "WITA", "GFT": "GFT", "WARST": "WARST", "AWDT": "AWDT", "HNPM": "HNPM", "ACST": "ACST", "SRT": "SRT", "HNOG": "HNOG", "WAT": "WAT", "HECU": "HECU", "MDT": "MDT", "HNT": "HNT", "AKDT": "AKDT", "VET": "VET", "WIT": "WIT", "PST": "PST", "SAST": "SAST", "CLT": "CLT", "COT": "COT", "HNCU": "HNCU", "WESZ": "WESZ", "IST": "IST", "PDT": "PDT", "TMST": "TMST", "OESZ": "OESZ", "CST": "CST", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "JDT": "JDT", "ACDT": "ACDT", "HENOMX": "HENOMX", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "NZDT": "NZDT", "JST": "JST", "COST": "COST", "CLST": "CLST", "TMT": "TMT", "CDT": "CDT", "ADT": "ADT", "OEZ": "OEZ", "ECT": "ECT", "EDT": "EDT", "WIB": "WIB", "AEDT": "AEDT", "CHADT": "CHADT", "BOT": "BOT", "CAT": "CAT", "HADT": "HADT", "HEOG": "HEOG"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HEPMX": "HEPMX", "OEZ": "OEZ", "TMST": "TMST", "CAT": "CAT", "BOT": "BOT", "HKST": "HKST", "TMT": "TMT", "ChST": "ChST", "ART": "ART", "AEDT": "AEDT", "WITA": "WITA", "MESZ": "MESZ", "CHAST": "CHAST", "HEOG": "HEOG", "MST": "MST", "IST": "IST", "ACWST": "ACWST", "COT": "COT", "ECT": "ECT", "PST": "PST", "COST": "COST", "HKT": "HKT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "GFT": "GFT", "CLST": "CLST", "SRT": "SRT", "MEZ": "MEZ", "PDT": "PDT", "CHADT": "CHADT", "HECU": "HECU", "HNPMX": "HNPMX", "SAST": "SAST", "GYT": "GYT", "HNOG": "HNOG", "CST": "CST", "NZST": "NZST", "AWDT": "AWDT", "HEPM": "HEPM", "ACWDT": "ACWDT", "WARST": "WARST", "ADT": "ADT", "MYT": "MYT", "HNT": "HNT", "MDT": "MDT", "EAT": "EAT", "AWST": "AWST", "LHST": "LHST", "JST": "JST", "HNCU": "HNCU", "WAST": "WAST", "HAT": "HAT", "WART": "WART", "EST": "EST", "ACST": "ACST", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "VET": "VET", "WAT": "WAT", "OESZ": "OESZ", "ARST": "ARST", "HAST": "HAST", "HNPM": "HNPM", "AEST": "AEST", "UYT": "UYT", "AKDT": "AKDT", "EDT": "EDT", "CDT": "CDT", "GMT": "GMT", "ACDT": "ACDT", "JDT": "JDT", "SGT": "SGT", "WIT": "WIT", "BT": "BT", "UYST": "UYST", "WEZ": "WEZ", "CLT": "CLT", "WIB": "WIB", "AST": "AST", "HADT": "HADT", "AKST": "AKST", "NZDT": "NZDT", "HNEG": "HNEG"}, - } - } -  -diff --git a/kkj_CM/kkj_CM.go b/kkj_CM/kkj_CM.go -index 3325041..2e3f9da 100644 ---- a/kkj_CM/kkj_CM.go -+++ b/kkj_CM/kkj_CM.go -@@ -10,60 +10,45 @@ import ( - ) -  - type kkj_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kkj_CM' locale - func New() locales.Translator { - return &kkj_CM{ -- locale: "kkj_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsWide: []string{"", "pamba", "wanja", "mbiyɔ mɛndoŋgɔ", "Nyɔlɔmbɔŋgɔ", "Mɔnɔ ŋgbanja", "Nyaŋgwɛ ŋgbanja", "kuŋgwɛ", "fɛ", "njapi", "nyukul", "11", "ɓulɓusɛ"}, -- daysAbbreviated: []string{"sɔndi", "lundi", "mardi", "mɛrkɛrɛdi", "yedi", "vaŋdɛrɛdi", "mɔnɔ sɔndi"}, -- daysNarrow: []string{"so", "lu", "ma", "mɛ", "ye", "va", "ms"}, -- daysShort: []string{"sɔndi", "lundi", "mardi", "mɛrkɛrɛdi", "yedi", "vaŋdɛrɛdi", "mɔnɔ sɔndi"}, -- daysWide: []string{"sɔndi", "lundi", "mardi", "mɛrkɛrɛdi", "yedi", "vaŋdɛrɛdi", "mɔnɔ sɔndi"}, -- timezones: map[string]string{"AEDT": "AEDT", "TMT": "TMT", "CAT": "CAT", "COT": "COT", "MST": "MST", "PST": "PST", "WEZ": "WEZ", "HEPM": "HEPM", "GFT": "GFT", "WARST": "WARST", "WIT": "WIT", "HNT": "HNT", "WITA": "WITA", "CLT": "CLT", "JST": "JST", "WAST": "WAST", "WIB": "WIB", "VET": "VET", "IST": "IST", "HNCU": "HNCU", "WESZ": "WESZ", "ACST": "ACST", "GMT": "GMT", "JDT": "JDT", "ACDT": "ACDT", "HNPMX": "HNPMX", "HAST": "HAST", "AWST": "AWST", "SAST": "SAST", "EDT": "EDT", "UYST": "UYST", "OEZ": "OEZ", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "WAT": "WAT", "ECT": "ECT", "UYT": "UYT", "AST": "AST", "ACWST": "ACWST", "CLST": "CLST", "SGT": "SGT", "CST": "CST", "HNOG": "HNOG", "ART": "ART", "HECU": "HECU", "MYT": "MYT", "HADT": "HADT", "ARST": "ARST", "NZDT": "NZDT", "HEEG": "HEEG", "EAT": "EAT", "HKST": "HKST", "LHDT": "LHDT", "NZST": "NZST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "HEOG": "HEOG", "PDT": "PDT", "AWDT": "AWDT", "HKT": "HKT", "HNPM": "HNPM", "CHAST": "CHAST", "CHADT": "CHADT", "TMST": "TMST", "MDT": "MDT", "SRT": "SRT", "ACWDT": "ACWDT", "CDT": "CDT", "WART": "WART", "COST": "COST", "AKDT": "AKDT", "HENOMX": "HENOMX", "EST": "EST", "GYT": "GYT", "ADT": "ADT", "BT": "BT", "LHST": "LHST", "ChST": "ChST", "BOT": "BOT", "HEPMX": "HEPMX", "AKST": "AKST", "HAT": "HAT", "AEST": "AEST", "MESZ": "MESZ"}, -+ locale: "kkj_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "NZST": "NZST", "SGT": "SGT", "GYT": "GYT", "HEOG": "HEOG", "EST": "EST", "CLST": "CLST", "ART": "ART", "HADT": "HADT", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "COT": "COT", "ARST": "ARST", "MDT": "MDT", "HNEG": "HNEG", "HNPM": "HNPM", "HEPM": "HEPM", "HNPMX": "HNPMX", "TMT": "TMT", "GMT": "GMT", "WIT": "WIT", "EDT": "EDT", "HKT": "HKT", "CAT": "CAT", "ChST": "ChST", "ACDT": "ACDT", "OEZ": "OEZ", "GFT": "GFT", "WITA": "WITA", "LHDT": "LHDT", "PDT": "PDT", "HNCU": "HNCU", "HECU": "HECU", "AKST": "AKST", "TMST": "TMST", "ACST": "ACST", "HEEG": "HEEG", "CHAST": "CHAST", "UYST": "UYST", "VET": "VET", "WAT": "WAT", "WARST": "WARST", "HNOG": "HNOG", "CDT": "CDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "JST": "JST", "ACWST": "ACWST", "AEDT": "AEDT", "WEZ": "WEZ", "AKDT": "AKDT", "WART": "WART", "HKST": "HKST", "NZDT": "NZDT", "MESZ": "MESZ", "IST": "IST", "EAT": "EAT", "HAST": "HAST", "JDT": "JDT", "HAT": "HAT", "CLT": "CLT", "ECT": "ECT", "WAST": "WAST", "HNT": "HNT", "CST": "CST", "AST": "AST", "MEZ": "MEZ", "LHST": "LHST", "MYT": "MYT", "MST": "MST", "ADT": "ADT", "SRT": "SRT", "AWST": "AWST", "AWDT": "AWDT", "PST": "PST", "AEST": "AEST", "CHADT": "CHADT", "COST": "COST", "WIB": "WIB", "BOT": "BOT", "BT": "BT", "UYT": "UYT", "WESZ": "WESZ"}, - } - } -  -@@ -136,7 +121,7 @@ func (kkj *kkj_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kkj *kkj_CM) MonthsWide() []string { -- return kkj.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,40 +181,7 @@ func (kkj *kkj_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kkj.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kkj.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kkj.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, kkj.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, kkj.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, kkj.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kkj_CM' -@@ -238,57 +190,7 @@ func (kkj *kkj_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kkj.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kkj.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kkj.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, kkj.currencyNegativePrefix[j]) -- } -- -- b = append(b, kkj.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kkj.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, kkj.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, kkj.currencyNegativeSuffix...) -- } else { -- -- b = append(b, kkj.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kkj_CM' -@@ -296,27 +198,6 @@ func (kkj *kkj_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -325,17 +206,6 @@ func (kkj *kkj_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kkj.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +214,6 @@ func (kkj *kkj_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kkj.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,24 +222,6 @@ func (kkj *kkj_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kkj.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kkj.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -389,19 +230,6 @@ func (kkj *kkj_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kkj.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -410,26 +238,6 @@ func (kkj *kkj_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kkj.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kkj.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -diff --git a/kl/kl.go b/kl/kl.go -index 53dd0a7..cacfc8f 100644 ---- a/kl/kl.go -+++ b/kl/kl.go -@@ -68,7 +68,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"Kr.in.si.", "Kr.in.king."}, - erasNarrow: []string{"Kr.s.", "Kr.k."}, - erasWide: []string{"Kristusip inunngornerata siornagut", "Kristusip inunngornerata kingornagut"}, -- timezones: map[string]string{"NZST": "NZST", "BOT": "BOT", "EAT": "EAT", "COST": "COST", "HKT": "HKT", "WITA": "WITA", "AEDT": "AEDT", "HEPM": "HEPM", "WART": "WART", "SRT": "SRT", "ADT": "ADT", "UYST": "UYST", "HKST": "HKST", "ACST": "ACST", "EST": "EST", "CST": "CST", "LHST": "LHST", "OEZ": "OEZ", "MST": "MST", "AKDT": "AKDT", "WAST": "WAST", "CDT": "CDT", "ACWDT": "ACWDT", "MEZ": "MEZ", "JST": "JST", "GFT": "GFT", "ACDT": "ACDT", "OESZ": "OESZ", "HECU": "HECU", "HEPMX": "HEPMX", "EDT": "EDT", "AWDT": "AWDT", "MESZ": "MESZ", "CLT": "CLT", "WAT": "WAT", "MDT": "MDT", "GYT": "GYT", "ARST": "ARST", "HNEG": "HNEG", "ECT": "ECT", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "PDT": "PDT", "∅∅∅": "∅∅∅", "AKST": "AKST", "WIT": "WIT", "HAST": "HAST", "NZDT": "NZDT", "AST": "AST", "HADT": "HADT", "HNT": "HNT", "HNPM": "HNPM", "CHADT": "CHADT", "COT": "COT", "HEOG": "HEOG", "CHAST": "CHAST", "BT": "BT", "ART": "ART", "HENOMX": "HENOMX", "VET": "VET", "HAT": "HAT", "WEZ": "WEZ", "WESZ": "WESZ", "IST": "IST", "JDT": "JDT", "HEEG": "HEEG", "WARST": "WARST", "CAT": "CAT", "SGT": "SGT", "ACWST": "ACWST", "HNOG": "HNOG", "AWST": "AWST", "AEST": "AEST", "LHDT": "LHDT", "TMT": "TMT", "PST": "PST", "UYT": "UYT", "SAST": "SAST", "CLST": "CLST", "TMST": "TMST", "HNPMX": "HNPMX", "ChST": "ChST", "MYT": "MYT", "WIB": "WIB", "GMT": "GMT"}, -+ timezones: map[string]string{"NZST": "NZST", "HEEG": "HEEG", "SGT": "SGT", "GFT": "GFT", "MDT": "MDT", "HEPM": "HEPM", "AWDT": "AWDT", "PST": "PST", "HNPMX": "HNPMX", "EST": "EST", "HKT": "HKT", "WIB": "WIB", "ChST": "ChST", "MESZ": "MESZ", "TMST": "TMST", "MST": "MST", "AWST": "AWST", "UYST": "UYST", "PDT": "PDT", "HEPMX": "HEPMX", "EDT": "EDT", "ARST": "ARST", "EAT": "EAT", "MEZ": "MEZ", "VET": "VET", "∅∅∅": "∅∅∅", "CAT": "CAT", "JDT": "JDT", "IST": "IST", "WAST": "WAST", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "HNEG": "HNEG", "LHDT": "LHDT", "CHADT": "CHADT", "AKDT": "AKDT", "OESZ": "OESZ", "HKST": "HKST", "CLST": "CLST", "SRT": "SRT", "UYT": "UYT", "BT": "BT", "HNCU": "HNCU", "AKST": "AKST", "HAT": "HAT", "WIT": "WIT", "CDT": "CDT", "LHST": "LHST", "AEST": "AEST", "WARST": "WARST", "ECT": "ECT", "CST": "CST", "ADT": "ADT", "BOT": "BOT", "HENOMX": "HENOMX", "ACST": "ACST", "ACWDT": "ACWDT", "OEZ": "OEZ", "HNT": "HNT", "GMT": "GMT", "WESZ": "WESZ", "WAT": "WAT", "HEOG": "HEOG", "GYT": "GYT", "HAST": "HAST", "HNPM": "HNPM", "MYT": "MYT", "AEDT": "AEDT", "HECU": "HECU", "WEZ": "WEZ", "WART": "WART", "HNOG": "HNOG", "HADT": "HADT", "ACDT": "ACDT", "ACWST": "ACWST", "CHAST": "CHAST", "COT": "COT", "COST": "COST", "ART": "ART", "AST": "AST", "JST": "JST", "SAST": "SAST", "TMT": "TMT", "CLT": "CLT", "WITA": "WITA"}, - } - } -  -diff --git a/kl_GL/kl_GL.go b/kl_GL/kl_GL.go -index 52b8535..7945601 100644 ---- a/kl_GL/kl_GL.go -+++ b/kl_GL/kl_GL.go -@@ -18,7 +18,6 @@ type kl_GL struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -43,32 +42,13 @@ type kl_GL struct { - // New returns a new instance of translator for the 'kl_GL' locale - func New() locales.Translator { - return &kl_GL{ -- locale: "kl_GL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "martsi", "aprili", "maji", "juni", "juli", "augustusi", "septemberi", "oktoberi", "novemberi", "decemberi"}, -- daysAbbreviated: []string{"sab", "ata", "mar", "pin", "sis", "tal", "arf"}, -- daysNarrow: []string{"S", "A", "M", "P", "S", "T", "A"}, -- daysShort: []string{"sab", "ata", "mar", "pin", "sis", "tal", "arf"}, -- daysWide: []string{"sabaat", "ataasinngorneq", "marlunngorneq", "pingasunngorneq", "sisamanngorneq", "tallimanngorneq", "arfininngorneq"}, -- periodsAbbreviated: []string{"u.t.", "u.k."}, -- periodsWide: []string{"ulloqeqqata-tungaa", "ulloqeqqata-kingorna"}, -- erasAbbreviated: []string{"Kr.in.si.", "Kr.in.king."}, -- erasNarrow: []string{"Kr.s.", "Kr.k."}, -- erasWide: []string{"Kristusip inunngornerata siornagut", "Kristusip inunngornerata kingornagut"}, -- timezones: map[string]string{"TMT": "TMT", "ADT": "ADT", "HNOG": "HNOG", "AEDT": "AEDT", "MEZ": "MEZ", "CLT": "CLT", "OEZ": "OEZ", "HENOMX": "HENOMX", "HAST": "HAST", "AWDT": "AWDT", "HAT": "HAT", "WITA": "WITA", "SAST": "SAST", "CLST": "CLST", "WAT": "WAT", "OESZ": "OESZ", "AKDT": "AKDT", "BT": "BT", "UYT": "UYT", "AKST": "AKST", "ChST": "ChST", "HNEG": "HNEG", "ACDT": "ACDT", "CAT": "CAT", "WART": "WART", "HNPMX": "HNPMX", "AEST": "AEST", "HNPM": "HNPM", "HEPM": "HEPM", "IST": "IST", "ACST": "ACST", "WARST": "WARST", "GYT": "GYT", "∅∅∅": "∅∅∅", "EAT": "EAT", "HNCU": "HNCU", "WEZ": "WEZ", "AWST": "AWST", "NZST": "NZST", "ACWST": "ACWST", "HNT": "HNT", "HKT": "HKT", "MESZ": "MESZ", "ARST": "ARST", "JDT": "JDT", "HEEG": "HEEG", "EDT": "EDT", "CDT": "CDT", "WIT": "WIT", "PDT": "PDT", "CHAST": "CHAST", "WAST": "WAST", "MYT": "MYT", "WIB": "WIB", "WESZ": "WESZ", "ACWDT": "ACWDT", "HKST": "HKST", "TMST": "TMST", "ART": "ART", "LHST": "LHST", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "GFT": "GFT", "COST": "COST", "HEPMX": "HEPMX", "PST": "PST", "MST": "MST", "UYST": "UYST", "JST": "JST", "ECT": "ECT", "COT": "COT", "NZDT": "NZDT", "BOT": "BOT", "GMT": "GMT", "MDT": "MDT", "SRT": "SRT", "VET": "VET", "HEOG": "HEOG", "SGT": "SGT", "HECU": "HECU", "EST": "EST", "CST": "CST", "AST": "AST", "HADT": "HADT", "CHADT": "CHADT"}, -+ locale: "kl_GL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMST": "TMST", "ChST": "ChST", "EAT": "EAT", "MYT": "MYT", "IST": "IST", "EDT": "EDT", "TMT": "TMT", "AKST": "AKST", "HNOG": "HNOG", "CLST": "CLST", "CST": "CST", "WEZ": "WEZ", "WAST": "WAST", "GYT": "GYT", "UYT": "UYT", "CHADT": "CHADT", "AWST": "AWST", "PDT": "PDT", "WESZ": "WESZ", "OESZ": "OESZ", "CDT": "CDT", "AST": "AST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "WITA": "WITA", "ECT": "ECT", "HEPM": "HEPM", "WARST": "WARST", "CAT": "CAT", "ADT": "ADT", "LHST": "LHST", "JDT": "JDT", "SGT": "SGT", "WAT": "WAT", "AKDT": "AKDT", "HAT": "HAT", "EST": "EST", "HADT": "HADT", "BT": "BT", "ACWST": "ACWST", "GFT": "GFT", "MDT": "MDT", "MESZ": "MESZ", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "NZDT": "NZDT", "WIB": "WIB", "MST": "MST", "GMT": "GMT", "BOT": "BOT", "HNEG": "HNEG", "HEEG": "HEEG", "VET": "VET", "HKT": "HKT", "∅∅∅": "∅∅∅", "AWDT": "AWDT", "OEZ": "OEZ", "WIT": "WIT", "ACDT": "ACDT", "HENOMX": "HENOMX", "PST": "PST", "AEST": "AEST", "WART": "WART", "SRT": "SRT", "LHDT": "LHDT", "HAST": "HAST", "JST": "JST", "UYST": "UYST", "CHAST": "CHAST", "SAST": "SAST", "HKST": "HKST", "ART": "ART", "AEDT": "AEDT", "HEOG": "HEOG", "ARST": "ARST", "MEZ": "MEZ", "COT": "COT", "ACST": "ACST", "HNT": "HNT", "HNPM": "HNPM", "ACWDT": "ACWDT", "HECU": "HECU", "COST": "COST", "CLT": "CLT", "NZST": "NZST"}, - } - } -  -@@ -121,7 +101,7 @@ func (kl *kl_GL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kl *kl_GL) MonthsAbbreviated() []string { -- return kl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -131,7 +111,7 @@ func (kl *kl_GL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kl *kl_GL) MonthsNarrow() []string { -- return kl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -141,7 +121,7 @@ func (kl *kl_GL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kl *kl_GL) MonthsWide() []string { -- return kl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -187,79 +167,13 @@ func (kl *kl_GL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'kl_GL' and handles both Whole and Real numbers based on 'v' - func (kl *kl_GL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(kl.minus) - 1; j >= 0; j-- { -- b = append(b, kl.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'kl_GL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (kl *kl_GL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(kl.minus) - 1; j >= 0; j-- { -- b = append(b, kl.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, kl.percentSuffix...) -- -- b = append(b, kl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'kl_GL' -@@ -267,58 +181,7 @@ func (kl *kl_GL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- for j := len(kl.minus) - 1; j >= 0; j-- { -- b = append(b, kl.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kl_GL' -@@ -327,66 +190,7 @@ func (kl *kl_GL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kl.minus) - 1; j >= 0; j-- { -- b = append(b, kl.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kl_GL' -@@ -394,28 +198,6 @@ func (kl *kl_GL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -424,22 +206,6 @@ func (kl *kl_GL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -448,21 +214,6 @@ func (kl *kl_GL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,24 +222,6 @@ func (kl *kl_GL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -497,28 +230,6 @@ func (kl *kl_GL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kl.periodsAbbreviated[0]...) -- } else { -- b = append(b, kl.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -527,35 +238,6 @@ func (kl *kl_GL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kl.periodsAbbreviated[0]...) -- } else { -- b = append(b, kl.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -564,40 +246,6 @@ func (kl *kl_GL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kl.periodsAbbreviated[0]...) -- } else { -- b = append(b, kl.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -606,44 +254,5 @@ func (kl *kl_GL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kl.periodsAbbreviated[0]...) -- } else { -- b = append(b, kl.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kln/kln.go b/kln/kln.go -index aa2d0d0..9e471fd 100644 ---- a/kln/kln.go -+++ b/kln/kln.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AM", "KO"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Amait kesich Jesu", "Kokakesich Jesu"}, -- timezones: map[string]string{"HEPMX": "HEPMX", "LHST": "LHST", "HEEG": "HEEG", "WAT": "WAT", "WAST": "WAST", "SAST": "SAST", "IST": "IST", "CLST": "CLST", "UYST": "UYST", "PST": "PST", "AWST": "AWST", "AWDT": "AWDT", "CHADT": "CHADT", "SRT": "SRT", "AEDT": "AEDT", "WITA": "WITA", "HNPMX": "HNPMX", "GYT": "GYT", "WIT": "WIT", "WESZ": "WESZ", "ACWDT": "ACWDT", "TMST": "TMST", "EST": "EST", "WARST": "WARST", "HECU": "HECU", "EDT": "EDT", "CST": "CST", "PDT": "PDT", "HKT": "HKT", "OESZ": "OESZ", "ECT": "ECT", "VET": "VET", "WEZ": "WEZ", "ART": "ART", "BOT": "BOT", "WIB": "WIB", "HNPM": "HNPM", "JDT": "JDT", "HNCU": "HNCU", "HNEG": "HNEG", "MYT": "MYT", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "HKST": "HKST", "∅∅∅": "∅∅∅", "WART": "WART", "NZDT": "NZDT", "AKST": "AKST", "ADT": "ADT", "MST": "MST", "AKDT": "AKDT", "HEPM": "HEPM", "ChST": "ChST", "COT": "COT", "COST": "COST", "UYT": "UYT", "CDT": "CDT", "HAST": "HAST", "NZST": "NZST", "JST": "JST", "CAT": "CAT", "SGT": "SGT", "MEZ": "MEZ", "MESZ": "MESZ", "LHDT": "LHDT", "CHAST": "CHAST", "HNT": "HNT", "HAT": "HAT", "ARST": "ARST", "HNOG": "HNOG", "ACST": "ACST", "ACDT": "ACDT", "GMT": "GMT", "HADT": "HADT", "MDT": "MDT", "BT": "BT", "GFT": "GFT", "TMT": "TMT", "HENOMX": "HENOMX", "OEZ": "OEZ", "AST": "AST", "HEOG": "HEOG", "AEST": "AEST", "CLT": "CLT", "EAT": "EAT"}, -+ timezones: map[string]string{"ECT": "ECT", "AWST": "AWST", "HAT": "HAT", "WART": "WART", "WIT": "WIT", "EST": "EST", "CLT": "CLT", "HEPM": "HEPM", "MESZ": "MESZ", "AEDT": "AEDT", "SGT": "SGT", "ACST": "ACST", "SRT": "SRT", "MEZ": "MEZ", "HEEG": "HEEG", "LHDT": "LHDT", "JST": "JST", "ChST": "ChST", "NZST": "NZST", "ARST": "ARST", "UYT": "UYT", "WESZ": "WESZ", "CDT": "CDT", "CHAST": "CHAST", "WARST": "WARST", "TMST": "TMST", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "WEZ": "WEZ", "HNOG": "HNOG", "WIB": "WIB", "ADT": "ADT", "ART": "ART", "BOT": "BOT", "MDT": "MDT", "PDT": "PDT", "WAT": "WAT", "WAST": "WAST", "GFT": "GFT", "ACDT": "ACDT", "LHST": "LHST", "IST": "IST", "HNPMX": "HNPMX", "OESZ": "OESZ", "EDT": "EDT", "CST": "CST", "HENOMX": "HENOMX", "BT": "BT", "ACWST": "ACWST", "HECU": "HECU", "AKDT": "AKDT", "OEZ": "OEZ", "∅∅∅": "∅∅∅", "EAT": "EAT", "HNPM": "HNPM", "AEST": "AEST", "TMT": "TMT", "GMT": "GMT", "NZDT": "NZDT", "MYT": "MYT", "VET": "VET", "HEPMX": "HEPMX", "AKST": "AKST", "HKST": "HKST", "CAT": "CAT", "HNT": "HNT", "SAST": "SAST", "HEOG": "HEOG", "HKT": "HKT", "CLST": "CLST", "HAST": "HAST", "HADT": "HADT", "AWDT": "AWDT", "UYST": "UYST", "COT": "COT", "COST": "COST", "WITA": "WITA", "AST": "AST", "HNEG": "HNEG", "JDT": "JDT", "PST": "PST", "ACWDT": "ACWDT", "HNCU": "HNCU", "GYT": "GYT", "MST": "MST"}, - } - } -  -diff --git a/kln_KE/kln_KE.go b/kln_KE/kln_KE.go -index 4a54d35..dc671c0 100644 ---- a/kln_KE/kln_KE.go -+++ b/kln_KE/kln_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type kln_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kln_KE' locale - func New() locales.Translator { - return &kln_KE{ -- locale: "kln_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Mul", "Ngat", "Taa", "Iwo", "Mam", "Paa", "Nge", "Roo", "Bur", "Epe", "Kpt", "Kpa"}, -- monthsNarrow: []string{"", "M", "N", "T", "I", "M", "P", "N", "R", "B", "E", "K", "K"}, -- monthsWide: []string{"", "Mulgul", "Ng’atyaato", "Kiptaamo", "Iwootkuut", "Mamuut", "Paagi", "Ng’eiyeet", "Rooptui", "Bureet", "Epeeso", "Kipsuunde ne taai", "Kipsuunde nebo aeng’"}, -- daysAbbreviated: []string{"Kts", "Kot", "Koo", "Kos", "Koa", "Kom", "Kol"}, -- daysNarrow: []string{"T", "T", "O", "S", "A", "M", "L"}, -- daysWide: []string{"Kotisap", "Kotaai", "Koaeng’", "Kosomok", "Koang’wan", "Komuut", "Kolo"}, -- periodsAbbreviated: []string{"krn", "koosk"}, -- periodsWide: []string{"karoon", "kooskoliny"}, -- erasAbbreviated: []string{"AM", "KO"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Amait kesich Jesu", "Kokakesich Jesu"}, -- timezones: map[string]string{"WARST": "WARST", "MDT": "MDT", "CDT": "CDT", "MEZ": "MEZ", "JST": "JST", "JDT": "JDT", "HNEG": "HNEG", "WAT": "WAT", "ECT": "ECT", "PDT": "PDT", "NZDT": "NZDT", "LHDT": "LHDT", "TMT": "TMT", "AST": "AST", "HADT": "HADT", "WEZ": "WEZ", "NZST": "NZST", "∅∅∅": "∅∅∅", "VET": "VET", "IST": "IST", "EDT": "EDT", "EAT": "EAT", "GMT": "GMT", "ADT": "ADT", "MYT": "MYT", "AWDT": "AWDT", "BOT": "BOT", "WAST": "WAST", "COST": "COST", "AKST": "AKST", "UYST": "UYST", "HAT": "HAT", "WITA": "WITA", "HNPM": "HNPM", "CHAST": "CHAST", "OESZ": "OESZ", "OEZ": "OEZ", "CAT": "CAT", "HNPMX": "HNPMX", "AKDT": "AKDT", "ART": "ART", "CLT": "CLT", "HEEG": "HEEG", "ACDT": "ACDT", "ACWDT": "ACWDT", "HKST": "HKST", "HEPM": "HEPM", "CLST": "CLST", "ChST": "ChST", "EST": "EST", "UYT": "UYT", "HAST": "HAST", "BT": "BT", "ACWST": "ACWST", "HNOG": "HNOG", "MESZ": "MESZ", "TMST": "TMST", "HEOG": "HEOG", "HKT": "HKT", "AEDT": "AEDT", "LHST": "LHST", "ACST": "ACST", "AWST": "AWST", "CST": "CST", "GYT": "GYT", "WIB": "WIB", "SRT": "SRT", "CHADT": "CHADT", "HNCU": "HNCU", "SAST": "SAST", "COT": "COT", "SGT": "SGT", "WIT": "WIT", "HNT": "HNT", "PST": "PST", "WESZ": "WESZ", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "ARST": "ARST", "AEST": "AEST", "WART": "WART", "MST": "MST", "HEPMX": "HEPMX", "GFT": "GFT", "HECU": "HECU"}, -+ locale: "kln_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEEG": "HEEG", "WITA": "WITA", "BT": "BT", "SAST": "SAST", "EST": "EST", "HKT": "HKT", "WIB": "WIB", "SGT": "SGT", "HEPMX": "HEPMX", "OESZ": "OESZ", "HEOG": "HEOG", "CHAST": "CHAST", "CLT": "CLT", "MDT": "MDT", "NZDT": "NZDT", "ART": "ART", "ARST": "ARST", "MEZ": "MEZ", "LHDT": "LHDT", "WAST": "WAST", "WIT": "WIT", "ADT": "ADT", "HADT": "HADT", "PDT": "PDT", "OEZ": "OEZ", "WART": "WART", "HNOG": "HNOG", "CAT": "CAT", "CDT": "CDT", "MESZ": "MESZ", "AWST": "AWST", "SRT": "SRT", "ACDT": "ACDT", "GFT": "GFT", "COT": "COT", "WARST": "WARST", "HNNOMX": "HNNOMX", "LHST": "LHST", "JDT": "JDT", "ACWDT": "ACWDT", "VET": "VET", "HECU": "HECU", "WAT": "WAT", "GYT": "GYT", "COST": "COST", "EAT": "EAT", "HAST": "HAST", "HNEG": "HNEG", "WESZ": "WESZ", "HKST": "HKST", "AEST": "AEST", "AEDT": "AEDT", "CHADT": "CHADT", "HNCU": "HNCU", "HAT": "HAT", "CST": "CST", "ChST": "ChST", "JST": "JST", "EDT": "EDT", "TMT": "TMT", "AWDT": "AWDT", "MYT": "MYT", "PST": "PST", "ACWST": "ACWST", "UYT": "UYT", "AKDT": "AKDT", "HNT": "HNT", "TMST": "TMST", "∅∅∅": "∅∅∅", "MST": "MST", "NZST": "NZST", "GMT": "GMT", "HEPM": "HEPM", "AST": "AST", "BOT": "BOT", "IST": "IST", "UYST": "UYST", "HNPMX": "HNPMX", "HNPM": "HNPM", "CLST": "CLST", "ECT": "ECT", "ACST": "ACST", "HENOMX": "HENOMX", "WEZ": "WEZ", "AKST": "AKST"}, - } - } -  -@@ -109,7 +94,7 @@ func (kln *kln_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kln *kln_KE) MonthsAbbreviated() []string { -- return kln.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (kln *kln_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kln *kln_KE) MonthsNarrow() []string { -- return kln.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (kln *kln_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kln *kln_KE) MonthsWide() []string { -- return kln.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (kln *kln_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kln.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, kln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kln_KE' -@@ -247,68 +183,7 @@ func (kln *kln_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kln.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, kln.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, kln.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kln_KE' -@@ -316,27 +191,6 @@ func (kln *kln_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (kln *kln_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kln.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (kln *kln_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (kln *kln_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kln.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (kln *kln_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (kln *kln_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (kln *kln_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (kln *kln_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kln.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/km/km.go b/km/km.go -index a648698..6905387 100644 ---- a/km/km.go -+++ b/km/km.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"មុន គ.ស.", "គ.ស."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"មុន\u200bគ្រិស្តសករាជ", "គ្រិស្តសករាជ"}, -- timezones: map[string]string{"HAST": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "ACWST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "HKT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bហុងកុង", "JDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅជប៉ុន", "HNPMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "HEPMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "HADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "NZDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bនូវែលសេឡង់", "CLST": "ម៉ោងរដូវក្តៅនៅឈីលី", "ACDT": "ម៉ោង\u200bពេលថ្ងៃ\u200b\u200b\u200b\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "WIB": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bលិច", "HAT": "ម៉ោង\u200bពេលថ្ងៃ\u200bនៅ\u200bញូហ្វោនឡែន", "∅∅∅": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាម៉ាសូន", "HNCU": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bគុយបា", "EST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bកើត\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "EDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគខាង\u200bកើតនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "HKST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហុងកុង", "AWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "NZST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bនូវែលសេឡង់", "SAST": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bត្បូង", "WIT": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bកើត", "BT": "ម៉ោងនៅប៊ូតាន", "WEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "BOT": "ម៉ោង\u200bនៅ\u200bបូលីវី", "WART": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "MST": "MST", "ADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអាត្លង់ទិក", "COT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bកូឡុំប៊ី", "WITA": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200b\u200bកណ្ដាល", "CLT": "ម៉ោងស្តង់ដារនៅឈីលី", "WAT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bលិច", "OESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "MDT": "MDT", "CST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "CDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "UYST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "HNPM": "ម៉ោង\u200bស្តង់ដារ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "MESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "HENOMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "SGT": "ម៉ោង\u200bនៅ\u200bសិង្ហបូរី", "GMT": "ម៉ោងនៅគ្រីនវិច", "VET": "ម៉ោង\u200bនៅ\u200bវ៉េណេស៊ុយអេឡា", "PDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200b\u200bភាគ\u200bខាងលិច\u200bនៅ\u200bអាមេរិក\u200bភាគ\u200bខាង\u200bជើង", "CHAST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bចាថាំ", "IST": "ម៉ោង\u200bនៅ\u200bឥណ្ឌា", "ECT": "ម៉ោង\u200bនៅ\u200bអេក្វាទ័រ", "COST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bកូឡុំប៊ី", "AWST": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "GYT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន", "PST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bលិច\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "MEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "LHST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bឡត\u200bហៅ", "ACST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "HNOG": "ម៉ោងស្តង់ដារនៅហ្គ្រីនលែនខាងលិច", "ACWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "ART": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន", "TMST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bតួកម៉េនីស្ថាន\u200b", "WAST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាហ្វ្រិក\u200b\u200b\u200bខាងលិច", "OEZ": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "MYT": "ម៉ោង\u200bនៅ\u200bម៉ាឡេស៊ី", "HEPM": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "TMT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅតួកម៉េនីស្ថាន", "AKST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាឡាស្កា", "LHDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bឡតហៅ", "UYT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "SRT": "ម៉ោង\u200bនៅ\u200bសូរីណាម", "HEOG": "ម៉ោងរដូវក្តៅនៅហ្គ្រីនលែនខាងលិច", "AEST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "ChST": "ម៉ោង\u200bនៅ\u200bចាំម៉ូរ៉ូ", "HNNOMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "HNT": "ម៉ោង\u200b\u200bស្តង់ដារ\u200b\u200bនៅ\u200bញូហ្វោនឡែន", "CAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bកណ្ដាល", "EAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bកើត", "AKDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bអាឡាស្កា", "CHADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bចាថាំ", "JST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bជប៉ុន", "HNEG": "ម៉ោង\u200b\u200b\u200bស្តង់ដារ\u200bនៅ\u200b\u200bហ្គ្រីនលែន\u200bខាង\u200bកើត", "GFT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន\u200bបារាំង", "AST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាត្លង់ទិក", "ARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន", "WESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "AEDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "HEEG": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហ្គ្រីនលែនខាង\u200bកើត", "WARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "HECU": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bគុយបា"}, -+ timezones: map[string]string{"∅∅∅": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាម៉ាសូន", "AKST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាឡាស្កា", "HNOG": "ម៉ោងស្តង់ដារនៅហ្គ្រីនលែនខាងលិច", "ART": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន", "UYT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "EDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគខាង\u200bកើតនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "TMT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅតួកម៉េនីស្ថាន", "ADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអាត្លង់ទិក", "ACST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "ACWST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "WEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "GYT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន", "HAST": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "HNPM": "ម៉ោង\u200bស្តង់ដារ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "AST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាត្លង់ទិក", "HNEG": "ម៉ោង\u200b\u200b\u200bស្តង់ដារ\u200bនៅ\u200b\u200bហ្គ្រីនលែន\u200bខាង\u200bកើត", "HEPM": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "JDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅជប៉ុន", "ACWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "HECU": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bគុយបា", "OESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "HKST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហុងកុង", "TMST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bតួកម៉េនីស្ថាន\u200b", "ChST": "ម៉ោង\u200bនៅ\u200bចាំម៉ូរ៉ូ", "CHAST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bចាថាំ", "HNPMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "SRT": "ម៉ោង\u200bនៅ\u200bសូរីណាម", "JST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bជប៉ុន", "IST": "ម៉ោង\u200bនៅ\u200bឥណ្ឌា", "CHADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bចាថាំ", "GFT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន\u200bបារាំង", "EST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bកើត\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "MDT": "MDT", "NZST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bនូវែលសេឡង់", "WIB": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bលិច", "HENOMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "WAST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាហ្វ្រិក\u200b\u200b\u200bខាងលិច", "WIT": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bកើត", "CLST": "ម៉ោងរដូវក្តៅនៅឈីលី", "HADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "HAT": "ម៉ោង\u200bពេលថ្ងៃ\u200bនៅ\u200bញូហ្វោនឡែន", "COT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bកូឡុំប៊ី", "CAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bកណ្ដាល", "LHDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bឡតហៅ", "SAST": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bត្បូង", "HKT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bហុងកុង", "CST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "GMT": "ម៉ោងនៅគ្រីនវិច", "EAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bកើត", "LHST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bឡត\u200bហៅ", "WAT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bលិច", "CLT": "ម៉ោងស្តង់ដារនៅឈីលី", "CDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "MESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "BOT": "ម៉ោង\u200bនៅ\u200bបូលីវី", "AWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "OEZ": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "WART": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "COST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bកូឡុំប៊ី", "WITA": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200b\u200bកណ្ដាល", "MST": "MST", "NZDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bនូវែលសេឡង់", "MYT": "ម៉ោង\u200bនៅ\u200bម៉ាឡេស៊ី", "PST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bលិច\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "BT": "ម៉ោងនៅប៊ូតាន", "VET": "ម៉ោង\u200bនៅ\u200bវ៉េណេស៊ុយអេឡា", "AEDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "HEOG": "ម៉ោងរដូវក្តៅនៅហ្គ្រីនលែនខាងលិច", "ECT": "ម៉ោង\u200bនៅ\u200bអេក្វាទ័រ", "HEEG": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហ្គ្រីនលែនខាង\u200bកើត", "AWST": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "PDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200b\u200bភាគ\u200bខាងលិច\u200bនៅ\u200bអាមេរិក\u200bភាគ\u200bខាង\u200bជើង", "AEST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "AKDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bអាឡាស្កា", "WARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "ACDT": "ម៉ោង\u200bពេលថ្ងៃ\u200b\u200b\u200b\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "WESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "HNCU": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bគុយបា", "HEPMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "HNT": "ម៉ោង\u200b\u200bស្តង់ដារ\u200b\u200bនៅ\u200bញូហ្វោនឡែន", "ARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន", "MEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "HNNOMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "UYST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "SGT": "ម៉ោង\u200bនៅ\u200bសិង្ហបូរី"}, - } - } -  -diff --git a/km_KH/km_KH.go b/km_KH/km_KH.go -index b16312f..4ed8768 100644 ---- a/km_KH/km_KH.go -+++ b/km_KH/km_KH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type km_KH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'km_KH' locale - func New() locales.Translator { - return &km_KH{ -- locale: "km_KH", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "មករា", "កុម្ភៈ", "មីនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"}, -- monthsNarrow: []string{"", "ម", "ក", "ម", "ម", "ឧ", "ម", "ក", "ស", "ក", "ត", "វ", "ធ"}, -- monthsWide: []string{"", "មករា", "កុម្ភៈ", "មីនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"}, -- daysAbbreviated: []string{"អាទិត្យ", "ច័ន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"}, -- daysNarrow: []string{"អ", "ច", "អ", "ព", "ព", "ស", "ស"}, -- daysShort: []string{"អា", "ច", "អ", "ពុ", "ព្រ", "សុ", "ស"}, -- daysWide: []string{"អាទិត្យ", "ច័ន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"មុន គ.ស.", "គ.ស."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"មុន\u200bគ្រិស្តសករាជ", "គ្រិស្តសករាជ"}, -- timezones: map[string]string{"CHADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bចាថាំ", "SAST": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bត្បូង", "∅∅∅": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាម៉ាសូន", "WAT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bលិច", "WARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "AST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាត្លង់ទិក", "HEOG": "ម៉ោងរដូវក្តៅនៅហ្គ្រីនលែនខាងលិច", "COST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bកូឡុំប៊ី", "EST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bកើត\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "UYT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "WEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "HEPM": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "TMT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅតួកម៉េនីស្ថាន", "AKST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាឡាស្កា", "AKDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bអាឡាស្កា", "WIB": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bលិច", "ACWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "CLT": "ម៉ោងស្តង់ដារនៅឈីលី", "HNCU": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bគុយបា", "EDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគខាង\u200bកើតនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "HNOG": "ម៉ោងស្តង់ដារនៅហ្គ្រីនលែនខាងលិច", "HKT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bហុងកុង", "MEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "CHAST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bចាថាំ", "HEEG": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហ្គ្រីនលែនខាង\u200bកើត", "GFT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន\u200bបារាំង", "HNNOMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "SGT": "ម៉ោង\u200bនៅ\u200bសិង្ហបូរី", "SRT": "ម៉ោង\u200bនៅ\u200bសូរីណាម", "MESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "HADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "WIT": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bកើត", "WITA": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200b\u200bកណ្ដាល", "JST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bជប៉ុន", "HENOMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "GMT": "ម៉ោងនៅគ្រីនវិច", "NZST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bនូវែលសេឡង់", "IST": "ម៉ោង\u200bនៅ\u200bឥណ្ឌា", "CLST": "ម៉ោងរដូវក្តៅនៅឈីលី", "BOT": "ម៉ោង\u200bនៅ\u200bបូលីវី", "HNT": "ម៉ោង\u200b\u200bស្តង់ដារ\u200b\u200bនៅ\u200bញូហ្វោនឡែន", "ARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន", "NZDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bនូវែលសេឡង់", "HEPMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "AWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "LHST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bឡត\u200bហៅ", "MST": "MST", "ChST": "ម៉ោង\u200bនៅ\u200bចាំម៉ូរ៉ូ", "ACDT": "ម៉ោង\u200bពេលថ្ងៃ\u200b\u200b\u200b\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "PDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200b\u200bភាគ\u200bខាងលិច\u200bនៅ\u200bអាមេរិក\u200bភាគ\u200bខាង\u200bជើង", "AEST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "HNEG": "ម៉ោង\u200b\u200b\u200bស្តង់ដារ\u200bនៅ\u200b\u200bហ្គ្រីនលែន\u200bខាង\u200bកើត", "OESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "CDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "AEDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "TMST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bតួកម៉េនីស្ថាន\u200b", "WAST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាហ្វ្រិក\u200b\u200b\u200bខាងលិច", "UYST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "BT": "ម៉ោងនៅប៊ូតាន", "PST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bលិច\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "AWST": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "JDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅជប៉ុន", "HECU": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bគុយបា", "MDT": "MDT", "MYT": "ម៉ោង\u200bនៅ\u200bម៉ាឡេស៊ី", "VET": "ម៉ោង\u200bនៅ\u200bវ៉េណេស៊ុយអេឡា", "HNPM": "ម៉ោង\u200bស្តង់ដារ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "LHDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bឡតហៅ", "ACST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "EAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bកើត", "OEZ": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "ECT": "ម៉ោង\u200bនៅ\u200bអេក្វាទ័រ", "HNPMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "CST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "ADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអាត្លង់ទិក", "GYT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន", "HAST": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "HAT": "ម៉ោង\u200bពេលថ្ងៃ\u200bនៅ\u200bញូហ្វោនឡែន", "HKST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហុងកុង", "CAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bកណ្ដាល", "WART": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "COT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bកូឡុំប៊ី", "WESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "ACWST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "ART": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន"}, -+ locale: "km_KH", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWDT": "ACWDT", "COT": "COT", "EST": "EST", "NZST": "NZST", "MESZ": "MESZ", "ACDT": "ACDT", "LHST": "LHST", "CDT": "CDT", "ACST": "ACST", "HECU": "HECU", "TMT": "TMT", "HKT": "HKT", "HNEG": "HNEG", "WAST": "WAST", "GFT": "GFT", "HENOMX": "HENOMX", "PST": "PST", "SAST": "SAST", "GYT": "GYT", "HEOG": "HEOG", "WITA": "WITA", "ARST": "ARST", "AWST": "AWST", "WART": "WART", "HNT": "HNT", "WIT": "WIT", "ECT": "ECT", "SRT": "SRT", "AEDT": "AEDT", "WAT": "WAT", "JST": "JST", "BT": "BT", "ACWST": "ACWST", "WARST": "WARST", "ART": "ART", "MST": "MST", "MYT": "MYT", "AWDT": "AWDT", "HNPMX": "HNPMX", "TMST": "TMST", "OESZ": "OESZ", "GMT": "GMT", "ChST": "ChST", "CHAST": "CHAST", "CLT": "CLT", "HEEG": "HEEG", "PDT": "PDT", "HEPMX": "HEPMX", "UYST": "UYST", "SGT": "SGT", "VET": "VET", "OEZ": "OEZ", "HAT": "HAT", "AST": "AST", "HNPM": "HNPM", "UYT": "UYT", "CST": "CST", "HNOG": "HNOG", "CAT": "CAT", "CLST": "CLST", "WIB": "WIB", "BOT": "BOT", "EAT": "EAT", "JDT": "JDT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "IST": "IST", "WEZ": "WEZ", "COST": "COST", "ADT": "ADT", "HADT": "HADT", "HEPM": "HEPM", "EDT": "EDT", "HKST": "HKST", "NZDT": "NZDT", "HAST": "HAST", "MEZ": "MEZ", "AKST": "AKST", "AKDT": "AKDT", "HNNOMX": "HNNOMX", "AEST": "AEST", "WESZ": "WESZ", "MDT": "MDT", "LHDT": "LHDT", "HNCU": "HNCU"}, - } - } -  -@@ -117,7 +94,7 @@ func (km *km_KH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (km *km_KH) MonthsAbbreviated() []string { -- return km.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (km *km_KH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (km *km_KH) MonthsNarrow() []string { -- return km.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (km *km_KH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (km *km_KH) MonthsWide() []string { -- return km.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (km *km_KH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'km_KH' and handles both Whole and Real numbers based on 'v' - func (km *km_KH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, km.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, km.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, km.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'km_KH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (km *km_KH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, km.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, km.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, km.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'km_KH' -@@ -257,54 +174,7 @@ func (km *km_KH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := km.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, km.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, km.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, km.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, km.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'km_KH' -@@ -313,62 +183,7 @@ func (km *km_KH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := km.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, km.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, km.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, km.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, km.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, km.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'km_KH' -@@ -376,17 +191,6 @@ func (km *km_KH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -395,17 +199,6 @@ func (km *km_KH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, km.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -414,17 +207,6 @@ func (km *km_KH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, km.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +215,6 @@ func (km *km_KH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, km.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, km.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,28 +223,6 @@ func (km *km_KH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, km.periodsAbbreviated[0]...) -- } else { -- b = append(b, km.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -484,35 +231,6 @@ func (km *km_KH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, km.periodsAbbreviated[0]...) -- } else { -- b = append(b, km.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -521,40 +239,6 @@ func (km *km_KH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, km.periodsAbbreviated[0]...) -- } else { -- b = append(b, km.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -563,44 +247,5 @@ func (km *km_KH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, km.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, km.periodsAbbreviated[0]...) -- } else { -- b = append(b, km.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := km.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kn/kn.go b/kn/kn.go -index 2b5ac07..1eb4271 100644 ---- a/kn/kn.go -+++ b/kn/kn.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ಕ್ರಿ.ಪೂ", "ಕ್ರಿ.ಶ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ಕ್ರಿಸ್ತ ಪೂರ್ವ", "ಕ್ರಿಸ್ತ ಶಕ"}, -- timezones: map[string]string{"MDT": "ಮಕಾವ್ ಬೇಸಿಗೆ ಸಮಯ", "AKST": "ಅಲಸ್ಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "NZST": "ನ್ಯೂಜಿಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "NZDT": "ನ್ಯೂಜಿಲ್ಯಾಂಡ್ ಹಗಲು ಸಮಯ", "EST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೂರ್ವದ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNNOMX": "ವಾಯವ್ಯ ಮೆಕ್ಸಿಕೊ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNT": "ನ್ಯೂಫೌಂಡ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNOG": "ಪಶ್ಚಿಮ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AWDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪಶ್ಚಿಮ ಹಗಲು ಸಮಯ", "HNPM": "ಸೇಂಟ್ ಪಿಯರ್ ಮತ್ತು ಮಿಕ್ವೆಲನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "COT": "ಕೊಲಂಬಿಯಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "PDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೆಸಿಫಿಕ್ ದಿನದ ಸಮಯ", "WESZ": "ಪಶ್ಚಿಮ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "WITA": "ಮಧ್ಯ ಇಂಡೋನೇಷಿಯಾ ಸಮಯ", "WAST": "ಪಶ್ಚಿಮ ಆಫ್ರಿಕಾ ಬೇಸಿಗೆ ಸಮಯ", "CAT": "ಮಧ್ಯ ಆಫ್ರಿಕಾ ಸಮಯ", "HNPMX": "ಮೆಕ್ಸಿಕನ್ ಪೆಸಿಫಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಕೇಂದ್ರೀಯ ದಿನದ ಸಮಯ", "HAT": "ನ್ಯೂಫೌಂಡ್\u200cಲ್ಯಾಂಡ್ ದಿನದ ಸಮಯ", "ART": "ಅರ್ಜೆಂಟೀನಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "AEST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪೂರ್ವ ಪ್ರಮಾಣಿತ ಸಮಯ", "OEZ": "ಪೂರ್ವ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CST": "ಉತ್ತರ ಅಮೆರಿಕದ ಕೇಂದ್ರ ಪ್ರಮಾಣಿತ ಸಮಯ", "UYT": "ಉರುಗ್ವೇ ಪ್ರಮಾಣಿತ ಸಮಯ", "UYST": "ಉರುಗ್ವೇ ಬೇಸಿಗೆ ಸಮಯ", "WEZ": "ಪಶ್ಚಿಮ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AWST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪಶ್ಚಿಮ ಪ್ರಮಾಣಿತ ಸಮಯ", "GFT": "ಫ್ರೆಂಚ್ ಗಯಾನಾ ಸಮಯ", "OESZ": "ಪೂರ್ವ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "HAST": "ಹವಾಯಿ-ಅಲ್ಯುಟಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACWST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪಶ್ಚಿಮ ಪ್ರಮಾಣಿತ ಸಮಯ", "CHADT": "ಚಥಾಮ್ ಹಗಲು ಸಮಯ", "COST": "ಕೊಲಂಬಿಯಾ ಬೇಸಿಗೆ ಸಮಯ", "IST": "ಭಾರತೀಯ ಪ್ರಮಾಣಿತ ಸಮಯ", "CLT": "ಚಿಲಿ ಪ್ರಮಾಣಿತ ಸಮಯ", "CLST": "ಚಿಲಿ ಬೇಸಿಗೆ ಸಮಯ", "TMST": "ತುರ್ಕ್\u200cಮೇನಿಸ್ತಾನ್ ಬೇಸಿಗೆ ಸಮಯ", "ChST": "ಚಮೋರೋ ಪ್ರಮಾಣಿತ ಸಮಯ", "BOT": "ಬೊಲಿವಿಯಾ ಸಮಯ", "HNCU": "ಕ್ಯೂಬಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "HENOMX": "ವಾಯವ್ಯ ಮೆಕ್ಸಿಕೊ ಹಗಲು ಸಮಯ", "HEPMX": "ಮೆಕ್ಸಿಕನ್ ಪೆಸಿಫಿಕ್ ಹಗಲು ಸಮಯ", "GYT": "ಗಯಾನಾ ಸಮಯ", "HADT": "ಹವಾಯಿ-ಅಲ್ಯುಟಿಯನ್ ಹಗಲು ಸಮಯ", "ARST": "ಅರ್ಜೆಂಟಿನಾ ಬೇಸಿಗೆ ಸಮಯ", "∅∅∅": "ಪೆರು ಬೇಸಿಗೆ ಸಮಯ", "EDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೂರ್ವದ ದಿನದ ಸಮಯ", "MYT": "ಮಲೇಷಿಯಾ ಸಮಯ", "SRT": "ಸುರಿನೇಮ್ ಸಮಯ", "LHDT": "ಲಾರ್ಡ್ ಹೋವ್ ಬೆಳಗಿನ ಸಮಯ", "HEEG": "ಪೂರ್ವ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಬೇಸಿಗೆ ಸಮಯ", "HECU": "ಕ್ಯೂಬಾ ದಿನದ ಸಮಯ", "WARST": "ಪಶ್ಚಿಮ ಅರ್ಜೆಂಟೀನಾ ಬೇಸಿಗೆ ಸಮಯ", "BT": "ಭೂತಾನ್ ಸಮಯ", "ECT": "ಈಕ್ವೆಡಾರ್ ಸಮಯ", "AST": "ಅಟ್ಲಾಂಟಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AKDT": "\u200cಅಲಾಸ್ಕಾ ಹಗಲು ಸಮಯ", "WIT": "ಪೂರ್ವ ಇಂಡೋನೇಷಿಯಾ ಸಮಯ", "HEOG": "ಪಶ್ಚಿಮ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಬೇಸಿಗೆ ಸಮಯ", "JDT": "ಜಪಾನ್ ಹಗಲು ಸಮಯ", "TMT": "ತುರ್ಕ್\u200cಮೇನಿಸ್ತಾನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪ್ರಮಾಣಿತ ಸಮಯ", "MESZ": "ಮಧ್ಯ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "LHST": "ಲಾರ್ಡ್ ಹೋವ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACWDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪಶ್ಚಿಮ ಹಗಲು ಸಮಯ", "VET": "ವೆನಿಜುವೆಲಾ ಸಮಯ", "AEDT": "ಪೂರ್ವ ಆಸ್ಟ್ರೇಲಿಯಾದ ಹಗಲು ಸಮಯ", "WAT": "ಪಶ್ಚಿಮ ಆಫ್ರಿಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "MST": "ಮಕಾವ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "PST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೆಸಿಫಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "SAST": "ದಕ್ಷಿಣ ಆಫ್ರಿಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNEG": "ಪೂರ್ವ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "WART": "ಪಶ್ಚಿಮ ಅರ್ಜೆಂಟೀನಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "WIB": "ಪಶ್ಚಿಮ ಇಂಡೋನೇಷಿಯ ಸಮಯ", "HKST": "ಹಾಂಗ್ ಕಾಂಗ್ ಬೇಸಿಗೆ ಸಮಯ", "HEPM": "ಸೇಂಟ್ ಪಿಯರ್ ಮತ್ತು ಮಿಕ್ವೆಲನ್ ಹಗಲು ಸಮಯ", "MEZ": "ಮಧ್ಯ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "JST": "ಜಪಾನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "EAT": "ಪೂರ್ವ ಆಫ್ರಿಕಾ ಸಮಯ", "GMT": "ಗ್ರೀನ್\u200cವಿಚ್ ಸರಾಸರಿ ಕಾಲಮಾನ", "SGT": "ಸಿಂಗಾಪುರ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ADT": "ಅಟ್ಲಾಂಟಿಕ್ ದಿನದ ಸಮಯ", "HKT": "ಹಾಂಗ್ ಕಾಂಗ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CHAST": "ಚಥಾಮ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಹಗಲು ಸಮಯ"}, -+ timezones: map[string]string{"WART": "ಪಶ್ಚಿಮ ಅರ್ಜೆಂಟೀನಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "WIT": "ಪೂರ್ವ ಇಂಡೋನೇಷಿಯಾ ಸಮಯ", "TMT": "ತುರ್ಕ್\u200cಮೇನಿಸ್ತಾನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "PST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೆಸಿಫಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACWDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪಶ್ಚಿಮ ಹಗಲು ಸಮಯ", "∅∅∅": "ಏಕರ್ ಬೇಸಿಗೆ ಸಮಯ", "WESZ": "ಪಶ್ಚಿಮ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "AKST": "ಅಲಸ್ಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "GMT": "ಗ್ರೀನ್\u200cವಿಚ್ ಸರಾಸರಿ ಕಾಲಮಾನ", "CLST": "ಚಿಲಿ ಬೇಸಿಗೆ ಸಮಯ", "CAT": "ಮಧ್ಯ ಆಫ್ರಿಕಾ ಸಮಯ", "CDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಕೇಂದ್ರೀಯ ದಿನದ ಸಮಯ", "ACST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪ್ರಮಾಣಿತ ಸಮಯ", "LHST": "ಲಾರ್ಡ್ ಹೋವ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACWST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪಶ್ಚಿಮ ಪ್ರಮಾಣಿತ ಸಮಯ", "SAST": "ದಕ್ಷಿಣ ಆಫ್ರಿಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "TMST": "ತುರ್ಕ್\u200cಮೇನಿಸ್ತಾನ್ ಬೇಸಿಗೆ ಸಮಯ", "MDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪರ್ವತ ದಿನದ ಸಮಯ", "HEEG": "ಪೂರ್ವ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಬೇಸಿಗೆ ಸಮಯ", "HEPMX": "ಮೆಕ್ಸಿಕನ್ ಪೆಸಿಫಿಕ್ ಹಗಲು ಸಮಯ", "EST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೂರ್ವದ ಪ್ರಮಾಣಿತ ಸಮಯ", "WIB": "ಪಶ್ಚಿಮ ಇಂಡೋನೇಷಿಯ ಸಮಯ", "HADT": "ಹವಾಯಿ-ಅಲ್ಯುಟಿಯನ್ ಹಗಲು ಸಮಯ", "AEDT": "ಪೂರ್ವ ಆಸ್ಟ್ರೇಲಿಯಾದ ಹಗಲು ಸಮಯ", "HEOG": "ಪಶ್ಚಿಮ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಬೇಸಿಗೆ ಸಮಯ", "WITA": "ಮಧ್ಯ ಇಂಡೋನೇಷಿಯಾ ಸಮಯ", "EAT": "ಪೂರ್ವ ಆಫ್ರಿಕಾ ಸಮಯ", "BT": "ಭೂತಾನ್ ಸಮಯ", "OEZ": "ಪೂರ್ವ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "WARST": "ಪಶ್ಚಿಮ ಅರ್ಜೆಂಟೀನಾ ಬೇಸಿಗೆ ಸಮಯ", "CLT": "ಚಿಲಿ ಪ್ರಮಾಣಿತ ಸಮಯ", "ADT": "ಅಟ್ಲಾಂಟಿಕ್ ದಿನದ ಸಮಯ", "IST": "ಭಾರತೀಯ ಪ್ರಮಾಣಿತ ಸಮಯ", "WAST": "ಪಶ್ಚಿಮ ಆಫ್ರಿಕಾ ಬೇಸಿಗೆ ಸಮಯ", "COST": "ಕೊಲಂಬಿಯಾ ಬೇಸಿಗೆ ಸಮಯ", "NZDT": "ನ್ಯೂಜಿಲ್ಯಾಂಡ್ ಹಗಲು ಸಮಯ", "ChST": "ಚಮೋರೋ ಪ್ರಮಾಣಿತ ಸಮಯ", "HKST": "ಹಾಂಗ್ ಕಾಂಗ್ ಬೇಸಿಗೆ ಸಮಯ", "NZST": "ನ್ಯೂಜಿಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "BOT": "ಬೊಲಿವಿಯಾ ಸಮಯ", "ACDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಹಗಲು ಸಮಯ", "JST": "ಜಪಾನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "VET": "ವೆನಿಜುವೆಲಾ ಸಮಯ", "AKDT": "\u200cಅಲಾಸ್ಕಾ ಹಗಲು ಸಮಯ", "MESZ": "ಮಧ್ಯ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "AWDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪಶ್ಚಿಮ ಹಗಲು ಸಮಯ", "AEST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪೂರ್ವ ಪ್ರಮಾಣಿತ ಸಮಯ", "CHADT": "ಚಥಾಮ್ ಹಗಲು ಸಮಯ", "HNCU": "ಕ್ಯೂಬಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "UYST": "ಉರುಗ್ವೇ ಬೇಸಿಗೆ ಸಮಯ", "HNT": "ನ್ಯೂಫೌಂಡ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HAT": "ನ್ಯೂಫೌಂಡ್\u200cಲ್ಯಾಂಡ್ ದಿನದ ಸಮಯ", "HKT": "ಹಾಂಗ್ ಕಾಂಗ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AST": "ಅಟ್ಲಾಂಟಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "MST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪರ್ವತ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNEG": "ಪೂರ್ವ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "UYT": "ಉರುಗ್ವೇ ಪ್ರಮಾಣಿತ ಸಮಯ", "HECU": "ಕ್ಯೂಬಾ ದಿನದ ಸಮಯ", "COT": "ಕೊಲಂಬಿಯಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "WAT": "ಪಶ್ಚಿಮ ಆಫ್ರಿಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "SRT": "ಸುರಿನೇಮ್ ಸಮಯ", "HAST": "ಹವಾಯಿ-ಅಲ್ಯುಟಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "LHDT": "ಲಾರ್ಡ್ ಹೋವ್ ಬೆಳಗಿನ ಸಮಯ", "JDT": "ಜಪಾನ್ ಹಗಲು ಸಮಯ", "HNPMX": "ಮೆಕ್ಸಿಕನ್ ಪೆಸಿಫಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNPM": "ಸೇಂಟ್ ಪಿಯರ್ ಮತ್ತು ಮಿಕ್ವೆಲನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "GFT": "ಫ್ರೆಂಚ್ ಗಯಾನಾ ಸಮಯ", "GYT": "ಗಯಾನಾ ಸಮಯ", "ECT": "ಈಕ್ವೆಡಾರ್ ಸಮಯ", "HNNOMX": "ವಾಯವ್ಯ ಮೆಕ್ಸಿಕೊ ಪ್ರಮಾಣಿತ ಸಮಯ", "MEZ": "ಮಧ್ಯ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "MYT": "ಮಲೇಷಿಯಾ ಸಮಯ", "PDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೆಸಿಫಿಕ್ ದಿನದ ಸಮಯ", "CHAST": "ಚಥಾಮ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ART": "ಅರ್ಜೆಂಟೀನಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "ARST": "ಅರ್ಜೆಂಟಿನಾ ಬೇಸಿಗೆ ಸಮಯ", "HEPM": "ಸೇಂಟ್ ಪಿಯರ್ ಮತ್ತು ಮಿಕ್ವೆಲನ್ ಹಗಲು ಸಮಯ", "AWST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪಶ್ಚಿಮ ಪ್ರಮಾಣಿತ ಸಮಯ", "SGT": "ಸಿಂಗಾಪುರ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "WEZ": "ಪಶ್ಚಿಮ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CST": "ಉತ್ತರ ಅಮೆರಿಕದ ಕೇಂದ್ರ ಪ್ರಮಾಣಿತ ಸಮಯ", "HENOMX": "ವಾಯವ್ಯ ಮೆಕ್ಸಿಕೊ ಹಗಲು ಸಮಯ", "OESZ": "ಪೂರ್ವ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "HNOG": "ಪಶ್ಚಿಮ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "EDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೂರ್ವದ ದಿನದ ಸಮಯ"}, - } - } -  -diff --git a/kn_IN/kn_IN.go b/kn_IN/kn_IN.go -index 41dd4fa..c2d6589 100644 ---- a/kn_IN/kn_IN.go -+++ b/kn_IN/kn_IN.go -@@ -42,32 +42,13 @@ type kn_IN struct { - // New returns a new instance of translator for the 'kn_IN' locale - func New() locales.Translator { - return &kn_IN{ -- locale: "kn_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ಜನ", "ಫೆಬ್ರ", "ಮಾರ್ಚ್", "ಏಪ್ರಿ", "ಮೇ", "ಜೂನ್", "ಜುಲೈ", "ಆಗ", "ಸೆಪ್ಟೆಂ", "ಅಕ್ಟೋ", "ನವೆಂ", "ಡಿಸೆಂ"}, -- monthsNarrow: []string{"", "ಜ", "ಫೆ", "ಮಾ", "ಏ", "ಮೇ", "ಜೂ", "ಜು", "ಆ", "ಸೆ", "ಅ", "ನ", "ಡಿ"}, -- monthsWide: []string{"", "ಜನವರಿ", "ಫೆಬ್ರವರಿ", "ಮಾರ್ಚ್", "ಏಪ್ರಿಲ್", "ಮೇ", "ಜೂನ್", "ಜುಲೈ", "ಆಗಸ್ಟ್", "ಸೆಪ್ಟೆಂಬರ್", "ಅಕ್ಟೋಬರ್", "ನವೆಂಬರ್", "ಡಿಸೆಂಬರ್"}, -- daysAbbreviated: []string{"ಭಾನು", "ಸೋಮ", "ಮಂಗಳ", "ಬುಧ", "ಗುರು", "ಶುಕ್ರ", "ಶನಿ"}, -- daysNarrow: []string{"ಭಾ", "ಸೋ", "ಮಂ", "ಬು", "ಗು", "ಶು", "ಶ"}, -- daysShort: []string{"ಭಾನು", "ಸೋಮ", "ಮಂಗಳ", "ಬುಧ", "ಗುರು", "ಶುಕ್ರ", "ಶನಿ"}, -- daysWide: []string{"ಭಾನುವಾರ", "ಸೋಮವಾರ", "ಮಂಗಳವಾರ", "ಬುಧವಾರ", "ಗುರುವಾರ", "ಶುಕ್ರವಾರ", "ಶನಿವಾರ"}, -- periodsAbbreviated: []string{"ಪೂರ್ವಾಹ್ನ", "ಅಪರಾಹ್ನ"}, -- periodsNarrow: []string{"ಪೂ", "ಅ"}, -- periodsWide: []string{"ಪೂರ್ವಾಹ್ನ", "ಅಪರಾಹ್ನ"}, -- erasAbbreviated: []string{"ಕ್ರಿ.ಪೂ", "ಕ್ರಿ.ಶ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ಕ್ರಿಸ್ತ ಪೂರ್ವ", "ಕ್ರಿಸ್ತ ಶಕ"}, -- timezones: map[string]string{"HNT": "ನ್ಯೂಫೌಂಡ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "MESZ": "ಮಧ್ಯ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "CLST": "ಚಿಲಿ ಬೇಸಿಗೆ ಸಮಯ", "HNEG": "ಪೂರ್ವ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CAT": "ಮಧ್ಯ ಆಫ್ರಿಕಾ ಸಮಯ", "GMT": "ಗ್ರೀನ್\u200cವಿಚ್ ಸರಾಸರಿ ಕಾಲಮಾನ", "SGT": "ಸಿಂಗಾಪುರ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "WIB": "ಪಶ್ಚಿಮ ಇಂಡೋನೇಷಿಯ ಸಮಯ", "ADT": "ಅಟ್ಲಾಂಟಿಕ್ ದಿನದ ಸಮಯ", "UYST": "ಉರುಗ್ವೇ ಬೇಸಿಗೆ ಸಮಯ", "CDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಕೇಂದ್ರೀಯ ದಿನದ ಸಮಯ", "HADT": "ಹವಾಯಿ-ಅಲ್ಯುಟಿಯನ್ ಹಗಲು ಸಮಯ", "ARST": "ಅರ್ಜೆಂಟಿನಾ ಬೇಸಿಗೆ ಸಮಯ", "HKST": "ಹಾಂಗ್ ಕಾಂಗ್ ಬೇಸಿಗೆ ಸಮಯ", "HEEG": "ಪೂರ್ವ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಬೇಸಿಗೆ ಸಮಯ", "OESZ": "ಪೂರ್ವ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "HAST": "ಹವಾಯಿ-ಅಲ್ಯುಟಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNPM": "ಸೇಂಟ್ ಪಿಯರ್ ಮತ್ತು ಮಿಕ್ವೆಲನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNNOMX": "ವಾಯವ್ಯ ಮೆಕ್ಸಿಕೊ ಪ್ರಮಾಣಿತ ಸಮಯ", "EDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೂರ್ವದ ದಿನದ ಸಮಯ", "HNPMX": "ಮೆಕ್ಸಿಕನ್ ಪೆಸಿಫಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AKDT": "\u200cಅಲಾಸ್ಕಾ ಹಗಲು ಸಮಯ", "SRT": "ಸುರಿನೇಮ್ ಸಮಯ", "ECT": "ಈಕ್ವೆಡಾರ್ ಸಮಯ", "UYT": "ಉರುಗ್ವೇ ಪ್ರಮಾಣಿತ ಸಮಯ", "WIT": "ಪೂರ್ವ ಇಂಡೋನೇಷಿಯಾ ಸಮಯ", "AEST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪೂರ್ವ ಪ್ರಮಾಣಿತ ಸಮಯ", "BOT": "ಬೊಲಿವಿಯಾ ಸಮಯ", "EST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೂರ್ವದ ಪ್ರಮಾಣಿತ ಸಮಯ", "ART": "ಅರ್ಜೆಂಟೀನಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACWDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪಶ್ಚಿಮ ಹಗಲು ಸಮಯ", "HKT": "ಹಾಂಗ್ ಕಾಂಗ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪ್ರಮಾಣಿತ ಸಮಯ", "WAT": "ಪಶ್ಚಿಮ ಆಫ್ರಿಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "ACWST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಪಶ್ಚಿಮ ಪ್ರಮಾಣಿತ ಸಮಯ", "CHADT": "ಚಥಾಮ್ ಹಗಲು ಸಮಯ", "∅∅∅": "ಅಮೆಜಾನ್ ಬೇಸಿಗೆ ಸಮಯ", "TMT": "ತುರ್ಕ್\u200cಮೇನಿಸ್ತಾನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "OEZ": "ಪೂರ್ವ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "GYT": "ಗಯಾನಾ ಸಮಯ", "HEOG": "ಪಶ್ಚಿಮ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಬೇಸಿಗೆ ಸಮಯ", "LHDT": "ಲಾರ್ಡ್ ಹೋವ್ ಬೆಳಗಿನ ಸಮಯ", "JST": "ಜಪಾನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AST": "ಅಟ್ಲಾಂಟಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HNOG": "ಪಶ್ಚಿಮ ಗ್ರೀನ್\u200cಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "HEPM": "ಸೇಂಟ್ ಪಿಯರ್ ಮತ್ತು ಮಿಕ್ವೆಲನ್ ಹಗಲು ಸಮಯ", "TMST": "ತುರ್ಕ್\u200cಮೇನಿಸ್ತಾನ್ ಬೇಸಿಗೆ ಸಮಯ", "BT": "ಭೂತಾನ್ ಸಮಯ", "PDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೆಸಿಫಿಕ್ ದಿನದ ಸಮಯ", "HAT": "ನ್ಯೂಫೌಂಡ್\u200cಲ್ಯಾಂಡ್ ದಿನದ ಸಮಯ", "AWDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪಶ್ಚಿಮ ಹಗಲು ಸಮಯ", "JDT": "ಜಪಾನ್ ಹಗಲು ಸಮಯ", "WAST": "ಪಶ್ಚಿಮ ಆಫ್ರಿಕಾ ಬೇಸಿಗೆ ಸಮಯ", "COST": "ಕೊಲಂಬಿಯಾ ಬೇಸಿಗೆ ಸಮಯ", "HENOMX": "ವಾಯವ್ಯ ಮೆಕ್ಸಿಕೊ ಹಗಲು ಸಮಯ", "MST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪರ್ವತ ಪ್ರಮಾಣಿತ ಸಮಯ", "MYT": "ಮಲೇಷಿಯಾ ಸಮಯ", "CST": "ಉತ್ತರ ಅಮೆರಿಕದ ಕೇಂದ್ರ ಪ್ರಮಾಣಿತ ಸಮಯ", "AEDT": "ಪೂರ್ವ ಆಸ್ಟ್ರೇಲಿಯಾದ ಹಗಲು ಸಮಯ", "NZDT": "ನ್ಯೂಜಿಲ್ಯಾಂಡ್ ಹಗಲು ಸಮಯ", "ACDT": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಕೇಂದ್ರ ಹಗಲು ಸಮಯ", "EAT": "ಪೂರ್ವ ಆಫ್ರಿಕಾ ಸಮಯ", "HEPMX": "ಮೆಕ್ಸಿಕನ್ ಪೆಸಿಫಿಕ್ ಹಗಲು ಸಮಯ", "VET": "ವೆನಿಜುವೆಲಾ ಸಮಯ", "LHST": "ಲಾರ್ಡ್ ಹೋವ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "IST": "ಭಾರತೀಯ ಪ್ರಮಾಣಿತ ಸಮಯ", "WARST": "ಪಶ್ಚಿಮ ಅರ್ಜೆಂಟೀನಾ ಬೇಸಿಗೆ ಸಮಯ", "AKST": "ಅಲಸ್ಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "WEZ": "ಪಶ್ಚಿಮ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CHAST": "ಚಥಾಮ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "AWST": "ಆಸ್ಟ್ರೇಲಿಯಾದ ಪಶ್ಚಿಮ ಪ್ರಮಾಣಿತ ಸಮಯ", "PST": "ಉತ್ತರ ಅಮೆರಿಕದ ಪೆಸಿಫಿಕ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "NZST": "ನ್ಯೂಜಿಲ್ಯಾಂಡ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "CLT": "ಚಿಲಿ ಪ್ರಮಾಣಿತ ಸಮಯ", "ChST": "ಚಮೋರೋ ಪ್ರಮಾಣಿತ ಸಮಯ", "COT": "ಕೊಲಂಬಿಯಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "MDT": "ಉತ್ತರ ಅಮೆರಿಕದ ಪರ್ವತ ದಿನದ ಸಮಯ", "MEZ": "ಮಧ್ಯ ಯುರೋಪಿಯನ್ ಪ್ರಮಾಣಿತ ಸಮಯ", "GFT": "ಫ್ರೆಂಚ್ ಗಯಾನಾ ಸಮಯ", "HNCU": "ಕ್ಯೂಬಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "WESZ": "ಪಶ್ಚಿಮ ಯುರೋಪಿಯನ್ ಬೇಸಿಗೆ ಸಮಯ", "SAST": "ದಕ್ಷಿಣ ಆಫ್ರಿಕಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "WART": "ಪಶ್ಚಿಮ ಅರ್ಜೆಂಟೀನಾ ಪ್ರಮಾಣಿತ ಸಮಯ", "HECU": "ಕ್ಯೂಬಾ ದಿನದ ಸಮಯ", "WITA": "ಮಧ್ಯ ಇಂಡೋನೇಷಿಯಾ ಸಮಯ"}, -+ locale: "kn_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPM": "HNPM", "CHADT": "CHADT", "ChST": "ChST", "ACWST": "ACWST", "AEDT": "AEDT", "SGT": "SGT", "ACDT": "ACDT", "HNEG": "HNEG", "WAT": "WAT", "OESZ": "OESZ", "HNT": "HNT", "WIT": "WIT", "CST": "CST", "ACST": "ACST", "MYT": "MYT", "BT": "BT", "HEPMX": "HEPMX", "WESZ": "WESZ", "GFT": "GFT", "GYT": "GYT", "ADT": "ADT", "JST": "JST", "IST": "IST", "AKST": "AKST", "AKDT": "AKDT", "AST": "AST", "MESZ": "MESZ", "HEPM": "HEPM", "LHST": "LHST", "PDT": "PDT", "HNPMX": "HNPMX", "HNOG": "HNOG", "HKST": "HKST", "CAT": "CAT", "AWDT": "AWDT", "AEST": "AEST", "PST": "PST", "WAST": "WAST", "EDT": "EDT", "MDT": "MDT", "NZST": "NZST", "WART": "WART", "COT": "COT", "TMT": "TMT", "WITA": "WITA", "ARST": "ARST", "JDT": "JDT", "CHAST": "CHAST", "HECU": "HECU", "NZDT": "NZDT", "SRT": "SRT", "HEOG": "HEOG", "CDT": "CDT", "HENOMX": "HENOMX", "HADT": "HADT", "AWST": "AWST", "HNCU": "HNCU", "WARST": "WARST", "SAST": "SAST", "COST": "COST", "EST": "EST", "ECT": "ECT", "WEZ": "WEZ", "OEZ": "OEZ", "ART": "ART", "ACWDT": "ACWDT", "VET": "VET", "MST": "MST", "GMT": "GMT", "HEEG": "HEEG", "UYT": "UYT", "UYST": "UYST", "CLT": "CLT", "CLST": "CLST", "HAST": "HAST", "BOT": "BOT", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "HAT": "HAT", "HKT": "HKT", "TMST": "TMST", "WIB": "WIB", "EAT": "EAT"}, - } - } -  -@@ -132,7 +113,7 @@ func (kn *kn_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kn *kn_IN) MonthsAbbreviated() []string { -- return kn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -142,7 +123,7 @@ func (kn *kn_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (kn *kn_IN) MonthsNarrow() []string { -- return kn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -152,7 +133,7 @@ func (kn *kn_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kn *kn_IN) MonthsWide() []string { -- return kn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -198,73 +179,13 @@ func (kn *kn_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'kn_IN' and handles both Whole and Real numbers based on 'v' - func (kn *kn_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'kn_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (kn *kn_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, kn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'kn_IN' -@@ -272,56 +193,7 @@ func (kn *kn_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kn.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, kn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kn_IN' -@@ -330,64 +202,7 @@ func (kn *kn_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kn.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, kn.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kn_IN' -@@ -395,17 +210,6 @@ func (kn *kn_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -414,17 +218,6 @@ func (kn *kn_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,17 +226,6 @@ func (kn *kn_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,19 +234,6 @@ func (kn *kn_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, kn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,32 +242,6 @@ func (kn *kn_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kn.periodsAbbreviated[0]...) -- } else { -- b = append(b, kn.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -507,39 +250,6 @@ func (kn *kn_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kn.periodsAbbreviated[0]...) -- } else { -- b = append(b, kn.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -548,44 +258,6 @@ func (kn *kn_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kn.periodsAbbreviated[0]...) -- } else { -- b = append(b, kn.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -594,48 +266,5 @@ func (kn *kn_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- if h < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kn.periodsAbbreviated[0]...) -- } else { -- b = append(b, kn.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ko/ko.go b/ko/ko.go -index ff6969c..f6aa1a0 100644 ---- a/ko/ko.go -+++ b/ko/ko.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"기원전", "서기"}, -- timezones: map[string]string{"HADT": "하와이 알류샨 하계 표준시", "WEZ": "서유럽 표준시", "AWST": "오스트레일리아 서부 표준시", "LHDT": "로드 하우 하계 표준시", "NZDT": "뉴질랜드 하계 표준시", "WART": "아르헨티나 서부 표준시", "WARST": "아르헨티나 서부 하계 표준시", "UYST": "우루과이 하계 표준시", "AEST": "오스트레일리아 동부 표준시", "JST": "일본 표준시", "MYT": "말레이시아 시간", "VET": "베네수엘라 시간", "ARST": "아르헨티나 하계 표준시", "CLST": "칠레 하계 표준시", "HEEG": "그린란드 동부 하계 표준시", "TMT": "투르크메니스탄 표준시", "UYT": "우루과이 표준시", "AWDT": "오스트레일리아 서부 하계 표준시", "MESZ": "중부 유럽 하계 표준시", "BOT": "볼리비아 시간", "EAT": "동아프리카 시간", "WITA": "중부 인도네시아 시간", "IST": "인도 표준시", "HNT": "뉴펀들랜드 표준시", "LHST": "로드 하우 표준시", "CAT": "중앙아프리카 시간", "HECU": "쿠바 하계 표준시", "MST": "마카오 표준 시간", "CLT": "칠레 표준시", "HNEG": "그린란드 동부 표준시", "ChST": "차모로 시간", "∅∅∅": "페루 하계 표준시", "WESZ": "서유럽 하계 표준시", "PDT": "미 태평양 하계 표준시", "HKT": "홍콩 표준시", "ACDT": "오스트레일리아 중부 하계 표준시", "GMT": "그리니치 표준시", "HNOG": "그린란드 서부 표준시", "EDT": "미 동부 하계 표준시", "MEZ": "중부 유럽 표준시", "ACST": "오스트레일리아 중부 표준시", "COST": "콜롬비아 하계 표준시", "HENOMX": "멕시코 북서부 하계 표준시", "OEZ": "동유럽 표준시", "COT": "콜롬비아 표준시", "ART": "아르헨티나 표준시", "PST": "미 태평양 표준시", "SAST": "남아프리카 시간", "ECT": "에콰도르 시간", "HNNOMX": "멕시코 북서부 표준시", "WIT": "동부 인도네시아 시간", "CDT": "미 중부 하계 표준시", "GYT": "가이아나 시간", "GFT": "프랑스령 가이아나 시간", "TMST": "투르크메니스탄 하계 표준시", "MDT": "마카오 하계 표준시", "HNPMX": "멕시코 태평양 표준시", "AKDT": "알래스카 하계 표준시", "CHAST": "채텀 표준시", "JDT": "일본 하계 표준시", "HEPMX": "멕시코 태평양 하계 표준시", "AST": "대서양 표준시", "NZST": "뉴질랜드 표준시", "HKST": "홍콩 하계 표준시", "AEDT": "오스트레일리아 동부 하계 표준시", "HEPM": "세인트피에르 미클롱 하계 표준시", "WAST": "서아프리카 하계 표준시", "ACWST": "오스트레일리아 중서부 표준시", "HAT": "뉴펀들랜드 하계 표준시", "HEOG": "그린란드 서부 하계 표준시", "WAT": "서아프리카 표준시", "HNCU": "쿠바 표준시", "ADT": "미 대서양 하계 표준시", "CST": "미 중부 표준시", "BT": "부탄 시간", "ACWDT": "오스트레일리아 중서부 하계 표준시", "CHADT": "채텀 하계 표준시", "OESZ": "동유럽 하계 표준시", "SGT": "싱가포르 표준시", "AKST": "알래스카 표준시", "SRT": "수리남 시간", "HNPM": "세인트피에르 미클롱 표준시", "EST": "미 동부 표준시", "WIB": "서부 인도네시아 시간", "HAST": "하와이 알류샨 표준시"}, -+ timezones: map[string]string{"HAST": "하와이 알류샨 표준시", "PST": "미 태평양 표준시", "GFT": "프랑스령 가이아나 시간", "HAT": "뉴펀들랜드 하계 표준시", "EDT": "미 동부 하계 표준시", "CLT": "칠레 표준시", "NZDT": "뉴질랜드 하계 표준시", "BOT": "볼리비아 시간", "AWDT": "오스트레일리아 서부 하계 표준시", "HEEG": "그린란드 동부 하계 표준시", "LHST": "로드 하우 표준시", "OEZ": "동유럽 표준시", "COST": "콜롬비아 하계 표준시", "AWST": "오스트레일리아 서부 표준시", "WESZ": "서유럽 하계 표준시", "WART": "아르헨티나 서부 표준시", "HNOG": "그린란드 서부 표준시", "ChST": "차모로 시간", "SRT": "수리남 시간", "LHDT": "로드 하우 하계 표준시", "ACWST": "오스트레일리아 중서부 표준시", "OESZ": "동유럽 하계 표준시", "WIB": "서부 인도네시아 시간", "NZST": "뉴질랜드 표준시", "ACST": "오스트레일리아 중부 표준시", "AEDT": "오스트레일리아 동부 하계 표준시", "HECU": "쿠바 하계 표준시", "COT": "콜롬비아 표준시", "ECT": "에콰도르 시간", "HNEG": "그린란드 동부 표준시", "JST": "일본 표준시", "HNT": "뉴펀들랜드 표준시", "WARST": "아르헨티나 서부 하계 표준시", "HEOG": "그린란드 서부 하계 표준시", "EST": "미 동부 표준시", "HKST": "홍콩 하계 표준시", "TMST": "투르크메니스탄 하계 표준시", "AST": "대서양 표준시", "UYST": "우루과이 하계 표준시", "HADT": "하와이 알류샨 하계 표준시", "GYT": "가이아나 시간", "GMT": "그리니치 표준시", "CHADT": "채텀 하계 표준시", "HEPMX": "멕시코 태평양 하계 표준시", "WIT": "동부 인도네시아 시간", "ADT": "미 대서양 하계 표준시", "EAT": "동아프리카 시간", "HNNOMX": "멕시코 북서부 표준시", "HENOMX": "멕시코 북서부 하계 표준시", "HNPM": "세인트피에르 미클롱 표준시", "HNPMX": "멕시코 태평양 표준시", "WEZ": "서유럽 표준시", "SGT": "싱가포르 표준시", "VET": "베네수엘라 시간", "AKDT": "알래스카 하계 표준시", "ART": "아르헨티나 표준시", "ACDT": "오스트레일리아 중부 하계 표준시", "MYT": "말레이시아 시간", "TMT": "투르크메니스탄 표준시", "CST": "미 중부 표준시", "CDT": "미 중부 하계 표준시", "MESZ": "중부 유럽 하계 표준시", "SAST": "남아프리카 시간", "HNCU": "쿠바 표준시", "AKST": "알래스카 표준시", "∅∅∅": "아크레 하계 표준시", "HKT": "홍콩 표준시", "CAT": "중앙아프리카 시간", "CLST": "칠레 하계 표준시", "BT": "부탄 시간", "PDT": "미 태평양 하계 표준시", "MEZ": "중부 유럽 표준시", "HEPM": "세인트피에르 미클롱 하계 표준시", "IST": "인도 표준시", "WAT": "서아프리카 표준시", "WAST": "서아프리카 하계 표준시", "MST": "마카오 표준 시간", "ARST": "아르헨티나 하계 표준시", "JDT": "일본 하계 표준시", "CHAST": "채텀 표준시", "UYT": "우루과이 표준시", "ACWDT": "오스트레일리아 중서부 하계 표준시", "WITA": "중부 인도네시아 시간", "MDT": "마카오 하계 표준시", "AEST": "오스트레일리아 동부 표준시"}, - } - } -  -diff --git a/ko_KP/ko_KP.go b/ko_KP/ko_KP.go -index ca00900..37afaac 100644 ---- a/ko_KP/ko_KP.go -+++ b/ko_KP/ko_KP.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ko_KP struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ko_KP' locale - func New() locales.Translator { - return &ko_KP{ -- locale: "ko_KP", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"}, -- monthsNarrow: []string{"", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"}, -- monthsWide: []string{"", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"}, -- daysAbbreviated: []string{"일", "월", "화", "수", "목", "금", "토"}, -- daysNarrow: []string{"일", "월", "화", "수", "목", "금", "토"}, -- daysShort: []string{"일", "월", "화", "수", "목", "금", "토"}, -- daysWide: []string{"일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"오전", "오후"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"기원전", "서기"}, -- timezones: map[string]string{"AKST": "알래스카 표준시", "MYT": "말레이시아 시간", "GFT": "프랑스령 가이아나 시간", "ChST": "차모로 시간", "GMT": "그리니치 표준시", "EAT": "동아프리카 시간", "HKST": "홍콩 하계 표준시", "ART": "아르헨티나 표준시", "HNOG": "그린란드 서부 표준시", "AWDT": "오스트레일리아 서부 하계 표준시", "IST": "인도 표준시", "HEEG": "그린란드 동부 하계 표준시", "TMT": "투르크메니스탄 표준시", "ACDT": "오스트레일리아 중부 하계 표준시", "HAST": "하와이 알류샨 표준시", "MEZ": "중부 유럽 표준시", "SAST": "남아프리카 시간", "WAT": "서아프리카 표준시", "AST": "대서양 표준시", "ACWST": "오스트레일리아 중서부 표준시", "NZST": "뉴질랜드 표준시", "UYST": "우루과이 하계 표준시", "WESZ": "서유럽 하계 표준시", "HAT": "뉴펀들랜드 하계 표준시", "TMST": "투르크메니스탄 하계 표준시", "CAT": "중앙아프리카 시간", "HENOMX": "멕시코 북서부 하계 표준시", "CDT": "미 중부 하계 표준시", "OEZ": "동유럽 표준시", "∅∅∅": "페루 하계 표준시", "AEST": "오스트레일리아 동부 표준시", "SRT": "수리남 시간", "AEDT": "오스트레일리아 동부 하계 표준시", "HEPM": "세인트피에르 미클롱 하계 표준시", "CHADT": "채텀 하계 표준시", "JDT": "일본 하계 표준시", "WART": "아르헨티나 서부 표준시", "HECU": "쿠바 하계 표준시", "WIT": "동부 인도네시아 시간", "HADT": "하와이 알류샨 하계 표준시", "LHDT": "로드 하우 하계 표준시", "CHAST": "채텀 표준시", "CLST": "칠레 하계 표준시", "BOT": "볼리비아 시간", "SGT": "싱가포르 표준시", "MST": "마카오 표준 시간", "WIB": "서부 인도네시아 시간", "PST": "미 태평양 표준시", "CLT": "칠레 표준시", "HNPMX": "멕시코 태평양 표준시", "EST": "미 동부 표준시", "UYT": "우루과이 표준시", "ARST": "아르헨티나 하계 표준시", "WEZ": "서유럽 표준시", "ACWDT": "오스트레일리아 중서부 하계 표준시", "WITA": "중부 인도네시아 시간", "LHST": "로드 하우 표준시", "WAST": "서아프리카 하계 표준시", "MDT": "마카오 하계 표준시", "EDT": "미 동부 하계 표준시", "BT": "부탄 시간", "NZDT": "뉴질랜드 하계 표준시", "MESZ": "중부 유럽 하계 표준시", "JST": "일본 표준시", "AWST": "오스트레일리아 서부 표준시", "HNEG": "그린란드 동부 표준시", "ACST": "오스트레일리아 중부 표준시", "HNNOMX": "멕시코 북서부 표준시", "AKDT": "알래스카 하계 표준시", "HNT": "뉴펀들랜드 표준시", "PDT": "미 태평양 하계 표준시", "HNPM": "세인트피에르 미클롱 표준시", "WARST": "아르헨티나 서부 하계 표준시", "HEPMX": "멕시코 태평양 하계 표준시", "CST": "미 중부 표준시", "ADT": "미 대서양 하계 표준시", "HEOG": "그린란드 서부 하계 표준시", "OESZ": "동유럽 하계 표준시", "ECT": "에콰도르 시간", "COST": "콜롬비아 하계 표준시", "GYT": "가이아나 시간", "COT": "콜롬비아 표준시", "HNCU": "쿠바 표준시", "VET": "베네수엘라 시간", "HKT": "홍콩 표준시"}, -+ locale: "ko_KP", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEOG": "HEOG", "GYT": "GYT", "CLT": "CLT", "JST": "JST", "WARST": "WARST", "COT": "COT", "NZST": "NZST", "CST": "CST", "AST": "AST", "GMT": "GMT", "JDT": "JDT", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "HKST": "HKST", "ACDT": "ACDT", "ACWST": "ACWST", "CHADT": "CHADT", "WAT": "WAT", "COST": "COST", "AKST": "AKST", "WIT": "WIT", "TMST": "TMST", "CAT": "CAT", "AEST": "AEST", "VET": "VET", "HNPMX": "HNPMX", "ARST": "ARST", "BOT": "BOT", "HEEG": "HEEG", "LHST": "LHST", "WEZ": "WEZ", "SGT": "SGT", "EAT": "EAT", "HEPM": "HEPM", "HNCU": "HNCU", "ART": "ART", "AWST": "AWST", "ACST": "ACST", "UYT": "UYT", "AKDT": "AKDT", "EST": "EST", "HECU": "HECU", "HADT": "HADT", "MESZ": "MESZ", "MYT": "MYT", "IST": "IST", "EDT": "EDT", "ADT": "ADT", "OESZ": "OESZ", "MST": "MST", "ChST": "ChST", "MEZ": "MEZ", "HNPM": "HNPM", "ACWDT": "ACWDT", "WESZ": "WESZ", "WAST": "WAST", "UYST": "UYST", "WITA": "WITA", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "AEDT": "AEDT", "PDT": "PDT", "HEPMX": "HEPMX", "HKT": "HKT", "HENOMX": "HENOMX", "CLST": "CLST", "MDT": "MDT", "HNOG": "HNOG", "SAST": "SAST", "TMT": "TMT", "ECT": "ECT", "WIB": "WIB", "CDT": "CDT", "HNT": "HNT", "WART": "WART", "HNEG": "HNEG", "PST": "PST", "HAST": "HAST", "BT": "BT", "GFT": "GFT", "HAT": "HAT", "AWDT": "AWDT", "CHAST": "CHAST", "NZDT": "NZDT", "SRT": "SRT"}, - } - } -  -@@ -117,7 +94,7 @@ func (ko *ko_KP) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ko *ko_KP) MonthsAbbreviated() []string { -- return ko.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (ko *ko_KP) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ko *ko_KP) MonthsNarrow() []string { -- return ko.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (ko *ko_KP) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ko *ko_KP) MonthsWide() []string { -- return ko.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (ko *ko_KP) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ko_KP' and handles both Whole and Real numbers based on 'v' - func (ko *ko_KP) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ko.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ko.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ko_KP' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ko *ko_KP) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ko.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ko.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ko_KP' -@@ -257,56 +174,7 @@ func (ko *ko_KP) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ko.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ko.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ko.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ko.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ko_KP' -@@ -315,68 +183,7 @@ func (ko *ko_KP) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ko.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ko.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ko.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ko.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ko.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ko_KP' -@@ -384,18 +191,6 @@ func (ko *ko_KP) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -404,18 +199,6 @@ func (ko *ko_KP) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -424,18 +207,6 @@ func (ko *ko_KP) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xeb, 0x85, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xec, 0x9b, 0x94, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xec, 0x9d, 0xbc}...) -- - return string(b) - } -  -@@ -444,19 +215,6 @@ func (ko *ko_KP) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xeb, 0x85, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xec, 0x9b, 0x94, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xec, 0x9d, 0xbc, 0x20}...) -- b = append(b, ko.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -465,29 +223,6 @@ func (ko *ko_KP) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ko.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -496,36 +231,6 @@ func (ko *ko_KP) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ko.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ko.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -534,30 +239,6 @@ func (ko *ko_KP) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0xec, 0x8b, 0x9c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0xeb, 0xb6, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0xec, 0xb4, 0x88, 0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -566,34 +247,5 @@ func (ko *ko_KP) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0xec, 0x8b, 0x9c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0xeb, 0xb6, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0xec, 0xb4, 0x88, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ko.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ko_KR/ko_KR.go b/ko_KR/ko_KR.go -index 124b0ea..96f1491 100644 ---- a/ko_KR/ko_KR.go -+++ b/ko_KR/ko_KR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ko_KR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ko_KR' locale - func New() locales.Translator { - return &ko_KR{ -- locale: "ko_KR", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"}, -- monthsNarrow: []string{"", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"}, -- monthsWide: []string{"", "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"}, -- daysAbbreviated: []string{"일", "월", "화", "수", "목", "금", "토"}, -- daysNarrow: []string{"일", "월", "화", "수", "목", "금", "토"}, -- daysShort: []string{"일", "월", "화", "수", "목", "금", "토"}, -- daysWide: []string{"일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"오전", "오후"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"기원전", "서기"}, -- timezones: map[string]string{"MDT": "미 산지 하계 표준시", "BT": "부탄 시간", "CLST": "칠레 하계 표준시", "AKDT": "알래스카 하계 표준시", "ART": "아르헨티나 표준시", "HNPM": "세인트피에르 미클롱 표준시", "CHADT": "채텀 하계 표준시", "HNEG": "그린란드 동부 표준시", "SGT": "싱가포르 표준시", "HNT": "뉴펀들랜드 표준시", "HAT": "뉴펀들랜드 하계 표준시", "ChST": "차모로 시간", "WAST": "서아프리카 하계 표준시", "OESZ": "동유럽 하계 표준시", "WART": "아르헨티나 서부 표준시", "COT": "콜롬비아 표준시", "MST": "미 산악 표준시", "MEZ": "중부 유럽 표준시", "BOT": "볼리비아 시간", "HADT": "하와이 알류샨 하계 표준시", "PST": "미 태평양 표준시", "OEZ": "동유럽 표준시", "CDT": "미 중부 하계 표준시", "EDT": "미 동부 하계 표준시", "HEPMX": "멕시코 태평양 하계 표준시", "AKST": "알래스카 표준시", "HECU": "쿠바 하계 표준시", "WIB": "서부 인도네시아 시간", "WEZ": "서유럽 표준시", "ACWDT": "오스트레일리아 중서부 하계 표준시", "AEDT": "오스트레일리아 동부 하계 표준시", "HEEG": "그린란드 동부 하계 표준시", "GFT": "프랑스령 가이아나 시간", "ACST": "오스트레일리아 중부 표준시", "WIT": "동부 인도네시아 시간", "SAST": "남아프리카 시간", "IST": "인도 표준시", "ACDT": "오스트레일리아 중부 하계 표준시", "WARST": "아르헨티나 서부 하계 표준시", "ADT": "미 대서양 하계 표준시", "HAST": "하와이 알류샨 표준시", "ACWST": "오스트레일리아 중서부 표준시", "MESZ": "중부 유럽 하계 표준시", "NZST": "뉴질랜드 표준시", "TMT": "투르크메니스탄 표준시", "EST": "미 동부 표준시", "HNPMX": "멕시코 태평양 표준시", "UYT": "우루과이 표준시", "HNOG": "그린란드 서부 표준시", "WESZ": "서유럽 하계 표준시", "AWST": "오스트레일리아 서부 표준시", "HKT": "홍콩 표준시", "JST": "일본 표준시", "∅∅∅": "아마존 하계 표준시", "CAT": "중앙아프리카 시간", "ARST": "아르헨티나 하계 표준시", "HEPM": "세인트피에르 미클롱 하계 표준시", "NZDT": "뉴질랜드 하계 표준시", "WAT": "서아프리카 표준시", "UYST": "우루과이 하계 표준시", "VET": "베네수엘라 시간", "PDT": "미 태평양 하계 표준시", "AEST": "오스트레일리아 동부 표준시", "AWDT": "오스트레일리아 서부 하계 표준시", "COST": "콜롬비아 하계 표준시", "GYT": "가이아나 시간", "WITA": "중부 인도네시아 시간", "LHST": "로드 하우 표준시", "CLT": "칠레 표준시", "AST": "대서양 표준시", "SRT": "수리남 시간", "TMST": "투르크메니스탄 하계 표준시", "ECT": "에콰도르 시간", "EAT": "동아프리카 시간", "HNNOMX": "멕시코 북서부 표준시", "HEOG": "그린란드 서부 하계 표준시", "LHDT": "로드 하우 하계 표준시", "JDT": "일본 하계 표준시", "HENOMX": "멕시코 북서부 하계 표준시", "CST": "미 중부 표준시", "HKST": "홍콩 하계 표준시", "CHAST": "채텀 표준시", "GMT": "그리니치 표준시", "HNCU": "쿠바 표준시", "MYT": "말레이시아 시간"}, -+ locale: "ko_KR", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZST": "NZST", "GMT": "GMT", "AEST": "AEST", "BT": "BT", "ECT": "ECT", "OEZ": "OEZ", "TMT": "TMT", "SRT": "SRT", "HNPMX": "HNPMX", "BOT": "BOT", "EAT": "EAT", "HADT": "HADT", "LHST": "LHST", "HNCU": "HNCU", "WESZ": "WESZ", "SGT": "SGT", "WARST": "WARST", "CLST": "CLST", "HNEG": "HNEG", "AWST": "AWST", "LHDT": "LHDT", "WART": "WART", "WIT": "WIT", "GYT": "GYT", "ChST": "ChST", "WITA": "WITA", "ADT": "ADT", "AWDT": "AWDT", "ACWDT": "ACWDT", "VET": "VET", "EDT": "EDT", "HKT": "HKT", "∅∅∅": "∅∅∅", "TMST": "TMST", "HNPM": "HNPM", "ACWST": "ACWST", "CHAST": "CHAST", "AKDT": "AKDT", "ACDT": "ACDT", "OESZ": "OESZ", "HNT": "HNT", "MYT": "MYT", "HNNOMX": "HNNOMX", "JDT": "JDT", "PDT": "PDT", "WEZ": "WEZ", "HNOG": "HNOG", "COT": "COT", "MST": "MST", "ART": "ART", "HAST": "HAST", "MESZ": "MESZ", "HEEG": "HEEG", "CHADT": "CHADT", "GFT": "GFT", "HAT": "HAT", "WIB": "WIB", "HKST": "HKST", "HEOG": "HEOG", "NZDT": "NZDT", "ARST": "ARST", "UYT": "UYT", "CDT": "CDT", "AST": "AST", "HENOMX": "HENOMX", "MDT": "MDT", "HEPM": "HEPM", "JST": "JST", "IST": "IST", "WAT": "WAT", "AKST": "AKST", "CAT": "CAT", "ACST": "ACST", "PST": "PST", "HECU": "HECU", "SAST": "SAST", "MEZ": "MEZ", "HEPMX": "HEPMX", "EST": "EST", "CST": "CST", "AEDT": "AEDT", "UYST": "UYST", "WAST": "WAST", "COST": "COST", "CLT": "CLT"}, - } - } -  -@@ -117,7 +94,7 @@ func (ko *ko_KR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ko *ko_KR) MonthsAbbreviated() []string { -- return ko.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (ko *ko_KR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ko *ko_KR) MonthsNarrow() []string { -- return ko.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (ko *ko_KR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ko *ko_KR) MonthsWide() []string { -- return ko.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (ko *ko_KR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ko_KR' and handles both Whole and Real numbers based on 'v' - func (ko *ko_KR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ko.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ko.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ko_KR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ko *ko_KR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ko.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ko.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ko_KR' -@@ -257,56 +174,7 @@ func (ko *ko_KR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ko.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ko.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ko.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ko.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ko_KR' -@@ -315,68 +183,7 @@ func (ko *ko_KR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ko.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ko.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ko.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ko.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ko.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ko.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ko_KR' -@@ -384,18 +191,6 @@ func (ko *ko_KR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -404,18 +199,6 @@ func (ko *ko_KR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -424,18 +207,6 @@ func (ko *ko_KR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xeb, 0x85, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xec, 0x9b, 0x94, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xec, 0x9d, 0xbc}...) -- - return string(b) - } -  -@@ -444,19 +215,6 @@ func (ko *ko_KR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xeb, 0x85, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xec, 0x9b, 0x94, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xec, 0x9d, 0xbc, 0x20}...) -- b = append(b, ko.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -465,29 +223,6 @@ func (ko *ko_KR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ko.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -496,36 +231,6 @@ func (ko *ko_KR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ko.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ko.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -534,30 +239,6 @@ func (ko *ko_KR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0xec, 0x8b, 0x9c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0xeb, 0xb6, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0xec, 0xb4, 0x88, 0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -566,34 +247,5 @@ func (ko *ko_KR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ko.periodsAbbreviated[0]...) -- } else { -- b = append(b, ko.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, []byte{0xec, 0x8b, 0x9c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0xeb, 0xb6, 0x84, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0xec, 0xb4, 0x88, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ko.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kok/kok.go b/kok/kok.go -index b0ee603..d45904d 100644 ---- a/kok/kok.go -+++ b/kok/kok.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"क्रिस्तपूर्व", "क्रिस्तशखा"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"ACWST": "ACWST", "GFT": "GFT", "MDT": "MDT", "HNPMX": "HNPMX", "AST": "AST", "MYT": "MYT", "WIT": "WIT", "BT": "BT", "HAST": "HAST", "HKT": "HKT", "MEZ": "MEZ", "CHAST": "CHAST", "OESZ": "OESZ", "HNCU": "HNCU", "SRT": "SRT", "ACWDT": "ACWDT", "ARST": "ARST", "AWST": "AWST", "WITA": "WITA", "SGT": "SGT", "AKST": "AKST", "HADT": "HADT", "HNT": "HNT", "HEPM": "HEPM", "LHST": "LHST", "CHADT": "CHADT", "BOT": "BOT", "GMT": "GMT", "ADT": "ADT", "HAT": "HAT", "ECT": "ECT", "UYT": "UYT", "WIB": "WIB", "HNOG": "HNOG", "CST": "CST", "WESZ": "WESZ", "CLT": "CLT", "CLST": "CLST", "OEZ": "OEZ", "CAT": "CAT", "NZDT": "NZDT", "SAST": "SAST", "∅∅∅": "∅∅∅", "EAT": "EAT", "COT": "COT", "EST": "EST", "AEST": "AEST", "JST": "JST", "COST": "COST", "UYST": "UYST", "WEZ": "WEZ", "HEEG": "HEEG", "TMST": "TMST", "WARST": "WARST", "MESZ": "MESZ", "WART": "WART", "HEPMX": "HEPMX", "VET": "VET", "AWDT": "AWDT", "GYT": "GYT", "ART": "ART", "HNPM": "HNPM", "NZST": "NZST", "HNEG": "HNEG", "ACDT": "ACDT", "WAT": "WAT", "CDT": "CDT", "PST": "PST", "HECU": "HECU", "MST": "MST", "AKDT": "AKDT", "HEOG": "HEOG", "EDT": "EDT", "PDT": "PDT", "LHDT": "LHDT", "IST": "भारतीय समय", "JDT": "JDT", "WAST": "WAST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AEDT": "AEDT", "TMT": "TMT", "ChST": "ChST", "ACST": "ACST", "HKST": "HKST"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "WAT": "WAT", "WIT": "WIT", "AST": "AST", "ARST": "ARST", "MYT": "MYT", "GFT": "GFT", "ECT": "ECT", "GMT": "GMT", "JST": "JST", "AEST": "AEST", "HKT": "HKT", "HKST": "HKST", "WESZ": "WESZ", "HNCU": "HNCU", "HECU": "HECU", "HAT": "HAT", "CAT": "CAT", "CHADT": "CHADT", "BT": "BT", "WAST": "WAST", "CLST": "CLST", "LHST": "LHST", "LHDT": "LHDT", "PDT": "PDT", "HNPM": "HNPM", "AEDT": "AEDT", "ART": "ART", "MESZ": "MESZ", "HNEG": "HNEG", "GYT": "GYT", "CST": "CST", "MST": "MST", "ACDT": "ACDT", "ACWDT": "ACWDT", "EDT": "EDT", "WITA": "WITA", "ChST": "ChST", "BOT": "BOT", "SRT": "SRT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HEPM": "HEPM", "HAST": "HAST", "JDT": "JDT", "UYT": "UYT", "UYST": "UYST", "HEPMX": "HEPMX", "ADT": "ADT", "MDT": "MDT", "EAT": "EAT", "COT": "COT", "TMT": "TMT", "PST": "PST", "VET": "VET", "COST": "COST", "WART": "WART", "CLT": "CLT", "MEZ": "MEZ", "ACWST": "ACWST", "AKDT": "AKDT", "HNOG": "HNOG", "TMST": "TMST", "WEZ": "WEZ", "SGT": "SGT", "OESZ": "OESZ", "WARST": "WARST", "CDT": "CDT", "NZST": "NZST", "WIB": "WIB", "ACST": "ACST", "AWST": "AWST", "IST": "भारतीय समय", "OEZ": "OEZ", "HNT": "HNT", "SAST": "SAST", "HEOG": "HEOG", "NZDT": "NZDT", "HADT": "HADT", "CHAST": "CHAST", "HNPMX": "HNPMX", "EST": "EST", "HEEG": "HEEG", "AWDT": "AWDT", "AKST": "AKST"}, - } - } -  -diff --git a/kok_IN/kok_IN.go b/kok_IN/kok_IN.go -index 98f6ba4..a60ed11 100644 ---- a/kok_IN/kok_IN.go -+++ b/kok_IN/kok_IN.go -@@ -10,57 +10,45 @@ import ( - ) -  - type kok_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'kok_IN' locale - func New() locales.Translator { - return &kok_IN{ -- locale: "kok_IN", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsWide: []string{"", "जानेवारी", "फेब्रुवारी", "मार्च", "एप्रिल", "मे", "जून", "जुलै", "ओगस्ट", "सेप्टेंबर", "ओक्टोबर", "नोव्हेंबर", "डिसेंबर"}, -- daysAbbreviated: []string{"रवि", "सोम", "मंगळ", "बुध", "गुरु", "शुक्र", "शनि"}, -- daysWide: []string{"आदित्यवार", "सोमवार", "मंगळार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"}, -- periodsAbbreviated: []string{"म.पू.", "म.नं."}, -- periodsWide: []string{"म.पू.", "म.नं."}, -- erasAbbreviated: []string{"क्रिस्तपूर्व", "क्रिस्तशखा"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HEPMX": "HEPMX", "AKST": "AKST", "IST": "भारतीय समय", "EDT": "EDT", "WEZ": "WEZ", "MEZ": "MEZ", "CHAST": "CHAST", "JDT": "JDT", "ACST": "ACST", "CST": "CST", "MDT": "MDT", "BT": "BT", "HECU": "HECU", "TMT": "TMT", "HENOMX": "HENOMX", "HNPM": "HNPM", "CLST": "CLST", "∅∅∅": "∅∅∅", "WAT": "WAT", "COT": "COT", "WIT": "WIT", "HKT": "HKT", "SAST": "SAST", "ACWDT": "ACWDT", "WITA": "WITA", "WART": "WART", "WARST": "WARST", "UYST": "UYST", "HAST": "HAST", "WESZ": "WESZ", "HEEG": "HEEG", "MESZ": "MESZ", "CHADT": "CHADT", "TMST": "TMST", "COST": "COST", "SGT": "SGT", "HNCU": "HNCU", "HEOG": "HEOG", "ACWST": "ACWST", "AWDT": "AWDT", "NZST": "NZST", "NZDT": "NZDT", "CLT": "CLT", "EAT": "EAT", "GMT": "GMT", "HNT": "HNT", "ARST": "ARST", "LHST": "LHST", "LHDT": "LHDT", "OEZ": "OEZ", "EST": "EST", "ADT": "ADT", "WIB": "WIB", "ART": "ART", "HNPMX": "HNPMX", "HADT": "HADT", "HEPM": "HEPM", "OESZ": "OESZ", "AEDT": "AEDT", "WAST": "WAST", "AKDT": "AKDT", "VET": "VET", "HNOG": "HNOG", "PST": "PST", "HAT": "HAT", "AWST": "AWST", "JST": "JST", "HNEG": "HNEG", "UYT": "UYT", "CDT": "CDT", "AST": "AST", "GFT": "GFT", "ACDT": "ACDT", "BOT": "BOT", "GYT": "GYT", "PDT": "PDT", "AEST": "AEST", "ChST": "ChST", "ECT": "ECT", "MYT": "MYT", "MST": "MST", "HKST": "HKST", "SRT": "SRT", "CAT": "CAT", "HNNOMX": "HNNOMX"}, -+ locale: "kok_IN", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "JDT": "JDT", "PDT": "PDT", "CDT": "CDT", "BOT": "BOT", "HADT": "HADT", "HEEG": "HEEG", "HNPM": "HNPM", "WEZ": "WEZ", "HNPMX": "HNPMX", "EDT": "EDT", "NZST": "NZST", "MYT": "MYT", "OESZ": "OESZ", "GFT": "GFT", "WART": "WART", "WITA": "WITA", "WIB": "WIB", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "WAT": "WAT", "WAST": "WAST", "SAST": "SAST", "TMT": "TMT", "MDT": "MDT", "LHDT": "LHDT", "UYST": "UYST", "AKST": "AKST", "AKDT": "AKDT", "CST": "CST", "MEZ": "MEZ", "BT": "BT", "AEDT": "AEDT", "HEOG": "HEOG", "CLST": "CLST", "EAT": "EAT", "HAST": "HAST", "COT": "COT", "CAT": "CAT", "COST": "COST", "JST": "JST", "AEST": "AEST", "CHADT": "CHADT", "UYT": "UYT", "WESZ": "WESZ", "WARST": "WARST", "GYT": "GYT", "HKT": "HKT", "ARST": "ARST", "SRT": "SRT", "∅∅∅": "∅∅∅", "HECU": "HECU", "HNT": "HNT", "CLT": "CLT", "ACST": "ACST", "PST": "PST", "CHAST": "CHAST", "OEZ": "OEZ", "AWDT": "AWDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "EST": "EST", "LHST": "LHST", "IST": "IST", "ECT": "ECT", "AST": "AST", "ADT": "ADT", "MESZ": "MESZ", "HNCU": "HNCU", "WIT": "WIT", "MST": "MST", "SGT": "SGT", "HEPMX": "HEPMX", "HAT": "HAT", "TMST": "TMST", "NZDT": "NZDT", "GMT": "GMT", "ChST": "ChST", "ACDT": "ACDT", "AWST": "AWST", "HEPM": "HEPM", "ACWST": "ACWST", "VET": "VET", "HKST": "HKST", "ART": "ART"}, - } - } -  -@@ -126,7 +114,7 @@ func (kok *kok_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kok *kok_IN) MonthsWide() []string { -- return kok.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -172,82 +160,13 @@ func (kok *kok_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'kok_IN' and handles both Whole and Real numbers based on 'v' - func (kok *kok_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kok.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, kok.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kok.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'kok_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (kok *kok_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kok.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, kok.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, kok.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'kok_IN' -@@ -255,69 +174,7 @@ func (kok *kok_IN) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kok.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kok.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, kok.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kok.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, kok.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, kok.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kok.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kok_IN' -@@ -326,81 +183,7 @@ func (kok *kok_IN) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kok.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kok.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, kok.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kok.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, kok.currencyNegativePrefix[j]) -- } -- -- b = append(b, kok.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(kok.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, kok.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kok.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kok_IN' -@@ -408,17 +191,6 @@ func (kok *kok_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -427,27 +199,6 @@ func (kok *kok_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,17 +207,6 @@ func (kok *kok_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kok.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,19 +215,6 @@ func (kok *kok_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kok.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kok.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -496,28 +223,6 @@ func (kok *kok_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kok.periodsAbbreviated[0]...) -- } else { -- b = append(b, kok.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -526,35 +231,6 @@ func (kok *kok_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kok.periodsAbbreviated[0]...) -- } else { -- b = append(b, kok.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -563,40 +239,6 @@ func (kok *kok_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kok.periodsAbbreviated[0]...) -- } else { -- b = append(b, kok.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,44 +247,5 @@ func (kok *kok_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kok.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, kok.periodsAbbreviated[0]...) -- } else { -- b = append(b, kok.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kok.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ks/ks.go b/ks/ks.go -index b3b4ea6..21fd4b4 100644 ---- a/ks/ks.go -+++ b/ks/ks.go -@@ -66,7 +66,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"بی سی", "اے ڈی"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"قبٕل مسیٖح", "عیٖسوی سنہٕ"}, -- timezones: map[string]string{"HECU": "کیوٗبا ڈےلایِٔٹ ٹایِم", "MST": "مَکَعوٗ سٹینڑاڑ ٹایِم", "HNPMX": "HNPMX", "AST": "اٮ۪ٹلانٹِک سٹینڑاڑ ٹایِم", "HEEG": "مشرِقی گریٖن لینڑُک سَمَر ٹایِم", "WAST": "مغربی افریٖقا سَمَر ٹایِم", "COT": "کولومبِیا سٹینڑاڑ ٹایِم", "HENOMX": "HENOMX", "MYT": "مَلیشِیا ٹایِم", "UYT": "یوٗرٮ۪گوَے سٹینڑاڑ ٹایِم", "ART": "ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "HKT": "حانگ کانٛگ سٹینڑاڑ ٹایِم", "IST": "ہِنٛدوستان", "WAT": "مغربی افریٖقا سٹینڑاڑ ٹایِم", "HEPMX": "HEPMX", "NZST": "نِوزِلینڑ سٹینڑاڑ ٹایِم", "CLT": "چِلی سٹینڑاڑ ٹایِم", "ChST": "کٮ۪مورو سٹینڑاڑ ٹایِم", "COST": "کولومبِیا سَمَر ٹایِم", "ADT": "اٮ۪ٹلانٹِک ڈےلایِٔٹ ٹایِم", "SRT": "سُرِنام ٹایِم", "AWDT": "آسٹریلِیَن مغرِبیٖ ڈےلایٔٹ ٹایِم", "TMST": "تُرکمٮ۪نِستان سَمَر ٹایِم", "OEZ": "مشرقی یوٗرپی سٹینڑاڑ ٹایِم", "UYST": "یوٗرٮ۪گوَے سَمَر ٹایِم", "WESZ": "مغرِبی یوٗرِپی سَمَر ٹایِم", "ACST": "آسٹریلِیَن مرکزی سٹینڑاڑ ٹایِم", "EAT": "مشرقی افریٖقا ٹایِم", "AKST": "اٮ۪لاسکا سٹینڑاڑ ٹایِم", "JDT": "جاپٲنۍ ڑےلایِٔٹ ٹایِم", "HNEG": "مشرِقی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "SGT": "سِنٛگاپوٗر ٹایِم", "BT": "بوٗٹان ٹایِم", "HEPM": "سینٛٹ پَیری مِقیوٗلَن ڑےلایِٔٹ ٹایِم", "LHDT": "لعاڑ ڑےلایٔٹ ٹایِم", "MESZ": "مرکزی یوٗرپی سَمَر ٹایِم", "WIT": "مشرِقی اِنڑونیشِیا ٹایِم", "ACWST": "آسٹریلِیَن مرکزی مغربی سٹینڑاڑ ٹایِم", "HNT": "نیوٗ فاونڑلینڑ سٹینڑاڑ ٹایِم", "∅∅∅": "اٮ۪مَزَن سَمَر ٹایِم", "WARST": "مغربی ارجٮ۪نٹیٖنا سَمَر ٹایِم", "PST": "پیسِفِک سٹینڑاڑ ٹایِم", "PDT": "پیسِفِک ڈےلایِٔٹ ٹایِم", "CAT": "مرکزی افریٖقا ٹایِم", "OESZ": "مشرقی یوٗرپی سَمَر ٹایِم", "HADT": "حَواے اٮ۪لیوٗٹِیَن سَمَر ٹایِم", "HEOG": "مغرِبی گریٖن لینڑُک سَمَر ٹایِم", "HKST": "حانٛگ کانٛگ سَمَر ٹایِم", "AEDT": "آسٹریلِیَن مشرقی ڈےلایِٔٹ ٹایِم", "JST": "جاپٲنۍ سٹینڑاڑ ٹایِم", "ARST": "ارجٮ۪نٹیٖنا سَمَر ٹایِم", "HNNOMX": "HNNOMX", "MDT": "مَکَعوٗ سَمَر ٹایِم", "GYT": "گُیَنا ٹایِم", "EST": "مشرقی سٹینڑاڑ ٹایِم", "CDT": "مرکزی ڈےلایِٔٹ ٹایِم", "HNOG": "مغرِبی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "SAST": "جنوٗبی افریقا ٹایِم", "ACDT": "آسٹریلِیَن مرکزی ڈےلایِٔٹ ٹایِم", "HNCU": "کیوٗبا سٹینڑاڑ ٹایِم", "HAST": "حَواے اٮ۪لیوٗٹِیَن سٹینڑاڑ ٹایِم", "ACWDT": "آسٹریلِیَن مرکزی مغربی ڈےلایِٔٹ ٹایِم", "HNPM": "سینٛٹ پَیری مِقیوٗلَن سٹینڑاڑ ٹایِم", "MEZ": "مرکزی یوٗرپی سٹینڑاڑ ٹایِم", "VET": "وٮ۪نٮ۪زیوٗلا ٹایِم", "NZDT": "نِوزِلینڑ ڑےلایٔٹ ٹایِم", "AKDT": "اٮ۪لاسکا ڈےلایِٔٹ ٹایِم", "WART": "مغربی ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "EDT": "مشرقی ڈےلایِٔٹ ٹایِم", "AWST": "آسٹریلِیَن مغرِبی سٹینڑاڑ ٹایِم", "GFT": "فرٛٮ۪نٛچ گیوٗٮ۪نا ٹایِم", "TMT": "تُرکمٮ۪نِستان سٹینڑاڑ ٹایِم", "ECT": "اِکویڑَر ٹایِم", "CLST": "چِلی سَمَر ٹایِم", "GMT": "گرٛیٖن وِچ میٖن ٹایِم", "CST": "مرکزی سٹینڑاڑ ٹایِم", "WIB": "مغرِبی اِنڑونیشِیا ٹایِم", "WITA": "مرکزی اِنڑونیشِیا ٹایِم", "AEST": "آسٹریلِیَن مشرقی سٹینڑاڑ ٹایِم", "LHST": "لعاڑ حووے سٹینڑاڑ ٹایِم", "CHAST": "کٮ۪تھَم سٹینڑاڑ ٹایِم", "WEZ": "مغرِبی یوٗرپی سٹینڑاڑ ٹایِم", "HAT": "نیوٗ فاونڑ لینڑ ڑےلایِٔٹ ٹایِم", "CHADT": "چٮ۪تھَم سَمَر ٹایِم", "BOT": "بولِوِیا ٹایِم"}, -+ timezones: map[string]string{"MDT": "مَکَعوٗ سَمَر ٹایِم", "NZST": "نِوزِلینڑ سٹینڑاڑ ٹایِم", "ARST": "ارجٮ۪نٹیٖنا سَمَر ٹایِم", "SRT": "سُرِنام ٹایِم", "MESZ": "مرکزی یوٗرپی سَمَر ٹایِم", "LHDT": "لعاڑ ڑےلایٔٹ ٹایِم", "TMT": "تُرکمٮ۪نِستان سٹینڑاڑ ٹایِم", "MST": "مَکَعوٗ سٹینڑاڑ ٹایِم", "WESZ": "مغرِبی یوٗرِپی سَمَر ٹایِم", "GFT": "فرٛٮ۪نٛچ گیوٗٮ۪نا ٹایِم", "HAT": "نیوٗ فاونڑ لینڑ ڑےلایِٔٹ ٹایِم", "COST": "کولومبِیا سَمَر ٹایِم", "AEDT": "آسٹریلِیَن مشرقی ڈےلایِٔٹ ٹایِم", "CHADT": "چٮ۪تھَم سَمَر ٹایِم", "GYT": "گُیَنا ٹایِم", "CHAST": "کٮ۪تھَم سٹینڑاڑ ٹایِم", "AKST": "اٮ۪لاسکا سٹینڑاڑ ٹایِم", "UYT": "یوٗرٮ۪گوَے سٹینڑاڑ ٹایِم", "HEPMX": "HEPMX", "TMST": "تُرکمٮ۪نِستان سَمَر ٹایِم", "BT": "بوٗٹان ٹایِم", "OESZ": "مشرقی یوٗرپی سَمَر ٹایِم", "WART": "مغربی ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "HENOMX": "HENOMX", "AWDT": "آسٹریلِیَن مغرِبیٖ ڈےلایٔٹ ٹایِم", "ACDT": "آسٹریلِیَن مرکزی ڈےلایِٔٹ ٹایِم", "HNEG": "مشرِقی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "HECU": "کیوٗبا ڈےلایِٔٹ ٹایِم", "WIT": "مشرِقی اِنڑونیشِیا ٹایِم", "EST": "مشرقی سٹینڑاڑ ٹایِم", "CAT": "مرکزی افریٖقا ٹایِم", "WIB": "مغرِبی اِنڑونیشِیا ٹایِم", "GMT": "گرٛیٖن وِچ میٖن ٹایِم", "JST": "جاپٲنۍ سٹینڑاڑ ٹایِم", "AWST": "آسٹریلِیَن مغرِبی سٹینڑاڑ ٹایِم", "IST": "ہِنٛدوستان", "VET": "وٮ۪نٮ۪زیوٗلا ٹایِم", "HKT": "حانگ کانٛگ سٹینڑاڑ ٹایِم", "EDT": "مشرقی ڈےلایِٔٹ ٹایِم", "PST": "پیسِفِک سٹینڑاڑ ٹایِم", "ACWST": "آسٹریلِیَن مرکزی مغربی سٹینڑاڑ ٹایِم", "ACWDT": "آسٹریلِیَن مرکزی مغربی ڈےلایِٔٹ ٹایِم", "SGT": "سِنٛگاپوٗر ٹایِم", "HEEG": "مشرِقی گریٖن لینڑُک سَمَر ٹایِم", "MYT": "مَلیشِیا ٹایِم", "HEPM": "سینٛٹ پَیری مِقیوٗلَن ڑےلایِٔٹ ٹایِم", "HNCU": "کیوٗبا سٹینڑاڑ ٹایِم", "SAST": "جنوٗبی افریقا ٹایِم", "CLST": "چِلی سَمَر ٹایِم", "MEZ": "مرکزی یوٗرپی سٹینڑاڑ ٹایِم", "HNT": "نیوٗ فاونڑلینڑ سٹینڑاڑ ٹایِم", "WITA": "مرکزی اِنڑونیشِیا ٹایِم", "HNPMX": "HNPMX", "AEST": "آسٹریلِیَن مشرقی سٹینڑاڑ ٹایِم", "WARST": "مغربی ارجٮ۪نٹیٖنا سَمَر ٹایِم", "CDT": "مرکزی ڈےلایِٔٹ ٹایِم", "HADT": "حَواے اٮ۪لیوٗٹِیَن سَمَر ٹایِم", "WAST": "مغربی افریٖقا سَمَر ٹایِم", "EAT": "مشرقی افریٖقا ٹایِم", "LHST": "لعاڑ حووے سٹینڑاڑ ٹایِم", "BOT": "بولِوِیا ٹایِم", "HNNOMX": "HNNOMX", "JDT": "جاپٲنۍ ڑےلایِٔٹ ٹایِم", "UYST": "یوٗرٮ۪گوَے سَمَر ٹایِم", "AKDT": "اٮ۪لاسکا ڈےلایِٔٹ ٹایِم", "CLT": "چِلی سٹینڑاڑ ٹایِم", "ECT": "اِکویڑَر ٹایِم", "CST": "مرکزی سٹینڑاڑ ٹایِم", "ChST": "کٮ۪مورو سٹینڑاڑ ٹایِم", "AST": "اٮ۪ٹلانٹِک سٹینڑاڑ ٹایِم", "ACST": "آسٹریلِیَن مرکزی سٹینڑاڑ ٹایِم", "PDT": "پیسِفِک ڈےلایِٔٹ ٹایِم", "WEZ": "مغرِبی یوٗرپی سٹینڑاڑ ٹایِم", "HKST": "حانٛگ کانٛگ سَمَر ٹایِم", "∅∅∅": "اٮ۪زورٕس سَمَر ٹ", "HNOG": "مغرِبی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "WAT": "مغربی افریٖقا سٹینڑاڑ ٹایِم", "COT": "کولومبِیا سٹینڑاڑ ٹایِم", "NZDT": "نِوزِلینڑ ڑےلایٔٹ ٹایِم", "ADT": "اٮ۪ٹلانٹِک ڈےلایِٔٹ ٹایِم", "HAST": "حَواے اٮ۪لیوٗٹِیَن سٹینڑاڑ ٹایِم", "OEZ": "مشرقی یوٗرپی سٹینڑاڑ ٹایِم", "HEOG": "مغرِبی گریٖن لینڑُک سَمَر ٹایِم", "ART": "ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "HNPM": "سینٛٹ پَیری مِقیوٗلَن سٹینڑاڑ ٹایِم"}, - } - } -  -diff --git a/ks_IN/ks_IN.go b/ks_IN/ks_IN.go -index 8392ad3..7d4b8b5 100644 ---- a/ks_IN/ks_IN.go -+++ b/ks_IN/ks_IN.go -@@ -10,63 +10,45 @@ import ( - ) -  - type ks_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ks_IN' locale - func New() locales.Translator { - return &ks_IN{ -- locale: "ks_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "‎-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsNarrow: []string{"", "ج", "ف", "م", "ا", "م", "ج", "ج", "ا", "س", "س", "ا", "ن"}, -- monthsWide: []string{"", "جنؤری", "فرؤری", "مارٕچ", "اپریل", "میٔ", "جوٗن", "جوٗلایی", "اگست", "ستمبر", "اکتوٗبر", "نومبر", "دسمبر"}, -- daysAbbreviated: []string{"آتھوار", "ژٔنٛدٕروار", "بوٚموار", "بودوار", "برٛٮ۪سوار", "جُمہ", "بٹوار"}, -- daysNarrow: []string{"ا", "ژ", "ب", "ب", "ب", "ج", "ب"}, -- daysWide: []string{"اَتھوار", "ژٔنٛدرٕروار", "بوٚموار", "بودوار", "برٛٮ۪سوار", "جُمہ", "بٹوار"}, -- erasAbbreviated: []string{"بی سی", "اے ڈی"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"قبٕل مسیٖح", "عیٖسوی سنہٕ"}, -- timezones: map[string]string{"ACDT": "آسٹریلِیَن مرکزی ڈےلایِٔٹ ٹایِم", "WART": "مغربی ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "GMT": "گرٛیٖن وِچ میٖن ٹایِم", "HEOG": "مغرِبی گریٖن لینڑُک سَمَر ٹایِم", "AWST": "آسٹریلِیَن مغرِبی سٹینڑاڑ ٹایِم", "AWDT": "آسٹریلِیَن مغرِبیٖ ڈےلایٔٹ ٹایِم", "SAST": "جنوٗبی افریقا ٹایِم", "MDT": "مَکَعوٗ سَمَر ٹایِم", "HNPMX": "HNPMX", "AKST": "اٮ۪لاسکا سٹینڑاڑ ٹایِم", "ACWDT": "آسٹریلِیَن مرکزی مغربی ڈےلایِٔٹ ٹایِم", "HKT": "حانگ کانٛگ سٹینڑاڑ ٹایِم", "MEZ": "مرکزی یوٗرپی سٹینڑاڑ ٹایِم", "TMT": "تُرکمٮ۪نِستان سٹینڑاڑ ٹایِم", "HENOMX": "HENOMX", "HNCU": "کیوٗبا سٹینڑاڑ ٹایِم", "SRT": "سُرِنام ٹایِم", "HKST": "حانٛگ کانٛگ سَمَر ٹایِم", "MESZ": "مرکزی یوٗرپی سَمَر ٹایِم", "NZDT": "نِوزِلینڑ ڑےلایٔٹ ٹایِم", "BOT": "بولِوِیا ٹایِم", "MST": "مَکَعوٗ سٹینڑاڑ ٹایِم", "UYT": "یوٗرٮ۪گوَے سٹینڑاڑ ٹایِم", "CDT": "مرکزی ڈےلایِٔٹ ٹایِم", "WESZ": "مغرِبی یوٗرِپی سَمَر ٹایِم", "HAT": "نیوٗ فاونڑ لینڑ ڑےلایِٔٹ ٹایِم", "LHST": "لعاڑ حووے سٹینڑاڑ ٹایِم", "HECU": "کیوٗبا ڈےلایِٔٹ ٹایِم", "WIB": "مغرِبی اِنڑونیشِیا ٹایِم", "BT": "بوٗٹان ٹایِم", "PDT": "پیسِفِک ڈےلایِٔٹ ٹایِم", "LHDT": "لعاڑ ڑےلایٔٹ ٹایِم", "CHAST": "کٮ۪تھَم سٹینڑاڑ ٹایِم", "∅∅∅": "اٮ۪مَزَن سَمَر ٹایِم", "PST": "پیسِفِک سٹینڑاڑ ٹایِم", "CHADT": "چٮ۪تھَم سَمَر ٹایِم", "AST": "اٮ۪ٹلانٹِک سٹینڑاڑ ٹایِم", "HAST": "حَواے اٮ۪لیوٗٹِیَن سٹینڑاڑ ٹایِم", "HADT": "حَواے اٮ۪لیوٗٹِیَن سَمَر ٹایِم", "HNOG": "مغرِبی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "HNNOMX": "HNNOMX", "ADT": "اٮ۪ٹلانٹِک ڈےلایِٔٹ ٹایِم", "GYT": "گُیَنا ٹایِم", "WITA": "مرکزی اِنڑونیشِیا ٹایِم", "ACST": "آسٹریلِیَن مرکزی سٹینڑاڑ ٹایِم", "EAT": "مشرقی افریٖقا ٹایِم", "HEPM": "سینٛٹ پَیری مِقیوٗلَن ڑےلایِٔٹ ٹایِم", "IST": "ہِنٛدوستان", "WAT": "مغربی افریٖقا سٹینڑاڑ ٹایِم", "UYST": "یوٗرٮ۪گوَے سَمَر ٹایِم", "CST": "مرکزی سٹینڑاڑ ٹایِم", "AEDT": "آسٹریلِیَن مشرقی ڈےلایِٔٹ ٹایِم", "MYT": "مَلیشِیا ٹایِم", "VET": "وٮ۪نٮ۪زیوٗلا ٹایِم", "HNT": "نیوٗ فاونڑلینڑ سٹینڑاڑ ٹایِم", "AEST": "آسٹریلِیَن مشرقی سٹینڑاڑ ٹایِم", "CLST": "چِلی سَمَر ٹایِم", "JDT": "جاپٲنۍ ڑےلایِٔٹ ٹایِم", "HEEG": "مشرِقی گریٖن لینڑُک سَمَر ٹایِم", "OESZ": "مشرقی یوٗرپی سَمَر ٹایِم", "SGT": "سِنٛگاپوٗر ٹایِم", "AKDT": "اٮ۪لاسکا ڈےلایِٔٹ ٹایِم", "WEZ": "مغرِبی یوٗرپی سٹینڑاڑ ٹایِم", "WAST": "مغربی افریٖقا سَمَر ٹایِم", "HEPMX": "HEPMX", "JST": "جاپٲنۍ سٹینڑاڑ ٹایِم", "HNEG": "مشرِقی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "WARST": "مغربی ارجٮ۪نٹیٖنا سَمَر ٹایِم", "COT": "کولومبِیا سٹینڑاڑ ٹایِم", "WIT": "مشرِقی اِنڑونیشِیا ٹایِم", "ART": "ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "ARST": "ارجٮ۪نٹیٖنا سَمَر ٹایِم", "HNPM": "سینٛٹ پَیری مِقیوٗلَن سٹینڑاڑ ٹایِم", "NZST": "نِوزِلینڑ سٹینڑاڑ ٹایِم", "CLT": "چِلی سٹینڑاڑ ٹایِم", "TMST": "تُرکمٮ۪نِستان سَمَر ٹایِم", "ECT": "اِکویڑَر ٹایِم", "EST": "مشرقی سٹینڑاڑ ٹایِم", "ACWST": "آسٹریلِیَن مرکزی مغربی سٹینڑاڑ ٹایِم", "ChST": "کٮ۪مورو سٹینڑاڑ ٹایِم", "GFT": "فرٛٮ۪نٛچ گیوٗٮ۪نا ٹایِم", "CAT": "مرکزی افریٖقا ٹایِم", "OEZ": "مشرقی یوٗرپی سٹینڑاڑ ٹایِم", "COST": "کولومبِیا سَمَر ٹایِم", "EDT": "مشرقی ڈےلایِٔٹ ٹایِم"}, -+ locale: "ks_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COT": "COT", "ECT": "ECT", "EAT": "EAT", "WEZ": "WEZ", "WAT": "WAT", "GFT": "GFT", "CST": "CST", "GMT": "GMT", "HNEG": "HNEG", "ACST": "ACST", "VET": "VET", "WIT": "WIT", "HKST": "HKST", "EST": "EST", "SGT": "SGT", "∅∅∅": "∅∅∅", "HNT": "HNT", "HAST": "HAST", "HEPM": "HEPM", "JST": "JST", "LHST": "LHST", "AEST": "AEST", "HNPMX": "HNPMX", "AKDT": "AKDT", "BOT": "BOT", "CLT": "CLT", "WART": "WART", "CAT": "CAT", "ACWDT": "ACWDT", "WESZ": "WESZ", "HNOG": "HNOG", "SAST": "SAST", "OESZ": "OESZ", "HKT": "HKT", "WITA": "WITA", "ART": "ART", "MYT": "MYT", "WAST": "WAST", "AKST": "AKST", "MST": "MST", "IST": "IST", "PST": "PST", "TMT": "TMT", "NZST": "NZST", "AST": "AST", "SRT": "SRT", "HADT": "HADT", "HEEG": "HEEG", "HNPM": "HNPM", "PDT": "PDT", "WARST": "WARST", "WIB": "WIB", "MDT": "MDT", "ChST": "ChST", "AWST": "AWST", "CHAST": "CHAST", "HAT": "HAT", "GYT": "GYT", "HEOG": "HEOG", "CLST": "CLST", "NZDT": "NZDT", "MESZ": "MESZ", "LHDT": "LHDT", "BT": "BT", "OEZ": "OEZ", "COST": "COST", "CHADT": "CHADT", "HECU": "HECU", "MEZ": "MEZ", "AEDT": "AEDT", "ADT": "ADT", "JDT": "JDT", "TMST": "TMST", "CDT": "CDT", "ACWST": "ACWST", "EDT": "EDT", "ARST": "ARST", "HNCU": "HNCU", "HEPMX": "HEPMX", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "UYT": "UYT", "UYST": "UYST", "HENOMX": "HENOMX", "ACDT": "ACDT"}, - } - } -  -@@ -129,7 +111,7 @@ func (ks *ks_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ks *ks_IN) MonthsNarrow() []string { -- return ks.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +121,7 @@ func (ks *ks_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ks *ks_IN) MonthsWide() []string { -- return ks.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,86 +167,13 @@ func (ks *ks_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ks_IN' and handles both Whole and Real numbers based on 'v' - func (ks *ks_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ks.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, ks.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ks.minus) - 1; j >= 0; j-- { -- b = append(b, ks.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ks_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ks *ks_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ks.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ks.minus) - 1; j >= 0; j-- { -- b = append(b, ks.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ks.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ks_IN' -@@ -272,71 +181,7 @@ func (ks *ks_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ks.currencies[currency] -- l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ks.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, ks.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ks.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ks.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- for j := len(ks.minus) - 1; j >= 0; j-- { -- b = append(b, ks.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ks.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ks_IN' -@@ -345,83 +190,7 @@ func (ks *ks_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ks.currencies[currency] -- l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ks.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, ks.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ks.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ks.currencyNegativePrefix[j]) -- } -- -- for j := len(ks.minus) - 1; j >= 0; j-- { -- b = append(b, ks.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ks.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ks.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ks.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ks_IN' -@@ -429,17 +198,6 @@ func (ks *ks_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -448,17 +206,6 @@ func (ks *ks_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ks.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -467,17 +214,6 @@ func (ks *ks_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ks.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -486,19 +222,6 @@ func (ks *ks_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ks.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ks.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -507,28 +230,6 @@ func (ks *ks_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ks.periodsAbbreviated[0]...) -- } else { -- b = append(b, ks.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -537,35 +238,6 @@ func (ks *ks_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ks.periodsAbbreviated[0]...) -- } else { -- b = append(b, ks.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -574,40 +246,6 @@ func (ks *ks_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ks.periodsAbbreviated[0]...) -- } else { -- b = append(b, ks.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -616,44 +254,5 @@ func (ks *ks_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ks.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ks.periodsAbbreviated[0]...) -- } else { -- b = append(b, ks.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ks.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ksb/ksb.go b/ksb/ksb.go -index b79e6a6..6266859 100644 ---- a/ksb/ksb.go -+++ b/ksb/ksb.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Klisto", "Baada ya Klisto"}, -- timezones: map[string]string{"MST": "MST", "ADT": "ADT", "GYT": "GYT", "VET": "VET", "AWDT": "AWDT", "CHAST": "CHAST", "WAST": "WAST", "ACST": "ACST", "WART": "WART", "SGT": "SGT", "AKST": "AKST", "HADT": "HADT", "AEDT": "AEDT", "NZDT": "NZDT", "HEEG": "HEEG", "AWST": "AWST", "COT": "COT", "LHST": "LHST", "LHDT": "LHDT", "UYT": "UYT", "CDT": "CDT", "AEST": "AEST", "HKST": "HKST", "JDT": "JDT", "ChST": "ChST", "ACWDT": "ACWDT", "HNT": "HNT", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "TMT": "TMT", "HEPMX": "HEPMX", "CST": "CST", "HAST": "HAST", "NZST": "NZST", "CLST": "CLST", "MESZ": "MESZ", "AKDT": "AKDT", "EAT": "EAT", "OEZ": "OEZ", "MYT": "MYT", "SRT": "SRT", "PST": "PST", "WEZ": "WEZ", "HNPM": "HNPM", "HNEG": "HNEG", "ACWST": "ACWST", "SAST": "SAST", "HECU": "HECU", "HNCU": "HNCU", "PDT": "PDT", "HEOG": "HEOG", "BOT": "BOT", "TMST": "TMST", "UYST": "UYST", "HAT": "HAT", "HEPM": "HEPM", "GFT": "GFT", "MDT": "MDT", "WIT": "WIT", "BT": "BT", "ACDT": "ACDT", "OESZ": "OESZ", "AST": "AST", "ART": "ART", "WAT": "WAT", "HNPMX": "HNPMX", "ECT": "ECT", "GMT": "GMT", "EST": "EST", "EDT": "EDT", "MEZ": "MEZ", "CHADT": "CHADT", "WARST": "WARST", "HENOMX": "HENOMX", "HNOG": "HNOG", "IST": "IST", "CLT": "CLT", "CAT": "CAT", "COST": "COST", "WIB": "WIB", "ARST": "ARST", "HKT": "HKT", "WITA": "WITA", "∅∅∅": "∅∅∅", "JST": "JST"}, -+ timezones: map[string]string{"VET": "VET", "CDT": "CDT", "AWDT": "AWDT", "HEPM": "HEPM", "AEST": "AEST", "HNCU": "HNCU", "OESZ": "OESZ", "GYT": "GYT", "HNPM": "HNPM", "WESZ": "WESZ", "CLT": "CLT", "CLST": "CLST", "AST": "AST", "AWST": "AWST", "WAST": "WAST", "NZST": "NZST", "ACST": "ACST", "LHDT": "LHDT", "SGT": "SGT", "AKST": "AKST", "OEZ": "OEZ", "ART": "ART", "WEZ": "WEZ", "MST": "MST", "WIB": "WIB", "SRT": "SRT", "HAST": "HAST", "TMST": "TMST", "JST": "JST", "CHADT": "CHADT", "HECU": "HECU", "GFT": "GFT", "HNT": "HNT", "WIT": "WIT", "HEOG": "HEOG", "MYT": "MYT", "BT": "BT", "ACWDT": "ACWDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "MESZ": "MESZ", "WART": "WART", "COST": "COST", "EDT": "EDT", "ACWST": "ACWST", "CAT": "CAT", "ECT": "ECT", "ChST": "ChST", "PST": "PST", "AEDT": "AEDT", "HAT": "HAT", "WARST": "WARST", "EST": "EST", "HKT": "HKT", "ARST": "ARST", "MEZ": "MEZ", "HKST": "HKST", "CST": "CST", "GMT": "GMT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "JDT": "JDT", "UYT": "UYT", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "NZDT": "NZDT", "HNEG": "HNEG", "PDT": "PDT", "UYST": "UYST", "WAT": "WAT", "HNOG": "HNOG", "BOT": "BOT", "EAT": "EAT", "HADT": "HADT", "IST": "IST", "AKDT": "AKDT", "SAST": "SAST", "COT": "COT", "TMT": "TMT", "WITA": "WITA", "MDT": "MDT", "ADT": "ADT", "ACDT": "ACDT", "HEEG": "HEEG", "LHST": "LHST"}, - } - } -  -diff --git a/ksb_TZ/ksb_TZ.go b/ksb_TZ/ksb_TZ.go -index 896e80a..484f4f4 100644 ---- a/ksb_TZ/ksb_TZ.go -+++ b/ksb_TZ/ksb_TZ.go -@@ -42,24 +42,13 @@ type ksb_TZ struct { - // New returns a new instance of translator for the 'ksb_TZ' locale - func New() locales.Translator { - return &ksb_TZ{ -- locale: "ksb_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januali", "Febluali", "Machi", "Aplili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jmn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"2", "3", "4", "5", "A", "I", "1"}, -- daysWide: []string{"Jumaapii", "Jumaatatu", "Jumaane", "Jumaatano", "Alhamisi", "Ijumaa", "Jumaamosi"}, -- periodsAbbreviated: []string{"makeo", "nyiaghuo"}, -- periodsWide: []string{"makeo", "nyiaghuo"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Klisto", "Baada ya Klisto"}, -- timezones: map[string]string{"UYT": "UYT", "HAST": "HAST", "VET": "VET", "ACWST": "ACWST", "ECT": "ECT", "EAT": "EAT", "MYT": "MYT", "WIT": "WIT", "ART": "ART", "ACST": "ACST", "ADT": "ADT", "AKDT": "AKDT", "SRT": "SRT", "HNT": "HNT", "SAST": "SAST", "AKST": "AKST", "PDT": "PDT", "WESZ": "WESZ", "TMST": "TMST", "HEPMX": "HEPMX", "HADT": "HADT", "LHDT": "LHDT", "WART": "WART", "HNNOMX": "HNNOMX", "HNOG": "HNOG", "AEDT": "AEDT", "JST": "JST", "OESZ": "OESZ", "WAST": "WAST", "HNCU": "HNCU", "MST": "MST", "MESZ": "MESZ", "WEZ": "WEZ", "HNPMX": "HNPMX", "BOT": "BOT", "HKST": "HKST", "IST": "IST", "JDT": "JDT", "CAT": "CAT", "WARST": "WARST", "CST": "CST", "OEZ": "OEZ", "SGT": "SGT", "EDT": "EDT", "WITA": "WITA", "ACWDT": "ACWDT", "HKT": "HKT", "CHAST": "CHAST", "ChST": "ChST", "HEEG": "HEEG", "HECU": "HECU", "EST": "EST", "HEOG": "HEOG", "GYT": "GYT", "ARST": "ARST", "HEPM": "HEPM", "LHST": "LHST", "NZST": "NZST", "WAT": "WAT", "HENOMX": "HENOMX", "AST": "AST", "CLST": "CLST", "BT": "BT", "WIB": "WIB", "MDT": "MDT", "HNPM": "HNPM", "MEZ": "MEZ", "GFT": "GFT", "COT": "COT", "UYST": "UYST", "PST": "PST", "AWDT": "AWDT", "CHADT": "CHADT", "CLT": "CLT", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "ACDT": "ACDT", "HAT": "HAT", "COST": "COST", "AEST": "AEST", "AWST": "AWST", "NZDT": "NZDT", "TMT": "TMT", "GMT": "GMT", "CDT": "CDT"}, -+ locale: "ksb_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHAST": "CHAST", "HNCU": "HNCU", "OEZ": "OEZ", "HNT": "HNT", "ADT": "ADT", "HAST": "HAST", "ChST": "ChST", "HEPM": "HEPM", "PDT": "PDT", "WEZ": "WEZ", "WARST": "WARST", "CST": "CST", "NZDT": "NZDT", "GMT": "GMT", "VET": "VET", "JDT": "JDT", "AEST": "AEST", "GFT": "GFT", "ARST": "ARST", "AWST": "AWST", "MYT": "MYT", "MST": "MST", "MDT": "MDT", "LHDT": "LHDT", "UYT": "UYT", "COT": "COT", "HKT": "HKT", "HKST": "HKST", "CDT": "CDT", "IST": "IST", "PST": "PST", "HECU": "HECU", "HNPM": "HNPM", "WAST": "WAST", "GYT": "GYT", "∅∅∅": "∅∅∅", "WIB": "WIB", "WART": "WART", "HNOG": "HNOG", "HADT": "HADT", "HNPMX": "HNPMX", "ART": "ART", "BT": "BT", "NZST": "NZST", "AWDT": "AWDT", "JST": "JST", "CHADT": "CHADT", "ACDT": "ACDT", "HNEG": "HNEG", "AEDT": "AEDT", "HEPMX": "HEPMX", "AKST": "AKST", "COST": "COST", "EDT": "EDT", "MESZ": "MESZ", "AST": "AST", "WESZ": "WESZ", "WIT": "WIT", "TMT": "TMT", "SGT": "SGT", "LHST": "LHST", "HAT": "HAT", "CLT": "CLT", "ECT": "ECT", "BOT": "BOT", "OESZ": "OESZ", "TMST": "TMST", "CAT": "CAT", "HENOMX": "HENOMX", "ACWST": "ACWST", "AKDT": "AKDT", "SAST": "SAST", "CLST": "CLST", "ACST": "ACST", "HEEG": "HEEG", "UYST": "UYST", "WAT": "WAT", "HEOG": "HEOG", "SRT": "SRT", "EAT": "EAT", "ACWDT": "ACWDT", "EST": "EST", "WITA": "WITA", "MEZ": "MEZ", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -112,7 +101,7 @@ func (ksb *ksb_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ksb *ksb_TZ) MonthsAbbreviated() []string { -- return ksb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (ksb *ksb_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ksb *ksb_TZ) MonthsNarrow() []string { -- return ksb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (ksb *ksb_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ksb *ksb_TZ) MonthsWide() []string { -- return ksb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,54 +181,7 @@ func (ksb *ksb_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ksb.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ksb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ksb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ksb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ksb_TZ' -@@ -248,61 +190,7 @@ func (ksb *ksb_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ksb.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ksb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ksb.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ksb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ksb_TZ' -@@ -310,27 +198,6 @@ func (ksb *ksb_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -339,17 +206,6 @@ func (ksb *ksb_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ksb.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -358,17 +214,6 @@ func (ksb *ksb_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ksb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -377,19 +222,6 @@ func (ksb *ksb_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ksb.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ksb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -398,19 +230,6 @@ func (ksb *ksb_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -419,26 +238,6 @@ func (ksb *ksb_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -447,30 +246,6 @@ func (ksb *ksb_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -479,34 +254,5 @@ func (ksb *ksb_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ksb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ksf/ksf.go b/ksf/ksf.go -index 807c64e..d554842 100644 ---- a/ksf/ksf.go -+++ b/ksf/ksf.go -@@ -64,7 +64,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"d.Y.", "k.Y."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"di Yɛ́sus aká yálɛ", "cámɛɛn kǝ kǝbɔpka Y"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "CST": "CST", "HAST": "HAST", "ACWDT": "ACWDT", "ARST": "ARST", "PDT": "PDT", "HKT": "HKT", "GYT": "GYT", "ART": "ART", "ACWST": "ACWST", "AEST": "AEST", "HEPM": "HEPM", "JDT": "JDT", "OESZ": "OESZ", "COT": "COT", "VET": "VET", "HNT": "HNT", "LHDT": "LHDT", "HEEG": "HEEG", "HNPM": "HNPM", "EST": "EST", "EDT": "EDT", "HEOG": "HEOG", "PST": "PST", "AWDT": "AWDT", "HKST": "HKST", "WITA": "WITA", "CHADT": "CHADT", "CLST": "CLST", "HENOMX": "HENOMX", "AKST": "AKST", "WIB": "WIB", "IST": "IST", "WARST": "WARST", "SRT": "SRT", "NZST": "NZST", "HNNOMX": "HNNOMX", "GMT": "GMT", "MDT": "MDT", "ADT": "ADT", "MYT": "MYT", "WIT": "WIT", "AWST": "AWST", "NZDT": "NZDT", "CHAST": "CHAST", "CLT": "CLT", "GFT": "GFT", "ACDT": "ACDT", "HADT": "HADT", "WEZ": "WEZ", "ChST": "ChST", "AKDT": "AKDT", "WESZ": "WESZ", "MESZ": "MESZ", "CAT": "CAT", "HAT": "HAT", "TMT": "TMT", "TMST": "TMST", "UYST": "UYST", "ACST": "ACST", "UYT": "UYT", "HNOG": "HNOG", "COST": "COST", "MEZ": "MEZ", "SAST": "SAST", "BOT": "BOT", "HNEG": "HNEG", "ECT": "ECT", "WAST": "WAST", "WART": "WART", "HNCU": "HNCU", "HECU": "HECU", "HNPMX": "HNPMX", "AEDT": "AEDT", "LHST": "LHST", "JST": "JST", "WAT": "WAT", "SGT": "SGT", "MST": "MST", "HEPMX": "HEPMX", "AST": "AST", "CDT": "CDT", "BT": "BT", "EAT": "EAT", "OEZ": "OEZ"}, -+ timezones: map[string]string{"NZST": "NZST", "MESZ": "MESZ", "HECU": "HECU", "OEZ": "OEZ", "WART": "WART", "WARST": "WARST", "WIT": "WIT", "SAST": "SAST", "MDT": "MDT", "ECT": "ECT", "LHDT": "LHDT", "ACWST": "ACWST", "AKST": "AKST", "COST": "COST", "HNOG": "HNOG", "WIB": "WIB", "CST": "CST", "ART": "ART", "AST": "AST", "BOT": "BOT", "MYT": "MYT", "BT": "BT", "∅∅∅": "∅∅∅", "GYT": "GYT", "JST": "JST", "UYT": "UYT", "HNPMX": "HNPMX", "WAT": "WAT", "HADT": "HADT", "HEPM": "HEPM", "ADT": "ADT", "ACST": "ACST", "HNEG": "HNEG", "CHADT": "CHADT", "CAT": "CAT", "NZDT": "NZDT", "ACDT": "ACDT", "AWDT": "AWDT", "PDT": "PDT", "AEDT": "AEDT", "VET": "VET", "HKT": "HKT", "AWST": "AWST", "HEPMX": "HEPMX", "GMT": "GMT", "EAT": "EAT", "MEZ": "MEZ", "HKST": "HKST", "CLST": "CLST", "ACWDT": "ACWDT", "WESZ": "WESZ", "AKDT": "AKDT", "HAT": "HAT", "HEOG": "HEOG", "EST": "EST", "WITA": "WITA", "HNNOMX": "HNNOMX", "LHST": "LHST", "AEST": "AEST", "CHAST": "CHAST", "SGT": "SGT", "HNCU": "HNCU", "HENOMX": "HENOMX", "UYST": "UYST", "GFT": "GFT", "OESZ": "OESZ", "MST": "MST", "IST": "IST", "ARST": "ARST", "HAST": "HAST", "HEEG": "HEEG", "SRT": "SRT", "PST": "PST", "EDT": "EDT", "CLT": "CLT", "CDT": "CDT", "ChST": "ChST", "HNPM": "HNPM", "HNT": "HNT", "TMST": "TMST", "WAST": "WAST", "COT": "COT", "TMT": "TMT", "JDT": "JDT", "WEZ": "WEZ"}, - } - } -  -diff --git a/ksf_CM/ksf_CM.go b/ksf_CM/ksf_CM.go -index 5966c5b..d087a3e 100644 ---- a/ksf_CM/ksf_CM.go -+++ b/ksf_CM/ksf_CM.go -@@ -10,61 +10,45 @@ import ( - ) -  - type ksf_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ksf_CM' locale - func New() locales.Translator { - return &ksf_CM{ -- locale: "ksf_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ŋ1", "ŋ2", "ŋ3", "ŋ4", "ŋ5", "ŋ6", "ŋ7", "ŋ8", "ŋ9", "ŋ10", "ŋ11", "ŋ12"}, -- monthsWide: []string{"", "ŋwíí a ntɔ́ntɔ", "ŋwíí akǝ bɛ́ɛ", "ŋwíí akǝ ráá", "ŋwíí akǝ nin", "ŋwíí akǝ táan", "ŋwíí akǝ táafɔk", "ŋwíí akǝ táabɛɛ", "ŋwíí akǝ táaraa", "ŋwíí akǝ táanin", "ŋwíí akǝ ntɛk", "ŋwíí akǝ ntɛk di bɔ́k", "ŋwíí akǝ ntɛk di bɛ́ɛ"}, -- daysAbbreviated: []string{"sɔ́n", "lǝn", "maa", "mɛk", "jǝǝ", "júm", "sam"}, -- daysNarrow: []string{"s", "l", "m", "m", "j", "j", "s"}, -- daysWide: []string{"sɔ́ndǝ", "lǝndí", "maadí", "mɛkrɛdí", "jǝǝdí", "júmbá", "samdí"}, -- periodsAbbreviated: []string{"sárúwá", "cɛɛ́nko"}, -- periodsWide: []string{"sárúwá", "cɛɛ́nko"}, -- erasAbbreviated: []string{"d.Y.", "k.Y."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"di Yɛ́sus aká yálɛ", "cámɛɛn kǝ kǝbɔpka Y"}, -- timezones: map[string]string{"SAST": "SAST", "ACST": "ACST", "ECT": "ECT", "HECU": "HECU", "EDT": "EDT", "WIT": "WIT", "OEZ": "OEZ", "COT": "COT", "HNT": "HNT", "HNOG": "HNOG", "ACDT": "ACDT", "HEPMX": "HEPMX", "ADT": "ADT", "ART": "ART", "LHST": "LHST", "CLT": "CLT", "AKDT": "AKDT", "MYT": "MYT", "HKST": "HKST", "HNEG": "HNEG", "EAT": "EAT", "SRT": "SRT", "PDT": "PDT", "ACWST": "ACWST", "WIB": "WIB", "ACWDT": "ACWDT", "AWDT": "AWDT", "HNPM": "HNPM", "NZST": "NZST", "JDT": "JDT", "GMT": "GMT", "CST": "CST", "AST": "AST", "HAST": "HAST", "AEST": "AEST", "HEPM": "HEPM", "LHDT": "LHDT", "CHADT": "CHADT", "CAT": "CAT", "OESZ": "OESZ", "WEZ": "WEZ", "HEOG": "HEOG", "HKT": "HKT", "WITA": "WITA", "TMT": "TMT", "WAT": "WAT", "CDT": "CDT", "BT": "BT", "MEZ": "MEZ", "HEEG": "HEEG", "HENOMX": "HENOMX", "MST": "MST", "HADT": "HADT", "VET": "VET", "MESZ": "MESZ", "CLST": "CLST", "ChST": "ChST", "WAST": "WAST", "SGT": "SGT", "GFT": "GFT", "WESZ": "WESZ", "IST": "IST", "WART": "WART", "WARST": "WARST", "HNNOMX": "HNNOMX", "PST": "PST", "CHAST": "CHAST", "JST": "JST", "BOT": "BOT", "TMST": "TMST", "HNPMX": "HNPMX", "AEDT": "AEDT", "AWST": "AWST", "NZDT": "NZDT", "HNCU": "HNCU", "UYST": "UYST", "ARST": "ARST", "∅∅∅": "∅∅∅", "EST": "EST", "AKST": "AKST", "HAT": "HAT", "COST": "COST", "MDT": "MDT", "GYT": "GYT", "UYT": "UYT"}, -+ locale: "ksf_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIT": "WIT", "GMT": "GMT", "LHST": "LHST", "PST": "PST", "OEZ": "OEZ", "WAST": "WAST", "MST": "MST", "SRT": "SRT", "HNPM": "HNPM", "ACWDT": "ACWDT", "UYT": "UYT", "CAT": "CAT", "MEZ": "MEZ", "LHDT": "LHDT", "HAT": "HAT", "COT": "COT", "HEPMX": "HEPMX", "HNOG": "HNOG", "ADT": "ADT", "HEPM": "HEPM", "ACWST": "ACWST", "IST": "IST", "HECU": "HECU", "WIB": "WIB", "BOT": "BOT", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "CHADT": "CHADT", "VET": "VET", "UYST": "UYST", "GFT": "GFT", "ChST": "ChST", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "EAT": "EAT", "WEZ": "WEZ", "AKDT": "AKDT", "WAT": "WAT", "HEOG": "HEOG", "TMST": "TMST", "MYT": "MYT", "JST": "JST", "AWDT": "AWDT", "HADT": "HADT", "ACDT": "ACDT", "HNEG": "HNEG", "CLT": "CLT", "WITA": "WITA", "CST": "CST", "AWST": "AWST", "CDT": "CDT", "HAST": "HAST", "ACST": "ACST", "ART": "ART", "HEEG": "HEEG", "AKST": "AKST", "WART": "WART", "EST": "EST", "OESZ": "OESZ", "HNT": "HNT", "AEST": "AEST", "AEDT": "AEDT", "SGT": "SGT", "HKT": "HKT", "EDT": "EDT", "CLST": "CLST", "MDT": "MDT", "NZST": "NZST", "BT": "BT", "WARST": "WARST", "COST": "COST", "MESZ": "MESZ", "HKST": "HKST", "ARST": "ARST", "JDT": "JDT", "HNPMX": "HNPMX", "GYT": "GYT", "NZDT": "NZDT", "ECT": "ECT", "HENOMX": "HENOMX", "PDT": "PDT", "HNCU": "HNCU", "TMT": "TMT", "SAST": "SAST", "AST": "AST"}, - } - } -  -@@ -110,7 +94,7 @@ func (ksf *ksf_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ksf *ksf_CM) MonthsAbbreviated() []string { -- return ksf.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +114,7 @@ func (ksf *ksf_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ksf *ksf_CM) MonthsWide() []string { -- return ksf.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -176,44 +160,7 @@ func (ksf *ksf_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ksf_CM' and handles both Whole and Real numbers based on 'v' - func (ksf *ksf_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksf.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ksf.group) - 1; j >= 0; j-- { -- b = append(b, ksf.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ksf.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ksf_CM' and handles both Whole and Real numbers based on 'v' -@@ -227,58 +174,7 @@ func (ksf *ksf_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ksf.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksf.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ksf.group) - 1; j >= 0; j-- { -- b = append(b, ksf.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ksf.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ksf.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ksf.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ksf_CM' -@@ -287,65 +183,7 @@ func (ksf *ksf_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ksf.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksf.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ksf.group) - 1; j >= 0; j-- { -- b = append(b, ksf.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ksf.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ksf.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ksf.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ksf.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ksf_CM' -@@ -353,17 +191,6 @@ func (ksf *ksf_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -372,17 +199,6 @@ func (ksf *ksf_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ksf.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -391,17 +207,6 @@ func (ksf *ksf_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ksf.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -410,19 +215,6 @@ func (ksf *ksf_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ksf.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ksf.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -431,19 +223,6 @@ func (ksf *ksf_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -452,26 +231,6 @@ func (ksf *ksf_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -480,30 +239,6 @@ func (ksf *ksf_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -512,34 +247,5 @@ func (ksf *ksf_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksf.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ksf.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ksh/ksh.go b/ksh/ksh.go -index b3c3756..12feb15 100644 ---- a/ksh/ksh.go -+++ b/ksh/ksh.go -@@ -72,7 +72,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v. Chr.", "n. Chr."}, - erasNarrow: []string{"vC", "nC"}, - erasWide: []string{"vür Krestos", "noh Krestos"}, -- timezones: map[string]string{"HADT": "HADT", "HKT": "HKT", "JST": "JST", "ARST": "ARST", "PDT": "PDT", "UYST": "UYST", "WIB": "WIB", "ACWDT": "ACWDT", "AWDT": "AWDT", "MESZ": "Meddel-Europpa sing Summerzick", "OESZ": "Oß-Europpa sing Summerzick", "EAT": "Oß-Affrekaanesche Zigg", "HEPMX": "HEPMX", "MYT": "MYT", "BT": "BT", "HEOG": "HEOG", "HNT": "HNT", "CLST": "CLST", "HENOMX": "HENOMX", "COT": "COT", "HNPMX": "HNPMX", "AKST": "AKST", "ADT": "ADT", "MST": "MST", "AKDT": "AKDT", "HAST": "HAST", "HAT": "HAT", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "HKST": "HKST", "HECU": "HECU", "HNEG": "HNEG", "GFT": "GFT", "ACST": "ACST", "WAT": "Jewöhnlijje Wäß-Affrekaanesche Zigg", "HNCU": "HNCU", "UYT": "UYT", "WEZ": "Weß-Europpa sing jewöhnlijje Zick", "AWST": "AWST", "TMT": "TMT", "CAT": "Zentraal-Affrekaanesche Zigg", "SGT": "SGT", "WIT": "WIT", "MEZ": "Meddel-Europpa sing jewöhnlijje Zick", "IST": "IST", "NZDT": "NZDT", "BOT": "BOT", "HNNOMX": "HNNOMX", "AST": "AST", "VET": "VET", "HEPM": "HEPM", "WARST": "WARST", "COST": "COST", "CST": "CST", "HNPM": "HNPM", "WAST": "Wäß-Affrekaanesche Sommerzigg", "CDT": "CDT", "MDT": "MDT", "JDT": "JDT", "LHDT": "LHDT", "GMT": "Greenwich sing Standat-Zick", "SRT": "SRT", "AEST": "AEST", "NZST": "NZST", "ACDT": "ACDT", "WART": "WART", "EST": "EST", "GYT": "GYT", "ART": "ART", "WITA": "WITA", "SAST": "Söd-Affrekaanesche Zigg", "CLT": "CLT", "TMST": "TMST", "ChST": "ChST", "OEZ": "Oß-Europpa sing jewöhnlijje Zick", "ACWST": "ACWST", "CHAST": "CHAST", "LHST": "LHST", "ECT": "ECT", "CHADT": "CHADT", "HEEG": "HEEG", "EDT": "EDT", "PST": "PST", "WESZ": "Weß-Europpa sing Summerzick", "AEDT": "AEDT"}, -+ timezones: map[string]string{"WARST": "WARST", "UYT": "UYT", "WESZ": "Weß-Europpa sing Summerzick", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AWDT": "AWDT", "HEPM": "HEPM", "JST": "JST", "AKST": "AKST", "HEEG": "HEEG", "UYST": "UYST", "WART": "WART", "HKST": "HKST", "TMST": "TMST", "CLST": "CLST", "MEZ": "Meddel-Europpa sing jewöhnlijje Zick", "HNEG": "HNEG", "HNCU": "HNCU", "COST": "COST", "HEOG": "HEOG", "CDT": "CDT", "HAST": "HAST", "JDT": "JDT", "HNOG": "HNOG", "AST": "AST", "ADT": "ADT", "PST": "PST", "WAST": "Wäß-Affrekaanesche Sommerzigg", "TMT": "TMT", "CAT": "Zentraal-Affrekaanesche Zigg", "MST": "MST", "ECT": "ECT", "VET": "VET", "GYT": "GYT", "COT": "COT", "MDT": "MDT", "HECU": "HECU", "OESZ": "Oß-Europpa sing Summerzick", "EST": "EST", "EDT": "EDT", "MESZ": "Meddel-Europpa sing Summerzick", "LHST": "LHST", "IST": "IST", "CST": "CST", "ChST": "ChST", "ACDT": "ACDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "HNT": "HNT", "HAT": "HAT", "GMT": "Greenwich sing Standat-Zick", "AWST": "AWST", "CHAST": "CHAST", "GFT": "GFT", "NZST": "NZST", "LHDT": "LHDT", "ACWST": "ACWST", "SGT": "SGT", "AKDT": "AKDT", "ART": "ART", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WIT": "WIT", "HKT": "HKT", "WITA": "WITA", "ACST": "ACST", "PDT": "PDT", "HADT": "HADT", "BT": "BT", "OEZ": "Oß-Europpa sing jewöhnlijje Zick", "SAST": "Söd-Affrekaanesche Zigg", "∅∅∅": "∅∅∅", "CLT": "CLT", "WIB": "WIB", "BOT": "BOT", "AEST": "AEST", "ARST": "ARST", "EAT": "Oß-Affrekaanesche Zigg", "HNPM": "HNPM", "CHADT": "CHADT", "WEZ": "Weß-Europpa sing jewöhnlijje Zick", "WAT": "Jewöhnlijje Wäß-Affrekaanesche Zigg", "NZDT": "NZDT", "SRT": "SRT", "MYT": "MYT"}, - } - } -  -diff --git a/ksh_DE/ksh_DE.go b/ksh_DE/ksh_DE.go -index b1c0d9a..42ccd86 100644 ---- a/ksh_DE/ksh_DE.go -+++ b/ksh_DE/ksh_DE.go -@@ -10,69 +10,45 @@ import ( - ) -  - type ksh_DE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ksh_DE' locale - func New() locales.Translator { - return &ksh_DE{ -- locale: "ksh_DE", -- pluralsCardinal: []locales.PluralRule{1, 2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Fäb", "Mäz", "Apr", "Mai", "Jun", "Jul", "Ouj", "Säp", "Okt", "Nov", "Dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "O", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Jannewa", "Fäbrowa", "Määz", "Aprell", "Mai", "Juuni", "Juuli", "Oujoß", "Septämber", "Oktohber", "Novämber", "Dezämber"}, -- daysAbbreviated: []string{"Su.", "Mo.", "Di.", "Me.", "Du.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"Su", "Mo", "Di", "Me", "Du", "Fr", "Sa"}, -- daysWide: []string{"Sunndaach", "Mohndaach", "Dinnsdaach", "Metwoch", "Dunnersdaach", "Friidaach", "Samsdaach"}, -- periodsAbbreviated: []string{"v.M.", "n.M."}, -- periodsWide: []string{"Uhr vörmiddaachs", "Uhr nommendaachs"}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"vC", "nC"}, -- erasWide: []string{"vür Krestos", "noh Krestos"}, -- timezones: map[string]string{"HAST": "HAST", "HADT": "HADT", "HEOG": "HEOG", "IST": "IST", "EDT": "EDT", "AKST": "AKST", "ACDT": "ACDT", "HENOMX": "HENOMX", "WART": "WART", "SGT": "SGT", "HEPMX": "HEPMX", "HEPM": "HEPM", "CHADT": "CHADT", "OESZ": "Oß-Europpa sing Summerzick", "COST": "COST", "GMT": "Greenwich sing Standat-Zick", "CLST": "CLST", "ChST": "ChST", "MST": "MST", "VET": "VET", "WIT": "WIT", "AWDT": "AWDT", "NZDT": "NZDT", "CST": "CST", "WIB": "WIB", "AWST": "AWST", "ACST": "ACST", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "GYT": "GYT", "HNOG": "HNOG", "TMST": "TMST", "CDT": "CDT", "MYT": "MYT", "SRT": "SRT", "LHDT": "LHDT", "HAT": "HAT", "ARST": "ARST", "HKST": "HKST", "WAST": "Wäß-Affrekaanesche Sommerzigg", "HNCU": "HNCU", "AST": "AST", "HKT": "HKT", "NZST": "NZST", "EAT": "Oß-Affrekaanesche Zigg", "OEZ": "Oß-Europpa sing jewöhnlijje Zick", "HNT": "HNT", "ART": "ART", "PDT": "PDT", "MDT": "MDT", "ADT": "ADT", "UYT": "UYT", "WESZ": "Weß-Europpa sing Summerzick", "ACWDT": "ACWDT", "MEZ": "Meddel-Europpa sing jewöhnlijje Zick", "∅∅∅": "∅∅∅", "JST": "JST", "HECU": "HECU", "EST": "EST", "WEZ": "Weß-Europpa sing jewöhnlijje Zick", "HNPM": "HNPM", "BOT": "BOT", "ECT": "ECT", "WARST": "WARST", "ACWST": "ACWST", "CHAST": "CHAST", "SAST": "Söd-Affrekaanesche Zigg", "TMT": "TMT", "CAT": "Zentraal-Affrekaanesche Zigg", "JDT": "JDT", "WAT": "Jewöhnlijje Wäß-Affrekaanesche Zigg", "AKDT": "AKDT", "WITA": "WITA", "AEDT": "AEDT", "LHST": "LHST", "CLT": "CLT", "UYST": "UYST", "PST": "PST", "HNEG": "HNEG", "GFT": "GFT", "COT": "COT", "BT": "BT", "AEST": "AEST", "MESZ": "Meddel-Europpa sing Summerzick", "HEEG": "HEEG"}, -+ locale: "ksh_DE", -+ pluralsCardinal: []locales.PluralRule{1, 2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKST": "HKST", "CDT": "CDT", "HENOMX": "HENOMX", "HEPM": "HEPM", "UYST": "UYST", "WAT": "WAT", "COT": "COT", "COST": "COST", "CLT": "CLT", "WITA": "WITA", "ART": "ART", "ACDT": "ACDT", "HEPMX": "HEPMX", "HNT": "HNT", "SAST": "SAST", "ADT": "ADT", "PST": "PST", "TMT": "TMT", "CST": "CST", "NZDT": "NZDT", "ACST": "ACST", "HEEG": "HEEG", "AWDT": "AWDT", "ACWDT": "ACWDT", "AKDT": "AKDT", "OESZ": "OESZ", "WART": "WART", "NZST": "NZST", "MESZ": "MESZ", "HNPM": "HNPM", "AEDT": "AEDT", "WEZ": "WEZ", "WESZ": "WESZ", "HAT": "HAT", "HNOG": "HNOG", "SRT": "SRT", "HAST": "HAST", "OEZ": "OEZ", "ChST": "ChST", "JDT": "JDT", "HNPMX": "HNPMX", "VET": "VET", "HEOG": "HEOG", "EDT": "EDT", "SGT": "SGT", "AST": "AST", "GMT": "GMT", "HNNOMX": "HNNOMX", "UYT": "UYT", "ACWST": "ACWST", "AKST": "AKST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "GFT": "GFT", "GYT": "GYT", "EST": "EST", "MST": "MST", "EAT": "EAT", "HECU": "HECU", "WIT": "WIT", "TMST": "TMST", "ARST": "ARST", "LHDT": "LHDT", "BT": "BT", "CAT": "CAT", "ECT": "ECT", "MYT": "MYT", "PDT": "PDT", "HNCU": "HNCU", "WAST": "WAST", "HKT": "HKT", "BOT": "BOT", "MEZ": "MEZ", "AWST": "AWST", "CHADT": "CHADT", "AEST": "AEST", "CHAST": "CHAST", "IST": "IST", "CLST": "CLST", "WIB": "WIB", "MDT": "MDT", "HADT": "HADT", "JST": "JST", "LHST": "LHST", "WARST": "WARST"}, - } - } -  -@@ -127,7 +103,7 @@ func (ksh *ksh_DE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ksh *ksh_DE) MonthsAbbreviated() []string { -- return ksh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -137,7 +113,7 @@ func (ksh *ksh_DE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ksh *ksh_DE) MonthsNarrow() []string { -- return ksh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -147,7 +123,7 @@ func (ksh *ksh_DE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ksh *ksh_DE) MonthsWide() []string { -- return ksh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,81 +169,13 @@ func (ksh *ksh_DE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ksh_DE' and handles both Whole and Real numbers based on 'v' - func (ksh *ksh_DE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ksh.group) - 1; j >= 0; j-- { -- b = append(b, ksh.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ksh.minus) - 1; j >= 0; j-- { -- b = append(b, ksh.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ksh_DE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ksh *ksh_DE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ksh.minus) - 1; j >= 0; j-- { -- b = append(b, ksh.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ksh.percentSuffix...) -- -- b = append(b, ksh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ksh_DE' -@@ -275,60 +183,7 @@ func (ksh *ksh_DE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ksh.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ksh.group) - 1; j >= 0; j-- { -- b = append(b, ksh.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ksh.minus) - 1; j >= 0; j-- { -- b = append(b, ksh.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ksh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ksh.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ksh_DE' -@@ -337,67 +192,7 @@ func (ksh *ksh_DE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ksh.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ksh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ksh.group) - 1; j >= 0; j-- { -- b = append(b, ksh.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ksh.minus) - 1; j >= 0; j-- { -- b = append(b, ksh.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ksh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ksh.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ksh.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ksh_DE' -@@ -405,17 +200,6 @@ func (ksh *ksh_DE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -424,17 +208,6 @@ func (ksh *ksh_DE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, ksh.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +216,6 @@ func (ksh *ksh_DE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, ksh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,20 +224,6 @@ func (ksh *ksh_DE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ksh.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20, 0x64, 0xc3, 0xa4}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, ksh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +232,6 @@ func (ksh *ksh_DE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,26 +240,6 @@ func (ksh *ksh_DE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -533,30 +248,6 @@ func (ksh *ksh_DE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -565,34 +256,5 @@ func (ksh *ksh_DE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ksh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ksh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/kw/kw.go b/kw/kw.go -index d4b68e7..4b1677b 100644 ---- a/kw/kw.go -+++ b/kw/kw.go -@@ -57,7 +57,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"RC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"ACST": "ACST", "HNCU": "HNCU", "AWDT": "AWDT", "LHDT": "LHDT", "HNEG": "HNEG", "GFT": "GFT", "AEDT": "AEDT", "CST": "CST", "AST": "AST", "HNPMX": "HNPMX", "ART": "ART", "HENOMX": "HENOMX", "EDT": "EDT", "CAT": "CAT", "UYST": "UYST", "AEST": "AEST", "ChST": "ChST", "ACDT": "ACDT", "WART": "WART", "CDT": "CDT", "CHAST": "CHAST", "JST": "JST", "ECT": "ECT", "HEPMX": "HEPMX", "VET": "VET", "WIT": "WIT", "AWST": "AWST", "WARST": "WARST", "EST": "EST", "HECU": "HECU", "AKDT": "AKDT", "HAST": "HAST", "WEZ": "WEZ", "ACWST": "ACWST", "CLT": "CLT", "WAST": "WAST", "MDT": "MDT", "SRT": "SRT", "HNOG": "HNOG", "MEZ": "MEZ", "NZST": "NZST", "BOT": "BOT", "SGT": "SGT", "GMT": "GMT", "MST": "MST", "HADT": "HADT", "WITA": "WITA", "∅∅∅": "∅∅∅", "TMST": "TMST", "EAT": "EAT", "OESZ": "OESZ", "AKST": "AKST", "ACWDT": "ACWDT", "CHADT": "CHADT", "JDT": "JDT", "HEEG": "HEEG", "UYT": "UYT", "PST": "PST", "PDT": "PDT", "WESZ": "WESZ", "HKT": "HKT", "LHST": "LHST", "WAT": "WAT", "COST": "COST", "HAT": "HAT", "ARST": "ARST", "HEOG": "HEOG", "MESZ": "MESZ", "NZDT": "NZDT", "MYT": "MYT", "BT": "BT", "OEZ": "OEZ", "COT": "COT", "ADT": "ADT", "HNT": "HNT", "IST": "IST", "CLST": "CLST", "TMT": "TMT", "HKST": "HKST", "HNNOMX": "HNNOMX", "GYT": "GYT", "HEPM": "HEPM", "SAST": "SAST", "WIB": "WIB", "HNPM": "HNPM"}, -+ timezones: map[string]string{"MST": "MST", "EAT": "EAT", "HEEG": "HEEG", "MYT": "MYT", "PST": "PST", "ACWDT": "ACWDT", "BOT": "BOT", "HAST": "HAST", "HENOMX": "HENOMX", "BT": "BT", "TMST": "TMST", "CDT": "CDT", "AST": "AST", "AKDT": "AKDT", "COT": "COT", "CAT": "CAT", "WITA": "WITA", "MEZ": "MEZ", "ACST": "ACST", "GYT": "GYT", "COST": "COST", "EDT": "EDT", "NZDT": "NZDT", "ACWST": "ACWST", "HKT": "HKT", "ECT": "ECT", "ADT": "ADT", "MESZ": "MESZ", "PDT": "PDT", "HNCU": "HNCU", "HNPMX": "HNPMX", "WART": "WART", "CLT": "CLT", "CLST": "CLST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "LHST": "LHST", "HEPM": "HEPM", "WARST": "WARST", "NZST": "NZST", "WIB": "WIB", "ACDT": "ACDT", "AWST": "AWST", "UYST": "UYST", "WEZ": "WEZ", "OEZ": "OEZ", "HKST": "HKST", "GMT": "GMT", "AWDT": "AWDT", "JDT": "JDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "WAST": "WAST", "HAT": "HAT", "TMT": "TMT", "VET": "VET", "∅∅∅": "∅∅∅", "JST": "JST", "SGT": "SGT", "HECU": "HECU", "MDT": "MDT", "ChST": "ChST", "UYT": "UYT", "WESZ": "WESZ", "GFT": "GFT", "HNT": "HNT", "WIT": "WIT", "HNPM": "HNPM", "WAT": "WAT", "OESZ": "OESZ", "HEOG": "HEOG", "CST": "CST", "ARST": "ARST", "HADT": "HADT", "AEST": "AEST", "SAST": "SAST", "HNOG": "HNOG", "ART": "ART", "SRT": "SRT", "LHDT": "LHDT", "IST": "IST", "AEDT": "AEDT", "CHADT": "CHADT", "AKST": "AKST", "EST": "EST"}, - } - } -  -diff --git a/kw_GB/kw_GB.go b/kw_GB/kw_GB.go -index 832df6a..b36842f 100644 ---- a/kw_GB/kw_GB.go -+++ b/kw_GB/kw_GB.go -@@ -42,22 +42,13 @@ type kw_GB struct { - // New returns a new instance of translator for the 'kw_GB' locale - func New() locales.Translator { - return &kw_GB{ -- locale: "kw_GB", -- pluralsCardinal: []locales.PluralRule{2, 3, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Gen", "Hwe", "Meu", "Ebr", "Me", "Met", "Gor", "Est", "Gwn", "Hed", "Du", "Kev"}, -- monthsWide: []string{"", "mis Genver", "mis Hwevrer", "mis Meurth", "mis Ebrel", "mis Me", "mis Metheven", "mis Gortheren", "mis Est", "mis Gwynngala", "mis Hedra", "mis Du", "mis Kevardhu"}, -- daysAbbreviated: []string{"Sul", "Lun", "Mth", "Mhr", "Yow", "Gwe", "Sad"}, -- daysWide: []string{"dy Sul", "dy Lun", "dy Meurth", "dy Merher", "dy Yow", "dy Gwener", "dy Sadorn"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"RC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"TMT": "TMT", "EST": "EST", "AST": "AST", "UYT": "UYT", "AWDT": "AWDT", "LHST": "LHST", "CHADT": "CHADT", "HEEG": "HEEG", "AKST": "AKST", "CDT": "CDT", "SRT": "SRT", "AEST": "AEST", "HNEG": "HNEG", "VET": "VET", "NZDT": "NZDT", "CHAST": "CHAST", "COT": "COT", "HNCU": "HNCU", "MDT": "MDT", "HKST": "HKST", "IST": "IST", "WARST": "WARST", "CST": "CST", "TMST": "TMST", "EAT": "EAT", "SGT": "SGT", "EDT": "EDT", "UYST": "UYST", "JDT": "JDT", "ChST": "ChST", "CAT": "CAT", "MST": "MST", "HAST": "HAST", "WITA": "WITA", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "GMT": "GMT", "ACWDT": "ACWDT", "ACWST": "ACWST", "ARST": "ARST", "AWST": "AWST", "CLST": "CLST", "WAST": "WAST", "ECT": "ECT", "HENOMX": "HENOMX", "GYT": "GYT", "WIB": "WIB", "ART": "ART", "HNPM": "HNPM", "MEZ": "MEZ", "HECU": "HECU", "MYT": "MYT", "HADT": "HADT", "BT": "BT", "HEPM": "HEPM", "SAST": "SAST", "ACDT": "ACDT", "HNT": "HNT", "HAT": "HAT", "LHDT": "LHDT", "NZST": "NZST", "WAT": "WAT", "WIT": "WIT", "PDT": "PDT", "HNOG": "HNOG", "HEOG": "HEOG", "HKT": "HKT", "ADT": "ADT", "OEZ": "OEZ", "WART": "WART", "AKDT": "AKDT", "AEDT": "AEDT", "CLT": "CLT", "∅∅∅": "∅∅∅", "JST": "JST", "BOT": "BOT", "ACST": "ACST", "COST": "COST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "PST": "PST", "WEZ": "WEZ", "WESZ": "WESZ", "GFT": "GFT", "OESZ": "OESZ"}, -+ locale: "kw_GB", -+ pluralsCardinal: []locales.PluralRule{2, 3, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OEZ": "OEZ", "EST": "EST", "HKT": "HKT", "ACST": "ACST", "GFT": "GFT", "HNT": "HNT", "ECT": "ECT", "LHDT": "LHDT", "HNPM": "HNPM", "CHADT": "CHADT", "HAT": "HAT", "WIB": "WIB", "HAST": "HAST", "LHST": "LHST", "ACWST": "ACWST", "WEZ": "WEZ", "WIT": "WIT", "HKST": "HKST", "ARST": "ARST", "AWST": "AWST", "AWDT": "AWDT", "PDT": "PDT", "SGT": "SGT", "CAT": "CAT", "CST": "CST", "∅∅∅": "∅∅∅", "UYT": "UYT", "AKST": "AKST", "HNEG": "HNEG", "GMT": "GMT", "EAT": "EAT", "MESZ": "MESZ", "HEPM": "HEPM", "AST": "AST", "MYT": "MYT", "AEDT": "AEDT", "GYT": "GYT", "HENOMX": "HENOMX", "ART": "ART", "JST": "JST", "WAST": "WAST", "OESZ": "OESZ", "HNOG": "HNOG", "CDT": "CDT", "ACWDT": "ACWDT", "CHAST": "CHAST", "HNCU": "HNCU", "HECU": "HECU", "IST": "IST", "SRT": "SRT", "HEEG": "HEEG", "AKDT": "AKDT", "COST": "COST", "HEOG": "HEOG", "TMST": "TMST", "CLT": "CLT", "MDT": "MDT", "MEZ": "MEZ", "JDT": "JDT", "WESZ": "WESZ", "VET": "VET", "WITA": "WITA", "MST": "MST", "ChST": "ChST", "PST": "PST", "EDT": "EDT", "NZDT": "NZDT", "WARST": "WARST", "ADT": "ADT", "HADT": "HADT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "AEST": "AEST", "UYST": "UYST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "NZST": "NZST", "WART": "WART", "TMT": "TMT", "WAT": "WAT", "BT": "BT", "SAST": "SAST", "COT": "COT", "CLST": "CLST", "BOT": "BOT"}, - } - } -  -@@ -112,7 +103,7 @@ func (kw *kw_GB) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (kw *kw_GB) MonthsAbbreviated() []string { -- return kw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +123,7 @@ func (kw *kw_GB) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (kw *kw_GB) MonthsWide() []string { -- return kw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,56 +183,7 @@ func (kw *kw_GB) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kw.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, kw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'kw_GB' -@@ -250,64 +192,7 @@ func (kw *kw_GB) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := kw.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, kw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, kw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, kw.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, kw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'kw_GB' -@@ -315,27 +200,6 @@ func (kw *kw_GB) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +208,6 @@ func (kw *kw_GB) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +216,6 @@ func (kw *kw_GB) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +224,6 @@ func (kw *kw_GB) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, kw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, kw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +232,6 @@ func (kw *kw_GB) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +240,6 @@ func (kw *kw_GB) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +248,6 @@ func (kw *kw_GB) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +256,5 @@ func (kw *kw_GB) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, kw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := kw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ky/ky.go b/ky/ky.go -index 68b0ba3..3abb732 100644 ---- a/ky/ky.go -+++ b/ky/ky.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"б.з.ч.", "б.з."}, - erasNarrow: []string{"б.з.ч.", "б.з."}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"ECT": "Экуадор убактысы", "MST": "MST", "WIB": "Батыш Индонезия убактысы", "ACWST": "Австралия борбордук батыш кышкы убакыты", "JDT": "Жапон жайкы убактысы", "HEEG": "Чыгыш Гренландия жайкы убактысы", "GMT": "GMT, кышкы убакыты", "HECU": "Куба жайкы убактысы", "HKST": "Гонконг жайкы убактысы", "HNPM": "Сен Пьер жана Микелон кышкы убактысы", "CHAST": "Чатам кышкы убакыт", "GYT": "Гвиана убактысы", "SRT": "Суринаме убактысы", "PDT": "Түндүк Америка, Тынч океан жайкы убактысы", "LHDT": "Лорд Хау жайкы убактысы", "NZST": "Жаӊы Зеландия кышкы убакыты", "∅∅∅": "Амазон жайкы убактысы", "MYT": "Малайзия убактысы", "AKDT": "Аляска жайкы убактысы", "OEZ": "Чыгыш Европа кышкы убакыты", "WAST": "Батыш Африка жайкы убактысы", "AKST": "Аляска кышкы убактысы", "ART": "Аргентина кышкы убактысы", "AWDT": "Австралия батыш жайкы убактысы", "MESZ": "Борбордук Европа жайкы убактысы", "GFT": "Француз Гвиана убактысы", "BOT": "Боливия убактысы", "BT": "Бутан убактысы", "AEST": "Австралия чыгыш кышкы убакыты", "AWST": "Австралия батыш кышкы убакыты", "IST": "Индия убактысы", "HENOMX": "Түндүк-чыгыш Мексика жайкы убактысы", "HNPMX": "Мексика, Тынч океан кышкы убактысы", "HADT": "Гавайи-Алеут жайкы убактысы", "ARST": "Аргентина жайкы убактысы", "HAST": "Гавайи-Алеут кышкы убактысы", "HAT": "Нюфаундлэнд жайкы убактысы", "TMST": "Түркмөнстан жайкы убактысы", "HNEG": "Чыгыш Гренландия кышкы убактысы", "WART": "Батыш Аргентина кышкы убактысы", "WARST": "Батыш Аргентина жайкы убактысы", "COT": "Колумбия кышкы убактысы", "EDT": "Түндүк Америка, чыгыш жайкы убактысы", "ACDT": "Австралия борбордук жайкы убактысы", "EST": "Түндүк Америка, чыгыш кышкы убактысы", "UYT": "Уругвай кышкы убактысы", "VET": "Венесуэла убактысы", "WITA": "Борбордук Индонезия убактысы", "CLT": "Чили кышкы убактысы", "HEPMX": "Мексика, Тынч океан жайкы убактысы", "CDT": "Түндүк Америка, борбордук жайкы убакыт", "AST": "Атлантика кышкы убактысы", "WIT": "Чыгыш Индонезия убактысы", "OESZ": "Чыгыш Европа жайкы убактысы", "HNT": "Нюфаундлэнд кышкы убактысы", "ACST": "Австралия борбордук кышкы убакыты", "HNNOMX": "Түндүк-чыгыш Мексика кышкы убактысы", "CST": "Түндүк Америка, борбордук кышкы убактысы", "ADT": "Атлантика жайкы убактысы", "PST": "Түндүк Америка, Тынч океан кышкы убактысы", "HKT": "Гонконг кышкы убакыты", "MEZ": "Борбордук Европа кышкы убакыты", "LHST": "Лорд Хау кышкы убакыты", "ChST": "Чаморро убактысы", "CAT": "Борбордук Африка убактысы", "HNCU": "Куба кышкы убактысы", "HEOG": "Батыш Гренландия жайкы убактысы", "NZDT": "Жаңы Зеландия жайкы убакыты", "TMT": "Түркмөнстан кышкы убакыты", "AEDT": "Австралия чыгыш жайкы убактысы", "JST": "Жапон кышкы убакыты", "HNOG": "Батыш Гренландия кышкы убактысы", "WESZ": "Батыш Европа жайкы убактысы", "COST": "Колумбия жайкы убактысы", "SGT": "Сингапур убактысы", "HEPM": "Сен Пьер жана Микелон жайкы убактысы", "CHADT": "Чатам жайкы убактысы", "SAST": "Түштүк Африка убактысы", "CLST": "Чили жайкы убактысы", "EAT": "Чыгыш Африка убактысы", "WAT": "Батыш Африка кышкы убакыты", "MDT": "MDT", "UYST": "Уругвай жайкы убактысы", "WEZ": "Батыш Европа кышкы убакыты", "ACWDT": "Австралия борбордук чыгыш жайкы убактысы"}, -+ timezones: map[string]string{"HNEG": "Чыгыш Гренландия кышкы убактысы", "PDT": "Түндүк Америка, Тынч океан жайкы убактысы", "∅∅∅": "∅∅∅", "HKST": "Гонконг жайкы убактысы", "AST": "Атлантика кышкы убактысы", "JST": "Жапон кышкы убакыты", "HNT": "Нюфаундлэнд кышкы убактысы", "WIT": "Чыгыш Индонезия убактысы", "ChST": "Чаморро убактысы", "HKT": "Гонконг кышкы убакыты", "TMT": "Түркмөнстан кышкы убакыты", "MDT": "MDT", "EAT": "Чыгыш Африка убактысы", "AWDT": "Австралия батыш жайкы убактысы", "HNPM": "Сен Пьер жана Микелон кышкы убактысы", "VET": "Венесуэла убактысы", "OEZ": "Чыгыш Европа кышкы убакыты", "COT": "Колумбия кышкы убактысы", "COST": "Колумбия жайкы убактысы", "MESZ": "Борбордук Европа жайкы убактысы", "LHDT": "Лорд Хау жайкы убактысы", "HNOG": "Батыш Гренландия кышкы убактысы", "CAT": "Борбордук Африка убактысы", "GMT": "GMT, кышкы убакыты", "HAST": "Гавайи-Алеут кышкы убактысы", "MST": "MST", "HENOMX": "Түндүк-чыгыш Мексика жайкы убактысы", "JDT": "Жапон жайкы убактысы", "PST": "Түндүк Америка, Тынч океан кышкы убактысы", "GYT": "Гвиана убактысы", "TMST": "Түркмөнстан жайкы убактысы", "CLST": "Чили жайкы убактысы", "WITA": "Борбордук Индонезия убактысы", "ECT": "Экуадор убактысы", "SRT": "Суринаме убактысы", "HEPM": "Сен Пьер жана Микелон жайкы убактысы", "ACWST": "Австралия борбордук батыш кышкы убакыты", "AEST": "Австралия чыгыш кышкы убакыты", "CHADT": "Чатам жайкы убактысы", "HEPMX": "Мексика, Тынч океан жайкы убактысы", "SAST": "Түштүк Африка убактысы", "BOT": "Боливия убактысы", "ACWDT": "Австралия борбордук чыгыш жайкы убактысы", "HECU": "Куба жайкы убактысы", "AKST": "Аляска кышкы убактысы", "WIB": "Батыш Индонезия убактысы", "CDT": "Түндүк Америка, борбордук жайкы убакыт", "HNNOMX": "Түндүк-чыгыш Мексика кышкы убактысы", "UYST": "Уругвай жайкы убактысы", "HNCU": "Куба кышкы убактысы", "HNPMX": "Мексика, Тынч океан кышкы убактысы", "OESZ": "Чыгыш Европа жайкы убактысы", "EDT": "Түндүк Америка, чыгыш жайкы убактысы", "CST": "Түндүк Америка, борбордук кышкы убактысы", "NZST": "Жаӊы Зеландия кышкы убакыты", "HEEG": "Чыгыш Гренландия жайкы убактысы", "AWST": "Австралия батыш кышкы убакыты", "AEDT": "Австралия чыгыш жайкы убактысы", "CHAST": "Чатам кышкы убакыт", "AKDT": "Аляска жайкы убактысы", "WART": "Батыш Аргентина кышкы убактысы", "EST": "Түндүк Америка, чыгыш кышкы убактысы", "ART": "Аргентина кышкы убактысы", "ARST": "Аргентина жайкы убактысы", "UYT": "Уругвай кышкы убактысы", "WAST": "Батыш Африка жайкы убактысы", "LHST": "Лорд Хау кышкы убакыты", "WAT": "Батыш Африка кышкы убакыты", "CLT": "Чили кышкы убактысы", "ADT": "Атлантика жайкы убактысы", "HADT": "Гавайи-Алеут жайкы убактысы", "ACST": "Австралия борбордук кышкы убакыты", "MYT": "Малайзия убактысы", "GFT": "Француз Гвиана убактысы", "NZDT": "Жаңы Зеландия жайкы убакыты", "MEZ": "Борбордук Европа кышкы убакыты", "IST": "Индия убактысы", "WESZ": "Батыш Европа жайкы убактысы", "SGT": "Сингапур убактысы", "WARST": "Батыш Аргентина жайкы убактысы", "ACDT": "Австралия борбордук жайкы убактысы", "BT": "Бутан убактысы", "WEZ": "Батыш Европа кышкы убакыты", "HAT": "Нюфаундлэнд жайкы убактысы", "HEOG": "Батыш Гренландия жайкы убактысы"}, - } - } -  -diff --git a/ky_KG/ky_KG.go b/ky_KG/ky_KG.go -index 097b68d..154fef4 100644 ---- a/ky_KG/ky_KG.go -+++ b/ky_KG/ky_KG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ky_KG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ky_KG' locale - func New() locales.Translator { - return &ky_KG{ -- locale: "ky_KG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "фев.", "мар.", "апр.", "май", "июн.", "июл.", "авг.", "сен.", "окт.", "ноя.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "январь", "февраль", "март", "апрель", "май", "июнь", "июль", "август", "сентябрь", "октябрь", "ноябрь", "декабрь"}, -- daysAbbreviated: []string{"жек.", "дүй.", "шейш.", "шарш.", "бейш.", "жума", "ишм."}, -- daysNarrow: []string{"Ж", "Д", "Ш", "Ш", "Б", "Ж", "И"}, -- daysShort: []string{"жек.", "дүй.", "шейш.", "шарш.", "бейш.", "жума", "ишм."}, -- daysWide: []string{"жекшемби", "дүйшөмбү", "шейшемби", "шаршемби", "бейшемби", "жума", "ишемби"}, -- periodsAbbreviated: []string{"тң", "тк"}, -- periodsNarrow: []string{"тң", "тк"}, -- periodsWide: []string{"таңкы", "түштөн кийинки"}, -- erasAbbreviated: []string{"б.з.ч.", "б.з."}, -- erasNarrow: []string{"б.з.ч.", "б.з."}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"JDT": "Жапон жайкы убактысы", "BOT": "Боливия убактысы", "HEOG": "Батыш Гренландия жайкы убактысы", "NZDT": "Жаңы Зеландия жайкы убакыты", "LHDT": "Лорд Хау жайкы убактысы", "CHAST": "Чатам кышкы убакыт", "HEEG": "Чыгыш Гренландия жайкы убактысы", "WARST": "Батыш Аргентина жайкы убактысы", "COT": "Колумбия кышкы убактысы", "AKDT": "Аляска жайкы убактысы", "ACWDT": "Австралия борбордук чыгыш жайкы убактысы", "HNPM": "Сен Пьер жана Микелон кышкы убактысы", "∅∅∅": "Амазон жайкы убактысы", "TMST": "Түркмөнстан жайкы убактысы", "HNNOMX": "Түндүк-чыгыш Мексика кышкы убактысы", "AEDT": "Австралия чыгыш жайкы убактысы", "WITA": "Борбордук Индонезия убактысы", "MEZ": "Борбордук Европа кышкы убакыты", "ARST": "Аргентина жайкы убактысы", "AWST": "Австралия батыш кышкы убакыты", "CLT": "Чили кышкы убактысы", "ECT": "Экуадор убактысы", "CST": "Түндүк Америка, борбордук кышкы убактысы", "GYT": "Гвиана убактысы", "WIB": "Батыш Индонезия убактысы", "ACWST": "Австралия борбордук батыш кышкы убакыты", "HEPM": "Сен Пьер жана Микелон жайкы убактысы", "HNCU": "Куба кышкы убактысы", "UYT": "Уругвай кышкы убактысы", "CDT": "Түндүк Америка, борбордук жайкы убакыт", "WIT": "Чыгыш Индонезия убактысы", "SRT": "Суринаме убактысы", "WAST": "Батыш Африка жайкы убактысы", "EDT": "Түндүк Америка, чыгыш жайкы убактысы", "AKST": "Аляска кышкы убактысы", "HADT": "Гавайи-Алеут жайкы убактысы", "VET": "Венесуэла убактысы", "MESZ": "Борбордук Европа жайкы убактысы", "OESZ": "Чыгыш Европа жайкы убактысы", "MST": "MST", "HNOG": "Батыш Гренландия кышкы убактысы", "AWDT": "Австралия батыш жайкы убактысы", "LHST": "Лорд Хау кышкы убакыты", "ChST": "Чаморро убактысы", "ACST": "Австралия борбордук кышкы убакыты", "WART": "Батыш Аргентина кышкы убактысы", "GMT": "GMT, кышкы убакыты", "PST": "Түндүк Америка, Тынч океан кышкы убактысы", "WEZ": "Батыш Европа кышкы убакыты", "HNEG": "Чыгыш Гренландия кышкы убактысы", "HNPMX": "Мексика, Тынч океан кышкы убактысы", "ART": "Аргентина кышкы убактысы", "HKST": "Гонконг жайкы убактысы", "CLST": "Чили жайкы убактысы", "COST": "Колумбия жайкы убактысы", "AST": "Атлантика кышкы убактысы", "BT": "Бутан убактысы", "NZST": "Жаӊы Зеландия кышкы убакыты", "HECU": "Куба жайкы убактысы", "UYST": "Уругвай жайкы убактысы", "HAST": "Гавайи-Алеут кышкы убактысы", "HKT": "Гонконг кышкы убакыты", "CHADT": "Чатам жайкы убактысы", "EAT": "Чыгыш Африка убактысы", "OEZ": "Чыгыш Европа кышкы убакыты", "SGT": "Сингапур убактысы", "EST": "Түндүк Америка, чыгыш кышкы убактысы", "HNT": "Нюфаундлэнд кышкы убактысы", "HAT": "Нюфаундлэнд жайкы убактысы", "GFT": "Француз Гвиана убактысы", "ACDT": "Австралия борбордук жайкы убактысы", "MDT": "MDT", "MYT": "Малайзия убактысы", "IST": "Индия убактысы", "CAT": "Борбордук Африка убактысы", "HENOMX": "Түндүк-чыгыш Мексика жайкы убактысы", "ADT": "Атлантика жайкы убактысы", "SAST": "Түштүк Африка убактысы", "HEPMX": "Мексика, Тынч океан жайкы убактысы", "PDT": "Түндүк Америка, Тынч океан жайкы убактысы", "AEST": "Австралия чыгыш кышкы убакыты", "JST": "Жапон кышкы убакыты", "TMT": "Түркмөнстан кышкы убакыты", "WAT": "Батыш Африка кышкы убакыты", "WESZ": "Батыш Европа жайкы убактысы"}, -+ locale: "ky_KG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "NZST": "NZST", "MYT": "MYT", "WAT": "WAT", "MDT": "MDT", "ACDT": "ACDT", "VET": "VET", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "WARST": "WARST", "GYT": "GYT", "EST": "EST", "WIB": "WIB", "ECT": "ECT", "UYST": "UYST", "AKST": "AKST", "COST": "COST", "HKT": "HKT", "TMST": "TMST", "CHAST": "CHAST", "UYT": "UYT", "AWDT": "AWDT", "PST": "PST", "WAST": "WAST", "GFT": "GFT", "COT": "COT", "AST": "AST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "ART": "ART", "BOT": "BOT", "JST": "JST", "AWST": "AWST", "SRT": "SRT", "HAST": "HAST", "OEZ": "OEZ", "WIT": "WIT", "SAST": "SAST", "CDT": "CDT", "MST": "MST", "ADT": "ADT", "HADT": "HADT", "HEEG": "HEEG", "ACWDT": "ACWDT", "BT": "BT", "HNOG": "HNOG", "MESZ": "MESZ", "ACST": "ACST", "JDT": "JDT", "HEPM": "HEPM", "IST": "IST", "HNPM": "HNPM", "AEST": "AEST", "CHADT": "CHADT", "CAT": "CAT", "PDT": "PDT", "HECU": "HECU", "AEDT": "AEDT", "HKST": "HKST", "CLST": "CLST", "CST": "CST", "EAT": "EAT", "HNEG": "HNEG", "LHST": "LHST", "HEOG": "HEOG", "CLT": "CLT", "ARST": "ARST", "WEZ": "WEZ", "OESZ": "OESZ", "HNT": "HNT", "NZDT": "NZDT", "LHDT": "LHDT", "HAT": "HAT", "MEZ": "MEZ", "HEPMX": "HEPMX", "WESZ": "WESZ", "EDT": "EDT", "WITA": "WITA", "HNPMX": "HNPMX", "SGT": "SGT", "HNCU": "HNCU", "AKDT": "AKDT", "WART": "WART", "GMT": "GMT", "ChST": "ChST"}, - } - } -  -@@ -135,7 +112,7 @@ func (ky *ky_KG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ky *ky_KG) MonthsAbbreviated() []string { -- return ky.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (ky *ky_KG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ky *ky_KG) MonthsNarrow() []string { -- return ky.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (ky *ky_KG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ky *ky_KG) MonthsWide() []string { -- return ky.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,75 +178,13 @@ func (ky *ky_KG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ky_KG' and handles both Whole and Real numbers based on 'v' - func (ky *ky_KG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ky.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ky.group) - 1; j >= 0; j-- { -- b = append(b, ky.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ky.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ky_KG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ky *ky_KG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ky.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ky.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ky.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ky_KG' -@@ -277,58 +192,7 @@ func (ky *ky_KG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ky.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ky.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ky.group) - 1; j >= 0; j-- { -- b = append(b, ky.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ky.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ky.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ky.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ky_KG' -@@ -337,65 +201,7 @@ func (ky *ky_KG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ky.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ky.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ky.group) - 1; j >= 0; j-- { -- b = append(b, ky.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ky.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ky.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ky.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ky.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ky_KG' -@@ -403,17 +209,6 @@ func (ky *ky_KG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -422,18 +217,6 @@ func (ky *ky_KG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d, 0xd0, 0xb6}...) -- b = append(b, []byte{0x2e, 0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ky.monthsAbbreviated[t.Month()]...) -- - return string(b) - } -  -@@ -442,18 +225,6 @@ func (ky *ky_KG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d, 0xd0, 0xb6}...) -- b = append(b, []byte{0x2e, 0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ky.monthsWide[t.Month()]...) -- - return string(b) - } -  -@@ -462,20 +233,6 @@ func (ky *ky_KG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d, 0xd0, 0xb6}...) -- b = append(b, []byte{0x2e, 0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ky.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ky.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -484,19 +241,6 @@ func (ky *ky_KG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,26 +249,6 @@ func (ky *ky_KG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -533,30 +257,6 @@ func (ky *ky_KG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -565,34 +265,5 @@ func (ky *ky_KG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ky.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ky.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lag/lag.go b/lag/lag.go -index 7efcc6e..5de65d1 100644 ---- a/lag/lag.go -+++ b/lag/lag.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KSA", "KA"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kɨrɨsitʉ sɨ anavyaal", "Kɨrɨsitʉ akavyaalwe"}, -- timezones: map[string]string{"NZDT": "NZDT", "∅∅∅": "∅∅∅", "SGT": "SGT", "HEPMX": "HEPMX", "MST": "MST", "PST": "PST", "WESZ": "WESZ", "AWDT": "AWDT", "IST": "IST", "WAT": "WAT", "CAT": "CAT", "HNNOMX": "HNNOMX", "HAT": "HAT", "HKT": "HKT", "AWST": "AWST", "ART": "ART", "AEST": "AEST", "LHST": "LHST", "HEPM": "HEPM", "CHADT": "CHADT", "CLST": "CLST", "TMST": "TMST", "OESZ": "OESZ", "AST": "AST", "WIB": "WIB", "ACWST": "ACWST", "WITA": "WITA", "SAST": "SAST", "HNEG": "HNEG", "TMT": "TMT", "BOT": "BOT", "CST": "CST", "WIT": "WIT", "VET": "VET", "EAT": "EAT", "COT": "COT", "MYT": "MYT", "COST": "COST", "ACST": "ACST", "BT": "BT", "AEDT": "AEDT", "LHDT": "LHDT", "CLT": "CLT", "ACDT": "ACDT", "ADT": "ADT", "HAST": "HAST", "HECU": "HECU", "CHAST": "CHAST", "ChST": "ChST", "EST": "EST", "AKST": "AKST", "WEZ": "WEZ", "NZST": "NZST", "GFT": "GFT", "HNCU": "HNCU", "AKDT": "AKDT", "CDT": "CDT", "GYT": "GYT", "JST": "JST", "GMT": "GMT", "UYST": "UYST", "HNOG": "HNOG", "MESZ": "MESZ", "MEZ": "MEZ", "ECT": "ECT", "HENOMX": "HENOMX", "MDT": "MDT", "ARST": "ARST", "HNPM": "HNPM", "JDT": "JDT", "OEZ": "OEZ", "WARST": "WARST", "HNPMX": "HNPMX", "EDT": "EDT", "SRT": "SRT", "PDT": "PDT", "HKST": "HKST", "HNT": "HNT", "HEOG": "HEOG", "HEEG": "HEEG", "WAST": "WAST", "WART": "WART", "UYT": "UYT", "HADT": "HADT", "ACWDT": "ACWDT"}, -+ timezones: map[string]string{"PDT": "PDT", "ACWDT": "ACWDT", "GYT": "GYT", "∅∅∅": "∅∅∅", "HECU": "HECU", "TMST": "TMST", "UYST": "UYST", "HADT": "HADT", "HNNOMX": "HNNOMX", "MYT": "MYT", "PST": "PST", "UYT": "UYT", "COT": "COT", "ART": "ART", "HAST": "HAST", "MESZ": "MESZ", "HNEG": "HNEG", "WAT": "WAT", "COST": "COST", "CLT": "CLT", "ADT": "ADT", "HNPM": "HNPM", "AKDT": "AKDT", "SAST": "SAST", "HNOG": "HNOG", "ACST": "ACST", "EAT": "EAT", "AWST": "AWST", "TMT": "TMT", "CLST": "CLST", "BOT": "BOT", "AEDT": "AEDT", "HNCU": "HNCU", "OESZ": "OESZ", "WART": "WART", "HKT": "HKT", "WITA": "WITA", "CDT": "CDT", "HENOMX": "HENOMX", "ECT": "ECT", "OEZ": "OEZ", "HKST": "HKST", "NZDT": "NZDT", "LHDT": "LHDT", "WAST": "WAST", "WIT": "WIT", "ACDT": "ACDT", "LHST": "LHST", "IST": "IST", "WESZ": "WESZ", "SGT": "SGT", "AKST": "AKST", "EST": "EST", "CAT": "CAT", "ARST": "ARST", "ChST": "ChST", "HEEG": "HEEG", "CHAST": "CHAST", "HNT": "HNT", "WARST": "WARST", "AST": "AST", "WEZ": "WEZ", "VET": "VET", "CST": "CST", "SRT": "SRT", "ACWST": "ACWST", "AWDT": "AWDT", "MDT": "MDT", "JST": "JST", "CHADT": "CHADT", "HNPMX": "HNPMX", "HEOG": "HEOG", "EDT": "EDT", "GMT": "GMT", "HEPMX": "HEPMX", "HAT": "HAT", "NZST": "NZST", "HEPM": "HEPM", "MEZ": "MEZ", "JDT": "JDT", "BT": "BT", "AEST": "AEST", "GFT": "GFT", "WIB": "WIB", "MST": "MST"}, - } - } -  -diff --git a/lag_TZ/lag_TZ.go b/lag_TZ/lag_TZ.go -index 9f0ec72..dd330bf 100644 ---- a/lag_TZ/lag_TZ.go -+++ b/lag_TZ/lag_TZ.go -@@ -10,64 +10,45 @@ import ( - ) -  - type lag_TZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lag_TZ' locale - func New() locales.Translator { - return &lag_TZ{ -- locale: "lag_TZ", -- pluralsCardinal: []locales.PluralRule{1, 2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "Fúngatɨ", "Naanɨ", "Keenda", "Ikúmi", "Inyambala", "Idwaata", "Mʉʉnchɨ", "Vɨɨrɨ", "Saatʉ", "Inyi", "Saano", "Sasatʉ"}, -- monthsNarrow: []string{"", "F", "N", "K", "I", "I", "I", "M", "V", "S", "I", "S", "S"}, -- monthsWide: []string{"", "Kʉfúngatɨ", "Kʉnaanɨ", "Kʉkeenda", "Kwiikumi", "Kwiinyambála", "Kwiidwaata", "Kʉmʉʉnchɨ", "Kʉvɨɨrɨ", "Kʉsaatʉ", "Kwiinyi", "Kʉsaano", "Kʉsasatʉ"}, -- daysAbbreviated: []string{"Píili", "Táatu", "Íne", "Táano", "Alh", "Ijm", "Móosi"}, -- daysNarrow: []string{"P", "T", "E", "O", "A", "I", "M"}, -- daysWide: []string{"Jumapíiri", "Jumatátu", "Jumaíne", "Jumatáano", "Alamíisi", "Ijumáa", "Jumamóosi"}, -- periodsAbbreviated: []string{"TOO", "MUU"}, -- periodsWide: []string{"TOO", "MUU"}, -- erasAbbreviated: []string{"KSA", "KA"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kɨrɨsitʉ sɨ anavyaal", "Kɨrɨsitʉ akavyaalwe"}, -- timezones: map[string]string{"AEDT": "AEDT", "WARST": "WARST", "HNCU": "HNCU", "HNPMX": "HNPMX", "AKST": "AKST", "PDT": "PDT", "ACST": "ACST", "MYT": "MYT", "IST": "IST", "HNEG": "HNEG", "TMST": "TMST", "OESZ": "OESZ", "MST": "MST", "HEPMX": "HEPMX", "HNT": "HNT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "HNNOMX": "HNNOMX", "MDT": "MDT", "VET": "VET", "MEZ": "MEZ", "LHST": "LHST", "BOT": "BOT", "CAT": "CAT", "EST": "EST", "ADT": "ADT", "PST": "PST", "HEOG": "HEOG", "HKT": "HKT", "NZDT": "NZDT", "CLT": "CLT", "GMT": "GMT", "CST": "CST", "GYT": "GYT", "CHADT": "CHADT", "COST": "COST", "EDT": "EDT", "AKDT": "AKDT", "CDT": "CDT", "WEZ": "WEZ", "MESZ": "MESZ", "ECT": "ECT", "SGT": "SGT", "ACWDT": "ACWDT", "AEST": "AEST", "WAT": "WAT", "UYST": "UYST", "WIT": "WIT", "BT": "BT", "HAT": "HAT", "CHAST": "CHAST", "OEZ": "OEZ", "HEPM": "HEPM", "WAST": "WAST", "COT": "COT", "UYT": "UYT", "HNOG": "HNOG", "AWST": "AWST", "HKST": "HKST", "JST": "JST", "EAT": "EAT", "SRT": "SRT", "ARST": "ARST", "ChST": "ChST", "HEEG": "HEEG", "HENOMX": "HENOMX", "HECU": "HECU", "HAST": "HAST", "AWDT": "AWDT", "JDT": "JDT", "ACDT": "ACDT", "AST": "AST", "HADT": "HADT", "ACWST": "ACWST", "ART": "ART", "LHDT": "LHDT", "NZST": "NZST", "SAST": "SAST", "WART": "WART", "GFT": "GFT", "WESZ": "WESZ", "WITA": "WITA", "CLST": "CLST", "TMT": "TMT", "WIB": "WIB"}, -+ locale: "lag_TZ", -+ pluralsCardinal: []locales.PluralRule{1, 2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWDT": "ACWDT", "UYST": "UYST", "OEZ": "OEZ", "WART": "WART", "∅∅∅": "∅∅∅", "WAT": "WAT", "AKDT": "AKDT", "GFT": "GFT", "CAT": "CAT", "CLST": "CLST", "CST": "CST", "HNNOMX": "HNNOMX", "GYT": "GYT", "TMT": "TMT", "ACDT": "ACDT", "HEEG": "HEEG", "JDT": "JDT", "ACWST": "ACWST", "COT": "COT", "AWST": "AWST", "WESZ": "WESZ", "CHADT": "CHADT", "BOT": "BOT", "HECU": "HECU", "MDT": "MDT", "GMT": "GMT", "JST": "JST", "CHAST": "CHAST", "UYT": "UYT", "HAT": "HAT", "WIT": "WIT", "HNOG": "HNOG", "HEOG": "HEOG", "EAT": "EAT", "ACST": "ACST", "AEST": "AEST", "NZST": "NZST", "TMST": "TMST", "HNEG": "HNEG", "LHDT": "LHDT", "PST": "PST", "PDT": "PDT", "AKST": "AKST", "WARST": "WARST", "HKT": "HKT", "CDT": "CDT", "ART": "ART", "HNPM": "HNPM", "HEPM": "HEPM", "WEZ": "WEZ", "WAST": "WAST", "EDT": "EDT", "WITA": "WITA", "MST": "MST", "ADT": "ADT", "AEDT": "AEDT", "HNCU": "HNCU", "ChST": "ChST", "HADT": "HADT", "MEZ": "MEZ", "IST": "IST", "BT": "BT", "HNPMX": "HNPMX", "SAST": "SAST", "ARST": "ARST", "HAST": "HAST", "LHST": "LHST", "HEPMX": "HEPMX", "EST": "EST", "HKST": "HKST", "ECT": "ECT", "NZDT": "NZDT", "AST": "AST", "HENOMX": "HENOMX", "MESZ": "MESZ", "HNT": "HNT", "CLT": "CLT", "SRT": "SRT", "AWDT": "AWDT", "MYT": "MYT", "SGT": "SGT", "VET": "VET", "OESZ": "OESZ", "COST": "COST", "WIB": "WIB"}, - } - } -  -@@ -123,7 +104,7 @@ func (lag *lag_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lag *lag_TZ) MonthsAbbreviated() []string { -- return lag.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -133,7 +114,7 @@ func (lag *lag_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lag *lag_TZ) MonthsNarrow() []string { -- return lag.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -143,7 +124,7 @@ func (lag *lag_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lag *lag_TZ) MonthsWide() []string { -- return lag.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,40 +184,7 @@ func (lag *lag_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lag.currencies[currency] -- l := len(s) + len(symbol) + 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lag.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lag.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lag.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, lag.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lag.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lag_TZ' -@@ -245,57 +193,7 @@ func (lag *lag_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lag.currencies[currency] -- l := len(s) + len(symbol) + 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lag.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lag.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, lag.currencyNegativePrefix[j]) -- } -- -- b = append(b, lag.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lag.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lag.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, lag.currencyNegativeSuffix...) -- } else { -- -- b = append(b, lag.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lag_TZ' -@@ -303,27 +201,6 @@ func (lag *lag_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -332,17 +209,6 @@ func (lag *lag_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lag.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -351,17 +217,6 @@ func (lag *lag_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lag.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -370,19 +225,6 @@ func (lag *lag_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lag.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lag.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -391,19 +233,6 @@ func (lag *lag_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -412,26 +241,6 @@ func (lag *lag_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -440,30 +249,6 @@ func (lag *lag_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -472,34 +257,5 @@ func (lag *lag_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lag.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lag.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lb/lb.go b/lb/lb.go -index 0c07ca5..7aea838 100644 ---- a/lb/lb.go -+++ b/lb/lb.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v. Chr.", "n. Chr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"UYST": "Uruguayanesch Summerzäit", "AKST": "Alaska-Normalzäit", "AKDT": "Alaska-Summerzäit", "HAST": "Hawaii-Aleuten-Normalzäit", "MEZ": "Mëtteleuropäesch Normalzäit", "JST": "Japanesch Normalzäit", "∅∅∅": "Amazonas-Summerzäit", "WAST": "Westafrikanesch Summerzäit", "COST": "Kolumbianesch Summerzäit", "WIB": "Westindonesesch Zäit", "HNPM": "Saint-Pierre-a-Miquelon-Normalzäit", "JDT": "Japanesch Summerzäit", "ChST": "Chamorro-Zäit", "HENOMX": "Nordwest-Mexiko-Summerzäit", "CST": "Nordamerikanesch Inland-Normalzäit", "SRT": "Suriname-Zäit", "AEST": "Ostaustralesch Normalzäit", "NZST": "Neiséiland-Normalzäit", "ACDT": "Zentralaustralesch Summerzäit", "OEZ": "Osteuropäesch Normalzäit", "AST": "Atlantik-Normalzäit", "CDT": "Nordamerikanesch Inland-Summerzäit", "HADT": "Hawaii-Aleuten-Summerzäit", "WESZ": "Westeuropäesch Summerzäit", "OESZ": "Osteuropäesch Summerzäit", "HNNOMX": "Nordwest-Mexiko-Normalzäit", "GMT": "Mëttler Greenwich-Zäit", "EST": "Nordamerikanesch Ostküsten-Normalzäit", "ACST": "Zentralaustralesch Normalzäit", "ADT": "Atlantik-Summerzäit", "HEOG": "Westgrönland-Summerzäit", "SAST": "Südafrikanesch Zäit", "IST": "Indesch Zäit", "HEEG": "Ostgrönland-Summerzäit", "WARST": "Westargentinesch Summerzäit", "AWDT": "Westaustralesch Summerzäit", "HKT": "Hong-Kong-Normalzäit", "NZDT": "Neiséiland-Summerzäit", "BOT": "Bolivianesch Zäit", "AEDT": "Ostaustralesch Summerzäit", "AWST": "Westaustralesch Normalzäit", "MESZ": "Mëtteleuropäesch Summerzäit", "HNEG": "Ostgrönland-Normalzäit", "WART": "Westargentinesch Normalzäit", "MST": "MST", "MDT": "MDT", "WEZ": "Westeuropäesch Normalzäit", "HEPM": "Saint-Pierre-a-Miquelon-Summerzäit", "ACWST": "Zentral-/Westaustralesch Normalzäit", "HNT": "Neifundland-Normalzäit", "TMT": "Turkmenistan-Normalzäit", "TMST": "Turkmenistan-Summerzäit", "CAT": "Zentralafrikanesch Zäit", "UYT": "Uruguyanesch Normalzäit", "WIT": "Ostindonesesch Zäit", "PDT": "Nordamerikanesch Westküsten-Summerzäit", "WITA": "Zentralindonesesch Zäit", "LHDT": "Lord-Howe-Summerzäit", "EAT": "Ostafrikanesch Zäit", "HNCU": "Kubanesch Normalzäit", "GYT": "Guyana-Zäit", "HNOG": "Westgrönland-Normalzäit", "ACWDT": "Zentral-/Westaustralesch Summerzäit", "HKST": "Hong-Kong-Summerzäit", "VET": "Venezuela-Zäit", "BT": "Bhutan-Zäit", "CLT": "Chilenesch Normalzäit", "GFT": "Franséisch-Guayane-Zäit", "SGT": "Singapur-Standardzäit", "EDT": "Nordamerikanesch Ostküsten-Summerzäit", "HNPMX": "Mexikanesch Pazifik-Normalzäit", "HEPMX": "Mexikanesch Pazifik-Summerzäit", "ART": "Argentinesch Normalzäit", "CHAST": "Chatham-Normalzäit", "ECT": "Ecuadorianesch Zäit", "WAT": "Westafrikanesch Normalzäit", "MYT": "Malaysesch Zäit", "PST": "Nordamerikanesch Westküsten-Normalzäit", "CHADT": "Chatham-Summerzäit", "CLST": "Chilenesch Summerzäit", "HECU": "Kubanesch Summerzäit", "ARST": "Argentinesch Summerzäit", "COT": "Kolumbianesch Normalzäit", "HAT": "Neifundland-Summerzäit", "LHST": "Lord-Howe-Normalzäit"}, -+ timezones: map[string]string{"NZDT": "Neiséiland-Summerzäit", "ADT": "Atlantik-Summerzäit", "VET": "Venezuela-Zäit", "SAST": "Südafrikanesch Zäit", "HEOG": "Westgrönland-Summerzäit", "ECT": "Ecuadorianesch Zäit", "HAST": "Hawaii-Aleuten-Normalzäit", "AEST": "Ostaustralesch Normalzäit", "AKST": "Alaska-Normalzäit", "OESZ": "Osteuropäesch Summerzäit", "HAT": "Neifundland-Summerzäit", "COST": "Kolumbianesch Summerzäit", "MDT": "MDT", "SRT": "Suriname-Zäit", "MESZ": "Mëtteleuropäesch Summerzäit", "HNNOMX": "Nordwest-Mexiko-Normalzäit", "LHDT": "Lord-Howe-Summerzäit", "MYT": "Malaysesch Zäit", "COT": "Kolumbianesch Normalzäit", "IST": "Indesch Zäit", "HEEG": "Ostgrönland-Summerzäit", "AKDT": "Alaska-Summerzäit", "CAT": "Zentralafrikanesch Zäit", "GMT": "Mëttler Greenwich-Zäit", "ARST": "Argentinesch Summerzäit", "JDT": "Japanesch Summerzäit", "HECU": "Kubanesch Summerzäit", "HNOG": "Westgrönland-Normalzäit", "TMST": "Turkmenistan-Summerzäit", "ACDT": "Zentralaustralesch Summerzäit", "LHST": "Lord-Howe-Normalzäit", "UYST": "Uruguayanesch Summerzäit", "WARST": "Westargentinesch Summerzäit", "ChST": "Chamorro-Zäit", "PDT": "Nordamerikanesch Westküsten-Summerzäit", "CHADT": "Chatham-Summerzäit", "WEZ": "Westeuropäesch Normalzäit", "WAST": "Westafrikanesch Summerzäit", "WITA": "Zentralindonesesch Zäit", "CLST": "Chilenesch Summerzäit", "EAT": "Ostafrikanesch Zäit", "HNPMX": "Mexikanesch Pazifik-Normalzäit", "WIT": "Ostindonesesch Zäit", "HADT": "Hawaii-Aleuten-Summerzäit", "AWDT": "Westaustralesch Summerzäit", "BOT": "Bolivianesch Zäit", "NZST": "Neiséiland-Normalzäit", "AST": "Atlantik-Normalzäit", "ART": "Argentinesch Normalzäit", "HNCU": "Kubanesch Normalzäit", "TMT": "Turkmenistan-Normalzäit", "ACWST": "Zentral-/Westaustralesch Normalzäit", "GFT": "Franséisch-Guayane-Zäit", "HNEG": "Ostgrönland-Normalzäit", "HKST": "Hong-Kong-Summerzäit", "MST": "MST", "HNPM": "Saint-Pierre-a-Miquelon-Normalzäit", "PST": "Nordamerikanesch Westküsten-Normalzäit", "ACWDT": "Zentral-/Westaustralesch Summerzäit", "GYT": "Guyana-Zäit", "CLT": "Chilenesch Normalzäit", "WIB": "Westindonesesch Zäit", "HENOMX": "Nordwest-Mexiko-Summerzäit", "SGT": "Singapur-Standardzäit", "WAT": "Westafrikanesch Normalzäit", "∅∅∅": "Brasília-Summerzäit", "WART": "Westargentinesch Normalzäit", "EST": "Nordamerikanesch Ostküsten-Normalzäit", "EDT": "Nordamerikanesch Ostküsten-Summerzäit", "CST": "Nordamerikanesch Inland-Normalzäit", "CDT": "Nordamerikanesch Inland-Summerzäit", "AWST": "Westaustralesch Normalzäit", "HEPM": "Saint-Pierre-a-Miquelon-Summerzäit", "HNT": "Neifundland-Normalzäit", "UYT": "Uruguyanesch Normalzäit", "WESZ": "Westeuropäesch Summerzäit", "HEPMX": "Mexikanesch Pazifik-Summerzäit", "AEDT": "Ostaustralesch Summerzäit", "ACST": "Zentralaustralesch Normalzäit", "BT": "Bhutan-Zäit", "HKT": "Hong-Kong-Normalzäit", "JST": "Japanesch Normalzäit", "CHAST": "Chatham-Normalzäit", "OEZ": "Osteuropäesch Normalzäit", "MEZ": "Mëtteleuropäesch Normalzäit"}, - } - } -  -diff --git a/lb_LU/lb_LU.go b/lb_LU/lb_LU.go -index 9ac1446..8800737 100644 ---- a/lb_LU/lb_LU.go -+++ b/lb_LU/lb_LU.go -@@ -10,70 +10,45 @@ import ( - ) -  - type lb_LU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lb_LU' locale - func New() locales.Translator { - return &lb_LU{ -- locale: "lb_LU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "Mäe.", "Abr.", "Mee", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januar", "Februar", "Mäerz", "Abrëll", "Mee", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}, -- daysAbbreviated: []string{"Son.", "Méi.", "Dën.", "Mët.", "Don.", "Fre.", "Sam."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysShort: []string{"So.", "Mé.", "Dë.", "Më.", "Do.", "Fr.", "Sa."}, -- daysWide: []string{"Sonndeg", "Méindeg", "Dënschdeg", "Mëttwoch", "Donneschdeg", "Freideg", "Samschdeg"}, -- periodsAbbreviated: []string{"moies", "nomëttes"}, -- periodsNarrow: []string{"mo.", "nomë."}, -- periodsWide: []string{"moies", "nomëttes"}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"v. Chr.", "n. Chr."}, -- timezones: map[string]string{"ECT": "Ecuadorianesch Zäit", "HKT": "Hong-Kong-Normalzäit", "NZST": "Neiséiland-Normalzäit", "BOT": "Bolivianesch Zäit", "CST": "Nordamerikanesch Inland-Normalzäit", "HNOG": "Westgrönland-Normalzäit", "TMT": "Turkmenistan-Normalzäit", "EAT": "Ostafrikanesch Zäit", "WAT": "Westafrikanesch Normalzäit", "WARST": "Westargentinesch Summerzäit", "GMT": "Mëttler Greenwich-Zäit", "GYT": "Guyana-Zäit", "WIT": "Ostindonesesch Zäit", "AWST": "Westaustralesch Normalzäit", "HNCU": "Kubanesch Normalzäit", "AST": "Atlantik-Normalzäit", "AKST": "Alaska-Normalzäit", "PDT": "Nordamerikanesch Westküsten-Summerzäit", "AWDT": "Westaustralesch Summerzäit", "LHST": "Lord-Howe-Normalzäit", "JDT": "Japanesch Summerzäit", "∅∅∅": "Amazonas-Summerzäit", "HECU": "Kubanesch Summerzäit", "ACWST": "Zentral-/Westaustralesch Normalzäit", "WITA": "Zentralindonesesch Zäit", "CAT": "Zentralafrikanesch Zäit", "HNNOMX": "Nordwest-Mexiko-Normalzäit", "HNPMX": "Mexikanesch Pazifik-Normalzäit", "HEOG": "Westgrönland-Summerzäit", "WEZ": "Westeuropäesch Normalzäit", "MEZ": "Mëtteleuropäesch Normalzäit", "CHADT": "Chatham-Summerzäit", "SAST": "Südafrikanesch Zäit", "SGT": "Singapur-Standardzäit", "ARST": "Argentinesch Summerzäit", "HNT": "Neifundland-Normalzäit", "WAST": "Westafrikanesch Summerzäit", "AKDT": "Alaska-Summerzäit", "ART": "Argentinesch Normalzäit", "NZDT": "Neiséiland-Summerzäit", "CHAST": "Chatham-Normalzäit", "WART": "Westargentinesch Normalzäit", "MYT": "Malaysesch Zäit", "SRT": "Suriname-Zäit", "ACWDT": "Zentral-/Westaustralesch Summerzäit", "CLST": "Chilenesch Summerzäit", "ChST": "Chamorro-Zäit", "COT": "Kolumbianesch Normalzäit", "MST": "MST", "HAST": "Hawaii-Aleuten-Normalzäit", "BT": "Bhutan-Zäit", "AEDT": "Ostaustralesch Summerzäit", "LHDT": "Lord-Howe-Summerzäit", "IST": "Indesch Zäit", "HNEG": "Ostgrönland-Normalzäit", "HEEG": "Ostgrönland-Summerzäit", "GFT": "Franséisch-Guayane-Zäit", "ACST": "Zentralaustralesch Normalzäit", "HKST": "Hong-Kong-Summerzäit", "HNPM": "Saint-Pierre-a-Miquelon-Normalzäit", "HEPM": "Saint-Pierre-a-Miquelon-Summerzäit", "EDT": "Nordamerikanesch Ostküsten-Summerzäit", "MDT": "MDT", "HEPMX": "Mexikanesch Pazifik-Summerzäit", "HAT": "Neifundland-Summerzäit", "ACDT": "Zentralaustralesch Summerzäit", "COST": "Kolumbianesch Summerzäit", "UYT": "Uruguyanesch Normalzäit", "UYST": "Uruguayanesch Summerzäit", "CDT": "Nordamerikanesch Inland-Summerzäit", "PST": "Nordamerikanesch Westküsten-Normalzäit", "JST": "Japanesch Normalzäit", "TMST": "Turkmenistan-Summerzäit", "WIB": "Westindonesesch Zäit", "HADT": "Hawaii-Aleuten-Summerzäit", "WESZ": "Westeuropäesch Summerzäit", "MESZ": "Mëtteleuropäesch Summerzäit", "CLT": "Chilenesch Normalzäit", "OEZ": "Osteuropäesch Normalzäit", "OESZ": "Osteuropäesch Summerzäit", "EST": "Nordamerikanesch Ostküsten-Normalzäit", "ADT": "Atlantik-Summerzäit", "VET": "Venezuela-Zäit", "HENOMX": "Nordwest-Mexiko-Summerzäit", "AEST": "Ostaustralesch Normalzäit"}, -+ locale: "lb_LU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JDT": "JDT", "CHAST": "CHAST", "VET": "VET", "HNT": "HNT", "CDT": "CDT", "MYT": "MYT", "HNPMX": "HNPMX", "AKDT": "AKDT", "ACDT": "ACDT", "HENOMX": "HENOMX", "CLT": "CLT", "ADT": "ADT", "CAT": "CAT", "NZST": "NZST", "HAST": "HAST", "HNEG": "HNEG", "COST": "COST", "HNOG": "HNOG", "HKST": "HKST", "GMT": "GMT", "BOT": "BOT", "EAT": "EAT", "HNCU": "HNCU", "EDT": "EDT", "HKT": "HKT", "HEPM": "HEPM", "TMT": "TMT", "HADT": "HADT", "ARST": "ARST", "LHDT": "LHDT", "BT": "BT", "AEST": "AEST", "WEZ": "WEZ", "WAT": "WAT", "CLST": "CLST", "MDT": "MDT", "AST": "AST", "SRT": "SRT", "ACST": "ACST", "HEEG": "HEEG", "AEDT": "AEDT", "WARST": "WARST", "GYT": "GYT", "MST": "MST", "ChST": "ChST", "UYST": "UYST", "ACWST": "ACWST", "SAST": "SAST", "∅∅∅": "∅∅∅", "AKST": "AKST", "COT": "COT", "JST": "JST", "MESZ": "MESZ", "IST": "IST", "WIT": "WIT", "ECT": "ECT", "WIB": "WIB", "PST": "PST", "ACWDT": "ACWDT", "OESZ": "OESZ", "EST": "EST", "ART": "ART", "LHST": "LHST", "WESZ": "WESZ", "SGT": "SGT", "OEZ": "OEZ", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "CHADT": "CHADT", "HEPMX": "HEPMX", "WAST": "WAST", "TMST": "TMST", "MEZ": "MEZ", "CST": "CST", "AWST": "AWST", "HAT": "HAT", "HEOG": "HEOG", "WITA": "WITA", "PDT": "PDT", "HECU": "HECU", "GFT": "GFT", "WART": "WART", "AWDT": "AWDT", "UYT": "UYT"}, - } - } -  -@@ -126,7 +101,7 @@ func (lb *lb_LU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lb *lb_LU) MonthsAbbreviated() []string { -- return lb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (lb *lb_LU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lb *lb_LU) MonthsNarrow() []string { -- return lb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (lb *lb_LU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lb *lb_LU) MonthsWide() []string { -- return lb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,75 +167,13 @@ func (lb *lb_LU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'lb_LU' and handles both Whole and Real numbers based on 'v' - func (lb *lb_LU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'lb_LU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (lb *lb_LU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lb.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lb.percentSuffix...) -- -- b = append(b, lb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lb_LU' -@@ -268,56 +181,7 @@ func (lb *lb_LU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lb.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, lb.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lb_LU' -@@ -326,63 +190,7 @@ func (lb *lb_LU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lb.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lb.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, lb.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, lb.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, lb.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lb_LU' -@@ -390,27 +198,6 @@ func (lb *lb_LU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -419,17 +206,6 @@ func (lb *lb_LU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lb.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,17 +214,6 @@ func (lb *lb_LU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,19 +222,6 @@ func (lb *lb_LU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lb.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,19 +230,6 @@ func (lb *lb_LU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -499,26 +238,6 @@ func (lb *lb_LU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -527,30 +246,6 @@ func (lb *lb_LU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -559,34 +254,5 @@ func (lb *lb_LU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lg/lg.go b/lg/lg.go -index 0236c2a..1eec4bd 100644 ---- a/lg/lg.go -+++ b/lg/lg.go -@@ -57,7 +57,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kulisito nga tannaza", "Bukya Kulisito Azaal"}, -- timezones: map[string]string{"PST": "PST", "ACWST": "ACWST", "HKST": "HKST", "MEZ": "MEZ", "MESZ": "MESZ", "HAST": "HAST", "ART": "ART", "CHADT": "CHADT", "HNCU": "HNCU", "AST": "AST", "HADT": "HADT", "MST": "MST", "WEZ": "WEZ", "WESZ": "WESZ", "HAT": "HAT", "SAST": "SAST", "BOT": "BOT", "HENOMX": "HENOMX", "WAT": "WAT", "VET": "VET", "HNOG": "HNOG", "HEOG": "HEOG", "NZST": "NZST", "IST": "IST", "TMT": "TMT", "HEEG": "HEEG", "HNPMX": "HNPMX", "MYT": "MYT", "HEPM": "HEPM", "LHDT": "LHDT", "JST": "JST", "ACDT": "ACDT", "COT": "COT", "EDT": "EDT", "UYST": "UYST", "CST": "CST", "HNPM": "HNPM", "LHST": "LHST", "TMST": "TMST", "WAST": "WAST", "AKST": "AKST", "AKDT": "AKDT", "ACWDT": "ACWDT", "ECT": "ECT", "CAT": "CAT", "COST": "COST", "HEPMX": "HEPMX", "GYT": "GYT", "ARST": "ARST", "WARST": "WARST", "HECU": "HECU", "ChST": "ChST", "GFT": "GFT", "OESZ": "OESZ", "SGT": "SGT", "UYT": "UYT", "WIB": "WIB", "JDT": "JDT", "CLST": "CLST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "EST": "EST", "AEDT": "AEDT", "CLT": "CLT", "HNNOMX": "HNNOMX", "WART": "WART", "SRT": "SRT", "HNT": "HNT", "AWDT": "AWDT", "ACST": "ACST", "MDT": "MDT", "ADT": "ADT", "AEST": "AEST", "CHAST": "CHAST", "AWST": "AWST", "NZDT": "NZDT", "OEZ": "OEZ", "GMT": "GMT", "WIT": "WIT", "BT": "BT", "PDT": "PDT", "HKT": "HKT", "WITA": "WITA", "EAT": "EAT", "CDT": "CDT"}, -+ timezones: map[string]string{"HADT": "HADT", "ECT": "ECT", "ARST": "ARST", "CLT": "CLT", "BT": "BT", "VET": "VET", "HNOG": "HNOG", "CAT": "CAT", "MEZ": "MEZ", "HEEG": "HEEG", "AWDT": "AWDT", "LHDT": "LHDT", "HNPM": "HNPM", "CHADT": "CHADT", "WAT": "WAT", "WIT": "WIT", "HECU": "HECU", "WARST": "WARST", "HEOG": "HEOG", "HKT": "HKT", "ADT": "ADT", "AWST": "AWST", "AEST": "AEST", "WAST": "WAST", "OESZ": "OESZ", "AEDT": "AEDT", "MDT": "MDT", "AST": "AST", "ACDT": "ACDT", "HNEG": "HNEG", "LHST": "LHST", "AKDT": "AKDT", "CLST": "CLST", "EAT": "EAT", "HAST": "HAST", "JST": "JST", "PST": "PST", "HNCU": "HNCU", "ChST": "ChST", "BOT": "BOT", "GYT": "GYT", "∅∅∅": "∅∅∅", "COT": "COT", "EDT": "EDT", "MST": "MST", "ACWDT": "ACWDT", "AKST": "AKST", "OEZ": "OEZ", "TMT": "TMT", "GMT": "GMT", "ART": "ART", "SRT": "SRT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "GFT": "GFT", "COST": "COST", "MESZ": "MESZ", "ACST": "ACST", "HEPM": "HEPM", "UYT": "UYT", "IST": "IST", "EST": "EST", "CST": "CST", "CDT": "CDT", "HNPMX": "HNPMX", "HNT": "HNT", "SAST": "SAST", "WIB": "WIB", "PDT": "PDT", "WEZ": "WEZ", "WESZ": "WESZ", "HEPMX": "HEPMX", "WART": "WART", "WITA": "WITA", "UYST": "UYST", "ACWST": "ACWST", "SGT": "SGT", "HKST": "HKST", "MYT": "MYT", "NZST": "NZST", "NZDT": "NZDT", "JDT": "JDT", "CHAST": "CHAST", "HAT": "HAT", "TMST": "TMST"}, - } - } -  -diff --git a/lg_UG/lg_UG.go b/lg_UG/lg_UG.go -index 4f1577b..6fd1d81 100644 ---- a/lg_UG/lg_UG.go -+++ b/lg_UG/lg_UG.go -@@ -42,22 +42,13 @@ type lg_UG struct { - // New returns a new instance of translator for the 'lg_UG' locale - func New() locales.Translator { - return &lg_UG{ -- locale: "lg_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apu", "Maa", "Juu", "Jul", "Agu", "Seb", "Oki", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janwaliyo", "Febwaliyo", "Marisi", "Apuli", "Maayi", "Juuni", "Julaayi", "Agusito", "Sebuttemba", "Okitobba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Sab", "Bal", "Lw2", "Lw3", "Lw4", "Lw5", "Lw6"}, -- daysNarrow: []string{"S", "B", "L", "L", "L", "L", "L"}, -- daysWide: []string{"Sabbiiti", "Balaza", "Lwakubiri", "Lwakusatu", "Lwakuna", "Lwakutaano", "Lwamukaaga"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kulisito nga tannaza", "Bukya Kulisito Azaal"}, -- timezones: map[string]string{"CLST": "CLST", "CAT": "CAT", "GMT": "GMT", "GYT": "GYT", "WESZ": "WESZ", "EAT": "EAT", "WIT": "WIT", "ECT": "ECT", "COST": "COST", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HNT": "HNT", "HKT": "HKT", "BOT": "BOT", "WAST": "WAST", "SGT": "SGT", "EDT": "EDT", "BT": "BT", "PST": "PST", "AKDT": "AKDT", "MESZ": "MESZ", "PDT": "PDT", "IST": "IST", "TMST": "TMST", "HECU": "HECU", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "UYT": "UYT", "HADT": "HADT", "JST": "JST", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "OESZ": "OESZ", "ACWST": "ACWST", "HKST": "HKST", "HAST": "HAST", "VET": "VET", "ARST": "ARST", "LHDT": "LHDT", "NZST": "NZST", "TMT": "TMT", "COT": "COT", "CDT": "CDT", "ART": "ART", "HNPM": "HNPM", "MEZ": "MEZ", "NZDT": "NZDT", "AEST": "AEST", "LHST": "LHST", "CLT": "CLT", "ACST": "ACST", "EST": "EST", "AST": "AST", "AKST": "AKST", "HAT": "HAT", "CHADT": "CHADT", "WARST": "WARST", "HNCU": "HNCU", "MST": "MST", "MDT": "MDT", "AWST": "AWST", "ChST": "ChST", "HNNOMX": "HNNOMX", "SRT": "SRT", "HNOG": "HNOG", "AWDT": "AWDT", "CHAST": "CHAST", "OEZ": "OEZ", "CST": "CST", "HEOG": "HEOG", "AEDT": "AEDT", "WITA": "WITA", "WAT": "WAT", "WART": "WART", "MYT": "MYT", "UYST": "UYST", "WEZ": "WEZ", "HEPM": "HEPM", "HNEG": "HNEG", "SAST": "SAST", "JDT": "JDT", "HEEG": "HEEG", "GFT": "GFT", "ADT": "ADT", "WIB": "WIB"}, -+ locale: "lg_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYT": "UYT", "IST": "IST", "HEPMX": "HEPMX", "HAT": "HAT", "LHST": "LHST", "PDT": "PDT", "ACWDT": "ACWDT", "CHAST": "CHAST", "HECU": "HECU", "WARST": "WARST", "WIT": "WIT", "COT": "COT", "HKST": "HKST", "ECT": "ECT", "NZST": "NZST", "ART": "ART", "GMT": "GMT", "JDT": "JDT", "UYST": "UYST", "VET": "VET", "MDT": "MDT", "AKST": "AKST", "GFT": "GFT", "HEOG": "HEOG", "TMST": "TMST", "CAT": "CAT", "HNT": "HNT", "GYT": "GYT", "COST": "COST", "CST": "CST", "MST": "MST", "NZDT": "NZDT", "BOT": "BOT", "AWST": "AWST", "EST": "EST", "EAT": "EAT", "MEZ": "MEZ", "HEEG": "HEEG", "HNPM": "HNPM", "HEPM": "HEPM", "OEZ": "OEZ", "WART": "WART", "HENOMX": "HENOMX", "JST": "JST", "LHDT": "LHDT", "HNCU": "HNCU", "OESZ": "OESZ", "SAST": "SAST", "AEST": "AEST", "AEDT": "AEDT", "SGT": "SGT", "HNOG": "HNOG", "WITA": "WITA", "ARST": "ARST", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "CLT": "CLT", "CLST": "CLST", "WIB": "WIB", "CDT": "CDT", "ChST": "ChST", "ACWST": "ACWST", "WAST": "WAST", "AST": "AST", "SRT": "SRT", "HAST": "HAST", "HNEG": "HNEG", "PST": "PST", "HNPMX": "HNPMX", "WESZ": "WESZ", "EDT": "EDT", "HADT": "HADT", "ACST": "ACST", "ACDT": "ACDT", "MYT": "MYT", "BT": "BT", "WAT": "WAT", "AKDT": "AKDT", "ADT": "ADT", "MESZ": "MESZ", "HKT": "HKT", "TMT": "TMT", "AWDT": "AWDT", "CHADT": "CHADT", "WEZ": "WEZ"}, - } - } -  -@@ -110,7 +101,7 @@ func (lg *lg_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lg *lg_UG) MonthsAbbreviated() []string { -- return lg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -120,7 +111,7 @@ func (lg *lg_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lg *lg_UG) MonthsNarrow() []string { -- return lg.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -130,7 +121,7 @@ func (lg *lg_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lg *lg_UG) MonthsWide() []string { -- return lg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,54 +181,7 @@ func (lg *lg_UG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lg.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lg_UG' -@@ -246,61 +190,7 @@ func (lg *lg_UG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lg.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, lg.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lg_UG' -@@ -308,27 +198,6 @@ func (lg *lg_UG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -337,17 +206,6 @@ func (lg *lg_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lg.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -356,17 +214,6 @@ func (lg *lg_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -375,19 +222,6 @@ func (lg *lg_UG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -396,19 +230,6 @@ func (lg *lg_UG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -417,26 +238,6 @@ func (lg *lg_UG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -445,30 +246,6 @@ func (lg *lg_UG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -477,34 +254,5 @@ func (lg *lg_UG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lkt/lkt.go b/lkt/lkt.go -index 7611aab..d7cae50 100644 ---- a/lkt/lkt.go -+++ b/lkt/lkt.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - monthsWide: []string{"", "Wiótheȟika Wí", "Thiyóȟeyuŋka Wí", "Ištáwičhayazaŋ Wí", "Pȟežítȟo Wí", "Čhaŋwápetȟo Wí", "Wípazukȟa-wašté Wí", "Čhaŋpȟásapa Wí", "Wasútȟuŋ Wí", "Čhaŋwápeǧi Wí", "Čhaŋwápe-kasná Wí", "Waníyetu Wí", "Tȟahékapšuŋ Wí"}, - daysNarrow: []string{"A", "W", "N", "Y", "T", "Z", "O"}, - daysWide: []string{"Aŋpétuwakȟaŋ", "Aŋpétuwaŋži", "Aŋpétunuŋpa", "Aŋpétuyamni", "Aŋpétutopa", "Aŋpétuzaptaŋ", "Owáŋgyužažapi"}, -- timezones: map[string]string{"HADT": "HADT", "WEZ": "WEZ", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "PST": "PST", "ARST": "ARST", "HEPM": "HEPM", "HEEG": "HEEG", "AEDT": "AEDT", "MYT": "MYT", "WIB": "WIB", "WIT": "WIT", "HEOG": "HEOG", "AWDT": "AWDT", "GFT": "GFT", "WARST": "WARST", "MDT": "MDT", "LHST": "LHST", "ACST": "ACST", "BT": "BT", "ACWST": "ACWST", "CHADT": "CHADT", "COST": "COST", "HNCU": "HNCU", "HNPMX": "HNPMX", "PDT": "PDT", "JDT": "JDT", "COT": "COT", "HENOMX": "HENOMX", "EDT": "EDT", "HNT": "HNT", "BOT": "BOT", "TMT": "TMT", "HAST": "HAST", "SRT": "SRT", "HKT": "HKT", "HKST": "HKST", "HNPM": "HNPM", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "EAT": "EAT", "GMT": "GMT", "UYT": "UYT", "AST": "AST", "HNOG": "HNOG", "JST": "JST", "ChST": "ChST", "WAT": "WAT", "OEZ": "OEZ", "UYST": "UYST", "WITA": "WITA", "NZST": "NZST", "CLST": "CLST", "TMST": "TMST", "SAST": "SAST", "ART": "ART", "AEST": "AEST", "HNEG": "HNEG", "WAST": "WAST", "SGT": "SGT", "HECU": "HECU", "EST": "EST", "VET": "VET", "NZDT": "NZDT", "CST": "CST", "ADT": "ADT", "CAT": "CAT", "ECT": "ECT", "WART": "WART", "HEPMX": "HEPMX", "AKST": "AKST", "AKDT": "AKDT", "GYT": "GYT", "ACWDT": "ACWDT", "AWST": "AWST", "CHAST": "CHAST", "IST": "IST", "CLT": "CLT", "LHDT": "LHDT", "ACDT": "ACDT", "MST": "MST", "CDT": "CDT", "WESZ": "WESZ", "HAT": "HAT", "MEZ": "MEZ"}, -+ timezones: map[string]string{"HNT": "HNT", "WART": "WART", "EST": "EST", "MST": "MST", "ART": "ART", "MYT": "MYT", "ACWDT": "ACWDT", "OEZ": "OEZ", "GMT": "GMT", "HAST": "HAST", "TMST": "TMST", "EAT": "EAT", "JST": "JST", "HNPMX": "HNPMX", "GYT": "GYT", "ACDT": "ACDT", "CHADT": "CHADT", "HECU": "HECU", "SGT": "SGT", "WAT": "WAT", "HNEG": "HNEG", "HENOMX": "HENOMX", "ACST": "ACST", "TMT": "TMT", "HADT": "HADT", "WARST": "WARST", "HKST": "HKST", "ChST": "ChST", "ADT": "ADT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "WAST": "WAST", "HEPM": "HEPM", "AEST": "AEST", "WIB": "WIB", "CHAST": "CHAST", "PDT": "PDT", "ECT": "ECT", "AST": "AST", "BT": "BT", "GFT": "GFT", "CLT": "CLT", "WIT": "WIT", "HNOG": "HNOG", "MEZ": "MEZ", "HNPM": "HNPM", "ACWST": "ACWST", "EDT": "EDT", "HKT": "HKT", "WITA": "WITA", "CDT": "CDT", "AWST": "AWST", "PST": "PST", "COST": "COST", "WEZ": "WEZ", "AKST": "AKST", "NZST": "NZST", "ARST": "ARST", "AEDT": "AEDT", "IST": "IST", "HNCU": "HNCU", "CAT": "CAT", "BOT": "BOT", "VET": "VET", "HAT": "HAT", "SAST": "SAST", "JDT": "JDT", "WESZ": "WESZ", "AKDT": "AKDT", "CLST": "CLST", "HEOG": "HEOG", "CST": "CST", "UYST": "UYST", "HEPMX": "HEPMX", "COT": "COT", "UYT": "UYT", "OESZ": "OESZ", "HEEG": "HEEG", "AWDT": "AWDT", "LHST": "LHST", "MDT": "MDT", "SRT": "SRT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "NZDT": "NZDT"}, - } - } -  -diff --git a/lkt_US/lkt_US.go b/lkt_US/lkt_US.go -index 069715a..9a28bb1 100644 ---- a/lkt_US/lkt_US.go -+++ b/lkt_US/lkt_US.go -@@ -10,62 +10,45 @@ import ( - ) -  - type lkt_US struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lkt_US' locale - func New() locales.Translator { - return &lkt_US{ -- locale: "lkt_US", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsWide: []string{"", "Wiótheȟika Wí", "Thiyóȟeyuŋka Wí", "Ištáwičhayazaŋ Wí", "Pȟežítȟo Wí", "Čhaŋwápetȟo Wí", "Wípazukȟa-wašté Wí", "Čhaŋpȟásapa Wí", "Wasútȟuŋ Wí", "Čhaŋwápeǧi Wí", "Čhaŋwápe-kasná Wí", "Waníyetu Wí", "Tȟahékapšuŋ Wí"}, -- daysNarrow: []string{"A", "W", "N", "Y", "T", "Z", "O"}, -- daysWide: []string{"Aŋpétuwakȟaŋ", "Aŋpétuwaŋži", "Aŋpétunuŋpa", "Aŋpétuyamni", "Aŋpétutopa", "Aŋpétuzaptaŋ", "Owáŋgyužažapi"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "HNT": "HNT", "VET": "VET", "MESZ": "MESZ", "ACWDT": "ACWDT", "AWDT": "AWDT", "JST": "JST", "ECT": "ECT", "CAT": "CAT", "WAT": "WAT", "COST": "COST", "SRT": "SRT", "NZDT": "NZDT", "CHAST": "CHAST", "LHST": "LHST", "IST": "IST", "CLT": "CLT", "GFT": "GFT", "ACST": "ACST", "EAT": "EAT", "AST": "AST", "HKST": "HKST", "HEOG": "HEOG", "NZST": "NZST", "CLST": "CLST", "TMT": "TMT", "HNEG": "HNEG", "GMT": "GMT", "HAST": "HAST", "BT": "BT", "JDT": "JDT", "WARST": "WARST", "WITA": "WITA", "ChST": "ChST", "HENOMX": "HENOMX", "ACWST": "ACWST", "COT": "COT", "AKST": "AKST", "AEST": "AEST", "AWST": "AWST", "EST": "EST", "HEPMX": "HEPMX", "HADT": "HADT", "ART": "ART", "HNOG": "HNOG", "WESZ": "WESZ", "LHDT": "LHDT", "HEEG": "HEEG", "HNCU": "HNCU", "MST": "MST", "PDT": "PDT", "HAT": "HAT", "TMST": "TMST", "HECU": "HECU", "GYT": "GYT", "MEZ": "MEZ", "SAST": "SAST", "SGT": "SGT", "AKDT": "AKDT", "AEDT": "AEDT", "HNPM": "HNPM", "MYT": "MYT", "UYT": "UYT", "HKT": "HKT", "CHADT": "CHADT", "BOT": "BOT", "OESZ": "OESZ", "UYST": "UYST", "CDT": "CDT", "ARST": "ARST", "PST": "PST", "HEPM": "HEPM", "ACDT": "ACDT", "WART": "WART", "EDT": "EDT", "ADT": "ADT", "CST": "CST", "WIT": "WIT", "WAST": "WAST", "OEZ": "OEZ", "MDT": "MDT", "HNPMX": "HNPMX", "WIB": "WIB"}, -+ locale: "lkt_US", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COST": "COST", "HNOG": "HNOG", "TMT": "TMT", "NZDT": "NZDT", "WIB": "WIB", "ARST": "ARST", "BT": "BT", "UYST": "UYST", "WAST": "WAST", "COT": "COT", "WITA": "WITA", "JDT": "JDT", "HNPMX": "HNPMX", "OEZ": "OEZ", "HEOG": "HEOG", "CLST": "CLST", "PST": "PST", "WEZ": "WEZ", "HKT": "HKT", "HAST": "HAST", "HENOMX": "HENOMX", "JST": "JST", "UYT": "UYT", "SAST": "SAST", "ChST": "ChST", "MESZ": "MESZ", "HNEG": "HNEG", "WAT": "WAT", "AKST": "AKST", "OESZ": "OESZ", "GFT": "GFT", "CLT": "CLT", "AEST": "AEST", "HEPMX": "HEPMX", "HAT": "HAT", "IST": "IST", "SGT": "SGT", "WIT": "WIT", "MEZ": "MEZ", "ACDT": "ACDT", "CHADT": "CHADT", "GYT": "GYT", "EST": "EST", "ACST": "ACST", "AWDT": "AWDT", "HEPM": "HEPM", "NZST": "NZST", "ECT": "ECT", "HNT": "HNT", "HKST": "HKST", "ADT": "ADT", "BOT": "BOT", "WESZ": "WESZ", "WART": "WART", "WARST": "WARST", "EDT": "EDT", "TMST": "TMST", "CAT": "CAT", "CST": "CST", "CDT": "CDT", "MST": "MST", "ART": "ART", "HADT": "HADT", "MYT": "MYT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "GMT": "GMT", "SRT": "SRT", "EAT": "EAT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "PDT": "PDT", "ACWST": "ACWST", "CHAST": "CHAST", "LHST": "LHST", "LHDT": "LHDT", "HNPM": "HNPM", "VET": "VET", "AKDT": "AKDT", "MDT": "MDT", "AST": "AST", "AWST": "AWST", "ACWDT": "ACWDT", "HNCU": "HNCU", "HECU": "HECU"}, - } - } -  -@@ -131,7 +114,7 @@ func (lkt *lkt_US) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lkt *lkt_US) MonthsWide() []string { -- return lkt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,40 +174,7 @@ func (lkt *lkt_US) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lkt.currencies[currency] -- l := len(s) + len(symbol) + 5 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lkt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lkt.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lkt.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, lkt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lkt.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lkt_US' -@@ -233,57 +183,7 @@ func (lkt *lkt_US) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lkt.currencies[currency] -- l := len(s) + len(symbol) + 5 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lkt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lkt.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, lkt.currencyNegativePrefix[j]) -- } -- -- b = append(b, lkt.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lkt.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lkt.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, lkt.currencyNegativeSuffix...) -- } else { -- -- b = append(b, lkt.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lkt_US' -@@ -291,17 +191,6 @@ func (lkt *lkt_US) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -310,17 +199,6 @@ func (lkt *lkt_US) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lkt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -329,17 +207,6 @@ func (lkt *lkt_US) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lkt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -348,19 +215,6 @@ func (lkt *lkt_US) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lkt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, lkt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -369,28 +223,6 @@ func (lkt *lkt_US) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, lkt.periodsAbbreviated[0]...) -- } else { -- b = append(b, lkt.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -399,35 +231,6 @@ func (lkt *lkt_US) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, lkt.periodsAbbreviated[0]...) -- } else { -- b = append(b, lkt.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -436,40 +239,6 @@ func (lkt *lkt_US) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, lkt.periodsAbbreviated[0]...) -- } else { -- b = append(b, lkt.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -478,44 +247,5 @@ func (lkt *lkt_US) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lkt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, lkt.periodsAbbreviated[0]...) -- } else { -- b = append(b, lkt.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lkt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ln/ln.go b/ln/ln.go -index c86f7df..3d3118b 100644 ---- a/ln/ln.go -+++ b/ln/ln.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"libóso ya", "nsima ya Y"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Yambo ya Yézu Krís", "Nsima ya Yézu Krís"}, -- timezones: map[string]string{"WART": "WART", "SRT": "SRT", "AEDT": "AEDT", "IST": "IST", "CLST": "CLST", "HNEG": "HNEG", "COST": "COST", "CDT": "CDT", "ART": "ART", "PST": "PST", "AWDT": "AWDT", "MEZ": "MEZ", "CAT": "Ntángo ya Lubumbashi", "HNNOMX": "HNNOMX", "SGT": "SGT", "PDT": "PDT", "AWST": "AWST", "LHST": "LHST", "NZDT": "NZDT", "CHADT": "CHADT", "HNCU": "HNCU", "MYT": "MYT", "WIB": "WIB", "SAST": "Ntángo ya Afríka ya Sidi", "JDT": "JDT", "ECT": "ECT", "ACST": "ACST", "WARST": "WARST", "HECU": "HECU", "UYST": "UYST", "WITA": "WITA", "HNPM": "HNPM", "TMT": "TMT", "TMST": "TMST", "AKDT": "AKDT", "BT": "BT", "HEEG": "HEEG", "COT": "COT", "EST": "EST", "ACWST": "ACWST", "AEST": "AEST", "NZST": "NZST", "BOT": "BOT", "HENOMX": "HENOMX", "HAT": "HAT", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "GMT": "Ntángo ya Londoni", "EDT": "EDT", "CHAST": "CHAST", "WAT": "WAT", "HEPMX": "HEPMX", "AKST": "AKST", "MDT": "MDT", "HADT": "HADT", "WESZ": "WESZ", "ARST": "ARST", "CLT": "CLT", "ChST": "ChST", "WAST": "WAST", "AST": "AST", "MST": "MST", "WEZ": "WEZ", "ACWDT": "ACWDT", "HNOG": "HNOG", "OEZ": "OEZ", "HEPM": "HEPM", "OESZ": "OESZ", "WIT": "WIT", "HNT": "HNT", "HNPMX": "HNPMX", "CST": "CST", "VET": "VET", "GFT": "GFT", "HKST": "HKST", "MESZ": "MESZ", "ADT": "ADT", "GYT": "GYT", "UYT": "UYT", "HAST": "HAST", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "HEOG": "HEOG", "HKT": "HKT", "LHDT": "LHDT", "JST": "JST"}, -+ timezones: map[string]string{"AKST": "AKST", "AST": "AST", "GMT": "Ntángo ya Londoni", "LHST": "LHST", "WITA": "WITA", "WAST": "WAST", "OEZ": "OEZ", "COT": "COT", "HEOG": "HEOG", "ART": "ART", "BT": "BT", "TMT": "TMT", "MDT": "MDT", "SRT": "SRT", "IST": "IST", "WART": "WART", "SAST": "Ntángo ya Afríka ya Sidi", "COST": "COST", "CLT": "CLT", "HAST": "HAST", "MYT": "MYT", "MST": "MST", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "CHAST": "CHAST", "HNCU": "HNCU", "HKST": "HKST", "CDT": "CDT", "BOT": "BOT", "ACST": "ACST", "HEEG": "HEEG", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "GFT": "GFT", "HAT": "HAT", "EDT": "EDT", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "WIT": "WIT", "CAT": "Ntángo ya Lubumbashi", "HNEG": "HNEG", "HEPM": "HEPM", "TMST": "TMST", "CST": "CST", "ECT": "ECT", "ChST": "ChST", "PDT": "PDT", "UYST": "UYST", "WEZ": "WEZ", "HEPMX": "HEPMX", "EST": "EST", "ADT": "ADT", "ARST": "ARST", "WESZ": "WESZ", "OESZ": "OESZ", "WARST": "WARST", "NZST": "NZST", "WIB": "WIB", "MEZ": "MEZ", "MESZ": "MESZ", "AWDT": "AWDT", "HNPM": "HNPM", "JDT": "JDT", "PST": "PST", "ACWST": "ACWST", "HNPMX": "HNPMX", "HECU": "HECU", "HNT": "HNT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "JST": "JST", "AEST": "AEST", "AEDT": "AEDT", "SGT": "SGT", "WAT": "WAT", "GYT": "GYT", "HNOG": "HNOG", "HKT": "HKT", "HADT": "HADT", "LHDT": "LHDT", "CHADT": "CHADT", "VET": "VET", "CLST": "CLST", "ACDT": "ACDT", "AWST": "AWST", "UYT": "UYT"}, - } - } -  -diff --git a/ln_AO/ln_AO.go b/ln_AO/ln_AO.go -index ba6547d..f1af845 100644 ---- a/ln_AO/ln_AO.go -+++ b/ln_AO/ln_AO.go -@@ -10,66 +10,45 @@ import ( - ) -  - type ln_AO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ln_AO' locale - func New() locales.Translator { - return &ln_AO{ -- locale: "ln_AO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "Kz", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fbl", "msi", "apl", "mai", "yun", "yul", "agt", "stb", "ɔtb", "nvb", "dsb"}, -- monthsNarrow: []string{"", "y", "f", "m", "a", "m", "y", "y", "a", "s", "ɔ", "n", "d"}, -- monthsWide: []string{"", "sánzá ya yambo", "sánzá ya míbalé", "sánzá ya mísáto", "sánzá ya mínei", "sánzá ya mítáno", "sánzá ya motóbá", "sánzá ya nsambo", "sánzá ya mwambe", "sánzá ya libwa", "sánzá ya zómi", "sánzá ya zómi na mɔ̌kɔ́", "sánzá ya zómi na míbalé"}, -- daysAbbreviated: []string{"eye", "ybo", "mbl", "mst", "min", "mtn", "mps"}, -- daysNarrow: []string{"e", "y", "m", "m", "m", "m", "p"}, -- daysWide: []string{"eyenga", "mokɔlɔ mwa yambo", "mokɔlɔ mwa míbalé", "mokɔlɔ mwa mísáto", "mokɔlɔ ya mínéi", "mokɔlɔ ya mítáno", "mpɔ́sɔ"}, -- periodsAbbreviated: []string{"ntɔ́ngɔ́", "mpókwa"}, -- periodsWide: []string{"ntɔ́ngɔ́", "mpókwa"}, -- erasAbbreviated: []string{"libóso ya", "nsima ya Y"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Yambo ya Yézu Krís", "Nsima ya Yézu Krís"}, -- timezones: map[string]string{"ADT": "ADT", "AWST": "AWST", "JDT": "JDT", "GFT": "GFT", "CAT": "Ntángo ya Lubumbashi", "WART": "WART", "CDT": "CDT", "HADT": "HADT", "PDT": "PDT", "AEST": "AEST", "HKT": "HKT", "HEPM": "HEPM", "ECT": "ECT", "MESZ": "MESZ", "MST": "MST", "AST": "AST", "ACWST": "ACWST", "CLST": "CLST", "TMT": "TMT", "EST": "EST", "MDT": "MDT", "COT": "COT", "GMT": "Ntángo ya Londoni", "HECU": "HECU", "CHADT": "CHADT", "ACST": "ACST", "ACDT": "ACDT", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "HKST": "HKST", "WIB": "WIB", "SGT": "SGT", "WITA": "WITA", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "MEZ": "MEZ", "WARST": "WARST", "WIT": "WIT", "ART": "ART", "CLT": "CLT", "HAST": "HAST", "EDT": "EDT", "HNPMX": "HNPMX", "UYST": "UYST", "ACWDT": "ACWDT", "HEOG": "HEOG", "HEEG": "HEEG", "OESZ": "OESZ", "PST": "PST", "HAT": "HAT", "AEDT": "AEDT", "TMST": "TMST", "HEPMX": "HEPMX", "HNCU": "HNCU", "AKDT": "AKDT", "CST": "CST", "HNPM": "HNPM", "LHDT": "LHDT", "NZST": "NZST", "NZDT": "NZDT", "OEZ": "OEZ", "AKST": "AKST", "GYT": "GYT", "MYT": "MYT", "ARST": "ARST", "AWDT": "AWDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "SRT": "SRT", "WESZ": "WESZ", "SAST": "Ntángo ya Afríka ya Sidi", "IST": "IST", "JST": "JST", "VET": "VET", "ChST": "ChST", "BOT": "BOT", "COST": "COST", "WAST": "WAST", "HENOMX": "HENOMX", "UYT": "UYT", "BT": "BT", "HNT": "HNT", "HNOG": "HNOG", "LHST": "LHST", "WAT": "WAT", "HNEG": "HNEG"}, -+ locale: "ln_AO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "Kz", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HECU": "HECU", "WAT": "WAT", "CLST": "CLST", "AWST": "AWST", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "NZDT": "NZDT", "MDT": "MDT", "MEZ": "MEZ", "LHDT": "LHDT", "IST": "IST", "HEPMX": "HEPMX", "WEZ": "WEZ", "HNOG": "HNOG", "SAST": "SAST", "ARST": "ARST", "HNPM": "HNPM", "AEDT": "AEDT", "CHADT": "CHADT", "UYST": "UYST", "HNPMX": "HNPMX", "GFT": "GFT", "HNNOMX": "HNNOMX", "HADT": "HADT", "ACST": "ACST", "HEPM": "HEPM", "JDT": "JDT", "ACWST": "ACWST", "CHAST": "CHAST", "VET": "VET", "BOT": "BOT", "COT": "COT", "PST": "PST", "PDT": "PDT", "CST": "CST", "AEST": "AEST", "HEEG": "HEEG", "OEZ": "OEZ", "OESZ": "OESZ", "HAT": "HAT", "EDT": "EDT", "WIB": "WIB", "MESZ": "MESZ", "ADT": "ADT", "UYT": "UYT", "HNCU": "HNCU", "AKST": "AKST", "HNT": "HNT", "GYT": "GYT", "CDT": "CDT", "AST": "AST", "EST": "EST", "TMT": "TMT", "CLT": "CLT", "HENOMX": "HENOMX", "WIT": "WIT", "HKST": "HKST", "NZST": "NZST", "ART": "ART", "LHST": "LHST", "WAST": "WAST", "AKDT": "AKDT", "WART": "WART", "WARST": "WARST", "COST": "COST", "CAT": "CAT", "GMT": "GMT", "JST": "JST", "HKT": "HKT", "EAT": "EAT", "HAST": "HAST", "HEOG": "HEOG", "WITA": "WITA", "MST": "MST", "ACWDT": "ACWDT", "SGT": "SGT", "TMST": "TMST", "ACDT": "ACDT", "SRT": "SRT", "ECT": "ECT", "ChST": "ChST", "AWDT": "AWDT", "MYT": "MYT", "BT": "BT", "HNEG": "HNEG"}, - } - } -  -@@ -122,7 +101,7 @@ func (ln *ln_AO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ln *ln_AO) MonthsAbbreviated() []string { -- return ln.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (ln *ln_AO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ln *ln_AO) MonthsNarrow() []string { -- return ln.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (ln *ln_AO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ln *ln_AO) MonthsWide() []string { -- return ln.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,42 +167,7 @@ func (ln *ln_AO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ln_AO' and handles both Whole and Real numbers based on 'v' - func (ln *ln_AO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ln_AO' and handles both Whole and Real numbers based on 'v' -@@ -237,56 +181,7 @@ func (ln *ln_AO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ln.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ln_AO' -@@ -295,63 +190,7 @@ func (ln *ln_AO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ln.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ln.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ln.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ln_AO' -@@ -359,17 +198,6 @@ func (ln *ln_AO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -378,17 +206,6 @@ func (ln *ln_AO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,17 +214,6 @@ func (ln *ln_AO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,19 +222,6 @@ func (ln *ln_AO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ln.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,19 +230,6 @@ func (ln *ln_AO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -458,26 +238,6 @@ func (ln *ln_AO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -486,30 +246,6 @@ func (ln *ln_AO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -518,34 +254,5 @@ func (ln *ln_AO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ln.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ln_CD/ln_CD.go b/ln_CD/ln_CD.go -index 11bdb8c..08b4c8d 100644 ---- a/ln_CD/ln_CD.go -+++ b/ln_CD/ln_CD.go -@@ -10,66 +10,45 @@ import ( - ) -  - type ln_CD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ln_CD' locale - func New() locales.Translator { - return &ln_CD{ -- locale: "ln_CD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fbl", "msi", "apl", "mai", "yun", "yul", "agt", "stb", "ɔtb", "nvb", "dsb"}, -- monthsNarrow: []string{"", "y", "f", "m", "a", "m", "y", "y", "a", "s", "ɔ", "n", "d"}, -- monthsWide: []string{"", "sánzá ya yambo", "sánzá ya míbalé", "sánzá ya mísáto", "sánzá ya mínei", "sánzá ya mítáno", "sánzá ya motóbá", "sánzá ya nsambo", "sánzá ya mwambe", "sánzá ya libwa", "sánzá ya zómi", "sánzá ya zómi na mɔ̌kɔ́", "sánzá ya zómi na míbalé"}, -- daysAbbreviated: []string{"eye", "ybo", "mbl", "mst", "min", "mtn", "mps"}, -- daysNarrow: []string{"e", "y", "m", "m", "m", "m", "p"}, -- daysWide: []string{"eyenga", "mokɔlɔ mwa yambo", "mokɔlɔ mwa míbalé", "mokɔlɔ mwa mísáto", "mokɔlɔ ya mínéi", "mokɔlɔ ya mítáno", "mpɔ́sɔ"}, -- periodsAbbreviated: []string{"ntɔ́ngɔ́", "mpókwa"}, -- periodsWide: []string{"ntɔ́ngɔ́", "mpókwa"}, -- erasAbbreviated: []string{"libóso ya", "nsima ya Y"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Yambo ya Yézu Krís", "Nsima ya Yézu Krís"}, -- timezones: map[string]string{"EDT": "EDT", "CDT": "CDT", "ACWDT": "ACWDT", "HEOG": "HEOG", "ACST": "ACST", "COST": "COST", "AST": "AST", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "HNOG": "HNOG", "CHAST": "CHAST", "CAT": "Ntángo ya Lubumbashi", "EST": "EST", "CST": "CST", "HADT": "HADT", "WITA": "WITA", "MDT": "MDT", "WIB": "WIB", "MEZ": "MEZ", "IST": "IST", "WAT": "WAT", "OEZ": "OEZ", "WART": "WART", "GMT": "Ntángo ya Londoni", "GYT": "GYT", "SRT": "SRT", "CLST": "CLST", "JST": "JST", "HNEG": "HNEG", "SGT": "SGT", "ART": "ART", "AEST": "AEST", "SAST": "Ntángo ya Afríka ya Sidi", "∅∅∅": "∅∅∅", "AKST": "AKST", "PDT": "PDT", "WEZ": "WEZ", "HKST": "HKST", "NZDT": "NZDT", "ChST": "ChST", "GFT": "GFT", "WAST": "WAST", "OESZ": "OESZ", "HEPMX": "HEPMX", "MYT": "MYT", "HNT": "HNT", "ARST": "ARST", "AEDT": "AEDT", "HNPM": "HNPM", "LHDT": "LHDT", "HNCU": "HNCU", "HNPMX": "HNPMX", "WIT": "WIT", "HEPM": "HEPM", "NZST": "NZST", "CLT": "CLT", "ECT": "ECT", "WARST": "WARST", "HENOMX": "HENOMX", "HECU": "HECU", "MST": "MST", "WESZ": "WESZ", "AWDT": "AWDT", "TMST": "TMST", "HAST": "HAST", "LHST": "LHST", "BOT": "BOT", "TMT": "TMT", "ACDT": "ACDT", "AKDT": "AKDT", "ADT": "ADT", "VET": "VET", "BT": "BT", "AWST": "AWST", "HKT": "HKT", "MESZ": "MESZ", "HEEG": "HEEG", "COT": "COT", "UYST": "UYST", "ACWST": "ACWST", "JDT": "JDT", "HNNOMX": "HNNOMX", "UYT": "UYT", "PST": "PST", "HAT": "HAT", "CHADT": "CHADT"}, -+ locale: "ln_CD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BT": "BT", "ACWDT": "ACWDT", "EST": "EST", "SGT": "SGT", "WART": "WART", "HKT": "HKT", "NZDT": "NZDT", "MST": "MST", "ART": "ART", "ADT": "ADT", "CHADT": "CHADT", "GYT": "GYT", "EDT": "EDT", "HENOMX": "HENOMX", "JST": "JST", "AKDT": "AKDT", "IST": "IST", "AKST": "AKST", "HNOG": "HNOG", "NZST": "NZST", "ACDT": "ACDT", "AEST": "AEST", "AEDT": "AEDT", "WARST": "WARST", "COST": "COST", "TMST": "TMST", "WIB": "WIB", "ACWST": "ACWST", "UYT": "UYT", "∅∅∅": "∅∅∅", "PDT": "PDT", "VET": "VET", "GFT": "GFT", "CDT": "CDT", "HNPM": "HNPM", "AWST": "AWST", "LHDT": "LHDT", "SAST": "SAST", "TMT": "TMT", "CST": "CST", "ChST": "ChST", "HEEG": "HEEG", "PST": "PST", "HECU": "HECU", "HEOG": "HEOG", "CLST": "CLST", "MYT": "MYT", "LHST": "LHST", "HNCU": "HNCU", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "HAT": "HAT", "COT": "COT", "GMT": "GMT", "BOT": "BOT", "ACST": "ACST", "UYST": "UYST", "OESZ": "OESZ", "OEZ": "OEZ", "WIT": "WIT", "CHAST": "CHAST", "WEZ": "WEZ", "WAST": "WAST", "SRT": "SRT", "HEPM": "HEPM", "AWDT": "AWDT", "ARST": "ARST", "MEZ": "MEZ", "CAT": "CAT", "ECT": "ECT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WESZ": "WESZ", "JDT": "JDT", "WAT": "WAT", "HNT": "HNT", "HKST": "HKST", "CLT": "CLT", "EAT": "EAT", "HAST": "HAST", "HADT": "HADT", "WITA": "WITA", "MDT": "MDT", "AST": "AST"}, - } - } -  -@@ -122,7 +101,7 @@ func (ln *ln_CD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ln *ln_CD) MonthsAbbreviated() []string { -- return ln.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (ln *ln_CD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ln *ln_CD) MonthsNarrow() []string { -- return ln.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (ln *ln_CD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ln *ln_CD) MonthsWide() []string { -- return ln.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,42 +167,7 @@ func (ln *ln_CD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ln_CD' and handles both Whole and Real numbers based on 'v' - func (ln *ln_CD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ln_CD' and handles both Whole and Real numbers based on 'v' -@@ -237,56 +181,7 @@ func (ln *ln_CD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ln.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ln_CD' -@@ -295,63 +190,7 @@ func (ln *ln_CD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ln.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ln.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ln.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ln_CD' -@@ -359,17 +198,6 @@ func (ln *ln_CD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -378,17 +206,6 @@ func (ln *ln_CD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,17 +214,6 @@ func (ln *ln_CD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,19 +222,6 @@ func (ln *ln_CD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ln.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,19 +230,6 @@ func (ln *ln_CD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -458,26 +238,6 @@ func (ln *ln_CD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -486,30 +246,6 @@ func (ln *ln_CD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -518,34 +254,5 @@ func (ln *ln_CD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ln.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ln_CF/ln_CF.go b/ln_CF/ln_CF.go -index 7f8f5e6..d84b1be 100644 ---- a/ln_CF/ln_CF.go -+++ b/ln_CF/ln_CF.go -@@ -10,66 +10,45 @@ import ( - ) -  - type ln_CF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ln_CF' locale - func New() locales.Translator { - return &ln_CF{ -- locale: "ln_CF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fbl", "msi", "apl", "mai", "yun", "yul", "agt", "stb", "ɔtb", "nvb", "dsb"}, -- monthsNarrow: []string{"", "y", "f", "m", "a", "m", "y", "y", "a", "s", "ɔ", "n", "d"}, -- monthsWide: []string{"", "sánzá ya yambo", "sánzá ya míbalé", "sánzá ya mísáto", "sánzá ya mínei", "sánzá ya mítáno", "sánzá ya motóbá", "sánzá ya nsambo", "sánzá ya mwambe", "sánzá ya libwa", "sánzá ya zómi", "sánzá ya zómi na mɔ̌kɔ́", "sánzá ya zómi na míbalé"}, -- daysAbbreviated: []string{"eye", "ybo", "mbl", "mst", "min", "mtn", "mps"}, -- daysNarrow: []string{"e", "y", "m", "m", "m", "m", "p"}, -- daysWide: []string{"eyenga", "mokɔlɔ mwa yambo", "mokɔlɔ mwa míbalé", "mokɔlɔ mwa mísáto", "mokɔlɔ ya mínéi", "mokɔlɔ ya mítáno", "mpɔ́sɔ"}, -- periodsAbbreviated: []string{"ntɔ́ngɔ́", "mpókwa"}, -- periodsWide: []string{"ntɔ́ngɔ́", "mpókwa"}, -- erasAbbreviated: []string{"libóso ya", "nsima ya Y"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Yambo ya Yézu Krís", "Nsima ya Yézu Krís"}, -- timezones: map[string]string{"PST": "PST", "AEST": "AEST", "AWDT": "AWDT", "HEPM": "HEPM", "LHST": "LHST", "CHAST": "CHAST", "CLST": "CLST", "MDT": "MDT", "CHADT": "CHADT", "MYT": "MYT", "ADT": "ADT", "WITA": "WITA", "HNPM": "HNPM", "CAT": "Ntángo ya Lubumbashi", "COST": "COST", "ECT": "ECT", "UYST": "UYST", "CST": "CST", "GYT": "GYT", "HAST": "HAST", "WEZ": "WEZ", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "OESZ": "OESZ", "AKST": "AKST", "AEDT": "AEDT", "HECU": "HECU", "HEPMX": "HEPMX", "ACDT": "ACDT", "WAST": "WAST", "CDT": "CDT", "HADT": "HADT", "SAST": "Ntángo ya Afríka ya Sidi", "CLT": "CLT", "ACST": "ACST", "HAT": "HAT", "TMT": "TMT", "BT": "BT", "ACWST": "ACWST", "HKT": "HKT", "GMT": "Ntángo ya Londoni", "PDT": "PDT", "AST": "AST", "HNOG": "HNOG", "AWST": "AWST", "NZDT": "NZDT", "HENOMX": "HENOMX", "EDT": "EDT", "VET": "VET", "MEZ": "MEZ", "WARST": "WARST", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "WIB": "WIB", "WIT": "WIT", "ChST": "ChST", "BOT": "BOT", "WESZ": "WESZ", "IST": "IST", "WAT": "WAT", "UYT": "UYT", "HNCU": "HNCU", "ACWDT": "ACWDT", "ART": "ART", "∅∅∅": "∅∅∅", "SGT": "SGT", "WART": "WART", "COT": "COT", "SRT": "SRT", "HNT": "HNT", "HKST": "HKST", "MESZ": "MESZ", "GFT": "GFT", "OEZ": "OEZ", "HEEG": "HEEG", "TMST": "TMST", "HEOG": "HEOG", "LHDT": "LHDT", "NZST": "NZST", "JST": "JST", "EST": "EST", "MST": "MST", "AKDT": "AKDT", "ARST": "ARST", "JDT": "JDT", "HNEG": "HNEG"}, -+ locale: "ln_CF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WARST": "WARST", "HEPM": "HEPM", "UYST": "UYST", "IST": "IST", "PST": "PST", "PDT": "PDT", "LHST": "LHST", "CST": "CST", "ADT": "ADT", "ART": "ART", "TMST": "TMST", "WITA": "WITA", "HNPM": "HNPM", "HECU": "HECU", "AKDT": "AKDT", "OESZ": "OESZ", "GFT": "GFT", "CAT": "CAT", "NZST": "NZST", "HAST": "HAST", "ACST": "ACST", "HEEG": "HEEG", "AKST": "AKST", "SAST": "SAST", "HKST": "HKST", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "CLST": "CLST", "BOT": "BOT", "HADT": "HADT", "MYT": "MYT", "BT": "BT", "HEOG": "HEOG", "EDT": "EDT", "MDT": "MDT", "WAT": "WAT", "WIT": "WIT", "COT": "COT", "MEZ": "MEZ", "AWST": "AWST", "JDT": "JDT", "WESZ": "WESZ", "SGT": "SGT", "HNOG": "HNOG", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "COST": "COST", "NZDT": "NZDT", "WIB": "WIB", "AST": "AST", "ACWDT": "ACWDT", "WEZ": "WEZ", "OEZ": "OEZ", "HKT": "HKT", "CDT": "CDT", "JST": "JST", "MST": "MST", "EAT": "EAT", "HENOMX": "HENOMX", "LHDT": "LHDT", "UYT": "UYT", "ACWST": "ACWST", "CLT": "CLT", "AEDT": "AEDT", "TMT": "TMT", "ECT": "ECT", "GMT": "GMT", "ChST": "ChST", "SRT": "SRT", "CHAST": "CHAST", "VET": "VET", "WAST": "WAST", "HNT": "HNT", "HAT": "HAT", "HNCU": "HNCU", "GYT": "GYT", "EST": "EST", "HNEG": "HNEG", "AWDT": "AWDT", "AEST": "AEST", "WART": "WART", "CHADT": "CHADT", "HNPMX": "HNPMX", "ARST": "ARST"}, - } - } -  -@@ -122,7 +101,7 @@ func (ln *ln_CF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ln *ln_CF) MonthsAbbreviated() []string { -- return ln.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (ln *ln_CF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ln *ln_CF) MonthsNarrow() []string { -- return ln.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (ln *ln_CF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ln *ln_CF) MonthsWide() []string { -- return ln.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,42 +167,7 @@ func (ln *ln_CF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ln_CF' and handles both Whole and Real numbers based on 'v' - func (ln *ln_CF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ln_CF' and handles both Whole and Real numbers based on 'v' -@@ -237,56 +181,7 @@ func (ln *ln_CF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ln.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ln_CF' -@@ -295,63 +190,7 @@ func (ln *ln_CF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ln.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ln.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ln.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ln_CF' -@@ -359,17 +198,6 @@ func (ln *ln_CF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -378,17 +206,6 @@ func (ln *ln_CF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,17 +214,6 @@ func (ln *ln_CF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,19 +222,6 @@ func (ln *ln_CF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ln.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,19 +230,6 @@ func (ln *ln_CF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -458,26 +238,6 @@ func (ln *ln_CF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -486,30 +246,6 @@ func (ln *ln_CF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -518,34 +254,5 @@ func (ln *ln_CF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ln.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ln_CG/ln_CG.go b/ln_CG/ln_CG.go -index 20e3aeb..5ee317a 100644 ---- a/ln_CG/ln_CG.go -+++ b/ln_CG/ln_CG.go -@@ -10,66 +10,45 @@ import ( - ) -  - type ln_CG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ln_CG' locale - func New() locales.Translator { - return &ln_CG{ -- locale: "ln_CG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fbl", "msi", "apl", "mai", "yun", "yul", "agt", "stb", "ɔtb", "nvb", "dsb"}, -- monthsNarrow: []string{"", "y", "f", "m", "a", "m", "y", "y", "a", "s", "ɔ", "n", "d"}, -- monthsWide: []string{"", "sánzá ya yambo", "sánzá ya míbalé", "sánzá ya mísáto", "sánzá ya mínei", "sánzá ya mítáno", "sánzá ya motóbá", "sánzá ya nsambo", "sánzá ya mwambe", "sánzá ya libwa", "sánzá ya zómi", "sánzá ya zómi na mɔ̌kɔ́", "sánzá ya zómi na míbalé"}, -- daysAbbreviated: []string{"eye", "ybo", "mbl", "mst", "min", "mtn", "mps"}, -- daysNarrow: []string{"e", "y", "m", "m", "m", "m", "p"}, -- daysWide: []string{"eyenga", "mokɔlɔ mwa yambo", "mokɔlɔ mwa míbalé", "mokɔlɔ mwa mísáto", "mokɔlɔ ya mínéi", "mokɔlɔ ya mítáno", "mpɔ́sɔ"}, -- periodsAbbreviated: []string{"ntɔ́ngɔ́", "mpókwa"}, -- periodsWide: []string{"ntɔ́ngɔ́", "mpókwa"}, -- erasAbbreviated: []string{"libóso ya", "nsima ya Y"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Yambo ya Yézu Krís", "Nsima ya Yézu Krís"}, -- timezones: map[string]string{"HNEG": "HNEG", "COST": "COST", "BT": "BT", "HNOG": "HNOG", "CHADT": "CHADT", "AEDT": "AEDT", "CLST": "CLST", "WARST": "WARST", "SGT": "SGT", "GMT": "Ntángo ya Londoni", "HADT": "HADT", "WIT": "WIT", "NZDT": "NZDT", "OESZ": "OESZ", "HECU": "HECU", "AKST": "AKST", "AST": "AST", "HEOG": "HEOG", "LHST": "LHST", "LHDT": "LHDT", "HNCU": "HNCU", "HEPMX": "HEPMX", "WEZ": "WEZ", "GYT": "GYT", "WITA": "WITA", "ChST": "ChST", "SAST": "Ntángo ya Afríka ya Sidi", "COT": "COT", "ADT": "ADT", "WIB": "WIB", "AWDT": "AWDT", "CHAST": "CHAST", "ACDT": "ACDT", "WART": "WART", "EDT": "EDT", "HNT": "HNT", "NZST": "NZST", "CLT": "CLT", "WAT": "WAT", "OEZ": "OEZ", "∅∅∅": "∅∅∅", "HAST": "HAST", "ARST": "ARST", "ACST": "ACST", "CAT": "Ntángo ya Lubumbashi", "WESZ": "WESZ", "ART": "ART", "HKST": "HKST", "UYST": "UYST", "SRT": "SRT", "HNPM": "HNPM", "HNNOMX": "HNNOMX", "MDT": "MDT", "AKDT": "AKDT", "CDT": "CDT", "JDT": "JDT", "CST": "CST", "UYT": "UYT", "PDT": "PDT", "HKT": "HKT", "GFT": "GFT", "JST": "JST", "BOT": "BOT", "EAT": "Ntángo ya Afríka ya Ɛ́sita", "ECT": "ECT", "HAT": "HAT", "MEZ": "MEZ", "IST": "IST", "ACWST": "ACWST", "AEST": "AEST", "TMT": "TMT", "ACWDT": "ACWDT", "HEEG": "HEEG", "WAST": "WAST", "HENOMX": "HENOMX", "MST": "MST", "HNPMX": "HNPMX", "VET": "VET", "AWST": "AWST", "HEPM": "HEPM", "MESZ": "MESZ", "TMST": "TMST", "EST": "EST", "MYT": "MYT", "PST": "PST"}, -+ locale: "ln_CG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEOG": "HEOG", "CST": "CST", "NZDT": "NZDT", "ChST": "ChST", "PDT": "PDT", "HNCU": "HNCU", "AKDT": "AKDT", "WIT": "WIT", "MST": "MST", "BT": "BT", "OESZ": "OESZ", "TMST": "TMST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "HENOMX": "HENOMX", "WESZ": "WESZ", "COT": "COT", "COST": "COST", "CLT": "CLT", "HNNOMX": "HNNOMX", "UYT": "UYT", "WEZ": "WEZ", "WIB": "WIB", "SRT": "SRT", "HAST": "HAST", "LHDT": "LHDT", "AEDT": "AEDT", "HNPMX": "HNPMX", "TMT": "TMT", "CLST": "CLST", "PST": "PST", "ACWDT": "ACWDT", "GFT": "GFT", "HAT": "HAT", "WART": "WART", "SAST": "SAST", "HNT": "HNT", "AST": "AST", "ART": "ART", "MEZ": "MEZ", "HEEG": "HEEG", "JDT": "JDT", "IST": "IST", "EDT": "EDT", "ECT": "ECT", "ADT": "ADT", "EAT": "EAT", "HECU": "HECU", "WITA": "WITA", "CDT": "CDT", "LHST": "LHST", "AEST": "AEST", "CHADT": "CHADT", "HEPMX": "HEPMX", "HNOG": "HNOG", "GMT": "GMT", "ARST": "ARST", "VET": "VET", "MESZ": "MESZ", "ACDT": "ACDT", "HNPM": "HNPM", "SGT": "SGT", "WAT": "WAT", "NZST": "NZST", "BOT": "BOT", "AWDT": "AWDT", "ACWST": "ACWST", "GYT": "GYT", "HKST": "HKST", "CAT": "CAT", "HADT": "HADT", "ACST": "ACST", "JST": "JST", "WAST": "WAST", "AKST": "AKST", "HKT": "HKT", "MDT": "MDT", "MYT": "MYT", "HEPM": "HEPM", "WARST": "WARST", "EST": "EST", "AWST": "AWST", "CHAST": "CHAST", "UYST": "UYST", "OEZ": "OEZ"}, - } - } -  -@@ -122,7 +101,7 @@ func (ln *ln_CG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ln *ln_CG) MonthsAbbreviated() []string { -- return ln.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (ln *ln_CG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ln *ln_CG) MonthsNarrow() []string { -- return ln.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (ln *ln_CG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ln *ln_CG) MonthsWide() []string { -- return ln.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,42 +167,7 @@ func (ln *ln_CG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ln_CG' and handles both Whole and Real numbers based on 'v' - func (ln *ln_CG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ln_CG' and handles both Whole and Real numbers based on 'v' -@@ -237,56 +181,7 @@ func (ln *ln_CG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ln.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ln.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ln_CG' -@@ -295,63 +190,7 @@ func (ln *ln_CG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ln.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ln.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ln.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ln.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ln.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ln.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ln.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ln_CG' -@@ -359,17 +198,6 @@ func (ln *ln_CG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -378,17 +206,6 @@ func (ln *ln_CG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,17 +214,6 @@ func (ln *ln_CG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,19 +222,6 @@ func (ln *ln_CG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ln.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ln.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,19 +230,6 @@ func (ln *ln_CG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -458,26 +238,6 @@ func (ln *ln_CG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -486,30 +246,6 @@ func (ln *ln_CG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -518,34 +254,5 @@ func (ln *ln_CG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ln.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ln.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lo/lo.go b/lo/lo.go -index c5c0b64..f795b1b 100644 ---- a/lo/lo.go -+++ b/lo/lo.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ກ່ອນ ຄ.ສ.", "ຄ.ສ."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ກ່ອນຄຣິດສັກກະລາດ", "ຄຣິດສັກກະລາດ"}, -- timezones: map[string]string{"ACWDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bກາງ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HKT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຮອງ\u200bກົງ", "ChST": "ເວ\u200bລາ\u200bຈາ\u200bໂມ\u200bໂຣ", "COST": "ເວລາລະດູຮ້ອນໂຄລໍາເບຍ", "PST": "ເວລາມາດຕະຖານແປຊິຟິກ", "ACWST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານອອສ\u200bເຕຣ\u200bລຽນ\u200bກາງ\u200bຕາ\u200bເວັນ\u200bຕົກ", "CHADT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bຊາ\u200bທາມ", "BOT": "ເວ\u200bລາ\u200bໂບ\u200bລິ\u200bເວຍ", "GFT": "ເວ\u200bລາ\u200bເຟ\u200bຣນ\u200bຊ໌\u200bເກຍ\u200bນາ", "MST": "ເວລາມາດຕະຖານມາເກົາ", "HNOG": "ເວລາມາດຕະຖານກຣີນແລນຕາເວັນຕົກ", "NZDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bນິວ\u200bຊີ\u200bແລນ", "MYT": "ເວ\u200bລາ\u200bມາ\u200bເລ\u200bເຊຍ", "AKST": "ເວລາມາດຕະຖານອະແລສກາ", "SRT": "ເວ\u200bລາ\u200bຊຸ\u200bຣິ\u200bນາມ", "HAT": "ເວລາກາງເວັນນິວຟາວແລນ", "JDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bຍີ່\u200bປຸ່ນ", "HEEG": "ເວລາລະດູຮ້ອນກຣີນແລນຕາເວັນອອກ", "CDT": "ເວລາກາງເວັນກາງ", "HKST": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bຮອງ\u200bກົງ", "CLT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານຊິ\u200bລີ", "JST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຍີ່\u200bປຸ່ນ", "TMT": "ເວລາມາດຕະຖານຕວກເມນິສຖານ", "WIB": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bຕາ\u200bເວັນ\u200bຕົກ", "AWDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HNPM": "\u200bເວ\u200bລາມາດ\u200bຕະ\u200bຖານເຊນ\u200bປີ\u200bແອ ແລະ\u200bມິ\u200bກົວ\u200bລອນ", "HADT": "ເວລາຕອນທ່ຽງຮາວາຍ-ເອລູທຽນ", "AEST": "ເວ\u200bລາ\u200bມາດຕະຖານ\u200b\u200b\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bອອກ", "MEZ": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຢູ\u200bໂຣບກາງ", "ECT": "ເວ\u200bລາ\u200bເອ\u200bກົວ\u200bດໍ", "WARST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນເວ\u200bສ\u200bເທິນອາ\u200bເຈນ\u200bທິ\u200bນາ", "HECU": "ເວລາກາງເວັນຄິວບາ", "AKDT": "ເວລາກາງເວັນອະແລສກາ", "LHDT": "\u200bເວ\u200bລ\u200bສາ\u200bຕອນ\u200b\u200bທ່ຽງ\u200bລອດ\u200bເຮົາ\u200b", "ACDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bເລຍ\u200bກາງ", "HENOMX": "ເວລາກາງເວັນເມັກຊິກັນນອດເວສ", "HAST": "ເວລາມາດຕະຖານຮາວາຍ-ເອລູທຽນ", "BT": "ເວ\u200bລາ\u200bພູ\u200bຖານ", "HNEG": "ເວລາມາດຕະຖານຕາເວັນອອກກຣີນແລນ", "OEZ": "ເວ\u200bລາ\u200bມາ\u200bດ\u200bຕະ\u200bຖານ\u200bຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bອອກ", "HNCU": "ເວລາມາດຕະຖານຂອງຄິວບາ", "EDT": "ເວລາກາງເວັນຕາເວັນອອກ", "HNT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bນິວ\u200bຟາວ\u200bແລນ", "ART": "\u200bເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານອາ\u200bເຈນ\u200bທິ\u200bນາ", "WITA": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bກາງ", "ACST": "ເວ\u200bລາມາດ\u200bຕະ\u200bຖານອອ\u200bສ\u200bເຕຣ\u200bເລຍ\u200bກ\u200bາງ", "EST": "ເວລາມາດຕະຖານຕາເວັນອອກ", "HNPMX": "ເວລາມາດຕະຖານແປຊິຟິກເມັກຊິກັນ", "GYT": "ເວລາກາຍອານາ", "CHAST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຊາ\u200bທາມ", "UYT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bອູ\u200bຣູ\u200bກວຍ", "ADT": "ເວລາກາງເວັນຂອງອາແລນຕິກ", "AWST": "ເວ\u200bລາ\u200bມາ\u200bດ\u200bຕະ\u200bຖານອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bຕົກ", "MESZ": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bຢູ\u200bໂຣບ\u200bກາງ", "IST": "ເວລາ ອິນເດຍ", "CAT": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bກາງ", "WAST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HEOG": "ເວລາຕອນທ່ຽງກຣີນແລນຕາເວັນຕົກ", "AEDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bອອກ", "WESZ": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bຕົກ", "TMST": "ເວລາລະດູຮ້ອນຕວກເມນິສຖານ", "MDT": "ເວລາລະດູຮ້ອນມາເກົາ", "VET": "ເວ\u200bລາ\u200bເວ\u200bເນ\u200bຊູ\u200bເອ\u200bລາ", "WEZ": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bຕົກ", "EAT": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bອອກ", "COT": "ເວລາມາດຕະຖານໂຄລຳເບຍ", "PDT": "ເວລາກາງເວັນແປຊິຟິກ", "AST": "ເວລາມາດຕະຖານຂອງອາແລນຕິກ", "LHST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bລອດ\u200bເຮົາ", "∅∅∅": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bເປ\u200bຣູ", "WAT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bຕົກ", "WART": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານເວ\u200bສ\u200bເທິນອາ\u200bເຈນ\u200bທິ\u200bນາ", "SGT": "ເວ\u200bລາ\u200bສິງ\u200bກະ\u200bໂປ", "ARST": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອາ\u200bເຈນ\u200bທິ\u200bນາ", "GMT": "ເວ\u200bລາກຣີນ\u200bວິ\u200bຊ", "HEPMX": "ເວລາກາງເວັນແປຊິຟິກເມັກຊິກັນ", "UYST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອູ\u200bຣູ\u200bກວຍ", "CST": "ເວລາມາດຕະຖານກາງ", "NZST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານນິວ\u200bຊີ\u200bແລນ", "SAST": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bໃຕ້", "CLST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຊິ\u200bລີ", "OESZ": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bອອກ", "HNNOMX": "\u200bເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານນອດ\u200bເວ\u200bສ\u200bເມັກ\u200bຊິ\u200bໂກ", "WIT": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bຕາ\u200bເວັນ\u200bອອກ", "HEPM": "\u200bເວ\u200bລາຕອນ\u200bທ່ຽງເຊນ\u200bປີ\u200bແອ ແລະ\u200bມິ\u200bກົວ\u200bລອນ"}, -+ timezones: map[string]string{"HKST": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bຮອງ\u200bກົງ", "MDT": "ເວລາລະດູຮ້ອນມາເກົາ", "ADT": "ເວລາກາງເວັນຂອງອາແລນຕິກ", "CHADT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bຊາ\u200bທາມ", "COT": "ເວລາມາດຕະຖານໂຄລຳເບຍ", "AEDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bອອກ", "MEZ": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຢູ\u200bໂຣບກາງ", "HEPM": "\u200bເວ\u200bລາຕອນ\u200bທ່ຽງເຊນ\u200bປີ\u200bແອ ແລະ\u200bມິ\u200bກົວ\u200bລອນ", "CHAST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຊາ\u200bທາມ", "SGT": "ເວ\u200bລາ\u200bສິງ\u200bກະ\u200bໂປ", "SAST": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bໃຕ້", "CLST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຊິ\u200bລີ", "NZDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bນິວ\u200bຊີ\u200bແລນ", "GMT": "ເວ\u200bລາກຣີນ\u200bວິ\u200bຊ", "UYST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອູ\u200bຣູ\u200bກວຍ", "TMT": "ເວລາມາດຕະຖານຕວກເມນິສຖານ", "CLT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານຊິ\u200bລີ", "WIB": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HNEG": "ເວລາມາດຕະຖານຕາເວັນອອກກຣີນແລນ", "HNPM": "\u200bເວ\u200bລາມາດ\u200bຕະ\u200bຖານເຊນ\u200bປີ\u200bແອ ແລະ\u200bມິ\u200bກົວ\u200bລອນ", "JDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bຍີ່\u200bປຸ່ນ", "LHST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bລອດ\u200bເຮົາ", "PST": "ເວລາມາດຕະຖານແປຊິຟິກ", "EST": "ເວລາມາດຕະຖານຕາເວັນອອກ", "ChST": "ເວ\u200bລາ\u200bຈາ\u200bໂມ\u200bໂຣ", "HEEG": "ເວລາລະດູຮ້ອນກຣີນແລນຕາເວັນອອກ", "HNNOMX": "\u200bເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານນອດ\u200bເວ\u200bສ\u200bເມັກ\u200bຊິ\u200bໂກ", "VET": "ເວ\u200bລາ\u200bເວ\u200bເນ\u200bຊູ\u200bເອ\u200bລາ", "OESZ": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bອອກ", "HEOG": "ເວລາຕອນທ່ຽງກຣີນແລນຕາເວັນຕົກ", "GYT": "ເວລາກາຍອານາ", "TMST": "ເວລາລະດູຮ້ອນຕວກເມນິສຖານ", "CST": "ເວລາມາດຕະຖານກາງ", "ACWST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານອອສ\u200bເຕຣ\u200bລຽນ\u200bກາງ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HNT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bນິວ\u200bຟາວ\u200bແລນ", "CDT": "ເວລາກາງເວັນກາງ", "SRT": "ເວ\u200bລາ\u200bຊຸ\u200bຣິ\u200bນາມ", "MESZ": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bຢູ\u200bໂຣບ\u200bກາງ", "AWDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bຕົກ", "COST": "ເວລາລະດູຮ້ອນໂຄລໍາເບຍ", "HNOG": "ເວລາມາດຕະຖານກຣີນແລນຕາເວັນຕົກ", "ARST": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອາ\u200bເຈນ\u200bທິ\u200bນາ", "HEPMX": "ເວລາກາງເວັນແປຊິຟິກເມັກຊິກັນ", "WITA": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bກາງ", "MST": "ເວລາມາດຕະຖານມາເກົາ", "MYT": "ເວ\u200bລາ\u200bມາ\u200bເລ\u200bເຊຍ", "BT": "ເວ\u200bລາ\u200bພູ\u200bຖານ", "HAT": "ເວລາກາງເວັນນິວຟາວແລນ", "CAT": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bກາງ", "WAT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bຕົກ", "AKDT": "ເວລາກາງເວັນອະແລສກາ", "GFT": "ເວ\u200bລາ\u200bເຟ\u200bຣນ\u200bຊ໌\u200bເກຍ\u200bນາ", "UYT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bອູ\u200bຣູ\u200bກວຍ", "IST": "ເວລາ ອິນເດຍ", "AKST": "ເວລາມາດຕະຖານອະແລສກາ", "EDT": "ເວລາກາງເວັນຕາເວັນອອກ", "HKT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຮອງ\u200bກົງ", "HAST": "ເວລາມາດຕະຖານຮາວາຍ-ເອລູທຽນ", "AEST": "ເວ\u200bລາ\u200bມາດຕະຖານ\u200b\u200b\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bອອກ", "NZST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານນິວ\u200bຊີ\u200bແລນ", "ART": "\u200bເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານອາ\u200bເຈນ\u200bທິ\u200bນາ", "JST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຍີ່\u200bປຸ່ນ", "WIT": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bຕາ\u200bເວັນ\u200bອອກ", "WART": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານເວ\u200bສ\u200bເທິນອາ\u200bເຈນ\u200bທິ\u200bນາ", "WARST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນເວ\u200bສ\u200bເທິນອາ\u200bເຈນ\u200bທິ\u200bນາ", "AST": "ເວລາມາດຕະຖານຂອງອາແລນຕິກ", "BOT": "ເວ\u200bລາ\u200bໂບ\u200bລິ\u200bເວຍ", "EAT": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bອອກ", "WAST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bຕົກ", "AWST": "ເວ\u200bລາ\u200bມາ\u200bດ\u200bຕະ\u200bຖານອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HNPMX": "ເວລາມາດຕະຖານແປຊິຟິກເມັກຊິກັນ", "WEZ": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bຕົກ", "WESZ": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HADT": "ເວລາຕອນທ່ຽງຮາວາຍ-ເອລູທຽນ", "HENOMX": "ເວລາກາງເວັນເມັກຊິກັນນອດເວສ", "ACST": "ເວ\u200bລາມາດ\u200bຕະ\u200bຖານອອ\u200bສ\u200bເຕຣ\u200bເລຍ\u200bກ\u200bາງ", "ACDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bເລຍ\u200bກາງ", "ECT": "ເວ\u200bລາ\u200bເອ\u200bກົວ\u200bດໍ", "LHDT": "\u200bເວ\u200bລ\u200bສາ\u200bຕອນ\u200b\u200bທ່ຽງ\u200bລອດ\u200bເຮົາ\u200b", "ACWDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bກາງ\u200bຕາ\u200bເວັນ\u200bຕົກ", "OEZ": "ເວ\u200bລາ\u200bມາ\u200bດ\u200bຕະ\u200bຖານ\u200bຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bອອກ", "∅∅∅": "ເວລາຕາມເຂດລະດູຮ້ອນຕາມເຂດບຣາຊີເລຍ", "PDT": "ເວລາກາງເວັນແປຊິຟິກ", "HNCU": "ເວລາມາດຕະຖານຂອງຄິວບາ", "HECU": "ເວລາກາງເວັນຄິວບາ"}, - } - } -  -diff --git a/lo_LA/lo_LA.go b/lo_LA/lo_LA.go -index 4166b77..d66e86a 100644 ---- a/lo_LA/lo_LA.go -+++ b/lo_LA/lo_LA.go -@@ -10,66 +10,45 @@ import ( - ) -  - type lo_LA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lo_LA' locale - func New() locales.Translator { - return &lo_LA{ -- locale: "lo_LA", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "-", -- monthsAbbreviated: []string{"", "ມ.ກ.", "ກ.ພ.", "ມ.ນ.", "ມ.ສ.", "ພ.ພ.", "ມິ.ຖ.", "ກ.ລ.", "ສ.ຫ.", "ກ.ຍ.", "ຕ.ລ.", "ພ.ຈ.", "ທ.ວ."}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "ມັງກອນ", "ກຸມພາ", "ມີນາ", "ເມສາ", "ພຶດສະພາ", "ມິຖຸນາ", "ກໍລະກົດ", "ສິງຫາ", "ກັນຍາ", "ຕຸລາ", "ພະຈິກ", "ທັນວາ"}, -- daysAbbreviated: []string{"ອາທິດ", "ຈັນ", "ອັງຄານ", "ພຸດ", "ພະຫັດ", "ສຸກ", "ເສົາ"}, -- daysNarrow: []string{"ອາ", "ຈ", "ອ", "ພ", "ພຫ", "ສຸ", "ສ"}, -- daysShort: []string{"ອາ.", "ຈ.", "ອ.", "ພ.", "ພຫ.", "ສຸ.", "ສ."}, -- daysWide: []string{"ວັນອາທິດ", "ວັນຈັນ", "ວັນອັງຄານ", "ວັນພຸດ", "ວັນພະຫັດ", "ວັນສຸກ", "ວັນເສົາ"}, -- periodsAbbreviated: []string{"ກ່ອນທ່ຽງ", "ຫຼັງທ່ຽງ"}, -- periodsNarrow: []string{"ກທ", "ຫຼທ"}, -- periodsWide: []string{"ກ່ອນທ່ຽງ", "ຫຼັງທ່ຽງ"}, -- erasAbbreviated: []string{"ກ່ອນ ຄ.ສ.", "ຄ.ສ."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ກ່ອນຄຣິດສັກກະລາດ", "ຄຣິດສັກກະລາດ"}, -- timezones: map[string]string{"IST": "ເວລາ ອິນເດຍ", "BOT": "ເວ\u200bລາ\u200bໂບ\u200bລິ\u200bເວຍ", "WAST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bຕົກ", "MYT": "ເວ\u200bລາ\u200bມາ\u200bເລ\u200bເຊຍ", "ART": "\u200bເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານອາ\u200bເຈນ\u200bທິ\u200bນາ", "PDT": "ເວລາກາງເວັນແປຊິຟິກ", "TMST": "ເວລາລະດູຮ້ອນຕວກເມນິສຖານ", "WAT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bຕົກ", "WARST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນເວ\u200bສ\u200bເທິນອາ\u200bເຈນ\u200bທິ\u200bນາ", "HAT": "ເວລາກາງເວັນນິວຟາວແລນ", "CLT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານຊິ\u200bລີ", "UYT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bອູ\u200bຣູ\u200bກວຍ", "AEDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bອອກ", "HKST": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bຮອງ\u200bກົງ", "MEZ": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຢູ\u200bໂຣບກາງ", "COT": "ເວລາມາດຕະຖານໂຄລຳເບຍ", "AKDT": "ເວລາກາງເວັນອະແລສກາ", "UYST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອູ\u200bຣູ\u200bກວຍ", "AKST": "ເວລາມາດຕະຖານອະແລສກາ", "SRT": "ເວ\u200bລາ\u200bຊຸ\u200bຣິ\u200bນາມ", "HNT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bນິວ\u200bຟາວ\u200bແລນ", "LHST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bລອດ\u200bເຮົາ", "SGT": "ເວ\u200bລາ\u200bສິງ\u200bກະ\u200bໂປ", "HNPMX": "ເວລາມາດຕະຖານແປຊິຟິກເມັກຊິກັນ", "AWDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bຕົກ", "CHADT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bຊາ\u200bທາມ", "NZST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານນິວ\u200bຊີ\u200bແລນ", "OEZ": "ເວ\u200bລາ\u200bມາ\u200bດ\u200bຕະ\u200bຖານ\u200bຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bອອກ", "WART": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານເວ\u200bສ\u200bເທິນອາ\u200bເຈນ\u200bທິ\u200bນາ", "CDT": "ເວລາກາງເວັນກາງ", "HNOG": "ເວລາມາດຕະຖານກຣີນແລນຕາເວັນຕົກ", "WEZ": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bຕົກ", "AEST": "ເວ\u200bລາ\u200bມາດຕະຖານ\u200b\u200b\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bອອກ", "HEPM": "\u200bເວ\u200bລາຕອນ\u200bທ່ຽງເຊນ\u200bປີ\u200bແອ ແລະ\u200bມິ\u200bກົວ\u200bລອນ", "JST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຍີ່\u200bປຸ່ນ", "∅∅∅": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນອາ\u200bເມ\u200bຊອນ", "COST": "ເວລາລະດູຮ້ອນໂຄລໍາເບຍ", "MST": "ເວລາມາດຕະຖານມາເກົາ", "HNCU": "ເວລາມາດຕະຖານຂອງຄິວບາ", "MESZ": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bຢູ\u200bໂຣບ\u200bກາງ", "JDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bຍີ່\u200bປຸ່ນ", "ACDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bເລຍ\u200bກາງ", "EAT": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bຕາ\u200bເວັນ\u200bອອກ", "GYT": "ເວລາກາຍອານາ", "EDT": "ເວລາກາງເວັນຕາເວັນອອກ", "ACWDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bອອສ\u200bເຕຣ\u200bລຽນ\u200bກາງ\u200bຕາ\u200bເວັນ\u200bຕົກ", "ECT": "ເວ\u200bລາ\u200bເອ\u200bກົວ\u200bດໍ", "GMT": "ເວ\u200bລາກຣີນ\u200bວິ\u200bຊ", "EST": "ເວລາມາດຕະຖານຕາເວັນອອກ", "PST": "ເວລາມາດຕະຖານແປຊິຟິກ", "WESZ": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bຕົກ", "CLST": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຊິ\u200bລີ", "HEOG": "ເວລາຕອນທ່ຽງກຣີນແລນຕາເວັນຕົກ", "AST": "ເວລາມາດຕະຖານຂອງອາແລນຕິກ", "HADT": "ເວລາຕອນທ່ຽງຮາວາຍ-ເອລູທຽນ", "SAST": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bໃຕ້", "CST": "ເວລາມາດຕະຖານກາງ", "HNEG": "ເວລາມາດຕະຖານຕາເວັນອອກກຣີນແລນ", "CAT": "ເວ\u200bລາ\u200bອາ\u200bຟຣິ\u200bກາ\u200bກາງ", "HECU": "ເວລາກາງເວັນຄິວບາ", "ACWST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານອອສ\u200bເຕຣ\u200bລຽນ\u200bກາງ\u200bຕາ\u200bເວັນ\u200bຕົກ", "WITA": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bກາງ", "HNPM": "\u200bເວ\u200bລາມາດ\u200bຕະ\u200bຖານເຊນ\u200bປີ\u200bແອ ແລະ\u200bມິ\u200bກົວ\u200bລອນ", "ChST": "ເວ\u200bລາ\u200bຈາ\u200bໂມ\u200bໂຣ", "HNNOMX": "\u200bເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານນອດ\u200bເວ\u200bສ\u200bເມັກ\u200bຊິ\u200bໂກ", "VET": "ເວ\u200bລາ\u200bເວ\u200bເນ\u200bຊູ\u200bເອ\u200bລາ", "WIB": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bຕາ\u200bເວັນ\u200bຕົກ", "HAST": "ເວລາມາດຕະຖານຮາວາຍ-ເອລູທຽນ", "HKT": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຮອງ\u200bກົງ", "HEEG": "ເວລາລະດູຮ້ອນກຣີນແລນຕາເວັນອອກ", "ACST": "ເວ\u200bລາມາດ\u200bຕະ\u200bຖານອອ\u200bສ\u200bເຕຣ\u200bເລຍ\u200bກ\u200bາງ", "ADT": "ເວລາກາງເວັນຂອງອາແລນຕິກ", "WIT": "ເວ\u200bລາ\u200bອິນ\u200bໂດ\u200bເນ\u200bເຊຍ\u200bຕາ\u200bເວັນ\u200bອອກ", "BT": "ເວ\u200bລາ\u200bພູ\u200bຖານ", "AWST": "ເວ\u200bລາ\u200bມາ\u200bດ\u200bຕະ\u200bຖານອອສ\u200bເຕຣ\u200bລຽນ\u200bຕາ\u200bເວັນ\u200bຕົກ", "NZDT": "ເວ\u200bລາ\u200bຕອນ\u200bທ່ຽງ\u200bນິວ\u200bຊີ\u200bແລນ", "TMT": "ເວລາມາດຕະຖານຕວກເມນິສຖານ", "OESZ": "ເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນຢູ\u200bໂຣບ\u200bຕາ\u200bເວັນ\u200bອອກ", "MDT": "ເວລາລະດູຮ້ອນມາເກົາ", "ARST": "\u200bເວ\u200bລາ\u200bລະ\u200bດູ\u200bຮ້ອນ\u200bອາ\u200bເຈນ\u200bທິ\u200bນາ", "CHAST": "ເວ\u200bລາ\u200bມາດ\u200bຕະ\u200bຖານ\u200bຊາ\u200bທາມ", "LHDT": "\u200bເວ\u200bລ\u200bສາ\u200bຕອນ\u200b\u200bທ່ຽງ\u200bລອດ\u200bເຮົາ\u200b", "GFT": "ເວ\u200bລາ\u200bເຟ\u200bຣນ\u200bຊ໌\u200bເກຍ\u200bນາ", "HENOMX": "ເວລາກາງເວັນເມັກຊິກັນນອດເວສ", "HEPMX": "ເວລາກາງເວັນແປຊິຟິກເມັກຊິກັນ"}, -+ locale: "lo_LA", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "CAT": "CAT", "CLST": "CLST", "NZDT": "NZDT", "WEZ": "WEZ", "HECU": "HECU", "WAT": "WAT", "ChST": "ChST", "MEZ": "MEZ", "LHST": "LHST", "IST": "IST", "CHAST": "CHAST", "AEDT": "AEDT", "HNOG": "HNOG", "HEOG": "HEOG", "CLT": "CLT", "ECT": "ECT", "EAT": "EAT", "ACWDT": "ACWDT", "VET": "VET", "GFT": "GFT", "ART": "ART", "LHDT": "LHDT", "PDT": "PDT", "BT": "BT", "ACWST": "ACWST", "HEEG": "HEEG", "HEPM": "HEPM", "HAT": "HAT", "SAST": "SAST", "EDT": "EDT", "HKST": "HKST", "WITA": "WITA", "ARST": "ARST", "HENOMX": "HENOMX", "CHADT": "CHADT", "HEPMX": "HEPMX", "AWDT": "AWDT", "MYT": "MYT", "UYST": "UYST", "PST": "PST", "HNT": "HNT", "COST": "COST", "TMST": "TMST", "HAST": "HAST", "ACDT": "ACDT", "JST": "JST", "SGT": "SGT", "HNCU": "HNCU", "WAST": "WAST", "AKDT": "AKDT", "GYT": "GYT", "COT": "COT", "MDT": "MDT", "GMT": "GMT", "AKST": "AKST", "WART": "WART", "UYT": "UYT", "OESZ": "OESZ", "MST": "MST", "BOT": "BOT", "ACST": "ACST", "JDT": "JDT", "EST": "EST", "AEST": "AEST", "HNPMX": "HNPMX", "OEZ": "OEZ", "WIT": "WIT", "SRT": "SRT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "HKT": "HKT", "AST": "AST", "HADT": "HADT", "HNPM": "HNPM", "CST": "CST", "WIB": "WIB", "WARST": "WARST", "CDT": "CDT", "NZST": "NZST", "ADT": "ADT", "HNEG": "HNEG", "AWST": "AWST"}, - } - } -  -@@ -122,7 +101,7 @@ func (lo *lo_LA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lo *lo_LA) MonthsAbbreviated() []string { -- return lo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (lo *lo_LA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lo *lo_LA) MonthsNarrow() []string { -- return lo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (lo *lo_LA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lo *lo_LA) MonthsWide() []string { -- return lo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,32 +173,7 @@ func (lo *lo_LA) FmtNumber(num float64, v uint64) string { - // FmtPercent returns 'num' with digits/precision of 'v' for 'lo_LA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (lo *lo_LA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lo_LA' -@@ -227,56 +181,7 @@ func (lo *lo_LA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lo.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, lo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lo_LA' -@@ -285,64 +190,7 @@ func (lo *lo_LA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lo.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, lo.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lo_LA' -@@ -350,17 +198,6 @@ func (lo *lo_LA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -369,17 +206,6 @@ func (lo *lo_LA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -388,17 +214,6 @@ func (lo *lo_LA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -407,27 +222,6 @@ func (lo *lo_LA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20, 0xe0, 0xba, 0x97, 0xe0, 0xba, 0xb5, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() < 0 { -- b = append(b, lo.erasWide[0]...) -- } else { -- b = append(b, lo.erasWide[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -436,15 +230,6 @@ func (lo *lo_LA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -453,22 +238,6 @@ func (lo *lo_LA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -477,21 +246,6 @@ func (lo *lo_LA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xbb, 0x82, 0xe0, 0xba, 0xa1, 0xe0, 0xba, 0x87, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xba, 0x99, 0xe0, 0xba, 0xb2, 0xe0, 0xba, 0x97, 0xe0, 0xba, 0xb5, 0x20}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xba, 0xa7, 0xe0, 0xba, 0xb4, 0xe0, 0xba, 0x99, 0xe0, 0xba, 0xb2, 0xe0, 0xba, 0x97, 0xe0, 0xba, 0xb5, 0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -500,25 +254,5 @@ func (lo *lo_LA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xbb, 0x82, 0xe0, 0xba, 0xa1, 0xe0, 0xba, 0x87, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xba, 0x99, 0xe0, 0xba, 0xb2, 0xe0, 0xba, 0x97, 0xe0, 0xba, 0xb5, 0x20}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xba, 0xa7, 0xe0, 0xba, 0xb4, 0xe0, 0xba, 0x99, 0xe0, 0xba, 0xb2, 0xe0, 0xba, 0x97, 0xe0, 0xba, 0xb5, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lrc/lrc.go b/lrc/lrc.go -index 6d89c6e..2118852 100644 ---- a/lrc/lrc.go -+++ b/lrc/lrc.go -@@ -64,7 +64,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"HKST": "HKST", "GFT": "GFT", "HAT": "HAT", "HEOG": "HEOG", "AWDT": "AWDT", "WIB": "WIB", "WESZ": "WESZ", "AEST": "AEST", "TMST": "TMST", "ACST": "ACST", "EAT": "EAT", "SGT": "SGT", "WART": "WART", "HEPMX": "HEPMX", "HEEG": "HEEG", "CDT": "روٙشنایی نئهادار روٙز", "SAST": "SAST", "CLST": "CLST", "EST": "EST", "WEZ": "WEZ", "CHAST": "CHAST", "IST": "IST", "GYT": "GYT", "SRT": "SRT", "AWST": "AWST", "MEZ": "MEZ", "HNEG": "HNEG", "TMT": "TMT", "MST": "MST", "AKDT": "AKDT", "CST": "گاٛت مینجاٛیی ئستاٛنداٛرد", "HADT": "HADT", "HNT": "HNT", "NZST": "NZST", "ACDT": "ACDT", "CAT": "CAT", "COT": "COT", "UYT": "UYT", "ARST": "ARST", "AEDT": "AEDT", "NZDT": "NZDT", "BOT": "BOT", "WAST": "WAST", "OEZ": "OEZ", "ADT": "ADT", "WAT": "WAT", "ACWDT": "ACWDT", "LHDT": "LHDT", "HECU": "HECU", "UYST": "UYST", "ART": "ART", "MESZ": "MESZ", "HNPMX": "HNPMX", "HNOG": "HNOG", "JST": "JST", "JDT": "JDT", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "ECT": "ECT", "COST": "COST", "HNCU": "HNCU", "PST": "PST", "HKT": "HKT", "CHADT": "CHADT", "HEPM": "HEPM", "HENOMX": "HENOMX", "VET": "VET", "ACWST": "ACWST", "WITA": "WITA", "PDT": "PDT", "WARST": "WARST", "HNNOMX": "HNNOMX", "MDT": "MDT", "HAST": "HAST", "WIT": "WIT", "HNPM": "HNPM", "LHST": "LHST", "CLT": "CLT", "ChST": "ChST", "EDT": "EDT", "MYT": "MYT", "AKST": "AKST", "GMT": "GMT", "AST": "AST", "BT": "BT"}, -+ timezones: map[string]string{"NZST": "NZST", "ChST": "ChST", "HEPM": "HEPM", "PDT": "PDT", "BT": "BT", "HNCU": "HNCU", "HNOG": "HNOG", "ART": "ART", "EAT": "EAT", "OEZ": "OEZ", "HNT": "HNT", "WARST": "WARST", "CAT": "CAT", "WIB": "WIB", "JDT": "JDT", "EDT": "EDT", "SRT": "SRT", "AEDT": "AEDT", "VET": "VET", "COST": "COST", "AST": "AST", "BOT": "BOT", "HENOMX": "HENOMX", "LHST": "LHST", "JST": "JST", "HAT": "HAT", "CDT": "روٙشنایی نئهادار روٙز", "HNNOMX": "HNNOMX", "UYST": "UYST", "WEZ": "WEZ", "HECU": "HECU", "TMT": "TMT", "CLST": "CLST", "MST": "MST", "ACWDT": "ACWDT", "UYT": "UYT", "COT": "COT", "EST": "EST", "TMST": "TMST", "HAST": "HAST", "MESZ": "MESZ", "IST": "IST", "HNPMX": "HNPMX", "WAST": "WAST", "AKST": "AKST", "WIT": "WIT", "ECT": "ECT", "MEZ": "MEZ", "AKDT": "AKDT", "SAST": "SAST", "GYT": "GYT", "AWST": "AWST", "MYT": "MYT", "PST": "PST", "AEST": "AEST", "CHAST": "CHAST", "SGT": "SGT", "CST": "گاٛت مینجاٛیی ئستاٛنداٛرد", "GMT": "GMT", "ARST": "ARST", "AWDT": "AWDT", "ADT": "ADT", "HADT": "HADT", "ACST": "ACST", "HNPM": "HNPM", "CHADT": "CHADT", "WART": "WART", "CLT": "CLT", "WITA": "WITA", "ACDT": "ACDT", "HNEG": "HNEG", "LHDT": "LHDT", "OESZ": "OESZ", "GFT": "GFT", "∅∅∅": "∅∅∅", "HKT": "HKT", "HKST": "HKST", "MDT": "MDT", "HEEG": "HEEG", "ACWST": "ACWST", "WESZ": "WESZ", "HEOG": "HEOG", "NZDT": "NZDT", "HEPMX": "HEPMX", "WAT": "WAT"}, - } - } -  -diff --git a/lrc_IQ/lrc_IQ.go b/lrc_IQ/lrc_IQ.go -index ba74692..68e5a8e 100644 ---- a/lrc_IQ/lrc_IQ.go -+++ b/lrc_IQ/lrc_IQ.go -@@ -10,61 +10,45 @@ import ( - ) -  - type lrc_IQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lrc_IQ' locale - func New() locales.Translator { - return &lrc_IQ{ -- locale: "lrc_IQ", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "جانڤیە", "فئڤریە", "مارس", "آڤریل", "مئی", "جوٙأن", "جوٙلا", "آگوست", "سئپتامر", "ئوکتوڤر", "نوڤامر", "دئسامر"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "جانڤیە", "فئڤریە", "مارس", "آڤریل", "مئی", "جوٙأن", "جوٙلا", "آگوست", "سئپتامر", "ئوکتوڤر", "نوڤامر", "دئسامر"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"TMT": "TMT", "HNCU": "HNCU", "HNT": "HNT", "PDT": "PDT", "NZST": "NZST", "HNEG": "HNEG", "VET": "VET", "HAT": "HAT", "HKT": "HKT", "ACDT": "ACDT", "COT": "COT", "GMT": "GMT", "AST": "AST", "ADT": "ADT", "AKST": "AKST", "ART": "ART", "WITA": "WITA", "AWST": "AWST", "MDT": "MDT", "HNPMX": "HNPMX", "UYST": "UYST", "AKDT": "AKDT", "HAST": "HAST", "ARST": "ARST", "AEST": "AEST", "CHADT": "CHADT", "ACST": "ACST", "COST": "COST", "EST": "EST", "BT": "BT", "SRT": "SRT", "MEZ": "MEZ", "IST": "IST", "CLT": "CLT", "GFT": "GFT", "WAST": "WAST", "WIB": "WIB", "WIT": "WIT", "HNPM": "HNPM", "HADT": "HADT", "ACWDT": "ACWDT", "LHDT": "LHDT", "JST": "JST", "∅∅∅": "∅∅∅", "BOT": "BOT", "ECT": "ECT", "WARST": "WARST", "SGT": "SGT", "HEPMX": "HEPMX", "NZDT": "NZDT", "TMST": "TMST", "ChST": "ChST", "OESZ": "OESZ", "PST": "PST", "ACWST": "ACWST", "CHAST": "CHAST", "OEZ": "OEZ", "CAT": "CAT", "HENOMX": "HENOMX", "AEDT": "AEDT", "SAST": "SAST", "EAT": "EAT", "HNNOMX": "HNNOMX", "CST": "گاٛت مینجاٛیی ئستاٛنداٛرد", "UYT": "UYT", "HEOG": "HEOG", "HEPM": "HEPM", "HECU": "HECU", "MYT": "MYT", "AWDT": "AWDT", "HKST": "HKST", "EDT": "EDT", "MST": "MST", "WESZ": "WESZ", "MESZ": "MESZ", "GYT": "GYT", "HNOG": "HNOG", "WEZ": "WEZ", "LHST": "LHST", "JDT": "JDT", "CLST": "CLST", "HEEG": "HEEG", "WAT": "WAT", "WART": "WART", "CDT": "روٙشنایی نئهادار روٙز"}, -+ locale: "lrc_IQ", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PDT": "PDT", "UYST": "UYST", "GYT": "GYT", "HNOG": "HNOG", "HEOG": "HEOG", "CDT": "CDT", "ARST": "ARST", "BT": "BT", "CHADT": "CHADT", "WESZ": "WESZ", "HEPMX": "HEPMX", "WAST": "WAST", "EST": "EST", "ACST": "ACST", "SGT": "SGT", "HNCU": "HNCU", "AWDT": "AWDT", "COT": "COT", "CLT": "CLT", "CLST": "CLST", "WARST": "WARST", "GMT": "GMT", "MYT": "MYT", "JST": "JST", "ACWDT": "ACWDT", "UYT": "UYT", "WAT": "WAT", "OESZ": "OESZ", "EDT": "EDT", "TMT": "TMT", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "HECU": "HECU", "HNPMX": "HNPMX", "AKDT": "AKDT", "TMST": "TMST", "ART": "ART", "SRT": "SRT", "EAT": "EAT", "WEZ": "WEZ", "AKST": "AKST", "HKST": "HKST", "AEDT": "AEDT", "SAST": "SAST", "CAT": "CAT", "ECT": "ECT", "HADT": "HADT", "IST": "IST", "PST": "PST", "OEZ": "OEZ", "WIB": "WIB", "AST": "AST", "JDT": "JDT", "ACWST": "ACWST", "HNT": "HNT", "HEEG": "HEEG", "BOT": "BOT", "HAT": "HAT", "MST": "MST", "NZST": "NZST", "LHDT": "LHDT", "VET": "VET", "CST": "CST", "NZDT": "NZDT", "ADT": "ADT", "MESZ": "MESZ", "HNEG": "HNEG", "AWST": "AWST", "HNPM": "HNPM", "GFT": "GFT", "WART": "WART", "COST": "COST", "HKT": "HKT", "ChST": "ChST", "HAST": "HAST", "MEZ": "MEZ", "ACDT": "ACDT", "LHST": "LHST", "HEPM": "HEPM", "WIT": "WIT", "WITA": "WITA", "MDT": "MDT", "HENOMX": "HENOMX", "AEST": "AEST", "∅∅∅": "∅∅∅"}, - } - } -  -@@ -110,7 +94,7 @@ func (lrc *lrc_IQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lrc *lrc_IQ) MonthsAbbreviated() []string { -- return lrc.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -120,7 +104,7 @@ func (lrc *lrc_IQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lrc *lrc_IQ) MonthsNarrow() []string { -- return lrc.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -130,7 +114,7 @@ func (lrc *lrc_IQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lrc *lrc_IQ) MonthsWide() []string { -- return lrc.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -176,73 +160,13 @@ func (lrc *lrc_IQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'lrc_IQ' and handles both Whole and Real numbers based on 'v' - func (lrc *lrc_IQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lrc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lrc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'lrc_IQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (lrc *lrc_IQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lrc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lrc.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lrc_IQ' -@@ -250,60 +174,7 @@ func (lrc *lrc_IQ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lrc.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lrc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lrc.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lrc.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, lrc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lrc.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lrc_IQ' -@@ -312,72 +183,7 @@ func (lrc *lrc_IQ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lrc.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lrc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lrc.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, lrc.currencyNegativePrefix[j]) -- } -- -- b = append(b, lrc.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lrc.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lrc.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lrc.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lrc_IQ' -@@ -385,28 +191,6 @@ func (lrc *lrc_IQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -415,17 +199,6 @@ func (lrc *lrc_IQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, lrc.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -434,17 +207,6 @@ func (lrc *lrc_IQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, lrc.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -453,19 +215,6 @@ func (lrc *lrc_IQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, lrc.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, lrc.daysWide[t.Weekday()]...) -- - return string(b) - } -  -diff --git a/lrc_IR/lrc_IR.go b/lrc_IR/lrc_IR.go -index 23175ae..11adce4 100644 ---- a/lrc_IR/lrc_IR.go -+++ b/lrc_IR/lrc_IR.go -@@ -10,61 +10,45 @@ import ( - ) -  - type lrc_IR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lrc_IR' locale - func New() locales.Translator { - return &lrc_IR{ -- locale: "lrc_IR", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "جانڤیە", "فئڤریە", "مارس", "آڤریل", "مئی", "جوٙأن", "جوٙلا", "آگوست", "سئپتامر", "ئوکتوڤر", "نوڤامر", "دئسامر"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "جانڤیە", "فئڤریە", "مارس", "آڤریل", "مئی", "جوٙأن", "جوٙلا", "آگوست", "سئپتامر", "ئوکتوڤر", "نوڤامر", "دئسامر"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CLST": "CLST", "ChST": "ChST", "OEZ": "OEZ", "SGT": "SGT", "CDT": "روٙشنایی نئهادار روٙز", "MEZ": "MEZ", "WAT": "WAT", "WARST": "WARST", "GMT": "GMT", "HNPMX": "HNPMX", "AKDT": "AKDT", "CHAST": "CHAST", "EAT": "EAT", "WAST": "WAST", "WESZ": "WESZ", "HEOG": "HEOG", "HKST": "HKST", "MESZ": "MESZ", "NZDT": "NZDT", "WART": "WART", "WEZ": "WEZ", "CLT": "CLT", "∅∅∅": "∅∅∅", "JST": "JST", "TMST": "TMST", "COT": "COT", "COST": "COST", "HNNOMX": "HNNOMX", "MDT": "MDT", "SAST": "SAST", "EST": "EST", "AWDT": "AWDT", "HNPM": "HNPM", "BOT": "BOT", "HEEG": "HEEG", "GFT": "GFT", "ACST": "ACST", "ECT": "ECT", "GYT": "GYT", "ART": "ART", "AKST": "AKST", "ACWST": "ACWST", "AWST": "AWST", "MST": "MST", "UYT": "UYT", "BT": "BT", "ACWDT": "ACWDT", "HNOG": "HNOG", "IST": "IST", "UYST": "UYST", "MYT": "MYT", "HADT": "HADT", "HKT": "HKT", "CHADT": "CHADT", "HNEG": "HNEG", "VET": "VET", "WITA": "WITA", "HENOMX": "HENOMX", "AST": "AST", "PST": "PST", "LHDT": "LHDT", "JDT": "JDT", "HECU": "HECU", "HAST": "HAST", "PDT": "PDT", "ARST": "ARST", "AEDT": "AEDT", "ACDT": "ACDT", "CAT": "CAT", "CST": "گاٛت مینجاٛیی ئستاٛنداٛرد", "WIT": "WIT", "HAT": "HAT", "AEST": "AEST", "NZST": "NZST", "TMT": "TMT", "OESZ": "OESZ", "EDT": "EDT", "HEPMX": "HEPMX", "WIB": "WIB", "SRT": "SRT", "HNT": "HNT", "LHST": "LHST", "HNCU": "HNCU", "ADT": "ADT", "HEPM": "HEPM"}, -+ locale: "lrc_IR", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "HNPM": "HNPM", "WEZ": "WEZ", "SAST": "SAST", "ARST": "ARST", "GMT": "GMT", "HENOMX": "HENOMX", "PDT": "PDT", "HNCU": "HNCU", "WESZ": "WESZ", "HAT": "HAT", "WARST": "WARST", "CLT": "CLT", "WIB": "WIB", "ART": "ART", "JST": "JST", "CST": "CST", "SRT": "SRT", "JDT": "JDT", "MYT": "MYT", "UYST": "UYST", "SGT": "SGT", "GYT": "GYT", "ACST": "ACST", "AWST": "AWST", "IST": "IST", "AST": "AST", "ADT": "ADT", "HAST": "HAST", "VET": "VET", "WAT": "WAT", "LHST": "LHST", "AEST": "AEST", "AEDT": "AEDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "ECT": "ECT", "BOT": "BOT", "OESZ": "OESZ", "COT": "COT", "EST": "EST", "MDT": "MDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "CLST": "CLST", "MST": "MST", "NZST": "NZST", "EAT": "EAT", "ACDT": "ACDT", "HECU": "HECU", "MESZ": "MESZ", "AWDT": "AWDT", "ACWST": "ACWST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "WITA": "WITA", "NZDT": "NZDT", "ChST": "ChST", "HNNOMX": "HNNOMX", "HEEG": "HEEG", "WAST": "WAST", "AKST": "AKST", "GFT": "GFT", "BT": "BT", "HEOG": "HEOG", "HKT": "HKT", "MEZ": "MEZ", "LHDT": "LHDT", "CHADT": "CHADT", "HNT": "HNT", "WIT": "WIT", "EDT": "EDT", "TMT": "TMT", "CDT": "CDT", "UYT": "UYT", "WART": "WART", "TMST": "TMST", "HNEG": "HNEG", "HEPM": "HEPM", "PST": "PST", "AKDT": "AKDT", "OEZ": "OEZ", "COST": "COST", "HKST": "HKST", "CAT": "CAT"}, - } - } -  -@@ -110,7 +94,7 @@ func (lrc *lrc_IR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lrc *lrc_IR) MonthsAbbreviated() []string { -- return lrc.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -120,7 +104,7 @@ func (lrc *lrc_IR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lrc *lrc_IR) MonthsNarrow() []string { -- return lrc.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -130,7 +114,7 @@ func (lrc *lrc_IR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lrc *lrc_IR) MonthsWide() []string { -- return lrc.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -176,73 +160,13 @@ func (lrc *lrc_IR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'lrc_IR' and handles both Whole and Real numbers based on 'v' - func (lrc *lrc_IR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lrc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lrc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'lrc_IR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (lrc *lrc_IR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lrc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lrc.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lrc_IR' -@@ -250,60 +174,7 @@ func (lrc *lrc_IR) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lrc.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lrc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lrc.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lrc.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, lrc.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lrc.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lrc_IR' -@@ -312,72 +183,7 @@ func (lrc *lrc_IR) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lrc.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lrc.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lrc.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lrc.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, lrc.currencyNegativePrefix[j]) -- } -- -- b = append(b, lrc.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(lrc.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, lrc.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lrc.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lrc_IR' -@@ -385,28 +191,6 @@ func (lrc *lrc_IR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -415,17 +199,6 @@ func (lrc *lrc_IR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, lrc.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -434,17 +207,6 @@ func (lrc *lrc_IR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, lrc.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -453,19 +215,6 @@ func (lrc *lrc_IR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, lrc.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, lrc.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -474,19 +223,6 @@ func (lrc *lrc_IR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -495,26 +231,6 @@ func (lrc *lrc_IR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -523,30 +239,6 @@ func (lrc *lrc_IR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -555,34 +247,5 @@ func (lrc *lrc_IR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lrc.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lrc.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lt/lt.go b/lt/lt.go -index 10864ef..a84af21 100644 ---- a/lt/lt.go -+++ b/lt/lt.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"pr. Kr.", "po Kr."}, - erasNarrow: []string{"pr. Kr.", "po Kr."}, - erasWide: []string{"prieš Kristų", "po Kristaus"}, -- timezones: map[string]string{"MDT": "Makau vasaros laikas", "NZDT": "Naujosios Zelandijos vasaros laikas", "JST": "Japonijos žiemos laikas", "CAT": "Centrinės Afrikos laikas", "MYT": "Malaizijos laikas", "UYST": "Urugvajaus vasaros laikas", "HAST": "Havajų–Aleutų žiemos laikas", "WEZ": "Vakarų Europos žiemos laikas", "ACDT": "Centrinės Australijos vasaros laikas", "BT": "Butano laikas", "ACST": "Centrinės Australijos žiemos laikas", "GMT": "Grinvičo laikas", "EST": "Šiaurės Amerikos rytų žiemos laikas", "HEPMX": "Meksikos Ramiojo vandenyno vasaros laikas", "ADT": "Atlanto vasaros laikas", "WIB": "Vakarų Indonezijos laikas", "ACWST": "Centrinės vakarų Australijos žiemos laikas", "SAST": "Pietų Afrikos laikas", "OESZ": "Rytų Europos vasaros laikas", "HNCU": "Kubos žiemos laikas", "SRT": "Surinamo laikas", "CHADT": "Čatamo vasaros laikas", "ECT": "Ekvadoro laikas", "COT": "Kolumbijos žiemos laikas", "HENOMX": "Šiaurės Vakarų Meksikos vasaros laikas", "HNT": "Niufaundlendo žiemos laikas", "HKST": "Honkongo vasaros laikas", "CLT": "Čilės žiemos laikas", "TMST": "Turkmėnistano vasaros laikas", "ChST": "Čamoro laikas", "WART": "Vakarų Argentinos žiemos laikas", "WARST": "Vakarų Argentinos vasaros laikas", "EAT": "Rytų Afrikos laikas", "EDT": "Šiaurės Amerikos rytų vasaros laikas", "AST": "Atlanto žiemos laikas", "GYT": "Gajanos laikas", "WIT": "Rytų Indonezijos laikas", "ACWDT": "Centrinės vakarų Australijos vasaros laikas", "AEDT": "Rytų Australijos vasaros laikas", "HNPM": "Sen Pjero ir Mikelono žiemos laikas", "AKDT": "Aliaskos vasaros laikas", "HADT": "Havajų–Aleutų vasaros laikas", "ART": "Argentinos žiemos laikas", "PST": "Šiaurės Amerikos Ramiojo vandenyno žiemos laikas", "WITA": "Centrinės Indonezijos laikas", "MESZ": "Vidurio Europos vasaros laikas", "LHDT": "Lordo Hau vasaros laikas", "HKT": "Honkongo žiemos laikas", "WAST": "Vakarų Afrikos vasaros laikas", "HECU": "Kubos vasaros laikas", "VET": "Venesuelos laikas", "NZST": "Naujosios Zelandijos žiemos laikas", "∅∅∅": "Amazonės vasaros laikas", "BOT": "Bolivijos laikas", "HNEG": "Grenlandijos rytų žiemos laikas", "WAT": "Vakarų Afrikos žiemos laikas", "HNNOMX": "Šiaurės Vakarų Meksikos žiemos laikas", "GFT": "Prancūzijos Gvianos laikas", "UYT": "Urugvajaus žiemos laikas", "HEOG": "Grenlandijos vakarų vasaros laikas", "WESZ": "Vakarų Europos vasaros laikas", "AWDT": "Vakarų Australijos vasaros laikas", "HEPM": "Sen Pjero ir Mikelono vasaros laikas", "IST": "Indijos laikas", "TMT": "Turkmėnistano žiemos laikas", "MEZ": "Vidurio Europos žiemos laikas", "MST": "Makau žiemos laikas", "AKST": "Aliaskos žiemos laikas", "CST": "Šiaurės Amerikos centro žiemos laikas", "CDT": "Šiaurės Amerikos centro vasaros laikas", "HNOG": "Grenlandijos vakarų žiemos laikas", "PDT": "Šiaurės Amerikos Ramiojo vandenyno vasaros laikas", "AWST": "Vakarų Australijos žiemos laikas", "CLST": "Čilės vasaros laikas", "COST": "Kolumbijos vasaros laikas", "HNPMX": "Meksikos Ramiojo vandenyno žiemos laikas", "ARST": "Argentinos vasaros laikas", "HEEG": "Grenlandijos rytų vasaros laikas", "CHAST": "Čatamo žiemos laikas", "SGT": "Singapūro laikas", "HAT": "Niufaundlendo vasaros laikas", "AEST": "Rytų Australijos žiemos laikas", "JDT": "Japonijos vasaros laikas", "OEZ": "Rytų Europos žiemos laikas", "LHST": "Lordo Hau žiemos laikas"}, -+ timezones: map[string]string{"LHDT": "Lordo Hau vasaros laikas", "BT": "Butano laikas", "HEPMX": "Meksikos Ramiojo vandenyno vasaros laikas", "COT": "Kolumbijos žiemos laikas", "COST": "Kolumbijos vasaros laikas", "CST": "Šiaurės Amerikos centro žiemos laikas", "HNEG": "Grenlandijos rytų žiemos laikas", "WITA": "Centrinės Indonezijos laikas", "ChST": "Čamoro laikas", "AEST": "Rytų Australijos žiemos laikas", "VET": "Venesuelos laikas", "AKST": "Aliaskos žiemos laikas", "GFT": "Prancūzijos Gvianos laikas", "SAST": "Pietų Afrikos laikas", "CLT": "Čilės žiemos laikas", "IST": "Indijos laikas", "UYST": "Urugvajaus vasaros laikas", "OEZ": "Rytų Europos žiemos laikas", "WIT": "Rytų Indonezijos laikas", "EST": "Šiaurės Amerikos rytų žiemos laikas", "HNOG": "Grenlandijos vakarų žiemos laikas", "ECT": "Ekvadoro laikas", "WIB": "Vakarų Indonezijos laikas", "GMT": "Grinvičo laikas", "HEPM": "Sen Pjero ir Mikelono vasaros laikas", "AEDT": "Rytų Australijos vasaros laikas", "CHADT": "Čatamo vasaros laikas", "EDT": "Šiaurės Amerikos rytų vasaros laikas", "HKST": "Honkongo vasaros laikas", "TMST": "Turkmėnistano vasaros laikas", "CDT": "Šiaurės Amerikos centro vasaros laikas", "AST": "Atlanto žiemos laikas", "HENOMX": "Šiaurės Vakarų Meksikos vasaros laikas", "ACWDT": "Centrinės vakarų Australijos vasaros laikas", "WESZ": "Vakarų Europos vasaros laikas", "SGT": "Singapūro laikas", "TMT": "Turkmėnistano žiemos laikas", "CLST": "Čilės vasaros laikas", "MDT": "Makau vasaros laikas", "PST": "Šiaurės Amerikos Ramiojo vandenyno žiemos laikas", "OESZ": "Rytų Europos vasaros laikas", "WART": "Vakarų Argentinos žiemos laikas", "CAT": "Centrinės Afrikos laikas", "HAST": "Havajų–Aleutų žiemos laikas", "PDT": "Šiaurės Amerikos Ramiojo vandenyno vasaros laikas", "ARST": "Argentinos vasaros laikas", "MEZ": "Vidurio Europos žiemos laikas", "MYT": "Malaizijos laikas", "HNPM": "Sen Pjero ir Mikelono žiemos laikas", "ACWST": "Centrinės vakarų Australijos žiemos laikas", "HEOG": "Grenlandijos vakarų vasaros laikas", "NZST": "Naujosios Zelandijos žiemos laikas", "AKDT": "Aliaskos vasaros laikas", "ART": "Argentinos žiemos laikas", "MESZ": "Vidurio Europos vasaros laikas", "LHST": "Lordo Hau žiemos laikas", "NZDT": "Naujosios Zelandijos vasaros laikas", "BOT": "Bolivijos laikas", "UYT": "Urugvajaus žiemos laikas", "ACDT": "Centrinės Australijos vasaros laikas", "AWDT": "Vakarų Australijos vasaros laikas", "∅∅∅": "Ako vasaros laikas", "CHAST": "Čatamo žiemos laikas", "WEZ": "Vakarų Europos žiemos laikas", "HECU": "Kubos vasaros laikas", "HNPMX": "Meksikos Ramiojo vandenyno žiemos laikas", "HADT": "Havajų–Aleutų vasaros laikas", "MST": "Makau žiemos laikas", "AWST": "Vakarų Australijos žiemos laikas", "JDT": "Japonijos vasaros laikas", "ACST": "Centrinės Australijos žiemos laikas", "HEEG": "Grenlandijos rytų vasaros laikas", "HNCU": "Kubos žiemos laikas", "WAT": "Vakarų Afrikos žiemos laikas", "WAST": "Vakarų Afrikos vasaros laikas", "HAT": "Niufaundlendo vasaros laikas", "GYT": "Gajanos laikas", "ADT": "Atlanto vasaros laikas", "HNNOMX": "Šiaurės Vakarų Meksikos žiemos laikas", "HNT": "Niufaundlendo žiemos laikas", "WARST": "Vakarų Argentinos vasaros laikas", "HKT": "Honkongo žiemos laikas", "SRT": "Surinamo laikas", "EAT": "Rytų Afrikos laikas", "JST": "Japonijos žiemos laikas"}, - } - } -  -diff --git a/lt_LT/lt_LT.go b/lt_LT/lt_LT.go -index 725efb5..b3f9e2c 100644 ---- a/lt_LT/lt_LT.go -+++ b/lt_LT/lt_LT.go -@@ -10,70 +10,45 @@ import ( - ) -  - type lt_LT struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lt_LT' locale - func New() locales.Translator { - return <_LT{ -- locale: "lt_LT", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "saus.", "vas.", "kov.", "bal.", "geg.", "birž.", "liep.", "rugp.", "rugs.", "spal.", "lapkr.", "gruod."}, -- monthsNarrow: []string{"", "S", "V", "K", "B", "G", "B", "L", "R", "R", "S", "L", "G"}, -- monthsWide: []string{"", "sausio", "vasario", "kovo", "balandžio", "gegužės", "birželio", "liepos", "rugpjūčio", "rugsėjo", "spalio", "lapkričio", "gruodžio"}, -- daysAbbreviated: []string{"sk", "pr", "an", "tr", "kt", "pn", "št"}, -- daysNarrow: []string{"S", "P", "A", "T", "K", "P", "Š"}, -- daysShort: []string{"Sk", "Pr", "An", "Tr", "Kt", "Pn", "Št"}, -- daysWide: []string{"sekmadienis", "pirmadienis", "antradienis", "trečiadienis", "ketvirtadienis", "penktadienis", "šeštadienis"}, -- periodsAbbreviated: []string{"priešpiet", "popiet"}, -- periodsNarrow: []string{"pr. p.", "pop."}, -- periodsWide: []string{"priešpiet", "popiet"}, -- erasAbbreviated: []string{"pr. Kr.", "po Kr."}, -- erasNarrow: []string{"pr. Kr.", "po Kr."}, -- erasWide: []string{"prieš Kristų", "po Kristaus"}, -- timezones: map[string]string{"LHDT": "Lordo Hau vasaros laikas", "JST": "Japonijos žiemos laikas", "JDT": "Japonijos vasaros laikas", "TMT": "Turkmėnistano žiemos laikas", "∅∅∅": "Peru vasaros laikas", "EDT": "Šiaurės Amerikos rytų vasaros laikas", "CHADT": "Čatamo vasaros laikas", "CHAST": "Čatamo žiemos laikas", "WIB": "Vakarų Indonezijos laikas", "ACWDT": "Centrinės vakarų Australijos vasaros laikas", "ART": "Argentinos žiemos laikas", "AEST": "Rytų Australijos žiemos laikas", "AEDT": "Rytų Australijos vasaros laikas", "MESZ": "Vidurio Europos vasaros laikas", "LHST": "Lordo Hau žiemos laikas", "ECT": "Ekvadoro laikas", "PDT": "Šiaurės Amerikos Ramiojo vandenyno vasaros laikas", "WEZ": "Vakarų Europos žiemos laikas", "HNCU": "Kubos žiemos laikas", "WESZ": "Vakarų Europos vasaros laikas", "HEPMX": "Meksikos Ramiojo vandenyno vasaros laikas", "HNPM": "Sen Pjero ir Mikelono žiemos laikas", "GFT": "Prancūzijos Gvianos laikas", "EST": "Šiaurės Amerikos rytų žiemos laikas", "AST": "Atlanto žiemos laikas", "HEOG": "Grenlandijos vakarų vasaros laikas", "HKT": "Honkongo žiemos laikas", "AWST": "Vakarų Australijos žiemos laikas", "EAT": "Rytų Afrikos laikas", "WARST": "Vakarų Argentinos vasaros laikas", "COT": "Kolumbijos žiemos laikas", "MEZ": "Vidurio Europos žiemos laikas", "TMST": "Turkmėnistano vasaros laikas", "ACDT": "Centrinės Australijos vasaros laikas", "MDT": "Makau vasaros laikas", "HADT": "Havajų–Aleutų vasaros laikas", "BT": "Butano laikas", "AKDT": "Aliaskos vasaros laikas", "HAT": "Niufaundlendo vasaros laikas", "CLT": "Čilės žiemos laikas", "OEZ": "Rytų Europos žiemos laikas", "WART": "Vakarų Argentinos žiemos laikas", "SGT": "Singapūro laikas", "WAT": "Vakarų Afrikos žiemos laikas", "PST": "Šiaurės Amerikos Ramiojo vandenyno žiemos laikas", "NZDT": "Naujosios Zelandijos vasaros laikas", "HAST": "Havajų–Aleutų žiemos laikas", "AWDT": "Vakarų Australijos vasaros laikas", "HEEG": "Grenlandijos rytų vasaros laikas", "HECU": "Kubos vasaros laikas", "ADT": "Atlanto vasaros laikas", "UYST": "Urugvajaus vasaros laikas", "SRT": "Surinamo laikas", "ChST": "Čamoro laikas", "ACST": "Centrinės Australijos žiemos laikas", "OESZ": "Rytų Europos vasaros laikas", "COST": "Kolumbijos vasaros laikas", "WIT": "Rytų Indonezijos laikas", "WITA": "Centrinės Indonezijos laikas", "SAST": "Pietų Afrikos laikas", "HNEG": "Grenlandijos rytų žiemos laikas", "CAT": "Centrinės Afrikos laikas", "AKST": "Aliaskos žiemos laikas", "MYT": "Malaizijos laikas", "HEPM": "Sen Pjero ir Mikelono vasaros laikas", "CST": "Šiaurės Amerikos centro žiemos laikas", "CDT": "Šiaurės Amerikos centro vasaros laikas", "ACWST": "Centrinės vakarų Australijos žiemos laikas", "HNOG": "Grenlandijos vakarų žiemos laikas", "HKST": "Honkongo vasaros laikas", "CLST": "Čilės vasaros laikas", "BOT": "Bolivijos laikas", "GMT": "Grinvičo laikas", "HNPMX": "Meksikos Ramiojo vandenyno žiemos laikas", "VET": "Venesuelos laikas", "MST": "Makau žiemos laikas", "GYT": "Gajanos laikas", "UYT": "Urugvajaus žiemos laikas", "HNT": "Niufaundlendo žiemos laikas", "ARST": "Argentinos vasaros laikas", "WAST": "Vakarų Afrikos vasaros laikas", "HNNOMX": "Šiaurės Vakarų Meksikos žiemos laikas", "HENOMX": "Šiaurės Vakarų Meksikos vasaros laikas", "NZST": "Naujosios Zelandijos žiemos laikas", "IST": "Indijos laikas"}, -+ locale: "lt_LT", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BOT": "BOT", "HAST": "HAST", "HADT": "HADT", "CLST": "CLST", "CST": "CST", "NZDT": "NZDT", "HNPMX": "HNPMX", "TMT": "TMT", "CHAST": "CHAST", "WESZ": "WESZ", "HECU": "HECU", "HNNOMX": "HNNOMX", "MST": "MST", "ART": "ART", "HEEG": "HEEG", "GYT": "GYT", "HKT": "HKT", "WITA": "WITA", "NZST": "NZST", "ARST": "ARST", "MYT": "MYT", "ACWDT": "ACWDT", "WARST": "WARST", "MESZ": "MESZ", "PST": "PST", "HENOMX": "HENOMX", "HNPM": "HNPM", "HEPM": "HEPM", "JDT": "JDT", "WIT": "WIT", "CAT": "CAT", "AWST": "AWST", "LHDT": "LHDT", "WAT": "WAT", "WAST": "WAST", "OESZ": "OESZ", "SRT": "SRT", "ACST": "ACST", "HNEG": "HNEG", "LHST": "LHST", "JST": "JST", "ACWST": "ACWST", "PDT": "PDT", "COT": "COT", "HNOG": "HNOG", "CDT": "CDT", "WIB": "WIB", "UYT": "UYT", "BT": "BT", "WEZ": "WEZ", "HEOG": "HEOG", "IST": "IST", "AKDT": "AKDT", "SAST": "SAST", "VET": "VET", "MDT": "MDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "EDT": "EDT", "CLT": "CLT", "AST": "AST", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "ADT": "ADT", "SGT": "SGT", "WART": "WART", "COST": "COST", "CHADT": "CHADT", "UYST": "UYST", "AEST": "AEST", "EAT": "EAT", "ACDT": "ACDT", "HNCU": "HNCU", "GFT": "GFT", "ChST": "ChST", "EST": "EST", "TMST": "TMST", "GMT": "GMT", "HKST": "HKST", "ECT": "ECT", "MEZ": "MEZ", "AKST": "AKST", "HNT": "HNT", "HAT": "HAT"}, - } - } -  -@@ -170,7 +145,7 @@ func (lt *lt_LT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lt *lt_LT) MonthsAbbreviated() []string { -- return lt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -180,7 +155,7 @@ func (lt *lt_LT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lt *lt_LT) MonthsNarrow() []string { -- return lt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -190,7 +165,7 @@ func (lt *lt_LT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lt *lt_LT) MonthsWide() []string { -- return lt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -236,81 +211,13 @@ func (lt *lt_LT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'lt_LT' and handles both Whole and Real numbers based on 'v' - func (lt *lt_LT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(lt.group) - 1; j >= 0; j-- { -- b = append(b, lt.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(lt.minus) - 1; j >= 0; j-- { -- b = append(b, lt.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'lt_LT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (lt *lt_LT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(lt.minus) - 1; j >= 0; j-- { -- b = append(b, lt.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lt.percentSuffix...) -- -- b = append(b, lt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lt_LT' -@@ -318,60 +225,7 @@ func (lt *lt_LT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lt.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(lt.group) - 1; j >= 0; j-- { -- b = append(b, lt.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(lt.minus) - 1; j >= 0; j-- { -- b = append(b, lt.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, lt.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lt_LT' -@@ -380,67 +234,7 @@ func (lt *lt_LT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lt.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(lt.group) - 1; j >= 0; j-- { -- b = append(b, lt.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(lt.minus) - 1; j >= 0; j-- { -- b = append(b, lt.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, lt.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, lt.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lt_LT' -@@ -448,28 +242,6 @@ func (lt *lt_LT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -478,28 +250,6 @@ func (lt *lt_LT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -508,20 +258,6 @@ func (lt *lt_LT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0x6d}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -530,21 +266,6 @@ func (lt *lt_LT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0x6d}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64}...) -- b = append(b, []byte{0x2e, 0x2c, 0x20}...) -- b = append(b, lt.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -553,19 +274,6 @@ func (lt *lt_LT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -574,26 +282,6 @@ func (lt *lt_LT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -602,30 +290,6 @@ func (lt *lt_LT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -634,34 +298,5 @@ func (lt *lt_LT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lu/lu.go b/lu/lu.go -index cb9c4a2..623f7cc 100644 ---- a/lu/lu.go -+++ b/lu/lu.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"kmp. Y.K.", "kny. Y. K."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kumpala kwa Yezu Kli", "Kunyima kwa Yezu Kli"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "EST": "EST", "ACWDT": "ACWDT", "CLST": "CLST", "SGT": "SGT", "CDT": "CDT", "HNEG": "HNEG", "COST": "COST", "WESZ": "WESZ", "HNT": "HNT", "AWDT": "AWDT", "TMT": "TMT", "WAST": "WAST", "HNNOMX": "HNNOMX", "HAST": "HAST", "ARST": "ARST", "MEZ": "MEZ", "IST": "IST", "EDT": "EDT", "MDT": "MDT", "HEOG": "HEOG", "LHDT": "LHDT", "JDT": "JDT", "HEEG": "HEEG", "ACST": "ACST", "WAT": "WAT", "HADT": "HADT", "PST": "PST", "AEDT": "AEDT", "HKT": "HKT", "HNPM": "HNPM", "VET": "VET", "ACWST": "ACWST", "SAST": "SAST", "JST": "JST", "TMST": "TMST", "CAT": "CAT", "COT": "COT", "UYT": "UYT", "WIB": "WIB", "OEZ": "OEZ", "WART": "WART", "ADT": "ADT", "AKDT": "AKDT", "SRT": "SRT", "HNOG": "HNOG", "MESZ": "MESZ", "CHADT": "CHADT", "GFT": "GFT", "HNCU": "HNCU", "AST": "AST", "AEST": "AEST", "EAT": "EAT", "WARST": "WARST", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "CST": "CST", "BT": "BT", "HEPM": "HEPM", "ChST": "ChST", "ACDT": "ACDT", "PDT": "PDT", "HAT": "HAT", "AWST": "AWST", "HKST": "HKST", "CHAST": "CHAST", "BOT": "BOT", "OESZ": "OESZ", "HECU": "HECU", "HEPMX": "HEPMX", "MYT": "MYT", "AKST": "AKST", "ART": "ART", "CLT": "CLT", "MST": "MST", "NZDT": "NZDT", "ECT": "ECT", "GYT": "GYT", "UYST": "UYST", "WITA": "WITA", "NZST": "NZST", "GMT": "GMT", "WIT": "WIT", "WEZ": "WEZ", "LHST": "LHST"}, -+ timezones: map[string]string{"HNT": "HNT", "GYT": "GYT", "AST": "AST", "ChST": "ChST", "HEEG": "HEEG", "BT": "BT", "VET": "VET", "HNCU": "HNCU", "CLT": "CLT", "HNEG": "HNEG", "WEZ": "WEZ", "GFT": "GFT", "HEOG": "HEOG", "ADT": "ADT", "AWDT": "AWDT", "HEPM": "HEPM", "AEST": "AEST", "WESZ": "WESZ", "WARST": "WARST", "TMT": "TMT", "ARST": "ARST", "MEZ": "MEZ", "HNPM": "HNPM", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "HKT": "HKT", "WIB": "WIB", "HADT": "HADT", "ACDT": "ACDT", "AEDT": "AEDT", "UYST": "UYST", "SGT": "SGT", "WART": "WART", "EST": "EST", "BOT": "BOT", "LHST": "LHST", "SAST": "SAST", "CAT": "CAT", "MST": "MST", "JDT": "JDT", "CHAST": "CHAST", "UYT": "UYT", "OEZ": "OEZ", "CLST": "CLST", "NZDT": "NZDT", "ACWDT": "ACWDT", "WITA": "WITA", "MESZ": "MESZ", "HEPMX": "HEPMX", "WAST": "WAST", "CST": "CST", "NZST": "NZST", "HNNOMX": "HNNOMX", "JST": "JST", "PST": "PST", "HECU": "HECU", "HKST": "HKST", "CDT": "CDT", "MDT": "MDT", "PDT": "PDT", "WAT": "WAT", "OESZ": "OESZ", "WIT": "WIT", "HAST": "HAST", "HNPMX": "HNPMX", "AKST": "AKST", "AKDT": "AKDT", "HAT": "HAT", "COT": "COT", "EDT": "EDT", "ECT": "ECT", "HENOMX": "HENOMX", "IST": "IST", "ACWST": "ACWST", "HNOG": "HNOG", "ART": "ART", "SRT": "SRT", "EAT": "EAT", "AWST": "AWST", "MYT": "MYT", "COST": "COST", "TMST": "TMST", "GMT": "GMT", "ACST": "ACST", "LHDT": "LHDT"}, - } - } -  -diff --git a/lu_CD/lu_CD.go b/lu_CD/lu_CD.go -index 2bdf1b8..27e9ee3 100644 ---- a/lu_CD/lu_CD.go -+++ b/lu_CD/lu_CD.go -@@ -42,26 +42,13 @@ type lu_CD struct { - // New returns a new instance of translator for the 'lu_CD' locale - func New() locales.Translator { - return &lu_CD{ -- locale: "lu_CD", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Cio", "Lui", "Lus", "Muu", "Lum", "Luf", "Kab", "Lush", "Lut", "Lun", "Kas", "Cis"}, -- monthsNarrow: []string{"", "C", "L", "L", "M", "L", "L", "K", "L", "L", "L", "K", "C"}, -- monthsWide: []string{"", "Ciongo", "Lùishi", "Lusòlo", "Mùuyà", "Lumùngùlù", "Lufuimi", "Kabàlàshìpù", "Lùshìkà", "Lutongolo", "Lungùdi", "Kaswèkèsè", "Ciswà"}, -- daysAbbreviated: []string{"Lum", "Nko", "Ndy", "Ndg", "Njw", "Ngv", "Lub"}, -- daysNarrow: []string{"L", "N", "N", "N", "N", "N", "L"}, -- daysWide: []string{"Lumingu", "Nkodya", "Ndàayà", "Ndangù", "Njòwa", "Ngòvya", "Lubingu"}, -- periodsAbbreviated: []string{"Dinda", "Dilolo"}, -- periodsWide: []string{"Dinda", "Dilolo"}, -- erasAbbreviated: []string{"kmp. Y.K.", "kny. Y. K."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kumpala kwa Yezu Kli", "Kunyima kwa Yezu Kli"}, -- timezones: map[string]string{"CAT": "CAT", "WAT": "WAT", "WIB": "WIB", "HAST": "HAST", "HKT": "HKT", "JDT": "JDT", "TMST": "TMST", "OESZ": "OESZ", "VET": "VET", "HNOG": "HNOG", "MEZ": "MEZ", "MESZ": "MESZ", "HEEG": "HEEG", "ACST": "ACST", "COST": "COST", "ADT": "ADT", "HKST": "HKST", "GYT": "GYT", "ART": "ART", "ARST": "ARST", "CLST": "CLST", "WESZ": "WESZ", "HNT": "HNT", "TMT": "TMT", "ECT": "ECT", "∅∅∅": "∅∅∅", "COT": "COT", "HEPMX": "HEPMX", "PDT": "PDT", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "MYT": "MYT", "HAT": "HAT", "WART": "WART", "MDT": "MDT", "AWST": "AWST", "EAT": "EAT", "WAST": "WAST", "OEZ": "OEZ", "HENOMX": "HENOMX", "AKST": "AKST", "AKDT": "AKDT", "PST": "PST", "NZDT": "NZDT", "EDT": "EDT", "CST": "CST", "HEOG": "HEOG", "WEZ": "WEZ", "HECU": "HECU", "UYT": "UYT", "AEST": "AEST", "HEPM": "HEPM", "LHST": "LHST", "CHAST": "CHAST", "BOT": "BOT", "AST": "AST", "ACWDT": "ACWDT", "WITA": "WITA", "IST": "IST", "ACDT": "ACDT", "WARST": "WARST", "HNCU": "HNCU", "EST": "EST", "MST": "MST", "CDT": "CDT", "JST": "JST", "GMT": "GMT", "HADT": "HADT", "BT": "BT", "SRT": "SRT", "CHADT": "CHADT", "AEDT": "AEDT", "NZST": "NZST", "ChST": "ChST", "GFT": "GFT", "SGT": "SGT", "UYST": "UYST", "WIT": "WIT", "ACWST": "ACWST", "CLT": "CLT", "HNEG": "HNEG", "HNPM": "HNPM", "LHDT": "LHDT", "SAST": "SAST"}, -+ locale: "lu_CD", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "ARST": "ARST", "HENOMX": "HENOMX", "BT": "BT", "WIB": "WIB", "GMT": "GMT", "WART": "WART", "GYT": "GYT", "ART": "ART", "EAT": "EAT", "AKDT": "AKDT", "HEEG": "HEEG", "CST": "CST", "MST": "MST", "NZDT": "NZDT", "ACWST": "ACWST", "WAST": "WAST", "COT": "COT", "CLST": "CLST", "SRT": "SRT", "AWDT": "AWDT", "PST": "PST", "COST": "COST", "EDT": "EDT", "HKT": "HKT", "SGT": "SGT", "TMT": "TMT", "HADT": "HADT", "LHST": "LHST", "ACWDT": "ACWDT", "HNT": "HNT", "TMST": "TMST", "WITA": "WITA", "HAST": "HAST", "∅∅∅": "∅∅∅", "HECU": "HECU", "AEST": "AEST", "HNCU": "HNCU", "WARST": "WARST", "HNEG": "HNEG", "MYT": "MYT", "JDT": "JDT", "MESZ": "MESZ", "AWST": "AWST", "JST": "JST", "IST": "IST", "WEZ": "WEZ", "CDT": "CDT", "MDT": "MDT", "NZST": "NZST", "HKST": "HKST", "CLT": "CLT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "PDT": "PDT", "VET": "VET", "OESZ": "OESZ", "AST": "AST", "ACST": "ACST", "ACDT": "ACDT", "CAT": "CAT", "HAT": "HAT", "HEPM": "HEPM", "CHADT": "CHADT", "HNPMX": "HNPMX", "HNPM": "HNPM", "ECT": "ECT", "ADT": "ADT", "MEZ": "MEZ", "AKST": "AKST", "WIT": "WIT", "WAT": "WAT", "GFT": "GFT", "HEOG": "HEOG", "BOT": "BOT", "UYT": "UYT", "WESZ": "WESZ", "AEDT": "AEDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "HNOG": "HNOG", "EST": "EST", "ChST": "ChST", "CHAST": "CHAST", "UYST": "UYST"}, - } - } -  -@@ -107,7 +94,7 @@ func (lu *lu_CD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lu *lu_CD) MonthsAbbreviated() []string { -- return lu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -117,7 +104,7 @@ func (lu *lu_CD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lu *lu_CD) MonthsNarrow() []string { -- return lu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -127,7 +114,7 @@ func (lu *lu_CD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lu *lu_CD) MonthsWide() []string { -- return lu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -173,42 +160,7 @@ func (lu *lu_CD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'lu_CD' and handles both Whole and Real numbers based on 'v' - func (lu *lu_CD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'lu_CD' and handles both Whole and Real numbers based on 'v' -@@ -222,54 +174,7 @@ func (lu *lu_CD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lu.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lu_CD' -@@ -278,61 +183,7 @@ func (lu *lu_CD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lu.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, lu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, lu.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lu_CD' -@@ -340,17 +191,6 @@ func (lu *lu_CD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -359,17 +199,6 @@ func (lu *lu_CD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -378,17 +207,6 @@ func (lu *lu_CD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,19 +215,6 @@ func (lu *lu_CD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, lu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -418,19 +223,6 @@ func (lu *lu_CD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -439,26 +231,6 @@ func (lu *lu_CD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -467,30 +239,6 @@ func (lu *lu_CD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -499,34 +247,5 @@ func (lu *lu_CD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/luo/luo.go b/luo/luo.go -index 78ed7ca..2241a72 100644 ---- a/luo/luo.go -+++ b/luo/luo.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kapok Kristo obiro", "Ka Kristo osebiro"}, -- timezones: map[string]string{"CST": "CST", "PDT": "PDT", "ACDT": "ACDT", "EAT": "EAT", "HENOMX": "HENOMX", "AKST": "AKST", "PST": "PST", "HEPM": "HEPM", "TMT": "TMT", "CAT": "CAT", "HAT": "HAT", "AEDT": "AEDT", "ACWST": "ACWST", "WAST": "WAST", "CDT": "CDT", "WIT": "WIT", "WESZ": "WESZ", "HKT": "HKT", "AWDT": "AWDT", "GFT": "GFT", "WAT": "WAT", "CHAST": "CHAST", "CHADT": "CHADT", "EDT": "EDT", "SRT": "SRT", "ACWDT": "ACWDT", "CLT": "CLT", "HNNOMX": "HNNOMX", "GMT": "GMT", "∅∅∅": "∅∅∅", "SGT": "SGT", "ACST": "ACST", "ECT": "ECT", "ART": "ART", "CLST": "CLST", "HEEG": "HEEG", "MST": "MST", "HNOG": "HNOG", "AEST": "AEST", "LHST": "LHST", "TMST": "TMST", "UYT": "UYT", "LHDT": "LHDT", "HECU": "HECU", "WITA": "WITA", "AST": "AST", "ADT": "ADT", "HNPM": "HNPM", "IST": "IST", "JST": "JST", "OEZ": "OEZ", "COT": "COT", "HADT": "HADT", "VET": "VET", "BT": "BT", "HEOG": "HEOG", "WEZ": "WEZ", "NZDT": "NZDT", "EST": "EST", "MYT": "MYT", "MEZ": "MEZ", "JDT": "JDT", "HNT": "HNT", "AWST": "AWST", "HNEG": "HNEG", "OESZ": "OESZ", "AKDT": "AKDT", "WIB": "WIB", "HAST": "HAST", "ARST": "ARST", "NZST": "NZST", "HNCU": "HNCU", "HEPMX": "HEPMX", "WART": "WART", "WARST": "WARST", "COST": "COST", "HNPMX": "HNPMX", "MDT": "MDT", "GYT": "GYT", "ChST": "ChST", "BOT": "BOT", "MESZ": "MESZ", "SAST": "SAST", "UYST": "UYST", "HKST": "HKST"}, -+ timezones: map[string]string{"HNEG": "HNEG", "LHDT": "LHDT", "IST": "IST", "HAT": "HAT", "HNOG": "HNOG", "EST": "EST", "ARST": "ARST", "ADT": "ADT", "NZDT": "NZDT", "HENOMX": "HENOMX", "AST": "AST", "JST": "JST", "UYT": "UYT", "WAT": "WAT", "WEZ": "WEZ", "WESZ": "WESZ", "WIT": "WIT", "HNT": "HNT", "CAT": "CAT", "CST": "CST", "HAST": "HAST", "HNPMX": "HNPMX", "WIB": "WIB", "BOT": "BOT", "CHADT": "CHADT", "WART": "WART", "∅∅∅": "∅∅∅", "EDT": "EDT", "BT": "BT", "HNCU": "HNCU", "NZST": "NZST", "ART": "ART", "PDT": "PDT", "VET": "VET", "MESZ": "MESZ", "HEPMX": "HEPMX", "GFT": "GFT", "OEZ": "OEZ", "UYST": "UYST", "OESZ": "OESZ", "TMST": "TMST", "MDT": "MDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "AKST": "AKST", "WITA": "WITA", "MYT": "MYT", "JDT": "JDT", "HECU": "HECU", "WAST": "WAST", "MST": "MST", "ACST": "ACST", "ACDT": "ACDT", "SGT": "SGT", "ChST": "ChST", "EAT": "EAT", "PST": "PST", "GYT": "GYT", "HEOG": "HEOG", "TMT": "TMT", "CLT": "CLT", "SAST": "SAST", "ECT": "ECT", "AWST": "AWST", "HKT": "HKT", "CDT": "CDT", "HEEG": "HEEG", "LHST": "LHST", "HEPM": "HEPM", "AWDT": "AWDT", "AEST": "AEST", "CHAST": "CHAST", "COT": "COT", "CLST": "CLST", "SRT": "SRT", "MEZ": "MEZ", "AKDT": "AKDT", "WARST": "WARST", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "ACWST": "ACWST", "COST": "COST", "HKST": "HKST", "GMT": "GMT", "HADT": "HADT"}, - } - } -  -diff --git a/luo_KE/luo_KE.go b/luo_KE/luo_KE.go -index bee3476..a6113ea 100644 ---- a/luo_KE/luo_KE.go -+++ b/luo_KE/luo_KE.go -@@ -42,24 +42,13 @@ type luo_KE struct { - // New returns a new instance of translator for the 'luo_KE' locale - func New() locales.Translator { - return &luo_KE{ -- locale: "luo_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "DAC", "DAR", "DAD", "DAN", "DAH", "DAU", "DAO", "DAB", "DOC", "DAP", "DGI", "DAG"}, -- monthsNarrow: []string{"", "C", "R", "D", "N", "B", "U", "B", "B", "C", "P", "C", "P"}, -- monthsWide: []string{"", "Dwe mar Achiel", "Dwe mar Ariyo", "Dwe mar Adek", "Dwe mar Ang’wen", "Dwe mar Abich", "Dwe mar Auchiel", "Dwe mar Abiriyo", "Dwe mar Aboro", "Dwe mar Ochiko", "Dwe mar Apar", "Dwe mar gi achiel", "Dwe mar Apar gi ariyo"}, -- daysAbbreviated: []string{"JMP", "WUT", "TAR", "TAD", "TAN", "TAB", "NGS"}, -- daysNarrow: []string{"J", "W", "T", "T", "T", "T", "N"}, -- daysWide: []string{"Jumapil", "Wuok Tich", "Tich Ariyo", "Tich Adek", "Tich Ang’wen", "Tich Abich", "Ngeso"}, -- periodsAbbreviated: []string{"OD", "OT"}, -- periodsWide: []string{"OD", "OT"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kapok Kristo obiro", "Ka Kristo osebiro"}, -- timezones: map[string]string{"LHST": "LHST", "NZDT": "NZDT", "TMST": "TMST", "MST": "MST", "UYST": "UYST", "PDT": "PDT", "HAT": "HAT", "AWDT": "AWDT", "IST": "IST", "TMT": "TMT", "WAST": "WAST", "SGT": "SGT", "MYT": "MYT", "ACWST": "ACWST", "HKT": "HKT", "HEPM": "HEPM", "WART": "WART", "AST": "AST", "GYT": "GYT", "VET": "VET", "WIT": "WIT", "BT": "BT", "WEZ": "WEZ", "MEZ": "MEZ", "SAST": "SAST", "JST": "JST", "WAT": "WAT", "AKST": "AKST", "HNOG": "HNOG", "HEOG": "HEOG", "ChST": "ChST", "EAT": "EAT", "EST": "EST", "WIB": "WIB", "SRT": "SRT", "MESZ": "MESZ", "NZST": "NZST", "CAT": "CAT", "OEZ": "OEZ", "ART": "ART", "HNPM": "HNPM", "AEDT": "AEDT", "WITA": "WITA", "GFT": "GFT", "WARST": "WARST", "HKST": "HKST", "CHADT": "CHADT", "JDT": "JDT", "ACDT": "ACDT", "HNPMX": "HNPMX", "CST": "CST", "PST": "PST", "LHDT": "LHDT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HAST": "HAST", "AWST": "AWST", "ACST": "ACST", "MDT": "MDT", "ECT": "ECT", "CDT": "CDT", "CLST": "CLST", "BOT": "BOT", "HEEG": "HEEG", "GMT": "GMT", "HECU": "HECU", "AKDT": "AKDT", "HADT": "HADT", "ACWDT": "ACWDT", "AEST": "AEST", "CLT": "CLT", "OESZ": "OESZ", "HEPMX": "HEPMX", "ADT": "ADT", "WESZ": "WESZ", "HNT": "HNT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "COT": "COT", "HENOMX": "HENOMX", "COST": "COST", "EDT": "EDT", "UYT": "UYT", "ARST": "ARST"}, -+ locale: "luo_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "JST": "JST", "CHADT": "CHADT", "UYST": "UYST", "∅∅∅": "∅∅∅", "BT": "BT", "HNT": "HNT", "TMT": "TMT", "HADT": "HADT", "ACWST": "ACWST", "WARST": "WARST", "NZDT": "NZDT", "HEPMX": "HEPMX", "GFT": "GFT", "SAST": "SAST", "GMT": "GMT", "WESZ": "WESZ", "CST": "CST", "MST": "MST", "HNEG": "HNEG", "CHAST": "CHAST", "EDT": "EDT", "ART": "ART", "BOT": "BOT", "MESZ": "MESZ", "MYT": "MYT", "AEST": "AEST", "HKST": "HKST", "LHDT": "LHDT", "UYT": "UYT", "OEZ": "OEZ", "NZST": "NZST", "ACST": "ACST", "IST": "IST", "WAT": "WAT", "CLT": "CLT", "CLST": "CLST", "EAT": "EAT", "MEZ": "MEZ", "AWDT": "AWDT", "HNCU": "HNCU", "HNOG": "HNOG", "AST": "AST", "HNPM": "HNPM", "PST": "PST", "COT": "COT", "COST": "COST", "EST": "EST", "ChST": "ChST", "ARST": "ARST", "HEEG": "HEEG", "HENOMX": "HENOMX", "JDT": "JDT", "AWST": "AWST", "HECU": "HECU", "HKT": "HKT", "TMST": "TMST", "CAT": "CAT", "MDT": "MDT", "HAST": "HAST", "AEDT": "AEDT", "AKDT": "AKDT", "WART": "WART", "WIT": "WIT", "HEOG": "HEOG", "WIB": "WIB", "ECT": "ECT", "PDT": "PDT", "ACWDT": "ACWDT", "WAST": "WAST", "HAT": "HAT", "HNNOMX": "HNNOMX", "LHST": "LHST", "HEPM": "HEPM", "HNPMX": "HNPMX", "SGT": "SGT", "AKST": "AKST", "OESZ": "OESZ", "ACDT": "ACDT", "VET": "VET", "CDT": "CDT", "ADT": "ADT", "SRT": "SRT", "WEZ": "WEZ", "GYT": "GYT"}, - } - } -  -@@ -105,7 +94,7 @@ func (luo *luo_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (luo *luo_KE) MonthsAbbreviated() []string { -- return luo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -115,7 +104,7 @@ func (luo *luo_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (luo *luo_KE) MonthsNarrow() []string { -- return luo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -125,7 +114,7 @@ func (luo *luo_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (luo *luo_KE) MonthsWide() []string { -- return luo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,54 +174,7 @@ func (luo *luo_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := luo.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, luo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, luo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, luo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, luo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'luo_KE' -@@ -241,61 +183,7 @@ func (luo *luo_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := luo.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, luo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, luo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, luo.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, luo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'luo_KE' -@@ -303,27 +191,6 @@ func (luo *luo_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -332,17 +199,6 @@ func (luo *luo_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, luo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -351,17 +207,6 @@ func (luo *luo_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, luo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -370,19 +215,6 @@ func (luo *luo_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, luo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, luo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -391,19 +223,6 @@ func (luo *luo_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -412,26 +231,6 @@ func (luo *luo_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -440,30 +239,6 @@ func (luo *luo_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -472,34 +247,5 @@ func (luo *luo_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, luo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := luo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/luy/luy.go b/luy/luy.go -index c6dc6f0..8fa582f 100644 ---- a/luy/luy.go -+++ b/luy/luy.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Imberi ya Kuuza Kwa", "Muhiga Kuvita Kuuza"}, -- timezones: map[string]string{"SRT": "SRT", "IST": "IST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "EST": "EST", "AKST": "AKST", "AST": "AST", "HNOG": "HNOG", "AWDT": "AWDT", "HKT": "HKT", "∅∅∅": "∅∅∅", "WARST": "WARST", "GMT": "GMT", "HECU": "HECU", "UYT": "UYT", "HAST": "HAST", "PST": "PST", "ACWDT": "ACWDT", "ARST": "ARST", "AEDT": "AEDT", "ADT": "ADT", "WIB": "WIB", "WITA": "WITA", "LHDT": "LHDT", "ChST": "ChST", "MYT": "MYT", "ACWST": "ACWST", "HNT": "HNT", "HEOG": "HEOG", "CAT": "CAT", "HENOMX": "HENOMX", "HEPM": "HEPM", "WAT": "WAT", "EDT": "EDT", "HADT": "HADT", "BT": "BT", "WESZ": "WESZ", "AEST": "AEST", "AWST": "AWST", "CDT": "CDT", "HNPMX": "HNPMX", "PDT": "PDT", "HNPM": "HNPM", "CHADT": "CHADT", "JST": "JST", "JDT": "JDT", "OEZ": "OEZ", "ART": "ART", "NZST": "NZST", "SAST": "SAST", "HEEG": "HEEG", "WAST": "WAST", "WIT": "WIT", "GFT": "GFT", "EAT": "EAT", "COT": "COT", "MDT": "MDT", "MESZ": "MESZ", "CLST": "CLST", "TMT": "TMT", "ACDT": "ACDT", "MST": "MST", "ACST": "ACST", "WART": "WART", "SGT": "SGT", "CLT": "CLT", "TMST": "TMST", "COST": "COST", "CST": "CST", "GYT": "GYT", "AKDT": "AKDT", "VET": "VET", "HAT": "HAT", "HKST": "HKST", "CHAST": "CHAST", "BOT": "BOT", "UYST": "UYST", "WEZ": "WEZ", "MEZ": "MEZ", "NZDT": "NZDT", "OESZ": "OESZ", "HEPMX": "HEPMX", "LHST": "LHST", "ECT": "ECT", "HNCU": "HNCU"}, -+ timezones: map[string]string{"ACDT": "ACDT", "∅∅∅": "∅∅∅", "VET": "VET", "EST": "EST", "CLT": "CLT", "EAT": "EAT", "GFT": "GFT", "WARST": "WARST", "WAT": "WAT", "ARST": "ARST", "WESZ": "WESZ", "WIT": "WIT", "WITA": "WITA", "MST": "MST", "HEEG": "HEEG", "HEPM": "HEPM", "JDT": "JDT", "LHDT": "LHDT", "GYT": "GYT", "HNEG": "HNEG", "CST": "CST", "MDT": "MDT", "HAST": "HAST", "CHADT": "CHADT", "UYST": "UYST", "BT": "BT", "HEOG": "HEOG", "ECT": "ECT", "CLST": "CLST", "COT": "COT", "HNPM": "HNPM", "ACWDT": "ACWDT", "PDT": "PDT", "ChST": "ChST", "AKDT": "AKDT", "TMT": "TMT", "WIB": "WIB", "ART": "ART", "ADT": "ADT", "HNPMX": "HNPMX", "OEZ": "OEZ", "HAT": "HAT", "CDT": "CDT", "AWST": "AWST", "AWDT": "AWDT", "AKST": "AKST", "ACST": "ACST", "LHST": "LHST", "HNOG": "HNOG", "SAST": "SAST", "JST": "JST", "BOT": "BOT", "SRT": "SRT", "MESZ": "MESZ", "HECU": "HECU", "AST": "AST", "GMT": "GMT", "IST": "IST", "PST": "PST", "OESZ": "OESZ", "CAT": "CAT", "NZST": "NZST", "MEZ": "MEZ", "AEST": "AEST", "HNT": "HNT", "WART": "WART", "HKT": "HKT", "HENOMX": "HENOMX", "MYT": "MYT", "AEDT": "AEDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "COST": "COST", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "WEZ": "WEZ", "HKST": "HKST", "TMST": "TMST", "HADT": "HADT", "HNCU": "HNCU", "SGT": "SGT", "WAST": "WAST", "EDT": "EDT", "UYT": "UYT"}, - } - } -  -diff --git a/luy_KE/luy_KE.go b/luy_KE/luy_KE.go -index a509ae6..a39578e 100644 ---- a/luy_KE/luy_KE.go -+++ b/luy_KE/luy_KE.go -@@ -42,24 +42,13 @@ type luy_KE struct { - // New returns a new instance of translator for the 'luy_KE' locale - func New() locales.Translator { - return &luy_KE{ -- locale: "luy_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"J2", "J3", "J4", "J5", "Al", "Ij", "J1"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysWide: []string{"Jumapiri", "Jumatatu", "Jumanne", "Jumatano", "Murwa wa Kanne", "Murwa wa Katano", "Jumamosi"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Imberi ya Kuuza Kwa", "Muhiga Kuvita Kuuza"}, -- timezones: map[string]string{"JST": "JST", "HEEG": "HEEG", "WARST": "WARST", "COT": "COT", "SGT": "SGT", "AST": "AST", "COST": "COST", "HNOG": "HNOG", "AEST": "AEST", "MESZ": "MESZ", "LHST": "LHST", "HENOMX": "HENOMX", "MYT": "MYT", "PST": "PST", "AEDT": "AEDT", "CHADT": "CHADT", "CLT": "CLT", "BOT": "BOT", "HEPMX": "HEPMX", "UYT": "UYT", "∅∅∅": "∅∅∅", "ACST": "ACST", "EAT": "EAT", "WAT": "WAT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "WESZ": "WESZ", "HNPM": "HNPM", "WART": "WART", "HECU": "HECU", "AKST": "AKST", "HADT": "HADT", "CAT": "CAT", "EST": "EST", "CDT": "CDT", "UYST": "UYST", "SRT": "SRT", "ARST": "ARST", "AWDT": "AWDT", "CHAST": "CHAST", "HNCU": "HNCU", "ADT": "ADT", "HAST": "HAST", "WEZ": "WEZ", "ACWST": "ACWST", "WITA": "WITA", "HKST": "HKST", "CLST": "CLST", "MDT": "MDT", "HEPM": "HEPM", "MEZ": "MEZ", "ACDT": "ACDT", "VET": "VET", "PDT": "PDT", "IST": "IST", "TMST": "TMST", "GMT": "GMT", "GYT": "GYT", "ACWDT": "ACWDT", "HKT": "HKT", "LHDT": "LHDT", "NZST": "NZST", "SAST": "SAST", "CST": "CST", "ECT": "ECT", "WIT": "WIT", "ART": "ART", "HEOG": "HEOG", "GFT": "GFT", "ChST": "ChST", "OESZ": "OESZ", "BT": "BT", "EDT": "EDT", "MST": "MST", "AWST": "AWST", "NZDT": "NZDT", "TMT": "TMT", "HNEG": "HNEG", "OEZ": "OEZ", "WAST": "WAST", "WIB": "WIB", "HNT": "HNT", "HAT": "HAT", "JDT": "JDT", "AKDT": "AKDT"}, -+ locale: "luy_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "OESZ": "OESZ", "WART": "WART", "CLT": "CLT", "AST": "AST", "SRT": "SRT", "MESZ": "MESZ", "AWDT": "AWDT", "LHST": "LHST", "OEZ": "OEZ", "SAST": "SAST", "COT": "COT", "EDT": "EDT", "WITA": "WITA", "MST": "MST", "MYT": "MYT", "ACWST": "ACWST", "GFT": "GFT", "COST": "COST", "HKST": "HKST", "NZST": "NZST", "HENOMX": "HENOMX", "PST": "PST", "GYT": "GYT", "MDT": "MDT", "WARST": "WARST", "HAST": "HAST", "AEDT": "AEDT", "HECU": "HECU", "WAST": "WAST", "HAT": "HAT", "TMT": "TMT", "AWST": "AWST", "CHAST": "CHAST", "WEZ": "WEZ", "HADT": "HADT", "ACST": "ACST", "PDT": "PDT", "AEST": "AEST", "HNCU": "HNCU", "HEPMX": "HEPMX", "EST": "EST", "CAT": "CAT", "ARST": "ARST", "BOT": "BOT", "HKT": "HKT", "CST": "CST", "HEEG": "HEEG", "VET": "VET", "HEOG": "HEOG", "ChST": "ChST", "ART": "ART", "HNNOMX": "HNNOMX", "IST": "IST", "CDT": "CDT", "ECT": "ECT", "ACWDT": "ACWDT", "WAT": "WAT", "HNT": "HNT", "TMST": "TMST", "CHADT": "CHADT", "EAT": "EAT", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "HNOG": "HNOG", "CLST": "CLST", "WIB": "WIB", "ADT": "ADT", "GMT": "GMT", "HNPM": "HNPM", "BT": "BT", "WESZ": "WESZ", "SGT": "SGT", "AKDT": "AKDT", "WIT": "WIT", "NZDT": "NZDT", "MEZ": "MEZ", "UYST": "UYST", "HNPMX": "HNPMX", "AKST": "AKST", "ACDT": "ACDT", "HEPM": "HEPM", "JST": "JST", "UYT": "UYT", "JDT": "JDT"}, - } - } -  -@@ -105,7 +94,7 @@ func (luy *luy_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (luy *luy_KE) MonthsAbbreviated() []string { -- return luy.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -115,7 +104,7 @@ func (luy *luy_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (luy *luy_KE) MonthsNarrow() []string { -- return luy.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -125,7 +114,7 @@ func (luy *luy_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (luy *luy_KE) MonthsWide() []string { -- return luy.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,56 +174,7 @@ func (luy *luy_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := luy.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, luy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, luy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, luy.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, luy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'luy_KE' -@@ -243,64 +183,7 @@ func (luy *luy_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := luy.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, luy.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, luy.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, luy.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, luy.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'luy_KE' -@@ -308,27 +191,6 @@ func (luy *luy_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -337,17 +199,6 @@ func (luy *luy_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, luy.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -356,17 +207,6 @@ func (luy *luy_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, luy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -375,19 +215,6 @@ func (luy *luy_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, luy.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, luy.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -396,19 +223,6 @@ func (luy *luy_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -417,26 +231,6 @@ func (luy *luy_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -445,30 +239,6 @@ func (luy *luy_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -477,34 +247,5 @@ func (luy *luy_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, luy.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := luy.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/lv/lv.go b/lv/lv.go -index 37d204b..0f48017 100644 ---- a/lv/lv.go -+++ b/lv/lv.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"p.m.ē.", "m.ē."}, - erasNarrow: []string{"p.m.ē.", "m.ē."}, - erasWide: []string{"pirms mūsu ēras", "mūsu ērā"}, -- timezones: map[string]string{"CLST": "Čīles vasaras laiks", "EAT": "Austrumāfrikas laiks", "BT": "Butānas laiks", "WITA": "Centrālindonēzijas laiks", "JST": "Japānas ziemas laiks", "JDT": "Japānas vasaras laiks", "WAT": "Rietumāfrikas ziemas laiks", "LHDT": "Lorda Hava salas vasaras laiks", "SAST": "Dienvidāfrikas ziemas laiks", "MST": "MST", "HNOG": "Rietumgrenlandes ziemas laiks", "HEOG": "Rietumgrenlandes vasaras laiks", "HEPM": "Senpjēras un Mikelonas vasaras laiks", "COST": "Kolumbijas vasaras laiks", "AKDT": "Aļaskas vasaras laiks", "ADT": "Atlantijas vasaras laiks", "HADT": "Havaju–Aleutu vasaras laiks", "ARST": "Argentīnas vasaras laiks", "PST": "Klusā okeāna ziemas laiks", "BOT": "Bolīvijas laiks", "OESZ": "Austrumeiropas vasaras laiks", "ECT": "Ekvadoras laiks", "GYT": "Gajānas laiks", "EDT": "Austrumu vasaras laiks", "MDT": "MDT", "UYT": "Urugvajas ziemas laiks", "UYST": "Urugvajas vasaras laiks", "ChST": "Čamorra ziemas laiks", "HNNOMX": "Ziemeļrietumu Meksikas ziemas laiks", "WART": "Rietumargentīnas ziemas laiks", "SGT": "Singapūras laiks", "SRT": "Surinamas laiks", "HEPMX": "Meksikas Klusā okeāna piekrastes vasaras laiks", "TMT": "Turkmenistānas ziemas laiks", "TMST": "Turkmenistānas vasaras laiks", "CST": "Centrālais ziemas laiks", "WESZ": "Rietumeiropas vasaras laiks", "AEST": "Austrālijas austrumu ziemas laiks", "HNPM": "Senpjēras un Mikelonas ziemas laiks", "NZST": "Jaunzēlandes ziemas laiks", "HNEG": "Austrumgrenlandes ziemas laiks", "WEZ": "Rietumeiropas ziemas laiks", "EST": "Austrumu ziemas laiks", "AST": "Atlantijas ziemas laiks", "MYT": "Malaizijas laiks", "HAST": "Havaju–Aleutu ziemas laiks", "PDT": "Klusā okeāna vasaras laiks", "CHAST": "Četemas ziemas laiks", "IST": "Indijas ziemas laiks", "WAST": "Rietumāfrikas vasaras laiks", "ART": "Argentīnas ziemas laiks", "WIT": "Austrumindonēzijas laiks", "ACWDT": "Austrālijas centrālais rietumu vasaras laiks", "CHADT": "Četemas vasaras laiks", "MEZ": "Centrāleiropas ziemas laiks", "HENOMX": "Ziemeļrietumu Meksikas vasaras laiks", "GMT": "Griničas laiks", "HNT": "Ņūfaundlendas ziemas laiks", "HAT": "Ņūfaundlendas vasaras laiks", "NZDT": "Jaunzēlandes vasaras laiks", "∅∅∅": "Amazones vasaras laiks", "HNCU": "Kubas ziemas laiks", "AKST": "Aļaskas ziemas laiks", "CAT": "Centrālāfrikas laiks", "HECU": "Kubas vasaras laiks", "HNPMX": "Meksikas Klusā okeāna piekrastes ziemas laiks", "CDT": "Centrālais vasaras laiks", "HKST": "Honkongas vasaras laiks", "MESZ": "Centrāleiropas vasaras laiks", "HEEG": "Austrumgrenlandes vasaras laiks", "ACST": "Austrālijas centrālais ziemas laiks", "HKT": "Honkongas ziemas laiks", "OEZ": "Austrumeiropas ziemas laiks", "COT": "Kolumbijas ziemas laiks", "ACWST": "Austrālijas centrālais rietumu ziemas laiks", "AEDT": "Austrālijas austrumu vasaras laiks", "GFT": "Franču Gviānas laiks", "WARST": "Rietumargentīnas vasaras laiks", "VET": "Venecuēlas laiks", "ACDT": "Austrālijas centrālais vasaras laiks", "WIB": "Rietumindonēzijas laiks", "AWST": "Austrālijas rietumu ziemas laiks", "AWDT": "Austrālijas rietumu vasaras laiks", "LHST": "Lorda Hava salas ziemas laiks", "CLT": "Čīles ziemas laiks"}, -+ timezones: map[string]string{"NZST": "Jaunzēlandes ziemas laiks", "AWST": "Austrālijas rietumu ziemas laiks", "UYT": "Urugvajas ziemas laiks", "HAT": "Ņūfaundlendas vasaras laiks", "WART": "Rietumargentīnas ziemas laiks", "GYT": "Gajānas laiks", "WITA": "Centrālindonēzijas laiks", "ECT": "Ekvadoras laiks", "EAT": "Austrumāfrikas laiks", "HAST": "Havaju–Aleutu ziemas laiks", "HNPMX": "Meksikas Klusā okeāna piekrastes ziemas laiks", "WAST": "Rietumāfrikas vasaras laiks", "CLT": "Čīles ziemas laiks", "CDT": "Centrālais vasaras laiks", "VET": "Venecuēlas laiks", "HENOMX": "Ziemeļrietumu Meksikas vasaras laiks", "JST": "Japānas ziemas laiks", "AEST": "Austrālijas austrumu ziemas laiks", "HEEG": "Austrumgrenlandes vasaras laiks", "ACWST": "Austrālijas centrālais rietumu ziemas laiks", "COT": "Kolumbijas ziemas laiks", "TMST": "Turkmenistānas vasaras laiks", "CST": "Centrālais ziemas laiks", "HADT": "Havaju–Aleutu vasaras laiks", "WEZ": "Rietumeiropas ziemas laiks", "HNT": "Ņūfaundlendas ziemas laiks", "ACST": "Austrālijas centrālais ziemas laiks", "SAST": "Dienvidāfrikas ziemas laiks", "COST": "Kolumbijas vasaras laiks", "NZDT": "Jaunzēlandes vasaras laiks", "GMT": "Griničas laiks", "HNCU": "Kubas ziemas laiks", "AKDT": "Aļaskas vasaras laiks", "GFT": "Franču Gviānas laiks", "WIT": "Austrumindonēzijas laiks", "HNNOMX": "Ziemeļrietumu Meksikas ziemas laiks", "LHST": "Lorda Hava salas ziemas laiks", "HNPM": "Senpjēras un Mikelonas ziemas laiks", "AEDT": "Austrālijas austrumu vasaras laiks", "ARST": "Argentīnas vasaras laiks", "MESZ": "Centrāleiropas vasaras laiks", "HEPM": "Senpjēras un Mikelonas vasaras laiks", "WESZ": "Rietumeiropas vasaras laiks", "AKST": "Aļaskas ziemas laiks", "OESZ": "Austrumeiropas vasaras laiks", "HKST": "Honkongas vasaras laiks", "OEZ": "Austrumeiropas ziemas laiks", "MEZ": "Centrāleiropas ziemas laiks", "LHDT": "Lorda Hava salas vasaras laiks", "CHAST": "Četemas ziemas laiks", "MYT": "Malaizijas laiks", "JDT": "Japānas vasaras laiks", "CLST": "Čīles vasaras laiks", "WIB": "Rietumindonēzijas laiks", "SRT": "Surinamas laiks", "ACDT": "Austrālijas centrālais vasaras laiks", "WARST": "Rietumargentīnas vasaras laiks", "EDT": "Austrumu vasaras laiks", "PST": "Klusā okeāna ziemas laiks", "HECU": "Kubas vasaras laiks", "HNOG": "Rietumgrenlandes ziemas laiks", "MST": "MST", "ART": "Argentīnas ziemas laiks", "ChST": "Čamorra ziemas laiks", "PDT": "Klusā okeāna vasaras laiks", "CHADT": "Četemas vasaras laiks", "HEOG": "Rietumgrenlandes vasaras laiks", "HKT": "Honkongas ziemas laiks", "MDT": "MDT", "ADT": "Atlantijas vasaras laiks", "WAT": "Rietumāfrikas ziemas laiks", "EST": "Austrumu ziemas laiks", "UYST": "Urugvajas vasaras laiks", "IST": "Indijas ziemas laiks", "BT": "Butānas laiks", "ACWDT": "Austrālijas centrālais rietumu vasaras laiks", "SGT": "Singapūras laiks", "HEPMX": "Meksikas Klusā okeāna piekrastes vasaras laiks", "∅∅∅": "Amazones vasaras laiks", "BOT": "Bolīvijas laiks", "TMT": "Turkmenistānas ziemas laiks", "CAT": "Centrālāfrikas laiks", "HNEG": "Austrumgrenlandes ziemas laiks", "AST": "Atlantijas ziemas laiks", "AWDT": "Austrālijas rietumu vasaras laiks"}, - } - } -  -@@ -102,8 +102,8 @@ func (lv *lv) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - f := locales.F(n, v) - nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -- fMod10 := f % 10 - fMod100 := f % 100 -+ fMod10 := f % 10 -  - if (nMod10 == 0) || (nMod100 >= 11 && nMod100 <= 19) || (v == 2 && fMod100 >= 11 && fMod100 <= 19) { - return locales.PluralRuleZero -diff --git a/lv_LV/lv_LV.go b/lv_LV/lv_LV.go -index e650379..f0ba2a1 100644 ---- a/lv_LV/lv_LV.go -+++ b/lv_LV/lv_LV.go -@@ -10,68 +10,45 @@ import ( - ) -  - type lv_LV struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'lv_LV' locale - func New() locales.Translator { - return &lv_LV{ -- locale: "lv_LV", -- pluralsCardinal: []locales.PluralRule{1, 2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "janv.", "febr.", "marts", "apr.", "maijs", "jūn.", "jūl.", "aug.", "sept.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janvāris", "februāris", "marts", "aprīlis", "maijs", "jūnijs", "jūlijs", "augusts", "septembris", "oktobris", "novembris", "decembris"}, -- daysAbbreviated: []string{"svētd.", "pirmd.", "otrd.", "trešd.", "ceturtd.", "piektd.", "sestd."}, -- daysNarrow: []string{"S", "P", "O", "T", "C", "P", "S"}, -- daysShort: []string{"Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se"}, -- daysWide: []string{"svētdiena", "pirmdiena", "otrdiena", "trešdiena", "ceturtdiena", "piektdiena", "sestdiena"}, -- periodsAbbreviated: []string{"priekšp.", "pēcp."}, -- periodsNarrow: []string{"priekšp.", "pēcp."}, -- periodsWide: []string{"priekšpusdienā", "pēcpusdienā"}, -- erasAbbreviated: []string{"p.m.ē.", "m.ē."}, -- erasNarrow: []string{"p.m.ē.", "m.ē."}, -- erasWide: []string{"pirms mūsu ēras", "mūsu ērā"}, -- timezones: map[string]string{"HEOG": "Rietumgrenlandes vasaras laiks", "PST": "Klusā okeāna ziemas laiks", "WART": "Rietumargentīnas ziemas laiks", "ADT": "Atlantijas vasaras laiks", "HNT": "Ņūfaundlendas ziemas laiks", "JST": "Japānas ziemas laiks", "WAST": "Rietumāfrikas vasaras laiks", "OEZ": "Austrumeiropas ziemas laiks", "SGT": "Singapūras laiks", "AEDT": "Austrālijas austrumu vasaras laiks", "CHADT": "Četemas vasaras laiks", "BOT": "Bolīvijas laiks", "WARST": "Rietumargentīnas vasaras laiks", "AKST": "Aļaskas ziemas laiks", "GYT": "Gajānas laiks", "MYT": "Malaizijas laiks", "ART": "Argentīnas ziemas laiks", "HKT": "Honkongas ziemas laiks", "IST": "Indijas ziemas laiks", "TMT": "Turkmenistānas ziemas laiks", "AST": "Atlantijas ziemas laiks", "HNEG": "Austrumgrenlandes ziemas laiks", "TMST": "Turkmenistānas vasaras laiks", "EAT": "Austrumāfrikas laiks", "HADT": "Havaju–Aleutu vasaras laiks", "AWDT": "Austrālijas rietumu vasaras laiks", "CHAST": "Četemas ziemas laiks", "CLT": "Čīles ziemas laiks", "∅∅∅": "Amazones vasaras laiks", "OESZ": "Austrumeiropas vasaras laiks", "HENOMX": "Ziemeļrietumu Meksikas vasaras laiks", "HNPMX": "Meksikas Klusā okeāna piekrastes ziemas laiks", "WIB": "Rietumindonēzijas laiks", "PDT": "Klusā okeāna vasaras laiks", "WITA": "Centrālindonēzijas laiks", "NZDT": "Jaunzēlandes vasaras laiks", "MESZ": "Centrāleiropas vasaras laiks", "CAT": "Centrālāfrikas laiks", "EDT": "Austrumu vasaras laiks", "ACWDT": "Austrālijas centrālais rietumu vasaras laiks", "HKST": "Honkongas vasaras laiks", "MEZ": "Centrāleiropas ziemas laiks", "ACDT": "Austrālijas centrālais vasaras laiks", "COST": "Kolumbijas vasaras laiks", "HNOG": "Rietumgrenlandes ziemas laiks", "AEST": "Austrālijas austrumu ziemas laiks", "LHST": "Lorda Hava salas ziemas laiks", "HNNOMX": "Ziemeļrietumu Meksikas ziemas laiks", "HECU": "Kubas vasaras laiks", "WEZ": "Rietumeiropas ziemas laiks", "HNPM": "Senpjēras un Mikelonas ziemas laiks", "NZST": "Jaunzēlandes ziemas laiks", "HEPMX": "Meksikas Klusā okeāna piekrastes vasaras laiks", "UYST": "Urugvajas vasaras laiks", "AKDT": "Aļaskas vasaras laiks", "WIT": "Austrumindonēzijas laiks", "BT": "Butānas laiks", "HEPM": "Senpjēras un Mikelonas vasaras laiks", "ECT": "Ekvadoras laiks", "HNCU": "Kubas ziemas laiks", "ARST": "Argentīnas vasaras laiks", "CLST": "Čīles vasaras laiks", "CDT": "Centrālais vasaras laiks", "EST": "Austrumu ziemas laiks", "HAST": "Havaju–Aleutu ziemas laiks", "SRT": "Surinamas laiks", "JDT": "Japānas vasaras laiks", "GMT": "Griničas laiks", "MST": "MST", "SAST": "Dienvidāfrikas ziemas laiks", "ChST": "Čamorra ziemas laiks", "ACST": "Austrālijas centrālais ziemas laiks", "COT": "Kolumbijas ziemas laiks", "MDT": "MDT", "GFT": "Franču Gviānas laiks", "CST": "Centrālais ziemas laiks", "UYT": "Urugvajas ziemas laiks", "VET": "Venecuēlas laiks", "WESZ": "Rietumeiropas vasaras laiks", "AWST": "Austrālijas rietumu ziemas laiks", "LHDT": "Lorda Hava salas vasaras laiks", "HEEG": "Austrumgrenlandes vasaras laiks", "HAT": "Ņūfaundlendas vasaras laiks", "WAT": "Rietumāfrikas ziemas laiks", "ACWST": "Austrālijas centrālais rietumu ziemas laiks"}, -+ locale: "lv_LV", -+ pluralsCardinal: []locales.PluralRule{1, 2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "AEDT": "AEDT", "CHAST": "CHAST", "TMST": "TMST", "GMT": "GMT", "AWST": "AWST", "AWDT": "AWDT", "ACWST": "ACWST", "HNPMX": "HNPMX", "GFT": "GFT", "WART": "WART", "WIB": "WIB", "EAT": "EAT", "MYT": "MYT", "HNCU": "HNCU", "AKDT": "AKDT", "GYT": "GYT", "HKST": "HKST", "ACST": "ACST", "PDT": "PDT", "COST": "COST", "HNOG": "HNOG", "CAT": "CAT", "CST": "CST", "HAST": "HAST", "HNNOMX": "HNNOMX", "UYT": "UYT", "BT": "BT", "WEZ": "WEZ", "WESZ": "WESZ", "CLST": "CLST", "SRT": "SRT", "SGT": "SGT", "WAT": "WAT", "EST": "EST", "ChST": "ChST", "JST": "JST", "AEST": "AEST", "∅∅∅": "∅∅∅", "HNT": "HNT", "ART": "ART", "ARST": "ARST", "CLT": "CLT", "HEPM": "HEPM", "NZDT": "NZDT", "MESZ": "MESZ", "LHDT": "LHDT", "UYST": "UYST", "HECU": "HECU", "TMT": "TMT", "MEZ": "MEZ", "IST": "IST", "PST": "PST", "WARST": "WARST", "EDT": "EDT", "ECT": "ECT", "WIT": "WIT", "HNEG": "HNEG", "HEEG": "HEEG", "HNPM": "HNPM", "CHADT": "CHADT", "VET": "VET", "OEZ": "OEZ", "OESZ": "OESZ", "SAST": "SAST", "CDT": "CDT", "ADT": "ADT", "MDT": "MDT", "HADT": "HADT", "JDT": "JDT", "HEPMX": "HEPMX", "COT": "COT", "BOT": "BOT", "ACDT": "ACDT", "LHST": "LHST", "WAST": "WAST", "AKST": "AKST", "NZST": "NZST", "AST": "AST", "MST": "MST", "ACWDT": "ACWDT", "HAT": "HAT", "HEOG": "HEOG", "HKT": "HKT", "WITA": "WITA"}, - } - } -  -@@ -102,8 +79,8 @@ func (lv *lv_LV) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - f := locales.F(n, v) - nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -- fMod100 := f % 100 - fMod10 := f % 10 -+ fMod100 := f % 100 -  - if (nMod10 == 0) || (nMod100 >= 11 && nMod100 <= 19) || (v == 2 && fMod100 >= 11 && fMod100 <= 19) { - return locales.PluralRuleZero -@@ -154,7 +131,7 @@ func (lv *lv_LV) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (lv *lv_LV) MonthsAbbreviated() []string { -- return lv.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -164,7 +141,7 @@ func (lv *lv_LV) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (lv *lv_LV) MonthsNarrow() []string { -- return lv.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -174,7 +151,7 @@ func (lv *lv_LV) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (lv *lv_LV) MonthsWide() []string { -- return lv.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -220,75 +197,13 @@ func (lv *lv_LV) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'lv_LV' and handles both Whole and Real numbers based on 'v' - func (lv *lv_LV) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(lv.group) - 1; j >= 0; j-- { -- b = append(b, lv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lv.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'lv_LV' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (lv *lv_LV) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lv.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lv.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, lv.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lv_LV' -@@ -296,58 +211,7 @@ func (lv *lv_LV) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lv.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(lv.group) - 1; j >= 0; j-- { -- b = append(b, lv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, lv.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, lv.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lv_LV' -@@ -356,65 +220,7 @@ func (lv *lv_LV) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := lv.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, lv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(lv.group) - 1; j >= 0; j-- { -- b = append(b, lv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, lv.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, lv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, lv.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, lv.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'lv_LV' -@@ -422,27 +228,6 @@ func (lv *lv_LV) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -451,18 +236,6 @@ func (lv *lv_LV) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20, 0x67, 0x61, 0x64, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lv.monthsAbbreviated[t.Month()]...) -- - return string(b) - } -  -@@ -471,18 +244,6 @@ func (lv *lv_LV) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20, 0x67, 0x61, 0x64, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lv.monthsWide[t.Month()]...) -- - return string(b) - } -  -@@ -491,21 +252,6 @@ func (lv *lv_LV) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, lv.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e, 0x20, 0x67, 0x61, 0x64, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, lv.monthsWide[t.Month()]...) -- - return string(b) - } -  -@@ -514,19 +260,6 @@ func (lv *lv_LV) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -535,26 +268,6 @@ func (lv *lv_LV) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -563,30 +276,6 @@ func (lv *lv_LV) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -595,34 +284,5 @@ func (lv *lv_LV) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, lv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := lv.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mas/mas.go b/mas/mas.go -index 99de2b8..0018002 100644 ---- a/mas/mas.go -+++ b/mas/mas.go -@@ -62,7 +62,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"MY", "EY"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Meínō Yɛ́sʉ", "Eínō Yɛ́sʉ"}, -- timezones: map[string]string{"LHST": "LHST", "HEEG": "HEEG", "CAT": "CAT", "ADT": "ADT", "MYT": "MYT", "ACWDT": "ACWDT", "MEZ": "MEZ", "IST": "IST", "OEZ": "OEZ", "HKT": "HKT", "HEPM": "HEPM", "HNEG": "HNEG", "TMST": "TMST", "WIB": "WIB", "MESZ": "MESZ", "HNCU": "HNCU", "WARST": "WARST", "PST": "PST", "AEDT": "AEDT", "SAST": "SAST", "ChST": "ChST", "COT": "COT", "AKDT": "AKDT", "CDT": "CDT", "WIT": "WIT", "HNOG": "HNOG", "CLT": "CLT", "WAST": "WAST", "COST": "COST", "NZST": "NZST", "ECT": "ECT", "WAT": "WAT", "HENOMX": "HENOMX", "WART": "WART", "MDT": "MDT", "SRT": "SRT", "ARST": "ARST", "LHDT": "LHDT", "CLST": "CLST", "EAT": "EAT", "GMT": "GMT", "MST": "MST", "EDT": "EDT", "UYST": "UYST", "HEOG": "HEOG", "TMT": "TMT", "ACDT": "ACDT", "AWST": "AWST", "PDT": "PDT", "AWDT": "AWDT", "WITA": "WITA", "AEST": "AEST", "GFT": "GFT", "HECU": "HECU", "HNNOMX": "HNNOMX", "UYT": "UYT", "WEZ": "WEZ", "ACWST": "ACWST", "HAT": "HAT", "BOT": "BOT", "ACST": "ACST", "JDT": "JDT", "OESZ": "OESZ", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "GYT": "GYT", "ART": "ART", "EST": "EST", "AKST": "AKST", "JST": "JST", "HNPM": "HNPM", "BT": "BT", "WESZ": "WESZ", "HNT": "HNT", "HKST": "HKST", "SGT": "SGT", "HAST": "HAST", "CST": "CST", "AST": "AST", "VET": "VET", "HADT": "HADT", "NZDT": "NZDT", "CHAST": "CHAST"}, -+ timezones: map[string]string{"AEST": "AEST", "HNPMX": "HNPMX", "HEOG": "HEOG", "HADT": "HADT", "BT": "BT", "WIT": "WIT", "TMT": "TMT", "HKT": "HKT", "CLST": "CLST", "WIB": "WIB", "SRT": "SRT", "HAST": "HAST", "HECU": "HECU", "ACWST": "ACWST", "WEZ": "WEZ", "GFT": "GFT", "HNOG": "HNOG", "GYT": "GYT", "BOT": "BOT", "MESZ": "MESZ", "WART": "WART", "EDT": "EDT", "EAT": "EAT", "WAST": "WAST", "IST": "IST", "HNCU": "HNCU", "TMST": "TMST", "MST": "MST", "LHST": "LHST", "SGT": "SGT", "AKDT": "AKDT", "OEZ": "OEZ", "NZST": "NZST", "MYT": "MYT", "ECT": "ECT", "MDT": "MDT", "ART": "ART", "GMT": "GMT", "JST": "JST", "ACST": "ACST", "ACDT": "ACDT", "AWST": "AWST", "COST": "COST", "HEEG": "HEEG", "AEDT": "AEDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "HAT": "HAT", "COT": "COT", "ADT": "ADT", "HENOMX": "HENOMX", "PST": "PST", "SAST": "SAST", "LHDT": "LHDT", "MEZ": "MEZ", "AWDT": "AWDT", "EST": "EST", "CLT": "CLT", "HNNOMX": "HNNOMX", "WAT": "WAT", "OESZ": "OESZ", "WARST": "WARST", "HKST": "HKST", "CST": "CST", "CDT": "CDT", "ChST": "ChST", "HNPM": "HNPM", "ARST": "ARST", "HEPM": "HEPM", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "AKST": "AKST", "HNT": "HNT", "CAT": "CAT", "NZDT": "NZDT", "HNEG": "HNEG", "CHADT": "CHADT", "UYST": "UYST", "PDT": "PDT", "WITA": "WITA", "JDT": "JDT", "VET": "VET", "WESZ": "WESZ", "AST": "AST", "UYT": "UYT"}, - } - } -  -diff --git a/mas_KE/mas_KE.go b/mas_KE/mas_KE.go -index ea074a0..7f4b074 100644 ---- a/mas_KE/mas_KE.go -+++ b/mas_KE/mas_KE.go -@@ -10,59 +10,45 @@ import ( - ) -  - type mas_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mas_KE' locale - func New() locales.Translator { - return &mas_KE{ -- locale: "mas_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Dal", "Ará", "Ɔɛn", "Doy", "Lép", "Rok", "Sás", "Bɔ́r", "Kús", "Gís", "Shʉ́", "Ntʉ́"}, -- monthsWide: []string{"", "Oladalʉ́", "Arát", "Ɔɛnɨ́ɔɨŋɔk", "Olodoyíóríê inkókúâ", "Oloilépūnyīē inkókúâ", "Kújúɔrɔk", "Mórusásin", "Ɔlɔ́ɨ́bɔ́rárɛ", "Kúshîn", "Olgísan", "Pʉshʉ́ka", "Ntʉ́ŋʉ́s"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"2", "3", "4", "5", "6", "7", "1"}, -- daysWide: []string{"Jumapílí", "Jumatátu", "Jumane", "Jumatánɔ", "Alaámisi", "Jumáa", "Jumamósi"}, -- periodsAbbreviated: []string{"Ɛnkakɛnyá", "Ɛndámâ"}, -- periodsWide: []string{"Ɛnkakɛnyá", "Ɛndámâ"}, -- erasAbbreviated: []string{"MY", "EY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Meínō Yɛ́sʉ", "Eínō Yɛ́sʉ"}, -- timezones: map[string]string{"AWDT": "AWDT", "NZST": "NZST", "HNEG": "HNEG", "LHDT": "LHDT", "ChST": "ChST", "CAT": "CAT", "ECT": "ECT", "SGT": "SGT", "HNCU": "HNCU", "HECU": "HECU", "ADT": "ADT", "HAST": "HAST", "ACWST": "ACWST", "COST": "COST", "ACST": "ACST", "GMT": "GMT", "MST": "MST", "MDT": "MDT", "ART": "ART", "NZDT": "NZDT", "HEEG": "HEEG", "TMST": "TMST", "EAT": "EAT", "WAT": "WAT", "WAST": "WAST", "HNPMX": "HNPMX", "PDT": "PDT", "ACWDT": "ACWDT", "HAT": "HAT", "AST": "AST", "HNT": "HNT", "ARST": "ARST", "JDT": "JDT", "ACDT": "ACDT", "OEZ": "OEZ", "OESZ": "OESZ", "HENOMX": "HENOMX", "CHADT": "CHADT", "VET": "VET", "SRT": "SRT", "WEZ": "WEZ", "WESZ": "WESZ", "AWST": "AWST", "HEPM": "HEPM", "LHST": "LHST", "PST": "PST", "MESZ": "MESZ", "EST": "EST", "AKST": "AKST", "WIT": "WIT", "HEOG": "HEOG", "BOT": "BOT", "COT": "COT", "WARST": "WARST", "UYST": "UYST", "WIB": "WIB", "HNOG": "HNOG", "AEDT": "AEDT", "IST": "IST", "JST": "JST", "WART": "WART", "EDT": "EDT", "AKDT": "AKDT", "HADT": "HADT", "BT": "BT", "TMT": "TMT", "HEPMX": "HEPMX", "CDT": "CDT", "HKST": "HKST", "MEZ": "MEZ", "GFT": "GFT", "UYT": "UYT", "CST": "CST", "GYT": "GYT", "AEST": "AEST", "HKT": "HKT", "HNPM": "HNPM", "SAST": "SAST", "∅∅∅": "∅∅∅", "WITA": "WITA", "CHAST": "CHAST", "CLT": "CLT", "CLST": "CLST", "MYT": "MYT", "HNNOMX": "HNNOMX"}, -+ locale: "mas_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MESZ": "MESZ", "ACST": "ACST", "UYT": "UYT", "PDT": "PDT", "HNCU": "HNCU", "WIT": "WIT", "NZDT": "NZDT", "NZST": "NZST", "HEPM": "HEPM", "AWDT": "AWDT", "WESZ": "WESZ", "WARST": "WARST", "CAT": "CAT", "CLT": "CLT", "CST": "CST", "HAST": "HAST", "HENOMX": "HENOMX", "AEDT": "AEDT", "CHAST": "CHAST", "HAT": "HAT", "EST": "EST", "ADT": "ADT", "LHDT": "LHDT", "PST": "PST", "WART": "WART", "CDT": "CDT", "ARST": "ARST", "ACWST": "ACWST", "IST": "IST", "BT": "BT", "COT": "COT", "COST": "COST", "TMT": "TMT", "WITA": "WITA", "AST": "AST", "BOT": "BOT", "EAT": "EAT", "HNPM": "HNPM", "HNOG": "HNOG", "WIB": "WIB", "MDT": "MDT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "HNPMX": "HNPMX", "GYT": "GYT", "HEEG": "HEEG", "ACWDT": "ACWDT", "AEST": "AEST", "SGT": "SGT", "AKST": "AKST", "EDT": "EDT", "JST": "JST", "AWST": "AWST", "HNT": "HNT", "CLST": "CLST", "CHADT": "CHADT", "VET": "VET", "MST": "MST", "SRT": "SRT", "HNEG": "HNEG", "MYT": "MYT", "ECT": "ECT", "LHST": "LHST", "∅∅∅": "∅∅∅", "HECU": "HECU", "HEPMX": "HEPMX", "WAST": "WAST", "ART": "ART", "HADT": "HADT", "UYST": "UYST", "HKT": "HKT", "HKST": "HKST", "GMT": "GMT", "ChST": "ChST", "ACDT": "ACDT", "JDT": "JDT", "WAT": "WAT", "AKDT": "AKDT", "OESZ": "OESZ", "HEOG": "HEOG", "SAST": "SAST", "WEZ": "WEZ", "OEZ": "OEZ", "GFT": "GFT", "TMST": "TMST"}, - } - } -  -@@ -115,7 +101,7 @@ func (mas *mas_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mas *mas_KE) MonthsAbbreviated() []string { -- return mas.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +121,7 @@ func (mas *mas_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mas *mas_KE) MonthsWide() []string { -- return mas.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -195,56 +181,7 @@ func (mas *mas_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mas.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mas.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mas.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mas.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mas_KE' -@@ -253,68 +190,7 @@ func (mas *mas_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mas.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mas.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mas.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mas.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, mas.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mas_KE' -@@ -322,27 +198,6 @@ func (mas *mas_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -351,17 +206,6 @@ func (mas *mas_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mas.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -370,17 +214,6 @@ func (mas *mas_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mas.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -389,19 +222,6 @@ func (mas *mas_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mas.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mas.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -410,19 +230,6 @@ func (mas *mas_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -431,26 +238,6 @@ func (mas *mas_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -459,30 +246,6 @@ func (mas *mas_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -491,34 +254,5 @@ func (mas *mas_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mas.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mas_TZ/mas_TZ.go b/mas_TZ/mas_TZ.go -index c91af3a..2af96a9 100644 ---- a/mas_TZ/mas_TZ.go -+++ b/mas_TZ/mas_TZ.go -@@ -10,59 +10,45 @@ import ( - ) -  - type mas_TZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mas_TZ' locale - func New() locales.Translator { - return &mas_TZ{ -- locale: "mas_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TSh", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Dal", "Ará", "Ɔɛn", "Doy", "Lép", "Rok", "Sás", "Bɔ́r", "Kús", "Gís", "Shʉ́", "Ntʉ́"}, -- monthsWide: []string{"", "Oladalʉ́", "Arát", "Ɔɛnɨ́ɔɨŋɔk", "Olodoyíóríê inkókúâ", "Oloilépūnyīē inkókúâ", "Kújúɔrɔk", "Mórusásin", "Ɔlɔ́ɨ́bɔ́rárɛ", "Kúshîn", "Olgísan", "Pʉshʉ́ka", "Ntʉ́ŋʉ́s"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"2", "3", "4", "5", "6", "7", "1"}, -- daysWide: []string{"Jumapílí", "Jumatátu", "Jumane", "Jumatánɔ", "Alaámisi", "Jumáa", "Jumamósi"}, -- periodsAbbreviated: []string{"Ɛnkakɛnyá", "Ɛndámâ"}, -- periodsWide: []string{"Ɛnkakɛnyá", "Ɛndámâ"}, -- erasAbbreviated: []string{"MY", "EY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Meínō Yɛ́sʉ", "Eínō Yɛ́sʉ"}, -- timezones: map[string]string{"UYST": "UYST", "HEOG": "HEOG", "PST": "PST", "LHDT": "LHDT", "EAT": "EAT", "COST": "COST", "CST": "CST", "SRT": "SRT", "AWST": "AWST", "CLST": "CLST", "EST": "EST", "CDT": "CDT", "ADT": "ADT", "WEZ": "WEZ", "MEZ": "MEZ", "JDT": "JDT", "COT": "COT", "MDT": "MDT", "HNT": "HNT", "ACWDT": "ACWDT", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "TMT": "TMT", "CAT": "CAT", "AKST": "AKST", "AKDT": "AKDT", "ARST": "ARST", "HKST": "HKST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "AEDT": "AEDT", "CLT": "CLT", "TMST": "TMST", "WAT": "WAT", "WART": "WART", "HECU": "HECU", "CHADT": "CHADT", "SAST": "SAST", "GFT": "GFT", "ChST": "ChST", "HENOMX": "HENOMX", "GMT": "GMT", "HNPMX": "HNPMX", "MYT": "MYT", "VET": "VET", "BT": "BT", "HNOG": "HNOG", "LHST": "LHST", "OEZ": "OEZ", "WAST": "WAST", "GYT": "GYT", "HNPM": "HNPM", "BOT": "BOT", "ACST": "ACST", "MST": "MST", "MESZ": "MESZ", "IST": "IST", "ART": "ART", "NZST": "NZST", "ACDT": "ACDT", "WIB": "WIB", "WIT": "WIT", "HAT": "HAT", "CHAST": "CHAST", "NZDT": "NZDT", "WARST": "WARST", "EDT": "EDT", "HADT": "HADT", "WESZ": "WESZ", "ACWST": "ACWST", "HEEG": "HEEG", "SGT": "SGT", "AST": "AST", "AEST": "AEST", "HKT": "HKT", "OESZ": "OESZ", "ECT": "ECT", "HAST": "HAST", "JST": "JST", "HNEG": "HNEG", "UYT": "UYT", "PDT": "PDT", "WITA": "WITA", "AWDT": "AWDT", "HNCU": "HNCU"}, -+ locale: "mas_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TSh", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "PST": "PST", "PDT": "PDT", "ACWDT": "ACWDT", "VET": "VET", "NZDT": "NZDT", "ADT": "ADT", "HNEG": "HNEG", "OEZ": "OEZ", "HAT": "HAT", "HEOG": "HEOG", "HEPM": "HEPM", "SGT": "SGT", "EDT": "EDT", "WITA": "WITA", "NZST": "NZST", "MYT": "MYT", "JST": "JST", "TMT": "TMT", "CST": "CST", "ChST": "ChST", "HENOMX": "HENOMX", "CLST": "CLST", "WAT": "WAT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "AKST": "AKST", "WART": "WART", "WARST": "WARST", "AST": "AST", "HADT": "HADT", "ACST": "ACST", "IST": "IST", "BT": "BT", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "LHST": "LHST", "SRT": "SRT", "MESZ": "MESZ", "CHADT": "CHADT", "UYT": "UYT", "HNCU": "HNCU", "MST": "MST", "ECT": "ECT", "ART": "ART", "MEZ": "MEZ", "HECU": "HECU", "HNOG": "HNOG", "MDT": "MDT", "WESZ": "WESZ", "GMT": "GMT", "EAT": "EAT", "HAST": "HAST", "HKT": "HKT", "WEZ": "WEZ", "EST": "EST", "CDT": "CDT", "CHAST": "CHAST", "AWDT": "AWDT", "HNPM": "HNPM", "UYST": "UYST", "GYT": "GYT", "HKST": "HKST", "AWST": "AWST", "JDT": "JDT", "ACWST": "ACWST", "AEDT": "AEDT", "HNT": "HNT", "WIT": "WIT", "CAT": "CAT", "CLT": "CLT", "ACDT": "ACDT", "ARST": "ARST", "HNNOMX": "HNNOMX", "AEST": "AEST", "WAST": "WAST", "GFT": "GFT", "SAST": "SAST", "COST": "COST", "BOT": "BOT", "HEEG": "HEEG", "COT": "COT", "TMST": "TMST", "WIB": "WIB", "AKDT": "AKDT"}, - } - } -  -@@ -115,7 +101,7 @@ func (mas *mas_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mas *mas_TZ) MonthsAbbreviated() []string { -- return mas.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +121,7 @@ func (mas *mas_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mas *mas_TZ) MonthsWide() []string { -- return mas.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -195,56 +181,7 @@ func (mas *mas_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mas.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mas.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mas.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mas.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mas_TZ' -@@ -253,68 +190,7 @@ func (mas *mas_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mas.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mas.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mas.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mas.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mas.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, mas.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mas_TZ' -@@ -322,27 +198,6 @@ func (mas *mas_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -351,17 +206,6 @@ func (mas *mas_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mas.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -370,17 +214,6 @@ func (mas *mas_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mas.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -389,19 +222,6 @@ func (mas *mas_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mas.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mas.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -410,19 +230,6 @@ func (mas *mas_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -431,26 +238,6 @@ func (mas *mas_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -459,30 +246,6 @@ func (mas *mas_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -491,34 +254,5 @@ func (mas *mas_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mas.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mas.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mer/mer.go b/mer/mer.go -index 3e4f8b3..3f59b4e 100644 ---- a/mer/mer.go -+++ b/mer/mer.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"MK", "NK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Mbere ya Kristũ", "Nyuma ya Kristũ"}, -- timezones: map[string]string{"HEPM": "HEPM", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "CDT": "CDT", "WIT": "WIT", "LHST": "LHST", "COT": "COT", "HAST": "HAST", "HAT": "HAT", "PST": "PST", "TMST": "TMST", "HNEG": "HNEG", "HEEG": "HEEG", "EST": "EST", "AKST": "AKST", "HNOG": "HNOG", "PDT": "PDT", "WEZ": "WEZ", "ACWDT": "ACWDT", "WITA": "WITA", "AWDT": "AWDT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "HECU": "HECU", "ARST": "ARST", "ACWST": "ACWST", "WART": "WART", "HADT": "HADT", "BT": "BT", "ART": "ART", "JST": "JST", "ChST": "ChST", "ACDT": "ACDT", "UYT": "UYT", "VET": "VET", "HEOG": "HEOG", "AEST": "AEST", "AEDT": "AEDT", "HNPM": "HNPM", "ACST": "ACST", "CAT": "CAT", "MDT": "MDT", "ADT": "ADT", "MEZ": "MEZ", "CLT": "CLT", "BOT": "BOT", "EAT": "EAT", "WARST": "WARST", "GMT": "GMT", "SRT": "SRT", "MESZ": "MESZ", "LHDT": "LHDT", "TMT": "TMT", "EDT": "EDT", "MYT": "MYT", "HKST": "HKST", "NZST": "NZST", "WAST": "WAST", "HNCU": "HNCU", "GYT": "GYT", "UYST": "UYST", "WESZ": "WESZ", "HKT": "HKT", "CHADT": "CHADT", "WAT": "WAT", "CLST": "CLST", "OEZ": "OEZ", "OESZ": "OESZ", "AWST": "AWST", "JDT": "JDT", "COST": "COST", "CST": "CST", "GFT": "GFT", "HNPMX": "HNPMX", "AKDT": "AKDT", "WIB": "WIB", "HNT": "HNT", "SAST": "SAST", "ECT": "ECT", "HENOMX": "HENOMX", "AST": "AST", "IST": "IST", "SGT": "SGT", "MST": "MST"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "HNOG": "HNOG", "ACWST": "ACWST", "AEST": "AEST", "UYT": "UYT", "HECU": "HECU", "HEPMX": "HEPMX", "WIT": "WIT", "COST": "COST", "HAST": "HAST", "ACST": "ACST", "PST": "PST", "OEZ": "OEZ", "EAT": "EAT", "IST": "IST", "MYT": "MYT", "ACWDT": "ACWDT", "WITA": "WITA", "MDT": "MDT", "ARST": "ARST", "HNNOMX": "HNNOMX", "UYST": "UYST", "WEZ": "WEZ", "WART": "WART", "HEOG": "HEOG", "WIB": "WIB", "MESZ": "MESZ", "EST": "EST", "EDT": "EDT", "CST": "CST", "ECT": "ECT", "ChST": "ChST", "ART": "ART", "SAST": "SAST", "SGT": "SGT", "GYT": "GYT", "HKST": "HKST", "HNEG": "HNEG", "WAT": "WAT", "OESZ": "OESZ", "CDT": "CDT", "NZDT": "NZDT", "JDT": "JDT", "AKST": "AKST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "CHAST": "CHAST", "WESZ": "WESZ", "GFT": "GFT", "TMT": "TMT", "MST": "MST", "NZST": "NZST", "AWDT": "AWDT", "BOT": "BOT", "ADT": "ADT", "HNPM": "HNPM", "PDT": "PDT", "HNT": "HNT", "TMST": "TMST", "CLST": "CLST", "HADT": "HADT", "LHST": "LHST", "CHADT": "CHADT", "VET": "VET", "HEEG": "HEEG", "BT": "BT", "WAST": "WAST", "WARST": "WARST", "HKT": "HKT", "CLT": "CLT", "SRT": "SRT", "JST": "JST", "HNCU": "HNCU", "HEPM": "HEPM", "HAT": "HAT", "COT": "COT", "AST": "AST", "ACDT": "ACDT", "HENOMX": "HENOMX", "AWST": "AWST", "AEDT": "AEDT", "AKDT": "AKDT", "CAT": "CAT", "GMT": "GMT", "MEZ": "MEZ"}, - } - } -  -diff --git a/mer_KE/mer_KE.go b/mer_KE/mer_KE.go -index 4a398fe..a08f3ce 100644 ---- a/mer_KE/mer_KE.go -+++ b/mer_KE/mer_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type mer_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mer_KE' locale - func New() locales.Translator { - return &mer_KE{ -- locale: "mer_KE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "JAN", "FEB", "MAC", "ĨPU", "MĨĨ", "NJU", "NJR", "AGA", "SPT", "OKT", "NOV", "DEC"}, -- monthsNarrow: []string{"", "J", "F", "M", "Ĩ", "M", "N", "N", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januarĩ", "Feburuarĩ", "Machi", "Ĩpurũ", "Mĩĩ", "Njuni", "Njuraĩ", "Agasti", "Septemba", "Oktũba", "Novemba", "Dicemba"}, -- daysAbbreviated: []string{"KIU", "MRA", "WAI", "WET", "WEN", "WTN", "JUM"}, -- daysNarrow: []string{"K", "M", "W", "W", "W", "W", "J"}, -- daysWide: []string{"Kiumia", "Muramuko", "Wairi", "Wethatu", "Wena", "Wetano", "Jumamosi"}, -- periodsAbbreviated: []string{"RŨ", "ŨG"}, -- periodsWide: []string{"RŨ", "ŨG"}, -- erasAbbreviated: []string{"MK", "NK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Mbere ya Kristũ", "Nyuma ya Kristũ"}, -- timezones: map[string]string{"CDT": "CDT", "PDT": "PDT", "WEZ": "WEZ", "MESZ": "MESZ", "ACDT": "ACDT", "HENOMX": "HENOMX", "MYT": "MYT", "WITA": "WITA", "HEEG": "HEEG", "WARST": "WARST", "HNNOMX": "HNNOMX", "UYST": "UYST", "AKDT": "AKDT", "WIB": "WIB", "WART": "WART", "GMT": "GMT", "HADT": "HADT", "CLST": "CLST", "EAT": "EAT", "ART": "ART", "WAT": "WAT", "OESZ": "OESZ", "ECT": "ECT", "HEPMX": "HEPMX", "ADT": "ADT", "BT": "BT", "WESZ": "WESZ", "ACWDT": "ACWDT", "WAST": "WAST", "CHADT": "CHADT", "TMST": "TMST", "HNT": "HNT", "OEZ": "OEZ", "EDT": "EDT", "HNPMX": "HNPMX", "VET": "VET", "HKST": "HKST", "IST": "IST", "TMT": "TMT", "CAT": "CAT", "HAT": "HAT", "CHAST": "CHAST", "WIT": "WIT", "PST": "PST", "CLT": "CLT", "MST": "MST", "MDT": "MDT", "ACWST": "ACWST", "JDT": "JDT", "GFT": "GFT", "COST": "COST", "AKST": "AKST", "CST": "CST", "AST": "AST", "HKT": "HKT", "HNEG": "HNEG", "HECU": "HECU", "EST": "EST", "UYT": "UYT", "GYT": "GYT", "HEOG": "HEOG", "AWST": "AWST", "HNPM": "HNPM", "HEPM": "HEPM", "SGT": "SGT", "NZDT": "NZDT", "HNCU": "HNCU", "ARST": "ARST", "AEST": "AEST", "AWDT": "AWDT", "ACST": "ACST", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "SAST": "SAST", "BOT": "BOT", "HNOG": "HNOG", "SRT": "SRT", "NZST": "NZST", "ChST": "ChST", "HAST": "HAST", "MEZ": "MEZ", "LHST": "LHST", "LHDT": "LHDT", "JST": "JST", "COT": "COT"}, -+ locale: "mer_KE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HNOG": "HNOG", "UYT": "UYT", "UYST": "UYST", "IST": "IST", "WAT": "WAT", "OEZ": "OEZ", "WITA": "WITA", "WIB": "WIB", "LHDT": "LHDT", "AEST": "AEST", "AWST": "AWST", "HEOG": "HEOG", "HKT": "HKT", "HAST": "HAST", "HNEG": "HNEG", "MEZ": "MEZ", "MST": "MST", "EAT": "EAT", "JST": "JST", "AWDT": "AWDT", "HAT": "HAT", "TMT": "TMT", "CST": "CST", "∅∅∅": "∅∅∅", "COST": "COST", "VET": "VET", "HNPMX": "HNPMX", "SGT": "SGT", "OESZ": "OESZ", "COT": "COT", "ART": "ART", "HEPM": "HEPM", "CHADT": "CHADT", "SAST": "SAST", "CAT": "CAT", "BT": "BT", "HNCU": "HNCU", "HEPMX": "HEPMX", "GYT": "GYT", "CLST": "CLST", "NZST": "NZST", "NZDT": "NZDT", "SRT": "SRT", "WARST": "WARST", "MESZ": "MESZ", "LHST": "LHST", "ACWST": "ACWST", "EST": "EST", "HKST": "HKST", "ECT": "ECT", "HEEG": "HEEG", "ACWDT": "ACWDT", "WAST": "WAST", "GFT": "GFT", "TMST": "TMST", "HADT": "HADT", "HNPM": "HNPM", "PST": "PST", "JDT": "JDT", "WEZ": "WEZ", "WART": "WART", "ChST": "ChST", "ADT": "ADT", "GMT": "GMT", "ACDT": "ACDT", "MYT": "MYT", "CDT": "CDT", "BOT": "BOT", "HENOMX": "HENOMX", "HNT": "HNT", "AEDT": "AEDT", "CHAST": "CHAST", "PDT": "PDT", "AKST": "AKST", "EDT": "EDT", "ARST": "ARST", "HNNOMX": "HNNOMX", "HECU": "HECU", "AKDT": "AKDT", "WIT": "WIT", "CLT": "CLT", "MDT": "MDT", "AST": "AST", "ACST": "ACST"}, - } - } -  -@@ -109,7 +94,7 @@ func (mer *mer_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mer *mer_KE) MonthsAbbreviated() []string { -- return mer.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +104,7 @@ func (mer *mer_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mer *mer_KE) MonthsNarrow() []string { -- return mer.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -129,7 +114,7 @@ func (mer *mer_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mer *mer_KE) MonthsWide() []string { -- return mer.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,56 +174,7 @@ func (mer *mer_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mer.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mer.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mer.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mer.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mer.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mer_KE' -@@ -247,68 +183,7 @@ func (mer *mer_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mer.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mer.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mer.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mer.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mer.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, mer.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mer_KE' -@@ -316,27 +191,6 @@ func (mer *mer_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -345,17 +199,6 @@ func (mer *mer_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mer.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -364,17 +207,6 @@ func (mer *mer_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mer.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +215,6 @@ func (mer *mer_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mer.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mer.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -404,19 +223,6 @@ func (mer *mer_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -425,26 +231,6 @@ func (mer *mer_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -453,30 +239,6 @@ func (mer *mer_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -485,34 +247,5 @@ func (mer *mer_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mer.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mer.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mfe/mfe.go b/mfe/mfe.go -index 493cbf1..1f7ccf7 100644 ---- a/mfe/mfe.go -+++ b/mfe/mfe.go -@@ -66,7 +66,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"av. Z-K", "ap. Z-K"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"avan Zezi-Krist", "apre Zezi-Krist"}, -- timezones: map[string]string{"TMT": "TMT", "ACST": "ACST", "ADT": "ADT", "WIT": "WIT", "SRT": "SRT", "HNPM": "HNPM", "MEZ": "MEZ", "LHDT": "LHDT", "WAT": "WAT", "GMT": "GMT", "ACWDT": "ACWDT", "GFT": "GFT", "PDT": "PDT", "BOT": "BOT", "SGT": "SGT", "ARST": "ARST", "LHST": "LHST", "CAT": "CAT", "ECT": "ECT", "AKDT": "AKDT", "CDT": "CDT", "WESZ": "WESZ", "HEOG": "HEOG", "WAST": "WAST", "HENOMX": "HENOMX", "AST": "AST", "HKT": "HKT", "SAST": "SAST", "EAT": "EAT", "MST": "MST", "HEPMX": "HEPMX", "MYT": "MYT", "HADT": "HADT", "∅∅∅": "∅∅∅", "WART": "WART", "COST": "COST", "CST": "CST", "WIB": "WIB", "CHAST": "CHAST", "CHADT": "CHADT", "HAT": "HAT", "CLT": "CLT", "TMST": "TMST", "WARST": "WARST", "MDT": "MDT", "UYST": "UYST", "HAST": "HAST", "ACWST": "ACWST", "ART": "ART", "AEST": "AEST", "JDT": "JDT", "HNCU": "HNCU", "HNPMX": "HNPMX", "VET": "VET", "BT": "BT", "IST": "IST", "HNEG": "HNEG", "HEEG": "HEEG", "HNOG": "HNOG", "ChST": "ChST", "ACDT": "ACDT", "OEZ": "OEZ", "OESZ": "OESZ", "COT": "COT", "HKST": "HKST", "NZST": "NZST", "HNNOMX": "HNNOMX", "EST": "EST", "AKST": "AKST", "PST": "PST", "WITA": "WITA", "HEPM": "HEPM", "JST": "JST", "EDT": "EDT", "UYT": "UYT", "GYT": "GYT", "WEZ": "WEZ", "HNT": "HNT", "AEDT": "AEDT", "AWST": "AWST", "AWDT": "AWDT", "MESZ": "MESZ", "NZDT": "NZDT", "CLST": "CLST", "HECU": "HECU"}, -+ timezones: map[string]string{"WIB": "WIB", "ACDT": "ACDT", "MEZ": "MEZ", "MDT": "MDT", "HEEG": "HEEG", "JST": "JST", "JDT": "JDT", "HEOG": "HEOG", "HKST": "HKST", "EST": "EST", "CLT": "CLT", "HADT": "HADT", "AWST": "AWST", "PDT": "PDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "SAST": "SAST", "TMST": "TMST", "GMT": "GMT", "HNPMX": "HNPMX", "WEZ": "WEZ", "TMT": "TMT", "MST": "MST", "CDT": "CDT", "LHST": "LHST", "PST": "PST", "ACWST": "ACWST", "ACWDT": "ACWDT", "IST": "IST", "AKDT": "AKDT", "ARST": "ARST", "EAT": "EAT", "ACST": "ACST", "LHDT": "LHDT", "EDT": "EDT", "AEST": "AEST", "GFT": "GFT", "OEZ": "OEZ", "COST": "COST", "HNOG": "HNOG", "CLST": "CLST", "ART": "ART", "MYT": "MYT", "AWDT": "AWDT", "HNT": "HNT", "WITA": "WITA", "NZST": "NZST", "ADT": "ADT", "MESZ": "MESZ", "HNPM": "HNPM", "HEPM": "HEPM", "HECU": "HECU", "OESZ": "OESZ", "NZDT": "NZDT", "UYST": "UYST", "HNCU": "HNCU", "UYT": "UYT", "VET": "VET", "WESZ": "WESZ", "WAT": "WAT", "WARST": "WARST", "CAT": "CAT", "ECT": "ECT", "HENOMX": "HENOMX", "CST": "CST", "AST": "AST", "BOT": "BOT", "SRT": "SRT", "WART": "WART", "WIT": "WIT", "HAT": "HAT", "GYT": "GYT", "HNEG": "HNEG", "CHADT": "CHADT", "SGT": "SGT", "AKST": "AKST", "AEDT": "AEDT", "HEPMX": "HEPMX", "WAST": "WAST", "COT": "COT", "HKT": "HKT", "HAST": "HAST", "BT": "BT", "ChST": "ChST", "HNNOMX": "HNNOMX"}, - } - } -  -diff --git a/mfe_MU/mfe_MU.go b/mfe_MU/mfe_MU.go -index 25440e5..a3940c1 100644 ---- a/mfe_MU/mfe_MU.go -+++ b/mfe_MU/mfe_MU.go -@@ -10,63 +10,45 @@ import ( - ) -  - type mfe_MU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mfe_MU' locale - func New() locales.Translator { - return &mfe_MU{ -- locale: "mfe_MU", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "zan", "fev", "mar", "avr", "me", "zin", "zil", "out", "sep", "okt", "nov", "des"}, -- monthsNarrow: []string{"", "z", "f", "m", "a", "m", "z", "z", "o", "s", "o", "n", "d"}, -- monthsWide: []string{"", "zanvie", "fevriye", "mars", "avril", "me", "zin", "zilye", "out", "septam", "oktob", "novam", "desam"}, -- daysAbbreviated: []string{"dim", "lin", "mar", "mer", "ze", "van", "sam"}, -- daysNarrow: []string{"d", "l", "m", "m", "z", "v", "s"}, -- daysWide: []string{"dimans", "lindi", "mardi", "merkredi", "zedi", "vandredi", "samdi"}, -- erasAbbreviated: []string{"av. Z-K", "ap. Z-K"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"avan Zezi-Krist", "apre Zezi-Krist"}, -- timezones: map[string]string{"AEDT": "AEDT", "CHAST": "CHAST", "CLT": "CLT", "HEEG": "HEEG", "ACDT": "ACDT", "OESZ": "OESZ", "HEOG": "HEOG", "HKT": "HKT", "VET": "VET", "AKDT": "AKDT", "HADT": "HADT", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "ADT": "ADT", "MEZ": "MEZ", "WAST": "WAST", "JST": "JST", "ChST": "ChST", "ACST": "ACST", "ECT": "ECT", "EAT": "EAT", "WART": "WART", "ACWDT": "ACWDT", "IST": "IST", "WARST": "WARST", "SGT": "SGT", "MST": "MST", "∅∅∅": "∅∅∅", "BOT": "BOT", "GMT": "GMT", "WIT": "WIT", "BT": "BT", "SRT": "SRT", "HNT": "HNT", "AWST": "AWST", "COST": "COST", "HECU": "HECU", "CDT": "CDT", "AST": "AST", "MYT": "MYT", "HEPM": "HEPM", "HNEG": "HNEG", "WITA": "WITA", "SAST": "SAST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "EDT": "EDT", "ARST": "ARST", "HKST": "HKST", "WAT": "WAT", "CAT": "CAT", "AKST": "AKST", "WIB": "WIB", "HAST": "HAST", "WEZ": "WEZ", "LHST": "LHST", "MESZ": "MESZ", "UYT": "UYT", "LHDT": "LHDT", "GYT": "GYT", "HAT": "HAT", "HNPM": "HNPM", "WESZ": "WESZ", "AWDT": "AWDT", "NZDT": "NZDT", "CLST": "CLST", "UYST": "UYST", "ART": "ART", "PST": "PST", "HNOG": "HNOG", "TMT": "TMT", "GFT": "GFT", "OEZ": "OEZ", "COT": "COT", "MDT": "MDT", "CST": "CST", "PDT": "PDT", "CHADT": "CHADT", "TMST": "TMST", "EST": "EST", "AEST": "AEST", "JDT": "JDT", "HENOMX": "HENOMX", "ACWST": "ACWST", "NZST": "NZST"}, -+ locale: "mfe_MU", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ARST": "ARST", "HNEG": "HNEG", "LHST": "LHST", "PDT": "PDT", "WESZ": "WESZ", "WART": "WART", "HEPMX": "HEPMX", "CAT": "CAT", "CST": "CST", "MDT": "MDT", "ACWST": "ACWST", "CHADT": "CHADT", "UYT": "UYT", "IST": "IST", "ACDT": "ACDT", "AEST": "AEST", "AKDT": "AKDT", "ECT": "ECT", "SGT": "SGT", "COST": "COST", "EDT": "EDT", "ART": "ART", "ChST": "ChST", "BOT": "BOT", "HAST": "HAST", "EST": "EST", "EAT": "EAT", "MESZ": "MESZ", "HNT": "HNT", "COT": "COT", "MEZ": "MEZ", "HEPM": "HEPM", "HNCU": "HNCU", "SAST": "SAST", "AWST": "AWST", "ACWDT": "ACWDT", "HKST": "HKST", "HADT": "HADT", "HNPM": "HNPM", "PST": "PST", "HAT": "HAT", "GYT": "GYT", "HNOG": "HNOG", "WITA": "WITA", "WIB": "WIB", "CDT": "CDT", "ACST": "ACST", "MYT": "MYT", "VET": "VET", "WAST": "WAST", "NZST": "NZST", "JST": "JST", "LHDT": "LHDT", "AKST": "AKST", "CLST": "CLST", "MST": "MST", "HNNOMX": "HNNOMX", "OEZ": "OEZ", "HEOG": "HEOG", "TMT": "TMT", "CLT": "CLT", "NZDT": "NZDT", "ADT": "ADT", "UYST": "UYST", "GFT": "GFT", "WIT": "WIT", "TMST": "TMST", "∅∅∅": "∅∅∅", "GMT": "GMT", "CHAST": "CHAST", "WAT": "WAT", "OESZ": "OESZ", "AST": "AST", "SRT": "SRT", "AEDT": "AEDT", "BT": "BT", "WEZ": "WEZ", "HKT": "HKT", "HENOMX": "HENOMX", "HEEG": "HEEG", "JDT": "JDT", "AWDT": "AWDT", "HECU": "HECU", "HNPMX": "HNPMX", "WARST": "WARST"}, - } - } -  -@@ -112,7 +94,7 @@ func (mfe *mfe_MU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mfe *mfe_MU) MonthsAbbreviated() []string { -- return mfe.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +104,7 @@ func (mfe *mfe_MU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mfe *mfe_MU) MonthsNarrow() []string { -- return mfe.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +114,7 @@ func (mfe *mfe_MU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mfe *mfe_MU) MonthsWide() []string { -- return mfe.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,40 +174,7 @@ func (mfe *mfe_MU) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mfe.currencies[currency] -- l := len(s) + len(symbol) + 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mfe.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mfe.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mfe.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, mfe.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mfe.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mfe_MU' -@@ -234,57 +183,7 @@ func (mfe *mfe_MU) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mfe.currencies[currency] -- l := len(s) + len(symbol) + 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mfe.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mfe.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, mfe.currencyNegativePrefix[j]) -- } -- -- b = append(b, mfe.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mfe.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mfe.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, mfe.currencyNegativeSuffix...) -- } else { -- -- b = append(b, mfe.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mfe_MU' -@@ -292,17 +191,6 @@ func (mfe *mfe_MU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -311,17 +199,6 @@ func (mfe *mfe_MU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mfe.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -330,17 +207,6 @@ func (mfe *mfe_MU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mfe.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -349,19 +215,6 @@ func (mfe *mfe_MU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mfe.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mfe.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -370,19 +223,6 @@ func (mfe *mfe_MU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -391,26 +231,6 @@ func (mfe *mfe_MU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -419,30 +239,6 @@ func (mfe *mfe_MU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -451,34 +247,5 @@ func (mfe *mfe_MU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mfe.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mfe.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mg/mg.go b/mg/mg.go -index 107076b..3b2e910 100644 ---- a/mg/mg.go -+++ b/mg/mg.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Alohan’i JK", "Aorian’i JK"}, -- timezones: map[string]string{"ChST": "ChST", "CAT": "CAT", "VET": "VET", "ART": "ART", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "UYST": "UYST", "HKT": "HKT", "CDT": "CDT", "MYT": "MYT", "WIT": "WIT", "SRT": "SRT", "ACWDT": "ACWDT", "HNT": "HNT", "HAT": "HAT", "HNOG": "HNOG", "CLST": "CLST", "COT": "COT", "HKST": "HKST", "ARST": "ARST", "NZST": "NZST", "WIB": "WIB", "HADT": "HADT", "OESZ": "OESZ", "WART": "WART", "GMT": "GMT", "EST": "EST", "EDT": "EDT", "HAST": "HAST", "LHST": "LHST", "SAST": "SAST", "ACDT": "ACDT", "WAST": "WAST", "MDT": "MDT", "AKDT": "AKDT", "GYT": "GYT", "BT": "BT", "JDT": "JDT", "ACST": "ACST", "ECT": "ECT", "AWST": "AWST", "MST": "MST", "HEPM": "HEPM", "CLT": "CLT", "TMT": "TMT", "ADT": "ADT", "UYT": "UYT", "WAT": "WAT", "CST": "CST", "EAT": "EAT", "HNCU": "HNCU", "AKST": "AKST", "AEDT": "AEDT", "HNPM": "HNPM", "CHAST": "CHAST", "MEZ": "MEZ", "BOT": "BOT", "HEEG": "HEEG", "COST": "COST", "HEPMX": "HEPMX", "HEOG": "HEOG", "PST": "PST", "PDT": "PDT", "NZDT": "NZDT", "MESZ": "MESZ", "WITA": "WITA", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AST": "AST", "AEST": "AEST", "LHDT": "LHDT", "IST": "IST", "WARST": "WARST", "HECU": "HECU", "SGT": "SGT", "WEZ": "WEZ", "WESZ": "WESZ", "CHADT": "CHADT", "GFT": "GFT", "HNPMX": "HNPMX", "ACWST": "ACWST", "JST": "JST", "TMST": "TMST"}, -+ timezones: map[string]string{"ACDT": "ACDT", "AEST": "AEST", "HNT": "HNT", "CST": "CST", "ARST": "ARST", "LHDT": "LHDT", "WAT": "WAT", "HAT": "HAT", "GMT": "GMT", "MEZ": "MEZ", "CHAST": "CHAST", "IST": "IST", "HEPMX": "HEPMX", "ChST": "ChST", "MESZ": "MESZ", "ECT": "ECT", "HENOMX": "HENOMX", "VET": "VET", "GFT": "GFT", "TMST": "TMST", "HNNOMX": "HNNOMX", "JDT": "JDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "GYT": "GYT", "ACST": "ACST", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "WAST": "WAST", "AKDT": "AKDT", "MST": "MST", "UYST": "UYST", "BT": "BT", "AKST": "AKST", "WIT": "WIT", "CAT": "CAT", "CLT": "CLT", "JST": "JST", "HAST": "HAST", "ACWST": "ACWST", "PST": "PST", "HECU": "HECU", "SAST": "SAST", "EDT": "EDT", "CDT": "CDT", "EAT": "EAT", "BOT": "BOT", "HEEG": "HEEG", "LHST": "LHST", "COT": "COT", "AST": "AST", "HNEG": "HNEG", "HEPM": "HEPM", "MYT": "MYT", "UYT": "UYT", "PDT": "PDT", "OESZ": "OESZ", "HEOG": "HEOG", "ADT": "ADT", "OEZ": "OEZ", "WART": "WART", "WARST": "WARST", "EST": "EST", "HKT": "HKT", "CLST": "CLST", "MDT": "MDT", "HNPM": "HNPM", "HNPMX": "HNPMX", "HNOG": "HNOG", "COST": "COST", "NZST": "NZST", "SRT": "SRT", "CHADT": "CHADT", "WEZ": "WEZ", "SGT": "SGT", "HKST": "HKST", "WITA": "WITA", "AWST": "AWST", "WESZ": "WESZ", "WIB": "WIB", "NZDT": "NZDT", "ART": "ART", "AEDT": "AEDT", "TMT": "TMT", "HADT": "HADT"}, - } - } -  -diff --git a/mg_MG/mg_MG.go b/mg_MG/mg_MG.go -index c8378bf..753d5c2 100644 ---- a/mg_MG/mg_MG.go -+++ b/mg_MG/mg_MG.go -@@ -42,32 +42,13 @@ type mg_MG struct { - // New returns a new instance of translator for the 'mg_MG' locale - func New() locales.Translator { - return &mg_MG{ -- locale: "mg_MG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "Mey", "Jon", "Jol", "Aog", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janoary", "Febroary", "Martsa", "Aprily", "Mey", "Jona", "Jolay", "Aogositra", "Septambra", "Oktobra", "Novambra", "Desambra"}, -- daysAbbreviated: []string{"Alah", "Alats", "Tal", "Alar", "Alak", "Zom", "Asab"}, -- daysNarrow: []string{"A", "A", "T", "A", "A", "Z", "A"}, -- daysShort: []string{"Alah", "Alats", "Tal", "Alar", "Alak", "Zom", "Asab"}, -- daysWide: []string{"Alahady", "Alatsinainy", "Talata", "Alarobia", "Alakamisy", "Zoma", "Asabotsy"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Alohan’i JK", "Aorian’i JK"}, -- timezones: map[string]string{"HEOG": "HEOG", "LHDT": "LHDT", "HAST": "HAST", "HADT": "HADT", "HEPM": "HEPM", "EST": "EST", "HNPMX": "HNPMX", "MDT": "MDT", "ACWST": "ACWST", "AEST": "AEST", "SAST": "SAST", "HEEG": "HEEG", "NZST": "NZST", "NZDT": "NZDT", "SGT": "SGT", "UYT": "UYT", "JDT": "JDT", "WIT": "WIT", "HNOG": "HNOG", "PST": "PST", "AEDT": "AEDT", "MEZ": "MEZ", "CST": "CST", "AKDT": "AKDT", "WITA": "WITA", "MESZ": "MESZ", "JST": "JST", "CAT": "CAT", "EAT": "EAT", "HAT": "HAT", "PDT": "PDT", "AWDT": "AWDT", "CLT": "CLT", "HNEG": "HNEG", "HENOMX": "HENOMX", "EDT": "EDT", "ADT": "ADT", "WIB": "WIB", "MST": "MST", "SRT": "SRT", "CHADT": "CHADT", "OEZ": "OEZ", "MYT": "MYT", "UYST": "UYST", "AST": "AST", "BT": "BT", "IST": "IST", "BOT": "BOT", "ACST": "ACST", "WART": "WART", "ECT": "ECT", "HNNOMX": "HNNOMX", "WARST": "WARST", "HNT": "HNT", "ART": "ART", "ARST": "ARST", "HKST": "HKST", "TMST": "TMST", "WESZ": "WESZ", "AWST": "AWST", "∅∅∅": "∅∅∅", "AKST": "AKST", "GYT": "GYT", "VET": "VET", "WEZ": "WEZ", "COST": "COST", "HNCU": "HNCU", "HECU": "HECU", "CDT": "CDT", "ACWDT": "ACWDT", "HKT": "HKT", "CHAST": "CHAST", "LHST": "LHST", "OESZ": "OESZ", "ChST": "ChST", "ACDT": "ACDT", "GMT": "GMT", "WAST": "WAST", "COT": "COT", "HEPMX": "HEPMX", "HNPM": "HNPM", "CLST": "CLST", "GFT": "GFT", "TMT": "TMT", "WAT": "WAT"}, -+ locale: "mg_MG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "GFT": "GFT", "GYT": "GYT", "HKT": "HKT", "ACDT": "ACDT", "AWST": "AWST", "VET": "VET", "SAST": "SAST", "TMT": "TMT", "CDT": "CDT", "HAST": "HAST", "MESZ": "MESZ", "HNT": "HNT", "COST": "COST", "HNOG": "HNOG", "WIB": "WIB", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "AST": "AST", "LHST": "LHST", "IST": "IST", "CHAST": "CHAST", "UYT": "UYT", "OESZ": "OESZ", "WIT": "WIT", "ADT": "ADT", "EAT": "EAT", "JST": "JST", "AEST": "AEST", "WARST": "WARST", "COT": "COT", "ChST": "ChST", "ACST": "ACST", "CST": "CST", "NZST": "NZST", "SRT": "SRT", "ACWDT": "ACWDT", "AEDT": "AEDT", "CAT": "CAT", "BOT": "BOT", "HADT": "HADT", "HNEG": "HNEG", "CHADT": "CHADT", "HEPMX": "HEPMX", "WAT": "WAT", "WAST": "WAST", "EST": "EST", "NZDT": "NZDT", "BT": "BT", "AKST": "AKST", "OEZ": "OEZ", "HKST": "HKST", "MEZ": "MEZ", "WEZ": "WEZ", "HECU": "HECU", "WART": "WART", "AWDT": "AWDT", "HNPM": "HNPM", "UYST": "UYST", "HAT": "HAT", "HEOG": "HEOG", "HNNOMX": "HNNOMX", "MYT": "MYT", "PST": "PST", "ECT": "ECT", "GMT": "GMT", "LHDT": "LHDT", "PDT": "PDT", "ACWST": "ACWST", "TMST": "TMST", "CLST": "CLST", "WITA": "WITA", "ARST": "ARST", "HENOMX": "HENOMX", "JDT": "JDT", "HNCU": "HNCU", "EDT": "EDT", "CLT": "CLT", "MDT": "MDT", "ART": "ART", "HEEG": "HEEG", "SGT": "SGT", "HNPMX": "HNPMX", "AKDT": "AKDT", "MST": "MST"}, - } - } -  -@@ -120,7 +101,7 @@ func (mg *mg_MG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mg *mg_MG) MonthsAbbreviated() []string { -- return mg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +111,7 @@ func (mg *mg_MG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mg *mg_MG) MonthsNarrow() []string { -- return mg.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -140,7 +121,7 @@ func (mg *mg_MG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mg *mg_MG) MonthsWide() []string { -- return mg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,73 +167,13 @@ func (mg *mg_MG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mg_MG' and handles both Whole and Real numbers based on 'v' - func (mg *mg_MG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mg_MG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mg *mg_MG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mg.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mg.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mg_MG' -@@ -260,56 +181,7 @@ func (mg *mg_MG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mg.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mg_MG' -@@ -318,64 +190,7 @@ func (mg *mg_MG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mg.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mg.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mg_MG' -@@ -383,28 +198,6 @@ func (mg *mg_MG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -413,17 +206,6 @@ func (mg *mg_MG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, mg.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -432,17 +214,6 @@ func (mg *mg_MG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,19 +222,6 @@ func (mg *mg_MG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,19 +230,6 @@ func (mg *mg_MG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -493,26 +238,6 @@ func (mg *mg_MG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,30 +246,6 @@ func (mg *mg_MG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -553,34 +254,5 @@ func (mg *mg_MG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mgh/mgh.go b/mgh/mgh.go -index 0df8e75..68e5e89 100644 ---- a/mgh/mgh.go -+++ b/mgh/mgh.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"HY", "YY"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Hinapiya yesu", "Yopia yesu"}, -- timezones: map[string]string{"TMT": "TMT", "MDT": "MDT", "ACWDT": "ACWDT", "AWST": "AWST", "HKT": "HKT", "CHADT": "CHADT", "CLT": "CLT", "WAT": "WAT", "OESZ": "OESZ", "WARST": "WARST", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "EDT": "EDT", "MST": "MST", "HAST": "HAST", "LHST": "LHST", "NZST": "NZST", "HNPM": "HNPM", "HEPM": "HEPM", "ARST": "ARST", "IST": "IST", "JDT": "JDT", "ACDT": "ACDT", "AKST": "AKST", "CDT": "CDT", "MYT": "MYT", "HADT": "HADT", "ART": "ART", "MESZ": "MESZ", "ACST": "ACST", "EST": "EST", "AST": "AST", "COST": "COST", "BT": "BT", "AWDT": "AWDT", "JST": "JST", "TMST": "TMST", "EAT": "EAT", "GMT": "GMT", "HECU": "HECU", "PST": "PST", "GFT": "GFT", "COT": "COT", "HENOMX": "HENOMX", "HNT": "HNT", "HAT": "HAT", "AEST": "AEST", "OEZ": "OEZ", "HNCU": "HNCU", "AEDT": "AEDT", "HKST": "HKST", "WESZ": "WESZ", "ACWST": "ACWST", "SGT": "SGT", "HNPMX": "HNPMX", "AKDT": "AKDT", "GYT": "GYT", "WIB": "WIB", "PDT": "PDT", "HEOG": "HEOG", "HNOG": "HNOG", "CLST": "CLST", "HEEG": "HEEG", "UYST": "UYST", "CST": "CST", "ADT": "ADT", "SRT": "SRT", "SAST": "SAST", "HNEG": "HNEG", "WART": "WART", "VET": "VET", "WIT": "WIT", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "MEZ": "MEZ", "CHAST": "CHAST", "ChST": "ChST", "BOT": "BOT", "WAST": "WAST", "ECT": "ECT", "LHDT": "LHDT", "NZDT": "NZDT", "CAT": "CAT", "UYT": "UYT", "WITA": "WITA"}, -+ timezones: map[string]string{"HKST": "HKST", "AWST": "AWST", "AEDT": "AEDT", "HNPMX": "HNPMX", "WESZ": "WESZ", "HECU": "HECU", "WART": "WART", "COT": "COT", "JST": "JST", "VET": "VET", "MYT": "MYT", "CHADT": "CHADT", "AKST": "AKST", "NZDT": "NZDT", "AEST": "AEST", "CAT": "CAT", "CLT": "CLT", "WIB": "WIB", "CDT": "CDT", "ECT": "ECT", "EAT": "EAT", "HEPMX": "HEPMX", "HNCU": "HNCU", "AKDT": "AKDT", "COST": "COST", "EST": "EST", "ADT": "ADT", "ACDT": "ACDT", "AWDT": "AWDT", "HEPM": "HEPM", "PDT": "PDT", "OEZ": "OEZ", "EDT": "EDT", "ACST": "ACST", "WAT": "WAT", "WITA": "WITA", "NZST": "NZST", "ART": "ART", "ARST": "ARST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "TMT": "TMT", "AST": "AST", "JDT": "JDT", "∅∅∅": "∅∅∅", "SGT": "SGT", "HNT": "HNT", "HAT": "HAT", "HKT": "HKT", "CLST": "CLST", "GYT": "GYT", "ChST": "ChST", "MEZ": "MEZ", "LHST": "LHST", "ACWDT": "ACWDT", "WAST": "WAST", "OESZ": "OESZ", "SAST": "SAST", "MST": "MST", "HNEG": "HNEG", "LHDT": "LHDT", "WARST": "WARST", "HEOG": "HEOG", "CST": "CST", "SRT": "SRT", "HNPM": "HNPM", "BOT": "BOT", "HADT": "HADT", "MESZ": "MESZ", "WIT": "WIT", "ACWST": "ACWST", "GMT": "GMT", "HAST": "HAST", "CHAST": "CHAST", "UYT": "UYT", "UYST": "UYST", "PST": "PST", "BT": "BT", "WEZ": "WEZ", "HNOG": "HNOG", "HEEG": "HEEG", "GFT": "GFT", "TMST": "TMST", "MDT": "MDT", "IST": "IST"}, - } - } -  -diff --git a/mgh_MZ/mgh_MZ.go b/mgh_MZ/mgh_MZ.go -index 3e23de3..3943bc1 100644 ---- a/mgh_MZ/mgh_MZ.go -+++ b/mgh_MZ/mgh_MZ.go -@@ -10,66 +10,45 @@ import ( - ) -  - type mgh_MZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mgh_MZ' locale - func New() locales.Translator { - return &mgh_MZ{ -- locale: "mgh_MZ", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "Kwa", "Una", "Rar", "Che", "Tha", "Moc", "Sab", "Nan", "Tis", "Kum", "Moj", "Yel"}, -- monthsNarrow: []string{"", "K", "U", "R", "C", "T", "M", "S", "N", "T", "K", "M", "Y"}, -- monthsWide: []string{"", "Mweri wo kwanza", "Mweri wo unayeli", "Mweri wo uneraru", "Mweri wo unecheshe", "Mweri wo unethanu", "Mweri wo thanu na mocha", "Mweri wo saba", "Mweri wo nane", "Mweri wo tisa", "Mweri wo kumi", "Mweri wo kumi na moja", "Mweri wo kumi na yel’li"}, -- daysAbbreviated: []string{"Sab", "Jtt", "Jnn", "Jtn", "Ara", "Iju", "Jmo"}, -- daysNarrow: []string{"S", "J", "J", "J", "A", "I", "J"}, -- daysWide: []string{"Sabato", "Jumatatu", "Jumanne", "Jumatano", "Arahamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"wichishu", "mchochil’l"}, -- periodsWide: []string{"wichishu", "mchochil’l"}, -- erasAbbreviated: []string{"HY", "YY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Hinapiya yesu", "Yopia yesu"}, -- timezones: map[string]string{"WITA": "WITA", "HEPM": "HEPM", "GFT": "GFT", "WARST": "WARST", "ADT": "ADT", "HADT": "HADT", "HNOG": "HNOG", "OESZ": "OESZ", "CDT": "CDT", "HAST": "HAST", "HEPMX": "HEPMX", "EDT": "EDT", "GYT": "GYT", "ACWST": "ACWST", "LHDT": "LHDT", "HEEG": "HEEG", "SGT": "SGT", "BT": "BT", "HKST": "HKST", "HKT": "HKT", "EAT": "EAT", "WAST": "WAST", "HEOG": "HEOG", "NZDT": "NZDT", "CAT": "CAT", "AKST": "AKST", "ACWDT": "ACWDT", "AEST": "AEST", "OEZ": "OEZ", "HNPMX": "HNPMX", "AST": "AST", "LHST": "LHST", "WAT": "WAT", "WESZ": "WESZ", "MESZ": "MESZ", "WIT": "WIT", "AWDT": "AWDT", "IST": "IST", "CLT": "CLT", "JST": "JST", "MST": "MST", "UYT": "UYT", "VET": "VET", "JDT": "JDT", "HNT": "HNT", "AEDT": "AEDT", "ChST": "ChST", "MDT": "MDT", "CST": "CST", "PST": "PST", "EST": "EST", "MYT": "MYT", "SRT": "SRT", "ARST": "ARST", "MEZ": "MEZ", "ECT": "ECT", "COT": "COT", "HECU": "HECU", "CHAST": "CHAST", "SAST": "SAST", "HNEG": "HNEG", "WIB": "WIB", "HAT": "HAT", "BOT": "BOT", "TMT": "TMT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNCU": "HNCU", "HNPM": "HNPM", "NZST": "NZST", "CHADT": "CHADT", "CLST": "CLST", "TMST": "TMST", "ACDT": "ACDT", "GMT": "GMT", "PDT": "PDT", "WEZ": "WEZ", "AWST": "AWST", "WART": "WART", "UYST": "UYST", "AKDT": "AKDT", "ART": "ART", "ACST": "ACST", "∅∅∅": "∅∅∅", "COST": "COST"}, -+ locale: "mgh_MZ", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIT": "WIT", "HKST": "HKST", "ECT": "ECT", "NZST": "NZST", "JST": "JST", "CHAST": "CHAST", "HNPM": "HNPM", "ACWDT": "ACWDT", "PST": "PST", "SGT": "SGT", "AKST": "AKST", "TMST": "TMST", "CLST": "CLST", "HADT": "HADT", "HEEG": "HEEG", "MYT": "MYT", "UYST": "UYST", "WARST": "WARST", "EST": "EST", "LHDT": "LHDT", "AEST": "AEST", "WEZ": "WEZ", "WAT": "WAT", "HAT": "HAT", "WART": "WART", "COT": "COT", "COST": "COST", "BOT": "BOT", "ACST": "ACST", "HEOG": "HEOG", "HNEG": "HNEG", "HECU": "HECU", "WIB": "WIB", "MDT": "MDT", "GMT": "GMT", "OESZ": "OESZ", "MEZ": "MEZ", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "EDT": "EDT", "NZDT": "NZDT", "ARST": "ARST", "ADT": "ADT", "HNNOMX": "HNNOMX", "AWST": "AWST", "UYT": "UYT", "LHST": "LHST", "HNCU": "HNCU", "SAST": "SAST", "CAT": "CAT", "WITA": "WITA", "CST": "CST", "HAST": "HAST", "AWDT": "AWDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "CLT": "CLT", "EAT": "EAT", "AEDT": "AEDT", "JDT": "JDT", "BT": "BT", "VET": "VET", "HNOG": "HNOG", "MST": "MST", "ART": "ART", "PDT": "PDT", "WESZ": "WESZ", "WAST": "WAST", "HKT": "HKT", "CHADT": "CHADT", "HNT": "HNT", "AST": "AST", "IST": "IST", "OEZ": "OEZ", "TMT": "TMT", "CDT": "CDT", "SRT": "SRT", "HENOMX": "HENOMX", "ACDT": "ACDT", "GYT": "GYT", "ChST": "ChST", "MESZ": "MESZ", "ACWST": "ACWST", "AKDT": "AKDT", "GFT": "GFT"}, - } - } -  -@@ -115,7 +94,7 @@ func (mgh *mgh_MZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mgh *mgh_MZ) MonthsAbbreviated() []string { -- return mgh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -125,7 +104,7 @@ func (mgh *mgh_MZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mgh *mgh_MZ) MonthsNarrow() []string { -- return mgh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -135,7 +114,7 @@ func (mgh *mgh_MZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mgh *mgh_MZ) MonthsWide() []string { -- return mgh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -195,40 +174,7 @@ func (mgh *mgh_MZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mgh.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mgh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mgh.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mgh.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, mgh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mgh.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mgh_MZ' -@@ -237,57 +183,7 @@ func (mgh *mgh_MZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mgh.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mgh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mgh.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, mgh.currencyNegativePrefix[j]) -- } -- -- b = append(b, mgh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mgh.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mgh.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, mgh.currencyNegativeSuffix...) -- } else { -- -- b = append(b, mgh.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mgh_MZ' -@@ -295,27 +191,6 @@ func (mgh *mgh_MZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -324,17 +199,6 @@ func (mgh *mgh_MZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mgh.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -343,17 +207,6 @@ func (mgh *mgh_MZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mgh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -362,19 +215,6 @@ func (mgh *mgh_MZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mgh.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mgh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -383,19 +223,6 @@ func (mgh *mgh_MZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -404,26 +231,6 @@ func (mgh *mgh_MZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -432,30 +239,6 @@ func (mgh *mgh_MZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -464,34 +247,5 @@ func (mgh *mgh_MZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mgh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mgh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mgo/mgo.go b/mgo/mgo.go -index 672c7c0..d1dca11 100644 ---- a/mgo/mgo.go -+++ b/mgo/mgo.go -@@ -70,7 +70,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"WART": "WART", "CDT": "CDT", "GYT": "GYT", "AEDT": "AEDT", "HNPM": "HNPM", "EAT": "EAT", "EST": "EST", "HNPMX": "HNPMX", "HNT": "HNT", "HAT": "HAT", "AWDT": "AWDT", "HEEG": "HEEG", "ACST": "ACST", "CHADT": "CHADT", "CST": "CST", "ADT": "ADT", "AEST": "AEST", "OESZ": "OESZ", "EDT": "EDT", "AST": "AST", "WEZ": "WEZ", "AWST": "AWST", "LHDT": "LHDT", "CLST": "CLST", "∅∅∅": "∅∅∅", "WAT": "WAT", "HNCU": "HNCU", "HNOG": "HNOG", "ChST": "ChST", "ACDT": "ACDT", "MST": "MST", "WIT": "WIT", "ACWST": "ACWST", "HKST": "HKST", "COT": "COT", "GMT": "GMT", "MYT": "MYT", "HAST": "HAST", "JDT": "JDT", "GFT": "GFT", "HNEG": "HNEG", "IST": "IST", "BOT": "BOT", "HNNOMX": "HNNOMX", "AKST": "AKST", "VET": "VET", "PDT": "PDT", "WESZ": "WESZ", "MEZ": "MEZ", "MESZ": "MESZ", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HEPM": "HEPM", "NZST": "NZST", "CLT": "CLT", "CHAST": "CHAST", "OEZ": "OEZ", "CAT": "CAT", "WARST": "WARST", "SGT": "SGT", "ARST": "ARST", "WITA": "WITA", "HKT": "HKT", "JST": "JST", "TMT": "TMT", "COST": "COST", "MDT": "MDT", "HADT": "HADT", "HEOG": "HEOG", "PST": "PST", "SAST": "SAST", "WAST": "WAST", "HECU": "HECU", "UYST": "UYST", "AKDT": "AKDT", "ART": "ART", "LHST": "LHST", "NZDT": "NZDT", "ECT": "ECT", "HEPMX": "HEPMX", "WIB": "WIB", "TMST": "TMST", "UYT": "UYT", "BT": "BT", "SRT": "SRT"}, -+ timezones: map[string]string{"JDT": "JDT", "LHST": "LHST", "EDT": "EDT", "CAT": "CAT", "CST": "CST", "NZDT": "NZDT", "AST": "AST", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "TMST": "TMST", "SRT": "SRT", "ACST": "ACST", "PST": "PST", "AEDT": "AEDT", "HAT": "HAT", "WIT": "WIT", "HNOG": "HNOG", "ADT": "ADT", "EAT": "EAT", "HAST": "HAST", "HNPMX": "HNPMX", "WAT": "WAT", "COT": "COT", "CLST": "CLST", "GMT": "GMT", "BOT": "BOT", "AWST": "AWST", "AKDT": "AKDT", "ART": "ART", "HEEG": "HEEG", "WAST": "WAST", "CDT": "CDT", "MDT": "MDT", "JST": "JST", "HNCU": "HNCU", "ACDT": "ACDT", "AWDT": "AWDT", "OESZ": "OESZ", "GFT": "GFT", "WART": "WART", "HEOG": "HEOG", "TMT": "TMT", "ECT": "ECT", "LHDT": "LHDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "SGT": "SGT", "HKT": "HKT", "HADT": "HADT", "PDT": "PDT", "WARST": "WARST", "MST": "MST", "UYT": "UYT", "BT": "BT", "HEPMX": "HEPMX", "HNPM": "HNPM", "UYST": "UYST", "GYT": "GYT", "CLT": "CLT", "WIB": "WIB", "NZST": "NZST", "MESZ": "MESZ", "HNEG": "HNEG", "HECU": "HECU", "HEPM": "HEPM", "HNT": "HNT", "ARST": "ARST", "CHADT": "CHADT", "WEZ": "WEZ", "∅∅∅": "∅∅∅", "WITA": "WITA", "MEZ": "MEZ", "AKST": "AKST", "SAST": "SAST", "EST": "EST", "ChST": "ChST", "AEST": "AEST", "IST": "IST", "COST": "COST", "HKST": "HKST", "HENOMX": "HENOMX", "MYT": "MYT", "OEZ": "OEZ", "WESZ": "WESZ", "VET": "VET"}, - } - } -  -diff --git a/mgo_CM/mgo_CM.go b/mgo_CM/mgo_CM.go -index 9f82821..c1cb09a 100644 ---- a/mgo_CM/mgo_CM.go -+++ b/mgo_CM/mgo_CM.go -@@ -10,67 +10,45 @@ import ( - ) -  - type mgo_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mgo_CM' locale - func New() locales.Translator { - return &mgo_CM{ -- locale: "mgo_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "mbegtug", "imeg àbùbì", "imeg mbəŋchubi", "iməg ngwə̀t", "iməg fog", "iməg ichiibɔd", "iməg àdùmbə̀ŋ", "iməg ichika", "iməg kud", "iməg tèsiʼe", "iməg zò", "iməg krizmed"}, -- monthsNarrow: []string{"", "M1", "A2", "M3", "N4", "F5", "I6", "A7", "I8", "K9", "10", "11", "12"}, -- monthsWide: []string{"", "iməg mbegtug", "imeg àbùbì", "imeg mbəŋchubi", "iməg ngwə̀t", "iməg fog", "iməg ichiibɔd", "iməg àdùmbə̀ŋ", "iməg ichika", "iməg kud", "iməg tèsiʼe", "iməg zò", "iməg krizmed"}, -- daysAbbreviated: []string{"Aneg 1", "Aneg 2", "Aneg 3", "Aneg 4", "Aneg 5", "Aneg 6", "Aneg 7"}, -- daysNarrow: []string{"A1", "A2", "A3", "A4", "A5", "A6", "A7"}, -- daysShort: []string{"1", "2", "3", "4", "5", "6", "7"}, -- daysWide: []string{"Aneg 1", "Aneg 2", "Aneg 3", "Aneg 4", "Aneg 5", "Aneg 6", "Aneg 7"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"OEZ": "OEZ", "ACWST": "ACWST", "HAT": "HAT", "ARST": "ARST", "HKST": "HKST", "WITA": "WITA", "TMST": "TMST", "WAT": "WAT", "WART": "WART", "AWST": "AWST", "AST": "AST", "JST": "JST", "ChST": "ChST", "HEPMX": "HEPMX", "SGT": "SGT", "BT": "BT", "SRT": "SRT", "PDT": "PDT", "HNOG": "HNOG", "ACDT": "ACDT", "ECT": "ECT", "HENOMX": "HENOMX", "CST": "CST", "BOT": "BOT", "VET": "VET", "WIT": "WIT", "PST": "PST", "LHDT": "LHDT", "CHAST": "CHAST", "CHADT": "CHADT", "CLT": "CLT", "GFT": "GFT", "TMT": "TMT", "GMT": "GMT", "UYT": "UYT", "MYT": "MYT", "EAT": "EAT", "GYT": "GYT", "AKDT": "AKDT", "HADT": "HADT", "AEST": "AEST", "HKT": "HKT", "HEPM": "HEPM", "SAST": "SAST", "IST": "IST", "HNCU": "HNCU", "CDT": "CDT", "ACWDT": "ACWDT", "JDT": "JDT", "WAST": "WAST", "∅∅∅": "∅∅∅", "CAT": "CAT", "WARST": "WARST", "UYST": "UYST", "AEDT": "AEDT", "MEZ": "MEZ", "COST": "COST", "AWDT": "AWDT", "MESZ": "MESZ", "ACST": "ACST", "ADT": "ADT", "MDT": "MDT", "HAST": "HAST", "HNT": "HNT", "LHST": "LHST", "HECU": "HECU", "MST": "MST", "NZDT": "NZDT", "EDT": "EDT", "WEZ": "WEZ", "HNPM": "HNPM", "CLST": "CLST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "WIB": "WIB", "WESZ": "WESZ", "HEOG": "HEOG", "HNEG": "HNEG", "EST": "EST", "AKST": "AKST", "ART": "ART", "NZST": "NZST", "OESZ": "OESZ", "COT": "COT"}, -+ locale: "mgo_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ADT": "ADT", "BOT": "BOT", "MYT": "MYT", "ACWST": "ACWST", "OESZ": "OESZ", "ECT": "ECT", "CST": "CST", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "TMST": "TMST", "MST": "MST", "NZST": "NZST", "LHDT": "LHDT", "SGT": "SGT", "WESZ": "WESZ", "HNOG": "HNOG", "SAST": "SAST", "MESZ": "MESZ", "JDT": "JDT", "HECU": "HECU", "HKST": "HKST", "MEZ": "MEZ", "AWST": "AWST", "HNT": "HNT", "HNEG": "HNEG", "WIT": "WIT", "CLST": "CLST", "IST": "IST", "HNPMX": "HNPMX", "COST": "COST", "EST": "EST", "WIB": "WIB", "HADT": "HADT", "PDT": "PDT", "CHADT": "CHADT", "HNCU": "HNCU", "WEZ": "WEZ", "COT": "COT", "MDT": "MDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNPM": "HNPM", "CLT": "CLT", "HAST": "HAST", "AWDT": "AWDT", "AKDT": "AKDT", "WAST": "WAST", "GYT": "GYT", "SRT": "SRT", "CAT": "CAT", "ACDT": "ACDT", "UYST": "UYST", "WART": "WART", "∅∅∅": "∅∅∅", "EDT": "EDT", "EAT": "EAT", "LHST": "LHST", "PST": "PST", "CHAST": "CHAST", "UYT": "UYT", "WAT": "WAT", "HKT": "HKT", "CDT": "CDT", "GFT": "GFT", "OEZ": "OEZ", "ChST": "ChST", "ART": "ART", "ACST": "ACST", "HEEG": "HEEG", "HEOG": "HEOG", "GMT": "GMT", "JST": "JST", "AKST": "AKST", "ARST": "ARST", "HEPM": "HEPM", "VET": "VET", "HAT": "HAT", "TMT": "TMT", "NZDT": "NZDT", "BT": "BT", "AEST": "AEST", "AEDT": "AEDT", "WARST": "WARST", "WITA": "WITA", "AST": "AST"}, - } - } -  -@@ -123,7 +101,7 @@ func (mgo *mgo_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mgo *mgo_CM) MonthsAbbreviated() []string { -- return mgo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -133,7 +111,7 @@ func (mgo *mgo_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mgo *mgo_CM) MonthsNarrow() []string { -- return mgo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -143,7 +121,7 @@ func (mgo *mgo_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mgo *mgo_CM) MonthsWide() []string { -- return mgo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,73 +167,13 @@ func (mgo *mgo_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mgo_CM' and handles both Whole and Real numbers based on 'v' - func (mgo *mgo_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mgo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mgo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mgo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mgo_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mgo *mgo_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mgo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mgo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mgo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mgo_CM' -@@ -263,60 +181,7 @@ func (mgo *mgo_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mgo.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mgo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mgo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mgo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mgo.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, mgo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mgo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mgo_CM' -@@ -325,72 +190,7 @@ func (mgo *mgo_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mgo.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mgo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mgo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mgo.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, mgo.currencyNegativePrefix[j]) -- } -- -- b = append(b, mgo.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mgo.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mgo.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mgo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mgo_CM' -@@ -398,28 +198,6 @@ func (mgo *mgo_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -428,17 +206,6 @@ func (mgo *mgo_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, mgo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -447,17 +214,6 @@ func (mgo *mgo_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, mgo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -466,25 +222,6 @@ func (mgo *mgo_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mgo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, mgo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -493,19 +230,6 @@ func (mgo *mgo_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -514,26 +238,6 @@ func (mgo *mgo_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -542,30 +246,6 @@ func (mgo *mgo_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -574,34 +254,5 @@ func (mgo *mgo_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mgo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mgo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mk/mk.go b/mk/mk.go -index 7d2efd3..1b7d148 100644 ---- a/mk/mk.go -+++ b/mk/mk.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"пр.н.е.", "н.е."}, - erasWide: []string{"пред нашата ера", "од нашата ера"}, -- timezones: map[string]string{"AST": "Атлантско стандардно време", "WIB": "Време во Западна Индонезија", "ART": "Стандардно време во Аргентина", "AWST": "Стандардно време во Западна Австралија", "WART": "Стандардно време во западна Аргентина", "GYT": "Време во Гвајана", "MDT": "MDT", "UYST": "Летно сметање на времето во Уругвај", "HAST": "Стандардно време во Хаваи - Алеутски острови", "HADT": "Летно сметање на времето во Хаваи - Алеутски острови", "WIT": "Време во Источна Индонезија", "HKT": "Стандардно време во Хонг Конг", "BOT": "Време во Боливија", "ACST": "Стандардно време во Централна Австралија", "JST": "Стандардно време во Јапонија", "ACDT": "Летно сметање на времето во Централна Австралија", "ECT": "Време во Еквадор", "AKDT": "Летно сметање на времето во Аљаска", "ACWST": "Стандардно време во Централна и Западна Австралија", "ACWDT": "Летно сметање на времето во Централна и Западна Австралија", "ARST": "Летно сметање на времето во Аргентина", "ChST": "Време во Чаморо", "HEEG": "Летно сметање на времето во Источен Гренланд", "CHADT": "Летно сметање на времето во Четем", "MESZ": "Средноевропско летно време", "LHDT": "Летно сметање на времето во Лорд Хау", "JDT": "Летно сметање на времето во Јапонија", "EST": "Источно стандардно време", "MYT": "Време во Малезија", "NZST": "Стандардно време во Нов Зеланд", "GFT": "Време во Француска Гвајана", "HNCU": "Стандардно време во Куба", "EAT": "Источноафриканско време", "COT": "Стандардно време во Колумбија", "EDT": "Источно летно сметање на времето", "SAST": "Време во Јужноафриканска Република", "CLT": "Стандардно време во Чиле", "HNEG": "Стандардно време во Источен Гренланд", "TMST": "Летно време во Туркменистан", "AEST": "Стандардно време во Источна Австралија", "AWDT": "Летно сметање на времето во Западна Австралија", "CAT": "Средноафриканско време", "HNPMX": "Стандардно тихоокеанско време во Мексико", "HNNOMX": "Стандардно време во северозападно Мексико", "HEPMX": "Летно тихоокеанско време во Мексико", "NZDT": "Летно сметање на времето во Нов Зеланд", "∅∅∅": "Летно сметање на времето во Перу", "OEZ": "Источноевропско стандардно време", "ADT": "Атлантско летно сметање на времето", "VET": "Време во Венецуела", "HEOG": "Летно сметање на времето во Западен Гренланд", "WAT": "Западноафриканско стандардно време", "AKST": "Стандардно време во Аљаска", "HNT": "Стандардно време на Њуфаундленд", "LHST": "Стандардно време во Лорд Хау", "IST": "Време во Индија", "TMT": "Стандардно време во Туркменистан", "SGT": "Време во Сингапур", "PDT": "Пацифичко летно сметање на времето", "WEZ": "Западноевропско стандардно време", "WESZ": "Западноевропско летно време", "CHAST": "Стандардно време во Четем", "SRT": "Време во Суринам", "HNOG": "Стандардно време во Западен Гренланд", "CST": "Централно стандардно време во Северна Америка", "CDT": "Централно летно сметање на времето", "WITA": "Време во Централна Индонезија", "WARST": "Летно сметање на времето во западна Аргентина", "COST": "Летно сметање на времето во Колумбија", "GMT": "Средно време по Гринич", "UYT": "Стандардно време во Уругвај", "HAT": "Летно сметање на времето на Њуфаундленд", "HNPM": "Стандардно време на Сент Пјер и Микелан", "CLST": "Летно сметање на времето во Чиле", "OESZ": "Источноевропско летно време", "HENOMX": "Летно сметање на времето во северозападно Мексико", "PST": "Пацифичко стандардно време", "AEDT": "Летно сметање на времето во Источна Австралија", "HECU": "Летно сметање на времето во Куба", "BT": "Време во Бутан", "HKST": "Летно време во Хонг Конг", "HEPM": "Летно сметање на времето на Сент Пјер и Микелан", "MEZ": "Средноевропско стандардно време", "WAST": "Западноафриканско летно сметање на времето", "MST": "MST"}, -+ timezones: map[string]string{"MYT": "Време во Малезија", "HNPM": "Стандардно време на Сент Пјер и Микелан", "MDT": "MDT", "ChST": "Време во Чаморо", "HNEG": "Стандардно време во Источен Гренланд", "IST": "Време во Индија", "GFT": "Време во Француска Гвајана", "MESZ": "Средноевропско летно време", "HEPM": "Летно сметање на времето на Сент Пјер и Микелан", "PST": "Пацифичко стандардно време", "HNCU": "Стандардно време во Куба", "OESZ": "Источноевропско летно време", "MST": "MST", "AST": "Атлантско стандардно време", "HADT": "Летно сметање на времето во Хаваи - Алеутски острови", "AWDT": "Летно сметање на времето во Западна Австралија", "UYST": "Летно сметање на времето во Уругвај", "ACWST": "Стандардно време во Централна и Западна Австралија", "TMST": "Летно време во Туркменистан", "WIB": "Време во Западна Индонезија", "HKST": "Летно време во Хонг Конг", "CLST": "Летно сметање на времето во Чиле", "NZDT": "Летно сметање на времето во Нов Зеланд", "ART": "Стандардно време во Аргентина", "BT": "Време во Бутан", "AEDT": "Летно сметање на времето во Источна Австралија", "OEZ": "Источноевропско стандардно време", "HNOG": "Стандардно време во Западен Гренланд", "WAST": "Западноафриканско летно сметање на времето", "LHDT": "Летно сметање на времето во Лорд Хау", "WESZ": "Западноевропско летно време", "HNPMX": "Стандардно тихоокеанско време во Мексико", "AKST": "Стандардно време во Аљаска", "GYT": "Време во Гвајана", "HAST": "Стандардно време во Хаваи - Алеутски острови", "COST": "Летно сметање на времето во Колумбија", "ARST": "Летно сметање на времето во Аргентина", "HNNOMX": "Стандардно време во северозападно Мексико", "LHST": "Стандардно време во Лорд Хау", "PDT": "Пацифичко летно сметање на времето", "WAT": "Западноафриканско стандардно време", "HAT": "Летно сметање на времето на Њуфаундленд", "WARST": "Летно сметање на времето во западна Аргентина", "ACST": "Стандардно време во Централна Австралија", "ACDT": "Летно сметање на времето во Централна Австралија", "JDT": "Летно сметање на времето во Јапонија", "HNT": "Стандардно време на Њуфаундленд", "ECT": "Време во Еквадор", "EAT": "Источноафриканско време", "JST": "Стандардно време во Јапонија", "VET": "Време во Венецуела", "HEPMX": "Летно тихоокеанско време во Мексико", "WITA": "Време во Централна Индонезија", "CDT": "Централно летно сметање на времето", "HENOMX": "Летно сметање на времето во северозападно Мексико", "UYT": "Стандардно време во Уругвај", "AEST": "Стандардно време во Источна Австралија", "CHAST": "Стандардно време во Четем", "CHADT": "Летно сметање на времето во Четем", "HECU": "Летно сметање на времето во Куба", "SAST": "Време во Јужноафриканска Република", "MEZ": "Средноевропско стандардно време", "WIT": "Време во Источна Индонезија", "SGT": "Време во Сингапур", "CST": "Централно стандардно време во Северна Америка", "SRT": "Време во Суринам", "WEZ": "Западноевропско стандардно време", "HKT": "Стандардно време во Хонг Конг", "CLT": "Стандардно време во Чиле", "ADT": "Атлантско летно сметање на времето", "ACWDT": "Летно сметање на времето во Централна и Западна Австралија", "WART": "Стандардно време во западна Аргентина", "NZST": "Стандардно време во Нов Зеланд", "AKDT": "Летно сметање на времето во Аљаска", "COT": "Стандардно време во Колумбија", "EDT": "Источно летно сметање на времето", "∅∅∅": "Летно сметање на времето во Бразилија", "CAT": "Средноафриканско време", "TMT": "Стандардно време во Туркменистан", "GMT": "Средно време по Гринич", "BOT": "Време во Боливија", "HEEG": "Летно сметање на времето во Источен Гренланд", "AWST": "Стандардно време во Западна Австралија", "HEOG": "Летно сметање на времето во Западен Гренланд", "EST": "Источно стандардно време"}, - } - } -  -diff --git a/mk_MK/mk_MK.go b/mk_MK/mk_MK.go -index 1f3cefc..822e1a7 100644 ---- a/mk_MK/mk_MK.go -+++ b/mk_MK/mk_MK.go -@@ -10,68 +10,45 @@ import ( - ) -  - type mk_MK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mk_MK' locale - func New() locales.Translator { - return &mk_MK{ -- locale: "mk_MK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 5, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "јан.", "фев.", "мар.", "апр.", "мај", "јун.", "јул.", "авг.", "септ.", "окт.", "ноем.", "дек."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"}, -- daysAbbreviated: []string{"нед.", "пон.", "вт.", "сре.", "чет.", "пет.", "саб."}, -- daysNarrow: []string{"н", "п", "в", "с", "ч", "п", "с"}, -- daysShort: []string{"нед.", "пон.", "вто.", "сре.", "чет.", "пет.", "саб."}, -- daysWide: []string{"недела", "понеделник", "вторник", "среда", "четврток", "петок", "сабота"}, -- periodsAbbreviated: []string{"претпл.", "попл."}, -- periodsNarrow: []string{"претпл.", "попл."}, -- periodsWide: []string{"претпладне", "попладне"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"пр.н.е.", "н.е."}, -- erasWide: []string{"пред нашата ера", "од нашата ера"}, -- timezones: map[string]string{"HNNOMX": "Стандардно време во северозападно Мексико", "UYST": "Летно сметање на времето во Уругвај", "LHST": "Стандардно време во Лорд Хау", "SAST": "Време во Јужноафриканска Република", "AWST": "Стандардно време во Западна Австралија", "NZST": "Стандардно време во Нов Зеланд", "CHAST": "Стандардно време во Четем", "MDT": "MDT", "UYT": "Стандардно време во Уругвај", "CST": "Централно стандардно време во Северна Америка", "WEZ": "Западноевропско стандардно време", "ACWST": "Стандардно време во Централна и Западна Австралија", "AWDT": "Летно сметање на времето во Западна Австралија", "HNPM": "Стандардно време на Сент Пјер и Микелан", "MESZ": "Средноевропско летно време", "IST": "Време во Индија", "HEOG": "Летно сметање на времето во Западен Гренланд", "CAT": "Средноафриканско време", "HECU": "Летно сметање на времето во Куба", "AKST": "Стандардно време во Аљаска", "ADT": "Атлантско летно сметање на времето", "ART": "Стандардно време во Аргентина", "MEZ": "Средноевропско стандардно време", "WIT": "Време во Источна Индонезија", "HEEG": "Летно сметање на времето во Источен Гренланд", "WIB": "Време во Западна Индонезија", "JDT": "Летно сметање на времето во Јапонија", "TMST": "Летно време во Туркменистан", "ACDT": "Летно сметање на времето во Централна Австралија", "COST": "Летно сметање на времето во Колумбија", "HEPMX": "Летно тихоокеанско време во Мексико", "CDT": "Централно летно сметање на времето", "VET": "Време во Венецуела", "LHDT": "Летно сметање на времето во Лорд Хау", "HNOG": "Стандардно време во Западен Гренланд", "CLST": "Летно сметање на времето во Чиле", "WART": "Стандардно време во западна Аргентина", "COT": "Стандардно време во Колумбија", "HENOMX": "Летно сметање на времето во северозападно Мексико", "BT": "Време во Бутан", "WESZ": "Западноевропско летно време", "MST": "MST", "SRT": "Време во Суринам", "GFT": "Време во Француска Гвајана", "WAST": "Западноафриканско летно сметање на времето", "OEZ": "Источноевропско стандардно време", "HNPMX": "Стандардно тихоокеанско време во Мексико", "MYT": "Време во Малезија", "HADT": "Летно сметање на времето во Хаваи - Алеутски острови", "HKST": "Летно време во Хонг Конг", "NZDT": "Летно сметање на времето во Нов Зеланд", "HAST": "Стандардно време во Хаваи - Алеутски острови", "AEST": "Стандардно време во Источна Австралија", "HEPM": "Летно сметање на времето на Сент Пјер и Микелан", "CLT": "Стандардно време во Чиле", "PST": "Пацифичко стандардно време", "WITA": "Време во Централна Индонезија", "ChST": "Време во Чаморо", "TMT": "Стандардно време во Туркменистан", "HKT": "Стандардно време во Хонг Конг", "HNEG": "Стандардно време во Источен Гренланд", "ACST": "Стандардно време во Централна Австралија", "GMT": "Средно време по Гринич", "HNCU": "Стандардно време во Куба", "∅∅∅": "Акре летно сметање на времето", "HNT": "Стандардно време на Њуфаундленд", "HAT": "Летно сметање на времето на Њуфаундленд", "AEDT": "Летно сметање на времето во Источна Австралија", "JST": "Стандардно време во Јапонија", "WAT": "Западноафриканско стандардно време", "WARST": "Летно сметање на времето во западна Аргентина", "EDT": "Источно летно сметање на времето", "AST": "Атлантско стандардно време", "PDT": "Пацифичко летно сметање на времето", "ARST": "Летно сметање на времето во Аргентина", "OESZ": "Источноевропско летно време", "CHADT": "Летно сметање на времето во Четем", "BOT": "Време во Боливија", "EAT": "Источноафриканско време", "SGT": "Време во Сингапур", "EST": "Источно стандардно време", "AKDT": "Летно сметање на времето во Аљаска", "GYT": "Време во Гвајана", "ACWDT": "Летно сметање на времето во Централна и Западна Австралија", "ECT": "Време во Еквадор"}, -+ locale: "mk_MK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 5, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "LHST": "LHST", "PDT": "PDT", "HNCU": "HNCU", "COT": "COT", "WITA": "WITA", "CST": "CST", "HNEG": "HNEG", "HAST": "HAST", "GFT": "GFT", "WIT": "WIT", "COST": "COST", "MYT": "MYT", "WEZ": "WEZ", "OESZ": "OESZ", "TMST": "TMST", "GMT": "GMT", "BT": "BT", "ChST": "ChST", "CAT": "CAT", "CHAST": "CHAST", "GYT": "GYT", "CLST": "CLST", "ECT": "ECT", "MDT": "MDT", "HNNOMX": "HNNOMX", "HKT": "HKT", "ACWST": "ACWST", "WARST": "WARST", "NZST": "NZST", "CHADT": "CHADT", "AWDT": "AWDT", "WAST": "WAST", "JDT": "JDT", "AEST": "AEST", "IST": "IST", "PST": "PST", "WAT": "WAT", "HKST": "HKST", "NZDT": "NZDT", "SRT": "SRT", "ACDT": "ACDT", "HADT": "HADT", "HEPM": "HEPM", "JST": "JST", "SGT": "SGT", "HNT": "HNT", "CLT": "CLT", "AST": "AST", "EAT": "EAT", "MEZ": "MEZ", "UYT": "UYT", "UYST": "UYST", "∅∅∅": "∅∅∅", "AKST": "AKST", "WART": "WART", "HEOG": "HEOG", "SAST": "SAST", "LHDT": "LHDT", "AKDT": "AKDT", "OEZ": "OEZ", "ART": "ART", "ADT": "ADT", "HENOMX": "HENOMX", "AEDT": "AEDT", "WESZ": "WESZ", "EDT": "EDT", "CDT": "CDT", "MESZ": "MESZ", "VET": "VET", "HNOG": "HNOG", "EST": "EST", "BOT": "BOT", "ACWDT": "ACWDT", "MST": "MST", "ARST": "ARST", "HEPMX": "HEPMX", "HEEG": "HEEG", "HNPM": "HNPM", "HECU": "HECU", "HNPMX": "HNPMX", "HAT": "HAT", "TMT": "TMT", "WIB": "WIB", "ACST": "ACST"}, - } - } -  -@@ -142,7 +119,7 @@ func (mk *mk_MK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mk *mk_MK) MonthsAbbreviated() []string { -- return mk.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -152,7 +129,7 @@ func (mk *mk_MK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mk *mk_MK) MonthsNarrow() []string { -- return mk.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -162,7 +139,7 @@ func (mk *mk_MK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mk *mk_MK) MonthsWide() []string { -- return mk.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -208,73 +185,13 @@ func (mk *mk_MK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mk_MK' and handles both Whole and Real numbers based on 'v' - func (mk *mk_MK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mk.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mk_MK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mk *mk_MK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mk.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mk.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mk_MK' -@@ -282,56 +199,7 @@ func (mk *mk_MK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mk.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, mk.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mk_MK' -@@ -340,63 +208,7 @@ func (mk *mk_MK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mk.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, mk.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, mk.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, mk.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mk_MK' -@@ -404,21 +216,6 @@ func (mk *mk_MK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -427,21 +224,6 @@ func (mk *mk_MK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,21 +232,6 @@ func (mk *mk_MK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,24 +240,6 @@ func (mk *mk_MK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mk.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -499,19 +248,6 @@ func (mk *mk_MK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -520,26 +256,6 @@ func (mk *mk_MK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -548,30 +264,6 @@ func (mk *mk_MK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -580,34 +272,5 @@ func (mk *mk_MK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mk.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ml/ml.go b/ml/ml.go -index 2fc5d94..ae11619 100644 ---- a/ml/ml.go -+++ b/ml/ml.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ക്രി.മു.", "എഡി"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ക്രിസ്\u200cതുവിന് മുമ്പ്", "ആന്നോ ഡൊമിനി"}, -- timezones: map[string]string{"ECT": "ഇക്വഡോർ സമയം", "WART": "പടിഞ്ഞാറൻ അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "HNT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് സ്റ്റാൻഡേർഡ് സമയം", "HAT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് ഡേലൈറ്റ് സമയം", "AEDT": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "WITA": "മധ്യ ഇന്തോനേഷ്യ സമയം", "NZDT": "ന്യൂസിലാൻഡ് ഡേലൈറ്റ് സമയം", "∅∅∅": "ആമസോൺ ഗ്രീഷ്\u200cമകാല സമയം", "UYST": "ഉറുഗ്വേ ഗ്രീഷ്\u200cമകാല സമയം", "GYT": "ഗയാന സമയം", "AEST": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "IST": "ഇന്ത്യൻ സ്റ്റാൻഡേർഡ് സമയം", "CLST": "ചിലി ഗ്രീഷ്\u200cമകാല സമയം", "HECU": "ക്യൂബ ഡേലൈറ്റ് സമയം", "MYT": "മലേഷ്യ സമയം", "ADT": "അറ്റ്\u200cലാന്റിക് ഡേലൈറ്റ് സമയം", "HADT": "ഹവായ്-അലൂഷ്യൻ ഡേലൈറ്റ് സമയം", "CAT": "മധ്യ ആഫ്രിക്ക സമയം", "WAST": "പടിഞ്ഞാറൻ ആഫ്രിക്ക ഗ്രീഷ്\u200cമകാല സമയം", "HNCU": "ക്യൂബ സ്റ്റാൻഡേർഡ് സമയം", "MDT": "വടക്കെ അമേരിക്കൻ മൗണ്ടൻ ഡേലൈറ്റ് സമയം", "ACWST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "MEZ": "സെൻട്രൽ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "BOT": "ബൊളീവിയ സമയം", "OEZ": "കിഴക്കൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "SGT": "സിംഗപ്പൂർ സ്റ്റാൻഡേർഡ് സമയം", "EST": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "WIB": "പടിഞ്ഞാറൻ ഇന്തോനേഷ്യ സമയം", "WESZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ ഗ്രീഷ്\u200cമകാല സമയം", "TMT": "തുർക്ക്\u200cമെനിസ്ഥാൻ സ്റ്റാൻഡേർഡ് സമയം", "COST": "കൊളംബിയ ഗ്രീഷ്\u200cമകാല സമയം", "GMT": "ഗ്രീൻവിച്ച് മീൻ സമയം", "MST": "വടക്കെ അമേരിക്കൻ മൗണ്ടൻ സ്റ്റാൻഡേർഡ് സമയം", "ACST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "COT": "കൊളംബിയ സ്റ്റാൻഡേർഡ് സമയം", "HAST": "ഹവായ്-അലൂഷ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "SAST": "ദക്ഷിണാഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "ChST": "ചമോറോ സ്റ്റാൻഡേർഡ് സമയം", "HNPMX": "മെക്\u200cസിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "PDT": "വടക്കെ അമേരിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "AWST": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "AWDT": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "HEPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ ഡേലൈറ്റ് സമയം", "CLT": "ചിലി സ്റ്റാൻഡേർഡ് സമയം", "HEEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "MESZ": "സെൻട്രൽ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "CHADT": "ചാത്തം ഗ്രീഷ്\u200cമകാല സമയം", "HNEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "WARST": "പടിഞ്ഞാറൻ അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "WEZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "ACWDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "HNOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "TMST": "തുർക്ക്\u200cമെനിസ്ഥാൻ ഗ്രീഷ്\u200cമകാല സമയം", "HENOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്സിക്കൻ ഡേലൈറ്റ് സമയം", "AKST": "അലാസ്ക സ്റ്റാൻഡേർഡ് സമയം", "HKST": "ഹോങ്കോങ്ങ് ഗ്രീഷ്\u200cമകാല സമയം", "JST": "ജപ്പാൻ സ്റ്റാൻഡേർഡ് സമയം", "OESZ": "കിഴക്കൻ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "EDT": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "LHST": "ലോർഡ് ഹോവ് സ്റ്റാൻഡേർഡ് സമയം", "LHDT": "ലോർഡ് ഹോവ് ഡേലൈറ്റ് സമയം", "WAT": "പടിഞ്ഞാറൻ ആഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "UYT": "ഉറുഗ്വേ സ്റ്റാൻഡേർഡ് സമയം", "CST": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "AST": "അറ്റ്\u200cലാന്റിക് സ്റ്റാൻഡേർഡ് സമയം", "ART": "അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "HKT": "ഹോങ്കോങ്ങ് സ്റ്റാൻഡേർഡ് സമയം", "WIT": "കിഴക്കൻ ഇന്തോനേഷ്യ സമയം", "ARST": "അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "GFT": "ഫ്രഞ്ച് ഗയാന സമയം", "ACDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "EAT": "കിഴക്കൻ ആഫ്രിക്ക സമയം", "JDT": "ജപ്പാൻ ഡേലൈറ്റ് സമയം", "HNNOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്\u200cസിക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "AKDT": "അലാസ്\u200cക ഡേലൈറ്റ് സമയം", "CDT": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "BT": "ഭൂട്ടാൻ സമയം", "PST": "വടക്കെ അമേരിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "NZST": "ന്യൂസിലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "HEPMX": "മെക്സിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "VET": "വെനിസ്വേല സമയം", "SRT": "സുരിനെയിം സമയം", "HEOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "HNPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ സ്റ്റാൻഡേർഡ് സമയം", "CHAST": "ചാത്തം സ്റ്റാൻഡേർഡ് സമയം"}, -+ timezones: map[string]string{"IST": "ഇന്ത്യൻ സ്റ്റാൻഡേർഡ് സമയം", "HECU": "ക്യൂബ ഡേലൈറ്റ് സമയം", "GYT": "ഗയാന സമയം", "WITA": "മധ്യ ഇന്തോനേഷ്യ സമയം", "ChST": "ചമോറോ സ്റ്റാൻഡേർഡ് സമയം", "ARST": "അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "HADT": "ഹവായ്-അലൂഷ്യൻ ഡേലൈറ്റ് സമയം", "CHAST": "ചാത്തം സ്റ്റാൻഡേർഡ് സമയം", "AKDT": "അലാസ്\u200cക ഡേലൈറ്റ് സമയം", "AEST": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "VET": "വെനിസ്വേല സമയം", "EDT": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "TMT": "തുർക്ക്\u200cമെനിസ്ഥാൻ സ്റ്റാൻഡേർഡ് സമയം", "CDT": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "BOT": "ബൊളീവിയ സമയം", "HENOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്സിക്കൻ ഡേലൈറ്റ് സമയം", "HNPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ സ്റ്റാൻഡേർഡ് സമയം", "HNT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് സ്റ്റാൻഡേർഡ് സമയം", "WARST": "പടിഞ്ഞാറൻ അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "WIB": "പടിഞ്ഞാറൻ ഇന്തോനേഷ്യ സമയം", "WAST": "പടിഞ്ഞാറൻ ആഫ്രിക്ക ഗ്രീഷ്\u200cമകാല സമയം", "AKST": "അലാസ്ക സ്റ്റാൻഡേർഡ് സമയം", "ACST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "HNEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "MDT": "മകൌ വേനൽക്കാല സമയം", "NZDT": "ന്യൂസിലാൻഡ് ഡേലൈറ്റ് സമയം", "HAST": "ഹവായ്-അലൂഷ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "PST": "വടക്കെ അമേരിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "OEZ": "കിഴക്കൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "WIT": "കിഴക്കൻ ഇന്തോനേഷ്യ സമയം", "HNOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "HKT": "ഹോങ്കോങ്ങ് സ്റ്റാൻഡേർഡ് സമയം", "ADT": "അറ്റ്\u200cലാന്റിക് ഡേലൈറ്റ് സമയം", "ACDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "LHDT": "ലോർഡ് ഹോവ് ഡേലൈറ്റ് സമയം", "JDT": "ജപ്പാൻ ഡേലൈറ്റ് സമയം", "SGT": "സിംഗപ്പൂർ സ്റ്റാൻഡേർഡ് സമയം", "ACWST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "WAT": "പടിഞ്ഞാറൻ ആഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "CLT": "ചിലി സ്റ്റാൻഡേർഡ് സമയം", "MST": "മകൌ സ്റ്റാൻഡേർഡ് സമയം", "GMT": "ഗ്രീൻവിച്ച് മീൻ സമയം", "ART": "അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "SRT": "സുരിനെയിം സമയം", "AWST": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "∅∅∅": "അസോർസ് ഗ്രീഷ്\u200cമകാല സമയം", "AST": "അറ്റ്\u200cലാന്റിക് സ്റ്റാൻഡേർഡ് സമയം", "AEDT": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "HNPMX": "മെക്\u200cസിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "GFT": "ഫ്രഞ്ച് ഗയാന സമയം", "COST": "കൊളംബിയ ഗ്രീഷ്\u200cമകാല സമയം", "UYT": "ഉറുഗ്വേ സ്റ്റാൻഡേർഡ് സമയം", "WEZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "TMST": "തുർക്ക്\u200cമെനിസ്ഥാൻ ഗ്രീഷ്\u200cമകാല സമയം", "ECT": "ഇക്വഡോർ സമയം", "MEZ": "സെൻട്രൽ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "LHST": "ലോർഡ് ഹോവ് സ്റ്റാൻഡേർഡ് സമയം", "MYT": "മലേഷ്യ സമയം", "CHADT": "ചാത്തം ഗ്രീഷ്\u200cമകാല സമയം", "WESZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ ഗ്രീഷ്\u200cമകാല സമയം", "OESZ": "കിഴക്കൻ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "SAST": "ദക്ഷിണാഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "CLST": "ചിലി ഗ്രീഷ്\u200cമകാല സമയം", "MESZ": "സെൻട്രൽ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "HEPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ ഡേലൈറ്റ് സമയം", "ACWDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "HNCU": "ക്യൂബ സ്റ്റാൻഡേർഡ് സമയം", "HEPMX": "മെക്സിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "AWDT": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "CAT": "മധ്യ ആഫ്രിക്ക സമയം", "JST": "ജപ്പാൻ സ്റ്റാൻഡേർഡ് സമയം", "UYST": "ഉറുഗ്വേ ഗ്രീഷ്\u200cമകാല സമയം", "EAT": "കിഴക്കൻ ആഫ്രിക്ക സമയം", "HAT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് ഡേലൈറ്റ് സമയം", "PDT": "വടക്കെ അമേരിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "BT": "ഭൂട്ടാൻ സമയം", "WART": "പടിഞ്ഞാറൻ അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "COT": "കൊളംബിയ സ്റ്റാൻഡേർഡ് സമയം", "HEOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "EST": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "HKST": "ഹോങ്കോങ്ങ് ഗ്രീഷ്\u200cമകാല സമയം", "CST": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "NZST": "ന്യൂസിലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "HEEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "HNNOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്\u200cസിക്കൻ സ്റ്റാൻഡേർഡ് സമയം"}, - } - } -  -diff --git a/ml_IN/ml_IN.go b/ml_IN/ml_IN.go -index 0d4f512..cf428d0 100644 ---- a/ml_IN/ml_IN.go -+++ b/ml_IN/ml_IN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ml_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ml_IN' locale - func New() locales.Translator { - return &ml_IN{ -- locale: "ml_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ജനു", "ഫെബ്രു", "മാർ", "ഏപ്രി", "മേയ്", "ജൂൺ", "ജൂലൈ", "ഓഗ", "സെപ്റ്റം", "ഒക്ടോ", "നവം", "ഡിസം"}, -- monthsNarrow: []string{"", "ജ", "ഫ", "മാ", "ഏ", "മെ", "ജൂൺ", "ജൂ", "ഓ", "സെ", "ഒ", "ന", "ഡി"}, -- monthsWide: []string{"", "ജനുവരി", "ഫെബ്രുവരി", "മാർച്ച്", "ഏപ്രിൽ", "മേയ്", "ജൂൺ", "ജൂലൈ", "ഓഗസ്റ്റ്", "സെപ്റ്റംബർ", "ഒക്\u200cടോബർ", "നവംബർ", "ഡിസംബർ"}, -- daysAbbreviated: []string{"ഞായർ", "തിങ്കൾ", "ചൊവ്വ", "ബുധൻ", "വ്യാഴം", "വെള്ളി", "ശനി"}, -- daysNarrow: []string{"ഞ", "തി", "ചൊ", "ബു", "വ്യാ", "വെ", "ശ"}, -- daysShort: []string{"ഞാ", "തി", "ചൊ", "ബു", "വ്യാ", "വെ", "ശ"}, -- daysWide: []string{"ഞായറാഴ്\u200cച", "തിങ്കളാഴ്\u200cച", "ചൊവ്വാഴ്ച", "ബുധനാഴ്\u200cച", "വ്യാഴാഴ്\u200cച", "വെള്ളിയാഴ്\u200cച", "ശനിയാഴ്\u200cച"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"ക്രി.മു.", "എഡി"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ക്രിസ്\u200cതുവിന് മുമ്പ്", "ആന്നോ ഡൊമിനി"}, -- timezones: map[string]string{"AWDT": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "ECT": "ഇക്വഡോർ സമയം", "COT": "കൊളംബിയ സ്റ്റാൻഡേർഡ് സമയം", "UYT": "ഉറുഗ്വേ സ്റ്റാൻഡേർഡ് സമയം", "AKST": "അലാസ്ക സ്റ്റാൻഡേർഡ് സമയം", "LHST": "ലോർഡ് ഹോവ് സ്റ്റാൻഡേർഡ് സമയം", "HEEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "ACDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "HNPMX": "മെക്\u200cസിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "UYST": "ഉറുഗ്വേ ഗ്രീഷ്\u200cമകാല സമയം", "HADT": "ഹവായ്-അലൂഷ്യൻ ഡേലൈറ്റ് സമയം", "BT": "ഭൂട്ടാൻ സമയം", "ACWDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "GFT": "ഫ്രഞ്ച് ഗയാന സമയം", "TMT": "തുർക്ക്\u200cമെനിസ്ഥാൻ സ്റ്റാൻഡേർഡ് സമയം", "BOT": "ബൊളീവിയ സമയം", "WAT": "പടിഞ്ഞാറൻ ആഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "SRT": "സുരിനെയിം സമയം", "ARST": "അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "PDT": "വടക്കെ അമേരിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "CHADT": "ചാത്തം ഗ്രീഷ്\u200cമകാല സമയം", "SAST": "ദക്ഷിണാഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "HNCU": "ക്യൂബ സ്റ്റാൻഡേർഡ് സമയം", "MST": "മകൌ സ്റ്റാൻഡേർഡ് സമയം", "MYT": "മലേഷ്യ സമയം", "HAST": "ഹവായ്-അലൂഷ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "WIT": "കിഴക്കൻ ഇന്തോനേഷ്യ സമയം", "LHDT": "ലോർഡ് ഹോവ് ഡേലൈറ്റ് സമയം", "∅∅∅": "ആമസോൺ ഗ്രീഷ്\u200cമകാല സമയം", "CAT": "മധ്യ ആഫ്രിക്ക സമയം", "ACWST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "HNPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ സ്റ്റാൻഡേർഡ് സമയം", "CHAST": "ചാത്തം സ്റ്റാൻഡേർഡ് സമയം", "COST": "കൊളംബിയ ഗ്രീഷ്\u200cമകാല സമയം", "CDT": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "MESZ": "സെൻട്രൽ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "JST": "ജപ്പാൻ സ്റ്റാൻഡേർഡ് സമയം", "ChST": "ചമോറോ സ്റ്റാൻഡേർഡ് സമയം", "EAT": "കിഴക്കൻ ആഫ്രിക്ക സമയം", "MDT": "മകൌ വേനൽക്കാല സമയം", "AST": "അറ്റ്\u200cലാന്റിക് സ്റ്റാൻഡേർഡ് സമയം", "PST": "വടക്കെ അമേരിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "EST": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "AKDT": "അലാസ്\u200cക ഡേലൈറ്റ് സമയം", "HNT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് സ്റ്റാൻഡേർഡ് സമയം", "HNOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "WITA": "മധ്യ ഇന്തോനേഷ്യ സമയം", "IST": "ഇന്ത്യൻ സ്റ്റാൻഡേർഡ് സമയം", "WARST": "പടിഞ്ഞാറൻ അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "HECU": "ക്യൂബ ഡേലൈറ്റ് സമയം", "NZST": "ന്യൂസിലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "NZDT": "ന്യൂസിലാൻഡ് ഡേലൈറ്റ് സമയം", "TMST": "തുർക്ക്\u200cമെനിസ്ഥാൻ ഗ്രീഷ്\u200cമകാല സമയം", "HNEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "HENOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്സിക്കൻ ഡേലൈറ്റ് സമയം", "EDT": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "VET": "വെനിസ്വേല സമയം", "HAT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് ഡേലൈറ്റ് സമയം", "HEOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "HNNOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്\u200cസിക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "ADT": "അറ്റ്\u200cലാന്റിക് ഡേലൈറ്റ് സമയം", "WESZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ ഗ്രീഷ്\u200cമകാല സമയം", "MEZ": "സെൻട്രൽ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "CLT": "ചിലി സ്റ്റാൻഡേർഡ് സമയം", "CLST": "ചിലി ഗ്രീഷ്\u200cമകാല സമയം", "OESZ": "കിഴക്കൻ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "WART": "പടിഞ്ഞാറൻ അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "WEZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "AEDT": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "HEPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ ഡേലൈറ്റ് സമയം", "JDT": "ജപ്പാൻ ഡേലൈറ്റ് സമയം", "ACST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "GMT": "ഗ്രീൻവിച്ച് മീൻ സമയം", "ART": "അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "HKT": "ഹോങ്കോങ്ങ് സ്റ്റാൻഡേർഡ് സമയം", "HKST": "ഹോങ്കോങ്ങ് ഗ്രീഷ്\u200cമകാല സമയം", "AEST": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "OEZ": "കിഴക്കൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "GYT": "ഗയാന സമയം", "AWST": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "WAST": "പടിഞ്ഞാറൻ ആഫ്രിക്ക ഗ്രീഷ്\u200cമകാല സമയം", "SGT": "സിംഗപ്പൂർ സ്റ്റാൻഡേർഡ് സമയം", "HEPMX": "മെക്സിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "CST": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "WIB": "പടിഞ്ഞാറൻ ഇന്തോനേഷ്യ സമയം"}, -+ locale: "ml_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEOG": "HEOG", "NZST": "NZST", "ECT": "ECT", "ART": "ART", "ACST": "ACST", "HEPM": "HEPM", "HECU": "HECU", "HAT": "HAT", "BOT": "BOT", "JDT": "JDT", "OEZ": "OEZ", "HKST": "HKST", "CLT": "CLT", "EAT": "EAT", "AWST": "AWST", "UYT": "UYT", "AKDT": "AKDT", "HNT": "HNT", "WART": "WART", "COT": "COT", "CST": "CST", "HEEG": "HEEG", "JST": "JST", "AEDT": "AEDT", "WIT": "WIT", "EDT": "EDT", "AST": "AST", "LHDT": "LHDT", "MYT": "MYT", "ACDT": "ACDT", "HENOMX": "HENOMX", "BT": "BT", "TMT": "TMT", "WITA": "WITA", "HNPM": "HNPM", "HNPMX": "HNPMX", "WAT": "WAT", "OESZ": "OESZ", "GFT": "GFT", "HNOG": "HNOG", "MST": "MST", "ADT": "ADT", "LHST": "LHST", "CHADT": "CHADT", "WESZ": "WESZ", "TMST": "TMST", "SAST": "SAST", "CDT": "CDT", "WIB": "WIB", "ChST": "ChST", "ARST": "ARST", "PDT": "PDT", "WEZ": "WEZ", "WARST": "WARST", "SRT": "SRT", "MEZ": "MEZ", "ACWST": "ACWST", "ACWDT": "ACWDT", "GYT": "GYT", "NZDT": "NZDT", "HAST": "HAST", "VET": "VET", "HKT": "HKT", "∅∅∅": "∅∅∅", "IST": "IST", "COST": "COST", "MDT": "MDT", "HNCU": "HNCU", "HEPMX": "HEPMX", "CAT": "CAT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "AEST": "AEST", "CHAST": "CHAST", "WAST": "WAST", "AKST": "AKST", "EST": "EST", "AWDT": "AWDT", "UYST": "UYST", "GMT": "GMT", "HADT": "HADT", "HNEG": "HNEG", "PST": "PST", "SGT": "SGT", "CLST": "CLST"}, - } - } -  -@@ -135,7 +112,7 @@ func (ml *ml_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ml *ml_IN) MonthsAbbreviated() []string { -- return ml.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (ml *ml_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ml *ml_IN) MonthsNarrow() []string { -- return ml.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (ml *ml_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ml *ml_IN) MonthsWide() []string { -- return ml.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,82 +178,13 @@ func (ml *ml_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ml_IN' and handles both Whole and Real numbers based on 'v' - func (ml *ml_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ml.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, ml.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ml.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ml_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ml *ml_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ml.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ml.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ml.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ml_IN' -@@ -284,56 +192,7 @@ func (ml *ml_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ml.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ml.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ml.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ml.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ml.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ml_IN' -@@ -342,68 +201,7 @@ func (ml *ml_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ml.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ml.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ml.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ml.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ml.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ml.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ml_IN' -@@ -411,17 +209,6 @@ func (ml *ml_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -430,17 +217,6 @@ func (ml *ml_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ml.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -449,17 +225,6 @@ func (ml *ml_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ml.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -468,19 +233,6 @@ func (ml *ml_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ml.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ml.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -489,28 +241,6 @@ func (ml *ml_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ml.periodsAbbreviated[0]...) -- } else { -- b = append(b, ml.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -519,35 +249,6 @@ func (ml *ml_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ml.periodsAbbreviated[0]...) -- } else { -- b = append(b, ml.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -556,40 +257,6 @@ func (ml *ml_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ml.periodsAbbreviated[0]...) -- } else { -- b = append(b, ml.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -598,44 +265,5 @@ func (ml *ml_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ml.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ml.periodsAbbreviated[0]...) -- } else { -- b = append(b, ml.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ml.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mn/mn.go b/mn/mn.go -index 9016241..11fbbc8 100644 ---- a/mn/mn.go -+++ b/mn/mn.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"м.э.ө", "м.э."}, - erasNarrow: []string{"МЭӨ", "МЭ"}, - erasWide: []string{"манай эриний өмнөх", "манай эриний"}, -- timezones: map[string]string{"HAT": "Нью-Фаундлендын зуны цаг", "HNCU": "Кубын стандарт цаг", "EDT": "Зүүн эргийн зуны цаг", "UYT": "Уругвайн стандарт цаг", "AKST": "Аляскийн стандарт цаг", "WIB": "Баруун Индонезийн цаг", "SRT": "Суринамын цаг", "HKST": "Хонг Конгийн зуны цаг", "CLT": "Чилийн стандарт цаг", "CLST": "Чилийн зуны цаг", "HEPMX": "Мексикийн номхон далайн зуны цаг", "AST": "Атлантын стандарт цаг", "HEOG": "Баруун Гринландын зуны цаг", "AEDT": "Австралийн зүүн эргийн зуны цаг", "ACDT": "Төв Австралийн зуны цаг", "OESZ": "Зүүн Европын зуны цаг", "WART": "Баруун Аргентины стандарт цаг", "HNPMX": "Мексикийн номхон далайн стандарт цаг", "MYT": "Малайзын цаг", "HEEG": "Зүүн Гринландын зуны цаг", "ART": "Аргентины стандарт цаг", "ACWST": "Австралийн төв баруун эргийн стандарт цаг", "HEPM": "Сент-Пьер ба Микелоны зуны цаг", "ADT": "Атлантын зуны цаг", "PST": "Номхон далайн стандарт цаг", "CHADT": "Чатемын зуны цаг", "LHDT": "Лорд Хоугийн зуны цаг", "IST": "Энэтхэгийн цаг", "HNEG": "Зүүн Гринландын стандарт цаг", "HNT": "Нью-Фаундлендын стандарт цаг", "NZST": "Шинэ Зеландын стандарт цаг", "GFT": "Францын Гияанагийн цаг", "BOT": "Боливийн цаг", "WAST": "Баруун Африкийн зуны цаг", "VET": "Венесуэлийн цаг", "BT": "Бутаны цаг", "NZDT": "Шинэ Зеландын зуны цаг", "∅∅∅": "Амазоны зуны цаг", "COST": "Колумбын зуны цаг", "MDT": "MDT", "JST": "Японы стандарт цаг", "ACST": "Төв Австралийн стандарт цаг", "OEZ": "Зүүн Европын стандарт цаг", "WAT": "Баруун Африкийн стандарт цаг", "CDT": "Төв зуны цаг", "HADT": "Хавай-Алеутын зуны цаг", "AWST": "Австралийн баруун эргийн стандарт цаг", "AWDT": "Австралийн баруун эргийн зуны цаг", "HECU": "Кубын зуны цаг", "GYT": "Гуяанагийн цаг", "CHAST": "Чатемын стандарт цаг", "JDT": "Японы зуны цаг", "ECT": "Эквадорын цаг", "WARST": "Баруун Аргентины зуны цаг", "HENOMX": "Баруун хойд Мексикийн зуны цаг", "SGT": "Сингапурын цаг", "ARST": "Аргентины зуны цаг", "ACWDT": "Австралийн төв баруун эргийн зуны цаг", "HAST": "Хавай-Алеутын стандарт цаг", "WIT": "Зүүн Индонезийн цаг", "PDT": "Номхон далайн зуны цаг", "WEZ": "Баруун Европын стандарт цаг", "AEST": "Австралийн зүүн эргийн стандарт цаг", "HNPM": "Сент-Пьерре ба Микелоны стандарт цаг", "MESZ": "Төв Европын зуны цаг", "ChST": "Чаморрогийн цаг", "EAT": "Зүүн Африкийн цаг", "GMT": "Гринвичийн үндсэн цаг", "MEZ": "Төв Европын стандарт цаг", "CAT": "Төв Африкийн цаг", "UYST": "Уругвайн зуны цаг", "HNOG": "Баруун Гринландын стандарт цаг", "WESZ": "Баруун Европын зуны цаг", "HKT": "Хонг Конгийн стандарт цаг", "LHST": "Лорд Хоугийн стандарт цаг", "SAST": "Өмнөд Африкийн стандарт цаг", "TMT": "Туркменистаны стандарт цаг", "TMST": "Туркменистаны зуны цаг", "EST": "Зүүн эргийн стандарт цаг", "AKDT": "Аляскийн зуны цаг", "COT": "Колумбын стандарт цаг", "HNNOMX": "Баруун хойд Мексикийн стандарт цаг", "MST": "MST", "CST": "Төв стандарт цаг", "WITA": "Төв Индонезийн цаг"}, -+ timezones: map[string]string{"MESZ": "Төв Европын зуны цаг", "JST": "Японы стандарт цаг", "PST": "Номхон далайн стандарт цаг", "ACWDT": "Австралийн төв баруун эргийн зуны цаг", "OEZ": "Зүүн Европын стандарт цаг", "HKST": "Хонг Конгийн зуны цаг", "TMT": "Туркменистаны стандарт цаг", "EAT": "Зүүн Африкийн цаг", "HENOMX": "Баруун хойд Мексикийн зуны цаг", "LHDT": "Лорд Хоугийн зуны цаг", "BT": "Бутаны цаг", "HEPMX": "Мексикийн номхон далайн зуны цаг", "WARST": "Баруун Аргентины зуны цаг", "WITA": "Төв Индонезийн цаг", "MDT": "MDT", "GMT": "Гринвичийн үндсэн цаг", "ACWST": "Австралийн төв баруун эргийн стандарт цаг", "HECU": "Кубын зуны цаг", "WAT": "Баруун Африкийн стандарт цаг", "COST": "Колумбын зуны цаг", "HNNOMX": "Баруун хойд Мексикийн стандарт цаг", "CHAST": "Чатемын стандарт цаг", "HNCU": "Кубын стандарт цаг", "HEEG": "Зүүн Гринландын зуны цаг", "SGT": "Сингапурын цаг", "VET": "Венесуэлийн цаг", "HNT": "Нью-Фаундлендын стандарт цаг", "CST": "Төв стандарт цаг", "AST": "Атлантын стандарт цаг", "SRT": "Суринамын цаг", "ACST": "Төв Австралийн стандарт цаг", "HEPM": "Сент-Пьер ба Микелоны зуны цаг", "OESZ": "Зүүн Европын зуны цаг", "CLST": "Чилийн зуны цаг", "ARST": "Аргентины зуны цаг", "HADT": "Хавай-Алеутын зуны цаг", "LHST": "Лорд Хоугийн стандарт цаг", "GFT": "Францын Гияанагийн цаг", "CDT": "Төв зуны цаг", "ART": "Аргентины стандарт цаг", "MEZ": "Төв Европын стандарт цаг", "∅∅∅": "∅∅∅", "NZST": "Шинэ Зеландын стандарт цаг", "AWST": "Австралийн баруун эргийн стандарт цаг", "IST": "Энэтхэгийн цаг", "WEZ": "Баруун Европын стандарт цаг", "HNOG": "Баруун Гринландын стандарт цаг", "EST": "Зүүн эргийн стандарт цаг", "MST": "MST", "NZDT": "Шинэ Зеландын зуны цаг", "AWDT": "Австралийн баруун эргийн зуны цаг", "AEDT": "Австралийн зүүн эргийн зуны цаг", "UYST": "Уругвайн зуны цаг", "AKST": "Аляскийн стандарт цаг", "CAT": "Төв Африкийн цаг", "ADT": "Атлантын зуны цаг", "HAST": "Хавай-Алеутын стандарт цаг", "HNPM": "Сент-Пьерре ба Микелоны стандарт цаг", "AEST": "Австралийн зүүн эргийн стандарт цаг", "WAST": "Баруун Африкийн зуны цаг", "TMST": "Туркменистаны зуны цаг", "WIB": "Баруун Индонезийн цаг", "UYT": "Уругвайн стандарт цаг", "PDT": "Номхон далайн зуны цаг", "SAST": "Өмнөд Африкийн стандарт цаг", "COT": "Колумбын стандарт цаг", "HEOG": "Баруун Гринландын зуны цаг", "AKDT": "Аляскийн зуны цаг", "WART": "Баруун Аргентины стандарт цаг", "GYT": "Гуяанагийн цаг", "BOT": "Боливийн цаг", "CHADT": "Чатемын зуны цаг", "HNPMX": "Мексикийн номхон далайн стандарт цаг", "CLT": "Чилийн стандарт цаг", "ACDT": "Төв Австралийн зуны цаг", "HNEG": "Зүүн Гринландын стандарт цаг", "JDT": "Японы зуны цаг", "HAT": "Нью-Фаундлендын зуны цаг", "WIT": "Зүүн Индонезийн цаг", "HKT": "Хонг Конгийн стандарт цаг", "MYT": "Малайзын цаг", "WESZ": "Баруун Европын зуны цаг", "EDT": "Зүүн эргийн зуны цаг", "ECT": "Эквадорын цаг", "ChST": "Чаморрогийн цаг"}, - } - } -  -diff --git a/mn_MN/mn_MN.go b/mn_MN/mn_MN.go -index 5f9cf17..85e823a 100644 ---- a/mn_MN/mn_MN.go -+++ b/mn_MN/mn_MN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type mn_MN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mn_MN' locale - func New() locales.Translator { - return &mn_MN{ -- locale: "mn_MN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Нэгдүгээр сар", "Хоёрдугаар сар", "Гуравдугаар сар", "Дөрөвдүгээр сар", "Тавдугаар сар", "Зургадугаар сар", "Долдугаар сар", "Наймдугаар сар", "Есдүгээр сар", "Аравдугаар сар", "Арван нэгдүгээр сар", "Арван хоёрдугаар сар"}, -- daysAbbreviated: []string{"Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"}, -- daysNarrow: []string{"Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"}, -- daysShort: []string{"Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"}, -- daysWide: []string{"ням", "даваа", "мягмар", "лхагва", "пүрэв", "баасан", "бямба"}, -- periodsAbbreviated: []string{"ҮӨ", "ҮХ"}, -- periodsNarrow: []string{"үө", "үх"}, -- periodsWide: []string{"ү.ө", "ү.х"}, -- erasAbbreviated: []string{"м.э.ө", "м.э."}, -- erasNarrow: []string{"МЭӨ", "МЭ"}, -- erasWide: []string{"манай эриний өмнөх", "манай эриний"}, -- timezones: map[string]string{"HNEG": "Зүүн Гринландын стандарт цаг", "TMST": "Туркменистаны зуны цаг", "MDT": "MDT", "ARST": "Аргентины зуны цаг", "HKT": "Хонг Конгийн стандарт цаг", "LHDT": "Лорд Хоугийн зуны цаг", "JST": "Японы стандарт цаг", "OESZ": "Зүүн Европын зуны цаг", "HECU": "Кубын зуны цаг", "UYST": "Уругвайн зуны цаг", "WEZ": "Баруун Европын стандарт цаг", "AWST": "Австралийн баруун эргийн стандарт цаг", "WART": "Баруун Аргентины стандарт цаг", "HEPMX": "Мексикийн номхон далайн зуны цаг", "AKDT": "Аляскийн зуны цаг", "ADT": "Атлантын зуны цаг", "MYT": "Малайзын цаг", "GFT": "Францын Гияанагийн цаг", "ECT": "Эквадорын цаг", "TMT": "Туркменистаны стандарт цаг", "ChST": "Чаморрогийн цаг", "HKST": "Хонг Конгийн зуны цаг", "WITA": "Төв Индонезийн цаг", "CHADT": "Чатемын зуны цаг", "MESZ": "Төв Европын зуны цаг", "IST": "Энэтхэгийн цаг", "BOT": "Боливийн цаг", "ACST": "Төв Австралийн стандарт цаг", "COST": "Колумбын зуны цаг", "GYT": "Гуяанагийн цаг", "HNPM": "Сент-Пьерре ба Микелоны стандарт цаг", "NZST": "Шинэ Зеландын стандарт цаг", "PDT": "Номхон далайн зуны цаг", "AWDT": "Австралийн баруун эргийн зуны цаг", "HEPM": "Сент-Пьер ба Микелоны зуны цаг", "OEZ": "Зүүн Европын стандарт цаг", "HNCU": "Кубын стандарт цаг", "EST": "Зүүн эргийн стандарт цаг", "HAST": "Хавай-Алеутын стандарт цаг", "ACWST": "Австралийн төв баруун эргийн стандарт цаг", "LHST": "Лорд Хоугийн стандарт цаг", "HNOG": "Баруун Гринландын стандарт цаг", "CHAST": "Чатемын стандарт цаг", "CLST": "Чилийн зуны цаг", "MST": "MST", "WIB": "Баруун Индонезийн цаг", "SRT": "Суринамын цаг", "BT": "Бутаны цаг", "WESZ": "Баруун Европын зуны цаг", "CAT": "Төв Африкийн цаг", "JDT": "Японы зуны цаг", "HEEG": "Зүүн Гринландын зуны цаг", "COT": "Колумбын стандарт цаг", "WARST": "Баруун Аргентины зуны цаг", "AKST": "Аляскийн стандарт цаг", "ART": "Аргентины стандарт цаг", "AEST": "Австралийн зүүн эргийн стандарт цаг", "SAST": "Өмнөд Африкийн стандарт цаг", "CLT": "Чилийн стандарт цаг", "VET": "Венесуэлийн цаг", "HAT": "Нью-Фаундлендын зуны цаг", "PST": "Номхон далайн стандарт цаг", "ACDT": "Төв Австралийн зуны цаг", "WAST": "Баруун Африкийн зуны цаг", "∅∅∅": "Перугийн зуны цаг", "CDT": "Төв зуны цаг", "UYT": "Уругвайн стандарт цаг", "AEDT": "Австралийн зүүн эргийн зуны цаг", "NZDT": "Шинэ Зеландын зуны цаг", "GMT": "Гринвичийн үндсэн цаг", "EDT": "Зүүн эргийн зуны цаг", "WIT": "Зүүн Индонезийн цаг", "SGT": "Сингапурын цаг", "MEZ": "Төв Европын стандарт цаг", "WAT": "Баруун Африкийн стандарт цаг", "HENOMX": "Баруун хойд Мексикийн зуны цаг", "AST": "Атлантын стандарт цаг", "ACWDT": "Австралийн төв баруун эргийн зуны цаг", "HEOG": "Баруун Гринландын зуны цаг", "HNT": "Нью-Фаундлендын стандарт цаг", "EAT": "Зүүн Африкийн цаг", "HNNOMX": "Баруун хойд Мексикийн стандарт цаг", "HNPMX": "Мексикийн номхон далайн стандарт цаг", "CST": "Төв стандарт цаг", "HADT": "Хавай-Алеутын зуны цаг"}, -+ locale: "mn_MN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"BT": "BT", "HEPMX": "HEPMX", "HNOG": "HNOG", "ART": "ART", "GMT": "GMT", "ACWDT": "ACWDT", "CHADT": "CHADT", "AKDT": "AKDT", "WAST": "WAST", "HAT": "HAT", "COST": "COST", "WIB": "WIB", "SRT": "SRT", "HNEG": "HNEG", "SGT": "SGT", "HNPMX": "HNPMX", "ChST": "ChST", "BOT": "BOT", "JST": "JST", "TMST": "TMST", "ADT": "ADT", "VET": "VET", "HNT": "HNT", "MEZ": "MEZ", "UYST": "UYST", "CAT": "CAT", "HAST": "HAST", "HECU": "HECU", "TMT": "TMT", "CLT": "CLT", "ACST": "ACST", "ACDT": "ACDT", "HEPM": "HEPM", "WESZ": "WESZ", "EDT": "EDT", "CLST": "CLST", "WEZ": "WEZ", "AKST": "AKST", "WIT": "WIT", "EAT": "EAT", "LHDT": "LHDT", "HADT": "HADT", "HEEG": "HEEG", "WARST": "WARST", "NZST": "NZST", "AST": "AST", "HNNOMX": "HNNOMX", "PST": "PST", "CHAST": "CHAST", "WART": "WART", "COT": "COT", "NZDT": "NZDT", "HKST": "HKST", "HENOMX": "HENOMX", "AWDT": "AWDT", "PDT": "PDT", "GFT": "GFT", "∅∅∅": "∅∅∅", "HKT": "HKT", "AWST": "AWST", "GYT": "GYT", "ARST": "ARST", "ECT": "ECT", "MESZ": "MESZ", "JDT": "JDT", "WAT": "WAT", "OESZ": "OESZ", "HEOG": "HEOG", "EST": "EST", "LHST": "LHST", "HNPM": "HNPM", "WITA": "WITA", "MDT": "MDT", "CDT": "CDT", "ACWST": "ACWST", "AEST": "AEST", "UYT": "UYT", "HNCU": "HNCU", "OEZ": "OEZ", "MST": "MST", "CST": "CST", "AEDT": "AEDT", "IST": "IST", "SAST": "SAST", "MYT": "MYT"}, - } - } -  -@@ -135,7 +112,7 @@ func (mn *mn_MN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mn *mn_MN) MonthsAbbreviated() []string { -- return mn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (mn *mn_MN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mn *mn_MN) MonthsNarrow() []string { -- return mn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (mn *mn_MN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mn *mn_MN) MonthsWide() []string { -- return mn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,73 +178,13 @@ func (mn *mn_MN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mn_MN' and handles both Whole and Real numbers based on 'v' - func (mn *mn_MN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mn_MN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mn *mn_MN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mn_MN' -@@ -275,60 +192,7 @@ func (mn *mn_MN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mn.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mn.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mn.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, mn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mn_MN' -@@ -337,72 +201,7 @@ func (mn *mn_MN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mn.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mn.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, mn.currencyNegativePrefix[j]) -- } -- -- b = append(b, mn.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(mn.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, mn.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mn_MN' -@@ -410,28 +209,6 @@ func (mn *mn_MN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -440,17 +217,6 @@ func (mn *mn_MN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, mn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -459,20 +225,6 @@ func (mn *mn_MN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xd0, 0xbe, 0xd0, 0xbd, 0xd1, 0x8b}...) -- b = append(b, []byte{0x20}...) -- b = append(b, mn.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd1, 0x81, 0xd0, 0xb0, 0xd1, 0x80, 0xd1, 0x8b, 0xd0, 0xbd}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xd3, 0xa9, 0xd0, 0xb4, 0xd3, 0xa9, 0xd1, 0x80}...) -- - return string(b) - } -  -@@ -481,28 +233,6 @@ func (mn *mn_MN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xbe, 0xd0, 0xbd, 0xd1, 0x8b}...) -- b = append(b, []byte{0x20}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x20, 0xd1, 0x81, 0xd0, 0xb0, 0xd1, 0x80, 0xd1, 0x8b, 0xd0, 0xbd}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -511,19 +241,6 @@ func (mn *mn_MN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -532,26 +249,6 @@ func (mn *mn_MN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -560,30 +257,6 @@ func (mn *mn_MN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -592,34 +265,5 @@ func (mn *mn_MN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mr/mr.go b/mr/mr.go -index cd4b138..25cfcd2 100644 ---- a/mr/mr.go -+++ b/mr/mr.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"इ. स. पू.", "इ. स."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ईसवीसनपूर्व", "ईसवीसन"}, -- timezones: map[string]string{"EAT": "पूर्व आफ्रिका वेळ", "EST": "पौर्वात्य प्रमाण वेळ", "ART": "अर्जेंटिना प्रमाण वेळ", "AKST": "अलास्का प्रमाण वेळ", "WESZ": "पश्चिम युरोपियन उन्हाळी वेळ", "GFT": "फ्रेंच गयाना वेळ", "TMT": "तुर्कमेनिस्तान प्रमाण वेळ", "WAT": "पश्चिम आफ्रिका प्रमाण वेळ", "ECT": "इक्वेडोर वेळ", "COST": "कोलंबिया उन्हाळी वेळ", "EDT": "पौर्वात्य सूर्यप्रकाश वेळ", "HAT": "न्यू फाउंडलंड सूर्यप्रकाश वेळ", "WITA": "मध्\u200dय इंडोनेशिया वेळ", "LHDT": "लॉर्ड होवे सूर्यप्रकाश वेळ", "WARST": "पश्चिमी अर्जेंटिना उन्हाळी वेळ", "HNNOMX": "वायव्य मेक्सिको प्रमाण वेळ", "MESZ": "मध्\u200dय युरोपियन उन्हाळी वेळ", "WART": "पश्चिमी अर्जेंटिना प्रमाण वेळ", "ARST": "अर्जेंटिना उन्हाळी वेळ", "AEST": "ऑस्ट्रेलियन पूर्व प्रमाण वेळ", "JST": "जपान प्रमाण वेळ", "ChST": "चामोरो प्रमाण वेळ", "ACDT": "ऑस्ट्रेलियन मध्य सूर्यप्रकाश वेळ", "MST": "मकाऊ प्रमाणवेळ", "AKDT": "अलास्का सूर्यप्रकाश वेळ", "PDT": "पॅसिफिक सूर्यप्रकाश वेळ", "HEOG": "पश्चिम ग्रीनलँड उन्हाळी वेळ", "HNPM": "सेंट पियर आणि मिक्वेलोन प्रमाण वेळ", "MEZ": "मध्\u200dय युरोपियन प्रमाण वेळ", "HEEG": "पूर्व ग्रीनलँड उन्हाळी वेळ", "OEZ": "पूर्व युरोपियन प्रमाण वेळ", "COT": "कोलंबिया प्रमाण वेळ", "CDT": "केंद्रीय सूर्यप्रकाश वेळ", "ACWDT": "ऑस्ट्रेलियन मध्य-पश्चिम सूर्यप्रकाश वेळ", "CLST": "चिली उन्हाळी वेळ", "WAST": "पश्चिम आफ्रिका उन्हाळी वेळ", "HNPMX": "मेक्सिको पॅसिफिक प्रमाण वेळ", "BT": "भूतान वेळ", "HEPMX": "मेक्सिको पॅसिफिक सूर्यप्रकाश वेळ", "GYT": "गयाना वेळ", "SRT": "सुरिनाम वेळ", "PST": "पॅसिफिक प्रमाण वेळ", "CHADT": "चॅथम सूर्यप्रकाश वेळ", "∅∅∅": "अ\u200dॅमेझॉन उन्हाळी वेळ", "WEZ": "पश्चिम युरोपियन प्रमाण वेळ", "HEPM": "सेंट पियर आणि मिक्वेलोन सूर्यप्रकाश वेळ", "NZDT": "न्यूझीलंड सूर्यप्रकाश वेळ", "JDT": "जपान सूर्यप्रकाश वेळ", "MDT": "मकाऊ ग्रीष्मकालीन वेळ", "UYST": "उरुग्वे उन्हाळी वेळ", "HAST": "हवाई-अलूशन प्रमाण वेळ", "WIT": "पौर्वात्य इंडोनेशिया वेळ", "CAT": "मध्\u200dय आफ्रिका वेळ", "GMT": "ग्रीनिच प्रमाण वेळ", "CST": "केंद्रीय प्रमाण वेळ", "HADT": "हवाई-अलूशन सूर्यप्रकाश वेळ", "AWST": "ऑस्ट्रेलियन पश्चिम प्रमाण वेळ", "LHST": "लॉर्ड होवे प्रमाण वेळ", "TMST": "तुर्कमेनिस्तान उन्हाळी वेळ", "AST": "अटलांटिक प्रमाण वेळ", "ADT": "अटलांटिक सूर्यप्रकाश वेळ", "MYT": "मलेशिया वेळ", "UYT": "उरुग्वे प्रमाण वेळ", "SAST": "दक्षिण आफ्रिका प्रमाण वेळ", "WIB": "पश्चिमी इंडोनेशिया वेळ", "VET": "व्हेनेझुएला वेळ", "ACWST": "ऑस्ट्रेलियन मध्य-पश्चिम प्रमाण वेळ", "HNOG": "पश्चिम ग्रीनलँड प्रमाण वेळ", "HKT": "हाँग काँग प्रमाण वेळ", "SGT": "सिंगापूर प्रमाण वेळ", "HNCU": "क्यूबा प्रमाण वेळ", "NZST": "न्यूझीलंड प्रमाण वेळ", "CHAST": "चॅथम प्रमाण वेळ", "IST": "भारतीय प्रमाण वेळ", "BOT": "बोलिव्हिया वेळ", "HNEG": "पूर्व ग्रीनलँड प्रमाण वेळ", "ACST": "ऑस्ट्रेलियन मध्य प्रमाण वेळ", "AEDT": "ऑस्ट्रेलियन पूर्व सूर्यप्रकाश वेळ", "HENOMX": "वायव्य मेक्सिको सूर्यप्रकाश वेळ", "HECU": "क्यूबा सूर्यप्रकाश वेळ", "HNT": "न्यू फाउंडलंड प्रमाण वेळ", "AWDT": "ऑस्ट्रेलियन पश्चिम सूर्यप्रकाश वेळ", "HKST": "हाँग काँग उन्हाळी वेळ", "CLT": "चिली प्रमाण वेळ", "OESZ": "पूर्व युरोपियन उन्हाळी वेळ"}, -+ timezones: map[string]string{"HNPM": "सेंट पियर आणि मिक्वेलोन प्रमाण वेळ", "CHAST": "चॅथम प्रमाण वेळ", "HNOG": "पश्चिम ग्रीनलँड प्रमाण वेळ", "HKST": "हाँग काँग उन्हाळी वेळ", "MDT": "मकाऊ ग्रीष्मकालीन वेळ", "WEZ": "पश्चिम युरोपियन प्रमाण वेळ", "SGT": "सिंगापूर प्रमाण वेळ", "WAST": "पश्चिम आफ्रिका उन्हाळी वेळ", "SAST": "दक्षिण आफ्रिका प्रमाण वेळ", "TMT": "तुर्कमेनिस्तान प्रमाण वेळ", "ACWDT": "ऑस्ट्रेलियन मध्य-पश्चिम सूर्यप्रकाश वेळ", "HNCU": "क्यूबा प्रमाण वेळ", "ADT": "अटलांटिक सूर्यप्रकाश वेळ", "IST": "भारतीय प्रमाण वेळ", "EST": "पौर्वात्य प्रमाण वेळ", "ECT": "इक्वेडोर वेळ", "GFT": "फ्रेंच गयाना वेळ", "CLT": "चिली प्रमाण वेळ", "ART": "अर्जेंटिना प्रमाण वेळ", "MEZ": "मध्\u200dय युरोपियन प्रमाण वेळ", "AWST": "ऑस्ट्रेलियन पश्चिम प्रमाण वेळ", "CAT": "मध्\u200dय आफ्रिका वेळ", "MST": "मकाऊ प्रमाणवेळ", "WESZ": "पश्चिम युरोपियन उन्हाळी वेळ", "HECU": "क्यूबा सूर्यप्रकाश वेळ", "ACDT": "ऑस्ट्रेलियन मध्य सूर्यप्रकाश वेळ", "AEST": "ऑस्ट्रेलियन पूर्व प्रमाण वेळ", "ACST": "ऑस्ट्रेलियन मध्य प्रमाण वेळ", "LHDT": "लॉर्ड होवे सूर्यप्रकाश वेळ", "WITA": "मध्\u200dय इंडोनेशिया वेळ", "ChST": "चामोरो प्रमाण वेळ", "GYT": "गयाना वेळ", "∅∅∅": "ब्राझिलिया उन्हाळी वेळ", "HKT": "हाँग काँग प्रमाण वेळ", "WIB": "पश्चिमी इंडोनेशिया वेळ", "GMT": "ग्रीनिच प्रमाण वेळ", "ARST": "अर्जेंटिना उन्हाळी वेळ", "WART": "पश्चिमी अर्जेंटिना प्रमाण वेळ", "WARST": "पश्चिमी अर्जेंटिना उन्हाळी वेळ", "AWDT": "ऑस्ट्रेलियन पश्चिम सूर्यप्रकाश वेळ", "MYT": "मलेशिया वेळ", "JDT": "जपान सूर्यप्रकाश वेळ", "PDT": "पॅसिफिक सूर्यप्रकाश वेळ", "CHADT": "चॅथम सूर्यप्रकाश वेळ", "AKDT": "अलास्का सूर्यप्रकाश वेळ", "HNEG": "पूर्व ग्रीनलँड प्रमाण वेळ", "HNNOMX": "वायव्य मेक्सिको प्रमाण वेळ", "CLST": "चिली उन्हाळी वेळ", "AST": "अटलांटिक प्रमाण वेळ", "HEEG": "पूर्व ग्रीनलँड उन्हाळी वेळ", "PST": "पॅसिफिक प्रमाण वेळ", "COST": "कोलंबिया उन्हाळी वेळ", "TMST": "तुर्कमेनिस्तान उन्हाळी वेळ", "BT": "भूतान वेळ", "NZDT": "न्यूझीलंड सूर्यप्रकाश वेळ", "EAT": "पूर्व आफ्रिका वेळ", "SRT": "सुरिनाम वेळ", "MESZ": "मध्\u200dय युरोपियन उन्हाळी वेळ", "JST": "जपान प्रमाण वेळ", "ACWST": "ऑस्ट्रेलियन मध्य-पश्चिम प्रमाण वेळ", "AEDT": "ऑस्ट्रेलियन पूर्व सूर्यप्रकाश वेळ", "OESZ": "पूर्व युरोपियन उन्हाळी वेळ", "WIT": "पौर्वात्य इंडोनेशिया वेळ", "EDT": "पौर्वात्य सूर्यप्रकाश वेळ", "HEPM": "सेंट पियर आणि मिक्वेलोन सूर्यप्रकाश वेळ", "WAT": "पश्चिम आफ्रिका प्रमाण वेळ", "OEZ": "पूर्व युरोपियन प्रमाण वेळ", "BOT": "बोलिव्हिया वेळ", "LHST": "लॉर्ड होवे प्रमाण वेळ", "AKST": "अलास्का प्रमाण वेळ", "HNT": "न्यू फाउंडलंड प्रमाण वेळ", "NZST": "न्यूझीलंड प्रमाण वेळ", "CST": "केंद्रीय प्रमाण वेळ", "HAST": "हवाई-अलूशन प्रमाण वेळ", "UYT": "उरुग्वे प्रमाण वेळ", "UYST": "उरुग्वे उन्हाळी वेळ", "HEPMX": "मेक्सिको पॅसिफिक सूर्यप्रकाश वेळ", "COT": "कोलंबिया प्रमाण वेळ", "HEOG": "पश्चिम ग्रीनलँड उन्हाळी वेळ", "HADT": "हवाई-अलूशन सूर्यप्रकाश वेळ", "HENOMX": "वायव्य मेक्सिको सूर्यप्रकाश वेळ", "VET": "व्हेनेझुएला वेळ", "HNPMX": "मेक्सिको पॅसिफिक प्रमाण वेळ", "HAT": "न्यू फाउंडलंड सूर्यप्रकाश वेळ", "CDT": "केंद्रीय सूर्यप्रकाश वेळ"}, - } - } -  -diff --git a/mr_IN/mr_IN.go b/mr_IN/mr_IN.go -index fe47216..ec4c416 100644 ---- a/mr_IN/mr_IN.go -+++ b/mr_IN/mr_IN.go -@@ -42,32 +42,13 @@ type mr_IN struct { - // New returns a new instance of translator for the 'mr_IN' locale - func New() locales.Translator { - return &mr_IN{ -- locale: "mr_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "जाने", "फेब्रु", "मार्च", "एप्रि", "मे", "जून", "जुलै", "ऑग", "सप्टें", "ऑक्टो", "नोव्हें", "डिसें"}, -- monthsNarrow: []string{"", "जा", "फे", "मा", "ए", "मे", "जू", "जु", "ऑ", "स", "ऑ", "नो", "डि"}, -- monthsWide: []string{"", "जानेवारी", "फेब्रुवारी", "मार्च", "एप्रिल", "मे", "जून", "जुलै", "ऑगस्ट", "सप्टेंबर", "ऑक्टोबर", "नोव्हेंबर", "डिसेंबर"}, -- daysAbbreviated: []string{"रवि", "सोम", "मंगळ", "बुध", "गुरु", "शुक्र", "शनि"}, -- daysNarrow: []string{"र", "सो", "मं", "बु", "गु", "शु", "श"}, -- daysShort: []string{"र", "सो", "मं", "बु", "गु", "शु", "श"}, -- daysWide: []string{"रविवार", "सोमवार", "मंगळवार", "बुधवार", "गुरुवार", "शुक्रवार", "शनिवार"}, -- periodsAbbreviated: []string{"म.पू.", "म.उ."}, -- periodsNarrow: []string{"स", "सं"}, -- periodsWide: []string{"म.पू.", "म.उ."}, -- erasAbbreviated: []string{"इ. स. पू.", "इ. स."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ईसवीसनपूर्व", "ईसवीसन"}, -- timezones: map[string]string{"AST": "अटलांटिक प्रमाण वेळ", "WIB": "पश्चिमी इंडोनेशिया वेळ", "SRT": "सुरिनाम वेळ", "ACDT": "ऑस्ट्रेलियन मध्य सूर्यप्रकाश वेळ", "COST": "कोलंबिया उन्हाळी वेळ", "HECU": "क्यूबा सूर्यप्रकाश वेळ", "MDT": "मकाऊ ग्रीष्मकालीन वेळ", "ARST": "अर्जेंटिना उन्हाळी वेळ", "JDT": "जपान सूर्यप्रकाश वेळ", "WAT": "पश्चिम आफ्रिका प्रमाण वेळ", "MST": "मकाऊ प्रमाणवेळ", "HAT": "न्यू फाउंडलंड सूर्यप्रकाश वेळ", "HEPMX": "मेक्सिको पॅसिफिक सूर्यप्रकाश वेळ", "GYT": "गयाना वेळ", "BT": "भूतान वेळ", "ACWST": "ऑस्ट्रेलियन मध्य-पश्चिम प्रमाण वेळ", "SAST": "दक्षिण आफ्रिका प्रमाण वेळ", "COT": "कोलंबिया प्रमाण वेळ", "SGT": "सिंगापूर प्रमाण वेळ", "HNPMX": "मेक्सिको पॅसिफिक प्रमाण वेळ", "WARST": "पश्चिमी अर्जेंटिना उन्हाळी वेळ", "NZDT": "न्यूझीलंड सूर्यप्रकाश वेळ", "ACWDT": "ऑस्ट्रेलियन मध्य-पश्चिम सूर्यप्रकाश वेळ", "HNT": "न्यू फाउंडलंड प्रमाण वेळ", "AEST": "ऑस्ट्रेलियन पूर्व प्रमाण वेळ", "JST": "जपान प्रमाण वेळ", "BOT": "बोलिव्हिया वेळ", "AKDT": "अलास्का सूर्यप्रकाश वेळ", "CDT": "केंद्रीय सूर्यप्रकाश वेळ", "LHST": "लॉर्ड होवे प्रमाण वेळ", "ECT": "इक्वेडोर वेळ", "EDT": "पौर्वात्य सूर्यप्रकाश वेळ", "MYT": "मलेशिया वेळ", "HEPM": "सेंट पियर आणि मिक्वेलोन सूर्यप्रकाश वेळ", "ADT": "अटलांटिक सूर्यप्रकाश वेळ", "AEDT": "ऑस्ट्रेलियन पूर्व सूर्यप्रकाश वेळ", "HKT": "हाँग काँग प्रमाण वेळ", "WESZ": "पश्चिम युरोपियन उन्हाळी वेळ", "HNOG": "पश्चिम ग्रीनलँड प्रमाण वेळ", "AWST": "ऑस्ट्रेलियन पश्चिम प्रमाण वेळ", "AWDT": "ऑस्ट्रेलियन पश्चिम सूर्यप्रकाश वेळ", "WAST": "पश्चिम आफ्रिका उन्हाळी वेळ", "HENOMX": "वायव्य मेक्सिको सूर्यप्रकाश वेळ", "AKST": "अलास्का प्रमाण वेळ", "PST": "पॅसिफिक प्रमाण वेळ", "TMT": "तुर्कमेनिस्तान प्रमाण वेळ", "ACST": "ऑस्ट्रेलियन मध्य प्रमाण वेळ", "UYT": "उरुग्वे प्रमाण वेळ", "PDT": "पॅसिफिक सूर्यप्रकाश वेळ", "MEZ": "मध्\u200dय युरोपियन प्रमाण वेळ", "IST": "भारतीय प्रमाण वेळ", "CLST": "चिली उन्हाळी वेळ", "∅∅∅": "अ\u200dॅमेझॉन उन्हाळी वेळ", "HNNOMX": "वायव्य मेक्सिको प्रमाण वेळ", "EAT": "पूर्व आफ्रिका वेळ", "GMT": "ग्रीनिच प्रमाण वेळ", "EST": "पौर्वात्य प्रमाण वेळ", "OEZ": "पूर्व युरोपियन प्रमाण वेळ", "HNCU": "क्यूबा प्रमाण वेळ", "UYST": "उरुग्वे उन्हाळी वेळ", "ART": "अर्जेंटिना प्रमाण वेळ", "HEOG": "पश्चिम ग्रीनलँड उन्हाळी वेळ", "CHAST": "चॅथम प्रमाण वेळ", "CHADT": "चॅथम सूर्यप्रकाश वेळ", "CLT": "चिली प्रमाण वेळ", "GFT": "फ्रेंच गयाना वेळ", "WART": "पश्चिमी अर्जेंटिना प्रमाण वेळ", "VET": "व्हेनेझुएला वेळ", "HNEG": "पूर्व ग्रीनलँड प्रमाण वेळ", "CST": "केंद्रीय प्रमाण वेळ", "HADT": "हवाई-अलूशन सूर्यप्रकाश वेळ", "HKST": "हाँग काँग उन्हाळी वेळ", "WEZ": "पश्चिम युरोपियन प्रमाण वेळ", "HNPM": "सेंट पियर आणि मिक्वेलोन प्रमाण वेळ", "MESZ": "मध्\u200dय युरोपियन उन्हाळी वेळ", "ChST": "चामोरो प्रमाण वेळ", "TMST": "तुर्कमेनिस्तान उन्हाळी वेळ", "CAT": "मध्\u200dय आफ्रिका वेळ", "OESZ": "पूर्व युरोपियन उन्हाळी वेळ", "LHDT": "लॉर्ड होवे सूर्यप्रकाश वेळ", "NZST": "न्यूझीलंड प्रमाण वेळ", "HEEG": "पूर्व ग्रीनलँड उन्हाळी वेळ", "HAST": "हवाई-अलूशन प्रमाण वेळ", "WIT": "पौर्वात्य इंडोनेशिया वेळ", "WITA": "मध्\u200dय इंडोनेशिया वेळ"}, -+ locale: "mr_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "AEDT": "AEDT", "HEPMX": "HEPMX", "WESZ": "WESZ", "CLT": "CLT", "CHAST": "CHAST", "EDT": "EDT", "HKST": "HKST", "HAST": "HAST", "ChST": "ChST", "PDT": "PDT", "ACWDT": "ACWDT", "HNOG": "HNOG", "EST": "EST", "NZST": "NZST", "IST": "IST", "SGT": "SGT", "WIT": "WIT", "JDT": "JDT", "BT": "BT", "HNCU": "HNCU", "GFT": "GFT", "NZDT": "NZDT", "CDT": "CDT", "ACST": "ACST", "WEZ": "WEZ", "WARST": "WARST", "TMT": "TMT", "WIB": "WIB", "UYST": "UYST", "WAST": "WAST", "SAST": "SAST", "GYT": "GYT", "JST": "JST", "BOT": "BOT", "SRT": "SRT", "HADT": "HADT", "LHDT": "LHDT", "ARST": "ARST", "LHST": "LHST", "PST": "PST", "AKST": "AKST", "OEZ": "OEZ", "MEZ": "MEZ", "CST": "CST", "MDT": "MDT", "ADT": "ADT", "HENOMX": "HENOMX", "HNPM": "HNPM", "AEST": "AEST", "UYT": "UYT", "WITA": "WITA", "AKDT": "AKDT", "VET": "VET", "AST": "AST", "CAT": "CAT", "WAT": "WAT", "OESZ": "OESZ", "HAT": "HAT", "HEOG": "HEOG", "HKT": "HKT", "ART": "ART", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "COST": "COST", "GMT": "GMT", "MYT": "MYT", "HNT": "HNT", "ECT": "ECT", "MESZ": "MESZ", "ACDT": "ACDT", "COT": "COT", "TMST": "TMST", "∅∅∅": "∅∅∅", "EAT": "EAT", "HNEG": "HNEG", "AWST": "AWST", "AWDT": "AWDT", "HEPM": "HEPM", "ACWST": "ACWST", "HNPMX": "HNPMX", "MST": "MST", "WART": "WART", "HECU": "HECU"}, - } - } -  -@@ -143,7 +124,7 @@ func (mr *mr_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mr *mr_IN) MonthsAbbreviated() []string { -- return mr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -153,7 +134,7 @@ func (mr *mr_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mr *mr_IN) MonthsNarrow() []string { -- return mr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -163,7 +144,7 @@ func (mr *mr_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mr *mr_IN) MonthsWide() []string { -- return mr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -209,82 +190,13 @@ func (mr *mr_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mr_IN' and handles both Whole and Real numbers based on 'v' - func (mr *mr_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, mr.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mr_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mr *mr_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mr_IN' -@@ -292,56 +204,7 @@ func (mr *mr_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mr.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mr_IN' -@@ -350,64 +213,7 @@ func (mr *mr_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mr.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mr.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mr_IN' -@@ -415,17 +221,6 @@ func (mr *mr_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -434,17 +229,6 @@ func (mr *mr_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -453,17 +237,6 @@ func (mr *mr_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -472,19 +245,6 @@ func (mr *mr_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -493,28 +253,6 @@ func (mr *mr_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, mr.periodsAbbreviated[0]...) -- } else { -- b = append(b, mr.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -523,35 +261,6 @@ func (mr *mr_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, mr.periodsAbbreviated[0]...) -- } else { -- b = append(b, mr.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -560,40 +269,6 @@ func (mr *mr_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, mr.periodsAbbreviated[0]...) -- } else { -- b = append(b, mr.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,44 +277,5 @@ func (mr *mr_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, mr.periodsAbbreviated[0]...) -- } else { -- b = append(b, mr.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ms/ms.go b/ms/ms.go -index 6e591fd..e0f1529 100644 ---- a/ms/ms.go -+++ b/ms/ms.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"S.M.", "TM"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"S.M.", "TM"}, -- timezones: map[string]string{"ACWST": "Waktu Piawai Barat Tengah Australia", "WART": "Waktu Piawai Argentina Barat", "HNNOMX": "Waktu Piawai Barat Laut Mexico", "HNCU": "Waktu Piawai Cuba", "AEST": "Waktu Piawai Timur Australia", "LHST": "Waktu Piawai Lord Howe", "NZST": "Waktu Piawai New Zealand", "ChST": "Waktu Piawai Chamorro", "AKDT": "Waktu Siang Alaska", "CDT": "Waktu Siang Tengah", "UYT": "Waktu Piawai Uruguay", "AKST": "Waktu Piawai Alaska", "HEOG": "Waktu Musim Panas Greenland Barat", "WEZ": "Waktu Piawai Eropah Barat", "MESZ": "Waktu Musim Panas Eropah Tengah", "CLT": "Waktu Piawai Chile", "ACST": "Waktu Piawai Australia Tengah", "HECU": "Waktu Siang Cuba", "SRT": "Waktu Suriname", "GYT": "Waktu Guyana", "PDT": "Waktu Siang Pasifik", "WITA": "Waktu Indonesia Tengah", "MEZ": "Waktu Piawai Eropah Tengah", "JDT": "Waktu Siang Jepun", "TMST": "Waktu Musim Panas Turkmenistan", "COST": "Waktu Musim Panas Colombia", "HKT": "Waktu Piawai Hong Kong", "HKST": "Waktu Musim Panas Hong Kong", "HEEG": "Waktu Musim Panas Greenland Timur", "MDT": "MDT", "HNPMX": "Waktu Piawai Pasifik Mexico", "SAST": "Waktu Piawai Afrika Selatan", "PST": "Waktu Piawai Pasifik", "CHAST": "Waktu Piawai Chatham", "WAT": "Waktu Piawai Afrika Barat", "OEZ": "Waktu Piawai Eropah Timur", "EAT": "Waktu Afrika Timur", "HEPMX": "Waktu Siang Pasifik Mexico", "AEDT": "Waktu Siang Australia Timur", "JST": "Waktu Piawai Jepun", "∅∅∅": "Waktu Musim Panas Amazon", "WARST": "Waktu Musim Panas Argentina Barat", "HENOMX": "Waktu Siang Barat Laut Mexico", "EST": "Waktu Piawai Timur", "MST": "MST", "WIB": "Waktu Indonesia Barat", "BT": "Waktu Bhutan", "OESZ": "Waktu Musim Panas Eropah Timur", "ACWDT": "Waktu Siang Barat Tengah Australia", "LHDT": "Waktu Siang Lord Howe", "TMT": "Waktu Piawai Turkmenistan", "BOT": "Waktu Bolivia", "ACDT": "Waktu Siang Australia Tengah", "CAT": "Waktu Afrika Tengah", "HNOG": "Waktu Piawai Greenland Barat", "HAT": "Waktu Siang Newfoundland", "CLST": "Waktu Musim Panas Chile", "HNEG": "Waktu Piawai Greenland Timur", "WAST": "Waktu Musim Panas Afrika Barat", "COT": "Waktu Piawai Colombia", "ART": "Waktu Piawai Argentina", "WESZ": "Waktu Musim Panas Eropah Barat", "AWST": "Waktu Piawai Australia Barat", "GMT": "Waktu Min Greenwich", "SGT": "Waktu Piawai Singapura", "AWDT": "Waktu Siang Australia Barat", "NZDT": "Waktu Siang New Zealand", "ECT": "Waktu Ecuador", "UYST": "Waktu Musim Panas Uruguay", "WIT": "Waktu Indonesia Timur", "CST": "Waktu Piawai Pusat", "HAST": "Waktu Piawai Hawaii-Aleutian", "HNPM": "Waktu Piawai Saint Pierre dan Miquelon", "HEPM": "Waktu Siang Saint Pierre dan Miquelon", "CHADT": "Waktu Siang Chatham", "EDT": "Waktu Siang Timur", "AST": "Waktu Piawai Atlantik", "MYT": "Waktu Malaysia", "HADT": "Waktu Siang Hawaii-Aleutian", "ARST": "Waktu Musim Panas Argentina", "HNT": "Waktu Piawai Newfoundland", "IST": "Waktu Piawai India", "GFT": "Waktu Guyana Perancis", "ADT": "Waktu Siang Atlantik", "VET": "Waktu Venezuela"}, -+ timezones: map[string]string{"ACST": "Waktu Piawai Australia Tengah", "ACDT": "Waktu Siang Australia Tengah", "CHADT": "Waktu Siang Chatham", "ACWST": "Waktu Piawai Barat Tengah Australia", "WEZ": "Waktu Piawai Eropah Barat", "HNOG": "Waktu Piawai Greenland Barat", "CAT": "Waktu Afrika Tengah", "VET": "Waktu Venezuela", "SRT": "Waktu Suriname", "BT": "Waktu Bhutan", "TMT": "Waktu Piawai Turkmenistan", "CLT": "Waktu Piawai Chile", "ChST": "Waktu Piawai Chamorro", "HAST": "Waktu Piawai Hawaii-Aleutian", "PST": "Waktu Piawai Pasifik", "WAST": "Waktu Musim Panas Afrika Barat", "WIT": "Waktu Indonesia Timur", "COT": "Waktu Piawai Colombia", "HENOMX": "Waktu Siang Barat Laut Mexico", "AEST": "Waktu Piawai Timur Australia", "WAT": "Waktu Piawai Afrika Barat", "OEZ": "Waktu Piawai Eropah Timur", "TMST": "Waktu Musim Panas Turkmenistan", "CLST": "Waktu Musim Panas Chile", "MEZ": "Waktu Piawai Eropah Tengah", "HEEG": "Waktu Musim Panas Greenland Timur", "WESZ": "Waktu Musim Panas Eropah Barat", "HEPMX": "Waktu Siang Pasifik Mexico", "WITA": "Waktu Indonesia Tengah", "ART": "Waktu Piawai Argentina", "UYT": "Waktu Piawai Uruguay", "ECT": "Waktu Ecuador", "HNPM": "Waktu Piawai Saint Pierre dan Miquelon", "HNEG": "Waktu Piawai Greenland Timur", "HNNOMX": "Waktu Piawai Barat Laut Mexico", "HEPM": "Waktu Siang Saint Pierre dan Miquelon", "IST": "Waktu Piawai India", "WART": "Waktu Piawai Argentina Barat", "ARST": "Waktu Musim Panas Argentina", "LHDT": "Waktu Siang Lord Howe", "UYST": "Waktu Musim Panas Uruguay", "OESZ": "Waktu Musim Panas Eropah Timur", "WIB": "Waktu Indonesia Barat", "LHST": "Waktu Piawai Lord Howe", "JST": "Waktu Piawai Jepun", "AKDT": "Waktu Siang Alaska", "HKST": "Waktu Musim Panas Hong Kong", "AWDT": "Waktu Siang Australia Barat", "BOT": "Waktu Bolivia", "HADT": "Waktu Siang Hawaii-Aleutian", "AWST": "Waktu Piawai Australia Barat", "JDT": "Waktu Siang Jepun", "PDT": "Waktu Siang Pasifik", "SGT": "Waktu Piawai Singapura", "EST": "Waktu Piawai Timur", "HKT": "Waktu Piawai Hong Kong", "AKST": "Waktu Piawai Alaska", "ADT": "Waktu Siang Atlantik", "CHAST": "Waktu Piawai Chatham", "WARST": "Waktu Musim Panas Argentina Barat", "CDT": "Waktu Siang Tengah", "COST": "Waktu Musim Panas Colombia", "HEOG": "Waktu Musim Panas Greenland Barat", "CST": "Waktu Piawai Pusat", "MST": "MST", "MDT": "MDT", "NZDT": "Waktu Siang New Zealand", "HNT": "Waktu Piawai Newfoundland", "SAST": "Waktu Piawai Afrika Selatan", "GMT": "Waktu Min Greenwich", "EAT": "Waktu Afrika Timur", "MESZ": "Waktu Musim Panas Eropah Tengah", "ACWDT": "Waktu Siang Barat Tengah Australia", "HNCU": "Waktu Piawai Cuba", "HECU": "Waktu Siang Cuba", "HAT": "Waktu Siang Newfoundland", "EDT": "Waktu Siang Timur", "MYT": "Waktu Malaysia", "AEDT": "Waktu Siang Australia Timur", "HNPMX": "Waktu Piawai Pasifik Mexico", "GYT": "Waktu Guyana", "AST": "Waktu Piawai Atlantik", "NZST": "Waktu Piawai New Zealand", "∅∅∅": "Waktu Musim Panas Brasilia", "GFT": "Waktu Guyana Perancis"}, - } - } -  -diff --git a/ms_BN/ms_BN.go b/ms_BN/ms_BN.go -index 99d4e16..c3112c8 100644 ---- a/ms_BN/ms_BN.go -+++ b/ms_BN/ms_BN.go -@@ -50,28 +50,11 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{6}, - decimal: ",", - group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "$", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "O", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"}, -- daysAbbreviated: []string{"Ahd", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"}, -- daysNarrow: []string{"A", "I", "S", "R", "K", "J", "S"}, -- daysShort: []string{"Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"}, -- daysWide: []string{"Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"}, -- periodsAbbreviated: []string{"PG", "PTG"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"PG", "PTG"}, -- erasAbbreviated: []string{"S.M.", "TM"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"S.M.", "TM"}, -- timezones: map[string]string{"WART": "Waktu Piawai Argentina Barat", "HKST": "Waktu Musim Panas Hong Kong", "AEST": "Waktu Piawai Timur Australia", "CLST": "Waktu Musim Panas Chile", "TMST": "Waktu Musim Panas Turkmenistan", "WIB": "Waktu Indonesia Barat", "HNOG": "Waktu Piawai Greenland Barat", "JDT": "Waktu Siang Jepun", "GFT": "Waktu Guyana Perancis", "ECT": "Waktu Ecuador", "GMT": "Waktu Min Greenwich", "WAT": "Waktu Piawai Afrika Barat", "WARST": "Waktu Musim Panas Argentina Barat", "CST": "Waktu Piawai Pusat", "HADT": "Waktu Siang Hawaii-Aleutian", "EST": "Waktu Piawai Timur", "GYT": "Waktu Guyana", "HAST": "Waktu Piawai Hawaii-Aleutian", "HNPM": "Waktu Piawai Saint Pierre dan Miquelon", "NZDT": "Waktu Siang New Zealand", "MESZ": "Waktu Musim Panas Eropah Tengah", "HNNOMX": "Waktu Piawai Barat Laut Mexico", "WIT": "Waktu Indonesia Timur", "ChST": "Waktu Piawai Chamorro", "BOT": "Waktu Bolivia", "OESZ": "Waktu Musim Panas Eropah Timur", "AST": "Waktu Piawai Atlantik", "ACWST": "Waktu Piawai Barat Tengah Australia", "HNT": "Waktu Piawai Newfoundland", "ART": "Waktu Piawai Argentina", "AWDT": "Waktu Siang Australia Barat", "JST": "Waktu Piawai Jepun", "CLT": "Waktu Piawai Chile", "HNPMX": "Waktu Piawai Pasifik Mexico", "CAT": "Waktu Afrika Tengah", "AKDT": "Waktu Siang Alaska", "VET": "Waktu Venezuela", "HKT": "Waktu Piawai Hong Kong", "SAST": "Waktu Piawai Afrika Selatan", "ACDT": "Waktu Siang Australia Tengah", "OEZ": "Waktu Piawai Eropah Timur", "COT": "Waktu Piawai Colombia", "COST": "Waktu Musim Panas Colombia", "MST": "MST", "HAT": "Waktu Siang Newfoundland", "WITA": "Waktu Indonesia Tengah", "CHAST": "Waktu Piawai Chatham", "HEEG": "Waktu Musim Panas Greenland Timur", "TMT": "Waktu Piawai Turkmenistan", "CHADT": "Waktu Siang Chatham", "MYT": "Waktu Malaysia", "ACWDT": "Waktu Siang Barat Tengah Australia", "AWST": "Waktu Piawai Australia Barat", "HNEG": "Waktu Piawai Greenland Timur", "EAT": "Waktu Afrika Timur", "CDT": "Waktu Siang Tengah", "UYST": "Waktu Musim Panas Uruguay", "PDT": "Waktu Siang Pasifik", "MEZ": "Waktu Piawai Eropah Tengah", "LHDT": "Waktu Siang Lord Howe", "EDT": "Waktu Siang Timur", "AKST": "Waktu Piawai Alaska", "HEPM": "Waktu Siang Saint Pierre dan Miquelon", "HNCU": "Waktu Piawai Cuba", "SRT": "Waktu Suriname", "WESZ": "Waktu Musim Panas Eropah Barat", "SGT": "Waktu Piawai Singapura", "ADT": "Waktu Siang Atlantik", "BT": "Waktu Bhutan", "NZST": "Waktu Piawai New Zealand", "WAST": "Waktu Musim Panas Afrika Barat", "HENOMX": "Waktu Siang Barat Laut Mexico", "HECU": "Waktu Siang Cuba", "IST": "Waktu Piawai India", "HEOG": "Waktu Musim Panas Greenland Barat", "PST": "Waktu Piawai Pasifik", "WEZ": "Waktu Piawai Eropah Barat", "HEPMX": "Waktu Siang Pasifik Mexico", "MDT": "MDT", "UYT": "Waktu Piawai Uruguay", "ARST": "Waktu Musim Panas Argentina", "AEDT": "Waktu Siang Australia Timur", "LHST": "Waktu Piawai Lord Howe", "∅∅∅": "Waktu Musim Panas Amazon", "ACST": "Waktu Piawai Australia Tengah"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "COT": "COT", "ART": "ART", "LHST": "LHST", "MYT": "MYT", "CHAST": "CHAST", "PST": "PST", "WART": "WART", "GYT": "GYT", "WITA": "WITA", "EAT": "EAT", "HNEG": "HNEG", "ACWST": "ACWST", "AEDT": "AEDT", "WAST": "WAST", "AKST": "AKST", "CLST": "CLST", "MST": "MST", "ECT": "ECT", "HEEG": "HEEG", "JDT": "JDT", "UYST": "UYST", "ADT": "ADT", "HENOMX": "HENOMX", "VET": "VET", "HNCU": "HNCU", "HNT": "HNT", "EST": "EST", "ChST": "ChST", "SRT": "SRT", "HNNOMX": "HNNOMX", "UYT": "UYT", "ACWDT": "ACWDT", "AWST": "AWST", "LHDT": "LHDT", "WIT": "WIT", "HNOG": "HNOG", "TMST": "TMST", "CAT": "CAT", "CDT": "CDT", "HAST": "HAST", "WAT": "WAT", "HKST": "HKST", "TMT": "TMT", "MDT": "MDT", "NZDT": "NZDT", "MEZ": "MEZ", "ACDT": "ACDT", "AWDT": "AWDT", "PDT": "PDT", "COST": "COST", "EDT": "EDT", "HKT": "HKT", "NZST": "NZST", "BOT": "BOT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "GFT": "GFT", "BT": "BT", "CLT": "CLT", "WIB": "WIB", "WEZ": "WEZ", "OESZ": "OESZ", "HAT": "HAT", "HEOG": "HEOG", "GMT": "GMT", "ARST": "ARST", "ACST": "ACST", "SGT": "SGT", "OEZ": "OEZ", "HEPMX": "HEPMX", "SAST": "SAST", "CST": "CST", "HADT": "HADT", "HNPM": "HNPM", "CHADT": "CHADT", "WESZ": "WESZ", "JST": "JST", "WARST": "WARST", "AKDT": "AKDT", "AST": "AST", "HEPM": "HEPM", "IST": "IST", "AEST": "AEST", "HECU": "HECU"}, - } - } -  -@@ -124,7 +107,7 @@ func (ms *ms_BN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ms *ms_BN) MonthsAbbreviated() []string { -- return ms.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +117,7 @@ func (ms *ms_BN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ms *ms_BN) MonthsNarrow() []string { -- return ms.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +127,7 @@ func (ms *ms_BN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ms *ms_BN) MonthsWide() []string { -- return ms.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +173,13 @@ func (ms *ms_BN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ms_BN' and handles both Whole and Real numbers based on 'v' - func (ms *ms_BN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ms_BN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ms *ms_BN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ms.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ms_BN' -@@ -264,7 +187,7 @@ func (ms *ms_BN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ms.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -326,7 +249,7 @@ func (ms *ms_BN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ms.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -399,23 +322,6 @@ func (ms *ms_BN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,17 +330,6 @@ func (ms *ms_BN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -443,17 +338,6 @@ func (ms *ms_BN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,28 +369,6 @@ func (ms *ms_BN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -515,35 +377,6 @@ func (ms *ms_BN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -552,40 +385,6 @@ func (ms *ms_BN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -594,44 +393,5 @@ func (ms *ms_BN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ms.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ms_MY/ms_MY.go b/ms_MY/ms_MY.go -index 2c154a1..db37bed 100644 ---- a/ms_MY/ms_MY.go -+++ b/ms_MY/ms_MY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ms_MY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ms_MY' locale - func New() locales.Translator { - return &ms_MY{ -- locale: "ms_MY", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "O", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"}, -- daysAbbreviated: []string{"Ahd", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"}, -- daysNarrow: []string{"A", "I", "S", "R", "K", "J", "S"}, -- daysShort: []string{"Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"}, -- daysWide: []string{"Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"}, -- periodsAbbreviated: []string{"PG", "PTG"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"PG", "PTG"}, -- erasAbbreviated: []string{"S.M.", "TM"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"S.M.", "TM"}, -- timezones: map[string]string{"WESZ": "Waktu Musim Panas Eropah Barat", "AWST": "Waktu Piawai Australia Barat", "HEPMX": "Waktu Siang Pasifik Mexico", "AKDT": "Waktu Siang Alaska", "WIB": "Waktu Indonesia Barat", "BT": "Waktu Bhutan", "∅∅∅": "Waktu Musim Panas Amazon", "WAT": "Waktu Piawai Afrika Barat", "ART": "Waktu Piawai Argentina", "ARST": "Waktu Musim Panas Argentina", "MEZ": "Waktu Piawai Eropah Tengah", "IST": "Waktu Piawai India", "WAST": "Waktu Musim Panas Afrika Barat", "SRT": "Waktu Suriname", "GFT": "Waktu Guyana Perancis", "EAT": "Waktu Afrika Timur", "WART": "Waktu Piawai Argentina Barat", "MYT": "Waktu Malaysia", "NZST": "Waktu Piawai New Zealand", "NZDT": "Waktu Siang New Zealand", "CLST": "Waktu Musim Panas Chile", "HNEG": "Waktu Piawai Greenland Timur", "PDT": "Waktu Siang Pasifik", "CHAST": "Waktu Piawai Chatham", "JDT": "Waktu Siang Jepun", "ECT": "Waktu Ecuador", "WIT": "Waktu Indonesia Timur", "HNOG": "Waktu Piawai Greenland Barat", "HKT": "Waktu Piawai Hong Kong", "WITA": "Waktu Indonesia Tengah", "AEST": "Waktu Piawai Timur Australia", "LHDT": "Waktu Siang Lord Howe", "HNPMX": "Waktu Piawai Pasifik Mexico", "HADT": "Waktu Siang Hawaii-Aleutian", "HAT": "Waktu Siang Newfoundland", "TMST": "Waktu Musim Panas Turkmenistan", "HNCU": "Waktu Piawai Cuba", "EDT": "Waktu Siang Timur", "HAST": "Waktu Piawai Hawaii-Aleutian", "COT": "Waktu Piawai Colombia", "EST": "Waktu Piawai Timur", "CST": "Waktu Piawai Pusat", "HNT": "Waktu Piawai Newfoundland", "HEEG": "Waktu Musim Panas Greenland Timur", "ACST": "Waktu Piawai Australia Tengah", "OEZ": "Waktu Piawai Eropah Timur", "OESZ": "Waktu Musim Panas Eropah Timur", "HEOG": "Waktu Musim Panas Greenland Barat", "UYST": "Waktu Musim Panas Uruguay", "TMT": "Waktu Piawai Turkmenistan", "ChST": "Waktu Piawai Chamorro", "HENOMX": "Waktu Siang Barat Laut Mexico", "GYT": "Waktu Guyana", "AEDT": "Waktu Siang Australia Timur", "AWDT": "Waktu Siang Australia Barat", "HEPM": "Waktu Siang Saint Pierre dan Miquelon", "CHADT": "Waktu Siang Chatham", "COST": "Waktu Musim Panas Colombia", "MST": "MST", "MDT": "MDT", "ACWDT": "Waktu Siang Barat Tengah Australia", "HNPM": "Waktu Piawai Saint Pierre dan Miquelon", "CAT": "Waktu Afrika Tengah", "CDT": "Waktu Siang Tengah", "ADT": "Waktu Siang Atlantik", "ACWST": "Waktu Piawai Barat Tengah Australia", "LHST": "Waktu Piawai Lord Howe", "BOT": "Waktu Bolivia", "WARST": "Waktu Musim Panas Argentina Barat", "VET": "Waktu Venezuela", "HNNOMX": "Waktu Piawai Barat Laut Mexico", "SGT": "Waktu Piawai Singapura", "WEZ": "Waktu Piawai Eropah Barat", "AST": "Waktu Piawai Atlantik", "UYT": "Waktu Piawai Uruguay", "HKST": "Waktu Musim Panas Hong Kong", "SAST": "Waktu Piawai Afrika Selatan", "JST": "Waktu Piawai Jepun", "CLT": "Waktu Piawai Chile", "ACDT": "Waktu Siang Australia Tengah", "PST": "Waktu Piawai Pasifik", "MESZ": "Waktu Musim Panas Eropah Tengah", "HECU": "Waktu Siang Cuba", "GMT": "Waktu Min Greenwich", "AKST": "Waktu Piawai Alaska"}, -+ locale: "ms_MY", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNOG": "HNOG", "EST": "EST", "WIB": "WIB", "AWDT": "AWDT", "WEZ": "WEZ", "GFT": "GFT", "∅∅∅": "∅∅∅", "WITA": "WITA", "HEPM": "HEPM", "ACWST": "ACWST", "ACWDT": "ACWDT", "HNEG": "HNEG", "LHST": "LHST", "AKDT": "AKDT", "HAT": "HAT", "CST": "CST", "ECT": "ECT", "AST": "AST", "ACST": "ACST", "HNPM": "HNPM", "WESZ": "WESZ", "HEEG": "HEEG", "AEST": "AEST", "WAT": "WAT", "WAST": "WAST", "WIT": "WIT", "CAT": "CAT", "ART": "ART", "MESZ": "MESZ", "IST": "IST", "MST": "MST", "ARST": "ARST", "EAT": "EAT", "HADT": "HADT", "JDT": "JDT", "HEPMX": "HEPMX", "AKST": "AKST", "OEZ": "OEZ", "TMT": "TMT", "ADT": "ADT", "WART": "WART", "CLST": "CLST", "ACDT": "ACDT", "LHDT": "LHDT", "VET": "VET", "HKT": "HKT", "CDT": "CDT", "MDT": "MDT", "CHADT": "CHADT", "PDT": "PDT", "HAST": "HAST", "SGT": "SGT", "HNT": "HNT", "COST": "COST", "TMST": "TMST", "OESZ": "OESZ", "ChST": "ChST", "SRT": "SRT", "MYT": "MYT", "UYST": "UYST", "HNPMX": "HNPMX", "SAST": "SAST", "HEOG": "HEOG", "HKST": "HKST", "NZST": "NZST", "UYT": "UYT", "HNCU": "HNCU", "WARST": "WARST", "COT": "COT", "MEZ": "MEZ", "BT": "BT", "NZDT": "NZDT", "GMT": "GMT", "HNNOMX": "HNNOMX", "AWST": "AWST", "AEDT": "AEDT", "HECU": "HECU", "CHAST": "CHAST", "PST": "PST", "GYT": "GYT", "EDT": "EDT", "CLT": "CLT", "BOT": "BOT", "HENOMX": "HENOMX", "JST": "JST"}, - } - } -  -@@ -124,7 +101,7 @@ func (ms *ms_MY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ms *ms_MY) MonthsAbbreviated() []string { -- return ms.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (ms *ms_MY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ms *ms_MY) MonthsNarrow() []string { -- return ms.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (ms *ms_MY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ms *ms_MY) MonthsWide() []string { -- return ms.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +167,13 @@ func (ms *ms_MY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ms_MY' and handles both Whole and Real numbers based on 'v' - func (ms *ms_MY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ms_MY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ms *ms_MY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ms.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ms_MY' -@@ -264,56 +181,7 @@ func (ms *ms_MY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ms.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ms.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ms_MY' -@@ -322,68 +190,7 @@ func (ms *ms_MY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ms.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ms.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ms.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ms.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ms_MY' -@@ -391,23 +198,6 @@ func (ms *ms_MY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -416,17 +206,6 @@ func (ms *ms_MY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,17 +214,6 @@ func (ms *ms_MY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +222,6 @@ func (ms *ms_MY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ms.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,28 +230,6 @@ func (ms *ms_MY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -505,35 +238,6 @@ func (ms *ms_MY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -542,40 +246,6 @@ func (ms *ms_MY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -584,44 +254,5 @@ func (ms *ms_MY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ms.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ms_SG/ms_SG.go b/ms_SG/ms_SG.go -index 99b7014..9d77a9f 100644 ---- a/ms_SG/ms_SG.go -+++ b/ms_SG/ms_SG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ms_SG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ms_SG' locale - func New() locales.Translator { - return &ms_SG{ -- locale: "ms_SG", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogo", "Sep", "Okt", "Nov", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "O", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"}, -- daysAbbreviated: []string{"Ahd", "Isn", "Sel", "Rab", "Kha", "Jum", "Sab"}, -- daysNarrow: []string{"A", "I", "S", "R", "K", "J", "S"}, -- daysShort: []string{"Ah", "Is", "Se", "Ra", "Kh", "Ju", "Sa"}, -- daysWide: []string{"Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu"}, -- periodsAbbreviated: []string{"PG", "PTG"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"PG", "PTG"}, -- erasAbbreviated: []string{"S.M.", "TM"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"S.M.", "TM"}, -- timezones: map[string]string{"AKST": "Waktu Piawai Alaska", "PDT": "Waktu Siang Pasifik", "SAST": "Waktu Piawai Afrika Selatan", "ACDT": "Waktu Siang Australia Tengah", "TMST": "Waktu Musim Panas Turkmenistan", "WART": "Waktu Piawai Argentina Barat", "GMT": "Waktu Min Greenwich", "HEPMX": "Waktu Siang Pasifik Mexico", "HAST": "Waktu Piawai Hawaii-Aleutian", "AWDT": "Waktu Siang Australia Barat", "CLT": "Waktu Piawai Chile", "WARST": "Waktu Musim Panas Argentina Barat", "HNNOMX": "Waktu Piawai Barat Laut Mexico", "AST": "Waktu Piawai Atlantik", "ACWST": "Waktu Piawai Barat Tengah Australia", "HNT": "Waktu Piawai Newfoundland", "AEST": "Waktu Piawai Timur Australia", "OESZ": "Waktu Musim Panas Eropah Timur", "CLST": "Waktu Musim Panas Chile", "JDT": "Waktu Siang Jepun", "BT": "Waktu Bhutan", "ACST": "Waktu Piawai Australia Tengah", "EST": "Waktu Piawai Timur", "WESZ": "Waktu Musim Panas Eropah Barat", "HNPM": "Waktu Piawai Saint Pierre dan Miquelon", "SGT": "Waktu Piawai Singapura", "CHADT": "Waktu Siang Chatham", "HEEG": "Waktu Musim Panas Greenland Timur", "WIT": "Waktu Indonesia Timur", "SRT": "Waktu Suriname", "WITA": "Waktu Indonesia Tengah", "LHST": "Waktu Piawai Lord Howe", "WAST": "Waktu Musim Panas Afrika Barat", "HECU": "Waktu Siang Cuba", "CDT": "Waktu Siang Tengah", "GFT": "Waktu Guyana Perancis", "WAT": "Waktu Piawai Afrika Barat", "COT": "Waktu Piawai Colombia", "MYT": "Waktu Malaysia", "ART": "Waktu Piawai Argentina", "LHDT": "Waktu Siang Lord Howe", "ChST": "Waktu Piawai Chamorro", "MEZ": "Waktu Piawai Eropah Tengah", "HENOMX": "Waktu Siang Barat Laut Mexico", "MDT": "MDT", "WIB": "Waktu Indonesia Barat", "HKT": "Waktu Piawai Hong Kong", "HKST": "Waktu Musim Panas Hong Kong", "MST": "MST", "UYST": "Waktu Musim Panas Uruguay", "PST": "Waktu Piawai Pasifik", "NZST": "Waktu Piawai New Zealand", "EDT": "Waktu Siang Timur", "ECT": "Waktu Ecuador", "GYT": "Waktu Guyana", "UYT": "Waktu Piawai Uruguay", "ACWDT": "Waktu Siang Barat Tengah Australia", "ARST": "Waktu Musim Panas Argentina", "AEDT": "Waktu Siang Australia Timur", "IST": "Waktu Piawai India", "HNEG": "Waktu Piawai Greenland Timur", "COST": "Waktu Musim Panas Colombia", "HAT": "Waktu Siang Newfoundland", "HEPM": "Waktu Siang Saint Pierre dan Miquelon", "CHAST": "Waktu Piawai Chatham", "EAT": "Waktu Afrika Timur", "HNCU": "Waktu Piawai Cuba", "HNPMX": "Waktu Piawai Pasifik Mexico", "CST": "Waktu Piawai Pusat", "HADT": "Waktu Siang Hawaii-Aleutian", "HNOG": "Waktu Piawai Greenland Barat", "MESZ": "Waktu Musim Panas Eropah Tengah", "CAT": "Waktu Afrika Tengah", "WEZ": "Waktu Piawai Eropah Barat", "OEZ": "Waktu Piawai Eropah Timur", "AKDT": "Waktu Siang Alaska", "ADT": "Waktu Siang Atlantik", "HEOG": "Waktu Musim Panas Greenland Barat", "∅∅∅": "Waktu Musim Panas Amazon", "BOT": "Waktu Bolivia", "JST": "Waktu Piawai Jepun", "TMT": "Waktu Piawai Turkmenistan", "VET": "Waktu Venezuela", "AWST": "Waktu Piawai Australia Barat", "NZDT": "Waktu Siang New Zealand"}, -+ locale: "ms_SG", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACDT": "ACDT", "CHADT": "CHADT", "IST": "IST", "SAST": "SAST", "ECT": "ECT", "ADT": "ADT", "GMT": "GMT", "ChST": "ChST", "LHDT": "LHDT", "WART": "WART", "HKT": "HKT", "WIB": "WIB", "CDT": "CDT", "HADT": "HADT", "LHST": "LHST", "HNPM": "HNPM", "HEPM": "HEPM", "SGT": "SGT", "HECU": "HECU", "HNNOMX": "HNNOMX", "WIT": "WIT", "EDT": "EDT", "CAT": "CAT", "ACST": "ACST", "HNEG": "HNEG", "JDT": "JDT", "PST": "PST", "PDT": "PDT", "∅∅∅": "∅∅∅", "MESZ": "MESZ", "UYST": "UYST", "HNPMX": "HNPMX", "AKST": "AKST", "EAT": "EAT", "VET": "VET", "HNCU": "HNCU", "HNT": "HNT", "MST": "MST", "ARST": "ARST", "HAST": "HAST", "ART": "ART", "AWDT": "AWDT", "WESZ": "WESZ", "WAT": "WAT", "GYT": "GYT", "WITA": "WITA", "CLST": "CLST", "NZDT": "NZDT", "AST": "AST", "AKDT": "AKDT", "OESZ": "OESZ", "WARST": "WARST", "HKST": "HKST", "TMT": "TMT", "MEZ": "MEZ", "NZST": "NZST", "BT": "BT", "AEST": "AEST", "COT": "COT", "COST": "COST", "MDT": "MDT", "HENOMX": "HENOMX", "ACWST": "ACWST", "UYT": "UYT", "WEZ": "WEZ", "HEOG": "HEOG", "CLT": "CLT", "CST": "CST", "JST": "JST", "AWST": "AWST", "CHAST": "CHAST", "GFT": "GFT", "TMST": "TMST", "HNOG": "HNOG", "BOT": "BOT", "AEDT": "AEDT", "HEPMX": "HEPMX", "WAST": "WAST", "OEZ": "OEZ", "HAT": "HAT", "MYT": "MYT", "ACWDT": "ACWDT", "EST": "EST", "SRT": "SRT", "HEEG": "HEEG"}, - } - } -  -@@ -124,7 +101,7 @@ func (ms *ms_SG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ms *ms_SG) MonthsAbbreviated() []string { -- return ms.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (ms *ms_SG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ms *ms_SG) MonthsNarrow() []string { -- return ms.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (ms *ms_SG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ms *ms_SG) MonthsWide() []string { -- return ms.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +167,13 @@ func (ms *ms_SG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ms_SG' and handles both Whole and Real numbers based on 'v' - func (ms *ms_SG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ms_SG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ms *ms_SG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ms.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ms_SG' -@@ -264,56 +181,7 @@ func (ms *ms_SG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ms.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ms.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ms.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ms_SG' -@@ -322,68 +190,7 @@ func (ms *ms_SG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ms.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ms.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ms.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ms.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ms.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ms.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ms_SG' -@@ -391,23 +198,6 @@ func (ms *ms_SG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -416,17 +206,6 @@ func (ms *ms_SG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,17 +214,6 @@ func (ms *ms_SG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +222,6 @@ func (ms *ms_SG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ms.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ms.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,28 +230,6 @@ func (ms *ms_SG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -505,35 +238,6 @@ func (ms *ms_SG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -542,40 +246,6 @@ func (ms *ms_SG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -584,44 +254,5 @@ func (ms *ms_SG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ms.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ms.periodsAbbreviated[0]...) -- } else { -- b = append(b, ms.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ms.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mt/mt.go b/mt/mt.go -index ae54b6c..440aa45 100644 ---- a/mt/mt.go -+++ b/mt/mt.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"QK", "WK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Qabel Kristu", "Wara Kristu"}, -- timezones: map[string]string{"ACWDT": "ACWDT", "NZDT": "NZDT", "MEZ": "Ħin Ċentrali Ewropew Standard", "BOT": "BOT", "MDT": "MDT", "GYT": "GYT", "WIB": "WIB", "HKST": "HKST", "GMT": "GMT", "GFT": "GFT", "HENOMX": "HENOMX", "COT": "COT", "PDT": "PDT", "WITA": "WITA", "HEPM": "HEPM", "IST": "IST", "WAST": "WAST", "HNPMX": "HNPMX", "UYT": "UYT", "VET": "VET", "HEOG": "HEOG", "AWST": "AWST", "CHAST": "CHAST", "HEPMX": "HEPMX", "AST": "AST", "WIT": "WIT", "AWDT": "AWDT", "CLST": "CLST", "TMST": "TMST", "OESZ": "OESZ", "CDT": "CDT", "ACWST": "ACWST", "PST": "PST", "HEEG": "HEEG", "MYT": "MYT", "BT": "BT", "JDT": "JDT", "HNCU": "HNCU", "UYST": "UYST", "HAT": "HAT", "CLT": "CLT", "TMT": "TMT", "AEDT": "AEDT", "MESZ": "Ħin Ċentrali Ewropew tas-Sajf", "LHDT": "LHDT", "ARST": "ARST", "SAST": "SAST", "JST": "JST", "HNEG": "HNEG", "WAT": "WAT", "EDT": "EDT", "HADT": "HADT", "ART": "ART", "OEZ": "OEZ", "ECT": "ECT", "HECU": "HECU", "EST": "EST", "AKDT": "AKDT", "ACDT": "ACDT", "HNOG": "HNOG", "EAT": "EAT", "COST": "COST", "SGT": "SGT", "HAST": "HAST", "SRT": "SRT", "HNT": "HNT", "HNNOMX": "HNNOMX", "WARST": "WARST", "WESZ": "WESZ", "HKT": "HKT", "CAT": "CAT", "ACST": "ACST", "AEST": "AEST", "CHADT": "CHADT", "ChST": "ChST", "HNPM": "HNPM", "NZST": "NZST", "LHST": "LHST", "∅∅∅": "∅∅∅", "WART": "WART", "MST": "MST", "ADT": "ADT", "WEZ": "WEZ", "AKST": "AKST", "CST": "CST"}, -+ timezones: map[string]string{"EAT": "EAT", "WEZ": "WEZ", "HNCU": "HNCU", "HAT": "HAT", "HNOG": "HNOG", "HEOG": "HEOG", "WIB": "WIB", "AKST": "AKST", "WARST": "WARST", "ADT": "ADT", "PST": "PST", "WAST": "WAST", "SAST": "SAST", "HKST": "HKST", "AWST": "AWST", "ART": "ART", "HNEG": "HNEG", "HENOMX": "HENOMX", "AWDT": "AWDT", "COT": "COT", "MST": "MST", "HAST": "HAST", "MEZ": "Ħin Ċentrali Ewropew Standard", "ACST": "ACST", "UYT": "UYT", "SGT": "SGT", "VET": "VET", "TMST": "TMST", "SRT": "SRT", "CDT": "CDT", "NZST": "NZST", "MESZ": "Ħin Ċentrali Ewropew tas-Sajf", "MYT": "MYT", "AEST": "AEST", "EST": "EST", "CST": "CST", "IST": "IST", "OEZ": "OEZ", "GFT": "GFT", "CLT": "CLT", "ECT": "ECT", "ARST": "ARST", "UYST": "UYST", "WESZ": "WESZ", "TMT": "TMT", "MDT": "MDT", "GYT": "GYT", "CLST": "CLST", "AST": "AST", "JST": "JST", "BT": "BT", "HNT": "HNT", "EDT": "EDT", "ChST": "ChST", "∅∅∅": "∅∅∅", "PDT": "PDT", "WAT": "WAT", "WART": "WART", "COST": "COST", "AEDT": "AEDT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "HKT": "HKT", "BOT": "BOT", "HADT": "HADT", "ACDT": "ACDT", "JDT": "JDT", "LHDT": "LHDT", "HEPM": "HEPM", "HECU": "HECU", "AKDT": "AKDT", "NZDT": "NZDT", "WITA": "WITA", "HEEG": "HEEG", "HNPM": "HNPM", "CHADT": "CHADT", "ACWST": "ACWST", "HNPMX": "HNPMX", "OESZ": "OESZ", "GMT": "GMT", "CHAST": "CHAST", "WIT": "WIT", "CAT": "CAT", "LHST": "LHST"}, - } - } -  -diff --git a/mt_MT/mt_MT.go b/mt_MT/mt_MT.go -index 52f3200..ea3627d 100644 ---- a/mt_MT/mt_MT.go -+++ b/mt_MT/mt_MT.go -@@ -42,32 +42,13 @@ type mt_MT struct { - // New returns a new instance of translator for the 'mt_MT' locale - func New() locales.Translator { - return &mt_MT{ -- locale: "mt_MT", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Fra", "Mar", "Apr", "Mej", "Ġun", "Lul", "Aww", "Set", "Ott", "Nov", "Diċ"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "Ġ", "L", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Jannar", "Frar", "Marzu", "April", "Mejju", "Ġunju", "Lulju", "Awwissu", "Settembru", "Ottubru", "Novembru", "Diċembru"}, -- daysAbbreviated: []string{"Ħad", "Tne", "Tli", "Erb", "Ħam", "Ġim", "Sib"}, -- daysNarrow: []string{"Ħd", "T", "Tl", "Er", "Ħm", "Ġm", "Sb"}, -- daysShort: []string{"Ħad", "Tne", "Tli", "Erb", "Ħam", "Ġim", "Sib"}, -- daysWide: []string{"Il-Ħadd", "It-Tnejn", "It-Tlieta", "L-Erbgħa", "Il-Ħamis", "Il-Ġimgħa", "Is-Sibt"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"QK", "WK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Qabel Kristu", "Wara Kristu"}, -- timezones: map[string]string{"HEEG": "HEEG", "EDT": "EDT", "AWST": "AWST", "ARST": "ARST", "WITA": "WITA", "MEZ": "Ħin Ċentrali Ewropew Standard", "CLST": "CLST", "AST": "AST", "HADT": "HADT", "BT": "BT", "HNPM": "HNPM", "ChST": "ChST", "HENOMX": "HENOMX", "GMT": "GMT", "MDT": "MDT", "ART": "ART", "NZDT": "NZDT", "IST": "IST", "WAT": "WAT", "COST": "COST", "SRT": "SRT", "HAST": "HAST", "CHADT": "CHADT", "ACDT": "ACDT", "CAT": "CAT", "WAST": "WAST", "WARST": "WARST", "HECU": "HECU", "WIB": "WIB", "GYT": "GYT", "NZST": "NZST", "TMST": "TMST", "GFT": "GFT", "OEZ": "OEZ", "ADT": "ADT", "UYT": "UYT", "WESZ": "WESZ", "WIT": "WIT", "MESZ": "Ħin Ċentrali Ewropew tas-Sajf", "MST": "MST", "HNPMX": "HNPMX", "CHAST": "CHAST", "HEOG": "HEOG", "ACWDT": "ACWDT", "HNT": "HNT", "AWDT": "AWDT", "LHDT": "LHDT", "SGT": "SGT", "VET": "VET", "JST": "JST", "WART": "WART", "MYT": "MYT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "ACST": "ACST", "PDT": "PDT", "AEST": "AEST", "HEPM": "HEPM", "JDT": "JDT", "AKST": "AKST", "HAT": "HAT", "CLT": "CLT", "TMT": "TMT", "EAT": "EAT", "COT": "COT", "CST": "CST", "LHST": "LHST", "HKT": "HKT", "SAST": "SAST", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "PST": "PST", "ACWST": "ACWST", "HKST": "HKST", "BOT": "BOT", "HNEG": "HNEG", "ECT": "ECT", "OESZ": "OESZ", "HNOG": "HNOG", "EST": "EST", "HEPMX": "HEPMX", "UYST": "UYST", "AKDT": "AKDT", "CDT": "CDT", "HNCU": "HNCU"}, -+ locale: "mt_MT", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPM": "HEPM", "JST": "JST", "IST": "IST", "CHADT": "CHADT", "WIT": "WIT", "EST": "EST", "WITA": "WITA", "WIB": "WIB", "SAST": "SAST", "MST": "MST", "HNEG": "HNEG", "TMST": "TMST", "CAT": "CAT", "ART": "ART", "ARST": "ARST", "AEST": "AEST", "WAT": "WAT", "COT": "COT", "HAST": "HAST", "WAST": "WAST", "HEOG": "HEOG", "ADT": "ADT", "CST": "CST", "ECT": "ECT", "UYT": "UYT", "UYST": "UYST", "HNCU": "HNCU", "WARST": "WARST", "HKST": "HKST", "TMT": "TMT", "ChST": "ChST", "SRT": "SRT", "MEZ": "MEZ", "MESZ": "MESZ", "ACDT": "ACDT", "LHST": "LHST", "WESZ": "WESZ", "GFT": "GFT", "COST": "COST", "HKT": "HKT", "HEEG": "HEEG", "CLST": "CLST", "GMT": "GMT", "NZST": "NZST", "NZDT": "NZDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "SGT": "SGT", "AKST": "AKST", "HNT": "HNT", "WART": "WART", "HADT": "HADT", "HNPM": "HNPM", "BT": "BT", "HNPMX": "HNPMX", "CDT": "CDT", "MDT": "MDT", "HNNOMX": "HNNOMX", "MYT": "MYT", "PDT": "PDT", "ACWST": "ACWST", "HECU": "HECU", "AKDT": "AKDT", "GYT": "GYT", "JDT": "JDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "HAT": "HAT", "CLT": "CLT", "EAT": "EAT", "PST": "PST", "HNOG": "HNOG", "BOT": "BOT", "AWST": "AWST", "OESZ": "OESZ", "AST": "AST", "ACST": "ACST", "HENOMX": "HENOMX", "LHDT": "LHDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "WEZ": "WEZ", "VET": "VET", "EDT": "EDT", "AWDT": "AWDT"}, - } - } -  -@@ -125,7 +106,7 @@ func (mt *mt_MT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mt *mt_MT) MonthsAbbreviated() []string { -- return mt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +116,7 @@ func (mt *mt_MT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mt *mt_MT) MonthsNarrow() []string { -- return mt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -145,7 +126,7 @@ func (mt *mt_MT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mt *mt_MT) MonthsWide() []string { -- return mt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,73 +172,13 @@ func (mt *mt_MT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mt_MT' and handles both Whole and Real numbers based on 'v' - func (mt *mt_MT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mt_MT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mt *mt_MT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mt_MT' -@@ -265,56 +186,7 @@ func (mt *mt_MT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mt_MT' -@@ -323,64 +195,7 @@ func (mt *mt_MT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mt.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mt_MT' -@@ -388,27 +203,6 @@ func (mt *mt_MT) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -417,21 +211,6 @@ func (mt *mt_MT) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,18 +219,6 @@ func (mt *mt_MT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x74, 0x61}...) -- b = append(b, []byte{0xe2, 0x80, 0x99, 0x20}...) -- b = append(b, mt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,20 +227,6 @@ func (mt *mt_MT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x74, 0x61}...) -- b = append(b, []byte{0xe2, 0x80, 0x99, 0x20}...) -- b = append(b, mt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,19 +235,6 @@ func (mt *mt_MT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -503,26 +243,6 @@ func (mt *mt_MT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -531,30 +251,6 @@ func (mt *mt_MT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -563,34 +259,5 @@ func (mt *mt_MT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/mua/mua.go b/mua/mua.go -index 80367b9..15d3295 100644 ---- a/mua/mua.go -+++ b/mua/mua.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "PK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"KǝPel Kristu", "Pel Kristu"}, -- timezones: map[string]string{"ACST": "ACST", "PST": "PST", "HNPM": "HNPM", "LHDT": "LHDT", "SAST": "SAST", "CLST": "CLST", "JST": "JST", "TMT": "TMT", "TMST": "TMST", "WAT": "WAT", "HNNOMX": "HNNOMX", "HAST": "HAST", "HEOG": "HEOG", "MEZ": "MEZ", "HECU": "HECU", "EST": "EST", "AKDT": "AKDT", "ARST": "ARST", "HNCU": "HNCU", "HEPM": "HEPM", "MDT": "MDT", "CDT": "CDT", "AST": "AST", "WIB": "WIB", "CLT": "CLT", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "CAT": "CAT", "BT": "BT", "LHST": "LHST", "CHAST": "CHAST", "COST": "COST", "WART": "WART", "WEZ": "WEZ", "HKT": "HKT", "WITA": "WITA", "ChST": "ChST", "SGT": "SGT", "HNPMX": "HNPMX", "ART": "ART", "AWST": "AWST", "NZST": "NZST", "HEEG": "HEEG", "WAST": "WAST", "HENOMX": "HENOMX", "AKST": "AKST", "HNOG": "HNOG", "AEDT": "AEDT", "VET": "VET", "WESZ": "WESZ", "ACWST": "ACWST", "ACWDT": "ACWDT", "AEST": "AEST", "HNEG": "HNEG", "COT": "COT", "CST": "CST", "HADT": "HADT", "CHADT": "CHADT", "GMT": "GMT", "EDT": "EDT", "AWDT": "AWDT", "HKST": "HKST", "IST": "IST", "UYST": "UYST", "HNT": "HNT", "MESZ": "MESZ", "JDT": "JDT", "ACDT": "ACDT", "UYT": "UYT", "GYT": "GYT", "MYT": "MYT", "PDT": "PDT", "GFT": "GFT", "EAT": "EAT", "HEPMX": "HEPMX", "ADT": "ADT", "HAT": "HAT", "NZDT": "NZDT", "ECT": "ECT", "MST": "MST", "WIT": "WIT", "SRT": "SRT", "BOT": "BOT", "OESZ": "OESZ", "WARST": "WARST"}, -+ timezones: map[string]string{"ChST": "ChST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "MYT": "MYT", "HKST": "HKST", "CAT": "CAT", "ADT": "ADT", "AST": "AST", "AEDT": "AEDT", "AKDT": "AKDT", "HAT": "HAT", "MST": "MST", "NZST": "NZST", "WIB": "WIB", "HNOG": "HNOG", "TMT": "TMT", "AEST": "AEST", "ACDT": "ACDT", "HENOMX": "HENOMX", "UYST": "UYST", "VET": "VET", "HNCU": "HNCU", "CST": "CST", "CDT": "CDT", "BOT": "BOT", "WART": "WART", "TMST": "TMST", "EAT": "EAT", "ACST": "ACST", "AWST": "AWST", "HEPMX": "HEPMX", "GYT": "GYT", "∅∅∅": "∅∅∅", "EST": "EST", "CHAST": "CHAST", "EDT": "EDT", "MDT": "MDT", "MEZ": "MEZ", "ECT": "ECT", "WAST": "WAST", "NZDT": "NZDT", "OESZ": "OESZ", "WEZ": "WEZ", "HECU": "HECU", "HNPMX": "HNPMX", "WARST": "WARST", "SAST": "SAST", "HADT": "HADT", "IST": "IST", "JDT": "JDT", "HNT": "HNT", "COST": "COST", "ART": "ART", "HEPM": "HEPM", "ACWDT": "ACWDT", "GFT": "GFT", "CLST": "CLST", "SRT": "SRT", "UYT": "UYT", "BT": "BT", "SGT": "SGT", "OEZ": "OEZ", "WIT": "WIT", "COT": "COT", "HKT": "HKT", "LHST": "LHST", "ACWST": "ACWST", "GMT": "GMT", "CHADT": "CHADT", "PDT": "PDT", "AWDT": "AWDT", "LHDT": "LHDT", "HEOG": "HEOG", "ARST": "ARST", "MESZ": "MESZ", "WESZ": "WESZ", "WAT": "WAT", "WITA": "WITA", "HEEG": "HEEG", "JST": "JST", "PST": "PST", "AKST": "AKST", "CLT": "CLT", "HAST": "HAST", "HNPM": "HNPM"}, - } - } -  -diff --git a/mua_CM/mua_CM.go b/mua_CM/mua_CM.go -index 2298af7..1a2c637 100644 ---- a/mua_CM/mua_CM.go -+++ b/mua_CM/mua_CM.go -@@ -10,62 +10,45 @@ import ( - ) -  - type mua_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'mua_CM' locale - func New() locales.Translator { - return &mua_CM{ -- locale: "mua_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "FLO", "CLA", "CKI", "FMF", "MAD", "MBI", "MLI", "MAM", "FDE", "FMU", "FGW", "FYU"}, -- monthsNarrow: []string{"", "O", "A", "I", "F", "D", "B", "L", "M", "E", "U", "W", "Y"}, -- monthsWide: []string{"", "Fĩi Loo", "Cokcwaklaŋne", "Cokcwaklii", "Fĩi Marfoo", "Madǝǝuutǝbijaŋ", "Mamǝŋgwãafahbii", "Mamǝŋgwãalii", "Madǝmbii", "Fĩi Dǝɓlii", "Fĩi Mundaŋ", "Fĩi Gwahlle", "Fĩi Yuru"}, -- daysAbbreviated: []string{"Cya", "Cla", "Czi", "Cko", "Cka", "Cga", "Cze"}, -- daysNarrow: []string{"Y", "L", "Z", "O", "A", "G", "E"}, -- daysWide: []string{"Com’yakke", "Comlaaɗii", "Comzyiiɗii", "Comkolle", "Comkaldǝɓlii", "Comgaisuu", "Comzyeɓsuu"}, -- periodsAbbreviated: []string{"comme", "lilli"}, -- periodsWide: []string{"comme", "lilli"}, -- erasAbbreviated: []string{"KK", "PK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"KǝPel Kristu", "Pel Kristu"}, -- timezones: map[string]string{"AEST": "AEST", "WITA": "WITA", "NZDT": "NZDT", "CHADT": "CHADT", "JST": "JST", "WIT": "WIT", "PDT": "PDT", "ARST": "ARST", "BOT": "BOT", "CAT": "CAT", "ACDT": "ACDT", "HECU": "HECU", "UYST": "UYST", "HADT": "HADT", "HNPM": "HNPM", "IST": "IST", "HEEG": "HEEG", "WAST": "WAST", "COST": "COST", "CDT": "CDT", "AWST": "AWST", "AWDT": "AWDT", "JDT": "JDT", "CLT": "CLT", "GFT": "GFT", "GMT": "GMT", "MYT": "MYT", "HEPM": "HEPM", "HNEG": "HNEG", "EDT": "EDT", "BT": "BT", "TMST": "TMST", "OESZ": "OESZ", "CLST": "CLST", "ACST": "ACST", "WART": "WART", "UYT": "UYT", "AKST": "AKST", "PST": "PST", "HNT": "HNT", "LHDT": "LHDT", "AKDT": "AKDT", "ADT": "ADT", "WEZ": "WEZ", "AEDT": "AEDT", "WARST": "WARST", "WESZ": "WESZ", "ACWST": "ACWST", "HNCU": "HNCU", "ART": "ART", "HKT": "HKT", "MEZ": "MEZ", "GYT": "GYT", "CST": "CST", "ECT": "ECT", "MDT": "MDT", "HEPMX": "HEPMX", "HENOMX": "HENOMX", "MST": "MST", "VET": "VET", "HEOG": "HEOG", "CHAST": "CHAST", "WAT": "WAT", "OEZ": "OEZ", "SGT": "SGT", "HNPMX": "HNPMX", "AST": "AST", "ACWDT": "ACWDT", "SAST": "SAST", "∅∅∅": "∅∅∅", "EAT": "EAT", "COT": "COT", "EST": "EST", "HNOG": "HNOG", "MESZ": "MESZ", "NZST": "NZST", "ChST": "ChST", "HNNOMX": "HNNOMX", "WIB": "WIB", "HAST": "HAST", "SRT": "SRT", "HAT": "HAT", "HKST": "HKST", "LHST": "LHST", "TMT": "TMT"}, -+ locale: "mua_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PST": "PST", "HNPMX": "HNPMX", "WAST": "WAST", "EST": "EST", "CAT": "CAT", "ChST": "ChST", "HADT": "HADT", "AEST": "AEST", "ART": "ART", "LHDT": "LHDT", "AKST": "AKST", "MST": "MST", "ADT": "ADT", "WART": "WART", "WARST": "WARST", "COT": "COT", "HKST": "HKST", "WIB": "WIB", "ARST": "ARST", "HAST": "HAST", "MESZ": "MESZ", "AWDT": "AWDT", "MYT": "MYT", "ACWST": "ACWST", "HEOG": "HEOG", "HEPM": "HEPM", "AEDT": "AEDT", "ACWDT": "ACWDT", "ACDT": "ACDT", "AWST": "AWST", "WIT": "WIT", "TMT": "TMT", "TMST": "TMST", "NZST": "NZST", "BOT": "BOT", "ACST": "ACST", "BT": "BT", "VET": "VET", "GFT": "GFT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "PDT": "PDT", "HEPMX": "HEPMX", "SGT": "SGT", "HENOMX": "HENOMX", "UYT": "UYT", "COST": "COST", "HKT": "HKT", "CLST": "CLST", "CST": "CST", "EAT": "EAT", "HEEG": "HEEG", "WESZ": "WESZ", "HECU": "HECU", "JDT": "JDT", "LHST": "LHST", "WAT": "WAT", "AKDT": "AKDT", "OEZ": "OEZ", "SAST": "SAST", "CLT": "CLT", "CDT": "CDT", "HAT": "HAT", "EDT": "EDT", "ECT": "ECT", "GMT": "GMT", "HNEG": "HNEG", "WEZ": "WEZ", "HNT": "HNT", "WITA": "WITA", "SRT": "SRT", "MEZ": "MEZ", "JST": "JST", "GYT": "GYT", "HNOG": "HNOG", "AST": "AST", "∅∅∅": "∅∅∅", "MDT": "MDT", "CHADT": "CHADT", "HNCU": "HNCU", "OESZ": "OESZ", "NZDT": "NZDT", "CHAST": "CHAST", "UYST": "UYST", "IST": "IST"}, - } - } -  -@@ -111,7 +94,7 @@ func (mua *mua_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mua *mua_CM) MonthsAbbreviated() []string { -- return mua.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -121,7 +104,7 @@ func (mua *mua_CM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (mua *mua_CM) MonthsNarrow() []string { -- return mua.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -131,7 +114,7 @@ func (mua *mua_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mua *mua_CM) MonthsWide() []string { -- return mua.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -177,73 +160,13 @@ func (mua *mua_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'mua_CM' and handles both Whole and Real numbers based on 'v' - func (mua *mua_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mua.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mua.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mua.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'mua_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (mua *mua_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mua.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, mua.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, mua.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mua_CM' -@@ -251,56 +174,7 @@ func (mua *mua_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mua.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mua.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mua.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, mua.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mua.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mua_CM' -@@ -309,68 +183,7 @@ func (mua *mua_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := mua.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, mua.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, mua.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, mua.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, mua.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, mua.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'mua_CM' -@@ -378,17 +191,6 @@ func (mua *mua_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,17 +199,6 @@ func (mua *mua_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mua.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,17 +207,6 @@ func (mua *mua_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mua.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (mua *mua_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, mua.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, mua.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,19 +223,6 @@ func (mua *mua_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -477,26 +231,6 @@ func (mua *mua_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -505,30 +239,6 @@ func (mua *mua_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -537,34 +247,5 @@ func (mua *mua_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, mua.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := mua.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/my/my.go b/my/my.go -index e0d402a..8d33bd0 100644 ---- a/my/my.go -+++ b/my/my.go -@@ -68,7 +68,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ဘီစီ", "အေဒီ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ခရစ်တော် မပေါ်မီနှစ်", "ခရစ်နှစ်"}, -- timezones: map[string]string{"HENOMX": "အနောက်တောင် မက္ကစီကို နွေရာသီ စံတော်ချိန်", "SRT": "စူးရီနာမ်အချိန်", "HNPM": "စိန့်ပီအဲနှင့်မီခွီလွန်စံတော်ချိန်", "CHAST": "ချားသမ်စံတော်ချိန်", "CAT": "အလယ်အာဖရိက အချိန်", "EAT": "အရှေ့အာဖရိက အချိန်", "MST": "မကာအို စံတော်ချိန်", "HADT": "ဟာဝိုင်ယီ အယ်လူးရှန်း နွေရာသီ စံတော်ချိန်", "ACWDT": "ဩစတြေးလျား အလယ်အနောက်ပိုင်း နွေရာသီ အချိန်", "HNOG": "အနောက် ဂရင်းလန်း စံတော်ချိန်", "HNCU": "ကျူးဘား စံတော်ချိန်", "AKST": "အလားစကားစံတော်ချိန်", "MYT": "မလေးရှား အချိန်", "UYST": "ဥရုဂွေး နွေရာသီ အချိန်", "VET": "ဗင်နီဇွဲလား အချိန်", "ACWST": "ဩစတြေးလျား အလယ်အနောက်ပိုင်း စံတော်ချိန်", "HEPM": "စိန့်ပီအဲနှင့် မီခွီလွန် နွေရာသီ စံတော်ချိန်", "MESZ": "ဥရောပ အလယ်ပိုင်း နွေရာသီ အချိန်", "ChST": "ချာမိုရိုအချိန်", "WAT": "အနောက်အာဖရိက စံတော်ချိန်", "WIB": "အနောက်ပိုင်း အင်ဒိုနီးရှား အချိန်", "HEOG": "အနောက် ဂရင်းလန် နွေရာသီ စံတော်ချိန်", "AEDT": "အရှေ့ဩစတြေးလျား နွေရာသီ အချိန်", "AWST": "အနောက်ဩစတြေးလျား စံတော်ချိန်", "LHST": "လော့ဒ်ဟောင်စံတော်ချိန်", "IST": "အိန္ဒိယ စံတော်ချိန်", "TMT": "တာ့ခ်မင်နစ္စတန် စံတော်ချိန်", "TMST": "တာ့ခ်မင်နစ္စတန် နွေရာသီ အချိန်", "HNT": "နယူးဖောင်လန် စံတော်ချိန်", "SAST": "တောင်အာဖရိက အချိန်", "ACST": "ဩစတြေးလျား အလယ်ပိုင်း စံတော်ချိန်", "ECT": "အီကွေဒေါ အချိန်", "EST": "မြောက်အမေရိက အရှေ့ပိုင်းစံတော်ချိန်", "EDT": "မြောက်အမေရိက အရှေ့ပိုင်း နွေရာသီစံတော်ချိန်", "AWDT": "ဩစတြေးလျား နွေရာသီ အချိန်", "HKST": "ဟောင်ကောင် နွေရာသီ အချိန်", "WAST": "အနောက်အာဖရိက နွေရာသီ အချိန်", "HECU": "ကျူးဘား နွေရာသီ စံတော်ချိန်", "AKDT": "အလားစကား နွေရာသီစံတော်ချိန်", "NZST": "နယူးဇီလန် စံတော်ချိန်", "BT": "ဘူတန် အချိန်", "WESZ": "အနောက်ဥရောပ နွေရာသီ အချိန်", "HNEG": "အရှေ့ဂရင်းလန်း စံတော်ချိန်", "OEZ": "အရှေ့ဥရောပ စံတော်ချိန်", "OESZ": "အရှေ့ဥရောပ နွေရာသီ အချိန်", "COT": "ကိုလံဘီယာ စံတော်ချိန်", "HAST": "ဟာဝိုင်ယီ အယ်လူးရှန်း စံတော်ချိန်", "WIT": "အရှေ့ပိုင်း အင်ဒိုနီးရှား အချိန်", "HKT": "ဟောင်ကောင် စံတော်ချိန်", "MEZ": "ဥရောပ အလယ်ပိုင်း စံတော်ချိန်", "BOT": "ဘိုလီးဘီးယား အချိန်", "HEEG": "အရှေ့ဂရင်းလန် နွေရာသီ စံတော်ချိန်", "GFT": "ပြင်သစ် ဂီအားနား အချိန်", "COST": "ကိုလံဘီယာ နွေရာသီ အချိန်", "CST": "မြောက်အမေရိက အလယ်ပိုင်းစံတော်ချိန်", "ARST": "အာဂျင်တီးနား နွေရာသီအချိန်", "LHDT": "လော့ဒ်ဟောင် နွေရာသီ အချိန်", "CLT": "ချီလီ စံတော်ချိန်", "JDT": "ဂျပန် နွေရာသီ အချိန်", "GMT": "ဂရင်းနစ် စံတော်ချိန်", "MDT": "မကာအို နွေရာသီ အချိန်", "UYT": "ဥရုဂွေး စံတော်ချိန်", "HAT": "နယူးဖောင်လန် နွေရာသီ စံတော်ချိန်", "WITA": "အလယ်ပိုင်း အင်ဒိုနီးရှား အချိန်", "HNPMX": "မက္ကဆီကန် ပစိဖိတ် စံတော်ချိန်", "HEPMX": "မက္ကစီကန် ပစိဖိတ် နွေရာသီ စံတော်ချိန်", "PST": "မြောက်အမေရိက ပစိဖိတ်စံတော်ချိန်", "WEZ": "အနောက်ဥရောပ စံတော်ချိန်", "HNNOMX": "အနောက်တောင် မက္ကဆီကို စံတော်ချိန်", "GYT": "ဂိုင်ယာနာ အချိန်", "ART": "အာဂျင်တီးနား စံတော်ချိန်", "ACDT": "ဩစတြေးလျား အလယ်ပိုင်း နွေရာသီ အချိန်", "WARST": "အနောက် အာဂျင်တီးနား နွေရာသီ အချိန်", "PDT": "မြောက်အမေရိက ပစိဖိတ် နွေရာသီစံတော်ချိန်", "CHADT": "ချာသမ် နွေရာသီ အချိန်", "CLST": "ချီလီ နွေရာသီ အချိန်", "JST": "ဂျပန် စံတော်ချိန်", "AEST": "အရှေ့ဩစတြေးလျား စံတော်ချိန်", "NZDT": "နယူးဇီလန် နွေရာသီ အချိန်", "∅∅∅": "ပီရူး နွေရာသီ အချိန်", "WART": "အနောက် အာဂျင်တီးနား စံတော်ချိန်", "SGT": "စင်္ကာပူ အချိန်", "CDT": "မြောက်အမေရိက အလယ်ပိုင်း နွေရာသီစံတော်ချိန်", "AST": "အတ္တလန်တစ် စံတော်ချိန်", "ADT": "အတ္တလန်တစ် နွေရာသီ စံတော်ချိန်"}, -+ timezones: map[string]string{"ART": "အာဂျင်တီးနား စံတော်ချိန်", "LHDT": "လော့ဒ်ဟောင် နွေရာသီ အချိန်", "BT": "ဘူတန် အချိန်", "GYT": "ဂိုင်ယာနာ အချိန်", "TMST": "တာ့ခ်မင်နစ္စတန် နွေရာသီ အချိန်", "CLT": "ချီလီ စံတော်ချိန်", "EAT": "အရှေ့အာဖရိက အချိန်", "ACDT": "ဩစတြေးလျား အလယ်ပိုင်း နွေရာသီ အချိန်", "MEZ": "ဥရောပ အလယ်ပိုင်း စံတော်ချိန်", "MESZ": "ဥရောပ အလယ်ပိုင်း နွေရာသီ အချိန်", "AWST": "အနောက်ဩစတြေးလျား စံတော်ချိန်", "JDT": "ဂျပန် နွေရာသီ အချိန်", "CHAST": "ချားသမ်စံတော်ချိန်", "SGT": "စင်္ကာပူ အချိန်", "HECU": "ကျူးဘား နွေရာသီ စံတော်ချိန်", "VET": "ဗင်နီဇွဲလား အချိန်", "TMT": "တာ့ခ်မင်နစ္စတန် စံတော်ချိန်", "NZST": "နယူးဇီလန် စံတော်ချိန်", "NZDT": "နယူးဇီလန် နွေရာသီ အချိန်", "ECT": "အီကွေဒေါ အချိန်", "WITA": "အလယ်ပိုင်း အင်ဒိုနီးရှား အချိန်", "UYT": "ဥရုဂွေး စံတော်ချိန်", "AEDT": "အရှေ့ဩစတြေးလျား နွေရာသီ အချိန်", "WAST": "အနောက်အာဖရိက နွေရာသီ အချိန်", "OEZ": "အရှေ့ဥရောပ စံတော်ချိန်", "EDT": "မြောက်အမေရိက အရှေ့ပိုင်း နွေရာသီစံတော်ချိန်", "HAST": "ဟာဝိုင်ယီ အယ်လူးရှန်း စံတော်ချိန်", "JST": "ဂျပန် စံတော်ချိန်", "HEPMX": "မက္ကစီကန် ပစိဖိတ် နွေရာသီ စံတော်ချိန်", "AKDT": "အလားစကား နွေရာသီစံတော်ချိန်", "HEOG": "အနောက် ဂရင်းလန် နွေရာသီ စံတော်ချိန်", "AST": "အတ္တလန်တစ် စံတော်ချိန်", "CAT": "အလယ်အာဖရိက အချိန်", "CST": "မြောက်အမေရိက အလယ်ပိုင်းစံတော်ချိန်", "ChST": "ချာမိုရိုအချိန်", "AWDT": "ဩစတြေးလျား နွေရာသီ အချိန်", "∅∅∅": "∅∅∅", "PDT": "မြောက်အမေရိက ပစိဖိတ် နွေရာသီစံတော်ချိန်", "HAT": "နယူးဖောင်လန် နွေရာသီ စံတော်ချိန်", "EST": "မြောက်အမေရိက အရှေ့ပိုင်းစံတော်ချိန်", "BOT": "ဘိုလီးဘီးယား အချိန်", "CHADT": "ချာသမ် နွေရာသီ အချိန်", "HNCU": "ကျူးဘား စံတော်ချိန်", "HNPMX": "မက္ကဆီကန် ပစိဖိတ် စံတော်ချိန်", "ADT": "အတ္တလန်တစ် နွေရာသီ စံတော်ချိန်", "HNPM": "စိန့်ပီအဲနှင့်မီခွီလွန်စံတော်ချိန်", "UYST": "ဥရုဂွေး နွေရာသီ အချိန်", "WAT": "အနောက်အာဖရိက စံတော်ချိန်", "MST": "မကာအို စံတော်ချိန်", "HADT": "ဟာဝိုင်ယီ အယ်လူးရှန်း နွေရာသီ စံတော်ချိန်", "ARST": "အာဂျင်တီးနား နွေရာသီအချိန်", "SRT": "စူးရီနာမ်အချိန်", "HNEG": "အရှေ့ဂရင်းလန်း စံတော်ချိန်", "AEST": "အရှေ့ဩစတြေးလျား စံတော်ချိန်", "WIT": "အရှေ့ပိုင်း အင်ဒိုနီးရှား အချိန်", "SAST": "တောင်အာဖရိက အချိန်", "HNOG": "အနောက် ဂရင်းလန်း စံတော်ချိန်", "GMT": "ဂရင်းနစ် စံတော်ချိန်", "HENOMX": "အနောက်တောင် မက္ကစီကို နွေရာသီ စံတော်ချိန်", "MYT": "မလေးရှား အချိန်", "HEPM": "စိန့်ပီအဲနှင့် မီခွီလွန် နွေရာသီ စံတော်ချိန်", "CLST": "ချီလီ နွေရာသီ အချိန်", "HEEG": "အရှေ့ဂရင်းလန် နွေရာသီ စံတော်ချိန်", "HNNOMX": "အနောက်တောင် မက္ကဆီကို စံတော်ချိန်", "ACWDT": "ဩစတြေးလျား အလယ်အနောက်ပိုင်း နွေရာသီ အချိန်", "GFT": "ပြင်သစ် ဂီအားနား အချိန်", "WARST": "အနောက် အာဂျင်တီးနား နွေရာသီ အချိန်", "MDT": "မကာအို နွေရာသီ အချိန်", "IST": "အိန္ဒိယ စံတော်ချိန်", "ACWST": "ဩစတြေးလျား အလယ်အနောက်ပိုင်း စံတော်ချိန်", "HNT": "နယူးဖောင်လန် စံတော်ချိန်", "COT": "ကိုလံဘီယာ စံတော်ချိန်", "PST": "မြောက်အမေရိက ပစိဖိတ်စံတော်ချိန်", "WESZ": "အနောက်ဥရောပ နွေရာသီ အချိန်", "WART": "အနောက် အာဂျင်တီးနား စံတော်ချိန်", "COST": "ကိုလံဘီယာ နွေရာသီ အချိန်", "ACST": "ဩစတြေးလျား အလယ်ပိုင်း စံတော်ချိန်", "AKST": "အလားစကားစံတော်ချိန်", "OESZ": "အရှေ့ဥရောပ နွေရာသီ အချိန်", "WIB": "အနောက်ပိုင်း အင်ဒိုနီးရှား အချိန်", "LHST": "လော့ဒ်ဟောင်စံတော်ချိန်", "WEZ": "အနောက်ဥရောပ စံတော်ချိန်", "HKT": "ဟောင်ကောင် စံတော်ချိန်", "HKST": "ဟောင်ကောင် နွေရာသီ အချိန်", "CDT": "မြောက်အမေရိက အလယ်ပိုင်း နွေရာသီစံတော်ချိန်"}, - } - } -  -diff --git a/my_MM/my_MM.go b/my_MM/my_MM.go -index 4526f03..2aebcb2 100644 ---- a/my_MM/my_MM.go -+++ b/my_MM/my_MM.go -@@ -10,65 +10,45 @@ import ( - ) -  - type my_MM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'my_MM' locale - func New() locales.Translator { - return &my_MM{ -- locale: "my_MM", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ဇန်", "ဖေ", "မတ်", "ဧ", "မေ", "ဇွန်", "ဇူ", "ဩ", "စက်", "အောက်", "နို", "ဒီ"}, -- monthsNarrow: []string{"", "ဇ", "ဖ", "မ", "ဧ", "မ", "ဇ", "ဇ", "ဩ", "စ", "အ", "န", "ဒ"}, -- monthsWide: []string{"", "ဇန်နဝါရီ", "ဖေဖော်ဝါရီ", "မတ်", "ဧပြီ", "မေ", "ဇွန်", "ဇူလိုင်", "ဩဂုတ်", "စက်တင်ဘာ", "အောက်တိုဘာ", "နိုဝင်ဘာ", "ဒီဇင်ဘာ"}, -- daysAbbreviated: []string{"တနင်္ဂနွေ", "တနင်္လာ", "အင်္ဂါ", "ဗုဒ္ဓဟူး", "ကြာသပတေး", "သောကြာ", "စနေ"}, -- daysNarrow: []string{"တ", "တ", "အ", "ဗ", "က", "သ", "စ"}, -- daysShort: []string{"တနင်္ဂနွေ", "တနင်္လာ", "အင်္ဂါ", "ဗုဒ္ဓဟူး", "ကြာသပတေး", "သောကြာ", "စနေ"}, -- daysWide: []string{"တနင်္ဂနွေ", "တနင်္လာ", "အင်္ဂါ", "ဗုဒ္ဓဟူး", "ကြာသပတေး", "သောကြာ", "စနေ"}, -- periodsAbbreviated: []string{"နံနက်", "ညနေ"}, -- periodsNarrow: []string{"နံနက်", "ညနေ"}, -- periodsWide: []string{"နံနက်", "ညနေ"}, -- erasAbbreviated: []string{"ဘီစီ", "အေဒီ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ခရစ်တော် မပေါ်မီနှစ်", "ခရစ်နှစ်"}, -- timezones: map[string]string{"HECU": "ကျူးဘား နွေရာသီ စံတော်ချိန်", "GYT": "ဂိုင်ယာနာ အချိန်", "VET": "ဗင်နီဇွဲလား အချိန်", "ACWDT": "ဩစတြေးလျား အလယ်အနောက်ပိုင်း နွေရာသီ အချိန်", "ChST": "ချာမိုရိုအချိန်", "HNEG": "အရှေ့ဂရင်းလန်း စံတော်ချိန်", "ACDT": "ဩစတြေးလျား အလယ်ပိုင်း နွေရာသီ အချိန်", "WAST": "အနောက်အာဖရိက နွေရာသီ အချိန်", "HNPMX": "မက္ကဆီကန် ပစိဖိတ် စံတော်ချိန်", "BT": "ဘူတန် အချိန်", "ACWST": "ဩစတြေးလျား အလယ်အနောက်ပိုင်း စံတော်ချိန်", "HAT": "နယူးဖောင်လန် နွေရာသီ စံတော်ချိန်", "HEPM": "စိန့်ပီအဲနှင့် မီခွီလွန် နွေရာသီ စံတော်ချိန်", "JST": "ဂျပန် စံတော်ချိန်", "OEZ": "အရှေ့ဥရောပ စံတော်ချိန်", "HEPMX": "မက္ကစီကန် ပစိဖိတ် နွေရာသီ စံတော်ချိန်", "AST": "အတ္တလန်တစ် စံတော်ချိန်", "HAST": "ဟာဝိုင်ယီ အယ်လူးရှန်း စံတော်ချိန်", "HKT": "ဟောင်ကောင် စံတော်ချိန်", "MESZ": "ဥရောပ အလယ်ပိုင်း နွေရာသီ အချိန်", "HNNOMX": "အနောက်တောင် မက္ကဆီကို စံတော်ချိန်", "WIB": "အနောက်ပိုင်း အင်ဒိုနီးရှား အချိန်", "ARST": "အာဂျင်တီးနား နွေရာသီအချိန်", "HKST": "ဟောင်ကောင် နွေရာသီ အချိန်", "∅∅∅": "အာမေဇုံ နွေရာသီအချိန်", "OESZ": "အရှေ့ဥရောပ နွေရာသီ အချိန်", "WART": "အနောက် အာဂျင်တီးနား စံတော်ချိန်", "COST": "ကိုလံဘီယာ နွေရာသီ အချိန်", "UYST": "ဥရုဂွေး နွေရာသီ အချိန်", "ART": "အာဂျင်တီးနား စံတော်ချိန်", "LHDT": "လော့ဒ်ဟောင် နွေရာသီ အချိန်", "NZDT": "နယူးဇီလန် နွေရာသီ အချိန်", "CLST": "ချီလီ နွေရာသီ အချိန်", "CAT": "အလယ်အာဖရိက အချိန်", "ECT": "အီကွေဒေါ အချိန်", "SGT": "စင်္ကာပူ အချိန်", "WEZ": "အနောက်ဥရောပ စံတော်ချိန်", "HNOG": "အနောက် ဂရင်းလန်း စံတော်ချိန်", "WITA": "အလယ်ပိုင်း အင်ဒိုနီးရှား အချိန်", "HNCU": "ကျူးဘား စံတော်ချိန်", "UYT": "ဥရုဂွေး စံတော်ချိန်", "CHADT": "ချာသမ် နွေရာသီ အချိန်", "TMST": "တာ့ခ်မင်နစ္စတန် နွေရာသီ အချိန်", "ACST": "ဩစတြေးလျား အလယ်ပိုင်း စံတော်ချိန်", "AKST": "အလားစကားစံတော်ချိန်", "WESZ": "အနောက်ဥရောပ နွေရာသီ အချိန်", "AWST": "အနောက်ဩစတြေးလျား စံတော်ချိန်", "HNPM": "စိန့်ပီအဲနှင့်မီခွီလွန်စံတော်ချိန်", "BOT": "ဘိုလီးဘီးယား အချိန်", "COT": "ကိုလံဘီယာ စံတော်ချိန်", "EDT": "မြောက်အမေရိက အရှေ့ပိုင်း နွေရာသီစံတော်ချိန်", "CST": "မြောက်အမေရိက အလယ်ပိုင်းစံတော်ချိန်", "ADT": "အတ္တလန်တစ် နွေရာသီ စံတော်ချိန်", "PST": "မြောက်အမေရိက ပစိဖိတ်စံတော်ချိန်", "HEOG": "အနောက် ဂရင်းလန် နွေရာသီ စံတော်ချိန်", "AWDT": "ဩစတြေးလျား နွေရာသီ အချိန်", "WAT": "အနောက်အာဖရိက စံတော်ချိန်", "WARST": "အနောက် အာဂျင်တီးနား နွေရာသီ အချိန်", "MYT": "မလေးရှား အချိန်", "HADT": "ဟာဝိုင်ယီ အယ်လူးရှန်း နွေရာသီ စံတော်ချိန်", "HEEG": "အရှေ့ဂရင်းလန် နွေရာသီ စံတော်ချိန်", "GFT": "ပြင်သစ် ဂီအားနား အချိန်", "GMT": "ဂရင်းနစ် စံတော်ချိန်", "PDT": "မြောက်အမေရိက ပစိဖိတ် နွေရာသီစံတော်ချိန်", "HNT": "နယူးဖောင်လန် စံတော်ချိန်", "LHST": "လော့ဒ်ဟောင်စံတော်ချိန်", "SAST": "တောင်အာဖရိက အချိန်", "CLT": "ချီလီ စံတော်ချိန်", "EST": "မြောက်အမေရိက အရှေ့ပိုင်းစံတော်ချိန်", "NZST": "နယူးဇီလန် စံတော်ချိန်", "SRT": "စူးရီနာမ်အချိန်", "AEST": "အရှေ့ဩစတြေးလျား စံတော်ချိန်", "MEZ": "ဥရောပ အလယ်ပိုင်း စံတော်ချိန်", "JDT": "ဂျပန် နွေရာသီ အချိန်", "EAT": "အရှေ့အာဖရိက အချိန်", "MST": "မကာအို စံတော်ချိန်", "AEDT": "အရှေ့ဩစတြေးလျား နွေရာသီ အချိန်", "IST": "အိန္ဒိယ စံတော်ချိန်", "TMT": "တာ့ခ်မင်နစ္စတန် စံတော်ချိန်", "CDT": "မြောက်အမေရိက အလယ်ပိုင်း နွေရာသီစံတော်ချိန်", "WIT": "အရှေ့ပိုင်း အင်ဒိုနီးရှား အချိန်", "CHAST": "ချားသမ်စံတော်ချိန်", "HENOMX": "အနောက်တောင် မက္ကစီကို နွေရာသီ စံတော်ချိန်", "MDT": "မကာအို နွေရာသီ အချိန်", "AKDT": "အလားစကား နွေရာသီစံတော်ချိန်"}, -+ locale: "my_MM", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "OESZ": "OESZ", "WARST": "WARST", "ECT": "ECT", "HNEG": "HNEG", "HEPMX": "HEPMX", "WESZ": "WESZ", "HEOG": "HEOG", "EST": "EST", "AKST": "AKST", "COST": "COST", "HNOG": "HNOG", "HADT": "HADT", "ACDT": "ACDT", "HEPM": "HEPM", "ACWST": "ACWST", "UYST": "UYST", "EDT": "EDT", "MEZ": "MEZ", "HNPMX": "HNPMX", "TMST": "TMST", "ChST": "ChST", "JDT": "JDT", "LHDT": "LHDT", "AEDT": "AEDT", "HECU": "HECU", "ART": "ART", "SRT": "SRT", "EAT": "EAT", "HKST": "HKST", "CAT": "CAT", "CST": "CST", "BT": "BT", "PDT": "PDT", "SAST": "SAST", "MDT": "MDT", "BOT": "BOT", "HEEG": "HEEG", "HENOMX": "HENOMX", "ACST": "ACST", "ADT": "ADT", "WITA": "WITA", "CDT": "CDT", "MYT": "MYT", "CHAST": "CHAST", "HNCU": "HNCU", "OEZ": "OEZ", "WIT": "WIT", "AEST": "AEST", "HKT": "HKT", "WIB": "WIB", "LHST": "LHST", "∅∅∅": "∅∅∅", "WAT": "WAT", "TMT": "TMT", "AST": "AST", "COT": "COT", "CLT": "CLT", "CLST": "CLST", "HAST": "HAST", "MESZ": "MESZ", "ACWDT": "ACWDT", "CHADT": "CHADT", "GFT": "GFT", "GMT": "GMT", "MST": "MST", "AWDT": "AWDT", "WART": "WART", "GYT": "GYT", "ARST": "ARST", "HNPM": "HNPM", "UYT": "UYT", "VET": "VET", "NZDT": "NZDT", "NZST": "NZST", "HNNOMX": "HNNOMX", "JST": "JST", "PST": "PST", "WEZ": "WEZ", "SGT": "SGT", "AWST": "AWST", "IST": "IST", "WAST": "WAST", "AKDT": "AKDT", "HAT": "HAT"}, - } - } -  -@@ -114,7 +94,7 @@ func (my *my_MM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (my *my_MM) MonthsAbbreviated() []string { -- return my.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -124,7 +104,7 @@ func (my *my_MM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (my *my_MM) MonthsNarrow() []string { -- return my.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -134,7 +114,7 @@ func (my *my_MM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (my *my_MM) MonthsWide() []string { -- return my.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -180,73 +160,13 @@ func (my *my_MM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'my_MM' and handles both Whole and Real numbers based on 'v' - func (my *my_MM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, my.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, my.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, my.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'my_MM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (my *my_MM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, my.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, my.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, my.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'my_MM' -@@ -254,60 +174,7 @@ func (my *my_MM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := my.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, my.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, my.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(my.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, my.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, my.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, my.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'my_MM' -@@ -316,72 +183,7 @@ func (my *my_MM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := my.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, my.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, my.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(my.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, my.currencyNegativePrefix[j]) -- } -- -- b = append(b, my.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(my.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, my.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, my.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'my_MM' -@@ -389,27 +191,6 @@ func (my *my_MM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -418,17 +199,6 @@ func (my *my_MM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, my.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,17 +207,6 @@ func (my *my_MM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, my.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,19 +215,6 @@ func (my *my_MM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, my.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, my.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,19 +223,6 @@ func (my *my_MM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -498,26 +231,6 @@ func (my *my_MM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -526,31 +239,6 @@ func (my *my_MM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -559,35 +247,5 @@ func (my *my_MM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := my.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, my.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/mzn/mzn.go b/mzn/mzn.go -index 8d7a5d9..339064d 100644 ---- a/mzn/mzn.go -+++ b/mzn/mzn.go -@@ -53,7 +53,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"پ.م", "م."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"قبل میلاد", "بعد میلاد"}, -- timezones: map[string]string{"AKST": "AKST", "ARST": "ARST", "CLST": "CLST", "EDT": "EDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "GYT": "GYT", "MST": "MST", "HAT": "HAT", "AEDT": "AEDT", "IST": "IST", "WAT": "WAT", "ACWST": "ACWST", "ACWDT": "ACWDT", "HEPM": "HEPM", "CHADT": "CHADT", "ChST": "ChST", "ACST": "ACST", "ECT": "ECT", "CAT": "CAT", "ART": "ART", "EST": "EST", "OESZ": "OESZ", "AWDT": "AWDT", "JST": "JST", "EAT": "EAT", "PDT": "PDT", "HNOG": "HNOG", "AWST": "AWST", "BOT": "BOT", "AST": "AST", "ADT": "ADT", "VET": "VET", "HKST": "HKST", "CLT": "CLT", "HNEG": "HNEG", "GFT": "GFT", "HNT": "HNT", "UYT": "UYT", "CST": "CST", "MYT": "MYT", "HEOG": "HEOG", "MEZ": "MEZ", "MESZ": "MESZ", "HEEG": "HEEG", "ACDT": "ACDT", "WIB": "WIB", "HAST": "HAST", "WEZ": "WEZ", "HNPM": "HNPM", "WAST": "WAST", "HECU": "HECU", "CDT": "CDT", "MDT": "MDT", "HKT": "HKT", "NZDT": "NZDT", "CHAST": "CHAST", "COT": "COT", "COST": "COST", "HNCU": "HNCU", "AEST": "AEST", "WIT": "WIT", "SRT": "SRT", "WESZ": "WESZ", "WITA": "WITA", "NZST": "NZST", "JDT": "JDT", "∅∅∅": "∅∅∅", "HADT": "HADT", "OEZ": "OEZ", "SGT": "SGT", "UYST": "UYST", "AKDT": "AKDT", "TMT": "TMT", "SAST": "SAST", "HENOMX": "HENOMX", "BT": "BT", "TMST": "TMST", "WARST": "WARST", "GMT": "GMT", "PST": "PST", "LHDT": "LHDT", "WART": "WART", "LHST": "LHST", "HNNOMX": "HNNOMX"}, -+ timezones: map[string]string{"MESZ": "MESZ", "WEZ": "WEZ", "VET": "VET", "HNPMX": "HNPMX", "OESZ": "OESZ", "TMST": "TMST", "CLST": "CLST", "MDT": "MDT", "ChST": "ChST", "HNPM": "HNPM", "HEPM": "HEPM", "HNCU": "HNCU", "WAST": "WAST", "COST": "COST", "AWDT": "AWDT", "EST": "EST", "CST": "CST", "SGT": "SGT", "∅∅∅": "∅∅∅", "HADT": "HADT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "AWST": "AWST", "WAT": "WAT", "COT": "COT", "TMT": "TMT", "CDT": "CDT", "ACST": "ACST", "JST": "JST", "GFT": "GFT", "WARST": "WARST", "ECT": "ECT", "BOT": "BOT", "HAST": "HAST", "PST": "PST", "AEDT": "AEDT", "CHADT": "CHADT", "SAST": "SAST", "NZST": "NZST", "SRT": "SRT", "CAT": "CAT", "ACDT": "ACDT", "BT": "BT", "WESZ": "WESZ", "HECU": "HECU", "AKST": "AKST", "HNT": "HNT", "WIT": "WIT", "WITA": "WITA", "HENOMX": "HENOMX", "ARST": "ARST", "HNOG": "HNOG", "HEOG": "HEOG", "EDT": "EDT", "LHDT": "LHDT", "AEST": "AEST", "AKDT": "AKDT", "HAT": "HAT", "HKT": "HKT", "CLT": "CLT", "NZDT": "NZDT", "HEEG": "HEEG", "UYST": "UYST", "MEZ": "MEZ", "JDT": "JDT", "PDT": "PDT", "ACWDT": "ACWDT", "UYT": "UYT", "OEZ": "OEZ", "WART": "WART", "HKST": "HKST", "MYT": "MYT", "GYT": "GYT", "GMT": "GMT", "ART": "ART", "HEPMX": "HEPMX", "EAT": "EAT", "IST": "IST", "ACWST": "ACWST", "WIB": "WIB", "ADT": "ADT", "MST": "MST", "CHAST": "CHAST", "AST": "AST", "LHST": "LHST"}, - } - } -  -diff --git a/mzn_IR/mzn_IR.go b/mzn_IR/mzn_IR.go -index 67ff0bb..72a2a70 100644 ---- a/mzn_IR/mzn_IR.go -+++ b/mzn_IR/mzn_IR.go -@@ -42,18 +42,13 @@ type mzn_IR struct { - // New returns a new instance of translator for the 'mzn_IR' locale - func New() locales.Translator { - return &mzn_IR{ -- locale: "mzn_IR", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"}, -- monthsWide: []string{"", "ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"}, -- erasAbbreviated: []string{"پ.م", "م."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"قبل میلاد", "بعد میلاد"}, -- timezones: map[string]string{"HNCU": "HNCU", "HKT": "HKT", "CLT": "CLT", "COT": "COT", "EST": "EST", "HEOG": "HEOG", "BOT": "BOT", "COST": "COST", "SGT": "SGT", "ACWDT": "ACWDT", "WAT": "WAT", "WARST": "WARST", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "MYT": "MYT", "∅∅∅": "∅∅∅", "GMT": "GMT", "MST": "MST", "HNT": "HNT", "HKST": "HKST", "SAST": "SAST", "CAT": "CAT", "OESZ": "OESZ", "HADT": "HADT", "AWST": "AWST", "HEPM": "HEPM", "MESZ": "MESZ", "ACDT": "ACDT", "WART": "WART", "CST": "CST", "HNOG": "HNOG", "AEDT": "AEDT", "HNPM": "HNPM", "HEEG": "HEEG", "ACST": "ACST", "VET": "VET", "HAT": "HAT", "IST": "IST", "HNEG": "HNEG", "OEZ": "OEZ", "UYST": "UYST", "WIB": "WIB", "WITA": "WITA", "ECT": "ECT", "EAT": "EAT", "HENOMX": "HENOMX", "EDT": "EDT", "WEZ": "WEZ", "ART": "ART", "LHST": "LHST", "AKST": "AKST", "AKDT": "AKDT", "BT": "BT", "ARST": "ARST", "PDT": "PDT", "JDT": "JDT", "CLST": "CLST", "WAST": "WAST", "AST": "AST", "WIT": "WIT", "WESZ": "WESZ", "CHAST": "CHAST", "JST": "JST", "TMST": "TMST", "GYT": "GYT", "UYT": "UYT", "HAST": "HAST", "AEST": "AEST", "NZST": "NZST", "GFT": "GFT", "ADT": "ADT", "PST": "PST", "LHDT": "LHDT", "HECU": "HECU", "MDT": "MDT", "CDT": "CDT", "SRT": "SRT", "ACWST": "ACWST", "AWDT": "AWDT", "MEZ": "MEZ", "NZDT": "NZDT", "CHADT": "CHADT", "TMT": "TMT", "ChST": "ChST"}, -+ locale: "mzn_IR", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZST": "NZST", "ADT": "ADT", "HENOMX": "HENOMX", "JST": "JST", "HNPMX": "HNPMX", "HNT": "HNT", "WARST": "WARST", "AWDT": "AWDT", "IST": "IST", "TMT": "TMT", "BOT": "BOT", "MYT": "MYT", "AEST": "AEST", "OEZ": "OEZ", "TMST": "TMST", "HKST": "HKST", "HADT": "HADT", "LHST": "LHST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "VET": "VET", "SAST": "SAST", "CLST": "CLST", "AKDT": "AKDT", "MST": "MST", "ART": "ART", "EAT": "EAT", "HNPM": "HNPM", "HEPM": "HEPM", "HNCU": "HNCU", "WEZ": "WEZ", "CAT": "CAT", "CST": "CST", "AST": "AST", "HNNOMX": "HNNOMX", "UYT": "UYT", "PST": "PST", "HEPMX": "HEPMX", "OESZ": "OESZ", "ChST": "ChST", "ACWST": "ACWST", "AEDT": "AEDT", "HECU": "HECU", "COT": "COT", "EST": "EST", "ECT": "ECT", "ARST": "ARST", "ACST": "ACST", "LHDT": "LHDT", "WART": "WART", "WIB": "WIB", "HNEG": "HNEG", "GFT": "GFT", "GMT": "GMT", "MEZ": "MEZ", "WITA": "WITA", "NZDT": "NZDT", "HAT": "HAT", "WIT": "WIT", "HNOG": "HNOG", "CDT": "CDT", "ACDT": "ACDT", "JDT": "JDT", "CHADT": "CHADT", "COST": "COST", "HKT": "HKT", "BT": "BT", "WAST": "WAST", "MDT": "MDT", "AWST": "AWST", "UYST": "UYST", "SGT": "SGT", "WAT": "WAT", "HEOG": "HEOG", "GYT": "GYT", "HAST": "HAST", "MESZ": "MESZ", "HEEG": "HEEG", "ACWDT": "ACWDT", "PDT": "PDT", "SRT": "SRT", "AKST": "AKST", "EDT": "EDT", "CLT": "CLT"}, - } - } -  -@@ -99,7 +94,7 @@ func (mzn *mzn_IR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (mzn *mzn_IR) MonthsAbbreviated() []string { -- return mzn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -119,7 +114,7 @@ func (mzn *mzn_IR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (mzn *mzn_IR) MonthsWide() []string { -- return mzn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -diff --git a/naq/naq.go b/naq/naq.go -index 21bf386..c416524 100644 ---- a/naq/naq.go -+++ b/naq/naq.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Xristub aiǃâ", "Xristub khaoǃgâ"}, -- timezones: map[string]string{"HENOMX": "HENOMX", "HNCU": "HNCU", "AKST": "AKST", "CDT": "CDT", "AWST": "AWST", "AST": "AST", "ADT": "ADT", "JST": "JST", "TMST": "TMST", "ECT": "ECT", "MDT": "MDT", "CST": "CST", "AEST": "AEST", "SAST": "SAST", "CLST": "CLST", "HEEG": "HEEG", "HEPM": "HEPM", "HNNOMX": "HNNOMX", "UYST": "UYST", "PST": "PST", "WESZ": "WESZ", "ACWST": "ACWST", "HAT": "HAT", "HEOG": "HEOG", "WIB": "WIB", "HADT": "HADT", "SRT": "SRT", "ACWDT": "ACWDT", "AEDT": "AEDT", "JDT": "JDT", "∅∅∅": "∅∅∅", "GMT": "GMT", "EST": "EST", "VET": "VET", "WITA": "WITA", "IST": "IST", "HNEG": "HNEG", "CAT": "CAT", "WAT": "WAT", "WIT": "WIT", "ART": "ART", "LHST": "LHST", "SGT": "SGT", "HECU": "HECU", "AKDT": "AKDT", "GYT": "GYT", "MEZ": "MEZ", "CHAST": "CHAST", "TMT": "TMT", "WART": "WART", "HNPMX": "HNPMX", "UYT": "UYT", "HKT": "HKT", "LHDT": "LHDT", "COST": "COST", "EDT": "EDT", "ACDT": "ACDT", "OEZ": "OEZ", "WEZ": "WEZ", "NZST": "NZST", "CHADT": "CHADT", "CLT": "CLT", "COT": "COT", "MST": "MST", "HAST": "HAST", "HNOG": "HNOG", "GFT": "GFT", "HKST": "HKST", "MESZ": "MESZ", "HNPM": "HNPM", "EAT": "EAT", "WARST": "WARST", "MYT": "MYT", "BT": "BT", "PDT": "PDT", "HNT": "HNT", "AWDT": "AWDT", "ARST": "ARST", "NZDT": "NZDT", "ChST": "ChST", "ACST": "ACST", "WAST": "WAST", "OESZ": "OESZ", "HEPMX": "HEPMX", "BOT": "BOT"}, -+ timezones: map[string]string{"WIB": "WIB", "ARST": "ARST", "AWDT": "AWDT", "WEZ": "WEZ", "COT": "COT", "GYT": "GYT", "COST": "COST", "ACST": "ACST", "HNNOMX": "HNNOMX", "WARST": "WARST", "ACWST": "ACWST", "ACDT": "ACDT", "HENOMX": "HENOMX", "JST": "JST", "ChST": "ChST", "HNCU": "HNCU", "WAT": "WAT", "HNT": "HNT", "NZDT": "NZDT", "AST": "AST", "AKST": "AKST", "CLST": "CLST", "CDT": "CDT", "SAST": "SAST", "HNOG": "HNOG", "HKST": "HKST", "HAST": "HAST", "LHDT": "LHDT", "MYT": "MYT", "HEPMX": "HEPMX", "JDT": "JDT", "UYT": "UYT", "AKDT": "AKDT", "WART": "WART", "EDT": "EDT", "MEZ": "MEZ", "MESZ": "MESZ", "HEEG": "HEEG", "SRT": "SRT", "TMT": "TMT", "TMST": "TMST", "ADT": "ADT", "CLT": "CLT", "AWST": "AWST", "AEST": "AEST", "CHAST": "CHAST", "CAT": "CAT", "BOT": "BOT", "EAT": "EAT", "VET": "VET", "WAST": "WAST", "WITA": "WITA", "CST": "CST", "HEPM": "HEPM", "UYST": "UYST", "PDT": "PDT", "OESZ": "OESZ", "GFT": "GFT", "HEOG": "HEOG", "NZST": "NZST", "HNEG": "HNEG", "WESZ": "WESZ", "HECU": "HECU", "EST": "EST", "HADT": "HADT", "BT": "BT", "AEDT": "AEDT", "WIT": "WIT", "MDT": "MDT", "GMT": "GMT", "LHST": "LHST", "∅∅∅": "∅∅∅", "PST": "PST", "HAT": "HAT", "MST": "MST", "ART": "ART", "HNPM": "HNPM", "IST": "IST", "OEZ": "OEZ", "HNPMX": "HNPMX", "HKT": "HKT", "ECT": "ECT", "ACWDT": "ACWDT", "CHADT": "CHADT", "SGT": "SGT"}, - } - } -  -diff --git a/naq_NA/naq_NA.go b/naq_NA/naq_NA.go -index cf8d9a7..2f14094 100644 ---- a/naq_NA/naq_NA.go -+++ b/naq_NA/naq_NA.go -@@ -42,24 +42,13 @@ type naq_NA struct { - // New returns a new instance of translator for the 'naq_NA' locale - func New() locales.Translator { - return &naq_NA{ -- locale: "naq_NA", -- pluralsCardinal: []locales.PluralRule{2, 3, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "ǃKhanni", "ǃKhanǀgôab", "ǀKhuuǁkhâb", "ǃHôaǂkhaib", "ǃKhaitsâb", "Gamaǀaeb", "ǂKhoesaob", "Aoǁkhuumûǁkhâb", "Taraǀkhuumûǁkhâb", "ǂNûǁnâiseb", "ǀHooǂgaeb", "Hôasoreǁkhâb"}, -- daysAbbreviated: []string{"Son", "Ma", "De", "Wu", "Do", "Fr", "Sat"}, -- daysNarrow: []string{"S", "M", "E", "W", "D", "F", "A"}, -- daysWide: []string{"Sontaxtsees", "Mantaxtsees", "Denstaxtsees", "Wunstaxtsees", "Dondertaxtsees", "Fraitaxtsees", "Satertaxtsees"}, -- periodsAbbreviated: []string{"ǁgoagas", "ǃuias"}, -- periodsWide: []string{"ǁgoagas", "ǃuias"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Xristub aiǃâ", "Xristub khaoǃgâ"}, -- timezones: map[string]string{"HEEG": "HEEG", "WART": "WART", "ART": "ART", "AWDT": "AWDT", "HEPM": "HEPM", "LHST": "LHST", "HEOG": "HEOG", "WEZ": "WEZ", "ACWST": "ACWST", "AWST": "AWST", "EST": "EST", "HAT": "HAT", "UYST": "UYST", "ADT": "ADT", "HNOG": "HNOG", "AEST": "AEST", "ACST": "ACST", "GMT": "GMT", "HNCU": "HNCU", "BT": "BT", "AEDT": "AEDT", "GYT": "GYT", "AKST": "AKST", "CLST": "CLST", "HNEG": "HNEG", "CDT": "CDT", "PST": "PST", "ARST": "ARST", "WARST": "WARST", "SGT": "SGT", "∅∅∅": "∅∅∅", "MDT": "MDT", "MYT": "MYT", "HNPM": "HNPM", "CLT": "CLT", "TMT": "TMT", "COST": "COST", "HENOMX": "HENOMX", "SRT": "SRT", "PDT": "PDT", "WESZ": "WESZ", "ChST": "ChST", "WAST": "WAST", "HADT": "HADT", "HKST": "HKST", "MESZ": "MESZ", "IST": "IST", "JDT": "JDT", "JST": "JST", "TMST": "TMST", "HECU": "HECU", "ACWDT": "ACWDT", "NZST": "NZST", "NZDT": "NZDT", "SAST": "SAST", "HNNOMX": "HNNOMX", "HAST": "HAST", "VET": "VET", "HNT": "HNT", "CHADT": "CHADT", "LHDT": "LHDT", "BOT": "BOT", "WAT": "WAT", "UYT": "UYT", "CST": "CST", "WIT": "WIT", "HKT": "HKT", "MEZ": "MEZ", "EAT": "EAT", "ECT": "ECT", "HEPMX": "HEPMX", "AST": "AST", "WITA": "WITA", "GFT": "GFT", "ACDT": "ACDT", "EDT": "EDT", "CHAST": "CHAST", "OESZ": "OESZ", "CAT": "CAT", "OEZ": "OEZ", "COT": "COT", "MST": "MST", "HNPMX": "HNPMX", "AKDT": "AKDT", "WIB": "WIB"}, -+ locale: "naq_NA", -+ pluralsCardinal: []locales.PluralRule{2, 3, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COST": "COST", "HEOG": "HEOG", "GMT": "GMT", "WAST": "WAST", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "WIT": "WIT", "ECT": "ECT", "MYT": "MYT", "JST": "JST", "VET": "VET", "HAT": "HAT", "COT": "COT", "NZST": "NZST", "HNNOMX": "HNNOMX", "BT": "BT", "ACDT": "ACDT", "HENOMX": "HENOMX", "CHAST": "CHAST", "ACWDT": "ACWDT", "HNCU": "HNCU", "NZDT": "NZDT", "BOT": "BOT", "MESZ": "MESZ", "AEDT": "AEDT", "HNOG": "HNOG", "HKST": "HKST", "ARST": "ARST", "HNPM": "HNPM", "UYST": "UYST", "ACWST": "ACWST", "WESZ": "WESZ", "WAT": "WAT", "GFT": "GFT", "WARST": "WARST", "HKT": "HKT", "AWDT": "AWDT", "OEZ": "OEZ", "ADT": "ADT", "SRT": "SRT", "MEZ": "MEZ", "AEST": "AEST", "HECU": "HECU", "AKST": "AKST", "ChST": "ChST", "LHST": "LHST", "UYT": "UYT", "SGT": "SGT", "TMT": "TMT", "CAT": "CAT", "WITA": "WITA", "MDT": "MDT", "AWST": "AWST", "LHDT": "LHDT", "JDT": "JDT", "HNT": "HNT", "CLT": "CLT", "EAT": "EAT", "HADT": "HADT", "HEEG": "HEEG", "PST": "PST", "WART": "WART", "CLST": "CLST", "CDT": "CDT", "MST": "MST", "ACST": "ACST", "TMST": "TMST", "IST": "IST", "PDT": "PDT", "AKDT": "AKDT", "HEPMX": "HEPMX", "SAST": "SAST", "GYT": "GYT", "ART": "ART", "HAST": "HAST", "HEPM": "HEPM", "AST": "AST", "CHADT": "CHADT", "WEZ": "WEZ", "EST": "EST", "EDT": "EDT", "CST": "CST", "WIB": "WIB", "HNEG": "HNEG"}, - } - } -  -@@ -114,7 +103,7 @@ func (naq *naq_NA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (naq *naq_NA) MonthsAbbreviated() []string { -- return naq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -124,7 +113,7 @@ func (naq *naq_NA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (naq *naq_NA) MonthsNarrow() []string { -- return naq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -134,7 +123,7 @@ func (naq *naq_NA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (naq *naq_NA) MonthsWide() []string { -- return naq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,56 +183,7 @@ func (naq *naq_NA) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := naq.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, naq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, naq.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, naq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, naq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'naq_NA' -@@ -252,64 +192,7 @@ func (naq *naq_NA) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := naq.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, naq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, naq.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, naq.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, naq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'naq_NA' -@@ -317,27 +200,6 @@ func (naq *naq_NA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -346,17 +208,6 @@ func (naq *naq_NA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, naq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -365,17 +216,6 @@ func (naq *naq_NA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, naq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -384,19 +224,6 @@ func (naq *naq_NA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, naq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, naq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -405,28 +232,6 @@ func (naq *naq_NA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, naq.periodsAbbreviated[0]...) -- } else { -- b = append(b, naq.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -435,35 +240,6 @@ func (naq *naq_NA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, naq.periodsAbbreviated[0]...) -- } else { -- b = append(b, naq.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -472,40 +248,6 @@ func (naq *naq_NA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, naq.periodsAbbreviated[0]...) -- } else { -- b = append(b, naq.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -514,44 +256,5 @@ func (naq *naq_NA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, naq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, naq.periodsAbbreviated[0]...) -- } else { -- b = append(b, naq.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := naq.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nb/nb.go b/nb/nb.go -index 31bbaa9..f451e38 100644 ---- a/nb/nb.go -+++ b/nb/nb.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "e.Kr."}, - erasNarrow: []string{"f.Kr.", "e.Kr."}, - erasWide: []string{"før Kristus", "etter Kristus"}, -- timezones: map[string]string{"LHST": "normaltid for Lord Howe-øya", "BOT": "boliviansk tid", "UYT": "uruguayansk normaltid", "UYST": "uruguayansk sommertid", "ACWST": "vest-sentralaustralsk normaltid", "CAT": "sentralafrikansk tid", "COT": "colombiansk normaltid", "CLST": "chilensk sommertid", "HNEG": "østgrønlandsk normaltid", "WAT": "vestafrikansk normaltid", "CLT": "chilensk normaltid", "GFT": "tidssone for Fransk Guyana", "ADT": "atlanterhavskystlig sommertid", "GYT": "guyansk tid", "HEPM": "sommertid for Saint-Pierre-et-Miquelon", "PDT": "sommertid for den nordamerikanske Stillehavskysten", "WEZ": "vesteuropeisk normaltid", "OESZ": "østeuropeisk sommertid", "ACWDT": "vest-sentralaustralsk sommertid", "AWST": "vestaustralsk normaltid", "MEZ": "sentraleuropeisk normaltid", "JST": "japansk normaltid", "EAT": "østafrikansk tid", "AKST": "alaskisk normaltid", "CDT": "sommertid for det sentrale Nord-Amerika", "AST": "atlanterhavskystlig standardtid", "HNNOMX": "normaltid for nordvestlige Mexico", "EST": "normaltid for den nordamerikanske østkysten", "MYT": "malaysisk tid", "∅∅∅": "sommertid for Amazonas", "HNCU": "cubansk normaltid", "PST": "normaltid for den nordamerikanske Stillehavskysten", "NZDT": "newzealandsk sommertid", "ChST": "tidssone for Chamorro", "ECT": "ecuadoriansk tid", "WART": "vestargentinsk normaltid", "VET": "venezuelansk tid", "SRT": "surinamsk tid", "HNT": "normaltid for Newfoundland", "HEPMX": "sommertid for den meksikanske Stillehavskysten", "EDT": "sommertid for den nordamerikanske østkysten", "WESZ": "vesteuropeisk sommertid", "ARST": "argentinsk sommertid", "AEDT": "østaustralsk sommertid", "ACDT": "sentralaustralsk sommertid", "MDT": "sommertid for Rocky Mountains (USA)", "WIT": "østindonesisk tid", "BT": "bhutansk tid", "HEEG": "østgrønlandsk sommertid", "COST": "colombiansk sommertid", "WIB": "vestindonesisk tid", "HADT": "sommertid for Hawaii og Aleutene", "AWDT": "vestaustralsk sommertid", "OEZ": "østeuropeisk normaltid", "HENOMX": "sommertid for nordvestlige Mexico", "AEST": "østaustralsk normaltid", "NZST": "newzealandsk normaltid", "MESZ": "sentraleuropeisk sommertid", "HNPM": "normaltid for Saint-Pierre-et-Miquelon", "CHADT": "sommertid for Chatham", "JDT": "japansk sommertid", "HAT": "sommertid for Newfoundland", "ART": "argentinsk normaltid", "HNOG": "vestgrønlandsk normaltid", "SGT": "singaporsk tid", "AKDT": "alaskisk sommertid", "MST": "normaltid for Rocky Mountains (USA)", "IST": "indisk tid", "CHAST": "normaltid for Chatham", "ACST": "sentralaustralsk normaltid", "CST": "normaltid for det sentrale Nord-Amerika", "HAST": "normaltid for Hawaii og Aleutene", "LHDT": "sommertid for Lord Howe-øya", "SAST": "sørafrikansk tid", "TMST": "turkmensk sommertid", "WAST": "vestafrikansk sommertid", "WARST": "vestargentinsk sommertid", "HEOG": "vestgrønlandsk sommertid", "HKT": "normaltid for Hongkong", "WITA": "sentralindonesisk tid", "GMT": "Greenwich middeltid", "HNPMX": "normaltid for den meksikanske Stillehavskysten", "HKST": "sommertid for Hongkong", "TMT": "turkmensk normaltid", "HECU": "cubansk sommertid"}, -+ timezones: map[string]string{"MST": "Macau, standardtid", "AEDT": "østaustralsk sommertid", "HNPMX": "normaltid for den meksikanske Stillehavskysten", "HEPMX": "sommertid for den meksikanske Stillehavskysten", "CLT": "chilensk normaltid", "CST": "normaltid for det sentrale Nord-Amerika", "ACST": "sentralaustralsk normaltid", "LHDT": "sommertid for Lord Howe-øya", "HNPM": "normaltid for Saint-Pierre-et-Miquelon", "JDT": "japansk sommertid", "VET": "venezuelansk tid", "COST": "colombiansk sommertid", "EDT": "sommertid for den nordamerikanske østkysten", "ChST": "tidssone for Chamorro", "UYST": "uruguayansk sommertid", "PST": "normaltid for den nordamerikanske Stillehavskysten", "ACWDT": "vest-sentralaustralsk sommertid", "AEST": "østaustralsk normaltid", "WESZ": "vesteuropeisk sommertid", "HKST": "sommertid for Hongkong", "CLST": "chilensk sommertid", "CDT": "sommertid for det sentrale Nord-Amerika", "WAST": "vestafrikansk sommertid", "HNT": "normaltid for Newfoundland", "TMST": "turkmensk sommertid", "HNNOMX": "normaltid for nordvestlige Mexico", "ECT": "ecuadoriansk tid", "AST": "atlanterhavskystlig standardtid", "HECU": "cubansk sommertid", "AKST": "alaskisk normaltid", "TMT": "turkmensk normaltid", "WITA": "sentralindonesisk tid", "ACWST": "vest-sentralaustralsk normaltid", "CHADT": "sommertid for Chatham", "SGT": "singaporsk tid", "COT": "colombiansk normaltid", "ARST": "argentinsk sommertid", "MYT": "malaysisk tid", "BT": "bhutansk tid", "WAT": "vestafrikansk normaltid", "WART": "vestargentinsk normaltid", "HNEG": "østgrønlandsk normaltid", "LHST": "normaltid for Lord Howe-øya", "EAT": "østafrikansk tid", "HEEG": "østgrønlandsk sommertid", "IST": "indisk tid", "HNCU": "cubansk normaltid", "OESZ": "østeuropeisk sommertid", "HAT": "sommertid for Newfoundland", "NZDT": "newzealandsk sommertid", "AWDT": "vestaustralsk sommertid", "CHAST": "normaltid for Chatham", "OEZ": "østeuropeisk normaltid", "WARST": "vestargentinsk sommertid", "CAT": "sentralafrikansk tid", "JST": "japansk normaltid", "SRT": "surinamsk tid", "ACDT": "sentralaustralsk sommertid", "HEPM": "sommertid for Saint-Pierre-et-Miquelon", "UYT": "uruguayansk normaltid", "∅∅∅": "sommertid for Amazonas", "HNOG": "vestgrønlandsk normaltid", "HKT": "normaltid for Hongkong", "ART": "argentinsk normaltid", "WEZ": "vesteuropeisk normaltid", "NZST": "newzealandsk normaltid", "HENOMX": "sommertid for nordvestlige Mexico", "MESZ": "sentraleuropeisk sommertid", "GYT": "guyansk tid", "WIB": "vestindonesisk tid", "ADT": "atlanterhavskystlig sommertid", "AWST": "vestaustralsk normaltid", "BOT": "boliviansk tid", "HAST": "normaltid for Hawaii og Aleutene", "GFT": "tidssone for Fransk Guyana", "WIT": "østindonesisk tid", "SAST": "sørafrikansk tid", "EST": "normaltid for den nordamerikanske østkysten", "AKDT": "alaskisk sommertid", "HEOG": "vestgrønlandsk sommertid", "HADT": "sommertid for Hawaii og Aleutene", "MDT": "Macau, sommertid", "GMT": "Greenwich middeltid", "MEZ": "sentraleuropeisk normaltid", "PDT": "sommertid for den nordamerikanske Stillehavskysten"}, - } - } -  -diff --git a/nb_NO/nb_NO.go b/nb_NO/nb_NO.go -index d372c45..0979239 100644 ---- a/nb_NO/nb_NO.go -+++ b/nb_NO/nb_NO.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nb_NO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nb_NO' locale - func New() locales.Translator { - return &nb_NO{ -- locale: "nb_NO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"}, -- daysAbbreviated: []string{"søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø."}, -- daysWide: []string{"søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.Kr.", "e.Kr."}, -- erasWide: []string{"før Kristus", "etter Kristus"}, -- timezones: map[string]string{"EAT": "østafrikansk tid", "ECT": "ecuadoriansk tid", "GMT": "Greenwich middeltid", "BT": "bhutansk tid", "SAST": "sørafrikansk tid", "IST": "indisk tid", "∅∅∅": "sommertid for Amazonas", "BOT": "boliviansk tid", "ChST": "tidssone for Chamorro", "HNPMX": "normaltid for den meksikanske Stillehavskysten", "UYT": "uruguayansk normaltid", "HAST": "normaltid for Hawaii og Aleutene", "WEZ": "vesteuropeisk normaltid", "NZST": "newzealandsk normaltid", "NZDT": "newzealandsk sommertid", "CLT": "chilensk normaltid", "HNPM": "normaltid for Saint-Pierre-et-Miquelon", "AWST": "vestaustralsk normaltid", "GFT": "tidssone for Fransk Guyana", "PST": "normaltid for den nordamerikanske Stillehavskysten", "ARST": "argentinsk sommertid", "WITA": "sentralindonesisk tid", "HEPMX": "sommertid for den meksikanske Stillehavskysten", "SGT": "singaporsk tid", "ACWST": "vest-sentralaustralsk normaltid", "HAT": "sommertid for Newfoundland", "ACST": "sentralaustralsk normaltid", "WAST": "vestafrikansk sommertid", "WART": "vestargentinsk normaltid", "HKST": "sommertid for Hongkong", "HNEG": "østgrønlandsk normaltid", "HEEG": "østgrønlandsk sommertid", "TMST": "turkmensk sommertid", "CAT": "sentralafrikansk tid", "AKDT": "alaskisk sommertid", "CST": "normaltid for det sentrale Nord-Amerika", "AST": "atlanterhavskystlig standardtid", "HKT": "normaltid for Hongkong", "ACDT": "sentralaustralsk sommertid", "OESZ": "østeuropeisk sommertid", "EST": "normaltid for den nordamerikanske østkysten", "MST": "Macau, standardtid", "WIB": "vestindonesisk tid", "AEST": "østaustralsk normaltid", "LHST": "normaltid for Lord Howe-øya", "LHDT": "sommertid for Lord Howe-øya", "HNCU": "cubansk normaltid", "GYT": "guyansk tid", "HEOG": "vestgrønlandsk sommertid", "MEZ": "sentraleuropeisk normaltid", "JDT": "japansk sommertid", "TMT": "turkmensk normaltid", "COT": "colombiansk normaltid", "CHAST": "normaltid for Chatham", "OEZ": "østeuropeisk normaltid", "MDT": "Macau, sommertid", "VET": "venezuelansk tid", "WIT": "østindonesisk tid", "PDT": "sommertid for den nordamerikanske Stillehavskysten", "WESZ": "vesteuropeisk sommertid", "ACWDT": "vest-sentralaustralsk sommertid", "ADT": "atlanterhavskystlig sommertid", "CHADT": "sommertid for Chatham", "COST": "colombiansk sommertid", "HNNOMX": "normaltid for nordvestlige Mexico", "UYST": "uruguayansk sommertid", "ART": "argentinsk normaltid", "WARST": "vestargentinsk sommertid", "EDT": "sommertid for den nordamerikanske østkysten", "AKST": "alaskisk normaltid", "CDT": "sommertid for det sentrale Nord-Amerika", "MYT": "malaysisk tid", "SRT": "surinamsk tid", "HNT": "normaltid for Newfoundland", "AWDT": "vestaustralsk sommertid", "MESZ": "sentraleuropeisk sommertid", "WAT": "vestafrikansk normaltid", "HNOG": "vestgrønlandsk normaltid", "AEDT": "østaustralsk sommertid", "HEPM": "sommertid for Saint-Pierre-et-Miquelon", "JST": "japansk normaltid", "HENOMX": "sommertid for nordvestlige Mexico", "HADT": "sommertid for Hawaii og Aleutene", "CLST": "chilensk sommertid", "HECU": "cubansk sommertid"}, -+ locale: "nb_NO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEEG": "HEEG", "UYT": "UYT", "SGT": "SGT", "VET": "VET", "NZST": "NZST", "ChST": "ChST", "EAT": "EAT", "HNPM": "HNPM", "HEPM": "HEPM", "WEZ": "WEZ", "GFT": "GFT", "HEOG": "HEOG", "AST": "AST", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "WIB": "WIB", "MDT": "MDT", "HAST": "HAST", "GMT": "GMT", "UYST": "UYST", "PDT": "PDT", "HNT": "HNT", "WIT": "WIT", "GYT": "GYT", "EST": "EST", "ECT": "ECT", "BOT": "BOT", "MYT": "MYT", "HADT": "HADT", "AWDT": "AWDT", "SAST": "SAST", "ACDT": "ACDT", "HNEG": "HNEG", "BT": "BT", "HNCU": "HNCU", "EDT": "EDT", "HKST": "HKST", "CDT": "CDT", "ART": "ART", "MEZ": "MEZ", "LHST": "LHST", "AEDT": "AEDT", "HEPMX": "HEPMX", "WAT": "WAT", "WART": "WART", "COT": "COT", "ADT": "ADT", "ARST": "ARST", "AKST": "AKST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "PST": "PST", "COST": "COST", "CLT": "CLT", "HNOG": "HNOG", "TMT": "TMT", "AKDT": "AKDT", "OESZ": "OESZ", "HKT": "HKT", "NZDT": "NZDT", "HAT": "HAT", "AEST": "AEST", "∅∅∅": "∅∅∅", "IST": "IST", "ACWST": "ACWST", "WESZ": "WESZ", "WAST": "WAST", "OEZ": "OEZ", "TMST": "TMST", "WITA": "WITA", "CST": "CST", "SRT": "SRT", "MESZ": "MESZ", "ACST": "ACST", "JST": "JST", "JDT": "JDT", "LHDT": "LHDT", "CAT": "CAT", "MST": "MST", "AWST": "AWST", "CHAST": "CHAST", "CHADT": "CHADT", "HECU": "HECU", "WARST": "WARST", "CLST": "CLST"}, - } - } -  -@@ -126,7 +101,7 @@ func (nb *nb_NO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nb *nb_NO) MonthsAbbreviated() []string { -- return nb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (nb *nb_NO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nb *nb_NO) MonthsNarrow() []string { -- return nb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (nb *nb_NO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nb *nb_NO) MonthsWide() []string { -- return nb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,81 +167,13 @@ func (nb *nb_NO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nb_NO' and handles both Whole and Real numbers based on 'v' - func (nb *nb_NO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nb.group) - 1; j >= 0; j-- { -- b = append(b, nb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nb_NO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nb *nb_NO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nb.percentSuffix...) -- -- b = append(b, nb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nb_NO' -@@ -274,64 +181,7 @@ func (nb *nb_NO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nb.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nb.group) - 1; j >= 0; j-- { -- b = append(b, nb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nb.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, nb.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nb_NO' -@@ -340,76 +190,7 @@ func (nb *nb_NO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nb.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nb.group) - 1; j >= 0; j-- { -- b = append(b, nb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nb.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, nb.currencyNegativePrefix[j]) -- } -- -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nb.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, nb.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nb_NO' -@@ -417,27 +198,6 @@ func (nb *nb_NO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +206,6 @@ func (nb *nb_NO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nb.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +214,6 @@ func (nb *nb_NO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +222,6 @@ func (nb *nb_NO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nb.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +230,6 @@ func (nb *nb_NO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +238,6 @@ func (nb *nb_NO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +246,6 @@ func (nb *nb_NO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +254,5 @@ func (nb *nb_NO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nb_SJ/nb_SJ.go b/nb_SJ/nb_SJ.go -index f1b6e05..ee56e3c 100644 ---- a/nb_SJ/nb_SJ.go -+++ b/nb_SJ/nb_SJ.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nb_SJ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nb_SJ' locale - func New() locales.Translator { - return &nb_SJ{ -- locale: "nb_SJ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "mai", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"}, -- daysAbbreviated: []string{"søn.", "man.", "tir.", "ons.", "tor.", "fre.", "lør."}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sø.", "ma.", "ti.", "on.", "to.", "fr.", "lø."}, -- daysWide: []string{"søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.Kr.", "e.Kr."}, -- erasWide: []string{"før Kristus", "etter Kristus"}, -- timezones: map[string]string{"MEZ": "sentraleuropeisk normaltid", "CHAST": "normaltid for Chatham", "∅∅∅": "sommertid for Amazonas", "HEEG": "østgrønlandsk sommertid", "CAT": "sentralafrikansk tid", "EAT": "østafrikansk tid", "HENOMX": "sommertid for nordvestlige Mexico", "SGT": "singaporsk tid", "WITA": "sentralindonesisk tid", "HEPMX": "sommertid for den meksikanske Stillehavskysten", "TMST": "turkmensk sommertid", "WARST": "vestargentinsk sommertid", "HNCU": "cubansk normaltid", "HKST": "sommertid for Hongkong", "LHST": "normaltid for Lord Howe-øya", "HNNOMX": "normaltid for nordvestlige Mexico", "PDT": "sommertid for den nordamerikanske Stillehavskysten", "HAT": "sommertid for Newfoundland", "HKT": "normaltid for Hongkong", "HNEG": "østgrønlandsk normaltid", "CDT": "sommertid for det sentrale Nord-Amerika", "AEST": "østaustralsk normaltid", "HNPM": "normaltid for Saint-Pierre-et-Miquelon", "ACDT": "sentralaustralsk sommertid", "HECU": "cubansk sommertid", "ACWDT": "vest-sentralaustralsk sommertid", "MDT": "sommertid for Rocky Mountains (USA)", "AWDT": "vestaustralsk sommertid", "HNPMX": "normaltid for den meksikanske Stillehavskysten", "UYST": "uruguayansk sommertid", "ARST": "argentinsk sommertid", "GFT": "tidssone for Fransk Guyana", "EST": "normaltid for den nordamerikanske østkysten", "ADT": "atlanterhavskystlig sommertid", "MYT": "malaysisk tid", "HAST": "normaltid for Hawaii og Aleutene", "NZDT": "newzealandsk sommertid", "CLT": "chilensk normaltid", "OEZ": "østeuropeisk normaltid", "GYT": "guyansk tid", "SRT": "surinamsk tid", "HNT": "normaltid for Newfoundland", "ART": "argentinsk normaltid", "HEOG": "vestgrønlandsk sommertid", "HEPM": "sommertid for Saint-Pierre-et-Miquelon", "ACST": "sentralaustralsk normaltid", "COST": "colombiansk sommertid", "AST": "atlanterhavskystlig standardtid", "GMT": "Greenwich middeltid", "WEZ": "vesteuropeisk normaltid", "HNOG": "vestgrønlandsk normaltid", "AEDT": "østaustralsk sommertid", "MESZ": "sentraleuropeisk sommertid", "NZST": "newzealandsk normaltid", "SAST": "sørafrikansk tid", "JST": "japansk normaltid", "WIT": "østindonesisk tid", "HADT": "sommertid for Hawaii og Aleutene", "BT": "bhutansk tid", "PST": "normaltid for den nordamerikanske Stillehavskysten", "ACWST": "vest-sentralaustralsk normaltid", "TMT": "turkmensk normaltid", "EDT": "sommertid for den nordamerikanske østkysten", "MST": "normaltid for Rocky Mountains (USA)", "CLST": "chilensk sommertid", "OESZ": "østeuropeisk sommertid", "AWST": "vestaustralsk normaltid", "WESZ": "vesteuropeisk sommertid", "CHADT": "sommertid for Chatham", "ChST": "tidssone for Chamorro", "BOT": "boliviansk tid", "WAT": "vestafrikansk normaltid", "AKDT": "alaskisk sommertid", "LHDT": "sommertid for Lord Howe-øya", "IST": "indisk tid", "WAST": "vestafrikansk sommertid", "VET": "venezuelansk tid", "CST": "normaltid for det sentrale Nord-Amerika", "UYT": "uruguayansk normaltid", "WIB": "vestindonesisk tid", "JDT": "japansk sommertid", "ECT": "ecuadoriansk tid", "WART": "vestargentinsk normaltid", "COT": "colombiansk normaltid", "AKST": "alaskisk normaltid"}, -+ locale: "nb_SJ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CHADT": "CHADT", "∅∅∅": "∅∅∅", "SAST": "SAST", "ECT": "ECT", "GMT": "GMT", "ART": "ART", "HNNOMX": "HNNOMX", "MYT": "MYT", "MST": "MST", "SGT": "SGT", "WAST": "WAST", "OEZ": "OEZ", "CDT": "CDT", "ChST": "ChST", "HENOMX": "HENOMX", "CHAST": "CHAST", "AEDT": "AEDT", "GFT": "GFT", "HKST": "HKST", "MEZ": "MEZ", "GYT": "GYT", "HKT": "HKT", "MESZ": "MESZ", "AWST": "AWST", "HNPM": "HNPM", "UYT": "UYT", "COST": "COST", "WIT": "WIT", "WITA": "WITA", "AWDT": "AWDT", "LHDT": "LHDT", "IST": "IST", "WARST": "WARST", "ACDT": "ACDT", "LHST": "LHST", "PST": "PST", "WESZ": "WESZ", "TMT": "TMT", "NZST": "NZST", "WIB": "WIB", "WAT": "WAT", "OESZ": "OESZ", "HAT": "HAT", "HNOG": "HNOG", "MDT": "MDT", "HEEG": "HEEG", "PDT": "PDT", "HECU": "HECU", "WART": "WART", "AKDT": "AKDT", "AST": "AST", "ARST": "ARST", "UYST": "UYST", "VET": "VET", "HNPMX": "HNPMX", "HNCU": "HNCU", "EST": "EST", "CLST": "CLST", "HEPMX": "HEPMX", "AKST": "AKST", "CST": "CST", "NZDT": "NZDT", "HEPM": "HEPM", "BT": "BT", "WEZ": "WEZ", "EDT": "EDT", "TMST": "TMST", "ADT": "ADT", "JST": "JST", "ACWST": "ACWST", "COT": "COT", "HEOG": "HEOG", "HADT": "HADT", "AEST": "AEST", "HNT": "HNT", "CAT": "CAT", "EAT": "EAT", "HAST": "HAST", "ACST": "ACST", "JDT": "JDT", "ACWDT": "ACWDT", "CLT": "CLT", "BOT": "BOT", "SRT": "SRT", "HNEG": "HNEG"}, - } - } -  -@@ -126,7 +101,7 @@ func (nb *nb_SJ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nb *nb_SJ) MonthsAbbreviated() []string { -- return nb.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (nb *nb_SJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nb *nb_SJ) MonthsNarrow() []string { -- return nb.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (nb *nb_SJ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nb *nb_SJ) MonthsWide() []string { -- return nb.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,81 +167,13 @@ func (nb *nb_SJ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nb_SJ' and handles both Whole and Real numbers based on 'v' - func (nb *nb_SJ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nb.group) - 1; j >= 0; j-- { -- b = append(b, nb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nb_SJ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nb *nb_SJ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nb.percentSuffix...) -- -- b = append(b, nb.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nb_SJ' -@@ -274,64 +181,7 @@ func (nb *nb_SJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nb.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nb.group) - 1; j >= 0; j-- { -- b = append(b, nb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nb.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, nb.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nb_SJ' -@@ -340,76 +190,7 @@ func (nb *nb_SJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nb.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nb.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nb.group) - 1; j >= 0; j-- { -- b = append(b, nb.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nb.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, nb.currencyNegativePrefix[j]) -- } -- -- for j := len(nb.minus) - 1; j >= 0; j-- { -- b = append(b, nb.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nb.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, nb.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nb.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nb_SJ' -@@ -417,27 +198,6 @@ func (nb *nb_SJ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +206,6 @@ func (nb *nb_SJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nb.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,17 +214,6 @@ func (nb *nb_SJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +222,6 @@ func (nb *nb_SJ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nb.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nb.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +230,6 @@ func (nb *nb_SJ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +238,6 @@ func (nb *nb_SJ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +246,6 @@ func (nb *nb_SJ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +254,5 @@ func (nb *nb_SJ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nb.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nb.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nd/nd.go b/nd/nd.go -index aa22614..ae4b9a8 100644 ---- a/nd/nd.go -+++ b/nd/nd.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"UKristo angakabuyi", "Ukristo ebuyile"}, -- timezones: map[string]string{"ChST": "ChST", "VET": "VET", "HNPM": "HNPM", "HKT": "HKT", "SGT": "SGT", "CDT": "CDT", "SRT": "SRT", "PST": "PST", "JST": "JST", "UYST": "UYST", "BT": "BT", "WEZ": "WEZ", "WART": "WART", "HAST": "HAST", "HNEG": "HNEG", "TMT": "TMT", "WAST": "WAST", "ECT": "ECT", "EDT": "EDT", "CST": "CST", "HNOG": "HNOG", "LHST": "LHST", "HNPMX": "HNPMX", "CHADT": "CHADT", "COT": "COT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "EST": "EST", "ACWST": "ACWST", "ARST": "ARST", "WITA": "WITA", "IST": "IST", "CAT": "CAT", "HNCU": "HNCU", "HEPMX": "HEPMX", "WIT": "WIT", "OEZ": "OEZ", "AKST": "AKST", "ACWDT": "ACWDT", "JDT": "JDT", "EAT": "EAT", "MST": "MST", "HADT": "HADT", "ACDT": "ACDT", "OESZ": "OESZ", "MDT": "MDT", "UYT": "UYT", "CLT": "CLT", "∅∅∅": "∅∅∅", "BOT": "BOT", "HEEG": "HEEG", "WESZ": "WESZ", "HNT": "HNT", "HAT": "HAT", "AWDT": "AWDT", "TMST": "TMST", "WAT": "WAT", "AEST": "AEST", "AEDT": "AEDT", "NZST": "NZST", "CHAST": "CHAST", "CLST": "CLST", "HECU": "HECU", "GYT": "GYT", "PDT": "PDT", "MESZ": "MESZ", "GFT": "GFT", "GMT": "GMT", "MYT": "MYT", "HEPM": "HEPM", "HEOG": "HEOG", "HKST": "HKST", "MEZ": "MEZ", "NZDT": "NZDT", "WARST": "WARST", "COST": "COST", "AKDT": "AKDT", "AST": "AST", "LHDT": "LHDT", "SAST": "SAST", "ADT": "ADT", "WIB": "WIB", "ART": "ART", "AWST": "AWST", "ACST": "ACST"}, -+ timezones: map[string]string{"LHST": "LHST", "LHDT": "LHDT", "AEST": "AEST", "WARST": "WARST", "HNT": "HNT", "COT": "COT", "TMST": "TMST", "JST": "JST", "OESZ": "OESZ", "CLT": "CLT", "CST": "CST", "MEZ": "MEZ", "MESZ": "MESZ", "AWST": "AWST", "AWDT": "AWDT", "COST": "COST", "EST": "EST", "ECT": "ECT", "ACST": "ACST", "HAT": "HAT", "AST": "AST", "HENOMX": "HENOMX", "ADT": "ADT", "HNEG": "HNEG", "HNPM": "HNPM", "WEZ": "WEZ", "SAST": "SAST", "CAT": "CAT", "NZST": "NZST", "HAST": "HAST", "PDT": "PDT", "ACWDT": "ACWDT", "AKST": "AKST", "OEZ": "OEZ", "WART": "WART", "HKST": "HKST", "CHADT": "CHADT", "VET": "VET", "MDT": "MDT", "CDT": "CDT", "ACDT": "ACDT", "MYT": "MYT", "ACWST": "ACWST", "WIT": "WIT", "WITA": "WITA", "ChST": "ChST", "ARST": "ARST", "SGT": "SGT", "HNCU": "HNCU", "HEEG": "HEEG", "AEDT": "AEDT", "CHAST": "CHAST", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "TMT": "TMT", "SRT": "SRT", "HEOG": "HEOG", "EDT": "EDT", "MST": "MST", "WIB": "WIB", "UYST": "UYST", "IST": "IST", "WAST": "WAST", "HNOG": "HNOG", "BOT": "BOT", "HADT": "HADT", "GYT": "GYT", "HKT": "HKT", "CLST": "CLST", "EAT": "EAT", "NZDT": "NZDT", "BT": "BT", "AKDT": "AKDT", "WAT": "WAT", "HEPM": "HEPM", "JDT": "JDT", "GMT": "GMT", "ART": "ART", "HNNOMX": "HNNOMX", "PST": "PST", "HECU": "HECU", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "GFT": "GFT", "UYT": "UYT"}, - } - } -  -diff --git a/nd_ZW/nd_ZW.go b/nd_ZW/nd_ZW.go -index 51ea6e8..facad94 100644 ---- a/nd_ZW/nd_ZW.go -+++ b/nd_ZW/nd_ZW.go -@@ -10,58 +10,45 @@ import ( - ) -  - type nd_ZW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nd_ZW' locale - func New() locales.Translator { - return &nd_ZW{ -- locale: "nd_ZW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Zib", "Nhlo", "Mbi", "Mab", "Nkw", "Nhla", "Ntu", "Ncw", "Mpan", "Mfu", "Lwe", "Mpal"}, -- monthsNarrow: []string{"", "Z", "N", "M", "M", "N", "N", "N", "N", "M", "M", "L", "M"}, -- monthsWide: []string{"", "Zibandlela", "Nhlolanja", "Mbimbitho", "Mabasa", "Nkwenkwezi", "Nhlangula", "Ntulikazi", "Ncwabakazi", "Mpandula", "Mfumfu", "Lwezi", "Mpalakazi"}, -- daysAbbreviated: []string{"Son", "Mvu", "Sib", "Sit", "Sin", "Sih", "Mgq"}, -- daysNarrow: []string{"S", "M", "S", "S", "S", "S", "M"}, -- daysWide: []string{"Sonto", "Mvulo", "Sibili", "Sithathu", "Sine", "Sihlanu", "Mgqibelo"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"UKristo angakabuyi", "Ukristo ebuyile"}, -- timezones: map[string]string{"ACWST": "ACWST", "HEPM": "HEPM", "GMT": "GMT", "PDT": "PDT", "WIB": "WIB", "CLST": "CLST", "TMT": "TMT", "WARST": "WARST", "HEPMX": "HEPMX", "UYST": "UYST", "MEZ": "MEZ", "CHAST": "CHAST", "IST": "IST", "LHST": "LHST", "CHADT": "CHADT", "SAST": "SAST", "ChST": "ChST", "EST": "EST", "HADT": "HADT", "WIT": "WIT", "AWST": "AWST", "HNPMX": "HNPMX", "WITA": "WITA", "EAT": "EAT", "WAT": "WAT", "ADT": "ADT", "WESZ": "WESZ", "HEOG": "HEOG", "AEST": "AEST", "HEEG": "HEEG", "WART": "WART", "ART": "ART", "NZST": "NZST", "JDT": "JDT", "AKST": "AKST", "CST": "CST", "ACWDT": "ACWDT", "JST": "JST", "HNCU": "HNCU", "ECT": "ECT", "HENOMX": "HENOMX", "MYT": "MYT", "AKDT": "AKDT", "HNOG": "HNOG", "HKT": "HKT", "NZDT": "NZDT", "WAST": "WAST", "HNNOMX": "HNNOMX", "HAST": "HAST", "PST": "PST", "WEZ": "WEZ", "BOT": "BOT", "SGT": "SGT", "EDT": "EDT", "CDT": "CDT", "GYT": "GYT", "SRT": "SRT", "AEDT": "AEDT", "AWDT": "AWDT", "ACDT": "ACDT", "CAT": "CAT", "COT": "COT", "HECU": "HECU", "UYT": "UYT", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "ACST": "ACST", "AST": "AST", "MST": "MST", "MDT": "MDT", "HAT": "HAT", "HKST": "HKST", "COST": "COST", "CLT": "CLT", "BT": "BT", "GFT": "GFT", "TMST": "TMST", "HNPM": "HNPM", "MESZ": "MESZ", "HNEG": "HNEG", "OEZ": "OEZ", "OESZ": "OESZ", "VET": "VET", "HNT": "HNT", "ARST": "ARST"}, -+ locale: "nd_ZW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"PST": "PST", "UYT": "UYT", "IST": "IST", "HKT": "HKT", "HKST": "HKST", "EDT": "EDT", "HEPM": "HEPM", "LHST": "LHST", "AWDT": "AWDT", "BT": "BT", "HNPMX": "HNPMX", "GFT": "GFT", "HNT": "HNT", "MST": "MST", "BOT": "BOT", "WESZ": "WESZ", "HAST": "HAST", "EAT": "EAT", "ACWST": "ACWST", "WEZ": "WEZ", "MESZ": "MESZ", "MYT": "MYT", "AEST": "AEST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "COST": "COST", "ChST": "ChST", "HNNOMX": "HNNOMX", "CAT": "CAT", "HNPM": "HNPM", "HNCU": "HNCU", "HEOG": "HEOG", "NZDT": "NZDT", "HNEG": "HNEG", "AWST": "AWST", "HADT": "HADT", "HEPMX": "HEPMX", "WAT": "WAT", "TMST": "TMST", "MDT": "MDT", "WIB": "WIB", "WIT": "WIT", "GYT": "GYT", "CDT": "CDT", "ARST": "ARST", "ACST": "ACST", "MEZ": "MEZ", "WITA": "WITA", "ACDT": "ACDT", "AEDT": "AEDT", "AKST": "AKST", "WAST": "WAST", "OEZ": "OEZ", "CLT": "CLT", "CHADT": "CHADT", "SGT": "SGT", "HAT": "HAT", "SAST": "SAST", "AST": "AST", "ACWDT": "ACWDT", "JST": "JST", "JDT": "JDT", "UYST": "UYST", "OESZ": "OESZ", "COT": "COT", "EST": "EST", "LHDT": "LHDT", "AKDT": "AKDT", "NZST": "NZST", "CST": "CST", "HEEG": "HEEG", "HNOG": "HNOG", "ADT": "ADT", "PDT": "PDT", "HECU": "HECU", "WARST": "WARST", "CLST": "CLST", "ART": "ART", "SRT": "SRT", "HENOMX": "HENOMX", "VET": "VET", "WART": "WART", "TMT": "TMT", "ECT": "ECT", "GMT": "GMT"}, - } - } -  -@@ -114,7 +101,7 @@ func (nd *nd_ZW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nd *nd_ZW) MonthsAbbreviated() []string { -- return nd.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -124,7 +111,7 @@ func (nd *nd_ZW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nd *nd_ZW) MonthsNarrow() []string { -- return nd.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -134,7 +121,7 @@ func (nd *nd_ZW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nd *nd_ZW) MonthsWide() []string { -- return nd.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,56 +181,7 @@ func (nd *nd_ZW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nd.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nd.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nd.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, nd.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nd.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nd_ZW' -@@ -252,68 +190,7 @@ func (nd *nd_ZW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nd.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nd.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nd.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, nd.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nd.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nd.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nd_ZW' -@@ -321,27 +198,6 @@ func (nd *nd_ZW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -350,17 +206,6 @@ func (nd *nd_ZW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nd.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -369,17 +214,6 @@ func (nd *nd_ZW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nd.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -388,19 +222,6 @@ func (nd *nd_ZW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nd.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nd.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -409,19 +230,6 @@ func (nd *nd_ZW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -430,26 +238,6 @@ func (nd *nd_ZW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -458,30 +246,6 @@ func (nd *nd_ZW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -490,34 +254,5 @@ func (nd *nd_ZW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nd.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nd.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nds/nds.go b/nds/nds.go -index 012c09e..e389a58 100644 ---- a/nds/nds.go -+++ b/nds/nds.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v.Chr.", "n.Chr."}, - erasNarrow: []string{"vC", "nC"}, - erasWide: []string{"vör Christus", "na Christus"}, -- timezones: map[string]string{"NZST": "NZST", "SAST": "Söödafrikaansch Tiet", "HECU": "HECU", "AST": "Noordamerikaansch Atlantik-Standardtiet", "ADT": "Noordamerikaansch Atlantik-Summertiet", "HAST": "HAST", "CHAST": "CHAST", "TMST": "TMST", "ACDT": "Zentraalaustraalsch Summertiet", "SGT": "SGT", "SRT": "SRT", "AEST": "Oostaustraalsch Standardtiet", "HADT": "HADT", "HENOMX": "HENOMX", "GMT": "Gröönwisch-Welttiet", "UYST": "UYST", "AKST": "AKST", "HEPM": "HEPM", "MESZ": "Zentraaleuropääsch Summertiet", "EAT": "Oostafrikaansch Tiet", "WEZ": "Westeuropääsch Standardtiet", "MEZ": "Zentraaleuropääsch Standardtiet", "CLT": "CLT", "ACST": "Zentraalaustraalsch Standardtiet", "ECT": "ECT", "CDT": "Noordamerikaansch zentraal Summertiet", "ARST": "ARST", "LHDT": "LHDT", "NZDT": "NZDT", "GFT": "GFT", "CST": "Noordamerikaansch zentraal Standardtiet", "GYT": "GYT", "WIB": "Westindoneesch Tiet", "BT": "BT", "HEOG": "HEOG", "CHADT": "CHADT", "CLST": "CLST", "HEEG": "HEEG", "CAT": "Zentraalafrikaansch Tiet", "WESZ": "Westeuropääsch Summertiet", "HNT": "HNT", "ART": "ART", "UYT": "UYT", "∅∅∅": "∅∅∅", "BOT": "BOT", "COST": "COST", "HNNOMX": "HNNOMX", "MDT": "MDT", "AKDT": "AKDT", "ACWST": "Westzentraalaustraalsch Standardtiet", "AWST": "Westaustraalsch Standardtiet", "HKST": "HKST", "JST": "Japaansch Standardtiet", "TMT": "TMT", "MST": "MST", "HNPMX": "HNPMX", "WITA": "Indoneesch Zentraaltiet", "ChST": "ChST", "WAST": "Westafrikaansch Summertiet", "COT": "COT", "PDT": "Noordamerikaansch Pazifik-Summertiet", "OEZ": "Oosteuropääsch Standardtiet", "HEPMX": "HEPMX", "VET": "VET", "HAT": "HAT", "WIT": "Oostindoneesch Tiet", "PST": "Noordamerikaansch Pazifik-Standardtiet", "AEDT": "Oostaustraalsch Summertiet", "HNPM": "HNPM", "JDT": "Japaansch Summertiet", "HNCU": "HNCU", "MYT": "MYT", "LHST": "LHST", "HNEG": "HNEG", "WART": "WART", "EST": "Noordamerikaansch oosten Standardtiet", "EDT": "Noordamerikaansch oosten Summertiet", "HNOG": "HNOG", "ACWDT": "Westzentraalaustraalsch Summertiet", "AWDT": "Westaustraalsch Summertiet", "HKT": "HKT", "IST": "Indien-Tiet", "WAT": "Westafrikaansch Standardtiet", "OESZ": "Oosteuropääsch Summertiet", "WARST": "WARST"}, -+ timezones: map[string]string{"CAT": "Zentraalafrikaansch Tiet", "ChST": "ChST", "BOT": "BOT", "SGT": "SGT", "OESZ": "Oosteuropääsch Summertiet", "COT": "COT", "HKT": "HKT", "ACST": "Zentraalaustraalsch Standardtiet", "UYST": "UYST", "HNCU": "HNCU", "HADT": "HADT", "ACWDT": "Westzentraalaustraalsch Summertiet", "AKST": "AKST", "EDT": "Noordamerikaansch oosten Summertiet", "MST": "MST", "NZDT": "NZDT", "ADT": "Noordamerikaansch Atlantik-Summertiet", "GMT": "Gröönwisch-Welttiet", "CHADT": "CHADT", "HEPMX": "HEPMX", "OEZ": "Oosteuropääsch Standardtiet", "HNT": "HNT", "CLT": "CLT", "WIB": "Westindoneesch Tiet", "TMT": "TMT", "CDT": "Noordamerikaansch zentraal Summertiet", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "VET": "VET", "∅∅∅": "∅∅∅", "GYT": "GYT", "WITA": "Indoneesch Zentraaltiet", "MDT": "MDT", "HENOMX": "HENOMX", "LHST": "LHST", "AEDT": "Oostaustraalsch Summertiet", "HECU": "HECU", "WAST": "Westafrikaansch Summertiet", "HKST": "HKST", "ART": "ART", "HNEG": "HNEG", "HNPM": "HNPM", "HEPM": "HEPM", "GFT": "GFT", "WIT": "Oostindoneesch Tiet", "BT": "BT", "CST": "Noordamerikaansch zentraal Standardtiet", "MYT": "MYT", "ACWST": "Westzentraalaustraalsch Standardtiet", "WESZ": "Westeuropääsch Summertiet", "EST": "Noordamerikaansch oosten Standardtiet", "ECT": "ECT", "EAT": "Oostafrikaansch Tiet", "MESZ": "Zentraaleuropääsch Summertiet", "AWDT": "Westaustraalsch Summertiet", "WART": "WART", "NZST": "NZST", "JDT": "Japaansch Summertiet", "PST": "Noordamerikaansch Pazifik-Standardtiet", "PDT": "Noordamerikaansch Pazifik-Summertiet", "WEZ": "Westeuropääsch Standardtiet", "WAT": "Westafrikaansch Standardtiet", "HEOG": "HEOG", "ARST": "ARST", "IST": "Indien-Tiet", "HNPMX": "HNPMX", "COST": "COST", "SRT": "SRT", "JST": "Japaansch Standardtiet", "AWST": "Westaustraalsch Standardtiet", "AKDT": "AKDT", "HAT": "HAT", "HNOG": "HNOG", "TMST": "TMST", "AST": "Noordamerikaansch Atlantik-Standardtiet", "ACDT": "Zentraalaustraalsch Summertiet", "CHAST": "CHAST", "WARST": "WARST", "CLST": "CLST", "MEZ": "Zentraaleuropääsch Standardtiet", "HEEG": "HEEG", "UYT": "UYT", "SAST": "Söödafrikaansch Tiet", "HAST": "HAST", "AEST": "Oostaustraalsch Standardtiet"}, - } - } -  -diff --git a/nds_DE/nds_DE.go b/nds_DE/nds_DE.go -index 051b9c8..448c7d0 100644 ---- a/nds_DE/nds_DE.go -+++ b/nds_DE/nds_DE.go -@@ -10,68 +10,45 @@ import ( - ) -  - type nds_DE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nds_DE' locale - func New() locales.Translator { - return &nds_DE{ -- locale: "nds_DE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januaar", "Februaar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktover", "November", "Dezember"}, -- daysAbbreviated: []string{"Sü.", "Ma.", "Di.", "Mi.", "Du.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysWide: []string{"Sünndag", "Maandag", "Dingsdag", "Middeweken", "Dunnersdag", "Freedag", "Sünnavend"}, -- periodsAbbreviated: []string{"vm", "nm"}, -- periodsWide: []string{"vm", "nm"}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"vC", "nC"}, -- erasWide: []string{"vör Christus", "na Christus"}, -- timezones: map[string]string{"NZDT": "NZDT", "CLST": "CLST", "EST": "Noordamerikaansch oosten Standardtiet", "HEPMX": "HEPMX", "HAST": "HAST", "ART": "ART", "HNPM": "HNPM", "HKT": "HKT", "SAST": "Söödafrikaansch Tiet", "CLT": "CLT", "WAST": "Westafrikaansch Summertiet", "MYT": "MYT", "UYT": "UYT", "UYST": "UYST", "AWDT": "Westaustraalsch Summertiet", "TMT": "TMT", "HAT": "HAT", "HEOG": "HEOG", "AKST": "AKST", "CST": "Noordamerikaansch zentraal Standardtiet", "GYT": "GYT", "SRT": "SRT", "JST": "Japaansch Standardtiet", "WAT": "Westafrikaansch Standardtiet", "WART": "WART", "HECU": "HECU", "MDT": "MDT", "AKDT": "AKDT", "ChST": "ChST", "OEZ": "Oosteuropääsch Standardtiet", "COST": "COST", "AEST": "Oostaustraalsch Standardtiet", "WITA": "Indoneesch Zentraaltiet", "LHDT": "LHDT", "ACST": "Zentraalaustraalsch Standardtiet", "GMT": "Gröönwisch-Welttiet", "HADT": "HADT", "VET": "VET", "ACWDT": "Westzentraalaustraalsch Summertiet", "AWST": "Westaustraalsch Standardtiet", "JDT": "Japaansch Summertiet", "HNEG": "HNEG", "GFT": "GFT", "EDT": "Noordamerikaansch oosten Summertiet", "CDT": "Noordamerikaansch zentraal Summertiet", "BT": "BT", "MEZ": "Zentraaleuropääsch Standardtiet", "BOT": "BOT", "COT": "COT", "HNNOMX": "HNNOMX", "ACWST": "Westzentraalaustraalsch Standardtiet", "HEPM": "HEPM", "WARST": "WARST", "WIB": "Westindoneesch Tiet", "CAT": "Zentraalafrikaansch Tiet", "WEZ": "Westeuropääsch Standardtiet", "ARST": "ARST", "HKST": "HKST", "NZST": "NZST", "IST": "Indien-Tiet", "EAT": "Oostafrikaansch Tiet", "HNPMX": "HNPMX", "HNT": "HNT", "HNOG": "HNOG", "CHAST": "CHAST", "CHADT": "CHADT", "TMST": "TMST", "SGT": "SGT", "AST": "Noordamerikaansch Atlantik-Standardtiet", "WESZ": "Westeuropääsch Summertiet", "ECT": "ECT", "HNCU": "HNCU", "WIT": "Oostindoneesch Tiet", "AEDT": "Oostaustraalsch Summertiet", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "OESZ": "Oosteuropääsch Summertiet", "MST": "MST", "PDT": "Noordamerikaansch Pazifik-Summertiet", "ACDT": "Zentraalaustraalsch Summertiet", "HENOMX": "HENOMX", "ADT": "Noordamerikaansch Atlantik-Summertiet", "PST": "Noordamerikaansch Pazifik-Standardtiet", "MESZ": "Zentraaleuropääsch Summertiet", "LHST": "LHST"}, -+ locale: "nds_DE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"NZST": "NZST", "MEZ": "MEZ", "ACDT": "ACDT", "AWDT": "AWDT", "UYT": "UYT", "AKDT": "AKDT", "HNOG": "HNOG", "HEOG": "HEOG", "ARST": "ARST", "HAT": "HAT", "HNEG": "HNEG", "HNPM": "HNPM", "CHAST": "CHAST", "PST": "PST", "HNCU": "HNCU", "HNPMX": "HNPMX", "AKST": "AKST", "WIT": "WIT", "COT": "COT", "COST": "COST", "CAT": "CAT", "MST": "MST", "GMT": "GMT", "HEPM": "HEPM", "AEST": "AEST", "BT": "BT", "WIB": "WIB", "AST": "AST", "HADT": "HADT", "JDT": "JDT", "AEDT": "AEDT", "SGT": "SGT", "HKST": "HKST", "TMT": "TMT", "CLST": "CLST", "BOT": "BOT", "LHST": "LHST", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "VET": "VET", "WART": "WART", "HKT": "HKT", "ECT": "ECT", "HEEG": "HEEG", "WAT": "WAT", "EAT": "EAT", "MESZ": "MESZ", "LHDT": "LHDT", "UYST": "UYST", "SAST": "SAST", "SRT": "SRT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "WAST": "WAST", "GFT": "GFT", "WARST": "WARST", "CDT": "CDT", "TMST": "TMST", "CST": "CST", "NZDT": "NZDT", "ChST": "ChST", "IST": "IST", "GYT": "GYT", "CLT": "CLT", "ART": "ART", "ADT": "ADT", "HAST": "HAST", "PDT": "PDT", "WEZ": "WEZ", "EDT": "EDT", "HECU": "HECU", "WESZ": "WESZ", "OESZ": "OESZ", "WITA": "WITA", "ACST": "ACST", "JST": "JST", "AWST": "AWST", "MYT": "MYT", "HEPMX": "HEPMX", "OEZ": "OEZ", "EST": "EST", "CHADT": "CHADT", "MDT": "MDT", "HENOMX": "HENOMX", "HNT": "HNT"}, - } - } -  -@@ -117,7 +94,7 @@ func (nds *nds_DE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nds *nds_DE) MonthsAbbreviated() []string { -- return nds.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (nds *nds_DE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nds *nds_DE) MonthsNarrow() []string { -- return nds.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (nds *nds_DE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nds *nds_DE) MonthsWide() []string { -- return nds.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,75 +160,13 @@ func (nds *nds_DE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nds_DE' and handles both Whole and Real numbers based on 'v' - func (nds *nds_DE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nds.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nds.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nds_DE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nds *nds_DE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nds.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nds.percentSuffix...) -- -- b = append(b, nds.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nds_DE' -@@ -259,56 +174,7 @@ func (nds *nds_DE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nds.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nds.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nds.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nds.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nds.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nds_DE' -@@ -317,63 +183,7 @@ func (nds *nds_DE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nds.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nds.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nds.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nds.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nds.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nds.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nds_DE' -@@ -381,23 +191,6 @@ func (nds *nds_DE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +199,6 @@ func (nds *nds_DE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nds.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,17 +207,6 @@ func (nds *nds_DE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nds.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -444,20 +215,6 @@ func (nds *nds_DE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nds.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nds.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,17 +223,6 @@ func (nds *nds_DE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,24 +231,6 @@ func (nds *nds_DE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c, 0x6f, 0x63, 0x6b}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nds.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -511,30 +239,6 @@ func (nds *nds_DE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c, 0x6f, 0x63, 0x6b}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nds.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -543,34 +247,5 @@ func (nds *nds_DE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c, 0x6f, 0x63, 0x6b}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nds.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nds.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/nds_NL/nds_NL.go b/nds_NL/nds_NL.go -index daf803b..5e737a4 100644 ---- a/nds_NL/nds_NL.go -+++ b/nds_NL/nds_NL.go -@@ -10,68 +10,45 @@ import ( - ) -  - type nds_NL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nds_NL' locale - func New() locales.Translator { - return &nds_NL{ -- locale: "nds_NL", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan.", "Feb.", "März", "Apr.", "Mai", "Juni", "Juli", "Aug.", "Sep.", "Okt.", "Nov.", "Dez."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januaar", "Februaar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktover", "November", "Dezember"}, -- daysAbbreviated: []string{"Sü.", "Ma.", "Di.", "Mi.", "Du.", "Fr.", "Sa."}, -- daysNarrow: []string{"S", "M", "D", "M", "D", "F", "S"}, -- daysWide: []string{"Sünndag", "Maandag", "Dingsdag", "Middeweken", "Dunnersdag", "Freedag", "Sünnavend"}, -- periodsAbbreviated: []string{"vm", "nm"}, -- periodsWide: []string{"vm", "nm"}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"vC", "nC"}, -- erasWide: []string{"vör Christus", "na Christus"}, -- timezones: map[string]string{"ECT": "ECT", "GYT": "GYT", "HNOG": "HNOG", "WITA": "Indoneesch Zentraaltiet", "NZST": "NZST", "MESZ": "Zentraaleuropääsch Summertiet", "WAT": "Westafrikaansch Standardtiet", "GMT": "Gröönwisch-Welttiet", "ART": "ART", "HEOG": "HEOG", "HKST": "HKST", "CLST": "CLST", "AWDT": "Westaustraalsch Summertiet", "HEEG": "HEEG", "ACDT": "Zentraalaustraalsch Summertiet", "AKDT": "AKDT", "HADT": "HADT", "EAT": "Oostafrikaansch Tiet", "TMT": "TMT", "TMST": "TMST", "ChST": "ChST", "HNCU": "HNCU", "HECU": "HECU", "AST": "Noordamerikaansch Atlantik-Standardtiet", "ADT": "Noordamerikaansch Atlantik-Summertiet", "GFT": "GFT", "CAT": "Zentraalafrikaansch Tiet", "IST": "Indien-Tiet", "WAST": "Westafrikaansch Summertiet", "EDT": "Noordamerikaansch oosten Summertiet", "WIT": "Oostindoneesch Tiet", "AEST": "Oostaustraalsch Standardtiet", "CHADT": "CHADT", "LHDT": "LHDT", "CDT": "Noordamerikaansch zentraal Summertiet", "ACWST": "Westzentraalaustraalsch Standardtiet", "ARST": "ARST", "HAST": "HAST", "WEZ": "Westeuropääsch Standardtiet", "HEPM": "HEPM", "JST": "Japaansch Standardtiet", "LHST": "LHST", "COT": "COT", "AKST": "AKST", "BT": "BT", "SRT": "SRT", "PDT": "Noordamerikaansch Pazifik-Summertiet", "HKT": "HKT", "OESZ": "Oosteuropääsch Summertiet", "HEPMX": "HEPMX", "EST": "Noordamerikaansch oosten Standardtiet", "AEDT": "Oostaustraalsch Summertiet", "HNPM": "HNPM", "JDT": "Japaansch Summertiet", "MEZ": "Zentraaleuropääsch Standardtiet", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "UYT": "UYT", "ACWDT": "Westzentraalaustraalsch Summertiet", "HNNOMX": "HNNOMX", "WARST": "WARST", "HAT": "HAT", "CHAST": "CHAST", "CLT": "CLT", "HNEG": "HNEG", "ACST": "Zentraalaustraalsch Standardtiet", "CST": "Noordamerikaansch zentraal Standardtiet", "VET": "VET", "PST": "Noordamerikaansch Pazifik-Standardtiet", "WESZ": "Westeuropääsch Summertiet", "SAST": "Söödafrikaansch Tiet", "MYT": "MYT", "UYST": "UYST", "WIB": "Westindoneesch Tiet", "HNT": "HNT", "NZDT": "NZDT", "BOT": "BOT", "OEZ": "Oosteuropääsch Standardtiet", "WART": "WART", "∅∅∅": "∅∅∅", "SGT": "SGT", "MST": "MST", "MDT": "MDT", "AWST": "Westaustraalsch Standardtiet", "COST": "COST"}, -+ locale: "nds_NL", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ARST": "ARST", "HADT": "HADT", "HENOMX": "HENOMX", "JDT": "JDT", "HNT": "HNT", "CST": "CST", "MDT": "MDT", "ChST": "ChST", "HECU": "HECU", "SAST": "SAST", "EDT": "EDT", "HKST": "HKST", "EAT": "EAT", "JST": "JST", "ACWDT": "ACWDT", "NZDT": "NZDT", "AEDT": "AEDT", "PST": "PST", "∅∅∅": "∅∅∅", "AST": "AST", "HEEG": "HEEG", "UYST": "UYST", "WAST": "WAST", "WIT": "WIT", "GMT": "GMT", "HEPM": "HEPM", "CHAST": "CHAST", "CHADT": "CHADT", "IST": "IST", "WESZ": "WESZ", "TMT": "TMT", "HKT": "HKT", "SRT": "SRT", "MESZ": "MESZ", "ACWST": "ACWST", "AEST": "AEST", "COT": "COT", "CLT": "CLT", "CDT": "CDT", "ACST": "ACST", "AWST": "AWST", "UYT": "UYT", "OEZ": "OEZ", "TMST": "TMST", "WIB": "WIB", "ACDT": "ACDT", "BT": "BT", "HAT": "HAT", "COST": "COST", "MST": "MST", "ART": "ART", "HNEG": "HNEG", "WAT": "WAT", "CAT": "CAT", "MEZ": "MEZ", "LHST": "LHST", "VET": "VET", "WARST": "WARST", "HEOG": "HEOG", "GYT": "GYT", "CLST": "CLST", "LHDT": "LHDT", "PDT": "PDT", "HNCU": "HNCU", "WITA": "WITA", "NZST": "NZST", "ECT": "ECT", "MYT": "MYT", "HNPM": "HNPM", "HNOG": "HNOG", "EST": "EST", "OESZ": "OESZ", "GFT": "GFT", "HAST": "HAST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "ADT": "ADT", "WEZ": "WEZ", "SGT": "SGT", "AKST": "AKST", "AKDT": "AKDT", "WART": "WART", "BOT": "BOT", "HNPMX": "HNPMX", "HEPMX": "HEPMX"}, - } - } -  -@@ -117,7 +94,7 @@ func (nds *nds_NL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nds *nds_NL) MonthsAbbreviated() []string { -- return nds.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (nds *nds_NL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nds *nds_NL) MonthsNarrow() []string { -- return nds.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (nds *nds_NL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nds *nds_NL) MonthsWide() []string { -- return nds.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,75 +160,13 @@ func (nds *nds_NL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nds_NL' and handles both Whole and Real numbers based on 'v' - func (nds *nds_NL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nds.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nds.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nds_NL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nds *nds_NL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nds.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nds.percentSuffix...) -- -- b = append(b, nds.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nds_NL' -@@ -259,56 +174,7 @@ func (nds *nds_NL) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nds.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nds.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nds.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nds.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nds.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nds_NL' -@@ -317,63 +183,7 @@ func (nds *nds_NL) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nds.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nds.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nds.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nds.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nds.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nds.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nds.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nds_NL' -@@ -381,23 +191,6 @@ func (nds *nds_NL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -406,17 +199,6 @@ func (nds *nds_NL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nds.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,17 +207,6 @@ func (nds *nds_NL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nds.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -444,20 +215,6 @@ func (nds *nds_NL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nds.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nds.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -466,17 +223,6 @@ func (nds *nds_NL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,24 +231,6 @@ func (nds *nds_NL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c, 0x6f, 0x63, 0x6b}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nds.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -511,30 +239,6 @@ func (nds *nds_NL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c, 0x6f, 0x63, 0x6b}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nds.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -543,34 +247,5 @@ func (nds *nds_NL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x4b, 0x6c, 0x6f, 0x63, 0x6b}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nds.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nds.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/ne/ne.go b/ne/ne.go -index de8e5d4..f7f431f 100644 ---- a/ne/ne.go -+++ b/ne/ne.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ईसा पूर्व", "सन्"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ईसा पूर्व", "सन्"}, -- timezones: map[string]string{"HEOG": "पश्चिमी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "AEST": "पूर्वी अस्ट्रेलिया मानक समय", "MEZ": "केन्द्रीय युरोपेली मानक समय", "TMT": "तुर्कमेनिस्तान मानक समय", "ECT": "ईक्वोडोर समय", "HENOMX": "उत्तर पश्चिम मेक्सिकोको दिवा समय", "HAST": "हवाई-एलुटियन मानक समय", "GMT": "ग्रीनविच मिन समय", "EST": "पूर्वी मानक समय", "AEDT": "पूर्वी अस्ट्रेलिया दिवा समय", "HKST": "हङकङ ग्रीष्मकालीन समय", "MST": "MST", "AST": "एट्लान्टिक मानक समय", "GYT": "गुयाना समय", "IST": "भारतीय मानक समय", "NZDT": "न्यूजिल्यान्ड दिवा समय", "HNPMX": "मेक्सिकन प्यासिफिक मानक समय", "HNT": "न्यूफाउनडल्यान्डको मानक समय", "HKT": "हङकङ मानक समय", "WITA": "केन्द्रीय इन्डोनेशिया समय", "WIB": "पश्चिमी इन्डोनेशिया समय", "WEZ": "पश्चिमी युरोपेली मानक समय", "CLST": "चिली ग्रीष्मकालीन समय", "BOT": "बोलिभिया समय", "ACST": "केन्द्रीय अस्ट्रेलिया मानक समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "JDT": "जापान दिवा समय", "HNEG": "पूर्वी ग्रीनल्यान्डको मानक समय", "ART": "अर्जेनटिनी मानक समय", "ARST": "अर्जेनटिनी ग्रीष्मकालीन समय", "∅∅∅": "अमेजन ग्रीष्मकालीन समय", "EAT": "पूर्वी अफ्रिकी समय", "HADT": "हवाई-एलुटियन दिवा समय", "AWDT": "पश्चिमी अस्ट्रेलिया दिवा समय", "SAST": "दक्षिण अफ्रिकी समय", "WAST": "पश्चिम अफ्रिकी ग्रीष्मकालीन समय", "OESZ": "पूर्वी युरोपेली ग्रीष्मकालीन समय", "SRT": "सुरिनामा समय", "LHST": "लर्ड हावे मानक समय", "AKDT": "अलस्काको दिवा समय", "WIT": "पूर्वी इन्डोनेशिया समय", "LHDT": "लर्ड हावे दिवा समय", "CHADT": "चाथाम दिवा समय", "WAT": "पश्चिम अफ्रिकी मानक समय", "OEZ": "पूर्वी युरोपेली मानक समय", "WART": "पश्चिमी अर्जेनटिनी मानक समय", "UYT": "उरूग्वे मानक समय", "HNCU": "क्यूबाको मानक समय", "HEPMX": "मेक्सिकन प्यासिफिक दिवा समय", "ADT": "एट्लान्टिक दिवा समय", "PST": "प्यासिफिक मानक समय", "CLT": "चिली मानक समय", "JST": "जापान मानक समय", "HEEG": "पूर्वी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "COT": "कोलम्बियाली मानक समय", "PDT": "प्यासिफिक दिवा समय", "HEPM": "सेन्ट पियर्रे र मिक्युलोनको दिवा समय", "GFT": "फ्रेन्च ग्वाना समय", "CHAST": "चाथाम मानक समय", "CAT": "केन्द्रीय अफ्रिकी समय", "HNOG": "पश्चिमी ग्रीनल्यान्डको मानक समय", "MESZ": "केन्द्रीय युरोपेली ग्रीष्मकालीन समय", "SGT": "सिंगापुर मानक समय", "ACWDT": "केन्द्रीय पश्चिमी अस्ट्रेलिया दिवा समय", "HAT": "न्यूफाउनल्यान्डको दिवा समय", "AWST": "पश्चिमी अस्ट्रेलिया मानक समय", "HNPM": "सेन्ट पियर्रे र मिक्युलोनको मानक समय", "ChST": "चामोर्रो मानक समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन मानक समय", "EDT": "पूर्वी दिवा समय", "CDT": "केन्द्रीय दिवा समय", "BT": "भुटानी समय", "WESZ": "युरोपेली ग्रीष्मकालीन समय", "ACWST": "केन्द्रीय पश्चिमी अस्ट्रेलिया मानक समय", "WARST": "पश्चिमी अर्जेनटिनी ग्रीष्मकालीन समय", "COST": "कोलम्बियाली ग्रीष्मकालीन समय", "AKST": "अलस्काको मानक समय", "CST": "केन्द्रीय मानक समय", "MYT": "मलेसिया समय", "VET": "भेनेज्युएला समय", "NZST": "न्यूजिल्यान्ड मानक समय", "ACDT": "केन्द्रीय अस्ट्रेलिया दिवा समय", "HNNOMX": "उत्तर पश्चिम मेक्सिकोको मानक समय", "HECU": "क्यूबाको दिवा समय", "MDT": "MDT"}, -+ timezones: map[string]string{"AWST": "पश्चिमी अस्ट्रेलिया मानक समय", "CHAST": "चाथाम मानक समय", "VET": "भेनेज्युएला समय", "WART": "पश्चिमी अर्जेनटिनी मानक समय", "∅∅∅": "ब्राजिलीया ग्रीष्मकालीन समय", "TMT": "तुर्कमेनिस्तान मानक समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन मानक समय", "WIB": "पश्चिमी इन्डोनेशिया समय", "COST": "कोलम्बियाली ग्रीष्मकालीन समय", "HEPM": "सेन्ट पियर्रे र मिक्युलोनको दिवा समय", "MST": "MST", "WESZ": "युरोपेली ग्रीष्मकालीन समय", "WARST": "पश्चिमी अर्जेनटिनी ग्रीष्मकालीन समय", "OESZ": "पूर्वी युरोपेली ग्रीष्मकालीन समय", "EST": "पूर्वी मानक समय", "ACST": "केन्द्रीय अस्ट्रेलिया मानक समय", "MYT": "मलेसिया समय", "PST": "प्यासिफिक मानक समय", "LHST": "लर्ड हावे मानक समय", "LHDT": "लर्ड हावे दिवा समय", "AKST": "अलस्काको मानक समय", "ECT": "ईक्वोडोर समय", "SRT": "सुरिनामा समय", "EAT": "पूर्वी अफ्रिकी समय", "HAST": "हवाई-एलुटियन मानक समय", "GMT": "ग्रीनविच मिन समय", "JST": "जापान मानक समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "ACWST": "केन्द्रीय पश्चिमी अस्ट्रेलिया मानक समय", "CHADT": "चाथाम दिवा समय", "HEPMX": "मेक्सिकन प्यासिफिक दिवा समय", "WAT": "पश्चिम अफ्रिकी मानक समय", "HNOG": "पश्चिमी ग्रीनल्यान्डको मानक समय", "HKST": "हङकङ ग्रीष्मकालीन समय", "CLT": "चिली मानक समय", "AEST": "पूर्वी अस्ट्रेलिया मानक समय", "HECU": "क्यूबाको दिवा समय", "HNT": "न्यूफाउनडल्यान्डको मानक समय", "ART": "अर्जेनटिनी मानक समय", "ARST": "अर्जेनटिनी ग्रीष्मकालीन समय", "HNEG": "पूर्वी ग्रीनल्यान्डको मानक समय", "HENOMX": "उत्तर पश्चिम मेक्सिकोको दिवा समय", "EDT": "पूर्वी दिवा समय", "HEEG": "पूर्वी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "JDT": "जापान दिवा समय", "OEZ": "पूर्वी युरोपेली मानक समय", "AST": "एट्लान्टिक मानक समय", "ACWDT": "केन्द्रीय पश्चिमी अस्ट्रेलिया दिवा समय", "GFT": "फ्रेन्च ग्वाना समय", "HNPMX": "मेक्सिकन प्यासिफिक मानक समय", "WIT": "पूर्वी इन्डोनेशिया समय", "CDT": "केन्द्रीय दिवा समय", "ADT": "एट्लान्टिक दिवा समय", "HNPM": "सेन्ट पियर्रे र मिक्युलोनको मानक समय", "AEDT": "पूर्वी अस्ट्रेलिया दिवा समय", "WAST": "पश्चिम अफ्रिकी ग्रीष्मकालीन समय", "SAST": "दक्षिण अफ्रिकी समय", "HNNOMX": "उत्तर पश्चिम मेक्सिकोको मानक समय", "WEZ": "पश्चिमी युरोपेली मानक समय", "SGT": "सिंगापुर मानक समय", "MDT": "MDT", "NZDT": "न्यूजिल्यान्ड दिवा समय", "CST": "केन्द्रीय मानक समय", "NZST": "न्यूजिल्यान्ड मानक समय", "ChST": "चामोर्रो मानक समय", "PDT": "प्यासिफिक दिवा समय", "HEOG": "पश्चिमी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "HKT": "हङकङ मानक समय", "CAT": "केन्द्रीय अफ्रिकी समय", "WITA": "केन्द्रीय इन्डोनेशिया समय", "BT": "भुटानी समय", "UYT": "उरूग्वे मानक समय", "IST": "भारतीय मानक समय", "AKDT": "अलस्काको दिवा समय", "COT": "कोलम्बियाली मानक समय", "BOT": "बोलिभिया समय", "MEZ": "केन्द्रीय युरोपेली मानक समय", "MESZ": "केन्द्रीय युरोपेली ग्रीष्मकालीन समय", "AWDT": "पश्चिमी अस्ट्रेलिया दिवा समय", "HNCU": "क्यूबाको मानक समय", "HAT": "न्यूफाउनल्यान्डको दिवा समय", "GYT": "गुयाना समय", "CLST": "चिली ग्रीष्मकालीन समय", "HADT": "हवाई-एलुटियन दिवा समय", "ACDT": "केन्द्रीय अस्ट्रेलिया दिवा समय"}, - } - } -  -diff --git a/ne_IN/ne_IN.go b/ne_IN/ne_IN.go -index 2a7220d..4097444 100644 ---- a/ne_IN/ne_IN.go -+++ b/ne_IN/ne_IN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ne_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ne_IN' locale - func New() locales.Translator { - return &ne_IN{ -- locale: "ne_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "जनवरी", "फेब्रुअरी", "मार्च", "अप्रिल", "मे", "जुन", "जुलाई", "अगस्ट", "सेप्टेम्बर", "अक्टोबर", "नोभेम्बर", "डिसेम्बर"}, -- monthsNarrow: []string{"", "१", "२", "३", "४", "५", "६", "७", "८", "९", "१०", "११", "१२"}, -- monthsWide: []string{"", "जनवरी", "फेब्रुअरी", "मार्च", "अप्रिल", "मई", "जुन", "जुलाई", "अगस्ट", "सेप्टेम्बर", "अक्टोबर", "नोभेम्बर", "डिसेम्बर"}, -- daysAbbreviated: []string{"आइत", "सोम", "मङ्गल", "बुध", "बिहि", "शुक्र", "शनि"}, -- daysNarrow: []string{"आ", "सो", "म", "बु", "बि", "शु", "श"}, -- daysShort: []string{"आइत", "सोम", "मङ्गल", "बुध", "बिहि", "शुक्र", "शनि"}, -- daysWide: []string{"आइतबार", "सोमबार", "मङ्गलबार", "बुधबार", "बिहिबार", "शुक्रबार", "शनिबार"}, -- periodsAbbreviated: []string{"पूर्वाह्न", "अपराह्न"}, -- periodsNarrow: []string{"पूर्वाह्न", "अपराह्न"}, -- periodsWide: []string{"पूर्वाह्न", "अपराह्न"}, -- erasAbbreviated: []string{"ईसा पूर्व", "सन्"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ईसा पूर्व", "सन्"}, -- timezones: map[string]string{"HNPMX": "मेक्सिकन प्यासिफिक मानक समय", "ADT": "एट्लान्टिक दिवा समय", "WEZ": "पश्चिमी युरोपेली मानक समय", "IST": "भारतीय मानक समय", "ACDT": "केन्द्रीय अस्ट्रेलिया दिवा समय", "HEEG": "पूर्वी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "ECT": "ईक्वोडोर समय", "MST": "MST", "HNT": "न्यूफाउनडल्यान्डको मानक समय", "ART": "अर्जेनटिनी मानक समय", "AWDT": "पश्चिमी अस्ट्रेलिया दिवा समय", "HADT": "हवाई-एलुटियन दिवा समय", "MEZ": "केन्द्रीय युरोपेली मानक समय", "BOT": "बोलिभिया समय", "ACST": "केन्द्रीय अस्ट्रेलिया मानक समय", "COST": "कोलम्बियाली ग्रीष्मकालीन समय", "HENOMX": "उत्तर पश्चिम मेक्सिकोको दिवा समय", "EST": "पूर्वी मानक समय", "ACWDT": "केन्द्रीय पश्चिमी अस्ट्रेलिया दिवा समय", "JST": "जापान मानक समय", "HECU": "क्यूबाको दिवा समय", "VET": "भेनेज्युएला समय", "PST": "प्यासिफिक मानक समय", "CLT": "चिली मानक समय", "SRT": "सुरिनामा समय", "NZST": "न्यूजिल्यान्ड मानक समय", "CHADT": "चाथाम दिवा समय", "ChST": "चामोर्रो मानक समय", "GFT": "फ्रेन्च ग्वाना समय", "EDT": "पूर्वी दिवा समय", "HEOG": "पश्चिमी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "MESZ": "केन्द्रीय युरोपेली ग्रीष्मकालीन समय", "∅∅∅": "पेरु ग्रीष्मकालीन समय", "HNCU": "क्यूबाको मानक समय", "CST": "केन्द्रीय मानक समय", "HEPM": "सेन्ट पियर्रे र मिक्युलोनको दिवा समय", "LHST": "लर्ड हावे मानक समय", "NZDT": "न्यूजिल्यान्ड दिवा समय", "TMT": "तुर्कमेनिस्तान मानक समय", "GMT": "ग्रीनविच मिन समय", "PDT": "प्यासिफिक दिवा समय", "ARST": "अर्जेनटिनी ग्रीष्मकालीन समय", "AEST": "पूर्वी अस्ट्रेलिया मानक समय", "HKT": "हङकङ मानक समय", "WART": "पश्चिमी अर्जेनटिनी मानक समय", "HEPMX": "मेक्सिकन प्यासिफिक दिवा समय", "AST": "एट्लान्टिक मानक समय", "AWST": "पश्चिमी अस्ट्रेलिया मानक समय", "AEDT": "पूर्वी अस्ट्रेलिया दिवा समय", "CHAST": "चाथाम मानक समय", "WESZ": "युरोपेली ग्रीष्मकालीन समय", "LHDT": "लर्ड हावे दिवा समय", "HNEG": "पूर्वी ग्रीनल्यान्डको मानक समय", "CAT": "केन्द्रीय अफ्रिकी समय", "WAST": "पश्चिम अफ्रिकी ग्रीष्मकालीन समय", "OEZ": "पूर्वी युरोपेली मानक समय", "WARST": "पश्चिमी अर्जेनटिनी ग्रीष्मकालीन समय", "HNOG": "पश्चिमी ग्रीनल्यान्डको मानक समय", "BT": "भुटानी समय", "JDT": "जापान दिवा समय", "AKST": "अलस्काको मानक समय", "AKDT": "अलस्काको दिवा समय", "HAST": "हवाई-एलुटियन मानक समय", "EAT": "पूर्वी अफ्रिकी समय", "WAT": "पश्चिम अफ्रिकी मानक समय", "OESZ": "पूर्वी युरोपेली ग्रीष्मकालीन समय", "GYT": "गुयाना समय", "MYT": "मलेसिया समय", "WIT": "पूर्वी इन्डोनेशिया समय", "HKST": "हङकङ ग्रीष्मकालीन समय", "WITA": "केन्द्रीय इन्डोनेशिया समय", "HNPM": "सेन्ट पियर्रे र मिक्युलोनको मानक समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन मानक समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "CDT": "केन्द्रीय दिवा समय", "WIB": "पश्चिमी इन्डोनेशिया समय", "COT": "कोलम्बियाली मानक समय", "HNNOMX": "उत्तर पश्चिम मेक्सिकोको मानक समय", "SGT": "सिंगापुर मानक समय", "MDT": "MDT", "UYT": "उरूग्वे मानक समय", "ACWST": "केन्द्रीय पश्चिमी अस्ट्रेलिया मानक समय", "HAT": "न्यूफाउनल्यान्डको दिवा समय", "SAST": "दक्षिण अफ्रिकी समय", "CLST": "चिली ग्रीष्मकालीन समय"}, -+ locale: "ne_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "ChST": "ChST", "MESZ": "MESZ", "ACDT": "ACDT", "HENOMX": "HENOMX", "EDT": "EDT", "HKST": "HKST", "ECT": "ECT", "HAST": "HAST", "GFT": "GFT", "HEOG": "HEOG", "TMT": "TMT", "CLST": "CLST", "CDT": "CDT", "HADT": "HADT", "CHADT": "CHADT", "HNPMX": "HNPMX", "WAT": "WAT", "WAST": "WAST", "AKST": "AKST", "MEZ": "MEZ", "AEST": "AEST", "AKDT": "AKDT", "OEZ": "OEZ", "SAST": "SAST", "WITA": "WITA", "HNEG": "HNEG", "HNPM": "HNPM", "AEDT": "AEDT", "WARST": "WARST", "CAT": "CAT", "CLT": "CLT", "LHST": "LHST", "VET": "VET", "HECU": "HECU", "NZDT": "NZDT", "ARST": "ARST", "BT": "BT", "UYT": "UYT", "COT": "COT", "EST": "EST", "CST": "CST", "MDT": "MDT", "NZST": "NZST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "IST": "IST", "PDT": "PDT", "HAT": "HAT", "COST": "COST", "HNOG": "HNOG", "BOT": "BOT", "UYST": "UYST", "MST": "MST", "WIB": "WIB", "AST": "AST", "ADT": "ADT", "GMT": "GMT", "JST": "JST", "PST": "PST", "ACWDT": "ACWDT", "OESZ": "OESZ", "HKT": "HKT", "EAT": "EAT", "ACST": "ACST", "HEEG": "HEEG", "MYT": "MYT", "HEPM": "HEPM", "CHAST": "CHAST", "WESZ": "WESZ", "SGT": "SGT", "WIT": "WIT", "TMST": "TMST", "AWST": "AWST", "JDT": "JDT", "ACWST": "ACWST", "HNT": "HNT", "WART": "WART", "GYT": "GYT", "SRT": "SRT", "LHDT": "LHDT", "ART": "ART", "AWDT": "AWDT", "WEZ": "WEZ", "HEPMX": "HEPMX"}, - } - } -  -@@ -142,7 +119,7 @@ func (ne *ne_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ne *ne_IN) MonthsAbbreviated() []string { -- return ne.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -152,7 +129,7 @@ func (ne *ne_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ne *ne_IN) MonthsNarrow() []string { -- return ne.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -162,7 +139,7 @@ func (ne *ne_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ne *ne_IN) MonthsWide() []string { -- return ne.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -208,73 +185,13 @@ func (ne *ne_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ne_IN' and handles both Whole and Real numbers based on 'v' - func (ne *ne_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ne.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ne.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ne_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ne *ne_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ne.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ne.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ne_IN' -@@ -282,60 +199,7 @@ func (ne *ne_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ne.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ne.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ne.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ne.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, ne.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ne.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ne_IN' -@@ -344,72 +208,7 @@ func (ne *ne_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ne.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ne.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ne.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ne.currencyNegativePrefix[j]) -- } -- -- b = append(b, ne.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ne.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ne.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ne.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ne_IN' -@@ -417,28 +216,6 @@ func (ne *ne_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -447,17 +224,6 @@ func (ne *ne_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ne.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -466,17 +232,6 @@ func (ne *ne_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ne.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -485,19 +240,6 @@ func (ne *ne_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ne.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ne.daysWide[t.Weekday()]...) -- - return string(b) - } -  -diff --git a/ne_NP/ne_NP.go b/ne_NP/ne_NP.go -index 6e3edd2..992d827 100644 ---- a/ne_NP/ne_NP.go -+++ b/ne_NP/ne_NP.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ne_NP struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ne_NP' locale - func New() locales.Translator { - return &ne_NP{ -- locale: "ne_NP", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "जनवरी", "फेब्रुअरी", "मार्च", "अप्रिल", "मे", "जुन", "जुलाई", "अगस्ट", "सेप्टेम्बर", "अक्टोबर", "नोभेम्बर", "डिसेम्बर"}, -- monthsNarrow: []string{"", "१", "२", "३", "४", "५", "६", "७", "८", "९", "१०", "११", "१२"}, -- monthsWide: []string{"", "जनवरी", "फेब्रुअरी", "मार्च", "अप्रिल", "मई", "जुन", "जुलाई", "अगस्ट", "सेप्टेम्बर", "अक्टोबर", "नोभेम्बर", "डिसेम्बर"}, -- daysAbbreviated: []string{"आइत", "सोम", "मङ्गल", "बुध", "बिहि", "शुक्र", "शनि"}, -- daysNarrow: []string{"आ", "सो", "म", "बु", "बि", "शु", "श"}, -- daysShort: []string{"आइत", "सोम", "मङ्गल", "बुध", "बिहि", "शुक्र", "शनि"}, -- daysWide: []string{"आइतबार", "सोमबार", "मङ्गलबार", "बुधबार", "बिहिबार", "शुक्रबार", "शनिबार"}, -- periodsAbbreviated: []string{"पूर्वाह्न", "अपराह्न"}, -- periodsNarrow: []string{"पूर्वाह्न", "अपराह्न"}, -- periodsWide: []string{"पूर्वाह्न", "अपराह्न"}, -- erasAbbreviated: []string{"ईसा पूर्व", "सन्"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ईसा पूर्व", "सन्"}, -- timezones: map[string]string{"LHDT": "लर्ड हावे दिवा समय", "HEPMX": "मेक्सिकन प्यासिफिक दिवा समय", "AWST": "पश्चिमी अस्ट्रेलिया मानक समय", "WART": "पश्चिमी अर्जेनटिनी मानक समय", "HNCU": "क्यूबाको मानक समय", "HECU": "क्यूबाको दिवा समय", "GMT": "ग्रीनविच मिन समय", "PST": "प्यासिफिक मानक समय", "HEPM": "सेन्ट पियर्रे र मिक्युलोनको दिवा समय", "OEZ": "पूर्वी युरोपेली मानक समय", "CAT": "केन्द्रीय अफ्रिकी समय", "MST": "MST", "ACWST": "केन्द्रीय पश्चिमी अस्ट्रेलिया मानक समय", "HNPM": "सेन्ट पियर्रे र मिक्युलोनको मानक समय", "NZST": "न्यूजिल्यान्ड मानक समय", "TMT": "तुर्कमेनिस्तान मानक समय", "EDT": "पूर्वी दिवा समय", "HEOG": "पश्चिमी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "SGT": "सिंगापुर मानक समय", "MYT": "मलेसिया समय", "WIB": "पश्चिमी इन्डोनेशिया समय", "CHADT": "चाथाम दिवा समय", "HNPMX": "मेक्सिकन प्यासिफिक मानक समय", "UYT": "उरूग्वे मानक समय", "CST": "केन्द्रीय मानक समय", "AST": "एट्लान्टिक मानक समय", "ARST": "अर्जेनटिनी ग्रीष्मकालीन समय", "MESZ": "केन्द्रीय युरोपेली ग्रीष्मकालीन समय", "CLT": "चिली मानक समय", "COT": "कोलम्बियाली मानक समय", "EST": "पूर्वी मानक समय", "HAST": "हवाई-एलुटियन मानक समय", "SRT": "सुरिनामा समय", "ART": "अर्जेनटिनी मानक समय", "PDT": "प्यासिफिक दिवा समय", "WEZ": "पश्चिमी युरोपेली मानक समय", "ACST": "केन्द्रीय अस्ट्रेलिया मानक समय", "WAT": "पश्चिम अफ्रिकी मानक समय", "ADT": "एट्लान्टिक दिवा समय", "GYT": "गुयाना समय", "IST": "भारतीय मानक समय", "GFT": "फ्रेन्च ग्वाना समय", "ChST": "चामोर्रो मानक समय", "COST": "कोलम्बियाली ग्रीष्मकालीन समय", "UYST": "उरुग्वे ग्रीष्मकालीन समय", "CLST": "चिली ग्रीष्मकालीन समय", "HNNOMX": "उत्तर पश्चिम मेक्सिकोको मानक समय", "WARST": "पश्चिमी अर्जेनटिनी ग्रीष्मकालीन समय", "LHST": "लर्ड हावे मानक समय", "EAT": "पूर्वी अफ्रिकी समय", "AKST": "अलस्काको मानक समय", "AKDT": "अलस्काको दिवा समय", "CDT": "केन्द्रीय दिवा समय", "HADT": "हवाई-एलुटियन दिवा समय", "WITA": "केन्द्रीय इन्डोनेशिया समय", "ACDT": "केन्द्रीय अस्ट्रेलिया दिवा समय", "OESZ": "पूर्वी युरोपेली ग्रीष्मकालीन समय", "AEST": "पूर्वी अस्ट्रेलिया मानक समय", "ECT": "ईक्वोडोर समय", "MDT": "MDT", "HAT": "न्यूफाउनल्यान्डको दिवा समय", "HKT": "हङकङ मानक समय", "AWDT": "पश्चिमी अस्ट्रेलिया दिवा समय", "CHAST": "चाथाम मानक समय", "HEEG": "पूर्वी ग्रीनल्यान्डको ग्रीष्मकालीन समय", "TMST": "तुर्कमेनिस्तान ग्रीष्मकालीन मानक समय", "MEZ": "केन्द्रीय युरोपेली मानक समय", "SAST": "दक्षिण अफ्रिकी समय", "HNOG": "पश्चिमी ग्रीनल्यान्डको मानक समय", "AEDT": "पूर्वी अस्ट्रेलिया दिवा समय", "WAST": "पश्चिम अफ्रिकी ग्रीष्मकालीन समय", "BT": "भुटानी समय", "BOT": "बोलिभिया समय", "HKST": "हङकङ ग्रीष्मकालीन समय", "∅∅∅": "अमेजन ग्रीष्मकालीन समय", "JST": "जापान मानक समय", "HNT": "न्यूफाउनडल्यान्डको मानक समय", "WESZ": "युरोपेली ग्रीष्मकालीन समय", "HENOMX": "उत्तर पश्चिम मेक्सिकोको दिवा समय", "WIT": "पूर्वी इन्डोनेशिया समय", "VET": "भेनेज्युएला समय", "ACWDT": "केन्द्रीय पश्चिमी अस्ट्रेलिया दिवा समय", "NZDT": "न्यूजिल्यान्ड दिवा समय", "JDT": "जापान दिवा समय", "HNEG": "पूर्वी ग्रीनल्यान्डको मानक समय"}, -+ locale: "ne_NP", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CDT": "CDT", "MDT": "MDT", "WIB": "WIB", "AWDT": "AWDT", "OESZ": "OESZ", "HKT": "HKT", "WITA": "WITA", "ACWST": "ACWST", "WESZ": "WESZ", "WAT": "WAT", "CLT": "CLT", "ARST": "ARST", "CAT": "CAT", "NZST": "NZST", "NZDT": "NZDT", "ChST": "ChST", "BOT": "BOT", "HAST": "HAST", "EST": "EST", "TMT": "TMT", "UYST": "UYST", "PDT": "PDT", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "UYT": "UYT", "PST": "PST", "ART": "ART", "CHAST": "CHAST", "AWST": "AWST", "MYT": "MYT", "WEZ": "WEZ", "WAST": "WAST", "HAT": "HAT", "COT": "COT", "SRT": "SRT", "HENOMX": "HENOMX", "HNPM": "HNPM", "HNOG": "HNOG", "HEOG": "HEOG", "HEPM": "HEPM", "CHADT": "CHADT", "GMT": "GMT", "LHST": "LHST", "ADT": "ADT", "EAT": "EAT", "HNEG": "HNEG", "HEEG": "HEEG", "AKST": "AKST", "WART": "WART", "WIT": "WIT", "IST": "IST", "BT": "BT", "AEST": "AEST", "AKDT": "AKDT", "WARST": "WARST", "ACST": "ACST", "MST": "MST", "JDT": "JDT", "HNT": "HNT", "HKST": "HKST", "MEZ": "MEZ", "MESZ": "MESZ", "GFT": "GFT", "SAST": "SAST", "ECT": "ECT", "JST": "JST", "VET": "VET", "HNCU": "HNCU", "COST": "COST", "CST": "CST", "HADT": "HADT", "ACWDT": "ACWDT", "AEDT": "AEDT", "EDT": "EDT", "CLST": "CLST", "SGT": "SGT", "HNPMX": "HNPMX", "OEZ": "OEZ", "∅∅∅": "∅∅∅", "TMST": "TMST", "ACDT": "ACDT", "HECU": "HECU", "HEPMX": "HEPMX", "GYT": "GYT", "AST": "AST"}, - } - } -  -@@ -142,7 +119,7 @@ func (ne *ne_NP) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ne *ne_NP) MonthsAbbreviated() []string { -- return ne.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -152,7 +129,7 @@ func (ne *ne_NP) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ne *ne_NP) MonthsNarrow() []string { -- return ne.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -162,7 +139,7 @@ func (ne *ne_NP) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ne *ne_NP) MonthsWide() []string { -- return ne.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -208,73 +185,13 @@ func (ne *ne_NP) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ne_NP' and handles both Whole and Real numbers based on 'v' - func (ne *ne_NP) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ne.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ne.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ne_NP' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ne *ne_NP) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ne.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ne.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ne_NP' -@@ -282,60 +199,7 @@ func (ne *ne_NP) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ne.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ne.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ne.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ne.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, ne.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ne.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ne_NP' -@@ -344,72 +208,7 @@ func (ne *ne_NP) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ne.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ne.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ne.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ne.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, ne.currencyNegativePrefix[j]) -- } -- -- b = append(b, ne.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ne.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, ne.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ne.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ne_NP' -@@ -417,28 +216,6 @@ func (ne *ne_NP) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -447,17 +224,6 @@ func (ne *ne_NP) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ne.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -466,17 +232,6 @@ func (ne *ne_NP) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ne.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -485,19 +240,6 @@ func (ne *ne_NP) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ne.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, ne.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -506,19 +248,6 @@ func (ne *ne_NP) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -527,26 +256,6 @@ func (ne *ne_NP) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -555,30 +264,6 @@ func (ne *ne_NP) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -587,34 +272,5 @@ func (ne *ne_NP) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ne.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ne.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl/nl.go b/nl/nl.go -index 59b0a5b..512257e 100644 ---- a/nl/nl.go -+++ b/nl/nl.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v.Chr.", "n.Chr."}, - erasNarrow: []string{"v.C.", "n.C."}, - erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"HENOMX": "Noordwest-Mexicaanse zomertijd", "GMT": "Greenwich Mean Time", "SRT": "Surinaamse tijd", "WART": "West-Argentijnse standaardtijd", "EDT": "Eastern-zomertijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "AEST": "Oost-Australische standaardtijd", "HKT": "Hongkongse standaardtijd", "WAST": "West-Afrikaanse zomertijd", "WEZ": "West-Europese standaardtijd", "ART": "Argentijnse standaardtijd", "MEZ": "Midden-Europese standaardtijd", "NZDT": "Nieuw-Zeelandse zomertijd", "JDT": "Japanse zomertijd", "ECT": "Ecuadoraanse tijd", "∅∅∅": "Peruaanse zomertijd", "MDT": "Macause zomertijd", "AKDT": "Alaska-zomertijd", "WESZ": "West-Europese zomertijd", "CHAST": "Chatham-standaardtijd", "WAT": "West-Afrikaanse standaardtijd", "HECU": "Cubaanse zomertijd", "CST": "Central-standaardtijd", "HADT": "Hawaii-Aleoetische zomertijd", "WIT": "Oost-Indonesische tijd", "AWST": "West-Australische standaardtijd", "LHDT": "Lord Howe-eilandse zomertijd", "IST": "Indiase tijd", "CAT": "Centraal-Afrikaanse tijd", "WARST": "West-Argentijnse zomertijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "PDT": "Pacific-zomertijd", "HEOG": "West-Groenlandse zomertijd", "NZST": "Nieuw-Zeelandse standaardtijd", "ChST": "Chamorro-tijd", "EST": "Eastern-standaardtijd", "ARST": "Argentijnse zomertijd", "MESZ": "Midden-Europese zomertijd", "HNEG": "Oost-Groenlandse standaardtijd", "TMT": "Turkmeense standaardtijd", "TMST": "Turkmeense zomertijd", "COT": "Colombiaanse standaardtijd", "ADT": "Atlantic-zomertijd", "PST": "Pacific-standaardtijd", "WITA": "Centraal-Indonesische tijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "JST": "Japanse standaardtijd", "COST": "Colombiaanse zomertijd", "AKST": "Alaska-standaardtijd", "AWDT": "West-Australische zomertijd", "CHADT": "Chatham-zomertijd", "ACST": "Midden-Australische standaardtijd", "OESZ": "Oost-Europese zomertijd", "LHST": "Lord Howe-eilandse standaardtijd", "GFT": "Frans-Guyaanse tijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "MYT": "Maleisische tijd", "UYT": "Uruguayaanse standaardtijd", "HAST": "Hawaii-Aleoetische standaardtijd", "VET": "Venezolaanse tijd", "BT": "Bhutaanse tijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "OEZ": "Oost-Europese standaardtijd", "WIB": "West-Indonesische tijd", "ACWDT": "Midden-Australische westelijke zomertijd", "HNOG": "West-Groenlandse standaardtijd", "ACWST": "Midden-Australische westelijke standaardtijd", "HNT": "Newfoundland-standaardtijd", "CLT": "Chileense standaardtijd", "BOT": "Boliviaanse tijd", "HNCU": "Cubaanse standaardtijd", "MST": "Macause standaardtijd", "CDT": "Central-zomertijd", "AST": "Atlantic-standaardtijd", "HAT": "Newfoundland-zomertijd", "AEDT": "Oost-Australische zomertijd", "HKST": "Hongkongse zomertijd", "HEEG": "Oost-Groenlandse zomertijd", "ACDT": "Midden-Australische zomertijd", "EAT": "Oost-Afrikaanse tijd", "SGT": "Singaporese standaardtijd", "CLST": "Chileense zomertijd", "GYT": "Guyaanse tijd", "UYST": "Uruguayaanse zomertijd", "SAST": "Zuid-Afrikaanse tijd"}, -+ timezones: map[string]string{"VET": "Venezolaanse tijd", "WARST": "West-Argentijnse zomertijd", "CDT": "Central-zomertijd", "HAST": "Hawaii-Aleoetische standaardtijd", "UYST": "Uruguayaanse zomertijd", "AEST": "Oost-Australische standaardtijd", "HNCU": "Cubaanse standaardtijd", "HEOG": "West-Groenlandse zomertijd", "ADT": "Atlantic-zomertijd", "HNEG": "Oost-Groenlandse standaardtijd", "∅∅∅": "Acre-zomertijd", "AEDT": "Oost-Australische zomertijd", "AKDT": "Alaska-zomertijd", "COST": "Colombiaanse zomertijd", "LHST": "Lord Howe-eilandse standaardtijd", "JDT": "Japanse zomertijd", "PST": "Pacific-standaardtijd", "OEZ": "Oost-Europese standaardtijd", "TMT": "Turkmeense standaardtijd", "CAT": "Centraal-Afrikaanse tijd", "AWDT": "West-Australische zomertijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "WESZ": "West-Europese zomertijd", "LHDT": "Lord Howe-eilandse zomertijd", "MYT": "Maleisische tijd", "UYT": "Uruguayaanse standaardtijd", "AKST": "Alaska-standaardtijd", "HAT": "Newfoundland-zomertijd", "NZDT": "Nieuw-Zeelandse zomertijd", "ACST": "Midden-Australische standaardtijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "HNOG": "West-Groenlandse standaardtijd", "HKT": "Hongkongse standaardtijd", "MST": "Macause standaardtijd", "SRT": "Surinaamse tijd", "MEZ": "Midden-Europese standaardtijd", "WAST": "West-Afrikaanse zomertijd", "GYT": "Guyaanse tijd", "IST": "Indiase tijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "ChST": "Chamorro-tijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "CHAST": "Chatham-standaardtijd", "GFT": "Frans-Guyaanse tijd", "WART": "West-Argentijnse standaardtijd", "WIT": "Oost-Indonesische tijd", "COT": "Colombiaanse standaardtijd", "ECT": "Ecuadoraanse tijd", "MESZ": "Midden-Europese zomertijd", "HECU": "Cubaanse zomertijd", "HNT": "Newfoundland-standaardtijd", "ACDT": "Midden-Australische zomertijd", "PDT": "Pacific-zomertijd", "OESZ": "Oost-Europese zomertijd", "NZST": "Nieuw-Zeelandse standaardtijd", "ARST": "Argentijnse zomertijd", "CLT": "Chileense standaardtijd", "CLST": "Chileense zomertijd", "CHADT": "Chatham-zomertijd", "BT": "Bhutaanse tijd", "TMST": "Turkmeense zomertijd", "HADT": "Hawaii-Aleoetische zomertijd", "ACWST": "Midden-Australische westelijke standaardtijd", "HKST": "Hongkongse zomertijd", "GMT": "Greenwich Mean Time", "AWST": "West-Australische standaardtijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "ACWDT": "Midden-Australische westelijke zomertijd", "SAST": "Zuid-Afrikaanse tijd", "CST": "Central-standaardtijd", "MDT": "Macause zomertijd", "WIB": "West-Indonesische tijd", "EST": "Eastern-standaardtijd", "EDT": "Eastern-zomertijd", "JST": "Japanse standaardtijd", "WEZ": "West-Europese standaardtijd", "WAT": "West-Afrikaanse standaardtijd", "AST": "Atlantic-standaardtijd", "BOT": "Boliviaanse tijd", "HEEG": "Oost-Groenlandse zomertijd", "SGT": "Singaporese standaardtijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "WITA": "Centraal-Indonesische tijd", "ART": "Argentijnse standaardtijd", "EAT": "Oost-Afrikaanse tijd"}, - } - } -  -diff --git a/nl_AW/nl_AW.go b/nl_AW/nl_AW.go -index dfd7466..ac4e348 100644 ---- a/nl_AW/nl_AW.go -+++ b/nl_AW/nl_AW.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nl_AW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nl_AW' locale - func New() locales.Translator { - return &nl_AW{ -- locale: "nl_AW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "Afl.", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"AWDT": "West-Australische zomertijd", "MESZ": "Midden-Europese zomertijd", "BOT": "Boliviaanse tijd", "SGT": "Singaporese standaardtijd", "EST": "Eastern-standaardtijd", "CST": "Central-standaardtijd", "HEOG": "West-Groenlandse zomertijd", "ACST": "Midden-Australische standaardtijd", "OEZ": "Oost-Europese standaardtijd", "AKDT": "Alaska-zomertijd", "ADT": "Atlantic-zomertijd", "GYT": "Guyaanse tijd", "WIB": "West-Indonesische tijd", "PST": "Pacific-standaardtijd", "PDT": "Pacific-zomertijd", "AEST": "Oost-Australische standaardtijd", "JDT": "Japanse zomertijd", "ChST": "Chamorro-tijd", "GFT": "Frans-Guyaanse tijd", "TMST": "Turkmeense zomertijd", "CDT": "Central-zomertijd", "ART": "Argentijnse standaardtijd", "HKT": "Hongkongse standaardtijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "CLT": "Chileense standaardtijd", "ECT": "Ecuadoraanse tijd", "COT": "Colombiaanse standaardtijd", "HAST": "Hawaii-Aleoetische standaardtijd", "WEZ": "West-Europese standaardtijd", "HECU": "Cubaanse zomertijd", "EDT": "Eastern-zomertijd", "ACWDT": "Midden-Australische westelijke zomertijd", "ARST": "Argentijnse zomertijd", "CLST": "Chileense zomertijd", "SRT": "Surinaamse tijd", "AEDT": "Oost-Australische zomertijd", "∅∅∅": "Amazone-zomertijd", "WAT": "West-Afrikaanse standaardtijd", "OESZ": "Oost-Europese zomertijd", "GMT": "Greenwich Mean Time", "WART": "West-Argentijnse standaardtijd", "HAT": "Newfoundland-zomertijd", "IST": "Indiase tijd", "HEEG": "Oost-Groenlandse zomertijd", "ACDT": "Midden-Australische zomertijd", "MDT": "Macause zomertijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "WESZ": "West-Europese zomertijd", "HKST": "Hongkongse zomertijd", "LHDT": "Lord Howe-eilandse zomertijd", "MST": "Macause standaardtijd", "MYT": "Maleisische tijd", "HNOG": "West-Groenlandse standaardtijd", "CHADT": "Chatham-zomertijd", "BT": "Bhutaanse tijd", "CHAST": "Chatham-standaardtijd", "HNEG": "Oost-Groenlandse standaardtijd", "COST": "Colombiaanse zomertijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "HNCU": "Cubaanse standaardtijd", "UYT": "Uruguayaanse standaardtijd", "ACWST": "Midden-Australische westelijke standaardtijd", "MEZ": "Midden-Europese standaardtijd", "LHST": "Lord Howe-eilandse standaardtijd", "WAST": "West-Afrikaanse zomertijd", "WARST": "West-Argentijnse zomertijd", "HADT": "Hawaii-Aleoetische zomertijd", "AWST": "West-Australische standaardtijd", "TMT": "Turkmeense standaardtijd", "CAT": "Centraal-Afrikaanse tijd", "EAT": "Oost-Afrikaanse tijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "UYST": "Uruguayaanse zomertijd", "VET": "Venezolaanse tijd", "HNT": "Newfoundland-standaardtijd", "NZST": "Nieuw-Zeelandse standaardtijd", "NZDT": "Nieuw-Zeelandse zomertijd", "SAST": "Zuid-Afrikaanse tijd", "AKST": "Alaska-standaardtijd", "WITA": "Centraal-Indonesische tijd", "JST": "Japanse standaardtijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "AST": "Atlantic-standaardtijd", "WIT": "Oost-Indonesische tijd"}, -+ locale: "nl_AW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "Afl.", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "HEOG": "HEOG", "CDT": "CDT", "NZST": "NZST", "AST": "AST", "HENOMX": "HENOMX", "HNPM": "HNPM", "ACWST": "ACWST", "WESZ": "WESZ", "WAT": "WAT", "GYT": "GYT", "HNOG": "HNOG", "EAT": "EAT", "HEPM": "HEPM", "CHADT": "CHADT", "WIT": "WIT", "EDT": "EDT", "AKST": "AKST", "HAT": "HAT", "ChST": "ChST", "ART": "ART", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "GFT": "GFT", "COST": "COST", "LHST": "LHST", "JST": "JST", "HNCU": "HNCU", "GMT": "GMT", "MYT": "MYT", "ACWDT": "ACWDT", "VET": "VET", "TMST": "TMST", "MDT": "MDT", "BT": "BT", "UYT": "UYT", "HKT": "HKT", "HKST": "HKST", "ADT": "ADT", "MESZ": "MESZ", "ACST": "ACST", "IST": "IST", "CAT": "CAT", "HADT": "HADT", "WAST": "WAST", "ARST": "ARST", "HNEG": "HNEG", "LHDT": "LHDT", "PST": "PST", "UYST": "UYST", "TMT": "TMT", "MEZ": "MEZ", "ACDT": "ACDT", "AWST": "AWST", "JDT": "JDT", "AKDT": "AKDT", "HNT": "HNT", "WARST": "WARST", "WIB": "WIB", "BOT": "BOT", "PDT": "PDT", "SGT": "SGT", "OEZ": "OEZ", "SAST": "SAST", "CLT": "CLT", "HAST": "HAST", "AEDT": "AEDT", "CHAST": "CHAST", "WEZ": "WEZ", "HECU": "HECU", "EST": "EST", "SRT": "SRT", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "CLST": "CLST", "WITA": "WITA", "NZDT": "NZDT", "ECT": "ECT", "AEST": "AEST", "OESZ": "OESZ", "WART": "WART", "COT": "COT", "CST": "CST", "MST": "MST"}, - } - } -  -@@ -138,7 +113,7 @@ func (nl *nl_AW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_AW) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (nl *nl_AW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_AW) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (nl *nl_AW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_AW) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (nl *nl_AW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_AW' and handles both Whole and Real numbers based on 'v' - func (nl *nl_AW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_AW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_AW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_AW' -@@ -280,56 +193,7 @@ func (nl *nl_AW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nl_AW' -@@ -338,63 +202,7 @@ func (nl *nl_AW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nl_AW' -@@ -402,27 +210,6 @@ func (nl *nl_AW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,17 +218,6 @@ func (nl *nl_AW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,17 +226,6 @@ func (nl *nl_AW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +234,6 @@ func (nl *nl_AW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -490,19 +242,6 @@ func (nl *nl_AW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -511,26 +250,6 @@ func (nl *nl_AW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -539,30 +258,6 @@ func (nl *nl_AW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,34 +266,5 @@ func (nl *nl_AW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl_BE/nl_BE.go b/nl_BE/nl_BE.go -index edb940a..45b153e 100644 ---- a/nl_BE/nl_BE.go -+++ b/nl_BE/nl_BE.go -@@ -18,7 +18,6 @@ type nl_BE struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -49,31 +48,11 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", - currencyPositiveSuffix: " ", - currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"EST": "Eastern-standaardtijd", "CDT": "Central-zomertijd", "WESZ": "West-Europese zomertijd", "AWDT": "West-Australische zomertijd", "CAT": "Centraal-Afrikaanse tijd", "HECU": "Cubaanse zomertijd", "BT": "Bhutaanse tijd", "HEOG": "West-Groenlandse zomertijd", "HAT": "Newfoundland-zomertijd", "HNCU": "Cubaanse standaardtijd", "AKST": "Alaska-standaardtijd", "TMT": "Turkmeense standaardtijd", "WART": "West-Argentijnse standaardtijd", "SGT": "Singaporese standaardtijd", "GYT": "Guyaanse tijd", "ACWDT": "Midden-Australische westelijke zomertijd", "NZST": "Nieuw-Zeelandse standaardtijd", "JDT": "Japanse zomertijd", "BOT": "Boliviaanse tijd", "WAT": "West-Afrikaanse standaardtijd", "ECT": "Ecuadoraanse tijd", "UYT": "Uruguayaanse standaardtijd", "AST": "Atlantic-standaardtijd", "ACWST": "Midden-Australische westelijke standaardtijd", "HKT": "Hongkongse standaardtijd", "CLT": "Chileense standaardtijd", "GFT": "Frans-Guyaanse tijd", "HKST": "Hongkongse zomertijd", "WITA": "Centraal-Indonesische tijd", "ADT": "Atlantic-zomertijd", "HAST": "Hawaii-Aleoetische standaardtijd", "HNOG": "West-Groenlandse standaardtijd", "NZDT": "Nieuw-Zeelandse zomertijd", "TMST": "Turkmeense zomertijd", "EAT": "Oost-Afrikaanse tijd", "UYST": "Uruguayaanse zomertijd", "MEZ": "Midden-Europese standaardtijd", "∅∅∅": "Amazone-zomertijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "AEST": "Oost-Australische standaardtijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "EDT": "Eastern-zomertijd", "MST": "Macause standaardtijd", "MDT": "Macause zomertijd", "PST": "Pacific-standaardtijd", "AWST": "West-Australische standaardtijd", "MESZ": "Midden-Europese zomertijd", "SAST": "Zuid-Afrikaanse tijd", "JST": "Japanse standaardtijd", "OESZ": "Oost-Europese zomertijd", "CST": "Central-standaardtijd", "WIT": "Oost-Indonesische tijd", "WEZ": "West-Europese standaardtijd", "ACST": "Midden-Australische standaardtijd", "ACDT": "Midden-Australische zomertijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "CHADT": "Chatham-zomertijd", "IST": "Indiase tijd", "HNEG": "Oost-Groenlandse standaardtijd", "ART": "Argentijnse standaardtijd", "MYT": "Maleisische tijd", "HNT": "Newfoundland-standaardtijd", "SRT": "Surinaamse tijd", "ARST": "Argentijnse zomertijd", "COST": "Colombiaanse zomertijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "GMT": "Greenwich Mean Time", "HADT": "Hawaii-Aleoetische zomertijd", "CLST": "Chileense zomertijd", "OEZ": "Oost-Europese standaardtijd", "WAST": "West-Afrikaanse zomertijd", "AEDT": "Oost-Australische zomertijd", "PDT": "Pacific-zomertijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "LHST": "Lord Howe-eilandse standaardtijd", "LHDT": "Lord Howe-eilandse zomertijd", "CHAST": "Chatham-standaardtijd", "HEEG": "Oost-Groenlandse zomertijd", "COT": "Colombiaanse standaardtijd", "AKDT": "Alaska-zomertijd", "WIB": "West-Indonesische tijd", "VET": "Venezolaanse tijd", "ChST": "Chamorro-tijd", "WARST": "West-Argentijnse zomertijd"}, -+ timezones: map[string]string{"ACWST": "ACWST", "UYST": "UYST", "∅∅∅": "∅∅∅", "CDT": "CDT", "HADT": "HADT", "VET": "VET", "AKDT": "AKDT", "WARST": "WARST", "CAT": "CAT", "HNPM": "HNPM", "AWDT": "AWDT", "PST": "PST", "WART": "WART", "HNOG": "HNOG", "MYT": "MYT", "CHAST": "CHAST", "ADT": "ADT", "PDT": "PDT", "WESZ": "WESZ", "COT": "COT", "MST": "MST", "MDT": "MDT", "ChST": "ChST", "AEST": "AEST", "AEDT": "AEDT", "NZDT": "NZDT", "SRT": "SRT", "JST": "JST", "HEEG": "HEEG", "HNCU": "HNCU", "HEPMX": "HEPMX", "OESZ": "OESZ", "GYT": "GYT", "WIB": "WIB", "ARST": "ARST", "ACWDT": "ACWDT", "EAT": "EAT", "HENOMX": "HENOMX", "HECU": "HECU", "WEZ": "WEZ", "HAT": "HAT", "EDT": "EDT", "TMT": "TMT", "AST": "AST", "AWST": "AWST", "LHST": "LHST", "HEOG": "HEOG", "TMST": "TMST", "WITA": "WITA", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "HNEG": "HNEG", "CHADT": "CHADT", "WAST": "WAST", "AKST": "AKST", "JDT": "JDT", "LHDT": "LHDT", "GFT": "GFT", "WIT": "WIT", "COST": "COST", "EST": "EST", "MEZ": "MEZ", "ACDT": "ACDT", "BOT": "BOT", "ACST": "ACST", "IST": "IST", "HNPMX": "HNPMX", "HNT": "HNT", "CLST": "CLST", "CST": "CST", "GMT": "GMT", "HEPM": "HEPM", "UYT": "UYT", "BT": "BT", "HKST": "HKST", "CLT": "CLT", "NZST": "NZST", "HAST": "HAST", "SGT": "SGT", "SAST": "SAST", "HKT": "HKT", "ART": "ART", "WAT": "WAT", "OEZ": "OEZ", "ECT": "ECT"}, - } - } -  -@@ -138,7 +117,7 @@ func (nl *nl_BE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_BE) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +127,7 @@ func (nl *nl_BE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_BE) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +137,7 @@ func (nl *nl_BE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_BE) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +183,13 @@ func (nl *nl_BE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_BE' and handles both Whole and Real numbers based on 'v' - func (nl *nl_BE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_BE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_BE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_BE' -@@ -280,7 +197,7 @@ func (nl *nl_BE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -338,7 +255,7 @@ func (nl *nl_BE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -427,17 +344,6 @@ func (nl *nl_BE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -446,17 +352,6 @@ func (nl *nl_BE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,19 +360,6 @@ func (nl *nl_BE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -486,19 +368,6 @@ func (nl *nl_BE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -507,26 +376,6 @@ func (nl *nl_BE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -535,30 +384,6 @@ func (nl *nl_BE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -567,34 +392,5 @@ func (nl *nl_BE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl_BQ/nl_BQ.go b/nl_BQ/nl_BQ.go -index 279027c..0a87e1c 100644 ---- a/nl_BQ/nl_BQ.go -+++ b/nl_BQ/nl_BQ.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nl_BQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nl_BQ' locale - func New() locales.Translator { - return &nl_BQ{ -- locale: "nl_BQ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"UYT": "Uruguayaanse standaardtijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "SAST": "Zuid-Afrikaanse tijd", "IST": "Indiase tijd", "CLST": "Chileense zomertijd", "COST": "Colombiaanse zomertijd", "ADT": "Atlantic-zomertijd", "WEZ": "West-Europese standaardtijd", "ACST": "Midden-Australische standaardtijd", "CAT": "Centraal-Afrikaanse tijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "WESZ": "West-Europese zomertijd", "AEDT": "Oost-Australische zomertijd", "HKT": "Hongkongse standaardtijd", "HEEG": "Oost-Groenlandse zomertijd", "VET": "Venezolaanse tijd", "EST": "Eastern-standaardtijd", "AST": "Atlantic-standaardtijd", "GYT": "Guyaanse tijd", "ACWST": "Midden-Australische westelijke standaardtijd", "WAT": "West-Afrikaanse standaardtijd", "COT": "Colombiaanse standaardtijd", "AKDT": "Alaska-zomertijd", "WIB": "West-Indonesische tijd", "CHAST": "Chatham-standaardtijd", "CHADT": "Chatham-zomertijd", "JDT": "Japanse zomertijd", "CLT": "Chileense standaardtijd", "ChST": "Chamorro-tijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "HECU": "Cubaanse zomertijd", "EDT": "Eastern-zomertijd", "MYT": "Maleisische tijd", "UYST": "Uruguayaanse zomertijd", "WIT": "Oost-Indonesische tijd", "GFT": "Frans-Guyaanse tijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "HNCU": "Cubaanse standaardtijd", "HNT": "Newfoundland-standaardtijd", "NZST": "Nieuw-Zeelandse standaardtijd", "SGT": "Singaporese standaardtijd", "HAST": "Hawaii-Aleoetische standaardtijd", "HADT": "Hawaii-Aleoetische zomertijd", "ARST": "Argentijnse zomertijd", "AEST": "Oost-Australische standaardtijd", "WART": "West-Argentijnse standaardtijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "CDT": "Central-zomertijd", "SRT": "Surinaamse tijd", "HAT": "Newfoundland-zomertijd", "HKST": "Hongkongse zomertijd", "ACDT": "Midden-Australische zomertijd", "ECT": "Ecuadoraanse tijd", "MDT": "Macause zomertijd", "HEOG": "West-Groenlandse zomertijd", "PDT": "Pacific-zomertijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "TMT": "Turkmeense standaardtijd", "OEZ": "Oost-Europese standaardtijd", "GMT": "Greenwich Mean Time", "AKST": "Alaska-standaardtijd", "AWDT": "West-Australische zomertijd", "LHDT": "Lord Howe-eilandse zomertijd", "NZDT": "Nieuw-Zeelandse zomertijd", "OESZ": "Oost-Europese zomertijd", "∅∅∅": "Azoren-zomertijd", "WITA": "Centraal-Indonesische tijd", "MESZ": "Midden-Europese zomertijd", "JST": "Japanse standaardtijd", "TMST": "Turkmeense zomertijd", "BOT": "Boliviaanse tijd", "HNOG": "West-Groenlandse standaardtijd", "BT": "Bhutaanse tijd", "ACWDT": "Midden-Australische westelijke zomertijd", "MEZ": "Midden-Europese standaardtijd", "HNEG": "Oost-Groenlandse standaardtijd", "EAT": "Oost-Afrikaanse tijd", "WAST": "West-Afrikaanse zomertijd", "MST": "Macause standaardtijd", "CST": "Central-standaardtijd", "ART": "Argentijnse standaardtijd", "PST": "Pacific-standaardtijd", "AWST": "West-Australische standaardtijd", "LHST": "Lord Howe-eilandse standaardtijd", "WARST": "West-Argentijnse zomertijd"}, -+ locale: "nl_BQ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "MDT": "MDT", "JST": "JST", "CHADT": "CHADT", "OEZ": "OEZ", "WART": "WART", "COST": "COST", "HKT": "HKT", "PDT": "PDT", "AWDT": "AWDT", "UYST": "UYST", "GFT": "GFT", "ECT": "ECT", "AST": "AST", "AWST": "AWST", "NZDT": "NZDT", "EAT": "EAT", "MESZ": "MESZ", "WESZ": "WESZ", "HNT": "HNT", "SAST": "SAST", "CLT": "CLT", "SGT": "SGT", "GYT": "GYT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "HEOG": "HEOG", "CST": "CST", "HEEG": "HEEG", "OESZ": "OESZ", "COT": "COT", "MEZ": "MEZ", "HNEG": "HNEG", "ACWST": "ACWST", "VET": "VET", "WIB": "WIB", "SRT": "SRT", "MYT": "MYT", "BT": "BT", "WEZ": "WEZ", "WAT": "WAT", "CHAST": "CHAST", "UYT": "UYT", "LHST": "LHST", "HEPM": "HEPM", "IST": "IST", "ADT": "ADT", "ACST": "ACST", "PST": "PST", "WAST": "WAST", "HNOG": "HNOG", "CDT": "CDT", "MST": "MST", "HECU": "HECU", "EDT": "EDT", "CAT": "CAT", "AEDT": "AEDT", "ACDT": "ACDT", "HNPM": "HNPM", "HNCU": "HNCU", "WIT": "WIT", "CLST": "CLST", "ChST": "ChST", "HNPMX": "HNPMX", "AKST": "AKST", "GMT": "GMT", "HADT": "HADT", "HENOMX": "HENOMX", "JDT": "JDT", "HAT": "HAT", "WARST": "WARST", "NZST": "NZST", "ARST": "ARST", "AKDT": "AKDT", "BOT": "BOT", "AEST": "AEST", "TMST": "TMST", "ART": "ART", "HAST": "HAST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "EST": "EST", "HKST": "HKST", "TMT": "TMT"}, - } - } -  -@@ -138,7 +113,7 @@ func (nl *nl_BQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_BQ) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (nl *nl_BQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_BQ) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (nl *nl_BQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_BQ) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (nl *nl_BQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_BQ' and handles both Whole and Real numbers based on 'v' - func (nl *nl_BQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_BQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_BQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_BQ' -@@ -280,56 +193,7 @@ func (nl *nl_BQ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nl_BQ' -@@ -338,63 +202,7 @@ func (nl *nl_BQ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nl_BQ' -@@ -402,27 +210,6 @@ func (nl *nl_BQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,17 +218,6 @@ func (nl *nl_BQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,17 +226,6 @@ func (nl *nl_BQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +234,6 @@ func (nl *nl_BQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -490,19 +242,6 @@ func (nl *nl_BQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -511,26 +250,6 @@ func (nl *nl_BQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -539,30 +258,6 @@ func (nl *nl_BQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,34 +266,5 @@ func (nl *nl_BQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl_CW/nl_CW.go b/nl_CW/nl_CW.go -index e324f53..5aa7e8d 100644 ---- a/nl_CW/nl_CW.go -+++ b/nl_CW/nl_CW.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nl_CW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nl_CW' locale - func New() locales.Translator { - return &nl_CW{ -- locale: "nl_CW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "NAf.", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"MEZ": "Midden-Europese standaardtijd", "CLT": "Chileense standaardtijd", "CLST": "Chileense zomertijd", "ChST": "Chamorro-tijd", "EST": "Eastern-standaardtijd", "EDT": "Eastern-zomertijd", "HNOG": "West-Groenlandse standaardtijd", "ACDT": "Midden-Australische zomertijd", "COT": "Colombiaanse standaardtijd", "HEOG": "West-Groenlandse zomertijd", "ACST": "Midden-Australische standaardtijd", "AKDT": "Alaska-zomertijd", "WIB": "West-Indonesische tijd", "OEZ": "Oost-Europese standaardtijd", "SGT": "Singaporese standaardtijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "UYT": "Uruguayaanse standaardtijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "HADT": "Hawaii-Aleoetische zomertijd", "ARST": "Argentijnse zomertijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "HNCU": "Cubaanse standaardtijd", "UYST": "Uruguayaanse zomertijd", "OESZ": "Oost-Europese zomertijd", "WIT": "Oost-Indonesische tijd", "AEST": "Oost-Australische standaardtijd", "AWDT": "West-Australische zomertijd", "LHST": "Lord Howe-eilandse standaardtijd", "JST": "Japanse standaardtijd", "TMT": "Turkmeense standaardtijd", "WAST": "West-Afrikaanse zomertijd", "MST": "Macause standaardtijd", "MYT": "Maleisische tijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "IST": "Indiase tijd", "TMST": "Turkmeense zomertijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "WESZ": "West-Europese zomertijd", "WITA": "Centraal-Indonesische tijd", "HEEG": "Oost-Groenlandse zomertijd", "GFT": "Frans-Guyaanse tijd", "HNT": "Newfoundland-standaardtijd", "AWST": "West-Australische standaardtijd", "LHDT": "Lord Howe-eilandse zomertijd", "NZST": "Nieuw-Zeelandse standaardtijd", "SAST": "Zuid-Afrikaanse tijd", "CAT": "Centraal-Afrikaanse tijd", "HECU": "Cubaanse zomertijd", "SRT": "Surinaamse tijd", "BOT": "Boliviaanse tijd", "CDT": "Central-zomertijd", "PST": "Pacific-standaardtijd", "CHAST": "Chatham-standaardtijd", "CHADT": "Chatham-zomertijd", "∅∅∅": "Peruaanse zomertijd", "EAT": "Oost-Afrikaanse tijd", "MDT": "Macause zomertijd", "GYT": "Guyaanse tijd", "HAST": "Hawaii-Aleoetische standaardtijd", "ART": "Argentijnse standaardtijd", "HKT": "Hongkongse standaardtijd", "WART": "West-Argentijnse standaardtijd", "COST": "Colombiaanse zomertijd", "AST": "Atlantic-standaardtijd", "AEDT": "Oost-Australische zomertijd", "NZDT": "Nieuw-Zeelandse zomertijd", "JDT": "Japanse zomertijd", "AKST": "Alaska-standaardtijd", "ACWDT": "Midden-Australische westelijke zomertijd", "HAT": "Newfoundland-zomertijd", "PDT": "Pacific-zomertijd", "ACWST": "Midden-Australische westelijke standaardtijd", "MESZ": "Midden-Europese zomertijd", "HNEG": "Oost-Groenlandse standaardtijd", "GMT": "Greenwich Mean Time", "ADT": "Atlantic-zomertijd", "BT": "Bhutaanse tijd", "WEZ": "West-Europese standaardtijd", "WAT": "West-Afrikaanse standaardtijd", "WARST": "West-Argentijnse zomertijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "HKST": "Hongkongse zomertijd", "ECT": "Ecuadoraanse tijd", "CST": "Central-standaardtijd", "VET": "Venezolaanse tijd"}, -+ locale: "nl_CW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "NAf.", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SGT": "SGT", "AKST": "AKST", "OEZ": "OEZ", "HAT": "HAT", "ECT": "ECT", "HEPM": "HEPM", "AEST": "AEST", "HNT": "HNT", "TMST": "TMST", "WIB": "WIB", "HEEG": "HEEG", "HADT": "HADT", "∅∅∅": "∅∅∅", "PDT": "PDT", "CHADT": "CHADT", "WIT": "WIT", "GYT": "GYT", "TMT": "TMT", "SRT": "SRT", "ARST": "ARST", "LHST": "LHST", "MYT": "MYT", "HNPM": "HNPM", "PST": "PST", "HNCU": "HNCU", "WITA": "WITA", "GMT": "GMT", "HECU": "HECU", "EDT": "EDT", "AST": "AST", "EAT": "EAT", "SAST": "SAST", "AWST": "AWST", "JST": "JST", "IST": "IST", "ACWST": "ACWST", "WESZ": "WESZ", "GFT": "GFT", "WART": "WART", "HEOG": "HEOG", "CAT": "CAT", "BT": "BT", "AEDT": "AEDT", "UYT": "UYT", "WEZ": "WEZ", "CLST": "CLST", "NZDT": "NZDT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "EST": "EST", "ADT": "ADT", "ART": "ART", "COST": "COST", "MESZ": "MESZ", "HNEG": "HNEG", "AWDT": "AWDT", "VET": "VET", "HKST": "HKST", "HNNOMX": "HNNOMX", "WAST": "WAST", "OESZ": "OESZ", "WARST": "WARST", "ACWDT": "ACWDT", "CHAST": "CHAST", "UYST": "UYST", "WAT": "WAT", "MDT": "MDT", "NZST": "NZST", "ChST": "ChST", "ACDT": "ACDT", "AKDT": "AKDT", "COT": "COT", "CST": "CST", "BOT": "BOT", "ACST": "ACST", "LHDT": "LHDT", "JDT": "JDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "HAST": "HAST", "MEZ": "MEZ", "HKT": "HKT", "CLT": "CLT", "CDT": "CDT", "MST": "MST"}, - } - } -  -@@ -138,7 +113,7 @@ func (nl *nl_CW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_CW) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (nl *nl_CW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_CW) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (nl *nl_CW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_CW) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (nl *nl_CW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_CW' and handles both Whole and Real numbers based on 'v' - func (nl *nl_CW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_CW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_CW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_CW' -@@ -280,56 +193,7 @@ func (nl *nl_CW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nl_CW' -@@ -338,63 +202,7 @@ func (nl *nl_CW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nl_CW' -@@ -402,27 +210,6 @@ func (nl *nl_CW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,17 +218,6 @@ func (nl *nl_CW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,17 +226,6 @@ func (nl *nl_CW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +234,6 @@ func (nl *nl_CW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -490,19 +242,6 @@ func (nl *nl_CW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -511,26 +250,6 @@ func (nl *nl_CW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -539,30 +258,6 @@ func (nl *nl_CW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,34 +266,5 @@ func (nl *nl_CW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl_NL/nl_NL.go b/nl_NL/nl_NL.go -index afd9546..b2748ee 100644 ---- a/nl_NL/nl_NL.go -+++ b/nl_NL/nl_NL.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nl_NL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nl_NL' locale - func New() locales.Translator { - return &nl_NL{ -- locale: "nl_NL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"HAST": "Hawaii-Aleoetische standaardtijd", "ACWDT": "Midden-Australische westelijke zomertijd", "HNT": "Newfoundland-standaardtijd", "AWST": "West-Australische standaardtijd", "BOT": "Boliviaanse tijd", "TMST": "Turkmeense zomertijd", "ECT": "Ecuadoraanse tijd", "HECU": "Cubaanse zomertijd", "GFT": "Frans-Guyaanse tijd", "HNOG": "West-Groenlandse standaardtijd", "HKST": "Hongkongse zomertijd", "LHST": "Lord Howe-eilandse standaardtijd", "WITA": "Centraal-Indonesische tijd", "WAT": "West-Afrikaanse standaardtijd", "WARST": "West-Argentijnse zomertijd", "EDT": "Eastern-zomertijd", "AWDT": "West-Australische zomertijd", "VET": "Venezolaanse tijd", "CHAST": "Chatham-standaardtijd", "CLT": "Chileense standaardtijd", "WART": "West-Argentijnse standaardtijd", "MDT": "Macause zomertijd", "WIB": "West-Indonesische tijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "AKDT": "Alaska-zomertijd", "HADT": "Hawaii-Aleoetische zomertijd", "IST": "Indiase tijd", "HNEG": "Oost-Groenlandse standaardtijd", "ACST": "Midden-Australische standaardtijd", "WAST": "West-Afrikaanse zomertijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "JDT": "Japanse zomertijd", "HNCU": "Cubaanse standaardtijd", "ART": "Argentijnse standaardtijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "MEZ": "Midden-Europese standaardtijd", "AST": "Atlantic-standaardtijd", "BT": "Bhutaanse tijd", "PST": "Pacific-standaardtijd", "HAT": "Newfoundland-zomertijd", "CST": "Central-standaardtijd", "ARST": "Argentijnse zomertijd", "CHADT": "Chatham-zomertijd", "JST": "Japanse standaardtijd", "OESZ": "Oost-Europese zomertijd", "MST": "Macause standaardtijd", "UYT": "Uruguayaanse standaardtijd", "TMT": "Turkmeense standaardtijd", "ACDT": "Midden-Australische zomertijd", "AEST": "Oost-Australische standaardtijd", "LHDT": "Lord Howe-eilandse zomertijd", "CAT": "Centraal-Afrikaanse tijd", "EST": "Eastern-standaardtijd", "ACWST": "Midden-Australische westelijke standaardtijd", "HEOG": "West-Groenlandse zomertijd", "AKST": "Alaska-standaardtijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "MESZ": "Midden-Europese zomertijd", "CLST": "Chileense zomertijd", "ChST": "Chamorro-tijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "AEDT": "Oost-Australische zomertijd", "∅∅∅": "Amazone-zomertijd", "COT": "Colombiaanse standaardtijd", "SGT": "Singaporese standaardtijd", "GYT": "Guyaanse tijd", "ADT": "Atlantic-zomertijd", "PDT": "Pacific-zomertijd", "NZST": "Nieuw-Zeelandse standaardtijd", "NZDT": "Nieuw-Zeelandse zomertijd", "HEEG": "Oost-Groenlandse zomertijd", "MYT": "Maleisische tijd", "UYST": "Uruguayaanse zomertijd", "CDT": "Central-zomertijd", "WEZ": "West-Europese standaardtijd", "WESZ": "West-Europese zomertijd", "SAST": "Zuid-Afrikaanse tijd", "EAT": "Oost-Afrikaanse tijd", "OEZ": "Oost-Europese standaardtijd", "GMT": "Greenwich Mean Time", "WIT": "Oost-Indonesische tijd", "COST": "Colombiaanse zomertijd", "SRT": "Surinaamse tijd", "HKT": "Hongkongse standaardtijd"}, -+ locale: "nl_NL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SGT": "SGT", "GFT": "GFT", "TMT": "TMT", "HKT": "HKT", "MYT": "MYT", "ACWST": "ACWST", "HNCU": "HNCU", "WESZ": "WESZ", "AEDT": "AEDT", "CAT": "CAT", "PST": "PST", "CDT": "CDT", "SRT": "SRT", "PDT": "PDT", "∅∅∅": "∅∅∅", "HKST": "HKST", "NZST": "NZST", "MDT": "MDT", "IST": "IST", "WAT": "WAT", "COST": "COST", "EAT": "EAT", "JST": "JST", "AWST": "AWST", "CST": "CST", "AST": "AST", "EST": "EST", "HADT": "HADT", "CHAST": "CHAST", "UYT": "UYT", "OEZ": "OEZ", "OESZ": "OESZ", "WAST": "WAST", "ECT": "ECT", "AWDT": "AWDT", "UYST": "UYST", "WART": "WART", "WITA": "WITA", "CLT": "CLT", "ADT": "ADT", "GMT": "GMT", "HENOMX": "HENOMX", "ACDT": "ACDT", "HNPM": "HNPM", "HNPMX": "HNPMX", "COT": "COT", "CLST": "CLST", "WIB": "WIB", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "SAST": "SAST", "HEPMX": "HEPMX", "TMST": "TMST", "ART": "ART", "HEPM": "HEPM", "VET": "VET", "HECU": "HECU", "HNOG": "HNOG", "GYT": "GYT", "HAST": "HAST", "ACST": "ACST", "LHDT": "LHDT", "ACWDT": "ACWDT", "AKST": "AKST", "HNT": "HNT", "MEZ": "MEZ", "LHST": "LHST", "AEST": "AEST", "WIT": "WIT", "BOT": "BOT", "MST": "MST", "WARST": "WARST", "NZDT": "NZDT", "EDT": "EDT", "ChST": "ChST", "ARST": "ARST", "HEEG": "HEEG", "MESZ": "MESZ", "JDT": "JDT", "AKDT": "AKDT", "HAT": "HAT", "CHADT": "CHADT", "HEOG": "HEOG", "BT": "BT"}, - } - } -  -@@ -138,7 +113,7 @@ func (nl *nl_NL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_NL) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (nl *nl_NL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_NL) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (nl *nl_NL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_NL) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (nl *nl_NL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_NL' and handles both Whole and Real numbers based on 'v' - func (nl *nl_NL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_NL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_NL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_NL' -@@ -280,56 +193,7 @@ func (nl *nl_NL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nl_NL' -@@ -338,63 +202,7 @@ func (nl *nl_NL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nl_NL' -@@ -402,27 +210,6 @@ func (nl *nl_NL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,17 +218,6 @@ func (nl *nl_NL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,17 +226,6 @@ func (nl *nl_NL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +234,6 @@ func (nl *nl_NL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -490,19 +242,6 @@ func (nl *nl_NL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -511,26 +250,6 @@ func (nl *nl_NL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -539,30 +258,6 @@ func (nl *nl_NL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,34 +266,5 @@ func (nl *nl_NL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl_SR/nl_SR.go b/nl_SR/nl_SR.go -index 3ca7382..12eedb4 100644 ---- a/nl_SR/nl_SR.go -+++ b/nl_SR/nl_SR.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nl_SR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nl_SR' locale - func New() locales.Translator { - return &nl_SR{ -- locale: "nl_SR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "$", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"NZST": "Nieuw-Zeelandse standaardtijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "WIT": "Oost-Indonesische tijd", "ACWST": "Midden-Australische westelijke standaardtijd", "UYST": "Uruguayaanse zomertijd", "WESZ": "West-Europese zomertijd", "MEZ": "Midden-Europese standaardtijd", "IST": "Indiase tijd", "CLST": "Chileense zomertijd", "GMT": "Greenwich Mean Time", "EDT": "Eastern-zomertijd", "GYT": "Guyaanse tijd", "TMST": "Turkmeense zomertijd", "ACWDT": "Midden-Australische westelijke zomertijd", "WEZ": "West-Europese standaardtijd", "HKT": "Hongkongse standaardtijd", "HNEG": "Oost-Groenlandse standaardtijd", "ACST": "Midden-Australische standaardtijd", "COST": "Colombiaanse zomertijd", "MYT": "Maleisische tijd", "UYT": "Uruguayaanse standaardtijd", "WAT": "West-Afrikaanse standaardtijd", "VET": "Venezolaanse tijd", "BT": "Bhutaanse tijd", "ARST": "Argentijnse zomertijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "GFT": "Frans-Guyaanse tijd", "TMT": "Turkmeense standaardtijd", "EAT": "Oost-Afrikaanse tijd", "WIB": "West-Indonesische tijd", "HAST": "Hawaii-Aleoetische standaardtijd", "AEDT": "Oost-Australische zomertijd", "HKST": "Hongkongse zomertijd", "ECT": "Ecuadoraanse tijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "PST": "Pacific-standaardtijd", "OESZ": "Oost-Europese zomertijd", "HADT": "Hawaii-Aleoetische zomertijd", "HEOG": "West-Groenlandse zomertijd", "AWST": "West-Australische standaardtijd", "CHADT": "Chatham-zomertijd", "LHST": "Lord Howe-eilandse standaardtijd", "∅∅∅": "Azoren-zomertijd", "AKDT": "Alaska-zomertijd", "AST": "Atlantic-standaardtijd", "CHAST": "Chatham-standaardtijd", "ChST": "Chamorro-tijd", "OEZ": "Oost-Europese standaardtijd", "SGT": "Singaporese standaardtijd", "AKST": "Alaska-standaardtijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "HNCU": "Cubaanse standaardtijd", "MST": "Macause standaardtijd", "HEEG": "Oost-Groenlandse zomertijd", "AWDT": "West-Australische zomertijd", "NZDT": "Nieuw-Zeelandse zomertijd", "MESZ": "Midden-Europese zomertijd", "LHDT": "Lord Howe-eilandse zomertijd", "JST": "Japanse standaardtijd", "MDT": "Macause zomertijd", "CDT": "Central-zomertijd", "SRT": "Surinaamse tijd", "JDT": "Japanse zomertijd", "ACDT": "Midden-Australische zomertijd", "CAT": "Centraal-Afrikaanse tijd", "WARST": "West-Argentijnse zomertijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "HNOG": "West-Groenlandse standaardtijd", "WAST": "West-Afrikaanse zomertijd", "HAT": "Newfoundland-zomertijd", "WITA": "Centraal-Indonesische tijd", "SAST": "Zuid-Afrikaanse tijd", "ADT": "Atlantic-zomertijd", "HNT": "Newfoundland-standaardtijd", "ART": "Argentijnse standaardtijd", "AEST": "Oost-Australische standaardtijd", "CLT": "Chileense standaardtijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "EST": "Eastern-standaardtijd", "CST": "Central-standaardtijd", "BOT": "Boliviaanse tijd", "PDT": "Pacific-zomertijd", "WART": "West-Argentijnse standaardtijd", "COT": "Colombiaanse standaardtijd", "HECU": "Cubaanse zomertijd"}, -+ locale: "nl_SR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "$", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ARST": "ARST", "ACDT": "ACDT", "ACWST": "ACWST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "SGT": "SGT", "WAST": "WAST", "TMST": "TMST", "UYT": "UYT", "WEZ": "WEZ", "HNCU": "HNCU", "AKDT": "AKDT", "JST": "JST", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "HAT": "HAT", "GYT": "GYT", "HAST": "HAST", "HNNOMX": "HNNOMX", "OEZ": "OEZ", "HNOG": "HNOG", "CLST": "CLST", "ChST": "ChST", "HNPM": "HNPM", "ADT": "ADT", "MYT": "MYT", "HEEG": "HEEG", "HENOMX": "HENOMX", "UYST": "UYST", "AKST": "AKST", "GFT": "GFT", "CLT": "CLT", "EAT": "EAT", "MESZ": "MESZ", "AWST": "AWST", "LHST": "LHST", "AEST": "AEST", "AEDT": "AEDT", "MST": "MST", "NZDT": "NZDT", "SRT": "SRT", "HADT": "HADT", "CST": "CST", "BOT": "BOT", "ACST": "ACST", "MEZ": "MEZ", "CHADT": "CHADT", "WARST": "WARST", "COT": "COT", "HEOG": "HEOG", "CAT": "CAT", "AST": "AST", "IST": "IST", "HKST": "HKST", "WITA": "WITA", "WIB": "WIB", "PDT": "PDT", "VET": "VET", "HECU": "HECU", "HNT": "HNT", "HKT": "HKT", "HNEG": "HNEG", "NZST": "NZST", "BT": "BT", "HNPMX": "HNPMX", "WART": "WART", "WIT": "WIT", "TMT": "TMT", "CDT": "CDT", "PST": "PST", "EST": "EST", "MDT": "MDT", "AWDT": "AWDT", "JDT": "JDT", "OESZ": "OESZ", "EDT": "EDT", "GMT": "GMT", "LHDT": "LHDT", "HEPM": "HEPM", "WESZ": "WESZ", "WAT": "WAT", "SAST": "SAST", "COST": "COST", "ECT": "ECT", "ART": "ART"}, - } - } -  -@@ -138,7 +113,7 @@ func (nl *nl_SR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_SR) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (nl *nl_SR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_SR) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (nl *nl_SR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_SR) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (nl *nl_SR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_SR' and handles both Whole and Real numbers based on 'v' - func (nl *nl_SR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_SR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_SR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_SR' -@@ -280,56 +193,7 @@ func (nl *nl_SR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nl_SR' -@@ -338,63 +202,7 @@ func (nl *nl_SR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nl_SR' -@@ -402,27 +210,6 @@ func (nl *nl_SR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,17 +218,6 @@ func (nl *nl_SR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,17 +226,6 @@ func (nl *nl_SR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +234,6 @@ func (nl *nl_SR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -490,19 +242,6 @@ func (nl *nl_SR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -511,26 +250,6 @@ func (nl *nl_SR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -539,30 +258,6 @@ func (nl *nl_SR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,34 +266,5 @@ func (nl *nl_SR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nl_SX/nl_SX.go b/nl_SX/nl_SX.go -index 0b06797..6c702d0 100644 ---- a/nl_SX/nl_SX.go -+++ b/nl_SX/nl_SX.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nl_SX struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nl_SX' locale - func New() locales.Translator { - return &nl_SX{ -- locale: "nl_SX", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "NAf.", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysNarrow: []string{"Z", "M", "D", "W", "D", "V", "Z"}, -- daysShort: []string{"zo", "ma", "di", "wo", "do", "vr", "za"}, -- daysWide: []string{"zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"v.Chr.", "n.Chr."}, -- erasNarrow: []string{"v.C.", "n.C."}, -- erasWide: []string{"voor Christus", "na Christus"}, -- timezones: map[string]string{"MYT": "Maleisische tijd", "UYT": "Uruguayaanse standaardtijd", "AEDT": "Oost-Australische zomertijd", "HNNOMX": "Noordwest-Mexicaanse standaardtijd", "HNCU": "Cubaanse standaardtijd", "CDT": "Central-zomertijd", "UYST": "Uruguayaanse zomertijd", "NZST": "Nieuw-Zeelandse standaardtijd", "TMST": "Turkmeense zomertijd", "EAT": "Oost-Afrikaanse tijd", "MDT": "Macause zomertijd", "ACWDT": "Midden-Australische westelijke zomertijd", "HAT": "Newfoundland-zomertijd", "HNOG": "West-Groenlandse standaardtijd", "AEST": "Oost-Australische standaardtijd", "HNEG": "Oost-Groenlandse standaardtijd", "OEZ": "Oost-Europese standaardtijd", "TMT": "Turkmeense standaardtijd", "WAT": "West-Afrikaanse standaardtijd", "SGT": "Singaporese standaardtijd", "BT": "Bhutaanse tijd", "AWDT": "West-Australische zomertijd", "HNPM": "Saint Pierre en Miquelon-standaardtijd", "JDT": "Japanse zomertijd", "BOT": "Boliviaanse tijd", "WARST": "West-Argentijnse zomertijd", "HENOMX": "Noordwest-Mexicaanse zomertijd", "HECU": "Cubaanse zomertijd", "SRT": "Surinaamse tijd", "PDT": "Pacific-zomertijd", "HEOG": "West-Groenlandse zomertijd", "WART": "West-Argentijnse standaardtijd", "WIB": "West-Indonesische tijd", "WEZ": "West-Europese standaardtijd", "LHST": "Lord Howe-eilandse standaardtijd", "LHDT": "Lord Howe-eilandse zomertijd", "JST": "Japanse standaardtijd", "HEPMX": "Mexicaanse Pacific-zomertijd", "CST": "Central-standaardtijd", "HADT": "Hawaii-Aleoetische zomertijd", "WITA": "Centraal-Indonesische tijd", "CHADT": "Chatham-zomertijd", "VET": "Venezolaanse tijd", "WIT": "Oost-Indonesische tijd", "CHAST": "Chatham-standaardtijd", "ACDT": "Midden-Australische zomertijd", "∅∅∅": "Azoren-zomertijd", "EST": "Eastern-standaardtijd", "HKST": "Hongkongse zomertijd", "CAT": "Centraal-Afrikaanse tijd", "WAST": "West-Afrikaanse zomertijd", "COT": "Colombiaanse standaardtijd", "AKDT": "Alaska-zomertijd", "HKT": "Hongkongse standaardtijd", "ACST": "Midden-Australische standaardtijd", "ADT": "Atlantic-zomertijd", "WESZ": "West-Europese zomertijd", "HEPM": "Saint Pierre en Miquelon-zomertijd", "IST": "Indiase tijd", "OESZ": "Oost-Europese zomertijd", "ECT": "Ecuadoraanse tijd", "AKST": "Alaska-standaardtijd", "HNT": "Newfoundland-standaardtijd", "ART": "Argentijnse standaardtijd", "ARST": "Argentijnse zomertijd", "NZDT": "Nieuw-Zeelandse zomertijd", "SAST": "Zuid-Afrikaanse tijd", "ChST": "Chamorro-tijd", "HAST": "Hawaii-Aleoetische standaardtijd", "PST": "Pacific-standaardtijd", "ACWST": "Midden-Australische westelijke standaardtijd", "MESZ": "Midden-Europese zomertijd", "GFT": "Frans-Guyaanse tijd", "GMT": "Greenwich Mean Time", "EDT": "Eastern-zomertijd", "HNPMX": "Mexicaanse Pacific-standaardtijd", "GYT": "Guyaanse tijd", "AWST": "West-Australische standaardtijd", "CLT": "Chileense standaardtijd", "CLST": "Chileense zomertijd", "COST": "Colombiaanse zomertijd", "MST": "Macause standaardtijd", "AST": "Atlantic-standaardtijd", "MEZ": "Midden-Europese standaardtijd", "HEEG": "Oost-Groenlandse zomertijd"}, -+ locale: "nl_SX", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "NAf.", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIB": "WIB", "AEDT": "AEDT", "WAST": "WAST", "HEOG": "HEOG", "COT": "COT", "TMT": "TMT", "CST": "CST", "GMT": "GMT", "WAT": "WAT", "WART": "WART", "HKT": "HKT", "ACDT": "ACDT", "ACWDT": "ACWDT", "VET": "VET", "WIT": "WIT", "EST": "EST", "HKST": "HKST", "TMST": "TMST", "CAT": "CAT", "IST": "IST", "HECU": "HECU", "HNPMX": "HNPMX", "ART": "ART", "ADT": "ADT", "JDT": "JDT", "CHADT": "CHADT", "GFT": "GFT", "WITA": "WITA", "HADT": "HADT", "GYT": "GYT", "COST": "COST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "JST": "JST", "AWDT": "AWDT", "PST": "PST", "OEZ": "OEZ", "HAT": "HAT", "BOT": "BOT", "MEZ": "MEZ", "LHST": "LHST", "HNCU": "HNCU", "AKDT": "AKDT", "EDT": "EDT", "CLST": "CLST", "NZDT": "NZDT", "UYST": "UYST", "SGT": "SGT", "AKST": "AKST", "SAST": "SAST", "LHDT": "LHDT", "ECT": "ECT", "MST": "MST", "NZST": "NZST", "AST": "AST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HEEG": "HEEG", "ACWST": "ACWST", "WESZ": "WESZ", "SRT": "SRT", "HAST": "HAST", "CLT": "CLT", "ARST": "ARST", "MESZ": "MESZ", "BT": "BT", "HNT": "HNT", "HNOG": "HNOG", "MDT": "MDT", "HEPM": "HEPM", "WEZ": "WEZ", "EAT": "EAT", "AWST": "AWST", "MYT": "MYT", "AEST": "AEST", "OESZ": "OESZ", "CDT": "CDT", "ChST": "ChST", "PDT": "PDT", "WARST": "WARST", "ACST": "ACST", "HNPM": "HNPM", "CHAST": "CHAST", "UYT": "UYT", "HEPMX": "HEPMX"}, - } - } -  -@@ -138,7 +113,7 @@ func (nl *nl_SX) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nl *nl_SX) MonthsAbbreviated() []string { -- return nl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -148,7 +123,7 @@ func (nl *nl_SX) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nl *nl_SX) MonthsNarrow() []string { -- return nl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -158,7 +133,7 @@ func (nl *nl_SX) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nl *nl_SX) MonthsWide() []string { -- return nl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -204,75 +179,13 @@ func (nl *nl_SX) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nl_SX' and handles both Whole and Real numbers based on 'v' - func (nl *nl_SX) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nl_SX' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nl *nl_SX) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nl.percentSuffix...) -- -- b = append(b, nl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nl_SX' -@@ -280,56 +193,7 @@ func (nl *nl_SX) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nl_SX' -@@ -338,63 +202,7 @@ func (nl *nl_SX) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nl.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nl_SX' -@@ -402,27 +210,6 @@ func (nl *nl_SX) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -431,17 +218,6 @@ func (nl *nl_SX) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,17 +226,6 @@ func (nl *nl_SX) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -469,19 +234,6 @@ func (nl *nl_SX) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -490,19 +242,6 @@ func (nl *nl_SX) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -511,26 +250,6 @@ func (nl *nl_SX) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -539,30 +258,6 @@ func (nl *nl_SX) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -571,34 +266,5 @@ func (nl *nl_SX) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nmg/nmg.go b/nmg/nmg.go -index 6ad3bc8..ece615b 100644 ---- a/nmg/nmg.go -+++ b/nmg/nmg.go -@@ -64,7 +64,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BL", "PB"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Bó Lahlɛ̄", "Pfiɛ Burī"}, -- timezones: map[string]string{"MEZ": "MEZ", "NZDT": "NZDT", "AKDT": "AKDT", "AWST": "AWST", "CHADT": "CHADT", "EAT": "EAT", "HEPMX": "HEPMX", "CDT": "CDT", "MDT": "MDT", "AEST": "AEST", "AEDT": "AEDT", "NZST": "NZST", "CLT": "CLT", "OEZ": "OEZ", "GYT": "GYT", "SRT": "SRT", "WESZ": "WESZ", "LHDT": "LHDT", "WARST": "WARST", "WIB": "WIB", "ARST": "ARST", "HNOG": "HNOG", "HEOG": "HEOG", "HEEG": "HEEG", "CAT": "CAT", "WAST": "WAST", "AST": "AST", "ADT": "ADT", "IST": "IST", "HECU": "HECU", "ACWST": "ACWST", "ACST": "ACST", "WAT": "WAT", "HNCU": "HNCU", "UYT": "UYT", "WIT": "WIT", "WEZ": "WEZ", "WITA": "WITA", "HNPM": "HNPM", "JST": "JST", "GMT": "GMT", "UYST": "UYST", "VET": "VET", "HKST": "HKST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "COST": "COST", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "MESZ": "MESZ", "LHST": "LHST", "PST": "PST", "HNT": "HNT", "HAT": "HAT", "COT": "COT", "AKST": "AKST", "HADT": "HADT", "JDT": "JDT", "ECT": "ECT", "ART": "ART", "HEPM": "HEPM", "SAST": "SAST", "CLST": "CLST", "ACDT": "ACDT", "EDT": "EDT", "WART": "WART", "MYT": "MYT", "HAST": "HAST", "BT": "BT", "AWDT": "AWDT", "ChST": "ChST", "GFT": "GFT", "TMST": "TMST", "HNNOMX": "HNNOMX", "SGT": "SGT", "EST": "EST", "MST": "MST", "ACWDT": "ACWDT", "CST": "CST", "PDT": "PDT", "HKT": "HKT", "CHAST": "CHAST", "BOT": "BOT", "HNEG": "HNEG", "TMT": "TMT"}, -+ timezones: map[string]string{"HKST": "HKST", "SRT": "SRT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "UYST": "UYST", "IST": "IST", "PST": "PST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "WAST": "WAST", "ADT": "ADT", "CHADT": "CHADT", "PDT": "PDT", "TMT": "TMT", "WITA": "WITA", "MDT": "MDT", "BOT": "BOT", "WEZ": "WEZ", "WARST": "WARST", "COT": "COT", "CLT": "CLT", "CLST": "CLST", "HNEG": "HNEG", "LHDT": "LHDT", "HNT": "HNT", "HEOG": "HEOG", "EST": "EST", "ChST": "ChST", "AWDT": "AWDT", "AEST": "AEST", "WESZ": "WESZ", "HAT": "HAT", "WIT": "WIT", "GYT": "GYT", "HADT": "HADT", "HNCU": "HNCU", "HECU": "HECU", "AKDT": "AKDT", "NZST": "NZST", "AST": "AST", "HAST": "HAST", "HNPM": "HNPM", "AEDT": "AEDT", "WART": "WART", "SAST": "SAST", "ART": "ART", "LHST": "LHST", "COST": "COST", "EDT": "EDT", "CAT": "CAT", "JDT": "JDT", "WAT": "WAT", "NZDT": "NZDT", "ARST": "ARST", "EAT": "EAT", "MESZ": "MESZ", "HEEG": "HEEG", "ACWST": "ACWST", "ECT": "ECT", "OEZ": "OEZ", "GFT": "GFT", "HNOG": "HNOG", "JST": "JST", "MYT": "MYT", "CHAST": "CHAST", "SGT": "SGT", "WIB": "WIB", "CST": "CST", "GMT": "GMT", "MEZ": "MEZ", "HEPM": "HEPM", "AKST": "AKST", "HKT": "HKT", "TMST": "TMST", "MST": "MST", "BT": "BT", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "CDT": "CDT", "AWST": "AWST", "UYT": "UYT", "ACST": "ACST", "ACDT": "ACDT", "VET": "VET"}, - } - } -  -diff --git a/nmg_CM/nmg_CM.go b/nmg_CM/nmg_CM.go -index ecb7d99..4f5c7b7 100644 ---- a/nmg_CM/nmg_CM.go -+++ b/nmg_CM/nmg_CM.go -@@ -10,61 +10,45 @@ import ( - ) -  - type nmg_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nmg_CM' locale - func New() locales.Translator { - return &nmg_CM{ -- locale: "nmg_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ng1", "ng2", "ng3", "ng4", "ng5", "ng6", "ng7", "ng8", "ng9", "ng10", "ng11", "kris"}, -- monthsWide: []string{"", "ngwɛn matáhra", "ngwɛn ńmba", "ngwɛn ńlal", "ngwɛn ńna", "ngwɛn ńtan", "ngwɛn ńtuó", "ngwɛn hɛmbuɛrí", "ngwɛn lɔmbi", "ngwɛn rɛbvuâ", "ngwɛn wum", "ngwɛn wum navǔr", "krísimin"}, -- daysAbbreviated: []string{"sɔ́n", "mɔ́n", "smb", "sml", "smn", "mbs", "sas"}, -- daysNarrow: []string{"s", "m", "s", "s", "s", "m", "s"}, -- daysWide: []string{"sɔ́ndɔ", "mɔ́ndɔ", "sɔ́ndɔ mafú mába", "sɔ́ndɔ mafú málal", "sɔ́ndɔ mafú mána", "mabágá má sukul", "sásadi"}, -- periodsAbbreviated: []string{"maná", "kugú"}, -- periodsWide: []string{"maná", "kugú"}, -- erasAbbreviated: []string{"BL", "PB"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Bó Lahlɛ̄", "Pfiɛ Burī"}, -- timezones: map[string]string{"JST": "JST", "TMST": "TMST", "COT": "COT", "EDT": "EDT", "HNPMX": "HNPMX", "MYT": "MYT", "BT": "BT", "GFT": "GFT", "IST": "IST", "HEOG": "HEOG", "CLST": "CLST", "HEEG": "HEEG", "MDT": "MDT", "HNT": "HNT", "WAST": "WAST", "ECT": "ECT", "GMT": "GMT", "HKST": "HKST", "HAT": "HAT", "ART": "ART", "NZDT": "NZDT", "CHAST": "CHAST", "SAST": "SAST", "SGT": "SGT", "CDT": "CDT", "ACWST": "ACWST", "UYT": "UYT", "HENOMX": "HENOMX", "ChST": "ChST", "∅∅∅": "∅∅∅", "TMT": "TMT", "ACST": "ACST", "WIT": "WIT", "OESZ": "OESZ", "HNCU": "HNCU", "ADT": "ADT", "ACWDT": "ACWDT", "WITA": "WITA", "ACDT": "ACDT", "UYST": "UYST", "WIB": "WIB", "AEDT": "AEDT", "PST": "PST", "MEZ": "MEZ", "HNEG": "HNEG", "WAT": "WAT", "HNNOMX": "HNNOMX", "EST": "EST", "HADT": "HADT", "AWST": "AWST", "HKT": "HKT", "WART": "WART", "CST": "CST", "WESZ": "WESZ", "MESZ": "MESZ", "CLT": "CLT", "BOT": "BOT", "WARST": "WARST", "MST": "MST", "AKST": "AKST", "AST": "AST", "ARST": "ARST", "GYT": "GYT", "HNPM": "HNPM", "EAT": "EAT", "COST": "COST", "SRT": "SRT", "VET": "VET", "AEST": "AEST", "HEPM": "HEPM", "NZST": "NZST", "JDT": "JDT", "AKDT": "AKDT", "HAST": "HAST", "AWDT": "AWDT", "LHST": "LHST", "LHDT": "LHDT", "CHADT": "CHADT", "CAT": "CAT", "OEZ": "OEZ", "HNOG": "HNOG", "WEZ": "WEZ", "HECU": "HECU", "HEPMX": "HEPMX", "PDT": "PDT"}, -+ locale: "nmg_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "WAST": "WAST", "EDT": "EDT", "TMT": "TMT", "AST": "AST", "ARST": "ARST", "BOT": "BOT", "AWST": "AWST", "LHST": "LHST", "TMST": "TMST", "NZST": "NZST", "CHADT": "CHADT", "BT": "BT", "WAT": "WAT", "HKST": "HKST", "ACWST": "ACWST", "WEZ": "WEZ", "COST": "COST", "HEOG": "HEOG", "HEPMX": "HEPMX", "OESZ": "OESZ", "WART": "WART", "∅∅∅": "∅∅∅", "PST": "PST", "AEDT": "AEDT", "HNCU": "HNCU", "HECU": "HECU", "GYT": "GYT", "CLST": "CLST", "CDT": "CDT", "HADT": "HADT", "HNEG": "HNEG", "PDT": "PDT", "HNPMX": "HNPMX", "GFT": "GFT", "NZDT": "NZDT", "ADT": "ADT", "ACWDT": "ACWDT", "WIT": "WIT", "MDT": "MDT", "UYST": "UYST", "AEST": "AEST", "HAT": "HAT", "WIB": "WIB", "UYT": "UYT", "VET": "VET", "OEZ": "OEZ", "SAST": "SAST", "HKT": "HKT", "WITA": "WITA", "EAT": "EAT", "MYT": "MYT", "JST": "JST", "JDT": "JDT", "HNOG": "HNOG", "MST": "MST", "MESZ": "MESZ", "AKDT": "AKDT", "WARST": "WARST", "COT": "COT", "MEZ": "MEZ", "ACST": "ACST", "CHAST": "CHAST", "IST": "IST", "EST": "EST", "SGT": "SGT", "CST": "CST", "ChST": "ChST", "HENOMX": "HENOMX", "LHDT": "LHDT", "HEPM": "HEPM", "CLT": "CLT", "ECT": "ECT", "HAST": "HAST", "ACDT": "ACDT", "HEEG": "HEEG", "HNPM": "HNPM", "AKST": "AKST", "HNT": "HNT", "CAT": "CAT", "ART": "ART", "SRT": "SRT", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "WESZ": "WESZ"}, - } - } -  -@@ -110,7 +94,7 @@ func (nmg *nmg_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nmg *nmg_CM) MonthsAbbreviated() []string { -- return nmg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +114,7 @@ func (nmg *nmg_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nmg *nmg_CM) MonthsWide() []string { -- return nmg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -176,75 +160,13 @@ func (nmg *nmg_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nmg_CM' and handles both Whole and Real numbers based on 'v' - func (nmg *nmg_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nmg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nmg.group) - 1; j >= 0; j-- { -- b = append(b, nmg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nmg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nmg_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nmg *nmg_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nmg.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nmg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nmg.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nmg_CM' -@@ -252,58 +174,7 @@ func (nmg *nmg_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nmg.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nmg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nmg.group) - 1; j >= 0; j-- { -- b = append(b, nmg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nmg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nmg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nmg.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nmg_CM' -@@ -312,65 +183,7 @@ func (nmg *nmg_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nmg.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nmg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nmg.group) - 1; j >= 0; j-- { -- b = append(b, nmg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, nmg.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nmg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nmg.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nmg.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nmg_CM' -@@ -378,17 +191,6 @@ func (nmg *nmg_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -397,17 +199,6 @@ func (nmg *nmg_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nmg.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,17 +207,6 @@ func (nmg *nmg_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nmg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (nmg *nmg_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nmg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nmg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,19 +223,6 @@ func (nmg *nmg_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -477,26 +231,6 @@ func (nmg *nmg_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -505,30 +239,6 @@ func (nmg *nmg_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -537,34 +247,5 @@ func (nmg *nmg_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nmg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nmg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nn/nn.go b/nn/nn.go -index 247e70e..ea869ce 100644 ---- a/nn/nn.go -+++ b/nn/nn.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "e.Kr."}, - erasNarrow: []string{"f.Kr.", "e.Kr."}, - erasWide: []string{"f.Kr.", "e.Kr."}, -- timezones: map[string]string{"ACDT": "sentralaustralsk sommartid", "CST": "CST", "WIB": "WIB", "HAST": "HAST", "BOT": "BOT", "ChST": "ChST", "HKST": "HKST", "AEST": "austaustralsk standardtid", "HEEG": "HEEG", "WAT": "vestafrikansk standardtid", "CAT": "sentralafrikansk tid", "SGT": "SGT", "AKDT": "AKDT", "UYT": "UYT", "COT": "COT", "MST": "MST", "WITA": "WITA", "LHDT": "LHDT", "HNT": "HNT", "HNEG": "HNEG", "HEPM": "HEPM", "JDT": "JDT", "GYT": "GYT", "WIT": "WIT", "ACWST": "vest-sentralaustralsk standardtid", "ACWDT": "vest-sentralaustralsk sommartid", "HAT": "HAT", "ACST": "sentralaustralsk standardtid", "HEPMX": "HEPMX", "AST": "AST", "BT": "BT", "NZST": "NZST", "MEZ": "sentraleuropeisk standardtid", "WART": "WART", "WEZ": "vesteuropeisk standardtid", "PDT": "PDT", "LHST": "LHST", "NZDT": "NZDT", "JST": "JST", "TMT": "TMT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "ARST": "ARST", "AWDT": "vestaustralsk sommartid", "AEDT": "austaustralsk sommartid", "COST": "COST", "WARST": "WARST", "EST": "EST", "SRT": "SRT", "WESZ": "vesteuropeisk sommartid", "CDT": "CDT", "ART": "ART", "HNPM": "HNPM", "TMST": "TMST", "EAT": "austafrikansk tid", "WAST": "vestafrikansk sommartid", "∅∅∅": "∅∅∅", "GMT": "greenwich middeltid", "HKT": "HKT", "MDT": "MDT", "SAST": "sørafrikansk tid", "CLST": "CLST", "GFT": "GFT", "OEZ": "austeuropeisk standardtid", "HEOG": "HEOG", "CHADT": "CHADT", "MESZ": "sentraleuropeisk sommartid", "UYST": "UYST", "VET": "VET", "CHAST": "CHAST", "ECT": "ECT", "HNCU": "HNCU", "AKST": "AKST", "ADT": "ADT", "MYT": "MYT", "IST": "IST", "CLT": "CLT", "PST": "PST", "AWST": "vestaustralsk standardtid", "OESZ": "austeuropeisk sommartid", "HECU": "HECU", "EDT": "EDT", "HADT": "HADT", "HNOG": "HNOG"}, -+ timezones: map[string]string{"WIB": "WIB", "HAST": "HAST", "OEZ": "austeuropeisk standardtid", "HNT": "HNT", "CLT": "CLT", "COT": "COT", "EDT": "EDT", "HKST": "HKST", "BOT": "BOT", "AWST": "vestaustralsk standardtid", "LHDT": "LHDT", "AEDT": "austaustralsk sommartid", "HEEG": "HEEG", "WEZ": "vesteuropeisk standardtid", "AKST": "AKST", "WITA": "WITA", "AKDT": "AKDT", "WART": "WART", "HKT": "HKT", "TMT": "TMT", "JST": "JST", "CHAST": "CHAST", "ACWST": "vest-sentralaustralsk standardtid", "WESZ": "vesteuropeisk sommartid", "NZDT": "NZDT", "SGT": "SGT", "WARST": "WARST", "CST": "CST", "CAT": "sentralafrikansk tid", "AST": "AST", "ChST": "ChST", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "WAST": "vestafrikansk sommartid", "EST": "EST", "TMST": "TMST", "MEZ": "sentraleuropeisk standardtid", "HNPM": "HNPM", "ACWDT": "vest-sentralaustralsk sommartid", "OESZ": "austeuropeisk sommartid", "HNCU": "HNCU", "HEPMX": "HEPMX", "ADT": "ADT", "SRT": "SRT", "MESZ": "sentraleuropeisk sommartid", "HNEG": "HNEG", "BT": "BT", "ACST": "sentralaustralsk standardtid", "LHST": "LHST", "ART": "ART", "HECU": "HECU", "HNPMX": "HNPMX", "NZST": "NZST", "ECT": "ECT", "CHADT": "CHADT", "PDT": "PDT", "AEST": "austaustralsk standardtid", "VET": "VET", "GYT": "GYT", "COST": "COST", "HNOG": "HNOG", "GMT": "greenwich middeltid", "MST": "MST", "AWDT": "vestaustralsk sommartid", "WIT": "WIT", "SAST": "sørafrikansk tid", "ARST": "ARST", "HADT": "HADT", "HNNOMX": "HNNOMX", "GFT": "GFT", "CLST": "CLST", "PST": "PST", "WAT": "vestafrikansk standardtid", "HAT": "HAT", "HEPM": "HEPM", "UYT": "UYT", "HEOG": "HEOG", "CDT": "CDT", "IST": "IST", "MDT": "MDT", "ACDT": "sentralaustralsk sommartid", "JDT": "JDT", "UYST": "UYST", "EAT": "austafrikansk tid", "MYT": "MYT"}, - } - } -  -diff --git a/nn_NO/nn_NO.go b/nn_NO/nn_NO.go -index 825ec90..7bd7162 100644 ---- a/nn_NO/nn_NO.go -+++ b/nn_NO/nn_NO.go -@@ -10,70 +10,45 @@ import ( - ) -  - type nn_NO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nn_NO' locale - func New() locales.Translator { - return &nn_NO{ -- locale: "nn_NO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mars", "apr.", "mai", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "des."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"}, -- daysAbbreviated: []string{"sø.", "må.", "ty.", "on.", "to.", "fr.", "la."}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sø.", "må.", "ty.", "on.", "to.", "fr.", "la."}, -- daysWide: []string{"søndag", "måndag", "tysdag", "onsdag", "torsdag", "fredag", "laurdag"}, -- periodsAbbreviated: []string{"f.m.", "e.m."}, -- periodsNarrow: []string{"f.m.", "e.m."}, -- periodsWide: []string{"formiddag", "ettermiddag"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.Kr.", "e.Kr."}, -- erasWide: []string{"f.Kr.", "e.Kr."}, -- timezones: map[string]string{"EDT": "EDT", "MST": "MST", "HEOG": "HEOG", "IST": "IST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "OESZ": "austeuropeisk sommartid", "CDT": "CDT", "HAST": "HAST", "ART": "ART", "HEPM": "HEPM", "LHDT": "LHDT", "HNNOMX": "HNNOMX", "WIB": "WIB", "BT": "BT", "HAT": "HAT", "HKT": "HKT", "MEZ": "sentraleuropeisk standardtid", "ACDT": "sentralaustralsk sommartid", "AWST": "vestaustralsk standardtid", "CHADT": "CHADT", "MESZ": "sentraleuropeisk sommartid", "WART": "WART", "COT": "COT", "HADT": "HADT", "VET": "VET", "PDT": "PDT", "GMT": "greenwich middeltid", "ACWDT": "vest-sentralaustralsk sommartid", "COST": "COST", "AKST": "AKST", "MYT": "MYT", "UYST": "UYST", "PST": "PST", "JDT": "JDT", "CLST": "CLST", "WAT": "vestafrikansk standardtid", "WARST": "WARST", "HNCU": "HNCU", "AKDT": "AKDT", "AEST": "austaustralsk standardtid", "TMT": "TMT", "TMST": "TMST", "UYT": "UYT", "WITA": "WITA", "LHST": "LHST", "WAST": "vestafrikansk sommartid", "HEEG": "HEEG", "OEZ": "austeuropeisk standardtid", "AST": "AST", "ARST": "ARST", "HKST": "HKST", "SAST": "sørafrikansk tid", "CHAST": "CHAST", "HEPMX": "HEPMX", "WIT": "WIT", "WEZ": "vesteuropeisk standardtid", "NZST": "NZST", "ACST": "sentralaustralsk standardtid", "HENOMX": "HENOMX", "EST": "EST", "SRT": "SRT", "CLT": "CLT", "GFT": "GFT", "NZDT": "NZDT", "JST": "JST", "CAT": "sentralafrikansk tid", "GYT": "GYT", "MDT": "MDT", "AEDT": "austaustralsk sommartid", "AWDT": "vestaustralsk sommartid", "ACWST": "vest-sentralaustralsk standardtid", "HNPM": "HNPM", "HNPMX": "HNPMX", "SGT": "SGT", "CST": "CST", "ECT": "ECT", "EAT": "austafrikansk tid", "HECU": "HECU", "ChST": "ChST", "BOT": "BOT", "ADT": "ADT", "HNT": "HNT", "HNOG": "HNOG", "WESZ": "vesteuropeisk sommartid"}, -+ locale: "nn_NO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNNOMX": "HNNOMX", "ACWST": "ACWST", "COST": "COST", "CLST": "CLST", "ECT": "ECT", "WARST": "WARST", "CAT": "CAT", "SRT": "SRT", "ACDT": "ACDT", "JDT": "JDT", "WAST": "WAST", "HNOG": "HNOG", "HENOMX": "HENOMX", "JST": "JST", "PDT": "PDT", "AKDT": "AKDT", "HAT": "HAT", "BT": "BT", "VET": "VET", "HECU": "HECU", "OEZ": "OEZ", "TMT": "TMT", "OESZ": "OESZ", "WART": "WART", "TMST": "TMST", "EAT": "EAT", "HNEG": "HNEG", "MEZ": "MEZ", "HEPM": "HEPM", "HEPMX": "HEPMX", "MST": "MST", "IST": "IST", "GFT": "GFT", "NZST": "NZST", "ARST": "ARST", "GMT": "GMT", "BOT": "BOT", "CLT": "CLT", "WIB": "WIB", "LHDT": "LHDT", "HNCU": "HNCU", "SGT": "SGT", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "WIT": "WIT", "WAT": "WAT", "COT": "COT", "SAST": "SAST", "ChST": "ChST", "HADT": "HADT", "CHAST": "CHAST", "PST": "PST", "WEZ": "WEZ", "CST": "CST", "CDT": "CDT", "AKST": "AKST", "HEOG": "HEOG", "WITA": "WITA", "AWST": "AWST", "AWDT": "AWDT", "AEST": "AEST", "CHADT": "CHADT", "UYST": "UYST", "NZDT": "NZDT", "ART": "ART", "MESZ": "MESZ", "ACST": "ACST", "HNPM": "HNPM", "HKT": "HKT", "HKST": "HKST", "LHST": "LHST", "ACWDT": "ACWDT", "UYT": "UYT", "HNPMX": "HNPMX", "GYT": "GYT", "EST": "EST", "EDT": "EDT", "ADT": "ADT", "MDT": "MDT", "HEEG": "HEEG", "MYT": "MYT", "WESZ": "WESZ", "AST": "AST", "HAST": "HAST", "HNT": "HNT"}, - } - } -  -@@ -126,7 +101,7 @@ func (nn *nn_NO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nn *nn_NO) MonthsAbbreviated() []string { -- return nn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (nn *nn_NO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nn *nn_NO) MonthsNarrow() []string { -- return nn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (nn *nn_NO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nn *nn_NO) MonthsWide() []string { -- return nn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,81 +167,13 @@ func (nn *nn_NO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nn_NO' and handles both Whole and Real numbers based on 'v' - func (nn *nn_NO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nn.group) - 1; j >= 0; j-- { -- b = append(b, nn.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nn.minus) - 1; j >= 0; j-- { -- b = append(b, nn.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nn_NO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nn *nn_NO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nn.minus) - 1; j >= 0; j-- { -- b = append(b, nn.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nn.percentSuffix...) -- -- b = append(b, nn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nn_NO' -@@ -274,60 +181,7 @@ func (nn *nn_NO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nn.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nn.group) - 1; j >= 0; j-- { -- b = append(b, nn.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(nn.minus) - 1; j >= 0; j-- { -- b = append(b, nn.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, nn.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nn_NO' -@@ -336,67 +190,7 @@ func (nn *nn_NO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nn.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(nn.group) - 1; j >= 0; j-- { -- b = append(b, nn.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(nn.minus) - 1; j >= 0; j-- { -- b = append(b, nn.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nn.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, nn.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nn_NO' -@@ -404,27 +198,6 @@ func (nn *nn_NO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,17 +206,6 @@ func (nn *nn_NO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,17 +214,6 @@ func (nn *nn_NO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +222,6 @@ func (nn *nn_NO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, nn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -492,19 +230,6 @@ func (nn *nn_NO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -513,26 +238,6 @@ func (nn *nn_NO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -541,30 +246,6 @@ func (nn *nn_NO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -573,37 +254,5 @@ func (nn *nn_NO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x6b, 0x6c}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/nnh/nnh.go b/nnh/nnh.go -index 3b62fed..1f2a7c8 100644 ---- a/nnh/nnh.go -+++ b/nnh/nnh.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"m.z.Y.", "m.g.n.Y."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"mé zyé Yěsô", "mé gÿo ńzyé Yěsô"}, -- timezones: map[string]string{"WIB": "WIB", "HADT": "HADT", "HKST": "HKST", "OEZ": "OEZ", "HENOMX": "HENOMX", "MST": "MST", "UYST": "UYST", "GYT": "GYT", "SRT": "SRT", "ACWST": "ACWST", "PST": "PST", "TMST": "TMST", "COST": "COST", "HNCU": "HNCU", "SGT": "SGT", "AEST": "AEST", "CST": "CST", "BT": "BT", "CDT": "CDT", "UYT": "UYT", "HNPM": "HNPM", "HEEG": "HEEG", "ChST": "ChST", "CAT": "CAT", "JST": "JST", "ACWDT": "ACWDT", "LHDT": "LHDT", "HECU": "HECU", "EDT": "EDT", "HAT": "HAT", "HAST": "HAST", "VET": "VET", "HNT": "HNT", "HNOG": "HNOG", "CHAST": "CHAST", "IST": "IST", "CLT": "CLT", "WIT": "WIT", "HKT": "HKT", "CLST": "CLST", "EAT": "EAT", "AEDT": "AEDT", "NZDT": "NZDT", "LHST": "LHST", "SAST": "SAST", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "AWST": "AWST", "JDT": "JDT", "TMT": "TMT", "ACST": "ACST", "ART": "ART", "BOT": "BOT", "GMT": "GMT", "HEOG": "HEOG", "WEZ": "WEZ", "WAT": "WAT", "COT": "COT", "EST": "EST", "MDT": "MDT", "ADT": "ADT", "CHADT": "CHADT", "MEZ": "MEZ", "HNEG": "HNEG", "GFT": "GFT", "AKST": "AKST", "MYT": "MYT", "WITA": "WITA", "ACDT": "ACDT", "ECT": "ECT", "WARST": "WARST", "HNPMX": "HNPMX", "PDT": "PDT", "AWDT": "AWDT", "WAST": "WAST", "HEPMX": "HEPMX", "AKDT": "AKDT", "ARST": "ARST", "HEPM": "HEPM", "NZST": "NZST", "OESZ": "OESZ", "AST": "AST", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "WART": "WART"}, -+ timezones: map[string]string{"OEZ": "OEZ", "OESZ": "OESZ", "WIB": "WIB", "CDT": "CDT", "MDT": "MDT", "AST": "AST", "BOT": "BOT", "SRT": "SRT", "HADT": "HADT", "AWDT": "AWDT", "WAT": "WAT", "COST": "COST", "EDT": "EDT", "NZST": "NZST", "NZDT": "NZDT", "ARST": "ARST", "TMT": "TMT", "VET": "VET", "AKST": "AKST", "WART": "WART", "HEOG": "HEOG", "WITA": "WITA", "HENOMX": "HENOMX", "AWST": "AWST", "UYT": "UYT", "HNCU": "HNCU", "HNT": "HNT", "EST": "EST", "SGT": "SGT", "AKDT": "AKDT", "GFT": "GFT", "CAT": "CAT", "HEEG": "HEEG", "WESZ": "WESZ", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "HKST": "HKST", "CST": "CST", "ADT": "ADT", "MESZ": "MESZ", "LHST": "LHST", "HEPMX": "HEPMX", "JST": "JST", "TMST": "TMST", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "AEDT": "AEDT", "CHAST": "CHAST", "HNPMX": "HNPMX", "GMT": "GMT", "UYST": "UYST", "IST": "IST", "HAST": "HAST", "LHDT": "LHDT", "PST": "PST", "GYT": "GYT", "CLT": "CLT", "EAT": "EAT", "ACWDT": "ACWDT", "PDT": "PDT", "HECU": "HECU", "WARST": "WARST", "SAST": "SAST", "HKT": "HKT", "BT": "BT", "WAST": "WAST", "CLST": "CLST", "ChST": "ChST", "ACST": "ACST", "HNPM": "HNPM", "HEPM": "HEPM", "JDT": "JDT", "MYT": "MYT", "CHADT": "CHADT", "HAT": "HAT", "COT": "COT", "ECT": "ECT", "MST": "MST", "MEZ": "MEZ", "ACDT": "ACDT", "HNEG": "HNEG", "AEST": "AEST", "WIT": "WIT", "ART": "ART", "WEZ": "WEZ"}, - } - } -  -diff --git a/nnh_CM/nnh_CM.go b/nnh_CM/nnh_CM.go -index 59e73c3..2fa33af 100644 ---- a/nnh_CM/nnh_CM.go -+++ b/nnh_CM/nnh_CM.go -@@ -10,62 +10,45 @@ import ( - ) -  - type nnh_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nnh_CM' locale - func New() locales.Translator { - return &nnh_CM{ -- locale: "nnh_CM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- percent: "%", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "saŋ tsetsɛ̀ɛ lùm", "saŋ kàg ngwóŋ", "saŋ lepyè shúm", "saŋ cÿó", "saŋ tsɛ̀ɛ cÿó", "saŋ njÿoláʼ", "saŋ tyɛ̀b tyɛ̀b mbʉ̀ŋ", "saŋ mbʉ̀ŋ", "saŋ ngwɔ̀ʼ mbÿɛ", "saŋ tàŋa tsetsáʼ", "saŋ mejwoŋó", "saŋ lùm"}, -- monthsWide: []string{"", "saŋ tsetsɛ̀ɛ lùm", "saŋ kàg ngwóŋ", "saŋ lepyè shúm", "saŋ cÿó", "saŋ tsɛ̀ɛ cÿó", "saŋ njÿoláʼ", "saŋ tyɛ̀b tyɛ̀b mbʉ̀ŋ", "saŋ mbʉ̀ŋ", "saŋ ngwɔ̀ʼ mbÿɛ", "saŋ tàŋa tsetsáʼ", "saŋ mejwoŋó", "saŋ lùm"}, -- daysAbbreviated: []string{"lyɛʼɛ́ sẅíŋtè", "mvfò lyɛ̌ʼ", "mbɔ́ɔntè mvfò lyɛ̌ʼ", "tsètsɛ̀ɛ lyɛ̌ʼ", "mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌ʼ", "mvfò màga lyɛ̌ʼ", "màga lyɛ̌ʼ"}, -- daysShort: []string{"lyɛʼɛ́ sẅíŋtè", "mvfò lyɛ̌ʼ", "mbɔ́ɔntè mvfò lyɛ̌ʼ", "tsètsɛ̀ɛ lyɛ̌ʼ", "mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌ʼ", "mvfò màga lyɛ̌ʼ", "màga lyɛ̌ʼ"}, -- daysWide: []string{"lyɛʼɛ́ sẅíŋtè", "mvfò lyɛ̌ʼ", "mbɔ́ɔntè mvfò lyɛ̌ʼ", "tsètsɛ̀ɛ lyɛ̌ʼ", "mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌ʼ", "mvfò màga lyɛ̌ʼ", "màga lyɛ̌ʼ"}, -- periodsAbbreviated: []string{"mbaʼámbaʼ", "ncwònzém"}, -- periodsWide: []string{"mbaʼámbaʼ", "ncwònzém"}, -- erasAbbreviated: []string{"m.z.Y.", "m.g.n.Y."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"mé zyé Yěsô", "mé gÿo ńzyé Yěsô"}, -- timezones: map[string]string{"HAT": "HAT", "CHADT": "CHADT", "IST": "IST", "HKST": "HKST", "HNEG": "HNEG", "EAT": "EAT", "SGT": "SGT", "HNPMX": "HNPMX", "UYT": "UYT", "SRT": "SRT", "SAST": "SAST", "HNNOMX": "HNNOMX", "HEOG": "HEOG", "HKT": "HKT", "WITA": "WITA", "EST": "EST", "AKDT": "AKDT", "WIB": "WIB", "WEZ": "WEZ", "ACWDT": "ACWDT", "CLST": "CLST", "BOT": "BOT", "ACDT": "ACDT", "WARST": "WARST", "HECU": "HECU", "PDT": "PDT", "ACST": "ACST", "OESZ": "OESZ", "COT": "COT", "WART": "WART", "AST": "AST", "HADT": "HADT", "WESZ": "WESZ", "HNT": "HNT", "TMT": "TMT", "MST": "MST", "HEPM": "HEPM", "GFT": "GFT", "TMST": "TMST", "JDT": "JDT", "HEEG": "HEEG", "WAT": "WAT", "EDT": "EDT", "HAST": "HAST", "HNOG": "HNOG", "PST": "PST", "LHDT": "LHDT", "COST": "COST", "HNCU": "HNCU", "CDT": "CDT", "ADT": "ADT", "MESZ": "MESZ", "ECT": "ECT", "ACWST": "ACWST", "AEST": "AEST", "MYT": "MYT", "AWST": "AWST", "HENOMX": "HENOMX", "ChST": "ChST", "MDT": "MDT", "CST": "CST", "BT": "BT", "NZDT": "NZDT", "JST": "JST", "AKST": "AKST", "WIT": "WIT", "NZST": "NZST", "CLT": "CLT", "CAT": "CAT", "UYST": "UYST", "AWDT": "AWDT", "HNPM": "HNPM", "MEZ": "MEZ", "WAST": "WAST", "ART": "ART", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "GMT": "GMT", "LHST": "LHST", "CHAST": "CHAST", "HEPMX": "HEPMX", "GYT": "GYT", "VET": "VET", "ARST": "ARST", "AEDT": "AEDT"}, -+ locale: "nnh_CM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "PST": "PST", "HNCU": "HNCU", "COT": "COT", "HEOG": "HEOG", "HADT": "HADT", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "WARST": "WARST", "MDT": "MDT", "ACDT": "ACDT", "OESZ": "OESZ", "NZDT": "NZDT", "UYT": "UYT", "UYST": "UYST", "PDT": "PDT", "NZST": "NZST", "AST": "AST", "ART": "ART", "AEST": "AEST", "WEZ": "WEZ", "WAT": "WAT", "GYT": "GYT", "CAT": "CAT", "MESZ": "MESZ", "LHST": "LHST", "WAST": "WAST", "HKT": "HKT", "HKST": "HKST", "CLST": "CLST", "HEPM": "HEPM", "ACWDT": "ACWDT", "SGT": "SGT", "AKDT": "AKDT", "ChST": "ChST", "VET": "VET", "WIB": "WIB", "MST": "MST", "BOT": "BOT", "OEZ": "OEZ", "ADT": "ADT", "EAT": "EAT", "WESZ": "WESZ", "AKST": "AKST", "EDT": "EDT", "ECT": "ECT", "IST": "IST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "TMST": "TMST", "CHADT": "CHADT", "HECU": "HECU", "WART": "WART", "SAST": "SAST", "WITA": "WITA", "HNPM": "HNPM", "GMT": "GMT", "SRT": "SRT", "ACST": "ACST", "HNNOMX": "HNNOMX", "JST": "JST", "JDT": "JDT", "LHDT": "LHDT", "CLT": "CLT", "AEDT": "AEDT", "CHAST": "CHAST", "GFT": "GFT", "HNT": "HNT", "WIT": "WIT", "HNOG": "HNOG", "EST": "EST", "HAST": "HAST", "MYT": "MYT", "COST": "COST", "CST": "CST", "HAT": "HAT", "TMT": "TMT", "CDT": "CDT", "ARST": "ARST", "MEZ": "MEZ", "HENOMX": "HENOMX", "AWST": "AWST", "AWDT": "AWDT", "BT": "BT", "ACWST": "ACWST"}, - } - } -  -@@ -118,7 +101,7 @@ func (nnh *nnh_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nnh *nnh_CM) MonthsAbbreviated() []string { -- return nnh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +121,7 @@ func (nnh *nnh_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nnh *nnh_CM) MonthsWide() []string { -- return nnh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -184,42 +167,7 @@ func (nnh *nnh_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nnh_CM' and handles both Whole and Real numbers based on 'v' - func (nnh *nnh_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nnh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nnh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nnh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nnh_CM' and handles both Whole and Real numbers based on 'v' -@@ -233,60 +181,7 @@ func (nnh *nnh_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nnh.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nnh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nnh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nnh.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, nnh.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, nnh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nnh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nnh_CM' -@@ -295,72 +190,7 @@ func (nnh *nnh_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nnh.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nnh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nnh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nnh.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, nnh.currencyNegativePrefix[j]) -- } -- -- b = append(b, nnh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(nnh.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, nnh.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nnh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nnh_CM' -@@ -368,27 +198,6 @@ func (nnh *nnh_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -397,17 +206,6 @@ func (nnh *nnh_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nnh.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -416,20 +214,6 @@ func (nnh *nnh_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x6c, 0x79, 0xc9, 0x9b}...) -- b = append(b, []byte{0xcc, 0x8c, 0xca, 0xbc, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6e, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = append(b, nnh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,21 +222,6 @@ func (nnh *nnh_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nnh.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20, 0x2c, 0x20, 0x6c, 0x79, 0xc9, 0x9b}...) -- b = append(b, []byte{0xcc, 0x8c, 0xca, 0xbc, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x6e, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = append(b, nnh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/nus/nus.go b/nus/nus.go -index 33a72af..4e6195a 100644 ---- a/nus/nus.go -+++ b/nus/nus.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AY", "ƐY"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"A ka̱n Yecu ni dap", "Ɛ ca Yecu dap"}, -- timezones: map[string]string{"WIT": "WIT", "HNT": "HNT", "TMT": "TMT", "ECT": "ECT", "HNNOMX": "HNNOMX", "GMT": "GMT", "PDT": "PDT", "LHST": "LHST", "JST": "JST", "ACST": "ACST", "HENOMX": "HENOMX", "MDT": "MDT", "HNPMX": "HNPMX", "UYT": "UYT", "CDT": "CDT", "HAST": "HAST", "SRT": "SRT", "PST": "PST", "WEZ": "WEZ", "SGT": "SGT", "HNCU": "HNCU", "HEPMX": "HEPMX", "UYST": "UYST", "CST": "CST", "HAT": "HAT", "AEDT": "AEDT", "MST": "MST", "ART": "ART", "HEPM": "HEPM", "CHAST": "CHAST", "OEZ": "OEZ", "LHDT": "LHDT", "TMST": "TMST", "COST": "COST", "AST": "AST", "HADT": "HADT", "ACWST": "ACWST", "AWDT": "AWDT", "HKST": "HKST", "HECU": "HECU", "HEEG": "HEEG", "WART": "WART", "CAT": "CAT", "GYT": "GYT", "MYT": "MYT", "AKST": "AKST", "ARST": "ARST", "SAST": "SAST", "WAT": "WAT", "OESZ": "OESZ", "AKDT": "AKDT", "HEOG": "HEOG", "WITA": "WITA", "MEZ": "MEZ", "CHADT": "CHADT", "EST": "EST", "NZDT": "NZDT", "IST": "IST", "JDT": "JDT", "NZST": "NZST", "WARST": "WARST", "VET": "VET", "HNEG": "HNEG", "HNOG": "HNOG", "AWST": "AWST", "MESZ": "MESZ", "BOT": "BOT", "ACDT": "ACDT", "EAT": "EAT", "WIB": "WIB", "AEST": "AEST", "HKT": "HKT", "CLT": "CLT", "GFT": "GFT", "EDT": "EDT", "ADT": "ADT", "WESZ": "WESZ", "HNPM": "HNPM", "COT": "COT", "WAST": "WAST", "∅∅∅": "∅∅∅", "BT": "BT", "ACWDT": "ACWDT", "CLST": "CLST", "ChST": "ChST"}, -+ timezones: map[string]string{"JST": "JST", "IST": "IST", "VET": "VET", "HECU": "HECU", "TMT": "TMT", "CST": "CST", "GFT": "GFT", "GYT": "GYT", "OEZ": "OEZ", "WIT": "WIT", "CLST": "CLST", "AST": "AST", "GMT": "GMT", "SRT": "SRT", "HNEG": "HNEG", "HNCU": "HNCU", "HEPMX": "HEPMX", "HKST": "HKST", "ECT": "ECT", "HEPM": "HEPM", "HNT": "HNT", "HAT": "HAT", "HADT": "HADT", "MEZ": "MEZ", "CAT": "CAT", "CLT": "CLT", "HEEG": "HEEG", "LHST": "LHST", "UYT": "UYT", "ACWST": "ACWST", "COST": "COST", "HNOG": "HNOG", "NZST": "NZST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "MYT": "MYT", "CHAST": "CHAST", "WITA": "WITA", "MDT": "MDT", "CDT": "CDT", "MESZ": "MESZ", "HNPM": "HNPM", "AEDT": "AEDT", "HEOG": "HEOG", "TMST": "TMST", "LHDT": "LHDT", "ACWDT": "ACWDT", "WART": "WART", "SAST": "SAST", "ACDT": "ACDT", "WAST": "WAST", "HKT": "HKT", "BOT": "BOT", "ADT": "ADT", "ARST": "ARST", "AWDT": "AWDT", "EDT": "EDT", "WIB": "WIB", "BT": "BT", "WEZ": "WEZ", "ACST": "ACST", "JDT": "JDT", "ChST": "ChST", "ART": "ART", "CHADT": "CHADT", "PDT": "PDT", "WESZ": "WESZ", "HNPMX": "HNPMX", "COT": "COT", "MST": "MST", "OESZ": "OESZ", "WARST": "WARST", "PST": "PST", "AEST": "AEST", "AKST": "AKST", "AKDT": "AKDT", "EST": "EST", "HAST": "HAST", "NZDT": "NZDT", "UYST": "UYST", "AWST": "AWST", "SGT": "SGT", "WAT": "WAT", "∅∅∅": "∅∅∅", "EAT": "EAT"}, - } - } -  -diff --git a/nus_SS/nus_SS.go b/nus_SS/nus_SS.go -index 56fb90b..5f8c12e 100644 ---- a/nus_SS/nus_SS.go -+++ b/nus_SS/nus_SS.go -@@ -10,62 +10,45 @@ import ( - ) -  - type nus_SS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'nus_SS' locale - func New() locales.Translator { - return &nus_SS{ -- locale: "nus_SS", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Tiop", "Pɛt", "Duɔ̱ɔ̱", "Guak", "Duä", "Kor", "Pay", "Thoo", "Tɛɛ", "Laa", "Kur", "Tid"}, -- monthsNarrow: []string{"", "T", "P", "D", "G", "D", "K", "P", "T", "T", "L", "K", "T"}, -- monthsWide: []string{"", "Tiop thar pɛt", "Pɛt", "Duɔ̱ɔ̱ŋ", "Guak", "Duät", "Kornyoot", "Pay yie̱tni", "Tho̱o̱r", "Tɛɛr", "Laath", "Kur", "Tio̱p in di̱i̱t"}, -- daysAbbreviated: []string{"Cäŋ", "Jiec", "Rɛw", "Diɔ̱k", "Ŋuaan", "Dhieec", "Bäkɛl"}, -- daysNarrow: []string{"C", "J", "R", "D", "Ŋ", "D", "B"}, -- daysWide: []string{"Cäŋ kuɔth", "Jiec la̱t", "Rɛw lätni", "Diɔ̱k lätni", "Ŋuaan lätni", "Dhieec lätni", "Bäkɛl lätni"}, -- periodsAbbreviated: []string{"RW", "TŊ"}, -- periodsWide: []string{"RW", "TŊ"}, -- erasAbbreviated: []string{"AY", "ƐY"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"A ka̱n Yecu ni dap", "Ɛ ca Yecu dap"}, -- timezones: map[string]string{"AEDT": "AEDT", "WAST": "WAST", "MYT": "MYT", "HAST": "HAST", "WITA": "WITA", "OEZ": "OEZ", "ART": "ART", "IST": "IST", "PDT": "PDT", "HKT": "HKT", "JST": "JST", "JDT": "JDT", "ECT": "ECT", "∅∅∅": "∅∅∅", "GYT": "GYT", "AKDT": "AKDT", "TMST": "TMST", "HAT": "HAT", "PST": "PST", "HNPM": "HNPM", "WAT": "WAT", "WART": "WART", "HENOMX": "HENOMX", "VET": "VET", "ACWST": "ACWST", "CLT": "CLT", "CAT": "CAT", "HNPMX": "HNPMX", "CDT": "CDT", "WESZ": "WESZ", "TMT": "TMT", "SGT": "SGT", "MST": "MST", "UYT": "UYT", "CHADT": "CHADT", "SAST": "SAST", "HEEG": "HEEG", "EAT": "EAT", "WARST": "WARST", "COST": "COST", "SRT": "SRT", "UYST": "UYST", "WIT": "WIT", "ARST": "ARST", "HNOG": "HNOG", "HNCU": "HNCU", "HECU": "HECU", "HEPMX": "HEPMX", "ADT": "ADT", "ACWDT": "ACWDT", "CHAST": "CHAST", "LHDT": "LHDT", "WIB": "WIB", "NZST": "NZST", "GMT": "GMT", "BT": "BT", "HNT": "HNT", "AWDT": "AWDT", "AKST": "AKST", "MEZ": "MEZ", "ChST": "ChST", "HKST": "HKST", "MESZ": "MESZ", "CLST": "CLST", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "EST": "EST", "WEZ": "WEZ", "ACDT": "ACDT", "CST": "CST", "BOT": "BOT", "COT": "COT", "HEOG": "HEOG", "HEPM": "HEPM", "HNEG": "HNEG", "LHST": "LHST", "ACST": "ACST", "MDT": "MDT", "AST": "AST", "AEST": "AEST", "GFT": "GFT", "EDT": "EDT", "HADT": "HADT", "AWST": "AWST", "NZDT": "NZDT"}, -+ locale: "nus_SS", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "JDT": "JDT", "PDT": "PDT", "∅∅∅": "∅∅∅", "MST": "MST", "BOT": "BOT", "EAT": "EAT", "MEZ": "MEZ", "HNPMX": "HNPMX", "LHST": "LHST", "VET": "VET", "HNT": "HNT", "TMT": "TMT", "EST": "EST", "HKST": "HKST", "NZST": "NZST", "AST": "AST", "HEPM": "HEPM", "AKDT": "AKDT", "OEZ": "OEZ", "ACDT": "ACDT", "ACWDT": "ACWDT", "HECU": "HECU", "AKST": "AKST", "HKT": "HKT", "TMST": "TMST", "WITA": "WITA", "ARST": "ARST", "HNEG": "HNEG", "HEEG": "HEEG", "LHDT": "LHDT", "IST": "IST", "WAST": "WAST", "HEPMX": "HEPMX", "WARST": "WARST", "CLST": "CLST", "WIB": "WIB", "SRT": "SRT", "AEST": "AEST", "CHADT": "CHADT", "HNOG": "HNOG", "HEOG": "HEOG", "EDT": "EDT", "CST": "CST", "CDT": "CDT", "MESZ": "MESZ", "AEDT": "AEDT", "HAT": "HAT", "PST": "PST", "WEZ": "WEZ", "GFT": "GFT", "MDT": "MDT", "ACST": "ACST", "HNNOMX": "HNNOMX", "AWST": "AWST", "HNPM": "HNPM", "COT": "COT", "COST": "COST", "ART": "ART", "JST": "JST", "ACWST": "ACWST", "OESZ": "OESZ", "WIT": "WIT", "ADT": "ADT", "HAST": "HAST", "HENOMX": "HENOMX", "WART": "WART", "WESZ": "WESZ", "SGT": "SGT", "GYT": "GYT", "GMT": "GMT", "ChST": "ChST", "UYST": "UYST", "BT": "BT", "CHAST": "CHAST", "NZDT": "NZDT", "HADT": "HADT", "WAT": "WAT", "HNCU": "HNCU", "SAST": "SAST", "CAT": "CAT", "CLT": "CLT", "ECT": "ECT", "MYT": "MYT", "UYT": "UYT"}, - } - } -  -@@ -111,7 +94,7 @@ func (nus *nus_SS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nus *nus_SS) MonthsAbbreviated() []string { -- return nus.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -121,7 +104,7 @@ func (nus *nus_SS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nus *nus_SS) MonthsNarrow() []string { -- return nus.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -131,7 +114,7 @@ func (nus *nus_SS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nus *nus_SS) MonthsWide() []string { -- return nus.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -177,73 +160,13 @@ func (nus *nus_SS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'nus_SS' and handles both Whole and Real numbers based on 'v' - func (nus *nus_SS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nus.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nus.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nus.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'nus_SS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (nus *nus_SS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nus.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, nus.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, nus.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'nus_SS' -@@ -251,56 +174,7 @@ func (nus *nus_SS) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nus.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nus.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nus.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, nus.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nus.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nus_SS' -@@ -309,68 +183,7 @@ func (nus *nus_SS) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nus.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nus.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nus.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, nus.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nus.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, nus.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nus_SS' -@@ -378,23 +191,6 @@ func (nus *nus_SS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,17 +199,6 @@ func (nus *nus_SS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nus.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -422,17 +207,6 @@ func (nus *nus_SS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nus.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -441,19 +215,6 @@ func (nus *nus_SS) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nus.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nus.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,28 +223,6 @@ func (nus *nus_SS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, nus.periodsAbbreviated[0]...) -- } else { -- b = append(b, nus.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -492,35 +231,6 @@ func (nus *nus_SS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, nus.periodsAbbreviated[0]...) -- } else { -- b = append(b, nus.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -529,40 +239,6 @@ func (nus *nus_SS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, nus.periodsAbbreviated[0]...) -- } else { -- b = append(b, nus.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -571,44 +247,5 @@ func (nus *nus_SS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := nus.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nus.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, nus.periodsAbbreviated[0]...) -- } else { -- b = append(b, nus.periodsAbbreviated[1]...) -- } -- - return string(b) - } -diff --git a/nyn/nyn.go b/nyn/nyn.go -index 43be287..7fa6073 100644 ---- a/nyn/nyn.go -+++ b/nyn/nyn.go -@@ -57,7 +57,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kurisito Atakaijire", "Kurisito Yaijire"}, -- timezones: map[string]string{"CHAST": "CHAST", "UYST": "UYST", "HADT": "HADT", "HKT": "HKT", "HNCU": "HNCU", "HECU": "HECU", "AST": "AST", "MESZ": "MESZ", "JST": "JST", "MYT": "MYT", "AKST": "AKST", "AKDT": "AKDT", "HNOG": "HNOG", "WEZ": "WEZ", "AWDT": "AWDT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "MDT": "MDT", "PST": "PST", "HNT": "HNT", "AEST": "AEST", "LHST": "LHST", "OESZ": "OESZ", "WIB": "WIB", "WIT": "WIT", "ACWST": "ACWST", "IST": "IST", "TMT": "TMT", "CAT": "CAT", "CST": "CST", "AEDT": "AEDT", "ChST": "ChST", "ACDT": "ACDT", "COT": "COT", "ADT": "ADT", "GYT": "GYT", "HKST": "HKST", "NZST": "NZST", "CHADT": "CHADT", "JDT": "JDT", "EST": "EST", "BT": "BT", "ACST": "ACST", "OEZ": "OEZ", "WARST": "WARST", "GMT": "GMT", "ACWDT": "ACWDT", "SAST": "SAST", "CLT": "CLT", "TMST": "TMST", "VET": "VET", "AWST": "AWST", "HEEG": "HEEG", "COST": "COST", "SGT": "SGT", "HEOG": "HEOG", "HAT": "HAT", "HEPM": "HEPM", "GFT": "GFT", "PDT": "PDT", "WESZ": "WESZ", "WITA": "WITA", "HNPM": "HNPM", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "ECT": "ECT", "WART": "WART", "HEPMX": "HEPMX", "HAST": "HAST", "LHDT": "LHDT", "BOT": "BOT", "WAT": "WAT", "WAST": "WAST", "UYT": "UYT", "CDT": "CDT", "MST": "MST", "HNPMX": "HNPMX", "SRT": "SRT", "ART": "ART", "ARST": "ARST", "CLST": "CLST", "HNEG": "HNEG", "EAT": "EAT", "EDT": "EDT"}, -+ timezones: map[string]string{"TMT": "TMT", "∅∅∅": "∅∅∅", "NZST": "NZST", "UYST": "UYST", "WAST": "WAST", "CDT": "CDT", "ARST": "ARST", "SGT": "SGT", "OESZ": "OESZ", "WART": "WART", "CST": "CST", "JDT": "JDT", "HNOG": "HNOG", "EST": "EST", "HKST": "HKST", "AST": "AST", "HNEG": "HNEG", "HENOMX": "HENOMX", "PDT": "PDT", "HNCU": "HNCU", "HEOG": "HEOG", "CAT": "CAT", "BOT": "BOT", "MEZ": "MEZ", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "ART": "ART", "HADT": "HADT", "ACDT": "ACDT", "AWDT": "AWDT", "LHDT": "LHDT", "IST": "IST", "EDT": "EDT", "ACST": "ACST", "CHAST": "CHAST", "WEZ": "WEZ", "HEPMX": "HEPMX", "JST": "JST", "AKST": "AKST", "ChST": "ChST", "EAT": "EAT", "HAST": "HAST", "PST": "PST", "VET": "VET", "GMT": "GMT", "HNPM": "HNPM", "ACWDT": "ACWDT", "AKDT": "AKDT", "WIT": "WIT", "SAST": "SAST", "HKT": "HKT", "CLST": "CLST", "MDT": "MDT", "HNPMX": "HNPMX", "TMST": "TMST", "CLT": "CLT", "NZDT": "NZDT", "ADT": "ADT", "MYT": "MYT", "BT": "BT", "ECT": "ECT", "WIB": "WIB", "AWST": "AWST", "WESZ": "WESZ", "OEZ": "OEZ", "AEST": "AEST", "HECU": "HECU", "COST": "COST", "GFT": "GFT", "COT": "COT", "MST": "MST", "MESZ": "MESZ", "LHST": "LHST", "AEDT": "AEDT", "UYT": "UYT", "WAT": "WAT", "WARST": "WARST", "GYT": "GYT", "WITA": "WITA", "SRT": "SRT", "HEPM": "HEPM", "ACWST": "ACWST", "HNT": "HNT", "HAT": "HAT"}, - } - } -  -diff --git a/nyn_UG/nyn_UG.go b/nyn_UG/nyn_UG.go -index d900ddc..2aa2fc3 100644 ---- a/nyn_UG/nyn_UG.go -+++ b/nyn_UG/nyn_UG.go -@@ -42,22 +42,13 @@ type nyn_UG struct { - // New returns a new instance of translator for the 'nyn_UG' locale - func New() locales.Translator { - return &nyn_UG{ -- locale: "nyn_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "KBZ", "KBR", "KST", "KKN", "KTN", "KMK", "KMS", "KMN", "KMW", "KKM", "KNK", "KNB"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Okwokubanza", "Okwakabiri", "Okwakashatu", "Okwakana", "Okwakataana", "Okwamukaaga", "Okwamushanju", "Okwamunaana", "Okwamwenda", "Okwaikumi", "Okwaikumi na kumwe", "Okwaikumi na ibiri"}, -- daysAbbreviated: []string{"SAN", "ORK", "OKB", "OKS", "OKN", "OKT", "OMK"}, -- daysNarrow: []string{"S", "K", "R", "S", "N", "T", "M"}, -- daysWide: []string{"Sande", "Orwokubanza", "Orwakabiri", "Orwakashatu", "Orwakana", "Orwakataano", "Orwamukaaga"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kurisito Atakaijire", "Kurisito Yaijire"}, -- timezones: map[string]string{"EAT": "EAT", "CST": "CST", "ACWDT": "ACWDT", "HKT": "HKT", "CHADT": "CHADT", "JST": "JST", "TMT": "TMT", "OESZ": "OESZ", "HNCU": "HNCU", "UYT": "UYT", "SRT": "SRT", "AEDT": "AEDT", "ECT": "ECT", "WART": "WART", "HKST": "HKST", "CLT": "CLT", "MYT": "MYT", "AEST": "AEST", "HNPM": "HNPM", "BOT": "BOT", "ACDT": "ACDT", "WITA": "WITA", "MEZ": "MEZ", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "COT": "COT", "COST": "COST", "AKDT": "AKDT", "AWST": "AWST", "AST": "AST", "ADT": "ADT", "HNOG": "HNOG", "NZDT": "NZDT", "MST": "MST", "HNPMX": "HNPMX", "UYST": "UYST", "HADT": "HADT", "WIT": "WIT", "HNT": "HNT", "IST": "IST", "ARST": "ARST", "NZST": "NZST", "JDT": "JDT", "OEZ": "OEZ", "EDT": "EDT", "HEPMX": "HEPMX", "CDT": "CDT", "WESZ": "WESZ", "WAT": "WAT", "AKST": "AKST", "BT": "BT", "AWDT": "AWDT", "HNEG": "HNEG", "SAST": "SAST", "CLST": "CLST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "EST": "EST", "VET": "VET", "HAT": "HAT", "GFT": "GFT", "GMT": "GMT", "WIB": "WIB", "WEZ": "WEZ", "LHDT": "LHDT", "WARST": "WARST", "HAST": "HAST", "HEOG": "HEOG", "PST": "PST", "PDT": "PDT", "WAST": "WAST", "SGT": "SGT", "MDT": "MDT", "ART": "ART", "CHAST": "CHAST", "CAT": "CAT", "HECU": "HECU", "GYT": "GYT", "HEPM": "HEPM", "ChST": "ChST", "ACWST": "ACWST", "LHST": "LHST", "TMST": "TMST", "ACST": "ACST"}, -+ locale: "nyn_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EST": "EST", "MDT": "MDT", "HAST": "HAST", "WARST": "WARST", "COT": "COT", "UYST": "UYST", "ACWDT": "ACWDT", "WAST": "WAST", "SAST": "SAST", "HEPM": "HEPM", "GMT": "GMT", "MESZ": "MESZ", "PDT": "PDT", "HNT": "HNT", "AST": "AST", "CLT": "CLT", "ARST": "ARST", "SGT": "SGT", "COST": "COST", "TMT": "TMT", "EAT": "EAT", "ACWST": "ACWST", "GFT": "GFT", "TMST": "TMST", "CLST": "CLST", "NZDT": "NZDT", "ACST": "ACST", "ACDT": "ACDT", "HKST": "HKST", "MST": "MST", "HNCU": "HNCU", "AKDT": "AKDT", "HEEG": "HEEG", "JST": "JST", "AWST": "AWST", "MYT": "MYT", "CHADT": "CHADT", "IST": "IST", "AEDT": "AEDT", "WAT": "WAT", "ECT": "ECT", "SRT": "SRT", "AEST": "AEST", "WEZ": "WEZ", "HEPMX": "HEPMX", "OEZ": "OEZ", "WITA": "WITA", "ART": "ART", "ChST": "ChST", "HNEG": "HNEG", "LHST": "LHST", "WESZ": "WESZ", "OESZ": "OESZ", "WIT": "WIT", "HKT": "HKT", "HEOG": "HEOG", "WIB": "WIB", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "GYT": "GYT", "HNOG": "HNOG", "CAT": "CAT", "HNPM": "HNPM", "WART": "WART", "∅∅∅": "∅∅∅", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "NZST": "NZST", "MEZ": "MEZ", "AWDT": "AWDT", "UYT": "UYT", "PST": "PST", "VET": "VET", "EDT": "EDT", "CDT": "CDT", "AKST": "AKST", "LHDT": "LHDT", "JDT": "JDT", "CST": "CST", "BOT": "BOT", "HADT": "HADT", "BT": "BT", "HECU": "HECU", "HAT": "HAT", "ADT": "ADT"}, - } - } -  -@@ -110,7 +101,7 @@ func (nyn *nyn_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (nyn *nyn_UG) MonthsAbbreviated() []string { -- return nyn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -120,7 +111,7 @@ func (nyn *nyn_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (nyn *nyn_UG) MonthsNarrow() []string { -- return nyn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -130,7 +121,7 @@ func (nyn *nyn_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (nyn *nyn_UG) MonthsWide() []string { -- return nyn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,56 +181,7 @@ func (nyn *nyn_UG) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nyn.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nyn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nyn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, nyn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nyn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'nyn_UG' -@@ -248,64 +190,7 @@ func (nyn *nyn_UG) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := nyn.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, nyn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, nyn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, nyn.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, nyn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'nyn_UG' -@@ -313,27 +198,6 @@ func (nyn *nyn_UG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -342,17 +206,6 @@ func (nyn *nyn_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nyn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -361,17 +214,6 @@ func (nyn *nyn_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nyn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -380,19 +222,6 @@ func (nyn *nyn_UG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, nyn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, nyn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -401,19 +230,6 @@ func (nyn *nyn_UG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -422,26 +238,6 @@ func (nyn *nyn_UG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -450,30 +246,6 @@ func (nyn *nyn_UG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -482,34 +254,5 @@ func (nyn *nyn_UG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, nyn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := nyn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/om/om.go b/om/om.go -index aac3370..fc20917 100644 ---- a/om/om.go -+++ b/om/om.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"WIT": "WIT", "PST": "PST", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "ECT": "ECT", "CHADT": "CHADT", "LHST": "LHST", "CDT": "CDT", "HEPMX": "HEPMX", "CST": "CST", "BT": "BT", "AEDT": "AEDT", "HNPM": "HNPM", "MESZ": "MESZ", "WAST": "WAST", "HENOMX": "HENOMX", "SGT": "SGT", "AST": "AST", "AEST": "AEST", "SAST": "SAST", "GFT": "GFT", "WAT": "WAT", "HNCU": "HNCU", "GYT": "GYT", "UYST": "UYST", "AKDT": "AKDT", "SRT": "SRT", "HNT": "HNT", "HEPM": "HEPM", "COST": "COST", "HNNOMX": "HNNOMX", "HECU": "HECU", "JDT": "JDT", "ChST": "ChST", "WEZ": "WEZ", "WESZ": "WESZ", "VET": "VET", "HKT": "HKT", "CLT": "CLT", "HEEG": "HEEG", "HNPMX": "HNPMX", "BOT": "BOT", "WIB": "WIB", "AWST": "AWST", "CLST": "CLST", "TMST": "TMST", "AKST": "AKST", "ACST": "ACST", "OEZ": "OEZ", "HNOG": "HNOG", "PDT": "PDT", "CHAST": "CHAST", "MEZ": "MEZ", "NZDT": "NZDT", "JST": "JST", "UYT": "UYT", "NZST": "NZST", "EAT": "EAT", "WARST": "WARST", "EDT": "EDT", "ART": "ART", "IST": "IST", "ACDT": "ACDT", "HAST": "HAST", "HAT": "HAT", "LHDT": "LHDT", "GMT": "GMT", "EST": "EST", "ADT": "ADT", "HADT": "HADT", "ACWST": "ACWST", "HKST": "HKST", "TMT": "TMT", "OESZ": "OESZ", "MDT": "MDT", "MST": "MST", "MYT": "MYT", "ARST": "ARST", "HEOG": "HEOG", "WITA": "WITA", "CAT": "CAT", "WART": "WART", "COT": "COT", "ACWDT": "ACWDT"}, -+ timezones: map[string]string{"CHADT": "CHADT", "WEZ": "WEZ", "HKT": "HKT", "ECT": "ECT", "HENOMX": "HENOMX", "MYT": "MYT", "PDT": "PDT", "HNCU": "HNCU", "HECU": "HECU", "EDT": "EDT", "TMT": "TMT", "PST": "PST", "GYT": "GYT", "CDT": "CDT", "AWST": "AWST", "OESZ": "OESZ", "CLT": "CLT", "MEZ": "MEZ", "ACWDT": "ACWDT", "OEZ": "OEZ", "NZDT": "NZDT", "∅∅∅": "∅∅∅", "BT": "BT", "CLST": "CLST", "ADT": "ADT", "COT": "COT", "COST": "COST", "NZST": "NZST", "CAT": "CAT", "GMT": "GMT", "ART": "ART", "ACDT": "ACDT", "LHST": "LHST", "HAT": "HAT", "WIT": "WIT", "HKST": "HKST", "EAT": "EAT", "MESZ": "MESZ", "TMST": "TMST", "WITA": "WITA", "WIB": "WIB", "UYST": "UYST", "AST": "AST", "MDT": "MDT", "HNEG": "HNEG", "LHDT": "LHDT", "JST": "JST", "ACWST": "ACWST", "AEST": "AEST", "HNT": "HNT", "HEEG": "HEEG", "AWDT": "AWDT", "HNPM": "HNPM", "AEDT": "AEDT", "HNPMX": "HNPMX", "WAST": "WAST", "WART": "WART", "GFT": "GFT", "HADT": "HADT", "ACST": "ACST", "HEPM": "HEPM", "IST": "IST", "UYT": "UYT", "WESZ": "WESZ", "VET": "VET", "EST": "EST", "ChST": "ChST", "CHAST": "CHAST", "SAST": "SAST", "MST": "MST", "HAST": "HAST", "JDT": "JDT", "SGT": "SGT", "WAT": "WAT", "AKDT": "AKDT", "HEOG": "HEOG", "ARST": "ARST", "SRT": "SRT", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "CST": "CST", "BOT": "BOT", "AKST": "AKST", "WARST": "WARST", "HNOG": "HNOG"}, - } - } -  -diff --git a/om_ET/om_ET.go b/om_ET/om_ET.go -index 0c1bcb4..7a107c8 100644 ---- a/om_ET/om_ET.go -+++ b/om_ET/om_ET.go -@@ -42,32 +42,13 @@ type om_ET struct { - // New returns a new instance of translator for the 'om_ET' locale - func New() locales.Translator { - return &om_ET{ -- locale: "om_ET", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Ama", "Gur", "Bit", "Elb", "Cam", "Wax", "Ado", "Hag", "Ful", "Onk", "Sad", "Mud"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Amajjii", "Guraandhala", "Bitooteessa", "Elba", "Caamsa", "Waxabajjii", "Adooleessa", "Hagayya", "Fuulbana", "Onkololeessa", "Sadaasa", "Muddee"}, -- daysAbbreviated: []string{"Dil", "Wix", "Qib", "Rob", "Kam", "Jim", "San"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Dil", "Wix", "Qib", "Rob", "Kam", "Jim", "San"}, -- daysWide: []string{"Dilbata", "Wiixata", "Qibxata", "Roobii", "Kamiisa", "Jimaata", "Sanbata"}, -- periodsAbbreviated: []string{"WD", "WB"}, -- periodsNarrow: []string{"WD", "WB"}, -- periodsWide: []string{"WD", "WB"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"EST": "EST", "HEPMX": "HEPMX", "UYST": "UYST", "CST": "CST", "GYT": "GYT", "CAT": "CAT", "OESZ": "OESZ", "MDT": "MDT", "UYT": "UYT", "CHADT": "CHADT", "GFT": "GFT", "EAT": "EAT", "ECT": "ECT", "SGT": "SGT", "BOT": "BOT", "WAST": "WAST", "AKDT": "AKDT", "ACWDT": "ACWDT", "CLST": "CLST", "GMT": "GMT", "MYT": "MYT", "SAST": "SAST", "JST": "JST", "JDT": "JDT", "HNCU": "HNCU", "WITA": "WITA", "HNPM": "HNPM", "HEPM": "HEPM", "NZST": "NZST", "ACDT": "ACDT", "COST": "COST", "WARST": "WARST", "COT": "COT", "WIT": "WIT", "ACWST": "ACWST", "HNT": "HNT", "IST": "IST", "∅∅∅": "∅∅∅", "ACST": "ACST", "AKST": "AKST", "HEOG": "HEOG", "TMST": "TMST", "WART": "WART", "EDT": "EDT", "WIB": "WIB", "VET": "VET", "WESZ": "WESZ", "ARST": "ARST", "HNOG": "HNOG", "CLT": "CLT", "HNNOMX": "HNNOMX", "AWST": "AWST", "HEEG": "HEEG", "HADT": "HADT", "SRT": "SRT", "AEDT": "AEDT", "HKT": "HKT", "MST": "MST", "HNPMX": "HNPMX", "AST": "AST", "WEZ": "WEZ", "AEST": "AEST", "HKST": "HKST", "CHAST": "CHAST", "HNEG": "HNEG", "OEZ": "OEZ", "HAT": "HAT", "ChST": "ChST", "WAT": "WAT", "PDT": "PDT", "AWDT": "AWDT", "MESZ": "MESZ", "NZDT": "NZDT", "ADT": "ADT", "HAST": "HAST", "HECU": "HECU", "CDT": "CDT", "LHDT": "LHDT", "TMT": "TMT", "HENOMX": "HENOMX", "ART": "ART", "MEZ": "MEZ", "LHST": "LHST", "BT": "BT", "PST": "PST"}, -+ locale: "om_ET", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "BT": "BT", "ACWST": "ACWST", "UYT": "UYT", "WEZ": "WEZ", "OEZ": "OEZ", "HAT": "HAT", "ACST": "ACST", "TMT": "TMT", "MST": "MST", "AST": "AST", "HNOG": "HNOG", "HNCU": "HNCU", "OESZ": "OESZ", "WIT": "WIT", "HKT": "HKT", "CAT": "CAT", "ChST": "ChST", "PDT": "PDT", "LHDT": "LHDT", "AEDT": "AEDT", "ECT": "ECT", "ARST": "ARST", "HENOMX": "HENOMX", "HEPM": "HEPM", "AEST": "AEST", "UYST": "UYST", "CLT": "CLT", "WITA": "WITA", "ACDT": "ACDT", "TMST": "TMST", "ACWDT": "ACWDT", "HNT": "HNT", "HADT": "HADT", "HEEG": "HEEG", "COST": "COST", "EST": "EST", "NZDT": "NZDT", "WIB": "WIB", "BOT": "BOT", "IST": "IST", "HNPMX": "HNPMX", "SAST": "SAST", "SRT": "SRT", "PST": "PST", "CHADT": "CHADT", "WAST": "WAST", "AKDT": "AKDT", "COT": "COT", "HEOG": "HEOG", "EDT": "EDT", "HKST": "HKST", "JDT": "JDT", "MDT": "MDT", "WESZ": "WESZ", "SGT": "SGT", "WAT": "WAT", "CST": "CST", "CDT": "CDT", "ART": "ART", "EAT": "EAT", "MESZ": "MESZ", "AKST": "AKST", "NZST": "NZST", "GMT": "GMT", "AWST": "AWST", "LHST": "LHST", "CHAST": "CHAST", "AWDT": "AWDT", "WARST": "WARST", "ADT": "ADT", "WART": "WART", "CLST": "CLST", "HNPM": "HNPM", "HNNOMX": "HNNOMX", "MYT": "MYT", "∅∅∅": "∅∅∅", "GFT": "GFT", "GYT": "GYT", "MEZ": "MEZ", "VET": "VET", "HECU": "HECU", "HEPMX": "HEPMX", "HAST": "HAST", "JST": "JST"}, - } - } -  -@@ -120,7 +101,7 @@ func (om *om_ET) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (om *om_ET) MonthsAbbreviated() []string { -- return om.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +111,7 @@ func (om *om_ET) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (om *om_ET) MonthsNarrow() []string { -- return om.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -140,7 +121,7 @@ func (om *om_ET) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (om *om_ET) MonthsWide() []string { -- return om.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,73 +167,13 @@ func (om *om_ET) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'om_ET' and handles both Whole and Real numbers based on 'v' - func (om *om_ET) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, om.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, om.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'om_ET' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (om *om_ET) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, om.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, om.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'om_ET' -@@ -260,56 +181,7 @@ func (om *om_ET) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := om.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, om.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, om.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, om.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'om_ET' -@@ -318,64 +190,7 @@ func (om *om_ET) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := om.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, om.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, om.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, om.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'om_ET' -@@ -383,27 +198,6 @@ func (om *om_ET) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -412,21 +206,6 @@ func (om *om_ET) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, om.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,21 +214,6 @@ func (om *om_ET) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, om.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,19 +222,6 @@ func (om *om_ET) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, om.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, om.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -479,28 +230,6 @@ func (om *om_ET) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, om.periodsAbbreviated[0]...) -- } else { -- b = append(b, om.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -509,35 +238,6 @@ func (om *om_ET) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, om.periodsAbbreviated[0]...) -- } else { -- b = append(b, om.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -546,40 +246,6 @@ func (om *om_ET) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, om.periodsAbbreviated[0]...) -- } else { -- b = append(b, om.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -588,44 +254,5 @@ func (om *om_ET) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, om.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, om.periodsAbbreviated[0]...) -- } else { -- b = append(b, om.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := om.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/om_KE/om_KE.go b/om_KE/om_KE.go -index 8c6d339..627e816 100644 ---- a/om_KE/om_KE.go -+++ b/om_KE/om_KE.go -@@ -42,32 +42,18 @@ type om_KE struct { - // New returns a new instance of translator for the 'om_KE' locale - func New() locales.Translator { - return &om_KE{ -- locale: "om_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Ama", "Gur", "Bit", "Elb", "Cam", "Wax", "Ado", "Hag", "Ful", "Onk", "Sad", "Mud"}, -- monthsNarrow: []string{"", "A", "G", "B", "E", "C", "W", "A", "H", "F", "O", "S", "M"}, -- monthsWide: []string{"", "Amajjii", "Guraandhala", "Bitooteessa", "Elba", "Caamsa", "Waxabajjii", "Adooleessa", "Hagayya", "Fuulbana", "Onkololeessa", "Sadaasa", "Muddee"}, -- daysAbbreviated: []string{"Dil", "Wix", "Qib", "Rob", "Kam", "Jim", "San"}, -- daysNarrow: []string{"D", "W", "Q", "R", "K", "J", "S"}, -- daysShort: []string{"Dil", "Wix", "Qib", "Rob", "Kam", "Jim", "San"}, -- daysWide: []string{"Dilbata", "Wiixata", "Qibxata", "Roobii", "Kamiisa", "Jimaata", "Sanbata"}, -- periodsAbbreviated: []string{"WD", "WB"}, -- periodsNarrow: []string{"WD", "WB"}, -- periodsWide: []string{"WD", "WB"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNOG": "HNOG", "AWST": "AWST", "HENOMX": "HENOMX", "WIB": "WIB", "HEPMX": "HEPMX", "PST": "PST", "WEZ": "WEZ", "HEPM": "HEPM", "HNEG": "HNEG", "WART": "WART", "GMT": "GMT", "ART": "ART", "GFT": "GFT", "WARST": "WARST", "HAST": "HAST", "MESZ": "MESZ", "EAT": "EAT", "COT": "COT", "PDT": "PDT", "UYST": "UYST", "CST": "CST", "WESZ": "WESZ", "ACWDT": "ACWDT", "LHST": "LHST", "EST": "EST", "AST": "AST", "MEZ": "MEZ", "SAST": "SAST", "JST": "JST", "CLST": "CLST", "BOT": "BOT", "∅∅∅": "∅∅∅", "HEOG": "HEOG", "HKT": "HKT", "WITA": "WITA", "ACST": "ACST", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "MST": "MST", "WIT": "WIT", "ARST": "ARST", "NZST": "NZST", "HNCU": "HNCU", "ACDT": "ACDT", "WAT": "WAT", "AKDT": "AKDT", "VET": "VET", "HNT": "HNT", "AWDT": "AWDT", "WAST": "WAST", "MYT": "MYT", "GYT": "GYT", "AKST": "AKST", "BT": "BT", "HKST": "HKST", "CHADT": "CHADT", "IST": "IST", "JDT": "JDT", "HNPMX": "HNPMX", "COST": "COST", "ChST": "ChST", "CDT": "CDT", "HAT": "HAT", "HECU": "HECU", "HNPM": "HNPM", "LHDT": "LHDT", "CHAST": "CHAST", "TMT": "TMT", "HEEG": "HEEG", "ECT": "ECT", "OEZ": "OEZ", "ACWST": "ACWST", "EDT": "EDT", "ADT": "ADT", "UYT": "UYT", "HADT": "HADT", "SRT": "SRT", "SGT": "SGT", "AEST": "AEST", "NZDT": "NZDT", "CAT": "CAT", "MDT": "MDT", "CLT": "CLT", "TMST": "TMST", "AEDT": "AEDT"}, -+ locale: "om_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsNarrow: []string{"", "A", "G", "B", "E", "C", "W", "A", "H", "F", "O", "S", "M"}, -+ daysNarrow: []string{"D", "W", "Q", "R", "K", "J", "S"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"", ""}, -+ timezones: map[string]string{"WESZ": "WESZ", "WART": "WART", "EST": "EST", "BOT": "BOT", "UYST": "UYST", "ACWST": "ACWST", "CHAST": "CHAST", "VET": "VET", "HKST": "HKST", "MDT": "MDT", "NZDT": "NZDT", "HADT": "HADT", "AEDT": "AEDT", "WEZ": "WEZ", "HECU": "HECU", "HEPMX": "HEPMX", "AKST": "AKST", "CLST": "CLST", "WITA": "WITA", "ACDT": "ACDT", "MESZ": "MESZ", "HNPM": "HNPM", "JDT": "JDT", "CLT": "CLT", "CDT": "CDT", "ChST": "ChST", "UYT": "UYT", "TMT": "TMT", "GMT": "GMT", "HAST": "HAST", "ACST": "ACST", "PDT": "PDT", "OESZ": "OESZ", "WIB": "WIB", "MEZ": "MEZ", "PST": "PST", "EAT": "EAT", "LHDT": "LHDT", "MYT": "MYT", "IST": "IST", "ECT": "ECT", "ART": "ART", "ARST": "ARST", "WIT": "WIT", "SAST": "SAST", "GYT": "GYT", "TMST": "TMST", "NZST": "NZST", "CHADT": "CHADT", "AEST": "AEST", "HENOMX": "HENOMX", "HNCU": "HNCU", "WARST": "WARST", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "AST": "AST", "HEEG": "HEEG", "OEZ": "OEZ", "HNOG": "HNOG", "JST": "JST", "BT": "BT", "COST": "COST", "CAT": "CAT", "LHST": "LHST", "AKDT": "AKDT", "GFT": "GFT", "EDT": "EDT", "HKT": "HKT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "SGT": "SGT", "COT": "COT", "CST": "CST", "SRT": "SRT", "ACWDT": "ACWDT", "WAT": "WAT", "HNT": "HNT", "AWDT": "AWDT", "HEPM": "HEPM", "HNPMX": "HNPMX", "WAST": "WAST", "HAT": "HAT", "MST": "MST", "ADT": "ADT", "AWST": "AWST"}, - } - } -  -@@ -120,7 +106,7 @@ func (om *om_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (om *om_KE) MonthsAbbreviated() []string { -- return om.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -140,7 +126,7 @@ func (om *om_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (om *om_KE) MonthsWide() []string { -- return om.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,73 +172,13 @@ func (om *om_KE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'om_KE' and handles both Whole and Real numbers based on 'v' - func (om *om_KE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, om.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, om.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'om_KE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (om *om_KE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, om.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, om.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'om_KE' -@@ -260,56 +186,7 @@ func (om *om_KE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := om.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, om.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, om.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, om.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'om_KE' -@@ -318,64 +195,7 @@ func (om *om_KE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := om.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, om.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, om.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, om.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, om.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'om_KE' -@@ -383,27 +203,6 @@ func (om *om_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -412,21 +211,6 @@ func (om *om_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, om.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -435,21 +219,6 @@ func (om *om_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, om.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,19 +227,6 @@ func (om *om_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, om.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, om.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/or/or.go b/or/or.go -index 2a93a6a..632c9ec 100644 ---- a/or/or.go -+++ b/or/or.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - periodsAbbreviated: []string{"am", "pm"}, - periodsNarrow: []string{"am", "pm"}, - periodsWide: []string{"am", "pm"}, -- timezones: map[string]string{"COT": "COT", "EDT": "EDT", "PST": "PST", "CHAST": "CHAST", "HEEG": "HEEG", "BOT": "BOT", "OEZ": "OEZ", "WART": "WART", "GYT": "GYT", "NZST": "NZST", "NZDT": "NZDT", "MST": "MST", "HNT": "HNT", "HAT": "HAT", "CLT": "CLT", "MESZ": "MESZ", "MDT": "MDT", "MYT": "MYT", "BT": "BT", "WESZ": "WESZ", "HEPM": "HEPM", "HNPM": "HNPM", "AST": "AST", "HNOG": "HNOG", "WITA": "WITA", "AEST": "AEST", "AWDT": "AWDT", "GMT": "GMT", "PDT": "PDT", "JST": "JST", "TMT": "TMT", "ChST": "ChST", "HKST": "HKST", "JDT": "JDT", "WAST": "WAST", "ECT": "ECT", "HEPMX": "HEPMX", "WIT": "WIT", "HADT": "HADT", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HECU": "HECU", "ACWDT": "ACWDT", "COST": "COST", "IST": "IST", "ACST": "ACST", "WAT": "WAT", "ART": "ART", "ARST": "ARST", "HEOG": "HEOG", "CHADT": "CHADT", "LHDT": "LHDT", "CLST": "CLST", "AKST": "AKST", "AKDT": "AKDT", "HAST": "HAST", "HKT": "HKT", "LHST": "LHST", "CST": "CST", "OESZ": "OESZ", "CAT": "CAT", "HENOMX": "HENOMX", "WARST": "WARST", "HNPMX": "HNPMX", "TMST": "TMST", "CDT": "CDT", "ADT": "ADT", "UYST": "UYST", "WIB": "WIB", "SRT": "SRT", "EAT": "EAT", "EST": "EST", "ACWST": "ACWST", "WEZ": "WEZ", "AWST": "AWST", "SAST": "SAST", "GFT": "GFT", "MEZ": "MEZ", "HNEG": "HNEG", "ACDT": "ACDT", "∅∅∅": "∅∅∅", "SGT": "SGT", "UYT": "UYT", "VET": "VET", "AEDT": "AEDT"}, -+ timezones: map[string]string{"MESZ": "MESZ", "JST": "JST", "HNCU": "HNCU", "HNT": "HNT", "HNOG": "HNOG", "EDT": "EDT", "ADT": "ADT", "BOT": "BOT", "MYT": "MYT", "IST": "IST", "VET": "VET", "OEZ": "OEZ", "GFT": "GFT", "HAT": "HAT", "GMT": "GMT", "CAT": "CAT", "HNEG": "HNEG", "HNPM": "HNPM", "ACWDT": "ACWDT", "GYT": "GYT", "COST": "COST", "EST": "EST", "TMST": "TMST", "CDT": "CDT", "AST": "AST", "MEZ": "MEZ", "LHDT": "LHDT", "WIB": "WIB", "ACDT": "ACDT", "HEPM": "HEPM", "UYST": "UYST", "PST": "PST", "PDT": "PDT", "AKST": "AKST", "HKST": "HKST", "ECT": "ECT", "HADT": "HADT", "UYT": "UYT", "∅∅∅": "∅∅∅", "WAT": "WAT", "NZST": "NZST", "ARST": "ARST", "SRT": "SRT", "ACST": "ACST", "ACWST": "ACWST", "HECU": "HECU", "COT": "COT", "HKT": "HKT", "WITA": "WITA", "JDT": "JDT", "AWDT": "AWDT", "AEST": "AEST", "AEDT": "AEDT", "CHAST": "CHAST", "HNPMX": "HNPMX", "SGT": "SGT", "HENOMX": "HENOMX", "WEZ": "WEZ", "WESZ": "WESZ", "WARST": "WARST", "SAST": "SAST", "TMT": "TMT", "HEPMX": "HEPMX", "HEOG": "HEOG", "NZDT": "NZDT", "EAT": "EAT", "AWST": "AWST", "LHST": "LHST", "CLT": "CLT", "CLST": "CLST", "CHADT": "CHADT", "BT": "BT", "WART": "WART", "CST": "CST", "HAST": "HAST", "HEEG": "HEEG", "AKDT": "AKDT", "OESZ": "OESZ", "WIT": "WIT", "ART": "ART", "MDT": "MDT", "MST": "MST", "HNNOMX": "HNNOMX", "WAST": "WAST", "ChST": "ChST"}, - } - } -  -diff --git a/or_IN/or_IN.go b/or_IN/or_IN.go -index de3cf52..c29a551 100644 ---- a/or_IN/or_IN.go -+++ b/or_IN/or_IN.go -@@ -10,60 +10,45 @@ import ( - ) -  - type or_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'or_IN' locale - func New() locales.Translator { - return &or_IN{ -- locale: "or_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ଜାନୁଆରୀ", "ଫେବୃଆରୀ", "ମାର୍ଚ୍ଚ", "ଅପ୍ରେଲ", "ମଇ", "ଜୁନ", "ଜୁଲାଇ", "ଅଗଷ୍ଟ", "ସେପ୍ଟେମ୍ବର", "ଅକ୍ଟୋବର", "ନଭେମ୍ବର", "ଡିସେମ୍ବର"}, -- monthsNarrow: []string{"", "ଜା", "ଫେ", "ମା", "ଅ", "ମଇ", "ଜୁ", "ଜୁ", "ଅ", "ସେ", "ଅ", "ନ", "ଡି"}, -- monthsWide: []string{"", "ଜାନୁଆରୀ", "ଫେବୃଆରୀ", "ମାର୍ଚ୍ଚ", "ଅପ୍ରେଲ", "ମଇ", "ଜୁନ", "ଜୁଲାଇ", "ଅଗଷ୍ଟ", "ସେପ୍ଟେମ୍ବର", "ଅକ୍ଟୋବର", "ନଭେମ୍ବର", "ଡିସେମ୍ବର"}, -- daysAbbreviated: []string{"ରବି", "ସୋମ", "ମଙ୍ଗଳ", "ବୁଧ", "ଗୁରୁ", "ଶୁକ୍ର", "ଶନି"}, -- daysNarrow: []string{"ର", "ସୋ", "ମ", "ବୁ", "ଗୁ", "ଶୁ", "ଶ"}, -- daysWide: []string{"ରବିବାର", "ସୋମବାର", "ମଙ୍ଗଳବାର", "ବୁଧବାର", "ଗୁରୁବାର", "ଶୁକ୍ରବାର", "ଶନିବାର"}, -- periodsAbbreviated: []string{"am", "pm"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"am", "pm"}, -- timezones: map[string]string{"EST": "EST", "CST": "CST", "MDT": "MDT", "BT": "BT", "MEZ": "MEZ", "CLT": "CLT", "HNPMX": "HNPMX", "ACST": "ACST", "HENOMX": "HENOMX", "HECU": "HECU", "MST": "MST", "SRT": "SRT", "HAT": "HAT", "CLST": "CLST", "UYT": "UYT", "HAST": "HAST", "HNOG": "HNOG", "HEEG": "HEEG", "ACDT": "ACDT", "WARST": "WARST", "ACWST": "ACWST", "AEST": "AEST", "NZST": "NZST", "SAST": "SAST", "EAT": "EAT", "ADT": "ADT", "VET": "VET", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "JST": "JST", "OEZ": "OEZ", "ChST": "ChST", "OESZ": "OESZ", "COST": "COST", "WESZ": "WESZ", "HKST": "HKST", "HEPM": "HEPM", "JDT": "JDT", "HNEG": "HNEG", "AKDT": "AKDT", "UYST": "UYST", "WIB": "WIB", "HNPM": "HNPM", "LHDT": "LHDT", "GFT": "GFT", "SGT": "SGT", "ART": "ART", "WAT": "WAT", "CAT": "CAT", "HEPMX": "HEPMX", "AKST": "AKST", "MYT": "MYT", "HKT": "HKT", "AWDT": "AWDT", "CHADT": "CHADT", "LHST": "LHST", "ECT": "ECT", "PST": "PST", "AEDT": "AEDT", "AWST": "AWST", "COT": "COT", "HNT": "HNT", "WART": "WART", "EDT": "EDT", "HADT": "HADT", "BOT": "BOT", "WAST": "WAST", "HNCU": "HNCU", "CDT": "CDT", "TMT": "TMT", "AST": "AST", "ACWDT": "ACWDT", "PDT": "PDT", "WEZ": "WEZ", "NZDT": "NZDT", "IST": "IST", "TMST": "TMST", "HNNOMX": "HNNOMX", "GMT": "GMT", "WIT": "WIT", "ARST": "ARST", "HEOG": "HEOG", "WITA": "WITA", "CHAST": "CHAST", "GYT": "GYT"}, -+ locale: "or_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "ACST": "ACST", "AWST": "AWST", "PDT": "PDT", "WAT": "WAT", "OEZ": "OEZ", "NZST": "NZST", "AWDT": "AWDT", "HEPM": "HEPM", "WEZ": "WEZ", "TMT": "TMT", "CAT": "CAT", "LHST": "LHST", "∅∅∅": "∅∅∅", "WITA": "WITA", "ECT": "ECT", "ACWDT": "ACWDT", "WESZ": "WESZ", "OESZ": "OESZ", "HEOG": "HEOG", "ChST": "ChST", "SRT": "SRT", "ACDT": "ACDT", "PST": "PST", "WAST": "WAST", "HKT": "HKT", "ART": "ART", "HENOMX": "HENOMX", "JDT": "JDT", "WIT": "WIT", "HKST": "HKST", "CLST": "CLST", "CST": "CST", "ACWST": "ACWST", "AEDT": "AEDT", "CHADT": "CHADT", "HECU": "HECU", "CLT": "CLT", "GMT": "GMT", "SGT": "SGT", "HNCU": "HNCU", "HNPMX": "HNPMX", "AKST": "AKST", "WARST": "WARST", "SAST": "SAST", "EDT": "EDT", "HADT": "HADT", "LHDT": "LHDT", "WART": "WART", "HNOG": "HNOG", "EST": "EST", "CDT": "CDT", "MST": "MST", "HEEG": "HEEG", "MYT": "MYT", "IST": "IST", "VET": "VET", "AKDT": "AKDT", "HNEG": "HNEG", "COT": "COT", "TMST": "TMST", "AST": "AST", "ARST": "ARST", "HAST": "HAST", "BT": "BT", "UYT": "UYT", "UYST": "UYST", "HAT": "HAT", "WIB": "WIB", "EAT": "EAT", "AEST": "AEST", "GFT": "GFT", "GYT": "GYT", "COST": "COST", "NZDT": "NZDT", "BOT": "BOT", "MESZ": "MESZ", "MDT": "MDT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "JST": "JST", "CHAST": "CHAST", "HEPMX": "HEPMX", "HNT": "HNT", "ADT": "ADT"}, - } - } -  -@@ -116,7 +101,7 @@ func (or *or_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (or *or_IN) MonthsAbbreviated() []string { -- return or.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (or *or_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (or *or_IN) MonthsNarrow() []string { -- return or.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (or *or_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (or *or_IN) MonthsWide() []string { -- return or.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -182,82 +167,13 @@ func (or *or_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'or_IN' and handles both Whole and Real numbers based on 'v' - func (or *or_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, or.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, or.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, or.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'or_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (or *or_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, or.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, or.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, or.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'or_IN' -@@ -265,69 +181,7 @@ func (or *or_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := or.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, or.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, or.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(or.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, or.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, or.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, or.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'or_IN' -@@ -336,81 +190,7 @@ func (or *or_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := or.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, or.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, or.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(or.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, or.currencyNegativePrefix[j]) -- } -- -- b = append(b, or.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(or.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, or.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, or.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'or_IN' -@@ -418,17 +198,6 @@ func (or *or_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -437,17 +206,6 @@ func (or *or_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, or.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,17 +214,6 @@ func (or *or_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, or.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,19 +222,6 @@ func (or *or_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, or.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, or.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -496,28 +230,6 @@ func (or *or_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, or.periodsAbbreviated[0]...) -- } else { -- b = append(b, or.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -526,35 +238,6 @@ func (or *or_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, or.periodsAbbreviated[0]...) -- } else { -- b = append(b, or.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -563,40 +246,6 @@ func (or *or_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, or.periodsAbbreviated[0]...) -- } else { -- b = append(b, or.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,44 +254,5 @@ func (or *or_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, or.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, or.periodsAbbreviated[0]...) -- } else { -- b = append(b, or.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := or.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/os/os.go b/os/os.go -index 845b545..bbdc547 100644 ---- a/os/os.go -+++ b/os/os.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"н.д.а.", "н.д."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"EAT": "EAT", "WAST": "WAST", "HENOMX": "HENOMX", "MST": "MST", "ACWDT": "ACWDT", "CLST": "CLST", "HEEG": "HEEG", "HNPMX": "HNPMX", "PST": "PST", "HNOG": "HNOG", "AWDT": "AWDT", "MESZ": "Астӕуккаг Европӕйаг сӕрдыгон рӕстӕг", "CHADT": "CHADT", "CLT": "CLT", "JDT": "JDT", "WART": "WART", "EST": "EST", "EDT": "EDT", "AKDT": "AKDT", "ART": "ART", "WITA": "WITA", "COT": "COT", "NZST": "NZST", "WESZ": "Ныгъуылӕн Европӕйаг сӕрдыгон рӕстӕг", "LHDT": "LHDT", "CHAST": "CHAST", "AKST": "AKST", "CST": "CST", "UYT": "UYT", "JST": "JST", "BOT": "BOT", "OESZ": "Скӕсӕн Европӕйаг сӕрдыгон рӕстӕг", "GMT": "Гринвичы рӕстӕмбис рӕстӕг", "AST": "AST", "HAST": "HAST", "PDT": "PDT", "AEST": "AEST", "AEDT": "AEDT", "ACST": "ACST", "CAT": "CAT", "OEZ": "Скӕсӕн Европӕйаг стандартон рӕстӕг", "∅∅∅": "∅∅∅", "SRT": "SRT", "HKST": "HKST", "SAST": "SAST", "TMT": "TMT", "ECT": "ECT", "HEPMX": "HEPMX", "MYT": "MYT", "BT": "BT", "TMST": "TMST", "WARST": "WARST", "ADT": "ADT", "WIB": "WIB", "HNT": "HNT", "HAT": "HAT", "HEOG": "HEOG", "AWST": "AWST", "ChST": "ChST", "HNNOMX": "HNNOMX", "MDT": "MDT", "WEZ": "Ныгъуылӕн Европӕйаг стандартон рӕстӕг", "HNPM": "HNPM", "GFT": "GFT", "GYT": "GYT", "ACWST": "ACWST", "HKT": "HKT", "NZDT": "NZDT", "HNEG": "HNEG", "ACDT": "ACDT", "ARST": "ARST", "MEZ": "Астӕуккаг Европӕйаг стандартон рӕстӕг", "LHST": "LHST", "COST": "COST", "CDT": "CDT", "UYST": "UYST", "WIT": "WIT", "SGT": "SGT", "HECU": "HECU", "VET": "VET", "HEPM": "HEPM", "WAT": "WAT", "HNCU": "HNCU", "HADT": "HADT", "IST": "IST"}, -+ timezones: map[string]string{"EST": "EST", "WITA": "WITA", "MEZ": "Астӕуккаг Европӕйаг стандартон рӕстӕг", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "COST": "COST", "GFT": "GFT", "ADT": "ADT", "HADT": "HADT", "AWST": "AWST", "LHDT": "LHDT", "VET": "VET", "AKST": "AKST", "AKDT": "AKDT", "ChST": "ChST", "MYT": "MYT", "HEPM": "HEPM", "JDT": "JDT", "UYT": "UYT", "UYST": "UYST", "NZST": "NZST", "NZDT": "NZDT", "GYT": "GYT", "EAT": "EAT", "HENOMX": "HENOMX", "OESZ": "Скӕсӕн Европӕйаг сӕрдыгон рӕстӕг", "HNT": "HNT", "EDT": "EDT", "HNNOMX": "HNNOMX", "SRT": "SRT", "MESZ": "Астӕуккаг Европӕйаг сӕрдыгон рӕстӕг", "HEOG": "HEOG", "MST": "MST", "HNPMX": "HNPMX", "HNEG": "HNEG", "HNCU": "HNCU", "HNPM": "HNPM", "IST": "IST", "PDT": "PDT", "WIT": "WIT", "BOT": "BOT", "CAT": "CAT", "CST": "CST", "CDT": "CDT", "GMT": "Гринвичы рӕстӕмбис рӕстӕг", "AEST": "AEST", "AEDT": "AEDT", "TMT": "TMT", "TMST": "TMST", "WIB": "WIB", "ART": "ART", "ACST": "ACST", "ACDT": "ACDT", "HEEG": "HEEG", "MDT": "MDT", "ECT": "ECT", "HECU": "HECU", "OEZ": "Скӕсӕн Европӕйаг стандартон рӕстӕг", "WART": "WART", "ARST": "ARST", "AWDT": "AWDT", "JST": "JST", "BT": "BT", "ACWST": "ACWST", "WEZ": "Ныгъуылӕн Европӕйаг стандартон рӕстӕг", "HNOG": "HNOG", "HKT": "HKT", "WESZ": "Ныгъуылӕн Европӕйаг сӕрдыгон рӕстӕг", "COT": "COT", "CLST": "CLST", "LHST": "LHST", "PST": "PST", "WAT": "WAT", "WARST": "WARST", "CHADT": "CHADT", "SAST": "SAST", "CLT": "CLT", "HKST": "HKST", "AST": "AST", "HAST": "HAST", "ACWDT": "ACWDT", "CHAST": "CHAST", "SGT": "SGT", "WAST": "WAST", "HAT": "HAT"}, - } - } -  -diff --git a/os_GE/os_GE.go b/os_GE/os_GE.go -index 558372d..36211d5 100644 ---- a/os_GE/os_GE.go -+++ b/os_GE/os_GE.go -@@ -10,66 +10,45 @@ import ( - ) -  - type os_GE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'os_GE' locale - func New() locales.Translator { - return &os_GE{ -- locale: "os_GE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "янв.", "фев.", "мар.", "апр.", "майы", "июны", "июлы", "авг.", "сен.", "окт.", "ноя.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "январы", "февралы", "мартъийы", "апрелы", "майы", "июны", "июлы", "августы", "сентябры", "октябры", "ноябры", "декабры"}, -- daysAbbreviated: []string{"хцб", "крс", "дцг", "ӕрт", "цпр", "мрб", "сбт"}, -- daysNarrow: []string{"Х", "К", "Д", "Ӕ", "Ц", "М", "С"}, -- daysWide: []string{"хуыцаубон", "къуырисӕр", "дыццӕг", "ӕртыццӕг", "цыппӕрӕм", "майрӕмбон", "сабат"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsWide: []string{"ӕмбисбоны размӕ", "ӕмбисбоны фӕстӕ"}, -- erasAbbreviated: []string{"н.д.а.", "н.д."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNOG": "HNOG", "WEZ": "Ныгъуылӕн Европӕйаг стандартон рӕстӕг", "TMT": "TMT", "OEZ": "Скӕсӕн Европӕйаг стандартон рӕстӕг", "WART": "WART", "HAST": "HAST", "BT": "BT", "ARST": "ARST", "NZST": "NZST", "ACST": "ACST", "ADT": "ADT", "GYT": "GYT", "MYT": "MYT", "UYST": "UYST", "WIB": "WIB", "SRT": "SRT", "JDT": "JDT", "GFT": "GFT", "ChST": "ChST", "WARST": "WARST", "COT": "COT", "EST": "EST", "JST": "JST", "HNEG": "HNEG", "OESZ": "Скӕсӕн Европӕйаг сӕрдыгон рӕстӕг", "AKST": "AKST", "PDT": "PDT", "MESZ": "Астӕуккаг Европӕйаг сӕрдыгон рӕстӕг", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "AST": "AST", "MEZ": "Астӕуккаг Европӕйаг стандартон рӕстӕг", "LHDT": "LHDT", "WAT": "WAT", "HKT": "HKT", "HKST": "HKST", "IST": "IST", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "HECU": "HECU", "EDT": "EDT", "CDT": "CDT", "PST": "PST", "WITA": "WITA", "HAT": "HAT", "ART": "ART", "SAST": "SAST", "CLST": "CLST", "HEEG": "HEEG", "COST": "COST", "VET": "VET", "WIT": "WIT", "HEPM": "HEPM", "UYT": "UYT", "AWDT": "AWDT", "CHADT": "CHADT", "LHST": "LHST", "WAST": "WAST", "SGT": "SGT", "HNPM": "HNPM", "ACWST": "ACWST", "AWST": "AWST", "TMST": "TMST", "BOT": "BOT", "CAT": "CAT", "HNNOMX": "HNNOMX", "MDT": "MDT", "AKDT": "AKDT", "ECT": "ECT", "EAT": "EAT", "MST": "MST", "HEOG": "HEOG", "ACWDT": "ACWDT", "CHAST": "CHAST", "HENOMX": "HENOMX", "GMT": "Гринвичы рӕстӕмбис рӕстӕг", "CST": "CST", "HNT": "HNT", "WESZ": "Ныгъуылӕн Европӕйаг сӕрдыгон рӕстӕг", "AEDT": "AEDT", "CLT": "CLT", "ACDT": "ACDT", "HADT": "HADT", "AEST": "AEST", "NZDT": "NZDT"}, -+ locale: "os_GE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPM": "HNPM", "∅∅∅": "∅∅∅", "SAST": "SAST", "MEZ": "MEZ", "AWST": "AWST", "MYT": "MYT", "JDT": "JDT", "COST": "COST", "HNOG": "HNOG", "GMT": "GMT", "SRT": "SRT", "HEEG": "HEEG", "PST": "PST", "AEDT": "AEDT", "HECU": "HECU", "HNPMX": "HNPMX", "WAST": "WAST", "AKST": "AKST", "HAST": "HAST", "HENOMX": "HENOMX", "AEST": "AEST", "OESZ": "OESZ", "BT": "BT", "VET": "VET", "AKDT": "AKDT", "HKST": "HKST", "NZST": "NZST", "BOT": "BOT", "GYT": "GYT", "EST": "EST", "UYT": "UYT", "OEZ": "OEZ", "HNT": "HNT", "HKT": "HKT", "ADT": "ADT", "ACST": "ACST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "CDT": "CDT", "GFT": "GFT", "TMT": "TMT", "CAT": "CAT", "COT": "COT", "TMST": "TMST", "ECT": "ECT", "PDT": "PDT", "ACWST": "ACWST", "HNCU": "HNCU", "WAT": "WAT", "WITA": "WITA", "MST": "MST", "MESZ": "MESZ", "LHST": "LHST", "CST": "CST", "WIB": "WIB", "ART": "ART", "UYST": "UYST", "HAT": "HAT", "WIT": "WIT", "NZDT": "NZDT", "AST": "AST", "ChST": "ChST", "JST": "JST", "WESZ": "WESZ", "SGT": "SGT", "CHAST": "CHAST", "IST": "IST", "WEZ": "WEZ", "WART": "WART", "WARST": "WARST", "MDT": "MDT", "ACDT": "ACDT", "AWDT": "AWDT", "CLT": "CLT", "ARST": "ARST", "HADT": "HADT", "CHADT": "CHADT", "EDT": "EDT", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "HEOG": "HEOG", "CLST": "CLST", "EAT": "EAT", "LHDT": "LHDT", "HEPM": "HEPM"}, - } - } -  -@@ -122,7 +101,7 @@ func (os *os_GE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (os *os_GE) MonthsAbbreviated() []string { -- return os.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (os *os_GE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (os *os_GE) MonthsNarrow() []string { -- return os.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (os *os_GE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (os *os_GE) MonthsWide() []string { -- return os.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +167,13 @@ func (os *os_GE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'os_GE' and handles both Whole and Real numbers based on 'v' - func (os *os_GE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(os.group) - 1; j >= 0; j-- { -- b = append(b, os.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, os.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'os_GE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (os *os_GE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, os.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, os.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'os_GE' -@@ -264,62 +181,7 @@ func (os *os_GE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := os.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(os.group) - 1; j >= 0; j-- { -- b = append(b, os.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(os.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, os.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, os.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, os.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'os_GE' -@@ -328,74 +190,7 @@ func (os *os_GE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := os.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(os.group) - 1; j >= 0; j-- { -- b = append(b, os.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(os.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, os.currencyNegativePrefix[j]) -- } -- -- b = append(b, os.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(os.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, os.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, os.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'os_GE' -@@ -403,27 +198,6 @@ func (os *os_GE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -432,23 +206,6 @@ func (os *os_GE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, os.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb0, 0xd0, 0xb7}...) -- - return string(b) - } -  -@@ -457,19 +214,6 @@ func (os *os_GE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, os.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb0, 0xd0, 0xb7}...) -- - return string(b) - } -  -@@ -478,21 +222,6 @@ func (os *os_GE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, os.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, os.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb0, 0xd0, 0xb7}...) -- - return string(b) - } -  -@@ -501,19 +230,6 @@ func (os *os_GE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -522,26 +238,6 @@ func (os *os_GE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -550,30 +246,6 @@ func (os *os_GE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -582,34 +254,5 @@ func (os *os_GE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := os.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/os_RU/os_RU.go b/os_RU/os_RU.go -index cb4a2a9..7906d34 100644 ---- a/os_RU/os_RU.go -+++ b/os_RU/os_RU.go -@@ -10,66 +10,45 @@ import ( - ) -  - type os_RU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'os_RU' locale - func New() locales.Translator { - return &os_RU{ -- locale: "os_RU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "₽", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "янв.", "фев.", "мар.", "апр.", "майы", "июны", "июлы", "авг.", "сен.", "окт.", "ноя.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "январы", "февралы", "мартъийы", "апрелы", "майы", "июны", "июлы", "августы", "сентябры", "октябры", "ноябры", "декабры"}, -- daysAbbreviated: []string{"хцб", "крс", "дцг", "ӕрт", "цпр", "мрб", "сбт"}, -- daysNarrow: []string{"Х", "К", "Д", "Ӕ", "Ц", "М", "С"}, -- daysWide: []string{"хуыцаубон", "къуырисӕр", "дыццӕг", "ӕртыццӕг", "цыппӕрӕм", "майрӕмбон", "сабат"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsWide: []string{"ӕмбисбоны размӕ", "ӕмбисбоны фӕстӕ"}, -- erasAbbreviated: []string{"н.д.а.", "н.д."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"PST": "PST", "HNPM": "HNPM", "WARST": "WARST", "ACWDT": "ACWDT", "HAST": "HAST", "HEPMX": "HEPMX", "CDT": "CDT", "ECT": "ECT", "HADT": "HADT", "HAT": "HAT", "HEOG": "HEOG", "CHAST": "CHAST", "JST": "JST", "GFT": "GFT", "TMT": "TMT", "JDT": "JDT", "EDT": "EDT", "AST": "AST", "MYT": "MYT", "HKST": "HKST", "AEDT": "AEDT", "ACST": "ACST", "CAT": "CAT", "UYST": "UYST", "WITA": "WITA", "LHST": "LHST", "HNNOMX": "HNNOMX", "MST": "MST", "HNCU": "HNCU", "SRT": "SRT", "WESZ": "Ныгъуылӕн Европӕйаг сӕрдыгон рӕстӕг", "MEZ": "Астӕуккаг Европӕйаг стандартон рӕстӕг", "BOT": "BOT", "COT": "COT", "HECU": "HECU", "EST": "EST", "AEST": "AEST", "MESZ": "Астӕуккаг Европӕйаг сӕрдыгон рӕстӕг", "ChST": "ChST", "ACDT": "ACDT", "VET": "VET", "AWDT": "AWDT", "OEZ": "Скӕсӕн Европӕйаг стандартон рӕстӕг", "OESZ": "Скӕсӕн Европӕйаг сӕрдыгон рӕстӕг", "SAST": "SAST", "TMST": "TMST", "HENOMX": "HENOMX", "HNT": "HNT", "HEPM": "HEPM", "NZST": "NZST", "HNEG": "HNEG", "WAST": "WAST", "ADT": "ADT", "WIB": "WIB", "ART": "ART", "AWST": "AWST", "HEEG": "HEEG", "MDT": "MDT", "HNOG": "HNOG", "NZDT": "NZDT", "GYT": "GYT", "WEZ": "Ныгъуылӕн Европӕйаг стандартон рӕстӕг", "AKDT": "AKDT", "CST": "CST", "ARST": "ARST", "PDT": "PDT", "LHDT": "LHDT", "CLT": "CLT", "SGT": "SGT", "HNPMX": "HNPMX", "CLST": "CLST", "ACWST": "ACWST", "IST": "IST", "WART": "WART", "GMT": "Гринвичы рӕстӕмбис рӕстӕг", "AKST": "AKST", "UYT": "UYT", "WIT": "WIT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "COST": "COST", "BT": "BT", "HKT": "HKT", "EAT": "EAT", "WAT": "WAT"}, -+ locale: "os_RU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "₽", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CDT": "CDT", "HNEG": "HNEG", "JST": "JST", "JDT": "JDT", "OESZ": "OESZ", "WART": "WART", "ECT": "ECT", "AST": "AST", "BOT": "BOT", "HAST": "HAST", "ACST": "ACST", "VET": "VET", "HECU": "HECU", "HAT": "HAT", "EST": "EST", "TMT": "TMT", "CLT": "CLT", "∅∅∅": "∅∅∅", "LHDT": "LHDT", "HNCU": "HNCU", "COT": "COT", "IST": "IST", "UYST": "UYST", "HNOG": "HNOG", "CAT": "CAT", "HADT": "HADT", "HEPM": "HEPM", "MST": "MST", "ART": "ART", "SGT": "SGT", "WIT": "WIT", "COST": "COST", "HNNOMX": "HNNOMX", "AEST": "AEST", "AEDT": "AEDT", "WAT": "WAT", "CLST": "CLST", "EAT": "EAT", "MEZ": "MEZ", "AWST": "AWST", "PST": "PST", "PDT": "PDT", "HENOMX": "HENOMX", "WESZ": "WESZ", "EDT": "EDT", "HKST": "HKST", "MDT": "MDT", "SRT": "SRT", "MESZ": "MESZ", "ACDT": "ACDT", "AKDT": "AKDT", "OEZ": "OEZ", "CST": "CST", "WARST": "WARST", "HKT": "HKT", "MYT": "MYT", "CHADT": "CHADT", "GFT": "GFT", "HEOG": "HEOG", "GMT": "GMT", "ACWST": "ACWST", "WEZ": "WEZ", "HNT": "HNT", "NZST": "NZST", "ADT": "ADT", "AWDT": "AWDT", "HNPM": "HNPM", "UYT": "UYT", "HEPMX": "HEPMX", "TMST": "TMST", "LHST": "LHST", "BT": "BT", "WAST": "WAST", "GYT": "GYT", "ARST": "ARST", "CHAST": "CHAST", "SAST": "SAST", "HNPMX": "HNPMX", "AKST": "AKST", "WITA": "WITA", "NZDT": "NZDT", "WIB": "WIB", "ChST": "ChST", "HEEG": "HEEG", "ACWDT": "ACWDT"}, - } - } -  -@@ -122,7 +101,7 @@ func (os *os_RU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (os *os_RU) MonthsAbbreviated() []string { -- return os.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +111,7 @@ func (os *os_RU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (os *os_RU) MonthsNarrow() []string { -- return os.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -142,7 +121,7 @@ func (os *os_RU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (os *os_RU) MonthsWide() []string { -- return os.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -188,75 +167,13 @@ func (os *os_RU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'os_RU' and handles both Whole and Real numbers based on 'v' - func (os *os_RU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(os.group) - 1; j >= 0; j-- { -- b = append(b, os.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, os.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'os_RU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (os *os_RU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, os.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, os.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'os_RU' -@@ -264,62 +181,7 @@ func (os *os_RU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := os.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(os.group) - 1; j >= 0; j-- { -- b = append(b, os.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(os.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, os.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, os.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, os.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'os_RU' -@@ -328,74 +190,7 @@ func (os *os_RU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := os.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, os.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(os.group) - 1; j >= 0; j-- { -- b = append(b, os.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(os.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, os.currencyNegativePrefix[j]) -- } -- -- b = append(b, os.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(os.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, os.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, os.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'os_RU' -@@ -403,27 +198,6 @@ func (os *os_RU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -432,23 +206,6 @@ func (os *os_RU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, os.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb0, 0xd0, 0xb7}...) -- - return string(b) - } -  -@@ -457,19 +214,6 @@ func (os *os_RU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, os.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb0, 0xd0, 0xb7}...) -- - return string(b) - } -  -@@ -478,21 +222,6 @@ func (os *os_RU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, os.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, os.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb0, 0xd0, 0xb7}...) -- - return string(b) - } -  -@@ -501,19 +230,6 @@ func (os *os_RU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -522,26 +238,6 @@ func (os *os_RU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -550,30 +246,6 @@ func (os *os_RU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -582,34 +254,5 @@ func (os *os_RU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, os.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := os.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pa/pa.go b/pa/pa.go -index 4fc1de4..7d4b3b6 100644 ---- a/pa/pa.go -+++ b/pa/pa.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ਈ. ਪੂ.", "ਸੰਨ"}, - erasNarrow: []string{"ਈ.ਪੂ.", "ਸੰਨ"}, - erasWide: []string{"ਈਸਵੀ ਪੂਰਵ", "ਈਸਵੀ ਸੰਨ"}, -- timezones: map[string]string{"PDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ACWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HKT": "ਹਾਂਗ ਕਾਂਗ ਮਿਆਰੀ ਵੇਲਾ", "JST": "ਜਪਾਨ ਮਿਆਰੀ ਵੇਲਾ", "WAST": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "ADT": "ਅਟਲਾਂਟਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "LHST": "ਲੌਰਡ ਹੋਵੇ ਮਿਆਰੀ ਵੇਲਾ", "CLST": "ਚਿਲੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "JDT": "ਜਪਾਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "SGT": "ਸਿੰਗਾਪੁਰ ਮਿਆਰੀ ਵੇਲਾ", "HNPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "HADT": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HAT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CHADT": "ਚੈਥਮ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HECU": "ਕਿਊਬਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "UYT": "ਉਰੂਗਵੇ ਮਿਆਰੀ ਵੇਲਾ", "GYT": "ਗੁਯਾਨਾ ਵੇਲਾ", "ACDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "OESZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "AKST": "ਅਲਾਸਕਾ ਮਿਆਰੀ ਵੇਲਾ", "ART": "ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "WAT": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "VET": "ਵੈਨੇਜ਼ੂਏਲਾ ਵੇਲਾ", "ChST": "ਚਾਮੋਰੋ ਮਿਆਰੀ ਵੇਲਾ", "SRT": "ਸੂਰੀਨਾਮ ਵੇਲਾ", "HNOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "NZDT": "ਨਿਊਜ਼ੀਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "IST": "ਭਾਰਤੀ ਮਿਆਰੀ ਵੇਲਾ", "AKDT": "ਅਲਾਸਕਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AST": "ਅਟਲਾਂਟਿਕ ਮਿਆਰੀ ਵੇਲਾ", "HNEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HEEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HKST": "ਹਾਂਗ ਕਾਂਗ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HEPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MEZ": "ਮੱਧ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "GFT": "ਫ੍ਰੈਂਚ ਗੁਏਨਾ ਵੇਲਾ", "∅∅∅": "ਪੇਰੂ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "WIB": "ਪੱਛਮੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "NZST": "ਨਿਊਜ਼ੀਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "MESZ": "ਮੱਧ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CHAST": "ਚੈਥਮ ਮਿਆਰੀ ਵੇਲਾ", "CLT": "ਚਿਲੀ ਮਿਆਰੀ ਵੇਲਾ", "ACWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "AWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "AWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "BOT": "ਬੋਲੀਵੀਆ ਵੇਲਾ", "OEZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "HENOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MDT": "ਮਕਾਉ ਗਰਮੀ-ਰੁੱਤ ਸਮਾਂ", "HEOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਮਿਆਰੀ ਵੇਲਾ", "CAT": "ਕੇਂਦਰੀ ਅਫਰੀਕਾ ਵੇਲਾ", "HNCU": "ਕਿਊਬਾ ਮਿਆਰੀ ਵੇਲਾ", "ARST": "ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "AEST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "AEDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "EAT": "ਪੂਰਬੀ ਅਫਰੀਕਾ ਵੇਲਾ", "HEPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HAST": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਮਿਆਰੀ ਵੇਲਾ", "EDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "PST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "WITA": "ਮੱਧ ਇੰਡੋਨੇਸ਼ੀਆਈ ਵੇਲਾ", "EST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "MYT": "ਮਲੇਸ਼ੀਆ ਵੇਲਾ", "WIT": "ਪੂਰਬੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "WEZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "WESZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "COT": "ਕੋਲੰਬੀਆ ਮਿਆਰੀ ਵੇਲਾ", "COST": "ਕੋਲੰਬੀਆ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "GMT": "ਗ੍ਰੀਨਵਿਚ ਮੀਨ ਵੇਲਾ", "LHDT": "ਲੌਰਡ ਹੋਵੇ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "TMT": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਮਿਆਰੀ ਵੇਲਾ", "ACST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "MST": "ਮਕਾਉ ਮਿਆਰੀ ਸਮਾਂ", "SAST": "ਦੱਖਣੀ ਅਫ਼ਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "TMST": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNNOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਮਿਆਰੀ ਵੇਲਾ", "UYST": "ਉਰੂਗਵੇ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "BT": "ਭੂਟਾਨ ਵੇਲਾ", "ECT": "ਇਕਵੇਡੋਰ ਵੇਲਾ", "WART": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "WARST": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ"}, -+ timezones: map[string]string{"PDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WAT": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "ART": "ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "WIB": "ਪੱਛਮੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "EAT": "ਪੂਰਬੀ ਅਫਰੀਕਾ ਵੇਲਾ", "HNEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HNNOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਮਿਆਰੀ ਵੇਲਾ", "AEST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "WEZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "WIT": "ਪੂਰਬੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "GYT": "ਗੁਯਾਨਾ ਵੇਲਾ", "HKT": "ਹਾਂਗ ਕਾਂਗ ਮਿਆਰੀ ਵੇਲਾ", "CAT": "ਕੇਂਦਰੀ ਅਫਰੀਕਾ ਵੇਲਾ", "MDT": "ਮਕਾਉ ਗਰਮੀ-ਰੁੱਤ ਸਮਾਂ", "AWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "HNCU": "ਕਿਊਬਾ ਮਿਆਰੀ ਵੇਲਾ", "OEZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "ACWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MEZ": "ਮੱਧ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "PST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "MESZ": "ਮੱਧ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HECU": "ਕਿਊਬਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "OESZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "AST": "ਅਟਲਾਂਟਿਕ ਮਿਆਰੀ ਵੇਲਾ", "LHST": "ਲੌਰਡ ਹੋਵੇ ਮਿਆਰੀ ਵੇਲਾ", "MYT": "ਮਲੇਸ਼ੀਆ ਵੇਲਾ", "JDT": "ਜਪਾਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "UYST": "ਉਰੂਗਵੇ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "SGT": "ਸਿੰਗਾਪੁਰ ਮਿਆਰੀ ਵੇਲਾ", "∅∅∅": "ਅਮੇਜ਼ਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "BT": "ਭੂਟਾਨ ਵੇਲਾ", "CDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "TMT": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਮਿਆਰੀ ਵੇਲਾ", "MST": "ਮਕਾਉ ਮਿਆਰੀ ਸਮਾਂ", "ADT": "ਅਟਲਾਂਟਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਮਿਆਰੀ ਵੇਲਾ", "COST": "ਕੋਲੰਬੀਆ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "EDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "GFT": "ਫ੍ਰੈਂਚ ਗੁਏਨਾ ਵੇਲਾ", "HNT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HEOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "EST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "CST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "NZST": "ਨਿਊਜ਼ੀਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "ARST": "ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HADT": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HEPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AKDT": "ਅਲਾਸਕਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "UYT": "ਉਰੂਗਵੇ ਮਿਆਰੀ ਵੇਲਾ", "AEDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CHADT": "ਚੈਥਮ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HEEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HENOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "TMST": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "JST": "ਜਪਾਨ ਮਿਆਰੀ ਵੇਲਾ", "HNPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "WAST": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CLST": "ਚਿਲੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ChST": "ਚਾਮੋਰੋ ਮਿਆਰੀ ਵੇਲਾ", "LHDT": "ਲੌਰਡ ਹੋਵੇ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HEPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WESZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "SAST": "ਦੱਖਣੀ ਅਫ਼ਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "WART": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "NZDT": "ਨਿਊਜ਼ੀਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "BOT": "ਬੋਲੀਵੀਆ ਵੇਲਾ", "ACST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "ACDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AKST": "ਅਲਾਸਕਾ ਮਿਆਰੀ ਵੇਲਾ", "HAT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WITA": "ਮੱਧ ਇੰਡੋਨੇਸ਼ੀਆਈ ਵੇਲਾ", "ECT": "ਇਕਵੇਡੋਰ ਵੇਲਾ", "GMT": "ਗ੍ਰੀਨਵਿਚ ਮੀਨ ਵੇਲਾ", "COT": "ਕੋਲੰਬੀਆ ਮਿਆਰੀ ਵੇਲਾ", "HKST": "ਹਾਂਗ ਕਾਂਗ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CHAST": "ਚੈਥਮ ਮਿਆਰੀ ਵੇਲਾ", "WARST": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ACWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "SRT": "ਸੂਰੀਨਾਮ ਵੇਲਾ", "HAST": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਮਿਆਰੀ ਵੇਲਾ", "IST": "ਭਾਰਤੀ ਮਿਆਰੀ ਵੇਲਾ", "VET": "ਵੈਨੇਜ਼ੂਏਲਾ ਵੇਲਾ", "CLT": "ਚਿਲੀ ਮਿਆਰੀ ਵੇਲਾ"}, - } - } -  -diff --git a/pa_Arab/pa_Arab.go b/pa_Arab/pa_Arab.go -index 2b13046..64ef5a2 100644 ---- a/pa_Arab/pa_Arab.go -+++ b/pa_Arab/pa_Arab.go -@@ -50,32 +50,19 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", - minus: "‎-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "ر", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyPositiveSuffix: "K", - currencyNegativePrefix: " ", - currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "ਜਨ", "ਫ਼ਰ", "ਮਾਰਚ", "ਅਪ੍ਰੈ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾ", "ਅਗ", "ਸਤੰ", "ਅਕਤੂ", "ਨਵੰ", "ਦਸੰ"}, -- monthsNarrow: []string{"", "ਜ", "ਫ਼", "ਮਾ", "ਅ", "ਮ", "ਜੂ", "ਜੁ", "ਅ", "ਸ", "ਅ", "ਨ", "ਦ"}, - monthsWide: []string{"", "جنوری", "فروری", "مارچ", "اپریل", "مئ", "جون", "جولائی", "اگست", "ستمبر", "اکتوبر", "نومبر", "دسمبر"}, -- daysAbbreviated: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"}, -- daysNarrow: []string{"ਐ", "ਸੋ", "ਮੰ", "ਬੁੱ", "ਵੀ", "ਸ਼ੁੱ", "ਸ਼"}, -- daysShort: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕ", "ਸ਼ਨਿੱ"}, - daysWide: []string{"اتوار", "پیر", "منگل", "بُدھ", "جمعرات", "جمعہ", "ہفتہ"}, -- periodsAbbreviated: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- periodsNarrow: []string{"ਸ.", "ਸ਼."}, -- periodsWide: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, - erasAbbreviated: []string{"ايساپورو", "سں"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ايساپورو", "سں"}, -- timezones: map[string]string{"HNEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "GFT": "ਫ੍ਰੈਂਚ ਗੁਏਨਾ ਵੇਲਾ", "VET": "ਵੈਨੇਜ਼ੂਏਲਾ ਵੇਲਾ", "SAST": "ਦੱਖਣੀ ਅਫ਼ਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "∅∅∅": "ਅਮੇਜ਼ਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ART": "ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "CLT": "ਚਿਲੀ ਮਿਆਰੀ ਵੇਲਾ", "WAT": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "NZST": "ਨਿਊਜ਼ੀਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "IST": "ਭਾਰਤੀ ਮਿਆਰੀ ਵੇਲਾ", "AKDT": "ਅਲਾਸਕਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "GYT": "ਗੁਯਾਨਾ ਵੇਲਾ", "WIB": "ਪੱਛਮੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "BT": "ਭੂਟਾਨ ਵੇਲਾ", "HNT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "PST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "CHADT": "ਚੈਥਮ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "GMT": "ਗ੍ਰੀਨਵਿਚ ਮੀਨ ਵੇਲਾ", "AKST": "ਅਲਾਸਕਾ ਮਿਆਰੀ ਵੇਲਾ", "LHDT": "ਲੌਰਡ ਹੋਵੇ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "SGT": "ਸਿੰਗਾਪੁਰ ਮਿਆਰੀ ਵੇਲਾ", "UYT": "ਉਰੂਗਵੇ ਮਿਆਰੀ ਵੇਲਾ", "HADT": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ARST": "ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "WESZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ACST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "COT": "ਕੋਲੰਬੀਆ ਮਿਆਰੀ ਵੇਲਾ", "MST": "ਮਕਾਉ ਮਿਆਰੀ ਸਮਾਂ", "CDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AST": "ਅਟਲਾਂਟਿਕ ਮਿਆਰੀ ਵੇਲਾ", "ADT": "ਅਟਲਾਂਟਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HAST": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਮਿਆਰੀ ਵੇਲਾ", "HKT": "ਹਾਂਗ ਕਾਂਗ ਮਿਆਰੀ ਵੇਲਾ", "HECU": "ਕਿਊਬਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "EST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "MEZ": "ਮੱਧ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "HNPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਮਿਆਰੀ ਵੇਲਾ", "NZDT": "ਨਿਊਜ਼ੀਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "COST": "ਕੋਲੰਬੀਆ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "HAT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "AEST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "OESZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HENOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNCU": "ਕਿਊਬਾ ਮਿਆਰੀ ਵੇਲਾ", "EDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HKST": "ਹਾਂਗ ਕਾਂਗ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "AWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "AWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CHAST": "ਚੈਥਮ ਮਿਆਰੀ ਵੇਲਾ", "TMST": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ChST": "ਚਾਮੋਰੋ ਮਿਆਰੀ ਵੇਲਾ", "LHST": "ਲੌਰਡ ਹੋਵੇ ਮਿਆਰੀ ਵੇਲਾ", "WARST": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "MYT": "ਮਲੇਸ਼ੀਆ ਵੇਲਾ", "CLST": "ਚਿਲੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "EAT": "ਪੂਰਬੀ ਅਫਰੀਕਾ ਵੇਲਾ", "ECT": "ਇਕਵੇਡੋਰ ਵੇਲਾ", "WART": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "WITA": "ਮੱਧ ਇੰਡੋਨੇਸ਼ੀਆਈ ਵੇਲਾ", "HEEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "BOT": "ਬੋਲੀਵੀਆ ਵੇਲਾ", "HNNOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਮਿਆਰੀ ਵੇਲਾ", "WIT": "ਪੂਰਬੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "SRT": "ਸੂਰੀਨਾਮ ਵੇਲਾ", "ACDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WAST": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "MDT": "ਮਕਾਉ ਗਰਮੀ-ਰੁੱਤ ਸਮਾਂ", "CST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "UYST": "ਉਰੂਗਵੇ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "MESZ": "ਮੱਧ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "JST": "ਜਪਾਨ ਮਿਆਰੀ ਵੇਲਾ", "HEPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ACWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "PDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AEDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HEPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "TMT": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਮਿਆਰੀ ਵੇਲਾ", "CAT": "ਕੇਂਦਰੀ ਅਫਰੀਕਾ ਵੇਲਾ", "ACWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WEZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "JDT": "ਜਪਾਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "OEZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "HEOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ"}, -+ timezones: map[string]string{"HAT": "HAT", "AWDT": "AWDT", "CHAST": "CHAST", "NZDT": "NZDT", "BOT": "BOT", "MEZ": "MEZ", "MYT": "MYT", "IST": "IST", "WAST": "WAST", "HNT": "HNT", "HKT": "HKT", "HNPM": "HNPM", "ACWDT": "ACWDT", "ACWST": "ACWST", "UYST": "UYST", "WARST": "WARST", "EST": "EST", "AST": "AST", "EAT": "EAT", "HEEG": "HEEG", "AWST": "AWST", "HECU": "HECU", "CLST": "CLST", "ARST": "ARST", "GFT": "GFT", "AEDT": "AEDT", "UYT": "UYT", "SAST": "SAST", "EDT": "EDT", "WIB": "WIB", "CDT": "CDT", "NZST": "NZST", "JDT": "JDT", "WEZ": "WEZ", "WIT": "WIT", "GYT": "GYT", "COST": "COST", "WITA": "WITA", "HADT": "HADT", "HENOMX": "HENOMX", "COT": "COT", "ECT": "ECT", "AEST": "AEST", "HNCU": "HNCU", "WART": "WART", "HEOG": "HEOG", "CLT": "CLT", "CST": "CST", "ADT": "ADT", "HKST": "HKST", "ChST": "ChST", "JST": "JST", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "MDT": "MDT", "HNEG": "HNEG", "HEPM": "HEPM", "LHST": "LHST", "ACST": "ACST", "PST": "PST", "TMST": "TMST", "CAT": "CAT", "ART": "ART", "GMT": "GMT", "HNNOMX": "HNNOMX", "MESZ": "MESZ", "BT": "BT", "WESZ": "WESZ", "VET": "VET", "HEPMX": "HEPMX", "WAT": "WAT", "AKST": "AKST", "HNOG": "HNOG", "TMT": "TMT", "HAST": "HAST", "ACDT": "ACDT", "HNPMX": "HNPMX", "SGT": "SGT", "SRT": "SRT", "LHDT": "LHDT", "OEZ": "OEZ", "MST": "MST", "CHADT": "CHADT", "PDT": "PDT", "OESZ": "OESZ"}, - } - } -  -@@ -141,7 +128,7 @@ func (pa *pa_Arab) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pa *pa_Arab) MonthsAbbreviated() []string { -- return pa.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -151,7 +138,7 @@ func (pa *pa_Arab) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pa *pa_Arab) MonthsNarrow() []string { -- return pa.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -207,86 +194,13 @@ func (pa *pa_Arab) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pa_Arab' and handles both Whole and Real numbers based on 'v' - func (pa *pa_Arab) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(pa.minus) - 1; j >= 0; j-- { -- b = append(b, pa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pa_Arab' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pa *pa_Arab) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(pa.minus) - 1; j >= 0; j-- { -- b = append(b, pa.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pa.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Arab' -@@ -294,7 +208,7 @@ func (pa *pa_Arab) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 8 -+ l := len(s) + len(symbol) + 7 -  - b := make([]byte, 0, l) -  -@@ -338,7 +252,7 @@ func (pa *pa_Arab) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 8 -+ l := len(s) + len(symbol) + 7 -  - b := make([]byte, 0, l) -  -diff --git a/pa_Arab_PK/pa_Arab_PK.go b/pa_Arab_PK/pa_Arab_PK.go -index 5f314ce..487c009 100644 ---- a/pa_Arab_PK/pa_Arab_PK.go -+++ b/pa_Arab_PK/pa_Arab_PK.go -@@ -42,32 +42,13 @@ type pa_Arab_PK struct { - // New returns a new instance of translator for the 'pa_Arab_PK' locale - func New() locales.Translator { - return &pa_Arab_PK{ -- locale: "pa_Arab_PK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ਜਨ", "ਫ਼ਰ", "ਮਾਰਚ", "ਅਪ੍ਰੈ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾ", "ਅਗ", "ਸਤੰ", "ਅਕਤੂ", "ਨਵੰ", "ਦਸੰ"}, -- monthsNarrow: []string{"", "ਜ", "ਫ਼", "ਮਾ", "ਅ", "ਮ", "ਜੂ", "ਜੁ", "ਅ", "ਸ", "ਅ", "ਨ", "ਦ"}, -- monthsWide: []string{"", "ਜਨਵਰੀ", "ਫ਼ਰਵਰੀ", "ਮਾਰਚ", "ਅਪ੍ਰੈਲ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾਈ", "ਅਗਸਤ", "ਸਤੰਬਰ", "ਅਕਤੂਬਰ", "ਨਵੰਬਰ", "ਦਸੰਬਰ"}, -- daysAbbreviated: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"}, -- daysNarrow: []string{"ਐ", "ਸੋ", "ਮੰ", "ਬੁੱ", "ਵੀ", "ਸ਼ੁੱ", "ਸ਼"}, -- daysShort: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕ", "ਸ਼ਨਿੱ"}, -- daysWide: []string{"ਐਤਵਾਰ", "ਸੋਮਵਾਰ", "ਮੰਗਲਵਾਰ", "ਬੁੱਧਵਾਰ", "ਵੀਰਵਾਰ", "ਸ਼ੁੱਕਰਵਾਰ", "ਸ਼ਨਿੱਚਰਵਾਰ"}, -- periodsAbbreviated: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- periodsNarrow: []string{"ਸ.", "ਸ਼."}, -- periodsWide: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- erasAbbreviated: []string{"ਈ. ਪੂ.", "ਸੰਨ"}, -- erasNarrow: []string{"ਈ.ਪੂ.", "ਸੰਨ"}, -- erasWide: []string{"ਈਸਵੀ ਪੂਰਵ", "ਈਸਵੀ ਸੰਨ"}, -- timezones: map[string]string{"BT": "ਭੂਟਾਨ ਵੇਲਾ", "HKST": "ਹਾਂਗ ਕਾਂਗ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਮਿਆਰੀ ਵੇਲਾ", "HEPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "JDT": "ਜਪਾਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "BOT": "ਬੋਲੀਵੀਆ ਵੇਲਾ", "HNEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "CAT": "ਕੇਂਦਰੀ ਅਫਰੀਕਾ ਵੇਲਾ", "EAT": "ਪੂਰਬੀ ਅਫਰੀਕਾ ਵੇਲਾ", "HNPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "UYST": "ਉਰੂਗਵੇ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "SRT": "ਸੂਰੀਨਾਮ ਵੇਲਾ", "ART": "ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "HNOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "AEDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HKT": "ਹਾਂਗ ਕਾਂਗ ਮਿਆਰੀ ਵੇਲਾ", "CLST": "ਚਿਲੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "PST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "MEZ": "ਮੱਧ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "CHADT": "ਚੈਥਮ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "JST": "ਜਪਾਨ ਮਿਆਰੀ ਵੇਲਾ", "MDT": "ਮਕਾਉ ਗਰਮੀ-ਰੁੱਤ ਸਮਾਂ", "WESZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ACWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "IST": "ਭਾਰਤੀ ਮਿਆਰੀ ਵੇਲਾ", "WAT": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "OESZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNCU": "ਕਿਊਬਾ ਮਿਆਰੀ ਵੇਲਾ", "ADT": "ਅਟਲਾਂਟਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "GYT": "ਗੁਯਾਨਾ ਵੇਲਾ", "HAST": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਮਿਆਰੀ ਵੇਲਾ", "HNT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "AEST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "SAST": "ਦੱਖਣੀ ਅਫ਼ਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "TMT": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਮਿਆਰੀ ਵੇਲਾ", "WARST": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "COST": "ਕੋਲੰਬੀਆ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "UYT": "ਉਰੂਗਵੇ ਮਿਆਰੀ ਵੇਲਾ", "CDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MYT": "ਮਲੇਸ਼ੀਆ ਵੇਲਾ", "WIB": "ਪੱਛਮੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "HEEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HEPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WART": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "WEZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "HEOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "WAST": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HENOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "PDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ARST": "ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "GFT": "ਫ੍ਰੈਂਚ ਗੁਏਨਾ ਵੇਲਾ", "LHST": "ਲੌਰਡ ਹੋਵੇ ਮਿਆਰੀ ਵੇਲਾ", "LHDT": "ਲੌਰਡ ਹੋਵੇ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "OEZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "MST": "ਮਕਾਉ ਮਿਆਰੀ ਸਮਾਂ", "ACWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "AWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CLT": "ਚਿਲੀ ਮਿਆਰੀ ਵੇਲਾ", "∅∅∅": "ਅਮੇਜ਼ਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ChST": "ਚਾਮੋਰੋ ਮਿਆਰੀ ਵੇਲਾ", "SGT": "ਸਿੰਗਾਪੁਰ ਮਿਆਰੀ ਵੇਲਾ", "HADT": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "EST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "ACDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ECT": "ਇਕਵੇਡੋਰ ਵੇਲਾ", "HECU": "ਕਿਊਬਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AST": "ਅਟਲਾਂਟਿਕ ਮਿਆਰੀ ਵੇਲਾ", "VET": "ਵੈਨੇਜ਼ੂਏਲਾ ਵੇਲਾ", "MESZ": "ਮੱਧ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CHAST": "ਚੈਥਮ ਮਿਆਰੀ ਵੇਲਾ", "EDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "TMST": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNNOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਮਿਆਰੀ ਵੇਲਾ", "GMT": "ਗ੍ਰੀਨਵਿਚ ਮੀਨ ਵੇਲਾ", "AKDT": "ਅਲਾਸਕਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HAT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WITA": "ਮੱਧ ਇੰਡੋਨੇਸ਼ੀਆਈ ਵੇਲਾ", "NZST": "ਨਿਊਜ਼ੀਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "NZDT": "ਨਿਊਜ਼ੀਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ACST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "COT": "ਕੋਲੰਬੀਆ ਮਿਆਰੀ ਵੇਲਾ", "AKST": "ਅਲਾਸਕਾ ਮਿਆਰੀ ਵੇਲਾ", "WIT": "ਪੂਰਬੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ"}, -+ locale: "pa_Arab_PK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ARST": "ARST", "IST": "IST", "PST": "PST", "TMT": "TMT", "HAST": "HAST", "UYST": "UYST", "HNPMX": "HNPMX", "HKST": "HKST", "HENOMX": "HENOMX", "BT": "BT", "SGT": "SGT", "WIT": "WIT", "HNOG": "HNOG", "TMST": "TMST", "∅∅∅": "∅∅∅", "CDT": "CDT", "ADT": "ADT", "HEPM": "HEPM", "CHADT": "CHADT", "WIB": "WIB", "HNNOMX": "HNNOMX", "COT": "COT", "CLT": "CLT", "MDT": "MDT", "ECT": "ECT", "HNEG": "HNEG", "AEDT": "AEDT", "WAT": "WAT", "SAST": "SAST", "CST": "CST", "ART": "ART", "HADT": "HADT", "MEZ": "MEZ", "ACST": "ACST", "JST": "JST", "OESZ": "OESZ", "GFT": "GFT", "GMT": "GMT", "ChST": "ChST", "AWDT": "AWDT", "LHDT": "LHDT", "AEST": "AEST", "AKDT": "AKDT", "HNT": "HNT", "GYT": "GYT", "HNCU": "HNCU", "HEPMX": "HEPMX", "CLST": "CLST", "AST": "AST", "BOT": "BOT", "LHST": "LHST", "PDT": "PDT", "WARST": "WARST", "HNPM": "HNPM", "ACWST": "ACWST", "WART": "WART", "NZST": "NZST", "NZDT": "NZDT", "ACDT": "ACDT", "HEEG": "HEEG", "AKST": "AKST", "OEZ": "OEZ", "WAST": "WAST", "EST": "EST", "EDT": "EDT", "SRT": "SRT", "AWST": "AWST", "MYT": "MYT", "ACWDT": "ACWDT", "HECU": "HECU", "HEOG": "HEOG", "WITA": "WITA", "MST": "MST", "CHAST": "CHAST", "UYT": "UYT", "WEZ": "WEZ", "VET": "VET", "CAT": "CAT", "MESZ": "MESZ", "HAT": "HAT", "COST": "COST", "HKT": "HKT", "EAT": "EAT", "JDT": "JDT", "WESZ": "WESZ"}, - } - } -  -@@ -133,7 +114,7 @@ func (pa *pa_Arab_PK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pa *pa_Arab_PK) MonthsAbbreviated() []string { -- return pa.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -143,7 +124,7 @@ func (pa *pa_Arab_PK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pa *pa_Arab_PK) MonthsNarrow() []string { -- return pa.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -153,7 +134,7 @@ func (pa *pa_Arab_PK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pa *pa_Arab_PK) MonthsWide() []string { -- return pa.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,82 +180,13 @@ func (pa *pa_Arab_PK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pa_Arab_PK' and handles both Whole and Real numbers based on 'v' - func (pa *pa_Arab_PK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pa_Arab_PK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pa *pa_Arab_PK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pa.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Arab_PK' -@@ -282,65 +194,7 @@ func (pa *pa_Arab_PK) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Arab_PK' -@@ -349,73 +203,7 @@ func (pa *pa_Arab_PK) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pa.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pa_Arab_PK' -@@ -423,17 +211,6 @@ func (pa *pa_Arab_PK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -442,17 +219,6 @@ func (pa *pa_Arab_PK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,17 +227,6 @@ func (pa *pa_Arab_PK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,19 +235,6 @@ func (pa *pa_Arab_PK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pa.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,28 +243,6 @@ func (pa *pa_Arab_PK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -531,35 +251,6 @@ func (pa *pa_Arab_PK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -568,40 +259,6 @@ func (pa *pa_Arab_PK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -610,44 +267,5 @@ func (pa *pa_Arab_PK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pa.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pa_Guru/pa_Guru.go b/pa_Guru/pa_Guru.go -index 6df4412..64fa16b 100644 ---- a/pa_Guru/pa_Guru.go -+++ b/pa_Guru/pa_Guru.go -@@ -42,32 +42,13 @@ type pa_Guru struct { - // New returns a new instance of translator for the 'pa_Guru' locale - func New() locales.Translator { - return &pa_Guru{ -- locale: "pa_Guru", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ਜਨ", "ਫ਼ਰ", "ਮਾਰਚ", "ਅਪ੍ਰੈ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾ", "ਅਗ", "ਸਤੰ", "ਅਕਤੂ", "ਨਵੰ", "ਦਸੰ"}, -- monthsNarrow: []string{"", "ਜ", "ਫ਼", "ਮਾ", "ਅ", "ਮ", "ਜੂ", "ਜੁ", "ਅ", "ਸ", "ਅ", "ਨ", "ਦ"}, -- monthsWide: []string{"", "ਜਨਵਰੀ", "ਫ਼ਰਵਰੀ", "ਮਾਰਚ", "ਅਪ੍ਰੈਲ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾਈ", "ਅਗਸਤ", "ਸਤੰਬਰ", "ਅਕਤੂਬਰ", "ਨਵੰਬਰ", "ਦਸੰਬਰ"}, -- daysAbbreviated: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"}, -- daysNarrow: []string{"ਐ", "ਸੋ", "ਮੰ", "ਬੁੱ", "ਵੀ", "ਸ਼ੁੱ", "ਸ਼"}, -- daysShort: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕ", "ਸ਼ਨਿੱ"}, -- daysWide: []string{"ਐਤਵਾਰ", "ਸੋਮਵਾਰ", "ਮੰਗਲਵਾਰ", "ਬੁੱਧਵਾਰ", "ਵੀਰਵਾਰ", "ਸ਼ੁੱਕਰਵਾਰ", "ਸ਼ਨਿੱਚਰਵਾਰ"}, -- periodsAbbreviated: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- periodsNarrow: []string{"ਸ.", "ਸ਼."}, -- periodsWide: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- erasAbbreviated: []string{"ਈ. ਪੂ.", "ਸੰਨ"}, -- erasNarrow: []string{"ਈ.ਪੂ.", "ਸੰਨ"}, -- erasWide: []string{"ਈਸਵੀ ਪੂਰਵ", "ਈਸਵੀ ਸੰਨ"}, -- timezones: map[string]string{"SRT": "ਸੂਰੀਨਾਮ ਵੇਲਾ", "HAT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WITA": "ਮੱਧ ਇੰਡੋਨੇਸ਼ੀਆਈ ਵੇਲਾ", "ChST": "ਚਾਮੋਰੋ ਮਿਆਰੀ ਵੇਲਾ", "COT": "ਕੋਲੰਬੀਆ ਮਿਆਰੀ ਵੇਲਾ", "LHDT": "ਲੌਰਡ ਹੋਵੇ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "JDT": "ਜਪਾਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HENOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "EST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "CST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "ARST": "ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "AWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "HEPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WIB": "ਪੱਛਮੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "WEZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "HKST": "ਹਾਂਗ ਕਾਂਗ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ECT": "ਇਕਵੇਡੋਰ ਵੇਲਾ", "LHST": "ਲੌਰਡ ਹੋਵੇ ਮਿਆਰੀ ਵੇਲਾ", "HEEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNNOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਮਿਆਰੀ ਵੇਲਾ", "∅∅∅": "ਅਜੋਰੇਸ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HEOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਮਿਆਰੀ ਵੇਲਾ", "JST": "ਜਪਾਨ ਮਿਆਰੀ ਵੇਲਾ", "AST": "ਅਟਲਾਂਟਿਕ ਮਿਆਰੀ ਵੇਲਾ", "GYT": "ਗੁਯਾਨਾ ਵੇਲਾ", "IST": "ਭਾਰਤੀ ਮਿਆਰੀ ਵੇਲਾ", "GFT": "ਫ੍ਰੈਂਚ ਗੁਏਨਾ ਵੇਲਾ", "OEZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "WAST": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "NZDT": "ਨਿਊਜ਼ੀਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MEZ": "ਮੱਧ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "SGT": "ਸਿੰਗਾਪੁਰ ਮਿਆਰੀ ਵੇਲਾ", "HECU": "ਕਿਊਬਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "GMT": "ਗ੍ਰੀਨਵਿਚ ਮੀਨ ਵੇਲਾ", "ADT": "ਅਟਲਾਂਟਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "WIT": "ਪੂਰਬੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "ART": "ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "NZST": "ਨਿਊਜ਼ੀਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "TMT": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਮਿਆਰੀ ਵੇਲਾ", "WARST": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "BOT": "ਬੋਲੀਵੀਆ ਵੇਲਾ", "ACDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "EDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AKST": "ਅਲਾਸਕਾ ਮਿਆਰੀ ਵੇਲਾ", "AKDT": "ਅਲਾਸਕਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HADT": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AEDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "CHAST": "ਚੈਥਮ ਮਿਆਰੀ ਵੇਲਾ", "CHADT": "ਚੈਥਮ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MESZ": "ਮੱਧ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "MYT": "ਮਲੇਸ਼ੀਆ ਵੇਲਾ", "UYT": "ਉਰੂਗਵੇ ਮਿਆਰੀ ਵੇਲਾ", "VET": "ਵੈਨੇਜ਼ੂਏਲਾ ਵੇਲਾ", "PDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HNOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "TMST": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ACST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "CAT": "ਕੇਂਦਰੀ ਅਫਰੀਕਾ ਵੇਲਾ", "CDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "WAT": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "OESZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "EAT": "ਪੂਰਬੀ ਅਫਰੀਕਾ ਵੇਲਾ", "COST": "ਕੋਲੰਬੀਆ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "WART": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "HNCU": "ਕਿਊਬਾ ਮਿਆਰੀ ਵੇਲਾ", "WESZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ACWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HKT": "ਹਾਂਗ ਕਾਂਗ ਮਿਆਰੀ ਵੇਲਾ", "SAST": "ਦੱਖਣੀ ਅਫ਼ਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "AWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AEST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "CLT": "ਚਿਲੀ ਮਿਆਰੀ ਵੇਲਾ", "MDT": "ਮਕਾਉ ਗਰਮੀ-ਰੁੱਤ ਸਮਾਂ", "HEPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HAST": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਮਿਆਰੀ ਵੇਲਾ", "BT": "ਭੂਟਾਨ ਵੇਲਾ", "ACWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "MST": "ਮਕਾਉ ਮਿਆਰੀ ਸਮਾਂ", "UYST": "ਉਰੂਗਵੇ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "PST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "CLST": "ਚਿਲੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ"}, -+ locale: "pa_Guru", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ChST": "ChST", "BOT": "BOT", "ACDT": "ACDT", "WAST": "WAST", "CLST": "CLST", "NZDT": "NZDT", "ACWST": "ACWST", "EAT": "EAT", "PST": "PST", "PDT": "PDT", "HEOG": "HEOG", "JDT": "JDT", "HNPMX": "HNPMX", "WAT": "WAT", "TMT": "TMT", "AST": "AST", "∅∅∅": "∅∅∅", "WART": "WART", "COST": "COST", "CST": "CST", "CDT": "CDT", "BT": "BT", "CLT": "CLT", "NZST": "NZST", "MDT": "MDT", "MESZ": "MESZ", "LHDT": "LHDT", "MYT": "MYT", "HEPM": "HEPM", "WIB": "WIB", "TMST": "TMST", "CAT": "CAT", "HEEG": "HEEG", "CHAST": "CHAST", "WEZ": "WEZ", "VET": "VET", "HNT": "HNT", "SRT": "SRT", "ARST": "ARST", "EST": "EST", "EDT": "EDT", "MST": "MST", "HADT": "HADT", "HENOMX": "HENOMX", "HECU": "HECU", "WIT": "WIT", "ADT": "ADT", "AWDT": "AWDT", "JST": "JST", "GFT": "GFT", "HNOG": "HNOG", "WITA": "WITA", "HAST": "HAST", "HNNOMX": "HNNOMX", "WESZ": "WESZ", "OESZ": "OESZ", "HKT": "HKT", "UYST": "UYST", "ACWDT": "ACWDT", "HNCU": "HNCU", "ACST": "ACST", "AWST": "AWST", "LHST": "LHST", "HNPM": "HNPM", "CHADT": "CHADT", "HAT": "HAT", "GYT": "GYT", "COT": "COT", "OEZ": "OEZ", "SAST": "SAST", "ECT": "ECT", "HNEG": "HNEG", "IST": "IST", "AEST": "AEST", "AKST": "AKST", "AKDT": "AKDT", "ART": "ART", "MEZ": "MEZ", "HEPMX": "HEPMX", "WARST": "WARST", "HKST": "HKST", "GMT": "GMT", "UYT": "UYT", "AEDT": "AEDT", "SGT": "SGT"}, - } - } -  -@@ -133,7 +114,7 @@ func (pa *pa_Guru) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pa *pa_Guru) MonthsAbbreviated() []string { -- return pa.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -143,7 +124,7 @@ func (pa *pa_Guru) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pa *pa_Guru) MonthsNarrow() []string { -- return pa.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -153,7 +134,7 @@ func (pa *pa_Guru) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pa *pa_Guru) MonthsWide() []string { -- return pa.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,82 +180,13 @@ func (pa *pa_Guru) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pa_Guru' and handles both Whole and Real numbers based on 'v' - func (pa *pa_Guru) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pa_Guru' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pa *pa_Guru) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pa.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Guru' -@@ -282,65 +194,7 @@ func (pa *pa_Guru) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Guru' -@@ -349,73 +203,7 @@ func (pa *pa_Guru) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pa.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pa_Guru' -@@ -423,17 +211,6 @@ func (pa *pa_Guru) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -442,17 +219,6 @@ func (pa *pa_Guru) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,17 +227,6 @@ func (pa *pa_Guru) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,19 +235,6 @@ func (pa *pa_Guru) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pa.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,28 +243,6 @@ func (pa *pa_Guru) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -531,35 +251,6 @@ func (pa *pa_Guru) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -568,40 +259,6 @@ func (pa *pa_Guru) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -610,44 +267,5 @@ func (pa *pa_Guru) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pa.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pa_Guru_IN/pa_Guru_IN.go b/pa_Guru_IN/pa_Guru_IN.go -index 7e362a0..e9d1887 100644 ---- a/pa_Guru_IN/pa_Guru_IN.go -+++ b/pa_Guru_IN/pa_Guru_IN.go -@@ -42,32 +42,13 @@ type pa_Guru_IN struct { - // New returns a new instance of translator for the 'pa_Guru_IN' locale - func New() locales.Translator { - return &pa_Guru_IN{ -- locale: "pa_Guru_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ਜਨ", "ਫ਼ਰ", "ਮਾਰਚ", "ਅਪ੍ਰੈ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾ", "ਅਗ", "ਸਤੰ", "ਅਕਤੂ", "ਨਵੰ", "ਦਸੰ"}, -- monthsNarrow: []string{"", "ਜ", "ਫ਼", "ਮਾ", "ਅ", "ਮ", "ਜੂ", "ਜੁ", "ਅ", "ਸ", "ਅ", "ਨ", "ਦ"}, -- monthsWide: []string{"", "ਜਨਵਰੀ", "ਫ਼ਰਵਰੀ", "ਮਾਰਚ", "ਅਪ੍ਰੈਲ", "ਮਈ", "ਜੂਨ", "ਜੁਲਾਈ", "ਅਗਸਤ", "ਸਤੰਬਰ", "ਅਕਤੂਬਰ", "ਨਵੰਬਰ", "ਦਸੰਬਰ"}, -- daysAbbreviated: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗਲ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕਰ", "ਸ਼ਨਿੱਚਰ"}, -- daysNarrow: []string{"ਐ", "ਸੋ", "ਮੰ", "ਬੁੱ", "ਵੀ", "ਸ਼ੁੱ", "ਸ਼"}, -- daysShort: []string{"ਐਤ", "ਸੋਮ", "ਮੰਗ", "ਬੁੱਧ", "ਵੀਰ", "ਸ਼ੁੱਕ", "ਸ਼ਨਿੱ"}, -- daysWide: []string{"ਐਤਵਾਰ", "ਸੋਮਵਾਰ", "ਮੰਗਲਵਾਰ", "ਬੁੱਧਵਾਰ", "ਵੀਰਵਾਰ", "ਸ਼ੁੱਕਰਵਾਰ", "ਸ਼ਨਿੱਚਰਵਾਰ"}, -- periodsAbbreviated: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- periodsNarrow: []string{"ਸ.", "ਸ਼."}, -- periodsWide: []string{"ਪੂ.ਦੁ.", "ਬਾ.ਦੁ."}, -- erasAbbreviated: []string{"ਈ. ਪੂ.", "ਸੰਨ"}, -- erasNarrow: []string{"ਈ.ਪੂ.", "ਸੰਨ"}, -- erasWide: []string{"ਈਸਵੀ ਪੂਰਵ", "ਈਸਵੀ ਸੰਨ"}, -- timezones: map[string]string{"WESZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CHAST": "ਚੈਥਮ ਮਿਆਰੀ ਵੇਲਾ", "WART": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "HNPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "VET": "ਵੈਨੇਜ਼ੂਏਲਾ ਵੇਲਾ", "PST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਮਿਆਰੀ ਵੇਲਾ", "MESZ": "ਮੱਧ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "JST": "ਜਪਾਨ ਮਿਆਰੀ ਵੇਲਾ", "WAST": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "EDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MYT": "ਮਲੇਸ਼ੀਆ ਵੇਲਾ", "PDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HEEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "GFT": "ਫ੍ਰੈਂਚ ਗੁਏਨਾ ਵੇਲਾ", "TMST": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "WARST": "ਪੱਛਮੀ ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "UYST": "ਉਰੂਗਵੇ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "WEZ": "ਪੱਛਮੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "CHADT": "ਚੈਥਮ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ACDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "COST": "ਕੋਲੰਬੀਆ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "CDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HEOG": "ਪੱਛਮੀ ਗ੍ਰੀਨਲੈਂਡ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HKT": "ਹਾਂਗ ਕਾਂਗ ਮਿਆਰੀ ਵੇਲਾ", "HEPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "SGT": "ਸਿੰਗਾਪੁਰ ਮਿਆਰੀ ਵੇਲਾ", "AWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "NZDT": "ਨਿਊਜ਼ੀਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "JDT": "ਜਪਾਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "TMT": "ਤੁਰਕਮੇਨਿਸਤਾਨ ਮਿਆਰੀ ਵੇਲਾ", "COT": "ਕੋਲੰਬੀਆ ਮਿਆਰੀ ਵੇਲਾ", "WIT": "ਪੂਰਬੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "HAT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "LHDT": "ਲੌਰਡ ਹੋਵੇ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "MEZ": "ਮੱਧ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "SAST": "ਦੱਖਣੀ ਅਫ਼ਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "WAT": "ਪੱਛਮੀ ਅਫਰੀਕਾ ਮਿਆਰੀ ਵੇਲਾ", "WIB": "ਪੱਛਮੀ ਇੰਡੋਨੇਸ਼ੀਆ ਵੇਲਾ", "AWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AEDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "LHST": "ਲੌਰਡ ਹੋਵੇ ਮਿਆਰੀ ਵੇਲਾ", "NZST": "ਨਿਊਜ਼ੀਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "GMT": "ਗ੍ਰੀਨਵਿਚ ਮੀਨ ਵੇਲਾ", "HEPMX": "ਮੈਕਸੀਕਨ ਪੈਸਿਫਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "AKDT": "ਅਲਾਸਕਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNT": "ਨਿਊਫਾਉਂਡਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "HKST": "ਹਾਂਗ ਕਾਂਗ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "BOT": "ਬੋਲੀਵੀਆ ਵੇਲਾ", "ChST": "ਚਾਮੋਰੋ ਮਿਆਰੀ ਵੇਲਾ", "ECT": "ਇਕਵੇਡੋਰ ਵੇਲਾ", "CST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "HNPM": "ਸੈਂਟ ਪੀਅਰੇ ਅਤੇ ਮਿਕੇਲਨ ਮਿਆਰੀ ਵੇਲਾ", "ACST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਮਿਆਰੀ ਵੇਲਾ", "AST": "ਅਟਲਾਂਟਿਕ ਮਿਆਰੀ ਵੇਲਾ", "UYT": "ਉਰੂਗਵੇ ਮਿਆਰੀ ਵੇਲਾ", "MST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਮਾਉਂਟੇਨ ਮਿਆਰੀ ਵੇਲਾ", "HENOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HADT": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HNNOMX": "ਉੱਤਰ ਪੱਛਮੀ ਮੈਕਸੀਕੋ ਮਿਆਰੀ ਵੇਲਾ", "HECU": "ਕਿਊਬਾ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ADT": "ਅਟਲਾਂਟਿਕ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "IST": "ਭਾਰਤੀ ਮਿਆਰੀ ਵੇਲਾ", "CLT": "ਚਿਲੀ ਮਿਆਰੀ ਵੇਲਾ", "CAT": "ਕੇਂਦਰੀ ਅਫਰੀਕਾ ਵੇਲਾ", "HNCU": "ਕਿਊਬਾ ਮਿਆਰੀ ਵੇਲਾ", "EST": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ", "OEZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਮਿਆਰੀ ਵੇਲਾ", "GYT": "ਗੁਯਾਨਾ ਵੇਲਾ", "MDT": "ਉੱਤਰੀ ਅਮਰੀਕੀ ਮਾਉਂਟੇਨ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "HAST": "ਹਵਾਈ-ਅਲੇਯੂਸ਼ਿਅਨ ਮਿਆਰੀ ਵੇਲਾ", "SRT": "ਸੂਰੀਨਾਮ ਵੇਲਾ", "ACWST": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਮਿਆਰੀ ਵੇਲਾ", "∅∅∅": "ਅਮੇਜ਼ਨ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "ARST": "ਅਰਜਨਟੀਨਾ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "HNEG": "ਪੂਰਬੀ ਗ੍ਰੀਨਲੈਂਡ ਮਿਆਰੀ ਵੇਲਾ", "EAT": "ਪੂਰਬੀ ਅਫਰੀਕਾ ਵੇਲਾ", "AKST": "ਅਲਾਸਕਾ ਮਿਆਰੀ ਵੇਲਾ", "CLST": "ਚਿਲੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "OESZ": "ਪੂਰਬੀ ਯੂਰਪੀ ਗਰਮੀਆਂ ਦਾ ਵੇਲਾ", "BT": "ਭੂਟਾਨ ਵੇਲਾ", "ACWDT": "ਆਸਟ੍ਰੇਲੀਆਈ ਕੇਂਦਰੀ ਪੱਛਮੀ ਪ੍ਰਕਾਸ਼ ਵੇਲਾ", "ART": "ਅਰਜਨਟੀਨਾ ਮਿਆਰੀ ਵੇਲਾ", "WITA": "ਮੱਧ ਇੰਡੋਨੇਸ਼ੀਆਈ ਵੇਲਾ", "AEST": "ਆਸਟ੍ਰੇਲੀਆਈ ਪੂਰਬੀ ਮਿਆਰੀ ਵੇਲਾ"}, -+ locale: "pa_Guru_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "EST": "EST", "ART": "ART", "HEPM": "HEPM", "AEDT": "AEDT", "WAT": "WAT", "GYT": "GYT", "HKST": "HKST", "BOT": "BOT", "CHADT": "CHADT", "WARST": "WARST", "HEOG": "HEOG", "SRT": "SRT", "EAT": "EAT", "WESZ": "WESZ", "GFT": "GFT", "COT": "COT", "HKT": "HKT", "HADT": "HADT", "AWST": "AWST", "AWDT": "AWDT", "ARST": "ARST", "CHAST": "CHAST", "PST": "PST", "WIT": "WIT", "MDT": "MDT", "NZST": "NZST", "MEZ": "MEZ", "HNPM": "HNPM", "UYT": "UYT", "WEZ": "WEZ", "WAST": "WAST", "OESZ": "OESZ", "WITA": "WITA", "ChST": "ChST", "HAST": "HAST", "JDT": "JDT", "MYT": "MYT", "PDT": "PDT", "AKST": "AKST", "WART": "WART", "WIB": "WIB", "MST": "MST", "LHST": "LHST", "BT": "BT", "HAT": "HAT", "HNOG": "HNOG", "CAT": "CAT", "NZDT": "NZDT", "AEST": "AEST", "CLT": "CLT", "CLST": "CLST", "AST": "AST", "ADT": "ADT", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "JST": "JST", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "EDT": "EDT", "CDT": "CDT", "HNEG": "HNEG", "HEEG": "HEEG", "ACWDT": "ACWDT", "HNCU": "HNCU", "VET": "VET", "OEZ": "OEZ", "TMT": "TMT", "HENOMX": "HENOMX", "LHDT": "LHDT", "AKDT": "AKDT", "TMST": "TMST", "ACST": "ACST", "UYST": "UYST", "IST": "IST", "HNPMX": "HNPMX", "SGT": "SGT", "HNT": "HNT", "COST": "COST", "ECT": "ECT", "HEPMX": "HEPMX", "CST": "CST", "GMT": "GMT", "MESZ": "MESZ", "HECU": "HECU"}, - } - } -  -@@ -133,7 +114,7 @@ func (pa *pa_Guru_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pa *pa_Guru_IN) MonthsAbbreviated() []string { -- return pa.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -143,7 +124,7 @@ func (pa *pa_Guru_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pa *pa_Guru_IN) MonthsNarrow() []string { -- return pa.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -153,7 +134,7 @@ func (pa *pa_Guru_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pa *pa_Guru_IN) MonthsWide() []string { -- return pa.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -199,82 +180,13 @@ func (pa *pa_Guru_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pa_Guru_IN' and handles both Whole and Real numbers based on 'v' - func (pa *pa_Guru_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pa_Guru_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pa *pa_Guru_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pa.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Guru_IN' -@@ -282,65 +194,7 @@ func (pa *pa_Guru_IN) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pa.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pa_Guru_IN' -@@ -349,73 +203,7 @@ func (pa *pa_Guru_IN) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pa.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pa.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, pa.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pa.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pa.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pa_Guru_IN' -@@ -423,17 +211,6 @@ func (pa *pa_Guru_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -442,17 +219,6 @@ func (pa *pa_Guru_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -461,17 +227,6 @@ func (pa *pa_Guru_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -480,19 +235,6 @@ func (pa *pa_Guru_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pa.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pa.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,28 +243,6 @@ func (pa *pa_Guru_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -531,35 +251,6 @@ func (pa *pa_Guru_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -568,40 +259,6 @@ func (pa *pa_Guru_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -610,44 +267,5 @@ func (pa *pa_Guru_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pa.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, pa.periodsAbbreviated[0]...) -- } else { -- b = append(b, pa.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pa.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pl/pl.go b/pl/pl.go -index 4030669..fd79e3b 100644 ---- a/pl/pl.go -+++ b/pl/pl.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"p.n.e.", "n.e."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"przed naszą erą", "naszej ery"}, -- timezones: map[string]string{"HNNOMX": "Meksyk Północno-Zachodni (czas standardowy)", "UYST": "Urugwaj (czas letni)", "HNT": "Nowa Fundlandia (czas standardowy)", "CAT": "Czas środkowoafrykański", "EAT": "Czas wschodnioafrykański", "WITA": "Indonezja Środkowa", "HNPM": "Saint-Pierre i Miquelon (czas standardowy)", "CHAST": "Chatham (czas standardowy)", "CHADT": "Chatham (czas letni)", "EST": "Czas wschodnioamerykański standardowy", "EDT": "Czas wschodnioamerykański letni", "HNPMX": "Meksyk (czas pacyficzny standardowy)", "UYT": "Urugwaj (czas standardowy)", "ACWDT": "Czas środkowo-zachodnioaustralijski letni", "MESZ": "Czas środkowoeuropejski letni", "TMST": "Turkmenistan (czas letni)", "LHDT": "Lord Howe (czas letni)", "AKST": "Alaska (czas standardowy)", "AKDT": "Alaska (czas letni)", "AST": "Czas atlantycki standardowy", "ADT": "Czas atlantycki letni", "ART": "Argentyna (czas standardowy)", "AWST": "Czas zachodnioaustralijski standardowy", "HEPM": "Saint-Pierre i Miquelon (czas letni)", "AEDT": "Czas wschodnioaustralijski letni", "BOT": "Boliwia", "ECT": "Ekwador", "SGT": "Singapur", "MST": "MST", "SRT": "Surinam", "PST": "Czas pacyficzny standardowy", "ACWST": "Czas środkowo-zachodnioaustralijski standardowy", "CLT": "Chile (czas standardowy)", "TMT": "Turkmenistan (czas standardowy)", "HEEG": "Grenlandia Wschodnia (czas letni)", "ACST": "Czas środkowoaustralijski standardowy", "∅∅∅": "Peru (czas letni)", "OEZ": "Czas wschodnioeuropejski standardowy", "WARST": "Argentyna Zachodnia (czas letni)", "WIB": "Indonezja Zachodnia", "BT": "Bhutan", "PDT": "Czas pacyficzny letni", "ACDT": "Czas środkowoaustralijski letni", "CDT": "Czas środkowoamerykański letni", "AEST": "Czas wschodnioaustralijski standardowy", "GFT": "Gujana Francuska", "GMT": "Czas uniwersalny", "MDT": "MDT", "HAST": "Hawaje-Aleuty (czas standardowy)", "VET": "Wenezuela", "HAT": "Nowa Fundlandia (czas letni)", "SAST": "Czas południowoafrykański", "JST": "Japonia (czas standardowy)", "WAST": "Czas zachodnioafrykański letni", "COT": "Kolumbia (czas standardowy)", "HECU": "Kuba (czas letni)", "JDT": "Japonia (czas letni)", "NZDT": "Nowa Zelandia (czas letni)", "WART": "Argentyna Zachodnia (czas standardowy)", "WEZ": "Czas zachodnioeuropejski standardowy", "WESZ": "Czas zachodnioeuropejski letni", "ARST": "Argentyna (czas letni)", "HNOG": "Grenlandia Zachodnia (czas standardowy)", "MEZ": "Czas środkowoeuropejski standardowy", "LHST": "Lord Howe (czas standardowy)", "HADT": "Hawaje-Aleuty (czas letni)", "IST": "Czas indyjski", "ChST": "Czamorro", "CLST": "Chile (czas letni)", "OESZ": "Czas wschodnioeuropejski letni", "HENOMX": "Meksyk Północno-Zachodni (czas letni)", "GYT": "Gujana", "WIT": "Indonezja Wschodnia", "HKT": "Hongkong (czas standardowy)", "HKST": "Hongkong (czas letni)", "NZST": "Nowa Zelandia (czas standardowy)", "COST": "Kolumbia (czas letni)", "HNCU": "Kuba (czas standardowy)", "HEPMX": "Meksyk (czas pacyficzny letni)", "HNEG": "Grenlandia Wschodnia (czas standardowy)", "WAT": "Czas zachodnioafrykański standardowy", "CST": "Czas środkowoamerykański standardowy", "MYT": "Malezja", "HEOG": "Grenlandia Zachodnia (czas letni)", "AWDT": "Czas zachodnioaustralijski letni"}, -+ timezones: map[string]string{"UYST": "Urugwaj (czas letni)", "HECU": "Kuba (czas letni)", "CDT": "Czas środkowoamerykański letni", "WIB": "Indonezja Zachodnia", "MEZ": "Czas środkowoeuropejski standardowy", "GYT": "Gujana", "CHADT": "Chatham (czas letni)", "HNPMX": "Meksyk (czas pacyficzny standardowy)", "AKDT": "Alaska (czas letni)", "HENOMX": "Meksyk Północno-Zachodni (czas letni)", "WARST": "Argentyna Zachodnia (czas letni)", "CAT": "Czas środkowoafrykański", "WITA": "Indonezja Środkowa", "ACST": "Czas środkowoaustralijski standardowy", "HNT": "Nowa Fundlandia (czas standardowy)", "CHAST": "Chatham (czas standardowy)", "VET": "Wenezuela", "WAST": "Czas zachodnioafrykański letni", "GFT": "Gujana Francuska", "HAT": "Nowa Fundlandia (czas letni)", "NZDT": "Nowa Zelandia (czas letni)", "ACDT": "Czas środkowoaustralijski letni", "ACWST": "Czas środkowo-zachodnioaustralijski standardowy", "COT": "Kolumbia (czas standardowy)", "CLT": "Chile (czas standardowy)", "OEZ": "Czas wschodnioeuropejski standardowy", "PST": "Czas pacyficzny standardowy", "WEZ": "Czas zachodnioeuropejski standardowy", "SGT": "Singapur", "EST": "Czas wschodnioamerykański standardowy", "ADT": "Czas atlantycki letni", "BOT": "Boliwia", "MYT": "Malezja", "ART": "Argentyna (czas standardowy)", "LHDT": "Lord Howe (czas letni)", "HNCU": "Kuba (czas standardowy)", "MESZ": "Czas środkowoeuropejski letni", "AWDT": "Czas zachodnioaustralijski letni", "HNPM": "Saint-Pierre i Miquelon (czas standardowy)", "UYT": "Urugwaj (czas standardowy)", "HEOG": "Grenlandia Zachodnia (czas letni)", "CST": "Czas środkowoamerykański standardowy", "ECT": "Ekwador", "AST": "Czas atlantycki standardowy", "IST": "Czas indyjski", "AEDT": "Czas wschodnioaustralijski letni", "HEPMX": "Meksyk (czas pacyficzny letni)", "EAT": "Czas wschodnioafrykański", "HAST": "Hawaje-Aleuty (czas standardowy)", "AWST": "Czas zachodnioaustralijski standardowy", "WAT": "Czas zachodnioafrykański standardowy", "OESZ": "Czas wschodnioeuropejski letni", "HKT": "Hongkong (czas standardowy)", "HNEG": "Grenlandia Wschodnia (czas standardowy)", "HEPM": "Saint-Pierre i Miquelon (czas letni)", "JST": "Japonia (czas standardowy)", "ChST": "Czamorro", "HKST": "Hongkong (czas letni)", "PDT": "Czas pacyficzny letni", "TMT": "Turkmenistan (czas standardowy)", "TMST": "Turkmenistan (czas letni)", "CLST": "Chile (czas letni)", "SRT": "Surinam", "HADT": "Hawaje-Aleuty (czas letni)", "∅∅∅": "∅∅∅", "SAST": "Czas południowoafrykański", "EDT": "Czas wschodnioamerykański letni", "JDT": "Japonia (czas letni)", "WESZ": "Czas zachodnioeuropejski letni", "AKST": "Alaska (czas standardowy)", "HEEG": "Grenlandia Wschodnia (czas letni)", "AEST": "Czas wschodnioaustralijski standardowy", "WART": "Argentyna Zachodnia (czas standardowy)", "MST": "MST", "MDT": "MDT", "ARST": "Argentyna (czas letni)", "LHST": "Lord Howe (czas standardowy)", "BT": "Bhutan", "ACWDT": "Czas środkowo-zachodnioaustralijski letni", "WIT": "Indonezja Wschodnia", "COST": "Kolumbia (czas letni)", "NZST": "Nowa Zelandia (czas standardowy)", "GMT": "Czas uniwersalny", "HNNOMX": "Meksyk Północno-Zachodni (czas standardowy)", "HNOG": "Grenlandia Zachodnia (czas standardowy)"}, - } - } -  -diff --git a/pl_PL/pl_PL.go b/pl_PL/pl_PL.go -index 8f18744..d737d00 100644 ---- a/pl_PL/pl_PL.go -+++ b/pl_PL/pl_PL.go -@@ -10,70 +10,45 @@ import ( - ) -  - type pl_PL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pl_PL' locale - func New() locales.Translator { - return &pl_PL{ -- locale: "pl_PL", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paź", "lis", "gru"}, -- monthsNarrow: []string{"", "s", "l", "m", "k", "m", "c", "l", "s", "w", "p", "l", "g"}, -- monthsWide: []string{"", "stycznia", "lutego", "marca", "kwietnia", "maja", "czerwca", "lipca", "sierpnia", "września", "października", "listopada", "grudnia"}, -- daysAbbreviated: []string{"niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."}, -- daysNarrow: []string{"n", "p", "w", "ś", "c", "p", "s"}, -- daysShort: []string{"nie", "pon", "wto", "śro", "czw", "pią", "sob"}, -- daysWide: []string{"niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"p.n.e.", "n.e."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"przed naszą erą", "naszej ery"}, -- timezones: map[string]string{"HKST": "Hongkong (czas letni)", "NZDT": "Nowa Zelandia (czas letni)", "∅∅∅": "Czas amazoński letni", "OESZ": "Czas wschodnioeuropejski letni", "ECT": "Ekwador", "COST": "Kolumbia (czas letni)", "BT": "Bhutan", "SRT": "Surinam", "CHADT": "Chatham (czas letni)", "JST": "Japonia (czas standardowy)", "UYT": "Urugwaj (czas standardowy)", "AKDT": "Alaska (czas letni)", "HAT": "Nowa Fundlandia (czas letni)", "HKT": "Hongkong (czas standardowy)", "SAST": "Czas południowoafrykański", "WAT": "Czas zachodnioafrykański standardowy", "HNCU": "Kuba (czas standardowy)", "MDT": "MDT", "HNPM": "Saint-Pierre i Miquelon (czas standardowy)", "BOT": "Boliwia", "AKST": "Alaska (czas standardowy)", "AWST": "Czas zachodnioaustralijski standardowy", "MEZ": "Czas środkowoeuropejski standardowy", "HNEG": "Grenlandia Wschodnia (czas standardowy)", "ACST": "Czas środkowoaustralijski standardowy", "UYST": "Urugwaj (czas letni)", "ARST": "Argentyna (czas letni)", "AEDT": "Czas wschodnioaustralijski letni", "CHAST": "Chatham (czas standardowy)", "EAT": "Czas wschodnioafrykański", "GMT": "Czas uniwersalny", "PST": "Czas pacyficzny standardowy", "IST": "Czas indyjski", "HEEG": "Grenlandia Wschodnia (czas letni)", "WART": "Argentyna Zachodnia (czas standardowy)", "SGT": "Singapur", "MST": "MST", "WESZ": "Czas zachodnioeuropejski letni", "HEOG": "Grenlandia Zachodnia (czas letni)", "WEZ": "Czas zachodnioeuropejski standardowy", "ACWST": "Czas środkowo-zachodnioaustralijski standardowy", "ChST": "Czamorro", "WAST": "Czas zachodnioafrykański letni", "COT": "Kolumbia (czas standardowy)", "HENOMX": "Meksyk Północno-Zachodni (czas letni)", "GYT": "Gujana", "WIT": "Indonezja Wschodnia", "MESZ": "Czas środkowoeuropejski letni", "HAST": "Hawaje-Aleuty (czas standardowy)", "PDT": "Czas pacyficzny letni", "CLT": "Chile (czas standardowy)", "JDT": "Japonia (czas letni)", "HNNOMX": "Meksyk Północno-Zachodni (czas standardowy)", "EST": "Czas wschodnioamerykański standardowy", "ADT": "Czas atlantycki letni", "MYT": "Malezja", "HNPMX": "Meksyk (czas pacyficzny standardowy)", "HADT": "Hawaje-Aleuty (czas letni)", "ART": "Argentyna (czas standardowy)", "CLST": "Chile (czas letni)", "CST": "Czas środkowoamerykański standardowy", "VET": "Wenezuela", "AST": "Czas atlantycki standardowy", "WIB": "Indonezja Zachodnia", "GFT": "Gujana Francuska", "TMT": "Turkmenistan (czas standardowy)", "AWDT": "Czas zachodnioaustralijski letni", "WITA": "Indonezja Środkowa", "NZST": "Nowa Zelandia (czas standardowy)", "CAT": "Czas środkowoafrykański", "OEZ": "Czas wschodnioeuropejski standardowy", "EDT": "Czas wschodnioamerykański letni", "HEPMX": "Meksyk (czas pacyficzny letni)", "ACWDT": "Czas środkowo-zachodnioaustralijski letni", "HNOG": "Grenlandia Zachodnia (czas standardowy)", "ACDT": "Czas środkowoaustralijski letni", "WARST": "Argentyna Zachodnia (czas letni)", "LHDT": "Lord Howe (czas letni)", "LHST": "Lord Howe (czas standardowy)", "TMST": "Turkmenistan (czas letni)", "HECU": "Kuba (czas letni)", "CDT": "Czas środkowoamerykański letni", "HNT": "Nowa Fundlandia (czas standardowy)", "AEST": "Czas wschodnioaustralijski standardowy", "HEPM": "Saint-Pierre i Miquelon (czas letni)"}, -+ locale: "pl_PL", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "BT": "BT", "HEPMX": "HEPMX", "ECT": "ECT", "SRT": "SRT", "WART": "WART", "WIT": "WIT", "∅∅∅": "∅∅∅", "COST": "COST", "MYT": "MYT", "UYST": "UYST", "OEZ": "OEZ", "TMT": "TMT", "MEZ": "MEZ", "EAT": "EAT", "AEDT": "AEDT", "CST": "CST", "ACDT": "ACDT", "CHADT": "CHADT", "SGT": "SGT", "HKT": "HKT", "CLST": "CLST", "HADT": "HADT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "HNCU": "HNCU", "CAT": "CAT", "HAST": "HAST", "JDT": "JDT", "VET": "VET", "WAT": "WAT", "AKST": "AKST", "OESZ": "OESZ", "HAT": "HAT", "MST": "MST", "HEOG": "HEOG", "SAST": "SAST", "ADT": "ADT", "HEEG": "HEEG", "PST": "PST", "WESZ": "WESZ", "HECU": "HECU", "GFT": "GFT", "COT": "COT", "AST": "AST", "HKST": "HKST", "EST": "EST", "LHDT": "LHDT", "HEPM": "HEPM", "ACWST": "ACWST", "WEZ": "WEZ", "WARST": "WARST", "MESZ": "MESZ", "LHST": "LHST", "IST": "IST", "HNPMX": "HNPMX", "HENOMX": "HENOMX", "WIB": "WIB", "ACST": "ACST", "AWDT": "AWDT", "EDT": "EDT", "TMST": "TMST", "WITA": "WITA", "ChST": "ChST", "ARST": "ARST", "UYT": "UYT", "GYT": "GYT", "HNOG": "HNOG", "MDT": "MDT", "JST": "JST", "HNPM": "HNPM", "AEST": "AEST", "WAST": "WAST", "HNT": "HNT", "CLT": "CLT", "NZDT": "NZDT", "ART": "ART", "CHAST": "CHAST", "PDT": "PDT", "AKDT": "AKDT", "CDT": "CDT", "GMT": "GMT", "BOT": "BOT", "HNEG": "HNEG", "NZST": "NZST"}, - } - } -  -@@ -102,8 +77,8 @@ func (pl *pl_PL) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -- iMod100 := i % 100 - iMod10 := i % 10 -+ iMod100 := i % 100 -  - if i == 1 && v == 0 { - return locales.PluralRuleOne -@@ -166,7 +141,7 @@ func (pl *pl_PL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pl *pl_PL) MonthsAbbreviated() []string { -- return pl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -176,7 +151,7 @@ func (pl *pl_PL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pl *pl_PL) MonthsNarrow() []string { -- return pl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -186,7 +161,7 @@ func (pl *pl_PL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pl *pl_PL) MonthsWide() []string { -- return pl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -232,75 +207,13 @@ func (pl *pl_PL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pl_PL' and handles both Whole and Real numbers based on 'v' - func (pl *pl_PL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(pl.group) - 1; j >= 0; j-- { -- b = append(b, pl.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pl_PL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pl *pl_PL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pl_PL' -@@ -308,58 +221,7 @@ func (pl *pl_PL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pl.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(pl.group) - 1; j >= 0; j-- { -- b = append(b, pl.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pl.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, pl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pl_PL' -@@ -368,65 +230,7 @@ func (pl *pl_PL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pl.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(pl.group) - 1; j >= 0; j-- { -- b = append(b, pl.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, pl.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, pl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pl_PL' -@@ -434,27 +238,6 @@ func (pl *pl_PL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,17 +246,6 @@ func (pl *pl_PL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,17 +254,6 @@ func (pl *pl_PL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -501,19 +262,6 @@ func (pl *pl_PL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, pl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -522,19 +270,6 @@ func (pl *pl_PL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -543,26 +278,6 @@ func (pl *pl_PL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -571,30 +286,6 @@ func (pl *pl_PL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -603,34 +294,5 @@ func (pl *pl_PL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/prg/prg.go b/prg/prg.go -index cba023c..55c6ffd 100644 ---- a/prg/prg.go -+++ b/prg/prg.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"LHDT": "LHDT", "ACDT": "ACDT", "COST": "COST", "MST": "MST", "WESZ": "Wakkariskas Eurōpas daggas kerdā", "HNT": "HNT", "TMT": "TMT", "UYST": "UYST", "AWDT": "AWDT", "HNPM": "HNPM", "NZST": "NZST", "SAST": "SAST", "AKDT": "AKDT", "HADT": "HADT", "HNOG": "HNOG", "JDT": "JDT", "HNEG": "HNEG", "BT": "BT", "PDT": "Pacīfiskas Amērikas daggas kerdā", "MEZ": "Centrālas Eurōpas zēimas kerdā", "GFT": "GFT", "WAT": "WAT", "AKST": "AKST", "ACWDT": "ACWDT", "IST": "IST", "NZDT": "NZDT", "TMST": "TMST", "WART": "WART", "WARST": "WARST", "EDT": "Dēiniskas Amērikas daggas kerdā", "CDT": "Centrālas Amērikas daggas kerdā", "ART": "ART", "ECT": "ECT", "CAT": "CAT", "HAST": "HAST", "CLST": "CLST", "ChST": "ChST", "WITA": "WITA", "CHAST": "CHAST", "BOT": "BOT", "HEEG": "HEEG", "OESZ": "Dēiniskas Eurōpas daggas kerdā", "HNCU": "HNCU", "UYT": "UYT", "ACWST": "ACWST", "HENOMX": "HENOMX", "CLT": "CLT", "HEPMX": "HEPMX", "ADT": "Atlāntiska daggas kerdā", "HEPM": "HEPM", "SRT": "SRT", "WEZ": "Wakkariskas Eurōpas zēimas kerdā", "AWST": "AWST", "CHADT": "CHADT", "WAST": "WAST", "CST": "Centrālas Amērikas zēimas kerdā", "WIB": "WIB", "VET": "VET", "GYT": "GYT", "HNNOMX": "HNNOMX", "HECU": "HECU", "∅∅∅": "∅∅∅", "MDT": "MDT", "HKST": "HKST", "SGT": "SGT", "HAT": "HAT", "PST": "Pacīfiskas Amērikas zēimas kerdā", "LHST": "LHST", "AST": "Atlāntiska zēimas kerdā", "ARST": "ARST", "HKT": "HKT", "JST": "JST", "EAT": "EAT", "MYT": "MYT", "HEOG": "HEOG", "AEST": "AEST", "WIT": "WIT", "AEDT": "AEDT", "MESZ": "Centrālas Eurōpas daggas kerdā", "ACST": "ACST", "OEZ": "Dēiniskas Eurōpas zēimas kerdā", "GMT": "Greenwich kerdā", "HNPMX": "HNPMX", "EST": "Dēiniskas Amērikas zēimas kerdā", "COT": "COT"}, -+ timezones: map[string]string{"HNEG": "HNEG", "ECT": "ECT", "HEPMX": "HEPMX", "AKST": "AKST", "COST": "COST", "CST": "Centrālas Amērikas zēimas kerdā", "HAST": "HAST", "AWST": "AWST", "ACWST": "ACWST", "GFT": "GFT", "NZDT": "NZDT", "MEZ": "Centrālas Eurōpas zēimas kerdā", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "MDT": "Amērikas gārban daggas kerdā", "WIT": "WIT", "WITA": "WITA", "WESZ": "Wakkariskas Eurōpas daggas kerdā", "HNT": "HNT", "HKST": "HKST", "NZST": "NZST", "SRT": "SRT", "PST": "Pacīfiskas Amērikas zēimas kerdā", "AEST": "AEST", "BOT": "BOT", "WART": "WART", "TMST": "TMST", "SAST": "SAST", "ADT": "Atlāntiska daggas kerdā", "ARST": "ARST", "HENOMX": "HENOMX", "MYT": "MYT", "HEPM": "HEPM", "OEZ": "Dēiniskas Eurōpas zēimas kerdā", "ACST": "ACST", "AEDT": "AEDT", "VET": "VET", "HNCU": "HNCU", "HECU": "HECU", "HNPMX": "HNPMX", "EDT": "Dēiniskas Amērikas daggas kerdā", "CAT": "CAT", "HADT": "HADT", "IST": "IST", "PDT": "Pacīfiskas Amērikas daggas kerdā", "HAT": "HAT", "TMT": "TMT", "CLT": "CLT", "CDT": "Centrālas Amērikas daggas kerdā", "WIB": "WIB", "MESZ": "Centrālas Eurōpas daggas kerdā", "AWDT": "AWDT", "LHST": "LHST", "UYT": "UYT", "CHAST": "CHAST", "WAST": "WAST", "WARST": "WARST", "GYT": "GYT", "EAT": "EAT", "HNPM": "HNPM", "JST": "JST", "EST": "Dēiniskas Amērikas zēimas kerdā", "ChST": "ChST", "OESZ": "Dēiniskas Eurōpas daggas kerdā", "LHDT": "LHDT", "UYST": "UYST", "WAT": "WAT", "HEOG": "HEOG", "ART": "ART", "HEEG": "HEEG", "BT": "BT", "COT": "COT", "CLST": "CLST", "GMT": "Greenwich kerdā", "ACDT": "ACDT", "CHADT": "CHADT", "AKDT": "AKDT", "ACWDT": "ACWDT", "SGT": "SGT", "HKT": "HKT", "HNOG": "HNOG", "AST": "Atlāntiska zēimas kerdā", "MST": "Amērikas gārban zēimas kerdā", "JDT": "JDT", "WEZ": "Wakkariskas Eurōpas zēimas kerdā"}, - } - } -  -diff --git a/prg_001/prg_001.go b/prg_001/prg_001.go -index d902df9..83a32b4 100644 ---- a/prg_001/prg_001.go -+++ b/prg_001/prg_001.go -@@ -10,64 +10,45 @@ import ( - ) -  - type prg_001 struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'prg_001' locale - func New() locales.Translator { - return &prg_001{ -- locale: "prg_001", -- pluralsCardinal: []locales.PluralRule{1, 2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "rag", "was", "pūl", "sak", "zal", "sīm", "līp", "dag", "sil", "spa", "lap", "sal"}, -- monthsNarrow: []string{"", "R", "W", "P", "S", "Z", "S", "L", "D", "S", "S", "L", "S"}, -- monthsWide: []string{"", "rags", "wassarins", "pūlis", "sakkis", "zallaws", "sīmenis", "līpa", "daggis", "sillins", "spallins", "lapkrūtis", "sallaws"}, -- daysAbbreviated: []string{"nad", "pan", "wis", "pus", "ket", "pēn", "sab"}, -- daysNarrow: []string{"N", "P", "W", "P", "K", "P", "S"}, -- daysWide: []string{"nadīli", "panadīli", "wisasīdis", "pussisawaiti", "ketwirtiks", "pēntniks", "sabattika"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsWide: []string{"ankstāinan", "pa pussideinan"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WART": "WART", "HAST": "HAST", "WEZ": "Wakkariskas Eurōpas zēimas kerdā", "HNT": "HNT", "HNOG": "HNOG", "NZST": "NZST", "CHADT": "CHADT", "OESZ": "Dēiniskas Eurōpas daggas kerdā", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HECU": "HECU", "UYST": "UYST", "ARST": "ARST", "NZDT": "NZDT", "CLST": "CLST", "AWST": "AWST", "MESZ": "Centrālas Eurōpas daggas kerdā", "JST": "JST", "JDT": "JDT", "MYT": "MYT", "HEOG": "HEOG", "CHAST": "CHAST", "EAT": "EAT", "WARST": "WARST", "AKDT": "AKDT", "HKT": "HKT", "GFT": "GFT", "ACST": "ACST", "COT": "COT", "MST": "Amērikas gārban zēimas kerdā", "VET": "VET", "WIT": "WIT", "CST": "Centrālas Amērikas zēimas kerdā", "AST": "Atlāntiska zēimas kerdā", "ADT": "Atlāntiska daggas kerdā", "ACWST": "ACWST", "HEPM": "HEPM", "CDT": "Centrālas Amērikas daggas kerdā", "ART": "ART", "HNPM": "HNPM", "MEZ": "Centrālas Eurōpas zēimas kerdā", "TMST": "TMST", "SRT": "SRT", "PST": "Pacīfiskas Amērikas zēimas kerdā", "SAST": "SAST", "WAT": "WAT", "BT": "BT", "WESZ": "Wakkariskas Eurōpas daggas kerdā", "HEEG": "HEEG", "EST": "Dēiniskas Amērikas zēimas kerdā", "EDT": "Dēiniskas Amērikas daggas kerdā", "WIB": "WIB", "PDT": "Pacīfiskas Amērikas daggas kerdā", "AEST": "AEST", "AEDT": "AEDT", "WAST": "WAST", "SGT": "SGT", "HEPMX": "HEPMX", "GMT": "Greenwich kerdā", "HADT": "HADT", "LHST": "LHST", "IST": "IST", "CLT": "CLT", "∅∅∅": "∅∅∅", "TMT": "TMT", "CAT": "CAT", "GYT": "GYT", "HAT": "HAT", "BOT": "BOT", "ECT": "ECT", "UYT": "UYT", "LHDT": "LHDT", "HNEG": "HNEG", "OEZ": "Dēiniskas Eurōpas zēimas kerdā", "COST": "COST", "MDT": "Amērikas gārban daggas kerdā", "WITA": "WITA", "ChST": "ChST", "ACDT": "ACDT", "HNPMX": "HNPMX", "AKST": "AKST", "ACWDT": "ACWDT", "AWDT": "AWDT", "HKST": "HKST", "HNCU": "HNCU"}, -+ locale: "prg_001", -+ pluralsCardinal: []locales.PluralRule{1, 2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CST": "CST", "MYT": "MYT", "HNPM": "HNPM", "IST": "IST", "VET": "VET", "ART": "ART", "HAST": "HAST", "ACDT": "ACDT", "AWST": "AWST", "AEST": "AEST", "GFT": "GFT", "SAST": "SAST", "COT": "COT", "LHST": "LHST", "PST": "PST", "WAT": "WAT", "CLST": "CLST", "ECT": "ECT", "HADT": "HADT", "HNEG": "HNEG", "ACWDT": "ACWDT", "PDT": "PDT", "BT": "BT", "HNOG": "HNOG", "CLT": "CLT", "AST": "AST", "ChST": "ChST", "MESZ": "MESZ", "ACST": "ACST", "WESZ": "WESZ", "AKST": "AKST", "WITA": "WITA", "EAT": "EAT", "JST": "JST", "AWDT": "AWDT", "HECU": "HECU", "WAST": "WAST", "∅∅∅": "∅∅∅", "TMT": "TMT", "NZST": "NZST", "HEEG": "HEEG", "HEPM": "HEPM", "OEZ": "OEZ", "MST": "MST", "UYT": "UYT", "EDT": "EDT", "HNPMX": "HNPMX", "WIT": "WIT", "WIB": "WIB", "CDT": "CDT", "NZDT": "NZDT", "ADT": "ADT", "WART": "WART", "EST": "EST", "JDT": "JDT", "LHDT": "LHDT", "HNCU": "HNCU", "BOT": "BOT", "SRT": "SRT", "MEZ": "MEZ", "HNT": "HNT", "HAT": "HAT", "GYT": "GYT", "TMST": "TMST", "UYST": "UYST", "WEZ": "WEZ", "SGT": "SGT", "AKDT": "AKDT", "COST": "COST", "HEOG": "HEOG", "HKST": "HKST", "HENOMX": "HENOMX", "CHADT": "CHADT", "MDT": "MDT", "ARST": "ARST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "OESZ": "OESZ", "WARST": "WARST", "HKT": "HKT", "CAT": "CAT", "GMT": "GMT", "AEDT": "AEDT", "CHAST": "CHAST", "ACWST": "ACWST"}, - } - } -  -@@ -127,7 +108,7 @@ func (prg *prg_001) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (prg *prg_001) MonthsAbbreviated() []string { -- return prg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -137,7 +118,7 @@ func (prg *prg_001) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (prg *prg_001) MonthsNarrow() []string { -- return prg.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -147,7 +128,7 @@ func (prg *prg_001) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (prg *prg_001) MonthsWide() []string { -- return prg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -193,75 +174,13 @@ func (prg *prg_001) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'prg_001' and handles both Whole and Real numbers based on 'v' - func (prg *prg_001) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, prg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(prg.group) - 1; j >= 0; j-- { -- b = append(b, prg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, prg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'prg_001' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (prg *prg_001) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, prg.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, prg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, prg.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'prg_001' -@@ -269,58 +188,7 @@ func (prg *prg_001) FmtCurrency(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := prg.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, prg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(prg.group) - 1; j >= 0; j-- { -- b = append(b, prg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, prg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, prg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, prg.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'prg_001' -@@ -329,65 +197,7 @@ func (prg *prg_001) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := prg.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, prg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(prg.group) - 1; j >= 0; j-- { -- b = append(b, prg.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, prg.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, prg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, prg.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, prg.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'prg_001' -@@ -395,27 +205,6 @@ func (prg *prg_001) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -424,28 +213,6 @@ func (prg *prg_001) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x20, 0x73, 0x74}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,18 +221,6 @@ func (prg *prg_001) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0x6d, 0x65, 0x74, 0x74, 0x61, 0x73}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, prg.monthsWide[t.Month()]...) -- - return string(b) - } -  -@@ -474,21 +229,6 @@ func (prg *prg_001) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, prg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0x6d, 0x65, 0x74, 0x74, 0x61, 0x73}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, prg.monthsWide[t.Month()]...) -- - return string(b) - } -  -@@ -497,19 +237,6 @@ func (prg *prg_001) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -518,26 +245,6 @@ func (prg *prg_001) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -546,30 +253,6 @@ func (prg *prg_001) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -578,34 +261,5 @@ func (prg *prg_001) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, prg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := prg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ps/ps.go b/ps/ps.go -index 945febd..c90adf7 100644 ---- a/ps/ps.go -+++ b/ps/ps.go -@@ -70,7 +70,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"له میلاد وړاندې", "م."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"له میلاد څخه وړاندې", "له میلاد څخه وروسته"}, -- timezones: map[string]string{"OEZ": "OEZ", "ART": "ART", "HNOG": "HNOG", "WITA": "WITA", "SAST": "SAST", "WAT": "WAT", "∅∅∅": "∅∅∅", "TMT": "TMT", "SGT": "SGT", "AST": "AST", "MDT": "MDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "MESZ": "MESZ", "HNT": "HNT", "AWST": "AWST", "AWDT": "AWDT", "IST": "IST", "COT": "COT", "CHAST": "CHAST", "LHDT": "LHDT", "ACDT": "ACDT", "HADT": "HADT", "SRT": "SRT", "HAT": "HAT", "HEPM": "HEPM", "NZDT": "NZDT", "HNCU": "HNCU", "MYT": "MYT", "BOT": "BOT", "GMT": "گرينويچ وخت", "HENOMX": "HENOMX", "CDT": "CDT", "ADT": "ADT", "HAST": "HAST", "MEZ": "MEZ", "CLST": "CLST", "EDT": "EDT", "HEOG": "HEOG", "HNPM": "HNPM", "NZST": "NZST", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "VET": "VET", "LHST": "LHST", "JDT": "JDT", "GFT": "GFT", "WART": "WART", "AEST": "AEST", "ECT": "ECT", "WARST": "WARST", "ACST": "ACST", "HECU": "HECU", "COST": "COST", "WIB": "WIB", "MST": "MST", "WESZ": "د لودیځې اورپا د اوړي وخت", "HKT": "HKT", "JST": "JST", "WAST": "WAST", "EAT": "EAT", "CST": "CST", "UYT": "UYT", "WEZ": "د لودیځې اروپا معیاري وخت", "HKST": "HKST", "AEDT": "AEDT", "AKDT": "AKDT", "WIT": "WIT", "CAT": "CAT", "UYST": "UYST", "HEEG": "HEEG", "ChST": "ChST", "OESZ": "OESZ", "EST": "EST", "GYT": "GYT", "ARST": "ARST", "PST": "PST", "PDT": "PDT", "TMST": "TMST", "HEPMX": "HEPMX", "AKST": "AKST", "BT": "BT", "CHADT": "CHADT", "CLT": "CLT", "HNEG": "HNEG"}, -+ timezones: map[string]string{"AEDT": "AEDT", "UYT": "UYT", "VET": "VET", "WAT": "WAT", "∅∅∅": "∅∅∅", "ARST": "ARST", "HNPM": "HNPM", "LHDT": "LHDT", "AST": "AST", "UYST": "UYST", "COT": "COT", "COST": "COST", "HKT": "HKT", "HEPM": "HEPM", "HAT": "HAT", "WART": "WART", "WAST": "WAST", "HNT": "HNT", "TMT": "TMT", "EST": "EST", "ECT": "ECT", "LHST": "LHST", "HNCU": "HNCU", "HEPMX": "HEPMX", "OEZ": "OEZ", "NZDT": "NZDT", "EAT": "EAT", "HNEG": "HNEG", "JDT": "JDT", "PDT": "PDT", "HKST": "HKST", "CST": "CST", "MDT": "MDT", "GMT": "گرينويچ وخت", "JST": "JST", "AWDT": "AWDT", "CHADT": "CHADT", "HECU": "HECU", "WITA": "WITA", "CDT": "CDT", "ADT": "ADT", "SRT": "SRT", "HEEG": "HEEG", "CHAST": "CHAST", "ACST": "ACST", "ACWST": "ACWST", "ACWDT": "ACWDT", "WESZ": "د لودیځې اورپا د اوړي وخت", "TMST": "TMST", "CLST": "CLST", "BOT": "BOT", "HENOMX": "HENOMX", "AKDT": "AKDT", "SAST": "SAST", "EDT": "EDT", "ChST": "ChST", "AEST": "AEST", "AKST": "AKST", "IST": "IST", "HEOG": "HEOG", "GYT": "GYT", "NZST": "NZST", "MST": "MST", "MESZ": "MESZ", "AWST": "AWST", "HNNOMX": "HNNOMX", "WARST": "WARST", "WEZ": "د لودیځې اروپا معیاري وخت", "SGT": "SGT", "OESZ": "OESZ", "CLT": "CLT", "ART": "ART", "HADT": "HADT", "BT": "BT", "WIT": "WIT", "CAT": "CAT", "WIB": "WIB", "MEZ": "MEZ", "HNPMX": "HNPMX", "GFT": "GFT", "HNOG": "HNOG", "HAST": "HAST", "ACDT": "ACDT", "MYT": "MYT", "PST": "PST"}, - } - } -  -diff --git a/ps_AF/ps_AF.go b/ps_AF/ps_AF.go -index 30deab7..40e6274 100644 ---- a/ps_AF/ps_AF.go -+++ b/ps_AF/ps_AF.go -@@ -10,67 +10,45 @@ import ( - ) -  - type ps_AF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ps_AF' locale - func New() locales.Translator { - return &ps_AF{ -- locale: "ps_AF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: "٫", -- group: "٬", -- minus: "‎-‎", -- percent: "٪", -- perMille: "؉", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "جنوري", "فبروري", "مارچ", "اپریل", "مۍ", "جون", "جولای", "اګست", "سپتمبر", "اکتوبر", "نومبر", "دسمبر"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "جنوري", "فبروري", "مارچ", "اپریل", "مۍ", "جون", "جولای", "اګست", "سپتمبر", "اکتوبر", "نومبر", "دسمبر"}, -- daysAbbreviated: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- daysShort: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- daysWide: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- periodsAbbreviated: []string{"غ.م.", "غ.و."}, -- periodsNarrow: []string{"غ.م.", "غ.و."}, -- periodsWide: []string{"غ.م.", "غ.و."}, -- erasAbbreviated: []string{"له میلاد وړاندې", "م."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"له میلاد څخه وړاندې", "له میلاد څخه وروسته"}, -- timezones: map[string]string{"SAST": "SAST", "MYT": "MYT", "UYST": "UYST", "PDT": "PDT", "AWST": "AWST", "AWDT": "AWDT", "WAST": "WAST", "COST": "COST", "GMT": "گرينويچ وخت", "AEST": "AEST", "HKT": "HKT", "CST": "CST", "CDT": "CDT", "ADT": "ADT", "ACWDT": "ACWDT", "CLT": "CLT", "WART": "WART", "HADT": "HADT", "LHDT": "LHDT", "NZST": "NZST", "OESZ": "OESZ", "MDT": "MDT", "AKST": "AKST", "VET": "VET", "SRT": "SRT", "HAT": "HAT", "CLST": "CLST", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "ECT": "ECT", "CAT": "CAT", "GYT": "GYT", "HEOG": "HEOG", "HNPM": "HNPM", "CHAST": "CHAST", "HEEG": "HEEG", "EST": "EST", "AST": "AST", "UYT": "UYT", "WIT": "WIT", "NZDT": "NZDT", "WAT": "WAT", "HNPMX": "HNPMX", "HNT": "HNT", "COT": "COT", "MST": "MST", "WEZ": "د لودیځې اروپا معیاري وخت", "ACWST": "ACWST", "WITA": "WITA", "CHADT": "CHADT", "TMST": "TMST", "HECU": "HECU", "ART": "ART", "AEDT": "AEDT", "HEPMX": "HEPMX", "WIB": "WIB", "MEZ": "MEZ", "LHST": "LHST", "IST": "IST", "BOT": "BOT", "ACST": "ACST", "HENOMX": "HENOMX", "WESZ": "د لودیځې اورپا د اوړي وخت", "MESZ": "MESZ", "GFT": "GFT", "EAT": "EAT", "HNOG": "HNOG", "PST": "PST", "TMT": "TMT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HKST": "HKST", "BT": "BT", "ARST": "ARST", "JST": "JST", "JDT": "JDT", "ChST": "ChST", "OEZ": "OEZ", "EDT": "EDT", "HAST": "HAST", "WARST": "WARST", "HNCU": "HNCU", "AKDT": "AKDT", "SGT": "SGT", "HEPM": "HEPM"}, -+ locale: "ps_AF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OESZ": "OESZ", "EST": "EST", "CST": "CST", "MDT": "MDT", "ARST": "ARST", "ADT": "ADT", "AWST": "AWST", "CHAST": "CHAST", "TMST": "TMST", "CLT": "CLT", "SRT": "SRT", "MESZ": "MESZ", "HEEG": "HEEG", "LHST": "LHST", "HNPMX": "HNPMX", "MST": "MST", "JST": "JST", "MYT": "MYT", "∅∅∅": "∅∅∅", "VET": "VET", "AKST": "AKST", "ECT": "ECT", "ACWDT": "ACWDT", "UYT": "UYT", "HNEG": "HNEG", "PST": "PST", "SGT": "SGT", "HAT": "HAT", "WART": "WART", "HKST": "HKST", "BOT": "BOT", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "WESZ": "WESZ", "OEZ": "OEZ", "WIT": "WIT", "HNOG": "HNOG", "ACDT": "ACDT", "HECU": "HECU", "GFT": "GFT", "HNT": "HNT", "COST": "COST", "EAT": "EAT", "HENOMX": "HENOMX", "UYST": "UYST", "GMT": "GMT", "ChST": "ChST", "HNPM": "HNPM", "WAT": "WAT", "AKDT": "AKDT", "HEPMX": "HEPMX", "ACST": "ACST", "LHDT": "LHDT", "CHADT": "CHADT", "IST": "IST", "TMT": "TMT", "HKT": "HKT", "JDT": "JDT", "AEST": "AEST", "BT": "BT", "HNCU": "HNCU", "WAST": "WAST", "WARST": "WARST", "COT": "COT", "ART": "ART", "MEZ": "MEZ", "HEPM": "HEPM", "AWDT": "AWDT", "CLST": "CLST", "CDT": "CDT", "NZST": "NZST", "HAST": "HAST", "PDT": "PDT", "GYT": "GYT", "AST": "AST", "WITA": "WITA", "HADT": "HADT", "ACWST": "ACWST", "AEDT": "AEDT", "HEOG": "HEOG", "SAST": "SAST", "EDT": "EDT", "CAT": "CAT", "WIB": "WIB", "NZDT": "NZDT"}, - } - } -  -@@ -123,7 +101,7 @@ func (ps *ps_AF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ps *ps_AF) MonthsAbbreviated() []string { -- return ps.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -133,7 +111,7 @@ func (ps *ps_AF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ps *ps_AF) MonthsNarrow() []string { -- return ps.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -143,7 +121,7 @@ func (ps *ps_AF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ps *ps_AF) MonthsWide() []string { -- return ps.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -189,83 +167,13 @@ func (ps *ps_AF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ps_AF' and handles both Whole and Real numbers based on 'v' - func (ps *ps_AF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 9 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ps.decimal) - 1; j >= 0; j-- { -- b = append(b, ps.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ps.group) - 1; j >= 0; j-- { -- b = append(b, ps.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ps.minus) - 1; j >= 0; j-- { -- b = append(b, ps.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ps_AF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ps *ps_AF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 11 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ps.decimal) - 1; j >= 0; j-- { -- b = append(b, ps.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ps.minus) - 1; j >= 0; j-- { -- b = append(b, ps.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ps.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ps_AF' -@@ -273,62 +181,7 @@ func (ps *ps_AF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ps.currencies[currency] -- l := len(s) + len(symbol) + 11 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ps.decimal) - 1; j >= 0; j-- { -- b = append(b, ps.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ps.group) - 1; j >= 0; j-- { -- b = append(b, ps.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ps.minus) - 1; j >= 0; j-- { -- b = append(b, ps.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ps.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ps.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ps_AF' -@@ -337,69 +190,7 @@ func (ps *ps_AF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ps.currencies[currency] -- l := len(s) + len(symbol) + 11 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(ps.decimal) - 1; j >= 0; j-- { -- b = append(b, ps.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ps.group) - 1; j >= 0; j-- { -- b = append(b, ps.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(ps.minus) - 1; j >= 0; j-- { -- b = append(b, ps.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ps.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ps.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ps.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ps_AF' -@@ -407,17 +198,6 @@ func (ps *ps_AF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -426,17 +206,6 @@ func (ps *ps_AF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ps.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -445,19 +214,6 @@ func (ps *ps_AF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0xd8, 0xaf, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd8, 0xaf, 0x20}...) -- b = append(b, ps.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -466,20 +222,6 @@ func (ps *ps_AF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ps.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20, 0xd8, 0xaf, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd8, 0xaf, 0x20}...) -- b = append(b, ps.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -488,15 +230,6 @@ func (ps *ps_AF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,22 +238,6 @@ func (ps *ps_AF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -529,28 +246,6 @@ func (ps *ps_AF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -559,32 +254,5 @@ func (ps *ps_AF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ps.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ps.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/pt/pt.go b/pt/pt.go -index 29faf0c..cdf2877 100644 ---- a/pt/pt.go -+++ b/pt/pt.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"a.C.", "d.C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"MYT": "Horário da Malásia", "HKT": "Horário Padrão de Hong Kong", "AWST": "Horário Padrão da Austrália Ocidental", "COST": "Horário de Verão da Colômbia", "CST": "Horário Padrão Central", "HKST": "Horário de Verão de Hong Kong", "HNEG": "Horário Padrão da Groelândia Oriental", "MST": "Horário Padrão de Macau", "OESZ": "Horário de Verão da Europa Oriental", "COT": "Horário Padrão da Colômbia", "MDT": "Horário de Verão de Macau", "WITA": "Horário da Indonésia Central", "CHAST": "Horário Padrão de Chatham", "CHADT": "Horário de Verão de Chatham", "EST": "Horário Padrão Oriental", "AKDT": "Horário de Verão do Alasca", "ADT": "Horário de Verão do Atlântico", "BT": "Horário do Butão", "SRT": "Horário do Suriname", "PST": "Horário Padrão do Pacífico", "MEZ": "Horário Padrão da Europa Central", "CLST": "Horário de Verão do Chile", "AEDT": "Horário de Verão da Austrália Oriental", "ACDT": "Horário de Verão da Austrália Central", "HNNOMX": "Horário Padrão do Noroeste do México", "HNT": "Horário Padrão de Terra Nova", "HAT": "Horário de Verão de Terra Nova", "ART": "Horário Padrão da Argentina", "ARST": "Horário de Verão da Argentina", "GFT": "Horário da Guiana Francesa", "TMST": "Horário de Verão do Turcomenistão", "HNOG": "Horário Padrão da Groenlândia Ocidental", "HNCU": "Horário Padrão de Cuba", "CDT": "Horário de Verão Central", "AWDT": "Horário de Verão da Austrália Ocidental", "WAT": "Horário Padrão da África Ocidental", "HENOMX": "Horário de Verão do Noroeste do México", "TMT": "Horário Padrão do Turcomenistão", "BOT": "Horário da Bolívia", "EDT": "Horário de Verão Oriental", "JDT": "Horário de Verão do Japão", "CLT": "Horário Padrão do Chile", "ECT": "Horário do Equador", "AST": "Horário Padrão do Atlântico", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "OEZ": "Horário Padrão da Europa Oriental", "CAT": "Horário da África Central", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "ChST": "Horário de Chamorro", "∅∅∅": "Horário de Verão do Amazonas", "ACST": "Horário Padrão da Austrália Central", "WAST": "Horário de Verão da África Ocidental", "AKST": "Horário Padrão do Alasca", "PDT": "Horário de Verão do Pacífico", "AEST": "Horário Padrão da Austrália Oriental", "NZST": "Horário Padrão da Nova Zelândia", "SAST": "Horário da África do Sul", "HEEG": "Horário de Verão da Groelândia Oriental", "HEPMX": "Horário de Verão do Pacífico do México", "WIT": "Horário da Indonésia Oriental", "LHDT": "Horário de Verão de Lord Howe", "JST": "Horário Padrão do Japão", "GYT": "Horário da Guiana", "WIB": "Horário da Indonésia Ocidental", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "WART": "Horário Padrão da Argentina Ocidental", "GMT": "Horário do Meridiano de Greenwich", "NZDT": "Horário de Verão da Nova Zelândia", "VET": "Horário da Venezuela", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "HEOG": "Horário de Verão da Groenlândia Ocidental", "WEZ": "Horário Padrão da Europa Ocidental", "IST": "Horário Padrão da Índia", "SGT": "Horário Padrão de Cingapura", "HNPMX": "Horário Padrão do Pacífico do México", "UYT": "Horário Padrão do Uruguai", "UYST": "Horário de Verão do Uruguai", "EAT": "Horário da África Oriental", "WARST": "Horário de Verão da Argentina Ocidental", "HECU": "Horário de Verão de Cuba", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "WESZ": "Horário de Verão da Europa Ocidental", "MESZ": "Horário de Verão da Europa Central", "LHST": "Horário Padrão de Lord Howe"}, -+ timezones: map[string]string{"AEDT": "Horário de Verão da Austrália Oriental", "UYT": "Horário Padrão do Uruguai", "WARST": "Horário de Verão da Argentina Ocidental", "COT": "Horário Padrão da Colômbia", "HNT": "Horário Padrão de Terra Nova", "WIT": "Horário da Indonésia Oriental", "WART": "Horário Padrão da Argentina Ocidental", "HEOG": "Horário de Verão da Groenlândia Ocidental", "ChST": "Horário de Chamorro", "MDT": "Horário de Verão da Montanha", "JST": "Horário Padrão do Japão", "LHST": "Horário Padrão de Lord Howe", "WESZ": "Horário de Verão da Europa Ocidental", "TMT": "Horário Padrão do Turcomenistão", "ARST": "Horário de Verão da Argentina", "MESZ": "Horário de Verão da Europa Central", "WAST": "Horário de Verão da África Ocidental", "SRT": "Horário do Suriname", "HNCU": "Horário Padrão de Cuba", "OESZ": "Horário de Verão da Europa Oriental", "OEZ": "Horário Padrão da Europa Oriental", "CST": "Horário Padrão Central", "ADT": "Horário de Verão do Atlântico", "HNNOMX": "Horário Padrão do Noroeste do México", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "IST": "Horário Padrão da Índia", "PST": "Horário Padrão do Pacífico", "GMT": "Horário do Meridiano de Greenwich", "MEZ": "Horário Padrão da Europa Central", "AWDT": "Horário de Verão da Austrália Ocidental", "LHDT": "Horário de Verão de Lord Howe", "AKST": "Horário Padrão do Alasca", "HECU": "Horário de Verão de Cuba", "SGT": "Horário Padrão de Cingapura", "WAT": "Horário Padrão da África Ocidental", "HNEG": "Horário Padrão da Groelândia Oriental", "HEEG": "Horário de Verão da Groelândia Oriental", "HENOMX": "Horário de Verão do Noroeste do México", "CHADT": "Horário de Verão de Chatham", "PDT": "Horário de Verão do Pacífico", "ACST": "Horário Padrão da Austrália Central", "AWST": "Horário Padrão da Austrália Ocidental", "∅∅∅": "Horário de Verão do Acre", "HEPMX": "Horário de Verão do Pacífico do México", "ECT": "Horário do Equador", "CDT": "Horário de Verão Central", "MST": "Horário Padrão da Montanha", "AEST": "Horário Padrão da Austrália Oriental", "HNPMX": "Horário Padrão do Pacífico do México", "HNOG": "Horário Padrão da Groenlândia Ocidental", "EST": "Horário Padrão Oriental", "CLT": "Horário Padrão do Chile", "AST": "Horário Padrão do Atlântico", "MYT": "Horário da Malásia", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "UYST": "Horário de Verão do Uruguai", "CAT": "Horário da África Central", "TMST": "Horário de Verão do Turcomenistão", "NZST": "Horário Padrão da Nova Zelândia", "ART": "Horário Padrão da Argentina", "EAT": "Horário da África Oriental", "ACDT": "Horário de Verão da Austrália Central", "VET": "Horário da Venezuela", "AKDT": "Horário de Verão do Alasca", "SAST": "Horário da África do Sul", "BOT": "Horário da Bolívia", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "BT": "Horário do Butão", "GFT": "Horário da Guiana Francesa", "HAT": "Horário de Verão de Terra Nova", "CHAST": "Horário Padrão de Chatham", "WEZ": "Horário Padrão da Europa Ocidental", "GYT": "Horário da Guiana", "CLST": "Horário de Verão do Chile", "WITA": "Horário da Indonésia Central", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "JDT": "Horário de Verão do Japão", "EDT": "Horário de Verão Oriental", "NZDT": "Horário de Verão da Nova Zelândia", "WIB": "Horário da Indonésia Ocidental", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "COST": "Horário de Verão da Colômbia", "HKT": "Horário Padrão de Hong Kong", "HKST": "Horário de Verão de Hong Kong"}, - } - } -  -diff --git a/pt_AO/pt_AO.go b/pt_AO/pt_AO.go -index ad7de26..381b30e 100644 ---- a/pt_AO/pt_AO.go -+++ b/pt_AO/pt_AO.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_AO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_AO' locale - func New() locales.Translator { - return &pt_AO{ -- locale: "pt_AO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "Kz", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"LHDT": "Horário de Verão de Lord Howe", "EST": "Horário Padrão Oriental", "HKST": "Horário de Verão de Hong Kong", "CLT": "Horário Padrão do Chile", "WARST": "Horário de Verão da Argentina Ocidental", "BT": "Horário do Butão", "PST": "Horário Padrão do Pacífico", "WITA": "Horário da Indonésia Central", "SRT": "Horário do Suriname", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "SAST": "Horário da África do Sul", "CLST": "Horário de Verão do Chile", "HNCU": "Horário Padrão de Cuba", "MDT": "Horário de Verão de Macau", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "NZDT": "Horário de Verão da Nova Zelândia", "MST": "Horário Padrão de Macau", "HEPMX": "Horário de Verão do Pacífico do México", "AEST": "Horário Padrão da Austrália Oriental", "COT": "Horário Padrão da Colômbia", "AKST": "Horário Padrão do Alasca", "UYST": "Horário de Verão do Uruguai", "TMST": "Horário de Verão do Turcomenistão", "HENOMX": "Horário de Verão do Noroeste do México", "HNT": "Horário Padrão de Terra Nova", "MEZ": "Horário Padrão da Europa Central", "LHST": "Horário Padrão de Lord Howe", "CHAST": "Horário Padrão de Chatham", "∅∅∅": "Horário de Verão do Amazonas", "GFT": "Horário da Guiana Francesa", "MYT": "Horário da Malásia", "AEDT": "Horário de Verão da Austrália Oriental", "AWST": "Horário Padrão da Austrália Ocidental", "BOT": "Horário da Bolívia", "OESZ": "Horário de Verão da Europa Oriental", "SGT": "Horário Padrão de Cingapura", "EDT": "Horário de Verão Oriental", "HAT": "Horário de Verão de Terra Nova", "ART": "Horário Padrão da Argentina", "NZST": "Horário Padrão da Nova Zelândia", "IST": "Horário Padrão da Índia", "JDT": "Horário de Verão do Japão", "WART": "Horário Padrão da Argentina Ocidental", "WESZ": "Horário de Verão da Europa Ocidental", "TMT": "Horário Padrão do Turcomenistão", "ACDT": "Horário de Verão da Austrália Central", "ADT": "Horário de Verão do Atlântico", "HEOG": "Horário de Verão da Groenlândia Ocidental", "HKT": "Horário Padrão de Hong Kong", "WAST": "Horário de Verão da África Ocidental", "OEZ": "Horário Padrão da Europa Oriental", "CDT": "Horário de Verão Central", "WIT": "Horário da Indonésia Oriental", "PDT": "Horário de Verão do Pacífico", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "HNOG": "Horário Padrão da Groenlândia Ocidental", "AWDT": "Horário de Verão da Austrália Ocidental", "JST": "Horário Padrão do Japão", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "CHADT": "Horário de Verão de Chatham", "ChST": "Horário de Chamorro", "HEEG": "Horário de Verão da Groelândia Oriental", "EAT": "Horário da África Oriental", "HNNOMX": "Horário Padrão do Noroeste do México", "WIB": "Horário da Indonésia Ocidental", "VET": "Horário da Venezuela", "COST": "Horário de Verão da Colômbia", "HNPMX": "Horário Padrão do Pacífico do México", "WEZ": "Horário Padrão da Europa Ocidental", "ARST": "Horário de Verão da Argentina", "HNEG": "Horário Padrão da Groelândia Oriental", "CAT": "Horário da África Central", "WAT": "Horário Padrão da África Ocidental", "ECT": "Horário do Equador", "AKDT": "Horário de Verão do Alasca", "AST": "Horário Padrão do Atlântico", "GYT": "Horário da Guiana", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "MESZ": "Horário de Verão da Europa Central", "ACST": "Horário Padrão da Austrália Central", "GMT": "Horário do Meridiano de Greenwich", "HECU": "Horário de Verão de Cuba", "CST": "Horário Padrão Central", "UYT": "Horário Padrão do Uruguai"}, -+ locale: "pt_AO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "Kz", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "ACWDT": "ACWDT", "HNT": "HNT", "HKST": "HKST", "CAT": "CAT", "ACDT": "ACDT", "CHAST": "CHAST", "WAST": "WAST", "MEZ": "MEZ", "AKST": "AKST", "CLT": "CLT", "ARST": "ARST", "HNEG": "HNEG", "HADT": "HADT", "LHST": "LHST", "JST": "JST", "AEDT": "AEDT", "OEZ": "OEZ", "GFT": "GFT", "CST": "CST", "EAT": "EAT", "LHDT": "LHDT", "JDT": "JDT", "VET": "VET", "HNCU": "HNCU", "HEPMX": "HEPMX", "SAST": "SAST", "IST": "IST", "PST": "PST", "WEZ": "WEZ", "SGT": "SGT", "WART": "WART", "EDT": "EDT", "HKT": "HKT", "NZDT": "NZDT", "ChST": "ChST", "ART": "ART", "MESZ": "MESZ", "GYT": "GYT", "EST": "EST", "WIB": "WIB", "ADT": "ADT", "GMT": "GMT", "BT": "BT", "ACWST": "ACWST", "UYT": "UYT", "WESZ": "WESZ", "HECU": "HECU", "WITA": "WITA", "CDT": "CDT", "PDT": "PDT", "UYST": "UYST", "WARST": "WARST", "WIT": "WIT", "HEOG": "HEOG", "NZST": "NZST", "ACST": "ACST", "AEST": "AEST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "ECT": "ECT", "HNPM": "HNPM", "HEPM": "HEPM", "WAT": "WAT", "COT": "COT", "HNNOMX": "HNNOMX", "HEEG": "HEEG", "CHADT": "CHADT", "AKDT": "AKDT", "HAT": "HAT", "HNOG": "HNOG", "TMST": "TMST", "BOT": "BOT", "HAST": "HAST", "AWST": "AWST", "HNPMX": "HNPMX", "COST": "COST", "MST": "MST", "MDT": "MDT", "HENOMX": "HENOMX", "MYT": "MYT", "TMT": "TMT", "CLST": "CLST", "AST": "AST", "SRT": "SRT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_AO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_AO) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_AO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_AO) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_AO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_AO) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_AO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_AO' and handles both Whole and Real numbers based on 'v' - func (pt *pt_AO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_AO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_AO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_AO' -@@ -277,56 +194,7 @@ func (pt *pt_AO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_AO' -@@ -335,68 +203,7 @@ func (pt *pt_AO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_AO' -@@ -404,27 +211,6 @@ func (pt *pt_AO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_AO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_AO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_AO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_AO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_AO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_AO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_AO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_BR/pt_BR.go b/pt_BR/pt_BR.go -index 35d5477..4a666f2 100644 ---- a/pt_BR/pt_BR.go -+++ b/pt_BR/pt_BR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_BR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_BR' locale - func New() locales.Translator { - return &pt_BR{ -- locale: "pt_BR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"LHST": "Horário Padrão de Lord Howe", "ACDT": "Horário de Verão da Austrália Central", "WAST": "Horário de Verão da África Ocidental", "PDT": "Horário de Verão do Pacífico", "WITA": "Horário da Indonésia Central", "WAT": "Horário Padrão da África Ocidental", "HNNOMX": "Horário Padrão do Noroeste do México", "ART": "Horário Padrão da Argentina", "AWDT": "Horário de Verão da Austrália Ocidental", "MESZ": "Horário de Verão da Europa Central", "HNCU": "Horário Padrão de Cuba", "AST": "Horário Padrão do Atlântico", "BT": "Horário do Butão", "HKST": "Horário de Verão de Hong Kong", "GMT": "Horário do Meridiano de Greenwich", "EST": "Horário Padrão Oriental", "UYST": "Horário de Verão do Uruguai", "HEOG": "Horário de Verão da Groenlândia Ocidental", "∅∅∅": "Horário de Verão do Amazonas", "TMT": "Horário Padrão do Turcomenistão", "WARST": "Horário de Verão da Argentina Ocidental", "COT": "Horário Padrão da Colômbia", "CHADT": "Horário de Verão de Chatham", "MDT": "Horário de Verão de Macau", "HNPMX": "Horário Padrão do Pacífico do México", "MYT": "Horário da Malásia", "UYT": "Horário Padrão do Uruguai", "CLST": "Horário de Verão do Chile", "ACST": "Horário Padrão da Austrália Central", "CAT": "Horário da África Central", "HECU": "Horário de Verão de Cuba", "CDT": "Horário de Verão Central", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "AEDT": "Horário de Verão da Austrália Oriental", "MEZ": "Horário Padrão da Europa Central", "NZST": "Horário Padrão da Nova Zelândia", "SAST": "Horário da África do Sul", "CLT": "Horário Padrão do Chile", "JST": "Horário Padrão do Japão", "HAT": "Horário de Verão de Terra Nova", "BOT": "Horário da Bolívia", "COST": "Horário de Verão da Colômbia", "HENOMX": "Horário de Verão do Noroeste do México", "AKDT": "Horário de Verão do Alasca", "TMST": "Horário de Verão do Turcomenistão", "NZDT": "Horário de Verão da Nova Zelândia", "WIT": "Horário da Indonésia Oriental", "WESZ": "Horário de Verão da Europa Ocidental", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "JDT": "Horário de Verão do Japão", "ChST": "Horário de Chamorro", "MST": "Horário Padrão de Macau", "GYT": "Horário da Guiana", "HEEG": "Horário de Verão da Groelândia Oriental", "ADT": "Horário de Verão do Atlântico", "ARST": "Horário de Verão da Argentina", "HNEG": "Horário Padrão da Groelândia Oriental", "ECT": "Horário do Equador", "SGT": "Horário Padrão de Cingapura", "VET": "Horário da Venezuela", "WART": "Horário Padrão da Argentina Ocidental", "CST": "Horário Padrão Central", "AWST": "Horário Padrão da Austrália Ocidental", "HNOG": "Horário Padrão da Groenlândia Ocidental", "AKST": "Horário Padrão do Alasca", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "WEZ": "Horário Padrão da Europa Ocidental", "HNT": "Horário Padrão de Terra Nova", "HKT": "Horário Padrão de Hong Kong", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "IST": "Horário Padrão da Índia", "EAT": "Horário da África Oriental", "OESZ": "Horário de Verão da Europa Oriental", "SRT": "Horário do Suriname", "CHAST": "Horário Padrão de Chatham", "WIB": "Horário da Indonésia Ocidental", "PST": "Horário Padrão do Pacífico", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "GFT": "Horário da Guiana Francesa", "OEZ": "Horário Padrão da Europa Oriental", "EDT": "Horário de Verão Oriental", "HEPMX": "Horário de Verão do Pacífico do México", "LHDT": "Horário de Verão de Lord Howe"}, -+ locale: "pt_BR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SGT": "SGT", "COST": "COST", "TMST": "TMST", "HAST": "HAST", "LHDT": "LHDT", "BT": "BT", "CHAST": "CHAST", "OESZ": "OESZ", "HAT": "HAT", "EDT": "EDT", "ADT": "ADT", "MEZ": "MEZ", "UYST": "UYST", "HEPMX": "HEPMX", "WARST": "WARST", "WIT": "WIT", "NZDT": "NZDT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "OEZ": "OEZ", "HNEG": "HNEG", "COT": "COT", "ACDT": "ACDT", "HKST": "HKST", "TMT": "TMT", "CLST": "CLST", "HEEG": "HEEG", "MYT": "MYT", "AEDT": "AEDT", "GYT": "GYT", "CDT": "CDT", "GMT": "GMT", "LHST": "LHST", "CHADT": "CHADT", "WESZ": "WESZ", "VET": "VET", "HNPMX": "HNPMX", "WART": "WART", "CLT": "CLT", "HENOMX": "HENOMX", "PST": "PST", "ACWST": "ACWST", "JST": "JST", "HECU": "HECU", "HEPM": "HEPM", "AKST": "AKST", "AKDT": "AKDT", "HNOG": "HNOG", "HKT": "HKT", "CAT": "CAT", "ChST": "ChST", "UYT": "UYT", "∅∅∅": "∅∅∅", "JDT": "JDT", "HADT": "HADT", "HNPM": "HNPM", "WIB": "WIB", "IST": "IST", "ACWDT": "ACWDT", "EAT": "EAT", "HEOG": "HEOG", "BOT": "BOT", "GFT": "GFT", "SAST": "SAST", "EST": "EST", "NZST": "NZST", "AWST": "AWST", "PDT": "PDT", "WAT": "WAT", "AST": "AST", "ARST": "ARST", "ACST": "ACST", "AWDT": "AWDT", "MDT": "MDT", "ECT": "ECT", "CST": "CST", "SRT": "SRT", "AEST": "AEST", "WAST": "WAST", "WITA": "WITA", "MST": "MST", "ART": "ART", "WEZ": "WEZ", "HNT": "HNT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_BR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_BR) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_BR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_BR) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_BR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_BR) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_BR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_BR' and handles both Whole and Real numbers based on 'v' - func (pt *pt_BR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_BR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_BR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_BR' -@@ -277,56 +194,7 @@ func (pt *pt_BR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_BR' -@@ -335,68 +203,7 @@ func (pt *pt_BR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_BR' -@@ -404,27 +211,6 @@ func (pt *pt_BR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_BR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_BR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_BR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_BR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_BR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_BR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_BR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_CH/pt_CH.go b/pt_CH/pt_CH.go -index 03fd76f..91b58ca 100644 ---- a/pt_CH/pt_CH.go -+++ b/pt_CH/pt_CH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_CH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_CH' locale - func New() locales.Translator { - return &pt_CH{ -- locale: "pt_CH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"CLST": "Horário de Verão do Chile", "GFT": "Horário da Guiana Francesa", "GMT": "Horário do Meridiano de Greenwich", "ChST": "Horário de Chamorro", "ACST": "Horário Padrão da Austrália Central", "COST": "Horário de Verão da Colômbia", "HKST": "Horário de Verão de Hong Kong", "CLT": "Horário Padrão do Chile", "WAST": "Horário de Verão da África Ocidental", "EST": "Horário Padrão Oriental", "HNPMX": "Horário Padrão do Pacífico do México", "PDT": "Horário de Verão do Pacífico", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "MESZ": "Horário de Verão da Europa Central", "WAT": "Horário Padrão da África Ocidental", "WARST": "Horário de Verão da Argentina Ocidental", "HECU": "Horário de Verão de Cuba", "AKST": "Horário Padrão do Alasca", "AKDT": "Horário de Verão do Alasca", "VET": "Horário da Venezuela", "ARST": "Horário de Verão da Argentina", "CHAST": "Horário Padrão de Chatham", "CAT": "Horário da África Central", "EDT": "Horário de Verão Oriental", "MST": "Horário Padrão de Macau", "MYT": "Horário da Malásia", "BT": "Horário do Butão", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "LHDT": "Horário de Verão de Lord Howe", "COT": "Horário Padrão da Colômbia", "SGT": "Horário Padrão de Cingapura", "AST": "Horário Padrão do Atlântico", "UYST": "Horário de Verão do Uruguai", "SRT": "Horário do Suriname", "TMT": "Horário Padrão do Turcomenistão", "WART": "Horário Padrão da Argentina Ocidental", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "AWDT": "Horário de Verão da Austrália Ocidental", "IST": "Horário Padrão da Índia", "JST": "Horário Padrão do Japão", "TMST": "Horário de Verão do Turcomenistão", "ECT": "Horário do Equador", "WIB": "Horário da Indonésia Ocidental", "BOT": "Horário da Bolívia", "EAT": "Horário da África Oriental", "HENOMX": "Horário de Verão do Noroeste do México", "MDT": "Horário de Verão de Macau", "∅∅∅": "Horário de Verão do Amazonas", "HEEG": "Horário de Verão da Groelândia Oriental", "OEZ": "Horário Padrão da Europa Oriental", "HEPMX": "Horário de Verão do Pacífico do México", "ADT": "Horário de Verão do Atlântico", "HAT": "Horário de Verão de Terra Nova", "PST": "Horário Padrão do Pacífico", "WESZ": "Horário de Verão da Europa Ocidental", "JDT": "Horário de Verão do Japão", "ACDT": "Horário de Verão da Austrália Central", "HNNOMX": "Horário Padrão do Noroeste do México", "HNCU": "Horário Padrão de Cuba", "CDT": "Horário de Verão Central", "UYT": "Horário Padrão do Uruguai", "ART": "Horário Padrão da Argentina", "HNOG": "Horário Padrão da Groenlândia Ocidental", "CHADT": "Horário de Verão de Chatham", "LHST": "Horário Padrão de Lord Howe", "NZDT": "Horário de Verão da Nova Zelândia", "CST": "Horário Padrão Central", "GYT": "Horário da Guiana", "HNT": "Horário Padrão de Terra Nova", "HEOG": "Horário de Verão da Groenlândia Ocidental", "WEZ": "Horário Padrão da Europa Ocidental", "WITA": "Horário da Indonésia Central", "HNEG": "Horário Padrão da Groelândia Oriental", "OESZ": "Horário de Verão da Europa Oriental", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "HKT": "Horário Padrão de Hong Kong", "MEZ": "Horário Padrão da Europa Central", "NZST": "Horário Padrão da Nova Zelândia", "SAST": "Horário da África do Sul", "WIT": "Horário da Indonésia Oriental", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "AEDT": "Horário de Verão da Austrália Oriental", "AWST": "Horário Padrão da Austrália Ocidental"}, -+ locale: "pt_CH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OEZ": "OEZ", "GFT": "GFT", "HAT": "HAT", "AST": "AST", "ADT": "ADT", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "WESZ": "WESZ", "WART": "WART", "GMT": "GMT", "PDT": "PDT", "ACWST": "ACWST", "HEPMX": "HEPMX", "WIT": "WIT", "HENOMX": "HENOMX", "CHAST": "CHAST", "EAT": "EAT", "LHDT": "LHDT", "OESZ": "OESZ", "NZST": "NZST", "GYT": "GYT", "COT": "COT", "COST": "COST", "ChST": "ChST", "ACST": "ACST", "HNEG": "HNEG", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "CAT": "CAT", "WITA": "WITA", "NZDT": "NZDT", "WIB": "WIB", "SRT": "SRT", "LHST": "LHST", "HNPMX": "HNPMX", "WAT": "WAT", "SAST": "SAST", "AKDT": "AKDT", "HEOG": "HEOG", "HNT": "HNT", "TMST": "TMST", "ACDT": "ACDT", "AWST": "AWST", "IST": "IST", "WEZ": "WEZ", "SGT": "SGT", "HECU": "HECU", "WARST": "WARST", "ECT": "ECT", "ART": "ART", "ARST": "ARST", "MST": "MST", "BT": "BT", "HNCU": "HNCU", "CLT": "CLT", "CST": "CST", "HADT": "HADT", "HEEG": "HEEG", "JDT": "JDT", "PST": "PST", "ACWDT": "ACWDT", "JST": "JST", "UYST": "UYST", "BOT": "BOT", "HAST": "HAST", "MEZ": "MEZ", "MESZ": "MESZ", "MYT": "MYT", "VET": "VET", "HKT": "HKT", "CDT": "CDT", "UYT": "UYT", "AEST": "AEST", "WAST": "WAST", "EDT": "EDT", "HKST": "HKST", "AWDT": "AWDT", "CHADT": "CHADT", "CLST": "CLST", "AKST": "AKST", "EST": "EST", "MDT": "MDT", "AEDT": "AEDT", "HNOG": "HNOG", "TMT": "TMT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_CH) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_CH) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_CH) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_CH' and handles both Whole and Real numbers based on 'v' - func (pt *pt_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_CH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_CH' -@@ -277,56 +194,7 @@ func (pt *pt_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_CH' -@@ -335,68 +203,7 @@ func (pt *pt_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_CH' -@@ -404,27 +211,6 @@ func (pt *pt_CH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_CH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_CH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_CV/pt_CV.go b/pt_CV/pt_CV.go -index 9793116..1fb48be 100644 ---- a/pt_CV/pt_CV.go -+++ b/pt_CV/pt_CV.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_CV struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_CV' locale - func New() locales.Translator { - return &pt_CV{ -- locale: "pt_CV", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "\u200b", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "\u200bPTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"AWST": "Horário Padrão da Austrália Ocidental", "CHAST": "Horário Padrão de Chatham", "CLT": "Horário Padrão do Chile", "EAT": "Horário da África Oriental", "ECT": "Horário do Equador", "GMT": "Horário do Meridiano de Greenwich", "UYT": "Horário Padrão do Uruguai", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "GFT": "Horário da Guiana Francesa", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "ACST": "Horário Padrão da Austrália Central", "HECU": "Horário de Verão de Cuba", "WIT": "Horário da Indonésia Oriental", "ART": "Horário Padrão da Argentina", "PDT": "Horário de Verão do Pacífico", "NZDT": "Horário de Verão da Nova Zelândia", "CHADT": "Horário de Verão de Chatham", "CAT": "Horário da África Central", "HNNOMX": "Horário Padrão do Noroeste do México", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "WESZ": "Horário de Verão da Europa Ocidental", "HAT": "Horário de Verão de Terra Nova", "AKST": "Horário Padrão do Alasca", "ADT": "Horário de Verão do Atlântico", "WEZ": "Horário Padrão da Europa Ocidental", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "SAST": "Horário da África do Sul", "COST": "Horário de Verão da Colômbia", "AST": "Horário Padrão do Atlântico", "MYT": "Horário da Malásia", "HNT": "Horário Padrão de Terra Nova", "MEZ": "Horário Padrão da Europa Central", "HENOMX": "Horário de Verão do Noroeste do México", "UYST": "Horário de Verão do Uruguai", "BT": "Horário do Butão", "HKST": "Horário de Verão de Hong Kong", "AEST": "Horário Padrão da Austrália Oriental", "VET": "Horário da Venezuela", "MESZ": "Horário de Verão da Europa Central", "ChST": "Horário de Chamorro", "IST": "Horário Padrão da Índia", "TMST": "Horário de Verão do Turcomenistão", "WAT": "Horário Padrão da África Ocidental", "WART": "Horário Padrão da Argentina Ocidental", "AKDT": "Horário de Verão do Alasca", "SRT": "Horário do Suriname", "HEOG": "Horário de Verão da Groenlândia Ocidental", "TMT": "Horário Padrão do Turcomenistão", "ACDT": "Horário de Verão da Austrália Central", "WAST": "Horário de Verão da África Ocidental", "∅∅∅": "Horário de Verão do Peru", "SGT": "Horário Padrão de Cingapura", "CLST": "Horário de Verão do Chile", "MDT": "Horário de Verão de Macau", "GYT": "Horário da Guiana", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "HEEG": "Horário de Verão da Groelândia Oriental", "HEPMX": "Horário de Verão do Pacífico do México", "EST": "Horário Padrão Oriental", "WIB": "Horário da Indonésia Ocidental", "AEDT": "Horário de Verão da Austrália Oriental", "LHST": "Horário Padrão de Lord Howe", "BOT": "Horário da Bolívia", "OESZ": "Horário de Verão da Europa Oriental", "COT": "Horário Padrão da Colômbia", "WITA": "Horário da Indonésia Central", "LHDT": "Horário de Verão de Lord Howe", "JDT": "Horário de Verão do Japão", "HNCU": "Horário Padrão de Cuba", "ARST": "Horário de Verão da Argentina", "AWDT": "Horário de Verão da Austrália Ocidental", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "WARST": "Horário de Verão da Argentina Ocidental", "MST": "Horário Padrão de Macau", "HNOG": "Horário Padrão da Groenlândia Ocidental", "JST": "Horário Padrão do Japão", "EDT": "Horário de Verão Oriental", "HNEG": "Horário Padrão da Groelândia Oriental", "HKT": "Horário Padrão de Hong Kong", "NZST": "Horário Padrão da Nova Zelândia", "OEZ": "Horário Padrão da Europa Oriental", "HNPMX": "Horário Padrão do Pacífico do México", "CST": "Horário Padrão Central", "CDT": "Horário de Verão Central", "PST": "Horário Padrão do Pacífico"}, -+ locale: "pt_CV", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "\u200b", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "\u200bPTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWDT": "AWDT", "WESZ": "WESZ", "WART": "WART", "WIT": "WIT", "HAST": "HAST", "JST": "JST", "WEZ": "WEZ", "AWST": "AWST", "SRT": "SRT", "MEZ": "MEZ", "ACST": "ACST", "HEEG": "HEEG", "HENOMX": "HENOMX", "PDT": "PDT", "CHADT": "CHADT", "NZDT": "NZDT", "HKT": "HKT", "SGT": "SGT", "ECT": "ECT", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "HNT": "HNT", "MST": "MST", "ACDT": "ACDT", "GYT": "GYT", "CLST": "CLST", "WITA": "WITA", "ADT": "ADT", "HEPMX": "HEPMX", "SAST": "SAST", "TMT": "TMT", "TMST": "TMST", "LHDT": "LHDT", "ChST": "ChST", "HADT": "HADT", "HEPM": "HEPM", "PST": "PST", "UYT": "UYT", "VET": "VET", "WAST": "WAST", "AST": "AST", "AKDT": "AKDT", "WIB": "WIB", "LHST": "LHST", "AEST": "AEST", "HNPMX": "HNPMX", "WARST": "WARST", "COST": "COST", "CAT": "CAT", "CDT": "CDT", "CLT": "CLT", "HNEG": "HNEG", "IST": "IST", "BT": "BT", "ACWDT": "ACWDT", "AEDT": "AEDT", "HECU": "HECU", "EDT": "EDT", "NZST": "NZST", "OEZ": "OEZ", "COT": "COT", "ARST": "ARST", "EAT": "EAT", "UYST": "UYST", "GMT": "GMT", "MESZ": "MESZ", "MYT": "MYT", "CHAST": "CHAST", "GFT": "GFT", "HAT": "HAT", "ART": "ART", "MDT": "MDT", "WAT": "WAT", "HEOG": "HEOG", "CST": "CST", "JDT": "JDT", "HNOG": "HNOG", "EST": "EST", "HKST": "HKST", "BOT": "BOT", "AKST": "AKST", "OESZ": "OESZ", "ACWST": "ACWST", "HNPM": "HNPM", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_CV) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_CV) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_CV) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_CV) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_CV) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_CV) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_CV) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_CV' and handles both Whole and Real numbers based on 'v' - func (pt *pt_CV) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_CV' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_CV) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_CV' -@@ -277,56 +194,7 @@ func (pt *pt_CV) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_CV' -@@ -335,68 +203,7 @@ func (pt *pt_CV) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_CV' -@@ -404,27 +211,6 @@ func (pt *pt_CV) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_CV) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_CV) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_CV) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_CV) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_CV) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_CV) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_CV) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_GQ/pt_GQ.go b/pt_GQ/pt_GQ.go -index eee3e0f..09d52d4 100644 ---- a/pt_GQ/pt_GQ.go -+++ b/pt_GQ/pt_GQ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_GQ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_GQ' locale - func New() locales.Translator { - return &pt_GQ{ -- locale: "pt_GQ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"WARST": "Horário de Verão da Argentina Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "IST": "Horário Padrão da Índia", "TMT": "Horário Padrão do Turcomenistão", "MESZ": "Horário de Verão da Europa Central", "EST": "Horário Padrão Oriental", "MDT": "Horário de Verão de Macau", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "HAT": "Horário de Verão de Terra Nova", "NZDT": "Horário de Verão da Nova Zelândia", "GMT": "Horário do Meridiano de Greenwich", "SGT": "Horário Padrão de Cingapura", "UYST": "Horário de Verão do Uruguai", "WEZ": "Horário Padrão da Europa Ocidental", "WART": "Horário Padrão da Argentina Ocidental", "COST": "Horário de Verão da Colômbia", "AST": "Horário Padrão do Atlântico", "HNT": "Horário Padrão de Terra Nova", "CHADT": "Horário de Verão de Chatham", "WAT": "Horário Padrão da África Ocidental", "ECT": "Horário do Equador", "PST": "Horário Padrão do Pacífico", "ChST": "Horário de Chamorro", "MYT": "Horário da Malásia", "UYT": "Horário Padrão do Uruguai", "ARST": "Horário de Verão da Argentina", "AEDT": "Horário de Verão da Austrália Oriental", "JDT": "Horário de Verão do Japão", "CST": "Horário Padrão Central", "ADT": "Horário de Verão do Atlântico", "WIB": "Horário da Indonésia Ocidental", "ACDT": "Horário de Verão da Austrália Central", "HNOG": "Horário Padrão da Groenlândia Ocidental", "SAST": "Horário da África do Sul", "TMST": "Horário de Verão do Turcomenistão", "AWDT": "Horário de Verão da Austrália Ocidental", "WAST": "Horário de Verão da África Ocidental", "HNNOMX": "Horário Padrão do Noroeste do México", "MST": "Horário Padrão de Macau", "VET": "Horário da Venezuela", "HKST": "Horário de Verão de Hong Kong", "HNEG": "Horário Padrão da Groelândia Oriental", "AWST": "Horário Padrão da Austrália Ocidental", "MEZ": "Horário Padrão da Europa Central", "JST": "Horário Padrão do Japão", "CLT": "Horário Padrão do Chile", "CLST": "Horário de Verão do Chile", "OEZ": "Horário Padrão da Europa Oriental", "HEPMX": "Horário de Verão do Pacífico do México", "AKDT": "Horário de Verão do Alasca", "GYT": "Horário da Guiana", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "HEOG": "Horário de Verão da Groenlândia Ocidental", "LHST": "Horário Padrão de Lord Howe", "HENOMX": "Horário de Verão do Noroeste do México", "HECU": "Horário de Verão de Cuba", "CDT": "Horário de Verão Central", "WIT": "Horário da Indonésia Oriental", "ART": "Horário Padrão da Argentina", "OESZ": "Horário de Verão da Europa Oriental", "EAT": "Horário da África Oriental", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "WITA": "Horário da Indonésia Central", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "ACST": "Horário Padrão da Austrália Central", "EDT": "Horário de Verão Oriental", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "HKT": "Horário Padrão de Hong Kong", "BOT": "Horário da Bolívia", "PDT": "Horário de Verão do Pacífico", "NZST": "Horário Padrão da Nova Zelândia", "CHAST": "Horário Padrão de Chatham", "∅∅∅": "Horário de Verão do Peru", "COT": "Horário Padrão da Colômbia", "AKST": "Horário Padrão do Alasca", "BT": "Horário do Butão", "SRT": "Horário do Suriname", "LHDT": "Horário de Verão de Lord Howe", "HEEG": "Horário de Verão da Groelândia Oriental", "GFT": "Horário da Guiana Francesa", "CAT": "Horário da África Central", "HNCU": "Horário Padrão de Cuba", "HNPMX": "Horário Padrão do Pacífico do México", "WESZ": "Horário de Verão da Europa Ocidental", "HEPM": "Horário de Verão de Saint Pierre e Miquelon"}, -+ locale: "pt_GQ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OEZ": "OEZ", "ARST": "ARST", "ACWST": "ACWST", "CHADT": "CHADT", "AEDT": "AEDT", "SGT": "SGT", "HKT": "HKT", "MST": "MST", "EAT": "EAT", "AEST": "AEST", "CST": "CST", "GMT": "GMT", "HADT": "HADT", "MESZ": "MESZ", "WESZ": "WESZ", "ACDT": "ACDT", "ART": "ART", "HAST": "HAST", "HEEG": "HEEG", "LHST": "LHST", "HNT": "HNT", "HAT": "HAT", "COT": "COT", "HKST": "HKST", "UYT": "UYT", "UYST": "UYST", "IST": "IST", "CHAST": "CHAST", "WAT": "WAT", "GFT": "GFT", "EST": "EST", "AWDT": "AWDT", "COST": "COST", "SRT": "SRT", "HEPM": "HEPM", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "AKDT": "AKDT", "CAT": "CAT", "MDT": "MDT", "HENOMX": "HENOMX", "LHDT": "LHDT", "HNPM": "HNPM", "JST": "JST", "HECU": "HECU", "HEOG": "HEOG", "WITA": "WITA", "HNEG": "HNEG", "BT": "BT", "WAST": "WAST", "WARST": "WARST", "CLT": "CLT", "TMST": "TMST", "CDT": "CDT", "JDT": "JDT", "PST": "PST", "OESZ": "OESZ", "WART": "WART", "WIT": "WIT", "GYT": "GYT", "PDT": "PDT", "BOT": "BOT", "HNNOMX": "HNNOMX", "AWST": "AWST", "MYT": "MYT", "VET": "VET", "EDT": "EDT", "CLST": "CLST", "ACST": "ACST", "∅∅∅": "∅∅∅", "AKST": "AKST", "WIB": "WIB", "NZDT": "NZDT", "ECT": "ECT", "AST": "AST", "ADT": "ADT", "HNPMX": "HNPMX", "HNOG": "HNOG", "TMT": "TMT", "NZST": "NZST", "MEZ": "MEZ", "WEZ": "WEZ", "HNCU": "HNCU", "SAST": "SAST", "ChST": "ChST"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_GQ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_GQ) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_GQ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_GQ) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_GQ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_GQ) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_GQ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_GQ' and handles both Whole and Real numbers based on 'v' - func (pt *pt_GQ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_GQ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_GQ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_GQ' -@@ -277,56 +194,7 @@ func (pt *pt_GQ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_GQ' -@@ -335,68 +203,7 @@ func (pt *pt_GQ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_GQ' -@@ -404,27 +211,6 @@ func (pt *pt_GQ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_GQ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_GQ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_GQ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_GQ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_GQ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_GQ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_GQ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_GW/pt_GW.go b/pt_GW/pt_GW.go -index fa991b6..85271a4 100644 ---- a/pt_GW/pt_GW.go -+++ b/pt_GW/pt_GW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_GW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_GW' locale - func New() locales.Translator { - return &pt_GW{ -- locale: "pt_GW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"HEPMX": "Horário de Verão do Pacífico do México", "MDT": "Horário de Verão da Montanha", "LHDT": "Horário de Verão de Lord Howe", "NZST": "Horário Padrão da Nova Zelândia", "TMT": "Horário Padrão do Turcomenistão", "HNNOMX": "Horário Padrão do Noroeste do México", "HECU": "Horário de Verão de Cuba", "HNOG": "Horário Padrão da Groenlândia Ocidental", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "NZDT": "Horário de Verão da Nova Zelândia", "HNEG": "Horário Padrão da Groelândia Oriental", "UYT": "Horário Padrão do Uruguai", "MST": "Horário Padrão da Montanha", "CHADT": "Horário de Verão de Chatham", "BOT": "Horário da Bolívia", "WART": "Horário Padrão da Argentina Ocidental", "HNPMX": "Horário Padrão do Pacífico do México", "AST": "Horário Padrão do Atlântico", "ADT": "Horário de Verão do Atlântico", "BT": "Horário do Butão", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "CLT": "Horário Padrão do Chile", "SRT": "Horário do Suriname", "HKT": "Horário Padrão de Hong Kong", "OEZ": "Horário Padrão da Europa Oriental", "CST": "Horário Padrão Central", "WIB": "Horário da Indonésia Ocidental", "WIT": "Horário da Indonésia Oriental", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "HKST": "Horário de Verão de Hong Kong", "CHAST": "Horário Padrão de Chatham", "EAT": "Horário da África Oriental", "WARST": "Horário de Verão da Argentina Ocidental", "EDT": "Horário de Verão Oriental", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "WESZ": "Horário de Verão da Europa Ocidental", "ART": "Horário Padrão da Argentina", "MEZ": "Horário Padrão da Europa Central", "MESZ": "Horário de Verão da Europa Central", "GFT": "Horário da Guiana Francesa", "ACST": "Horário Padrão da Austrália Central", "ECT": "Horário do Equador", "AWST": "Horário Padrão da Austrália Ocidental", "WITA": "Horário da Indonésia Central", "AEDT": "Horário de Verão da Austrália Oriental", "AKDT": "Horário de Verão do Alasca", "SGT": "Horário Padrão de Cingapura", "MYT": "Horário da Malásia", "UYST": "Horário de Verão do Uruguai", "ARST": "Horário de Verão da Argentina", "JST": "Horário Padrão do Japão", "GYT": "Horário da Guiana", "HAT": "Horário de Verão de Terra Nova", "SAST": "Horário da África do Sul", "ChST": "Horário de Chamorro", "ACDT": "Horário de Verão da Austrália Central", "EST": "Horário Padrão Oriental", "AKST": "Horário Padrão do Alasca", "LHST": "Horário Padrão de Lord Howe", "IST": "Horário Padrão da Índia", "TMST": "Horário de Verão do Turcomenistão", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "PDT": "Horário de Verão do Pacífico", "∅∅∅": "Horário de Verão do Amazonas", "HEEG": "Horário de Verão da Groelândia Oriental", "WAT": "Horário Padrão da África Ocidental", "WAST": "Horário de Verão da África Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "CLST": "Horário de Verão do Chile", "JDT": "Horário de Verão do Japão", "COST": "Horário de Verão da Colômbia", "HENOMX": "Horário de Verão do Noroeste do México", "CDT": "Horário de Verão Central", "HNT": "Horário Padrão de Terra Nova", "PST": "Horário Padrão do Pacífico", "AWDT": "Horário de Verão da Austrália Ocidental", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "CAT": "Horário da África Central", "COT": "Horário Padrão da Colômbia", "VET": "Horário da Venezuela", "WEZ": "Horário Padrão da Europa Ocidental", "HEOG": "Horário de Verão da Groenlândia Ocidental", "OESZ": "Horário de Verão da Europa Oriental", "HNCU": "Horário Padrão de Cuba", "GMT": "Horário do Meridiano de Greenwich"}, -+ locale: "pt_GW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OEZ": "OEZ", "GFT": "GFT", "ARST": "ARST", "ACWST": "ACWST", "CHAST": "CHAST", "SGT": "SGT", "CDT": "CDT", "HNEG": "HNEG", "HNPM": "HNPM", "UYST": "UYST", "WAT": "WAT", "WART": "WART", "ADT": "ADT", "MEZ": "MEZ", "ACST": "ACST", "PST": "PST", "AKST": "AKST", "COT": "COT", "CAT": "CAT", "CLST": "CLST", "EST": "EST", "MST": "MST", "ART": "ART", "IST": "IST", "JDT": "JDT", "HNCU": "HNCU", "GYT": "GYT", "NZST": "NZST", "HEEG": "HEEG", "AWST": "AWST", "HEPM": "HEPM", "UYT": "UYT", "VET": "VET", "HEOG": "HEOG", "WIB": "WIB", "AST": "AST", "GMT": "GMT", "LHST": "LHST", "ACWDT": "ACWDT", "WARST": "WARST", "NZDT": "NZDT", "BOT": "BOT", "MYT": "MYT", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "HKT": "HKT", "MDT": "MDT", "HENOMX": "HENOMX", "BT": "BT", "HEPMX": "HEPMX", "JST": "JST", "PDT": "PDT", "WIT": "WIT", "CST": "CST", "ECT": "ECT", "ChST": "ChST", "HADT": "HADT", "LHDT": "LHDT", "CHADT": "CHADT", "WEZ": "WEZ", "HECU": "HECU", "SAST": "SAST", "COST": "COST", "SRT": "SRT", "AEST": "AEST", "HNOG": "HNOG", "CLT": "CLT", "WITA": "WITA", "MESZ": "MESZ", "AWDT": "AWDT", "HNPMX": "HNPMX", "WAST": "WAST", "HNT": "HNT", "HKST": "HKST", "EAT": "EAT", "HAST": "HAST", "ACDT": "ACDT", "AKDT": "AKDT", "TMT": "TMT", "TMST": "TMST", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "OESZ": "OESZ", "HAT": "HAT", "EDT": "EDT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_GW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_GW) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_GW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_GW) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_GW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_GW) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_GW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_GW' and handles both Whole and Real numbers based on 'v' - func (pt *pt_GW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_GW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_GW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_GW' -@@ -277,56 +194,7 @@ func (pt *pt_GW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_GW' -@@ -335,68 +203,7 @@ func (pt *pt_GW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_GW' -@@ -404,27 +211,6 @@ func (pt *pt_GW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_GW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_GW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_GW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_GW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_GW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_GW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_GW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_LU/pt_LU.go b/pt_LU/pt_LU.go -index 14ce465..ea16dc7 100644 ---- a/pt_LU/pt_LU.go -+++ b/pt_LU/pt_LU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_LU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_LU' locale - func New() locales.Translator { - return &pt_LU{ -- locale: "pt_LU", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "F", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"MST": "Horário Padrão de Macau", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "EAT": "Horário da África Oriental", "ADT": "Horário de Verão do Atlântico", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "MEZ": "Horário Padrão da Europa Central", "BOT": "Horário da Bolívia", "ART": "Horário Padrão da Argentina", "NZDT": "Horário de Verão da Nova Zelândia", "CHAST": "Horário Padrão de Chatham", "HECU": "Horário de Verão de Cuba", "HNPMX": "Horário Padrão do Pacífico do México", "MDT": "Horário de Verão de Macau", "AST": "Horário Padrão do Atlântico", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "LHDT": "Horário de Verão de Lord Howe", "SGT": "Horário Padrão de Cingapura", "HNT": "Horário Padrão de Terra Nova", "PST": "Horário Padrão do Pacífico", "CAT": "Horário da África Central", "HNCU": "Horário Padrão de Cuba", "HEPMX": "Horário de Verão do Pacífico do México", "BT": "Horário do Butão", "SRT": "Horário do Suriname", "AEST": "Horário Padrão da Austrália Oriental", "CHADT": "Horário de Verão de Chatham", "TMT": "Horário Padrão do Turcomenistão", "HENOMX": "Horário de Verão do Noroeste do México", "EDT": "Horário de Verão Oriental", "UYT": "Horário Padrão do Uruguai", "HKST": "Horário de Verão de Hong Kong", "AEDT": "Horário de Verão da Austrália Oriental", "COT": "Horário Padrão da Colômbia", "GMT": "Horário do Meridiano de Greenwich", "CST": "Horário Padrão Central", "UYST": "Horário de Verão do Uruguai", "WITA": "Horário da Indonésia Central", "VET": "Horário da Venezuela", "AKST": "Horário Padrão do Alasca", "HAT": "Horário de Verão de Terra Nova", "ECT": "Horário do Equador", "GYT": "Horário da Guiana", "LHST": "Horário Padrão de Lord Howe", "HNEG": "Horário Padrão da Groelândia Oriental", "HEEG": "Horário de Verão da Groelândia Oriental", "SAST": "Horário da África do Sul", "CLT": "Horário Padrão do Chile", "ACST": "Horário Padrão da Austrália Central", "∅∅∅": "Horário de Verão dos Açores", "EST": "Horário Padrão Oriental", "ARST": "Horário de Verão da Argentina", "PDT": "Horário de Verão do Pacífico", "AWST": "Horário Padrão da Austrália Ocidental", "ACDT": "Horário de Verão da Austrália Central", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "IST": "Horário Padrão da Índia", "JST": "Horário Padrão do Japão", "HNNOMX": "Horário Padrão do Noroeste do México", "WART": "Horário Padrão da Argentina Ocidental", "WARST": "Horário de Verão da Argentina Ocidental", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "HEOG": "Horário de Verão da Groenlândia Ocidental", "WAT": "Horário Padrão da África Ocidental", "CDT": "Horário de Verão Central", "WESZ": "Horário de Verão da Europa Ocidental", "OEZ": "Horário Padrão da Europa Oriental", "MESZ": "Horário de Verão da Europa Central", "WAST": "Horário de Verão da África Ocidental", "AKDT": "Horário de Verão do Alasca", "MYT": "Horário da Malásia", "WIB": "Horário da Indonésia Ocidental", "HNOG": "Horário Padrão da Groenlândia Ocidental", "WEZ": "Horário Padrão da Europa Ocidental", "CLST": "Horário de Verão do Chile", "GFT": "Horário da Guiana Francesa", "TMST": "Horário de Verão do Turcomenistão", "COST": "Horário de Verão da Colômbia", "WIT": "Horário da Indonésia Oriental", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "NZST": "Horário Padrão da Nova Zelândia", "JDT": "Horário de Verão do Japão", "OESZ": "Horário de Verão da Europa Oriental", "HKT": "Horário Padrão de Hong Kong", "AWDT": "Horário de Verão da Austrália Ocidental", "ChST": "Horário de Chamorro"}, -+ locale: "pt_LU", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "F", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKDT": "AKDT", "GFT": "GFT", "HEOG": "HEOG", "COT": "COT", "UYST": "UYST", "BT": "BT", "ADT": "ADT", "ACDT": "ACDT", "LHST": "LHST", "ACWDT": "ACWDT", "AKST": "AKST", "OEZ": "OEZ", "NZST": "NZST", "HEPM": "HEPM", "JST": "JST", "AEST": "AEST", "WAST": "WAST", "TMST": "TMST", "ARST": "ARST", "HAST": "HAST", "WEZ": "WEZ", "SGT": "SGT", "CLT": "CLT", "WIB": "WIB", "CDT": "CDT", "HEEG": "HEEG", "CHAST": "CHAST", "IST": "IST", "EST": "EST", "CLST": "CLST", "WITA": "WITA", "HNNOMX": "HNNOMX", "JDT": "JDT", "HNPMX": "HNPMX", "HNOG": "HNOG", "LHDT": "LHDT", "ACWST": "ACWST", "PST": "PST", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "HKT": "HKT", "HNT": "HNT", "ChST": "ChST", "VET": "VET", "AEDT": "AEDT", "UYT": "UYT", "WART": "WART", "ECT": "ECT", "HENOMX": "HENOMX", "MEZ": "MEZ", "MESZ": "MESZ", "ACST": "ACST", "PDT": "PDT", "HECU": "HECU", "WAT": "WAT", "EDT": "EDT", "TMT": "TMT", "OESZ": "OESZ", "MDT": "MDT", "HNEG": "HNEG", "HNPM": "HNPM", "AWST": "AWST", "COST": "COST", "HKST": "HKST", "MST": "MST", "NZDT": "NZDT", "AST": "AST", "GMT": "GMT", "WIT": "WIT", "SAST": "SAST", "ART": "ART", "AWDT": "AWDT", "HNCU": "HNCU", "GYT": "GYT", "BOT": "BOT", "SRT": "SRT", "HADT": "HADT", "MYT": "MYT", "WESZ": "WESZ", "HAT": "HAT", "WARST": "WARST", "CAT": "CAT", "CST": "CST", "EAT": "EAT", "CHADT": "CHADT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_LU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_LU) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_LU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_LU) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_LU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_LU) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_LU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_LU' and handles both Whole and Real numbers based on 'v' - func (pt *pt_LU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_LU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_LU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_LU' -@@ -277,56 +194,7 @@ func (pt *pt_LU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_LU' -@@ -335,68 +203,7 @@ func (pt *pt_LU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_LU' -@@ -404,27 +211,6 @@ func (pt *pt_LU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_LU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_LU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_LU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_LU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_LU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_LU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_LU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_MO/pt_MO.go b/pt_MO/pt_MO.go -index dc33ef1..291e8f9 100644 ---- a/pt_MO/pt_MO.go -+++ b/pt_MO/pt_MO.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_MO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_MO' locale - func New() locales.Translator { - return &pt_MO{ -- locale: "pt_MO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"HEOG": "Horário de Verão da Groenlândia Ocidental", "CLST": "Horário de Verão do Chile", "OEZ": "Horário Padrão da Europa Oriental", "AST": "Horário Padrão do Atlântico", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "WARST": "Horário de Verão da Argentina Ocidental", "AKST": "Horário Padrão do Alasca", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "MEZ": "Horário Padrão da Europa Central", "JST": "Horário Padrão do Japão", "ChST": "Horário de Chamorro", "WAT": "Horário Padrão da África Ocidental", "TMST": "Horário de Verão do Turcomenistão", "CAT": "Horário da África Central", "MDT": "Horário de Verão de Macau", "CST": "Horário Padrão Central", "HNT": "Horário Padrão de Terra Nova", "JDT": "Horário de Verão do Japão", "TMT": "Horário Padrão do Turcomenistão", "HEPMX": "Horário de Verão do Pacífico do México", "WEZ": "Horário Padrão da Europa Ocidental", "AKDT": "Horário de Verão do Alasca", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "BT": "Horário do Butão", "HKT": "Horário Padrão de Hong Kong", "GFT": "Horário da Guiana Francesa", "WART": "Horário Padrão da Argentina Ocidental", "COT": "Horário Padrão da Colômbia", "MYT": "Horário da Malásia", "SRT": "Horário do Suriname", "HNEG": "Horário Padrão da Groelândia Oriental", "HEEG": "Horário de Verão da Groelândia Oriental", "WAST": "Horário de Verão da África Ocidental", "ECT": "Horário do Equador", "ADT": "Horário de Verão do Atlântico", "PDT": "Horário de Verão do Pacífico", "HKST": "Horário de Verão de Hong Kong", "ACST": "Horário Padrão da Austrália Central", "ACDT": "Horário de Verão da Austrália Central", "HECU": "Horário de Verão de Cuba", "UYT": "Horário Padrão do Uruguai", "ARST": "Horário de Verão da Argentina", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "NZDT": "Horário de Verão da Nova Zelândia", "CHAST": "Horário Padrão de Chatham", "WIT": "Horário da Indonésia Oriental", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "HAT": "Horário de Verão de Terra Nova", "AEST": "Horário Padrão da Austrália Oriental", "WITA": "Horário da Indonésia Central", "CDT": "Horário de Verão Central", "GYT": "Horário da Guiana", "WIB": "Horário da Indonésia Ocidental", "VET": "Horário da Venezuela", "NZST": "Horário Padrão da Nova Zelândia", "IST": "Horário Padrão da Índia", "GMT": "Horário do Meridiano de Greenwich", "HNCU": "Horário Padrão de Cuba", "LHDT": "Horário de Verão de Lord Howe", "CHADT": "Horário de Verão de Chatham", "AWST": "Horário Padrão da Austrália Ocidental", "AWDT": "Horário de Verão da Austrália Ocidental", "∅∅∅": "Horário de Verão do Amazonas", "EST": "Horário Padrão Oriental", "HNPMX": "Horário Padrão do Pacífico do México", "UYST": "Horário de Verão do Uruguai", "HNOG": "Horário Padrão da Groenlândia Ocidental", "AEDT": "Horário de Verão da Austrália Oriental", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "LHST": "Horário Padrão de Lord Howe", "SAST": "Horário da África do Sul", "HNNOMX": "Horário Padrão do Noroeste do México", "MST": "Horário Padrão de Macau", "ART": "Horário Padrão da Argentina", "MESZ": "Horário de Verão da Europa Central", "CLT": "Horário Padrão do Chile", "COST": "Horário de Verão da Colômbia", "SGT": "Horário Padrão de Cingapura", "BOT": "Horário da Bolívia", "EDT": "Horário de Verão Oriental", "WESZ": "Horário de Verão da Europa Ocidental", "EAT": "Horário da África Oriental", "OESZ": "Horário de Verão da Europa Oriental", "HENOMX": "Horário de Verão do Noroeste do México", "PST": "Horário Padrão do Pacífico"}, -+ locale: "pt_MO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EDT": "EDT", "MDT": "MDT", "SRT": "SRT", "ACDT": "ACDT", "JST": "JST", "LHST": "LHST", "ACWDT": "ACWDT", "WEZ": "WEZ", "SGT": "SGT", "WART": "WART", "EST": "EST", "CDT": "CDT", "NZDT": "NZDT", "AST": "AST", "HENOMX": "HENOMX", "UYST": "UYST", "IST": "IST", "VET": "VET", "OEZ": "OEZ", "SAST": "SAST", "WIB": "WIB", "BT": "BT", "HKST": "HKST", "NZST": "NZST", "ART": "ART", "AWST": "AWST", "AEST": "AEST", "CHADT": "CHADT", "HAT": "HAT", "GYT": "GYT", "ChST": "ChST", "HNEG": "HNEG", "HNPMX": "HNPMX", "CST": "CST", "GMT": "GMT", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "WIT": "WIT", "EAT": "EAT", "MYT": "MYT", "AEDT": "AEDT", "ECT": "ECT", "HADT": "HADT", "ACST": "ACST", "PDT": "PDT", "AKST": "AKST", "HEPM": "HEPM", "COT": "COT", "CLT": "CLT", "CLST": "CLST", "ARST": "ARST", "MESZ": "MESZ", "HEEG": "HEEG", "LHDT": "LHDT", "HNCU": "HNCU", "AKDT": "AKDT", "CAT": "CAT", "WITA": "WITA", "HEPMX": "HEPMX", "WAST": "WAST", "AWDT": "AWDT", "UYT": "UYT", "GFT": "GFT", "CHAST": "CHAST", "WAT": "WAT", "OESZ": "OESZ", "ACWST": "ACWST", "WESZ": "WESZ", "HECU": "HECU", "HNT": "HNT", "WARST": "WARST", "COST": "COST", "TMT": "TMT", "ADT": "ADT", "HAST": "HAST", "HNOG": "HNOG", "HKT": "HKT", "TMST": "TMST", "∅∅∅": "∅∅∅", "MST": "MST", "BOT": "BOT", "JDT": "JDT", "PST": "PST", "HEOG": "HEOG"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_MO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_MO) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_MO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_MO) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_MO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_MO) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_MO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_MO' and handles both Whole and Real numbers based on 'v' - func (pt *pt_MO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_MO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_MO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_MO' -@@ -277,56 +194,7 @@ func (pt *pt_MO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_MO' -@@ -335,68 +203,7 @@ func (pt *pt_MO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_MO' -@@ -404,27 +211,6 @@ func (pt *pt_MO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_MO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_MO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_MO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/pt_MZ/pt_MZ.go b/pt_MZ/pt_MZ.go -index 5c42cf7..99731a9 100644 ---- a/pt_MZ/pt_MZ.go -+++ b/pt_MZ/pt_MZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_MZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_MZ' locale - func New() locales.Translator { - return &pt_MZ{ -- locale: "pt_MZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MTn", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"HNPMX": "Horário Padrão do Pacífico do México", "AKDT": "Horário de Verão do Alasca", "AEDT": "Horário de Verão da Austrália Oriental", "TMST": "Horário de Verão do Turcomenistão", "HEEG": "Horário de Verão da Groelândia Oriental", "OEZ": "Horário Padrão da Europa Oriental", "ECT": "Horário do Equador", "EST": "Horário Padrão Oriental", "COST": "Horário de Verão da Colômbia", "HNNOMX": "Horário Padrão do Noroeste do México", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "AWST": "Horário Padrão da Austrália Ocidental", "HKT": "Horário Padrão de Hong Kong", "NZDT": "Horário de Verão da Nova Zelândia", "JDT": "Horário de Verão do Japão", "COT": "Horário Padrão da Colômbia", "MDT": "Horário de Verão de Macau", "WIT": "Horário da Indonésia Oriental", "SRT": "Horário do Suriname", "OESZ": "Horário de Verão da Europa Oriental", "CAT": "Horário da África Central", "WAT": "Horário Padrão da África Ocidental", "GMT": "Horário do Meridiano de Greenwich", "CST": "Horário Padrão Central", "VET": "Horário da Venezuela", "HEOG": "Horário de Verão da Groenlândia Ocidental", "ACDT": "Horário de Verão da Austrália Central", "EAT": "Horário da África Oriental", "HECU": "Horário de Verão de Cuba", "MYT": "Horário da Malásia", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "IST": "Horário Padrão da Índia", "∅∅∅": "Horário de Verão do Amazonas", "GFT": "Horário da Guiana Francesa", "TMT": "Horário Padrão do Turcomenistão", "BOT": "Horário da Bolívia", "SGT": "Horário Padrão de Cingapura", "HAT": "Horário de Verão de Terra Nova", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "CHAST": "Horário Padrão de Chatham", "CHADT": "Horário de Verão de Chatham", "LHST": "Horário Padrão de Lord Howe", "ACST": "Horário Padrão da Austrália Central", "HNT": "Horário Padrão de Terra Nova", "AST": "Horário Padrão do Atlântico", "NZST": "Horário Padrão da Nova Zelândia", "CLT": "Horário Padrão do Chile", "WARST": "Horário de Verão da Argentina Ocidental", "MST": "Horário Padrão de Macau", "WIB": "Horário da Indonésia Ocidental", "ART": "Horário Padrão da Argentina", "MEZ": "Horário Padrão da Europa Central", "GYT": "Horário da Guiana", "ARST": "Horário de Verão da Argentina", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "SAST": "Horário da África do Sul", "ADT": "Horário de Verão do Atlântico", "PST": "Horário Padrão do Pacífico", "CLST": "Horário de Verão do Chile", "WART": "Horário Padrão da Argentina Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "HNEG": "Horário Padrão da Groelândia Oriental", "HENOMX": "Horário de Verão do Noroeste do México", "UYT": "Horário Padrão do Uruguai", "HNCU": "Horário Padrão de Cuba", "EDT": "Horário de Verão Oriental", "BT": "Horário do Butão", "PDT": "Horário de Verão do Pacífico", "WEZ": "Horário Padrão da Europa Ocidental", "WESZ": "Horário de Verão da Europa Ocidental", "WITA": "Horário da Indonésia Central", "LHDT": "Horário de Verão de Lord Howe", "AKST": "Horário Padrão do Alasca", "HKST": "Horário de Verão de Hong Kong", "CDT": "Horário de Verão Central", "MESZ": "Horário de Verão da Europa Central", "JST": "Horário Padrão do Japão", "ChST": "Horário de Chamorro", "HEPMX": "Horário de Verão do Pacífico do México", "UYST": "Horário de Verão do Uruguai", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "HNOG": "Horário Padrão da Groenlândia Ocidental", "AWDT": "Horário de Verão da Austrália Ocidental", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "WAST": "Horário de Verão da África Ocidental"}, -+ locale: "pt_MZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MTn", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEOG": "HEOG", "HKT": "HKT", "MEZ": "MEZ", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AWST": "AWST", "HAT": "HAT", "SAST": "SAST", "IST": "IST", "AEST": "AEST", "WIB": "WIB", "HNEG": "HNEG", "HNPMX": "HNPMX", "WAT": "WAT", "MST": "MST", "WEZ": "WEZ", "ART": "ART", "HNPM": "HNPM", "CLT": "CLT", "ChST": "ChST", "HAST": "HAST", "MESZ": "MESZ", "AWDT": "AWDT", "OESZ": "OESZ", "TMST": "TMST", "GYT": "GYT", "ADT": "ADT", "JDT": "JDT", "MDT": "MDT", "BOT": "BOT", "WIT": "WIT", "COT": "COT", "HKST": "HKST", "ECT": "ECT", "LHDT": "LHDT", "ACWST": "ACWST", "GFT": "GFT", "WARST": "WARST", "CHAST": "CHAST", "HEPMX": "HEPMX", "WITA": "WITA", "CST": "CST", "HADT": "HADT", "ACDT": "ACDT", "PST": "PST", "SGT": "SGT", "OEZ": "OEZ", "COST": "COST", "CLST": "CLST", "NZST": "NZST", "SRT": "SRT", "TMT": "TMT", "CAT": "CAT", "CHADT": "CHADT", "AST": "AST", "ACWDT": "ACWDT", "HNT": "HNT", "EDT": "EDT", "NZDT": "NZDT", "GMT": "GMT", "EAT": "EAT", "LHST": "LHST", "∅∅∅": "∅∅∅", "AKST": "AKST", "VET": "VET", "UYST": "UYST", "PDT": "PDT", "ACST": "ACST", "WESZ": "WESZ", "ARST": "ARST", "JST": "JST", "HECU": "HECU", "AKDT": "AKDT", "WART": "WART", "AEDT": "AEDT", "EST": "EST", "HENOMX": "HENOMX", "HNOG": "HNOG", "BT": "BT", "MYT": "MYT", "HEPM": "HEPM", "UYT": "UYT", "HNCU": "HNCU", "WAST": "WAST", "CDT": "CDT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_MZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_MZ) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_MZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_MZ) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_MZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_MZ) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_MZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_MZ' and handles both Whole and Real numbers based on 'v' - func (pt *pt_MZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_MZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_MZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_MZ' -@@ -277,56 +194,7 @@ func (pt *pt_MZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_MZ' -@@ -335,68 +203,7 @@ func (pt *pt_MZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_MZ' -@@ -404,27 +211,6 @@ func (pt *pt_MZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_MZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_MZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_MZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_MZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_MZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_MZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_MZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_PT/pt_PT.go b/pt_PT/pt_PT.go -index 25aaba1..4beb265 100644 ---- a/pt_PT/pt_PT.go -+++ b/pt_PT/pt_PT.go -@@ -49,31 +49,20 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", - group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "\u200b", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: " ", - currencyNegativePrefix: "(", - currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, - daysAbbreviated: []string{"domingo", "segunda", "terça", "quarta", "quinta", "sexta", "sábado"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, - periodsAbbreviated: []string{"a.m.", "p.m."}, - periodsNarrow: []string{"a.m.", "p.m."}, - periodsWide: []string{"da manhã", "da tarde"}, - erasAbbreviated: []string{"a.E.C.", "E.C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"ACDT": "Hora de verão da Austrália Central", "EDT": "Hora de verão Oriental", "LHDT": "Hora de verão de Lord Howe", "IST": "Hora padrão da Índia", "HEEG": "Hora de verão da Gronelândia Oriental", "ACWST": "Hora padrão da Austrália Central Ocidental", "AWST": "Hora padrão da Austrália Ocidental", "HKT": "Hora padrão de Hong Kong", "WITA": "Hora da Indonésia Central", "MEZ": "Hora padrão da Europa Central", "ACST": "Hora padrão da Austrália Central", "∅∅∅": "Hora de verão do Peru", "MDT": "Hora de verão de Macau", "AEST": "Hora padrão da Austrália Oriental", "JST": "Hora padrão do Japão", "HECU": "Hora de verão de Cuba", "HADT": "Hora de verão do Havai e Aleutas", "HEOG": "Hora de verão da Gronelândia Ocidental", "LHST": "Hora padrão de Lord Howe", "HNEG": "Hora padrão da Gronelândia Oriental", "WAT": "Hora padrão da África Ocidental", "OEZ": "Hora padrão da Europa Oriental", "SRT": "Hora do Suriname", "ART": "Hora padrão da Argentina", "CLT": "Hora padrão do Chile", "WAST": "Hora de verão da África Ocidental", "UYST": "Hora de verão do Uruguai", "PDT": "Hora de verão do Pacífico", "AWDT": "Hora de verão da Austrália Ocidental", "AEDT": "Hora de verão da Austrália Oriental", "HNPMX": "Hora padrão do Pacífico Mexicano", "MESZ": "Hora de verão da Europa Central", "JDT": "Hora de verão do Japão", "NZDT": "Hora de verão da Nova Zelândia", "WARST": "Hora de verão da Argentina Ocidental", "ADT": "Hora de verão do Atlântico", "VET": "Hora da Venezuela", "HKST": "Hora de verão de Hong Kong", "HNPM": "Hora padrão de São Pedro e Miquelão", "WIB": "Hora da Indonésia Ocidental", "HNOG": "Hora padrão da Gronelândia Ocidental", "OESZ": "Hora de verão da Europa Oriental", "ECT": "Hora do Equador", "HNNOMX": "Hora padrão do Noroeste do México", "HENOMX": "Hora de verão do Noroeste do México", "AST": "Hora padrão do Atlântico", "HNCU": "Hora padrão de Cuba", "WESZ": "Hora de verão da Europa Ocidental", "GFT": "Hora da Guiana Francesa", "EAT": "Hora da África Oriental", "CAT": "Hora da África Central", "AKDT": "Hora de verão do Alasca", "HNT": "Hora padrão da Terra Nova", "PST": "Hora padrão do Pacífico", "CHADT": "Hora de verão do Chatham", "CLST": "Hora de verão do Chile", "BOT": "Hora da Bolívia", "GMT": "Hora de Greenwich", "CST": "Hora padrão Central", "HAST": "Hora padrão do Havai e Aleutas", "ACWDT": "Hora de verão da Austrália Central Ocidental", "NZST": "Hora padrão da Nova Zelândia", "AKST": "Hora padrão do Alasca", "GYT": "Hora da Guiana", "HEPM": "Hora de verão de São Pedro e Miquelão", "ChST": "Hora padrão do Chamorro", "BT": "Hora do Butão", "WEZ": "Hora padrão da Europa Ocidental", "HAT": "Hora de verão da Terra Nova", "HEPMX": "Hora de verão do Pacífico Mexicano", "EST": "Hora padrão Oriental", "CDT": "Hora de verão Central", "MYT": "Hora da Malásia", "WIT": "Hora da Indonésia Oriental", "ARST": "Hora de verão da Argentina", "TMT": "Hora padrão do Turquemenistão", "TMST": "Hora de verão do Turquemenistão", "WART": "Hora padrão da Argentina Ocidental", "SGT": "Hora padrão de Singapura", "MST": "Hora padrão de Macau", "UYT": "Hora padrão do Uruguai", "SAST": "Hora da África do Sul", "COT": "Hora padrão da Colômbia", "COST": "Hora de verão da Colômbia", "CHAST": "Hora padrão do Chatham"}, -+ timezones: map[string]string{"UYST": "Hora de verão do Uruguai", "SAST": "Hora da África do Sul", "ADT": "Hora de verão do Atlântico", "ART": "Hora padrão da Argentina", "BOT": "Hora da Bolívia", "MESZ": "Hora de verão da Europa Central", "ACDT": "Hora de verão da Austrália Central", "AEST": "Hora padrão da Austrália Oriental", "CST": "Hora padrão Central", "LHST": "Hora padrão de Lord Howe", "UYT": "Hora padrão do Uruguai", "HEOG": "Hora de verão da Gronelândia Ocidental", "HENOMX": "Hora de verão do Noroeste do México", "WESZ": "Hora de verão da Europa Ocidental", "WIT": "Hora da Indonésia Oriental", "GYT": "Hora da Guiana", "COST": "Hora de verão da Colômbia", "ARST": "Hora de verão da Argentina", "HNCU": "Hora padrão de Cuba", "GFT": "Hora da Guiana Francesa", "AWST": "Hora padrão da Austrália Ocidental", "HKT": "Hora padrão de Hong Kong", "COT": "Hora padrão da Colômbia", "HNOG": "Hora padrão da Gronelândia Ocidental", "JST": "Hora padrão do Japão", "IST": "Hora padrão da Índia", "HKST": "Hora de verão de Hong Kong", "WIB": "Hora da Indonésia Ocidental", "AST": "Hora padrão do Atlântico", "ChST": "Hora padrão do Chamorro", "ACST": "Hora padrão da Austrália Central", "HNEG": "Hora padrão da Gronelândia Oriental", "CHADT": "Hora de verão do Chatham", "HEPMX": "Hora de verão do Pacífico Mexicano", "WARST": "Hora de verão da Argentina Ocidental", "TMST": "Hora de verão do Turquemenistão", "NZST": "Hora padrão da Nova Zelândia", "MEZ": "Hora padrão da Europa Central", "LHDT": "Hora de verão de Lord Howe", "BT": "Hora do Butão", "CHAST": "Hora padrão do Chatham", "OEZ": "Hora padrão da Europa Oriental", "CLT": "Hora padrão do Chile", "WITA": "Hora da Indonésia Central", "MST": "Hora padrão de Macau", "NZDT": "Hora de verão da Nova Zelândia", "SRT": "Hora do Suriname", "JDT": "Hora de verão do Japão", "HAT": "Hora de verão da Terra Nova", "EDT": "Hora de verão Oriental", "CDT": "Hora de verão Central", "HECU": "Hora de verão de Cuba", "OESZ": "Hora de verão da Europa Oriental", "CLST": "Hora de verão do Chile", "ECT": "Hora do Equador", "GMT": "Hora de Greenwich", "HEEG": "Hora de verão da Gronelândia Oriental", "HEPM": "Hora de verão de São Pedro e Miquelão", "HNPMX": "Hora padrão do Pacífico Mexicano", "AKST": "Hora padrão do Alasca", "AKDT": "Hora de verão do Alasca", "CAT": "Hora da África Central", "HADT": "Hora de verão do Havai e Aleutas", "HNNOMX": "Hora padrão do Noroeste do México", "MYT": "Hora da Malásia", "ACWDT": "Hora de verão da Austrália Central Ocidental", "SGT": "Hora padrão de Singapura", "WART": "Hora padrão da Argentina Ocidental", "EST": "Hora padrão Oriental", "MDT": "Hora de verão de Macau", "AWDT": "Hora de verão da Austrália Ocidental", "EAT": "Hora da África Oriental", "HNPM": "Hora padrão de São Pedro e Miquelão", "PDT": "Hora de verão do Pacífico", "ACWST": "Hora padrão da Austrália Central Ocidental", "WAST": "Hora de verão da África Ocidental", "HNT": "Hora padrão da Terra Nova", "HAST": "Hora padrão do Havai e Aleutas", "PST": "Hora padrão do Pacífico", "WEZ": "Hora padrão da Europa Ocidental", "WAT": "Hora padrão da África Ocidental", "TMT": "Hora padrão do Turquemenistão", "∅∅∅": "Hora de verão dos Açores", "AEDT": "Hora de verão da Austrália Oriental", "VET": "Hora da Venezuela"}, - } - } -  -@@ -102,7 +91,7 @@ func (pt *pt_PT) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -  -- if n >= 0 && n <= 2 && n != 2 { -+ if n == 1 && v == 0 { - return locales.PluralRuleOne - } -  -@@ -139,7 +128,7 @@ func (pt *pt_PT) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_PT) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -149,7 +138,7 @@ func (pt *pt_PT) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_PT) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -159,7 +148,7 @@ func (pt *pt_PT) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_PT) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -205,75 +194,13 @@ func (pt *pt_PT) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_PT' and handles both Whole and Real numbers based on 'v' - func (pt *pt_PT) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(pt.group) - 1; j >= 0; j-- { -- b = append(b, pt.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_PT' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_PT) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_PT' -@@ -281,7 +208,7 @@ func (pt *pt_PT) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -341,7 +268,7 @@ func (pt *pt_PT) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -465,19 +392,6 @@ func (pt *pt_PT) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -486,21 +400,6 @@ func (pt *pt_PT) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -509,19 +408,6 @@ func (pt *pt_PT) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -530,26 +416,6 @@ func (pt *pt_PT) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -558,30 +424,6 @@ func (pt *pt_PT) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -590,34 +432,5 @@ func (pt *pt_PT) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_ST/pt_ST.go b/pt_ST/pt_ST.go -index e0ad2ea..6f127e1 100644 ---- a/pt_ST/pt_ST.go -+++ b/pt_ST/pt_ST.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_ST struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_ST' locale - func New() locales.Translator { - return &pt_ST{ -- locale: "pt_ST", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "Db", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"UYST": "Horário de Verão do Uruguai", "WEZ": "Horário Padrão da Europa Ocidental", "CHADT": "Horário de Verão de Chatham", "COT": "Horário Padrão da Colômbia", "HNNOMX": "Horário Padrão do Noroeste do México", "MDT": "Horário de Verão de Macau", "HNPMX": "Horário Padrão do Pacífico do México", "GYT": "Horário da Guiana", "ACST": "Horário Padrão da Austrália Central", "LHDT": "Horário de Verão de Lord Howe", "NZST": "Horário Padrão da Nova Zelândia", "GFT": "Horário da Guiana Francesa", "OESZ": "Horário de Verão da Europa Oriental", "MST": "Horário Padrão de Macau", "ADT": "Horário de Verão do Atlântico", "WIT": "Horário da Indonésia Oriental", "PST": "Horário Padrão do Pacífico", "OEZ": "Horário Padrão da Europa Oriental", "HEPMX": "Horário de Verão do Pacífico do México", "HKT": "Horário Padrão de Hong Kong", "MEZ": "Horário Padrão da Europa Central", "IST": "Horário Padrão da Índia", "WART": "Horário Padrão da Argentina Ocidental", "HECU": "Horário de Verão de Cuba", "AST": "Horário Padrão do Atlântico", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "CLST": "Horário de Verão do Chile", "AEDT": "Horário de Verão da Austrália Oriental", "BOT": "Horário da Bolívia", "ECT": "Horário do Equador", "WARST": "Horário de Verão da Argentina Ocidental", "EST": "Horário Padrão Oriental", "AWST": "Horário Padrão da Austrália Ocidental", "AWDT": "Horário de Verão da Austrália Ocidental", "HEEG": "Horário de Verão da Groelândia Oriental", "COST": "Horário de Verão da Colômbia", "EDT": "Horário de Verão Oriental", "HEOG": "Horário de Verão da Groenlândia Ocidental", "WESZ": "Horário de Verão da Europa Ocidental", "HAT": "Horário de Verão de Terra Nova", "TMST": "Horário de Verão do Turcomenistão", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "JDT": "Horário de Verão do Japão", "SGT": "Horário Padrão de Cingapura", "HNCU": "Horário Padrão de Cuba", "MYT": "Horário da Malásia", "CDT": "Horário de Verão Central", "HKST": "Horário de Verão de Hong Kong", "EAT": "Horário da África Oriental", "AKDT": "Horário de Verão do Alasca", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "MESZ": "Horário de Verão da Europa Central", "HNEG": "Horário Padrão da Groelândia Oriental", "JST": "Horário Padrão do Japão", "ACDT": "Horário de Verão da Austrália Central", "CAT": "Horário da África Central", "GMT": "Horário do Meridiano de Greenwich", "WIB": "Horário da Indonésia Ocidental", "HNT": "Horário Padrão de Terra Nova", "CHAST": "Horário Padrão de Chatham", "UYT": "Horário Padrão do Uruguai", "PDT": "Horário de Verão do Pacífico", "LHST": "Horário Padrão de Lord Howe", "TMT": "Horário Padrão do Turcomenistão", "AKST": "Horário Padrão do Alasca", "ARST": "Horário de Verão da Argentina", "NZDT": "Horário de Verão da Nova Zelândia", "SAST": "Horário da África do Sul", "∅∅∅": "Horário de Verão do Peru", "CST": "Horário Padrão Central", "SRT": "Horário do Suriname", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "WITA": "Horário da Indonésia Central", "WAST": "Horário de Verão da África Ocidental", "HENOMX": "Horário de Verão do Noroeste do México", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "CLT": "Horário Padrão do Chile", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "BT": "Horário do Butão", "HNOG": "Horário Padrão da Groenlândia Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "WAT": "Horário Padrão da África Ocidental", "VET": "Horário da Venezuela", "ART": "Horário Padrão da Argentina", "ChST": "Horário de Chamorro"}, -+ locale: "pt_ST", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "Db", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "JST": "JST", "WESZ": "WESZ", "WIT": "WIT", "HKT": "HKT", "TMST": "TMST", "MYT": "MYT", "AEST": "AEST", "WAST": "WAST", "OESZ": "OESZ", "EDT": "EDT", "GFT": "GFT", "HNT": "HNT", "GYT": "GYT", "COST": "COST", "PDT": "PDT", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "WARST": "WARST", "CLT": "CLT", "WIB": "WIB", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "WART": "WART", "HEOG": "HEOG", "GMT": "GMT", "MESZ": "MESZ", "HNPM": "HNPM", "UYST": "UYST", "∅∅∅": "∅∅∅", "ARST": "ARST", "EAT": "EAT", "HEEG": "HEEG", "AWST": "AWST", "SAST": "SAST", "CAT": "CAT", "ART": "ART", "SRT": "SRT", "HEPM": "HEPM", "BT": "BT", "COT": "COT", "MDT": "MDT", "MEZ": "MEZ", "LHDT": "LHDT", "OEZ": "OEZ", "TMT": "TMT", "AKST": "AKST", "AKDT": "AKDT", "EST": "EST", "MST": "MST", "BOT": "BOT", "HENOMX": "HENOMX", "AEDT": "AEDT", "CHAST": "CHAST", "ACWST": "ACWST", "SGT": "SGT", "CST": "CST", "HAST": "HAST", "HADT": "HADT", "UYT": "UYT", "IST": "IST", "AST": "AST", "AWDT": "AWDT", "HEPMX": "HEPMX", "CLST": "CLST", "ChST": "ChST", "WEZ": "WEZ", "VET": "VET", "WAT": "WAT", "NZDT": "NZDT", "ACST": "ACST", "JDT": "JDT", "HNOG": "HNOG", "HNCU": "HNCU", "HECU": "HECU", "HAT": "HAT", "CDT": "CDT", "NZST": "NZST", "ECT": "ECT", "ADT": "ADT", "HNEG": "HNEG", "PST": "PST", "HKST": "HKST", "WITA": "WITA"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_ST) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_ST) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_ST) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_ST) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_ST) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_ST) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_ST) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_ST' and handles both Whole and Real numbers based on 'v' - func (pt *pt_ST) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_ST' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_ST) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_ST' -@@ -277,56 +194,7 @@ func (pt *pt_ST) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_ST' -@@ -335,68 +203,7 @@ func (pt *pt_ST) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_ST' -@@ -404,27 +211,6 @@ func (pt *pt_ST) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_ST) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_ST) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_ST) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_ST) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_ST) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_ST) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_ST) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/pt_TL/pt_TL.go b/pt_TL/pt_TL.go -index 36bb131..e1fd6f1 100644 ---- a/pt_TL/pt_TL.go -+++ b/pt_TL/pt_TL.go -@@ -10,68 +10,45 @@ import ( - ) -  - type pt_TL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'pt_TL' locale - func New() locales.Translator { - return &pt_TL{ -- locale: "pt_TL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "jan", "fev", "mar", "abr", "mai", "jun", "jul", "ago", "set", "out", "nov", "dez"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "janeiro", "fevereiro", "março", "abril", "maio", "junho", "julho", "agosto", "setembro", "outubro", "novembro", "dezembro"}, -- daysAbbreviated: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysNarrow: []string{"D", "S", "T", "Q", "Q", "S", "S"}, -- daysShort: []string{"dom", "seg", "ter", "qua", "qui", "sex", "sáb"}, -- daysWide: []string{"domingo", "segunda-feira", "terça-feira", "quarta-feira", "quinta-feira", "sexta-feira", "sábado"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"a.C.", "d.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"antes de Cristo", "depois de Cristo"}, -- timezones: map[string]string{"MST": "Horário Padrão de Macau", "HEEG": "Horário de Verão da Groelândia Oriental", "CAT": "Horário da África Central", "OESZ": "Horário de Verão da Europa Oriental", "HNNOMX": "Horário Padrão do Noroeste do México", "EST": "Horário Padrão Oriental", "JST": "Horário Padrão do Japão", "HAST": "Horário Padrão do Havaí e Ilhas Aleutas", "WESZ": "Horário de Verão da Europa Ocidental", "NZST": "Horário Padrão da Nova Zelândia", "ACST": "Horário Padrão da Austrália Central", "WAST": "Horário de Verão da África Ocidental", "HECU": "Horário de Verão de Cuba", "HNPMX": "Horário Padrão do Pacífico do México", "CST": "Horário Padrão Central", "HNCU": "Horário Padrão de Cuba", "HADT": "Horário de Verão do Havaí e Ilhas Aleutas", "EAT": "Horário da África Oriental", "OEZ": "Horário Padrão da Europa Oriental", "MDT": "Horário de Verão de Macau", "LHST": "Horário Padrão de Lord Howe", "WAT": "Horário Padrão da África Ocidental", "PDT": "Horário de Verão do Pacífico", "BOT": "Horário da Bolívia", "CLST": "Horário de Verão do Chile", "COT": "Horário Padrão da Colômbia", "GYT": "Horário da Guiana", "CHADT": "Horário de Verão de Chatham", "HKT": "Horário Padrão de Hong Kong", "MYT": "Horário da Malásia", "BT": "Horário do Butão", "PST": "Horário Padrão do Pacífico", "LHDT": "Horário de Verão de Lord Howe", "CHAST": "Horário Padrão de Chatham", "MESZ": "Horário de Verão da Europa Central", "JDT": "Horário de Verão do Japão", "COST": "Horário de Verão da Colômbia", "AKST": "Horário Padrão do Alasca", "ART": "Horário Padrão da Argentina", "HNPM": "Horário Padrão de Saint Pierre e Miquelon", "MEZ": "Horário Padrão da Europa Central", "CLT": "Horário Padrão do Chile", "ChST": "Horário de Chamorro", "WARST": "Horário de Verão da Argentina Ocidental", "VET": "Horário da Venezuela", "HNOG": "Horário Padrão da Groenlândia Ocidental", "WIT": "Horário da Indonésia Oriental", "ARST": "Horário de Verão da Argentina", "CDT": "Horário de Verão Central", "UYT": "Horário Padrão do Uruguai", "WIB": "Horário da Indonésia Ocidental", "AWST": "Horário Padrão da Austrália Ocidental", "IST": "Horário Padrão da Índia", "SAST": "Horário da África do Sul", "HNEG": "Horário Padrão da Groelândia Oriental", "TMT": "Horário Padrão do Turcomenistão", "WART": "Horário Padrão da Argentina Ocidental", "GMT": "Horário do Meridiano de Greenwich", "AST": "Horário Padrão do Atlântico", "ACWDT": "Horário de Verão da Austrália Centro-Ocidental", "ECT": "Horário do Equador", "EDT": "Horário de Verão Oriental", "UYST": "Horário de Verão do Uruguai", "WEZ": "Horário Padrão da Europa Ocidental", "AEST": "Horário Padrão da Austrália Oriental", "HEPM": "Horário de Verão de Saint Pierre e Miquelon", "TMST": "Horário de Verão do Turcomenistão", "SRT": "Horário do Suriname", "ACWST": "Horário Padrão da Austrália Centro-Ocidental", "HKST": "Horário de Verão de Hong Kong", "HEOG": "Horário de Verão da Groenlândia Ocidental", "AWDT": "Horário de Verão da Austrália Ocidental", "ACDT": "Horário de Verão da Austrália Central", "HENOMX": "Horário de Verão do Noroeste do México", "ADT": "Horário de Verão do Atlântico", "HNT": "Horário Padrão de Terra Nova", "AKDT": "Horário de Verão do Alasca", "HAT": "Horário de Verão de Terra Nova", "WITA": "Horário da Indonésia Central", "AEDT": "Horário de Verão da Austrália Oriental", "NZDT": "Horário de Verão da Nova Zelândia", "SGT": "Horário Padrão de Cingapura", "∅∅∅": "Horário de Verão dos Açores", "HEPMX": "Horário de Verão do Pacífico do México", "GFT": "Horário da Guiana Francesa"}, -+ locale: "pt_TL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "HAT": "HAT", "WARST": "WARST", "GYT": "GYT", "CAT": "CAT", "MYT": "MYT", "CHADT": "CHADT", "HEPMX": "HEPMX", "WITA": "WITA", "AWST": "AWST", "WAT": "WAT", "HNPM": "HNPM", "ACWST": "ACWST", "AEST": "AEST", "HNPMX": "HNPMX", "ECT": "ECT", "ADT": "ADT", "MEZ": "MEZ", "HNEG": "HNEG", "AWDT": "AWDT", "ACWDT": "ACWDT", "GFT": "GFT", "EDT": "EDT", "CLST": "CLST", "MESZ": "MESZ", "SAST": "SAST", "COST": "COST", "JDT": "JDT", "OEZ": "OEZ", "HADT": "HADT", "HKST": "HKST", "SRT": "SRT", "HEEG": "HEEG", "BT": "BT", "UYT": "UYT", "HKT": "HKT", "WIB": "WIB", "MST": "MST", "HEOG": "HEOG", "CDT": "CDT", "AST": "AST", "HAST": "HAST", "PDT": "PDT", "HNT": "HNT", "NZST": "NZST", "ART": "ART", "HEPM": "HEPM", "WEZ": "WEZ", "HNCU": "HNCU", "HECU": "HECU", "TMT": "TMT", "VET": "VET", "MDT": "MDT", "EAT": "EAT", "ACST": "ACST", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "LHST": "LHST", "LHDT": "LHDT", "HNOG": "HNOG", "CLT": "CLT", "ARST": "ARST", "AEDT": "AEDT", "CHAST": "CHAST", "UYST": "UYST", "WIT": "WIT", "EST": "EST", "CST": "CST", "NZDT": "NZDT", "ChST": "ChST", "BOT": "BOT", "IST": "IST", "PST": "PST", "WAST": "WAST", "AKST": "AKST", "COT": "COT", "TMST": "TMST", "JST": "JST", "SGT": "SGT", "AKDT": "AKDT", "OESZ": "OESZ", "WART": "WART", "GMT": "GMT"}, - } - } -  -@@ -137,7 +114,7 @@ func (pt *pt_TL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (pt *pt_TL) MonthsAbbreviated() []string { -- return pt.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -147,7 +124,7 @@ func (pt *pt_TL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (pt *pt_TL) MonthsNarrow() []string { -- return pt.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -157,7 +134,7 @@ func (pt *pt_TL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (pt *pt_TL) MonthsWide() []string { -- return pt.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,73 +180,13 @@ func (pt *pt_TL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'pt_TL' and handles both Whole and Real numbers based on 'v' - func (pt *pt_TL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'pt_TL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (pt *pt_TL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, pt.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'pt_TL' -@@ -277,56 +194,7 @@ func (pt *pt_TL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, pt.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'pt_TL' -@@ -335,68 +203,7 @@ func (pt *pt_TL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := pt.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, pt.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, pt.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, pt.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, pt.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, pt.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'pt_TL' -@@ -404,27 +211,6 @@ func (pt *pt_TL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -433,19 +219,6 @@ func (pt *pt_TL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,19 +227,6 @@ func (pt *pt_TL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,21 +235,6 @@ func (pt *pt_TL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, pt.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, pt.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -498,19 +243,6 @@ func (pt *pt_TL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,26 +251,6 @@ func (pt *pt_TL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -547,30 +259,6 @@ func (pt *pt_TL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,34 +267,5 @@ func (pt *pt_TL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, pt.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := pt.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/qu/qu.go b/qu/qu.go -index 9d1c84e..dea11ee 100644 ---- a/qu/qu.go -+++ b/qu/qu.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"HNPMX": "HNPMX", "AKDT": "AKDT", "SRT": "SRT", "WEZ": "WEZ", "LHDT": "LHDT", "WAST": "WAST", "OESZ": "OESZ", "WARST": "WARST", "HEPMX": "HEPMX", "HNT": "HNT", "GFT": "GFT", "ACST": "ACST", "HENOMX": "HENOMX", "WART": "WART", "SAST": "SAST", "HNEG": "HNEG", "WAT": "WAT", "CST": "CST", "ACWST": "ACWST", "ADT": "ADT", "ACDT": "ACDT", "ECT": "ECT", "ARST": "ARST", "MST": "MST", "HADT": "HADT", "HEPM": "HEPM", "BT": "BT", "CLST": "CLST", "COST": "COST", "EDT": "EDT", "WIB": "WIB", "∅∅∅": "∅∅∅", "WESZ": "WESZ", "HKT": "HKT", "LHST": "LHST", "CHADT": "CHADT", "MESZ": "MESZ", "IST": "IST", "CLT": "CLT", "HNCU": "HNCU", "UYST": "UYST", "AEST": "AEST", "HEEG": "HEEG", "TMT": "TMT", "TMST": "TMST", "VET": "VET", "HEOG": "HEOG", "AEDT": "AEDT", "NZST": "NZST", "ChST": "ChST", "EAT": "EAT", "SGT": "SGT", "MDT": "MDT", "GYT": "GYT", "MYT": "MYT", "AWDT": "AWDT", "JDT": "JDT", "BOT": "BOT", "CAT": "CAT", "EST": "EST", "AKST": "AKST", "WITA": "WITA", "OEZ": "OEZ", "ART": "ART", "PST": "PST", "GMT": "GMT", "ACWDT": "ACWDT", "WIT": "WIT", "HNPM": "HNPM", "NZDT": "NZDT", "HAST": "HAST", "HAT": "HAT", "HNOG": "HNOG", "AWST": "AWST", "HKST": "HKST", "COT": "COT", "HECU": "HECU", "UYT": "UYT", "MEZ": "MEZ", "JST": "JST", "PDT": "PDT", "CHAST": "CHAST", "HNNOMX": "HNNOMX", "CDT": "CDT", "AST": "AST"}, -+ timezones: map[string]string{"HKT": "HKT", "HAST": "HAST", "MEZ": "MEZ", "JDT": "JDT", "WAST": "WAST", "HNOG": "HNOG", "LHDT": "LHDT", "HAT": "HAT", "COST": "COST", "EST": "EST", "CAT": "CAT", "IST": "IST", "BT": "BT", "AEST": "AEST", "CHAST": "CHAST", "HEPM": "HEPM", "UYT": "UYT", "OEZ": "OEZ", "SAST": "SAST", "HADT": "HADT", "UYST": "UYST", "HECU": "HECU", "OESZ": "OESZ", "COT": "COT", "WIB": "WIB", "ARST": "ARST", "SRT": "SRT", "HNEG": "HNEG", "AWST": "AWST", "LHST": "LHST", "WEZ": "WEZ", "TMT": "TMT", "CST": "CST", "MST": "MST", "ECT": "ECT", "MYT": "MYT", "HEPMX": "HEPMX", "ACWDT": "ACWDT", "TMST": "TMST", "CDT": "CDT", "ART": "ART", "ACDT": "ACDT", "HEEG": "HEEG", "AWDT": "AWDT", "PST": "PST", "AKDT": "AKDT", "MDT": "MDT", "AST": "AST", "HNNOMX": "HNNOMX", "AKST": "AKST", "HKST": "HKST", "HNPMX": "HNPMX", "HENOMX": "HENOMX", "AEDT": "AEDT", "CLT": "CLT", "NZST": "NZST", "BOT": "BOT", "EAT": "EAT", "MESZ": "MESZ", "HNT": "HNT", "GYT": "GYT", "∅∅∅": "∅∅∅", "ACST": "ACST", "WESZ": "WESZ", "GFT": "GFT", "WITA": "WITA", "NZDT": "NZDT", "HNPM": "HNPM", "ACWST": "ACWST", "HNCU": "HNCU", "WIT": "WIT", "HEOG": "HEOG", "WARST": "WARST", "EDT": "EDT", "CLST": "CLST", "ADT": "ADT", "JST": "JST", "VET": "VET", "WAT": "WAT", "WART": "WART", "GMT": "GMT", "ChST": "ChST", "PDT": "PDT", "CHADT": "CHADT", "SGT": "SGT"}, - } - } -  -diff --git a/qu_BO/qu_BO.go b/qu_BO/qu_BO.go -index a0b2372..8f26b4a 100644 ---- a/qu_BO/qu_BO.go -+++ b/qu_BO/qu_BO.go -@@ -10,70 +10,47 @@ import ( - ) -  - type qu_BO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'qu_BO' locale - func New() locales.Translator { - return &qu_BO{ -- locale: "qu_BO", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "Bs", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Qul", "Hat", "Pau", "Ayr", "Aym", "Int", "Ant", "Qha", "Uma", "Kan", "Aya", "Kap"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Qulla puquy", "Hatun puquy", "Pauqar waray", "Ayriwa", "Aymuray", "Inti raymi", "Anta Sitwa", "Qhapaq Sitwa", "Uma raymi", "Kantaray", "Ayamarqʼa", "Kapaq Raymi"}, -- daysAbbreviated: []string{"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"}, -- daysWide: []string{"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HEPMX": "HEPMX", "WIT": "WIT", "WEZ": "WEZ", "HEOG": "HEOG", "CHADT": "CHADT", "ACST": "ACST", "BOT": "BOT", "EAT": "EAT", "EDT": "EDT", "WESZ": "WESZ", "HNT": "HNT", "CLST": "CLST", "JST": "JST", "ACDT": "ACDT", "CAT": "CAT", "COST": "COST", "MST": "MST", "AKST": "AKST", "HAT": "HAT", "NZDT": "NZDT", "TMST": "TMST", "SGT": "SGT", "MYT": "MYT", "CDT": "CDT", "GYT": "GYT", "WIB": "WIB", "PDT": "PDT", "MESZ": "MESZ", "ChST": "ChST", "HNOG": "HNOG", "HKT": "HKT", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "JDT": "JDT", "HNEG": "HNEG", "EST": "EST", "AEST": "AEST", "HNCU": "HNCU", "CST": "CST", "AWDT": "AWDT", "IST": "IST", "WAST": "WAST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "MEZ": "MEZ", "LHST": "LHST", "TMT": "TMT", "OEZ": "OEZ", "COT": "COT", "UYT": "UYT", "HNPM": "HNPM", "CLT": "CLT", "BT": "BT", "ACWST": "ACWST", "HKST": "HKST", "CHAST": "CHAST", "GMT": "GMT", "VET": "VET", "ART": "ART", "WITA": "WITA", "SAST": "SAST", "AST": "AST", "ECT": "ECT", "WARST": "WARST", "UYST": "UYST", "ADT": "ADT", "AWST": "AWST", "HEPM": "HEPM", "NZST": "NZST", "ACWDT": "ACWDT", "ARST": "ARST", "AEDT": "AEDT", "HENOMX": "HENOMX", "MDT": "MDT", "HAST": "HAST", "HEEG": "HEEG", "WAT": "WAT", "HADT": "HADT", "SRT": "SRT", "HECU": "HECU", "HNPMX": "HNPMX", "WART": "WART", "PST": "PST", "LHDT": "LHDT", "GFT": "GFT"}, -+ locale: "qu_BO", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "Bs", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JST": "JST", "WIT": "WIT", "AST": "AST", "SRT": "SRT", "MEZ": "MEZ", "UYT": "UYT", "UYST": "UYST", "HNCU": "HNCU", "HAT": "HAT", "CLST": "CLST", "HAST": "HAST", "CST": "CST", "EAT": "EAT", "VET": "VET", "HEPMX": "HEPMX", "AKDT": "AKDT", "NZST": "NZST", "ECT": "ECT", "WAT": "WAT", "GFT": "GFT", "WART": "WART", "COST": "COST", "MYT": "MYT", "HNPM": "HNPM", "LHST": "LHST", "EDT": "EDT", "WITA": "WITA", "PDT": "PDT", "AEDT": "AEDT", "EST": "EST", "ARST": "ARST", "PST": "PST", "ChST": "ChST", "HEEG": "HEEG", "HECU": "HECU", "OESZ": "OESZ", "TMST": "TMST", "ART": "ART", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "JDT": "JDT", "AEST": "AEST", "WARST": "WARST", "TMT": "TMT", "MST": "MST", "ACST": "ACST", "HNEG": "HNEG", "BT": "BT", "ACWST": "ACWST", "HKT": "HKT", "MDT": "MDT", "LHDT": "LHDT", "AWDT": "AWDT", "ACWDT": "ACWDT", "CHAST": "CHAST", "HNPMX": "HNPMX", "WEZ": "WEZ", "CAT": "CAT", "CDT": "CDT", "AKST": "AKST", "HNOG": "HNOG", "ACDT": "ACDT", "CHADT": "CHADT", "WAST": "WAST", "HNT": "HNT", "COT": "COT", "CLT": "CLT", "WIB": "WIB", "HEOG": "HEOG", "SAST": "SAST", "HADT": "HADT", "HEPM": "HEPM", "AWST": "AWST", "OEZ": "OEZ", "GYT": "GYT", "∅∅∅": "∅∅∅", "ADT": "ADT", "MESZ": "MESZ", "IST": "IST", "WESZ": "WESZ", "HKST": "HKST", "BOT": "BOT", "SGT": "SGT", "NZDT": "NZDT", "GMT": "GMT"}, - } - } -  -@@ -119,7 +96,7 @@ func (qu *qu_BO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (qu *qu_BO) MonthsAbbreviated() []string { -- return qu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +106,7 @@ func (qu *qu_BO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (qu *qu_BO) MonthsNarrow() []string { -- return qu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +116,7 @@ func (qu *qu_BO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (qu *qu_BO) MonthsWide() []string { -- return qu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,75 +162,13 @@ func (qu *qu_BO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'qu_BO' and handles both Whole and Real numbers based on 'v' - func (qu *qu_BO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'qu_BO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (qu *qu_BO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, qu.percentSuffix...) -- -- b = append(b, qu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'qu_BO' -@@ -261,60 +176,7 @@ func (qu *qu_BO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := qu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, qu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'qu_BO' -@@ -323,72 +185,7 @@ func (qu *qu_BO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := qu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyNegativePrefix[j]) -- } -- -- b = append(b, qu.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, qu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'qu_BO' -@@ -396,27 +193,6 @@ func (qu *qu_BO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,17 +201,6 @@ func (qu *qu_BO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -444,17 +209,6 @@ func (qu *qu_BO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,19 +217,6 @@ func (qu *qu_BO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, qu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +225,6 @@ func (qu *qu_BO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,26 +233,6 @@ func (qu *qu_BO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -533,30 +241,6 @@ func (qu *qu_BO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -565,34 +249,5 @@ func (qu *qu_BO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := qu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/qu_EC/qu_EC.go b/qu_EC/qu_EC.go -index 17651e4..c850120 100644 ---- a/qu_EC/qu_EC.go -+++ b/qu_EC/qu_EC.go -@@ -10,70 +10,45 @@ import ( - ) -  - type qu_EC struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'qu_EC' locale - func New() locales.Translator { - return &qu_EC{ -- locale: "qu_EC", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Qul", "Hat", "Pau", "Ayr", "Aym", "Int", "Ant", "Qha", "Uma", "Kan", "Aya", "Kap"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Qulla puquy", "Hatun puquy", "Pauqar waray", "Ayriwa", "Aymuray", "Inti raymi", "Anta Sitwa", "Qhapaq Sitwa", "Uma raymi", "Kantaray", "Ayamarqʼa", "Kapaq Raymi"}, -- daysAbbreviated: []string{"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"}, -- daysWide: []string{"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"TMST": "TMST", "UYT": "UYT", "WEZ": "WEZ", "LHST": "LHST", "MDT": "MDT", "WESZ": "WESZ", "CHADT": "CHADT", "OEZ": "OEZ", "OESZ": "OESZ", "WIT": "WIT", "SRT": "SRT", "JDT": "JDT", "MEZ": "MEZ", "ACST": "ACST", "WARST": "WARST", "HECU": "HECU", "AKST": "AKST", "ACWDT": "ACWDT", "HNT": "HNT", "HNEG": "HNEG", "CAT": "CAT", "HENOMX": "HENOMX", "SGT": "SGT", "EST": "EST", "EAT": "EAT", "WAT": "WAT", "GMT": "GMT", "WITA": "WITA", "CLST": "CLST", "HNNOMX": "HNNOMX", "UYST": "UYST", "ECT": "ECT", "HEOG": "HEOG", "AEST": "AEST", "IST": "IST", "GFT": "GFT", "AST": "AST", "ACWST": "ACWST", "ARST": "ARST", "AWST": "AWST", "AEDT": "AEDT", "HAST": "HAST", "HADT": "HADT", "HAT": "HAT", "ART": "ART", "HNPM": "HNPM", "WART": "WART", "HEPMX": "HEPMX", "ADT": "ADT", "ChST": "ChST", "NZDT": "NZDT", "CHAST": "CHAST", "MESZ": "MESZ", "HNPMX": "HNPMX", "HNOG": "HNOG", "JST": "JST", "COT": "COT", "HKST": "HKST", "CLT": "CLT", "BOT": "BOT", "TMT": "TMT", "COST": "COST", "MST": "MST", "HKT": "HKT", "PST": "PST", "AWDT": "AWDT", "LHDT": "LHDT", "NZST": "NZST", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "WIB": "WIB", "GYT": "GYT", "MYT": "MYT", "VET": "VET", "PDT": "PDT", "HEPM": "HEPM", "HNCU": "HNCU", "EDT": "EDT", "CST": "CST", "SAST": "SAST", "HEEG": "HEEG", "ACDT": "ACDT", "CDT": "CDT", "BT": "BT", "WAST": "WAST"}, -+ locale: "qu_EC", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "HAT": "HAT", "WARST": "WARST", "COT": "COT", "WITA": "WITA", "CST": "CST", "LHDT": "LHDT", "AEST": "AEST", "ACWST": "ACWST", "EST": "EST", "HKT": "HKT", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "CHAST": "CHAST", "PDT": "PDT", "BT": "BT", "HEPMX": "HEPMX", "WESZ": "WESZ", "AKST": "AKST", "HNT": "HNT", "HKST": "HKST", "WIB": "WIB", "CDT": "CDT", "MDT": "MDT", "EAT": "EAT", "ACWDT": "ACWDT", "NZST": "NZST", "ECT": "ECT", "HEPM": "HEPM", "WEZ": "WEZ", "SGT": "SGT", "WAST": "WAST", "MST": "MST", "ACST": "ACST", "HNEG": "HNEG", "CHADT": "CHADT", "HNOG": "HNOG", "CLST": "CLST", "AWDT": "AWDT", "LHST": "LHST", "UYST": "UYST", "TMT": "TMT", "AST": "AST", "BOT": "BOT", "ACDT": "ACDT", "PST": "PST", "WIT": "WIT", "HEOG": "HEOG", "TMST": "TMST", "ARST": "ARST", "HNPMX": "HNPMX", "WART": "WART", "MESZ": "MESZ", "JDT": "JDT", "IST": "IST", "∅∅∅": "∅∅∅", "EDT": "EDT", "ART": "ART", "HAST": "HAST", "AWST": "AWST", "WAT": "WAT", "GMT": "GMT", "ChST": "ChST", "AEDT": "AEDT", "HECU": "HECU", "CAT": "CAT", "HEEG": "HEEG", "COST": "COST", "NZDT": "NZDT", "HENOMX": "HENOMX", "JST": "JST", "VET": "VET", "OEZ": "OEZ", "OESZ": "OESZ", "SRT": "SRT", "HADT": "HADT", "MYT": "MYT", "HNCU": "HNCU", "AKDT": "AKDT", "SAST": "SAST", "CLT": "CLT", "UYT": "UYT", "GYT": "GYT", "ADT": "ADT"}, - } - } -  -@@ -119,7 +94,7 @@ func (qu *qu_EC) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (qu *qu_EC) MonthsAbbreviated() []string { -- return qu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +104,7 @@ func (qu *qu_EC) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (qu *qu_EC) MonthsNarrow() []string { -- return qu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +114,7 @@ func (qu *qu_EC) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (qu *qu_EC) MonthsWide() []string { -- return qu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,75 +160,13 @@ func (qu *qu_EC) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'qu_EC' and handles both Whole and Real numbers based on 'v' - func (qu *qu_EC) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'qu_EC' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (qu *qu_EC) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, qu.percentSuffix...) -- -- b = append(b, qu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'qu_EC' -@@ -261,60 +174,7 @@ func (qu *qu_EC) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := qu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, qu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'qu_EC' -@@ -323,72 +183,7 @@ func (qu *qu_EC) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := qu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyNegativePrefix[j]) -- } -- -- b = append(b, qu.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, qu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'qu_EC' -@@ -396,27 +191,6 @@ func (qu *qu_EC) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,17 +199,6 @@ func (qu *qu_EC) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -444,17 +207,6 @@ func (qu *qu_EC) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,19 +215,6 @@ func (qu *qu_EC) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, qu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +223,6 @@ func (qu *qu_EC) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,26 +231,6 @@ func (qu *qu_EC) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -533,30 +239,6 @@ func (qu *qu_EC) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -565,34 +247,5 @@ func (qu *qu_EC) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := qu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/qu_PE/qu_PE.go b/qu_PE/qu_PE.go -index 453c627..98c7b9d 100644 ---- a/qu_PE/qu_PE.go -+++ b/qu_PE/qu_PE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type qu_PE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'qu_PE' locale - func New() locales.Translator { - return &qu_PE{ -- locale: "qu_PE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Qul", "Hat", "Pau", "Ayr", "Aym", "Int", "Ant", "Qha", "Uma", "Kan", "Aya", "Kap"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Qulla puquy", "Hatun puquy", "Pauqar waray", "Ayriwa", "Aymuray", "Inti raymi", "Anta Sitwa", "Qhapaq Sitwa", "Uma raymi", "Kantaray", "Ayamarqʼa", "Kapaq Raymi"}, -- daysAbbreviated: []string{"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"}, -- daysNarrow: []string{"D", "L", "M", "X", "J", "V", "S"}, -- daysShort: []string{"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"}, -- daysWide: []string{"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNEG": "HNEG", "HEOG": "HEOG", "AWST": "AWST", "WITA": "WITA", "ART": "ART", "MEZ": "MEZ", "SAST": "SAST", "HEEG": "HEEG", "TMT": "TMT", "GYT": "GYT", "NZST": "NZST", "WIT": "WIT", "ChST": "ChST", "HNNOMX": "HNNOMX", "GMT": "GMT", "MST": "MST", "UYST": "UYST", "MESZ": "MESZ", "BOT": "BOT", "WARST": "WARST", "COT": "COT", "MYT": "MYT", "JDT": "JDT", "ACDT": "ACDT", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "HNOG": "HNOG", "AEDT": "AEDT", "OESZ": "OESZ", "CST": "CST", "WESZ": "WESZ", "AEST": "AEST", "JST": "JST", "WAT": "WAT", "COST": "COST", "ACWDT": "ACWDT", "HAT": "HAT", "AWDT": "AWDT", "CHADT": "CHADT", "CLST": "CLST", "HEPMX": "HEPMX", "HAST": "HAST", "ACWST": "ACWST", "HNT": "HNT", "HEPM": "HEPM", "CHAST": "CHAST", "EDT": "EDT", "UYT": "UYT", "AKST": "AKST", "PST": "PST", "WAST": "WAST", "SGT": "SGT", "MDT": "MDT", "SRT": "SRT", "CDT": "CDT", "HKST": "HKST", "NZDT": "NZDT", "GFT": "GFT", "TMST": "TMST", "EAT": "EAT", "HECU": "HECU", "VET": "VET", "ARST": "ARST", "HKT": "HKT", "CLT": "CLT", "ACST": "ACST", "HNCU": "HNCU", "WIB": "WIB", "HADT": "HADT", "CAT": "CAT", "ECT": "ECT", "HENOMX": "HENOMX", "BT": "BT", "AST": "AST", "HNPM": "HNPM", "IST": "IST", "ADT": "ADT", "PDT": "PDT", "WEZ": "WEZ", "LHST": "LHST", "WART": "WART", "EST": "EST", "HNPMX": "HNPMX", "AKDT": "AKDT", "LHDT": "LHDT"}, -+ locale: "qu_PE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EST": "EST", "HKST": "HKST", "CLT": "CLT", "MEZ": "MEZ", "LHDT": "LHDT", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "COST": "COST", "CHAST": "CHAST", "WESZ": "WESZ", "UYT": "UYT", "UYST": "UYST", "IST": "IST", "NZDT": "NZDT", "ChST": "ChST", "WITA": "WITA", "NZST": "NZST", "ECT": "ECT", "HADT": "HADT", "AWST": "AWST", "HEPMX": "HEPMX", "HAT": "HAT", "HKT": "HKT", "MDT": "MDT", "AEST": "AEST", "SGT": "SGT", "WIT": "WIT", "CAT": "CAT", "HENOMX": "HENOMX", "HNT": "HNT", "SAST": "SAST", "CST": "CST", "ACWST": "ACWST", "ACWDT": "ACWDT", "AKST": "AKST", "GYT": "GYT", "EDT": "EDT", "SRT": "SRT", "HNCU": "HNCU", "WART": "WART", "HEOG": "HEOG", "ART": "ART", "EAT": "EAT", "ACST": "ACST", "BT": "BT", "HNOG": "HNOG", "CDT": "CDT", "MESZ": "MESZ", "ACDT": "ACDT", "AWDT": "AWDT", "WAST": "WAST", "ARST": "ARST", "GMT": "GMT", "WEZ": "WEZ", "WAT": "WAT", "OEZ": "OEZ", "CHADT": "CHADT", "PDT": "PDT", "HECU": "HECU", "CLST": "CLST", "AST": "AST", "WARST": "WARST", "ADT": "ADT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "HNPMX": "HNPMX", "OESZ": "OESZ", "BOT": "BOT", "WIB": "WIB", "JST": "JST", "PST": "PST", "VET": "VET", "COT": "COT", "MST": "MST", "HNEG": "HNEG", "HEEG": "HEEG", "MYT": "MYT", "AKDT": "AKDT", "TMST": "TMST", "HAST": "HAST", "LHST": "LHST", "HNPM": "HNPM", "JDT": "JDT", "GFT": "GFT", "TMT": "TMT"}, - } - } -  -@@ -119,7 +94,7 @@ func (qu *qu_PE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (qu *qu_PE) MonthsAbbreviated() []string { -- return qu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +104,7 @@ func (qu *qu_PE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (qu *qu_PE) MonthsNarrow() []string { -- return qu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +114,7 @@ func (qu *qu_PE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (qu *qu_PE) MonthsWide() []string { -- return qu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,75 +160,13 @@ func (qu *qu_PE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'qu_PE' and handles both Whole and Real numbers based on 'v' - func (qu *qu_PE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'qu_PE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (qu *qu_PE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, qu.percentSuffix...) -- -- b = append(b, qu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'qu_PE' -@@ -261,60 +174,7 @@ func (qu *qu_PE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := qu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, qu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, qu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'qu_PE' -@@ -323,72 +183,7 @@ func (qu *qu_PE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := qu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, qu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, qu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyNegativePrefix[j]) -- } -- -- b = append(b, qu.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(qu.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, qu.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, qu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'qu_PE' -@@ -396,27 +191,6 @@ func (qu *qu_PE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -425,17 +199,6 @@ func (qu *qu_PE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -444,17 +207,6 @@ func (qu *qu_PE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,19 +215,6 @@ func (qu *qu_PE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, qu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, qu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -484,19 +223,6 @@ func (qu *qu_PE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -505,26 +231,6 @@ func (qu *qu_PE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -533,30 +239,6 @@ func (qu *qu_PE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -565,34 +247,5 @@ func (qu *qu_PE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, qu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := qu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/rm/rm.go b/rm/rm.go -index ed281d8..ba9b678 100644 ---- a/rm/rm.go -+++ b/rm/rm.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"av. Cr.", "s. Cr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"avant Cristus", "suenter Cristus"}, -- timezones: map[string]string{"LHST": "LHST", "JST": "JST", "ChST": "ChST", "EDT": "EDT", "UYT": "UYT", "AWDT": "AWDT", "OEZ": "OEZ", "HNPMX": "HNPMX", "AKDT": "AKDT", "MYT": "MYT", "ART": "ART", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "ACST": "ACST", "OESZ": "OESZ", "PST": "PST", "PDT": "PDT", "NZDT": "NZDT", "CLT": "CLT", "GFT": "GFT", "WITA": "WITA", "HAST": "HAST", "WESZ": "WESZ", "HEPM": "HEPM", "CHAST": "CHAST", "CLST": "CLST", "ACDT": "ACDT", "UYST": "UYST", "GYT": "GYT", "HNT": "HNT", "WART": "WART", "WIT": "WIT", "SRT": "SRT", "HNOG": "HNOG", "ARST": "ARST", "NZST": "NZST", "JDT": "JDT", "WARST": "WARST", "COST": "COST", "GMT": "GMT", "WIB": "WIB", "CST": "CST", "HAT": "HAT", "SAST": "SAST", "MDT": "MDT", "CDT": "CDT", "AST": "AST", "WEZ": "WEZ", "AEDT": "AEDT", "ACWDT": "ACWDT", "AEST": "AEST", "HKT": "HKT", "HNPM": "HNPM", "IST": "IST", "TMST": "TMST", "EST": "EST", "HKST": "HKST", "HENOMX": "HENOMX", "ADT": "ADT", "HECU": "HECU", "HADT": "HADT", "MESZ": "MESZ", "LHDT": "LHDT", "BOT": "BOT", "CAT": "CAT", "ECT": "ECT", "COT": "COT", "VET": "VET", "ACWST": "ACWST", "MEZ": "MEZ", "HNEG": "HNEG", "WAT": "WAT", "SGT": "SGT", "HNCU": "HNCU", "HEPMX": "HEPMX", "HEOG": "HEOG", "EAT": "EAT", "WAST": "WAST", "AKST": "AKST", "AWST": "AWST", "CHADT": "CHADT", "TMT": "TMT", "HNNOMX": "HNNOMX", "MST": "MST", "BT": "BT"}, -+ timezones: map[string]string{"CST": "CST", "ACDT": "ACDT", "JST": "JST", "WEZ": "WEZ", "ChST": "ChST", "SRT": "SRT", "HNEG": "HNEG", "AEDT": "AEDT", "WAST": "WAST", "HNNOMX": "HNNOMX", "IST": "IST", "AKDT": "AKDT", "HAT": "HAT", "WARST": "WARST", "TMST": "TMST", "MDT": "MDT", "GMT": "GMT", "PST": "PST", "HNPMX": "HNPMX", "OEZ": "OEZ", "HEOG": "HEOG", "EST": "EST", "ACST": "ACST", "HENOMX": "HENOMX", "AWST": "AWST", "ACWDT": "ACWDT", "SGT": "SGT", "HNCU": "HNCU", "WART": "WART", "COT": "COT", "WIB": "WIB", "MEZ": "MEZ", "JDT": "JDT", "UYST": "UYST", "MESZ": "MESZ", "CHAST": "CHAST", "HECU": "HECU", "AKST": "AKST", "GFT": "GFT", "CLT": "CLT", "ADT": "ADT", "LHDT": "LHDT", "MYT": "MYT", "UYT": "UYT", "WIT": "WIT", "SAST": "SAST", "HKST": "HKST", "OESZ": "OESZ", "HNT": "HNT", "HEEG": "HEEG", "BT": "BT", "ACWST": "ACWST", "GYT": "GYT", "CLST": "CLST", "AST": "AST", "EAT": "EAT", "CHADT": "CHADT", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "WITA": "WITA", "ECT": "ECT", "HEPM": "HEPM", "CDT": "CDT", "ARST": "ARST", "BOT": "BOT", "PDT": "PDT", "HEPMX": "HEPMX", "EDT": "EDT", "NZST": "NZST", "NZDT": "NZDT", "HADT": "HADT", "VET": "VET", "COST": "COST", "TMT": "TMT", "MST": "MST", "ART": "ART", "AWDT": "AWDT", "HNOG": "HNOG", "HKT": "HKT", "CAT": "CAT", "HAST": "HAST", "LHST": "LHST", "HNPM": "HNPM", "AEST": "AEST", "WAT": "WAT"}, - } - } -  -diff --git a/rm_CH/rm_CH.go b/rm_CH/rm_CH.go -index 23172b7..651d63f 100644 ---- a/rm_CH/rm_CH.go -+++ b/rm_CH/rm_CH.go -@@ -10,70 +10,45 @@ import ( - ) -  - type rm_CH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'rm_CH' locale - func New() locales.Translator { - return &rm_CH{ -- locale: "rm_CH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: "’", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "schan.", "favr.", "mars", "avr.", "matg", "zercl.", "fan.", "avust", "sett.", "oct.", "nov.", "dec."}, -- monthsNarrow: []string{"", "S", "F", "M", "A", "M", "Z", "F", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "schaner", "favrer", "mars", "avrigl", "matg", "zercladur", "fanadur", "avust", "settember", "october", "november", "december"}, -- daysAbbreviated: []string{"du", "gli", "ma", "me", "gie", "ve", "so"}, -- daysNarrow: []string{"D", "G", "M", "M", "G", "V", "S"}, -- daysShort: []string{"du", "gli", "ma", "me", "gie", "ve", "so"}, -- daysWide: []string{"dumengia", "glindesdi", "mardi", "mesemna", "gievgia", "venderdi", "sonda"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"av. Cr.", "s. Cr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"avant Cristus", "suenter Cristus"}, -- timezones: map[string]string{"GYT": "GYT", "WIB": "WIB", "HNOG": "HNOG", "HNPM": "HNPM", "MESZ": "MESZ", "NZDT": "NZDT", "WAT": "WAT", "COT": "COT", "CDT": "CDT", "ARST": "ARST", "LHDT": "LHDT", "EAT": "EAT", "OESZ": "OESZ", "UYST": "UYST", "AKST": "AKST", "HEPM": "HEPM", "ACST": "ACST", "OEZ": "OEZ", "MDT": "MDT", "AWST": "AWST", "TMT": "TMT", "AWDT": "AWDT", "BOT": "BOT", "GFT": "GFT", "EST": "EST", "VET": "VET", "ACWST": "ACWST", "AEDT": "AEDT", "HKT": "HKT", "HNCU": "HNCU", "CST": "CST", "HADT": "HADT", "UYT": "UYT", "SAST": "SAST", "IST": "IST", "ChST": "ChST", "SGT": "SGT", "MST": "MST", "MYT": "MYT", "MEZ": "MEZ", "HECU": "HECU", "HNPMX": "HNPMX", "HAST": "HAST", "WEZ": "WEZ", "TMST": "TMST", "HNEG": "HNEG", "WAST": "WAST", "WARST": "WARST", "AKDT": "AKDT", "ART": "ART", "AEST": "AEST", "NZST": "NZST", "HEOG": "HEOG", "ACWDT": "ACWDT", "CHAST": "CHAST", "HEEG": "HEEG", "PDT": "PDT", "HNT": "HNT", "LHST": "LHST", "WIT": "WIT", "HEPMX": "HEPMX", "BT": "BT", "PST": "PST", "HAT": "HAT", "WART": "WART", "COST": "COST", "GMT": "GMT", "EDT": "EDT", "HKST": "HKST", "CHADT": "CHADT", "CAT": "CAT", "JST": "JST", "JDT": "JDT", "CLT": "CLT", "HENOMX": "HENOMX", "SRT": "SRT", "HNNOMX": "HNNOMX", "AST": "AST", "WESZ": "WESZ", "WITA": "WITA", "CLST": "CLST", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "ECT": "ECT", "ADT": "ADT"}, -+ locale: "rm_CH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "VET": "VET", "OEZ": "OEZ", "HNT": "HNT", "HEOG": "HEOG", "ECT": "ECT", "MEZ": "MEZ", "BT": "BT", "CHAST": "CHAST", "CHADT": "CHADT", "SRT": "SRT", "CLT": "CLT", "AST": "AST", "MESZ": "MESZ", "ACWDT": "ACWDT", "WESZ": "WESZ", "AKST": "AKST", "OESZ": "OESZ", "CAT": "CAT", "AEDT": "AEDT", "SGT": "SGT", "COT": "COT", "ACDT": "ACDT", "CDT": "CDT", "NZDT": "NZDT", "HAST": "HAST", "HNEG": "HNEG", "HENOMX": "HENOMX", "LHST": "LHST", "JST": "JST", "CST": "CST", "WIB": "WIB", "GMT": "GMT", "ChST": "ChST", "ACST": "ACST", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "WAT": "WAT", "CLST": "CLST", "ART": "ART", "AWST": "AWST", "AEST": "AEST", "WEZ": "WEZ", "WARST": "WARST", "HNOG": "HNOG", "HKT": "HKT", "MDT": "MDT", "GYT": "GYT", "TMST": "TMST", "GFT": "GFT", "EAT": "EAT", "AWDT": "AWDT", "LHDT": "LHDT", "PST": "PST", "MST": "MST", "HNPMX": "HNPMX", "COST": "COST", "MYT": "MYT", "ADT": "ADT", "JDT": "JDT", "WART": "WART", "HKST": "HKST", "WITA": "WITA", "HEPM": "HEPM", "PDT": "PDT", "HECU": "HECU", "HAT": "HAT", "HEEG": "HEEG", "SAST": "SAST", "NZST": "NZST", "BOT": "BOT", "HADT": "HADT", "ACWST": "ACWST", "AKDT": "AKDT", "EST": "EST", "TMT": "TMT", "∅∅∅": "∅∅∅", "HNPM": "HNPM", "IST": "IST", "UYT": "UYT", "HEPMX": "HEPMX", "WAST": "WAST", "WIT": "WIT", "EDT": "EDT", "ARST": "ARST"}, - } - } -  -@@ -126,7 +101,7 @@ func (rm *rm_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (rm *rm_CH) MonthsAbbreviated() []string { -- return rm.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -136,7 +111,7 @@ func (rm *rm_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (rm *rm_CH) MonthsNarrow() []string { -- return rm.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -146,7 +121,7 @@ func (rm *rm_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (rm *rm_CH) MonthsWide() []string { -- return rm.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,81 +167,13 @@ func (rm *rm_CH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'rm_CH' and handles both Whole and Real numbers based on 'v' - func (rm *rm_CH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(rm.group) - 1; j >= 0; j-- { -- b = append(b, rm.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(rm.minus) - 1; j >= 0; j-- { -- b = append(b, rm.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'rm_CH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (rm *rm_CH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rm.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(rm.minus) - 1; j >= 0; j-- { -- b = append(b, rm.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, rm.percentSuffix...) -- -- b = append(b, rm.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'rm_CH' -@@ -274,60 +181,7 @@ func (rm *rm_CH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rm.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(rm.group) - 1; j >= 0; j-- { -- b = append(b, rm.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(rm.minus) - 1; j >= 0; j-- { -- b = append(b, rm.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rm.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, rm.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'rm_CH' -@@ -336,67 +190,7 @@ func (rm *rm_CH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rm.currencies[currency] -- l := len(s) + len(symbol) + 6 + 3*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(rm.group) - 1; j >= 0; j-- { -- b = append(b, rm.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(rm.minus) - 1; j >= 0; j-- { -- b = append(b, rm.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rm.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, rm.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, rm.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'rm_CH' -@@ -404,27 +198,6 @@ func (rm *rm_CH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -433,27 +206,6 @@ func (rm *rm_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,18 +214,6 @@ func (rm *rm_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = append(b, rm.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,21 +222,6 @@ func (rm *rm_CH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, rm.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20, 0x69, 0x6c, 0x73}...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x61}...) -- b = append(b, []byte{0x20}...) -- b = append(b, rm.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -505,19 +230,6 @@ func (rm *rm_CH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -526,26 +238,6 @@ func (rm *rm_CH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -554,30 +246,6 @@ func (rm *rm_CH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -586,34 +254,5 @@ func (rm *rm_CH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rm.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := rm.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/rn/rn.go b/rn/rn.go -index aac81cb..b3164f0 100644 ---- a/rn/rn.go -+++ b/rn/rn.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"Mb.Y.", "Ny.Y"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Mbere ya Yezu", "Nyuma ya Yezu"}, -- timezones: map[string]string{"JST": "JST", "HECU": "HECU", "CDT": "CDT", "GYT": "GYT", "AKST": "AKST", "WESZ": "WESZ", "HKT": "HKT", "WAT": "WAT", "COST": "COST", "OEZ": "OEZ", "WIT": "WIT", "MDT": "MDT", "ECT": "ECT", "WAST": "WAST", "EST": "EST", "UYT": "UYT", "ARST": "ARST", "HNPM": "HNPM", "CHADT": "CHADT", "OESZ": "OESZ", "MEZ": "MEZ", "PDT": "PDT", "AEST": "AEST", "CHAST": "CHAST", "HNOG": "HNOG", "HAST": "HAST", "HADT": "HADT", "HEOG": "HEOG", "HNEG": "HNEG", "ADT": "ADT", "MYT": "MYT", "ART": "ART", "PST": "PST", "ACST": "ACST", "WARST": "WARST", "JDT": "JDT", "BOT": "BOT", "BT": "BT", "WEZ": "WEZ", "WITA": "WITA", "HKST": "HKST", "HEPM": "HEPM", "LHDT": "LHDT", "NZST": "NZST", "SRT": "SRT", "HAT": "HAT", "ACWST": "ACWST", "LHST": "LHST", "TMT": "TMT", "GMT": "GMT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNCU": "HNCU", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HNT": "HNT", "ACWDT": "ACWDT", "CAT": "CAT", "TMST": "TMST", "ChST": "ChST", "ACDT": "ACDT", "MESZ": "MESZ", "SGT": "SGT", "EDT": "EDT", "AST": "AST", "AKDT": "AKDT", "NZDT": "NZDT", "GFT": "GFT", "HEEG": "HEEG", "COT": "COT", "AWST": "AWST", "WART": "WART", "VET": "VET", "AEDT": "AEDT", "AWDT": "AWDT", "SAST": "SAST", "CLT": "CLT", "CLST": "CLST", "UYST": "UYST", "EAT": "EAT", "MST": "MST", "CST": "CST", "WIB": "WIB", "IST": "IST", "∅∅∅": "∅∅∅"}, -+ timezones: map[string]string{"EAT": "EAT", "OESZ": "OESZ", "SRT": "SRT", "OEZ": "OEZ", "GMT": "GMT", "LHST": "LHST", "ACWST": "ACWST", "CHAST": "CHAST", "TMT": "TMT", "ECT": "ECT", "AST": "AST", "AEDT": "AEDT", "AKDT": "AKDT", "HKT": "HKT", "AKST": "AKST", "WART": "WART", "GYT": "GYT", "NZST": "NZST", "ChST": "ChST", "HENOMX": "HENOMX", "AEST": "AEST", "UYST": "UYST", "COT": "COT", "AWST": "AWST", "PST": "PST", "WESZ": "WESZ", "CST": "CST", "WIT": "WIT", "SAST": "SAST", "MST": "MST", "WIB": "WIB", "MYT": "MYT", "ACWDT": "ACWDT", "WARST": "WARST", "TMST": "TMST", "NZDT": "NZDT", "IST": "IST", "HAT": "HAT", "COST": "COST", "UYT": "UYT", "WAST": "WAST", "HNT": "HNT", "HEOG": "HEOG", "EST": "EST", "ACDT": "ACDT", "MESZ": "MESZ", "JST": "JST", "CDT": "CDT", "ARST": "ARST", "BOT": "BOT", "HNPM": "HNPM", "BT": "BT", "EDT": "EDT", "HNCU": "HNCU", "WAT": "WAT", "GFT": "GFT", "HNOG": "HNOG", "HAST": "HAST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "HEPMX": "HEPMX", "ADT": "ADT", "ACST": "ACST", "CHADT": "CHADT", "HNPMX": "HNPMX", "HECU": "HECU", "CLST": "CLST", "MEZ": "MEZ", "PDT": "PDT", "SGT": "SGT", "HADT": "HADT", "HKST": "HKST", "CLT": "CLT", "WEZ": "WEZ", "CAT": "CAT", "WITA": "WITA", "ART": "ART", "HNEG": "HNEG", "HEEG": "HEEG", "JDT": "JDT", "VET": "VET", "MDT": "MDT", "LHDT": "LHDT", "HEPM": "HEPM", "∅∅∅": "∅∅∅"}, - } - } -  -diff --git a/rn_BI/rn_BI.go b/rn_BI/rn_BI.go -index 1f5bf10..e89d620 100644 ---- a/rn_BI/rn_BI.go -+++ b/rn_BI/rn_BI.go -@@ -18,7 +18,6 @@ type rn_BI struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -43,25 +42,13 @@ type rn_BI struct { - // New returns a new instance of translator for the 'rn_BI' locale - func New() locales.Translator { - return &rn_BI{ -- locale: "rn_BI", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "Mut.", "Gas.", "Wer.", "Mat.", "Gic.", "Kam.", "Nya.", "Kan.", "Nze.", "Ukw.", "Ugu.", "Uku."}, -- monthsWide: []string{"", "Nzero", "Ruhuhuma", "Ntwarante", "Ndamukiza", "Rusama", "Ruheshi", "Mukakaro", "Nyandagaro", "Nyakanga", "Gitugutu", "Munyonyo", "Kigarama"}, -- daysAbbreviated: []string{"cu.", "mbe.", "kab.", "gtu.", "kan.", "gnu.", "gnd."}, -- daysWide: []string{"Ku w’indwi", "Ku wa mbere", "Ku wa kabiri", "Ku wa gatatu", "Ku wa kane", "Ku wa gatanu", "Ku wa gatandatu"}, -- periodsAbbreviated: []string{"Z.MU.", "Z.MW."}, -- periodsWide: []string{"Z.MU.", "Z.MW."}, -- erasAbbreviated: []string{"Mb.Y.", "Ny.Y"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Mbere ya Yezu", "Nyuma ya Yezu"}, -- timezones: map[string]string{"HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AKST": "AKST", "AWDT": "AWDT", "CHADT": "CHADT", "JST": "JST", "∅∅∅": "∅∅∅", "BT": "BT", "HNT": "HNT", "AEST": "AEST", "HKT": "HKT", "NZST": "NZST", "HNEG": "HNEG", "MST": "MST", "HAT": "HAT", "HNPM": "HNPM", "HEPM": "HEPM", "WAST": "WAST", "HADT": "HADT", "WEZ": "WEZ", "WESZ": "WESZ", "AEDT": "AEDT", "ChST": "ChST", "BOT": "BOT", "ADT": "ADT", "CDT": "CDT", "HAST": "HAST", "PDT": "PDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "HNOG": "HNOG", "ACDT": "ACDT", "MYT": "MYT", "PST": "PST", "LHST": "LHST", "SAST": "SAST", "EAT": "EAT", "EST": "EST", "UYST": "UYST", "CLST": "CLST", "TMST": "TMST", "OEZ": "OEZ", "CST": "CST", "VET": "VET", "WIT": "WIT", "ARST": "ARST", "HEOG": "HEOG", "AWST": "AWST", "LHDT": "LHDT", "SGT": "SGT", "JDT": "JDT", "NZDT": "NZDT", "OESZ": "OESZ", "ECT": "ECT", "GMT": "GMT", "CLT": "CLT", "TMT": "TMT", "CAT": "CAT", "AKDT": "AKDT", "HKST": "HKST", "MESZ": "MESZ", "WART": "WART", "EDT": "EDT", "HEPMX": "HEPMX", "WIB": "WIB", "COT": "COT", "COST": "COST", "MDT": "MDT", "AST": "AST", "CHAST": "CHAST", "IST": "IST", "HEEG": "HEEG", "GFT": "GFT", "WAT": "WAT", "HECU": "HECU", "HNPMX": "HNPMX", "WARST": "WARST", "MEZ": "MEZ", "HNCU": "HNCU", "GYT": "GYT", "ART": "ART", "WITA": "WITA", "ACST": "ACST", "SRT": "SRT", "UYT": "UYT"}, -+ locale: "rn_BI", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "HEPM": "HEPM", "AST": "AST", "BOT": "BOT", "HNCU": "HNCU", "AKDT": "AKDT", "COT": "COT", "COST": "COST", "CDT": "CDT", "SGT": "SGT", "ACWDT": "ACWDT", "OESZ": "OESZ", "WART": "WART", "WARST": "WARST", "∅∅∅": "∅∅∅", "CHADT": "CHADT", "PST": "PST", "PDT": "PDT", "HNOG": "HNOG", "HKST": "HKST", "JDT": "JDT", "MYT": "MYT", "SAST": "SAST", "HENOMX": "HENOMX", "AWST": "AWST", "BT": "BT", "WEZ": "WEZ", "WIT": "WIT", "EST": "EST", "HNPM": "HNPM", "HNEG": "HNEG", "VET": "VET", "WIB": "WIB", "ChST": "ChST", "CST": "CST", "MDT": "MDT", "ACDT": "ACDT", "HECU": "HECU", "CAT": "CAT", "CLT": "CLT", "NZDT": "NZDT", "IST": "IST", "HAST": "HAST", "MESZ": "MESZ", "CHAST": "CHAST", "ACWST": "ACWST", "AEDT": "AEDT", "WAT": "WAT", "WITA": "WITA", "ADT": "ADT", "GFT": "GFT", "HAT": "HAT", "GMT": "GMT", "ARST": "ARST", "MST": "MST", "ART": "ART", "MEZ": "MEZ", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "JST": "JST", "HKT": "HKT", "TMT": "TMT", "WESZ": "WESZ", "GYT": "GYT", "LHST": "LHST", "UYT": "UYT", "UYST": "UYST", "AEST": "AEST", "HEPMX": "HEPMX", "WAST": "WAST", "HADT": "HADT", "ACST": "ACST", "EAT": "EAT", "HNPMX": "HNPMX", "ECT": "ECT", "SRT": "SRT", "HNT": "HNT", "HEOG": "HEOG", "TMST": "TMST", "AWDT": "AWDT", "NZST": "NZST", "AKST": "AKST", "OEZ": "OEZ", "EDT": "EDT", "CLST": "CLST"}, - } - } -  -@@ -107,7 +94,7 @@ func (rn *rn_BI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (rn *rn_BI) MonthsAbbreviated() []string { -- return rn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +114,7 @@ func (rn *rn_BI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (rn *rn_BI) MonthsWide() []string { -- return rn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -173,75 +160,13 @@ func (rn *rn_BI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'rn_BI' and handles both Whole and Real numbers based on 'v' - func (rn *rn_BI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, rn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'rn_BI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (rn *rn_BI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, rn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, rn.percentSuffix...) -- -- b = append(b, rn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'rn_BI' -@@ -249,54 +174,7 @@ func (rn *rn_BI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rn.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, rn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'rn_BI' -@@ -305,61 +183,7 @@ func (rn *rn_BI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rn.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, rn.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'rn_BI' -@@ -367,17 +191,6 @@ func (rn *rn_BI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -386,17 +199,6 @@ func (rn *rn_BI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -405,17 +207,6 @@ func (rn *rn_BI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -424,19 +215,6 @@ func (rn *rn_BI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, rn.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -445,19 +223,6 @@ func (rn *rn_BI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -466,26 +231,6 @@ func (rn *rn_BI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -494,30 +239,6 @@ func (rn *rn_BI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -526,34 +247,5 @@ func (rn *rn_BI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := rn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ro/ro.go b/ro/ro.go -index ce4f17d..83d71a1 100644 ---- a/ro/ro.go -+++ b/ro/ro.go -@@ -75,7 +75,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"î.Hr.", "d.Hr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"înainte de Hristos", "după Hristos"}, -- timezones: map[string]string{"COST": "Ora de vară a Columbiei", "PST": "Ora standard în zona Pacific nord-americană", "AWDT": "Ora de vară a Australiei Occidentale", "LHDT": "Ora de vară din Lord Howe", "∅∅∅": "Ora de vară a Amazonului", "ChST": "Ora din Chamorro", "BOT": "Ora Boliviei", "HEEG": "Ora de vară a Groenlandei orientale", "EAT": "Ora Africii Orientale", "CST": "Ora standard centrală nord-americană", "AST": "Ora standard în zona Atlantic nord-americană", "SRT": "Ora Surinamului", "EST": "Ora standard orientală nord-americană", "GYT": "Ora din Guyana", "JST": "Ora standard a Japoniei", "HNNOMX": "Ora standard a Mexicului de nord-vest", "HKST": "Ora de vară din Hong Kong", "MESZ": "Ora de vară a Europei Centrale", "CLST": "Ora de vară din Chile", "OEZ": "Ora standard a Europei de Est", "UYT": "Ora standard a Uruguayului", "AKDT": "Ora de vară din Alaska", "ADT": "Ora de vară în zona Atlantic nord-americană", "HNEG": "Ora standard a Groenlandei orientale", "MDT": "Ora de vară în zona montană nord-americană", "MEZ": "Ora standard a Europei Centrale", "NZDT": "Ora de vară a Noii Zeelande", "CHAST": "Ora standard din Chatham", "CHADT": "Ora de vară din Chatham", "IST": "Ora Indiei", "WARST": "Ora de vară a Argentinei Occidentale", "HEPMX": "Ora de vară a zonei Pacific mexicane", "CDT": "Ora de vară centrală nord-americană", "WIT": "Ora Indoneziei de Est", "AEST": "Ora standard a Australiei Orientale", "ACDT": "Ora de vară a Australiei Centrale", "HNPMX": "Ora standard a zonei Pacific mexicane", "MST": "Ora standard în zona montană nord-americană", "HAST": "Ora standard din Hawaii-Aleutine", "TMT": "Ora standard din Turkmenistan", "WESZ": "Ora de vară a Europei de Vest", "ART": "Ora standard a Argentinei", "LHST": "Ora standard din Lord Howe", "WART": "Ora standard a Argentinei Occidentale", "HENOMX": "Ora de vară a Mexicului de nord-vest", "HEOG": "Ora de vară a Groenlandei occidentale", "PDT": "Ora de vară în zona Pacific nord-americană", "WEZ": "Ora standard a Europei de Vest", "WIB": "Ora Indoneziei de Vest", "WAT": "Ora standard a Africii Occidentale", "ACST": "Ora standard a Australiei Centrale", "WAST": "Ora de vară a Africii Occidentale", "VET": "Ora Venezuelei", "BT": "Ora Bhutanului", "ARST": "Ora de vară a Argentinei", "HEPM": "Ora de vară din Saint-Pierre și Miquelon", "GFT": "Ora din Guyana Franceză", "CAT": "Ora Africii Centrale", "GMT": "Ora de Greenwhich", "EDT": "Ora de vară orientală nord-americană", "HADT": "Ora de vară din Hawaii-Aleutine", "HNT": "Ora standard din Newfoundland", "HKT": "Ora standard din Hong Kong", "COT": "Ora standard a Columbiei", "HNCU": "Ora standard a Cubei", "HECU": "Ora de vară a Cubei", "HAT": "Ora de vară din Newfoundland", "NZST": "Ora standard a Noii Zeelande", "JDT": "Ora de vară a Japoniei", "AEDT": "Ora de vară a Australiei Orientale", "CLT": "Ora standard din Chile", "TMST": "Ora de vară din Turkmenistan", "HNPM": "Ora standard din Saint-Pierre și Miquelon", "MYT": "Ora din Malaysia", "ACWST": "Ora standard a Australiei Central Occidentale", "WITA": "Ora Indoneziei Centrale", "ACWDT": "Ora de vară a Australiei Central Occidentale", "SAST": "Ora Africii Meridionale", "ECT": "Ora Ecuadorului", "UYST": "Ora de vară a Uruguayului", "AKST": "Ora standard din Alaska", "HNOG": "Ora standard a Groenlandei occidentale", "AWST": "Ora standard a Australiei Occidentale", "OESZ": "Ora de vară a Europei de Est", "SGT": "Ora din Singapore"}, -+ timezones: map[string]string{"MYT": "Ora din Malaysia", "AEDT": "Ora de vară a Australiei Orientale", "HECU": "Ora de vară a Cubei", "WITA": "Ora Indoneziei Centrale", "ARST": "Ora de vară a Argentinei", "HEEG": "Ora de vară a Groenlandei orientale", "HNNOMX": "Ora standard a Mexicului de nord-vest", "AKST": "Ora standard din Alaska", "CDT": "Ora de vară centrală nord-americană", "ACWDT": "Ora de vară a Australiei Central Occidentale", "WESZ": "Ora de vară a Europei de Vest", "SGT": "Ora din Singapore", "HNOG": "Ora standard a Groenlandei occidentale", "NZST": "Ora standard a Noii Zeelande", "ACWST": "Ora standard a Australiei Central Occidentale", "HNPMX": "Ora standard a zonei Pacific mexicane", "MST": "MST", "HNPM": "Ora standard din Saint-Pierre și Miquelon", "TMST": "Ora de vară din Turkmenistan", "CAT": "Ora Africii Centrale", "HENOMX": "Ora de vară a Mexicului de nord-vest", "ACDT": "Ora de vară a Australiei Centrale", "HADT": "Ora de vară din Hawaii-Aleutine", "UYST": "Ora de vară a Uruguayului", "OESZ": "Ora de vară a Europei de Est", "COT": "Ora standard a Columbiei", "HEOG": "Ora de vară a Groenlandei occidentale", "HKST": "Ora de vară din Hong Kong", "NZDT": "Ora de vară a Noii Zeelande", "EST": "Ora standard orientală nord-americană", "SRT": "Ora Surinamului", "HAST": "Ora standard din Hawaii-Aleutine", "ECT": "Ora Ecuadorului", "WIT": "Ora Indoneziei de Est", "WART": "Ora standard a Argentinei Occidentale", "AST": "Ora standard în zona Atlantic nord-americană", "BOT": "Ora Boliviei", "MESZ": "Ora de vară a Europei Centrale", "ACST": "Ora standard a Australiei Centrale", "COST": "Ora de vară a Columbiei", "SAST": "Ora Africii Meridionale", "CST": "Ora standard centrală nord-americană", "ChST": "Ora din Chamorro", "JDT": "Ora de vară a Japoniei", "CHADT": "Ora de vară din Chatham", "UYT": "Ora standard a Uruguayului", "HAT": "Ora de vară din Newfoundland", "∅∅∅": "Ora de vară a Brasiliei", "EDT": "Ora de vară orientală nord-americană", "CLST": "Ora de vară din Chile", "MEZ": "Ora standard a Europei Centrale", "LHST": "Ora standard din Lord Howe", "AEST": "Ora standard a Australiei Orientale", "PDT": "Ora de vară în zona Pacific nord-americană", "HNT": "Ora standard din Newfoundland", "ART": "Ora standard a Argentinei", "ADT": "Ora de vară în zona Atlantic nord-americană", "GMT": "Ora de Greenwhich", "JST": "Ora standard a Japoniei", "WARST": "Ora de vară a Argentinei Occidentale", "AWST": "Ora standard a Australiei Occidentale", "VET": "Ora Venezuelei", "WAST": "Ora de vară a Africii Occidentale", "AKDT": "Ora de vară din Alaska", "HKT": "Ora standard din Hong Kong", "LHDT": "Ora de vară din Lord Howe", "BT": "Ora Bhutanului", "WEZ": "Ora standard a Europei de Vest", "PST": "Ora standard în zona Pacific nord-americană", "HNCU": "Ora standard a Cubei", "WAT": "Ora standard a Africii Occidentale", "OEZ": "Ora standard a Europei de Est", "CLT": "Ora standard din Chile", "MDT": "MDT", "HEPM": "Ora de vară din Saint-Pierre și Miquelon", "IST": "Ora Indiei", "GYT": "Ora din Guyana", "AWDT": "Ora de vară a Australiei Occidentale", "CHAST": "Ora standard din Chatham", "HEPMX": "Ora de vară a zonei Pacific mexicane", "GFT": "Ora din Guyana Franceză", "TMT": "Ora standard din Turkmenistan", "WIB": "Ora Indoneziei de Vest", "EAT": "Ora Africii Orientale", "HNEG": "Ora standard a Groenlandei orientale"}, - } - } -  -diff --git a/ro_MD/ro_MD.go b/ro_MD/ro_MD.go -index 1d1cbbc..8c102a7 100644 ---- a/ro_MD/ro_MD.go -+++ b/ro_MD/ro_MD.go -@@ -10,72 +10,53 @@ import ( - ) -  - type ro_MD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ro_MD' locale - func New() locales.Translator { - return &ro_MD{ -- locale: "ro_MD", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "L", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "ian.", "feb.", "mar.", "apr.", "mai", "iun.", "iul.", "aug.", "sept.", "oct.", "nov.", "dec."}, -- monthsNarrow: []string{"", "I", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie"}, -- daysAbbreviated: []string{"Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"}, -- daysNarrow: []string{"D", "L", "Ma", "Mi", "J", "V", "S"}, -- daysShort: []string{"Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"}, -- daysWide: []string{"duminică", "luni", "marți", "miercuri", "joi", "vineri", "sâmbătă"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"", ""}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"SGT": "Ora din Singapore", "MST": "MST", "WESZ": "Ora de vară a Europei de Vest", "HECU": "Ora de vară a Cubei", "AST": "Ora standard în zona Atlantic nord-americană", "MEZ": "Ora standard a Europei Centrale", "EST": "Ora standard orientală nord-americană", "HNPM": "Ora standard din Saint-Pierre și Miquelon", "NZDT": "Ora de vară a Noii Zeelande", "JDT": "Ora de vară a Japoniei", "WAT": "Ora standard a Africii Occidentale", "HADT": "Ora de vară din Hawaii-Aleutine", "SRT": "Ora Surinamului", "WEZ": "Ora standard a Europei de Vest", "HKST": "Ora de vară din Hong Kong", "BT": "Ora Bhutanului", "MDT": "MDT", "CDT": "Ora de vară centrală nord-americană", "WIB": "Ora Indoneziei de Vest", "VET": "Ora Venezuelei", "PDT": "Ora de vară în zona Pacific nord-americană", "AEST": "Ora standard a Australiei Orientale", "∅∅∅": "Ora de vară a Amazonului", "WARST": "Ora de vară a Argentinei Occidentale", "CST": "Ora standard centrală nord-americană", "HKT": "Ora standard din Hong Kong", "HEPM": "Ora de vară din Saint-Pierre și Miquelon", "LHDT": "Ora de vară din Lord Howe", "NZST": "Ora standard a Noii Zeelande", "TMST": "Ora de vară din Turkmenistan", "ACDT": "Ora de vară a Australiei Centrale", "AKDT": "Ora de vară din Alaska", "GYT": "Ora din Guyana", "ARST": "Ora de vară a Argentinei", "HNOG": "Ora standard a Groenlandei occidentale", "AWST": "Ora standard a Australiei Occidentale", "WITA": "Ora Indoneziei Centrale", "IST": "Ora Indiei", "HEEG": "Ora de vară a Groenlandei orientale", "HEPMX": "Ora de vară a zonei Pacific mexicane", "ACWST": "Ora standard a Australiei Central Occidentale", "HEOG": "Ora de vară a Groenlandei occidentale", "JST": "Ora standard a Japoniei", "AKST": "Ora standard din Alaska", "PST": "Ora standard în zona Pacific nord-americană", "CLST": "Ora de vară din Chile", "ECT": "Ora Ecuadorului", "CAT": "Ora Africii Centrale", "COT": "Ora standard a Columbiei", "WART": "Ora standard a Argentinei Occidentale", "UYST": "Ora de vară a Uruguayului", "ACWDT": "Ora de vară a Australiei Central Occidentale", "CLT": "Ora standard din Chile", "HNEG": "Ora standard a Groenlandei orientale", "TMT": "Ora standard din Turkmenistan", "WAST": "Ora de vară a Africii Occidentale", "CHAST": "Ora standard din Chatham", "SAST": "Ora Africii Meridionale", "ACST": "Ora standard a Australiei Centrale", "HAST": "Ora standard din Hawaii-Aleutine", "HNT": "Ora standard din Newfoundland", "AWDT": "Ora de vară a Australiei Occidentale", "OEZ": "Ora standard a Europei de Est", "COST": "Ora de vară a Columbiei", "GMT": "Ora de Greenwhich", "HNPMX": "Ora standard a zonei Pacific mexicane", "HAT": "Ora de vară din Newfoundland", "ChST": "Ora din Chamorro", "EAT": "Ora Africii Orientale", "OESZ": "Ora de vară a Europei de Est", "HNNOMX": "Ora standard a Mexicului de nord-vest", "HENOMX": "Ora de vară a Mexicului de nord-vest", "ADT": "Ora de vară în zona Atlantic nord-americană", "MYT": "Ora din Malaysia", "MESZ": "Ora de vară a Europei Centrale", "BOT": "Ora Boliviei", "EDT": "Ora de vară orientală nord-americană", "UYT": "Ora standard a Uruguayului", "WIT": "Ora Indoneziei de Est", "ART": "Ora standard a Argentinei", "AEDT": "Ora de vară a Australiei Orientale", "GFT": "Ora din Guyana Franceză", "HNCU": "Ora standard a Cubei", "LHST": "Ora standard din Lord Howe", "CHADT": "Ora de vară din Chatham"}, -+ locale: "ro_MD", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "L", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ daysAbbreviated: []string{"Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm"}, -+ daysNarrow: []string{"D", "L", "Ma", "Mi", "J", "V", "S"}, -+ daysShort: []string{"Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"", ""}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"", ""}, -+ timezones: map[string]string{"COT": "COT", "NZDT": "NZDT", "MDT": "MDT", "IST": "IST", "OESZ": "OESZ", "GYT": "GYT", "ACST": "ACST", "AWST": "AWST", "JST": "JST", "AWDT": "AWDT", "UYT": "UYT", "PDT": "PDT", "AKDT": "AKDT", "GFT": "GFT", "HNOG": "HNOG", "HEPM": "HEPM", "VET": "VET", "WAST": "WAST", "HAT": "HAT", "CST": "CST", "EST": "EST", "ChST": "ChST", "EAT": "EAT", "MEZ": "MEZ", "HNPM": "HNPM", "HNT": "HNT", "HEOG": "HEOG", "WITA": "WITA", "ARST": "ARST", "AEST": "AEST", "SGT": "SGT", "WIT": "WIT", "CLT": "CLT", "BOT": "BOT", "CAT": "CAT", "NZST": "NZST", "ECT": "ECT", "ART": "ART", "HNCU": "HNCU", "HEPMX": "HEPMX", "OEZ": "OEZ", "TMST": "TMST", "AEDT": "AEDT", "SAST": "SAST", "CDT": "CDT", "PST": "PST", "GMT": "GMT", "HENOMX": "HENOMX", "MYT": "MYT", "LHST": "LHST", "UYST": "UYST", "TMT": "TMT", "HKST": "HKST", "MST": "MST", "ACWDT": "ACWDT", "BT": "BT", "HECU": "HECU", "AST": "AST", "MESZ": "MESZ", "LHDT": "LHDT", "EDT": "EDT", "ADT": "ADT", "SRT": "SRT", "HNPMX": "HNPMX", "WESZ": "WESZ", "WARST": "WARST", "COST": "COST", "CHADT": "CHADT", "WEZ": "WEZ", "WART": "WART", "HKT": "HKT", "HNEG": "HNEG", "HADT": "HADT", "HNNOMX": "HNNOMX", "WAT": "WAT", "AKST": "AKST", "CLST": "CLST", "WIB": "WIB", "JDT": "JDT", "ACWST": "ACWST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "HAST": "HAST", "HEEG": "HEEG", "ACDT": "ACDT"}, - } - } -  -@@ -158,7 +139,7 @@ func (ro *ro_MD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ro *ro_MD) MonthsAbbreviated() []string { -- return ro.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -168,7 +149,7 @@ func (ro *ro_MD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ro *ro_MD) MonthsNarrow() []string { -- return ro.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -178,7 +159,7 @@ func (ro *ro_MD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ro *ro_MD) MonthsWide() []string { -- return ro.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -224,75 +205,13 @@ func (ro *ro_MD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ro_MD' and handles both Whole and Real numbers based on 'v' - func (ro *ro_MD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ro.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ro.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ro_MD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ro *ro_MD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ro.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ro.percentSuffix...) -- -- b = append(b, ro.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ro_MD' -@@ -300,56 +219,7 @@ func (ro *ro_MD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ro.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ro.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ro.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ro.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ro.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ro_MD' -@@ -358,63 +228,7 @@ func (ro *ro_MD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ro.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ro.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ro.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ro.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ro.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ro.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ro_MD' -@@ -422,27 +236,6 @@ func (ro *ro_MD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +244,6 @@ func (ro *ro_MD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ro.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,17 +252,6 @@ func (ro *ro_MD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ro.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,19 +260,6 @@ func (ro *ro_MD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ro.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ro.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -510,19 +268,6 @@ func (ro *ro_MD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -531,26 +276,6 @@ func (ro *ro_MD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -559,30 +284,6 @@ func (ro *ro_MD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -591,34 +292,5 @@ func (ro *ro_MD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ro.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ro_RO/ro_RO.go b/ro_RO/ro_RO.go -index f197e5c..9d60ea9 100644 ---- a/ro_RO/ro_RO.go -+++ b/ro_RO/ro_RO.go -@@ -10,72 +10,45 @@ import ( - ) -  - type ro_RO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ro_RO' locale - func New() locales.Translator { - return &ro_RO{ -- locale: "ro_RO", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "ian.", "feb.", "mar.", "apr.", "mai", "iun.", "iul.", "aug.", "sept.", "oct.", "nov.", "dec."}, -- monthsNarrow: []string{"", "I", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie"}, -- daysAbbreviated: []string{"dum.", "lun.", "mar.", "mie.", "joi", "vin.", "sâm."}, -- daysNarrow: []string{"D", "L", "M", "M", "J", "V", "S"}, -- daysShort: []string{"du.", "lu.", "ma.", "mi.", "joi", "vi.", "sâ."}, -- daysWide: []string{"duminică", "luni", "marți", "miercuri", "joi", "vineri", "sâmbătă"}, -- periodsAbbreviated: []string{"a.m.", "p.m."}, -- periodsNarrow: []string{"a.m.", "p.m."}, -- periodsWide: []string{"a.m.", "p.m."}, -- erasAbbreviated: []string{"î.Hr.", "d.Hr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"înainte de Hristos", "după Hristos"}, -- timezones: map[string]string{"HKST": "Ora de vară din Hong Kong", "HNPMX": "Ora standard a zonei Pacific mexicane", "ARST": "Ora de vară a Argentinei", "HNOG": "Ora standard a Groenlandei occidentale", "ACWDT": "Ora de vară a Australiei Central Occidentale", "CHADT": "Ora de vară din Chatham", "CST": "Ora standard centrală nord-americană", "JDT": "Ora de vară a Japoniei", "ChST": "Ora din Chamorro", "HNEG": "Ora standard a Groenlandei orientale", "WAST": "Ora de vară a Africii Occidentale", "HADT": "Ora de vară din Hawaii-Aleutine", "GYT": "Ora din Guyana", "MYT": "Ora din Malaysia", "TMT": "Ora standard din Turkmenistan", "OESZ": "Ora de vară a Europei de Est", "COST": "Ora de vară a Columbiei", "HEPMX": "Ora de vară a zonei Pacific mexicane", "ACWST": "Ora standard a Australiei Central Occidentale", "HEPM": "Ora de vară din Saint-Pierre și Miquelon", "JST": "Ora standard a Japoniei", "CLST": "Ora de vară din Chile", "BOT": "Ora Boliviei", "EDT": "Ora de vară orientală nord-americană", "UYT": "Ora standard a Uruguayului", "MEZ": "Ora standard a Europei Centrale", "MST": "MST", "∅∅∅": "Ora de vară din Azore", "ADT": "Ora de vară în zona Atlantic nord-americană", "UYST": "Ora de vară a Uruguayului", "CDT": "Ora de vară centrală nord-americană", "HNPM": "Ora standard din Saint-Pierre și Miquelon", "LHDT": "Ora de vară din Lord Howe", "WART": "Ora standard a Argentinei Occidentale", "AWST": "Ora standard a Australiei Occidentale", "AKDT": "Ora de vară din Alaska", "HAST": "Ora standard din Hawaii-Aleutine", "HEOG": "Ora de vară a Groenlandei occidentale", "HKT": "Ora standard din Hong Kong", "EAT": "Ora Africii Orientale", "GMT": "Ora de Greenwhich", "WIT": "Ora Indoneziei de Est", "BT": "Ora Bhutanului", "PST": "Ora standard în zona Pacific nord-americană", "WESZ": "Ora de vară a Europei de Vest", "NZST": "Ora standard a Noii Zeelande", "HEEG": "Ora de vară a Groenlandei orientale", "GFT": "Ora din Guyana Franceză", "WIB": "Ora Indoneziei de Vest", "ACDT": "Ora de vară a Australiei Centrale", "COT": "Ora standard a Columbiei", "HNNOMX": "Ora standard a Mexicului de nord-vest", "SGT": "Ora din Singapore", "SRT": "Ora Surinamului", "WEZ": "Ora standard a Europei de Vest", "HAT": "Ora de vară din Newfoundland", "AWDT": "Ora de vară a Australiei Occidentale", "WARST": "Ora de vară a Argentinei Occidentale", "ACST": "Ora standard a Australiei Centrale", "CAT": "Ora Africii Centrale", "OEZ": "Ora standard a Europei de Est", "MESZ": "Ora de vară a Europei Centrale", "LHST": "Ora standard din Lord Howe", "SAST": "Ora Africii Meridionale", "MDT": "MDT", "ART": "Ora standard a Argentinei", "AEST": "Ora standard a Australiei Orientale", "WITA": "Ora Indoneziei Centrale", "CHAST": "Ora standard din Chatham", "IST": "Ora Indiei", "AKST": "Ora standard din Alaska", "HECU": "Ora de vară a Cubei", "NZDT": "Ora de vară a Noii Zeelande", "CLT": "Ora standard din Chile", "ECT": "Ora Ecuadorului", "WAT": "Ora standard a Africii Occidentale", "HNCU": "Ora standard a Cubei", "AST": "Ora standard în zona Atlantic nord-americană", "VET": "Ora Venezuelei", "HENOMX": "Ora de vară a Mexicului de nord-vest", "PDT": "Ora de vară în zona Pacific nord-americană", "HNT": "Ora standard din Newfoundland", "AEDT": "Ora de vară a Australiei Orientale", "TMST": "Ora de vară din Turkmenistan", "EST": "Ora standard orientală nord-americană"}, -+ locale: "ro_RO", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"JST": "JST", "AEDT": "AEDT", "WESZ": "WESZ", "HAT": "HAT", "WARST": "WARST", "ADT": "ADT", "ChST": "ChST", "ACST": "ACST", "GYT": "GYT", "COT": "COT", "CLST": "CLST", "CDT": "CDT", "MEZ": "MEZ", "HNEG": "HNEG", "AWDT": "AWDT", "MYT": "MYT", "WEZ": "WEZ", "EST": "EST", "MST": "MST", "ACWDT": "ACWDT", "SGT": "SGT", "VET": "VET", "HNT": "HNT", "ARST": "ARST", "ART": "ART", "EAT": "EAT", "MESZ": "MESZ", "AWST": "AWST", "ACWST": "ACWST", "BT": "BT", "AKDT": "AKDT", "NZST": "NZST", "LHDT": "LHDT", "AEST": "AEST", "WART": "WART", "HKST": "HKST", "HADT": "HADT", "HKT": "HKT", "HNPM": "HNPM", "TMST": "TMST", "CAT": "CAT", "WITA": "WITA", "HENOMX": "HENOMX", "NZDT": "NZDT", "JDT": "JDT", "PDT": "PDT", "HNCU": "HNCU", "WIT": "WIT", "WIB": "WIB", "GMT": "GMT", "SAST": "SAST", "CLT": "CLT", "CST": "CST", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "ECT": "ECT", "CHAST": "CHAST", "HECU": "HECU", "ACDT": "ACDT", "LHST": "LHST", "UYT": "UYT", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "BOT": "BOT", "SRT": "SRT", "CHADT": "CHADT", "HNPMX": "HNPMX", "WAT": "WAT", "GFT": "GFT", "HNOG": "HNOG", "AST": "AST", "HEOG": "HEOG", "PST": "PST", "OESZ": "OESZ", "TMT": "TMT", "HAST": "HAST", "HEPM": "HEPM", "UYST": "UYST", "IST": "IST", "WAST": "WAST", "AKST": "AKST", "COST": "COST", "EDT": "EDT", "MDT": "MDT"}, - } - } -  -@@ -158,7 +131,7 @@ func (ro *ro_RO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ro *ro_RO) MonthsAbbreviated() []string { -- return ro.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -168,7 +141,7 @@ func (ro *ro_RO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ro *ro_RO) MonthsNarrow() []string { -- return ro.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -178,7 +151,7 @@ func (ro *ro_RO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ro *ro_RO) MonthsWide() []string { -- return ro.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -224,75 +197,13 @@ func (ro *ro_RO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ro_RO' and handles both Whole and Real numbers based on 'v' - func (ro *ro_RO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ro.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ro.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ro_RO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ro *ro_RO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ro.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ro.percentSuffix...) -- -- b = append(b, ro.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ro_RO' -@@ -300,56 +211,7 @@ func (ro *ro_RO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ro.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ro.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ro.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ro.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ro.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ro_RO' -@@ -358,63 +220,7 @@ func (ro *ro_RO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ro.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ro.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ro.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ro.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ro.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ro.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ro.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ro_RO' -@@ -422,27 +228,6 @@ func (ro *ro_RO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +236,6 @@ func (ro *ro_RO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ro.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,17 +244,6 @@ func (ro *ro_RO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ro.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,19 +252,6 @@ func (ro *ro_RO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ro.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ro.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -510,19 +260,6 @@ func (ro *ro_RO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -531,26 +268,6 @@ func (ro *ro_RO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -559,30 +276,6 @@ func (ro *ro_RO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -591,34 +284,5 @@ func (ro *ro_RO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ro.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ro.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/rof/rof.go b/rof/rof.go -index f9c5c2b..f410366 100644 ---- a/rof/rof.go -+++ b/rof/rof.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KM", "BM"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Mayesu", "Baada ya Mayesu"}, -- timezones: map[string]string{"HNPM": "HNPM", "HNEG": "HNEG", "IST": "IST", "ECT": "ECT", "AKDT": "AKDT", "ACDT": "ACDT", "SGT": "SGT", "ADT": "ADT", "WIB": "WIB", "WIT": "WIT", "WEZ": "WEZ", "SAST": "SAST", "TMST": "TMST", "EST": "EST", "HNPMX": "HNPMX", "HECU": "HECU", "ACWDT": "ACWDT", "CHADT": "CHADT", "HEEG": "HEEG", "GFT": "GFT", "ACST": "ACST", "WART": "WART", "HADT": "HADT", "HAT": "HAT", "AEDT": "AEDT", "ChST": "ChST", "WARST": "WARST", "HENOMX": "HENOMX", "CST": "CST", "WAT": "WAT", "ART": "ART", "ARST": "ARST", "WITA": "WITA", "MEZ": "MEZ", "CLT": "CLT", "∅∅∅": "∅∅∅", "UYT": "UYT", "PST": "PST", "HNT": "HNT", "HKST": "HKST", "NZST": "NZST", "COT": "COT", "COST": "COST", "OESZ": "OESZ", "MST": "MST", "HEPM": "HEPM", "CHAST": "CHAST", "JST": "JST", "JDT": "JDT", "BOT": "BOT", "CAT": "CAT", "HEPMX": "HEPMX", "UYST": "UYST", "CDT": "CDT", "GYT": "GYT", "BT": "BT", "LHDT": "LHDT", "EAT": "EAT", "AKST": "AKST", "AST": "AST", "WESZ": "WESZ", "HNOG": "HNOG", "AWST": "AWST", "MESZ": "MESZ", "CLST": "CLST", "OEZ": "OEZ", "LHST": "LHST", "GMT": "GMT", "AWDT": "AWDT", "HKT": "HKT", "AEST": "AEST", "HNNOMX": "HNNOMX", "HAST": "HAST", "PDT": "PDT", "ACWST": "ACWST", "HNCU": "HNCU", "EDT": "EDT", "VET": "VET", "SRT": "SRT", "HEOG": "HEOG", "NZDT": "NZDT", "TMT": "TMT", "WAST": "WAST", "MDT": "MDT", "MYT": "MYT"}, -+ timezones: map[string]string{"AST": "AST", "MST": "MST", "SRT": "SRT", "HNNOMX": "HNNOMX", "ACST": "ACST", "HEPMX": "HEPMX", "WAST": "WAST", "WITA": "WITA", "ADT": "ADT", "GMT": "GMT", "AWST": "AWST", "PST": "PST", "HAT": "HAT", "TMT": "TMT", "WIB": "WIB", "CST": "CST", "ARST": "ARST", "EAT": "EAT", "AEST": "AEST", "UYT": "UYT", "HECU": "HECU", "WEZ": "WEZ", "WARST": "WARST", "ChST": "ChST", "WIT": "WIT", "HADT": "HADT", "HENOMX": "HENOMX", "HNEG": "HNEG", "HEPM": "HEPM", "JDT": "JDT", "LHST": "LHST", "∅∅∅": "∅∅∅", "GYT": "GYT", "COST": "COST", "CLT": "CLT", "JST": "JST", "OESZ": "OESZ", "UYST": "UYST", "AKDT": "AKDT", "GFT": "GFT", "MDT": "MDT", "HAST": "HAST", "AEDT": "AEDT", "HNCU": "HNCU", "VET": "VET", "HKST": "HKST", "ECT": "ECT", "HNT": "HNT", "CAT": "CAT", "IST": "IST", "HNOG": "HNOG", "EDT": "EDT", "MEZ": "MEZ", "OEZ": "OEZ", "HEOG": "HEOG", "COT": "COT", "EST": "EST", "NZDT": "NZDT", "CHAST": "CHAST", "NZST": "NZST", "ART": "ART", "HNPM": "HNPM", "HNPMX": "HNPMX", "WAT": "WAT", "CLST": "CLST", "WESZ": "WESZ", "AKST": "AKST", "TMST": "TMST", "MESZ": "MESZ", "HEEG": "HEEG", "ACWST": "ACWST", "ACWDT": "ACWDT", "BT": "BT", "SAST": "SAST", "HKT": "HKT", "CDT": "CDT", "LHDT": "LHDT", "MYT": "MYT", "PDT": "PDT", "WART": "WART", "BOT": "BOT", "ACDT": "ACDT", "AWDT": "AWDT", "CHADT": "CHADT", "SGT": "SGT"}, - } - } -  -diff --git a/rof_TZ/rof_TZ.go b/rof_TZ/rof_TZ.go -index e15459f..bad813c 100644 ---- a/rof_TZ/rof_TZ.go -+++ b/rof_TZ/rof_TZ.go -@@ -42,24 +42,13 @@ type rof_TZ struct { - // New returns a new instance of translator for the 'rof_TZ' locale - func New() locales.Translator { - return &rof_TZ{ -- locale: "rof_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "M1", "M2", "M3", "M4", "M5", "M6", "M7", "M8", "M9", "M10", "M11", "M12"}, -- monthsNarrow: []string{"", "K", "K", "K", "K", "T", "S", "S", "N", "T", "I", "I", "I"}, -- monthsWide: []string{"", "Mweri wa kwanza", "Mweri wa kaili", "Mweri wa katatu", "Mweri wa kaana", "Mweri wa tanu", "Mweri wa sita", "Mweri wa saba", "Mweri wa nane", "Mweri wa tisa", "Mweri wa ikumi", "Mweri wa ikumi na moja", "Mweri wa ikumi na mbili"}, -- daysAbbreviated: []string{"Ijp", "Ijt", "Ijn", "Ijtn", "Alh", "Iju", "Ijm"}, -- daysNarrow: []string{"2", "3", "4", "5", "6", "7", "1"}, -- daysWide: []string{"Ijumapili", "Ijumatatu", "Ijumanne", "Ijumatano", "Alhamisi", "Ijumaa", "Ijumamosi"}, -- periodsAbbreviated: []string{"kang’ama", "kingoto"}, -- periodsWide: []string{"kang’ama", "kingoto"}, -- erasAbbreviated: []string{"KM", "BM"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Mayesu", "Baada ya Mayesu"}, -- timezones: map[string]string{"CST": "CST", "WIB": "WIB", "HEOG": "HEOG", "AKST": "AKST", "MYT": "MYT", "LHST": "LHST", "CHAST": "CHAST", "SAST": "SAST", "WAST": "WAST", "WART": "WART", "HEPMX": "HEPMX", "HNT": "HNT", "HNOG": "HNOG", "NZST": "NZST", "CAT": "CAT", "HNCU": "HNCU", "WIT": "WIT", "HKST": "HKST", "NZDT": "NZDT", "WARST": "WARST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "EST": "EST", "HADT": "HADT", "HNPM": "HNPM", "WAT": "WAT", "HECU": "HECU", "MEZ": "MEZ", "CHADT": "CHADT", "COT": "COT", "GMT": "GMT", "VET": "VET", "ACWST": "ACWST", "JST": "JST", "GYT": "GYT", "BOT": "BOT", "ART": "ART", "OESZ": "OESZ", "ECT": "ECT", "ACDT": "ACDT", "EDT": "EDT", "JDT": "JDT", "SGT": "SGT", "SRT": "SRT", "WESZ": "WESZ", "HAT": "HAT", "HKT": "HKT", "IST": "IST", "OEZ": "OEZ", "MDT": "MDT", "ADT": "ADT", "PST": "PST", "PDT": "PDT", "AEDT": "AEDT", "AWST": "AWST", "WITA": "WITA", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "CLST": "CLST", "ARST": "ARST", "LHDT": "LHDT", "ChST": "ChST", "GFT": "GFT", "CDT": "CDT", "BT": "BT", "AWDT": "AWDT", "TMT": "TMT", "TMST": "TMST", "ACST": "ACST", "EAT": "EAT", "COST": "COST", "AKDT": "AKDT", "UYT": "UYT", "UYST": "UYST", "AST": "AST", "HAST": "HAST", "WEZ": "WEZ", "HEPM": "HEPM", "HEEG": "HEEG", "MST": "MST", "ACWDT": "ACWDT", "AEST": "AEST", "CLT": "CLT", "HNPMX": "HNPMX"}, -+ locale: "rof_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKST": "AKST", "HKST": "HKST", "CDT": "CDT", "ACDT": "ACDT", "HENOMX": "HENOMX", "COT": "COT", "HKT": "HKT", "PST": "PST", "UYST": "UYST", "EDT": "EDT", "HAST": "HAST", "HNEG": "HNEG", "HEEG": "HEEG", "WIT": "WIT", "NZDT": "NZDT", "EAT": "EAT", "LHDT": "LHDT", "SGT": "SGT", "HECU": "HECU", "HEOG": "HEOG", "TMT": "TMT", "CLT": "CLT", "CLST": "CLST", "VET": "VET", "NZST": "NZST", "ChST": "ChST", "JDT": "JDT", "MEZ": "MEZ", "AWDT": "AWDT", "WAT": "WAT", "OEZ": "OEZ", "GFT": "GFT", "HAT": "HAT", "CAT": "CAT", "HADT": "HADT", "HNPM": "HNPM", "AEST": "AEST", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "MYT": "MYT", "AKDT": "AKDT", "WART": "WART", "SAST": "SAST", "ECT": "ECT", "BOT": "BOT", "WESZ": "WESZ", "HEPMX": "HEPMX", "HNT": "HNT", "ADT": "ADT", "GMT": "GMT", "ACWST": "ACWST", "CHAST": "CHAST", "WEZ": "WEZ", "WAST": "WAST", "OESZ": "OESZ", "AST": "AST", "UYT": "UYT", "HNCU": "HNCU", "GYT": "GYT", "HNNOMX": "HNNOMX", "LHST": "LHST", "HEPM": "HEPM", "PDT": "PDT", "HNPMX": "HNPMX", "CST": "CST", "MST": "MST", "WIB": "WIB", "WITA": "WITA", "ART": "ART", "AWST": "AWST", "BT": "BT", "ACWDT": "ACWDT", "COST": "COST", "HNOG": "HNOG", "TMST": "TMST", "ACST": "ACST", "JST": "JST", "IST": "IST", "WARST": "WARST", "EST": "EST", "MDT": "MDT", "ARST": "ARST", "SRT": "SRT", "MESZ": "MESZ", "AEDT": "AEDT"}, - } - } -  -@@ -112,7 +101,7 @@ func (rof *rof_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (rof *rof_TZ) MonthsAbbreviated() []string { -- return rof.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (rof *rof_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (rof *rof_TZ) MonthsNarrow() []string { -- return rof.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (rof *rof_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (rof *rof_TZ) MonthsWide() []string { -- return rof.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,56 +181,7 @@ func (rof *rof_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rof.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rof.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rof.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, rof.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rof.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'rof_TZ' -@@ -250,64 +190,7 @@ func (rof *rof_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rof.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rof.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rof.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, rof.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rof.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'rof_TZ' -@@ -315,27 +198,6 @@ func (rof *rof_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +206,6 @@ func (rof *rof_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rof.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +214,6 @@ func (rof *rof_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rof.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +222,6 @@ func (rof *rof_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, rof.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rof.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +230,6 @@ func (rof *rof_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +238,6 @@ func (rof *rof_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +246,6 @@ func (rof *rof_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +254,5 @@ func (rof *rof_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rof.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := rof.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/root/root.go b/root/root.go -index 887a1db..ea336b8 100644 ---- a/root/root.go -+++ b/root/root.go -@@ -64,7 +64,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"HNT": "HNT", "SAST": "SAST", "BOT": "BOT", "WAST": "WAST", "UYT": "UYT", "AKST": "AKST", "PST": "PST", "HKT": "HKT", "HKST": "HKST", "MEZ": "MEZ", "MYT": "MYT", "WIB": "WIB", "HEOG": "HEOG", "HNNOMX": "HNNOMX", "LHST": "LHST", "CLT": "CLT", "WARST": "WARST", "PDT": "PDT", "AWDT": "AWDT", "HNEG": "HNEG", "ECT": "ECT", "ADT": "ADT", "MDT": "MDT", "VET": "VET", "EDT": "EDT", "BT": "BT", "CHAST": "CHAST", "HENOMX": "HENOMX", "WIT": "WIT", "ARST": "ARST", "CLST": "CLST", "JST": "JST", "HNPMX": "HNPMX", "AKDT": "AKDT", "AST": "AST", "MST": "MST", "HEPMX": "HEPMX", "HAT": "HAT", "ART": "ART", "NZDT": "NZDT", "HEEG": "HEEG", "TMST": "TMST", "COST": "COST", "HNCU": "HNCU", "HECU": "HECU", "CDT": "CDT", "HNPM": "HNPM", "JDT": "JDT", "HEPM": "HEPM", "OESZ": "OESZ", "COT": "COT", "GYT": "GYT", "CST": "CST", "AWST": "AWST", "ACWST": "ACWST", "MESZ": "MESZ", "GFT": "GFT", "TMT": "TMT", "EAT": "EAT", "UYST": "UYST", "HAST": "HAST", "WEZ": "WEZ", "WART": "WART", "AEDT": "AEDT", "CHADT": "CHADT", "HADT": "HADT", "HNOG": "HNOG", "WESZ": "WESZ", "AEST": "AEST", "WITA": "WITA", "EST": "EST", "IST": "IST", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "SGT": "SGT", "SRT": "SRT", "LHDT": "LHDT", "NZST": "NZST", "ACST": "ACST", "WAT": "WAT", "OEZ": "OEZ", "GMT": "GMT", "ACWDT": "ACWDT", "ChST": "ChST", "CAT": "CAT"}, -+ timezones: map[string]string{"ARST": "ARST", "HEPM": "HEPM", "UYT": "UYT", "SGT": "SGT", "EAT": "EAT", "WEZ": "WEZ", "OESZ": "OESZ", "HNT": "HNT", "HNOG": "HNOG", "ECT": "ECT", "HADT": "HADT", "MESZ": "MESZ", "ACST": "ACST", "JDT": "JDT", "PDT": "PDT", "BT": "BT", "WARST": "WARST", "MST": "MST", "WESZ": "WESZ", "WART": "WART", "TMT": "TMT", "VET": "VET", "WIT": "WIT", "HKT": "HKT", "AST": "AST", "ART": "ART", "PST": "PST", "ACWST": "ACWST", "ACWDT": "ACWDT", "AKDT": "AKDT", "CLT": "CLT", "MDT": "MDT", "SRT": "SRT", "GFT": "GFT", "HAT": "HAT", "CAT": "CAT", "GMT": "GMT", "AEST": "AEST", "GYT": "GYT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "LHDT": "LHDT", "IST": "IST", "UYST": "UYST", "HNPMX": "HNPMX", "WAT": "WAT", "CDT": "CDT", "MEZ": "MEZ", "AWST": "AWST", "AEDT": "AEDT", "HNCU": "HNCU", "EDT": "EDT", "WITA": "WITA", "NZDT": "NZDT", "HEEG": "HEEG", "AWDT": "AWDT", "WAST": "WAST", "COT": "COT", "TMST": "TMST", "WIB": "WIB", "ChST": "ChST", "ACDT": "ACDT", "CHADT": "CHADT", "NZST": "NZST", "HAST": "HAST", "LHST": "LHST", "AKST": "AKST", "COST": "COST", "EST": "EST", "CLST": "CLST", "CHAST": "CHAST", "OEZ": "OEZ", "SAST": "SAST", "HEOG": "HEOG", "HNEG": "HNEG", "MYT": "MYT", "HECU": "HECU", "HKST": "HKST", "ADT": "ADT", "BOT": "BOT", "HNPM": "HNPM", "JST": "JST", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "CST": "CST"}, - } - } -  -diff --git a/ru/ru.go b/ru/ru.go -index 1c5126c..cad4e14 100644 ---- a/ru/ru.go -+++ b/ru/ru.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"до н. э.", "н. э."}, - erasNarrow: []string{"до н.э.", "н.э."}, - erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"COST": "Колумбия, летнее время", "AKST": "Аляска, стандартное время", "AST": "Атлантическое стандартное время", "ARST": "Аргентина, летнее время", "WITA": "Центральная Индонезия", "EAT": "Восточная Африка", "WEZ": "Западная Европа, стандартное время", "WESZ": "Западная Европа, летнее время", "HEOG": "Западная Гренландия, летнее время", "NZST": "Новая Зеландия, стандартное время", "ChST": "Чаморро", "PST": "Тихоокеанское стандартное время", "UYST": "Уругвай, летнее время", "HEPMX": "Тихоокеанское мексиканское летнее время", "OESZ": "Восточная Европа, летнее время", "WART": "Западная Аргентина, стандартное время", "GMT": "Среднее время по Гринвичу", "AWST": "Западная Австралия, стандартное время", "JST": "Япония, стандартное время", "WAST": "Западная Африка, летнее время", "HAST": "Гавайско-алеутское стандартное время", "CLST": "Чили, летнее время", "HNEG": "Восточная Гренландия, стандарное время", "HECU": "Куба, летнее время", "SGT": "Сингапур", "VET": "Венесуэла", "HNOG": "Западная Гренландия, стандартное время", "HEPM": "Сен-Пьер и Микелон, летнее время", "HENOMX": "Северо-западное мексиканское летнее время", "HNT": "Ньюфаундленд, стандартное время", "AEST": "Восточная Австралия, стандартное время", "AEDT": "Восточная Австралия, летнее время", "CLT": "Чили, стандартное время", "WAT": "Западная Африка, стандартное время", "HNPM": "Сен-Пьер и Микелон, стандартное время", "TMT": "Туркмения, стандартное время", "SRT": "Суринам", "ACWST": "Центральная Австралия, западное стандартное время", "HKT": "Гонконг, стандартное время", "MEZ": "Центральная Европа, стандартное время", "HNCU": "Куба, стандартное время", "BT": "Бутан", "BOT": "Боливия", "ACDT": "Центральная Австралия, летнее время", "HNPMX": "Тихоокеанское мексиканское стандартное время", "COT": "Колумбия, стандартное время", "EST": "Восточная Америка, стандартное время", "WIB": "Западная Индонезия", "WIT": "Восточная Индонезия", "LHST": "Лорд-Хау, стандартное время", "LHDT": "Лорд-Хау, летнее время", "IST": "Индия", "∅∅∅": "Перу, летнее время", "ACST": "Центральная Австралия, стандартное время", "JDT": "Япония, летнее время", "WARST": "Западная Аргентина, летнее время", "CDT": "Центральная Америка, летнее время", "MYT": "Малайзия", "MESZ": "Центральная Европа, летнее время", "ECT": "Эквадор", "CST": "Центральная Америка, стандартное время", "UYT": "Уругвай, стандартное время", "PDT": "Тихоокеанское летнее время", "TMST": "Туркмения, летнее время", "AKDT": "Аляска, летнее время", "ADT": "Атлантическое летнее время", "HAT": "Ньюфаундленд, летнее время", "AWDT": "Западная Австралия, летнее время", "HKST": "Гонконг, летнее время", "HEEG": "Восточная Гренландия, летнее время", "MDT": "Макао, летнее время", "OEZ": "Восточная Европа, стандартное время", "HNNOMX": "Северо-западное мексиканское стандартное время", "EDT": "Восточная Америка, летнее время", "MST": "Макао, стандартное время", "GYT": "Гайана", "HADT": "Гавайско-алеутское летнее время", "ACWDT": "Центральная Австралия, западное летнее время", "CAT": "Центральная Африка", "NZDT": "Новая Зеландия, летнее время", "CHAST": "Чатем, стандартное время", "CHADT": "Чатем, летнее время", "SAST": "Южная Африка", "GFT": "Французская Гвиана", "ART": "Аргентина, стандартное время"}, -+ timezones: map[string]string{"AEST": "Восточная Австралия, стандартное время", "HEOG": "Западная Гренландия, летнее время", "NZST": "Новая Зеландия, стандартное время", "BOT": "Боливия", "LHDT": "Лорд-Хау, летнее время", "ACWDT": "Центральная Австралия, западное летнее время", "WARST": "Западная Аргентина, летнее время", "WIT": "Восточная Индонезия", "TMT": "Туркмения, стандартное время", "AST": "Атлантическое стандартное время", "COST": "Колумбия, летнее время", "HEPM": "Сен-Пьер и Микелон, летнее время", "CST": "Центральная Америка, стандартное время", "GMT": "Среднее время по Гринвичу", "HNPM": "Сен-Пьер и Микелон, стандартное время", "WAST": "Западная Африка, летнее время", "COT": "Колумбия, стандартное время", "NZDT": "Новая Зеландия, летнее время", "HNEG": "Восточная Гренландия, стандарное время", "EDT": "Восточная Америка, летнее время", "CLT": "Чили, стандартное время", "JDT": "Япония, летнее время", "UYT": "Уругвай, стандартное время", "PDT": "Тихоокеанское летнее время", "HNPMX": "Тихоокеанское мексиканское стандартное время", "CAT": "Центральная Африка", "CLST": "Чили, летнее время", "WITA": "Центральная Индонезия", "ARST": "Аргентина, летнее время", "SRT": "Суринам", "HAST": "Гавайско-алеутское стандартное время", "UYST": "Уругвай, летнее время", "CHAST": "Чатем, стандартное время", "GYT": "Гайана", "AWST": "Западная Австралия, стандартное время", "LHST": "Лорд-Хау, стандартное время", "∅∅∅": "Акри летнее время", "ACWST": "Центральная Австралия, западное стандартное время", "CDT": "Центральная Америка, летнее время", "MEZ": "Центральная Европа, стандартное время", "IST": "Индия", "WESZ": "Западная Европа, летнее время", "HNCU": "Куба, стандартное время", "HECU": "Куба, летнее время", "HEPMX": "Тихоокеанское мексиканское летнее время", "HNT": "Ньюфаундленд, стандартное время", "HAT": "Ньюфаундленд, летнее время", "MYT": "Малайзия", "PST": "Тихоокеанское стандартное время", "AKST": "Аляска, стандартное время", "MDT": "Макао, летнее время", "WIB": "Западная Индонезия", "ART": "Аргентина, стандартное время", "HADT": "Гавайско-алеутское летнее время", "HENOMX": "Северо-западное мексиканское летнее время", "BT": "Бутан", "AEDT": "Восточная Австралия, летнее время", "OEZ": "Восточная Европа, стандартное время", "OESZ": "Восточная Европа, летнее время", "EST": "Восточная Америка, стандартное время", "MST": "Макао, стандартное время", "CHADT": "Чатем, летнее время", "WEZ": "Западная Европа, стандартное время", "VET": "Венесуэла", "AKDT": "Аляска, летнее время", "ECT": "Эквадор", "ADT": "Атлантическое летнее время", "HEEG": "Восточная Гренландия, летнее время", "AWDT": "Западная Австралия, летнее время", "JST": "Япония, стандартное время", "HNOG": "Западная Гренландия, стандартное время", "ACDT": "Центральная Австралия, летнее время", "WAT": "Западная Африка, стандартное время", "WART": "Западная Аргентина, стандартное время", "SAST": "Южная Африка", "HKT": "Гонконг, стандартное время", "HKST": "Гонконг, летнее время", "TMST": "Туркмения, летнее время", "ChST": "Чаморро", "EAT": "Восточная Африка", "MESZ": "Центральная Европа, летнее время", "HNNOMX": "Северо-западное мексиканское стандартное время", "SGT": "Сингапур", "GFT": "Французская Гвиана", "ACST": "Центральная Австралия, стандартное время"}, - } - } -  -diff --git a/ru_BY/ru_BY.go b/ru_BY/ru_BY.go -index 11d4db0..9b48274 100644 ---- a/ru_BY/ru_BY.go -+++ b/ru_BY/ru_BY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ru_BY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ru_BY' locale - func New() locales.Translator { - return &ru_BY{ -- locale: "ru_BY", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "Br", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"}, -- daysAbbreviated: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysShort: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"}, -- periodsAbbreviated: []string{"ДП", "ПП"}, -- periodsNarrow: []string{"ДП", "ПП"}, -- periodsWide: []string{"ДП", "ПП"}, -- erasAbbreviated: []string{"до н. э.", "н. э."}, -- erasNarrow: []string{"до н.э.", "н.э."}, -- erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"HNCU": "Куба, стандартное время", "HEPMX": "Тихоокеанское мексиканское летнее время", "AKDT": "Аляска, летнее время", "HKST": "Гонконг, летнее время", "WIB": "Западная Индонезия", "JST": "Япония, стандартное время", "ChST": "Чаморро", "HENOMX": "Северо-западное мексиканское летнее время", "MYT": "Малайзия", "SRT": "Суринам", "HNOG": "Западная Гренландия, стандартное время", "PDT": "Тихоокеанское летнее время", "ACST": "Центральная Австралия, стандартное время", "OEZ": "Восточная Европа, стандартное время", "ECT": "Эквадор", "WARST": "Западная Аргентина, летнее время", "MEZ": "Центральная Европа, стандартное время", "GYT": "Гайана", "HNPM": "Сен-Пьер и Микелон, стандартное время", "HEPM": "Сен-Пьер и Микелон, летнее время", "MST": "Макао, стандартное время", "CST": "Центральная Америка, стандартное время", "HEOG": "Западная Гренландия, летнее время", "SAST": "Южная Африка", "CLT": "Чили, стандартное время", "COST": "Колумбия, летнее время", "EST": "Восточная Америка, стандартное время", "WIT": "Восточная Индонезия", "WESZ": "Западная Европа, летнее время", "IST": "Индия", "HEEG": "Восточная Гренландия, летнее время", "COT": "Колумбия, стандартное время", "CDT": "Центральная Америка, летнее время", "LHST": "Лорд-Хау, стандартное время", "EDT": "Восточная Америка, летнее время", "BT": "Бутан", "HAT": "Ньюфаундленд, летнее время", "ADT": "Атлантическое летнее время", "ACWST": "Центральная Австралия, западное стандартное время", "AEDT": "Восточная Австралия, летнее время", "BOT": "Боливия", "OESZ": "Восточная Европа, летнее время", "SGT": "Сингапур", "AKST": "Аляска, стандартное время", "∅∅∅": "Амазонка, летнее время", "WART": "Западная Аргентина, стандартное время", "AEST": "Восточная Австралия, стандартное время", "ACDT": "Центральная Австралия, летнее время", "HNPMX": "Тихоокеанское мексиканское стандартное время", "AWDT": "Западная Австралия, летнее время", "VET": "Венесуэла", "HNT": "Ньюфаундленд, стандартное время", "WITA": "Центральная Индонезия", "HNEG": "Восточная Гренландия, стандарное время", "TMT": "Туркмения, стандартное время", "MDT": "Макао, летнее время", "AST": "Атлантическое стандартное время", "HECU": "Куба, летнее время", "HAST": "Гавайско-алеутское стандартное время", "WEZ": "Западная Европа, стандартное время", "CHADT": "Чатем, летнее время", "EAT": "Восточная Африка", "WAT": "Западная Африка, стандартное время", "WAST": "Западная Африка, летнее время", "CAT": "Центральная Африка", "UYT": "Уругвай, стандартное время", "HADT": "Гавайско-алеутское летнее время", "NZST": "Новая Зеландия, стандартное время", "NZDT": "Новая Зеландия, летнее время", "CLST": "Чили, летнее время", "GFT": "Французская Гвиана", "AWST": "Западная Австралия, стандартное время", "HKT": "Гонконг, стандартное время", "MESZ": "Центральная Европа, летнее время", "CHAST": "Чатем, стандартное время", "HNNOMX": "Северо-западное мексиканское стандартное время", "ACWDT": "Центральная Австралия, западное летнее время", "UYST": "Уругвай, летнее время", "ART": "Аргентина, стандартное время", "ARST": "Аргентина, летнее время", "LHDT": "Лорд-Хау, летнее время", "JDT": "Япония, летнее время", "TMST": "Туркмения, летнее время", "GMT": "Среднее время по Гринвичу", "PST": "Тихоокеанское стандартное время"}, -+ locale: "ru_BY", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "Br", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "WAT": "WAT", "CLT": "CLT", "HNNOMX": "HNNOMX", "UYST": "UYST", "IST": "IST", "PDT": "PDT", "WEZ": "WEZ", "AST": "AST", "HAST": "HAST", "HECU": "HECU", "WARST": "WARST", "ARST": "ARST", "HADT": "HADT", "SGT": "SGT", "HKST": "HKST", "TMT": "TMT", "AKST": "AKST", "AKDT": "AKDT", "WITA": "WITA", "MST": "MST", "ACDT": "ACDT", "JDT": "JDT", "HAT": "HAT", "EDT": "EDT", "TMST": "TMST", "WART": "WART", "HEOG": "HEOG", "MDT": "MDT", "LHDT": "LHDT", "JST": "JST", "CHAST": "CHAST", "VET": "VET", "WIT": "WIT", "ACWDT": "ACWDT", "HNOG": "HNOG", "CLST": "CLST", "GMT": "GMT", "ChST": "ChST", "CST": "CST", "CDT": "CDT", "NZDT": "NZDT", "ACWST": "ACWST", "AEST": "AEST", "SAST": "SAST", "GYT": "GYT", "CAT": "CAT", "EAT": "EAT", "ACST": "ACST", "HEEG": "HEEG", "AWST": "AWST", "BOT": "BOT", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "OEZ": "OEZ", "MESZ": "MESZ", "HNEG": "HNEG", "HENOMX": "HENOMX", "LHST": "LHST", "MYT": "MYT", "ECT": "ECT", "ART": "ART", "HNPM": "HNPM", "AEDT": "AEDT", "GFT": "GFT", "HNT": "HNT", "COST": "COST", "COT": "COT", "HKT": "HKT", "SRT": "SRT", "WIB": "WIB", "HEPM": "HEPM", "BT": "BT", "WESZ": "WESZ", "WAST": "WAST", "NZST": "NZST", "HNPMX": "HNPMX", "OESZ": "OESZ", "EST": "EST", "MEZ": "MEZ", "AWDT": "AWDT", "CHADT": "CHADT", "UYT": "UYT", "PST": "PST", "ADT": "ADT"}, - } - } -  -@@ -100,8 +77,8 @@ func (ru *ru_BY) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -- iMod10 := i % 10 - iMod100 := i % 100 -+ iMod10 := i % 10 -  - if v == 0 && iMod10 == 1 && iMod100 != 11 { - return locales.PluralRuleOne -@@ -168,7 +145,7 @@ func (ru *ru_BY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ru *ru_BY) MonthsAbbreviated() []string { -- return ru.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -178,7 +155,7 @@ func (ru *ru_BY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ru *ru_BY) MonthsNarrow() []string { -- return ru.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -188,7 +165,7 @@ func (ru *ru_BY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ru *ru_BY) MonthsWide() []string { -- return ru.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -234,51 +211,14 @@ func (ru *ru_BY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ru_BY' and handles both Whole and Real numbers based on 'v' - func (ru *ru_BY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ru_BY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ru *ru_BY) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -310,58 +250,7 @@ func (ru *ru_BY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ru.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ru_BY' -@@ -370,65 +259,7 @@ func (ru *ru_BY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ru.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ru.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ru.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ru_BY' -@@ -436,27 +267,6 @@ func (ru *ru_BY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,20 +275,6 @@ func (ru *ru_BY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -487,20 +283,6 @@ func (ru *ru_BY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -509,22 +291,6 @@ func (ru *ru_BY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ru.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -533,15 +299,6 @@ func (ru *ru_BY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -550,22 +307,6 @@ func (ru *ru_BY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -574,26 +315,6 @@ func (ru *ru_BY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,30 +323,5 @@ func (ru *ru_BY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ru.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ru_KG/ru_KG.go b/ru_KG/ru_KG.go -index c56e104..b7dbdfb 100644 ---- a/ru_KG/ru_KG.go -+++ b/ru_KG/ru_KG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ru_KG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ru_KG' locale - func New() locales.Translator { - return &ru_KG{ -- locale: "ru_KG", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "сом", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"}, -- daysAbbreviated: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysShort: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"}, -- periodsAbbreviated: []string{"ДП", "ПП"}, -- periodsNarrow: []string{"ДП", "ПП"}, -- periodsWide: []string{"ДП", "ПП"}, -- erasAbbreviated: []string{"до н. э.", "н. э."}, -- erasNarrow: []string{"до н.э.", "н.э."}, -- erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"CAT": "Центральная Африка", "COT": "Колумбия, стандартное время", "SGT": "Сингапур", "HNOG": "Западная Гренландия, стандартное время", "PST": "Тихоокеанское стандартное время", "ChST": "Чаморро", "WARST": "Западная Аргентина, летнее время", "HECU": "Куба, летнее время", "EST": "Восточная Америка, стандартное время", "AST": "Атлантическое стандартное время", "HAST": "Гавайско-алеутское стандартное время", "ART": "Аргентина, стандартное время", "ACWST": "Центральная Австралия, западное стандартное время", "WAT": "Западная Африка, стандартное время", "HNCU": "Куба, стандартное время", "MYT": "Малайзия", "UYST": "Уругвай, летнее время", "AKDT": "Аляска, летнее время", "WIT": "Восточная Индонезия", "MEZ": "Центральная Европа, стандартное время", "JST": "Япония, стандартное время", "OEZ": "Восточная Европа, стандартное время", "HNNOMX": "Северо-западное мексиканское стандартное время", "MDT": "Макао, летнее время", "BT": "Бутан", "TMT": "Туркмения, стандартное время", "CST": "Центральная Америка, стандартное время", "AEST": "Восточная Австралия, стандартное время", "CHADT": "Чатем, летнее время", "SAST": "Южная Африка", "TMST": "Туркмения, летнее время", "COST": "Колумбия, летнее время", "ADT": "Атлантическое летнее время", "HEOG": "Западная Гренландия, летнее время", "WESZ": "Западная Европа, летнее время", "MESZ": "Центральная Европа, летнее время", "ACST": "Центральная Австралия, стандартное время", "OESZ": "Восточная Европа, летнее время", "HNPMX": "Тихоокеанское мексиканское стандартное время", "WIB": "Западная Индонезия", "ARST": "Аргентина, летнее время", "AWDT": "Западная Австралия, летнее время", "WAST": "Западная Африка, летнее время", "WEZ": "Западная Европа, стандартное время", "LHDT": "Лорд-Хау, летнее время", "HAT": "Ньюфаундленд, летнее время", "JDT": "Япония, летнее время", "ACDT": "Центральная Австралия, летнее время", "EDT": "Восточная Америка, летнее время", "GYT": "Гайана", "AKST": "Аляска, стандартное время", "CDT": "Центральная Америка, летнее время", "ACWDT": "Центральная Австралия, западное летнее время", "HNEG": "Восточная Гренландия, стандарное время", "EAT": "Восточная Африка", "HNT": "Ньюфаундленд, стандартное время", "HKT": "Гонконг, стандартное время", "HNPM": "Сен-Пьер и Микелон, стандартное время", "NZDT": "Новая Зеландия, летнее время", "GFT": "Французская Гвиана", "∅∅∅": "Перу, летнее время", "VET": "Венесуэла", "AEDT": "Восточная Австралия, летнее время", "HEPM": "Сен-Пьер и Микелон, летнее время", "LHST": "Лорд-Хау, стандартное время", "CLST": "Чили, летнее время", "HEPMX": "Тихоокеанское мексиканское летнее время", "AWST": "Западная Австралия, стандартное время", "HKST": "Гонконг, летнее время", "WITA": "Центральная Индонезия", "NZST": "Новая Зеландия, стандартное время", "CHAST": "Чатем, стандартное время", "HEEG": "Восточная Гренландия, летнее время", "GMT": "Среднее время по Гринвичу", "SRT": "Суринам", "BOT": "Боливия", "IST": "Индия", "WART": "Западная Аргентина, стандартное время", "HADT": "Гавайско-алеутское летнее время", "ECT": "Эквадор", "HENOMX": "Северо-западное мексиканское летнее время", "MST": "Макао, стандартное время", "UYT": "Уругвай, стандартное время", "PDT": "Тихоокеанское летнее время", "CLT": "Чили, стандартное время"}, -+ locale: "ru_KG", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "сом", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ECT": "ECT", "MEZ": "MEZ", "HEEG": "HEEG", "ACWDT": "ACWDT", "CAT": "CAT", "CLT": "CLT", "CHAST": "CHAST", "HNT": "HNT", "CDT": "CDT", "MDT": "MDT", "AKDT": "AKDT", "EST": "EST", "MST": "MST", "ACDT": "ACDT", "IST": "IST", "PDT": "PDT", "BT": "BT", "HEPMX": "HEPMX", "NZST": "NZST", "WIB": "WIB", "ChST": "ChST", "HAST": "HAST", "MESZ": "MESZ", "HNPM": "HNPM", "TMT": "TMT", "ARST": "ARST", "WAST": "WAST", "HAT": "HAT", "WIT": "WIT", "AST": "AST", "SRT": "SRT", "ACWST": "ACWST", "HKST": "HKST", "HADT": "HADT", "WITA": "WITA", "CHADT": "CHADT", "SGT": "SGT", "GFT": "GFT", "COT": "COT", "TMST": "TMST", "ART": "ART", "HNEG": "HNEG", "HEPM": "HEPM", "PST": "PST", "HECU": "HECU", "NZDT": "NZDT", "UYST": "UYST", "COST": "COST", "HKT": "HKT", "EAT": "EAT", "WESZ": "WESZ", "HNCU": "HNCU", "OESZ": "OESZ", "WARST": "WARST", "CST": "CST", "WART": "WART", "HENOMX": "HENOMX", "MYT": "MYT", "WAT": "WAT", "CLST": "CLST", "OEZ": "OEZ", "SAST": "SAST", "HEOG": "HEOG", "AWST": "AWST", "AWDT": "AWDT", "JST": "JST", "JDT": "JDT", "UYT": "UYT", "ADT": "ADT", "BOT": "BOT", "AKST": "AKST", "GYT": "GYT", "EDT": "EDT", "∅∅∅": "∅∅∅", "AEST": "AEST", "WEZ": "WEZ", "VET": "VET", "HNPMX": "HNPMX", "GMT": "GMT", "HNOG": "HNOG", "ACST": "ACST", "HNNOMX": "HNNOMX", "LHST": "LHST", "LHDT": "LHDT", "AEDT": "AEDT"}, - } - } -  -@@ -168,7 +145,7 @@ func (ru *ru_KG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ru *ru_KG) MonthsAbbreviated() []string { -- return ru.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -178,7 +155,7 @@ func (ru *ru_KG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ru *ru_KG) MonthsNarrow() []string { -- return ru.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -188,7 +165,7 @@ func (ru *ru_KG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ru *ru_KG) MonthsWide() []string { -- return ru.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -234,51 +211,14 @@ func (ru *ru_KG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ru_KG' and handles both Whole and Real numbers based on 'v' - func (ru *ru_KG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ru_KG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ru *ru_KG) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -310,58 +250,7 @@ func (ru *ru_KG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ru.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ru_KG' -@@ -370,65 +259,7 @@ func (ru *ru_KG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ru.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ru.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ru.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ru_KG' -@@ -436,27 +267,6 @@ func (ru *ru_KG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,20 +275,6 @@ func (ru *ru_KG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -487,20 +283,6 @@ func (ru *ru_KG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -509,22 +291,6 @@ func (ru *ru_KG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ru.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -533,15 +299,6 @@ func (ru *ru_KG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -550,22 +307,6 @@ func (ru *ru_KG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -574,26 +315,6 @@ func (ru *ru_KG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,30 +323,5 @@ func (ru *ru_KG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ru.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ru_KZ/ru_KZ.go b/ru_KZ/ru_KZ.go -index 482dd33..ba0112a 100644 ---- a/ru_KZ/ru_KZ.go -+++ b/ru_KZ/ru_KZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ru_KZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ru_KZ' locale - func New() locales.Translator { - return &ru_KZ{ -- locale: "ru_KZ", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "₸", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"}, -- daysAbbreviated: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysShort: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"}, -- periodsAbbreviated: []string{"ДП", "ПП"}, -- periodsNarrow: []string{"ДП", "ПП"}, -- periodsWide: []string{"ДП", "ПП"}, -- erasAbbreviated: []string{"до н. э.", "н. э."}, -- erasNarrow: []string{"до н.э.", "н.э."}, -- erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"WIT": "Восточная Индонезия", "IST": "Индия", "JST": "Япония, стандартное время", "ACDT": "Центральная Австралия, летнее время", "MYT": "Малайзия", "HAST": "Гавайско-алеутское стандартное время", "VET": "Венесуэла", "CLST": "Чили, летнее время", "GFT": "Французская Гвиана", "HENOMX": "Северо-западное мексиканское летнее время", "MST": "Макао, стандартное время", "LHDT": "Лорд-Хау, летнее время", "CLT": "Чили, стандартное время", "GMT": "Среднее время по Гринвичу", "SRT": "Суринам", "WESZ": "Западная Европа, летнее время", "WARST": "Западная Аргентина, летнее время", "CHADT": "Чатем, летнее время", "ChST": "Чаморро", "BOT": "Боливия", "EAT": "Восточная Африка", "WART": "Западная Аргентина, стандартное время", "MDT": "Макао, летнее время", "ART": "Аргентина, стандартное время", "AEDT": "Восточная Австралия, летнее время", "AWDT": "Западная Австралия, летнее время", "∅∅∅": "Амазонка, летнее время", "WAT": "Западная Африка, стандартное время", "OESZ": "Восточная Европа, летнее время", "SGT": "Сингапур", "SAST": "Южная Африка", "COT": "Колумбия, стандартное время", "HNT": "Ньюфаундленд, стандартное время", "HNPM": "Сен-Пьер и Микелон, стандартное время", "NZST": "Новая Зеландия, стандартное время", "NZDT": "Новая Зеландия, летнее время", "ECT": "Эквадор", "AST": "Атлантическое стандартное время", "HEOG": "Западная Гренландия, летнее время", "LHST": "Лорд-Хау, стандартное время", "HNEG": "Восточная Гренландия, стандарное время", "ADT": "Атлантическое летнее время", "HEPM": "Сен-Пьер и Микелон, летнее время", "MEZ": "Центральная Европа, стандартное время", "CHAST": "Чатем, стандартное время", "JDT": "Япония, летнее время", "TMST": "Туркмения, летнее время", "WEZ": "Западная Европа, стандартное время", "HAT": "Ньюфаундленд, летнее время", "HEPMX": "Тихоокеанское мексиканское летнее время", "UYT": "Уругвай, стандартное время", "PST": "Тихоокеанское стандартное время", "AKST": "Аляска, стандартное время", "PDT": "Тихоокеанское летнее время", "ACWDT": "Центральная Австралия, западное летнее время", "WITA": "Центральная Индонезия", "HEEG": "Восточная Гренландия, летнее время", "ACST": "Центральная Австралия, стандартное время", "WAST": "Западная Африка, летнее время", "EDT": "Восточная Америка, летнее время", "AEST": "Восточная Австралия, стандартное время", "MESZ": "Центральная Европа, летнее время", "HNPMX": "Тихоокеанское мексиканское стандартное время", "GYT": "Гайана", "UYST": "Уругвай, летнее время", "CDT": "Центральная Америка, летнее время", "ACWST": "Центральная Австралия, западное стандартное время", "HNNOMX": "Северо-западное мексиканское стандартное время", "HNCU": "Куба, стандартное время", "HECU": "Куба, летнее время", "CST": "Центральная Америка, стандартное время", "HKT": "Гонконг, стандартное время", "TMT": "Туркмения, стандартное время", "CAT": "Центральная Африка", "COST": "Колумбия, летнее время", "EST": "Восточная Америка, стандартное время", "AWST": "Западная Австралия, стандартное время", "HKST": "Гонконг, летнее время", "AKDT": "Аляска, летнее время", "HADT": "Гавайско-алеутское летнее время", "BT": "Бутан", "HNOG": "Западная Гренландия, стандартное время", "OEZ": "Восточная Европа, стандартное время", "WIB": "Западная Индонезия", "ARST": "Аргентина, летнее время"}, -+ locale: "ru_KZ", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "₸", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "JST": "JST", "JDT": "JDT", "CHAST": "CHAST", "IST": "IST", "SRT": "SRT", "MEZ": "MEZ", "HNPM": "HNPM", "OESZ": "OESZ", "CLT": "CLT", "NZDT": "NZDT", "EAT": "EAT", "HEPM": "HEPM", "OEZ": "OEZ", "WARST": "WARST", "WITA": "WITA", "NZST": "NZST", "WESZ": "WESZ", "COT": "COT", "AKDT": "AKDT", "COST": "COST", "BOT": "BOT", "ACWDT": "ACWDT", "HNCU": "HNCU", "HAT": "HAT", "TMST": "TMST", "AWDT": "AWDT", "AEST": "AEST", "PDT": "PDT", "LHDT": "LHDT", "HNOG": "HNOG", "GYT": "GYT", "ART": "ART", "HAST": "HAST", "HADT": "HADT", "PST": "PST", "WART": "WART", "EDT": "EDT", "HKT": "HKT", "ChST": "ChST", "HNEG": "HNEG", "AWST": "AWST", "HECU": "HECU", "HNPMX": "HNPMX", "CAT": "CAT", "MST": "MST", "MESZ": "MESZ", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "GFT": "GFT", "WIT": "WIT", "HEOG": "HEOG", "CST": "CST", "ADT": "ADT", "BT": "BT", "ACDT": "ACDT", "LHST": "LHST", "ACWST": "ACWST", "HKST": "HKST", "ECT": "ECT", "CDT": "CDT", "MDT": "MDT", "SGT": "SGT", "WAT": "WAT", "AKST": "AKST", "MYT": "MYT", "UYT": "UYT", "WEZ": "WEZ", "GMT": "GMT", "HEEG": "HEEG", "WAST": "WAST", "ACST": "ACST", "VET": "VET", "HNT": "HNT", "SAST": "SAST", "EST": "EST", "WIB": "WIB", "AST": "AST", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "TMT": "TMT", "CLST": "CLST", "ARST": "ARST", "HNNOMX": "HNNOMX", "AEDT": "AEDT"}, - } - } -  -@@ -168,7 +145,7 @@ func (ru *ru_KZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ru *ru_KZ) MonthsAbbreviated() []string { -- return ru.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -178,7 +155,7 @@ func (ru *ru_KZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ru *ru_KZ) MonthsNarrow() []string { -- return ru.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -188,7 +165,7 @@ func (ru *ru_KZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ru *ru_KZ) MonthsWide() []string { -- return ru.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -234,51 +211,14 @@ func (ru *ru_KZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ru_KZ' and handles both Whole and Real numbers based on 'v' - func (ru *ru_KZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ru_KZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ru *ru_KZ) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -310,58 +250,7 @@ func (ru *ru_KZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ru.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ru_KZ' -@@ -370,65 +259,7 @@ func (ru *ru_KZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ru.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ru.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ru.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ru_KZ' -@@ -436,27 +267,6 @@ func (ru *ru_KZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,20 +275,6 @@ func (ru *ru_KZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -487,20 +283,6 @@ func (ru *ru_KZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -509,22 +291,6 @@ func (ru *ru_KZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ru.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -533,15 +299,6 @@ func (ru *ru_KZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -550,22 +307,6 @@ func (ru *ru_KZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -574,26 +315,6 @@ func (ru *ru_KZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,30 +323,5 @@ func (ru *ru_KZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ru.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ru_MD/ru_MD.go b/ru_MD/ru_MD.go -index c23b4ec..386ecaa 100644 ---- a/ru_MD/ru_MD.go -+++ b/ru_MD/ru_MD.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ru_MD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ru_MD' locale - func New() locales.Translator { - return &ru_MD{ -- locale: "ru_MD", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "L", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"}, -- daysAbbreviated: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysShort: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"}, -- periodsAbbreviated: []string{"ДП", "ПП"}, -- periodsNarrow: []string{"ДП", "ПП"}, -- periodsWide: []string{"ДП", "ПП"}, -- erasAbbreviated: []string{"до н. э.", "н. э."}, -- erasNarrow: []string{"до н.э.", "н.э."}, -- erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"ACDT": "Центральная Австралия, летнее время", "COT": "Колумбия, стандартное время", "WIB": "Западная Индонезия", "AEST": "Восточная Австралия, стандартное время", "AWST": "Западная Австралия, стандартное время", "AWDT": "Западная Австралия, летнее время", "MEZ": "Центральная Европа, стандартное время", "NZDT": "Новая Зеландия, летнее время", "CHADT": "Чатем, летнее время", "JST": "Япония, стандартное время", "WAST": "Западная Африка, летнее время", "VET": "Венесуэла", "∅∅∅": "Амазонка, летнее время", "CAT": "Центральная Африка", "WARST": "Западная Аргентина, летнее время", "HNPMX": "Тихоокеанское мексиканское стандартное время", "ARST": "Аргентина, летнее время", "HNPM": "Сен-Пьер и Микелон, стандартное время", "GMT": "Среднее время по Гринвичу", "MST": "Макао, стандартное время", "MDT": "Макао, летнее время", "ADT": "Атлантическое летнее время", "SRT": "Суринам", "WEZ": "Западная Европа, стандартное время", "CLT": "Чили, стандартное время", "SGT": "Сингапур", "HKT": "Гонконг, стандартное время", "BOT": "Боливия", "AST": "Атлантическое стандартное время", "MYT": "Малайзия", "WITA": "Центральная Индонезия", "WART": "Западная Аргентина, стандартное время", "HNCU": "Куба, стандартное время", "AKST": "Аляска, стандартное время", "LHDT": "Лорд-Хау, летнее время", "CLST": "Чили, летнее время", "OESZ": "Восточная Европа, летнее время", "HEPMX": "Тихоокеанское мексиканское летнее время", "HADT": "Гавайско-алеутское летнее время", "WIT": "Восточная Индонезия", "ART": "Аргентина, стандартное время", "WESZ": "Западная Европа, летнее время", "MESZ": "Центральная Европа, летнее время", "HEEG": "Восточная Гренландия, летнее время", "HNNOMX": "Северо-западное мексиканское стандартное время", "HNOG": "Западная Гренландия, стандартное время", "HAT": "Ньюфаундленд, летнее время", "EAT": "Восточная Африка", "GYT": "Гайана", "CST": "Центральная Америка, стандартное время", "BT": "Бутан", "PST": "Тихоокеанское стандартное время", "JDT": "Япония, летнее время", "GFT": "Французская Гвиана", "ACST": "Центральная Австралия, стандартное время", "COST": "Колумбия, летнее время", "UYT": "Уругвай, стандартное время", "AKDT": "Аляска, летнее время", "TMT": "Туркмения, стандартное время", "TMST": "Туркмения, летнее время", "HENOMX": "Северо-западное мексиканское летнее время", "ACWDT": "Центральная Австралия, западное летнее время", "HEOG": "Западная Гренландия, летнее время", "PDT": "Тихоокеанское летнее время", "AEDT": "Восточная Австралия, летнее время", "ChST": "Чаморро", "HNEG": "Восточная Гренландия, стандарное время", "HAST": "Гавайско-алеутское стандартное время", "NZST": "Новая Зеландия, стандартное время", "OEZ": "Восточная Европа, стандартное время", "EST": "Восточная Америка, стандартное время", "EDT": "Восточная Америка, летнее время", "UYST": "Уругвай, летнее время", "CDT": "Центральная Америка, летнее время", "ACWST": "Центральная Австралия, западное стандартное время", "HEPM": "Сен-Пьер и Микелон, летнее время", "CHAST": "Чатем, стандартное время", "SAST": "Южная Африка", "IST": "Индия", "ECT": "Эквадор", "WAT": "Западная Африка, стандартное время", "HECU": "Куба, летнее время", "HNT": "Ньюфаундленд, стандартное время", "HKST": "Гонконг, летнее время", "LHST": "Лорд-Хау, стандартное время"}, -+ locale: "ru_MD", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "L", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPM": "HNPM", "COT": "COT", "HKT": "HKT", "ACST": "ACST", "LHDT": "LHDT", "CHADT": "CHADT", "HECU": "HECU", "HNPMX": "HNPMX", "WARST": "WARST", "CLST": "CLST", "CDT": "CDT", "BOT": "BOT", "JST": "JST", "ADT": "ADT", "MEZ": "MEZ", "AST": "AST", "NZST": "NZST", "MESZ": "MESZ", "UYT": "UYT", "PST": "PST", "WESZ": "WESZ", "OEZ": "OEZ", "ChST": "ChST", "EAT": "EAT", "ACDT": "ACDT", "LHST": "LHST", "ACWST": "ACWST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "COST": "COST", "HEOG": "HEOG", "EST": "EST", "AWST": "AWST", "HEPM": "HEPM", "WITA": "WITA", "MST": "MST", "MDT": "MDT", "AWDT": "AWDT", "WEZ": "WEZ", "GFT": "GFT", "WIT": "WIT", "TMT": "TMT", "ARST": "ARST", "HENOMX": "HENOMX", "PDT": "PDT", "HNCU": "HNCU", "HNOG": "HNOG", "CAT": "CAT", "CLT": "CLT", "AEST": "AEST", "VET": "VET", "HNT": "HNT", "NZDT": "NZDT", "ECT": "ECT", "JDT": "JDT", "AEDT": "AEDT", "CHAST": "CHAST", "AKDT": "AKDT", "WIB": "WIB", "HADT": "HADT", "HNNOMX": "HNNOMX", "BT": "BT", "UYST": "UYST", "WAST": "WAST", "SAST": "SAST", "MYT": "MYT", "WAT": "WAT", "HAT": "HAT", "CST": "CST", "HNEG": "HNEG", "ACWDT": "ACWDT", "HAST": "HAST", "SGT": "SGT", "HKST": "HKST", "GMT": "GMT", "HEEG": "HEEG", "WART": "WART", "HEPMX": "HEPMX", "AKST": "AKST", "GYT": "GYT", "EDT": "EDT", "TMST": "TMST", "ART": "ART", "SRT": "SRT", "IST": "IST"}, - } - } -  -@@ -100,8 +77,8 @@ func (ru *ru_MD) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -- iMod100 := i % 100 - iMod10 := i % 10 -+ iMod100 := i % 100 -  - if v == 0 && iMod10 == 1 && iMod100 != 11 { - return locales.PluralRuleOne -@@ -168,7 +145,7 @@ func (ru *ru_MD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ru *ru_MD) MonthsAbbreviated() []string { -- return ru.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -178,7 +155,7 @@ func (ru *ru_MD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ru *ru_MD) MonthsNarrow() []string { -- return ru.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -188,7 +165,7 @@ func (ru *ru_MD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ru *ru_MD) MonthsWide() []string { -- return ru.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -234,51 +211,14 @@ func (ru *ru_MD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ru_MD' and handles both Whole and Real numbers based on 'v' - func (ru *ru_MD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ru_MD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ru *ru_MD) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -310,58 +250,7 @@ func (ru *ru_MD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ru.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ru_MD' -@@ -370,65 +259,7 @@ func (ru *ru_MD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ru.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ru.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ru.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ru_MD' -@@ -436,27 +267,6 @@ func (ru *ru_MD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,20 +275,6 @@ func (ru *ru_MD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -487,20 +283,6 @@ func (ru *ru_MD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -509,22 +291,6 @@ func (ru *ru_MD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ru.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -533,15 +299,6 @@ func (ru *ru_MD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -550,22 +307,6 @@ func (ru *ru_MD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -574,26 +315,6 @@ func (ru *ru_MD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,30 +323,5 @@ func (ru *ru_MD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ru.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ru_RU/ru_RU.go b/ru_RU/ru_RU.go -index 1410bd9..d1580c1 100644 ---- a/ru_RU/ru_RU.go -+++ b/ru_RU/ru_RU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ru_RU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ru_RU' locale - func New() locales.Translator { - return &ru_RU{ -- locale: "ru_RU", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"}, -- daysAbbreviated: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysShort: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"}, -- periodsAbbreviated: []string{"ДП", "ПП"}, -- periodsNarrow: []string{"ДП", "ПП"}, -- periodsWide: []string{"ДП", "ПП"}, -- erasAbbreviated: []string{"до н. э.", "н. э."}, -- erasNarrow: []string{"до н.э.", "н.э."}, -- erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"HNPMX": "Тихоокеанское мексиканское стандартное время", "HEPMX": "Тихоокеанское мексиканское летнее время", "HAST": "Гавайско-алеутское стандартное время", "HADT": "Гавайско-алеутское летнее время", "BOT": "Боливия", "COST": "Колумбия, летнее время", "GMT": "Среднее время по Гринвичу", "WITA": "Центральная Индонезия", "AEDT": "Восточная Австралия, летнее время", "JDT": "Япония, летнее время", "HENOMX": "Северо-западное мексиканское летнее время", "WARST": "Западная Аргентина, летнее время", "MDT": "Макао, летнее время", "OEZ": "Восточная Европа, стандартное время", "ECT": "Эквадор", "UYT": "Уругвай, стандартное время", "BT": "Бутан", "HNT": "Ньюфаундленд, стандартное время", "HNNOMX": "Северо-западное мексиканское стандартное время", "WART": "Западная Аргентина, стандартное время", "COT": "Колумбия, стандартное время", "CST": "Центральная Америка, стандартное время", "MYT": "Малайзия", "ARST": "Аргентина, летнее время", "AEST": "Восточная Австралия, стандартное время", "ChST": "Чаморро", "EDT": "Восточная Америка, летнее время", "HNEG": "Восточная Гренландия, стандарное время", "TMT": "Туркмения, стандартное время", "WAST": "Западная Африка, летнее время", "HNCU": "Куба, стандартное время", "HECU": "Куба, летнее время", "AKST": "Аляска, стандартное время", "AWST": "Западная Австралия, стандартное время", "HEPM": "Сен-Пьер и Микелон, летнее время", "SRT": "Суринам", "AWDT": "Западная Австралия, летнее время", "GYT": "Гайана", "HNOG": "Западная Гренландия, стандартное время", "PDT": "Тихоокеанское летнее время", "CLST": "Чили, летнее время", "AST": "Атлантическое стандартное время", "TMST": "Туркмения, летнее время", "ACST": "Центральная Австралия, стандартное время", "MESZ": "Центральная Европа, летнее время", "LHST": "Лорд-Хау, стандартное время", "LHDT": "Лорд-Хау, летнее время", "CDT": "Центральная Америка, летнее время", "WIB": "Западная Индонезия", "ACWDT": "Центральная Австралия, западное летнее время", "ART": "Аргентина, стандартное время", "WEZ": "Западная Европа, стандартное время", "IST": "Индия", "CLT": "Чили, стандартное время", "CHADT": "Чатем, летнее время", "EST": "Восточная Америка, стандартное время", "MST": "Макао, стандартное время", "VET": "Венесуэла", "HAT": "Ньюфаундленд, летнее время", "WESZ": "Западная Европа, летнее время", "HNPM": "Сен-Пьер и Микелон, стандартное время", "NZDT": "Новая Зеландия, летнее время", "ACDT": "Центральная Австралия, летнее время", "SGT": "Сингапур", "SAST": "Южная Африка", "HEEG": "Восточная Гренландия, летнее время", "GFT": "Французская Гвиана", "WAT": "Западная Африка, стандартное время", "∅∅∅": "Азорские о-ва, летнее время", "ADT": "Атлантическое летнее время", "ACWST": "Центральная Австралия, западное стандартное время", "HKST": "Гонконг, летнее время", "MEZ": "Центральная Европа, стандартное время", "CHAST": "Чатем, стандартное время", "OESZ": "Восточная Европа, летнее время", "CAT": "Центральная Африка", "WIT": "Восточная Индонезия", "HEOG": "Западная Гренландия, летнее время", "PST": "Тихоокеанское стандартное время", "HKT": "Гонконг, стандартное время", "NZST": "Новая Зеландия, стандартное время", "AKDT": "Аляска, летнее время", "UYST": "Уругвай, летнее время", "JST": "Япония, стандартное время", "EAT": "Восточная Африка"}, -+ locale: "ru_RU", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEST": "AEST", "AKDT": "AKDT", "COST": "COST", "ECT": "ECT", "HAST": "HAST", "∅∅∅": "∅∅∅", "WIB": "WIB", "ACDT": "ACDT", "HEPM": "HEPM", "AWST": "AWST", "PDT": "PDT", "WIT": "WIT", "TMT": "TMT", "CST": "CST", "ARST": "ARST", "BOT": "BOT", "UYST": "UYST", "AKST": "AKST", "MESZ": "MESZ", "HEEG": "HEEG", "AWDT": "AWDT", "WAT": "WAT", "TMST": "TMST", "CAT": "CAT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "HNEG": "HNEG", "AST": "AST", "ACWDT": "ACWDT", "GFT": "GFT", "HNOG": "HNOG", "COT": "COT", "CLT": "CLT", "CLST": "CLST", "WART": "WART", "CDT": "CDT", "ADT": "ADT", "UYT": "UYT", "IST": "IST", "OEZ": "OEZ", "WITA": "WITA", "ART": "ART", "WESZ": "WESZ", "HKT": "HKT", "EAT": "EAT", "ACST": "ACST", "HNPM": "HNPM", "HNPMX": "HNPMX", "WARST": "WARST", "GMT": "GMT", "MDT": "MDT", "HADT": "HADT", "CHAST": "CHAST", "BT": "BT", "HNCU": "HNCU", "HEPMX": "HEPMX", "SAST": "SAST", "EST": "EST", "LHST": "LHST", "CHADT": "CHADT", "SGT": "SGT", "OESZ": "OESZ", "HAT": "HAT", "NZST": "NZST", "JST": "JST", "JDT": "JDT", "ACWST": "ACWST", "AEDT": "AEDT", "WAST": "WAST", "MST": "MST", "ChST": "ChST", "HENOMX": "HENOMX", "PST": "PST", "HECU": "HECU", "HNT": "HNT", "HEOG": "HEOG", "SRT": "SRT", "MEZ": "MEZ", "VET": "VET", "LHDT": "LHDT", "MYT": "MYT", "WEZ": "WEZ", "GYT": "GYT", "EDT": "EDT", "HKST": "HKST"}, - } - } -  -@@ -100,8 +77,8 @@ func (ru *ru_RU) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -- iMod100 := i % 100 - iMod10 := i % 10 -+ iMod100 := i % 100 -  - if v == 0 && iMod10 == 1 && iMod100 != 11 { - return locales.PluralRuleOne -@@ -168,7 +145,7 @@ func (ru *ru_RU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ru *ru_RU) MonthsAbbreviated() []string { -- return ru.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -178,7 +155,7 @@ func (ru *ru_RU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ru *ru_RU) MonthsNarrow() []string { -- return ru.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -188,7 +165,7 @@ func (ru *ru_RU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ru *ru_RU) MonthsWide() []string { -- return ru.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -234,51 +211,14 @@ func (ru *ru_RU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ru_RU' and handles both Whole and Real numbers based on 'v' - func (ru *ru_RU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ru_RU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ru *ru_RU) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -310,58 +250,7 @@ func (ru *ru_RU) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ru.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ru_RU' -@@ -370,65 +259,7 @@ func (ru *ru_RU) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ru.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ru.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ru.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ru_RU' -@@ -436,27 +267,6 @@ func (ru *ru_RU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,20 +275,6 @@ func (ru *ru_RU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -487,20 +283,6 @@ func (ru *ru_RU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -509,22 +291,6 @@ func (ru *ru_RU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ru.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -533,15 +299,6 @@ func (ru *ru_RU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -550,22 +307,6 @@ func (ru *ru_RU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -574,26 +315,6 @@ func (ru *ru_RU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -602,30 +323,5 @@ func (ru *ru_RU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ru.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ru.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ru_UA/ru_UA.go b/ru_UA/ru_UA.go -index d8fff3d..1014633 100644 ---- a/ru_UA/ru_UA.go -+++ b/ru_UA/ru_UA.go -@@ -10,68 +10,48 @@ import ( - ) -  - type ru_UA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ru_UA' locale - func New() locales.Translator { - return &ru_UA{ -- locale: "ru_UA", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "янв.", "февр.", "мар.", "апр.", "мая", "июн.", "июл.", "авг.", "сент.", "окт.", "нояб.", "дек."}, -- monthsNarrow: []string{"", "Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"}, -- monthsWide: []string{"", "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря"}, -- daysAbbreviated: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysShort: []string{"вс", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"воскресенье", "понедельник", "вторник", "среда", "четверг", "пятница", "суббота"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"до н. э.", "н. э."}, -- erasNarrow: []string{"до н.э.", "н.э."}, -- erasWide: []string{"до Рождества Христова", "от Рождества Христова"}, -- timezones: map[string]string{"IST": "Индия", "JST": "Япония, стандартное время", "ChST": "Чаморро", "SRT": "Суринам", "ART": "Аргентина, стандартное время", "HKT": "Гонконг, стандартное время", "AEDT": "Восточная Австралия, летнее время", "SAST": "Южная Африка", "COT": "Колумбия, стандартное время", "MYT": "Малайзия", "UYST": "Уругвай, летнее время", "AWDT": "Западная Австралия, летнее время", "NZDT": "Новая Зеландия, летнее время", "TMST": "Туркмения, летнее время", "HENOMX": "Северо-западное мексиканское летнее время", "GMT": "Среднее время по Гринвичу", "ACWST": "Центральная Австралия, западное стандартное время", "LHDT": "Лорд-Хау, летнее время", "∅∅∅": "Амазонка, летнее время", "OEZ": "Восточная Европа, стандартное время", "GYT": "Гайана", "ARST": "Аргентина, летнее время", "CAT": "Центральная Африка", "EAT": "Восточная Африка", "WIB": "Западная Индонезия", "VET": "Венесуэла", "HEPM": "Сен-Пьер и Микелон, летнее время", "HEEG": "Восточная Гренландия, летнее время", "CDT": "Центральная Америка, летнее время", "AEST": "Восточная Австралия, стандартное время", "NZST": "Новая Зеландия, стандартное время", "HEPMX": "Тихоокеанское мексиканское летнее время", "EDT": "Восточная Америка, летнее время", "MDT": "Макао, летнее время", "WESZ": "Западная Европа, летнее время", "AWST": "Западная Австралия, стандартное время", "GFT": "Французская Гвиана", "HNPMX": "Тихоокеанское мексиканское стандартное время", "EST": "Восточная Америка, стандартное время", "CLST": "Чили, летнее время", "BOT": "Боливия", "HNOG": "Западная Гренландия, стандартное время", "MEZ": "Центральная Европа, стандартное время", "WAST": "Западная Африка, летнее время", "SGT": "Сингапур", "ACWDT": "Центральная Австралия, западное летнее время", "HEOG": "Западная Гренландия, летнее время", "WITA": "Центральная Индонезия", "MST": "Макао, стандартное время", "ACST": "Центральная Австралия, стандартное время", "ECT": "Эквадор", "WART": "Западная Аргентина, стандартное время", "HAST": "Гавайско-алеутское стандартное время", "BT": "Бутан", "WEZ": "Западная Европа, стандартное время", "CHAST": "Чатем, стандартное время", "HNEG": "Восточная Гренландия, стандарное время", "WARST": "Западная Аргентина, летнее время", "COST": "Колумбия, летнее время", "HECU": "Куба, летнее время", "AST": "Атлантическое стандартное время", "AKDT": "Аляска, летнее время", "ADT": "Атлантическое летнее время", "UYT": "Уругвай, стандартное время", "PDT": "Тихоокеанское летнее время", "HKST": "Гонконг, летнее время", "WAT": "Западная Африка, стандартное время", "OESZ": "Восточная Европа, летнее время", "HNNOMX": "Северо-западное мексиканское стандартное время", "WIT": "Восточная Индонезия", "LHST": "Лорд-Хау, стандартное время", "TMT": "Туркмения, стандартное время", "HADT": "Гавайско-алеутское летнее время", "HNT": "Ньюфаундленд, стандартное время", "HNCU": "Куба, стандартное время", "AKST": "Аляска, стандартное время", "PST": "Тихоокеанское стандартное время", "HNPM": "Сен-Пьер и Микелон, стандартное время", "CLT": "Чили, стандартное время", "CST": "Центральная Америка, стандартное время", "HAT": "Ньюфаундленд, летнее время", "CHADT": "Чатем, летнее время", "MESZ": "Центральная Европа, летнее время", "JDT": "Япония, летнее время", "ACDT": "Центральная Австралия, летнее время"}, -+ locale: "ru_UA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsAbbreviated: []string{"AM", "PM"}, -+ periodsNarrow: []string{"AM", "PM"}, -+ periodsWide: []string{"AM", "PM"}, -+ timezones: map[string]string{"HAT": "HAT", "NZDT": "NZDT", "MESZ": "MESZ", "AKDT": "AKDT", "OESZ": "OESZ", "HNOG": "HNOG", "CAT": "CAT", "HADT": "HADT", "MEZ": "MEZ", "LHST": "LHST", "HNT": "HNT", "WART": "WART", "ART": "ART", "ACST": "ACST", "ACWDT": "ACWDT", "UYT": "UYT", "AST": "AST", "SRT": "SRT", "AEST": "AEST", "HEPMX": "HEPMX", "WAT": "WAT", "NZST": "NZST", "VET": "VET", "GFT": "GFT", "WIB": "WIB", "ChST": "ChST", "ARST": "ARST", "EAT": "EAT", "AWDT": "AWDT", "WAST": "WAST", "EDT": "EDT", "TMT": "TMT", "CDT": "CDT", "MST": "MST", "HAST": "HAST", "HNPM": "HNPM", "AKST": "AKST", "OEZ": "OEZ", "GYT": "GYT", "CLT": "CLT", "TMST": "TMST", "HEEG": "HEEG", "AWST": "AWST", "IST": "IST", "CHADT": "CHADT", "WESZ": "WESZ", "HNPMX": "HNPMX", "COST": "COST", "WARST": "WARST", "ADT": "ADT", "BOT": "BOT", "MYT": "MYT", "HEPM": "HEPM", "PDT": "PDT", "AEDT": "AEDT", "UYST": "UYST", "WIT": "WIT", "SAST": "SAST", "CLST": "CLST", "HENOMX": "HENOMX", "LHDT": "LHDT", "BT": "BT", "∅∅∅": "∅∅∅", "SGT": "SGT", "HECU": "HECU", "EST": "EST", "ACDT": "ACDT", "JST": "JST", "ACWST": "ACWST", "HKT": "HKT", "GMT": "GMT", "HNNOMX": "HNNOMX", "HNEG": "HNEG", "JDT": "JDT", "PST": "PST", "HEOG": "HEOG", "WITA": "WITA", "HKST": "HKST", "CST": "CST", "MDT": "MDT", "ECT": "ECT", "CHAST": "CHAST", "WEZ": "WEZ", "HNCU": "HNCU", "COT": "COT"}, - } - } -  -@@ -168,7 +148,7 @@ func (ru *ru_UA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ru *ru_UA) MonthsAbbreviated() []string { -- return ru.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -178,7 +158,7 @@ func (ru *ru_UA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ru *ru_UA) MonthsNarrow() []string { -- return ru.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -188,7 +168,7 @@ func (ru *ru_UA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ru *ru_UA) MonthsWide() []string { -- return ru.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -234,51 +214,14 @@ func (ru *ru_UA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ru_UA' and handles both Whole and Real numbers based on 'v' - func (ru *ru_UA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ru_UA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ru *ru_UA) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -310,58 +253,7 @@ func (ru *ru_UA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ru.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, ru.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ru_UA' -@@ -370,65 +262,7 @@ func (ru *ru_UA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ru.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ru.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ru.group) - 1; j >= 0; j-- { -- b = append(b, ru.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ru.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ru.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ru.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, ru.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ru_UA' -@@ -436,27 +270,6 @@ func (ru *ru_UA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -465,20 +278,6 @@ func (ru *ru_UA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -487,20 +286,6 @@ func (ru *ru_UA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -509,22 +294,6 @@ func (ru *ru_UA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ru.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ru.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd0, 0xb3}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -diff --git a/rw/rw.go b/rw/rw.go -index bd96459..21eb140 100644 ---- a/rw/rw.go -+++ b/rw/rw.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "CE"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"BCE", "CE"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "GFT": "GFT", "WAT": "WAT", "AST": "AST", "HNOG": "HNOG", "NZDT": "NZDT", "SAST": "SAST", "TMST": "TMST", "ChST": "ChST", "SGT": "SGT", "ACWDT": "ACWDT", "HEEG": "HEEG", "HECU": "HECU", "JDT": "JDT", "EAT": "EAT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "CDT": "CDT", "ADT": "ADT", "GYT": "GYT", "BT": "BT", "HAT": "HAT", "PST": "PST", "HKST": "HKST", "EDT": "EDT", "CST": "CST", "AWST": "AWST", "CHAST": "CHAST", "BOT": "BOT", "WART": "WART", "WIT": "WIT", "HEPM": "HEPM", "MEZ": "MEZ", "ACDT": "ACDT", "OEZ": "OEZ", "CAT": "CAT", "HENOMX": "HENOMX", "GMT": "GMT", "MDT": "MDT", "HEOG": "HEOG", "AEST": "AEST", "LHDT": "LHDT", "IST": "IST", "JST": "JST", "ECT": "ECT", "AKST": "AKST", "ARST": "ARST", "CLT": "CLT", "ACST": "ACST", "WARST": "WARST", "MYT": "MYT", "UYT": "UYT", "HAST": "HAST", "HADT": "HADT", "SRT": "SRT", "ART": "ART", "WEZ": "WEZ", "AEDT": "AEDT", "HNCU": "HNCU", "MST": "MST", "WIB": "WIB", "HNT": "HNT", "TMT": "TMT", "OESZ": "OESZ", "WITA": "WITA", "AWDT": "AWDT", "LHST": "LHST", "CLST": "CLST", "COT": "COT", "AKDT": "AKDT", "VET": "VET", "PDT": "PDT", "WESZ": "WESZ", "CHADT": "CHADT", "MESZ": "MESZ", "WAST": "WAST", "ACWST": "ACWST", "NZST": "NZST", "COST": "COST", "HKT": "HKT", "HNPM": "HNPM", "HNEG": "HNEG", "EST": "EST", "HEPMX": "HEPMX", "UYST": "UYST"}, -+ timezones: map[string]string{"CST": "CST", "ART": "ART", "ACST": "ACST", "HENOMX": "HENOMX", "CHAST": "CHAST", "TMST": "TMST", "CLT": "CLT", "GMT": "GMT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "LHDT": "LHDT", "IST": "IST", "HNOG": "HNOG", "MST": "MST", "HNCU": "HNCU", "MDT": "MDT", "MEZ": "MEZ", "WESZ": "WESZ", "HNPMX": "HNPMX", "EDT": "EDT", "HKT": "HKT", "HNPM": "HNPM", "JST": "JST", "SGT": "SGT", "WAST": "WAST", "CDT": "CDT", "HADT": "HADT", "NZST": "NZST", "WAT": "WAT", "HNT": "HNT", "CAT": "CAT", "ECT": "ECT", "EAT": "EAT", "HAT": "HAT", "COST": "COST", "AEST": "AEST", "AKST": "AKST", "CLST": "CLST", "ADT": "ADT", "WIB": "WIB", "ARST": "ARST", "BOT": "BOT", "LHST": "LHST", "UYST": "UYST", "BT": "BT", "GYT": "GYT", "NZDT": "NZDT", "AEDT": "AEDT", "JDT": "JDT", "ACWDT": "ACWDT", "SAST": "SAST", "HKST": "HKST", "HECU": "HECU", "AKDT": "AKDT", "HEOG": "HEOG", "HAST": "HAST", "WARST": "WARST", "∅∅∅": "∅∅∅", "EST": "EST", "WITA": "WITA", "HNEG": "HNEG", "MYT": "MYT", "OESZ": "OESZ", "GFT": "GFT", "UYT": "UYT", "HEPMX": "HEPMX", "AWST": "AWST", "PST": "PST", "PDT": "PDT", "WIT": "WIT", "SRT": "SRT", "MESZ": "MESZ", "HEPM": "HEPM", "ACWST": "ACWST", "WEZ": "WEZ", "COT": "COT", "TMT": "TMT", "WART": "WART", "CHADT": "CHADT", "ChST": "ChST", "ACDT": "ACDT", "VET": "VET", "OEZ": "OEZ", "AST": "AST"}, - } - } -  -diff --git a/rw_RW/rw_RW.go b/rw_RW/rw_RW.go -index a84804f..71f4d2b 100644 ---- a/rw_RW/rw_RW.go -+++ b/rw_RW/rw_RW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type rw_RW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'rw_RW' locale - func New() locales.Translator { - return &rw_RW{ -- locale: "rw_RW", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "mut.", "gas.", "wer.", "mat.", "gic.", "kam.", "nya.", "kan.", "nze.", "ukw.", "ugu.", "uku."}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Mutarama", "Gashyantare", "Werurwe", "Mata", "Gicuransi", "Kamena", "Nyakanga", "Kanama", "Nzeli", "Ukwakira", "Ugushyingo", "Ukuboza"}, -- daysAbbreviated: []string{"cyu.", "mbe.", "kab.", "gtu.", "kan.", "gnu.", "gnd."}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"cyu.", "mbe.", "kab.", "gtu.", "kan.", "gnu.", "gnd."}, -- daysWide: []string{"Ku cyumweru", "Kuwa mbere", "Kuwa kabiri", "Kuwa gatatu", "Kuwa kane", "Kuwa gatanu", "Kuwa gatandatu"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BCE", "CE"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"BCE", "CE"}, -- timezones: map[string]string{"WAT": "WAT", "EDT": "EDT", "UYT": "UYT", "WEZ": "WEZ", "HKT": "HKT", "NZST": "NZST", "CLST": "CLST", "ACST": "ACST", "HNCU": "HNCU", "HEPMX": "HEPMX", "CDT": "CDT", "ADT": "ADT", "HNPM": "HNPM", "LHST": "LHST", "OESZ": "OESZ", "AEST": "AEST", "LHDT": "LHDT", "MESZ": "MESZ", "WIB": "WIB", "HAST": "HAST", "SRT": "SRT", "HAT": "HAT", "PST": "PST", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "CAT": "CAT", "AST": "AST", "HEOG": "HEOG", "AWST": "AWST", "ChST": "ChST", "ACDT": "ACDT", "MYT": "MYT", "PDT": "PDT", "HEPM": "HEPM", "CHAST": "CHAST", "COT": "COT", "ACWST": "ACWST", "ART": "ART", "BOT": "BOT", "TMST": "TMST", "ECT": "ECT", "WIT": "WIT", "HNT": "HNT", "COST": "COST", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "GYT": "GYT", "WESZ": "WESZ", "MEZ": "MEZ", "SAST": "SAST", "GFT": "GFT", "HENOMX": "HENOMX", "SGT": "SGT", "AKST": "AKST", "MST": "MST", "HKST": "HKST", "HNEG": "HNEG", "EST": "EST", "EAT": "EAT", "GMT": "GMT", "CST": "CST", "MDT": "MDT", "VET": "VET", "CHADT": "CHADT", "CLT": "CLT", "WARST": "WARST", "HADT": "HADT", "ACWDT": "ACWDT", "ARST": "ARST", "IST": "IST", "JDT": "JDT", "BT": "BT", "AWDT": "AWDT", "WART": "WART", "HNPMX": "HNPMX", "HNOG": "HNOG", "NZDT": "NZDT", "HEEG": "HEEG", "HECU": "HECU", "WAST": "WAST", "UYST": "UYST", "WITA": "WITA", "AEDT": "AEDT", "JST": "JST", "TMT": "TMT"}, -+ locale: "rw_RW", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CDT": "CDT", "ChST": "ChST", "HAST": "HAST", "OESZ": "OESZ", "HNT": "HNT", "HNOG": "HNOG", "HKT": "HKT", "WAST": "WAST", "WITA": "WITA", "ECT": "ECT", "ART": "ART", "BOT": "BOT", "HNPM": "HNPM", "BT": "BT", "WEZ": "WEZ", "WIT": "WIT", "TMT": "TMT", "MDT": "MDT", "GMT": "GMT", "HADT": "HADT", "MEZ": "MEZ", "JDT": "JDT", "CST": "CST", "NZDT": "NZDT", "MYT": "MYT", "WAT": "WAT", "GFT": "GFT", "WESZ": "WESZ", "EST": "EST", "CLST": "CLST", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "OEZ": "OEZ", "CLT": "CLT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "PST": "PST", "TMST": "TMST", "ACST": "ACST", "HEPMX": "HEPMX", "EDT": "EDT", "MST": "MST", "ARST": "ARST", "AST": "AST", "LHDT": "LHDT", "CHADT": "CHADT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "NZST": "NZST", "MESZ": "MESZ", "HEPM": "HEPM", "AWST": "AWST", "UYT": "UYT", "GYT": "GYT", "ADT": "ADT", "HNEG": "HNEG", "PDT": "PDT", "HECU": "HECU", "VET": "VET", "HAT": "HAT", "WART": "WART", "WIB": "WIB", "IST": "IST", "AKST": "AKST", "EAT": "EAT", "JST": "JST", "AEST": "AEST", "WARST": "WARST", "SAST": "SAST", "CAT": "CAT", "LHST": "LHST", "AKDT": "AKDT", "COT": "COT", "HKST": "HKST", "ACWDT": "ACWDT", "UYST": "UYST", "HNCU": "HNCU", "COST": "COST", "SRT": "SRT", "ACDT": "ACDT", "HEEG": "HEEG", "AWDT": "AWDT", "ACWST": "ACWST", "CHAST": "CHAST", "SGT": "SGT"}, - } - } -  -@@ -117,7 +94,7 @@ func (rw *rw_RW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (rw *rw_RW) MonthsAbbreviated() []string { -- return rw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (rw *rw_RW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (rw *rw_RW) MonthsNarrow() []string { -- return rw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (rw *rw_RW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (rw *rw_RW) MonthsWide() []string { -- return rw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (rw *rw_RW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'rw_RW' and handles both Whole and Real numbers based on 'v' - func (rw *rw_RW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, rw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'rw_RW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (rw *rw_RW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, rw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, rw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'rw_RW' -@@ -257,60 +174,7 @@ func (rw *rw_RW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(rw.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, rw.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, rw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'rw_RW' -@@ -319,72 +183,7 @@ func (rw *rw_RW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(rw.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, rw.currencyNegativePrefix[j]) -- } -- -- b = append(b, rw.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(rw.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, rw.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'rw_RW' -@@ -392,28 +191,6 @@ func (rw *rw_RW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -422,17 +199,6 @@ func (rw *rw_RW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, rw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -441,17 +207,6 @@ func (rw *rw_RW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, rw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -460,19 +215,6 @@ func (rw *rw_RW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, rw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, rw.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -481,19 +223,6 @@ func (rw *rw_RW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -502,26 +231,6 @@ func (rw *rw_RW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -530,30 +239,6 @@ func (rw *rw_RW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -562,34 +247,5 @@ func (rw *rw_RW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := rw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/rwk/rwk.go b/rwk/rwk.go -index 9ccd0bd..880d94f 100644 ---- a/rwk/rwk.go -+++ b/rwk/rwk.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Kristu", "Baada ya Kristu"}, -- timezones: map[string]string{"ChST": "ChST", "CAT": "CAT", "CDT": "CDT", "PST": "PST", "BOT": "BOT", "VET": "VET", "IST": "IST", "HENOMX": "HENOMX", "HADT": "HADT", "PDT": "PDT", "COST": "COST", "HECU": "HECU", "HNPMX": "HNPMX", "GYT": "GYT", "WESZ": "WESZ", "JDT": "JDT", "∅∅∅": "∅∅∅", "WIT": "WIT", "HKT": "HKT", "MEZ": "MEZ", "MESZ": "MESZ", "COT": "COT", "UYT": "UYT", "AKST": "AKST", "BT": "BT", "ARST": "ARST", "HAT": "HAT", "EAT": "EAT", "HNCU": "HNCU", "EST": "EST", "MDT": "MDT", "CST": "CST", "HNPM": "HNPM", "HNEG": "HNEG", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "HKST": "HKST", "CHADT": "CHADT", "CHAST": "CHAST", "TMST": "TMST", "ACST": "ACST", "ADT": "ADT", "HAST": "HAST", "HNOG": "HNOG", "ACWST": "ACWST", "JST": "JST", "TMT": "TMT", "WIB": "WIB", "ACWDT": "ACWDT", "CLT": "CLT", "WEZ": "WEZ", "HNT": "HNT", "AWDT": "AWDT", "UYST": "UYST", "ART": "ART", "AWST": "AWST", "HEPM": "HEPM", "NZDT": "NZDT", "NZST": "NZST", "SAST": "SAST", "GFT": "GFT", "OEZ": "OEZ", "AST": "AST", "AEDT": "AEDT", "LHST": "LHST", "ECT": "ECT", "SGT": "SGT", "HEOG": "HEOG", "LHDT": "LHDT", "HEEG": "HEEG", "ACDT": "ACDT", "WAT": "WAT", "WARST": "WARST", "EDT": "EDT", "SRT": "SRT", "AKDT": "AKDT", "AEST": "AEST", "CLST": "CLST", "WAST": "WAST", "WART": "WART", "GMT": "GMT", "MST": "MST", "MYT": "MYT", "WITA": "WITA"}, -+ timezones: map[string]string{"HADT": "HADT", "HNEG": "HNEG", "HNPM": "HNPM", "JST": "JST", "HNCU": "HNCU", "OESZ": "OESZ", "CLT": "CLT", "HEOG": "HEOG", "EST": "EST", "MST": "MST", "ACST": "ACST", "AEDT": "AEDT", "CHAST": "CHAST", "WAT": "WAT", "HNT": "HNT", "VET": "VET", "∅∅∅": "∅∅∅", "EDT": "EDT", "HKT": "HKT", "TMT": "TMT", "HNPMX": "HNPMX", "WART": "WART", "GYT": "GYT", "GFT": "GFT", "NZST": "NZST", "ECT": "ECT", "ADT": "ADT", "LHDT": "LHDT", "PDT": "PDT", "AEST": "AEST", "AKST": "AKST", "TMST": "TMST", "ACDT": "ACDT", "ACWDT": "ACWDT", "CHADT": "CHADT", "COST": "COST", "WIB": "WIB", "BT": "BT", "HNOG": "HNOG", "UYST": "UYST", "ART": "ART", "PST": "PST", "EAT": "EAT", "MDT": "MDT", "GMT": "GMT", "ACWST": "ACWST", "SAST": "SAST", "AST": "AST", "LHST": "LHST", "IST": "IST", "OEZ": "OEZ", "MESZ": "MESZ", "WITA": "WITA", "NZDT": "NZDT", "AWDT": "AWDT", "UYT": "UYT", "SGT": "SGT", "AKDT": "AKDT", "CAT": "CAT", "BOT": "BOT", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "HAT": "HAT", "COT": "COT", "ARST": "ARST", "MEZ": "MEZ", "MYT": "MYT", "WAST": "WAST", "WARST": "WARST", "CDT": "CDT", "ChST": "ChST", "SRT": "SRT", "HAST": "HAST", "JDT": "JDT", "WIT": "WIT", "CST": "CST", "HEEG": "HEEG", "HENOMX": "HENOMX", "AWST": "AWST", "HEPM": "HEPM", "WESZ": "WESZ", "HECU": "HECU", "HKST": "HKST", "CLST": "CLST", "HEPMX": "HEPMX"}, - } - } -  -diff --git a/rwk_TZ/rwk_TZ.go b/rwk_TZ/rwk_TZ.go -index 20ae000..7f3acc8 100644 ---- a/rwk_TZ/rwk_TZ.go -+++ b/rwk_TZ/rwk_TZ.go -@@ -42,24 +42,13 @@ type rwk_TZ struct { - // New returns a new instance of translator for the 'rwk_TZ' locale - func New() locales.Translator { - return &rwk_TZ{ -- locale: "rwk_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprilyi", "Mei", "Junyi", "Julyai", "Agusti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"J", "J", "J", "J", "A", "I", "J"}, -- daysWide: []string{"Jumapilyi", "Jumatatuu", "Jumanne", "Jumatanu", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"utuko", "kyiukonyi"}, -- periodsWide: []string{"utuko", "kyiukonyi"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristu", "Baada ya Kristu"}, -- timezones: map[string]string{"NZST": "NZST", "CLST": "CLST", "MDT": "MDT", "HAT": "HAT", "AEST": "AEST", "HNPM": "HNPM", "MESZ": "MESZ", "CLT": "CLT", "ChST": "ChST", "WARST": "WARST", "EDT": "EDT", "HNPMX": "HNPMX", "HEOG": "HEOG", "MEZ": "MEZ", "JST": "JST", "MST": "MST", "CST": "CST", "PDT": "PDT", "HNT": "HNT", "AWDT": "AWDT", "CDT": "CDT", "HNOG": "HNOG", "PST": "PST", "WEZ": "WEZ", "WESZ": "WESZ", "WIB": "WIB", "SRT": "SRT", "HEEG": "HEEG", "WAST": "WAST", "EST": "EST", "UYST": "UYST", "TMST": "TMST", "COST": "COST", "HENOMX": "HENOMX", "ADT": "ADT", "IST": "IST", "WIT": "WIT", "LHST": "LHST", "GMT": "GMT", "AST": "AST", "BOT": "BOT", "ACDT": "ACDT", "CAT": "CAT", "WAT": "WAT", "OEZ": "OEZ", "WART": "WART", "ACWDT": "ACWDT", "SGT": "SGT", "HEPMX": "HEPMX", "GYT": "GYT", "AKDT": "AKDT", "HAST": "HAST", "HECU": "HECU", "AWST": "AWST", "HKT": "HKT", "ART": "ART", "WITA": "WITA", "HNEG": "HNEG", "ACST": "ACST", "COT": "COT", "HADT": "HADT", "VET": "VET", "ACWST": "ACWST", "GFT": "GFT", "LHDT": "LHDT", "CHAST": "CHAST", "SAST": "SAST", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "MYT": "MYT", "BT": "BT", "HKST": "HKST", "NZDT": "NZDT", "CHADT": "CHADT", "JDT": "JDT", "TMT": "TMT", "EAT": "EAT", "ECT": "ECT", "HNCU": "HNCU", "UYT": "UYT", "AKST": "AKST", "ARST": "ARST", "AEDT": "AEDT", "HEPM": "HEPM"}, -+ locale: "rwk_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "ChST": "ChST", "ACST": "ACST", "LHST": "LHST", "HEPM": "HEPM", "PST": "PST", "UYT": "UYT", "SAST": "SAST", "CST": "CST", "HNT": "HNT", "HKT": "HKT", "BOT": "BOT", "ACDT": "ACDT", "GFT": "GFT", "WART": "WART", "WIT": "WIT", "WITA": "WITA", "CDT": "CDT", "ECT": "ECT", "UYST": "UYST", "COT": "COT", "HNEG": "HNEG", "MYT": "MYT", "JST": "JST", "CHADT": "CHADT", "SGT": "SGT", "AKDT": "AKDT", "OEZ": "OEZ", "CLT": "CLT", "AWST": "AWST", "PDT": "PDT", "AEDT": "AEDT", "ART": "ART", "BT": "BT", "WARST": "WARST", "COST": "COST", "EDT": "EDT", "TMST": "TMST", "ADT": "ADT", "GMT": "GMT", "CLST": "CLST", "LHDT": "LHDT", "ACWDT": "ACWDT", "WAST": "WAST", "GYT": "GYT", "AWDT": "AWDT", "WEZ": "WEZ", "HNCU": "HNCU", "EST": "EST", "SRT": "SRT", "HADT": "HADT", "MESZ": "MESZ", "IST": "IST", "ACWST": "ACWST", "AEST": "AEST", "HECU": "HECU", "WAT": "WAT", "OESZ": "OESZ", "NZST": "NZST", "NZDT": "NZDT", "WIB": "WIB", "AST": "AST", "HENOMX": "HENOMX", "JDT": "JDT", "AKST": "AKST", "HAT": "HAT", "HEOG": "HEOG", "CAT": "CAT", "MST": "MST", "MDT": "MDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "HKST": "HKST", "MEZ": "MEZ", "CHAST": "CHAST", "VET": "VET", "TMT": "TMT", "HAST": "HAST", "ARST": "ARST", "EAT": "EAT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX"}, - } - } -  -@@ -112,7 +101,7 @@ func (rwk *rwk_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (rwk *rwk_TZ) MonthsAbbreviated() []string { -- return rwk.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (rwk *rwk_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (rwk *rwk_TZ) MonthsNarrow() []string { -- return rwk.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (rwk *rwk_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (rwk *rwk_TZ) MonthsWide() []string { -- return rwk.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,54 +181,7 @@ func (rwk *rwk_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rwk.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rwk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rwk.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, rwk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rwk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'rwk_TZ' -@@ -248,61 +190,7 @@ func (rwk *rwk_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := rwk.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, rwk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, rwk.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, rwk.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, rwk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'rwk_TZ' -@@ -310,27 +198,6 @@ func (rwk *rwk_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -339,17 +206,6 @@ func (rwk *rwk_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rwk.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -358,17 +214,6 @@ func (rwk *rwk_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rwk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -377,19 +222,6 @@ func (rwk *rwk_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, rwk.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, rwk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -398,19 +230,6 @@ func (rwk *rwk_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -419,26 +238,6 @@ func (rwk *rwk_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -447,30 +246,6 @@ func (rwk *rwk_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -479,34 +254,5 @@ func (rwk *rwk_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, rwk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := rwk.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sah/sah.go b/sah/sah.go -index afdb336..f735bee 100644 ---- a/sah/sah.go -+++ b/sah/sah.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"б. э. и.", "б. э"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"б. э. и.", "б. э"}, -- timezones: map[string]string{"CLT": "CLT", "HEEG": "HEEG", "ACDT": "Киин Австралия сайыҥҥы кэмэ", "ADT": "ADT", "PDT": "PDT", "AWST": "Арҕаа Австралия сүрүн кэмэ", "HNT": "HNT", "HAT": "HAT", "JST": "Дьоппуон сүрүн кэмэ", "CLST": "CLST", "GMT": "GMT", "EST": "EST", "HEPMX": "HEPMX", "ACWST": "ACWST", "TMT": "TMT", "ACST": "Киин Австралия сүрүн кэмэ", "EAT": "EAT", "HNOG": "HNOG", "AEST": "Илин Австралия сүрүн кэмэ", "MEZ": "MEZ", "HAST": "HAST", "SRT": "SRT", "ECT": "ECT", "HADT": "HADT", "JDT": "Дьоппуон сайыҥҥы кэмэ", "COST": "COST", "TMST": "TMST", "HNEG": "HNEG", "HNPMX": "HNPMX", "HEOG": "HEOG", "AEDT": "Илин Австралия сайыҥҥы кэмэ", "WITA": "WITA", "MESZ": "MESZ", "CAT": "CAT", "HENOMX": "HENOMX", "SGT": "SGT", "HECU": "HECU", "AKST": "AKST", "WESZ": "WESZ", "LHST": "LHST", "NZST": "Саҥа Сэйлэнд сүрүн кэмэ", "ChST": "ChST", "WAST": "WAST", "AST": "AST", "HNPM": "HNPM", "HEPM": "HEPM", "CHAST": "CHAST", "GFT": "GFT", "COT": "COT", "VET": "VET", "WIT": "WIT", "NZDT": "Саҥа Сэйлэнд сайыҥҥы кэмэ", "SAST": "SAST", "GYT": "GYT", "UYST": "UYST", "AWDT": "Арҕаа Австралия сайыҥҥы кэмэ", "IST": "Ииндийэ сүрүн кэмэ", "WAT": "WAT", "OESZ": "OESZ", "MYT": "MYT", "ARST": "ARST", "PST": "PST", "CDT": "CDT", "ART": "ART", "ACWDT": "ACWDT", "LHDT": "LHDT", "HNCU": "HNCU", "MDT": "MDT", "UYT": "UYT", "WEZ": "WEZ", "HKT": "HKT", "BT": "BT", "∅∅∅": "∅∅∅", "BOT": "BOT", "WART": "WART", "MST": "MST", "CST": "CST", "WIB": "WIB", "CHADT": "CHADT", "OEZ": "OEZ", "WARST": "WARST", "HNNOMX": "HNNOMX", "EDT": "EDT", "AKDT": "AKDT", "HKST": "HKST"}, -+ timezones: map[string]string{"ADT": "ADT", "MEZ": "MEZ", "MESZ": "MESZ", "HEPM": "HEPM", "JDT": "Дьоппуон сайыҥҥы кэмэ", "AKST": "AKST", "WARST": "WARST", "HEEG": "HEEG", "SGT": "SGT", "HNPMX": "HNPMX", "TMT": "TMT", "TMST": "TMST", "MDT": "MDT", "NZDT": "Саҥа Сэйлэнд сайыҥҥы кэмэ", "MYT": "MYT", "HEPMX": "HEPMX", "COST": "COST", "NZST": "Саҥа Сэйлэнд сүрүн кэмэ", "ARST": "ARST", "AEST": "Илин Австралия сүрүн кэмэ", "CAT": "CAT", "SRT": "SRT", "WAT": "WAT", "WART": "WART", "EST": "EST", "CLST": "CLST", "GMT": "GMT", "OESZ": "OESZ", "HAT": "HAT", "CLT": "CLT", "WIB": "WIB", "EAT": "EAT", "HADT": "HADT", "AEDT": "Илин Австралия сайыҥҥы кэмэ", "VET": "VET", "HECU": "HECU", "HEOG": "HEOG", "BOT": "BOT", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "GFT": "GFT", "HKST": "HKST", "AST": "AST", "AWST": "Арҕаа Австралия сүрүн кэмэ", "UYT": "UYT", "HNCU": "HNCU", "COT": "COT", "AWDT": "Арҕаа Австралия сайыҥҥы кэмэ", "PST": "PST", "EDT": "EDT", "ACWDT": "ACWDT", "CHADT": "CHADT", "WIT": "WIT", "SAST": "SAST", "HNT": "HNT", "MST": "MST", "ECT": "ECT", "HENOMX": "HENOMX", "HNPM": "HNPM", "PDT": "PDT", "ACWST": "ACWST", "CHAST": "CHAST", "HNOG": "HNOG", "LHST": "LHST", "WEZ": "WEZ", "HKT": "HKT", "ChST": "ChST", "ACST": "Киин Австралия сүрүн кэмэ", "LHDT": "LHDT", "UYST": "UYST", "AKDT": "AKDT", "OEZ": "OEZ", "GYT": "GYT", "CST": "CST", "HAST": "HAST", "BT": "BT", "WESZ": "WESZ", "WAST": "WAST", "CDT": "CDT", "ART": "ART", "ACDT": "Киин Австралия сайыҥҥы кэмэ", "HNEG": "HNEG", "JST": "Дьоппуон сүрүн кэмэ", "IST": "Ииндийэ сүрүн кэмэ", "WITA": "WITA"}, - } - } -  -diff --git a/sah_RU/sah_RU.go b/sah_RU/sah_RU.go -index 4eb3e7a..ee0dad6 100644 ---- a/sah_RU/sah_RU.go -+++ b/sah_RU/sah_RU.go -@@ -10,68 +10,45 @@ import ( - ) -  - type sah_RU struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sah_RU' locale - func New() locales.Translator { - return &sah_RU{ -- locale: "sah_RU", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Тохс", "Олун", "Клн", "Мсу", "Ыам", "Бэс", "Отй", "Атр", "Блҕ", "Алт", "Сэт", "Ахс"}, -- monthsNarrow: []string{"", "Т", "О", "К", "М", "Ы", "Б", "О", "А", "Б", "А", "С", "А"}, -- monthsWide: []string{"", "Тохсунньу", "Олунньу", "Кулун тутар", "Муус устар", "Ыам ыйын", "Бэс ыйын", "От ыйын", "Атырдьых ыйын", "Балаҕан ыйын", "Алтынньы", "Сэтинньи", "ахсынньы"}, -- daysAbbreviated: []string{"бс", "бн", "оп", "сэ", "чп", "бэ", "сб"}, -- daysNarrow: []string{"Б", "Б", "О", "С", "Ч", "Б", "С"}, -- daysShort: []string{"бс", "бн", "оп", "сэ", "чп", "бэ", "сб"}, -- daysWide: []string{"баскыһыанньа", "бэнидиэнньик", "оптуорунньук", "сэрэдэ", "чэппиэр", "Бээтиҥсэ", "субуота"}, -- periodsAbbreviated: []string{"ЭИ", "ЭК"}, -- periodsNarrow: []string{"ЭИ", "ЭК"}, -- periodsWide: []string{"ЭИ", "ЭК"}, -- erasAbbreviated: []string{"б. э. и.", "б. э"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"б. э. и.", "б. э"}, -- timezones: map[string]string{"ECT": "ECT", "UYT": "UYT", "WESZ": "WESZ", "HKT": "HKT", "GFT": "GFT", "WAT": "WAT", "HNCU": "HNCU", "MYT": "MYT", "PST": "PST", "HNPM": "HNPM", "ACDT": "Киин Австралия сайыҥҥы кэмэ", "WAST": "WAST", "WARST": "WARST", "HECU": "HECU", "HEPMX": "HEPMX", "GYT": "GYT", "HEEG": "HEEG", "ACST": "Киин Австралия сүрүн кэмэ", "EAT": "EAT", "MDT": "MDT", "WITA": "WITA", "AWDT": "Арҕаа Австралия сайыҥҥы кэмэ", "HAST": "HAST", "HAT": "HAT", "MESZ": "MESZ", "CLST": "CLST", "OEZ": "OEZ", "WART": "WART", "EDT": "EDT", "MST": "MST", "ART": "ART", "JST": "Дьоппуон сүрүн кэмэ", "CLT": "CLT", "∅∅∅": "∅∅∅", "UYST": "UYST", "AKDT": "AKDT", "SAST": "SAST", "WIB": "WIB", "HNOG": "HNOG", "ACWST": "ACWST", "MEZ": "MEZ", "ChST": "ChST", "COT": "COT", "HNT": "HNT", "ACWDT": "ACWDT", "NZST": "Саҥа Сэйлэнд сүрүн кэмэ", "NZDT": "Саҥа Сэйлэнд сайыҥҥы кэмэ", "TMST": "TMST", "VET": "VET", "BT": "BT", "PDT": "PDT", "CHAST": "CHAST", "HNNOMX": "HNNOMX", "EST": "EST", "CST": "CST", "SRT": "SRT", "HKST": "HKST", "LHDT": "LHDT", "IST": "Ииндийэ сүрүн кэмэ", "TMT": "TMT", "CAT": "CAT", "ADT": "ADT", "AWST": "Арҕаа Австралия сүрүн кэмэ", "HNPMX": "HNPMX", "AKST": "AKST", "LHST": "LHST", "BOT": "BOT", "HNEG": "HNEG", "COST": "COST", "GMT": "GMT", "SGT": "SGT", "AEDT": "Илин Австралия сайыҥҥы кэмэ", "HEPM": "HEPM", "JDT": "Дьоппуон сайыҥҥы кэмэ", "OESZ": "OESZ", "ARST": "ARST", "AEST": "Илин Австралия сүрүн кэмэ", "CHADT": "CHADT", "HENOMX": "HENOMX", "CDT": "CDT", "WIT": "WIT", "HEOG": "HEOG", "WEZ": "WEZ", "AST": "AST", "HADT": "HADT"}, -+ locale: "sah_RU", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYT": "UYT", "VET": "VET", "AKST": "AKST", "HEOG": "HEOG", "BOT": "BOT", "HNEG": "HNEG", "HEEG": "HEEG", "ACWDT": "ACWDT", "CLT": "CLT", "ART": "ART", "MST": "MST", "MDT": "MDT", "EAT": "EAT", "MESZ": "MESZ", "JST": "JST", "PDT": "PDT", "SGT": "SGT", "CST": "CST", "HEPMX": "HEPMX", "WAST": "WAST", "WARST": "WARST", "EST": "EST", "CAT": "CAT", "HECU": "HECU", "HNPMX": "HNPMX", "WART": "WART", "EDT": "EDT", "CLST": "CLST", "JDT": "JDT", "UYST": "UYST", "SAST": "SAST", "HKT": "HKT", "MEZ": "MEZ", "AEDT": "AEDT", "WEZ": "WEZ", "HADT": "HADT", "HAST": "HAST", "BT": "BT", "HKST": "HKST", "TMT": "TMT", "ADT": "ADT", "LHDT": "LHDT", "ARST": "ARST", "SRT": "SRT", "OESZ": "OESZ", "COST": "COST", "TMST": "TMST", "AST": "AST", "HNT": "HNT", "HAT": "HAT", "COT": "COT", "WESZ": "WESZ", "ACST": "ACST", "HNNOMX": "HNNOMX", "MYT": "MYT", "CHAST": "CHAST", "CHADT": "CHADT", "AKDT": "AKDT", "GFT": "GFT", "WITA": "WITA", "WIB": "WIB", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "NZDT": "NZDT", "AWST": "AWST", "LHST": "LHST", "HEPM": "HEPM", "WIT": "WIT", "GYT": "GYT", "ACDT": "ACDT", "HNPM": "HNPM", "IST": "IST", "OEZ": "OEZ", "HNOG": "HNOG", "NZST": "NZST", "ECT": "ECT", "GMT": "GMT", "ChST": "ChST", "ACWST": "ACWST", "AEST": "AEST", "WAT": "WAT", "CDT": "CDT", "AWDT": "AWDT", "PST": "PST", "HENOMX": "HENOMX"}, - } - } -  -@@ -117,7 +94,7 @@ func (sah *sah_RU) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sah *sah_RU) MonthsAbbreviated() []string { -- return sah.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (sah *sah_RU) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sah *sah_RU) MonthsNarrow() []string { -- return sah.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (sah *sah_RU) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sah *sah_RU) MonthsWide() []string { -- return sah.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,75 +160,13 @@ func (sah *sah_RU) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sah_RU' and handles both Whole and Real numbers based on 'v' - func (sah *sah_RU) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sah.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sah.group) - 1; j >= 0; j-- { -- b = append(b, sah.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sah.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sah_RU' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sah *sah_RU) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sah.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sah.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sah.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sah_RU' -@@ -259,58 +174,7 @@ func (sah *sah_RU) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sah.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sah.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sah.group) - 1; j >= 0; j-- { -- b = append(b, sah.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sah.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sah.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sah.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sah_RU' -@@ -319,65 +183,7 @@ func (sah *sah_RU) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sah.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sah.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sah.group) - 1; j >= 0; j-- { -- b = append(b, sah.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sah.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sah.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sah.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sah.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sah_RU' -@@ -385,17 +191,6 @@ func (sah *sah_RU) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -404,17 +199,6 @@ func (sah *sah_RU) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, sah.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -423,17 +207,6 @@ func (sah *sah_RU) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, sah.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -442,21 +215,6 @@ func (sah *sah_RU) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd1, 0x81, 0xd1, 0x8b, 0xd0, 0xbb}...) -- b = append(b, []byte{0x20}...) -- b = append(b, sah.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0xd0, 0xba, 0xd2, 0xaf, 0xd0, 0xbd, 0xd1, 0x8d}...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, sah.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -465,19 +223,6 @@ func (sah *sah_RU) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -486,26 +231,6 @@ func (sah *sah_RU) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -514,30 +239,6 @@ func (sah *sah_RU) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -546,34 +247,5 @@ func (sah *sah_RU) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sah.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sah.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/saq/saq.go b/saq/saq.go -index 20f8837..ea911d8 100644 ---- a/saq/saq.go -+++ b/saq/saq.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Christo", "Baada ya Christo"}, -- timezones: map[string]string{"WIB": "WIB", "CHADT": "CHADT", "CLST": "CLST", "HENOMX": "HENOMX", "EDT": "EDT", "EAT": "EAT", "HNCU": "HNCU", "HAST": "HAST", "LHST": "LHST", "IST": "IST", "BOT": "BOT", "CAT": "CAT", "GMT": "GMT", "MDT": "MDT", "HAT": "HAT", "HNOG": "HNOG", "OESZ": "OESZ", "COT": "COT", "MYT": "MYT", "ACWST": "ACWST", "HEOG": "HEOG", "HKST": "HKST", "SAST": "SAST", "MEZ": "MEZ", "NZDT": "NZDT", "ChST": "ChST", "AST": "AST", "MST": "MST", "WIT": "WIT", "AEDT": "AEDT", "AWDT": "AWDT", "GYT": "GYT", "ACWDT": "ACWDT", "AKST": "AKST", "ADT": "ADT", "BT": "BT", "WITA": "WITA", "VET": "VET", "TMT": "TMT", "ACDT": "ACDT", "HNPMX": "HNPMX", "HNNOMX": "HNNOMX", "SRT": "SRT", "WESZ": "WESZ", "JST": "JST", "HNEG": "HNEG", "ECT": "ECT", "GFT": "GFT", "AKDT": "AKDT", "WEZ": "WEZ", "HNT": "HNT", "LHDT": "LHDT", "HEEG": "HEEG", "AEST": "AEST", "WAST": "WAST", "EST": "EST", "HNPM": "HNPM", "WARST": "WARST", "COST": "COST", "UYT": "UYT", "CST": "CST", "PDT": "PDT", "AWST": "AWST", "HKT": "HKT", "HEPMX": "HEPMX", "PST": "PST", "ARST": "ARST", "OEZ": "OEZ", "HECU": "HECU", "WART": "WART", "HEPM": "HEPM", "NZST": "NZST", "CLT": "CLT", "∅∅∅": "∅∅∅", "JDT": "JDT", "UYST": "UYST", "CHAST": "CHAST", "SGT": "SGT", "ACST": "ACST", "WAT": "WAT", "CDT": "CDT", "HADT": "HADT", "ART": "ART", "MESZ": "MESZ", "TMST": "TMST"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "HEPM": "HEPM", "PST": "PST", "HNPMX": "HNPMX", "TMST": "TMST", "NZDT": "NZDT", "HADT": "HADT", "LHST": "LHST", "AKDT": "AKDT", "COT": "COT", "TMT": "TMT", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "WARST": "WARST", "CLT": "CLT", "HEOG": "HEOG", "HKST": "HKST", "NZST": "NZST", "SRT": "SRT", "PDT": "PDT", "AEST": "AEST", "OEZ": "OEZ", "HAT": "HAT", "MST": "MST", "AWDT": "AWDT", "GFT": "GFT", "ECT": "ECT", "ARST": "ARST", "ACDT": "ACDT", "BT": "BT", "HECU": "HECU", "WAT": "WAT", "IST": "IST", "WAST": "WAST", "CAT": "CAT", "AST": "AST", "BOT": "BOT", "LHDT": "LHDT", "JST": "JST", "AEDT": "AEDT", "SAST": "SAST", "UYST": "UYST", "HEPMX": "HEPMX", "GYT": "GYT", "HKT": "HKT", "EDT": "EDT", "WITA": "WITA", "ChST": "ChST", "MEZ": "MEZ", "MYT": "MYT", "SGT": "SGT", "EST": "EST", "GMT": "GMT", "HAST": "HAST", "WIB": "WIB", "UYT": "UYT", "WART": "WART", "OESZ": "OESZ", "ART": "ART", "ADT": "ADT", "MESZ": "MESZ", "AWST": "AWST", "AKST": "AKST", "WEZ": "WEZ", "WESZ": "WESZ", "WIT": "WIT", "COST": "COST", "JDT": "JDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "EAT": "EAT", "ACST": "ACST", "HNEG": "HNEG", "HEEG": "HEEG", "HNPM": "HNPM", "VET": "VET", "HNT": "HNT", "CST": "CST", "CDT": "CDT", "CLST": "CLST", "MDT": "MDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "CHADT": "CHADT", "HNOG": "HNOG"}, - } - } -  -diff --git a/saq_KE/saq_KE.go b/saq_KE/saq_KE.go -index 2ece81a..4c2be91 100644 ---- a/saq_KE/saq_KE.go -+++ b/saq_KE/saq_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type saq_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'saq_KE' locale - func New() locales.Translator { - return &saq_KE{ -- locale: "saq_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Obo", "Waa", "Oku", "Ong", "Ime", "Ile", "Sap", "Isi", "Saa", "Tom", "Tob", "Tow"}, -- monthsNarrow: []string{"", "O", "W", "O", "O", "I", "I", "S", "I", "S", "T", "T", "T"}, -- monthsWide: []string{"", "Lapa le obo", "Lapa le waare", "Lapa le okuni", "Lapa le ong’wan", "Lapa le imet", "Lapa le ile", "Lapa le sapa", "Lapa le isiet", "Lapa le saal", "Lapa le tomon", "Lapa le tomon obo", "Lapa le tomon waare"}, -- daysAbbreviated: []string{"Are", "Kun", "Ong", "Ine", "Ile", "Sap", "Kwe"}, -- daysNarrow: []string{"A", "K", "O", "I", "I", "S", "K"}, -- daysWide: []string{"Mderot ee are", "Mderot ee kuni", "Mderot ee ong’wan", "Mderot ee inet", "Mderot ee ile", "Mderot ee sapa", "Mderot ee kwe"}, -- periodsAbbreviated: []string{"Tesiran", "Teipa"}, -- periodsWide: []string{"Tesiran", "Teipa"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Christo", "Baada ya Christo"}, -- timezones: map[string]string{"HEOG": "HEOG", "AWDT": "AWDT", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "BOT": "BOT", "COST": "COST", "HNEG": "HNEG", "MDT": "MDT", "MYT": "MYT", "WESZ": "WESZ", "HKST": "HKST", "IST": "IST", "CHAST": "CHAST", "ACST": "ACST", "ECT": "ECT", "VET": "VET", "WIT": "WIT", "BT": "BT", "HNT": "HNT", "MEZ": "MEZ", "WARST": "WARST", "WIB": "WIB", "CHADT": "CHADT", "HKT": "HKT", "TMT": "TMT", "WAT": "WAT", "HNCU": "HNCU", "EST": "EST", "MST": "MST", "AKST": "AKST", "AEST": "AEST", "COT": "COT", "OEZ": "OEZ", "HEPMX": "HEPMX", "HADT": "HADT", "AWST": "AWST", "CLST": "CLST", "GFT": "GFT", "JDT": "JDT", "TMST": "TMST", "WEZ": "WEZ", "ARST": "ARST", "LHST": "LHST", "LHDT": "LHDT", "NZST": "NZST", "SGT": "SGT", "JST": "JST", "CAT": "CAT", "WAST": "WAST", "HEPM": "HEPM", "SAST": "SAST", "OESZ": "OESZ", "EDT": "EDT", "CST": "CST", "AST": "AST", "PST": "PST", "WITA": "WITA", "HENOMX": "HENOMX", "HNPM": "HNPM", "CLT": "CLT", "UYST": "UYST", "ADT": "ADT", "HAST": "HAST", "HAT": "HAT", "AEDT": "AEDT", "GMT": "GMT", "HECU": "HECU", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "HEEG": "HEEG", "CDT": "CDT", "SRT": "SRT", "MESZ": "MESZ", "ChST": "ChST", "WART": "WART", "GYT": "GYT", "HNOG": "HNOG", "HNPMX": "HNPMX", "UYT": "UYT", "PDT": "PDT", "ACWST": "ACWST", "ART": "ART", "ACDT": "ACDT", "EAT": "EAT"}, -+ locale: "saq_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "BOT": "BOT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "COT": "COT", "ADT": "ADT", "AEDT": "AEDT", "HNOG": "HNOG", "EDT": "EDT", "CAT": "CAT", "WITA": "WITA", "HNEG": "HNEG", "CHADT": "CHADT", "HECU": "HECU", "WAST": "WAST", "NZST": "NZST", "HKST": "HKST", "ARST": "ARST", "ACDT": "ACDT", "HEPM": "HEPM", "JST": "JST", "HAT": "HAT", "SAST": "SAST", "MDT": "MDT", "SRT": "SRT", "EAT": "EAT", "UYT": "UYT", "WEZ": "WEZ", "WESZ": "WESZ", "WART": "WART", "ACWST": "ACWST", "VET": "VET", "TMST": "TMST", "MEZ": "MEZ", "AWST": "AWST", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "PDT": "PDT", "CST": "CST", "OESZ": "OESZ", "WIT": "WIT", "COST": "COST", "HAST": "HAST", "HEEG": "HEEG", "LHST": "LHST", "CHAST": "CHAST", "HNCU": "HNCU", "EST": "EST", "WIB": "WIB", "ART": "ART", "GYT": "GYT", "HKT": "HKT", "NZDT": "NZDT", "AST": "AST", "IST": "IST", "AEST": "AEST", "HNT": "HNT", "HADT": "HADT", "ACST": "ACST", "BT": "BT", "AKST": "AKST", "HENOMX": "HENOMX", "JDT": "JDT", "WARST": "WARST", "CLT": "CLT", "ECT": "ECT", "MESZ": "MESZ", "HEOG": "HEOG", "MST": "MST", "SGT": "SGT", "TMT": "TMT", "CLST": "CLST", "CDT": "CDT", "ChST": "ChST", "MYT": "MYT", "UYST": "UYST", "PST": "PST", "AKDT": "AKDT", "GFT": "GFT", "AWDT": "AWDT", "HNPM": "HNPM", "ACWDT": "ACWDT", "WAT": "WAT", "OEZ": "OEZ"}, - } - } -  -@@ -116,7 +101,7 @@ func (saq *saq_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (saq *saq_KE) MonthsAbbreviated() []string { -- return saq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (saq *saq_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (saq *saq_KE) MonthsNarrow() []string { -- return saq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (saq *saq_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (saq *saq_KE) MonthsWide() []string { -- return saq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (saq *saq_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := saq.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, saq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, saq.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, saq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, saq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'saq_KE' -@@ -254,68 +190,7 @@ func (saq *saq_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := saq.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, saq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, saq.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, saq.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, saq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, saq.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'saq_KE' -@@ -323,27 +198,6 @@ func (saq *saq_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -352,17 +206,6 @@ func (saq *saq_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, saq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,17 +214,6 @@ func (saq *saq_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, saq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -390,19 +222,6 @@ func (saq *saq_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, saq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, saq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -411,19 +230,6 @@ func (saq *saq_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -432,26 +238,6 @@ func (saq *saq_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -460,30 +246,6 @@ func (saq *saq_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -492,34 +254,5 @@ func (saq *saq_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, saq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := saq.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sbp/sbp.go b/sbp/sbp.go -index 38bac3b..e8babba 100644 ---- a/sbp/sbp.go -+++ b/sbp/sbp.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AK", "PK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Ashanali uKilisito", "Pamwandi ya Kilisto"}, -- timezones: map[string]string{"MST": "MST", "NZST": "NZST", "ChST": "ChST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "MDT": "MDT", "HNOG": "HNOG", "MESZ": "MESZ", "CLST": "CLST", "JST": "JST", "SGT": "SGT", "GYT": "GYT", "PST": "PST", "HAT": "HAT", "LHST": "LHST", "ECT": "ECT", "HNCU": "HNCU", "AKST": "AKST", "WIB": "WIB", "WEZ": "WEZ", "AWST": "AWST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "COT": "COT", "HNPMX": "HNPMX", "HKT": "HKT", "JDT": "JDT", "CAT": "CAT", "OEZ": "OEZ", "HENOMX": "HENOMX", "MYT": "MYT", "UYT": "UYT", "AKDT": "AKDT", "HAST": "HAST", "AWDT": "AWDT", "HNPM": "HNPM", "HEPM": "HEPM", "IST": "IST", "BOT": "BOT", "EST": "EST", "AST": "AST", "ADT": "ADT", "BT": "BT", "HNT": "HNT", "MEZ": "MEZ", "LHDT": "LHDT", "CLT": "CLT", "TMT": "TMT", "VET": "VET", "SRT": "SRT", "TMST": "TMST", "HECU": "HECU", "CST": "CST", "CDT": "CDT", "UYST": "UYST", "WITA": "WITA", "ACWST": "ACWST", "ARST": "ARST", "GFT": "GFT", "WARST": "WARST", "HADT": "HADT", "NZDT": "NZDT", "CHADT": "CHADT", "HNEG": "HNEG", "EAT": "EAT", "OESZ": "OESZ", "GMT": "GMT", "SAST": "SAST", "WART": "WART", "PDT": "PDT", "HKST": "HKST", "HEEG": "HEEG", "ACST": "ACST", "WESZ": "WESZ", "ACWDT": "ACWDT", "ART": "ART", "AEDT": "AEDT", "ACDT": "ACDT", "WAT": "WAT", "WAST": "WAST", "WIT": "WIT", "HEOG": "HEOG", "AEST": "AEST", "COST": "COST", "EDT": "EDT"}, -+ timezones: map[string]string{"AKDT": "AKDT", "WARST": "WARST", "WIT": "WIT", "COT": "COT", "CDT": "CDT", "ART": "ART", "HAST": "HAST", "SGT": "SGT", "VET": "VET", "TMT": "TMT", "CST": "CST", "HENOMX": "HENOMX", "BT": "BT", "HNT": "HNT", "HAT": "HAT", "EST": "EST", "UYST": "UYST", "AST": "AST", "ECT": "ECT", "HEPM": "HEPM", "OEZ": "OEZ", "HNOG": "HNOG", "ADT": "ADT", "HNNOMX": "HNNOMX", "IST": "IST", "PDT": "PDT", "HNCU": "HNCU", "HECU": "HECU", "HNPMX": "HNPMX", "WESZ": "WESZ", "LHDT": "LHDT", "UYT": "UYT", "CHADT": "CHADT", "WITA": "WITA", "NZST": "NZST", "NZDT": "NZDT", "GMT": "GMT", "JST": "JST", "MESZ": "MESZ", "HEEG": "HEEG", "HNPM": "HNPM", "AWST": "AWST", "LHST": "LHST", "HKT": "HKT", "HKST": "HKST", "MEZ": "MEZ", "MST": "MST", "CLST": "CLST", "WAST": "WAST", "WAT": "WAT", "WART": "WART", "COST": "COST", "EDT": "EDT", "ARST": "ARST", "EAT": "EAT", "HADT": "HADT", "MYT": "MYT", "HEOG": "HEOG", "CAT": "CAT", "JDT": "JDT", "HEPMX": "HEPMX", "SAST": "SAST", "GYT": "GYT", "CLT": "CLT", "ACWST": "ACWST", "ACWDT": "ACWDT", "AEST": "AEST", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "TMST": "TMST", "SRT": "SRT", "HNEG": "HNEG", "AWDT": "AWDT", "AKST": "AKST", "OESZ": "OESZ", "MDT": "MDT", "ACDT": "ACDT", "CHAST": "CHAST", "PST": "PST", "WEZ": "WEZ", "GFT": "GFT", "WIB": "WIB", "ChST": "ChST", "BOT": "BOT", "ACST": "ACST"}, - } - } -  -diff --git a/sbp_TZ/sbp_TZ.go b/sbp_TZ/sbp_TZ.go -index 2ac6423..20987e1 100644 ---- a/sbp_TZ/sbp_TZ.go -+++ b/sbp_TZ/sbp_TZ.go -@@ -42,25 +42,13 @@ type sbp_TZ struct { - // New returns a new instance of translator for the 'sbp_TZ' locale - func New() locales.Translator { - return &sbp_TZ{ -- locale: "sbp_TZ", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Mup", "Mwi", "Msh", "Mun", "Mag", "Muj", "Msp", "Mpg", "Mye", "Mok", "Mus", "Muh"}, -- monthsWide: []string{"", "Mupalangulwa", "Mwitope", "Mushende", "Munyi", "Mushende Magali", "Mujimbi", "Mushipepo", "Mupuguto", "Munyense", "Mokhu", "Musongandembwe", "Muhaano"}, -- daysAbbreviated: []string{"Mul", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"M", "J", "J", "J", "A", "I", "J"}, -- daysWide: []string{"Mulungu", "Jumatatu", "Jumanne", "Jumatano", "Alahamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"Lwamilawu", "Pashamihe"}, -- periodsWide: []string{"Lwamilawu", "Pashamihe"}, -- erasAbbreviated: []string{"AK", "PK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Ashanali uKilisito", "Pamwandi ya Kilisto"}, -- timezones: map[string]string{"COT": "COT", "HEPMX": "HEPMX", "MYT": "MYT", "UYT": "UYT", "HAST": "HAST", "WEZ": "WEZ", "HKST": "HKST", "SAST": "SAST", "HECU": "HECU", "AST": "AST", "BT": "BT", "HNPM": "HNPM", "WART": "WART", "ARST": "ARST", "JDT": "JDT", "MEZ": "MEZ", "IST": "IST", "TMT": "TMT", "MST": "MST", "LHDT": "LHDT", "EAT": "EAT", "WARST": "WARST", "SGT": "SGT", "HNPMX": "HNPMX", "HEOG": "HEOG", "PDT": "PDT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "GMT": "GMT", "GYT": "GYT", "HADT": "HADT", "SRT": "SRT", "HNT": "HNT", "MESZ": "MESZ", "WESZ": "WESZ", "AEDT": "AEDT", "NZDT": "NZDT", "BOT": "BOT", "OESZ": "OESZ", "CST": "CST", "WIT": "WIT", "WITA": "WITA", "CHADT": "CHADT", "GFT": "GFT", "ACDT": "ACDT", "OEZ": "OEZ", "ChST": "ChST", "EDT": "EDT", "AKST": "AKST", "VET": "VET", "ACWST": "ACWST", "LHST": "LHST", "NZST": "NZST", "JST": "JST", "ACST": "ACST", "WAST": "WAST", "EST": "EST", "ADT": "ADT", "ART": "ART", "ACWDT": "ACWDT", "HKT": "HKT", "HEPM": "HEPM", "CAT": "CAT", "TMST": "TMST", "HNCU": "HNCU", "WIB": "WIB", "PST": "PST", "AWST": "AWST", "AWDT": "AWDT", "CHAST": "CHAST", "CLT": "CLT", "WAT": "WAT", "CLST": "CLST", "∅∅∅": "∅∅∅", "CDT": "CDT", "UYST": "UYST", "AKDT": "AKDT", "HAT": "HAT", "HNOG": "HNOG", "AEST": "AEST", "HEEG": "HEEG", "MDT": "MDT", "ECT": "ECT", "COST": "COST", "HENOMX": "HENOMX"}, -+ locale: "sbp_TZ", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "AKDT": "AKDT", "GYT": "GYT", "HAST": "HAST", "LHST": "LHST", "MYT": "MYT", "HNPMX": "HNPMX", "CAT": "CAT", "AWST": "AWST", "COT": "COT", "ACST": "ACST", "LHDT": "LHDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "OESZ": "OESZ", "WIT": "WIT", "EDT": "EDT", "MST": "MST", "MEZ": "MEZ", "UYT": "UYT", "HKT": "HKT", "TMT": "TMT", "AST": "AST", "EAT": "EAT", "WAT": "WAT", "HNT": "HNT", "SAST": "SAST", "HEOG": "HEOG", "WITA": "WITA", "CST": "CST", "SGT": "SGT", "HEPM": "HEPM", "CHAST": "CHAST", "GFT": "GFT", "TMST": "TMST", "CDT": "CDT", "NZST": "NZST", "ART": "ART", "HNEG": "HNEG", "HENOMX": "HENOMX", "IST": "IST", "AEST": "AEST", "AKST": "AKST", "GMT": "GMT", "ACDT": "ACDT", "AWDT": "AWDT", "EST": "EST", "HNNOMX": "HNNOMX", "COST": "COST", "ADT": "ADT", "HADT": "HADT", "ACWST": "ACWST", "WEZ": "WEZ", "HAT": "HAT", "HNOG": "HNOG", "HKST": "HKST", "WIB": "WIB", "ARST": "ARST", "MESZ": "MESZ", "HEEG": "HEEG", "BT": "BT", "HEPMX": "HEPMX", "WAST": "WAST", "CLST": "CLST", "ChST": "ChST", "MDT": "MDT", "HNPM": "HNPM", "AEDT": "AEDT", "VET": "VET", "HECU": "HECU", "WART": "WART", "SRT": "SRT", "PST": "PST", "UYST": "UYST", "WESZ": "WESZ", "OEZ": "OEZ", "WARST": "WARST", "BOT": "BOT", "JDT": "JDT", "ECT": "ECT", "JST": "JST", "CHADT": "CHADT", "CLT": "CLT", "NZDT": "NZDT", "PDT": "PDT"}, - } - } -  -@@ -106,7 +94,7 @@ func (sbp *sbp_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sbp *sbp_TZ) MonthsAbbreviated() []string { -- return sbp.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +114,7 @@ func (sbp *sbp_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sbp *sbp_TZ) MonthsWide() []string { -- return sbp.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -172,73 +160,13 @@ func (sbp *sbp_TZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sbp_TZ' and handles both Whole and Real numbers based on 'v' - func (sbp *sbp_TZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sbp.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sbp.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sbp.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sbp_TZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sbp *sbp_TZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sbp.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sbp.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sbp.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sbp_TZ' -@@ -246,54 +174,7 @@ func (sbp *sbp_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sbp.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sbp.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sbp.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sbp.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sbp.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sbp_TZ' -@@ -302,61 +183,7 @@ func (sbp *sbp_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sbp.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sbp.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sbp.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sbp.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sbp.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sbp_TZ' -@@ -364,27 +191,6 @@ func (sbp *sbp_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -393,17 +199,6 @@ func (sbp *sbp_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sbp.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -412,17 +207,6 @@ func (sbp *sbp_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sbp.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -431,19 +215,6 @@ func (sbp *sbp_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sbp.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sbp.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -452,19 +223,6 @@ func (sbp *sbp_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -473,26 +231,6 @@ func (sbp *sbp_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -501,30 +239,6 @@ func (sbp *sbp_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -533,34 +247,5 @@ func (sbp *sbp_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sbp.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sbp.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/se/se.go b/se/se.go -index 4f522dd..1cde91f 100644 ---- a/se/se.go -+++ b/se/se.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"o.Kr.", "m.Kr."}, - erasNarrow: []string{"ooá", "oá"}, - erasWide: []string{"ovdal Kristtusa", "maŋŋel Kristtusa"}, -- timezones: map[string]string{"WAT": "WAT", "BT": "BT", "SRT": "SRT", "HNPM": "HNPM", "CHADT": "CHADT", "CLST": "CLST", "HEEG": "HEEG", "EAT": "EAT", "EDT": "EDT", "MST": "MST", "HEPMX": "HEPMX", "CST": "CST", "PST": "PST", "PDT": "PDT", "HNT": "HNT", "CLT": "CLT", "COT": "COT", "∅∅∅": "∅∅∅", "VET": "VET", "AEST": "AEST", "AWDT": "AWDT", "ChST": "ChST", "BOT": "BOT", "HNPMX": "HNPMX", "WITA": "WITA", "NZST": "NZST", "GFT": "GFT", "UYT": "UYT", "HAST": "HAST", "ACWST": "ACWST", "WAST": "WAST", "CHAST": "CHAST", "IST": "IST", "ACDT": "ACDT", "HEOG": "HEOG", "HKST": "HKST", "MESZ": "gaska-Eurohpá geassiáigi", "CAT": "CAT", "GMT": "Greenwich gaskka áigi", "UYST": "UYST", "AKDT": "AKDT", "WEZ": "oarje-Eurohpá dábálašáigi", "AWST": "AWST", "HEPM": "HEPM", "LHST": "LHST", "WART": "WART", "HECU": "HECU", "ART": "ART", "NZDT": "NZDT", "SAST": "SAST", "WIT": "WIT", "HNEG": "HNEG", "TMST": "TMST", "WARST": "WARST", "SGT": "SGT", "EST": "EST", "MDT": "MDT", "MYT": "MYT", "AEDT": "AEDT", "HENOMX": "HENOMX", "AKST": "AKST", "CDT": "CDT", "MEZ": "gaska-Eurohpá dábálašáigi", "TMT": "TMT", "OEZ": "nuorti-Eurohpá dábálašáigi", "OESZ": "nuorti-Eurohpá geassiáigi", "HNNOMX": "HNNOMX", "AST": "AST", "ACWDT": "ACWDT", "HKT": "HKT", "LHDT": "LHDT", "ACST": "ACST", "ECT": "ECT", "COST": "COST", "HNCU": "HNCU", "ADT": "ADT", "GYT": "GYT", "WIB": "WIB", "WESZ": "oarje-Eurohpá geassiáigi", "ARST": "ARST", "HADT": "HADT", "HAT": "HAT", "HNOG": "HNOG", "JST": "JST", "JDT": "JDT"}, -+ timezones: map[string]string{"HADT": "HADT", "HEPMX": "HEPMX", "TMT": "TMT", "MDT": "MDT", "AST": "AST", "ACDT": "ACDT", "PST": "PST", "BT": "BT", "CHAST": "CHAST", "COST": "COST", "EDT": "EDT", "ACWST": "ACWST", "WITA": "WITA", "WIB": "WIB", "ART": "ART", "EAT": "EAT", "HNEG": "HNEG", "JST": "JST", "PDT": "PDT", "WESZ": "oarje-Eurohpá geassiáigi", "OEZ": "nuorti-Eurohpá dábálašáigi", "ChST": "ChST", "VET": "VET", "UYST": "UYST", "AEDT": "AEDT", "HECU": "HECU", "WART": "WART", "HNNOMX": "HNNOMX", "NZDT": "NZDT", "AWDT": "AWDT", "HAT": "HAT", "CDT": "CDT", "UYT": "UYT", "WEZ": "oarje-Eurohpá dábálašáigi", "TMST": "TMST", "BOT": "BOT", "HAST": "HAST", "HNPM": "HNPM", "HNOG": "HNOG", "CLST": "CLST", "HKST": "HKST", "CST": "CST", "GMT": "Greenwich gaskka áigi", "MESZ": "gaska-Eurohpá geassiáigi", "HNT": "HNT", "WIT": "WIT", "NZST": "NZST", "ECT": "ECT", "ARST": "ARST", "HEEG": "HEEG", "HENOMX": "HENOMX", "HEPM": "HEPM", "WAST": "WAST", "CLT": "CLT", "SGT": "SGT", "HKT": "HKT", "WARST": "WARST", "GYT": "GYT", "JDT": "JDT", "IST": "IST", "HNPMX": "HNPMX", "AKDT": "AKDT", "COT": "COT", "MEZ": "gaska-Eurohpá dábálašáigi", "ACST": "ACST", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "ADT": "ADT", "CAT": "CAT", "AWST": "AWST", "LHDT": "LHDT", "AKST": "AKST", "HEOG": "HEOG", "GFT": "GFT", "MST": "MST", "MYT": "MYT", "AEST": "AEST", "CHADT": "CHADT", "HNCU": "HNCU", "WAT": "WAT", "OESZ": "nuorti-Eurohpá geassiáigi", "SRT": "SRT", "LHST": "LHST", "SAST": "SAST", "EST": "EST"}, - } - } -  -diff --git a/se_FI/se_FI.go b/se_FI/se_FI.go -index dda7e19..fbeca50 100644 ---- a/se_FI/se_FI.go -+++ b/se_FI/se_FI.go -@@ -10,70 +10,47 @@ import ( - ) -  - type se_FI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'se_FI' locale - func New() locales.Translator { - return &se_FI{ -- locale: "se_FI", -- pluralsCardinal: []locales.PluralRule{2, 3, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ođđj", "guov", "njuk", "cuo", "mies", "geas", "suoi", "borg", "čakč", "golg", "skáb", "juov"}, -- monthsNarrow: []string{"", "O", "G", "N", "C", "M", "G", "S", "B", "Č", "G", "S", "J"}, -- monthsWide: []string{"", "ođđajagemánnu", "guovvamánnu", "njukčamánnu", "cuoŋománnu", "miessemánnu", "geassemánnu", "suoidnemánnu", "borgemánnu", "čakčamánnu", "golggotmánnu", "skábmamánnu", "juovlamánnu"}, -- daysAbbreviated: []string{"sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"}, -- daysNarrow: []string{"S", "M", "D", "G", "D", "B", "L"}, -- daysShort: []string{"sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"}, -- daysWide: []string{"sotnabeaivi", "vuossárgga", "maŋŋebárgga", "gaskavahku", "duorastaga", "bearjadaga", "lávvardaga"}, -- periodsAbbreviated: []string{"i.b.", "e.b."}, -- periodsNarrow: []string{"i.b.", "e.b."}, -- periodsWide: []string{"iđitbeaivet", "eahketbeaivet"}, -- erasAbbreviated: []string{"o.Kr.", "m.Kr."}, -- erasNarrow: []string{"ooá", "oá"}, -- erasWide: []string{"ovdal Kristtusa", "maŋŋel Kristtusa"}, -- timezones: map[string]string{"HNPMX": "HNPMX", "HADT": "HADT", "BOT": "BOT", "ACDT": "ACDT", "GYT": "GYT", "CLT": "CLT", "CDT": "CDT", "CAT": "CAT", "HAT": "HAT", "TMT": "TMT", "WART": "WART", "AKDT": "AKDT", "HNOG": "HNOG", "AEST": "AEST", "CHAST": "CHAST", "UYST": "UYST", "HAST": "HAST", "PDT": "PDT", "LHDT": "LHDT", "HEEG": "HEEG", "CLST": "CLST", "ACST": "ACST", "WAST": "WAST", "HEPMX": "HEPMX", "NZST": "NZST", "CHADT": "CHADT", "HNEG": "HNEG", "EAT": "EAT", "HENOMX": "HENOMX", "HNCU": "HNCU", "EDT": "EDT", "WESZ": "oarje-Eurohpá geassiáigi", "HKST": "HKST", "JDT": "JDT", "ACWDT": "ACWDT", "WIB": "WIB", "AEDT": "AEDT", "WARST": "WARST", "JST": "JST", "TMST": "TMST", "COT": "COT", "EST": "EST", "MYT": "MYT", "VET": "VET", "LHST": "LHST", "NZDT": "NZDT", "SAST": "SAST", "WAT": "WAT", "HECU": "HECU", "AST": "AST", "SRT": "SRT", "PST": "PST", "AWST": "AWST", "MESZ": "gaska-Eurohpá geassiáigi", "OESZ": "nuorti-Eurohpá geassiáigi", "ECT": "ECT", "COST": "COST", "MDT": "MDT", "BT": "BT", "WEZ": "oarje-Eurohpá dábálašáigi", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "ART": "ART", "MST": "MST", "UYT": "UYT", "AKST": "AKST", "CST": "CST", "HNPM": "HNPM", "HNNOMX": "HNNOMX", "GFT": "GFT", "WIT": "WIT", "WITA": "WITA", "IST": "IST", "SGT": "SGT", "ACWST": "ACWST", "HNT": "HNT", "MEZ": "gaska-Eurohpá dábálašáigi", "GMT": "Greenwich gaskka áigi", "ChST": "ChST", "OEZ": "nuorti-Eurohpá dábálašáigi", "ADT": "ADT", "HKT": "HKT", "HEPM": "HEPM", "ARST": "ARST", "HEOG": "HEOG"}, -+ locale: "se_FI", -+ pluralsCardinal: []locales.PluralRule{2, 3, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ daysNarrow: []string{"S", "M", "D", "G", "D", "B", "L"}, -+ daysWide: []string{"sotnabeaivi", "vuossárgga", "maŋŋebárgga", "gaskavahku", "duorastaga", "bearjadaga", "lávvardaga"}, -+ timezones: map[string]string{"WITA": "WITA", "GMT": "GMT", "SRT": "SRT", "HNEG": "HNEG", "HECU": "HECU", "OEZ": "OEZ", "HNT": "HNT", "HKT": "HKT", "ECT": "ECT", "MESZ": "MESZ", "AWDT": "AWDT", "SGT": "SGT", "AKDT": "AKDT", "WART": "WART", "SAST": "SAST", "CAT": "CAT", "ACDT": "ACDT", "BT": "BT", "HNCU": "HNCU", "AKST": "AKST", "WIT": "WIT", "EST": "EST", "ART": "ART", "ARST": "ARST", "EAT": "EAT", "HADT": "HADT", "HENOMX": "HENOMX", "HNPM": "HNPM", "UYT": "UYT", "PST": "PST", "WEZ": "WEZ", "WAST": "WAST", "HNOG": "HNOG", "JST": "JST", "JDT": "JDT", "WAT": "WAT", "COT": "COT", "MEZ": "MEZ", "LHST": "LHST", "IST": "IST", "GYT": "GYT", "COST": "COST", "VET": "VET", "HKST": "HKST", "CLST": "CLST", "NZDT": "NZDT", "AST": "AST", "ChST": "ChST", "ACST": "ACST", "HNNOMX": "HNNOMX", "AWST": "AWST", "LHDT": "LHDT", "AEST": "AEST", "AEDT": "AEDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "EDT": "EDT", "CHADT": "CHADT", "HAT": "HAT", "WIB": "WIB", "HEEG": "HEEG", "MYT": "MYT", "WESZ": "WESZ", "CST": "CST", "TMT": "TMT", "MST": "MST", "HNPMX": "HNPMX", "CDT": "CDT", "CHAST": "CHAST", "CLT": "CLT", "HEPM": "HEPM", "ACWST": "ACWST", "WARST": "WARST", "HEOG": "HEOG", "TMST": "TMST", "ADT": "ADT", "UYST": "UYST", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "MDT": "MDT", "NZST": "NZST", "BOT": "BOT", "HAST": "HAST", "PDT": "PDT", "GFT": "GFT"}, - } - } -  -@@ -128,7 +105,7 @@ func (se *se_FI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (se *se_FI) MonthsAbbreviated() []string { -- return se.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +115,7 @@ func (se *se_FI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (se *se_FI) MonthsNarrow() []string { -- return se.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +125,7 @@ func (se *se_FI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (se *se_FI) MonthsWide() []string { -- return se.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,81 +171,13 @@ func (se *se_FI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'se_FI' and handles both Whole and Real numbers based on 'v' - func (se *se_FI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'se_FI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (se *se_FI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, se.percentSuffix...) -- -- b = append(b, se.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'se_FI' -@@ -276,60 +185,7 @@ func (se *se_FI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := se.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, se.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, se.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'se_FI' -@@ -338,67 +194,7 @@ func (se *se_FI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := se.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, se.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, se.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, se.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'se_FI' -@@ -406,28 +202,6 @@ func (se *se_FI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -436,17 +210,6 @@ func (se *se_FI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,17 +218,6 @@ func (se *se_FI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -474,19 +226,6 @@ func (se *se_FI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, se.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -495,19 +234,6 @@ func (se *se_FI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -516,26 +242,6 @@ func (se *se_FI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -544,30 +250,6 @@ func (se *se_FI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -576,34 +258,5 @@ func (se *se_FI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := se.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/se_NO/se_NO.go b/se_NO/se_NO.go -index ecadaa8..f6b3726 100644 ---- a/se_NO/se_NO.go -+++ b/se_NO/se_NO.go -@@ -10,70 +10,45 @@ import ( - ) -  - type se_NO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'se_NO' locale - func New() locales.Translator { - return &se_NO{ -- locale: "se_NO", -- pluralsCardinal: []locales.PluralRule{2, 3, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ođđj", "guov", "njuk", "cuo", "mies", "geas", "suoi", "borg", "čakč", "golg", "skáb", "juov"}, -- monthsNarrow: []string{"", "O", "G", "N", "C", "M", "G", "S", "B", "Č", "G", "S", "J"}, -- monthsWide: []string{"", "ođđajagemánnu", "guovvamánnu", "njukčamánnu", "cuoŋománnu", "miessemánnu", "geassemánnu", "suoidnemánnu", "borgemánnu", "čakčamánnu", "golggotmánnu", "skábmamánnu", "juovlamánnu"}, -- daysAbbreviated: []string{"sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"}, -- daysNarrow: []string{"S", "V", "M", "G", "D", "B", "L"}, -- daysShort: []string{"sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"}, -- daysWide: []string{"sotnabeaivi", "vuossárga", "maŋŋebárga", "gaskavahkku", "duorasdat", "bearjadat", "lávvardat"}, -- periodsAbbreviated: []string{"i.b.", "e.b."}, -- periodsNarrow: []string{"i.b.", "e.b."}, -- periodsWide: []string{"iđitbeaivet", "eahketbeaivet"}, -- erasAbbreviated: []string{"o.Kr.", "m.Kr."}, -- erasNarrow: []string{"ooá", "oá"}, -- erasWide: []string{"ovdal Kristtusa", "maŋŋel Kristtusa"}, -- timezones: map[string]string{"CDT": "CDT", "MEZ": "gaska-Eurohpá dábálašáigi", "TMT": "TMT", "ACST": "ACST", "SGT": "SGT", "HNCU": "HNCU", "COT": "COT", "HAST": "HAST", "HNOG": "HNOG", "LHDT": "LHDT", "CHADT": "CHADT", "WAT": "WAT", "EDT": "EDT", "CST": "CST", "WEZ": "oarje-Eurohpá dábálašáigi", "MYT": "MYT", "HNPM": "HNPM", "NZDT": "NZDT", "JST": "JST", "OEZ": "nuorti-Eurohpá dábálašáigi", "ECT": "ECT", "HECU": "HECU", "HNPMX": "HNPMX", "TMST": "TMST", "ACWST": "ACWST", "AWDT": "AWDT", "CHAST": "CHAST", "AST": "AST", "WESZ": "oarje-Eurohpá geassiáigi", "PST": "PST", "HKST": "HKST", "SRT": "SRT", "HNT": "HNT", "AWST": "AWST", "ACDT": "ACDT", "ADT": "ADT", "WIT": "WIT", "HADT": "HADT", "CLT": "CLT", "COST": "COST", "ACWDT": "ACWDT", "HAT": "HAT", "MESZ": "gaska-Eurohpá geassiáigi", "GMT": "Greenwich gaskka áigi", "CLST": "CLST", "PDT": "PDT", "WITA": "WITA", "NZST": "NZST", "BOT": "BOT", "HNEG": "HNEG", "WIB": "WIB", "VET": "VET", "HKT": "HKT", "AEST": "AEST", "ChST": "ChST", "WAST": "WAST", "CAT": "CAT", "ART": "ART", "UYST": "UYST", "HEOG": "HEOG", "JDT": "JDT", "EAT": "EAT", "WART": "WART", "AKST": "AKST", "AKDT": "AKDT", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "OESZ": "nuorti-Eurohpá geassiáigi", "MST": "MST", "MDT": "MDT", "ARST": "ARST", "AEDT": "AEDT", "HEPM": "HEPM", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "EST": "EST", "UYT": "UYT", "BT": "BT", "LHST": "LHST", "IST": "IST", "SAST": "SAST", "GFT": "GFT", "∅∅∅": "∅∅∅", "WARST": "WARST", "GYT": "GYT"}, -+ locale: "se_NO", -+ pluralsCardinal: []locales.PluralRule{2, 3, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKST": "HKST", "AWST": "AWST", "JST": "JST", "HAT": "HAT", "WIB": "WIB", "ChST": "ChST", "HADT": "HADT", "AEST": "AEST", "VET": "VET", "WAST": "WAST", "AKST": "AKST", "MDT": "MDT", "NZDT": "NZDT", "BOT": "BOT", "MYT": "MYT", "HNPMX": "HNPMX", "MST": "MST", "ACWDT": "ACWDT", "WART": "WART", "COT": "COT", "ARST": "ARST", "IST": "IST", "OEZ": "OEZ", "EDT": "EDT", "CAT": "CAT", "HNNOMX": "HNNOMX", "CDT": "CDT", "GMT": "GMT", "EAT": "EAT", "ACST": "ACST", "LHST": "LHST", "HEPMX": "HEPMX", "GYT": "GYT", "CST": "CST", "CLT": "CLT", "PST": "PST", "HNCU": "HNCU", "SAST": "SAST", "ADT": "ADT", "BT": "BT", "CLST": "CLST", "WITA": "WITA", "UYST": "UYST", "SRT": "SRT", "HENOMX": "HENOMX", "MEZ": "MEZ", "HNEG": "HNEG", "HEEG": "HEEG", "SGT": "SGT", "OESZ": "OESZ", "ECT": "ECT", "WIT": "WIT", "HEOG": "HEOG", "HKT": "HKT", "GFT": "GFT", "WAT": "WAT", "HNT": "HNT", "HNOG": "HNOG", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "PDT": "PDT", "WESZ": "WESZ", "AKDT": "AKDT", "EST": "EST", "TMT": "TMT", "AEDT": "AEDT", "HNPM": "HNPM", "LHDT": "LHDT", "UYT": "UYT", "WEZ": "WEZ", "TMST": "TMST", "AST": "AST", "ART": "ART", "MESZ": "MESZ", "ACDT": "ACDT", "HEPM": "HEPM", "WARST": "WARST", "NZST": "NZST", "CHADT": "CHADT", "HECU": "HECU", "HAST": "HAST", "ACWST": "ACWST", "CHAST": "CHAST", "COST": "COST", "JDT": "JDT"}, - } - } -  -@@ -128,7 +103,7 @@ func (se *se_NO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (se *se_NO) MonthsAbbreviated() []string { -- return se.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +113,7 @@ func (se *se_NO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (se *se_NO) MonthsNarrow() []string { -- return se.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +123,7 @@ func (se *se_NO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (se *se_NO) MonthsWide() []string { -- return se.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,81 +169,13 @@ func (se *se_NO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'se_NO' and handles both Whole and Real numbers based on 'v' - func (se *se_NO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'se_NO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (se *se_NO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, se.percentSuffix...) -- -- b = append(b, se.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'se_NO' -@@ -276,60 +183,7 @@ func (se *se_NO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := se.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, se.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, se.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'se_NO' -@@ -338,67 +192,7 @@ func (se *se_NO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := se.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, se.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, se.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, se.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'se_NO' -@@ -406,28 +200,6 @@ func (se *se_NO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -436,17 +208,6 @@ func (se *se_NO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,17 +216,6 @@ func (se *se_NO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -474,19 +224,6 @@ func (se *se_NO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, se.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -495,19 +232,6 @@ func (se *se_NO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -516,26 +240,6 @@ func (se *se_NO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -544,30 +248,6 @@ func (se *se_NO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -576,34 +256,5 @@ func (se *se_NO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := se.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/se_SE/se_SE.go b/se_SE/se_SE.go -index 600dbe6..d839357 100644 ---- a/se_SE/se_SE.go -+++ b/se_SE/se_SE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type se_SE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'se_SE' locale - func New() locales.Translator { - return &se_SE{ -- locale: "se_SE", -- pluralsCardinal: []locales.PluralRule{2, 3, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "Nkr", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "kr", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ođđj", "guov", "njuk", "cuo", "mies", "geas", "suoi", "borg", "čakč", "golg", "skáb", "juov"}, -- monthsNarrow: []string{"", "O", "G", "N", "C", "M", "G", "S", "B", "Č", "G", "S", "J"}, -- monthsWide: []string{"", "ođđajagemánnu", "guovvamánnu", "njukčamánnu", "cuoŋománnu", "miessemánnu", "geassemánnu", "suoidnemánnu", "borgemánnu", "čakčamánnu", "golggotmánnu", "skábmamánnu", "juovlamánnu"}, -- daysAbbreviated: []string{"sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"}, -- daysNarrow: []string{"S", "V", "M", "G", "D", "B", "L"}, -- daysShort: []string{"sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"}, -- daysWide: []string{"sotnabeaivi", "vuossárga", "maŋŋebárga", "gaskavahkku", "duorasdat", "bearjadat", "lávvardat"}, -- periodsAbbreviated: []string{"i.b.", "e.b."}, -- periodsNarrow: []string{"i.b.", "e.b."}, -- periodsWide: []string{"iđitbeaivet", "eahketbeaivet"}, -- erasAbbreviated: []string{"o.Kr.", "m.Kr."}, -- erasNarrow: []string{"ooá", "oá"}, -- erasWide: []string{"ovdal Kristtusa", "maŋŋel Kristtusa"}, -- timezones: map[string]string{"HECU": "HECU", "AKST": "AKST", "VET": "VET", "EAT": "EAT", "HEOG": "HEOG", "LHDT": "LHDT", "COST": "COST", "HNNOMX": "HNNOMX", "MYT": "MYT", "WESZ": "oarje-Eurohpá geassiáigi", "ART": "ART", "LHST": "LHST", "ChST": "ChST", "SRT": "SRT", "HNT": "HNT", "HEPM": "HEPM", "AEST": "AEST", "AEDT": "AEDT", "NZST": "NZST", "CHAST": "CHAST", "MEZ": "gaska-Eurohpá dábálašáigi", "CST": "CST", "HAST": "HAST", "HAT": "HAT", "CLST": "CLST", "OEZ": "nuorti-Eurohpá dábálašáigi", "UYST": "UYST", "WIB": "WIB", "BT": "BT", "AWST": "AWST", "AWDT": "AWDT", "WAST": "WAST", "OESZ": "nuorti-Eurohpá geassiáigi", "ECT": "ECT", "GYT": "GYT", "MST": "MST", "HADT": "HADT", "HENOMX": "HENOMX", "EST": "EST", "NZDT": "NZDT", "CHADT": "CHADT", "CLT": "CLT", "SGT": "SGT", "CDT": "CDT", "AST": "AST", "ADT": "ADT", "TMST": "TMST", "ACDT": "ACDT", "CAT": "CAT", "WEZ": "oarje-Eurohpá dábálašáigi", "IST": "IST", "JDT": "JDT", "EDT": "EDT", "HNPM": "HNPM", "GFT": "GFT", "WARST": "WARST", "HEPMX": "HEPMX", "UYT": "UYT", "PDT": "PDT", "SAST": "SAST", "WART": "WART", "WITA": "WITA", "JST": "JST", "BOT": "BOT", "TMT": "TMT", "ACST": "ACST", "WAT": "WAT", "COT": "COT", "AKDT": "AKDT", "HKT": "HKT", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "HNPMX": "HNPMX", "ACWDT": "ACWDT", "ARST": "ARST", "HKST": "HKST", "WIT": "WIT", "GMT": "Greenwich gaskka áigi", "MDT": "MDT", "ACWST": "ACWST", "HEEG": "HEEG", "HNCU": "HNCU", "HNOG": "HNOG", "PST": "PST", "MESZ": "gaska-Eurohpá geassiáigi"}, -+ locale: "se_SE", -+ pluralsCardinal: []locales.PluralRule{2, 3, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "Nkr", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "kr", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "ACWST": "ACWST", "GFT": "GFT", "EST": "EST", "HKST": "HKST", "TMST": "TMST", "HKT": "HKT", "AST": "AST", "ADT": "ADT", "SRT": "SRT", "AWDT": "AWDT", "WIT": "WIT", "WART": "WART", "OESZ": "OESZ", "BT": "BT", "AKDT": "AKDT", "ECT": "ECT", "HENOMX": "HENOMX", "JST": "JST", "PST": "PST", "HNOG": "HNOG", "NZDT": "NZDT", "HADT": "HADT", "ACWDT": "ACWDT", "HECU": "HECU", "HEPMX": "HEPMX", "WEZ": "WEZ", "COST": "COST", "ChST": "ChST", "GYT": "GYT", "NZST": "NZST", "MST": "MST", "MDT": "MDT", "ARST": "ARST", "HAST": "HAST", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "CHADT": "CHADT", "ACDT": "ACDT", "JDT": "JDT", "AEDT": "AEDT", "MEZ": "MEZ", "MYT": "MYT", "HNCU": "HNCU", "WITA": "WITA", "WAST": "WAST", "PDT": "PDT", "WESZ": "WESZ", "MESZ": "MESZ", "ACST": "ACST", "IST": "IST", "SGT": "SGT", "OEZ": "OEZ", "HAT": "HAT", "HEPM": "HEPM", "CLT": "CLT", "CDT": "CDT", "GMT": "GMT", "HEEG": "HEEG", "SAST": "SAST", "EDT": "EDT", "AEST": "AEST", "UYT": "UYT", "HNPM": "HNPM", "VET": "VET", "TMT": "TMT", "BOT": "BOT", "CST": "CST", "ART": "ART", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "UYST": "UYST", "COT": "COT", "CLST": "CLST", "AKST": "AKST", "HNPMX": "HNPMX", "WAT": "WAT", "WIB": "WIB", "EAT": "EAT", "HNT": "HNT", "CAT": "CAT", "CHAST": "CHAST", "WARST": "WARST", "LHST": "LHST"}, - } - } -  -@@ -128,7 +103,7 @@ func (se *se_SE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (se *se_SE) MonthsAbbreviated() []string { -- return se.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +113,7 @@ func (se *se_SE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (se *se_SE) MonthsNarrow() []string { -- return se.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +123,7 @@ func (se *se_SE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (se *se_SE) MonthsWide() []string { -- return se.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,81 +169,13 @@ func (se *se_SE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'se_SE' and handles both Whole and Real numbers based on 'v' - func (se *se_SE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'se_SE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (se *se_SE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, se.percentSuffix...) -- -- b = append(b, se.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'se_SE' -@@ -276,60 +183,7 @@ func (se *se_SE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := se.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, se.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, se.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'se_SE' -@@ -338,67 +192,7 @@ func (se *se_SE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := se.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, se.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(se.group) - 1; j >= 0; j-- { -- b = append(b, se.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(se.minus) - 1; j >= 0; j-- { -- b = append(b, se.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, se.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, se.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, se.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'se_SE' -@@ -406,28 +200,6 @@ func (se *se_SE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -436,17 +208,6 @@ func (se *se_SE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,17 +216,6 @@ func (se *se_SE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -474,19 +224,6 @@ func (se *se_SE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, se.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, se.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -495,19 +232,6 @@ func (se *se_SE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -516,26 +240,6 @@ func (se *se_SE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -544,30 +248,6 @@ func (se *se_SE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -576,34 +256,5 @@ func (se *se_SE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, se.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := se.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/seh/seh.go b/seh/seh.go -index aac213f..e01958a 100644 ---- a/seh/seh.go -+++ b/seh/seh.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Antes de Cristo", "Anno Domini"}, -- timezones: map[string]string{"JDT": "JDT", "HNEG": "HNEG", "ECT": "ECT", "WIT": "WIT", "BT": "BT", "ACWST": "ACWST", "COT": "COT", "HEPMX": "HEPMX", "HAT": "HAT", "AEST": "AEST", "UYT": "UYT", "MESZ": "MESZ", "NZDT": "NZDT", "ChST": "ChST", "ACST": "ACST", "HNCU": "HNCU", "MDT": "MDT", "AKDT": "AKDT", "GYT": "GYT", "COST": "COST", "CST": "CST", "UYST": "UYST", "HADT": "HADT", "WESZ": "WESZ", "HNOG": "HNOG", "LHST": "LHST", "LHDT": "LHDT", "BOT": "BOT", "MST": "MST", "ACWDT": "ACWDT", "AWDT": "AWDT", "HKT": "HKT", "HNPM": "HNPM", "NZST": "NZST", "WARST": "WARST", "AKST": "AKST", "WEZ": "WEZ", "SAST": "SAST", "GFT": "GFT", "TMT": "TMT", "WAST": "WAST", "OEZ": "OEZ", "WIB": "WIB", "HEOG": "HEOG", "HKST": "HKST", "JST": "JST", "EAT": "EAT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "ADT": "ADT", "HAST": "HAST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "EST": "EST", "TMST": "TMST", "SGT": "SGT", "EDT": "EDT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "HECU": "HECU", "VET": "VET", "ART": "ART", "CLST": "CLST", "AEDT": "AEDT", "AWST": "AWST", "WITA": "WITA", "HEPM": "HEPM", "CLT": "CLT", "HEEG": "HEEG", "OESZ": "OESZ", "WART": "WART", "PDT": "PDT", "ARST": "ARST", "MEZ": "MEZ", "IST": "IST", "GMT": "GMT", "CDT": "CDT", "AST": "AST", "MYT": "MYT", "HNT": "HNT", "CAT": "CAT", "WAT": "WAT", "SRT": "SRT", "PST": "PST", "CHADT": "CHADT"}, -+ timezones: map[string]string{"EST": "EST", "CAT": "CAT", "CLST": "CLST", "HEPM": "HEPM", "NZST": "NZST", "GMT": "GMT", "JST": "JST", "GFT": "GFT", "NZDT": "NZDT", "AWST": "AWST", "ACWDT": "ACWDT", "HNCU": "HNCU", "OESZ": "OESZ", "ECT": "ECT", "AKDT": "AKDT", "HNT": "HNT", "MEZ": "MEZ", "LHDT": "LHDT", "UYT": "UYT", "EAT": "EAT", "HNPM": "HNPM", "AKST": "AKST", "OEZ": "OEZ", "HEOG": "HEOG", "WITA": "WITA", "AST": "AST", "ChST": "ChST", "WIB": "WIB", "CST": "CST", "MST": "MST", "HEEG": "HEEG", "PST": "PST", "WESZ": "WESZ", "LHST": "LHST", "CHAST": "CHAST", "HNOG": "HNOG", "SAST": "SAST", "HKT": "HKT", "CLT": "CLT", "ADT": "ADT", "JDT": "JDT", "TMST": "TMST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNEG": "HNEG", "WEZ": "WEZ", "HNPMX": "HNPMX", "HAT": "HAT", "WART": "WART", "HKST": "HKST", "CDT": "CDT", "CHADT": "CHADT", "UYST": "UYST", "AEST": "AEST", "AEDT": "AEDT", "WIT": "WIT", "ART": "ART", "ARST": "ARST", "SRT": "SRT", "HADT": "HADT", "AWDT": "AWDT", "IST": "IST", "VET": "VET", "SGT": "SGT", "WAT": "WAT", "WAST": "WAST", "COT": "COT", "TMT": "TMT", "ACST": "ACST", "BT": "BT", "GYT": "GYT", "BOT": "BOT", "ACDT": "ACDT", "MYT": "MYT", "WARST": "WARST", "ACWST": "ACWST", "PDT": "PDT", "HECU": "HECU", "∅∅∅": "∅∅∅", "COST": "COST", "EDT": "EDT", "HAST": "HAST", "MESZ": "MESZ", "MDT": "MDT", "HEPMX": "HEPMX"}, - } - } -  -diff --git a/seh_MZ/seh_MZ.go b/seh_MZ/seh_MZ.go -index 051da38..4538334 100644 ---- a/seh_MZ/seh_MZ.go -+++ b/seh_MZ/seh_MZ.go -@@ -42,24 +42,13 @@ type seh_MZ struct { - // New returns a new instance of translator for the 'seh_MZ' locale - func New() locales.Translator { - return &seh_MZ{ -- locale: "seh_MZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Aug", "Set", "Otu", "Nov", "Dec"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janeiro", "Fevreiro", "Marco", "Abril", "Maio", "Junho", "Julho", "Augusto", "Setembro", "Otubro", "Novembro", "Decembro"}, -- daysAbbreviated: []string{"Dim", "Pos", "Pir", "Tat", "Nai", "Sha", "Sab"}, -- daysNarrow: []string{"D", "P", "C", "T", "N", "S", "S"}, -- daysWide: []string{"Dimingu", "Chiposi", "Chipiri", "Chitatu", "Chinai", "Chishanu", "Sabudu"}, -- erasAbbreviated: []string{"AC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Antes de Cristo", "Anno Domini"}, -- timezones: map[string]string{"WITA": "WITA", "MST": "MST", "VET": "VET", "ACWDT": "ACWDT", "HNPM": "HNPM", "ACST": "ACST", "HNNOMX": "HNNOMX", "HECU": "HECU", "UYST": "UYST", "ART": "ART", "JST": "JST", "ACDT": "ACDT", "OESZ": "OESZ", "GMT": "GMT", "EST": "EST", "HEPMX": "HEPMX", "AWDT": "AWDT", "WAST": "WAST", "SGT": "SGT", "HAST": "HAST", "HAT": "HAT", "PST": "PST", "WIT": "WIT", "HKT": "HKT", "CHADT": "CHADT", "MESZ": "MESZ", "HNPMX": "HNPMX", "CST": "CST", "CDT": "CDT", "CLT": "CLT", "HNOG": "HNOG", "PDT": "PDT", "ACWST": "ACWST", "HEPM": "HEPM", "CHAST": "CHAST", "NZST": "NZST", "WESZ": "WESZ", "AEDT": "AEDT", "∅∅∅": "∅∅∅", "ADT": "ADT", "AKST": "AKST", "LHDT": "LHDT", "SAST": "SAST", "COST": "COST", "SRT": "SRT", "HNT": "HNT", "NZDT": "NZDT", "CLST": "CLST", "AKDT": "AKDT", "ARST": "ARST", "UYT": "UYT", "BT": "BT", "AEST": "AEST", "HNEG": "HNEG", "CAT": "CAT", "WARST": "WARST", "COT": "COT", "MYT": "MYT", "WEZ": "WEZ", "AWST": "AWST", "LHST": "LHST", "IST": "IST", "ECT": "ECT", "HENOMX": "HENOMX", "WIB": "WIB", "HKST": "HKST", "GFT": "GFT", "ChST": "ChST", "MDT": "MDT", "AST": "AST", "TMST": "TMST", "BOT": "BOT", "EDT": "EDT", "GYT": "GYT", "JDT": "JDT", "OEZ": "OEZ", "HNCU": "HNCU", "HEOG": "HEOG", "HADT": "HADT", "MEZ": "MEZ", "TMT": "TMT", "HEEG": "HEEG", "EAT": "EAT", "WAT": "WAT", "WART": "WART"}, -+ locale: "seh_MZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "HNEG": "HNEG", "UYST": "UYST", "CHAST": "CHAST", "WESZ": "WESZ", "CLST": "CLST", "ARST": "ARST", "EAT": "EAT", "HAST": "HAST", "HKST": "HKST", "LHST": "LHST", "HEPM": "HEPM", "WIB": "WIB", "CHADT": "CHADT", "WEZ": "WEZ", "HNCU": "HNCU", "WIT": "WIT", "COT": "COT", "CLT": "CLT", "NZDT": "NZDT", "OESZ": "OESZ", "HNT": "HNT", "HNNOMX": "HNNOMX", "JDT": "JDT", "HNPMX": "HNPMX", "ADT": "ADT", "HNPM": "HNPM", "GFT": "GFT", "ACDT": "ACDT", "HENOMX": "HENOMX", "AEST": "AEST", "WAT": "WAT", "WARST": "WARST", "GYT": "GYT", "HEOG": "HEOG", "EDT": "EDT", "AKDT": "AKDT", "SAST": "SAST", "MEZ": "MEZ", "JST": "JST", "VET": "VET", "HAT": "HAT", "MDT": "MDT", "HADT": "HADT", "∅∅∅": "∅∅∅", "EST": "EST", "TMT": "TMT", "NZST": "NZST", "PDT": "PDT", "ACWDT": "ACWDT", "AEDT": "AEDT", "WITA": "WITA", "CST": "CST", "ECT": "ECT", "IST": "IST", "MYT": "MYT", "UYT": "UYT", "PST": "PST", "HECU": "HECU", "WART": "WART", "HNOG": "HNOG", "SRT": "SRT", "AWST": "AWST", "WAST": "WAST", "MST": "MST", "AST": "AST", "ART": "ART", "BOT": "BOT", "COST": "COST", "TMST": "TMST", "CAT": "CAT", "CDT": "CDT", "HEPMX": "HEPMX", "GMT": "GMT", "ChST": "ChST", "ACST": "ACST", "BT": "BT", "MESZ": "MESZ", "AWDT": "AWDT", "SGT": "SGT", "OEZ": "OEZ", "HKT": "HKT", "HEEG": "HEEG", "LHDT": "LHDT", "AKST": "AKST"}, - } - } -  -@@ -112,7 +101,7 @@ func (seh *seh_MZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (seh *seh_MZ) MonthsAbbreviated() []string { -- return seh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (seh *seh_MZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (seh *seh_MZ) MonthsNarrow() []string { -- return seh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (seh *seh_MZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (seh *seh_MZ) MonthsWide() []string { -- return seh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,54 +181,7 @@ func (seh *seh_MZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := seh.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, seh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, seh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, seh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, seh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'seh_MZ' -@@ -248,61 +190,7 @@ func (seh *seh_MZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := seh.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, seh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, seh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, seh.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, seh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'seh_MZ' -@@ -310,17 +198,6 @@ func (seh *seh_MZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -329,19 +206,6 @@ func (seh *seh_MZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, seh.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -350,19 +214,6 @@ func (seh *seh_MZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, seh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,21 +222,6 @@ func (seh *seh_MZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, seh.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- b = append(b, seh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0x64, 0x65}...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -394,19 +230,6 @@ func (seh *seh_MZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -415,26 +238,6 @@ func (seh *seh_MZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -443,30 +246,6 @@ func (seh *seh_MZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -475,34 +254,5 @@ func (seh *seh_MZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, seh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := seh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ses/ses.go b/ses/ses.go -index 2542204..9035096 100644 ---- a/ses/ses.go -+++ b/ses/ses.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"IJ", "IZ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Isaa jine", "Isaa zamanoo"}, -- timezones: map[string]string{"NZST": "NZST", "JST": "JST", "WAST": "WAST", "WIB": "WIB", "ART": "ART", "LHDT": "LHDT", "ACST": "ACST", "EAT": "EAT", "WART": "WART", "GMT": "GMT", "CDT": "CDT", "HNOG": "HNOG", "SAST": "SAST", "HNPMX": "HNPMX", "AST": "AST", "GYT": "GYT", "HEPMX": "HEPMX", "HAT": "HAT", "LHST": "LHST", "JDT": "JDT", "GFT": "GFT", "TMT": "TMT", "WARST": "WARST", "EST": "EST", "AWST": "AWST", "CHAST": "CHAST", "BOT": "BOT", "MEZ": "MEZ", "CLT": "CLT", "HNCU": "HNCU", "CST": "CST", "∅∅∅": "∅∅∅", "SGT": "SGT", "AKST": "AKST", "AKDT": "AKDT", "ADT": "ADT", "AEST": "AEST", "ChST": "ChST", "COT": "COT", "HEOG": "HEOG", "AEDT": "AEDT", "HKST": "HKST", "MESZ": "MESZ", "MYT": "MYT", "WIT": "WIT", "HNEG": "HNEG", "BT": "BT", "HNT": "HNT", "HEPM": "HEPM", "NZDT": "NZDT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "UYST": "UYST", "PDT": "PDT", "WITA": "WITA", "WESZ": "WESZ", "ARST": "ARST", "ECT": "ECT", "COST": "COST", "HECU": "HECU", "MDT": "MDT", "HADT": "HADT", "WEZ": "WEZ", "PST": "PST", "CHADT": "CHADT", "CLST": "CLST", "ACDT": "ACDT", "OEZ": "OEZ", "OESZ": "OESZ", "MST": "MST", "CAT": "CAT", "UYT": "UYT", "SRT": "SRT", "AWDT": "AWDT", "HKT": "HKT", "HNPM": "HNPM", "IST": "IST", "WAT": "WAT", "HENOMX": "HENOMX", "EDT": "EDT", "VET": "VET", "ACWST": "ACWST", "TMST": "TMST", "HAST": "HAST", "ACWDT": "ACWDT"}, -+ timezones: map[string]string{"WITA": "WITA", "NZDT": "NZDT", "WIB": "WIB", "HAST": "HAST", "LHDT": "LHDT", "TMST": "TMST", "CDT": "CDT", "BOT": "BOT", "AWDT": "AWDT", "VET": "VET", "GYT": "GYT", "CST": "CST", "ECT": "ECT", "HNNOMX": "HNNOMX", "ADT": "ADT", "SRT": "SRT", "HNPM": "HNPM", "CHADT": "CHADT", "HECU": "HECU", "WAST": "WAST", "HNOG": "HNOG", "HEPM": "HEPM", "UYST": "UYST", "TMT": "TMT", "MST": "MST", "NZST": "NZST", "HNEG": "HNEG", "HEEG": "HEEG", "JST": "JST", "WARST": "WARST", "CAT": "CAT", "ARST": "ARST", "MEZ": "MEZ", "ACST": "ACST", "AKDT": "AKDT", "WART": "WART", "EDT": "EDT", "HADT": "HADT", "AKST": "AKST", "HENOMX": "HENOMX", "WESZ": "WESZ", "HNT": "HNT", "MYT": "MYT", "BT": "BT", "CHAST": "CHAST", "HNCU": "HNCU", "WAT": "WAT", "SAST": "SAST", "AWST": "AWST", "LHST": "LHST", "AEST": "AEST", "HNPMX": "HNPMX", "CLT": "CLT", "AEDT": "AEDT", "COST": "COST", "EST": "EST", "JDT": "JDT", "PDT": "PDT", "HEPMX": "HEPMX", "HEOG": "HEOG", "HKT": "HKT", "ChST": "ChST", "ART": "ART", "ACDT": "ACDT", "IST": "IST", "ACWST": "ACWST", "CLST": "CLST", "GFT": "GFT", "AST": "AST", "GMT": "GMT", "ACWDT": "ACWDT", "UYT": "UYT", "∅∅∅": "∅∅∅", "SGT": "SGT", "OESZ": "OESZ", "HAT": "HAT", "COT": "COT", "HKST": "HKST", "MDT": "MDT", "EAT": "EAT", "MESZ": "MESZ", "PST": "PST", "WEZ": "WEZ", "OEZ": "OEZ", "WIT": "WIT"}, - } - } -  -diff --git a/ses_ML/ses_ML.go b/ses_ML/ses_ML.go -index b73dddc..a82b828 100644 ---- a/ses_ML/ses_ML.go -+++ b/ses_ML/ses_ML.go -@@ -42,25 +42,13 @@ type ses_ML struct { - // New returns a new instance of translator for the 'ses_ML' locale - func New() locales.Translator { - return &ses_ML{ -- locale: "ses_ML", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Žan", "Fee", "Mar", "Awi", "Me", "Žuw", "Žuy", "Ut", "Sek", "Okt", "Noo", "Dee"}, -- monthsNarrow: []string{"", "Ž", "F", "M", "A", "M", "Ž", "Ž", "U", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Žanwiye", "Feewiriye", "Marsi", "Awiril", "Me", "Žuweŋ", "Žuyye", "Ut", "Sektanbur", "Oktoobur", "Noowanbur", "Deesanbur"}, -- daysAbbreviated: []string{"Alh", "Ati", "Ata", "Ala", "Alm", "Alz", "Asi"}, -- daysNarrow: []string{"H", "T", "T", "L", "L", "L", "S"}, -- daysWide: []string{"Alhadi", "Atinni", "Atalaata", "Alarba", "Alhamiisa", "Alzuma", "Asibti"}, -- periodsAbbreviated: []string{"Adduha", "Aluula"}, -- periodsWide: []string{"Adduha", "Aluula"}, -- erasAbbreviated: []string{"IJ", "IZ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Isaa jine", "Isaa zamanoo"}, -- timezones: map[string]string{"MESZ": "MESZ", "TMT": "TMT", "HADT": "HADT", "NZST": "NZST", "JDT": "JDT", "BOT": "BOT", "WIT": "WIT", "WEZ": "WEZ", "WESZ": "WESZ", "HAT": "HAT", "HEPM": "HEPM", "HEEG": "HEEG", "HNPMX": "HNPMX", "WIB": "WIB", "HNT": "HNT", "MEZ": "MEZ", "IST": "IST", "JST": "JST", "ChST": "ChST", "ECT": "ECT", "GMT": "GMT", "HNCU": "HNCU", "MDT": "MDT", "UYST": "UYST", "AST": "AST", "HAST": "HAST", "AWDT": "AWDT", "LHST": "LHST", "CHADT": "CHADT", "SAST": "SAST", "WAST": "WAST", "HECU": "HECU", "PST": "PST", "ACWST": "ACWST", "WAT": "WAT", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "CDT": "CDT", "ADT": "ADT", "GYT": "GYT", "HEOG": "HEOG", "AWST": "AWST", "HKST": "HKST", "HNEG": "HNEG", "AKST": "AKST", "VET": "VET", "AEDT": "AEDT", "OESZ": "OESZ", "WART": "WART", "MYT": "MYT", "BT": "BT", "PDT": "PDT", "HNPM": "HNPM", "CAT": "CAT", "COT": "COT", "SRT": "SRT", "NZDT": "NZDT", "GFT": "GFT", "ACWDT": "ACWDT", "ARST": "ARST", "HNOG": "HNOG", "WITA": "WITA", "OEZ": "OEZ", "LHDT": "LHDT", "TMST": "TMST", "AKDT": "AKDT", "ART": "ART", "AEST": "AEST", "CLT": "CLT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "EDT": "EDT", "HKT": "HKT", "WARST": "WARST", "MST": "MST", "EST": "EST", "CHAST": "CHAST", "CLST": "CLST", "∅∅∅": "∅∅∅", "ACST": "ACST", "EAT": "EAT", "COST": "COST", "SGT": "SGT", "UYT": "UYT", "CST": "CST"}, -+ locale: "ses_ML", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HKT": "HKT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "COST": "COST", "TMST": "TMST", "CAT": "CAT", "CLST": "CLST", "ADT": "ADT", "EAT": "EAT", "PST": "PST", "HEPM": "HEPM", "ACWDT": "ACWDT", "VET": "VET", "HECU": "HECU", "COT": "COT", "MST": "MST", "SRT": "SRT", "HNEG": "HNEG", "WIB": "WIB", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "WITA": "WITA", "CHAST": "CHAST", "CHADT": "CHADT", "AST": "AST", "ChST": "ChST", "AEST": "AEST", "HADT": "HADT", "AWST": "AWST", "JDT": "JDT", "PDT": "PDT", "BT": "BT", "GMT": "GMT", "MDT": "MDT", "HAST": "HAST", "EDT": "EDT", "WARST": "WARST", "HKST": "HKST", "ECT": "ECT", "MEZ": "MEZ", "HEPMX": "HEPMX", "OEZ": "OEZ", "TMT": "TMT", "HNPM": "HNPM", "JST": "JST", "EST": "EST", "WESZ": "WESZ", "WAT": "WAT", "WIT": "WIT", "NZDT": "NZDT", "ARST": "ARST", "HEEG": "HEEG", "LHDT": "LHDT", "CDT": "CDT", "MYT": "MYT", "ACWST": "ACWST", "HEOG": "HEOG", "UYT": "UYT", "OESZ": "OESZ", "HAT": "HAT", "GYT": "GYT", "CST": "CST", "AEDT": "AEDT", "SGT": "SGT", "AKST": "AKST", "HNCU": "HNCU", "AKDT": "AKDT", "SAST": "SAST", "HNOG": "HNOG", "MESZ": "MESZ", "ACST": "ACST", "IST": "IST", "UYST": "UYST", "WART": "WART", "WEZ": "WEZ", "GFT": "GFT", "HNT": "HNT", "CLT": "CLT", "NZST": "NZST", "BOT": "BOT", "AWDT": "AWDT", "LHST": "LHST", "ART": "ART", "ACDT": "ACDT", "WAST": "WAST"}, - } - } -  -@@ -106,7 +94,7 @@ func (ses *ses_ML) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ses *ses_ML) MonthsAbbreviated() []string { -- return ses.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -116,7 +104,7 @@ func (ses *ses_ML) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ses *ses_ML) MonthsNarrow() []string { -- return ses.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -126,7 +114,7 @@ func (ses *ses_ML) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ses *ses_ML) MonthsWide() []string { -- return ses.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -186,56 +174,7 @@ func (ses *ses_ML) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ses.currencies[currency] -- l := len(s) + len(symbol) + 0 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ses.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ses.group) - 1; j >= 0; j-- { -- b = append(b, ses.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ses.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ses.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ses_ML' -@@ -244,63 +183,7 @@ func (ses *ses_ML) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ses.currencies[currency] -- l := len(s) + len(symbol) + 0 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ses.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(ses.group) - 1; j >= 0; j-- { -- b = append(b, ses.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, ses.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ses.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ses_ML' -@@ -308,17 +191,6 @@ func (ses *ses_ML) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -327,17 +199,6 @@ func (ses *ses_ML) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ses.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -346,17 +207,6 @@ func (ses *ses_ML) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ses.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -365,19 +215,6 @@ func (ses *ses_ML) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ses.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ses.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -386,19 +223,6 @@ func (ses *ses_ML) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -407,26 +231,6 @@ func (ses *ses_ML) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -435,30 +239,6 @@ func (ses *ses_ML) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -467,34 +247,5 @@ func (ses *ses_ML) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ses.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ses.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sg/sg.go b/sg/sg.go -index 2d2b04b..18e57b2 100644 ---- a/sg/sg.go -+++ b/sg/sg.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KnK", "NpK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kôzo na Krîstu", "Na pekô tî Krîstu"}, -- timezones: map[string]string{"UYT": "UYT", "WESZ": "WESZ", "IST": "IST", "CLT": "CLT", "OEZ": "OEZ", "HECU": "HECU", "WIT": "WIT", "AEDT": "AEDT", "AWST": "AWST", "MESZ": "MESZ", "HNCU": "HNCU", "HNPMX": "HNPMX", "PDT": "PDT", "LHST": "LHST", "JST": "JST", "EAT": "EAT", "∅∅∅": "∅∅∅", "HEOG": "HEOG", "WITA": "WITA", "HEPM": "HEPM", "NZDT": "NZDT", "GMT": "GMT", "HNOG": "HNOG", "SAST": "SAST", "OESZ": "OESZ", "WARST": "WARST", "MDT": "MDT", "HADT": "HADT", "ACWST": "ACWST", "WEZ": "WEZ", "HEEG": "HEEG", "PST": "PST", "NZST": "NZST", "BOT": "BOT", "ECT": "ECT", "HENOMX": "HENOMX", "EST": "EST", "GYT": "GYT", "HKST": "HKST", "HNEG": "HNEG", "TMT": "TMT", "ACST": "ACST", "CAT": "CAT", "CDT": "CDT", "AST": "AST", "ADT": "ADT", "MYT": "MYT", "HKT": "HKT", "TMST": "TMST", "ChST": "ChST", "WAST": "WAST", "MST": "MST", "UYST": "UYST", "ARST": "ARST", "HNPM": "HNPM", "LHDT": "LHDT", "WART": "WART", "COT": "COT", "WIB": "WIB", "HAST": "HAST", "COST": "COST", "GFT": "GFT", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "SRT": "SRT", "HNT": "HNT", "AEST": "AEST", "AWDT": "AWDT", "WAT": "WAT", "SGT": "SGT", "EDT": "EDT", "AKST": "AKST", "ART": "ART", "CHADT": "CHADT", "AKDT": "AKDT", "BT": "BT", "ACWDT": "ACWDT", "CLST": "CLST", "CST": "CST", "HAT": "HAT", "MEZ": "MEZ", "VET": "VET", "CHAST": "CHAST", "JDT": "JDT", "ACDT": "ACDT"}, -+ timezones: map[string]string{"AEDT": "AEDT", "VET": "VET", "∅∅∅": "∅∅∅", "ACST": "ACST", "ECT": "ECT", "MESZ": "MESZ", "MYT": "MYT", "JST": "JST", "LHST": "LHST", "SGT": "SGT", "CAT": "CAT", "CLST": "CLST", "ADT": "ADT", "HNEG": "HNEG", "WIT": "WIT", "ChST": "ChST", "HNT": "HNT", "HADT": "HADT", "LHDT": "LHDT", "WEZ": "WEZ", "WAT": "WAT", "AKST": "AKST", "SRT": "SRT", "EAT": "EAT", "GYT": "GYT", "WITA": "WITA", "MST": "MST", "AST": "AST", "HENOMX": "HENOMX", "AWST": "AWST", "PDT": "PDT", "HEPMX": "HEPMX", "COST": "COST", "CLT": "CLT", "WARST": "WARST", "COT": "COT", "ART": "ART", "GMT": "GMT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "WAST": "WAST", "AKDT": "AKDT", "UYT": "UYT", "OESZ": "OESZ", "CST": "CST", "AWDT": "AWDT", "AEST": "AEST", "EDT": "EDT", "NZDT": "NZDT", "WIB": "WIB", "CHADT": "CHADT", "HECU": "HECU", "HAT": "HAT", "TMST": "TMST", "EST": "EST", "NZST": "NZST", "ACDT": "ACDT", "HNPM": "HNPM", "BT": "BT", "CHAST": "CHAST", "WART": "WART", "HNOG": "HNOG", "ACWST": "ACWST", "WESZ": "WESZ", "HKST": "HKST", "MDT": "MDT", "HAST": "HAST", "UYST": "UYST", "HNCU": "HNCU", "HNPMX": "HNPMX", "OEZ": "OEZ", "GFT": "GFT", "TMT": "TMT", "CDT": "CDT", "BOT": "BOT", "HEEG": "HEEG", "MEZ": "MEZ", "JDT": "JDT", "IST": "IST", "PST": "PST", "SAST": "SAST", "ARST": "ARST", "HEPM": "HEPM", "HEOG": "HEOG", "HKT": "HKT"}, - } - } -  -diff --git a/sg_CF/sg_CF.go b/sg_CF/sg_CF.go -index 3648394..ad8b56d 100644 ---- a/sg_CF/sg_CF.go -+++ b/sg_CF/sg_CF.go -@@ -42,26 +42,13 @@ type sg_CF struct { - // New returns a new instance of translator for the 'sg_CF' locale - func New() locales.Translator { - return &sg_CF{ -- locale: "sg_CF", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: ".", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Nye", "Ful", "Mbä", "Ngu", "Bêl", "Fön", "Len", "Kük", "Mvu", "Ngb", "Nab", "Kak"}, -- monthsNarrow: []string{"", "N", "F", "M", "N", "B", "F", "L", "K", "M", "N", "N", "K"}, -- monthsWide: []string{"", "Nyenye", "Fulundïgi", "Mbängü", "Ngubùe", "Bêläwü", "Föndo", "Lengua", "Kükürü", "Mvuka", "Ngberere", "Nabändüru", "Kakauka"}, -- daysAbbreviated: []string{"Bk1", "Bk2", "Bk3", "Bk4", "Bk5", "Lâp", "Lây"}, -- daysNarrow: []string{"K", "S", "T", "S", "K", "P", "Y"}, -- daysWide: []string{"Bikua-ôko", "Bïkua-ûse", "Bïkua-ptâ", "Bïkua-usïö", "Bïkua-okü", "Lâpôsö", "Lâyenga"}, -- periodsAbbreviated: []string{"ND", "LK"}, -- periodsWide: []string{"ND", "LK"}, -- erasAbbreviated: []string{"KnK", "NpK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kôzo na Krîstu", "Na pekô tî Krîstu"}, -- timezones: map[string]string{"HKT": "HKT", "CLST": "CLST", "SGT": "SGT", "HNCU": "HNCU", "HAT": "HAT", "WIT": "WIT", "BT": "BT", "MESZ": "MESZ", "JST": "JST", "TMT": "TMT", "CST": "CST", "HNOG": "HNOG", "HEPM": "HEPM", "ACST": "ACST", "WIB": "WIB", "HAST": "HAST", "UYT": "UYT", "PDT": "PDT", "WITA": "WITA", "JDT": "JDT", "ECT": "ECT", "MST": "MST", "LHDT": "LHDT", "ARST": "ARST", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "AWDT": "AWDT", "NZDT": "NZDT", "IST": "IST", "∅∅∅": "∅∅∅", "HNT": "HNT", "HEOG": "HEOG", "SAST": "SAST", "CLT": "CLT", "WAT": "WAT", "CDT": "CDT", "WARST": "WARST", "EST": "EST", "UYST": "UYST", "HADT": "HADT", "HNEG": "HNEG", "EAT": "EAT", "CAT": "CAT", "WART": "WART", "WAST": "WAST", "OEZ": "OEZ", "GMT": "GMT", "AKST": "AKST", "AWST": "AWST", "CHAST": "CHAST", "CHADT": "CHADT", "GFT": "GFT", "VET": "VET", "WESZ": "WESZ", "HKST": "HKST", "COT": "COT", "HECU": "HECU", "WEZ": "WEZ", "HNPMX": "HNPMX", "EDT": "EDT", "ADT": "ADT", "ACDT": "ACDT", "OESZ": "OESZ", "COST": "COST", "MDT": "MDT", "AKDT": "AKDT", "MYT": "MYT", "SRT": "SRT", "ACWST": "ACWST", "BOT": "BOT", "TMST": "TMST", "ChST": "ChST", "HEPMX": "HEPMX", "PST": "PST", "HEEG": "HEEG", "AST": "AST", "AEDT": "AEDT", "HNPM": "HNPM", "LHST": "LHST", "NZST": "NZST", "ART": "ART", "AEST": "AEST", "MEZ": "MEZ", "HENOMX": "HENOMX", "GYT": "GYT"}, -+ locale: "sg_CF", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPM": "HNPM", "JDT": "JDT", "AWST": "AWST", "UYST": "UYST", "HNT": "HNT", "HNOG": "HNOG", "NZST": "NZST", "LHDT": "LHDT", "OESZ": "OESZ", "WIT": "WIT", "EST": "EST", "MDT": "MDT", "WART": "WART", "ART": "ART", "HAST": "HAST", "HECU": "HECU", "CDT": "CDT", "CHADT": "CHADT", "IST": "IST", "∅∅∅": "∅∅∅", "COST": "COST", "HKST": "HKST", "EDT": "EDT", "ECT": "ECT", "HENOMX": "HENOMX", "AKDT": "AKDT", "GFT": "GFT", "CLT": "CLT", "MST": "MST", "TMST": "TMST", "HEPM": "HEPM", "WAT": "WAT", "GMT": "GMT", "MEZ": "MEZ", "BT": "BT", "GYT": "GYT", "AEST": "AEST", "HEPMX": "HEPMX", "SAST": "SAST", "NZDT": "NZDT", "LHST": "LHST", "WEZ": "WEZ", "ACWDT": "ACWDT", "AEDT": "AEDT", "UYT": "UYT", "SGT": "SGT", "WARST": "WARST", "COT": "COT", "ADT": "ADT", "ACWST": "ACWST", "PST": "PST", "CHAST": "CHAST", "WAST": "WAST", "HAT": "HAT", "TMT": "TMT", "MESZ": "MESZ", "ARST": "ARST", "HADT": "HADT", "EAT": "EAT", "HEEG": "HEEG", "AKST": "AKST", "OEZ": "OEZ", "HEOG": "HEOG", "CST": "CST", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "PDT": "PDT", "HNPMX": "HNPMX", "WESZ": "WESZ", "HKT": "HKT", "ChST": "ChST", "ACST": "ACST", "HNEG": "HNEG", "MYT": "MYT", "JST": "JST", "VET": "VET", "HNCU": "HNCU", "CLST": "CLST", "CAT": "CAT", "WIB": "WIB", "AST": "AST", "WITA": "WITA", "BOT": "BOT", "SRT": "SRT", "ACDT": "ACDT"}, - } - } -  -@@ -107,7 +94,7 @@ func (sg *sg_CF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sg *sg_CF) MonthsAbbreviated() []string { -- return sg.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -117,7 +104,7 @@ func (sg *sg_CF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sg *sg_CF) MonthsNarrow() []string { -- return sg.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -127,7 +114,7 @@ func (sg *sg_CF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sg *sg_CF) MonthsWide() []string { -- return sg.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -187,56 +174,7 @@ func (sg *sg_CF) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sg.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, sg.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sg_CF' -@@ -245,64 +183,7 @@ func (sg *sg_CF) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sg.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sg.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sg.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, sg.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sg.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sg_CF' -@@ -310,17 +191,6 @@ func (sg *sg_CF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -329,17 +199,6 @@ func (sg *sg_CF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sg.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -348,17 +207,6 @@ func (sg *sg_CF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -367,19 +215,6 @@ func (sg *sg_CF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sg.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sg.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -388,19 +223,6 @@ func (sg *sg_CF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -409,26 +231,6 @@ func (sg *sg_CF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -437,30 +239,6 @@ func (sg *sg_CF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -469,34 +247,5 @@ func (sg *sg_CF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sg.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sg.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/shi/shi.go b/shi/shi.go -index f2c293b..dc4886a 100644 ---- a/shi/shi.go -+++ b/shi/shi.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ⴷⴰⵄ", "ⴷⴼⵄ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ⴷⴰⵜ ⵏ ⵄⵉⵙⴰ", "ⴷⴼⴼⵉⵔ ⵏ ⵄⵉⵙⴰ"}, -- timezones: map[string]string{"HEOG": "HEOG", "WITA": "WITA", "MESZ": "MESZ", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "GYT": "GYT", "SRT": "SRT", "TMT": "TMT", "COT": "COT", "AST": "AST", "HNOG": "HNOG", "ACWST": "ACWST", "JDT": "JDT", "CAT": "CAT", "MST": "MST", "WIB": "WIB", "PST": "PST", "AEDT": "AEDT", "HKT": "HKT", "HKST": "HKST", "LHST": "LHST", "WAT": "WAT", "AKDT": "AKDT", "HNCU": "HNCU", "HNPM": "HNPM", "NZDT": "NZDT", "TMST": "TMST", "WARST": "WARST", "AWST": "AWST", "MDT": "MDT", "ART": "ART", "IST": "IST", "EST": "EST", "HADT": "HADT", "CLT": "CLT", "BOT": "BOT", "HNPMX": "HNPMX", "PDT": "PDT", "HAT": "HAT", "AEST": "AEST", "AWDT": "AWDT", "HEPM": "HEPM", "NZST": "NZST", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "EAT": "EAT", "HENOMX": "HENOMX", "ECT": "ECT", "ChST": "ChST", "OESZ": "OESZ", "EDT": "EDT", "HNEG": "HNEG", "HEEG": "HEEG", "WAST": "WAST", "ADT": "ADT", "UYST": "UYST", "CST": "CST", "CHAST": "CHAST", "ACST": "ACST", "OEZ": "OEZ", "WART": "WART", "MYT": "MYT", "CLST": "CLST", "ACWDT": "ACWDT", "CDT": "CDT", "WIT": "WIT", "ARST": "ARST", "HNT": "HNT", "MEZ": "MEZ", "HECU": "HECU", "AKST": "AKST", "BT": "BT", "COST": "COST", "SGT": "SGT", "VET": "VET", "WESZ": "WESZ", "GFT": "GFT", "GMT": "GMT", "WEZ": "WEZ", "HAST": "HAST", "LHDT": "LHDT", "CHADT": "CHADT", "SAST": "SAST", "JST": "JST", "UYT": "UYT"}, -+ timezones: map[string]string{"JST": "JST", "BT": "BT", "ACWDT": "ACWDT", "UYST": "UYST", "HAT": "HAT", "GMT": "GMT", "HNNOMX": "HNNOMX", "WAST": "WAST", "OESZ": "OESZ", "HNOG": "HNOG", "CLST": "CLST", "HADT": "HADT", "LHDT": "LHDT", "MYT": "MYT", "AKDT": "AKDT", "WIT": "WIT", "HEOG": "HEOG", "EDT": "EDT", "SRT": "SRT", "IST": "IST", "AEDT": "AEDT", "MESZ": "MESZ", "PDT": "PDT", "WESZ": "WESZ", "HNT": "HNT", "HNCU": "HNCU", "WART": "WART", "EAT": "EAT", "HNPM": "HNPM", "HEPM": "HEPM", "ACWST": "ACWST", "CDT": "CDT", "AST": "AST", "LHST": "LHST", "OEZ": "OEZ", "HKST": "HKST", "HNEG": "HNEG", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "TMST": "TMST", "CAT": "CAT", "MDT": "MDT", "HKT": "HKT", "CST": "CST", "HAST": "HAST", "ACDT": "ACDT", "AWST": "AWST", "JDT": "JDT", "WEZ": "WEZ", "VET": "VET", "COST": "COST", "WIB": "WIB", "AEST": "AEST", "WITA": "WITA", "NZDT": "NZDT", "MEZ": "MEZ", "CHADT": "CHADT", "HEPMX": "HEPMX", "AKST": "AKST", "GFT": "GFT", "TMT": "TMT", "MST": "MST", "HECU": "HECU", "WAT": "WAT", "COT": "COT", "EST": "EST", "NZST": "NZST", "ART": "ART", "HEEG": "HEEG", "UYT": "UYT", "SGT": "SGT", "HNPMX": "HNPMX", "WARST": "WARST", "CLT": "CLT", "ADT": "ADT", "ACST": "ACST", "HENOMX": "HENOMX", "PST": "PST", "CHAST": "CHAST", "SAST": "SAST", "GYT": "GYT", "ECT": "ECT", "ChST": "ChST", "ARST": "ARST", "BOT": "BOT"}, - } - } -  -diff --git a/shi_Latn/shi_Latn.go b/shi_Latn/shi_Latn.go -index 3432279..d2a9ecd 100644 ---- a/shi_Latn/shi_Latn.go -+++ b/shi_Latn/shi_Latn.go -@@ -60,7 +60,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"daɛ", "dfɛ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"dat n ɛisa", "dffir n ɛisa"}, -- timezones: map[string]string{"NZDT": "NZDT", "CLST": "CLST", "ChST": "ChST", "GYT": "GYT", "CAT": "CAT", "WART": "WART", "AWDT": "AWDT", "JST": "JST", "HNEG": "HNEG", "ACST": "ACST", "MDT": "MDT", "UYST": "UYST", "AKST": "AKST", "AST": "AST", "ADT": "ADT", "ACDT": "ACDT", "HECU": "HECU", "CST": "CST", "WIB": "WIB", "SRT": "SRT", "HAT": "HAT", "WITA": "WITA", "∅∅∅": "∅∅∅", "COT": "COT", "HNT": "HNT", "AWST": "AWST", "CHADT": "CHADT", "HEEG": "HEEG", "BT": "BT", "LHDT": "LHDT", "EDT": "EDT", "PST": "PST", "UYT": "UYT", "HADT": "HADT", "WIT": "WIT", "HEPM": "HEPM", "MESZ": "MESZ", "CHAST": "CHAST", "ECT": "ECT", "MST": "MST", "IST": "IST", "ARST": "ARST", "HKST": "HKST", "WAT": "WAT", "WARST": "WARST", "HNPMX": "HNPMX", "MYT": "MYT", "AEDT": "AEDT", "CLT": "CLT", "HENOMX": "HENOMX", "HNCU": "HNCU", "HNOG": "HNOG", "NZST": "NZST", "TMST": "TMST", "SGT": "SGT", "AEST": "AEST", "HKT": "HKT", "EST": "EST", "HEOG": "HEOG", "WAST": "WAST", "COST": "COST", "VET": "VET", "HNPM": "HNPM", "SAST": "SAST", "JDT": "JDT", "BOT": "BOT", "GFT": "GFT", "AKDT": "AKDT", "WEZ": "WEZ", "WESZ": "WESZ", "ART": "ART", "LHST": "LHST", "OESZ": "OESZ", "GMT": "GMT", "EAT": "EAT", "OEZ": "OEZ", "HEPMX": "HEPMX", "ACWST": "ACWST", "MEZ": "MEZ", "TMT": "TMT", "HNNOMX": "HNNOMX", "PDT": "PDT", "ACWDT": "ACWDT", "CDT": "CDT", "HAST": "HAST"}, -+ timezones: map[string]string{"ACWST": "ACWST", "HECU": "HECU", "AKST": "AKST", "AKDT": "AKDT", "COST": "COST", "ChST": "ChST", "JST": "JST", "JDT": "JDT", "HEPMX": "HEPMX", "WITA": "WITA", "MST": "MST", "WIB": "WIB", "PST": "PST", "VET": "VET", "HAST": "HAST", "HEEG": "HEEG", "AWST": "AWST", "ACWDT": "ACWDT", "HNT": "HNT", "GYT": "GYT", "EAT": "EAT", "HENOMX": "HENOMX", "CHAST": "CHAST", "UYT": "UYT", "WARST": "WARST", "COT": "COT", "HEOG": "HEOG", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "WAST": "WAST", "LHDT": "LHDT", "MYT": "MYT", "PDT": "PDT", "ACDT": "ACDT", "CST": "CST", "AEDT": "AEDT", "SGT": "SGT", "HNPMX": "HNPMX", "WART": "WART", "WIT": "WIT", "HNOG": "HNOG", "HKST": "HKST", "ACST": "ACST", "AWDT": "AWDT", "HEPM": "HEPM", "WAT": "WAT", "NZST": "NZST", "IST": "IST", "HNCU": "HNCU", "GFT": "GFT", "BOT": "BOT", "HADT": "HADT", "LHST": "LHST", "EST": "EST", "ARST": "ARST", "SRT": "SRT", "SAST": "SAST", "TMT": "TMT", "MDT": "MDT", "GMT": "GMT", "ART": "ART", "MESZ": "MESZ", "BT": "BT", "UYST": "UYST", "OEZ": "OEZ", "EDT": "EDT", "CLT": "CLT", "CLST": "CLST", "ADT": "ADT", "CHADT": "CHADT", "OESZ": "OESZ", "NZDT": "NZDT", "HNPM": "HNPM", "AEST": "AEST", "WESZ": "WESZ", "HAT": "HAT", "HKT": "HKT", "TMST": "TMST", "CDT": "CDT", "ECT": "ECT", "HNEG": "HNEG", "CAT": "CAT", "AST": "AST", "HNNOMX": "HNNOMX"}, - } - } -  -diff --git a/shi_Latn_MA/shi_Latn_MA.go b/shi_Latn_MA/shi_Latn_MA.go -index a700ccd..b1ee035 100644 ---- a/shi_Latn_MA/shi_Latn_MA.go -+++ b/shi_Latn_MA/shi_Latn_MA.go -@@ -42,25 +42,13 @@ type shi_Latn_MA struct { - // New returns a new instance of translator for the 'shi_Latn_MA' locale - func New() locales.Translator { - return &shi_Latn_MA{ -- locale: "shi_Latn_MA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ⵉⵏⵏ", "ⴱⵕⴰ", "ⵎⴰⵕ", "ⵉⴱⵔ", "ⵎⴰⵢ", "ⵢⵓⵏ", "ⵢⵓⵍ", "ⵖⵓⵛ", "ⵛⵓⵜ", "ⴽⵜⵓ", "ⵏⵓⵡ", "ⴷⵓⵊ"}, -- monthsNarrow: []string{"", "ⵉ", "ⴱ", "ⵎ", "ⵉ", "ⵎ", "ⵢ", "ⵢ", "ⵖ", "ⵛ", "ⴽ", "ⵏ", "ⴷ"}, -- monthsWide: []string{"", "ⵉⵏⵏⴰⵢⵔ", "ⴱⵕⴰⵢⵕ", "ⵎⴰⵕⵚ", "ⵉⴱⵔⵉⵔ", "ⵎⴰⵢⵢⵓ", "ⵢⵓⵏⵢⵓ", "ⵢⵓⵍⵢⵓⵣ", "ⵖⵓⵛⵜ", "ⵛⵓⵜⴰⵏⴱⵉⵔ", "ⴽⵜⵓⴱⵔ", "ⵏⵓⵡⴰⵏⴱⵉⵔ", "ⴷⵓⵊⴰⵏⴱⵉⵔ"}, -- daysAbbreviated: []string{"ⴰⵙⴰ", "ⴰⵢⵏ", "ⴰⵙⵉ", "ⴰⴽⵕ", "ⴰⴽⵡ", "ⴰⵙⵉⵎ", "ⴰⵙⵉⴹ"}, -- daysWide: []string{"ⴰⵙⴰⵎⴰⵙ", "ⴰⵢⵏⴰⵙ", "ⴰⵙⵉⵏⴰⵙ", "ⴰⴽⵕⴰⵙ", "ⴰⴽⵡⴰⵙ", "ⵙⵉⵎⵡⴰⵙ", "ⴰⵙⵉⴹⵢⴰⵙ"}, -- periodsAbbreviated: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- periodsWide: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- erasAbbreviated: []string{"ⴷⴰⵄ", "ⴷⴼⵄ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ⴷⴰⵜ ⵏ ⵄⵉⵙⴰ", "ⴷⴼⴼⵉⵔ ⵏ ⵄⵉⵙⴰ"}, -- timezones: map[string]string{"CHAST": "CHAST", "SGT": "SGT", "OESZ": "OESZ", "GYT": "GYT", "HAT": "HAT", "ART": "ART", "CAT": "CAT", "WAT": "WAT", "HKT": "HKT", "NZDT": "NZDT", "MST": "MST", "AKDT": "AKDT", "MEZ": "MEZ", "NZST": "NZST", "HEPMX": "HEPMX", "WIT": "WIT", "IST": "IST", "HNEG": "HNEG", "EAT": "EAT", "WARST": "WARST", "WITA": "WITA", "LHST": "LHST", "WAST": "WAST", "EDT": "EDT", "HENOMX": "HENOMX", "BT": "BT", "SRT": "SRT", "HEPM": "HEPM", "MESZ": "MESZ", "LHDT": "LHDT", "COT": "COT", "CLST": "CLST", "JDT": "JDT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "PDT": "PDT", "AEST": "AEST", "CHADT": "CHADT", "SAST": "SAST", "CST": "CST", "HADT": "HADT", "HNPMX": "HNPMX", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "ChST": "ChST", "TMT": "TMT", "GMT": "GMT", "HECU": "HECU", "AEDT": "AEDT", "BOT": "BOT", "ACST": "ACST", "WART": "WART", "HNCU": "HNCU", "CDT": "CDT", "HEOG": "HEOG", "HNT": "HNT", "HKST": "HKST", "COST": "COST", "UYST": "UYST", "AKST": "AKST", "HAST": "HAST", "AWDT": "AWDT", "GFT": "GFT", "ECT": "ECT", "MDT": "MDT", "MYT": "MYT", "UYT": "UYT", "WEZ": "WEZ", "WESZ": "WESZ", "AWST": "AWST", "EST": "EST", "CLT": "CLT", "JST": "JST", "ACDT": "ACDT", "OEZ": "OEZ", "WIB": "WIB", "HNOG": "HNOG", "ARST": "ARST", "TMST": "TMST", "ADT": "ADT", "VET": "VET", "PST": "PST", "ACWST": "ACWST", "HNPM": "HNPM", "AST": "AST"}, -+ locale: "shi_Latn_MA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "CHAST": "CHAST", "CHADT": "CHADT", "WARST": "WARST", "COST": "COST", "HKT": "HKT", "ChST": "ChST", "ECT": "ECT", "HNNOMX": "HNNOMX", "ACST": "ACST", "ACDT": "ACDT", "WAST": "WAST", "AKST": "AKST", "COT": "COT", "CAT": "CAT", "UYST": "UYST", "VET": "VET", "PST": "PST", "HEPMX": "HEPMX", "WESZ": "WESZ", "SGT": "SGT", "CST": "CST", "ART": "ART", "ARST": "ARST", "MEZ": "MEZ", "WAT": "WAT", "HNPMX": "HNPMX", "HAT": "HAT", "CDT": "CDT", "ACWST": "ACWST", "AEDT": "AEDT", "NZST": "NZST", "BOT": "BOT", "MYT": "MYT", "HNCU": "HNCU", "ADT": "ADT", "JST": "JST", "IST": "IST", "AEST": "AEST", "HECU": "HECU", "WIT": "WIT", "HNT": "HNT", "HNOG": "HNOG", "HEEG": "HEEG", "HNPM": "HNPM", "ACWDT": "ACWDT", "UYT": "UYT", "OEZ": "OEZ", "SAST": "SAST", "CLT": "CLT", "GMT": "GMT", "TMST": "TMST", "HAST": "HAST", "HENOMX": "HENOMX", "WEZ": "WEZ", "WART": "WART", "GYT": "GYT", "EST": "EST", "WITA": "WITA", "SRT": "SRT", "EAT": "EAT", "HADT": "HADT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "WIB": "WIB", "MST": "MST", "MDT": "MDT", "AST": "AST", "JDT": "JDT", "PDT": "PDT", "GFT": "GFT", "TMT": "TMT", "EDT": "EDT", "NZDT": "NZDT", "AKDT": "AKDT", "CLST": "CLST", "AWST": "AWST", "BT": "BT", "OESZ": "OESZ", "HEPM": "HEPM", "AWDT": "AWDT", "LHST": "LHST", "HEOG": "HEOG", "HKST": "HKST", "LHDT": "LHDT"}, - } - } -  -@@ -116,7 +104,7 @@ func (shi *shi_Latn_MA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (shi *shi_Latn_MA) MonthsAbbreviated() []string { -- return shi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +114,7 @@ func (shi *shi_Latn_MA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (shi *shi_Latn_MA) MonthsNarrow() []string { -- return shi.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +124,7 @@ func (shi *shi_Latn_MA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (shi *shi_Latn_MA) MonthsWide() []string { -- return shi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +184,7 @@ func (shi *shi_Latn_MA) FmtCurrency(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := shi.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, shi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(shi.group) - 1; j >= 0; j-- { -- b = append(b, shi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, shi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, shi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'shi_Latn_MA' -@@ -254,63 +193,7 @@ func (shi *shi_Latn_MA) FmtAccounting(num float64, v uint64, currency currency.T -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := shi.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, shi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(shi.group) - 1; j >= 0; j-- { -- b = append(b, shi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, shi.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, shi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'shi_Latn_MA' -@@ -318,17 +201,6 @@ func (shi *shi_Latn_MA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -337,17 +209,6 @@ func (shi *shi_Latn_MA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -356,17 +217,6 @@ func (shi *shi_Latn_MA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -375,19 +225,6 @@ func (shi *shi_Latn_MA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, shi.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/shi_Tfng/shi_Tfng.go b/shi_Tfng/shi_Tfng.go -index 7267cb4..41ac9b4 100644 ---- a/shi_Tfng/shi_Tfng.go -+++ b/shi_Tfng/shi_Tfng.go -@@ -42,25 +42,13 @@ type shi_Tfng struct { - // New returns a new instance of translator for the 'shi_Tfng' locale - func New() locales.Translator { - return &shi_Tfng{ -- locale: "shi_Tfng", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ⵉⵏⵏ", "ⴱⵕⴰ", "ⵎⴰⵕ", "ⵉⴱⵔ", "ⵎⴰⵢ", "ⵢⵓⵏ", "ⵢⵓⵍ", "ⵖⵓⵛ", "ⵛⵓⵜ", "ⴽⵜⵓ", "ⵏⵓⵡ", "ⴷⵓⵊ"}, -- monthsNarrow: []string{"", "ⵉ", "ⴱ", "ⵎ", "ⵉ", "ⵎ", "ⵢ", "ⵢ", "ⵖ", "ⵛ", "ⴽ", "ⵏ", "ⴷ"}, -- monthsWide: []string{"", "ⵉⵏⵏⴰⵢⵔ", "ⴱⵕⴰⵢⵕ", "ⵎⴰⵕⵚ", "ⵉⴱⵔⵉⵔ", "ⵎⴰⵢⵢⵓ", "ⵢⵓⵏⵢⵓ", "ⵢⵓⵍⵢⵓⵣ", "ⵖⵓⵛⵜ", "ⵛⵓⵜⴰⵏⴱⵉⵔ", "ⴽⵜⵓⴱⵔ", "ⵏⵓⵡⴰⵏⴱⵉⵔ", "ⴷⵓⵊⴰⵏⴱⵉⵔ"}, -- daysAbbreviated: []string{"ⴰⵙⴰ", "ⴰⵢⵏ", "ⴰⵙⵉ", "ⴰⴽⵕ", "ⴰⴽⵡ", "ⴰⵙⵉⵎ", "ⴰⵙⵉⴹ"}, -- daysWide: []string{"ⴰⵙⴰⵎⴰⵙ", "ⴰⵢⵏⴰⵙ", "ⴰⵙⵉⵏⴰⵙ", "ⴰⴽⵕⴰⵙ", "ⴰⴽⵡⴰⵙ", "ⵙⵉⵎⵡⴰⵙ", "ⴰⵙⵉⴹⵢⴰⵙ"}, -- periodsAbbreviated: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- periodsWide: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- erasAbbreviated: []string{"ⴷⴰⵄ", "ⴷⴼⵄ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ⴷⴰⵜ ⵏ ⵄⵉⵙⴰ", "ⴷⴼⴼⵉⵔ ⵏ ⵄⵉⵙⴰ"}, -- timezones: map[string]string{"PDT": "PDT", "HNT": "HNT", "WITA": "WITA", "CLST": "CLST", "CAT": "CAT", "SGT": "SGT", "HECU": "HECU", "VET": "VET", "NZST": "NZST", "JDT": "JDT", "WAT": "WAT", "HAT": "HAT", "JST": "JST", "TMST": "TMST", "EAT": "EAT", "ECT": "ECT", "WART": "WART", "WARST": "WARST", "GMT": "GMT", "SAST": "SAST", "OESZ": "OESZ", "EST": "EST", "UYST": "UYST", "PST": "PST", "SRT": "SRT", "ARST": "ARST", "CHAST": "CHAST", "IST": "IST", "BOT": "BOT", "CST": "CST", "MDT": "MDT", "MESZ": "MESZ", "GFT": "GFT", "ACDT": "ACDT", "HEPMX": "HEPMX", "AKDT": "AKDT", "MYT": "MYT", "ART": "ART", "NZDT": "NZDT", "MEZ": "MEZ", "ACST": "ACST", "OEZ": "OEZ", "EDT": "EDT", "HADT": "HADT", "ChST": "ChST", "HNEG": "HNEG", "ACWDT": "ACWDT", "ACWST": "ACWST", "AWST": "AWST", "HNPM": "HNPM", "CLT": "CLT", "HEEG": "HEEG", "TMT": "TMT", "HAST": "HAST", "HEOG": "HEOG", "AEST": "AEST", "AEDT": "AEDT", "LHST": "LHST", "WIB": "WIB", "CHADT": "CHADT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "CDT": "CDT", "GYT": "GYT", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "WAST": "WAST", "COT": "COT", "COST": "COST", "HNNOMX": "HNNOMX", "BT": "BT", "WEZ": "WEZ", "WESZ": "WESZ", "AKST": "AKST", "ADT": "ADT", "MST": "MST", "HNOG": "HNOG", "HKT": "HKT", "HKST": "HKST", "HEPM": "HEPM", "LHDT": "LHDT", "HNCU": "HNCU", "UYT": "UYT", "WIT": "WIT", "AST": "AST"}, -+ locale: "shi_Tfng", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ART": "ART", "AWDT": "AWDT", "COT": "COT", "CLT": "CLT", "EAT": "EAT", "UYT": "UYT", "HENOMX": "HENOMX", "HECU": "HECU", "WAT": "WAT", "AKDT": "AKDT", "EST": "EST", "PDT": "PDT", "HNT": "HNT", "WITA": "WITA", "NZDT": "NZDT", "GMT": "GMT", "LHDT": "LHDT", "MYT": "MYT", "JDT": "JDT", "SGT": "SGT", "AKST": "AKST", "HAT": "HAT", "MEZ": "MEZ", "MST": "MST", "MDT": "MDT", "NZST": "NZST", "ECT": "ECT", "BT": "BT", "OEZ": "OEZ", "OESZ": "OESZ", "GFT": "GFT", "COST": "COST", "HEOG": "HEOG", "HNPMX": "HNPMX", "WAST": "WAST", "WIT": "WIT", "HNOG": "HNOG", "HKT": "HKT", "HKST": "HKST", "ARST": "ARST", "ACST": "ACST", "AWST": "AWST", "JST": "JST", "WART": "WART", "WARST": "WARST", "SAST": "SAST", "TMST": "TMST", "CLST": "CLST", "SRT": "SRT", "HNNOMX": "HNNOMX", "PST": "PST", "CHADT": "CHADT", "EDT": "EDT", "ChST": "ChST", "LHST": "LHST", "CHAST": "CHAST", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "CDT": "CDT", "WIB": "WIB", "BOT": "BOT", "ACDT": "ACDT", "HEEG": "HEEG", "IST": "IST", "ACWDT": "ACWDT", "WESZ": "WESZ", "HAST": "HAST", "MESZ": "MESZ", "HNEG": "HNEG", "HNPM": "HNPM", "UYST": "UYST", "WEZ": "WEZ", "HEPMX": "HEPMX", "CST": "CST", "HEPM": "HEPM", "VET": "VET", "CAT": "CAT", "HADT": "HADT", "ACWST": "ACWST", "AEST": "AEST", "AEDT": "AEDT", "GYT": "GYT", "TMT": "TMT", "AST": "AST", "ADT": "ADT"}, - } - } -  -@@ -116,7 +104,7 @@ func (shi *shi_Tfng) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (shi *shi_Tfng) MonthsAbbreviated() []string { -- return shi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +114,7 @@ func (shi *shi_Tfng) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (shi *shi_Tfng) MonthsNarrow() []string { -- return shi.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +124,7 @@ func (shi *shi_Tfng) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (shi *shi_Tfng) MonthsWide() []string { -- return shi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +184,7 @@ func (shi *shi_Tfng) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := shi.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, shi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(shi.group) - 1; j >= 0; j-- { -- b = append(b, shi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, shi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, shi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'shi_Tfng' -@@ -254,63 +193,7 @@ func (shi *shi_Tfng) FmtAccounting(num float64, v uint64, currency currency.Type -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := shi.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, shi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(shi.group) - 1; j >= 0; j-- { -- b = append(b, shi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, shi.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, shi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'shi_Tfng' -@@ -318,17 +201,6 @@ func (shi *shi_Tfng) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -337,17 +209,6 @@ func (shi *shi_Tfng) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -356,17 +217,6 @@ func (shi *shi_Tfng) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -375,19 +225,6 @@ func (shi *shi_Tfng) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, shi.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/shi_Tfng_MA/shi_Tfng_MA.go b/shi_Tfng_MA/shi_Tfng_MA.go -index 67a879f..812730a 100644 ---- a/shi_Tfng_MA/shi_Tfng_MA.go -+++ b/shi_Tfng_MA/shi_Tfng_MA.go -@@ -42,25 +42,13 @@ type shi_Tfng_MA struct { - // New returns a new instance of translator for the 'shi_Tfng_MA' locale - func New() locales.Translator { - return &shi_Tfng_MA{ -- locale: "shi_Tfng_MA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ⵉⵏⵏ", "ⴱⵕⴰ", "ⵎⴰⵕ", "ⵉⴱⵔ", "ⵎⴰⵢ", "ⵢⵓⵏ", "ⵢⵓⵍ", "ⵖⵓⵛ", "ⵛⵓⵜ", "ⴽⵜⵓ", "ⵏⵓⵡ", "ⴷⵓⵊ"}, -- monthsNarrow: []string{"", "ⵉ", "ⴱ", "ⵎ", "ⵉ", "ⵎ", "ⵢ", "ⵢ", "ⵖ", "ⵛ", "ⴽ", "ⵏ", "ⴷ"}, -- monthsWide: []string{"", "ⵉⵏⵏⴰⵢⵔ", "ⴱⵕⴰⵢⵕ", "ⵎⴰⵕⵚ", "ⵉⴱⵔⵉⵔ", "ⵎⴰⵢⵢⵓ", "ⵢⵓⵏⵢⵓ", "ⵢⵓⵍⵢⵓⵣ", "ⵖⵓⵛⵜ", "ⵛⵓⵜⴰⵏⴱⵉⵔ", "ⴽⵜⵓⴱⵔ", "ⵏⵓⵡⴰⵏⴱⵉⵔ", "ⴷⵓⵊⴰⵏⴱⵉⵔ"}, -- daysAbbreviated: []string{"ⴰⵙⴰ", "ⴰⵢⵏ", "ⴰⵙⵉ", "ⴰⴽⵕ", "ⴰⴽⵡ", "ⴰⵙⵉⵎ", "ⴰⵙⵉⴹ"}, -- daysWide: []string{"ⴰⵙⴰⵎⴰⵙ", "ⴰⵢⵏⴰⵙ", "ⴰⵙⵉⵏⴰⵙ", "ⴰⴽⵕⴰⵙ", "ⴰⴽⵡⴰⵙ", "ⵙⵉⵎⵡⴰⵙ", "ⴰⵙⵉⴹⵢⴰⵙ"}, -- periodsAbbreviated: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- periodsWide: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- erasAbbreviated: []string{"ⴷⴰⵄ", "ⴷⴼⵄ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ⴷⴰⵜ ⵏ ⵄⵉⵙⴰ", "ⴷⴼⴼⵉⵔ ⵏ ⵄⵉⵙⴰ"}, -- timezones: map[string]string{"AEST": "AEST", "JST": "JST", "ARST": "ARST", "HENOMX": "HENOMX", "MDT": "MDT", "AKST": "AKST", "HEPM": "HEPM", "ChST": "ChST", "OEZ": "OEZ", "WEZ": "WEZ", "WESZ": "WESZ", "ACWDT": "ACWDT", "MST": "MST", "BT": "BT", "WAT": "WAT", "HNPMX": "HNPMX", "ADT": "ADT", "WIT": "WIT", "CHAST": "CHAST", "MESZ": "MESZ", "CLT": "CLT", "∅∅∅": "∅∅∅", "UYT": "UYT", "VET": "VET", "HAST": "HAST", "ECT": "ECT", "AST": "AST", "CDT": "CDT", "NZDT": "NZDT", "COT": "COT", "COST": "COST", "HNCU": "HNCU", "HECU": "HECU", "AKDT": "AKDT", "PDT": "PDT", "IST": "IST", "GFT": "GFT", "CHADT": "CHADT", "GYT": "GYT", "HADT": "HADT", "AEDT": "AEDT", "CAT": "CAT", "AWST": "AWST", "HNEG": "HNEG", "ACST": "ACST", "WAST": "WAST", "HNNOMX": "HNNOMX", "WARST": "WARST", "HEOG": "HEOG", "JDT": "JDT", "BOT": "BOT", "HNPM": "HNPM", "LHST": "LHST", "GMT": "GMT", "AWDT": "AWDT", "CLST": "CLST", "SGT": "SGT", "HEPMX": "HEPMX", "ACWST": "ACWST", "ART": "ART", "HNOG": "HNOG", "LHDT": "LHDT", "HEEG": "HEEG", "EAT": "EAT", "EST": "EST", "MYT": "MYT", "TMT": "TMT", "TMST": "TMST", "EDT": "EDT", "SRT": "SRT", "HKT": "HKT", "NZST": "NZST", "MEZ": "MEZ", "SAST": "SAST", "WART": "WART", "CST": "CST", "UYST": "UYST", "WIB": "WIB", "HNT": "HNT", "HAT": "HAT", "HKST": "HKST", "ACDT": "ACDT", "OESZ": "OESZ", "WITA": "WITA", "PST": "PST"}, -+ locale: "shi_Tfng_MA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "JDT": "JDT", "GYT": "GYT", "CAT": "CAT", "CDT": "CDT", "EAT": "EAT", "AWDT": "AWDT", "GFT": "GFT", "WARST": "WARST", "HNEG": "HNEG", "JST": "JST", "NZST": "NZST", "SRT": "SRT", "MESZ": "MESZ", "BT": "BT", "AKDT": "AKDT", "MST": "MST", "GMT": "GMT", "ART": "ART", "WART": "WART", "LHDT": "LHDT", "VET": "VET", "AKST": "AKST", "HAT": "HAT", "TMST": "TMST", "ACWDT": "ACWDT", "ACST": "ACST", "ACDT": "ACDT", "ACWST": "ACWST", "AEST": "AEST", "HNT": "HNT", "HNOG": "HNOG", "WIB": "WIB", "AST": "AST", "AEDT": "AEDT", "UYT": "UYT", "WIT": "WIT", "ADT": "ADT", "LHST": "LHST", "HNCU": "HNCU", "SAST": "SAST", "HKST": "HKST", "BOT": "BOT", "HEEG": "HEEG", "AWST": "AWST", "IST": "IST", "HKT": "HKT", "EST": "EST", "CLST": "CLST", "HNPM": "HNPM", "CHAST": "CHAST", "SGT": "SGT", "WEZ": "WEZ", "WAT": "WAT", "CLT": "CLT", "NZDT": "NZDT", "ARST": "ARST", "COT": "COT", "COST": "COST", "HENOMX": "HENOMX", "WESZ": "WESZ", "PST": "PST", "HEOG": "HEOG", "MDT": "MDT", "HAST": "HAST", "MYT": "MYT", "ChST": "ChST", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "HECU": "HECU", "HEPM": "HEPM", "PDT": "PDT", "HEPMX": "HEPMX", "∅∅∅": "∅∅∅", "WAST": "WAST", "CST": "CST", "HADT": "HADT", "WITA": "WITA", "ECT": "ECT", "UYST": "UYST", "HNPMX": "HNPMX", "OEZ": "OEZ", "OESZ": "OESZ", "TMT": "TMT", "EDT": "EDT"}, - } - } -  -@@ -116,7 +104,7 @@ func (shi *shi_Tfng_MA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (shi *shi_Tfng_MA) MonthsAbbreviated() []string { -- return shi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +114,7 @@ func (shi *shi_Tfng_MA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (shi *shi_Tfng_MA) MonthsNarrow() []string { -- return shi.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +124,7 @@ func (shi *shi_Tfng_MA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (shi *shi_Tfng_MA) MonthsWide() []string { -- return shi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +184,7 @@ func (shi *shi_Tfng_MA) FmtCurrency(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := shi.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, shi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(shi.group) - 1; j >= 0; j-- { -- b = append(b, shi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, shi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, shi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'shi_Tfng_MA' -@@ -254,63 +193,7 @@ func (shi *shi_Tfng_MA) FmtAccounting(num float64, v uint64, currency currency.T -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := shi.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, shi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(shi.group) - 1; j >= 0; j-- { -- b = append(b, shi.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, shi.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, shi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'shi_Tfng_MA' -@@ -318,17 +201,6 @@ func (shi *shi_Tfng_MA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -337,17 +209,6 @@ func (shi *shi_Tfng_MA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -356,17 +217,6 @@ func (shi *shi_Tfng_MA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -375,19 +225,6 @@ func (shi *shi_Tfng_MA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, shi.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, shi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/si/si.go b/si/si.go -index 590e904..801e3d5 100644 ---- a/si/si.go -+++ b/si/si.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ක්\u200dරි.පූ.", "ක්\u200dරි.ව."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ක්\u200dරිස්තු පූර්ව", "ක්\u200dරිස්තු වර්ෂ"}, -- timezones: map[string]string{"HNCU": "කියුබානු සම්මත වේලාව", "EST": "උතුරු ඇමරිකානු නැගෙනහිර සම්මත වේලාව", "SRT": "සුරිනාම වේලාව", "AEST": "නැගෙනහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "HEPM": "ශාන්ත පියරේ සහ මැකෝලන් දිවාආලෝක වේලාව", "HKST": "හොංකොං ග්\u200dරීෂ්ම වේලාව", "MESZ": "මධ්\u200dයම යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "ChST": "චමොරෝ වේලාව", "ACST": "ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "HAST": "හවායි-අලෙයුතියාන් සම්මත වේලාව", "HNT": "නිව්ෆවුන්ලන්ත සම්මත වේලාව", "ART": "ආර්ජන්ටිනා සම්මත වේලාව", "SGT": "සිංගප්පුරු වේලාව", "WITA": "මධ්\u200dයම ඉන්දුනීසියානු වේලාව", "EAT": "නැගෙනහිර අප්\u200dරිකානු වේලාව", "HNNOMX": "වයඹ මෙක්සිකෝ සම්මත වේලාව", "WESZ": "බටහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "ARST": "ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "GFT": "ප්\u200dරංශ ගයනා වේලාව", "CAT": "මධ්\u200dයම අප්\u200dරිකානු වේලාව", "COT": "කොලොම්බියා සම්මත වේලාව", "AKST": "ඇලස්කා සම්මත වේලාව", "GYT": "ගයනා වේලාව", "BT": "භුතාන වේලාව", "∅∅∅": "ඇමර්සන් ග්\u200dරීෂ්ම කාලය", "OEZ": "නැගෙනහිර යුරෝපීය සම්මත වේලාව", "HEOG": "බටහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "MEZ": "මධ්\u200dයම යුරෝපීය සම්මත වේලාව", "IST": "ඉන්දියානු වේලාව", "COST": "කොලොම්බියා ග්\u200dරීෂ්ම කාලය", "UYT": "උරුගුවේ සම්මත වේලාව", "AST": "අත්ලාන්තික් සම්මත වේලාව", "LHST": "ලෝර්ඩ් හෝව් සම්මත වේලාව", "CLT": "චිලී සම්මත වේලාව", "EDT": "උතුරු ඇමරිකානු නැගෙනහිර දිවාආලෝක වේලාව", "MYT": "මැලේසියානු වේලාව", "WIB": "බටහිර ඉන්දුනීසියානු වේලාව", "NZST": "නවසීලන්ත සම්මත වේලාව", "HNPMX": "මෙක්සිකෝ පැසිෆික් සම්මත වේලාව", "HKT": "හොංකොං සම්මත වේලාව", "BOT": "බොලිවියා වේලාව", "TMT": "ටර්ක්මෙනිස්තාන සම්මත වේලාව", "ACWST": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු සම්මත වේලාව", "AWDT": "බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "HNPM": "ශාන්ත පියරේ සහ මැකෝලන් සම්මත වේලාව", "JST": "ජපාන සම්මත වේලාව", "JDT": "ජපාන දහවල් වේලාව", "ADT": "අත්ලාන්තික් දිවාආලෝක වේලාව", "MST": "උතුරු ඇමරිකානු කඳුකර සම්මත වේලාව", "PST": "උතුරු ඇමරිකානු පැසිෆික් සම්මත වේලාව", "HEEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "TMST": "ටර්ක්මෙනිස්තාන ග්\u200dරීෂ්ම වේලාව", "HENOMX": "වයඹ මෙක්සිකෝ දිවාආලෝක වේලාව", "ACWDT": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "AEDT": "නැඟෙනහිර ඕස්ට්\u200dරේලියානු දහවල් වේලාව", "AWST": "බටහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "WARST": "බටහිර ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "AKDT": "ඇලස්කා දිවාආලෝක වේලාව", "CST": "උතුරු ඇමරිකානු මධ්\u200dයම සම්මත වේලාව", "WEZ": "බටහිර යුරෝපීය සම්මත වේලාව", "GMT": "ග්\u200dරිනිච් මධ්\u200dයම වේලාව", "LHDT": "ලෝර්ඩ් හෝව් දිවා වේලාව", "SAST": "දකුණු අප්\u200dරිකානු වේලාව", "WAST": "බටහිර අප්\u200dරිකානු ග්\u200dරීෂ්ම කාලය", "HNOG": "බටහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "ACDT": "මධ්\u200dයම ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "HADT": "හවායි-අලෙයුතියාන් දිවාආලෝක වේලාව", "VET": "වෙනිසියුලා වේලාව", "WIT": "නැගෙනහිර ඉන්දුනීසියානු වේලාව", "HECU": "කියුබානු දිවාආලෝක වේලාව", "UYST": "උරුගුවේ ග්\u200dරීෂ්ම කාලය", "CLST": "චිලී ග්\u200dරීෂ්ම කාලය", "OESZ": "නැගෙනහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "WAT": "බටහිර අප්\u200dරිකානු සම්මත වේලාව", "WART": "බටහිර ආර්ජන්ටිනා සම්මත වේලාව", "HEPMX": "මෙක්සිකෝ පැසිෆික් දිවාආලෝක වේලාව", "HAT": "නිව්ෆවුන්ලන්ත දිවාආලෝක වේලාව", "CHADT": "චැතම් දිවා වේලාව", "HNEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "NZDT": "නවසීලන්ත දිවා වේලාව", "CHAST": "චැතම් සම්මත වේලාව", "ECT": "ඉක්වදෝර් වේලාව", "CDT": "උතුරු ඇමරිකානු මධ්\u200dයම දිවාආලෝක වේලාව", "MDT": "උතුරු ඇමරිකානු කඳුකර දිවාආලෝක වේලාව", "PDT": "උතුරු ඇමරිකානු පැසිෆික් දිවාආලෝක වේලාව"}, -+ timezones: map[string]string{"CAT": "මධ්\u200dයම අප්\u200dරිකානු වේලාව", "GMT": "ග්\u200dරිනිච් මධ්\u200dයම වේලාව", "MEZ": "මධ්\u200dයම යුරෝපීය සම්මත වේලාව", "LHST": "ලෝර්ඩ් හෝව් සම්මත වේලාව", "AEDT": "නැඟෙනහිර ඕස්ට්\u200dරේලියානු දහවල් වේලාව", "HNCU": "කියුබානු සම්මත වේලාව", "SAST": "දකුණු අප්\u200dරිකානු වේලාව", "HNOG": "බටහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "ARST": "ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "EAT": "නැගෙනහිර අප්\u200dරිකානු වේලාව", "HADT": "හවායි-අලෙයුතියාන් දිවාආලෝක වේලාව", "AWDT": "බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "LHDT": "ලෝර්ඩ් හෝව් දිවා වේලාව", "ACWDT": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "SGT": "සිංගප්පුරු වේලාව", "HECU": "කියුබානු දිවාආලෝක වේලාව", "TMST": "ටර්ක්මෙනිස්තාන ග්\u200dරීෂ්ම වේලාව", "AWST": "බටහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "PDT": "උතුරු ඇමරිකානු පැසිෆික් දිවාආලෝක වේලාව", "HNT": "නිව්ෆවුන්ලන්ත සම්මත වේලාව", "HAT": "නිව්ෆවුන්ලන්ත දිවාආලෝක වේලාව", "HEOG": "බටහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "CLST": "චිලී ග්\u200dරීෂ්ම කාලය", "NZST": "නවසීලන්ත සම්මත වේලාව", "VET": "වෙනිසියුලා වේලාව", "MDT": "MDT", "ECT": "ඉක්වදෝර් වේලාව", "HEEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "GFT": "ප්\u200dරංශ ගයනා වේලාව", "COST": "කොලොම්බියා ග්\u200dරීෂ්ම කාලය", "EST": "උතුරු ඇමරිකානු නැගෙනහිර සම්මත වේලාව", "CLT": "චිලී සම්මත වේලාව", "HNNOMX": "වයඹ මෙක්සිකෝ සම්මත වේලාව", "IST": "ඉන්දියානු වේලාව", "WARST": "බටහිර ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "HKST": "හොංකොං ග්\u200dරීෂ්ම වේලාව", "ADT": "අත්ලාන්තික් දිවාආලෝක වේලාව", "ART": "ආර්ජන්ටිනා සම්මත වේලාව", "HAST": "හවායි-අලෙයුතියාන් සම්මත වේලාව", "JDT": "ජපාන දහවල් වේලාව", "MYT": "මැලේසියානු වේලාව", "UYT": "උරුගුවේ සම්මත වේලාව", "ACWST": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු සම්මත වේලාව", "WAT": "බටහිර අප්\u200dරිකානු සම්මත වේලාව", "WIT": "නැගෙනහිර ඉන්දුනීසියානු වේලාව", "NZDT": "නවසීලන්ත දිවා වේලාව", "HNEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "HNPM": "ශාන්ත පියරේ සහ මැකෝලන් සම්මත වේලාව", "AEST": "නැගෙනහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "CHADT": "චැතම් දිවා වේලාව", "PST": "උතුරු ඇමරිකානු පැසිෆික් සම්මත වේලාව", "OESZ": "නැගෙනහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "∅∅∅": "බ්\u200dරසීල ග්\u200dරීෂ්ම කාලය", "MESZ": "මධ්\u200dයම යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "JST": "ජපාන සම්මත වේලාව", "UYST": "උරුගුවේ ග්\u200dරීෂ්ම කාලය", "BT": "භුතාන වේලාව", "HEPMX": "මෙක්සිකෝ පැසිෆික් දිවාආලෝක වේලාව", "TMT": "ටර්ක්මෙනිස්තාන සම්මත වේලාව", "ChST": "චමොරෝ වේලාව", "BOT": "බොලිවියා වේලාව", "WEZ": "බටහිර යුරෝපීය සම්මත වේලාව", "AKDT": "ඇලස්කා දිවාආලෝක වේලාව", "OEZ": "නැගෙනහිර යුරෝපීය සම්මත වේලාව", "WART": "බටහිර ආර්ජන්ටිනා සම්මත වේලාව", "GYT": "ගයනා වේලාව", "HKT": "හොංකොං සම්මත වේලාව", "CST": "උතුරු ඇමරිකානු මධ්\u200dයම සම්මත වේලාව", "SRT": "සුරිනාම වේලාව", "HENOMX": "වයඹ මෙක්සිකෝ දිවාආලෝක වේලාව", "WIB": "බටහිර ඉන්දුනීසියානු වේලාව", "CDT": "උතුරු ඇමරිකානු මධ්\u200dයම දිවාආලෝක වේලාව", "ACDT": "මධ්\u200dයම ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "CHAST": "චැතම් සම්මත වේලාව", "COT": "කොලොම්බියා සම්මත වේලාව", "WITA": "මධ්\u200dයම ඉන්දුනීසියානු වේලාව", "HEPM": "ශාන්ත පියරේ සහ මැකෝලන් දිවාආලෝක වේලාව", "WESZ": "බටහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "WAST": "බටහිර අප්\u200dරිකානු ග්\u200dරීෂ්ම කාලය", "AKST": "ඇලස්කා සම්මත වේලාව", "MST": "MST", "EDT": "උතුරු ඇමරිකානු නැගෙනහිර දිවාආලෝක වේලාව", "AST": "අත්ලාන්තික් සම්මත වේලාව", "ACST": "ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "HNPMX": "මෙක්සිකෝ පැසිෆික් සම්මත වේලාව"}, - } - } -  -diff --git a/si_LK/si_LK.go b/si_LK/si_LK.go -index c8c5b36..03cf5de 100644 ---- a/si_LK/si_LK.go -+++ b/si_LK/si_LK.go -@@ -10,68 +10,45 @@ import ( - ) -  - type si_LK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'si_LK' locale - func New() locales.Translator { - return &si_LK{ -- locale: "si_LK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ජන", "පෙබ", "මාර්තු", "අප්\u200dරේල්", "මැයි", "ජූනි", "ජූලි", "අගෝ", "සැප්", "ඔක්", "නොවැ", "දෙසැ"}, -- monthsNarrow: []string{"", "ජ", "පෙ", "මා", "අ", "මැ", "ජූ", "ජූ", "අ", "සැ", "ඔ", "නෙ", "දෙ"}, -- monthsWide: []string{"", "ජනවාරි", "පෙබරවාරි", "මාර්තු", "අප්\u200dරේල්", "මැයි", "ජූනි", "ජූලි", "අගෝස්තු", "සැප්තැම්බර්", "ඔක්තෝබර්", "නොවැම්බර්", "දෙසැම්බර්"}, -- daysAbbreviated: []string{"ඉරිදා", "සඳුදා", "අඟහ", "බදාදා", "බ්\u200dරහස්", "සිකු", "සෙන"}, -- daysNarrow: []string{"ඉ", "ස", "අ", "බ", "බ්\u200dර", "සි", "සෙ"}, -- daysShort: []string{"ඉරි", "සඳු", "අඟ", "බදා", "බ්\u200dරහ", "සිකු", "සෙන"}, -- daysWide: []string{"ඉරිදා", "සඳුදා", "අඟහරුවාදා", "බදාදා", "බ්\u200dරහස්පතින්දා", "සිකුරාදා", "සෙනසුරාදා"}, -- periodsAbbreviated: []string{"පෙ.ව.", "ප.ව."}, -- periodsNarrow: []string{"පෙ", "ප"}, -- periodsWide: []string{"පෙ.ව.", "ප.ව."}, -- erasAbbreviated: []string{"ක්\u200dරි.පූ.", "ක්\u200dරි.ව."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ක්\u200dරිස්තු පූර්ව", "ක්\u200dරිස්තු වර්ෂ"}, -- timezones: map[string]string{"WARST": "බටහිර ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "UYT": "උරුගුවේ සම්මත වේලාව", "ACWST": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු සම්මත වේලාව", "NZST": "නවසීලන්ත සම්මත වේලාව", "NZDT": "නවසීලන්ත දිවා වේලාව", "TMT": "ටර්ක්මෙනිස්තාන සම්මත වේලාව", "WART": "බටහිර ආර්ජන්ටිනා සම්මත වේලාව", "HNCU": "කියුබානු සම්මත වේලාව", "WESZ": "බටහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "ACWDT": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "LHDT": "ලෝර්ඩ් හෝව් දිවා වේලාව", "JDT": "ජපාන දහවල් වේලාව", "CST": "උතුරු ඇමරිකානු මධ්\u200dයම සම්මත වේලාව", "BT": "භුතාන වේලාව", "SRT": "සුරිනාම වේලාව", "PDT": "උතුරු ඇමරිකානු පැසිෆික් දිවාආලෝක වේලාව", "ECT": "ඉක්වදෝර් වේලාව", "AKDT": "ඇලස්කා දිවාආලෝක වේලාව", "ARST": "ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "AWDT": "බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "HEPM": "ශාන්ත පියරේ සහ මැකෝලන් දිවාආලෝක වේලාව", "TMST": "ටර්ක්මෙනිස්තාන ග්\u200dරීෂ්ම වේලාව", "SGT": "සිංගප්පුරු වේලාව", "UYST": "උරුගුවේ ග්\u200dරීෂ්ම කාලය", "ART": "ආර්ජන්ටිනා සම්මත වේලාව", "CHADT": "චැතම් දිවා වේලාව", "BOT": "බොලිවියා වේලාව", "ACDT": "මධ්\u200dයම ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "EAT": "නැගෙනහිර අප්\u200dරිකානු වේලාව", "HNNOMX": "වයඹ මෙක්සිකෝ සම්මත වේලාව", "AEDT": "නැඟෙනහිර ඕස්ට්\u200dරේලියානු දහවල් වේලාව", "HNEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "HECU": "කියුබානු දිවාආලෝක වේලාව", "MYT": "මැලේසියානු වේලාව", "HAST": "හවායි-අලෙයුතියාන් සම්මත වේලාව", "HNT": "නිව්ෆවුන්ලන්ත සම්මත වේලාව", "ACST": "ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "WAT": "බටහිර අප්\u200dරිකානු සම්මත වේලාව", "MST": "MST", "AST": "අත්ලාන්තික් සම්මත වේලාව", "VET": "වෙනිසියුලා වේලාව", "∅∅∅": "ඇසොර්ස් ග්\u200dරීෂ්ම වේලාව", "AKST": "ඇලස්කා සම්මත වේලාව", "JST": "ජපාන සම්මත වේලාව", "HEEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "WAST": "බටහිර අප්\u200dරිකානු ග්\u200dරීෂ්ම කාලය", "LHST": "ලෝර්ඩ් හෝව් සම්මත වේලාව", "OESZ": "නැගෙනහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "MDT": "MDT", "WEZ": "බටහිර යුරෝපීය සම්මත වේලාව", "AEST": "නැගෙනහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "HNPM": "ශාන්ත පියරේ සහ මැකෝලන් සම්මත වේලාව", "CHAST": "චැතම් සම්මත වේලාව", "IST": "ඉන්දියානු වේලාව", "SAST": "දකුණු අප්\u200dරිකානු වේලාව", "COT": "කොලොම්බියා සම්මත වේලාව", "GYT": "ගයනා වේලාව", "HADT": "හවායි-අලෙයුතියාන් දිවාආලෝක වේලාව", "HNOG": "බටහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "AWST": "බටහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "MEZ": "මධ්\u200dයම යුරෝපීය සම්මත වේලාව", "MESZ": "මධ්\u200dයම යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "CLST": "චිලී ග්\u200dරීෂ්ම කාලය", "WIT": "නැගෙනහිර ඉන්දුනීසියානු වේලාව", "GFT": "ප්\u200dරංශ ගයනා වේලාව", "OEZ": "නැගෙනහිර යුරෝපීය සම්මත වේලාව", "CAT": "මධ්\u200dයම අප්\u200dරිකානු වේලාව", "COST": "කොලොම්බියා ග්\u200dරීෂ්ම කාලය", "HENOMX": "වයඹ මෙක්සිකෝ දිවාආලෝක වේලාව", "GMT": "ග්\u200dරිනිච් මධ්\u200dයම වේලාව", "HNPMX": "මෙක්සිකෝ පැසිෆික් සම්මත වේලාව", "ADT": "අත්ලාන්තික් දිවාආලෝක වේලාව", "WIB": "බටහිර ඉන්දුනීසියානු වේලාව", "HEOG": "බටහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "ChST": "චමොරෝ වේලාව", "EST": "උතුරු ඇමරිකානු නැගෙනහිර සම්මත වේලාව", "EDT": "උතුරු ඇමරිකානු නැගෙනහිර දිවාආලෝක වේලාව", "CDT": "උතුරු ඇමරිකානු මධ්\u200dයම දිවාආලෝක වේලාව", "PST": "උතුරු ඇමරිකානු පැසිෆික් සම්මත වේලාව", "WITA": "මධ්\u200dයම ඉන්දුනීසියානු වේලාව", "HKT": "හොංකොං සම්මත වේලාව", "HKST": "හොංකොං ග්\u200dරීෂ්ම වේලාව", "HEPMX": "මෙක්සිකෝ පැසිෆික් දිවාආලෝක වේලාව", "HAT": "නිව්ෆවුන්ලන්ත දිවාආලෝක වේලාව", "CLT": "චිලී සම්මත වේලාව"}, -+ locale: "si_LK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLT": "CLT", "ECT": "ECT", "MST": "MST", "MEZ": "MEZ", "ACWST": "ACWST", "AKST": "AKST", "EDT": "EDT", "WART": "WART", "COST": "COST", "HNEG": "HNEG", "MESZ": "MESZ", "UYST": "UYST", "PDT": "PDT", "VET": "VET", "CLST": "CLST", "CST": "CST", "LHDT": "LHDT", "OESZ": "OESZ", "HEOG": "HEOG", "ACWDT": "ACWDT", "EAT": "EAT", "HEEG": "HEEG", "HKST": "HKST", "NZST": "NZST", "WIB": "WIB", "SRT": "SRT", "ACDT": "ACDT", "HNCU": "HNCU", "SAST": "SAST", "HKT": "HKT", "CAT": "CAT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "WIT": "WIT", "HNOG": "HNOG", "NZDT": "NZDT", "ADT": "ADT", "ACST": "ACST", "HNPMX": "HNPMX", "WESZ": "WESZ", "SGT": "SGT", "EST": "EST", "ARST": "ARST", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "HECU": "HECU", "HAT": "HAT", "AST": "AST", "GMT": "GMT", "WEZ": "WEZ", "OEZ": "OEZ", "HADT": "HADT", "HNPM": "HNPM", "JST": "JST", "UYT": "UYT", "CDT": "CDT", "BT": "BT", "AEST": "AEST", "IST": "IST", "GYT": "GYT", "TMT": "TMT", "AWST": "AWST", "CHAST": "CHAST", "HNT": "HNT", "AKDT": "AKDT", "MDT": "MDT", "ChST": "ChST", "BOT": "BOT", "MYT": "MYT", "AWDT": "AWDT", "LHST": "LHST", "WITA": "WITA", "AEDT": "AEDT", "PST": "PST", "COT": "COT", "TMST": "TMST", "JDT": "JDT", "CHADT": "CHADT", "WARST": "WARST", "GFT": "GFT", "ART": "ART", "HAST": "HAST", "HEPMX": "HEPMX", "WAT": "WAT", "WAST": "WAST"}, - } - } -  -@@ -139,7 +116,7 @@ func (si *si_LK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (si *si_LK) MonthsAbbreviated() []string { -- return si.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -149,7 +126,7 @@ func (si *si_LK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (si *si_LK) MonthsNarrow() []string { -- return si.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -159,7 +136,7 @@ func (si *si_LK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (si *si_LK) MonthsWide() []string { -- return si.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -205,73 +182,13 @@ func (si *si_LK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'si_LK' and handles both Whole and Real numbers based on 'v' - func (si *si_LK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, si.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, si.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, si.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'si_LK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (si *si_LK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, si.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, si.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, si.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'si_LK' -@@ -279,56 +196,7 @@ func (si *si_LK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := si.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, si.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, si.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, si.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, si.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'si_LK' -@@ -337,68 +205,7 @@ func (si *si_LK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := si.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, si.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, si.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, si.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, si.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, si.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'si_LK' -@@ -406,28 +213,6 @@ func (si *si_LK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -436,17 +221,6 @@ func (si *si_LK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, si.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -455,17 +229,6 @@ func (si *si_LK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, si.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -474,19 +237,6 @@ func (si *si_LK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, si.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, si.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -495,19 +245,6 @@ func (si *si_LK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -516,26 +253,6 @@ func (si *si_LK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -544,30 +261,6 @@ func (si *si_LK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -576,34 +269,5 @@ func (si *si_LK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := si.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sk/sk.go b/sk/sk.go -index 027af59..90e6f78 100644 ---- a/sk/sk.go -+++ b/sk/sk.go -@@ -75,7 +75,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"pred Kr.", "po Kr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"pred Kristom", "po Kristovi"}, -- timezones: map[string]string{"HEPM": "pierre-miquelonský letný čas", "GFT": "francúzskoguyanský čas", "HENOMX": "severozápadný mexický letný čas", "EST": "severoamerický východný štandardný čas", "CST": "severoamerický centrálny štandardný čas", "WIT": "východoindonézsky čas", "BT": "bhutánsky čas", "ARST": "argentínsky letný čas", "HNOG": "západogrónsky štandardný čas", "NZST": "novozélandský štandardný čas", "ChST": "chamorrský štandardný čas", "COST": "kolumbijský letný čas", "SRT": "surinamský čas", "WEZ": "západoeurópsky štandardný čas", "MEZ": "stredoeurópsky štandardný čas", "MESZ": "stredoeurópsky letný čas", "HNEG": "východogrónsky štandardný čas", "CAT": "stredoafrický čas", "WAT": "západoafrický štandardný čas", "EDT": "severoamerický východný letný čas", "MST": "MST", "UYST": "uruguajský letný čas", "HAST": "havajsko-aleutský štandardný čas", "WITA": "stredoindonézsky čas", "WARST": "západoargentínsky letný čas", "HECU": "kubánsky letný čas", "AKST": "aljašský štandardný čas", "AKDT": "aljašský letný čas", "HAT": "newfoundlandský letný čas", "SAST": "juhoafrický čas", "MYT": "malajzijský čas", "NZDT": "novozélandský letný čas", "CLT": "čilský štandardný čas", "EAT": "východoafrický čas", "MDT": "MDT", "VET": "venezuelský čas", "PDT": "severoamerický tichomorský letný čas", "ACWDT": "stredozápadný austrálsky letný čas", "HNT": "newfoundlandský štandardný čas", "AEST": "východoaustrálsky štandardný čas", "JDT": "japonský letný čas", "WAST": "západoafrický letný čas", "ART": "argentínsky štandardný čas", "AEDT": "východoaustrálsky letný čas", "OEZ": "východoeurópsky štandardný čas", "WART": "západoargentínsky štandardný čas", "CDT": "severoamerický centrálny letný čas", "GYT": "guyanský čas", "PST": "severoamerický tichomorský štandardný čas", "CHADT": "chathamský letný čas", "TMT": "turkménsky štandardný čas", "HNPMX": "mexický tichomorský štandardný čas", "WESZ": "západoeurópsky letný čas", "ACWST": "stredozápadný austrálsky štandardný čas", "TMST": "turkménsky letný čas", "HEOG": "západogrónsky letný čas", "COT": "kolumbijský štandardný čas", "UYT": "uruguajský štandardný čas", "AST": "atlantický štandardný čas", "AWDT": "západoaustrálsky letný čas", "HNPM": "pierre-miquelonský štandardný čas", "ACST": "stredoaustrálsky štandardný čas", "ECT": "ekvádorský čas", "HNNOMX": "severozápadný mexický štandardný čas", "GMT": "greenwichský čas", "SGT": "singapurský štandardný čas", "HKT": "hongkonský štandardný čas", "LHST": "štandardný čas ostrova lorda Howa", "LHDT": "letný čas ostrova lorda Howa", "CHAST": "chathamský štandardný čas", "JST": "japonský štandardný čas", "HEEG": "východogrónsky letný čas", "HEPMX": "mexický tichomorský letný čas", "WIB": "západoindonézsky čas", "CLST": "čilský letný čas", "∅∅∅": "amazonský letný čas", "BOT": "bolívijský čas", "ADT": "atlantický letný čas", "ACDT": "stredoaustrálsky letný čas", "OESZ": "východoeurópsky letný čas", "HNCU": "kubánsky štandardný čas", "IST": "indický čas", "HADT": "havajsko-aleutský letný čas", "AWST": "západoaustrálsky štandardný čas", "HKST": "hongkonský letný čas"}, -+ timezones: map[string]string{"MDT": "MDT", "HNNOMX": "severozápadný mexický štandardný čas", "AWDT": "západoaustrálsky letný čas", "CHADT": "chathamský letný čas", "UYT": "uruguajský štandardný čas", "HAT": "newfoundlandský letný čas", "HNOG": "západogrónsky štandardný čas", "AWST": "západoaustrálsky štandardný čas", "WESZ": "západoeurópsky letný čas", "GYT": "guyanský čas", "CLT": "čilský štandardný čas", "JST": "japonský štandardný čas", "COT": "kolumbijský štandardný čas", "WIB": "západoindonézsky čas", "ARST": "argentínsky letný čas", "HEPM": "pierre-miquelonský letný čas", "PST": "severoamerický tichomorský štandardný čas", "HECU": "kubánsky letný čas", "OESZ": "východoeurópsky letný čas", "COST": "kolumbijský letný čas", "AEST": "východoaustrálsky štandardný čas", "IST": "indický čas", "WEZ": "západoeurópsky štandardný čas", "SGT": "singapurský štandardný čas", "OEZ": "východoeurópsky štandardný čas", "ACWST": "stredozápadný austrálsky štandardný čas", "HKT": "hongkonský štandardný čas", "CLST": "čilský letný čas", "MYT": "malajzijský čas", "∅∅∅": "brazílsky letný čas", "SAST": "juhoafrický čas", "ART": "argentínsky štandardný čas", "HENOMX": "severozápadný mexický letný čas", "JDT": "japonský letný čas", "HEPMX": "mexický tichomorský letný čas", "AKST": "aljašský štandardný čas", "EST": "severoamerický východný štandardný čas", "MST": "MST", "CDT": "severoamerický centrálny letný čas", "ChST": "chamorrský štandardný čas", "HEEG": "východogrónsky letný čas", "AEDT": "východoaustrálsky letný čas", "NZDT": "novozélandský letný čas", "ECT": "ekvádorský čas", "HNEG": "východogrónsky štandardný čas", "ADT": "atlantický letný čas", "HADT": "havajsko-aleutský letný čas", "HNPM": "pierre-miquelonský štandardný čas", "PDT": "severoamerický tichomorský letný čas", "VET": "venezuelský čas", "HNCU": "kubánsky štandardný čas", "WART": "západoargentínsky štandardný čas", "BOT": "bolívijský čas", "CST": "severoamerický centrálny štandardný čas", "ACDT": "stredoaustrálsky letný čas", "CHAST": "chathamský štandardný čas", "WIT": "východoindonézsky čas", "TMST": "turkménsky letný čas", "HKST": "hongkonský letný čas", "NZST": "novozélandský štandardný čas", "SRT": "surinamský čas", "HAST": "havajsko-aleutský štandardný čas", "LHST": "štandardný čas ostrova lorda Howa", "GFT": "francúzskoguyanský čas", "EDT": "severoamerický východný letný čas", "BT": "bhutánsky čas", "ACWDT": "stredozápadný austrálsky letný čas", "HNPMX": "mexický tichomorský štandardný čas", "AKDT": "aljašský letný čas", "WARST": "západoargentínsky letný čas", "AST": "atlantický štandardný čas", "GMT": "greenwichský čas", "HNT": "newfoundlandský štandardný čas", "HEOG": "západogrónsky letný čas", "MEZ": "stredoeurópsky štandardný čas", "MESZ": "stredoeurópsky letný čas", "ACST": "stredoaustrálsky štandardný čas", "WAT": "západoafrický štandardný čas", "WAST": "západoafrický letný čas", "CAT": "stredoafrický čas", "EAT": "východoafrický čas", "LHDT": "letný čas ostrova lorda Howa", "UYST": "uruguajský letný čas", "TMT": "turkménsky štandardný čas", "WITA": "stredoindonézsky čas"}, - } - } -  -diff --git a/sk_SK/sk_SK.go b/sk_SK/sk_SK.go -index fee10ce..5a72470 100644 ---- a/sk_SK/sk_SK.go -+++ b/sk_SK/sk_SK.go -@@ -10,72 +10,45 @@ import ( - ) -  - type sk_SK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sk_SK' locale - func New() locales.Translator { - return &sk_SK{ -- locale: "sk_SK", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan", "feb", "mar", "apr", "máj", "jún", "júl", "aug", "sep", "okt", "nov", "dec"}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januára", "februára", "marca", "apríla", "mája", "júna", "júla", "augusta", "septembra", "októbra", "novembra", "decembra"}, -- daysAbbreviated: []string{"ne", "po", "ut", "st", "št", "pi", "so"}, -- daysNarrow: []string{"n", "p", "u", "s", "š", "p", "s"}, -- daysShort: []string{"ne", "po", "ut", "st", "št", "pi", "so"}, -- daysWide: []string{"nedeľa", "pondelok", "utorok", "streda", "štvrtok", "piatok", "sobota"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"pred Kr.", "po Kr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"pred Kristom", "po Kristovi"}, -- timezones: map[string]string{"AWDT": "západoaustrálsky letný čas", "CDT": "severoamerický centrálny letný čas", "AST": "atlantický štandardný čas", "WESZ": "západoeurópsky letný čas", "ACWDT": "stredozápadný austrálsky letný čas", "HNT": "newfoundlandský štandardný čas", "CHADT": "chathamský letný čas", "JDT": "japonský letný čas", "CAT": "stredoafrický čas", "WITA": "stredoindonézsky čas", "AEST": "východoaustrálsky štandardný čas", "CHAST": "chathamský štandardný čas", "HNPM": "pierre-miquelonský štandardný čas", "NZST": "novozélandský štandardný čas", "CST": "severoamerický centrálny štandardný čas", "WAT": "západoafrický štandardný čas", "COST": "kolumbijský letný čas", "HENOMX": "severozápadný mexický letný čas", "HEPMX": "mexický tichomorský letný čas", "ARST": "argentínsky letný čas", "HNOG": "západogrónsky štandardný čas", "MESZ": "stredoeurópsky letný čas", "OESZ": "východoeurópsky letný čas", "HNNOMX": "severozápadný mexický štandardný čas", "UYT": "uruguajský štandardný čas", "BT": "bhutánsky čas", "HKT": "hongkonský štandardný čas", "ChST": "chamorrský štandardný čas", "GYT": "guyanský čas", "UYST": "uruguajský letný čas", "MDT": "severoamerický horský letný čas", "WEZ": "západoeurópsky štandardný čas", "OEZ": "východoeurópsky štandardný čas", "TMT": "turkménsky štandardný čas", "WAST": "západoafrický letný čas", "AWST": "západoaustrálsky štandardný čas", "ACDT": "stredoaustrálsky letný čas", "EAT": "východoafrický čas", "COT": "kolumbijský štandardný čas", "MYT": "malajzijský čas", "MST": "severoamerický horský štandardný čas", "HEOG": "západogrónsky letný čas", "PDT": "severoamerický tichomorský letný čas", "HNEG": "východogrónsky štandardný čas", "SGT": "singapurský štandardný čas", "EST": "severoamerický východný štandardný čas", "HKST": "hongkonský letný čas", "AEDT": "východoaustrálsky letný čas", "HEPM": "pierre-miquelonský letný čas", "TMST": "turkménsky letný čas", "WARST": "západoargentínsky letný čas", "VET": "venezuelský čas", "WIT": "východoindonézsky čas", "NZDT": "novozélandský letný čas", "HAT": "newfoundlandský letný čas", "ECT": "ekvádorský čas", "WIB": "západoindonézsky čas", "HADT": "havajsko-aleutský letný čas", "SRT": "surinamský čas", "ADT": "atlantický letný čas", "HAST": "havajsko-aleutský štandardný čas", "PST": "severoamerický tichomorský štandardný čas", "GFT": "francúzskoguyanský čas", "IST": "indický čas", "WART": "západoargentínsky štandardný čas", "HECU": "kubánsky letný čas", "HNPMX": "mexický tichomorský štandardný čas", "AKST": "aljašský štandardný čas", "LHST": "štandardný čas ostrova lorda Howa", "ACST": "stredoaustrálsky štandardný čas", "GMT": "greenwichský čas", "MEZ": "stredoeurópsky štandardný čas", "SAST": "juhoafrický čas", "CLT": "čilský štandardný čas", "∅∅∅": "amazonský letný čas", "JST": "japonský štandardný čas", "ACWST": "stredozápadný austrálsky štandardný čas", "ART": "argentínsky štandardný čas", "LHDT": "letný čas ostrova lorda Howa", "BOT": "bolívijský čas", "EDT": "severoamerický východný letný čas", "AKDT": "aljašský letný čas", "CLST": "čilský letný čas", "HEEG": "východogrónsky letný čas", "HNCU": "kubánsky štandardný čas"}, -+ locale: "sk_SK", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WART": "WART", "TMST": "TMST", "CLT": "CLT", "AWST": "AWST", "LHDT": "LHDT", "HEOG": "HEOG", "HKT": "HKT", "GMT": "GMT", "CHAST": "CHAST", "MST": "MST", "MDT": "MDT", "EAT": "EAT", "SGT": "SGT", "HEPMX": "HEPMX", "WAT": "WAT", "HNT": "HNT", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "PST": "PST", "AKDT": "AKDT", "COT": "COT", "WITA": "WITA", "ADT": "ADT", "ARST": "ARST", "HAST": "HAST", "WIT": "WIT", "GYT": "GYT", "CLST": "CLST", "NZST": "NZST", "SRT": "SRT", "MYT": "MYT", "JST": "JST", "BT": "BT", "HECU": "HECU", "EST": "EST", "TMT": "TMT", "CST": "CST", "HADT": "HADT", "ACDT": "ACDT", "HEEG": "HEEG", "WESZ": "WESZ", "VET": "VET", "HNCU": "HNCU", "OEZ": "OEZ", "WARST": "WARST", "∅∅∅": "∅∅∅", "NZDT": "NZDT", "CHADT": "CHADT", "OESZ": "OESZ", "EDT": "EDT", "MEZ": "MEZ", "LHST": "LHST", "HNPMX": "HNPMX", "CAT": "CAT", "CDT": "CDT", "ChST": "ChST", "BOT": "BOT", "AEST": "AEST", "ACST": "ACST", "HNPM": "HNPM", "GFT": "GFT", "HNEG": "HNEG", "WEZ": "WEZ", "AKST": "AKST", "HAT": "HAT", "HENOMX": "HENOMX", "IST": "IST", "UYST": "UYST", "COST": "COST", "HKST": "HKST", "MESZ": "MESZ", "HEPM": "HEPM", "JDT": "JDT", "PDT": "PDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "WAST": "WAST", "SAST": "SAST", "WIB": "WIB", "AWDT": "AWDT", "ECT": "ECT", "AST": "AST", "ART": "ART", "AEDT": "AEDT", "UYT": "UYT"}, - } - } -  -@@ -166,7 +139,7 @@ func (sk *sk_SK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sk *sk_SK) MonthsAbbreviated() []string { -- return sk.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -176,7 +149,7 @@ func (sk *sk_SK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sk *sk_SK) MonthsNarrow() []string { -- return sk.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -186,7 +159,7 @@ func (sk *sk_SK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sk *sk_SK) MonthsWide() []string { -- return sk.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -232,77 +205,13 @@ func (sk *sk_SK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sk_SK' and handles both Whole and Real numbers based on 'v' - func (sk *sk_SK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sk.group) - 1; j >= 0; j-- { -- b = append(b, sk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sk_SK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sk *sk_SK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sk.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sk.percentSuffix...) -- -- b = append(b, sk.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sk_SK' -@@ -310,58 +219,7 @@ func (sk *sk_SK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sk.group) - 1; j >= 0; j-- { -- b = append(b, sk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sk.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sk_SK' -@@ -370,65 +228,7 @@ func (sk *sk_SK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sk.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sk.group) - 1; j >= 0; j-- { -- b = append(b, sk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sk.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sk.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sk.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sk_SK' -@@ -436,17 +236,6 @@ func (sk *sk_SK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,17 +244,6 @@ func (sk *sk_SK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -474,17 +252,6 @@ func (sk *sk_SK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -493,19 +260,6 @@ func (sk *sk_SK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sk.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -514,15 +268,6 @@ func (sk *sk_SK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -531,22 +276,6 @@ func (sk *sk_SK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -555,26 +284,6 @@ func (sk *sk_SK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -583,30 +292,5 @@ func (sk *sk_SK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sk.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sl/sl.go b/sl/sl.go -index 19fd612..38b14c5 100644 ---- a/sl/sl.go -+++ b/sl/sl.go -@@ -75,7 +75,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"pr. Kr.", "po Kr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"pred Kristusom", "po Kristusu"}, -- timezones: map[string]string{"MEZ": "Srednjeevropski standardni čas", "BOT": "Bolivijski čas", "SGT": "Singapurski standardni čas", "EDT": "Vzhodni poletni čas", "ACWST": "Avstralski centralni zahodni standardni čas", "HKST": "Hongkonški poletni čas", "WITA": "Indonezijski osrednji čas", "AWDT": "Avstralski zahodni poletni čas", "AEDT": "Avstralski vzhodni poletni čas", "CLT": "Čilski standardni čas", "HECU": "Kubanski poletni čas", "ARST": "Argentinski poletni čas", "JST": "Japonski standardni čas", "WAST": "Zahodnoafriški poletni čas", "COT": "Kolumbijski standardni čas", "AKDT": "Aljaški poletni čas", "WIT": "Indonezijski vzhodni čas", "HAT": "Novofundlandski poletni čas", "HKT": "Hongkonški standardni čas", "NZST": "Novozelandski standardni čas", "CHAST": "Čatamski standardni čas", "AST": "Atlantski standardni čas", "UYST": "Urugvajski poletni čas", "SAST": "Južnoafriški čas", "GFT": "Čas: Francoska Gvajana", "HNPMX": "mehiški pacifiški standardni čas", "CDT": "Centralni poletni čas", "HNOG": "Zahodnogrenlandski standardni čas", "JDT": "Japonski poletni čas", "TMT": "Turkmenistanski standardni čas", "ChST": "Čamorski standardni čas", "HNT": "Novofundlandski standardni čas", "EAT": "Vzhodnoafriški čas", "MDT": "MDT", "HEEG": "Vzhodnogrenlandski poletni čas", "WAT": "Zahodnoafriški standardni čas", "WART": "Argentinski zahodni standardni čas", "AKST": "Aljaški standardni čas", "ART": "Argentinski standardni čas", "AEST": "Avstralski vzhodni standardni čas", "LHST": "Standardni čas otoka Lord Howe", "∅∅∅": "Amazonski poletni čas", "BT": "Butanski čas", "CST": "Centralni standardni čas", "NZDT": "Novozelandski poletni čas", "HENOMX": "mehiški severozahodni poletni čas", "EST": "Vzhodni standardni čas", "MST": "MST", "COST": "Kolumbijski poletni čas", "HAST": "Havajski aleutski standardni čas", "HADT": "Havajski aleutski poletni čas", "HEOG": "Zahodnogrenlandski poletni čas", "WEZ": "Zahodnoevropski standardni čas", "AWST": "Avstralski zahodni standardni čas", "TMST": "Turkmenistanski poletni čas", "CLST": "Čilski poletni čas", "ACST": "Avstralski centralni standardni čas", "HEPMX": "mehiški pacifiški poletni čas", "UYT": "Urugvajski standardni čas", "CAT": "Centralnoafriški čas", "ADT": "Atlantski poletni čas", "GYT": "Gvajanski čas", "WESZ": "Zahodnoevropski poletni čas", "HEPM": "Poletni čas: Saint Pierre in Miquelon", "CHADT": "Čatamski poletni čas", "IST": "Indijski standardni čas", "ECT": "Ekvadorski čas", "WARST": "Argentinski zahodni poletni čas", "PDT": "Pacifiški poletni čas", "LHDT": "Poletni čas otoka Lord Howe", "HNNOMX": "mehiški severozahodni standardni čas", "VET": "Venezuelski čas", "GMT": "Greenwiški srednji čas", "WIB": "Indonezijski zahodni čas", "SRT": "Surinamski čas", "ACWDT": "Avstralski centralni zahodni poletni čas", "HNPM": "Standardni čas: Saint Pierre in Miquelon", "MESZ": "Srednjeevropski poletni čas", "OESZ": "Vzhodnoevropski poletni čas", "HNCU": "Kubanski standardni čas", "MYT": "Malezijski čas", "PST": "Pacifiški standardni čas", "HNEG": "Vzhodnogrenlandski standardni čas", "ACDT": "Avstralski centralni poletni čas", "OEZ": "Vzhodnoevropski standardni čas"}, -+ timezones: map[string]string{"WAT": "Zahodnoafriški standardni čas", "COST": "Kolumbijski poletni čas", "HEOG": "Zahodnogrenlandski poletni čas", "HKT": "Hongkonški standardni čas", "WIB": "Indonezijski zahodni čas", "MDT": "Gorski poletni čas", "CHAST": "Čatamski standardni čas", "HECU": "Kubanski poletni čas", "WART": "Argentinski zahodni standardni čas", "WIT": "Indonezijski vzhodni čas", "GYT": "Gvajanski čas", "CAT": "Centralnoafriški čas", "MST": "Gorski standardni čas", "SRT": "Surinamski čas", "WEZ": "Zahodnoevropski standardni čas", "AWDT": "Avstralski zahodni poletni čas", "HNPM": "Standardni čas: Saint Pierre in Miquelon", "AEST": "Avstralski vzhodni standardni čas", "VET": "Venezuelski čas", "HNCU": "Kubanski standardni čas", "MESZ": "Srednjeevropski poletni čas", "ACST": "Avstralski centralni standardni čas", "HNNOMX": "mehiški severozahodni standardni čas", "ChST": "Čamorski standardni čas", "LHST": "Standardni čas otoka Lord Howe", "HNT": "Novofundlandski standardni čas", "GMT": "Greenwiški srednji čas", "IST": "Indijski standardni čas", "∅∅∅": "∅∅∅", "EDT": "Vzhodni poletni čas", "HAST": "Havajski aleutski standardni čas", "MEZ": "Srednjeevropski standardni čas", "ACDT": "Avstralski centralni poletni čas", "ECT": "Ekvadorski čas", "ART": "Argentinski standardni čas", "AKST": "Aljaški standardni čas", "AKDT": "Aljaški poletni čas", "TMST": "Turkmenistanski poletni čas", "HNEG": "Vzhodnogrenlandski standardni čas", "HNOG": "Zahodnogrenlandski standardni čas", "AST": "Atlantski standardni čas", "EAT": "Vzhodnoafriški čas", "HEPMX": "mehiški pacifiški poletni čas", "OEZ": "Vzhodnoevropski standardni čas", "ADT": "Atlantski poletni čas", "MYT": "Malezijski čas", "SGT": "Singapurski standardni čas", "EST": "Vzhodni standardni čas", "GFT": "Čas: Francoska Gvajana", "CLST": "Čilski poletni čas", "WITA": "Indonezijski osrednji čas", "CDT": "Centralni poletni čas", "HENOMX": "mehiški severozahodni poletni čas", "UYST": "Urugvajski poletni čas", "WAST": "Zahodnoafriški poletni čas", "HEPM": "Poletni čas: Saint Pierre in Miquelon", "ARST": "Argentinski poletni čas", "HEEG": "Vzhodnogrenlandski poletni čas", "AWST": "Avstralski zahodni standardni čas", "LHDT": "Poletni čas otoka Lord Howe", "BT": "Butanski čas", "AEDT": "Avstralski vzhodni poletni čas", "NZST": "Novozelandski standardni čas", "PDT": "Pacifiški poletni čas", "HAT": "Novofundlandski poletni čas", "BOT": "Bolivijski čas", "HADT": "Havajski aleutski poletni čas", "UYT": "Urugvajski standardni čas", "WESZ": "Zahodnoevropski poletni čas", "HNPMX": "mehiški pacifiški standardni čas", "OESZ": "Vzhodnoevropski poletni čas", "HKST": "Hongkonški poletni čas", "TMT": "Turkmenistanski standardni čas", "JST": "Japonski standardni čas", "JDT": "Japonski poletni čas", "CHADT": "Čatamski poletni čas", "CLT": "Čilski standardni čas", "WARST": "Argentinski zahodni poletni čas", "SAST": "Južnoafriški čas", "COT": "Kolumbijski standardni čas", "CST": "Centralni standardni čas", "NZDT": "Novozelandski poletni čas", "PST": "Pacifiški standardni čas", "ACWST": "Avstralski centralni zahodni standardni čas", "ACWDT": "Avstralski centralni zahodni poletni čas"}, - } - } -  -diff --git a/sl_SI/sl_SI.go b/sl_SI/sl_SI.go -index f3aa7ff..7b018f6 100644 ---- a/sl_SI/sl_SI.go -+++ b/sl_SI/sl_SI.go -@@ -10,72 +10,45 @@ import ( - ) -  - type sl_SI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sl_SI' locale - func New() locales.Translator { - return &sl_SI{ -- locale: "sl_SI", -- pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{3, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "–", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mar.", "apr.", "maj", "jun.", "jul.", "avg.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"}, -- monthsWide: []string{"", "januar", "februar", "marec", "april", "maj", "junij", "julij", "avgust", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"ned.", "pon.", "tor.", "sre.", "čet.", "pet.", "sob."}, -- daysNarrow: []string{"n", "p", "t", "s", "č", "p", "s"}, -- daysShort: []string{"ned.", "pon.", "tor.", "sre.", "čet.", "pet.", "sob."}, -- daysWide: []string{"nedelja", "ponedeljek", "torek", "sreda", "četrtek", "petek", "sobota"}, -- periodsAbbreviated: []string{"dop.", "pop."}, -- periodsNarrow: []string{"d", "p"}, -- periodsWide: []string{"dop.", "pop."}, -- erasAbbreviated: []string{"pr. Kr.", "po Kr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"pred Kristusom", "po Kristusu"}, -- timezones: map[string]string{"HENOMX": "mehiški severozahodni poletni čas", "HNCU": "Kubanski standardni čas", "HNPMX": "mehiški pacifiški standardni čas", "AEDT": "Avstralski vzhodni poletni čas", "GFT": "Čas: Francoska Gvajana", "EST": "Vzhodni standardni čas", "UYST": "Urugvajski poletni čas", "HNPM": "Standardni čas: Saint Pierre in Miquelon", "IST": "Indijski standardni čas", "BOT": "Bolivijski čas", "CST": "Centralni standardni čas", "CDT": "Centralni poletni čas", "AKST": "Aljaški standardni čas", "WITA": "Indonezijski osrednji čas", "NZST": "Novozelandski standardni čas", "PST": "Pacifiški standardni čas", "ECT": "Ekvadorski čas", "WAST": "Zahodnoafriški poletni čas", "COT": "Kolumbijski standardni čas", "MST": "MST", "MDT": "MDT", "ADT": "Atlantski poletni čas", "ACST": "Avstralski centralni standardni čas", "HECU": "Kubanski poletni čas", "AST": "Atlantski standardni čas", "LHDT": "Poletni čas otoka Lord Howe", "NZDT": "Novozelandski poletni čas", "CLT": "Čilski standardni čas", "HNEG": "Vzhodnogrenlandski standardni čas", "EAT": "Vzhodnoafriški čas", "AWST": "Avstralski zahodni standardni čas", "CLST": "Čilski poletni čas", "WAT": "Zahodnoafriški standardni čas", "WART": "Argentinski zahodni standardni čas", "UYT": "Urugvajski standardni čas", "HAST": "Havajski aleutski standardni čas", "HNT": "Novofundlandski standardni čas", "WEZ": "Zahodnoevropski standardni čas", "ChST": "Čamorski standardni čas", "HEEG": "Vzhodnogrenlandski poletni čas", "CAT": "Centralnoafriški čas", "ART": "Argentinski standardni čas", "SAST": "Južnoafriški čas", "OESZ": "Vzhodnoevropski poletni čas", "COST": "Kolumbijski poletni čas", "GYT": "Gvajanski čas", "AWDT": "Avstralski zahodni poletni čas", "CHADT": "Čatamski poletni čas", "MEZ": "Srednjeevropski standardni čas", "WARST": "Argentinski zahodni poletni čas", "WIB": "Indonezijski zahodni čas", "SRT": "Surinamski čas", "HEPM": "Poletni čas: Saint Pierre in Miquelon", "JST": "Japonski standardni čas", "EDT": "Vzhodni poletni čas", "BT": "Butanski čas", "ACWST": "Avstralski centralni zahodni standardni čas", "LHST": "Standardni čas otoka Lord Howe", "AEST": "Avstralski vzhodni standardni čas", "HKT": "Hongkonški standardni čas", "ACDT": "Avstralski centralni poletni čas", "∅∅∅": "Perujski poletni čas", "VET": "Venezuelski čas", "WIT": "Indonezijski vzhodni čas", "HAT": "Novofundlandski poletni čas", "HEOG": "Zahodnogrenlandski poletni čas", "HKST": "Hongkonški poletni čas", "TMST": "Turkmenistanski poletni čas", "GMT": "Greenwiški srednji čas", "HADT": "Havajski aleutski poletni čas", "CHAST": "Čatamski standardni čas", "OEZ": "Vzhodnoevropski standardni čas", "MYT": "Malezijski čas", "AKDT": "Aljaški poletni čas", "ARST": "Argentinski poletni čas", "JDT": "Japonski poletni čas", "TMT": "Turkmenistanski standardni čas", "HEPMX": "mehiški pacifiški poletni čas", "HNOG": "Zahodnogrenlandski standardni čas", "WESZ": "Zahodnoevropski poletni čas", "HNNOMX": "mehiški severozahodni standardni čas", "SGT": "Singapurski standardni čas", "PDT": "Pacifiški poletni čas", "ACWDT": "Avstralski centralni zahodni poletni čas", "MESZ": "Srednjeevropski poletni čas"}, -+ locale: "sl_SI", -+ pluralsCardinal: []locales.PluralRule{2, 3, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{3, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIB": "WIB", "ACDT": "ACDT", "AEST": "AEST", "CHADT": "CHADT", "UYT": "UYT", "CST": "CST", "ChST": "ChST", "AWDT": "AWDT", "WEZ": "WEZ", "WAT": "WAT", "WART": "WART", "HEEG": "HEEG", "LHDT": "LHDT", "HNOG": "HNOG", "GYT": "GYT", "ACWST": "ACWST", "HNPMX": "HNPMX", "TMT": "TMT", "TMST": "TMST", "∅∅∅": "∅∅∅", "MDT": "MDT", "ARST": "ARST", "HNEG": "HNEG", "WESZ": "WESZ", "SGT": "SGT", "OEZ": "OEZ", "ADT": "ADT", "HEPMX": "HEPMX", "WARST": "WARST", "BT": "BT", "EST": "EST", "AST": "AST", "HADT": "HADT", "HNNOMX": "HNNOMX", "MYT": "MYT", "AEDT": "AEDT", "ECT": "ECT", "ART": "ART", "HNPM": "HNPM", "JST": "JST", "PDT": "PDT", "HNT": "HNT", "GMT": "GMT", "AKDT": "AKDT", "WIT": "WIT", "CAT": "CAT", "CLT": "CLT", "HAST": "HAST", "LHST": "LHST", "COST": "COST", "CDT": "CDT", "EAT": "EAT", "ACWDT": "ACWDT", "HNCU": "HNCU", "HAT": "HAT", "HKT": "HKT", "GFT": "GFT", "COT": "COT", "SRT": "SRT", "IST": "IST", "CLST": "CLST", "WITA": "WITA", "NZST": "NZST", "HENOMX": "HENOMX", "MEZ": "MEZ", "CHAST": "CHAST", "WAST": "WAST", "HEOG": "HEOG", "EDT": "EDT", "HKST": "HKST", "HEPM": "HEPM", "AWST": "AWST", "UYST": "UYST", "HECU": "HECU", "SAST": "SAST", "MST": "MST", "NZDT": "NZDT", "MESZ": "MESZ", "OESZ": "OESZ", "BOT": "BOT", "ACST": "ACST", "JDT": "JDT", "PST": "PST", "VET": "VET", "AKST": "AKST"}, - } - } -  -@@ -171,7 +144,7 @@ func (sl *sl_SI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sl *sl_SI) MonthsAbbreviated() []string { -- return sl.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -181,7 +154,7 @@ func (sl *sl_SI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sl *sl_SI) MonthsNarrow() []string { -- return sl.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -191,7 +164,7 @@ func (sl *sl_SI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sl *sl_SI) MonthsWide() []string { -- return sl.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -237,79 +210,13 @@ func (sl *sl_SI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sl_SI' and handles both Whole and Real numbers based on 'v' - func (sl *sl_SI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sl.minus) - 1; j >= 0; j-- { -- b = append(b, sl.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sl_SI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sl *sl_SI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sl.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sl.minus) - 1; j >= 0; j-- { -- b = append(b, sl.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sl.percentSuffix...) -- -- b = append(b, sl.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sl_SI' -@@ -317,58 +224,7 @@ func (sl *sl_SI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sl.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sl.minus) - 1; j >= 0; j-- { -- b = append(b, sl.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sl.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sl_SI' -@@ -377,63 +233,7 @@ func (sl *sl_SI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sl.currencies[currency] -- l := len(s) + len(symbol) + 8 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sl.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sl.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sl.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sl.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sl.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sl.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sl_SI' -@@ -441,23 +241,6 @@ func (sl *sl_SI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -466,17 +249,6 @@ func (sl *sl_SI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sl.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -485,21 +257,6 @@ func (sl *sl_SI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -508,24 +265,6 @@ func (sl *sl_SI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sl.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sl.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -534,19 +273,6 @@ func (sl *sl_SI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -555,26 +281,6 @@ func (sl *sl_SI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -583,30 +289,6 @@ func (sl *sl_SI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -615,34 +297,5 @@ func (sl *sl_SI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sl.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sl.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/smn/smn.go b/smn/smn.go -index de185c4..c26565b 100644 ---- a/smn/smn.go -+++ b/smn/smn.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"oKr.", "mKr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Ovdil Kristus šoddâm", "maŋa Kristus šoddâm"}, -- timezones: map[string]string{"AST": "AST", "VET": "VET", "ARST": "ARST", "LHDT": "LHDT", "COST": "COST", "JDT": "JDT", "WIT": "WIT", "PDT": "PDT", "WEZ": "WEZ", "WESZ": "WESZ", "NZST": "NZST", "GMT": "GMT", "HNCU": "HNCU", "CLT": "CLT", "HEEG": "HEEG", "TMT": "TMT", "TMST": "TMST", "COT": "COT", "HAST": "HAST", "NZDT": "NZDT", "EDT": "EDT", "AEDT": "AEDT", "HNPM": "HNPM", "WAT": "WAT", "MDT": "MDT", "UYST": "UYST", "CST": "CST", "PST": "PST", "AEST": "AEST", "WAST": "WAST", "LHST": "LHST", "∅∅∅": "∅∅∅", "EAT": "EAT", "MST": "MST", "SRT": "SRT", "ART": "ART", "HKST": "HKST", "WITA": "WITA", "HNPMX": "HNPMX", "CDT": "CDT", "BT": "BT", "HECU": "HECU", "AWDT": "AWDT", "SAST": "SAST", "JST": "JST", "EST": "EST", "UYT": "UYT", "AKST": "AKST", "HNOG": "HNOG", "ACWST": "ACWST", "ChST": "ChST", "CAT": "CAT", "ECT": "ECT", "HENOMX": "HENOMX", "AKDT": "AKDT", "HADT": "HADT", "HEOG": "HEOG", "MESZ": "MESZ", "ACDT": "ACDT", "OEZ": "OEZ", "WART": "WART", "WARST": "WARST", "MYT": "MYT", "WIB": "WIB", "HNT": "HNT", "HAT": "HAT", "CHAST": "CHAST", "ACWDT": "ACWDT", "HEPM": "HEPM", "SGT": "SGT", "GFT": "GFT", "HEPMX": "HEPMX", "ADT": "ADT", "AWST": "AWST", "HKT": "HKT", "HNEG": "HNEG", "CHADT": "CHADT", "BOT": "BOT", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "GYT": "GYT", "MEZ": "MEZ", "IST": "IST", "CLST": "CLST", "ACST": "ACST"}, -+ timezones: map[string]string{"SRT": "SRT", "CHAST": "CHAST", "SGT": "SGT", "MDT": "MDT", "HNT": "HNT", "COST": "COST", "SAST": "SAST", "CLST": "CLST", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "VET": "VET", "WAT": "WAT", "GMT": "GMT", "BOT": "BOT", "CST": "CST", "ARST": "ARST", "HNEG": "HNEG", "AEDT": "AEDT", "AKST": "AKST", "EDT": "EDT", "NZST": "NZST", "ChST": "ChST", "EAT": "EAT", "JDT": "JDT", "HNOG": "HNOG", "EST": "EST", "AST": "AST", "MESZ": "MESZ", "OESZ": "OESZ", "WARST": "WARST", "HKT": "HKT", "HEEG": "HEEG", "HEOG": "HEOG", "TMT": "TMT", "MST": "MST", "WESZ": "WESZ", "CDT": "CDT", "HEPM": "HEPM", "AWDT": "AWDT", "HNCU": "HNCU", "WEZ": "WEZ", "WIT": "WIT", "WART": "WART", "ACST": "ACST", "ACDT": "ACDT", "CHADT": "CHADT", "HKST": "HKST", "WIB": "WIB", "HADT": "HADT", "AEST": "AEST", "PST": "PST", "HNPMX": "HNPMX", "TMST": "TMST", "ECT": "ECT", "HNPM": "HNPM", "AWST": "AWST", "LHST": "LHST", "ART": "ART", "CAT": "CAT", "WITA": "WITA", "MEZ": "MEZ", "HECU": "HECU", "COT": "COT", "IST": "IST", "WAST": "WAST", "AKDT": "AKDT", "GYT": "GYT", "CLT": "CLT", "LHDT": "LHDT", "ACWDT": "ACWDT", "UYT": "UYT", "HEPMX": "HEPMX", "ADT": "ADT", "HENOMX": "HENOMX", "ACWST": "ACWST", "PDT": "PDT", "JST": "JST", "BT": "BT", "∅∅∅": "∅∅∅", "GFT": "GFT", "HAT": "HAT", "HAST": "HAST", "MYT": "MYT", "UYST": "UYST", "OEZ": "OEZ"}, - } - } -  -diff --git a/smn_FI/smn_FI.go b/smn_FI/smn_FI.go -index c65ce98..dd56e37 100644 ---- a/smn_FI/smn_FI.go -+++ b/smn_FI/smn_FI.go -@@ -10,70 +10,45 @@ import ( - ) -  - type smn_FI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'smn_FI' locale - func New() locales.Translator { - return &smn_FI{ -- locale: "smn_FI", -- pluralsCardinal: []locales.PluralRule{2, 3, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "uđiv", "kuovâ", "njuhčâ", "cuáŋui", "vyesi", "kesi", "syeini", "porge", "čohčâ", "roovvâd", "skammâ", "juovlâ"}, -- monthsNarrow: []string{"", "U", "K", "NJ", "C", "V", "K", "S", "P", "Č", "R", "S", "J"}, -- monthsWide: []string{"", "uđđâivemáánu", "kuovâmáánu", "njuhčâmáánu", "cuáŋuimáánu", "vyesimáánu", "kesimáánu", "syeinimáánu", "porgemáánu", "čohčâmáánu", "roovvâdmáánu", "skammâmáánu", "juovlâmáánu"}, -- daysAbbreviated: []string{"pas", "vuo", "maj", "kos", "tuo", "vás", "láv"}, -- daysNarrow: []string{"p", "V", "M", "K", "T", "V", "L"}, -- daysShort: []string{"pa", "vu", "ma", "ko", "tu", "vá", "lá"}, -- daysWide: []string{"pasepeeivi", "vuossaargâ", "majebaargâ", "koskoho", "tuorâstuv", "vástuppeeivi", "lávurduv"}, -- periodsAbbreviated: []string{"ip.", "ep."}, -- periodsNarrow: []string{"ip.", "ep."}, -- periodsWide: []string{"ip.", "ep."}, -- erasAbbreviated: []string{"oKr.", "mKr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Ovdil Kristus šoddâm", "maŋa Kristus šoddâm"}, -- timezones: map[string]string{"HNOG": "HNOG", "WIT": "WIT", "BOT": "BOT", "AKST": "AKST", "ACWDT": "ACWDT", "NZDT": "NZDT", "MEZ": "MEZ", "IST": "IST", "∅∅∅": "∅∅∅", "CAT": "CAT", "COST": "COST", "NZST": "NZST", "CHAST": "CHAST", "HKT": "HKT", "MESZ": "MESZ", "TMST": "TMST", "SRT": "SRT", "HAT": "HAT", "WAT": "WAT", "HAST": "HAST", "HKST": "HKST", "HNEG": "HNEG", "TMT": "TMT", "EAT": "EAT", "GYT": "GYT", "WEZ": "WEZ", "CHADT": "CHADT", "JDT": "JDT", "ACDT": "ACDT", "HEPMX": "HEPMX", "ART": "ART", "HNPM": "HNPM", "CDT": "CDT", "HENOMX": "HENOMX", "AKDT": "AKDT", "JST": "JST", "MDT": "MDT", "UYT": "UYT", "HNT": "HNT", "AEST": "AEST", "WARST": "WARST", "HEOG": "HEOG", "LHST": "LHST", "HEPM": "HEPM", "GMT": "GMT", "ARST": "ARST", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "WART": "WART", "SGT": "SGT", "BT": "BT", "OEZ": "OEZ", "AEDT": "AEDT", "CLST": "CLST", "WAST": "WAST", "OESZ": "OESZ", "ECT": "ECT", "COT": "COT", "WESZ": "WESZ", "AWST": "AWST", "MYT": "MYT", "MST": "MST", "EDT": "EDT", "WITA": "WITA", "LHDT": "LHDT", "HEEG": "HEEG", "CST": "CST", "ADT": "ADT", "UYST": "UYST", "ACWST": "ACWST", "PDT": "PDT", "VET": "VET", "ChST": "ChST", "ACST": "ACST", "HNCU": "HNCU", "HNPMX": "HNPMX", "EST": "EST", "AST": "AST", "CLT": "CLT", "GFT": "GFT", "WIB": "WIB", "HADT": "HADT", "HECU": "HECU", "PST": "PST", "SAST": "SAST"}, -+ locale: "smn_FI", -+ pluralsCardinal: []locales.PluralRule{2, 3, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "CLT": "CLT", "CST": "CST", "ChST": "ChST", "HNNOMX": "HNNOMX", "AWST": "AWST", "PDT": "PDT", "COT": "COT", "CDT": "CDT", "WIB": "WIB", "GMT": "GMT", "ARST": "ARST", "HEEG": "HEEG", "HECU": "HECU", "HNPMX": "HNPMX", "HNT": "HNT", "WART": "WART", "EDT": "EDT", "HKST": "HKST", "NZST": "NZST", "ART": "ART", "WEZ": "WEZ", "WESZ": "WESZ", "AKDT": "AKDT", "CAT": "CAT", "SRT": "SRT", "BT": "BT", "ACWST": "ACWST", "UYST": "UYST", "HAT": "HAT", "HEPM": "HEPM", "IST": "IST", "MDT": "MDT", "MESZ": "MESZ", "HNPM": "HNPM", "CHADT": "CHADT", "HNCU": "HNCU", "WAT": "WAT", "GFT": "GFT", "BOT": "BOT", "LHDT": "LHDT", "SGT": "SGT", "SAST": "SAST", "TMST": "TMST", "∅∅∅": "∅∅∅", "ADT": "ADT", "GYT": "GYT", "WITA": "WITA", "MST": "MST", "EAT": "EAT", "HAST": "HAST", "MEZ": "MEZ", "AWDT": "AWDT", "MYT": "MYT", "ACWDT": "ACWDT", "HNOG": "HNOG", "HENOMX": "HENOMX", "JST": "JST", "HEOG": "HEOG", "ACDT": "ACDT", "UYT": "UYT", "AEST": "AEST", "OESZ": "OESZ", "PST": "PST", "AEDT": "AEDT", "AKST": "AKST", "COST": "COST", "HADT": "HADT", "JDT": "JDT", "VET": "VET", "HEPMX": "HEPMX", "WAST": "WAST", "OEZ": "OEZ", "WIT": "WIT", "EST": "EST", "NZDT": "NZDT", "ECT": "ECT", "ACST": "ACST", "WARST": "WARST", "HKT": "HKT", "CLST": "CLST", "AST": "AST", "HNEG": "HNEG", "LHST": "LHST", "CHAST": "CHAST"}, - } - } -  -@@ -128,7 +103,7 @@ func (smn *smn_FI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (smn *smn_FI) MonthsAbbreviated() []string { -- return smn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -138,7 +113,7 @@ func (smn *smn_FI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (smn *smn_FI) MonthsNarrow() []string { -- return smn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -148,7 +123,7 @@ func (smn *smn_FI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (smn *smn_FI) MonthsWide() []string { -- return smn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -194,77 +169,13 @@ func (smn *smn_FI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'smn_FI' and handles both Whole and Real numbers based on 'v' - func (smn *smn_FI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, smn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(smn.group) - 1; j >= 0; j-- { -- b = append(b, smn.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, smn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'smn_FI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (smn *smn_FI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, smn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, smn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, smn.percentSuffix...) -- -- b = append(b, smn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'smn_FI' -@@ -272,58 +183,7 @@ func (smn *smn_FI) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := smn.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, smn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(smn.group) - 1; j >= 0; j-- { -- b = append(b, smn.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, smn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, smn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, smn.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'smn_FI' -@@ -332,65 +192,7 @@ func (smn *smn_FI) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := smn.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, smn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(smn.group) - 1; j >= 0; j-- { -- b = append(b, smn.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, smn.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, smn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, smn.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, smn.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'smn_FI' -@@ -398,17 +200,6 @@ func (smn *smn_FI) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -417,17 +208,6 @@ func (smn *smn_FI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, smn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -436,17 +216,6 @@ func (smn *smn_FI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, smn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -455,18 +224,6 @@ func (smn *smn_FI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x63, 0x63, 0x63, 0x63, 0x2c, 0x20}...) -- b = append(b, smn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -475,15 +232,6 @@ func (smn *smn_FI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -492,22 +240,6 @@ func (smn *smn_FI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -516,26 +248,6 @@ func (smn *smn_FI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -544,30 +256,5 @@ func (smn *smn_FI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := smn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sn/sn.go b/sn/sn.go -index c3fc978..7a6b51a 100644 ---- a/sn/sn.go -+++ b/sn/sn.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kristo asati auya", "mugore ramambo vedu"}, -- timezones: map[string]string{"AKST": "AKST", "ART": "ART", "NZDT": "NZDT", "SAST": "SAST", "ACDT": "ACDT", "HECU": "HECU", "GMT": "GMT", "HEPMX": "HEPMX", "HEOG": "HEOG", "NZST": "NZST", "CAT": "CAT", "EAT": "EAT", "HNNOMX": "HNNOMX", "CST": "CST", "HNOG": "HNOG", "ChST": "ChST", "TMT": "TMT", "ECT": "ECT", "SGT": "SGT", "ADT": "ADT", "PST": "PST", "HNT": "HNT", "AEST": "AEST", "OESZ": "OESZ", "COT": "COT", "HENOMX": "HENOMX", "ACST": "ACST", "OEZ": "OEZ", "EDT": "EDT", "SRT": "SRT", "AWST": "AWST", "AWDT": "AWDT", "WITA": "WITA", "JST": "JST", "WART": "WART", "HNEG": "HNEG", "MYT": "MYT", "WIB": "WIB", "ACWDT": "ACWDT", "HAT": "HAT", "HKST": "HKST", "HNPM": "HNPM", "LHDT": "LHDT", "HEEG": "HEEG", "WIT": "WIT", "MEZ": "MEZ", "CLT": "CLT", "WAST": "WAST", "HAST": "HAST", "TMST": "TMST", "AKDT": "AKDT", "ACWST": "ACWST", "MESZ": "MESZ", "BOT": "BOT", "COST": "COST", "MDT": "MDT", "GYT": "GYT", "WEZ": "WEZ", "WESZ": "WESZ", "CHADT": "CHADT", "WARST": "WARST", "HNCU": "HNCU", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "GFT": "GFT", "WAT": "WAT", "EST": "EST", "HEPM": "HEPM", "LHST": "LHST", "CHAST": "CHAST", "CLST": "CLST", "BT": "BT", "MST": "MST", "UYT": "UYT", "CDT": "CDT", "HADT": "HADT", "JDT": "JDT", "UYST": "UYST", "PDT": "PDT", "ARST": "ARST", "VET": "VET", "AEDT": "AEDT", "HKT": "HKT", "IST": "IST", "AST": "AST"}, -+ timezones: map[string]string{"HADT": "HADT", "HNOG": "HNOG", "WITA": "WITA", "ADT": "ADT", "HAST": "HAST", "GYT": "GYT", "COST": "COST", "SGT": "SGT", "GFT": "GFT", "PST": "PST", "PDT": "PDT", "HNPMX": "HNPMX", "HKT": "HKT", "NZST": "NZST", "ARST": "ARST", "HEEG": "HEEG", "CAT": "CAT", "LHDT": "LHDT", "AWDT": "AWDT", "HNCU": "HNCU", "HNT": "HNT", "OESZ": "OESZ", "JST": "JST", "AWST": "AWST", "ACWDT": "ACWDT", "CHAST": "CHAST", "HEOG": "HEOG", "WIB": "WIB", "MEZ": "MEZ", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "ART": "ART", "CST": "CST", "AST": "AST", "HENOMX": "HENOMX", "AKDT": "AKDT", "AKST": "AKST", "TMST": "TMST", "AEST": "AEST", "IST": "IST", "HEPMX": "HEPMX", "JDT": "JDT", "UYST": "UYST", "WAT": "WAT", "CDT": "CDT", "ACST": "ACST", "LHST": "LHST", "MYT": "MYT", "EAT": "EAT", "OEZ": "OEZ", "EDT": "EDT", "CLST": "CLST", "MST": "MST", "NZDT": "NZDT", "VET": "VET", "WESZ": "WESZ", "ChST": "ChST", "BT": "BT", "CHADT": "CHADT", "UYT": "UYT", "MESZ": "MESZ", "HECU": "HECU", "SAST": "SAST", "TMT": "TMT", "EST": "EST", "BOT": "BOT", "WARST": "WARST", "MDT": "MDT", "ECT": "ECT", "WEZ": "WEZ", "AEDT": "AEDT", "HAT": "HAT", "ACDT": "ACDT", "HEPM": "HEPM", "ACWST": "ACWST", "CLT": "CLT", "GMT": "GMT", "SRT": "SRT", "HNEG": "HNEG", "WART": "WART", "WIT": "WIT", "COT": "COT", "HKST": "HKST", "HNNOMX": "HNNOMX", "WAST": "WAST"}, - } - } -  -diff --git a/sn_ZW/sn_ZW.go b/sn_ZW/sn_ZW.go -index 837d019..d5e7b3d 100644 ---- a/sn_ZW/sn_ZW.go -+++ b/sn_ZW/sn_ZW.go -@@ -10,68 +10,45 @@ import ( - ) -  - type sn_ZW struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sn_ZW' locale - func New() locales.Translator { - return &sn_ZW{ -- locale: "sn_ZW", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Ndi", "Kuk", "Kur", "Kub", "Chv", "Chk", "Chg", "Nya", "Gun", "Gum", "Mbu", "Zvi"}, -- monthsNarrow: []string{"", "N", "K", "K", "K", "C", "C", "C", "N", "G", "G", "M", "Z"}, -- monthsWide: []string{"", "Ndira", "Kukadzi", "Kurume", "Kubvumbi", "Chivabvu", "Chikumi", "Chikunguru", "Nyamavhuvhu", "Gunyana", "Gumiguru", "Mbudzi", "Zvita"}, -- daysAbbreviated: []string{"Svo", "Muv", "Chp", "Cht", "Chn", "Chs", "Mug"}, -- daysNarrow: []string{"S", "M", "C", "C", "C", "C", "M"}, -- daysShort: []string{"Sv", "Mu", "Cp", "Ct", "Cn", "Cs", "Mg"}, -- daysWide: []string{"Svondo", "Muvhuro", "Chipiri", "Chitatu", "China", "Chishanu", "Mugovera"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kristo asati auya", "mugore ramambo vedu"}, -- timezones: map[string]string{"WART": "WART", "HNCU": "HNCU", "EST": "EST", "UYT": "UYT", "BT": "BT", "ACWST": "ACWST", "CLST": "CLST", "HENOMX": "HENOMX", "WAST": "WAST", "CST": "CST", "AST": "AST", "AWDT": "AWDT", "TMST": "TMST", "BOT": "BOT", "AEDT": "AEDT", "CHADT": "CHADT", "LHST": "LHST", "∅∅∅": "∅∅∅", "WIT": "WIT", "CHAST": "CHAST", "ACDT": "ACDT", "HEOG": "HEOG", "HAST": "HAST", "HKST": "HKST", "EDT": "EDT", "MST": "MST", "COST": "COST", "UYST": "UYST", "WIB": "WIB", "ARST": "ARST", "AEST": "AEST", "HEPM": "HEPM", "CAT": "CAT", "EAT": "EAT", "HEEG": "HEEG", "GFT": "GFT", "ACST": "ACST", "NZDT": "NZDT", "JST": "JST", "JDT": "JDT", "OESZ": "OESZ", "SGT": "SGT", "GYT": "GYT", "HNOG": "HNOG", "MEZ": "MEZ", "CLT": "CLT", "ChST": "ChST", "VET": "VET", "WEZ": "WEZ", "WITA": "WITA", "HNEG": "HNEG", "AKDT": "AKDT", "OEZ": "OEZ", "PDT": "PDT", "AWST": "AWST", "SAST": "SAST", "WAT": "WAT", "ART": "ART", "HKT": "HKT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "CDT": "CDT", "SRT": "SRT", "ACWDT": "ACWDT", "HNT": "HNT", "MDT": "MDT", "ADT": "ADT", "LHDT": "LHDT", "TMT": "TMT", "HECU": "HECU", "WARST": "WARST", "MYT": "MYT", "HAT": "HAT", "HNPM": "HNPM", "NZST": "NZST", "GMT": "GMT", "AKST": "AKST", "COT": "COT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HADT": "HADT", "PST": "PST", "WESZ": "WESZ", "IST": "IST", "ECT": "ECT"}, -+ locale: "sn_ZW", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNEG": "HNEG", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "HEOG": "HEOG", "CDT": "CDT", "COT": "COT", "WITA": "WITA", "MST": "MST", "AST": "AST", "HAST": "HAST", "COST": "COST", "TMST": "TMST", "GMT": "GMT", "HEEG": "HEEG", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "OEZ": "OEZ", "HADT": "HADT", "ART": "ART", "SRT": "SRT", "EAT": "EAT", "LHST": "LHST", "JDT": "JDT", "UYT": "UYT", "WAST": "WAST", "SAST": "SAST", "BT": "BT", "AEST": "AEST", "HECU": "HECU", "WIT": "WIT", "CST": "CST", "AEDT": "AEDT", "SGT": "SGT", "OESZ": "OESZ", "GYT": "GYT", "EDT": "EDT", "NZDT": "NZDT", "ARST": "ARST", "BOT": "BOT", "IST": "IST", "HNCU": "HNCU", "GFT": "GFT", "HAT": "HAT", "HNOG": "HNOG", "ACST": "ACST", "ACDT": "ACDT", "CHADT": "CHADT", "WEZ": "WEZ", "CLT": "CLT", "NZST": "NZST", "WIB": "WIB", "ADT": "ADT", "UYST": "UYST", "PST": "PST", "WESZ": "WESZ", "VET": "VET", "WAT": "WAT", "CAT": "CAT", "MEZ": "MEZ", "JST": "JST", "PDT": "PDT", "HNPMX": "HNPMX", "TMT": "TMT", "LHDT": "LHDT", "HNPM": "HNPM", "ACWST": "ACWST", "WARST": "WARST", "HKT": "HKT", "EST": "EST", "HNNOMX": "HNNOMX", "AWST": "AWST", "MYT": "MYT", "AKST": "AKST", "AKDT": "AKDT", "HKST": "HKST", "ECT": "ECT", "ChST": "ChST", "CLST": "CLST", "MDT": "MDT", "MESZ": "MESZ", "AWDT": "AWDT", "CHAST": "CHAST", "HNT": "HNT", "WART": "WART"}, - } - } -  -@@ -124,7 +101,7 @@ func (sn *sn_ZW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sn *sn_ZW) MonthsAbbreviated() []string { -- return sn.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (sn *sn_ZW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sn *sn_ZW) MonthsNarrow() []string { -- return sn.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (sn *sn_ZW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sn *sn_ZW) MonthsWide() []string { -- return sn.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +167,13 @@ func (sn *sn_ZW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sn_ZW' and handles both Whole and Real numbers based on 'v' - func (sn *sn_ZW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sn_ZW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sn *sn_ZW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sn.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sn.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sn_ZW' -@@ -264,56 +181,7 @@ func (sn *sn_ZW) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sn.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, sn.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sn_ZW' -@@ -322,68 +190,7 @@ func (sn *sn_ZW) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sn.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sn.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sn.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, sn.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sn.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sn.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sn_ZW' -@@ -391,28 +198,6 @@ func (sn *sn_ZW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -421,17 +206,6 @@ func (sn *sn_ZW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, sn.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -440,17 +214,6 @@ func (sn *sn_ZW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, sn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -459,19 +222,6 @@ func (sn *sn_ZW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, sn.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, sn.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -480,19 +230,6 @@ func (sn *sn_ZW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -501,26 +238,6 @@ func (sn *sn_ZW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -529,30 +246,6 @@ func (sn *sn_ZW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -561,34 +254,5 @@ func (sn *sn_ZW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sn.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sn.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/so/so.go b/so/so.go -index 0f7b15a..5bf55fa 100644 ---- a/so/so.go -+++ b/so/so.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"CK", "CD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"CK", "CD"}, -- timezones: map[string]string{"UYT": "UYT", "BT": "BT", "HEOG": "HEOG", "NZDT": "NZDT", "TMT": "TMT", "OEZ": "OEZ", "COST": "Waqtiyada Xagaaga Kolambiya", "MDT": "MDT", "HEPM": "HEPM", "GMT": "GMT", "SGT": "SGT", "WITA": "WITA", "PDT": "PDT", "WART": "WART", "HAST": "HAST", "JST": "JST", "HEEG": "HEEG", "GFT": "GFT", "CAT": "CAT", "ART": "ART", "AKDT": "AKDT", "WIT": "WIT", "MST": "MST", "UYST": "UYST", "ACWST": "ACWST", "HAT": "HAT", "ARST": "ARST", "AEST": "AEST", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "GYT": "GYT", "VET": "VET", "MESZ": "MESZ", "LHDT": "LHDT", "NZST": "NZST", "WAT": "WAT", "ADT": "ADT", "IST": "IST", "EAT": "EAT", "CST": "CST", "HADT": "HADT", "WESZ": "WESZ", "HKT": "HKT", "HNPM": "HNPM", "SAST": "SAST", "JDT": "JDT", "BOT": "BOT", "WIB": "WIB", "OESZ": "OESZ", "WAST": "WAST", "MEZ": "MEZ", "CHAST": "CHAST", "HECU": "HECU", "HNT": "HNT", "HNOG": "HNOG", "AEDT": "AEDT", "CLT": "CLT", "TMST": "TMST", "ACST": "ACST", "WARST": "WARST", "PST": "PST", "AST": "AST", "WEZ": "WEZ", "HKST": "HKST", "LHST": "LHST", "ChST": "ChST", "HNEG": "HNEG", "EDT": "EDT", "HEPMX": "HEPMX", "CLST": "CLST", "HENOMX": "HENOMX", "HNCU": "HNCU", "EST": "EST", "SRT": "SRT", "CHADT": "CHADT", "ACDT": "ACDT", "MYT": "MYT", "AKST": "AKST", "AWST": "AWST", "ECT": "ECT", "COT": "Waqtiyada Caadiga ah ee kolambiya", "HNPMX": "HNPMX", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "CDT": "CDT"}, -+ timezones: map[string]string{"EDT": "EDT", "NZDT": "NZDT", "LHDT": "LHDT", "HNPM": "HNPM", "HEPMX": "HEPMX", "HNT": "HNT", "GYT": "GYT", "MST": "MST", "ARST": "ARST", "BOT": "BOT", "MESZ": "MESZ", "PDT": "PDT", "CHAST": "CHAST", "MEZ": "MEZ", "IST": "IST", "BT": "BT", "HNPMX": "HNPMX", "SAST": "SAST", "OEZ": "OEZ", "WARST": "WARST", "CLST": "CLST", "NZST": "NZST", "ChST": "ChST", "ART": "ART", "AWST": "AWST", "HECU": "HECU", "CLT": "CLT", "MDT": "MDT", "HENOMX": "HENOMX", "JST": "JST", "WEZ": "WEZ", "HNNOMX": "HNNOMX", "UYT": "UYT", "AKST": "AKST", "CDT": "CDT", "AST": "AST", "GMT": "GMT", "HADT": "HADT", "HNEG": "HNEG", "ACWST": "ACWST", "TMT": "TMT", "WITA": "WITA", "AEDT": "AEDT", "COST": "Waqtiyada Xagaaga Kolambiya", "HEEG": "HEEG", "SGT": "SGT", "VET": "VET", "WAST": "WAST", "WIB": "WIB", "SRT": "SRT", "EAT": "EAT", "WART": "WART", "WIT": "WIT", "CAT": "CAT", "ECT": "ECT", "ADT": "ADT", "MYT": "MYT", "HEPM": "HEPM", "HNCU": "HNCU", "WAT": "WAT", "EST": "EST", "CST": "CST", "HAST": "HAST", "ACDT": "ACDT", "PST": "PST", "UYST": "UYST", "HKT": "HKT", "HKST": "HKST", "CHADT": "CHADT", "WESZ": "WESZ", "GFT": "GFT", "LHST": "LHST", "JDT": "JDT", "ACWDT": "ACWDT", "AKDT": "AKDT", "HAT": "HAT", "TMST": "TMST", "∅∅∅": "∅∅∅", "AWDT": "AWDT", "COT": "Waqtiyada Caadiga ah ee kolambiya", "HEOG": "HEOG", "ACST": "ACST", "AEST": "AEST", "OESZ": "OESZ", "HNOG": "HNOG"}, - } - } -  -diff --git a/so_DJ/so_DJ.go b/so_DJ/so_DJ.go -index c75e340..dda46a2 100644 ---- a/so_DJ/so_DJ.go -+++ b/so_DJ/so_DJ.go -@@ -42,28 +42,13 @@ type so_DJ struct { - // New returns a new instance of translator for the 'so_DJ' locale - func New() locales.Translator { - return &so_DJ{ -- locale: "so_DJ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "Fdj", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Kob", "Lab", "Sad", "Afr", "Sha", "Lix", "Tod", "Sid", "Sag", "Tob", "KIT", "LIT"}, -- monthsNarrow: []string{"", "K", "L", "S", "A", "S", "L", "T", "S", "S", "T", "K", "L"}, -- monthsWide: []string{"", "Bisha Koobaad", "Bisha Labaad", "Bisha Saddexaad", "Bisha Afraad", "Bisha Shanaad", "Bisha Lixaad", "Bisha Todobaad", "Bisha Sideedaad", "Bisha Sagaalaad", "Bisha Tobnaad", "Bisha Kow iyo Tobnaad", "Bisha Laba iyo Tobnaad"}, -- daysAbbreviated: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysNarrow: []string{"A", "I", "T", "A", "Kh", "J", "S"}, -- daysShort: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysWide: []string{"Axad", "Isniin", "Talaado", "Arbaco", "Khamiis", "Jimco", "Sabti"}, -- periodsAbbreviated: []string{"sn.", "gn."}, -- periodsNarrow: []string{"sn.", "gn."}, -- periodsWide: []string{"sn.", "gn."}, -- erasAbbreviated: []string{"CK", "CD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"CK", "CD"}, -- timezones: map[string]string{"MST": "MST", "UYT": "UYT", "UYST": "UYST", "ARST": "ARST", "ART": "ART", "HEOG": "HEOG", "HKT": "HKT", "CLST": "CLST", "JDT": "JDT", "EAT": "EAT", "HEPMX": "HEPMX", "AKST": "AKST", "SRT": "SRT", "ACWST": "ACWST", "HNOG": "HNOG", "WEZ": "WEZ", "BOT": "BOT", "GFT": "GFT", "EST": "EST", "AEDT": "AEDT", "IST": "IST", "ACDT": "ACDT", "HENOMX": "HENOMX", "ADT": "ADT", "NZST": "NZST", "NZDT": "NZDT", "CAT": "CAT", "COST": "Waqtiyada Xagaaga Kolambiya", "EDT": "EDT", "HADT": "HADT", "WITA": "WITA", "LHST": "LHST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HECU": "HECU", "HNPMX": "HNPMX", "CST": "CST", "ACWDT": "ACWDT", "AEST": "AEST", "HNPM": "HNPM", "TMT": "TMT", "OEZ": "OEZ", "WARST": "WARST", "COT": "Waqtiyada Caadiga ah ee kolambiya", "WIB": "WIB", "BT": "BT", "PST": "PST", "CHADT": "CHADT", "WAST": "WAST", "WART": "WART", "WIT": "WIT", "HAT": "HAT", "ChST": "ChST", "SGT": "SGT", "VET": "VET", "HKST": "HKST", "MESZ": "MESZ", "ACST": "ACST", "OESZ": "OESZ", "ECT": "ECT", "CLT": "CLT", "HNCU": "HNCU", "AKDT": "AKDT", "HNT": "HNT", "AWST": "AWST", "MEZ": "MEZ", "LHDT": "LHDT", "CHAST": "CHAST", "SAST": "SAST", "∅∅∅": "∅∅∅", "MDT": "MDT", "CDT": "CDT", "GYT": "GYT", "HAST": "HAST", "WESZ": "WESZ", "HEPM": "HEPM", "JST": "JST", "HNEG": "HNEG", "TMST": "TMST", "GMT": "GMT", "AST": "AST", "MYT": "MYT", "PDT": "PDT", "AWDT": "AWDT", "WAT": "WAT"}, -+ locale: "so_DJ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "Fdj", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHDT": "LHDT", "PST": "PST", "WIT": "WIT", "EST": "EST", "HKST": "HKST", "HNNOMX": "HNNOMX", "CDT": "CDT", "AWST": "AWST", "UYST": "UYST", "PDT": "PDT", "WAST": "WAST", "AKST": "AKST", "HNT": "HNT", "∅∅∅": "∅∅∅", "COT": "COT", "GFT": "GFT", "BOT": "BOT", "GYT": "GYT", "COST": "COST", "EDT": "EDT", "OESZ": "OESZ", "HNEG": "HNEG", "JST": "JST", "JDT": "JDT", "MST": "MST", "ART": "ART", "ARST": "ARST", "GMT": "GMT", "SRT": "SRT", "MEZ": "MEZ", "ACST": "ACST", "ACWST": "ACWST", "WITA": "WITA", "SAST": "SAST", "SGT": "SGT", "HAST": "HAST", "HEPM": "HEPM", "IST": "IST", "BT": "BT", "HKT": "HKT", "NZDT": "NZDT", "HADT": "HADT", "CHAST": "CHAST", "UYT": "UYT", "TMST": "TMST", "ECT": "ECT", "ACDT": "ACDT", "HNPM": "HNPM", "AWDT": "AWDT", "HECU": "HECU", "AST": "AST", "WEZ": "WEZ", "WAT": "WAT", "OEZ": "OEZ", "NZST": "NZST", "MDT": "MDT", "LHST": "LHST", "CHADT": "CHADT", "HNCU": "HNCU", "WIB": "WIB", "EAT": "EAT", "HEPMX": "HEPMX", "WESZ": "WESZ", "VET": "VET", "WARST": "WARST", "ADT": "ADT", "CST": "CST", "MYT": "MYT", "ACWDT": "ACWDT", "AEST": "AEST", "TMT": "TMT", "CAT": "CAT", "HNPMX": "HNPMX", "HAT": "HAT", "WART": "WART", "CLST": "CLST", "HENOMX": "HENOMX", "MESZ": "MESZ", "HNOG": "HNOG", "CLT": "CLT", "HEEG": "HEEG", "AEDT": "AEDT", "AKDT": "AKDT", "HEOG": "HEOG", "ChST": "ChST"}, - } - } -  -@@ -116,7 +101,7 @@ func (so *so_DJ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (so *so_DJ) MonthsAbbreviated() []string { -- return so.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (so *so_DJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (so *so_DJ) MonthsNarrow() []string { -- return so.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (so *so_DJ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (so *so_DJ) MonthsWide() []string { -- return so.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (so *so_DJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, so.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'so_DJ' -@@ -254,64 +190,7 @@ func (so *so_DJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, so.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'so_DJ' -@@ -319,27 +198,6 @@ func (so *so_DJ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -348,21 +206,6 @@ func (so *so_DJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, so.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,21 +214,6 @@ func (so *so_DJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -394,24 +222,6 @@ func (so *so_DJ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, so.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -420,28 +230,6 @@ func (so *so_DJ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -450,35 +238,6 @@ func (so *so_DJ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -487,40 +246,6 @@ func (so *so_DJ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -529,44 +254,5 @@ func (so *so_DJ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := so.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/so_ET/so_ET.go b/so_ET/so_ET.go -index 4a607b4..d9796f4 100644 ---- a/so_ET/so_ET.go -+++ b/so_ET/so_ET.go -@@ -42,28 +42,13 @@ type so_ET struct { - // New returns a new instance of translator for the 'so_ET' locale - func New() locales.Translator { - return &so_ET{ -- locale: "so_ET", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "Br", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Kob", "Lab", "Sad", "Afr", "Sha", "Lix", "Tod", "Sid", "Sag", "Tob", "KIT", "LIT"}, -- monthsNarrow: []string{"", "K", "L", "S", "A", "S", "L", "T", "S", "S", "T", "K", "L"}, -- monthsWide: []string{"", "Bisha Koobaad", "Bisha Labaad", "Bisha Saddexaad", "Bisha Afraad", "Bisha Shanaad", "Bisha Lixaad", "Bisha Todobaad", "Bisha Sideedaad", "Bisha Sagaalaad", "Bisha Tobnaad", "Bisha Kow iyo Tobnaad", "Bisha Laba iyo Tobnaad"}, -- daysAbbreviated: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysNarrow: []string{"A", "I", "T", "A", "Kh", "J", "S"}, -- daysShort: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysWide: []string{"Axad", "Isniin", "Talaado", "Arbaco", "Khamiis", "Jimco", "Sabti"}, -- periodsAbbreviated: []string{"sn.", "gn."}, -- periodsNarrow: []string{"sn.", "gn."}, -- periodsWide: []string{"sn.", "gn."}, -- erasAbbreviated: []string{"CK", "CD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"CK", "CD"}, -- timezones: map[string]string{"∅∅∅": "∅∅∅", "ACWST": "ACWST", "MESZ": "MESZ", "CHADT": "CHADT", "ACDT": "ACDT", "GMT": "GMT", "HAST": "HAST", "AWDT": "AWDT", "NZST": "NZST", "TMST": "TMST", "JST": "JST", "HNEG": "HNEG", "ECT": "ECT", "COT": "Waqtiyada Caadiga ah ee kolambiya", "HENOMX": "HENOMX", "HNCU": "HNCU", "HNPMX": "HNPMX", "BT": "BT", "SAST": "SAST", "HECU": "HECU", "HEPMX": "HEPMX", "CST": "CST", "SRT": "SRT", "ACWDT": "ACWDT", "HAT": "HAT", "CHAST": "CHAST", "ACST": "ACST", "WIT": "WIT", "AEST": "AEST", "IST": "IST", "BOT": "BOT", "ART": "ART", "WART": "WART", "EST": "EST", "MDT": "MDT", "AST": "AST", "VET": "VET", "WEZ": "WEZ", "HNT": "HNT", "HNPM": "HNPM", "GFT": "GFT", "HNNOMX": "HNNOMX", "NZDT": "NZDT", "CAT": "CAT", "WAT": "WAT", "EDT": "EDT", "CDT": "CDT", "UYT": "UYT", "UYST": "UYST", "CLT": "CLT", "LHDT": "LHDT", "OEZ": "OEZ", "WARST": "WARST", "SGT": "SGT", "ADT": "ADT", "HADT": "HADT", "HEOG": "HEOG", "AWST": "AWST", "JDT": "JDT", "AKST": "AKST", "PDT": "PDT", "WITA": "WITA", "HEPM": "HEPM", "ChST": "ChST", "WAST": "WAST", "AKDT": "AKDT", "HKT": "HKT", "COST": "Waqtiyada Xagaaga Kolambiya", "AEDT": "AEDT", "TMT": "TMT", "MST": "MST", "WIB": "WIB", "PST": "PST", "MEZ": "MEZ", "HEEG": "HEEG", "OESZ": "OESZ", "GYT": "GYT", "WESZ": "WESZ", "HNOG": "HNOG", "HKST": "HKST", "EAT": "EAT", "MYT": "MYT", "ARST": "ARST", "LHST": "LHST", "CLST": "CLST"}, -+ locale: "so_ET", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "Br", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEEG": "HEEG", "AWST": "AWST", "CDT": "CDT", "MST": "MST", "MDT": "MDT", "ChST": "ChST", "MESZ": "MESZ", "UYT": "UYT", "MYT": "MYT", "AEST": "AEST", "EDT": "EDT", "HKT": "HKT", "CAT": "CAT", "SRT": "SRT", "EAT": "EAT", "MEZ": "MEZ", "JST": "JST", "CHADT": "CHADT", "PDT": "PDT", "WEZ": "WEZ", "OEZ": "OEZ", "ARST": "ARST", "HNEG": "HNEG", "LHST": "LHST", "CLT": "CLT", "GYT": "GYT", "COT": "COT", "COST": "COST", "AST": "AST", "ACWST": "ACWST", "HNCU": "HNCU", "OESZ": "OESZ", "HEOG": "HEOG", "ADT": "ADT", "UYST": "UYST", "IST": "IST", "CHAST": "CHAST", "SGT": "SGT", "WIB": "WIB", "BOT": "BOT", "HAST": "HAST", "JDT": "JDT", "AEDT": "AEDT", "VET": "VET", "ART": "ART", "ACDT": "ACDT", "LHDT": "LHDT", "WITA": "WITA", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "HECU": "HECU", "HNNOMX": "HNNOMX", "PST": "PST", "AKST": "AKST", "AKDT": "AKDT", "SAST": "SAST", "CST": "CST", "GMT": "GMT", "HADT": "HADT", "TMST": "TMST", "WART": "WART", "ECT": "ECT", "ACST": "ACST", "HEPMX": "HEPMX", "WAT": "WAT", "WAST": "WAST", "HNT": "HNT", "NZST": "NZST", "NZDT": "NZDT", "AWDT": "AWDT", "WARST": "WARST", "EST": "EST", "TMT": "TMT", "HENOMX": "HENOMX", "BT": "BT", "WESZ": "WESZ", "HAT": "HAT", "HNOG": "HNOG", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "GFT": "GFT", "CLST": "CLST", "HEPM": "HEPM", "WIT": "WIT", "HKST": "HKST"}, - } - } -  -@@ -116,7 +101,7 @@ func (so *so_ET) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (so *so_ET) MonthsAbbreviated() []string { -- return so.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (so *so_ET) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (so *so_ET) MonthsNarrow() []string { -- return so.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (so *so_ET) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (so *so_ET) MonthsWide() []string { -- return so.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (so *so_ET) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, so.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'so_ET' -@@ -254,64 +190,7 @@ func (so *so_ET) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, so.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'so_ET' -@@ -319,27 +198,6 @@ func (so *so_ET) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -348,21 +206,6 @@ func (so *so_ET) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, so.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,21 +214,6 @@ func (so *so_ET) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -394,24 +222,6 @@ func (so *so_ET) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, so.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -420,28 +230,6 @@ func (so *so_ET) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -450,35 +238,6 @@ func (so *so_ET) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -487,40 +246,6 @@ func (so *so_ET) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -529,44 +254,5 @@ func (so *so_ET) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := so.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/so_KE/so_KE.go b/so_KE/so_KE.go -index 8b7d29a..7b38bbf 100644 ---- a/so_KE/so_KE.go -+++ b/so_KE/so_KE.go -@@ -42,28 +42,13 @@ type so_KE struct { - // New returns a new instance of translator for the 'so_KE' locale - func New() locales.Translator { - return &so_KE{ -- locale: "so_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Kob", "Lab", "Sad", "Afr", "Sha", "Lix", "Tod", "Sid", "Sag", "Tob", "KIT", "LIT"}, -- monthsNarrow: []string{"", "K", "L", "S", "A", "S", "L", "T", "S", "S", "T", "K", "L"}, -- monthsWide: []string{"", "Bisha Koobaad", "Bisha Labaad", "Bisha Saddexaad", "Bisha Afraad", "Bisha Shanaad", "Bisha Lixaad", "Bisha Todobaad", "Bisha Sideedaad", "Bisha Sagaalaad", "Bisha Tobnaad", "Bisha Kow iyo Tobnaad", "Bisha Laba iyo Tobnaad"}, -- daysAbbreviated: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysNarrow: []string{"A", "I", "T", "A", "Kh", "J", "S"}, -- daysShort: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysWide: []string{"Axad", "Isniin", "Talaado", "Arbaco", "Khamiis", "Jimco", "Sabti"}, -- periodsAbbreviated: []string{"sn.", "gn."}, -- periodsNarrow: []string{"sn.", "gn."}, -- periodsWide: []string{"sn.", "gn."}, -- erasAbbreviated: []string{"CK", "CD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"CK", "CD"}, -- timezones: map[string]string{"HNEG": "HNEG", "HEEG": "HEEG", "ADT": "ADT", "IST": "IST", "JST": "JST", "∅∅∅": "∅∅∅", "JDT": "JDT", "AKST": "AKST", "CST": "CST", "GYT": "GYT", "CLT": "CLT", "CLST": "CLST", "TMST": "TMST", "OESZ": "OESZ", "WARST": "WARST", "SGT": "SGT", "WIB": "WIB", "HAST": "HAST", "ARST": "ARST", "AWDT": "AWDT", "BT": "BT", "UYT": "UYT", "HADT": "HADT", "SRT": "SRT", "HAT": "HAT", "MEZ": "MEZ", "EDT": "EDT", "VET": "VET", "ChST": "ChST", "EST": "EST", "EAT": "EAT", "WAT": "WAT", "MST": "MST", "HNPMX": "HNPMX", "WIT": "WIT", "HNPM": "HNPM", "CAT": "CAT", "WART": "WART", "OEZ": "OEZ", "WEZ": "WEZ", "HKST": "HKST", "WITA": "WITA", "BOT": "BOT", "GFT": "GFT", "HNNOMX": "HNNOMX", "PST": "PST", "ART": "ART", "ACDT": "ACDT", "COST": "Waqtiyada Xagaaga Kolambiya", "HENOMX": "HENOMX", "HNCU": "HNCU", "PDT": "PDT", "LHST": "LHST", "MYT": "MYT", "HEPM": "HEPM", "NZDT": "NZDT", "LHDT": "LHDT", "GMT": "GMT", "HEPMX": "HEPMX", "ACWST": "ACWST", "AEDT": "AEDT", "CHADT": "CHADT", "TMT": "TMT", "WAST": "WAST", "MDT": "MDT", "ACWDT": "ACWDT", "MESZ": "MESZ", "CHAST": "CHAST", "SAST": "SAST", "COT": "Waqtiyada Caadiga ah ee kolambiya", "HNOG": "HNOG", "AWST": "AWST", "NZST": "NZST", "AKDT": "AKDT", "CDT": "CDT", "AST": "AST", "WESZ": "WESZ", "HKT": "HKT", "AEST": "AEST", "ACST": "ACST", "ECT": "ECT", "HECU": "HECU", "UYST": "UYST", "HNT": "HNT", "HEOG": "HEOG"}, -+ locale: "so_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNT": "HNT", "GYT": "GYT", "HADT": "HADT", "AWDT": "AWDT", "HNNOMX": "HNNOMX", "LHST": "LHST", "PST": "PST", "BT": "BT", "SGT": "SGT", "WAST": "WAST", "GFT": "GFT", "HAT": "HAT", "LHDT": "LHDT", "WIT": "WIT", "EST": "EST", "ACST": "ACST", "COT": "COT", "EDT": "EDT", "HKST": "HKST", "TMST": "TMST", "CLT": "CLT", "WITA": "WITA", "MESZ": "MESZ", "JDT": "JDT", "UYST": "UYST", "VET": "VET", "OESZ": "OESZ", "MDT": "MDT", "BOT": "BOT", "HNPM": "HNPM", "ACWST": "ACWST", "AST": "AST", "GMT": "GMT", "IST": "IST", "WESZ": "WESZ", "AKDT": "AKDT", "HNEG": "HNEG", "CHAST": "CHAST", "NZDT": "NZDT", "ECT": "ECT", "AEDT": "AEDT", "HEOG": "HEOG", "ARST": "ARST", "ACDT": "ACDT", "MYT": "MYT", "ACWDT": "ACWDT", "OEZ": "OEZ", "WIB": "WIB", "MST": "MST", "HAST": "HAST", "MEZ": "MEZ", "JST": "JST", "HNCU": "HNCU", "HKT": "HKT", "CST": "CST", "CDT": "CDT", "ChST": "ChST", "ART": "ART", "HENOMX": "HENOMX", "∅∅∅": "∅∅∅", "AKST": "AKST", "WARST": "WARST", "HNOG": "HNOG", "TMT": "TMT", "CLST": "CLST", "EAT": "EAT", "HEEG": "HEEG", "CHADT": "CHADT", "WAT": "WAT", "COST": "COST", "SRT": "SRT", "AWST": "AWST", "UYT": "UYT", "HNPMX": "HNPMX", "HECU": "HECU", "WART": "WART", "SAST": "SAST", "CAT": "CAT", "HEPM": "HEPM", "WEZ": "WEZ", "NZST": "NZST", "ADT": "ADT", "AEST": "AEST", "PDT": "PDT", "HEPMX": "HEPMX"}, - } - } -  -@@ -116,7 +101,7 @@ func (so *so_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (so *so_KE) MonthsAbbreviated() []string { -- return so.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (so *so_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (so *so_KE) MonthsNarrow() []string { -- return so.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (so *so_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (so *so_KE) MonthsWide() []string { -- return so.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (so *so_KE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, so.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'so_KE' -@@ -254,64 +190,7 @@ func (so *so_KE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, so.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'so_KE' -@@ -319,27 +198,6 @@ func (so *so_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -348,21 +206,6 @@ func (so *so_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, so.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,21 +214,6 @@ func (so *so_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -394,24 +222,6 @@ func (so *so_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, so.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/so_SO/so_SO.go b/so_SO/so_SO.go -index 355d0ac..18bef8e 100644 ---- a/so_SO/so_SO.go -+++ b/so_SO/so_SO.go -@@ -42,28 +42,13 @@ type so_SO struct { - // New returns a new instance of translator for the 'so_SO' locale - func New() locales.Translator { - return &so_SO{ -- locale: "so_SO", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Kob", "Lab", "Sad", "Afr", "Sha", "Lix", "Tod", "Sid", "Sag", "Tob", "KIT", "LIT"}, -- monthsNarrow: []string{"", "K", "L", "S", "A", "S", "L", "T", "S", "S", "T", "K", "L"}, -- monthsWide: []string{"", "Bisha Koobaad", "Bisha Labaad", "Bisha Saddexaad", "Bisha Afraad", "Bisha Shanaad", "Bisha Lixaad", "Bisha Todobaad", "Bisha Sideedaad", "Bisha Sagaalaad", "Bisha Tobnaad", "Bisha Kow iyo Tobnaad", "Bisha Laba iyo Tobnaad"}, -- daysAbbreviated: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysNarrow: []string{"A", "I", "T", "A", "Kh", "J", "S"}, -- daysShort: []string{"Axd", "Isn", "Tal", "Arb", "Kha", "Jim", "Sab"}, -- daysWide: []string{"Axad", "Isniin", "Talaado", "Arbaco", "Khamiis", "Jimco", "Sabti"}, -- periodsAbbreviated: []string{"sn.", "gn."}, -- periodsNarrow: []string{"sn.", "gn."}, -- periodsWide: []string{"sn.", "gn."}, -- erasAbbreviated: []string{"CK", "CD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"CK", "CD"}, -- timezones: map[string]string{"AKST": "AKST", "ACWDT": "ACWDT", "WITA": "WITA", "BOT": "BOT", "HEPMX": "HEPMX", "EAT": "EAT", "AKDT": "AKDT", "HADT": "HADT", "JST": "JST", "JDT": "JDT", "PDT": "PDT", "ACST": "ACST", "COT": "Waqtiyada Caadiga ah ee kolambiya", "ADT": "ADT", "GYT": "GYT", "SRT": "SRT", "HNT": "HNT", "AEST": "AEST", "HEPM": "HEPM", "HNCU": "HNCU", "CDT": "CDT", "CHADT": "CHADT", "WAT": "WAT", "UYT": "UYT", "WESZ": "WESZ", "AWDT": "AWDT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "TMST": "TMST", "BT": "BT", "SAST": "SAST", "CAT": "CAT", "ACWST": "ACWST", "ART": "ART", "HECU": "HECU", "MST": "MST", "HNNOMX": "HNNOMX", "EDT": "EDT", "UYST": "UYST", "WIT": "WIT", "HKST": "HKST", "AEDT": "AEDT", "TMT": "TMT", "ACDT": "ACDT", "AWST": "AWST", "OESZ": "OESZ", "COST": "Waqtiyada Xagaaga Kolambiya", "GFT": "GFT", "WAST": "WAST", "HEOG": "HEOG", "ChST": "ChST", "SGT": "SGT", "PST": "PST", "WEZ": "WEZ", "HNEG": "HNEG", "WARST": "WARST", "AST": "AST", "VET": "VET", "HNOG": "HNOG", "CLT": "CLT", "WART": "WART", "MEZ": "MEZ", "CLST": "CLST", "WIB": "WIB", "MDT": "MDT", "MYT": "MYT", "HKT": "HKT", "HNPM": "HNPM", "NZST": "NZST", "CHAST": "CHAST", "ECT": "ECT", "GMT": "GMT", "HAT": "HAT", "LHST": "LHST", "LHDT": "LHDT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "OEZ": "OEZ", "EST": "EST", "CST": "CST", "HAST": "HAST", "ARST": "ARST", "NZDT": "NZDT", "IST": "IST", "HEEG": "HEEG"}, -+ locale: "so_SO", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"LHST": "LHST", "AKDT": "AKDT", "HAT": "HAT", "CAT": "CAT", "HEEG": "HEEG", "HNPMX": "HNPMX", "WESZ": "WESZ", "SGT": "SGT", "TMT": "TMT", "PDT": "PDT", "WEZ": "WEZ", "VET": "VET", "WITA": "WITA", "ADT": "ADT", "UYT": "UYT", "WART": "WART", "WIT": "WIT", "TMST": "TMST", "MDT": "MDT", "ECT": "ECT", "OESZ": "OESZ", "COT": "COT", "WIB": "WIB", "HAST": "HAST", "HNEG": "HNEG", "HEPM": "HEPM", "HADT": "HADT", "HNPM": "HNPM", "ACWDT": "ACWDT", "GYT": "GYT", "SRT": "SRT", "EAT": "EAT", "CHAST": "CHAST", "EDT": "EDT", "CLST": "CLST", "NZDT": "NZDT", "EST": "EST", "HENOMX": "HENOMX", "JST": "JST", "ACWST": "ACWST", "OEZ": "OEZ", "AST": "AST", "ACST": "ACST", "AEST": "AEST", "BT": "BT", "HECU": "HECU", "HKST": "HKST", "CDT": "CDT", "AWDT": "AWDT", "COST": "COST", "HNOG": "HNOG", "CST": "CST", "MST": "MST", "ART": "ART", "ARST": "ARST", "AKST": "AKST", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "IST": "IST", "HEPMX": "HEPMX", "SAST": "SAST", "HEOG": "HEOG", "HKT": "HKT", "NZST": "NZST", "UYST": "UYST", "ChST": "ChST", "ACDT": "ACDT", "JDT": "JDT", "WAST": "WAST", "MEZ": "MEZ", "LHDT": "LHDT", "AEDT": "AEDT", "PST": "PST", "HNCU": "HNCU", "WAT": "WAT", "GFT": "GFT", "HNT": "HNT", "MESZ": "MESZ", "CLT": "CLT", "GMT": "GMT", "BOT": "BOT", "WARST": "WARST", "MYT": "MYT", "CHADT": "CHADT", "AWST": "AWST"}, - } - } -  -@@ -116,7 +101,7 @@ func (so *so_SO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (so *so_SO) MonthsAbbreviated() []string { -- return so.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (so *so_SO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (so *so_SO) MonthsNarrow() []string { -- return so.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (so *so_SO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (so *so_SO) MonthsWide() []string { -- return so.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (so *so_SO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, so.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'so_SO' -@@ -254,64 +190,7 @@ func (so *so_SO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := so.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, so.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, so.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, so.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, so.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'so_SO' -@@ -319,27 +198,6 @@ func (so *so_SO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -348,21 +206,6 @@ func (so *so_SO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, so.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,21 +214,6 @@ func (so *so_SO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -394,24 +222,6 @@ func (so *so_SO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, so.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, so.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -420,28 +230,6 @@ func (so *so_SO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -450,35 +238,6 @@ func (so *so_SO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -487,40 +246,6 @@ func (so *so_SO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -529,44 +254,5 @@ func (so *so_SO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, so.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, so.periodsAbbreviated[0]...) -- } else { -- b = append(b, so.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := so.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sq/sq.go b/sq/sq.go -index afd3653..1fdb580 100644 ---- a/sq/sq.go -+++ b/sq/sq.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"p.K.", "mb.K."}, - erasNarrow: []string{"p.K.", "mb.K."}, - erasWide: []string{"para Krishtit", "mbas Krishtit"}, -- timezones: map[string]string{"WIT": "Ora e Indonezisë Lindore", "WEZ": "Ora standarde e Evropës Perëndimore", "JDT": "Ora verore e Japonisë", "HNEG": "Ora standarde e Grenlandës Lindore", "TMT": "Ora standarde e Turkmenistanit", "ACST": "Ora standarde e Australisë Qendrore", "OEZ": "Ora standarde e Evropës Lindore", "HENOMX": "Ora verore e Meksikës Veriperëndimore", "ARST": "Ora verore e Argjentinës", "WITA": "Ora e Indonezisë Qendrore", "TMST": "Ora verore e Turkmenistanit", "CAT": "Ora e Afrikës Qendrore", "EAT": "Ora e Afrikës Lindore", "COT": "Ora standarde e Kolumbisë", "HAST": "Ora standarde e Ishujve Hauai-Aleutian", "CHAST": "Ora standarde e Katamit", "WAST": "Ora verore e Afrikës Perëndimore", "HNNOMX": "Ora standarde e Meksikës Veriperëndimore", "EST": "Ora standarde e SHBA-së Lindore", "GYT": "Ora e Guajanës", "UYST": "Ora verore e Uruguait", "AEDT": "Ora verore e Australisë Lindore", "BOT": "Ora e Bolivisë", "HNCU": "Ora standarde e Kubës", "EDT": "Ora verore e SHBA-së Lindore", "CDT": "Ora verore e SHBA-së Qendrore", "WESZ": "Ora verore e Evropës Perëndimore", "HNT": "Ora standarde e Njufaundlendit [Tokës së Re]", "GMT": "Ora e Meridianit të Grinuiçit", "UYT": "Ora standarde e Uruguait", "ACWST": "Ora standarde e Australisë Qendroro-Perëndimore", "CHADT": "Ora verore e Katamit", "GFT": "Ora e Guajanës Franceze", "AST": "Ora standarde e Atlantikut", "HNPM": "Ora standarde e Shën-Pier dhe Mikuelon", "NZST": "Ora standarde e Zelandës së Re", "∅∅∅": "Ora verore e Amazonës", "HEEG": "Ora verore e Grenlandës Lindore", "HEPMX": "Ora verore meksikane e Bregut të Paqësorit", "LHDT": "Ora verore e Lord-Houit", "SAST": "Ora standarde e Afrikës Jugore", "ChST": "Ora e Kamorros", "HNPMX": "Ora standarde meksikane e Bregut të Paqësorit", "HADT": "Ora verore e Ishujve Hauai-Aleutian", "PDT": "Ora verore amerikane e Bregut të Paqësorit", "ACDT": "Ora verore e Australisë Qendrore", "MST": "Ora standarde e Makaos", "COST": "Ora verore e Kolumbisë", "HECU": "Ora verore e Kubës", "HAT": "Ora verore e Njufaundlendit [Tokës së Re]", "HEPM": "Ora verore e Shën-Pier dhe Mikuelon", "WARST": "Ora verore e Argjentinës Perëndimore", "SGT": "Ora e Singaporit", "CST": "Ora standarde e SHBA-së Qendrore", "BT": "Ora e Butanit", "PST": "Ora standarde amerikane e Bregut të Paqësorit", "VET": "Ora e Venezuelës", "MESZ": "Ora verore e Evropës Qendrore", "NZDT": "Ora verore e Zelandës së Re", "ACWDT": "Ora verore e Australisë Qendroro-Perëndimore", "LHST": "Ora standarde e Lord-Houit", "IST": "Ora standarde e Indisë", "WAT": "Ora standarde e Afrikës Perëndimore", "OESZ": "Ora verore e Evropës Lindore", "AKDT": "Ora verore e Alsaskës", "MYT": "Ora e Malajzisë", "SRT": "Ora e Surinamit", "JST": "Ora standarde e Japonisë", "HNOG": "Ora standarde e Grenlandës Perëndimore", "HKT": "Ora standarde e Hong-Kongut", "CLST": "Ora verore e Kilit", "AKST": "Ora standarde e Alaskës", "ADT": "Ora verore e Atlantikut", "ART": "Ora standarde e Argjentinës", "AWDT": "Ora verore e Australisë Perëndimore", "AEST": "Ora standarde e Australisë Lindore", "AWST": "Ora standarde e Australisë Perëndimore", "CLT": "Ora standarde e Kilit", "ECT": "Ora e Ekuadorit", "WART": "Ora standarde e Argjentinës Perëndimore", "MDT": "Ora verore e Makaos", "WIB": "Ora e Indonezisë Perëndimore", "HEOG": "Ora verore e Grenlandës Perëndimore", "HKST": "Ora verore e Hong-Kongut", "MEZ": "Ora standarde e Evropës Qendrore"}, -+ timezones: map[string]string{"HNEG": "Ora standarde e Grenlandës Lindore", "HNPM": "Ora standarde e Shën-Pier dhe Mikuelon", "CHAST": "Ora standarde e Katamit", "BT": "Ora e Butanit", "HECU": "Ora verore e Kubës", "HNOG": "Ora standarde e Grenlandës Perëndimore", "MESZ": "Ora verore e Evropës Qendrore", "HENOMX": "Ora verore e Meksikës Veriperëndimore", "WAST": "Ora verore e Afrikës Perëndimore", "SAST": "Ora standarde e Afrikës Jugore", "HADT": "Ora verore e Ishujve Hauai-Aleutian", "NZST": "Ora standarde e Zelandës së Re", "ACDT": "Ora verore e Australisë Qendrore", "CHADT": "Ora verore e Katamit", "OESZ": "Ora verore e Evropës Lindore", "GYT": "Ora e Guajanës", "COST": "Ora verore e Kolumbisë", "CDT": "Ora verore e SHBA-së Qendrore", "ARST": "Ora verore e Argjentinës", "SRT": "Ora e Surinamit", "WESZ": "Ora verore e Evropës Perëndimore", "GMT": "Ora e Meridianit të Grinuiçit", "AST": "Ora standarde e Atlantikut", "BOT": "Ora e Bolivisë", "EAT": "Ora e Afrikës Lindore", "AEST": "Ora standarde e Australisë Lindore", "HNT": "Ora standarde e Njufaundlendit [Tokës së Re]", "WART": "Ora standarde e Argjentinës Perëndimore", "CLT": "Ora standarde e Kilit", "ECT": "Ora e Ekuadorit", "ACST": "Ora standarde e Australisë Qendrore", "HEEG": "Ora verore e Grenlandës Lindore", "ACWST": "Ora standarde e Australisë Qendroro-Perëndimore", "WARST": "Ora verore e Argjentinës Perëndimore", "WIT": "Ora e Indonezisë Lindore", "MST": "Ora standarde e Makaos", "HEPMX": "Ora verore meksikane e Bregut të Paqësorit", "AKST": "Ora standarde e Alaskës", "OEZ": "Ora standarde e Evropës Lindore", "GFT": "Ora e Guajanës Franceze", "AWST": "Ora standarde e Australisë Perëndimore", "HEPM": "Ora verore e Shën-Pier dhe Mikuelon", "UYST": "Ora verore e Uruguait", "IST": "Ora standarde e Indisë", "AKDT": "Ora verore e Alsaskës", "AWDT": "Ora verore e Australisë Perëndimore", "HAST": "Ora standarde e Ishujve Hauai-Aleutian", "JDT": "Ora verore e Japonisë", "WEZ": "Ora standarde e Evropës Perëndimore", "HKT": "Ora standarde e Hong-Kongut", "TMST": "Ora verore e Turkmenistanit", "ChST": "Ora e Kamorros", "HNNOMX": "Ora standarde e Meksikës Veriperëndimore", "JST": "Ora standarde e Japonisë", "LHST": "Ora standarde e Lord-Houit", "CLST": "Ora verore e Kilit", "MDT": "Ora verore e Makaos", "NZDT": "Ora verore e Zelandës së Re", "ART": "Ora standarde e Argjentinës", "AEDT": "Ora verore e Australisë Lindore", "UYT": "Ora standarde e Uruguait", "SGT": "Ora e Singaporit", "WAT": "Ora standarde e Afrikës Perëndimore", "HAT": "Ora verore e Njufaundlendit [Tokës së Re]", "WIB": "Ora e Indonezisë Perëndimore", "WITA": "Ora e Indonezisë Qendrore", "VET": "Ora e Venezuelës", "HKST": "Ora verore e Hong-Kongut", "ACWDT": "Ora verore e Australisë Qendroro-Perëndimore", "LHDT": "Ora verore e Lord-Houit", "MYT": "Ora e Malajzisë", "PDT": "Ora verore amerikane e Bregut të Paqësorit", "COT": "Ora standarde e Kolumbisë", "EDT": "Ora verore e SHBA-së Lindore", "TMT": "Ora standarde e Turkmenistanit", "ADT": "Ora verore e Atlantikut", "∅∅∅": "Ora verore e Ejkrit [Ako]", "PST": "Ora standarde amerikane e Bregut të Paqësorit", "HNPMX": "Ora standarde meksikane e Bregut të Paqësorit", "HNCU": "Ora standarde e Kubës", "EST": "Ora standarde e SHBA-së Lindore", "CST": "Ora standarde e SHBA-së Qendrore", "HEOG": "Ora verore e Grenlandës Perëndimore", "CAT": "Ora e Afrikës Qendrore", "MEZ": "Ora standarde e Evropës Qendrore"}, - } - } -  -diff --git a/sq_AL/sq_AL.go b/sq_AL/sq_AL.go -index e2bb61f..74a5e28 100644 ---- a/sq_AL/sq_AL.go -+++ b/sq_AL/sq_AL.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sq_AL struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sq_AL' locale - func New() locales.Translator { - return &sq_AL{ -- locale: "sq_AL", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan", "shk", "mar", "pri", "maj", "qer", "kor", "gsh", "sht", "tet", "nën", "dhj"}, -- monthsNarrow: []string{"", "j", "s", "m", "p", "m", "q", "k", "g", "s", "t", "n", "d"}, -- monthsWide: []string{"", "janar", "shkurt", "mars", "prill", "maj", "qershor", "korrik", "gusht", "shtator", "tetor", "nëntor", "dhjetor"}, -- daysAbbreviated: []string{"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"}, -- daysNarrow: []string{"D", "H", "M", "M", "E", "P", "S"}, -- daysShort: []string{"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"}, -- daysWide: []string{"e diel", "e hënë", "e martë", "e mërkurë", "e enjte", "e premte", "e shtunë"}, -- periodsAbbreviated: []string{"e paradites", "e pasdites"}, -- periodsNarrow: []string{"e paradites", "e pasdites"}, -- periodsWide: []string{"e paradites", "e pasdites"}, -- erasAbbreviated: []string{"p.K.", "mb.K."}, -- erasNarrow: []string{"p.K.", "mb.K."}, -- erasWide: []string{"para Krishtit", "mbas Krishtit"}, -- timezones: map[string]string{"HECU": "Ora verore e Kubës", "EDT": "Ora verore e SHBA-së Lindore", "MYT": "Ora e Malajzisë", "SAST": "Ora standarde e Afrikës Jugore", "GFT": "Ora e Guajanës Franceze", "WAT": "Ora standarde e Afrikës Perëndimore", "SGT": "Ora e Singaporit", "MEZ": "Ora standarde e Evropës Qendrore", "HEEG": "Ora verore e Grenlandës Lindore", "MST": "Ora standarde e Makaos", "ECT": "Ora e Ekuadorit", "HNNOMX": "Ora standarde e Meksikës Veriperëndimore", "VET": "Ora e Venezuelës", "WEZ": "Ora standarde e Evropës Perëndimore", "AWDT": "Ora verore e Australisë Perëndimore", "∅∅∅": "Ora verore e Amazonës", "JST": "Ora standarde e Japonisë", "TMST": "Ora verore e Turkmenistanit", "ACWDT": "Ora verore e Australisë Qendroro-Perëndimore", "HEOG": "Ora verore e Grenlandës Perëndimore", "EST": "Ora standarde e SHBA-së Lindore", "GYT": "Ora e Guajanës", "BT": "Ora e Butanit", "WESZ": "Ora verore e Evropës Perëndimore", "AEST": "Ora standarde e Australisë Lindore", "HNPM": "Ora standarde e Shën-Pier dhe Mikuelon", "BOT": "Ora e Bolivisë", "CST": "Ora standarde e SHBA-së Qendrore", "WAST": "Ora verore e Afrikës Perëndimore", "OESZ": "Ora verore e Evropës Lindore", "HENOMX": "Ora verore e Meksikës Veriperëndimore", "AKST": "Ora standarde e Alaskës", "HEPM": "Ora verore e Shën-Pier dhe Mikuelon", "ChST": "Ora e Kamorros", "ACDT": "Ora verore e Australisë Qendrore", "EAT": "Ora e Afrikës Lindore", "AKDT": "Ora verore e Alsaskës", "PDT": "Ora verore amerikane e Bregut të Paqësorit", "ACWST": "Ora standarde e Australisë Qendroro-Perëndimore", "WITA": "Ora e Indonezisë Qendrore", "CHAST": "Ora standarde e Katamit", "CLT": "Ora standarde e Kilit", "AST": "Ora standarde e Atlantikut", "NZDT": "Ora verore e Zelandës së Re", "CAT": "Ora e Afrikës Qendrore", "COST": "Ora verore e Kolumbisë", "HNPMX": "Ora standarde meksikane e Bregut të Paqësorit", "ADT": "Ora verore e Atlantikut", "HNOG": "Ora standarde e Grenlandës Perëndimore", "AWST": "Ora standarde e Australisë Perëndimore", "HKT": "Ora standarde e Hong-Kongut", "LHST": "Ora standarde e Lord-Houit", "CLST": "Ora verore e Kilit", "HNT": "Ora standarde e Njufaundlendit [Tokës së Re]", "ART": "Ora standarde e Argjentinës", "ACST": "Ora standarde e Australisë Qendrore", "WARST": "Ora verore e Argjentinës Perëndimore", "GMT": "Ora e Meridianit të Grinuiçit", "HADT": "Ora verore e Ishujve Hauai-Aleutian", "HAST": "Ora standarde e Ishujve Hauai-Aleutian", "SRT": "Ora e Surinamit", "CHADT": "Ora verore e Katamit", "HNEG": "Ora standarde e Grenlandës Lindore", "TMT": "Ora standarde e Turkmenistanit", "WART": "Ora standarde e Argjentinës Perëndimore", "MESZ": "Ora verore e Evropës Qendrore", "COT": "Ora standarde e Kolumbisë", "HEPMX": "Ora verore meksikane e Bregut të Paqësorit", "UYT": "Ora standarde e Uruguait", "WIT": "Ora e Indonezisë Lindore", "HKST": "Ora verore e Hong-Kongut", "LHDT": "Ora verore e Lord-Houit", "NZST": "Ora standarde e Zelandës së Re", "HNCU": "Ora standarde e Kubës", "OEZ": "Ora standarde e Evropës Lindore", "MDT": "Ora verore e Makaos", "CDT": "Ora verore e SHBA-së Qendrore", "ARST": "Ora verore e Argjentinës", "PST": "Ora standarde amerikane e Bregut të Paqësorit", "AEDT": "Ora verore e Australisë Lindore", "IST": "Ora standarde e Indisë", "JDT": "Ora verore e Japonisë", "WIB": "Ora e Indonezisë Perëndimore", "UYST": "Ora verore e Uruguait", "HAT": "Ora verore e Njufaundlendit [Tokës së Re]"}, -+ locale: "sq_AL", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HECU": "HECU", "COST": "COST", "HEEG": "HEEG", "UYT": "UYT", "AKDT": "AKDT", "CLT": "CLT", "ACDT": "ACDT", "AEST": "AEST", "HNPMX": "HNPMX", "AST": "AST", "HAST": "HAST", "MEZ": "MEZ", "CHADT": "CHADT", "HAT": "HAT", "WART": "WART", "CAT": "CAT", "ART": "ART", "HNNOMX": "HNNOMX", "OESZ": "OESZ", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "EDT": "EDT", "HENOMX": "HENOMX", "MYT": "MYT", "ACWDT": "ACWDT", "CHAST": "CHAST", "PST": "PST", "BT": "BT", "WAT": "WAT", "NZST": "NZST", "HNEG": "HNEG", "LHST": "LHST", "COT": "COT", "IST": "IST", "ADT": "ADT", "SAST": "SAST", "EST": "EST", "TMST": "TMST", "MDT": "MDT", "EAT": "EAT", "GYT": "GYT", "AWST": "AWST", "AWDT": "AWDT", "HNCU": "HNCU", "VET": "VET", "TMT": "TMT", "CST": "CST", "ACST": "ACST", "JST": "JST", "SRT": "SRT", "MESZ": "MESZ", "NZDT": "NZDT", "ACWST": "ACWST", "AKST": "AKST", "GFT": "GFT", "CDT": "CDT", "ARST": "ARST", "LHDT": "LHDT", "HNT": "HNT", "WIT": "WIT", "HNOG": "HNOG", "HEOG": "HEOG", "HKST": "HKST", "UYST": "UYST", "AEDT": "AEDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "WITA": "WITA", "WIB": "WIB", "GMT": "GMT", "HEPM": "HEPM", "JDT": "JDT", "PDT": "PDT", "WESZ": "WESZ", "WAST": "WAST", "ECT": "ECT", "MST": "MST", "ChST": "ChST", "HNPM": "HNPM", "HADT": "HADT", "WARST": "WARST", "HKT": "HKT", "CLST": "CLST", "BOT": "BOT", "SGT": "SGT"}, - } - } -  -@@ -148,7 +123,7 @@ func (sq *sq_AL) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sq *sq_AL) MonthsAbbreviated() []string { -- return sq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -158,7 +133,7 @@ func (sq *sq_AL) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sq *sq_AL) MonthsNarrow() []string { -- return sq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -168,7 +143,7 @@ func (sq *sq_AL) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sq *sq_AL) MonthsWide() []string { -- return sq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -214,75 +189,13 @@ func (sq *sq_AL) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sq_AL' and handles both Whole and Real numbers based on 'v' - func (sq *sq_AL) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sq_AL' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sq *sq_AL) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sq.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sq_AL' -@@ -290,58 +203,7 @@ func (sq *sq_AL) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sq.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sq.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sq_AL' -@@ -350,65 +212,7 @@ func (sq *sq_AL) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sq.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sq.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sq.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sq.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sq_AL' -@@ -416,17 +220,6 @@ func (sq *sq_AL) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -435,17 +228,6 @@ func (sq *sq_AL) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,17 +236,6 @@ func (sq *sq_AL) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,19 +244,6 @@ func (sq *sq_AL) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -494,28 +252,6 @@ func (sq *sq_AL) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, sq.periodsAbbreviated[0]...) -- } else { -- b = append(b, sq.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -524,35 +260,6 @@ func (sq *sq_AL) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, sq.periodsAbbreviated[0]...) -- } else { -- b = append(b, sq.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -561,40 +268,6 @@ func (sq *sq_AL) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, sq.periodsAbbreviated[0]...) -- } else { -- b = append(b, sq.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -603,44 +276,5 @@ func (sq *sq_AL) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, sq.periodsAbbreviated[0]...) -- } else { -- b = append(b, sq.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sq.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sq_MK/sq_MK.go b/sq_MK/sq_MK.go -index 84ff3ec..5771358 100644 ---- a/sq_MK/sq_MK.go -+++ b/sq_MK/sq_MK.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sq_MK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sq_MK' locale - func New() locales.Translator { - return &sq_MK{ -- locale: "sq_MK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "den", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan", "shk", "mar", "pri", "maj", "qer", "kor", "gsh", "sht", "tet", "nën", "dhj"}, -- monthsNarrow: []string{"", "j", "s", "m", "p", "m", "q", "k", "g", "s", "t", "n", "d"}, -- monthsWide: []string{"", "janar", "shkurt", "mars", "prill", "maj", "qershor", "korrik", "gusht", "shtator", "tetor", "nëntor", "dhjetor"}, -- daysAbbreviated: []string{"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"}, -- daysNarrow: []string{"D", "H", "M", "M", "E", "P", "S"}, -- daysShort: []string{"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"}, -- daysWide: []string{"e diel", "e hënë", "e martë", "e mërkurë", "e enjte", "e premte", "e shtunë"}, -- periodsAbbreviated: []string{"e paradites", "e pasdites"}, -- periodsNarrow: []string{"e paradites", "e pasdites"}, -- periodsWide: []string{"e paradites", "e pasdites"}, -- erasAbbreviated: []string{"p.K.", "mb.K."}, -- erasNarrow: []string{"p.K.", "mb.K."}, -- erasWide: []string{"para Krishtit", "mbas Krishtit"}, -- timezones: map[string]string{"HNNOMX": "Ora standarde e Meksikës Veriperëndimore", "BT": "Ora e Butanit", "ART": "Ora standarde e Argjentinës", "HKT": "Ora standarde e Hong-Kongut", "CHAST": "Ora standarde e Katamit", "IST": "Ora standarde e Indisë", "∅∅∅": "Ora verore e Amazonës", "HNEG": "Ora standarde e Grenlandës Lindore", "GMT": "Ora e Meridianit të Grinuiçit", "EDT": "Ora verore e SHBA-së Lindore", "CLT": "Ora standarde e Kilit", "ACST": "Ora standarde e Australisë Qendrore", "EAT": "Ora e Afrikës Lindore", "ECT": "Ora e Ekuadorit", "COST": "Ora verore e Kolumbisë", "GYT": "Ora e Guajanës", "WESZ": "Ora verore e Evropës Perëndimore", "ARST": "Ora verore e Argjentinës", "NZST": "Ora standarde e Zelandës së Re", "ACDT": "Ora verore e Australisë Qendrore", "WART": "Ora standarde e Argjentinës Perëndimore", "HNPMX": "Ora standarde meksikane e Bregut të Paqësorit", "CDT": "Ora verore e SHBA-së Qendrore", "ACWDT": "Ora verore e Australisë Qendroro-Perëndimore", "HEOG": "Ora verore e Grenlandës Perëndimore", "TMT": "Ora standarde e Turkmenistanit", "CAT": "Ora e Afrikës Qendrore", "HENOMX": "Ora verore e Meksikës Veriperëndimore", "UYST": "Ora verore e Uruguait", "HAST": "Ora standarde e Ishujve Hauai-Aleutian", "HADT": "Ora verore e Ishujve Hauai-Aleutian", "MEZ": "Ora standarde e Evropës Qendrore", "MESZ": "Ora verore e Evropës Qendrore", "CLST": "Ora verore e Kilit", "WAT": "Ora standarde e Afrikës Perëndimore", "AST": "Ora standarde e Atlantikut", "MST": "Ora standarde amerikane e Brezit Malor", "SRT": "Ora e Surinamit", "HKST": "Ora verore e Hong-Kongut", "VET": "Ora e Venezuelës", "WITA": "Ora e Indonezisë Qendrore", "JDT": "Ora verore e Japonisë", "WARST": "Ora verore e Argjentinës Perëndimore", "HNCU": "Ora standarde e Kubës", "MDT": "Ora verore amerikane e Brezit Malor", "WIT": "Ora e Indonezisë Lindore", "AWDT": "Ora verore e Australisë Perëndimore", "NZDT": "Ora verore e Zelandës së Re", "JST": "Ora standarde e Japonisë", "WAST": "Ora verore e Afrikës Perëndimore", "SGT": "Ora e Singaporit", "WEZ": "Ora standarde e Evropës Perëndimore", "HNT": "Ora standarde e Njufaundlendit [Tokës së Re]", "LHST": "Ora standarde e Lord-Houit", "HECU": "Ora verore e Kubës", "CST": "Ora standarde e SHBA-së Qendrore", "ADT": "Ora verore e Atlantikut", "ACWST": "Ora standarde e Australisë Qendroro-Perëndimore", "HNPM": "Ora standarde e Shën-Pier dhe Mikuelon", "BOT": "Ora e Bolivisë", "EST": "Ora standarde e SHBA-së Lindore", "AKST": "Ora standarde e Alaskës", "PDT": "Ora verore amerikane e Bregut të Paqësorit", "PST": "Ora standarde amerikane e Bregut të Paqësorit", "HNOG": "Ora standarde e Grenlandës Perëndimore", "AEST": "Ora standarde e Australisë Lindore", "LHDT": "Ora verore e Lord-Houit", "MYT": "Ora e Malajzisë", "CHADT": "Ora verore e Katamit", "ChST": "Ora e Kamorros", "OEZ": "Ora standarde e Evropës Lindore", "OESZ": "Ora verore e Evropës Lindore", "WIB": "Ora e Indonezisë Perëndimore", "HEPM": "Ora verore e Shën-Pier dhe Mikuelon", "HEEG": "Ora verore e Grenlandës Lindore", "GFT": "Ora e Guajanës Franceze", "TMST": "Ora verore e Turkmenistanit", "AKDT": "Ora verore e Alsaskës", "HAT": "Ora verore e Njufaundlendit [Tokës së Re]", "AWST": "Ora standarde e Australisë Perëndimore", "SAST": "Ora standarde e Afrikës Jugore", "HEPMX": "Ora verore meksikane e Bregut të Paqësorit", "UYT": "Ora standarde e Uruguait", "AEDT": "Ora verore e Australisë Lindore", "COT": "Ora standarde e Kolumbisë"}, -+ locale: "sq_MK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "den", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"∅∅∅": "∅∅∅", "EDT": "EDT", "CDT": "CDT", "MDT": "MDT", "ACST": "ACST", "AWST": "AWST", "MYT": "MYT", "WART": "WART", "CLT": "CLT", "ADT": "ADT", "ARST": "ARST", "EAT": "EAT", "ACDT": "ACDT", "LHDT": "LHDT", "IST": "IST", "COST": "COST", "HEOG": "HEOG", "UYT": "UYT", "CST": "CST", "MESZ": "MESZ", "AEDT": "AEDT", "HECU": "HECU", "HAT": "HAT", "WIT": "WIT", "GYT": "GYT", "MEZ": "MEZ", "PDT": "PDT", "CAT": "CAT", "ACWST": "ACWST", "COT": "COT", "HKST": "HKST", "GMT": "GMT", "HNEG": "HNEG", "JST": "JST", "JDT": "JDT", "OESZ": "OESZ", "HNOG": "HNOG", "CHADT": "CHADT", "AKDT": "AKDT", "HNT": "HNT", "WARST": "WARST", "MST": "MST", "OEZ": "OEZ", "HKT": "HKT", "TMST": "TMST", "ECT": "ECT", "HADT": "HADT", "HEEG": "HEEG", "AEST": "AEST", "UYST": "UYST", "SGT": "SGT", "VET": "VET", "WAST": "WAST", "EST": "EST", "WITA": "WITA", "NZST": "NZST", "SRT": "SRT", "CHAST": "CHAST", "BT": "BT", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "GFT": "GFT", "CLST": "CLST", "WIB": "WIB", "BOT": "BOT", "HENOMX": "HENOMX", "HNPM": "HNPM", "HEPM": "HEPM", "NZDT": "NZDT", "LHST": "LHST", "HNCU": "HNCU", "SAST": "SAST", "TMT": "TMT", "AST": "AST", "ART": "ART", "AWDT": "AWDT", "WEZ": "WEZ", "WESZ": "WESZ", "WAT": "WAT", "AKST": "AKST", "PST": "PST", "HEPMX": "HEPMX", "ChST": "ChST", "HAST": "HAST", "HNNOMX": "HNNOMX"}, - } - } -  -@@ -148,7 +123,7 @@ func (sq *sq_MK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sq *sq_MK) MonthsAbbreviated() []string { -- return sq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -158,7 +133,7 @@ func (sq *sq_MK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sq *sq_MK) MonthsNarrow() []string { -- return sq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -168,7 +143,7 @@ func (sq *sq_MK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sq *sq_MK) MonthsWide() []string { -- return sq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -214,75 +189,13 @@ func (sq *sq_MK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sq_MK' and handles both Whole and Real numbers based on 'v' - func (sq *sq_MK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sq_MK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sq *sq_MK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sq.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sq_MK' -@@ -290,58 +203,7 @@ func (sq *sq_MK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sq.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sq.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sq_MK' -@@ -350,65 +212,7 @@ func (sq *sq_MK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sq.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sq.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sq.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sq.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sq_MK' -@@ -416,17 +220,6 @@ func (sq *sq_MK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -435,17 +228,6 @@ func (sq *sq_MK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,17 +236,6 @@ func (sq *sq_MK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,19 +244,6 @@ func (sq *sq_MK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/sq_XK/sq_XK.go b/sq_XK/sq_XK.go -index 578c877..b632792 100644 ---- a/sq_XK/sq_XK.go -+++ b/sq_XK/sq_XK.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sq_XK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sq_XK' locale - func New() locales.Translator { - return &sq_XK{ -- locale: "sq_XK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan", "shk", "mar", "pri", "maj", "qer", "kor", "gsh", "sht", "tet", "nën", "dhj"}, -- monthsNarrow: []string{"", "j", "s", "m", "p", "m", "q", "k", "g", "s", "t", "n", "d"}, -- monthsWide: []string{"", "janar", "shkurt", "mars", "prill", "maj", "qershor", "korrik", "gusht", "shtator", "tetor", "nëntor", "dhjetor"}, -- daysAbbreviated: []string{"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"}, -- daysNarrow: []string{"D", "H", "M", "M", "E", "P", "S"}, -- daysShort: []string{"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Sht"}, -- daysWide: []string{"e diel", "e hënë", "e martë", "e mërkurë", "e enjte", "e premte", "e shtunë"}, -- periodsAbbreviated: []string{"e paradites", "e pasdites"}, -- periodsNarrow: []string{"e paradites", "e pasdites"}, -- periodsWide: []string{"e paradites", "e pasdites"}, -- erasAbbreviated: []string{"p.K.", "mb.K."}, -- erasNarrow: []string{"p.K.", "mb.K."}, -- erasWide: []string{"para Krishtit", "mbas Krishtit"}, -- timezones: map[string]string{"OESZ": "Ora verore e Evropës Lindore", "SGT": "Ora e Singaporit", "AWDT": "Ora verore e Australisë Perëndimore", "ACDT": "Ora verore e Australisë Qendrore", "JST": "Ora standarde e Japonisë", "JDT": "Ora verore e Japonisë", "BOT": "Ora e Bolivisë", "HNEG": "Ora standarde e Grenlandës Lindore", "OEZ": "Ora standarde e Evropës Lindore", "GMT": "Ora e Meridianit të Grinuiçit", "HECU": "Ora verore e Kubës", "SRT": "Ora e Surinamit", "AEDT": "Ora verore e Australisë Lindore", "SAST": "Ora standarde e Afrikës Jugore", "ChST": "Ora e Kamorros", "EAT": "Ora e Afrikës Lindore", "WAT": "Ora standarde e Afrikës Perëndimore", "WART": "Ora standarde e Argjentinës Perëndimore", "AKST": "Ora standarde e Alaskës", "WIB": "Ora e Indonezisë Perëndimore", "NZST": "Ora standarde e Zelandës së Re", "WESZ": "Ora verore e Evropës Perëndimore", "HAT": "Ora verore e Njufaundlendit [Tokës së Re]", "HKT": "Ora standarde e Hong-Kongut", "ARST": "Ora verore e Argjentinës", "HNCU": "Ora standarde e Kubës", "AST": "Ora standarde e Atlantikut", "PST": "Ora standarde amerikane e Bregut të Paqësorit", "AKDT": "Ora verore e Alsaskës", "LHST": "Ora standarde e Lord-Houit", "TMT": "Ora standarde e Turkmenistanit", "CHADT": "Ora verore e Katamit", "CLT": "Ora standarde e Kilit", "HEPMX": "Ora verore meksikane e Bregut të Paqësorit", "ADT": "Ora verore e Atlantikut", "WITA": "Ora e Indonezisë Qendrore", "EST": "Ora standarde e SHBA-së Lindore", "MDT": "Ora verore e Makaos", "HNPMX": "Ora standarde meksikane e Bregut të Paqësorit", "VET": "Ora e Venezuelës", "HEOG": "Ora verore e Grenlandës Perëndimore", "COT": "Ora standarde e Kolumbisë", "COST": "Ora verore e Kolumbisë", "HNNOMX": "Ora standarde e Meksikës Veriperëndimore", "ECT": "Ora e Ekuadorit", "NZDT": "Ora verore e Zelandës së Re", "HEEG": "Ora verore e Grenlandës Lindore", "WEZ": "Ora standarde e Evropës Perëndimore", "ART": "Ora standarde e Argjentinës", "MESZ": "Ora verore e Evropës Qendrore", "ACWST": "Ora standarde e Australisë Qendroro-Perëndimore", "ACWDT": "Ora verore e Australisë Qendroro-Perëndimore", "AWST": "Ora standarde e Australisë Perëndimore", "CLST": "Ora verore e Kilit", "GFT": "Ora e Guajanës Franceze", "UYST": "Ora verore e Uruguait", "HADT": "Ora verore e Ishujve Hauai-Aleutian", "PDT": "Ora verore amerikane e Bregut të Paqësorit", "CDT": "Ora verore e SHBA-së Qendrore", "WIT": "Ora e Indonezisë Lindore", "TMST": "Ora verore e Turkmenistanit", "EDT": "Ora verore e SHBA-së Lindore", "GYT": "Ora e Guajanës", "BT": "Ora e Butanit", "HNT": "Ora standarde e Njufaundlendit [Tokës së Re]", "AEST": "Ora standarde e Australisë Lindore", "WARST": "Ora verore e Argjentinës Perëndimore", "HENOMX": "Ora verore e Meksikës Veriperëndimore", "∅∅∅": "Ora verore e Azoreve", "HKST": "Ora verore e Hong-Kongut", "MEZ": "Ora standarde e Evropës Qendrore", "ACST": "Ora standarde e Australisë Qendrore", "UYT": "Ora standarde e Uruguait", "CST": "Ora standarde e SHBA-së Qendrore", "HAST": "Ora standarde e Ishujve Hauai-Aleutian", "CAT": "Ora e Afrikës Qendrore", "WAST": "Ora verore e Afrikës Perëndimore", "HNPM": "Ora standarde e Shën-Pier dhe Mikuelon", "LHDT": "Ora verore e Lord-Houit", "IST": "Ora standarde e Indisë", "HEPM": "Ora verore e Shën-Pier dhe Mikuelon", "CHAST": "Ora standarde e Katamit", "MST": "Ora standarde e Makaos", "MYT": "Ora e Malajzisë", "HNOG": "Ora standarde e Grenlandës Perëndimore"}, -+ locale: "sq_XK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 5, 6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "MEZ": "MEZ", "HNEG": "HNEG", "EST": "EST", "HKT": "HKT", "HAT": "HAT", "HEOG": "HEOG", "SRT": "SRT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "MYT": "MYT", "UYT": "UYT", "HNCU": "HNCU", "JST": "JST", "GFT": "GFT", "EAT": "EAT", "MESZ": "MESZ", "ACDT": "ACDT", "HENOMX": "HENOMX", "HNPM": "HNPM", "CHADT": "CHADT", "IST": "IST", "HEPM": "HEPM", "NZST": "NZST", "ECT": "ECT", "HADT": "HADT", "AWST": "AWST", "WIT": "WIT", "WITA": "WITA", "VET": "VET", "LHDT": "LHDT", "COST": "COST", "CAT": "CAT", "CLST": "CLST", "ART": "ART", "AEST": "AEST", "WAST": "WAST", "AWDT": "AWDT", "WESZ": "WESZ", "BOT": "BOT", "HEPMX": "HEPMX", "UYST": "UYST", "HECU": "HECU", "WARST": "WARST", "MST": "MST", "HAST": "HAST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "OEZ": "OEZ", "AST": "AST", "ARST": "ARST", "WEZ": "WEZ", "AKST": "AKST", "OESZ": "OESZ", "EDT": "EDT", "CST": "CST", "ADT": "ADT", "GMT": "GMT", "PST": "PST", "WAT": "WAT", "COT": "COT", "LHST": "LHST", "JDT": "JDT", "HNPMX": "HNPMX", "HNT": "HNT", "SGT": "SGT", "WART": "WART", "TMST": "TMST", "NZDT": "NZDT", "ChST": "ChST", "PDT": "PDT", "AEDT": "AEDT", "HKST": "HKST", "BT": "BT", "ACWDT": "ACWDT", "MDT": "MDT", "ACST": "ACST", "SAST": "SAST", "GYT": "GYT", "HNOG": "HNOG", "CLT": "CLT", "CDT": "CDT", "WIB": "WIB", "ACWST": "ACWST", "AKDT": "AKDT"}, - } - } -  -@@ -148,7 +123,7 @@ func (sq *sq_XK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sq *sq_XK) MonthsAbbreviated() []string { -- return sq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -158,7 +133,7 @@ func (sq *sq_XK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sq *sq_XK) MonthsNarrow() []string { -- return sq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -168,7 +143,7 @@ func (sq *sq_XK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sq *sq_XK) MonthsWide() []string { -- return sq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -214,75 +189,13 @@ func (sq *sq_XK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sq_XK' and handles both Whole and Real numbers based on 'v' - func (sq *sq_XK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sq_XK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sq *sq_XK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sq.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sq_XK' -@@ -290,58 +203,7 @@ func (sq *sq_XK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sq.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sq.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sq_XK' -@@ -350,65 +212,7 @@ func (sq *sq_XK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sq.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sq.group) - 1; j >= 0; j-- { -- b = append(b, sq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sq.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sq.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sq.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sq_XK' -@@ -416,17 +220,6 @@ func (sq *sq_XK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -435,17 +228,6 @@ func (sq *sq_XK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -454,17 +236,6 @@ func (sq *sq_XK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -473,19 +244,6 @@ func (sq *sq_XK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/sr/sr.go b/sr/sr.go -index 2870339..2c9729b 100644 ---- a/sr/sr.go -+++ b/sr/sr.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"п. н. е.", "н. е."}, - erasNarrow: []string{"п.н.е.", "н.е."}, - erasWide: []string{"пре нове ере", "нове ере"}, -- timezones: map[string]string{"MESZ": "Средњеевропско летње рачунање времена", "IST": "Индијско стандардно време", "CLST": "Чиле летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "HNNOMX": "Северозападни Мексико стандардно време", "UYT": "Уругвај стандардно време", "WIT": "Источно-индонезијско време", "HEOG": "Западни Гренланд летње рачунање времена", "JDT": "Јапанско летње рачунање времена", "EDT": "Северноамеричко источно летње време", "HNOG": "Западни Гренланд стандардно време", "EST": "Северноамеричко источно стандардно време", "MST": "Макао стандардно време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "HNT": "Њуфаундленд стандардно време", "HKT": "Хонг Конг стандардно време", "GFT": "Француска Гвајана време", "HNPMX": "Мексички Пацифик стандардно време", "CHADT": "Чатам летње рачунање времена", "∅∅∅": "Амазон летње рачунање времена", "WAST": "Западно-афричко летње рачунање времена", "OEZ": "Источноевропско стандардно време", "AKDT": "Аљаска, летње рачунање времена", "CST": "Северноамеричко централно стандардно време", "LHST": "Лорд Хов стандардно време", "CHAST": "Чатам стандардно време", "AEST": "Аустралијско источно стандардно време", "HNPM": "Сен Пјер и Микелон стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "ACDT": "Аустралијско централно летње рачунање времена", "HENOMX": "Северозападни Мексико летње рачунање времена", "WIB": "Западно-индонезијско време", "WEZ": "Западноевропско стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "JST": "Јапанско стандардно време", "BOT": "Боливија време", "MYT": "Малезија време", "AEDT": "Аустралијско источно летње рачунање времена", "AWDT": "Аустралијско западно летње рачунање времена", "OESZ": "Источноевропско летње рачунање времена", "WARST": "Западна Аргентина летње рачунање времена", "COST": "Колумбија летње рачунање времена", "GYT": "Гвајана време", "AWST": "Аустралијско западно стандардно време", "WESZ": "Западноевропско летње рачунање времена", "ChST": "Чаморо време", "TMT": "Туркменистан стандардно време", "GMT": "Средње време по Гриничу", "VET": "Венецуела време", "BT": "Бутан време", "PDT": "Северноамеричко пацифичко летње време", "HADT": "Хавајско-алеутско летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "CLT": "Чиле стандардно време", "WART": "Западна Аргентина стандардно време", "COT": "Колумбија стандардно време", "AKST": "Аљаска, стандардно време", "AST": "Атлантско стандардно време", "ADT": "Атлантско летње рачунање времена", "HNCU": "Куба стандардно време", "HEPMX": "Мексички Пацифик летње рачунање времена", "CDT": "Северноамеричко централно летње време", "SRT": "Суринам време", "PST": "Северноамеричко пацифичко стандардно време", "NZST": "Нови Зеланд стандардно време", "CAT": "Централно-афричко време", "HAT": "Њуфаундленд летње рачунање времена", "HKST": "Хонг Конг летње рачунање времена", "NZDT": "Нови Зеланд летње рачунање времена", "ECT": "Еквадор време", "SGT": "Сингапур стандардно време", "HECU": "Куба летње рачунање времена", "HAST": "Хавајско-алеутско стандардно време", "UYST": "Уругвај летње рачунање времена", "WITA": "Централно-индонезијско време", "MEZ": "Средњеевропско стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "SAST": "Јужно-афричко време", "ACST": "Аустралијско централно стандардно време", "EAT": "Источно-афричко време", "WAT": "Западно-афричко стандардно време", "MDT": "Макао летње рачунање времена", "ART": "Аргентина стандардно време", "ARST": "Аргентина летње рачунање времена"}, -+ timezones: map[string]string{"NZST": "Нови Зеланд стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "AKDT": "Аљаска, летње рачунање времена", "WIT": "Источно-индонезијско време", "HNOG": "Западни Гренланд стандардно време", "HEOG": "Западни Гренланд летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена", "WAST": "Западно-афричко летње рачунање времена", "MDT": "Макао летње рачунање времена", "HADT": "Хавајско-алеутско летње рачунање времена", "HEEG": "Источни Гренланд летње рачунање времена", "EAT": "Источно-афричко време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "WEZ": "Западноевропско стандардно време", "EST": "Северноамеричко источно стандардно време", "EDT": "Северноамеричко источно летње време", "ECT": "Еквадор време", "ADT": "Атлантско летње рачунање времена", "COST": "Колумбија летње рачунање времена", "HKST": "Хонг Конг летње рачунање времена", "MESZ": "Средњеевропско летње рачунање времена", "JDT": "Јапанско летње рачунање времена", "PDT": "Северноамеричко пацифичко летње време", "HKT": "Хонг Конг стандардно време", "CAT": "Централно-афричко време", "JST": "Јапанско стандардно време", "CLT": "Чиле стандардно време", "NZDT": "Нови Зеланд летње рачунање времена", "ACDT": "Аустралијско централно летње рачунање времена", "LHST": "Лорд Хов стандардно време", "CHADT": "Чатам летње рачунање времена", "WESZ": "Западноевропско летње рачунање времена", "HAT": "Њуфаундленд летње рачунање времена", "SAST": "Јужно-афричко време", "CLST": "Чиле летње рачунање времена", "CST": "Северноамеричко централно стандардно време", "AST": "Атлантско стандардно време", "ART": "Аргентина стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "CDT": "Северноамеричко централно летње време", "WIB": "Западно-индонезијско време", "BOT": "Боливија време", "MEZ": "Средњеевропско стандардно време", "HNEG": "Источни Гренланд стандардно време", "WART": "Западна Аргентина стандардно време", "ChST": "Чаморо време", "HAST": "Хавајско-алеутско стандардно време", "ACST": "Аустралијско централно стандардно време", "BT": "Бутан време", "GFT": "Француска Гвајана време", "GYT": "Гвајана време", "COT": "Колумбија стандардно време", "GMT": "Средње време по Гриничу", "AEST": "Аустралијско источно стандардно време", "HNCU": "Куба стандардно време", "HNPMX": "Мексички Пацифик стандардно време", "WARST": "Западна Аргентина летње рачунање времена", "WITA": "Централно-индонезијско време", "ARST": "Аргентина летње рачунање времена", "SRT": "Суринам време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "OESZ": "Источноевропско летње рачунање времена", "HNT": "Њуфаундленд стандардно време", "MST": "Макао стандардно време", "HNNOMX": "Северозападни Мексико стандардно време", "HENOMX": "Северозападни Мексико летње рачунање времена", "CHAST": "Чатам стандардно време", "UYST": "Уругвај летње рачунање времена", "HECU": "Куба летње рачунање времена", "WAT": "Западно-афричко стандардно време", "AKST": "Аљаска, стандардно време", "AWST": "Аустралијско западно стандардно време", "MYT": "Малезија време", "HNPM": "Сен Пјер и Микелон стандардно време", "IST": "Индијско стандардно време", "PST": "Северноамеричко пацифичко стандардно време", "AEDT": "Аустралијско источно летње рачунање времена", "UYT": "Уругвај стандардно време", "SGT": "Сингапур стандардно време", "OEZ": "Источноевропско стандардно време", "∅∅∅": "Бразилија летње рачунање времена", "TMT": "Туркменистан стандардно време", "VET": "Венецуела време"}, - } - } -  -diff --git a/sr_Cyrl/sr_Cyrl.go b/sr_Cyrl/sr_Cyrl.go -index 5f066c7..827acb0 100644 ---- a/sr_Cyrl/sr_Cyrl.go -+++ b/sr_Cyrl/sr_Cyrl.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sr_Cyrl struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Cyrl' locale - func New() locales.Translator { - return &sr_Cyrl{ -- locale: "sr_Cyrl", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "јан", "феб", "мар", "апр", "мај", "јун", "јул", "авг", "сеп", "окт", "нов", "дец"}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"нед", "пон", "уто", "сре", "чет", "пет", "суб"}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недеља", "понедељак", "уторак", "среда", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"пре подне", "по подне"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"пре подне", "по подне"}, -- erasAbbreviated: []string{"п. н. е.", "н. е."}, -- erasNarrow: []string{"п.н.е.", "н.е."}, -- erasWide: []string{"пре нове ере", "нове ере"}, -- timezones: map[string]string{"MYT": "Малезија време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "ART": "Аргентина стандардно време", "HENOMX": "Северозападни Мексико летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "COT": "Колумбија стандардно време", "CDT": "Северноамеричко централно летње време", "GYT": "Гвајана време", "LHDT": "Лорд Хов летње рачунање времена", "SAST": "Јужно-афричко време", "CST": "Северноамеричко централно стандардно време", "WIB": "Западно-индонезијско време", "PDT": "Северноамеричко пацифичко летње време", "EST": "Северноамеричко источно стандардно време", "EDT": "Северноамеричко источно летње време", "ChST": "Чаморо време", "EAT": "Источно-афричко време", "OEZ": "Источноевропско стандардно време", "AWST": "Аустралијско западно стандардно време", "LHST": "Лорд Хов стандардно време", "CHAST": "Чатам стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "CLST": "Чиле летње рачунање времена", "ECT": "Еквадор време", "BOT": "Боливија време", "TMST": "Туркменистан летње рачунање времена", "COST": "Колумбија летње рачунање времена", "ADT": "Атлантско летње рачунање времена", "WIT": "Источно-индонезијско време", "HAST": "Хавајско-алеутско стандардно време", "HEOG": "Западни Гренланд летње рачунање времена", "NZDT": "Нови Зеланд летње рачунање времена", "HNPMX": "Мексички Пацифик стандардно време", "OESZ": "Источноевропско летње рачунање времена", "UYT": "Уругвај стандардно време", "SRT": "Суринам време", "WEZ": "Западноевропско стандардно време", "WITA": "Централно-индонезијско време", "JDT": "Јапанско летње рачунање времена", "∅∅∅": "Амазон летње рачунање времена", "HNCU": "Куба стандардно време", "VET": "Венецуела време", "HNT": "Њуфаундленд стандардно време", "AEST": "Аустралијско источно стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "MEZ": "Средњеевропско стандардно време", "HNPM": "Сен Пјер и Микелон стандардно време", "JST": "Јапанско стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "WARST": "Западна Аргентина летње рачунање времена", "MDT": "Северноамеричко планинско летње време", "TMT": "Туркменистан стандардно време", "WAT": "Западно-афричко стандардно време", "CAT": "Централно-афричко време", "WART": "Западна Аргентина стандардно време", "SGT": "Сингапур стандардно време", "UYST": "Уругвај летње рачунање времена", "MST": "Северноамеричко планинско стандардно време", "WESZ": "Западноевропско летње рачунање времена", "PST": "Северноамеричко пацифичко стандардно време", "HNNOMX": "Северозападни Мексико стандардно време", "AST": "Атлантско стандардно време", "HKST": "Хонг Конг летње рачунање времена", "ACST": "Аустралијско централно стандардно време", "HECU": "Куба летње рачунање времена", "HADT": "Хавајско-алеутско летње рачунање времена", "HAT": "Њуфаундленд летње рачунање времена", "AEDT": "Аустралијско источно летње рачунање времена", "GMT": "Средње време по Гриничу", "AKDT": "Аљаска, летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "GFT": "Француска Гвајана време", "ACDT": "Аустралијско централно летње рачунање времена", "WAST": "Западно-афричко летње рачунање времена", "IST": "Индијско стандардно време", "CLT": "Чиле стандардно време", "AKST": "Аљаска, стандардно време", "BT": "Бутан време", "ARST": "Аргентина летње рачунање времена", "HNOG": "Западни Гренланд стандардно време", "HKT": "Хонг Конг стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "NZST": "Нови Зеланд стандардно време", "CHADT": "Чатам летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена"}, -+ locale: "sr_Cyrl", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GMT": "GMT", "UYST": "UYST", "WIT": "WIT", "SAST": "SAST", "NZST": "NZST", "WIB": "WIB", "ACWST": "ACWST", "AEST": "AEST", "AEDT": "AEDT", "HNPMX": "HNPMX", "WARST": "WARST", "CLT": "CLT", "OEZ": "OEZ", "HNT": "HNT", "GYT": "GYT", "HEOG": "HEOG", "NZDT": "NZDT", "WESZ": "WESZ", "WAST": "WAST", "AKDT": "AKDT", "SGT": "SGT", "PDT": "PDT", "COT": "COT", "PST": "PST", "HECU": "HECU", "AKST": "AKST", "HNCU": "HNCU", "ART": "ART", "IST": "IST", "WART": "WART", "ECT": "ECT", "HKST": "HKST", "MST": "MST", "MDT": "MDT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "COST": "COST", "EDT": "EDT", "TMT": "TMT", "ChST": "ChST", "BT": "BT", "HEPMX": "HEPMX", "WAT": "WAT", "EST": "EST", "HNPM": "HNPM", "VET": "VET", "CAT": "CAT", "HEEG": "HEEG", "MYT": "MYT", "JST": "JST", "ADT": "ADT", "HADT": "HADT", "HENOMX": "HENOMX", "LHDT": "LHDT", "CHADT": "CHADT", "WEZ": "WEZ", "∅∅∅": "∅∅∅", "HKT": "HKT", "MEZ": "MEZ", "ACST": "ACST", "LHST": "LHST", "HAT": "HAT", "AST": "AST", "HNOG": "HNOG", "TMST": "TMST", "CDT": "CDT", "BOT": "BOT", "CHAST": "CHAST", "UYT": "UYT", "OESZ": "OESZ", "GFT": "GFT", "HEPM": "HEPM", "CST": "CST", "ACDT": "ACDT", "HAST": "HAST", "MESZ": "MESZ", "AWST": "AWST", "AWDT": "AWDT", "JDT": "JDT", "WITA": "WITA", "SRT": "SRT", "EAT": "EAT", "CLST": "CLST", "ARST": "ARST"}, - } - } -  -@@ -157,7 +132,7 @@ func (sr *sr_Cyrl) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sr *sr_Cyrl) MonthsAbbreviated() []string { -- return sr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +142,7 @@ func (sr *sr_Cyrl) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Cyrl) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +152,7 @@ func (sr *sr_Cyrl) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Cyrl) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +198,13 @@ func (sr *sr_Cyrl) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Cyrl' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Cyrl) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Cyrl' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Cyrl) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl' -@@ -297,56 +212,7 @@ func (sr *sr_Cyrl) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl' -@@ -355,63 +221,7 @@ func (sr *sr_Cyrl) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Cyrl' -@@ -419,19 +229,6 @@ func (sr *sr_Cyrl) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +237,6 @@ func (sr *sr_Cyrl) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +245,6 @@ func (sr *sr_Cyrl) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +253,6 @@ func (sr *sr_Cyrl) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +261,6 @@ func (sr *sr_Cyrl) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +269,6 @@ func (sr *sr_Cyrl) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +277,6 @@ func (sr *sr_Cyrl) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +285,5 @@ func (sr *sr_Cyrl) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Cyrl_BA/sr_Cyrl_BA.go b/sr_Cyrl_BA/sr_Cyrl_BA.go -index 48f74ff..ee12084 100644 ---- a/sr_Cyrl_BA/sr_Cyrl_BA.go -+++ b/sr_Cyrl_BA/sr_Cyrl_BA.go -@@ -10,70 +10,54 @@ import ( - ) -  - type sr_Cyrl_BA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Cyrl_BA' locale - func New() locales.Translator { - return &sr_Cyrl_BA{ -- locale: "sr_Cyrl_BA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "јан.", "феб.", "март", "апр.", "мај", "јун", "јул", "авг.", "септ.", "окт.", "нов.", "дец."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"нед.", "пон.", "ут.", "ср.", "чет.", "пет.", "суб."}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недјеља", "понедељак", "уторак", "сриједа", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"прије подне", "по подне"}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"прије подне", "по подне"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"прије нове ере", "нове ере"}, -- timezones: map[string]string{"HNOG": "Западни Гренланд стандардно време", "ChST": "Чаморо време", "ACST": "Аустралијско централно стандардно време", "CAT": "Централно-афричко време", "WIT": "Источно-индонезијско време", "HADT": "Хавајско-алеутско летње рачунање времена", "MEZ": "Средњеевропско стандардно време", "WAT": "Западно-афричко стандардно време", "HNCU": "Куба стандардно време", "ADT": "Атлантско летње рачунање времена", "EST": "Северноамеричко источно стандардно време", "UYT": "Уругвај стандардно време", "ACWST": "Аустралијско централно западно стандардно време", "∅∅∅": "Амазон летње рачунање времена", "WAST": "Западно-афричко летње рачунање времена", "WART": "Западна Аргентина стандардно време", "PST": "Северноамеричко пацифичко стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "TMT": "Туркменистан стандардно време", "TMST": "Туркменистан летње рачунање времена", "SAST": "Јужно-афричко време", "ACDT": "Аустралијско централно летње рачунање времена", "GMT": "Средње време по Гриничу", "AKDT": "Аљаска, летње рачунање времена", "WIB": "Западно-индонезијско време", "VET": "Венецуела време", "ART": "Аргентина стандардно време", "HNNOMX": "Северозападни Мексико стандардно време", "WARST": "Западна Аргентина летње рачунање времена", "EDT": "Северноамеричко источно летње време", "COT": "Колумбија стандардно време", "COST": "Колумбија летње рачунање времена", "CST": "Северноамеричко централно стандардно време", "HEOG": "Западни Гренланд летње рачунање времена", "AWST": "Аустралијско западно стандардно време", "CHADT": "Чатам летње рачунање времена", "GFT": "Француска Гвајана време", "MDT": "Макао летње рачунање времена", "CDT": "Северноамеричко централно летње време", "NZST": "Нови Зеланд стандардно време", "JST": "Јапанско стандардно време", "BOT": "Боливија време", "ECT": "Еквадор време", "OESZ": "Источноевропско летње рачунање времена", "EAT": "Источно-афричко време", "AST": "Атлантско стандардно време", "UYST": "Уругвај летње рачунање времена", "HAT": "Њуфаундленд летње рачунање времена", "ARST": "Аргентина летње рачунање времена", "HNPM": "Сен Пјер и Микелон стандардно време", "CLT": "Чиле стандардно време", "AEDT": "Аустралијско источно летње рачунање времена", "IST": "Индијско стандардно време", "AKST": "Аљаска, стандардно време", "GYT": "Гвајана време", "HNPMX": "Мексички Пацифик стандардно време", "HAST": "Хавајско-алеутско стандардно време", "HKST": "Хонг Конг летње рачунање времена", "AEST": "Аустралијско источно стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "NZDT": "Нови Зеланд летње рачунање времена", "ACWDT": "Аустралијско централно западно летње рачунање времена", "HNT": "Њуфаундленд стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "MST": "Макао стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "HENOMX": "Северозападни Мексико летње рачунање времена", "SGT": "Сингапур стандардно време", "BT": "Бутан време", "PDT": "Северноамеричко пацифичко летње време", "WITA": "Централно-индонезијско време", "CHAST": "Чатам стандардно време", "HEPMX": "Мексички Пацифик летње рачунање времена", "SRT": "Суринам време", "WESZ": "Западноевропско летње рачунање времена", "LHST": "Лорд Хов стандардно време", "HECU": "Куба летње рачунање времена", "HKT": "Хонг Конг стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "CLST": "Чиле летње рачунање времена", "MYT": "Малезија време", "WEZ": "Западноевропско стандардно време", "JDT": "Јапанско летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "OEZ": "Источноевропско стандардно време"}, -+ locale: "sr_Cyrl_BA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "јан.", "феб.", "март", "апр.", "мај", "јун", "јул", "авг.", "септ.", "окт.", "нов.", "дец."}, -+ daysAbbreviated: []string{"нед.", "пон.", "ут.", "ср.", "чет.", "пет.", "суб."}, -+ daysWide: []string{"недјеља", "понедељак", "уторак", "сриједа", "четвртак", "петак", "субота"}, -+ periodsAbbreviated: []string{"прије подне", "по подне"}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"прије подне", "по подне"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"прије нове ере", "нове ере"}, -+ timezones: map[string]string{"CAT": "CAT", "MDT": "MDT", "EAT": "EAT", "ACST": "ACST", "WESZ": "WESZ", "EST": "EST", "HKST": "HKST", "HENOMX": "HENOMX", "MESZ": "MESZ", "AEST": "AEST", "GMT": "GMT", "HNNOMX": "HNNOMX", "SRT": "SRT", "CHADT": "CHADT", "VET": "VET", "∅∅∅": "∅∅∅", "EDT": "EDT", "WAST": "WAST", "CHAST": "CHAST", "UYST": "UYST", "HEPMX": "HEPMX", "SGT": "SGT", "AKST": "AKST", "GFT": "GFT", "COT": "COT", "HADT": "HADT", "TMST": "TMST", "NZDT": "NZDT", "ChST": "ChST", "AKDT": "AKDT", "COST": "COST", "GYT": "GYT", "HEOG": "HEOG", "ACDT": "ACDT", "PDT": "PDT", "HNCU": "HNCU", "HECU": "HECU", "HNPMX": "HNPMX", "OEZ": "OEZ", "WART": "WART", "HEEG": "HEEG", "ADT": "ADT", "ACWDT": "ACWDT", "WEZ": "WEZ", "CLT": "CLT", "CDT": "CDT", "JDT": "JDT", "ART": "ART", "BOT": "BOT", "NZST": "NZST", "AWDT": "AWDT", "LHDT": "LHDT", "PST": "PST", "WIT": "WIT", "WARST": "WARST", "TMT": "TMT", "WITA": "WITA", "AST": "AST", "HNEG": "HNEG", "MEZ": "MEZ", "HNPM": "HNPM", "HNT": "HNT", "HNOG": "HNOG", "IST": "IST", "HEPM": "HEPM", "ACWST": "ACWST", "AEDT": "AEDT", "UYT": "UYT", "WAT": "WAT", "OESZ": "OESZ", "CLST": "CLST", "ECT": "ECT", "CST": "CST", "MYT": "MYT", "BT": "BT", "SAST": "SAST", "WIB": "WIB", "AWST": "AWST", "HAT": "HAT", "HAST": "HAST", "ARST": "ARST", "JST": "JST", "LHST": "LHST", "HKT": "HKT", "MST": "MST"}, - } - } -  -@@ -103,8 +87,8 @@ func (sr *sr_Cyrl_BA) CardinalPluralRule(num float64, v uint64) locales.PluralRu - n := math.Abs(num) - i := int64(n) - f := locales.F(n, v) -- iMod100 := i % 100 - iMod10 := i % 10 -+ iMod100 := i % 100 - fMod10 := f % 10 - fMod100 := f % 100 -  -@@ -167,7 +151,7 @@ func (sr *sr_Cyrl_BA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Cyrl_BA) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +161,7 @@ func (sr *sr_Cyrl_BA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Cyrl_BA) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +207,13 @@ func (sr *sr_Cyrl_BA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Cyrl_BA' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Cyrl_BA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Cyrl_BA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Cyrl_BA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_BA' -@@ -297,56 +221,7 @@ func (sr *sr_Cyrl_BA) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_BA' -@@ -355,63 +230,7 @@ func (sr *sr_Cyrl_BA) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Cyrl_BA' -@@ -419,19 +238,6 @@ func (sr *sr_Cyrl_BA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +246,6 @@ func (sr *sr_Cyrl_BA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +254,6 @@ func (sr *sr_Cyrl_BA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +262,6 @@ func (sr *sr_Cyrl_BA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +270,6 @@ func (sr *sr_Cyrl_BA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +278,6 @@ func (sr *sr_Cyrl_BA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +286,6 @@ func (sr *sr_Cyrl_BA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +294,5 @@ func (sr *sr_Cyrl_BA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Cyrl_ME/sr_Cyrl_ME.go b/sr_Cyrl_ME/sr_Cyrl_ME.go -index dfe11d5..923fa49 100644 ---- a/sr_Cyrl_ME/sr_Cyrl_ME.go -+++ b/sr_Cyrl_ME/sr_Cyrl_ME.go -@@ -10,70 +10,54 @@ import ( - ) -  - type sr_Cyrl_ME struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Cyrl_ME' locale - func New() locales.Translator { - return &sr_Cyrl_ME{ -- locale: "sr_Cyrl_ME", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "јан.", "феб.", "март", "апр.", "мај", "јун", "јул", "авг.", "септ.", "окт.", "нов.", "дец."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"нед.", "пон.", "ут.", "ср.", "чет.", "пет.", "суб."}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недјеља", "понедељак", "уторак", "сриједа", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"прије подне", "по подне"}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"прије подне", "по подне"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"HNT": "Њуфаундленд стандардно време", "HKST": "Хонг Конг летње рачунање времена", "WITA": "Централно-индонезијско време", "NZST": "Нови Зеланд стандардно време", "JDT": "Јапанско летње рачунање времена", "WESZ": "Западноевропско летње рачунање времена", "MESZ": "Средњеевропско летње рачунање времена", "GFT": "Француска Гвајана време", "HNNOMX": "Северозападни Мексико стандардно време", "SGT": "Сингапур стандардно време", "EDT": "Северноамеричко источно летње време", "HAT": "Њуфаундленд летње рачунање времена", "AWDT": "Аустралијско западно летње рачунање времена", "SAST": "Јужно-афричко време", "CLST": "Чиле летње рачунање времена", "HEEG": "Источни Гренланд летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "WARST": "Западна Аргентина летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена", "HADT": "Хавајско-алеутско летње рачунање времена", "VET": "Венецуела време", "HNOG": "Западни Гренланд стандардно време", "PST": "Северноамеричко пацифичко стандардно време", "OESZ": "Источноевропско летње рачунање времена", "HNCU": "Куба стандардно време", "AKDT": "Аљаска, летње рачунање времена", "GYT": "Гвајана време", "WIB": "Западно-индонезијско време", "MDT": "Северноамеричко планинско летње време", "AWST": "Аустралијско западно стандардно време", "IST": "Индијско стандардно време", "COT": "Колумбија стандардно време", "HEOG": "Западни Гренланд летње рачунање времена", "HNPM": "Сен Пјер и Микелон стандардно време", "CLT": "Чиле стандардно време", "HNEG": "Источни Гренланд стандардно време", "UYT": "Уругвај стандардно време", "WAT": "Западно-афричко стандардно време", "CAT": "Централно-афричко време", "COST": "Колумбија летње рачунање времена", "ARST": "Аргентина летње рачунање времена", "AEST": "Аустралијско источно стандардно време", "CHADT": "Чатам летње рачунање времена", "ChST": "Чаморо време", "ACDT": "Аустралијско централно летње рачунање времена", "MST": "Северноамеричко планинско стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "HENOMX": "Северозападни Мексико летње рачунање времена", "WART": "Западна Аргентина стандардно време", "MYT": "Малезија време", "LHST": "Лорд Хов стандардно време", "WAST": "Западно-афричко летње рачунање времена", "OEZ": "Источноевропско стандардно време", "CDT": "Северноамеричко централно летње време", "CST": "Северноамеричко централно стандардно време", "AST": "Атлантско стандардно време", "WIT": "Источно-индонезијско време", "BT": "Бутан време", "LHDT": "Лорд Хов летње рачунање времена", "TMT": "Туркменистан стандардно време", "EST": "Северноамеричко источно стандардно време", "HECU": "Куба летње рачунање времена", "ART": "Аргентина стандардно време", "WEZ": "Западноевропско стандардно време", "HKT": "Хонг Конг стандардно време", "MEZ": "Средњеевропско стандардно време", "TMST": "Туркменистан летње рачунање времена", "PDT": "Северноамеричко пацифичко летње време", "JST": "Јапанско стандардно време", "UYST": "Уругвај летње рачунање времена", "SRT": "Суринам време", "NZDT": "Нови Зеланд летње рачунање времена", "ACST": "Аустралијско централно стандардно време", "GMT": "Средње време по Гриничу", "HNPMX": "Мексички Пацифик стандардно време", "HAST": "Хавајско-алеутско стандардно време", "BOT": "Боливија време", "ECT": "Еквадор време", "EAT": "Источно-афричко време", "AEDT": "Аустралијско источно летње рачунање времена", "CHAST": "Чатам стандардно време", "∅∅∅": "Амазон летње рачунање времена", "AKST": "Аљаска, стандардно време", "ADT": "Атлантско летње рачунање времена"}, -+ locale: "sr_Cyrl_ME", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "јан.", "феб.", "март", "апр.", "мај", "јун", "јул", "авг.", "септ.", "окт.", "нов.", "дец."}, -+ daysAbbreviated: []string{"нед.", "пон.", "ут.", "ср.", "чет.", "пет.", "суб."}, -+ daysWide: []string{"недјеља", "понедељак", "уторак", "сриједа", "четвртак", "петак", "субота"}, -+ periodsAbbreviated: []string{"прије подне", "по подне"}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"прије подне", "по подне"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"", ""}, -+ timezones: map[string]string{"AWDT": "AWDT", "BT": "BT", "WESZ": "WESZ", "AKST": "AKST", "HKST": "HKST", "CAT": "CAT", "ARST": "ARST", "AEDT": "AEDT", "GYT": "GYT", "NZST": "NZST", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "COT": "COT", "HAST": "HAST", "JST": "JST", "OESZ": "OESZ", "BOT": "BOT", "HNT": "HNT", "EST": "EST", "ECT": "ECT", "ADT": "ADT", "EAT": "EAT", "AST": "AST", "GMT": "GMT", "CHAST": "CHAST", "PDT": "PDT", "WAT": "WAT", "OEZ": "OEZ", "CLT": "CLT", "CLST": "CLST", "SRT": "SRT", "JDT": "JDT", "LHDT": "LHDT", "WEZ": "WEZ", "HECU": "HECU", "COST": "COST", "EDT": "EDT", "HADT": "HADT", "MESZ": "MESZ", "ACWST": "ACWST", "HNPMX": "HNPMX", "AKDT": "AKDT", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "LHST": "LHST", "PST": "PST", "WART": "WART", "WIT": "WIT", "TMT": "TMT", "WITA": "WITA", "AWST": "AWST", "CHADT": "CHADT", "UYT": "UYT", "IST": "IST", "WAST": "WAST", "WARST": "WARST", "HEOG": "HEOG", "VET": "VET", "HKT": "HKT", "NZDT": "NZDT", "MEZ": "MEZ", "HNPM": "HNPM", "UYST": "UYST", "HEPMX": "HEPMX", "WIB": "WIB", "CST": "CST", "MDT": "MDT", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "HNCU": "HNCU", "GFT": "GFT", "SAST": "SAST", "ChST": "ChST", "ART": "ART", "AEST": "AEST", "TMST": "TMST", "CDT": "CDT", "MST": "MST", "HEEG": "HEEG", "MYT": "MYT", "HAT": "HAT", "ACST": "ACST", "ACDT": "ACDT", "HEPM": "HEPM", "SGT": "SGT"}, - } - } -  -@@ -167,7 +151,7 @@ func (sr *sr_Cyrl_ME) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Cyrl_ME) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +161,7 @@ func (sr *sr_Cyrl_ME) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Cyrl_ME) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +207,13 @@ func (sr *sr_Cyrl_ME) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Cyrl_ME' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Cyrl_ME) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Cyrl_ME' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Cyrl_ME) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_ME' -@@ -297,56 +221,7 @@ func (sr *sr_Cyrl_ME) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_ME' -@@ -355,63 +230,7 @@ func (sr *sr_Cyrl_ME) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Cyrl_ME' -@@ -419,19 +238,6 @@ func (sr *sr_Cyrl_ME) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +246,6 @@ func (sr *sr_Cyrl_ME) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +254,6 @@ func (sr *sr_Cyrl_ME) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +262,6 @@ func (sr *sr_Cyrl_ME) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +270,6 @@ func (sr *sr_Cyrl_ME) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +278,6 @@ func (sr *sr_Cyrl_ME) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +286,6 @@ func (sr *sr_Cyrl_ME) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +294,5 @@ func (sr *sr_Cyrl_ME) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Cyrl_RS/sr_Cyrl_RS.go b/sr_Cyrl_RS/sr_Cyrl_RS.go -index fabc591..02ba231 100644 ---- a/sr_Cyrl_RS/sr_Cyrl_RS.go -+++ b/sr_Cyrl_RS/sr_Cyrl_RS.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sr_Cyrl_RS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Cyrl_RS' locale - func New() locales.Translator { - return &sr_Cyrl_RS{ -- locale: "sr_Cyrl_RS", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "јан", "феб", "мар", "апр", "мај", "јун", "јул", "авг", "сеп", "окт", "нов", "дец"}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"нед", "пон", "уто", "сре", "чет", "пет", "суб"}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недеља", "понедељак", "уторак", "среда", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"пре подне", "по подне"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"пре подне", "по подне"}, -- erasAbbreviated: []string{"п. н. е.", "н. е."}, -- erasNarrow: []string{"п.н.е.", "н.е."}, -- erasWide: []string{"пре нове ере", "нове ере"}, -- timezones: map[string]string{"HKST": "Хонг Конг летње рачунање времена", "HECU": "Куба летње рачунање времена", "EST": "Северноамеричко источно стандардно време", "VET": "Венецуела време", "HNOG": "Западни Гренланд стандардно време", "BOT": "Боливија време", "WAST": "Западно-афричко летње рачунање времена", "MYT": "Малезија време", "ART": "Аргентина стандардно време", "CHAST": "Чатам стандардно време", "JST": "Јапанско стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "GYT": "Гвајана време", "WESZ": "Западноевропско летње рачунање времена", "HAT": "Њуфаундленд летње рачунање времена", "AEST": "Аустралијско источно стандардно време", "CLST": "Чиле летње рачунање времена", "HNNOMX": "Северозападни Мексико стандардно време", "CST": "Северноамеричко централно стандардно време", "CAT": "Централно-афричко време", "AST": "Атлантско стандардно време", "SRT": "Суринам време", "PST": "Северноамеричко пацифичко стандардно време", "PDT": "Северноамеричко пацифичко летње време", "AEDT": "Аустралијско источно летње рачунање времена", "HKT": "Хонг Конг стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "ChST": "Чаморо време", "ECT": "Еквадор време", "OEZ": "Источноевропско стандардно време", "MST": "Макао стандардно време", "AKST": "Аљаска, стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "WART": "Западна Аргентина стандардно време", "WEZ": "Западноевропско стандардно време", "NZDT": "Нови Зеланд летње рачунање времена", "CHADT": "Чатам летње рачунање времена", "ACDT": "Аустралијско централно летње рачунање времена", "EAT": "Источно-афричко време", "OESZ": "Источноевропско летње рачунање времена", "MDT": "Макао летње рачунање времена", "AKDT": "Аљаска, летње рачунање времена", "LHST": "Лорд Хов стандардно време", "ACST": "Аустралијско централно стандардно време", "COT": "Колумбија стандардно време", "ADT": "Атлантско летње рачунање времена", "CDT": "Северноамеричко централно летње време", "WIT": "Источно-индонезијско време", "MESZ": "Средњеевропско летње рачунање времена", "HENOMX": "Северозападни Мексико летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена", "WIB": "Западно-индонезијско време", "ACWST": "Аустралијско централно западно стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "GFT": "Француска Гвајана време", "HNPMX": "Мексички Пацифик стандардно време", "HADT": "Хавајско-алеутско летње рачунање времена", "BT": "Бутан време", "HEOG": "Западни Гренланд летње рачунање времена", "HNT": "Њуфаундленд стандардно време", "NZST": "Нови Зеланд стандардно време", "SAST": "Јужно-афричко време", "IST": "Индијско стандардно време", "CLT": "Чиле стандардно време", "ARST": "Аргентина летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "EDT": "Северноамеричко источно летње време", "AWST": "Аустралијско западно стандардно време", "MEZ": "Средњеевропско стандардно време", "JDT": "Јапанско летње рачунање времена", "∅∅∅": "Амазон летње рачунање времена", "TMT": "Туркменистан стандардно време", "WAT": "Западно-афричко стандардно време", "WARST": "Западна Аргентина летње рачунање времена", "GMT": "Средње време по Гриничу", "UYT": "Уругвај стандардно време", "HAST": "Хавајско-алеутско стандардно време", "WITA": "Централно-индонезијско време", "HNPM": "Сен Пјер и Микелон стандардно време", "HNCU": "Куба стандардно време", "UYST": "Уругвај летње рачунање времена", "ACWDT": "Аустралијско централно западно летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "COST": "Колумбија летње рачунање времена", "SGT": "Сингапур стандардно време"}, -+ locale: "sr_Cyrl_RS", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "MYT": "MYT", "AEDT": "AEDT", "HECU": "HECU", "WARST": "WARST", "HAT": "HAT", "WART": "WART", "WITA": "WITA", "UYT": "UYT", "∅∅∅": "∅∅∅", "WIT": "WIT", "GYT": "GYT", "WIB": "WIB", "MST": "MST", "BOT": "BOT", "HADT": "HADT", "MESZ": "MESZ", "ACDT": "ACDT", "SAST": "SAST", "EST": "EST", "EAT": "EAT", "HNNOMX": "HNNOMX", "ACST": "ACST", "AWST": "AWST", "ACWDT": "ACWDT", "WEZ": "WEZ", "ARST": "ARST", "HAST": "HAST", "OESZ": "OESZ", "ECT": "ECT", "NZST": "NZST", "LHDT": "LHDT", "ACWST": "ACWST", "AEST": "AEST", "IST": "IST", "WAT": "WAT", "CLT": "CLT", "MDT": "MDT", "HNEG": "HNEG", "UYST": "UYST", "HNPMX": "HNPMX", "AKST": "AKST", "AKDT": "AKDT", "COT": "COT", "CLST": "CLST", "SRT": "SRT", "MEZ": "MEZ", "HNPM": "HNPM", "AWDT": "AWDT", "HNT": "HNT", "CST": "CST", "ADT": "ADT", "GMT": "GMT", "CHADT": "CHADT", "HNCU": "HNCU", "WESZ": "WESZ", "SGT": "SGT", "EDT": "EDT", "CAT": "CAT", "PST": "PST", "BT": "BT", "GFT": "GFT", "HKT": "HKT", "NZDT": "NZDT", "ART": "ART", "JDT": "JDT", "WAST": "WAST", "LHST": "LHST", "HEOG": "HEOG", "TMT": "TMT", "AST": "AST", "HEPM": "HEPM", "VET": "VET", "OEZ": "OEZ", "COST": "COST", "TMST": "TMST", "CDT": "CDT", "ChST": "ChST", "CHAST": "CHAST", "HEEG": "HEEG", "JST": "JST", "PDT": "PDT", "HEPMX": "HEPMX", "HNOG": "HNOG", "HKST": "HKST"}, - } - } -  -@@ -157,7 +132,7 @@ func (sr *sr_Cyrl_RS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sr *sr_Cyrl_RS) MonthsAbbreviated() []string { -- return sr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +142,7 @@ func (sr *sr_Cyrl_RS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Cyrl_RS) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +152,7 @@ func (sr *sr_Cyrl_RS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Cyrl_RS) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +198,13 @@ func (sr *sr_Cyrl_RS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Cyrl_RS' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Cyrl_RS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Cyrl_RS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Cyrl_RS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_RS' -@@ -297,56 +212,7 @@ func (sr *sr_Cyrl_RS) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_RS' -@@ -355,63 +221,7 @@ func (sr *sr_Cyrl_RS) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Cyrl_RS' -@@ -419,19 +229,6 @@ func (sr *sr_Cyrl_RS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +237,6 @@ func (sr *sr_Cyrl_RS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +245,6 @@ func (sr *sr_Cyrl_RS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +253,6 @@ func (sr *sr_Cyrl_RS) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +261,6 @@ func (sr *sr_Cyrl_RS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +269,6 @@ func (sr *sr_Cyrl_RS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +277,6 @@ func (sr *sr_Cyrl_RS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +285,5 @@ func (sr *sr_Cyrl_RS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Cyrl_XK/sr_Cyrl_XK.go b/sr_Cyrl_XK/sr_Cyrl_XK.go -index dd421b3..d256f02 100644 ---- a/sr_Cyrl_XK/sr_Cyrl_XK.go -+++ b/sr_Cyrl_XK/sr_Cyrl_XK.go -@@ -10,70 +10,49 @@ import ( - ) -  - type sr_Cyrl_XK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Cyrl_XK' locale - func New() locales.Translator { - return &sr_Cyrl_XK{ -- locale: "sr_Cyrl_XK", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "јан.", "феб.", "март", "апр.", "мај", "јун", "јул", "авг.", "септ.", "окт.", "нов.", "дец."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"нед.", "пон.", "ут.", "ср.", "чет.", "пет.", "суб."}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недеља", "понедељак", "уторак", "среда", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"", ""}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"пре подне", "по подне"}, -- erasAbbreviated: []string{"п. н. е.", "н. е."}, -- erasNarrow: []string{"п.н.е.", "н.е."}, -- erasWide: []string{"пре нове ере", "нове ере"}, -- timezones: map[string]string{"AWDT": "Аустралијско западно летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "ACDT": "Аустралијско централно летње рачунање времена", "OESZ": "Источноевропско летње рачунање времена", "HAST": "Хавајско-алеутско стандардно време", "BT": "Бутан време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "WAST": "Западно-афричко летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена", "AST": "Атлантско стандардно време", "VET": "Венецуела време", "WITA": "Централно-индонезијско време", "CHADT": "Чатам летње рачунање времена", "SAST": "Јужно-афричко време", "TMST": "Туркменистан летње рачунање времена", "HNPMX": "Мексички Пацифик стандардно време", "AEST": "Аустралијско источно стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "WAT": "Западно-афричко стандардно време", "HADT": "Хавајско-алеутско летње рачунање времена", "ART": "Аргентина стандардно време", "AWST": "Аустралијско западно стандардно време", "NZST": "Нови Зеланд стандардно време", "CLT": "Чиле стандардно време", "CAT": "Централно-афричко време", "AKDT": "Аљаска, летње рачунање времена", "GYT": "Гвајана време", "HKST": "Хонг Конг летње рачунање времена", "CHAST": "Чатам стандардно време", "UYT": "Уругвај стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "COST": "Колумбија летње рачунање времена", "HNNOMX": "Северозападни Мексико стандардно време", "CST": "Северноамеричко централно стандардно време", "NZDT": "Нови Зеланд летње рачунање времена", "MST": "Макао стандардно време", "AKST": "Аљаска, стандардно време", "EST": "Северноамеричко источно стандардно време", "EDT": "Северноамеричко источно летње време", "UYST": "Уругвај летње рачунање времена", "HNT": "Њуфаундленд стандардно време", "MEZ": "Средњеевропско стандардно време", "HKT": "Хонг Конг стандардно време", "ECT": "Еквадор време", "WARST": "Западна Аргентина летње рачунање времена", "GMT": "Средње време по Гриничу", "SGT": "Сингапур стандардно време", "SRT": "Суринам време", "PST": "Северноамеричко пацифичко стандардно време", "HNCU": "Куба стандардно време", "ACWST": "Аустралијско централно западно стандардно време", "GFT": "Француска Гвајана време", "HECU": "Куба летње рачунање времена", "WIT": "Источно-индонезијско време", "WEZ": "Западноевропско стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "MYT": "Малезија време", "WESZ": "Западноевропско летње рачунање времена", "IST": "Индијско стандардно време", "∅∅∅": "Амазон летње рачунање времена", "JDT": "Јапанско летње рачунање времена", "BOT": "Боливија време", "TMT": "Туркменистан стандардно време", "CDT": "Северноамеричко централно летње време", "ARST": "Аргентина летње рачунање времена", "LHST": "Лорд Хов стандардно време", "WART": "Западна Аргентина стандардно време", "WIB": "Западно-индонезијско време", "HNOG": "Западни Гренланд стандардно време", "HNPM": "Сен Пјер и Микелон стандардно време", "ACST": "Аустралијско централно стандардно време", "OEZ": "Источноевропско стандардно време", "HENOMX": "Северозападни Мексико летње рачунање времена", "MDT": "Макао летње рачунање времена", "HEOG": "Западни Гренланд летње рачунање времена", "ADT": "Атлантско летње рачунање времена", "PDT": "Северноамеричко пацифичко летње време", "CLST": "Чиле летње рачунање времена", "JST": "Јапанско стандардно време", "ChST": "Чаморо време", "HEEG": "Источни Гренланд летње рачунање времена", "EAT": "Источно-афричко време", "COT": "Колумбија стандардно време", "HAT": "Њуфаундленд летње рачунање времена", "AEDT": "Аустралијско источно летње рачунање времена"}, -+ locale: "sr_Cyrl_XK", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "јан.", "феб.", "март", "апр.", "мај", "јун", "јул", "авг.", "септ.", "окт.", "нов.", "дец."}, -+ daysAbbreviated: []string{"нед.", "пон.", "ут.", "ср.", "чет.", "пет.", "суб."}, -+ periodsAbbreviated: []string{"", ""}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"CHAST": "CHAST", "UYT": "UYT", "HNPMX": "HNPMX", "WAT": "WAT", "WART": "WART", "MDT": "MDT", "GMT": "GMT", "MEZ": "MEZ", "IST": "IST", "PST": "PST", "HNCU": "HNCU", "WITA": "WITA", "ACST": "ACST", "HKT": "HKT", "TMT": "TMT", "CLT": "CLT", "CLST": "CLST", "OESZ": "OESZ", "COST": "COST", "ChST": "ChST", "HAST": "HAST", "EAT": "EAT", "LHST": "LHST", "HECU": "HECU", "GFT": "GFT", "HNOG": "HNOG", "HKST": "HKST", "TMST": "TMST", "BOT": "BOT", "HEPM": "HEPM", "HEPMX": "HEPMX", "SAST": "SAST", "HEEG": "HEEG", "WARST": "WARST", "CAT": "CAT", "CDT": "CDT", "HNPM": "HNPM", "AWST": "AWST", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "EST": "EST", "WIB": "WIB", "ECT": "ECT", "HNEG": "HNEG", "HEOG": "HEOG", "HADT": "HADT", "JST": "JST", "SGT": "SGT", "HNT": "HNT", "WIT": "WIT", "COT": "COT", "MESZ": "MESZ", "PDT": "PDT", "BT": "BT", "WAST": "WAST", "CST": "CST", "MST": "MST", "HNNOMX": "HNNOMX", "AEST": "AEST", "CHADT": "CHADT", "EDT": "EDT", "NZDT": "NZDT", "JDT": "JDT", "UYST": "UYST", "ACWDT": "ACWDT", "ADT": "ADT", "ARST": "ARST", "SRT": "SRT", "ACDT": "ACDT", "AWDT": "AWDT", "MYT": "MYT", "VET": "VET", "OEZ": "OEZ", "NZST": "NZST", "AST": "AST", "ART": "ART", "LHDT": "LHDT", "AEDT": "AEDT", "ACWST": "ACWST", "WEZ": "WEZ", "WESZ": "WESZ", "AKST": "AKST", "HAT": "HAT", "GYT": "GYT", "HENOMX": "HENOMX"}, - } - } -  -@@ -167,7 +146,7 @@ func (sr *sr_Cyrl_XK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Cyrl_XK) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +156,7 @@ func (sr *sr_Cyrl_XK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Cyrl_XK) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +202,13 @@ func (sr *sr_Cyrl_XK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Cyrl_XK' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Cyrl_XK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Cyrl_XK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Cyrl_XK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_XK' -@@ -297,56 +216,7 @@ func (sr *sr_Cyrl_XK) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Cyrl_XK' -@@ -355,63 +225,7 @@ func (sr *sr_Cyrl_XK) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Cyrl_XK' -@@ -419,19 +233,6 @@ func (sr *sr_Cyrl_XK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +241,6 @@ func (sr *sr_Cyrl_XK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +249,6 @@ func (sr *sr_Cyrl_XK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +257,6 @@ func (sr *sr_Cyrl_XK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +265,6 @@ func (sr *sr_Cyrl_XK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +273,6 @@ func (sr *sr_Cyrl_XK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +281,6 @@ func (sr *sr_Cyrl_XK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +289,5 @@ func (sr *sr_Cyrl_XK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Latn/sr_Latn.go b/sr_Latn/sr_Latn.go -index 637ba8b..f235e58 100644 ---- a/sr_Latn/sr_Latn.go -+++ b/sr_Latn/sr_Latn.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"p. n. e.", "n. e."}, - erasNarrow: []string{"p.n.e.", "n.e."}, - erasWide: []string{"pre nove ere", "nove ere"}, -- timezones: map[string]string{"WART": "Zapadna Argentina standardno vreme", "MST": "Makao standardno vreme", "CLST": "Čile letnje računanje vremena", "JDT": "Japansko letnje računanje vremena", "ACDT": "Australijsko centralno letnje računanje vremena", "EDT": "Severnoameričko istočno letnje vreme", "AEDT": "Australijsko istočno letnje računanje vremena", "MEZ": "Srednjeevropsko standardno vreme", "LHST": "Lord Hov standardno vreme", "ACST": "Australijsko centralno standardno vreme", "HNCU": "Kuba standardno vreme", "WESZ": "Zapadnoevropsko letnje računanje vremena", "MESZ": "Srednjeevropsko letnje računanje vremena", "BOT": "Bolivija vreme", "CDT": "Severnoameričko centralno letnje vreme", "WEZ": "Zapadnoevropsko standardno vreme", "ART": "Argentina standardno vreme", "ARST": "Argentina letnje računanje vremena", "WITA": "Centralno-indonezijsko vreme", "COST": "Kolumbija letnje računanje vremena", "HECU": "Kuba letnje računanje vremena", "EST": "Severnoameričko istočno standardno vreme", "MDT": "Makao letnje računanje vremena", "UYT": "Urugvaj standardno vreme", "LHDT": "Lord Hov letnje računanje vremena", "HENOMX": "Severozapadni Meksiko letnje računanje vremena", "GYT": "Gvajana vreme", "SAST": "Južno-afričko vreme", "VET": "Venecuela vreme", "BT": "Butan vreme", "WAST": "Zapadno-afričko letnje računanje vremena", "OEZ": "Istočnoevropsko standardno vreme", "WARST": "Zapadna Argentina letnje računanje vremena", "COT": "Kolumbija standardno vreme", "SGT": "Singapur standardno vreme", "ADT": "Atlantsko letnje računanje vremena", "HAT": "Njufaundlend letnje računanje vremena", "NZST": "Novi Zeland standardno vreme", "JST": "Japansko standardno vreme", "HEPMX": "Meksički Pacifik letnje računanje vremena", "WIB": "Zapadno-indonezijsko vreme", "ChST": "Čamoro vreme", "HNEG": "Istočni Grenland standardno vreme", "TMST": "Turkmenistan letnje računanje vremena", "CAT": "Centralno-afričko vreme", "ECT": "Ekvador vreme", "∅∅∅": "Peru letnje računanje vremena", "PDT": "Severnoameričko pacifičko letnje vreme", "AWDT": "Australijsko zapadno letnje računanje vremena", "CHADT": "Čatam letnje računanje vremena", "TMT": "Turkmenistan standardno vreme", "HAST": "Havajsko-aleutsko standardno vreme", "SRT": "Surinam vreme", "HKST": "Hong Kong letnje računanje vremena", "HEPM": "Sen Pjer i Mikelon letnje računanje vremena", "AEST": "Australijsko istočno standardno vreme", "HNPM": "Sen Pjer i Mikelon standardno vreme", "EAT": "Istočno-afričko vreme", "AKST": "Aljaska, standardno vreme", "HADT": "Havajsko-aleutsko letnje računanje vremena", "WIT": "Istočno-indonezijsko vreme", "ACWDT": "Australijsko centralno zapadno letnje računanje vremena", "HNOG": "Zapadni Grenland standardno vreme", "OESZ": "Istočnoevropsko letnje računanje vremena", "HNPMX": "Meksički Pacifik standardno vreme", "MYT": "Malezija vreme", "HKT": "Hong Kong standardno vreme", "NZDT": "Novi Zeland letnje računanje vremena", "WAT": "Zapadno-afričko standardno vreme", "AST": "Atlantsko standardno vreme", "PST": "Severnoameričko pacifičko standardno vreme", "HNT": "Njufaundlend standardno vreme", "IST": "Indijsko standardno vreme", "GFT": "Francuska Gvajana vreme", "HNNOMX": "Severozapadni Meksiko standardno vreme", "GMT": "Srednje vreme po Griniču", "CST": "Severnoameričko centralno standardno vreme", "CLT": "Čile standardno vreme", "ACWST": "Australijsko centralno zapadno standardno vreme", "HEEG": "Istočni Grenland letnje računanje vremena", "AKDT": "Aljaska, letnje računanje vremena", "AWST": "Australijsko zapadno standardno vreme", "UYST": "Urugvaj letnje računanje vremena", "HEOG": "Zapadni Grenland letnje računanje vremena", "CHAST": "Čatam standardno vreme"}, -+ timezones: map[string]string{"ARST": "Argentina letnje računanje vremena", "ACWDT": "Australijsko centralno zapadno letnje računanje vremena", "CHADT": "Čatam letnje računanje vremena", "WAST": "Zapadno-afričko letnje računanje vremena", "GFT": "Francuska Gvajana vreme", "TMST": "Turkmenistan letnje računanje vremena", "CST": "Severnoameričko centralno standardno vreme", "MST": "Makao standardno vreme", "HADT": "Havajsko-aleutsko letnje računanje vremena", "AEST": "Australijsko istočno standardno vreme", "∅∅∅": "Akre letnje računanje vremena", "HNCU": "Kuba standardno vreme", "HNT": "Njufaundlend standardno vreme", "WART": "Zapadna Argentina standardno vreme", "ART": "Argentina standardno vreme", "IST": "Indijsko standardno vreme", "BT": "Butan vreme", "AEDT": "Australijsko istočno letnje računanje vremena", "WEZ": "Zapadnoevropsko standardno vreme", "HNPMX": "Meksički Pacifik standardno vreme", "WARST": "Zapadna Argentina letnje računanje vremena", "ADT": "Atlantsko letnje računanje vremena", "ACDT": "Australijsko centralno letnje računanje vremena", "HENOMX": "Severozapadni Meksiko letnje računanje vremena", "HNPM": "Sen Pjer i Mikelon standardno vreme", "WIT": "Istočno-indonezijsko vreme", "NZDT": "Novi Zeland letnje računanje vremena", "ChST": "Čamoro vreme", "AWST": "Australijsko zapadno standardno vreme", "WAT": "Zapadno-afričko standardno vreme", "CLT": "Čile standardno vreme", "GMT": "Srednje vreme po Griniču", "AWDT": "Australijsko zapadno letnje računanje vremena", "SGT": "Singapur standardno vreme", "GYT": "Gvajana vreme", "ACWST": "Australijsko centralno zapadno standardno vreme", "UYT": "Urugvaj standardno vreme", "AKDT": "Aljaska, letnje računanje vremena", "OEZ": "Istočnoevropsko standardno vreme", "EST": "Severnoameričko istočno standardno vreme", "WITA": "Centralno-indonezijsko vreme", "MEZ": "Srednjeevropsko standardno vreme", "PDT": "Severnoameričko pacifičko letnje vreme", "ACST": "Australijsko centralno standardno vreme", "LHST": "Lord Hov standardno vreme", "HEPM": "Sen Pjer i Mikelon letnje računanje vremena", "ECT": "Ekvador vreme", "EAT": "Istočno-afričko vreme", "HEEG": "Istočni Grenland letnje računanje vremena", "HEPMX": "Meksički Pacifik letnje računanje vremena", "CLST": "Čile letnje računanje vremena", "CDT": "Severnoameričko centralno letnje vreme", "MDT": "Makao letnje računanje vremena", "HAST": "Havajsko-aleutsko standardno vreme", "HNNOMX": "Severozapadni Meksiko standardno vreme", "VET": "Venecuela vreme", "HECU": "Kuba letnje računanje vremena", "SAST": "Južno-afričko vreme", "COT": "Kolumbija standardno vreme", "WIB": "Zapadno-indonezijsko vreme", "MESZ": "Srednjeevropsko letnje računanje vremena", "HNEG": "Istočni Grenland standardno vreme", "LHDT": "Lord Hov letnje računanje vremena", "JDT": "Japansko letnje računanje vremena", "OESZ": "Istočnoevropsko letnje računanje vremena", "PST": "Severnoameričko pacifičko standardno vreme", "TMT": "Turkmenistan standardno vreme", "UYST": "Urugvaj letnje računanje vremena", "AKST": "Aljaska, standardno vreme", "HAT": "Njufaundlend letnje računanje vremena", "HNOG": "Zapadni Grenland standardno vreme", "EDT": "Severnoameričko istočno letnje vreme", "HKST": "Hong Kong letnje računanje vremena", "NZST": "Novi Zeland standardno vreme", "HEOG": "Zapadni Grenland letnje računanje vremena", "HKT": "Hong Kong standardno vreme", "CAT": "Centralno-afričko vreme", "SRT": "Surinam vreme", "MYT": "Malezija vreme", "JST": "Japansko standardno vreme", "CHAST": "Čatam standardno vreme", "WESZ": "Zapadnoevropsko letnje računanje vremena", "COST": "Kolumbija letnje računanje vremena", "AST": "Atlantsko standardno vreme", "BOT": "Bolivija vreme"}, - } - } -  -diff --git a/sr_Latn_BA/sr_Latn_BA.go b/sr_Latn_BA/sr_Latn_BA.go -index 57023a0..31f5ef7 100644 ---- a/sr_Latn_BA/sr_Latn_BA.go -+++ b/sr_Latn_BA/sr_Latn_BA.go -@@ -10,70 +10,54 @@ import ( - ) -  - type sr_Latn_BA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Latn_BA' locale - func New() locales.Translator { - return &sr_Latn_BA{ -- locale: "sr_Latn_BA", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mart", "apr.", "maj", "jun", "jul", "avg.", "sept.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"ned.", "pon.", "ut.", "sr.", "čet.", "pet.", "sub."}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"nedjelja", "ponedeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"prije podne", "po podne"}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"prije podne", "po podne"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"prije nove ere", "nove ere"}, -- timezones: map[string]string{"ARST": "Аргентина летње рачунање времена", "WEZ": "Западноевропско стандардно време", "AEDT": "Аустралијско источно летње рачунање времена", "SAST": "Јужно-афричко време", "WART": "Западна Аргентина стандардно време", "HAST": "Хавајско-алеутско стандардно време", "HEOG": "Западни Гренланд летње рачунање времена", "ECT": "Еквадор време", "MST": "Макао стандардно време", "WITA": "Централно-индонезијско време", "CLT": "Чиле стандардно време", "ADT": "Атлантско летње рачунање времена", "EST": "Северноамеричко источно стандардно време", "HADT": "Хавајско-алеутско летње рачунање времена", "HECU": "Куба летње рачунање времена", "HNOG": "Западни Гренланд стандардно време", "PST": "Северноамеричко пацифичко стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "CHAST": "Чатам стандардно време", "CLST": "Чиле летње рачунање времена", "ACDT": "Аустралијско централно летње рачунање времена", "MYT": "Малезија време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "NZDT": "Нови Зеланд летње рачунање времена", "TMT": "Туркменистан стандардно време", "HNT": "Њуфаундленд стандардно време", "EDT": "Северноамеричко источно летње време", "CST": "Северноамеричко централно стандардно време", "GYT": "Гвајана време", "VET": "Венецуела време", "ART": "Аргентина стандардно време", "JST": "Јапанско стандардно време", "COT": "Колумбија стандардно време", "∅∅∅": "Азори летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "OESZ": "Источноевропско летње рачунање времена", "PDT": "Северноамеричко пацифичко летње време", "WIB": "Западно-индонезијско време", "SRT": "Суринам време", "WESZ": "Западноевропско летње рачунање времена", "CAT": "Централно-афричко време", "UYST": "Уругвај летње рачунање времена", "CDT": "Северноамеричко централно летње време", "AKST": "Аљаска, стандардно време", "AEST": "Аустралијско источно стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "WAT": "Западно-афричко стандардно време", "HNCU": "Куба стандардно време", "AST": "Атлантско стандардно време", "AWST": "Аустралијско западно стандардно време", "GFT": "Француска Гвајана време", "ACST": "Аустралијско централно стандардно време", "GMT": "Средње време по Гриничу", "BOT": "Боливија време", "HNNOMX": "Северозападни Мексико стандардно време", "HENOMX": "Северозападни Мексико летње рачунање времена", "IST": "Индијско стандардно време", "HNPMX": "Мексички Пацифик стандардно време", "BT": "Бутан време", "HKST": "Хонг Конг летње рачунање времена", "MEZ": "Средњеевропско стандардно време", "ChST": "Чаморо време", "OEZ": "Источноевропско стандардно време", "MDT": "Макао летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена", "HNPM": "Сен Пјер и Микелон стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "CHADT": "Чатам летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "WARST": "Западна Аргентина летње рачунање времена", "SGT": "Сингапур стандардно време", "HAT": "Њуфаундленд летње рачунање времена", "LHST": "Лорд Хов стандардно време", "NZST": "Нови Зеланд стандардно време", "EAT": "Источно-афричко време", "WAST": "Западно-афричко летње рачунање времена", "UYT": "Уругвај стандардно време", "WIT": "Источно-индонезијско време", "ACWST": "Аустралијско централно западно стандардно време", "HKT": "Хонг Конг стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "JDT": "Јапанско летње рачунање времена", "COST": "Колумбија летње рачунање времена", "AKDT": "Аљаска, летње рачунање времена"}, -+ locale: "sr_Latn_BA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "jan.", "feb.", "mart", "apr.", "maj", "jun", "jul", "avg.", "sept.", "okt.", "nov.", "dec."}, -+ daysAbbreviated: []string{"ned.", "pon.", "ut.", "sr.", "čet.", "pet.", "sub."}, -+ daysWide: []string{"nedjelja", "ponedeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -+ periodsAbbreviated: []string{"prije podne", "po podne"}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"prije podne", "po podne"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"prije nove ere", "nove ere"}, -+ timezones: map[string]string{"SAST": "SAST", "COST": "COST", "MST": "MST", "WIT": "WIT", "CHADT": "CHADT", "OEZ": "OEZ", "TMST": "TMST", "CDT": "CDT", "HAST": "HAST", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "AKDT": "AKDT", "WARST": "WARST", "GYT": "GYT", "TMT": "TMT", "CST": "CST", "ChST": "ChST", "JDT": "JDT", "HEPM": "HEPM", "ACWDT": "ACWDT", "PST": "PST", "HKST": "HKST", "CLT": "CLT", "WITA": "WITA", "HENOMX": "HENOMX", "UYST": "UYST", "WAST": "WAST", "ART": "ART", "ACWST": "ACWST", "AKST": "AKST", "HEOG": "HEOG", "EDT": "EDT", "CAT": "CAT", "LHST": "LHST", "AEDT": "AEDT", "UYT": "UYT", "HNCU": "HNCU", "VET": "VET", "HKT": "HKT", "LHDT": "LHDT", "CHAST": "CHAST", "COT": "COT", "NZST": "NZST", "EAT": "EAT", "HADT": "HADT", "MEZ": "MEZ", "MYT": "MYT", "AEST": "AEST", "IST": "IST", "CLST": "CLST", "AST": "AST", "ADT": "ADT", "HNPM": "HNPM", "HAT": "HAT", "HNOG": "HNOG", "WIB": "WIB", "WESZ": "WESZ", "SGT": "SGT", "WEZ": "WEZ", "NZDT": "NZDT", "SRT": "SRT", "BT": "BT", "AWST": "AWST", "WAT": "WAT", "OESZ": "OESZ", "ECT": "ECT", "GMT": "GMT", "HEEG": "HEEG", "HEPMX": "HEPMX", "HNT": "HNT", "BOT": "BOT", "PDT": "PDT", "ACDT": "ACDT", "JST": "JST", "AWDT": "AWDT", "HNPMX": "HNPMX", "GFT": "GFT", "WART": "WART", "MDT": "MDT", "HNNOMX": "HNNOMX", "ARST": "ARST", "HNEG": "HNEG", "HECU": "HECU", "EST": "EST", "ACST": "ACST"}, - } - } -  -@@ -167,7 +151,7 @@ func (sr *sr_Latn_BA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Latn_BA) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +161,7 @@ func (sr *sr_Latn_BA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Latn_BA) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +207,13 @@ func (sr *sr_Latn_BA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Latn_BA' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Latn_BA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Latn_BA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Latn_BA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_BA' -@@ -297,56 +221,7 @@ func (sr *sr_Latn_BA) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_BA' -@@ -355,63 +230,7 @@ func (sr *sr_Latn_BA) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Latn_BA' -@@ -419,19 +238,6 @@ func (sr *sr_Latn_BA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +246,6 @@ func (sr *sr_Latn_BA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +254,6 @@ func (sr *sr_Latn_BA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +262,6 @@ func (sr *sr_Latn_BA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +270,6 @@ func (sr *sr_Latn_BA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +278,6 @@ func (sr *sr_Latn_BA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +286,6 @@ func (sr *sr_Latn_BA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +294,5 @@ func (sr *sr_Latn_BA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Latn_ME/sr_Latn_ME.go b/sr_Latn_ME/sr_Latn_ME.go -index 74cbe1c..5db362a 100644 ---- a/sr_Latn_ME/sr_Latn_ME.go -+++ b/sr_Latn_ME/sr_Latn_ME.go -@@ -10,70 +10,54 @@ import ( - ) -  - type sr_Latn_ME struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Latn_ME' locale - func New() locales.Translator { - return &sr_Latn_ME{ -- locale: "sr_Latn_ME", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mart", "apr.", "maj", "jun", "jul", "avg.", "sept.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"ned.", "pon.", "ut.", "sr.", "čet.", "pet.", "sub."}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"nedjelja", "ponedeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -- periodsAbbreviated: []string{"prije podne", "po podne"}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"prije podne", "po podne"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"NZDT": "Нови Зеланд летње рачунање времена", "EST": "Северноамеричко источно стандардно време", "UYST": "Уругвај летње рачунање времена", "HAST": "Хавајско-алеутско стандардно време", "WITA": "Централно-индонезијско време", "HNT": "Њуфаундленд стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "CLST": "Чиле летње рачунање времена", "JST": "Јапанско стандардно време", "WAST": "Западно-афричко летње рачунање времена", "ECT": "Еквадор време", "AKST": "Аљаска, стандардно време", "CDT": "Северноамеричко централно летње време", "UYT": "Уругвај стандардно време", "HAT": "Њуфаундленд летње рачунање времена", "BOT": "Боливија време", "EAT": "Источно-афричко време", "WARST": "Западна Аргентина летње рачунање времена", "HEPMX": "Мексички Пацифик летње рачунање времена", "ACDT": "Аустралијско централно летње рачунање времена", "COT": "Колумбија стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "CHADT": "Чатам летње рачунање времена", "WEZ": "Западноевропско стандардно време", "ChST": "Чаморо време", "OESZ": "Источноевропско летње рачунање времена", "WART": "Западна Аргентина стандардно време", "ADT": "Атлантско летње рачунање времена", "ACST": "Аустралијско централно стандардно време", "WIT": "Источно-индонезијско време", "AEDT": "Аустралијско источно летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "SGT": "Сингапур стандардно време", "HNPMX": "Мексички Пацифик стандардно време", "ARST": "Аргентина летње рачунање времена", "WAT": "Западно-афричко стандардно време", "GMT": "Средње време по Гриничу", "AEST": "Аустралијско источно стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "HEOG": "Западни Гренланд летње рачунање времена", "CHAST": "Чатам стандардно време", "OEZ": "Источноевропско стандардно време", "EDT": "Северноамеричко источно летње време", "MYT": "Малезија време", "HNOG": "Западни Гренланд стандардно време", "HADT": "Хавајско-алеутско летње рачунање времена", "SRT": "Суринам време", "ACWST": "Аустралијско централно западно стандардно време", "IST": "Индијско стандардно време", "∅∅∅": "Амазон летње рачунање времена", "GFT": "Француска Гвајана време", "CAT": "Централно-афричко време", "HENOMX": "Северозападни Мексико летње рачунање времена", "MEZ": "Средњеевропско стандардно време", "COST": "Колумбија летње рачунање времена", "CST": "Северноамеричко централно стандардно време", "WESZ": "Западноевропско летње рачунање времена", "HNPM": "Сен Пјер и Микелон стандардно време", "VET": "Венецуела време", "PDT": "Северноамеричко пацифичко летње време", "MESZ": "Средњеевропско летње рачунање времена", "JDT": "Јапанско летње рачунање времена", "TMT": "Туркменистан стандардно време", "HNCU": "Куба стандардно време", "HECU": "Куба летње рачунање времена", "WIB": "Западно-индонезијско време", "BT": "Бутан време", "HKT": "Хонг Конг стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "TMST": "Туркменистан летње рачунање времена", "HNNOMX": "Северозападни Мексико стандардно време", "AST": "Атлантско стандардно време", "PST": "Северноамеричко пацифичко стандардно време", "LHST": "Лорд Хов стандардно време", "SAST": "Јужно-афричко време", "MST": "Макао стандардно време", "AKDT": "Аљаска, летње рачунање времена", "GYT": "Гвајана време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "HKST": "Хонг Конг летње рачунање времена", "NZST": "Нови Зеланд стандардно време", "CLT": "Чиле стандардно време", "MDT": "Макао летње рачунање времена", "ART": "Аргентина стандардно време", "AWST": "Аустралијско западно стандардно време"}, -+ locale: "sr_Latn_ME", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "jan.", "feb.", "mart", "apr.", "maj", "jun", "jul", "avg.", "sept.", "okt.", "nov.", "dec."}, -+ daysAbbreviated: []string{"ned.", "pon.", "ut.", "sr.", "čet.", "pet.", "sub."}, -+ daysWide: []string{"nedjelja", "ponedeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"}, -+ periodsAbbreviated: []string{"prije podne", "po podne"}, -+ periodsNarrow: []string{"", ""}, -+ periodsWide: []string{"prije podne", "po podne"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"", ""}, -+ timezones: map[string]string{"GYT": "GYT", "AWDT": "AWDT", "PST": "PST", "GFT": "GFT", "EAT": "EAT", "UYST": "UYST", "SAST": "SAST", "COST": "COST", "CLT": "CLT", "MST": "MST", "MDT": "MDT", "SRT": "SRT", "AKDT": "AKDT", "HKT": "HKT", "WEZ": "WEZ", "WART": "WART", "ChST": "ChST", "ART": "ART", "HNCU": "HNCU", "HAT": "HAT", "HECU": "HECU", "OESZ": "OESZ", "EDT": "EDT", "MESZ": "MESZ", "ACST": "ACST", "LHST": "LHST", "JDT": "JDT", "SGT": "SGT", "WIB": "WIB", "AKST": "AKST", "OEZ": "OEZ", "COT": "COT", "∅∅∅": "∅∅∅", "CLST": "CLST", "BOT": "BOT", "AWST": "AWST", "ACWST": "ACWST", "HEOG": "HEOG", "TMST": "TMST", "IST": "IST", "ACWDT": "ACWDT", "WESZ": "WESZ", "HEPMX": "HEPMX", "MYT": "MYT", "HNPM": "HNPM", "ARST": "ARST", "HAST": "HAST", "AEDT": "AEDT", "HNT": "HNT", "EST": "EST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "CHADT": "CHADT", "VET": "VET", "WAST": "WAST", "HNOG": "HNOG", "CAT": "CAT", "ECT": "ECT", "JST": "JST", "BT": "BT", "TMT": "TMT", "HADT": "HADT", "MEZ": "MEZ", "LHDT": "LHDT", "HNPMX": "HNPMX", "CST": "CST", "HEEG": "HEEG", "UYT": "UYT", "WIT": "WIT", "HNEG": "HNEG", "HEPM": "HEPM", "WITA": "WITA", "CDT": "CDT", "NZST": "NZST", "AST": "AST", "GMT": "GMT", "ACDT": "ACDT", "PDT": "PDT", "AEST": "AEST", "WAT": "WAT", "WARST": "WARST", "HKST": "HKST", "NZDT": "NZDT", "ADT": "ADT", "CHAST": "CHAST"}, - } - } -  -@@ -167,7 +151,7 @@ func (sr *sr_Latn_ME) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Latn_ME) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +161,7 @@ func (sr *sr_Latn_ME) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Latn_ME) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +207,13 @@ func (sr *sr_Latn_ME) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Latn_ME' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Latn_ME) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Latn_ME' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Latn_ME) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_ME' -@@ -297,56 +221,7 @@ func (sr *sr_Latn_ME) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_ME' -@@ -355,63 +230,7 @@ func (sr *sr_Latn_ME) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Latn_ME' -@@ -419,19 +238,6 @@ func (sr *sr_Latn_ME) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +246,6 @@ func (sr *sr_Latn_ME) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +254,6 @@ func (sr *sr_Latn_ME) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +262,6 @@ func (sr *sr_Latn_ME) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +270,6 @@ func (sr *sr_Latn_ME) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +278,6 @@ func (sr *sr_Latn_ME) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +286,6 @@ func (sr *sr_Latn_ME) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +294,5 @@ func (sr *sr_Latn_ME) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Latn_RS/sr_Latn_RS.go b/sr_Latn_RS/sr_Latn_RS.go -index abe98b6..b5ee892 100644 ---- a/sr_Latn_RS/sr_Latn_RS.go -+++ b/sr_Latn_RS/sr_Latn_RS.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sr_Latn_RS struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Latn_RS' locale - func New() locales.Translator { - return &sr_Latn_RS{ -- locale: "sr_Latn_RS", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "јан", "феб", "мар", "апр", "мај", "јун", "јул", "авг", "сеп", "окт", "нов", "дец"}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"нед", "пон", "уто", "сре", "чет", "пет", "суб"}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недеља", "понедељак", "уторак", "среда", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"пре подне", "по подне"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"пре подне", "по подне"}, -- erasAbbreviated: []string{"п. н. е.", "н. е."}, -- erasNarrow: []string{"п.н.е.", "н.е."}, -- erasWide: []string{"пре нове ере", "нове ере"}, -- timezones: map[string]string{"CLT": "Чиле стандардно време", "CST": "Северноамеричко централно стандардно време", "SRT": "Суринам време", "AEST": "Аустралијско источно стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "HENOMX": "Северозападни Мексико летње рачунање времена", "MST": "Макао стандардно време", "HADT": "Хавајско-алеутско летње рачунање времена", "ACWDT": "Аустралијско централно западно летње рачунање времена", "AEDT": "Аустралијско источно летње рачунање времена", "ADT": "Атлантско летње рачунање времена", "HEOG": "Западни Гренланд летње рачунање времена", "∅∅∅": "Амазон летње рачунање времена", "SAST": "Јужно-афричко време", "IST": "Индијско стандардно време", "BOT": "Боливија време", "HEEG": "Источни Гренланд летње рачунање времена", "GFT": "Француска Гвајана време", "HNPMX": "Мексички Пацифик стандардно време", "WESZ": "Западноевропско летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "LHST": "Лорд Хов стандардно време", "NZST": "Нови Зеланд стандардно време", "EAT": "Источно-афричко време", "WAT": "Западно-афричко стандардно време", "HNOG": "Западни Гренланд стандардно време", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "ECT": "Еквадор време", "ARST": "Аргентина летње рачунање времена", "CAT": "Централно-афричко време", "TMT": "Туркменистан стандардно време", "HNCU": "Куба стандардно време", "HEPMX": "Мексички Пацифик летње рачунање времена", "AST": "Атлантско стандардно време", "PST": "Северноамеричко пацифичко стандардно време", "HNT": "Њуфаундленд стандардно време", "CLST": "Чиле летње рачунање времена", "GMT": "Средње време по Гриничу", "CDT": "Северноамеричко централно летње време", "HAST": "Хавајско-алеутско стандардно време", "AWST": "Аустралијско западно стандардно време", "HKST": "Хонг Конг летње рачунање времена", "JDT": "Јапанско летње рачунање времена", "ACST": "Аустралијско централно стандардно време", "SGT": "Сингапур стандардно време", "HNPM": "Сен Пјер и Микелон стандардно време", "MESZ": "Средњеевропско летње рачунање времена", "EDT": "Северноамеричко источно летње време", "ACDT": "Аустралијско централно летње рачунање времена", "HNNOMX": "Северозападни Мексико стандардно време", "HKT": "Хонг Конг стандардно време", "WITA": "Централно-индонезијско време", "CHADT": "Чатам летње рачунање времена", "MDT": "Макао летње рачунање времена", "MYT": "Малезија време", "UYT": "Уругвај стандардно време", "PDT": "Северноамеричко пацифичко летње време", "WEZ": "Западноевропско стандардно време", "AKST": "Аљаска, стандардно време", "VET": "Венецуела време", "HECU": "Куба летње рачунање времена", "EST": "Северноамеричко источно стандардно време", "WAST": "Западно-афричко летње рачунање времена", "OEZ": "Источноевропско стандардно време", "HNEG": "Источни Гренланд стандардно време", "WARST": "Западна Аргентина летње рачунање времена", "AKDT": "Аљаска, летње рачунање времена", "MEZ": "Средњеевропско стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "OESZ": "Источноевропско летње рачунање времена", "GYT": "Гвајана време", "JST": "Јапанско стандардно време", "TMST": "Туркменистан летње рачунање времена", "CHAST": "Чатам стандардно време", "ChST": "Чаморо време", "UYST": "Уругвај летње рачунање времена", "WIB": "Западно-индонезијско време", "HAT": "Њуфаундленд летње рачунање времена", "ART": "Аргентина стандардно време", "WART": "Западна Аргентина стандардно време", "COT": "Колумбија стандардно време", "COST": "Колумбија летње рачунање времена", "WIT": "Источно-индонезијско време", "BT": "Бутан време", "NZDT": "Нови Зеланд летње рачунање времена"}, -+ locale: "sr_Latn_RS", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MESZ": "MESZ", "HENOMX": "HENOMX", "AWDT": "AWDT", "LHDT": "LHDT", "TMT": "TMT", "MDT": "MDT", "SRT": "SRT", "HADT": "HADT", "ACDT": "ACDT", "LHST": "LHST", "WEZ": "WEZ", "HAT": "HAT", "∅∅∅": "∅∅∅", "CAT": "CAT", "CLT": "CLT", "PST": "PST", "PDT": "PDT", "SGT": "SGT", "HNT": "HNT", "HNOG": "HNOG", "HKST": "HKST", "JST": "JST", "HNCU": "HNCU", "NZST": "NZST", "HEEG": "HEEG", "CHAST": "CHAST", "ACWST": "ACWST", "HNPMX": "HNPMX", "GFT": "GFT", "CDT": "CDT", "MEZ": "MEZ", "ACST": "ACST", "OESZ": "OESZ", "SAST": "SAST", "CLST": "CLST", "GMT": "GMT", "ARST": "ARST", "EAT": "EAT", "UYST": "UYST", "GYT": "GYT", "WIB": "WIB", "BOT": "BOT", "HAST": "HAST", "HECU": "HECU", "WAT": "WAT", "WIT": "WIT", "CST": "CST", "MYT": "MYT", "HKT": "HKT", "HNEG": "HNEG", "AWST": "AWST", "WESZ": "WESZ", "HEOG": "HEOG", "TMST": "TMST", "MST": "MST", "AEDT": "AEDT", "JDT": "JDT", "WAST": "WAST", "WART": "WART", "EST": "EST", "ChST": "ChST", "HNPM": "HNPM", "UYT": "UYT", "VET": "VET", "COT": "COT", "COST": "COST", "EDT": "EDT", "NZDT": "NZDT", "AKDT": "AKDT", "AST": "AST", "BT": "BT", "HEPMX": "HEPMX", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "ACWDT": "ACWDT", "WARST": "WARST", "WITA": "WITA", "ADT": "ADT", "ART": "ART", "IST": "IST", "AEST": "AEST", "AKST": "AKST", "OEZ": "OEZ", "ECT": "ECT", "CHADT": "CHADT"}, - } - } -  -@@ -103,10 +78,10 @@ func (sr *sr_Latn_RS) CardinalPluralRule(num float64, v uint64) locales.PluralRu - n := math.Abs(num) - i := int64(n) - f := locales.F(n, v) -- iMod100 := i % 100 - iMod10 := i % 10 -- fMod100 := f % 100 -+ iMod100 := i % 100 - fMod10 := f % 10 -+ fMod100 := f % 100 -  - if (v == 0 && iMod10 == 1 && iMod100 != 11) || (fMod10 == 1 && fMod100 != 11) { - return locales.PluralRuleOne -@@ -157,7 +132,7 @@ func (sr *sr_Latn_RS) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sr *sr_Latn_RS) MonthsAbbreviated() []string { -- return sr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -167,7 +142,7 @@ func (sr *sr_Latn_RS) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Latn_RS) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +152,7 @@ func (sr *sr_Latn_RS) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Latn_RS) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +198,13 @@ func (sr *sr_Latn_RS) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Latn_RS' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Latn_RS) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Latn_RS' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Latn_RS) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_RS' -@@ -297,56 +212,7 @@ func (sr *sr_Latn_RS) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_RS' -@@ -355,63 +221,7 @@ func (sr *sr_Latn_RS) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Latn_RS' -@@ -419,19 +229,6 @@ func (sr *sr_Latn_RS) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +237,6 @@ func (sr *sr_Latn_RS) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +245,6 @@ func (sr *sr_Latn_RS) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +253,6 @@ func (sr *sr_Latn_RS) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +261,6 @@ func (sr *sr_Latn_RS) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +269,6 @@ func (sr *sr_Latn_RS) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +277,6 @@ func (sr *sr_Latn_RS) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +285,5 @@ func (sr *sr_Latn_RS) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sr_Latn_XK/sr_Latn_XK.go b/sr_Latn_XK/sr_Latn_XK.go -index d80d96f..23043cc 100644 ---- a/sr_Latn_XK/sr_Latn_XK.go -+++ b/sr_Latn_XK/sr_Latn_XK.go -@@ -10,70 +10,49 @@ import ( - ) -  - type sr_Latn_XK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sr_Latn_XK' locale - func New() locales.Translator { - return &sr_Latn_XK{ -- locale: "sr_Latn_XK", -- pluralsCardinal: []locales.PluralRule{2, 4, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 4, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ".", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mart", "apr.", "maj", "jun", "jul", "avg.", "sept.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "ј", "ф", "м", "а", "м", "ј", "ј", "а", "с", "о", "н", "д"}, -- monthsWide: []string{"", "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"}, -- daysAbbreviated: []string{"ned.", "pon.", "ut.", "sr.", "čet.", "pet.", "sub."}, -- daysNarrow: []string{"н", "п", "у", "с", "ч", "п", "с"}, -- daysShort: []string{"не", "по", "ут", "ср", "че", "пе", "су"}, -- daysWide: []string{"недеља", "понедељак", "уторак", "среда", "четвртак", "петак", "субота"}, -- periodsAbbreviated: []string{"", ""}, -- periodsNarrow: []string{"", ""}, -- periodsWide: []string{"пре подне", "по подне"}, -- erasAbbreviated: []string{"п. н. е.", "н. е."}, -- erasNarrow: []string{"п.н.е.", "н.е."}, -- erasWide: []string{"пре нове ере", "нове ере"}, -- timezones: map[string]string{"MYT": "Малезија време", "UYST": "Уругвај летње рачунање времена", "CDT": "Северноамеричко централно летње време", "HNT": "Њуфаундленд стандардно време", "WITA": "Централно-индонезијско време", "SAST": "Јужно-афричко време", "PST": "Северноамеричко пацифичко стандардно време", "AWST": "Аустралијско западно стандардно време", "TMT": "Туркменистан стандардно време", "∅∅∅": "Перу летње рачунање времена", "AST": "Атлантско стандардно време", "GYT": "Гвајана време", "VET": "Венецуела време", "ART": "Аргентина стандардно време", "CHAST": "Чатам стандардно време", "SGT": "Сингапур стандардно време", "HECU": "Куба летње рачунање времена", "EDT": "Северноамеричко источно летње време", "ADT": "Атлантско летње рачунање времена", "JST": "Јапанско стандардно време", "HKST": "Хонг Конг летње рачунање времена", "HNPM": "Сен Пјер и Микелон стандардно време", "BOT": "Боливија време", "WAT": "Западно-афричко стандардно време", "MDT": "Макао летње рачунање времена", "AKDT": "Аљаска, летње рачунање времена", "WIT": "Источно-индонезијско време", "AEDT": "Аустралијско источно летње рачунање времена", "HEPM": "Сен Пјер и Микелон летње рачунање времена", "HNEG": "Источни Гренланд стандардно време", "WAST": "Западно-афричко летње рачунање времена", "HNPMX": "Мексички Пацифик стандардно време", "HNOG": "Западни Гренланд стандардно време", "CHADT": "Чатам летње рачунање времена", "ECT": "Еквадор време", "HNNOMX": "Северозападни Мексико стандардно време", "EST": "Северноамеричко источно стандардно време", "HEPMX": "Мексички Пацифик летње рачунање времена", "ARST": "Аргентина летње рачунање времена", "AEST": "Аустралијско источно стандардно време", "JDT": "Јапанско летње рачунање времена", "WART": "Западна Аргентина стандардно време", "COT": "Колумбија стандардно време", "WESZ": "Западноевропско летње рачунање времена", "ACWST": "Аустралијско централно западно стандардно време", "NZST": "Нови Зеланд стандардно време", "IST": "Индијско стандардно време", "LHDT": "Лорд Хов летње рачунање времена", "ChST": "Чаморо време", "WARST": "Западна Аргентина летње рачунање времена", "PDT": "Северноамеричко пацифичко летње време", "WEZ": "Западноевропско стандардно време", "HAT": "Њуфаундленд летње рачунање времена", "MESZ": "Средњеевропско летње рачунање времена", "HNCU": "Куба стандардно време", "HADT": "Хавајско-алеутско летње рачунање времена", "SRT": "Суринам време", "TMST": "Туркменистан летње рачунање времена", "GMT": "Средње време по Гриничу", "MST": "Макао стандардно време", "MEZ": "Средњеевропско стандардно време", "CAT": "Централно-афричко време", "EAT": "Источно-афричко време", "COST": "Колумбија летње рачунање времена", "WIB": "Западно-индонезијско време", "HAST": "Хавајско-алеутско стандардно време", "AWDT": "Аустралијско западно летње рачунање времена", "AKST": "Аљаска, стандардно време", "CST": "Северноамеричко централно стандардно време", "BT": "Бутан време", "ACWDT": "Аустралијско централно западно летње рачунање времена", "CLT": "Чиле стандардно време", "ACDT": "Аустралијско централно летње рачунање времена", "HENOMX": "Северозападни Мексико летње рачунање времена", "LHST": "Лорд Хов стандардно време", "HEEG": "Источни Гренланд летње рачунање времена", "ACST": "Аустралијско централно стандардно време", "OEZ": "Источноевропско стандардно време", "OESZ": "Источноевропско летње рачунање времена", "UYT": "Уругвај стандардно време", "CLST": "Чиле летње рачунање времена", "GFT": "Француска Гвајана време", "HEOG": "Западни Гренланд летње рачунање времена", "HKT": "Хонг Конг стандардно време", "NZDT": "Нови Зеланд летње рачунање времена"}, -+ locale: "sr_Latn_XK", -+ pluralsCardinal: []locales.PluralRule{2, 4, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 4, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "jan.", "feb.", "mart", "apr.", "maj", "jun", "jul", "avg.", "sept.", "okt.", "nov.", "dec."}, -+ daysAbbreviated: []string{"ned.", "pon.", "ut.", "sr.", "čet.", "pet.", "sub."}, -+ periodsAbbreviated: []string{"", ""}, -+ periodsNarrow: []string{"", ""}, -+ timezones: map[string]string{"EDT": "EDT", "HNEG": "HNEG", "LHST": "LHST", "JST": "JST", "PST": "PST", "HNCU": "HNCU", "OEZ": "OEZ", "HNT": "HNT", "NZDT": "NZDT", "HADT": "HADT", "AWDT": "AWDT", "IST": "IST", "PDT": "PDT", "ACWST": "ACWST", "WAT": "WAT", "HEOG": "HEOG", "HEPMX": "HEPMX", "HNNOMX": "HNNOMX", "UYST": "UYST", "HAT": "HAT", "ChST": "ChST", "WIT": "WIT", "COST": "COST", "AWST": "AWST", "WEZ": "WEZ", "WART": "WART", "WARST": "WARST", "COT": "COT", "HNOG": "HNOG", "MST": "MST", "SRT": "SRT", "HAST": "HAST", "ACST": "ACST", "WAST": "WAST", "OESZ": "OESZ", "AEDT": "AEDT", "UYT": "UYT", "BT": "BT", "HNPMX": "HNPMX", "HKST": "HKST", "WITA": "WITA", "ADT": "ADT", "HENOMX": "HENOMX", "HEPM": "HEPM", "AEST": "AEST", "AKDT": "AKDT", "GYT": "GYT", "BOT": "BOT", "CHADT": "CHADT", "ACWDT": "ACWDT", "AKST": "AKST", "GMT": "GMT", "TMT": "TMT", "NZST": "NZST", "WIB": "WIB", "MYT": "MYT", "WESZ": "WESZ", "VET": "VET", "EST": "EST", "HKT": "HKT", "CST": "CST", "HECU": "HECU", "CAT": "CAT", "CLST": "CLST", "CDT": "CDT", "ART": "ART", "MESZ": "MESZ", "LHDT": "LHDT", "JDT": "JDT", "∅∅∅": "∅∅∅", "TMST": "TMST", "ACDT": "ACDT", "SAST": "SAST", "CLT": "CLT", "EAT": "EAT", "HEEG": "HEEG", "HNPM": "HNPM", "CHAST": "CHAST", "GFT": "GFT", "MDT": "MDT", "ARST": "ARST", "MEZ": "MEZ", "SGT": "SGT", "ECT": "ECT", "AST": "AST"}, - } - } -  -@@ -167,7 +146,7 @@ func (sr *sr_Latn_XK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sr *sr_Latn_XK) MonthsNarrow() []string { -- return sr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -177,7 +156,7 @@ func (sr *sr_Latn_XK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sr *sr_Latn_XK) MonthsWide() []string { -- return sr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -223,73 +202,13 @@ func (sr *sr_Latn_XK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sr_Latn_XK' and handles both Whole and Real numbers based on 'v' - func (sr *sr_Latn_XK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sr_Latn_XK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sr *sr_Latn_XK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sr.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_XK' -@@ -297,56 +216,7 @@ func (sr *sr_Latn_XK) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sr.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sr_Latn_XK' -@@ -355,63 +225,7 @@ func (sr *sr_Latn_XK) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sr.currencies[currency] -- l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, sr.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sr.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sr.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sr_Latn_XK' -@@ -419,19 +233,6 @@ func (sr *sr_Latn_XK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -440,29 +241,6 @@ func (sr *sr_Latn_XK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -471,23 +249,6 @@ func (sr *sr_Latn_XK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -496,26 +257,6 @@ func (sr *sr_Latn_XK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sr.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, sr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -524,19 +265,6 @@ func (sr *sr_Latn_XK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -545,26 +273,6 @@ func (sr *sr_Latn_XK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -573,30 +281,6 @@ func (sr *sr_Latn_XK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -605,34 +289,5 @@ func (sr *sr_Latn_XK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sv/sv.go b/sv/sv.go -index 3a92675..9ba794f 100644 ---- a/sv/sv.go -+++ b/sv/sv.go -@@ -73,7 +73,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"f.Kr.", "e.Kr."}, - erasNarrow: []string{"f.Kr.", "e.Kr."}, - erasWide: []string{"före Kristus", "efter Kristus"}, -- timezones: map[string]string{"MEZ": "centraleuropeisk normaltid", "OESZ": "östeuropeisk sommartid", "GMT": "Greenwichtid", "MYT": "malaysisk tid", "AEDT": "östaustralisk sommartid", "IST": "indisk tid", "∅∅∅": "Amazonas, sommartid", "TMST": "turkmensk sommartid", "ECT": "ecuadoriansk tid", "WART": "västargentinsk normaltid", "HNNOMX": "nordvästmexikansk normaltid", "WIB": "västindonesisk tid", "WIT": "östindonesisk tid", "WEZ": "västeuropeisk normaltid", "HNEG": "östgrönländsk normaltid", "WARST": "västargentinsk sommartid", "EDT": "östnordamerikansk sommartid", "AKST": "Alaska, normaltid", "SRT": "Surinamtid", "CHADT": "Chatham, sommartid", "OEZ": "östeuropeisk normaltid", "HENOMX": "nordvästmexikansk sommartid", "EST": "östnordamerikansk normaltid", "HKST": "Hongkong, sommartid", "CHAST": "Chatham, normaltid", "CLT": "chilensk normaltid", "EAT": "östafrikansk tid", "WAT": "västafrikansk normaltid", "HEPMX": "mexikansk stillahavstid, sommartid", "AWDT": "västaustralisk sommartid", "HNPM": "S:t Pierre och Miquelon, normaltid", "ACDT": "centralaustralisk sommartid", "HNOG": "västgrönländsk normaltid", "VET": "venezuelansk tid", "HAT": "Newfoundland, sommartid", "NZST": "nyzeeländsk normaltid", "ChST": "Chamorrotid", "ACST": "centralaustralisk normaltid", "WAST": "västafrikansk sommartid", "HAST": "Honolulu, normaltid", "HNT": "Newfoundland, normaltid", "JST": "japansk normaltid", "COST": "colombiansk sommartid", "ACWST": "västcentralaustralisk normaltid", "BT": "bhutansk tid", "PST": "västnordamerikansk normaltid", "LHST": "Lord Howe, normaltid", "TMT": "turkmensk normaltid", "HNPMX": "mexikansk stillahavstid, normaltid", "AKDT": "Alaska, sommartid", "ADT": "nordamerikansk atlantsommartid", "AEST": "östaustralisk normaltid", "CLST": "chilensk sommartid", "JDT": "japansk sommartid", "MDT": "Macausommartid", "GYT": "Guyanatid", "HADT": "Honolulu, sommartid", "WESZ": "västeuropeisk sommartid", "ARST": "östargentinsk sommartid", "HEOG": "västgrönländsk sommartid", "WITA": "centralindonesisk tid", "LHDT": "Lord Howe, sommartid", "CST": "centralnordamerikansk normaltid", "SGT": "Singaporetid", "UYT": "uruguayansk normaltid", "UYST": "uruguayansk sommartid", "AST": "nordamerikansk atlantnormaltid", "PDT": "västnordamerikansk sommartid", "MST": "Macaunormaltid", "HEPM": "S:t Pierre och Miquelon, sommartid", "GFT": "Franska Guyanatid", "HNCU": "kubansk normaltid", "ACWDT": "västcentralaustralisk sommartid", "COT": "colombiansk normaltid", "CDT": "centralnordamerikansk sommartid", "AWST": "västaustralisk normaltid", "HKT": "Hongkong, normaltid", "NZDT": "nyzeeländsk sommartid", "BOT": "boliviansk tid", "HECU": "kubansk sommartid", "ART": "östargentinsk normaltid", "SAST": "sydafrikansk tid", "HEEG": "östgrönländsk sommartid", "CAT": "centralafrikansk tid", "MESZ": "centraleuropeisk sommartid"}, -+ timezones: map[string]string{"HADT": "Honolulu, sommartid", "MEZ": "centraleuropeisk normaltid", "ACWDT": "västcentralaustralisk sommartid", "AEDT": "östaustralisk sommartid", "HNPMX": "mexikansk stillahavstid, normaltid", "HNT": "Newfoundland, normaltid", "ART": "östargentinsk normaltid", "ADT": "nordamerikansk atlantsommartid", "ACST": "centralaustralisk normaltid", "HEPM": "S:t Pierre och Miquelon, sommartid", "CHADT": "Chatham, sommartid", "WESZ": "västeuropeisk sommartid", "VET": "venezuelansk tid", "WAT": "västafrikansk normaltid", "NZDT": "nyzeeländsk sommartid", "HKST": "Hongkong, sommartid", "AKST": "Alaska, normaltid", "GMT": "Greenwichtid", "AEST": "östaustralisk normaltid", "SAST": "sydafrikansk tid", "AWST": "västaustralisk normaltid", "MESZ": "centraleuropeisk sommartid", "ACDT": "centralaustralisk sommartid", "UYT": "uruguayansk normaltid", "IST": "indisk tid", "BT": "bhutansk tid", "HNOG": "västgrönländsk normaltid", "CAT": "centralafrikansk tid", "HAST": "Honolulu, normaltid", "HNNOMX": "nordvästmexikansk normaltid", "ACWST": "västcentralaustralisk normaltid", "HECU": "kubansk sommartid", "HEPMX": "mexikansk stillahavstid, sommartid", "SGT": "Singaporetid", "AKDT": "Alaska, sommartid", "EST": "östnordamerikansk normaltid", "ECT": "ecuadoriansk tid", "CLST": "chilensk sommartid", "UYST": "uruguayansk sommartid", "∅∅∅": "peruansk sommartid", "GFT": "Franska Guyanatid", "TMST": "turkmensk sommartid", "HEEG": "östgrönländsk sommartid", "LHST": "Lord Howe, normaltid", "HNCU": "kubansk normaltid", "WAST": "västafrikansk sommartid", "OESZ": "östeuropeisk sommartid", "TMT": "turkmensk normaltid", "JST": "japansk normaltid", "MDT": "Macausommartid", "NZST": "nyzeeländsk normaltid", "JDT": "japansk sommartid", "OEZ": "östeuropeisk normaltid", "HAT": "Newfoundland, sommartid", "CDT": "centralnordamerikansk sommartid", "WEZ": "västeuropeisk normaltid", "WITA": "centralindonesisk tid", "SRT": "Surinamtid", "MST": "Macaunormaltid", "HNPM": "S:t Pierre och Miquelon, normaltid", "AWDT": "västaustralisk sommartid", "MYT": "malaysisk tid", "CHAST": "Chatham, normaltid", "WIB": "västindonesisk tid", "PST": "västnordamerikansk normaltid", "WART": "västargentinsk normaltid", "WARST": "västargentinsk sommartid", "HEOG": "västgrönländsk sommartid", "EDT": "östnordamerikansk sommartid", "CLT": "chilensk normaltid", "BOT": "boliviansk tid", "HENOMX": "nordvästmexikansk sommartid", "LHDT": "Lord Howe, sommartid", "COT": "colombiansk normaltid", "COST": "colombiansk sommartid", "HKT": "Hongkong, normaltid", "ChST": "Chamorrotid", "PDT": "västnordamerikansk sommartid", "AST": "nordamerikansk atlantnormaltid", "ARST": "östargentinsk sommartid", "HNEG": "östgrönländsk normaltid", "WIT": "östindonesisk tid", "CST": "centralnordamerikansk normaltid", "GYT": "Guyanatid", "EAT": "östafrikansk tid"}, - } - } -  -diff --git a/sv_AX/sv_AX.go b/sv_AX/sv_AX.go -index 06bd717..63941de 100644 ---- a/sv_AX/sv_AX.go -+++ b/sv_AX/sv_AX.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sv_AX struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sv_AX' locale - func New() locales.Translator { - return &sv_AX{ -- locale: "sv_AX", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mars", "apr.", "maj", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"sön", "mån", "tis", "ons", "tors", "fre", "lör"}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sö", "må", "ti", "on", "to", "fr", "lö"}, -- daysWide: []string{"söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"}, -- periodsAbbreviated: []string{"fm", "em"}, -- periodsNarrow: []string{"fm", "em"}, -- periodsWide: []string{"fm", "em"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.Kr.", "e.Kr."}, -- erasWide: []string{"före Kristus", "efter Kristus"}, -- timezones: map[string]string{"AWDT": "västaustralisk sommartid", "MESZ": "centraleuropeisk sommartid", "GYT": "Guyanatid", "UYST": "uruguayansk sommartid", "BT": "bhutansk tid", "MDT": "Macausommartid", "PDT": "västnordamerikansk sommartid", "WEZ": "västeuropeisk normaltid", "COT": "colombiansk normaltid", "HNCU": "kubansk normaltid", "WIT": "östindonesisk tid", "HEOG": "västgrönländsk sommartid", "NZDT": "nyzeeländsk sommartid", "∅∅∅": "Amazonas, sommartid", "HNEG": "östgrönländsk normaltid", "WAST": "västafrikansk sommartid", "HNPMX": "mexikansk stillahavstid, normaltid", "PST": "västnordamerikansk normaltid", "HEEG": "östgrönländsk sommartid", "ACDT": "centralaustralisk sommartid", "HNNOMX": "nordvästmexikansk normaltid", "HENOMX": "nordvästmexikansk sommartid", "CDT": "centralnordamerikansk sommartid", "MYT": "malaysisk tid", "VET": "venezuelansk tid", "AWST": "västaustralisk normaltid", "NZST": "nyzeeländsk normaltid", "JST": "japansk normaltid", "OESZ": "östeuropeisk sommartid", "EDT": "östnordamerikansk sommartid", "HNPM": "S:t Pierre och Miquelon, normaltid", "TMST": "turkmensk sommartid", "EAT": "östafrikansk tid", "ACWST": "västcentralaustralisk normaltid", "AEST": "östaustralisk normaltid", "COST": "colombiansk sommartid", "GMT": "Greenwichtid", "ACWDT": "västcentralaustralisk sommartid", "WITA": "centralindonesisk tid", "CLT": "chilensk normaltid", "GFT": "Franska Guyanatid", "HEPM": "S:t Pierre och Miquelon, sommartid", "CHADT": "Chatham, sommartid", "SGT": "Singaporetid", "EST": "östnordamerikansk normaltid", "ADT": "nordamerikansk atlantsommartid", "WIB": "västindonesisk tid", "HNOG": "västgrönländsk normaltid", "TMT": "turkmensk normaltid", "MST": "Macaunormaltid", "AKST": "Alaska, normaltid", "CST": "centralnordamerikansk normaltid", "HEPMX": "mexikansk stillahavstid, sommartid", "HKT": "Hongkong, normaltid", "CHAST": "Chatham, normaltid", "ECT": "ecuadoriansk tid", "CAT": "centralafrikansk tid", "WART": "västargentinsk normaltid", "HECU": "kubansk sommartid", "HAT": "Newfoundland, sommartid", "ART": "östargentinsk normaltid", "HKST": "Hongkong, sommartid", "LHST": "Lord Howe, normaltid", "CLST": "chilensk sommartid", "BOT": "boliviansk tid", "OEZ": "östeuropeisk normaltid", "AEDT": "östaustralisk sommartid", "MEZ": "centraleuropeisk normaltid", "WAT": "västafrikansk normaltid", "AST": "nordamerikansk atlantnormaltid", "JDT": "japansk sommartid", "AKDT": "Alaska, sommartid", "UYT": "uruguayansk normaltid", "WESZ": "västeuropeisk sommartid", "HAST": "Honolulu, normaltid", "HADT": "Honolulu, sommartid", "ARST": "östargentinsk sommartid", "ACST": "centralaustralisk normaltid", "WARST": "västargentinsk sommartid", "SRT": "Surinamtid", "HNT": "Newfoundland, normaltid", "LHDT": "Lord Howe, sommartid", "SAST": "sydafrikansk tid", "IST": "indisk tid", "ChST": "Chamorrotid"}, -+ locale: "sv_AX", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWDT": "ACWDT", "AKST": "AKST", "HKT": "HKT", "WART": "WART", "WARST": "WARST", "COT": "COT", "COST": "COST", "NZST": "NZST", "ADT": "ADT", "VET": "VET", "LHDT": "LHDT", "BT": "BT", "AEST": "AEST", "AKDT": "AKDT", "CST": "CST", "CDT": "CDT", "AWDT": "AWDT", "PST": "PST", "SGT": "SGT", "CLT": "CLT", "SRT": "SRT", "ACST": "ACST", "JST": "JST", "ACWST": "ACWST", "HNCU": "HNCU", "HAT": "HAT", "HKST": "HKST", "TMST": "TMST", "HADT": "HADT", "HEPM": "HEPM", "IST": "IST", "TMT": "TMT", "WITA": "WITA", "BOT": "BOT", "HNT": "HNT", "MDT": "MDT", "NZDT": "NZDT", "CHADT": "CHADT", "HNPMX": "HNPMX", "HEOG": "HEOG", "EDT": "EDT", "WIB": "WIB", "MESZ": "MESZ", "HEEG": "HEEG", "GFT": "GFT", "ECT": "ECT", "EAT": "EAT", "MEZ": "MEZ", "HEPMX": "HEPMX", "SAST": "SAST", "ACDT": "ACDT", "JDT": "JDT", "∅∅∅": "∅∅∅", "HAST": "HAST", "AWST": "AWST", "UYST": "UYST", "OEZ": "OEZ", "OESZ": "OESZ", "AST": "AST", "ChST": "ChST", "ART": "ART", "WESZ": "WESZ", "WAT": "WAT", "WIT": "WIT", "EST": "EST", "MYT": "MYT", "PDT": "PDT", "WEZ": "WEZ", "MST": "MST", "LHST": "LHST", "GMT": "GMT", "ARST": "ARST", "WAST": "WAST", "GYT": "GYT", "CLST": "CLST", "HNNOMX": "HNNOMX", "CHAST": "CHAST", "UYT": "UYT", "AEDT": "AEDT", "HECU": "HECU", "HNOG": "HNOG", "CAT": "CAT", "HNEG": "HNEG", "HENOMX": "HENOMX", "HNPM": "HNPM"}, - } - } -  -@@ -136,7 +111,7 @@ func (sv *sv_AX) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sv *sv_AX) MonthsAbbreviated() []string { -- return sv.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +121,7 @@ func (sv *sv_AX) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sv *sv_AX) MonthsNarrow() []string { -- return sv.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +131,7 @@ func (sv *sv_AX) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sv *sv_AX) MonthsWide() []string { -- return sv.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,81 +177,13 @@ func (sv *sv_AX) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sv_AX' and handles both Whole and Real numbers based on 'v' - func (sv *sv_AX) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sv_AX' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sv *sv_AX) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sv.percentSuffix...) -- -- b = append(b, sv.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sv_AX' -@@ -284,60 +191,7 @@ func (sv *sv_AX) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sv.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sv.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sv_AX' -@@ -346,67 +200,7 @@ func (sv *sv_AX) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sv.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sv.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sv.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sv_AX' -@@ -414,28 +208,6 @@ func (sv *sv_AX) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -444,17 +216,6 @@ func (sv *sv_AX) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,17 +224,6 @@ func (sv *sv_AX) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,19 +232,6 @@ func (sv *sv_AX) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sv.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -503,19 +240,6 @@ func (sv *sv_AX) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -524,26 +248,6 @@ func (sv *sv_AX) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -552,30 +256,6 @@ func (sv *sv_AX) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -584,37 +264,5 @@ func (sv *sv_AX) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x6b, 0x6c}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sv.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sv_FI/sv_FI.go b/sv_FI/sv_FI.go -index 0bc272f..0f548bf 100644 ---- a/sv_FI/sv_FI.go -+++ b/sv_FI/sv_FI.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sv_FI struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sv_FI' locale - func New() locales.Translator { - return &sv_FI{ -- locale: "sv_FI", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mars", "apr.", "maj", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"sön", "mån", "tis", "ons", "tors", "fre", "lör"}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sö", "må", "ti", "on", "to", "fr", "lö"}, -- daysWide: []string{"söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"}, -- periodsAbbreviated: []string{"fm", "em"}, -- periodsNarrow: []string{"fm", "em"}, -- periodsWide: []string{"fm", "em"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.Kr.", "e.Kr."}, -- erasWide: []string{"före Kristus", "efter Kristus"}, -- timezones: map[string]string{"TMT": "turkmensk normaltid", "COST": "colombiansk sommartid", "HEPMX": "mexikansk stillahavstid, sommartid", "CLST": "chilensk sommartid", "GFT": "Franska Guyanatid", "ACDT": "centralaustralisk sommartid", "HNNOMX": "nordvästmexikansk normaltid", "HECU": "kubansk sommartid", "EDT": "östnordamerikansk sommartid", "AKDT": "Alaska, sommartid", "HAT": "Newfoundland, sommartid", "ChST": "Chamorrotid", "SGT": "Singaporetid", "PDT": "västnordamerikansk sommartid", "ARST": "östargentinsk sommartid", "AEDT": "östaustralisk sommartid", "HKT": "Hongkong, normaltid", "TMST": "turkmensk sommartid", "WARST": "västargentinsk sommartid", "AKST": "Alaska, normaltid", "SRT": "Surinamtid", "HNPM": "S:t Pierre och Miquelon, normaltid", "GMT": "Greenwichtid", "PST": "västnordamerikansk normaltid", "IST": "indisk tid", "ACWST": "västcentralaustralisk normaltid", "NZST": "nyzeeländsk normaltid", "∅∅∅": "Amazonas, sommartid", "WART": "västargentinsk normaltid", "HNCU": "kubansk normaltid", "MST": "Macaunormaltid", "AEST": "östaustralisk normaltid", "AWST": "västaustralisk normaltid", "LHST": "Lord Howe, normaltid", "CLT": "chilensk normaltid", "JST": "japansk normaltid", "ECT": "ecuadoriansk tid", "ADT": "nordamerikansk atlantsommartid", "HADT": "Honolulu, sommartid", "WESZ": "västeuropeisk sommartid", "NZDT": "nyzeeländsk sommartid", "CHAST": "Chatham, normaltid", "HNEG": "östgrönländsk normaltid", "ACST": "centralaustralisk normaltid", "MDT": "Macausommartid", "MYT": "malaysisk tid", "EAT": "östafrikansk tid", "WAT": "västafrikansk normaltid", "HKST": "Hongkong, sommartid", "HNOG": "västgrönländsk normaltid", "HEPM": "S:t Pierre och Miquelon, sommartid", "LHDT": "Lord Howe, sommartid", "HNPMX": "mexikansk stillahavstid, normaltid", "UYT": "uruguayansk normaltid", "GYT": "Guyanatid", "HNT": "Newfoundland, normaltid", "JDT": "japansk sommartid", "OESZ": "östeuropeisk sommartid", "CDT": "centralnordamerikansk sommartid", "WIT": "östindonesisk tid", "BT": "bhutansk tid", "ACWDT": "västcentralaustralisk sommartid", "CHADT": "Chatham, sommartid", "HEEG": "östgrönländsk sommartid", "EST": "östnordamerikansk normaltid", "HAST": "Honolulu, normaltid", "VET": "venezuelansk tid", "SAST": "sydafrikansk tid", "WITA": "centralindonesisk tid", "COT": "colombiansk normaltid", "WIB": "västindonesisk tid", "WEZ": "västeuropeisk normaltid", "HEOG": "västgrönländsk sommartid", "AST": "nordamerikansk atlantnormaltid", "ART": "östargentinsk normaltid", "OEZ": "östeuropeisk normaltid", "HENOMX": "nordvästmexikansk sommartid", "UYST": "uruguayansk sommartid", "CST": "centralnordamerikansk normaltid", "MEZ": "centraleuropeisk normaltid", "MESZ": "centraleuropeisk sommartid", "BOT": "boliviansk tid", "CAT": "centralafrikansk tid", "WAST": "västafrikansk sommartid", "AWDT": "västaustralisk sommartid"}, -+ locale: "sv_FI", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AEDT": "AEDT", "VET": "VET", "OESZ": "OESZ", "GFT": "GFT", "ECT": "ECT", "AWST": "AWST", "HADT": "HADT", "HNEG": "HNEG", "UYST": "UYST", "BT": "BT", "WIT": "WIT", "HKST": "HKST", "ARST": "ARST", "WARST": "WARST", "LHST": "LHST", "HNCU": "HNCU", "ADT": "ADT", "SRT": "SRT", "ACDT": "ACDT", "HEPMX": "HEPMX", "COT": "COT", "CST": "CST", "CLST": "CLST", "WIB": "WIB", "AWDT": "AWDT", "UYT": "UYT", "COST": "COST", "CAT": "CAT", "MESZ": "MESZ", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "SGT": "SGT", "OEZ": "OEZ", "EDT": "EDT", "NZST": "NZST", "ART": "ART", "PST": "PST", "HECU": "HECU", "WART": "WART", "AST": "AST", "ChST": "ChST", "ACWST": "ACWST", "ACWDT": "ACWDT", "WAT": "WAT", "WAST": "WAST", "AKDT": "AKDT", "∅∅∅": "∅∅∅", "JDT": "JDT", "WITA": "WITA", "HNPM": "HNPM", "HEPM": "HEPM", "HNPMX": "HNPMX", "GYT": "GYT", "HEOG": "HEOG", "WEZ": "WEZ", "WESZ": "WESZ", "LHDT": "LHDT", "JST": "JST", "AEST": "AEST", "AKST": "AKST", "HKT": "HKT", "TMT": "TMT", "ACST": "ACST", "TMST": "TMST", "MST": "MST", "SAST": "SAST", "PDT": "PDT", "BOT": "BOT", "HAST": "HAST", "MEZ": "MEZ", "CHAST": "CHAST", "HNOG": "HNOG", "EST": "EST", "GMT": "GMT", "EAT": "EAT", "IST": "IST", "HNT": "HNT", "MDT": "MDT", "NZDT": "NZDT", "HENOMX": "HENOMX", "MYT": "MYT", "HAT": "HAT", "CLT": "CLT", "CDT": "CDT"}, - } - } -  -@@ -114,8 +89,8 @@ func (sv *sv_FI) CardinalPluralRule(num float64, v uint64) locales.PluralRule { - func (sv *sv_FI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) -- nMod10 := math.Mod(n, 10) - nMod100 := math.Mod(n, 100) -+ nMod10 := math.Mod(n, 10) -  - if (nMod10 == 1 || nMod10 == 2) && (nMod100 != 11 && nMod100 != 12) { - return locales.PluralRuleOne -@@ -136,7 +111,7 @@ func (sv *sv_FI) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sv *sv_FI) MonthsAbbreviated() []string { -- return sv.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +121,7 @@ func (sv *sv_FI) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sv *sv_FI) MonthsNarrow() []string { -- return sv.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +131,7 @@ func (sv *sv_FI) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sv *sv_FI) MonthsWide() []string { -- return sv.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,81 +177,13 @@ func (sv *sv_FI) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sv_FI' and handles both Whole and Real numbers based on 'v' - func (sv *sv_FI) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sv_FI' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sv *sv_FI) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sv.percentSuffix...) -- -- b = append(b, sv.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sv_FI' -@@ -284,60 +191,7 @@ func (sv *sv_FI) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sv.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sv.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sv_FI' -@@ -346,67 +200,7 @@ func (sv *sv_FI) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sv.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sv.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sv.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sv_FI' -@@ -443,17 +237,6 @@ func (sv *sv_FI) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -462,17 +245,6 @@ func (sv *sv_FI) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -481,19 +253,6 @@ func (sv *sv_FI) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sv.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -502,19 +261,6 @@ func (sv *sv_FI) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -523,26 +269,6 @@ func (sv *sv_FI) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -551,30 +277,6 @@ func (sv *sv_FI) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -583,37 +285,5 @@ func (sv *sv_FI) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x6b, 0x6c}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sv.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sv_SE/sv_SE.go b/sv_SE/sv_SE.go -index 4a957bf..4dc1efa 100644 ---- a/sv_SE/sv_SE.go -+++ b/sv_SE/sv_SE.go -@@ -10,70 +10,45 @@ import ( - ) -  - type sv_SE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sv_SE' locale - func New() locales.Translator { - return &sv_SE{ -- locale: "sv_SE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: " ", -- minus: "−", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "jan.", "feb.", "mars", "apr.", "maj", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "dec."}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"}, -- daysAbbreviated: []string{"sön", "mån", "tis", "ons", "tors", "fre", "lör"}, -- daysNarrow: []string{"S", "M", "T", "O", "T", "F", "L"}, -- daysShort: []string{"sö", "må", "ti", "on", "to", "fr", "lö"}, -- daysWide: []string{"söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"}, -- periodsAbbreviated: []string{"fm", "em"}, -- periodsNarrow: []string{"fm", "em"}, -- periodsWide: []string{"fm", "em"}, -- erasAbbreviated: []string{"f.Kr.", "e.Kr."}, -- erasNarrow: []string{"f.Kr.", "e.Kr."}, -- erasWide: []string{"före Kristus", "efter Kristus"}, -- timezones: map[string]string{"ACDT": "centralaustralisk sommartid", "HAT": "Newfoundland, sommartid", "PST": "västnordamerikansk normaltid", "SAST": "sydafrikansk tid", "CLT": "chilensk normaltid", "ACWST": "västcentralaustralisk normaltid", "ART": "östargentinsk normaltid", "ARST": "östargentinsk sommartid", "HKST": "Hongkong, sommartid", "AEDT": "östaustralisk sommartid", "BOT": "boliviansk tid", "WAT": "västafrikansk normaltid", "BT": "bhutansk tid", "WESZ": "västeuropeisk sommartid", "EST": "östnordamerikansk normaltid", "HKT": "Hongkong, normaltid", "LHDT": "Lord Howe, sommartid", "GFT": "Franska Guyanatid", "SGT": "Singaporetid", "GMT": "Greenwichtid", "MST": "Macaunormaltid", "HAST": "Honolulu, normaltid", "HNOG": "västgrönländsk normaltid", "WAST": "västafrikansk sommartid", "HNCU": "kubansk normaltid", "AWST": "västaustralisk normaltid", "EDT": "östnordamerikansk sommartid", "MYT": "malaysisk tid", "EAT": "östafrikansk tid", "HNNOMX": "nordvästmexikansk normaltid", "MDT": "Macausommartid", "WIB": "västindonesisk tid", "LHST": "Lord Howe, normaltid", "∅∅∅": "Amazonas, sommartid", "HEEG": "östgrönländsk sommartid", "OESZ": "östeuropeisk sommartid", "AKST": "Alaska, normaltid", "CLST": "chilensk sommartid", "ChST": "Chamorrotid", "ECT": "ecuadoriansk tid", "UYT": "uruguayansk normaltid", "AWDT": "västaustralisk sommartid", "CHAST": "Chatham, normaltid", "IST": "indisk tid", "ACST": "centralaustralisk normaltid", "WIT": "östindonesisk tid", "WEZ": "västeuropeisk normaltid", "ACWDT": "västcentralaustralisk sommartid", "HNPM": "S:t Pierre och Miquelon, normaltid", "COST": "colombiansk sommartid", "HECU": "kubansk sommartid", "CST": "centralnordamerikansk normaltid", "NZDT": "nyzeeländsk sommartid", "MESZ": "centraleuropeisk sommartid", "JDT": "japansk sommartid", "OEZ": "östeuropeisk normaltid", "AST": "nordamerikansk atlantnormaltid", "ADT": "nordamerikansk atlantsommartid", "WITA": "centralindonesisk tid", "NZST": "nyzeeländsk normaltid", "CAT": "centralafrikansk tid", "WARST": "västargentinsk sommartid", "UYST": "uruguayansk sommartid", "HNT": "Newfoundland, normaltid", "JST": "japansk normaltid", "HNEG": "östgrönländsk normaltid", "HADT": "Honolulu, sommartid", "AEST": "östaustralisk normaltid", "HEPM": "S:t Pierre och Miquelon, sommartid", "TMT": "turkmensk normaltid", "VET": "venezuelansk tid", "HNPMX": "mexikansk stillahavstid, normaltid", "AKDT": "Alaska, sommartid", "GYT": "Guyanatid", "PDT": "västnordamerikansk sommartid", "CHADT": "Chatham, sommartid", "MEZ": "centraleuropeisk normaltid", "TMST": "turkmensk sommartid", "COT": "colombiansk normaltid", "HEPMX": "mexikansk stillahavstid, sommartid", "CDT": "centralnordamerikansk sommartid", "SRT": "Surinamtid", "HEOG": "västgrönländsk sommartid", "HENOMX": "nordvästmexikansk sommartid", "WART": "västargentinsk normaltid"}, -+ locale: "sv_SE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "NZST": "NZST", "WART": "WART", "ACWST": "ACWST", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "LHDT": "LHDT", "PST": "PST", "HNT": "HNT", "GYT": "GYT", "COT": "COT", "WARST": "WARST", "CDT": "CDT", "MDT": "MDT", "ECT": "ECT", "SRT": "SRT", "HAST": "HAST", "AEST": "AEST", "WEZ": "WEZ", "EDT": "EDT", "CLST": "CLST", "AWDT": "AWDT", "MYT": "MYT", "JST": "JST", "AKST": "AKST", "HKST": "HKST", "CST": "CST", "NZDT": "NZDT", "HEPM": "HEPM", "IST": "IST", "OEZ": "OEZ", "SAST": "SAST", "MESZ": "MESZ", "SGT": "SGT", "GFT": "GFT", "TMST": "TMST", "MEZ": "MEZ", "JDT": "JDT", "PDT": "PDT", "ACWDT": "ACWDT", "ART": "ART", "HNEG": "HNEG", "HNPM": "HNPM", "AEDT": "AEDT", "HKT": "HKT", "TMT": "TMT", "BOT": "BOT", "HADT": "HADT", "WIT": "WIT", "EST": "EST", "CAT": "CAT", "CLT": "CLT", "∅∅∅": "∅∅∅", "ACDT": "ACDT", "AST": "AST", "UYT": "UYT", "HECU": "HECU", "HNPMX": "HNPMX", "WAT": "WAT", "AKDT": "AKDT", "LHST": "LHST", "WESZ": "WESZ", "VET": "VET", "WAST": "WAST", "HNOG": "HNOG", "WIB": "WIB", "ARST": "ARST", "ACST": "ACST", "CHAST": "CHAST", "CHADT": "CHADT", "HNCU": "HNCU", "HEOG": "HEOG", "BT": "BT", "MST": "MST", "ADT": "ADT", "GMT": "GMT", "ChST": "ChST", "EAT": "EAT", "HEEG": "HEEG", "AWST": "AWST", "COST": "COST", "UYST": "UYST", "HEPMX": "HEPMX", "HAT": "HAT"}, - } - } -  -@@ -136,7 +111,7 @@ func (sv *sv_SE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sv *sv_SE) MonthsAbbreviated() []string { -- return sv.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +121,7 @@ func (sv *sv_SE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sv *sv_SE) MonthsNarrow() []string { -- return sv.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +131,7 @@ func (sv *sv_SE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sv *sv_SE) MonthsWide() []string { -- return sv.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,81 +177,13 @@ func (sv *sv_SE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sv_SE' and handles both Whole and Real numbers based on 'v' - func (sv *sv_SE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sv_SE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sv *sv_SE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 7 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sv.percentSuffix...) -- -- b = append(b, sv.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sv_SE' -@@ -284,60 +191,7 @@ func (sv *sv_SE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sv.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, sv.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sv_SE' -@@ -346,67 +200,7 @@ func (sv *sv_SE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sv.currencies[currency] -- l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sv.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(sv.group) - 1; j >= 0; j-- { -- b = append(b, sv.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(sv.minus) - 1; j >= 0; j-- { -- b = append(b, sv.minus[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sv.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sv.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, sv.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sv_SE' -@@ -414,28 +208,6 @@ func (sv *sv_SE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -444,17 +216,6 @@ func (sv *sv_SE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -463,17 +224,6 @@ func (sv *sv_SE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -482,19 +232,6 @@ func (sv *sv_SE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sv.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sv.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -503,19 +240,6 @@ func (sv *sv_SE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -524,26 +248,6 @@ func (sv *sv_SE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -552,30 +256,6 @@ func (sv *sv_SE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -584,37 +264,5 @@ func (sv *sv_SE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, []byte{0x6b, 0x6c}...) -- b = append(b, []byte{0x2e, 0x20}...) -- -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sv.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sv.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sw/sw.go b/sw/sw.go -index d487ee3..9b1c10f 100644 ---- a/sw/sw.go -+++ b/sw/sw.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"HECU": "Saa za Mchana za Cuba", "MDT": "MDT", "MEZ": "Saa Wastani za Ulaya ya kati", "LHDT": "Saa za Mchana za Lord Howe", "OEZ": "Saa Wastani za Mashariki mwa Ulaya", "HKT": "Saa Wastani za Hong Kong", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "HEPMX": "Saa za mchana za pasifiki za Mexico", "AKST": "Saa za Wastani za Alaska", "GYT": "Saa za Guyana", "MYT": "Saa za Malaysia", "PST": "Saa za Wastani za Pasifiki", "HNOG": "Saa za Wastani za Greenland Magharibi", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "∅∅∅": "Saa za Majira ya joto za Peru", "NZDT": "Saa za Mchana za New Zealand", "CLT": "Saa za Wastani za Chile", "TMST": "Saa za Majira ya joto za Turkmenistan", "ACST": "Saa Wastani za Australia ya Kati", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "HENOMX": "Saa za mchana za Mexico Kaskazini Magharibi", "MST": "MST", "VET": "Saa za Venezuela", "ACWDT": "Saa za Mchana za Magharibi ya Kati ya Australia", "HNT": "Saa za Wastani za Newfoundland", "AWDT": "Saa za Mchana za Australia Magharibi", "HNEG": "Saa za Wastani za Greenland Mashariki", "WARST": "Saa za Majira ya joto za Magharibi mwa Argentina", "EDT": "Saa za Mchana za Mashariki", "NZST": "Saa Wastani za New Zealand", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "COST": "Saa za Majira ya joto za Colombia", "GMT": "Saa za Greenwich", "HADT": "Saa za Mchana za Hawaii-Aleutian", "WITA": "Saa za Indonesia ya Kati", "CHAST": "Saa Wastani za Chatham", "JST": "Saa Wastani za Japan", "COT": "Saa za Wastani za Colombia", "UYT": "Saa za Wastani za Uruguay", "SRT": "Saa za Suriname", "SAST": "Saa Wastani za Afrika Kusini", "JDT": "Saa za Mchana za Japan", "ADT": "Saa za Mchana za Atlantiki", "ART": "Saa za Wastani za Argentina", "AEST": "Saa Wastani za Mashariki mwa Australia", "CHADT": "Saa za Mchana za Chatham", "CLST": "Saa za Majira ya joto za Chile", "UYST": "Saa za Majira ya joto za Uruguay", "WEZ": "Saa Wastani za Magharibi mwa Ulaya", "ARST": "Saa za Majira ya joto za Argentina", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "HNPMX": "Saa za wastani za pasifiki za Mexico", "ACWST": "Saa Wastani za Magharibi ya Kati ya Australia", "ChST": "Saa Wastani za Chamorro", "ECT": "Saa za Ecuador", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "WAT": "Saa za Wastani za Afrika Magharibi", "SGT": "Saa Wastani za Singapore", "EST": "Saa za Wastani za Mashariki", "WIB": "Saa za Magharibi mwa Indonesia", "HAT": "Saa za Mchana za Newfoundland", "ACDT": "Saa za Mchana za Australia ya Kati", "CAT": "Saa za Afrika ya Kati", "AKDT": "Saa za Mchana za Alaska", "WART": "Saa Wastani za Magharibi mwa Argentina", "HNCU": "Saa za Wastani ya Cuba", "PDT": "Saa za Mchana za Pasifiki", "AWST": "Saa Wastani za Australia Magharibi", "LHST": "Saa Wastani za Lord Howe", "EAT": "Saa za Afrika Mashariki", "CST": "Saa za Wastani za Kati", "HAST": "Saa za Wastani za Hawaii-Aleutian", "WIT": "Saa za Mashariki mwa Indonesia", "BT": "Saa za Bhutan", "HKST": "Saa za Majira ya joto za Hong Kong", "IST": "Saa Wastani za India", "BOT": "Saa za Bolivia", "HNNOMX": "Saa Wastani za Mexico Kaskazini Magharibi", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "AST": "Saa za Wastani za Atlantiki", "GFT": "Saa za Guiana ya Ufaransa", "TMT": "Saa za Wastani za Turkmenistan", "CDT": "Saa za Mchana za Kati"}, -+ timezones: map[string]string{"AST": "Saa za Wastani za Atlantiki", "MDT": "Saa za Mchana za Mountain", "UYST": "Saa za Majira ya joto za Uruguay", "CLT": "Saa za Wastani za Chile", "ECT": "Saa za Ecuador", "HAST": "Saa za Wastani za Hawaii-Aleutian", "AEST": "Saa Wastani za Mashariki mwa Australia", "HKST": "Saa za Majira ya joto za Hong Kong", "GFT": "Saa za Guiana ya Ufaransa", "SAST": "Saa Wastani za Afrika Kusini", "CDT": "Saa za Mchana za Kati", "ACWDT": "Saa za Mchana za Magharibi ya Kati ya Australia", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "SGT": "Saa Wastani za Singapore", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "WARST": "Saa za Majira ya joto za Magharibi mwa Argentina", "BOT": "Saa za Bolivia", "HADT": "Saa za Mchana za Hawaii-Aleutian", "AWDT": "Saa za Mchana za Australia Magharibi", "HNCU": "Saa za Wastani ya Cuba", "WIB": "Saa za Magharibi mwa Indonesia", "IST": "Saa Wastani za India", "GYT": "Saa za Guyana", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "TMST": "Saa za Majira ya joto za Turkmenistan", "ART": "Saa za Wastani za Argentina", "MEZ": "Saa Wastani za Ulaya ya kati", "ACDT": "Saa za Mchana za Australia ya Kati", "UYT": "Saa za Wastani za Uruguay", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "COST": "Saa za Majira ya joto za Colombia", "EDT": "Saa za Mchana za Mashariki", "CST": "Saa za Wastani za Kati", "GMT": "Saa za Greenwich", "ACWST": "Saa Wastani za Magharibi ya Kati ya Australia", "VET": "Saa za Venezuela", "WAT": "Saa za Wastani za Afrika Magharibi", "WART": "Saa Wastani za Magharibi mwa Argentina", "NZDT": "Saa za Mchana za New Zealand", "ADT": "Saa za Mchana za Atlantiki", "HENOMX": "Saa za mchana za Mexico Kaskazini Magharibi", "JDT": "Saa za Mchana za Japan", "CHAST": "Saa Wastani za Chatham", "JST": "Saa Wastani za Japan", "PDT": "Saa za Mchana za Pasifiki", "HNPMX": "Saa za wastani za pasifiki za Mexico", "AKDT": "Saa za Mchana za Alaska", "OEZ": "Saa Wastani za Mashariki mwa Ulaya", "MST": "Saa za Wastani za Mountain", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "MYT": "Saa za Malaysia", "HNT": "Saa za Wastani za Newfoundland", "HNOG": "Saa za Wastani za Greenland Magharibi", "TMT": "Saa za Wastani za Turkmenistan", "AKST": "Saa za Wastani za Alaska", "EST": "Saa za Wastani za Mashariki", "NZST": "Saa Wastani za New Zealand", "COT": "Saa za Wastani za Colombia", "WITA": "Saa za Indonesia ya Kati", "CAT": "Saa za Afrika ya Kati", "ChST": "Saa Wastani za Chamorro", "WEZ": "Saa Wastani za Magharibi mwa Ulaya", "HECU": "Saa za Mchana za Cuba", "WIT": "Saa za Mashariki mwa Indonesia", "SRT": "Saa za Suriname", "BT": "Saa za Bhutan", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "HNNOMX": "Saa Wastani za Mexico Kaskazini Magharibi", "LHST": "Saa Wastani za Lord Howe", "HAT": "Saa za Mchana za Newfoundland", "ARST": "Saa za Majira ya joto za Argentina", "EAT": "Saa za Afrika Mashariki", "ACST": "Saa Wastani za Australia ya Kati", "HNEG": "Saa za Wastani za Greenland Mashariki", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "CLST": "Saa za Majira ya joto za Chile", "LHDT": "Saa za Mchana za Lord Howe", "CHADT": "Saa za Mchana za Chatham", "∅∅∅": "∅∅∅", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "HEPMX": "Saa za mchana za pasifiki za Mexico", "HKT": "Saa Wastani za Hong Kong", "AWST": "Saa Wastani za Australia Magharibi", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "PST": "Saa za Wastani za Pasifiki"}, - } - } -  -diff --git a/sw_CD/sw_CD.go b/sw_CD/sw_CD.go -index b1383b4..5e221d8 100644 ---- a/sw_CD/sw_CD.go -+++ b/sw_CD/sw_CD.go -@@ -10,68 +10,47 @@ import ( - ) -  - type sw_CD struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sw_CD' locale - func New() locales.Translator { - return &sw_CD{ -- locale: "sw_CD", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "FC", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysWide: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"Asubuhi", "Mchana"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"HKST": "Saa za Majira ya joto za Hong Kong", "ChST": "Saa Wastani za Chamorro", "ACST": "Saa Wastani za Australia ya Kati", "EAT": "Saa za Afrika Mashariki", "HNCU": "Saa za Wastani ya Cuba", "EST": "Saa za Wastani za Mashariki", "UYT": "Saa za Wastani za Uruguay", "SAST": "Saa Wastani za Afrika Kusini", "IST": "Saa Wastani za India", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "HNNOMX": "Saa Wastani za Mexico Kaskazini Magharibi", "HEPMX": "Saa za mchana za pasifiki za Mexico", "HAT": "Saa za Mchana za Newfoundland", "LHDT": "Saa za Mchana za Lord Howe", "GFT": "Saa za Guiana ya Ufaransa", "ECT": "Saa za Ecuador", "GMT": "Saa za Greenwich", "SGT": "Saa Wastani za Singapore", "MDT": "MDT", "HNEG": "Saa za Wastani za Greenland Mashariki", "MST": "MST", "CST": "Saa za Wastani za Kati", "ACWST": "Saa Wastani za Magharibi ya Kati ya Australia", "TMST": "Saa za Majira ya joto za Turkmenistan", "AKST": "Saa za Wastani za Alaska", "WIB": "Saa za Magharibi mwa Indonesia", "HAST": "Saa za Wastani za Hawaii-Aleutian", "ACWDT": "Saa za Mchana za Magharibi ya Kati ya Australia", "MEZ": "Saa Wastani za Ulaya ya kati", "OEZ": "Saa Wastani za Mashariki mwa Ulaya", "PST": "Saa za Wastani za Pasifiki", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "ACDT": "Saa za Mchana za Australia ya Kati", "WARST": "Saa za Majira ya joto za Magharibi mwa Argentina", "HNPMX": "Saa za wastani za pasifiki za Mexico", "CLT": "Saa za Wastani za Chile", "HKT": "Saa Wastani za Hong Kong", "AWST": "Saa Wastani za Australia Magharibi", "AWDT": "Saa za Mchana za Australia Magharibi", "CAT": "Saa za Afrika ya Kati", "HENOMX": "Saa za mchana za Mexico Kaskazini Magharibi", "CDT": "Saa za Mchana za Kati", "ADT": "Saa za Mchana za Atlantiki", "ART": "Saa za Wastani za Argentina", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "PDT": "Saa za Mchana za Pasifiki", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "LHST": "Saa Wastani za Lord Howe", "AST": "Saa za Wastani za Atlantiki", "UYST": "Saa za Majira ya joto za Uruguay", "VET": "Saa za Venezuela", "BT": "Saa za Bhutan", "HNT": "Saa za Wastani za Newfoundland", "HECU": "Saa za Mchana za Cuba", "JDT": "Saa za Mchana za Japan", "TMT": "Saa za Wastani za Turkmenistan", "BOT": "Saa za Bolivia", "AKDT": "Saa za Mchana za Alaska", "HADT": "Saa za Mchana za Hawaii-Aleutian", "CLST": "Saa za Majira ya joto za Chile", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "WAT": "Saa za Wastani za Afrika Magharibi", "COT": "Saa za Wastani za Colombia", "ARST": "Saa za Majira ya joto za Argentina", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "CHAST": "Saa Wastani za Chatham", "WART": "Saa Wastani za Magharibi mwa Argentina", "EDT": "Saa za Mchana za Mashariki", "GYT": "Saa za Guyana", "AEST": "Saa Wastani za Mashariki mwa Australia", "NZDT": "Saa za Mchana za New Zealand", "SRT": "Saa za Suriname", "HNOG": "Saa za Wastani za Greenland Magharibi", "WITA": "Saa za Indonesia ya Kati", "NZST": "Saa Wastani za New Zealand", "CHADT": "Saa za Mchana za Chatham", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "∅∅∅": "Saa za Majira ya joto za Peru", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "COST": "Saa za Majira ya joto za Colombia", "MYT": "Saa za Malaysia", "WIT": "Saa za Mashariki mwa Indonesia", "WEZ": "Saa Wastani za Magharibi mwa Ulaya", "JST": "Saa Wastani za Japan"}, -+ locale: "sw_CD", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ decimal: ",", -+ group: ".", -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "FC", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"OESZ": "OESZ", "WARST": "WARST", "HKT": "HKT", "UYST": "UYST", "HNPM": "HNPM", "HEPM": "HEPM", "JDT": "JDT", "SGT": "SGT", "WIT": "WIT", "HAT": "HAT", "EDT": "EDT", "CST": "CST", "ACDT": "ACDT", "CHAST": "CHAST", "UYT": "UYT", "HEPMX": "HEPMX", "AKST": "AKST", "CLT": "CLT", "MDT": "MDT", "ART": "ART", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "MST": "MST", "ACST": "ACST", "HEEG": "HEEG", "JST": "JST", "AEDT": "AEDT", "WAST": "WAST", "GFT": "GFT", "WART": "WART", "TMT": "TMT", "HECU": "HECU", "NZST": "NZST", "ChST": "ChST", "SRT": "SRT", "BT": "BT", "HAST": "HAST", "GYT": "GYT", "EST": "EST", "HADT": "HADT", "HNT": "HNT", "COST": "COST", "WITA": "WITA", "ACWST": "ACWST", "ACWDT": "ACWDT", "CHADT": "CHADT", "SAST": "SAST", "WIB": "WIB", "AST": "AST", "LHDT": "LHDT", "MYT": "MYT", "AWST": "AWST", "HNOG": "HNOG", "TMST": "TMST", "CAT": "CAT", "MEZ": "MEZ", "HENOMX": "HENOMX", "AWDT": "AWDT", "VET": "VET", "CLST": "CLST", "ARST": "ARST", "ADT": "ADT", "EAT": "EAT", "PST": "PST", "WEZ": "WEZ", "AKDT": "AKDT", "WAT": "WAT", "ECT": "ECT", "CDT": "CDT", "AEST": "AEST", "IST": "IST", "HNCU": "HNCU", "HEOG": "HEOG", "NZDT": "NZDT", "BOT": "BOT", "HNNOMX": "HNNOMX", "OEZ": "OEZ", "LHST": "LHST", "PDT": "PDT", "HNPMX": "HNPMX", "MESZ": "MESZ", "COT": "COT", "HKST": "HKST", "GMT": "GMT", "HNEG": "HNEG"}, - } - } -  -@@ -136,7 +115,7 @@ func (sw *sw_CD) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sw *sw_CD) MonthsAbbreviated() []string { -- return sw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +125,7 @@ func (sw *sw_CD) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sw *sw_CD) MonthsNarrow() []string { -- return sw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +135,7 @@ func (sw *sw_CD) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sw *sw_CD) MonthsWide() []string { -- return sw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,73 +181,13 @@ func (sw *sw_CD) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sw_CD' and handles both Whole and Real numbers based on 'v' - func (sw *sw_CD) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sw_CD' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sw *sw_CD) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sw_CD' -@@ -276,56 +195,7 @@ func (sw *sw_CD) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sw_CD' -@@ -334,68 +204,7 @@ func (sw *sw_CD) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, sw.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sw.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sw_CD' -@@ -403,27 +212,6 @@ func (sw *sw_CD) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,17 +220,6 @@ func (sw *sw_CD) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +228,6 @@ func (sw *sw_CD) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +236,6 @@ func (sw *sw_CD) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +244,6 @@ func (sw *sw_CD) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +252,6 @@ func (sw *sw_CD) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,30 +260,6 @@ func (sw *sw_CD) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -572,34 +268,5 @@ func (sw *sw_CD) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sw_KE/sw_KE.go b/sw_KE/sw_KE.go -index 3cbebd4..d75e025 100644 ---- a/sw_KE/sw_KE.go -+++ b/sw_KE/sw_KE.go -@@ -10,68 +10,47 @@ import ( - ) -  - type sw_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sw_KE' locale - func New() locales.Translator { - return &sw_KE{ -- locale: "sw_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysWide: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"WIB": "Saa za Magharibi mwa Indonesia", "WITA": "Saa za Indonesia ya Kati", "CHADT": "Saa za Mchana za Chatham", "NZST": "Saa Wastani za New Zealand", "WARST": "Saa za Majira ya joto za Magharibi mwa Argentina", "HNNOMX": "Saa Wastani za Mexico Kaskazini Magharibi", "WEZ": "Saa Wastani za Magharibi mwa Ulaya", "AWST": "Saa Wastani za Australia Magharibi", "HKST": "Saa za Majira ya joto za Hong Kong", "HNEG": "Saa za Wastani za Greenland Mashariki", "WART": "Saa Wastani za Magharibi mwa Argentina", "SGT": "Saa Wastani za Singapore", "CHAST": "Saa Wastani za Chatham", "CLT": "Saa za Wastani za Chile", "HNCU": "Saa za Wastani ya Cuba", "BT": "Saa za Bhutan", "HNT": "Saa za Wastani za Newfoundland", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "NZDT": "Saa za Mchana za New Zealand", "BOT": "Saa za Bolivia", "HEPMX": "Saa za mchana za pasifiki za Mexico", "EST": "Saa za Wastani za Mashariki", "WIT": "Saa za Mashariki mwa Indonesia", "ART": "Saa za Wastani za Argentina", "ARST": "Saa za Majira ya joto za Argentina", "CLST": "Saa za Majira ya joto za Chile", "CAT": "Saa za Afrika ya Kati", "EAT": "Saa za Afrika Mashariki", "COST": "Saa za Majira ya joto za Colombia", "UYT": "Saa za Wastani za Uruguay", "HAST": "Saa za Wastani za Hawaii-Aleutian", "MEZ": "Saa Wastani za Ulaya ya kati", "IST": "Saa Wastani za India", "UYST": "Saa za Majira ya joto za Uruguay", "AKDT": "Saa za Mchana za Alaska", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "LHST": "Saa Wastani za Lord Howe", "LHDT": "Saa za Mchana za Lord Howe", "CST": "Saa za Wastani za Kati", "HADT": "Saa za Mchana za Hawaii-Aleutian", "PDT": "Saa za Mchana za Pasifiki", "AWDT": "Saa za Mchana za Australia Magharibi", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "ACDT": "Saa za Mchana za Australia ya Kati", "OEZ": "Saa Wastani za Mashariki mwa Ulaya", "EDT": "Saa za Mchana za Mashariki", "MST": "Saa za Wastani za Mountain", "COT": "Saa za Wastani za Colombia", "GMT": "Saa za Greenwich", "SRT": "Saa za Suriname", "SAST": "Saa Wastani za Afrika Kusini", "TMT": "Saa za Wastani za Turkmenistan", "TMST": "Saa za Majira ya joto za Turkmenistan", "VET": "Saa za Venezuela", "HAT": "Saa za Mchana za Newfoundland", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "HKT": "Saa Wastani za Hong Kong", "HENOMX": "Saa za mchana za Mexico Kaskazini Magharibi", "HECU": "Saa za Mchana za Cuba", "ADT": "Saa za Mchana za Atlantiki", "PST": "Saa za Wastani za Pasifiki", "∅∅∅": "Saa za Majira ya joto za Amazon", "GFT": "Saa za Guiana ya Ufaransa", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "HNPMX": "Saa za wastani za pasifiki za Mexico", "ACST": "Saa Wastani za Australia ya Kati", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "CDT": "Saa za Mchana za Kati", "AST": "Saa za Wastani za Atlantiki", "GYT": "Saa za Guyana", "AKST": "Saa za Wastani za Alaska", "MDT": "Saa za Mchana za Mountain", "HNOG": "Saa za Wastani za Greenland Magharibi", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "JST": "Saa Wastani za Japan", "ChST": "Saa Wastani za Chamorro", "WAT": "Saa za Wastani za Afrika Magharibi", "ACWST": "Saa Wastani za Magharibi ya Kati ya Australia", "ACWDT": "Saa za Mchana za Magharibi ya Kati ya Australia", "AEST": "Saa Wastani za Mashariki mwa Australia", "JDT": "Saa za Mchana za Japan", "ECT": "Saa za Ecuador", "MYT": "Saa za Malaysia"}, -+ locale: "sw_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ periodsNarrow: []string{"AM", "PM"}, -+ periodsWide: []string{"AM", "PM"}, -+ timezones: map[string]string{"LHST": "LHST", "GFT": "GFT", "GYT": "GYT", "HKST": "HKST", "BOT": "BOT", "EAT": "EAT", "HNPM": "HNPM", "CHAST": "CHAST", "SGT": "SGT", "BT": "BT", "AEST": "AEST", "AEDT": "AEDT", "TMST": "TMST", "ECT": "ECT", "ACST": "ACST", "AWST": "AWST", "PDT": "PDT", "AST": "AST", "WIT": "WIT", "MST": "MST", "HADT": "HADT", "HNEG": "HNEG", "HECU": "HECU", "AKDT": "AKDT", "WESZ": "WESZ", "WART": "WART", "COST": "COST", "HKT": "HKT", "NZST": "NZST", "MESZ": "MESZ", "HEEG": "HEEG", "UYST": "UYST", "WIB": "WIB", "ChST": "ChST", "ART": "ART", "ACWST": "ACWST", "HNPMX": "HNPMX", "CAT": "CAT", "WAT": "WAT", "WAST": "WAST", "OESZ": "OESZ", "AWDT": "AWDT", "MYT": "MYT", "HEPMX": "HEPMX", "CDT": "CDT", "MDT": "MDT", "HAST": "HAST", "SAST": "SAST", "HEOG": "HEOG", "WITA": "WITA", "EDT": "EDT", "NZDT": "NZDT", "GMT": "GMT", "WEZ": "WEZ", "COT": "COT", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "AKST": "AKST", "ADT": "ADT", "MEZ": "MEZ", "HEPM": "HEPM", "HAT": "HAT", "OEZ": "OEZ", "SRT": "SRT", "HENOMX": "HENOMX", "JDT": "JDT", "PST": "PST", "ACDT": "ACDT", "WARST": "WARST", "TMT": "TMT", "HNCU": "HNCU", "CLST": "CLST", "HNNOMX": "HNNOMX", "IST": "IST", "VET": "VET", "EST": "EST", "ARST": "ARST", "JST": "JST", "CHADT": "CHADT", "HNT": "HNT", "CST": "CST", "LHDT": "LHDT", "UYT": "UYT", "CLT": "CLT"}, - } - } -  -@@ -136,7 +115,7 @@ func (sw *sw_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sw *sw_KE) MonthsAbbreviated() []string { -- return sw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +125,7 @@ func (sw *sw_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sw *sw_KE) MonthsNarrow() []string { -- return sw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +135,7 @@ func (sw *sw_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sw *sw_KE) MonthsWide() []string { -- return sw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,73 +181,13 @@ func (sw *sw_KE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sw_KE' and handles both Whole and Real numbers based on 'v' - func (sw *sw_KE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sw_KE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sw *sw_KE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sw_KE' -@@ -276,56 +195,7 @@ func (sw *sw_KE) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sw_KE' -@@ -334,68 +204,7 @@ func (sw *sw_KE) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, sw.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sw.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sw_KE' -@@ -403,27 +212,6 @@ func (sw *sw_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,17 +220,6 @@ func (sw *sw_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +228,6 @@ func (sw *sw_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +236,6 @@ func (sw *sw_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +244,6 @@ func (sw *sw_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +252,6 @@ func (sw *sw_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,30 +260,6 @@ func (sw *sw_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -572,34 +268,5 @@ func (sw *sw_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sw_TZ/sw_TZ.go b/sw_TZ/sw_TZ.go -index 7942505..54b36d7 100644 ---- a/sw_TZ/sw_TZ.go -+++ b/sw_TZ/sw_TZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type sw_TZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sw_TZ' locale - func New() locales.Translator { - return &sw_TZ{ -- locale: "sw_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysWide: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"Asubuhi", "Mchana"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"GYT": "Saa za Guyana", "UYT": "Saa za Wastani za Uruguay", "∅∅∅": "Saa za Majira ya joto za Amazon", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "EAT": "Saa za Afrika Mashariki", "AST": "Saa za Wastani za Atlantiki", "MYT": "Saa za Malaysia", "PST": "Saa za Wastani za Pasifiki", "AWST": "Saa Wastani za Australia Magharibi", "ChST": "Saa Wastani za Chamorro", "HECU": "Saa za Mchana za Cuba", "HEPMX": "Saa za mchana za pasifiki za Mexico", "WIT": "Saa za Mashariki mwa Indonesia", "HAST": "Saa za Wastani za Hawaii-Aleutian", "WEZ": "Saa Wastani za Magharibi mwa Ulaya", "GFT": "Saa za Guiana ya Ufaransa", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "ADT": "Saa za Mchana za Atlantiki", "HAT": "Saa za Mchana za Newfoundland", "HNOG": "Saa za Wastani za Greenland Magharibi", "CHADT": "Saa za Mchana za Chatham", "HNNOMX": "Saa Wastani za Mexico Kaskazini Magharibi", "HENOMX": "Saa za mchana za Mexico Kaskazini Magharibi", "ACST": "Saa Wastani za Australia ya Kati", "WART": "Saa Wastani za Magharibi mwa Argentina", "CST": "Saa za Wastani za Kati", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "ACWST": "Saa Wastani za Magharibi ya Kati ya Australia", "ARST": "Saa za Majira ya joto za Argentina", "AEST": "Saa Wastani za Mashariki mwa Australia", "JDT": "Saa za Mchana za Japan", "UYST": "Saa za Majira ya joto za Uruguay", "WIB": "Saa za Magharibi mwa Indonesia", "PDT": "Saa za Mchana za Pasifiki", "LHST": "Saa Wastani za Lord Howe", "COST": "Saa za Majira ya joto za Colombia", "ACDT": "Saa za Mchana za Australia ya Kati", "HNT": "Saa za Wastani za Newfoundland", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "JST": "Saa Wastani za Japan", "HNEG": "Saa za Wastani za Greenland Mashariki", "CAT": "Saa za Afrika ya Kati", "HKST": "Saa za Majira ya joto za Hong Kong", "LHDT": "Saa za Mchana za Lord Howe", "BOT": "Saa za Bolivia", "ECT": "Saa za Ecuador", "EST": "Saa za Wastani za Mashariki", "AKST": "Saa za Wastani za Alaska", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "CLT": "Saa za Wastani za Chile", "WAT": "Saa za Wastani za Afrika Magharibi", "ACWDT": "Saa za Mchana za Magharibi ya Kati ya Australia", "WITA": "Saa za Indonesia ya Kati", "MEZ": "Saa Wastani za Ulaya ya kati", "SAST": "Saa Wastani za Afrika Kusini", "CLST": "Saa za Majira ya joto za Chile", "TMST": "Saa za Majira ya joto za Turkmenistan", "MST": "MST", "EDT": "Saa za Mchana za Mashariki", "AWDT": "Saa za Mchana za Australia Magharibi", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "HNCU": "Saa za Wastani ya Cuba", "GMT": "Saa za Greenwich", "HADT": "Saa za Mchana za Hawaii-Aleutian", "SRT": "Saa za Suriname", "OEZ": "Saa Wastani za Mashariki mwa Ulaya", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "TMT": "Saa za Wastani za Turkmenistan", "SGT": "Saa Wastani za Singapore", "HNPMX": "Saa za wastani za pasifiki za Mexico", "VET": "Saa za Venezuela", "ART": "Saa za Wastani za Argentina", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "HKT": "Saa Wastani za Hong Kong", "IST": "Saa Wastani za India", "WARST": "Saa za Majira ya joto za Magharibi mwa Argentina", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "CHAST": "Saa Wastani za Chatham", "COT": "Saa za Wastani za Colombia", "MDT": "MDT", "AKDT": "Saa za Mchana za Alaska", "CDT": "Saa za Mchana za Kati", "BT": "Saa za Bhutan", "NZST": "Saa Wastani za New Zealand", "NZDT": "Saa za Mchana za New Zealand"}, -+ locale: "sw_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WESZ": "WESZ", "HNT": "HNT", "ChST": "ChST", "HNPM": "HNPM", "HEPMX": "HEPMX", "ART": "ART", "ACST": "ACST", "HENOMX": "HENOMX", "MEZ": "MEZ", "GFT": "GFT", "COST": "COST", "HNEG": "HNEG", "JST": "JST", "OEZ": "OEZ", "CLT": "CLT", "CST": "CST", "UYT": "UYT", "HECU": "HECU", "HNPMX": "HNPMX", "WAST": "WAST", "ADT": "ADT", "ACDT": "ACDT", "AST": "AST", "HAST": "HAST", "AWST": "AWST", "CHAST": "CHAST", "WARST": "WARST", "ECT": "ECT", "SAST": "SAST", "AKDT": "AKDT", "WIT": "WIT", "∅∅∅": "∅∅∅", "GMT": "GMT", "ARST": "ARST", "LHST": "LHST", "MYT": "MYT", "BT": "BT", "CHADT": "CHADT", "HEOG": "HEOG", "WITA": "WITA", "CDT": "CDT", "SRT": "SRT", "HNNOMX": "HNNOMX", "VET": "VET", "COT": "COT", "TMT": "TMT", "BOT": "BOT", "AEDT": "AEDT", "GYT": "GYT", "MDT": "MDT", "MESZ": "MESZ", "UYST": "UYST", "WEZ": "WEZ", "OESZ": "OESZ", "HKST": "HKST", "NZST": "NZST", "AEST": "AEST", "HKT": "HKT", "LHDT": "LHDT", "WIB": "WIB", "HADT": "HADT", "AKST": "AKST", "HAT": "HAT", "MST": "MST", "HEPM": "HEPM", "ACWST": "ACWST", "CLST": "CLST", "EAT": "EAT", "CAT": "CAT", "HEEG": "HEEG", "AWDT": "AWDT", "PDT": "PDT", "ACWDT": "ACWDT", "IST": "IST", "TMST": "TMST", "EST": "EST", "SGT": "SGT", "EDT": "EDT", "NZDT": "NZDT", "JDT": "JDT", "PST": "PST", "HNCU": "HNCU", "WAT": "WAT", "WART": "WART", "HNOG": "HNOG"}, - } - } -  -@@ -136,7 +113,7 @@ func (sw *sw_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sw *sw_TZ) MonthsAbbreviated() []string { -- return sw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +123,7 @@ func (sw *sw_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sw *sw_TZ) MonthsNarrow() []string { -- return sw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +133,7 @@ func (sw *sw_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sw *sw_TZ) MonthsWide() []string { -- return sw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,73 +179,13 @@ func (sw *sw_TZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sw_TZ' and handles both Whole and Real numbers based on 'v' - func (sw *sw_TZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sw_TZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sw *sw_TZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sw_TZ' -@@ -276,56 +193,7 @@ func (sw *sw_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sw_TZ' -@@ -334,68 +202,7 @@ func (sw *sw_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, sw.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sw.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sw_TZ' -@@ -403,27 +210,6 @@ func (sw *sw_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,17 +218,6 @@ func (sw *sw_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +226,6 @@ func (sw *sw_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +234,6 @@ func (sw *sw_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +242,6 @@ func (sw *sw_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +250,6 @@ func (sw *sw_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,30 +258,6 @@ func (sw *sw_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -572,34 +266,5 @@ func (sw *sw_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/sw_UG/sw_UG.go b/sw_UG/sw_UG.go -index 8ee188d..6cc0efb 100644 ---- a/sw_UG/sw_UG.go -+++ b/sw_UG/sw_UG.go -@@ -10,68 +10,45 @@ import ( - ) -  - type sw_UG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'sw_UG' locale - func New() locales.Translator { - return &sw_UG{ -- locale: "sw_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "USh", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- daysWide: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"am", "pm"}, -- periodsWide: []string{"Asubuhi", "Mchana"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"}, -- timezones: map[string]string{"CDT": "Saa za Mchana za Kati", "CHAST": "Saa Wastani za Chatham", "HNEG": "Saa za Wastani za Greenland Mashariki", "WARST": "Saa za Majira ya joto za Magharibi mwa Argentina", "COST": "Saa za Majira ya joto za Colombia", "HEPMX": "Saa za mchana za pasifiki za Mexico", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "MEZ": "Saa Wastani za Ulaya ya kati", "EAT": "Saa za Afrika Mashariki", "HENOMX": "Saa za mchana za Mexico Kaskazini Magharibi", "GYT": "Saa za Guyana", "ACWST": "Saa Wastani za Magharibi ya Kati ya Australia", "UYT": "Saa za Wastani za Uruguay", "HKST": "Saa za Majira ya joto za Hong Kong", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "TMST": "Saa za Majira ya joto za Turkmenistan", "WART": "Saa Wastani za Magharibi mwa Argentina", "HECU": "Saa za Mchana za Cuba", "HAT": "Saa za Mchana za Newfoundland", "HNNOMX": "Saa Wastani za Mexico Kaskazini Magharibi", "AKDT": "Saa za Mchana za Alaska", "WEZ": "Saa Wastani za Magharibi mwa Ulaya", "ACWDT": "Saa za Mchana za Magharibi ya Kati ya Australia", "JST": "Saa Wastani za Japan", "VET": "Saa za Venezuela", "WIT": "Saa za Mashariki mwa Indonesia", "SRT": "Saa za Suriname", "WIB": "Saa za Magharibi mwa Indonesia", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "OEZ": "Saa Wastani za Mashariki mwa Ulaya", "∅∅∅": "∅∅∅", "HNPMX": "Saa za wastani za pasifiki za Mexico", "CST": "Saa za Wastani za Kati", "PST": "Saa za Wastani za Pasifiki", "ChST": "Saa Wastani za Chamorro", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "HNCU": "Saa za Wastani ya Cuba", "AST": "Saa za Wastani za Atlantiki", "HAST": "Saa za Wastani za Hawaii-Aleutian", "AWDT": "Saa za Mchana za Australia Magharibi", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "LHDT": "Saa za Mchana za Lord Howe", "TMT": "Saa za Wastani za Turkmenistan", "CAT": "Saa za Afrika ya Kati", "EDT": "Saa za Mchana za Mashariki", "HADT": "Saa za Mchana za Hawaii-Aleutian", "ARST": "Saa za Majira ya joto za Argentina", "WAT": "Saa za Wastani za Afrika Magharibi", "NZDT": "Saa za Mchana za New Zealand", "CHADT": "Saa za Mchana za Chatham", "SAST": "Saa Wastani za Afrika Kusini", "BOT": "Saa za Bolivia", "ACST": "Saa Wastani za Australia ya Kati", "ADT": "Saa za Mchana za Atlantiki", "PDT": "Saa za Mchana za Pasifiki", "WITA": "Saa za Indonesia ya Kati", "AKST": "Saa za Wastani za Alaska", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "ART": "Saa za Wastani za Argentina", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "ECT": "Saa za Ecuador", "EST": "Saa za Wastani za Mashariki", "MST": "MST", "MDT": "MDT", "GFT": "Saa za Guiana ya Ufaransa", "GMT": "Saa za Greenwich", "AEST": "Saa Wastani za Mashariki mwa Australia", "JDT": "Saa za Mchana za Japan", "NZST": "Saa Wastani za New Zealand", "CLT": "Saa za Wastani za Chile", "ACDT": "Saa za Mchana za Australia ya Kati", "MYT": "Saa za Malaysia", "HNT": "Saa za Wastani za Newfoundland", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "COT": "Saa za Wastani za Colombia", "HNOG": "Saa za Wastani za Greenland Magharibi", "AWST": "Saa Wastani za Australia Magharibi", "CLST": "Saa za Majira ya joto za Chile", "BT": "Saa za Bhutan", "HKT": "Saa Wastani za Hong Kong", "LHST": "Saa Wastani za Lord Howe", "SGT": "Saa Wastani za Singapore", "UYST": "Saa za Majira ya joto za Uruguay", "IST": "Saa Wastani za India"}, -+ locale: "sw_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "USh", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNCU": "HNCU", "HNOG": "HNOG", "ChST": "ChST", "LHDT": "LHDT", "BT": "BT", "TMT": "TMT", "CST": "CST", "ADT": "ADT", "AEDT": "AEDT", "CHAST": "CHAST", "HECU": "HECU", "HKT": "HKT", "ART": "ART", "BOT": "BOT", "HAST": "HAST", "UYT": "UYT", "WAST": "WAST", "MST": "MST", "MDT": "MDT", "MEZ": "MEZ", "AWDT": "AWDT", "PDT": "PDT", "ACWST": "ACWST", "AEST": "AEST", "CHADT": "CHADT", "WARST": "WARST", "TMST": "TMST", "CDT": "CDT", "PST": "PST", "OESZ": "OESZ", "SRT": "SRT", "HENOMX": "HENOMX", "AWST": "AWST", "UYST": "UYST", "HNT": "HNT", "HEOG": "HEOG", "SAST": "SAST", "CLST": "CLST", "HNPMX": "HNPMX", "ACDT": "ACDT", "HEPM": "HEPM", "HAT": "HAT", "COST": "COST", "NZDT": "NZDT", "GMT": "GMT", "CLT": "CLT", "ARST": "ARST", "HEPMX": "HEPMX", "EST": "EST", "EDT": "EDT", "HADT": "HADT", "HNNOMX": "HNNOMX", "NZST": "NZST", "WAT": "WAT", "GFT": "GFT", "HEEG": "HEEG", "JST": "JST", "SGT": "SGT", "JDT": "JDT", "IST": "IST", "COT": "COT", "∅∅∅": "∅∅∅", "CAT": "CAT", "EAT": "EAT", "MESZ": "MESZ", "HNPM": "HNPM", "WART": "WART", "WIT": "WIT", "AST": "AST", "ACST": "ACST", "AKST": "AKST", "OEZ": "OEZ", "GYT": "GYT", "HNEG": "HNEG", "LHST": "LHST", "WEZ": "WEZ", "AKDT": "AKDT", "WITA": "WITA", "ECT": "ECT", "WIB": "WIB", "MYT": "MYT", "HKST": "HKST", "ACWDT": "ACWDT", "VET": "VET", "WESZ": "WESZ"}, - } - } -  -@@ -136,7 +113,7 @@ func (sw *sw_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (sw *sw_UG) MonthsAbbreviated() []string { -- return sw.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +123,7 @@ func (sw *sw_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (sw *sw_UG) MonthsNarrow() []string { -- return sw.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +133,7 @@ func (sw *sw_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (sw *sw_UG) MonthsWide() []string { -- return sw.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,73 +179,13 @@ func (sw *sw_UG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'sw_UG' and handles both Whole and Real numbers based on 'v' - func (sw *sw_UG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'sw_UG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (sw *sw_UG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, sw.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sw_UG' -@@ -276,56 +193,7 @@ func (sw *sw_UG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, sw.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sw_UG' -@@ -334,68 +202,7 @@ func (sw *sw_UG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := sw.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, sw.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, sw.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, sw.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, sw.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, sw.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'sw_UG' -@@ -403,27 +210,6 @@ func (sw *sw_UG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,17 +218,6 @@ func (sw *sw_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +226,6 @@ func (sw *sw_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +234,6 @@ func (sw *sw_UG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, sw.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, sw.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +242,6 @@ func (sw *sw_UG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +250,6 @@ func (sw *sw_UG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,30 +258,6 @@ func (sw *sw_UG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -572,34 +266,5 @@ func (sw *sw_UG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, sw.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := sw.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ta/ta.go b/ta/ta.go -index 5c4a8e1..a3dc739 100644 ---- a/ta/ta.go -+++ b/ta/ta.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"கி.மு.", "கி.பி."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"}, -- timezones: map[string]string{"HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "BT": "பூடான் நேரம்", "SRT": "சுரினாம் நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்", "GYT": "கயானா நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "CST": "மத்திய நிலையான நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "BOT": "பொலிவியா நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "EST": "கிழக்கத்திய நிலையான நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "NZST": "நியூசிலாந்து நிலையான நேரம்", "IST": "இந்திய நிலையான நேரம்", "HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "MDT": "மக்காவ் கோடை நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "CLT": "சிலி நிலையான நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "∅∅∅": "அமேசான் கோடை நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "ECT": "ஈக்வடார் நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்", "CLST": "சிலி கோடை நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "MYT": "மலேஷிய நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "UYST": "உருகுவே கோடை நேரம்", "VET": "வெனிசுலா நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "MST": "மக்காவ் தர நேரம்"}, -+ timezones: map[string]string{"HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "MST": "மவுன்டைன் நிலையான நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "UYST": "உருகுவே கோடை நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "EST": "கிழக்கத்திய நிலையான நேரம்", "∅∅∅": "அக்ரே கோடை நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "CST": "மத்திய நிலையான நேரம்", "MDT": "மவுன்டைன் பகலொளி நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "MYT": "மலேஷிய நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "CLST": "சிலி கோடை நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "BOT": "பொலிவியா நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "IST": "இந்திய நிலையான நேரம்", "GYT": "கயானா நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "CLT": "சிலி நிலையான நேரம்", "ECT": "ஈக்வடார் நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "VET": "வெனிசுலா நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "SRT": "சுரினாம் நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "BT": "பூடான் நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "NZST": "நியூசிலாந்து நிலையான நேரம்"}, - } - } -  -diff --git a/ta_IN/ta_IN.go b/ta_IN/ta_IN.go -index 3a1c437..2d83be4 100644 ---- a/ta_IN/ta_IN.go -+++ b/ta_IN/ta_IN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ta_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ta_IN' locale - func New() locales.Translator { - return &ta_IN{ -- locale: "ta_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ஜன.", "பிப்.", "மார்.", "ஏப்.", "மே", "ஜூன்", "ஜூலை", "ஆக.", "செப்.", "அக்.", "நவ.", "டிச."}, -- monthsNarrow: []string{"", "ஜ", "பி", "மா", "ஏ", "மே", "ஜூ", "ஜூ", "ஆ", "செ", "அ", "ந", "டி"}, -- monthsWide: []string{"", "ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்ட்", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"}, -- daysAbbreviated: []string{"ஞாயி.", "திங்.", "செவ்.", "புத.", "வியா.", "வெள்.", "சனி"}, -- daysNarrow: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysShort: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysWide: []string{"ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"}, -- periodsAbbreviated: []string{"முற்பகல்", "பிற்பகல்"}, -- periodsNarrow: []string{"மு.ப", "பி.ப"}, -- periodsWide: []string{"முற்பகல்", "பிற்பகல்"}, -- erasAbbreviated: []string{"கி.மு.", "கி.பி."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"}, -- timezones: map[string]string{"EST": "கிழக்கத்திய நிலையான நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "∅∅∅": "அமேசான் கோடை நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "ECT": "ஈக்வடார் நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "NZST": "நியூசிலாந்து நிலையான நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "UYST": "உருகுவே கோடை நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "CST": "மத்திய நிலையான நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "MDT": "மக்காவ் கோடை நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "VET": "வெனிசுலா நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "CLT": "சிலி நிலையான நேரம்", "TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "GYT": "கயானா நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "MST": "மக்காவ் தர நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "IST": "இந்திய நிலையான நேரம்", "CLST": "சிலி கோடை நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்", "HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "SRT": "சுரினாம் நேரம்", "BOT": "பொலிவியா நேரம்", "MYT": "மலேஷிய நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "BT": "பூடான் நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்"}, -+ locale: "ta_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CLST": "CLST", "WITA": "WITA", "NZST": "NZST", "GMT": "GMT", "HNNOMX": "HNNOMX", "MYT": "MYT", "HNCU": "HNCU", "WIB": "WIB", "MST": "MST", "ADT": "ADT", "ARST": "ARST", "HADT": "HADT", "ACDT": "ACDT", "VET": "VET", "WIT": "WIT", "TMST": "TMST", "PDT": "PDT", "ACWST": "ACWST", "SGT": "SGT", "HKST": "HKST", "MESZ": "MESZ", "AWDT": "AWDT", "LHDT": "LHDT", "CHAST": "CHAST", "HECU": "HECU", "HKT": "HKT", "EAT": "EAT", "UYT": "UYT", "IST": "IST", "HNPMX": "HNPMX", "WART": "WART", "ChST": "ChST", "ART": "ART", "ACST": "ACST", "HENOMX": "HENOMX", "AKDT": "AKDT", "CAT": "CAT", "HEPM": "HEPM", "WESZ": "WESZ", "OEZ": "OEZ", "WARST": "WARST", "TMT": "TMT", "CST": "CST", "ECT": "ECT", "PST": "PST", "COST": "COST", "HNOG": "HNOG", "MEZ": "MEZ", "JDT": "JDT", "ACWDT": "ACWDT", "WAT": "WAT", "EDT": "EDT", "HAST": "HAST", "HNEG": "HNEG", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "GFT": "GFT", "MDT": "MDT", "BOT": "BOT", "AWST": "AWST", "LHST": "LHST", "HNPM": "HNPM", "AEST": "AEST", "UYST": "UYST", "BT": "BT", "CLT": "CLT", "HAT": "HAT", "SAST": "SAST", "GYT": "GYT", "COT": "COT", "NZDT": "NZDT", "AEDT": "AEDT", "CHADT": "CHADT", "HEPMX": "HEPMX", "WAST": "WAST", "EST": "EST", "HEEG": "HEEG", "JST": "JST", "OESZ": "OESZ", "HNT": "HNT", "CDT": "CDT", "SRT": "SRT", "AKST": "AKST", "HEOG": "HEOG", "AST": "AST"}, - } - } -  -@@ -135,7 +112,7 @@ func (ta *ta_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ta *ta_IN) MonthsAbbreviated() []string { -- return ta.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (ta *ta_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ta *ta_IN) MonthsNarrow() []string { -- return ta.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (ta *ta_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ta *ta_IN) MonthsWide() []string { -- return ta.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,82 +178,13 @@ func (ta *ta_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ta_IN' and handles both Whole and Real numbers based on 'v' - func (ta *ta_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, ta.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ta.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ta_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ta *ta_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ta.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ta.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ta_IN' -@@ -284,56 +192,7 @@ func (ta *ta_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ta.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ta.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ta.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ta_IN' -@@ -342,68 +201,7 @@ func (ta *ta_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ta.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ta.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ta.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ta.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ta_IN' -@@ -411,17 +209,6 @@ func (ta *ta_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -430,17 +217,6 @@ func (ta *ta_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,17 +225,6 @@ func (ta *ta_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -468,19 +233,6 @@ func (ta *ta_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ta.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -489,29 +241,6 @@ func (ta *ta_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -520,36 +249,6 @@ func (ta *ta_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -558,40 +257,6 @@ func (ta *ta_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -600,44 +265,5 @@ func (ta *ta_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ta.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ta_LK/ta_LK.go b/ta_LK/ta_LK.go -index 431037a..a88d2c2 100644 ---- a/ta_LK/ta_LK.go -+++ b/ta_LK/ta_LK.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ta_LK struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ta_LK' locale - func New() locales.Translator { - return &ta_LK{ -- locale: "ta_LK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "Rs.", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ஜன.", "பிப்.", "மார்.", "ஏப்.", "மே", "ஜூன்", "ஜூலை", "ஆக.", "செப்.", "அக்.", "நவ.", "டிச."}, -- monthsNarrow: []string{"", "ஜ", "பி", "மா", "ஏ", "மே", "ஜூ", "ஜூ", "ஆ", "செ", "அ", "ந", "டி"}, -- monthsWide: []string{"", "ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்ட்", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"}, -- daysAbbreviated: []string{"ஞாயி.", "திங்.", "செவ்.", "புத.", "வியா.", "வெள்.", "சனி"}, -- daysNarrow: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysShort: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysWide: []string{"ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"}, -- periodsAbbreviated: []string{"முற்பகல்", "பிற்பகல்"}, -- periodsNarrow: []string{"மு.ப", "பி.ப"}, -- periodsWide: []string{"முற்பகல்", "பிற்பகல்"}, -- erasAbbreviated: []string{"கி.மு.", "கி.பி."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"}, -- timezones: map[string]string{"NZST": "நியூசிலாந்து நிலையான நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "MDT": "மக்காவ் கோடை நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "SRT": "சுரினாம் நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "IST": "இந்திய நிலையான நேரம்", "CLST": "சிலி கோடை நேரம்", "TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்", "UYST": "உருகுவே கோடை நேரம்", "MST": "மக்காவ் தர நேரம்", "ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "MYT": "மலேஷிய நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "CLT": "சிலி நிலையான நேரம்", "ECT": "ஈக்வடார் நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "BT": "பூடான் நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "VET": "வெனிசுலா நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "CST": "மத்திய நிலையான நேரம்", "∅∅∅": "அமேசான் கோடை நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "EST": "கிழக்கத்திய நிலையான நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "BOT": "பொலிவியா நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "GYT": "கயானா நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்"}, -+ locale: "ta_LK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "Rs.", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MDT": "MDT", "ACDT": "ACDT", "COT": "COT", "COST": "COST", "HNOG": "HNOG", "TMT": "TMT", "WART": "WART", "ACST": "ACST", "BT": "BT", "ACWST": "ACWST", "SGT": "SGT", "HNCU": "HNCU", "OEZ": "OEZ", "CDT": "CDT", "AWST": "AWST", "UYST": "UYST", "ACWDT": "ACWDT", "AEDT": "AEDT", "AKST": "AKST", "UYT": "UYT", "VET": "VET", "MST": "MST", "HNPM": "HNPM", "IST": "IST", "WEZ": "WEZ", "WAST": "WAST", "AKDT": "AKDT", "SAST": "SAST", "MESZ": "MESZ", "CHAST": "CHAST", "HEPMX": "HEPMX", "WAT": "WAT", "HNT": "HNT", "EAT": "EAT", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "CHADT": "CHADT", "CAT": "CAT", "ART": "ART", "ADT": "ADT", "ChST": "ChST", "ARST": "ARST", "HEPM": "HEPM", "GFT": "GFT", "TMST": "TMST", "CST": "CST", "NZDT": "NZDT", "HEEG": "HEEG", "HAT": "HAT", "HEOG": "HEOG", "BOT": "BOT", "HNPMX": "HNPMX", "WITA": "WITA", "AST": "AST", "HADT": "HADT", "WIB": "WIB", "HAST": "HAST", "MEZ": "MEZ", "HECU": "HECU", "WIT": "WIT", "EST": "EST", "HKST": "HKST", "GMT": "GMT", "SRT": "SRT", "HENOMX": "HENOMX", "LHDT": "LHDT", "MYT": "MYT", "JDT": "JDT", "OESZ": "OESZ", "WESZ": "WESZ", "WARST": "WARST", "GYT": "GYT", "HNEG": "HNEG", "LHST": "LHST", "JST": "JST", "PST": "PST", "AEST": "AEST", "NZST": "NZST", "EDT": "EDT", "HKT": "HKT", "CLT": "CLT", "∅∅∅": "∅∅∅", "PDT": "PDT", "CLST": "CLST", "ECT": "ECT"}, - } - } -  -@@ -135,7 +112,7 @@ func (ta *ta_LK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ta *ta_LK) MonthsAbbreviated() []string { -- return ta.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (ta *ta_LK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ta *ta_LK) MonthsNarrow() []string { -- return ta.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (ta *ta_LK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ta *ta_LK) MonthsWide() []string { -- return ta.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,82 +178,13 @@ func (ta *ta_LK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ta_LK' and handles both Whole and Real numbers based on 'v' - func (ta *ta_LK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, ta.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ta.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ta_LK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ta *ta_LK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ta.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ta.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ta_LK' -@@ -284,56 +192,7 @@ func (ta *ta_LK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ta.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ta.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ta.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ta_LK' -@@ -342,68 +201,7 @@ func (ta *ta_LK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ta.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ta.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ta.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ta.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ta.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ta_LK' -@@ -411,17 +209,6 @@ func (ta *ta_LK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -430,17 +217,6 @@ func (ta *ta_LK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,17 +225,6 @@ func (ta *ta_LK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -468,19 +233,6 @@ func (ta *ta_LK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ta.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/ta_MY/ta_MY.go b/ta_MY/ta_MY.go -index 6d99f5c..5db944c 100644 ---- a/ta_MY/ta_MY.go -+++ b/ta_MY/ta_MY.go -@@ -48,30 +48,11 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "RM", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "S$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ஜன.", "பிப்.", "மார்.", "ஏப்.", "மே", "ஜூன்", "ஜூலை", "ஆக.", "செப்.", "அக்.", "நவ.", "டிச."}, -- monthsNarrow: []string{"", "ஜ", "பி", "மா", "ஏ", "மே", "ஜூ", "ஜூ", "ஆ", "செ", "அ", "ந", "டி"}, -- monthsWide: []string{"", "ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்ட்", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"}, -- daysAbbreviated: []string{"ஞாயி.", "திங்.", "செவ்.", "புத.", "வியா.", "வெள்.", "சனி"}, -- daysNarrow: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysShort: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysWide: []string{"ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"}, -- periodsAbbreviated: []string{"முற்பகல்", "பிற்பகல்"}, -- periodsNarrow: []string{"மு.ப", "பி.ப"}, -- periodsWide: []string{"முற்பகல்", "பிற்பகல்"}, -- erasAbbreviated: []string{"கி.மு.", "கி.பி."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"}, -- timezones: map[string]string{"TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "EST": "கிழக்கத்திய நிலையான நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "SRT": "சுரினாம் நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "IST": "இந்திய நிலையான நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்", "MST": "மக்காவ் தர நேரம்", "UYST": "உருகுவே கோடை நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "BOT": "பொலிவியா நேரம்", "HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "MDT": "மக்காவ் கோடை நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "∅∅∅": "அமேசான் கோடை நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "MYT": "மலேஷிய நேரம்", "HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "CLST": "சிலி கோடை நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "BT": "பூடான் நேரம்", "ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "CLT": "சிலி நிலையான நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "CST": "மத்திய நிலையான நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "NZST": "நியூசிலாந்து நிலையான நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "GYT": "கயானா நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "ECT": "ஈக்வடார் நேரம்", "VET": "வெனிசுலா நேரம்"}, -+ timezones: map[string]string{"ADT": "ADT", "HEEG": "HEEG", "GYT": "GYT", "SRT": "SRT", "BOT": "BOT", "GFT": "GFT", "SAST": "SAST", "WITA": "WITA", "MST": "MST", "EAT": "EAT", "IST": "IST", "COST": "COST", "NZST": "NZST", "HNNOMX": "HNNOMX", "UYT": "UYT", "HEPMX": "HEPMX", "WEZ": "WEZ", "MEZ": "MEZ", "ACDT": "ACDT", "CHADT": "CHADT", "PDT": "PDT", "TMT": "TMT", "OEZ": "OEZ", "HNT": "HNT", "COT": "COT", "AST": "AST", "AWDT": "AWDT", "LHDT": "LHDT", "VET": "VET", "WESZ": "WESZ", "CAT": "CAT", "CLT": "CLT", "HNPM": "HNPM", "ACWDT": "ACWDT", "AEDT": "AEDT", "WAST": "WAST", "GMT": "GMT", "MESZ": "MESZ", "HNCU": "HNCU", "TMST": "TMST", "HADT": "HADT", "HNEG": "HNEG", "HEPM": "HEPM", "AKST": "AKST", "AKDT": "AKDT", "WARST": "WARST", "HNOG": "HNOG", "HKT": "HKT", "NZDT": "NZDT", "ART": "ART", "BT": "BT", "ACWST": "ACWST", "HAT": "HAT", "EST": "EST", "HKST": "HKST", "CST": "CST", "HAST": "HAST", "JST": "JST", "AWST": "AWST", "UYST": "UYST", "HNPMX": "HNPMX", "SGT": "SGT", "WIT": "WIT", "CDT": "CDT", "ChST": "ChST", "ARST": "ARST", "JDT": "JDT", "CHAST": "CHAST", "CLST": "CLST", "HENOMX": "HENOMX", "AEST": "AEST", "OESZ": "OESZ", "ECT": "ECT", "WIB": "WIB", "LHST": "LHST", "PST": "PST", "HECU": "HECU", "ACST": "ACST", "MYT": "MYT", "HEOG": "HEOG", "MDT": "MDT", "∅∅∅": "∅∅∅", "WAT": "WAT", "WART": "WART", "EDT": "EDT"}, - } - } -  -@@ -135,7 +116,7 @@ func (ta *ta_MY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ta *ta_MY) MonthsAbbreviated() []string { -- return ta.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +126,7 @@ func (ta *ta_MY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ta *ta_MY) MonthsNarrow() []string { -- return ta.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +136,7 @@ func (ta *ta_MY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ta *ta_MY) MonthsWide() []string { -- return ta.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,7 +183,7 @@ func (ta *ta_MY) WeekdaysWide() []string { - func (ta *ta_MY) FmtNumber(num float64, v uint64) string { -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + 0 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -243,7 +224,7 @@ func (ta *ta_MY) FmtNumber(num float64, v uint64) string { - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ta *ta_MY) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -275,7 +256,7 @@ func (ta *ta_MY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -337,7 +318,7 @@ func (ta *ta_MY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -410,17 +391,6 @@ func (ta *ta_MY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -429,17 +399,6 @@ func (ta *ta_MY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -448,17 +407,6 @@ func (ta *ta_MY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -467,19 +415,6 @@ func (ta *ta_MY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ta.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -488,29 +423,6 @@ func (ta *ta_MY) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,36 +431,6 @@ func (ta *ta_MY) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -557,40 +439,6 @@ func (ta *ta_MY) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -599,44 +447,5 @@ func (ta *ta_MY) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ta.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ta_SG/ta_SG.go b/ta_SG/ta_SG.go -index bcd5640..772f849 100644 ---- a/ta_SG/ta_SG.go -+++ b/ta_SG/ta_SG.go -@@ -48,30 +48,11 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "RM", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "ஜன.", "பிப்.", "மார்.", "ஏப்.", "மே", "ஜூன்", "ஜூலை", "ஆக.", "செப்.", "அக்.", "நவ.", "டிச."}, -- monthsNarrow: []string{"", "ஜ", "பி", "மா", "ஏ", "மே", "ஜூ", "ஜூ", "ஆ", "செ", "அ", "ந", "டி"}, -- monthsWide: []string{"", "ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்ட்", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"}, -- daysAbbreviated: []string{"ஞாயி.", "திங்.", "செவ்.", "புத.", "வியா.", "வெள்.", "சனி"}, -- daysNarrow: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysShort: []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"}, -- daysWide: []string{"ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"}, -- periodsAbbreviated: []string{"முற்பகல்", "பிற்பகல்"}, -- periodsNarrow: []string{"மு.ப", "பி.ப"}, -- periodsWide: []string{"முற்பகல்", "பிற்பகல்"}, -- erasAbbreviated: []string{"கி.மு.", "கி.பி."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"}, -- timezones: map[string]string{"∅∅∅": "அமேசான் கோடை நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "BOT": "பொலிவியா நேரம்", "TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "ECT": "ஈக்வடார் நேரம்", "UYST": "உருகுவே கோடை நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்", "SRT": "சுரினாம் நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "NZST": "நியூசிலாந்து நிலையான நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "MDT": "மக்காவ் கோடை நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "CLST": "சிலி கோடை நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "IST": "இந்திய நிலையான நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "MYT": "மலேஷிய நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "EST": "கிழக்கத்திய நிலையான நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "CST": "மத்திய நிலையான நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "GYT": "கயானா நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "MST": "மக்காவ் தர நேரம்", "VET": "வெனிசுலா நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "CLT": "சிலி நிலையான நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "BT": "பூடான் நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்"}, -+ timezones: map[string]string{"HNOG": "HNOG", "EST": "EST", "WIB": "WIB", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "MYT": "MYT", "AKDT": "AKDT", "GFT": "GFT", "TMST": "TMST", "CLT": "CLT", "ADT": "ADT", "HAST": "HAST", "WAST": "WAST", "EDT": "EDT", "ACST": "ACST", "AWST": "AWST", "WIT": "WIT", "CAT": "CAT", "GMT": "GMT", "MESZ": "MESZ", "OEZ": "OEZ", "COT": "COT", "∅∅∅": "∅∅∅", "AEST": "AEST", "CHADT": "CHADT", "HECU": "HECU", "AKST": "AKST", "WART": "WART", "ART": "ART", "EAT": "EAT", "HNEG": "HNEG", "JDT": "JDT", "WEZ": "WEZ", "OESZ": "OESZ", "HNT": "HNT", "MEZ": "MEZ", "AWDT": "AWDT", "JST": "JST", "ACWST": "ACWST", "HKT": "HKT", "MST": "MST", "MDT": "MDT", "NZST": "NZST", "NZDT": "NZDT", "BOT": "BOT", "HNPM": "HNPM", "SRT": "SRT", "HADT": "HADT", "SGT": "SGT", "HNCU": "HNCU", "WARST": "WARST", "CLST": "CLST", "WITA": "WITA", "ARST": "ARST", "AEDT": "AEDT", "VET": "VET", "HNPMX": "HNPMX", "WAT": "WAT", "GYT": "GYT", "AST": "AST", "ChST": "ChST", "HEEG": "HEEG", "BT": "BT", "UYST": "UYST", "COST": "COST", "CST": "CST", "HENOMX": "HENOMX", "LHST": "LHST", "HEPM": "HEPM", "UYT": "UYT", "HKST": "HKST", "IST": "IST", "ACWDT": "ACWDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "CDT": "CDT", "LHDT": "LHDT", "PDT": "PDT", "WESZ": "WESZ", "HAT": "HAT", "SAST": "SAST", "HEOG": "HEOG", "TMT": "TMT", "ECT": "ECT", "PST": "PST"}, - } - } -  -@@ -135,7 +116,7 @@ func (ta *ta_SG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ta *ta_SG) MonthsAbbreviated() []string { -- return ta.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +126,7 @@ func (ta *ta_SG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ta *ta_SG) MonthsNarrow() []string { -- return ta.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +136,7 @@ func (ta *ta_SG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ta *ta_SG) MonthsWide() []string { -- return ta.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,7 +183,7 @@ func (ta *ta_SG) WeekdaysWide() []string { - func (ta *ta_SG) FmtNumber(num float64, v uint64) string { -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + 0 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -243,7 +224,7 @@ func (ta *ta_SG) FmtNumber(num float64, v uint64) string { - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ta *ta_SG) FmtPercent(num float64, v uint64) string { - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -+ l := len(s) + 0 - b := make([]byte, 0, l) -  - for i := len(s) - 1; i >= 0; i-- { -@@ -275,7 +256,7 @@ func (ta *ta_SG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -337,7 +318,7 @@ func (ta *ta_SG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ta.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -410,17 +391,6 @@ func (ta *ta_SG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -429,17 +399,6 @@ func (ta *ta_SG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -448,17 +407,6 @@ func (ta *ta_SG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -467,19 +415,6 @@ func (ta *ta_SG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ta.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ta.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -488,29 +423,6 @@ func (ta *ta_SG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -519,36 +431,6 @@ func (ta *ta_SG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -557,40 +439,6 @@ func (ta *ta_SG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -599,44 +447,5 @@ func (ta *ta_SG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, ta.periodsAbbreviated[0]...) -- } else { -- b = append(b, ta.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ta.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ta.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/te/te.go b/te/te.go -index f60459d..0859cb0 100644 ---- a/te/te.go -+++ b/te/te.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"క్రీపూ", "క్రీశ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"క్రీస్తు పూర్వం", "క్రీస్తు శకం"}, -- timezones: map[string]string{"ADT": "అట్లాంటిక్ పగటి సమయం", "WIT": "తూర్పు ఇండోనేషియా సమయం", "HEPM": "సెయింట్ పియర్ మరియు మిక్వెలాన్ పగటి సమయం", "MEZ": "సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం", "MESZ": "సెంట్రల్ యూరోపియన్ వేసవి సమయం", "CHADT": "చాథమ్ పగటి వెలుతురు సమయం", "SAST": "దక్షిణ ఆఫ్రికా ప్రామాణిక సమయం", "CLT": "చిలీ ప్రామాణిక సమయం", "CAT": "సెంట్రల్ ఆఫ్రికా సమయం", "HNT": "న్యూఫౌండ్ ల్యాండ్ ప్రామాణిక సమయం", "ARST": "ఆర్జెంటీనా వేసవి సమయం", "LHST": "లార్డ్ హోవ్ ప్రామాణిక సమయం", "HENOMX": "వాయవ్య మెక్సికో పగటి సమయం", "MST": "మకావ్ ప్రామాణిక సమయం", "UYT": "ఉరుగ్వే ప్రామాణిక సమయం", "AKST": "అలాస్కా ప్రామాణిక సమయం", "HAST": "హవాయ్-అల్యూషియన్ ప్రామాణిక సమయం", "CHAST": "చాథమ్ ప్రామాణిక సమయం", "ACST": "ఆస్ట్రేలియా మధ్యమ ప్రామాణిక సమయం", "ACDT": "ఆస్ట్రేలియా మధ్యమ పగటి సమయం", "OESZ": "తూర్పు యూరోపియన్ వేసవి సమయం", "AKDT": "అలాస్కా పగటి సమయం", "WIB": "పశ్చిమ ఇండోనేషియా సమయం", "SRT": "సూరినామ్ సమయం", "AEDT": "తూర్పు ఆస్ట్రేలియా పగటి సమయం", "AWDT": "పశ్చిమ ఆస్ట్రేలియన్ పగటి సమయం", "IST": "భారతదేశ సమయం", "GFT": "ఫ్రెంచ్ గయానా సమయం", "HNOG": "పశ్చిమ గ్రీన్\u200cల్యాండ్ ప్రామాణిక సమయం", "PDT": "పసిఫిక్ పగటి సమయం", "∅∅∅": "అమెజాన్ వేసవి సమయం", "BOT": "బొలీవియా సమయం", "WART": "పశ్చిమ అర్జెంటీనా ప్రామాణిక సమయం", "WARST": "పశ్చిమ అర్జెంటీనా వేసవి సమయం", "SGT": "సింగపూర్ ప్రామాణిక సమయం", "VET": "వెనిజులా సమయం", "HKT": "హాంకాంగ్ ప్రామాణిక సమయం", "HKST": "హాంకాంగ్ వేసవి సమయం", "WAT": "పశ్చిమ ఆఫ్రికా ప్రామాణిక సమయం", "HNNOMX": "వాయవ్య మెక్సికో ప్రామాణిక సమయం", "EDT": "తూర్పు పగటి సమయం", "HEPMX": "మెక్సికన్ పసిఫిక్ పగటి సమయం", "WEZ": "పశ్చిమ యూరోపియన్ ప్రామాణిక సమయం", "NZDT": "న్యూజిల్యాండ్ పగటి వెలుతురు సమయం", "WAST": "పశ్చిమ ఆఫ్రికా వేసవి సమయం", "AEST": "తూర్పు ఆస్ట్రేలియా ప్రామాణిక సమయం", "HEEG": "తూర్పు గ్రీన్\u200cల్యాండ్ వేసవి సమయం", "OEZ": "తూర్పు యూరోపియన్ ప్రామాణిక సమయం", "EST": "తూర్పు ప్రామాణిక సమయం", "MDT": "మకావ్ వేసవి సమయం", "HAT": "న్యూఫౌండ్ ల్యాండ్ పగటి సమయం", "NZST": "న్యూజిల్యాండ్ ప్రామాణిక సమయం", "TMST": "తుర్క్మెనిస్థాన్ వేసవి సమయం", "EAT": "తూర్పు ఆఫ్రికా సమయం", "CST": "మధ్యమ ప్రామాణిక సమయం", "WITA": "సెంట్రల్ ఇండోనేషియా సమయం", "HNPMX": "మెక్సికన్ పసిఫిక్ ప్రామాణిక సమయం", "BT": "భూటాన్ సమయం", "PST": "పసిఫిక్ ప్రామాణిక సమయం", "JST": "జపాన్ ప్రామాణిక సమయం", "HNEG": "తూర్పు గ్రీన్\u200cల్యాండ్ ప్రామాణిక సమయం", "HECU": "క్యూబా పగటి సమయం", "ACWST": "మధ్యమ ఆస్ట్రేలియా పశ్చిమ ప్రామాణిక సమయం", "LHDT": "లార్డ్ హోవ్ పగటి సమయం", "CLST": "చిలీ వేసవి సమయం", "ECT": "ఈక్వడార్ సమయం", "COT": "కొలంబియా ప్రామాణిక సమయం", "GYT": "గయానా సమయం", "CDT": "మధ్యమ పగటి సమయం", "HEOG": "పశ్చిమ గ్రీన్\u200cల్యాండ్ వేసవి సమయం", "ChST": "చామర్రో ప్రామాణిక సమయం", "COST": "కొలంబియా వేసవి సమయం", "HNCU": "క్యూబా ప్రామాణిక సమయం", "HNPM": "సెయింట్ పియెర్ మరియు మిక్వెలాన్ ప్రామాణిక సమయం", "JDT": "జపాన్ పగటి వెలుతురు సమయం", "TMT": "తుర్క్మెనిస్థాన్ ప్రామాణిక సమయం", "UYST": "ఉరుగ్వే వేసవి సమయం", "AST": "అట్లాంటిక్ ప్రామాణిక సమయం", "ACWDT": "మధ్యమ ఆస్ట్రేలియన్ పశ్చిమ పగటి సమయం", "AWST": "పశ్చిమ ఆస్ట్రేలియన్ ప్రామాణిక సమయం", "GMT": "గ్రీన్\u200cవిచ్ సగటు సమయం", "MYT": "మలేషియా సమయం", "HADT": "హవాయ్-అల్యూషియన్ పగటి వెలుతురు సమయం", "WESZ": "పశ్చిమ యూరోపియన్ వేసవి సమయం", "ART": "అర్జెంటీనా ప్రామాణిక సమయం"}, -+ timezones: map[string]string{"TMST": "తుర్క్మెనిస్థాన్ వేసవి సమయం", "GYT": "గయానా సమయం", "COST": "కొలంబియా వేసవి సమయం", "HNCU": "క్యూబా ప్రామాణిక సమయం", "HECU": "క్యూబా పగటి సమయం", "HNT": "న్యూఫౌండ్ ల్యాండ్ ప్రామాణిక సమయం", "SAST": "దక్షిణ ఆఫ్రికా ప్రామాణిక సమయం", "LHST": "లార్డ్ హోవ్ ప్రామాణిక సమయం", "AWDT": "పశ్చిమ ఆస్ట్రేలియన్ పగటి సమయం", "HEPM": "సెయింట్ పియర్ మరియు మిక్వెలాన్ పగటి సమయం", "UYST": "ఉరుగ్వే వేసవి సమయం", "VET": "వెనిజులా సమయం", "HEPMX": "మెక్సికన్ పసిఫిక్ పగటి సమయం", "WITA": "సెంట్రల్ ఇండోనేషియా సమయం", "ARST": "ఆర్జెంటీనా వేసవి సమయం", "HADT": "హవాయ్-అల్యూషియన్ పగటి వెలుతురు సమయం", "PST": "పసిఫిక్ ప్రామాణిక సమయం", "HKT": "హాంకాంగ్ ప్రామాణిక సమయం", "MDT": "మకావ్ వేసవి సమయం", "NZST": "న్యూజిల్యాండ్ ప్రామాణిక సమయం", "HENOMX": "వాయవ్య మెక్సికో పగటి సమయం", "AWST": "పశ్చిమ ఆస్ట్రేలియన్ ప్రామాణిక సమయం", "JDT": "జపాన్ పగటి వెలుతురు సమయం", "AKDT": "అలాస్కా పగటి సమయం", "OESZ": "తూర్పు యూరోపియన్ వేసవి సమయం", "EDT": "తూర్పు పగటి సమయం", "HKST": "హాంకాంగ్ వేసవి సమయం", "ChST": "చామర్రో ప్రామాణిక సమయం", "BOT": "బొలీవియా సమయం", "SRT": "సూరినామ్ సమయం", "MESZ": "సెంట్రల్ యూరోపియన్ వేసవి సమయం", "MYT": "మలేషియా సమయం", "CHADT": "చాథమ్ పగటి వెలుతురు సమయం", "HEOG": "పశ్చిమ గ్రీన్\u200cల్యాండ్ వేసవి సమయం", "AST": "అట్లాంటిక్ ప్రామాణిక సమయం", "GFT": "ఫ్రెంచ్ గయానా సమయం", "WART": "పశ్చిమ అర్జెంటీనా ప్రామాణిక సమయం", "HAST": "హవాయ్-అల్యూషియన్ ప్రామాణిక సమయం", "IST": "భారతదేశ సమయం", "CAT": "సెంట్రల్ ఆఫ్రికా సమయం", "ART": "అర్జెంటీనా ప్రామాణిక సమయం", "EAT": "తూర్పు ఆఫ్రికా సమయం", "ACWST": "మధ్యమ ఆస్ట్రేలియా పశ్చిమ ప్రామాణిక సమయం", "WEZ": "పశ్చిమ యూరోపియన్ ప్రామాణిక సమయం", "WIT": "తూర్పు ఇండోనేషియా సమయం", "HNOG": "పశ్చిమ గ్రీన్\u200cల్యాండ్ ప్రామాణిక సమయం", "WIB": "పశ్చిమ ఇండోనేషియా సమయం", "HNEG": "తూర్పు గ్రీన్\u200cల్యాండ్ ప్రామాణిక సమయం", "AEST": "తూర్పు ఆస్ట్రేలియా ప్రామాణిక సమయం", "∅∅∅": "బ్రెజిలియా వేసవి సమయం", "ADT": "అట్లాంటిక్ పగటి సమయం", "UYT": "ఉరుగ్వే ప్రామాణిక సమయం", "AEDT": "తూర్పు ఆస్ట్రేలియా పగటి సమయం", "HNPMX": "మెక్సికన్ పసిఫిక్ ప్రామాణిక సమయం", "WAT": "పశ్చిమ ఆఫ్రికా ప్రామాణిక సమయం", "AKST": "అలాస్కా ప్రామాణిక సమయం", "CLT": "చిలీ ప్రామాణిక సమయం", "ACST": "ఆస్ట్రేలియా మధ్యమ ప్రామాణిక సమయం", "HNPM": "సెయింట్ పియెర్ మరియు మిక్వెలాన్ ప్రామాణిక సమయం", "OEZ": "తూర్పు యూరోపియన్ ప్రామాణిక సమయం", "CST": "మధ్యమ ప్రామాణిక సమయం", "CDT": "మధ్యమ పగటి సమయం", "CHAST": "చాథమ్ ప్రామాణిక సమయం", "ACWDT": "మధ్యమ ఆస్ట్రేలియన్ పశ్చిమ పగటి సమయం", "EST": "తూర్పు ప్రామాణిక సమయం", "CLST": "చిలీ వేసవి సమయం", "HEEG": "తూర్పు గ్రీన్\u200cల్యాండ్ వేసవి సమయం", "LHDT": "లార్డ్ హోవ్ పగటి సమయం", "PDT": "పసిఫిక్ పగటి సమయం", "BT": "భూటాన్ సమయం", "TMT": "తుర్క్మెనిస్థాన్ ప్రామాణిక సమయం", "GMT": "గ్రీన్\u200cవిచ్ సగటు సమయం", "MEZ": "సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం", "ACDT": "ఆస్ట్రేలియా మధ్యమ పగటి సమయం", "JST": "జపాన్ ప్రామాణిక సమయం", "WESZ": "పశ్చిమ యూరోపియన్ వేసవి సమయం", "NZDT": "న్యూజిల్యాండ్ పగటి వెలుతురు సమయం", "ECT": "ఈక్వడార్ సమయం", "SGT": "సింగపూర్ ప్రామాణిక సమయం", "WAST": "పశ్చిమ ఆఫ్రికా వేసవి సమయం", "HAT": "న్యూఫౌండ్ ల్యాండ్ పగటి సమయం", "WARST": "పశ్చిమ అర్జెంటీనా వేసవి సమయం", "MST": "మకావ్ ప్రామాణిక సమయం", "HNNOMX": "వాయవ్య మెక్సికో ప్రామాణిక సమయం", "COT": "కొలంబియా ప్రామాణిక సమయం"}, - } - } -  -diff --git a/te_IN/te_IN.go b/te_IN/te_IN.go -index 7c72435..275f87e 100644 ---- a/te_IN/te_IN.go -+++ b/te_IN/te_IN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type te_IN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'te_IN' locale - func New() locales.Translator { - return &te_IN{ -- locale: "te_IN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "జన", "ఫిబ్ర", "మార్చి", "ఏప్రి", "మే", "జూన్", "జులై", "ఆగ", "సెప్టెం", "అక్టో", "నవం", "డిసెం"}, -- monthsNarrow: []string{"", "జ", "ఫి", "మా", "ఏ", "మే", "జూ", "జు", "ఆ", "సె", "అ", "న", "డి"}, -- monthsWide: []string{"", "జనవరి", "ఫిబ్రవరి", "మార్చి", "ఏప్రిల్", "మే", "జూన్", "జులై", "ఆగస్టు", "సెప్టెంబర్", "అక్టోబర్", "నవంబర్", "డిసెంబర్"}, -- daysAbbreviated: []string{"ఆది", "సోమ", "మంగళ", "బుధ", "గురు", "శుక్ర", "శని"}, -- daysNarrow: []string{"ఆ", "సో", "మ", "బు", "గు", "శు", "శ"}, -- daysShort: []string{"ఆది", "సోమ", "మం", "బుధ", "గురు", "శుక్ర", "శని"}, -- daysWide: []string{"ఆదివారం", "సోమవారం", "మంగళవారం", "బుధవారం", "గురువారం", "శుక్రవారం", "శనివారం"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"ఉ", "సా"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"క్రీపూ", "క్రీశ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"క్రీస్తు పూర్వం", "క్రీస్తు శకం"}, -- timezones: map[string]string{"GFT": "ఫ్రెంచ్ గయానా సమయం", "WARST": "పశ్చిమ అర్జెంటీనా వేసవి సమయం", "PST": "పసిఫిక్ ప్రామాణిక సమయం", "PDT": "పసిఫిక్ పగటి సమయం", "ACWST": "మధ్యమ ఆస్ట్రేలియా పశ్చిమ ప్రామాణిక సమయం", "AEST": "తూర్పు ఆస్ట్రేలియా ప్రామాణిక సమయం", "AWDT": "పశ్చిమ ఆస్ట్రేలియన్ పగటి సమయం", "NZST": "న్యూజిల్యాండ్ ప్రామాణిక సమయం", "MESZ": "సెంట్రల్ యూరోపియన్ వేసవి సమయం", "CAT": "సెంట్రల్ ఆఫ్రికా సమయం", "COST": "కొలంబియా వేసవి సమయం", "GMT": "గ్రీన్\u200cవిచ్ సగటు సమయం", "HEPMX": "మెక్సికన్ పసిఫిక్ పగటి సమయం", "MYT": "మలేషియా సమయం", "HAST": "హవాయ్-అల్యూషియన్ ప్రామాణిక సమయం", "WITA": "సెంట్రల్ ఇండోనేషియా సమయం", "CHADT": "చాథమ్ పగటి వెలుతురు సమయం", "WAT": "పశ్చిమ ఆఫ్రికా ప్రామాణిక సమయం", "MST": "మకావ్ ప్రామాణిక సమయం", "WIB": "పశ్చిమ ఇండోనేషియా సమయం", "HEPM": "సెయింట్ పియర్ మరియు మిక్వెలాన్ పగటి సమయం", "CDT": "మధ్యమ పగటి సమయం", "HADT": "హవాయ్-అల్యూషియన్ పగటి వెలుతురు సమయం", "NZDT": "న్యూజిల్యాండ్ పగటి వెలుతురు సమయం", "CLST": "చిలీ వేసవి సమయం", "TMST": "తుర్క్మెనిస్థాన్ వేసవి సమయం", "WAST": "పశ్చిమ ఆఫ్రికా వేసవి సమయం", "VET": "వెనిజులా సమయం", "HNPMX": "మెక్సికన్ పసిఫిక్ ప్రామాణిక సమయం", "BOT": "బొలీవియా సమయం", "OEZ": "తూర్పు యూరోపియన్ ప్రామాణిక సమయం", "OESZ": "తూర్పు యూరోపియన్ వేసవి సమయం", "∅∅∅": "పెరూ వేసవి సమయం", "JST": "జపాన్ ప్రామాణిక సమయం", "ChST": "చామర్రో ప్రామాణిక సమయం", "TMT": "తుర్క్మెనిస్థాన్ ప్రామాణిక సమయం", "EST": "తూర్పు ప్రామాణిక సమయం", "MDT": "మకావ్ వేసవి సమయం", "AKDT": "అలాస్కా పగటి సమయం", "WEZ": "పశ్చిమ యూరోపియన్ ప్రామాణిక సమయం", "HAT": "న్యూఫౌండ్ ల్యాండ్ పగటి సమయం", "HNEG": "తూర్పు గ్రీన్\u200cల్యాండ్ ప్రామాణిక సమయం", "IST": "భారతదేశ సమయం", "HNCU": "క్యూబా ప్రామాణిక సమయం", "HECU": "క్యూబా పగటి సమయం", "AKST": "అలాస్కా ప్రామాణిక సమయం", "WESZ": "పశ్చిమ యూరోపియన్ వేసవి సమయం", "AWST": "పశ్చిమ ఆస్ట్రేలియన్ ప్రామాణిక సమయం", "HKT": "హాంకాంగ్ ప్రామాణిక సమయం", "CHAST": "చాథమ్ ప్రామాణిక సమయం", "CLT": "చిలీ ప్రామాణిక సమయం", "HNOG": "పశ్చిమ గ్రీన్\u200cల్యాండ్ ప్రామాణిక సమయం", "HNPM": "సెయింట్ పియెర్ మరియు మిక్వెలాన్ ప్రామాణిక సమయం", "LHST": "లార్డ్ హోవ్ ప్రామాణిక సమయం", "LHDT": "లార్డ్ హోవ్ పగటి సమయం", "JDT": "జపాన్ పగటి వెలుతురు సమయం", "GYT": "గయానా సమయం", "WIT": "తూర్పు ఇండోనేషియా సమయం", "ART": "అర్జెంటీనా ప్రామాణిక సమయం", "HEOG": "పశ్చిమ గ్రీన్\u200cల్యాండ్ వేసవి సమయం", "HNNOMX": "వాయవ్య మెక్సికో ప్రామాణిక సమయం", "UYT": "ఉరుగ్వే ప్రామాణిక సమయం", "ACST": "ఆస్ట్రేలియా మధ్యమ ప్రామాణిక సమయం", "EAT": "తూర్పు ఆఫ్రికా సమయం", "ACWDT": "మధ్యమ ఆస్ట్రేలియన్ పశ్చిమ పగటి సమయం", "HNT": "న్యూఫౌండ్ ల్యాండ్ ప్రామాణిక సమయం", "AEDT": "తూర్పు ఆస్ట్రేలియా పగటి సమయం", "SAST": "దక్షిణ ఆఫ్రికా ప్రామాణిక సమయం", "SRT": "సూరినామ్ సమయం", "ACDT": "ఆస్ట్రేలియా మధ్యమ పగటి సమయం", "ECT": "ఈక్వడార్ సమయం", "HENOMX": "వాయవ్య మెక్సికో పగటి సమయం", "SGT": "సింగపూర్ ప్రామాణిక సమయం", "CST": "మధ్యమ ప్రామాణిక సమయం", "AST": "అట్లాంటిక్ ప్రామాణిక సమయం", "BT": "భూటాన్ సమయం", "HKST": "హాంకాంగ్ వేసవి సమయం", "MEZ": "సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం", "COT": "కొలంబియా ప్రామాణిక సమయం", "EDT": "తూర్పు పగటి సమయం", "ARST": "ఆర్జెంటీనా వేసవి సమయం", "WART": "పశ్చిమ అర్జెంటీనా ప్రామాణిక సమయం", "ADT": "అట్లాంటిక్ పగటి సమయం", "UYST": "ఉరుగ్వే వేసవి సమయం", "HEEG": "తూర్పు గ్రీన్\u200cల్యాండ్ వేసవి సమయం"}, -+ locale: "te_IN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "WARST": "WARST", "CAT": "CAT", "CLST": "CLST", "CST": "CST", "MST": "MST", "PDT": "PDT", "UYST": "UYST", "WESZ": "WESZ", "GYT": "GYT", "WIB": "WIB", "MDT": "MDT", "HAST": "HAST", "HADT": "HADT", "HNNOMX": "HNNOMX", "JDT": "JDT", "OESZ": "OESZ", "HKT": "HKT", "ART": "ART", "HEEG": "HEEG", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "OEZ": "OEZ", "HEOG": "HEOG", "EDT": "EDT", "CDT": "CDT", "ARST": "ARST", "HENOMX": "HENOMX", "CHAST": "CHAST", "UYT": "UYT", "ChST": "ChST", "JST": "JST", "PST": "PST", "AEDT": "AEDT", "WEZ": "WEZ", "SAST": "SAST", "AWST": "AWST", "ACST": "ACST", "AKST": "AKST", "COST": "COST", "SRT": "SRT", "IST": "IST", "BT": "BT", "HNPMX": "HNPMX", "WAT": "WAT", "COT": "COT", "EST": "EST", "HKST": "HKST", "LHDT": "LHDT", "AWDT": "AWDT", "MYT": "MYT", "AKDT": "AKDT", "HNOG": "HNOG", "EAT": "EAT", "HNEG": "HNEG", "HNPM": "HNPM", "ACWDT": "ACWDT", "AEST": "AEST", "CHADT": "CHADT", "VET": "VET", "CLT": "CLT", "MESZ": "MESZ", "ECT": "ECT", "NZDT": "NZDT", "WIT": "WIT", "HNT": "HNT", "WITA": "WITA", "BOT": "BOT", "MEZ": "MEZ", "ACDT": "ACDT", "HEPM": "HEPM", "WART": "WART", "TMT": "TMT", "GMT": "GMT", "SGT": "SGT", "GFT": "GFT", "NZST": "NZST", "ADT": "ADT", "HAT": "HAT", "AST": "AST", "ACWST": "ACWST", "HECU": "HECU", "WAST": "WAST", "TMST": "TMST", "LHST": "LHST"}, - } - } -  -@@ -135,7 +112,7 @@ func (te *te_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (te *te_IN) MonthsAbbreviated() []string { -- return te.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (te *te_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (te *te_IN) MonthsNarrow() []string { -- return te.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (te *te_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (te *te_IN) MonthsWide() []string { -- return te.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,82 +178,13 @@ func (te *te_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'te_IN' and handles both Whole and Real numbers based on 'v' - func (te *te_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, te.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, te.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, te.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'te_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (te *te_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, te.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, te.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, te.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'te_IN' -@@ -284,65 +192,7 @@ func (te *te_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := te.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, te.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, te.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, te.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, te.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'te_IN' -@@ -351,77 +201,7 @@ func (te *te_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := te.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- inSecondary := false -- groupThreshold := 3 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, te.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- -- if count == groupThreshold { -- b = append(b, te.group[0]) -- count = 1 -- -- if !inSecondary { -- inSecondary = true -- groupThreshold = 2 -- } -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, te.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, te.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, te.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'te_IN' -@@ -429,27 +209,6 @@ func (te *te_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -458,17 +217,6 @@ func (te *te_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, te.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -477,17 +225,6 @@ func (te *te_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, te.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -496,20 +233,6 @@ func (te *te_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, te.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, te.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -518,28 +241,6 @@ func (te *te_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, te.periodsAbbreviated[0]...) -- } else { -- b = append(b, te.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -548,35 +249,6 @@ func (te *te_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, te.periodsAbbreviated[0]...) -- } else { -- b = append(b, te.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -585,40 +257,6 @@ func (te *te_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, te.periodsAbbreviated[0]...) -- } else { -- b = append(b, te.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -627,44 +265,5 @@ func (te *te_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, te.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, te.periodsAbbreviated[0]...) -- } else { -- b = append(b, te.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := te.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/teo/teo.go b/teo/teo.go -index 1e00e05..1601430 100644 ---- a/teo/teo.go -+++ b/teo/teo.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Christo", "Baada ya Christo"}, -- timezones: map[string]string{"HKST": "HKST", "OEZ": "OEZ", "COST": "COST", "EST": "EST", "ART": "ART", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "WART": "WART", "SGT": "SGT", "EDT": "EDT", "HADT": "HADT", "VET": "VET", "PST": "PST", "ChST": "ChST", "ACST": "ACST", "EAT": "EAT", "HNCU": "HNCU", "HNPMX": "HNPMX", "WIT": "WIT", "PDT": "PDT", "ACWST": "ACWST", "WITA": "WITA", "COT": "COT", "AKST": "AKST", "ARST": "ARST", "HKT": "HKT", "CAT": "CAT", "WAT": "WAT", "MST": "MST", "WIB": "WIB", "NZDT": "NZDT", "WAST": "WAST", "SRT": "SRT", "AEST": "AEST", "CHAST": "CHAST", "AST": "AST", "HEEG": "HEEG", "ACDT": "ACDT", "WESZ": "WESZ", "HEPM": "HEPM", "CHADT": "CHADT", "LHST": "LHST", "LHDT": "LHDT", "CLT": "CLT", "AKDT": "AKDT", "HNT": "HNT", "ACWDT": "ACWDT", "AWDT": "AWDT", "MESZ": "MESZ", "NZST": "NZST", "IST": "IST", "WEZ": "WEZ", "AEDT": "AEDT", "TMST": "TMST", "GYT": "GYT", "CST": "CST", "CDT": "CDT", "HAT": "HAT", "JST": "JST", "HNEG": "HNEG", "WARST": "WARST", "GMT": "GMT", "MDT": "MDT", "HEPMX": "HEPMX", "BT": "BT", "AWST": "AWST", "HNPM": "HNPM", "SAST": "SAST", "CLST": "CLST", "TMT": "TMT", "ECT": "ECT", "JDT": "JDT", "OESZ": "OESZ", "HENOMX": "HENOMX", "HECU": "HECU", "UYT": "UYT", "UYST": "UYST", "GFT": "GFT", "MYT": "MYT", "HAST": "HAST", "HEOG": "HEOG", "MEZ": "MEZ", "BOT": "BOT", "HNNOMX": "HNNOMX", "ADT": "ADT"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "AKST": "AKST", "CLT": "CLT", "CLST": "CLST", "NZDT": "NZDT", "JST": "JST", "ACWDT": "ACWDT", "WEZ": "WEZ", "WARST": "WARST", "ECT": "ECT", "LHST": "LHST", "LHDT": "LHDT", "GFT": "GFT", "AEST": "AEST", "SGT": "SGT", "WAST": "WAST", "HADT": "HADT", "AWST": "AWST", "IST": "IST", "GMT": "GMT", "HNNOMX": "HNNOMX", "SAST": "SAST", "CST": "CST", "HNPM": "HNPM", "WESZ": "WESZ", "WIT": "WIT", "COT": "COT", "EDT": "EDT", "MDT": "MDT", "SRT": "SRT", "HENOMX": "HENOMX", "ART": "ART", "ARST": "ARST", "MYT": "MYT", "HECU": "HECU", "HKT": "HKT", "TMT": "TMT", "AEDT": "AEDT", "WART": "WART", "HKST": "HKST", "MST": "MST", "∅∅∅": "∅∅∅", "PST": "PST", "NZST": "NZST", "AST": "AST", "HNCU": "HNCU", "OESZ": "OESZ", "GYT": "GYT", "VET": "VET", "HAT": "HAT", "HEOG": "HEOG", "CDT": "CDT", "MEZ": "MEZ", "PDT": "PDT", "ACWST": "ACWST", "AKDT": "AKDT", "CAT": "CAT", "ADT": "ADT", "HAST": "HAST", "AWDT": "AWDT", "CHAST": "CHAST", "HEPM": "HEPM", "OEZ": "OEZ", "HNT": "HNT", "EAT": "EAT", "ACST": "ACST", "HNEG": "HNEG", "CHADT": "CHADT", "HEPMX": "HEPMX", "WIB": "WIB", "ChST": "ChST", "BOT": "BOT", "MESZ": "MESZ", "HEEG": "HEEG", "HNOG": "HNOG", "JDT": "JDT", "UYST": "UYST", "BT": "BT", "COST": "COST", "EST": "EST", "TMST": "TMST", "WITA": "WITA", "ACDT": "ACDT", "UYT": "UYT", "WAT": "WAT"}, - } - } -  -diff --git a/teo_KE/teo_KE.go b/teo_KE/teo_KE.go -index e27d25c..3104167 100644 ---- a/teo_KE/teo_KE.go -+++ b/teo_KE/teo_KE.go -@@ -10,60 +10,45 @@ import ( - ) -  - type teo_KE struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'teo_KE' locale - func New() locales.Translator { - return &teo_KE{ -- locale: "teo_KE", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Rar", "Muk", "Kwa", "Dun", "Mar", "Mod", "Jol", "Ped", "Sok", "Tib", "Lab", "Poo"}, -- monthsNarrow: []string{"", "R", "M", "K", "D", "M", "M", "J", "P", "S", "T", "L", "P"}, -- monthsWide: []string{"", "Orara", "Omuk", "Okwamg’", "Odung’el", "Omaruk", "Omodok’king’ol", "Ojola", "Opedel", "Osokosokoma", "Otibar", "Olabor", "Opoo"}, -- daysAbbreviated: []string{"Jum", "Bar", "Aar", "Uni", "Ung", "Kan", "Sab"}, -- daysNarrow: []string{"J", "B", "A", "U", "U", "K", "S"}, -- daysWide: []string{"Nakaejuma", "Nakaebarasa", "Nakaare", "Nakauni", "Nakaung’on", "Nakakany", "Nakasabiti"}, -- periodsAbbreviated: []string{"Taparachu", "Ebongi"}, -- periodsWide: []string{"Taparachu", "Ebongi"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Christo", "Baada ya Christo"}, -- timezones: map[string]string{"AWDT": "AWDT", "HKST": "HKST", "UYT": "UYT", "WIT": "WIT", "SRT": "SRT", "WITA": "WITA", "ChST": "ChST", "WAST": "WAST", "OEZ": "OEZ", "MST": "MST", "WIB": "WIB", "PST": "PST", "MESZ": "MESZ", "WAT": "WAT", "TMT": "TMT", "HNNOMX": "HNNOMX", "NZST": "NZST", "JDT": "JDT", "HNEG": "HNEG", "CAT": "CAT", "GMT": "GMT", "CST": "CST", "HEOG": "HEOG", "HAT": "HAT", "CHAST": "CHAST", "JST": "JST", "WART": "WART", "EST": "EST", "GYT": "GYT", "HAST": "HAST", "WEZ": "WEZ", "ACWST": "ACWST", "SAST": "SAST", "ECT": "ECT", "SGT": "SGT", "WESZ": "WESZ", "MEZ": "MEZ", "ACST": "ACST", "PDT": "PDT", "EAT": "EAT", "HENOMX": "HENOMX", "ADT": "ADT", "BT": "BT", "ACWDT": "ACWDT", "AEST": "AEST", "CLT": "CLT", "EDT": "EDT", "HNCU": "HNCU", "AKDT": "AKDT", "HADT": "HADT", "HNOG": "HNOG", "ARST": "ARST", "CLST": "CLST", "OESZ": "OESZ", "COT": "COT", "AKST": "AKST", "CDT": "CDT", "LHDT": "LHDT", "TMST": "TMST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "IST": "IST", "GFT": "GFT", "HECU": "HECU", "AEDT": "AEDT", "AWST": "AWST", "HEEG": "HEEG", "ACDT": "ACDT", "ART": "ART", "LHST": "LHST", "∅∅∅": "∅∅∅", "HKT": "HKT", "HNPM": "HNPM", "HEPM": "HEPM", "CHADT": "CHADT", "HNT": "HNT", "WARST": "WARST", "COST": "COST", "MDT": "MDT", "MYT": "MYT", "UYST": "UYST", "AST": "AST", "NZDT": "NZDT", "BOT": "BOT", "VET": "VET"}, -+ locale: "teo_KE", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "Ksh", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"TMT": "TMT", "MST": "MST", "AST": "AST", "ACWST": "ACWST", "WIT": "WIT", "HNT": "HNT", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "CST": "CST", "LHST": "LHST", "EAT": "EAT", "WAT": "WAT", "COT": "COT", "HKT": "HKT", "HKST": "HKST", "SRT": "SRT", "ChST": "ChST", "GMT": "GMT", "HAST": "HAST", "ACDT": "ACDT", "OESZ": "OESZ", "GFT": "GFT", "GYT": "GYT", "ECT": "ECT", "AKST": "AKST", "HEPM": "HEPM", "JST": "JST", "AEST": "AEST", "PST": "PST", "UYST": "UYST", "VET": "VET", "HECU": "HECU", "HEPMX": "HEPMX", "HAT": "HAT", "NZST": "NZST", "NZDT": "NZDT", "ACWDT": "ACWDT", "WAST": "WAST", "AEDT": "AEDT", "CHADT": "CHADT", "IST": "IST", "WEZ": "WEZ", "OEZ": "OEZ", "HADT": "HADT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "CAT": "CAT", "ARST": "ARST", "ACST": "ACST", "AKDT": "AKDT", "TMST": "TMST", "WART": "WART", "SAST": "SAST", "HNPMX": "HNPMX", "CHAST": "CHAST", "WESZ": "WESZ", "WARST": "WARST", "HEEG": "HEEG", "MEZ": "MEZ", "AWDT": "AWDT", "WIB": "WIB", "CDT": "CDT", "ADT": "ADT", "BT": "BT", "PDT": "PDT", "COST": "COST", "BOT": "BOT", "MESZ": "MESZ", "AWST": "AWST", "MYT": "MYT", "HNOG": "HNOG", "CLT": "CLT", "MDT": "MDT", "ART": "ART", "HENOMX": "HENOMX", "JDT": "JDT", "LHDT": "LHDT", "EST": "EST", "CLST": "CLST", "WITA": "WITA", "HNEG": "HNEG", "EDT": "EDT", "UYT": "UYT", "SGT": "SGT"}, - } - } -  -@@ -116,7 +101,7 @@ func (teo *teo_KE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (teo *teo_KE) MonthsAbbreviated() []string { -- return teo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (teo *teo_KE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (teo *teo_KE) MonthsNarrow() []string { -- return teo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (teo *teo_KE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (teo *teo_KE) MonthsWide() []string { -- return teo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (teo *teo_KE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := teo.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, teo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, teo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, teo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, teo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'teo_KE' -@@ -254,68 +190,7 @@ func (teo *teo_KE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := teo.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, teo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, teo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, teo.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, teo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, teo.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'teo_KE' -@@ -323,27 +198,6 @@ func (teo *teo_KE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -352,17 +206,6 @@ func (teo *teo_KE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, teo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,17 +214,6 @@ func (teo *teo_KE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, teo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -390,19 +222,6 @@ func (teo *teo_KE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, teo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, teo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -411,19 +230,6 @@ func (teo *teo_KE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -432,26 +238,6 @@ func (teo *teo_KE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -460,30 +246,6 @@ func (teo *teo_KE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -492,34 +254,5 @@ func (teo *teo_KE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := teo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/teo_UG/teo_UG.go b/teo_UG/teo_UG.go -index 3196e39..f75b7bb 100644 ---- a/teo_UG/teo_UG.go -+++ b/teo_UG/teo_UG.go -@@ -10,60 +10,45 @@ import ( - ) -  - type teo_UG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'teo_UG' locale - func New() locales.Translator { - return &teo_UG{ -- locale: "teo_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Rar", "Muk", "Kwa", "Dun", "Mar", "Mod", "Jol", "Ped", "Sok", "Tib", "Lab", "Poo"}, -- monthsNarrow: []string{"", "R", "M", "K", "D", "M", "M", "J", "P", "S", "T", "L", "P"}, -- monthsWide: []string{"", "Orara", "Omuk", "Okwamg’", "Odung’el", "Omaruk", "Omodok’king’ol", "Ojola", "Opedel", "Osokosokoma", "Otibar", "Olabor", "Opoo"}, -- daysAbbreviated: []string{"Jum", "Bar", "Aar", "Uni", "Ung", "Kan", "Sab"}, -- daysNarrow: []string{"J", "B", "A", "U", "U", "K", "S"}, -- daysWide: []string{"Nakaejuma", "Nakaebarasa", "Nakaare", "Nakauni", "Nakaung’on", "Nakakany", "Nakasabiti"}, -- periodsAbbreviated: []string{"Taparachu", "Ebongi"}, -- periodsWide: []string{"Taparachu", "Ebongi"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Christo", "Baada ya Christo"}, -- timezones: map[string]string{"MDT": "MDT", "COST": "COST", "UYT": "UYT", "AST": "AST", "BT": "BT", "WITA": "WITA", "SAST": "SAST", "JST": "JST", "VET": "VET", "PST": "PST", "ACWDT": "ACWDT", "CHAST": "CHAST", "WAST": "WAST", "WEZ": "WEZ", "HNT": "HNT", "CLST": "CLST", "WAT": "WAT", "UYST": "UYST", "MYT": "MYT", "MST": "MST", "ADT": "ADT", "HAST": "HAST", "WIT": "WIT", "HKT": "HKT", "NZDT": "NZDT", "ACST": "ACST", "ACDT": "ACDT", "OEZ": "OEZ", "SRT": "SRT", "ARST": "ARST", "HEEG": "HEEG", "HAT": "HAT", "AWDT": "AWDT", "CHADT": "CHADT", "TMT": "TMT", "EAT": "EAT", "HNCU": "HNCU", "CDT": "CDT", "HNPM": "HNPM", "LHST": "LHST", "LHDT": "LHDT", "IST": "IST", "OESZ": "OESZ", "HADT": "HADT", "PDT": "PDT", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "BOT": "BOT", "TMST": "TMST", "CAT": "CAT", "SGT": "SGT", "HECU": "HECU", "HEPMX": "HEPMX", "ART": "ART", "AWST": "AWST", "HNPMX": "HNPMX", "CST": "CST", "GYT": "GYT", "WIB": "WIB", "HNOG": "HNOG", "HKST": "HKST", "HEPM": "HEPM", "WARST": "WARST", "ACWST": "ACWST", "MEZ": "MEZ", "COT": "COT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AKST": "AKST", "WESZ": "WESZ", "CLT": "CLT", "GFT": "GFT", "ECT": "ECT", "WART": "WART", "AKDT": "AKDT", "HNEG": "HNEG", "GMT": "GMT", "EST": "EST", "EDT": "EDT", "HEOG": "HEOG", "AEST": "AEST", "AEDT": "AEDT", "NZST": "NZST", "JDT": "JDT", "ChST": "ChST"}, -+ locale: "teo_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"COST": "COST", "ART": "ART", "HNPM": "HNPM", "OESZ": "OESZ", "WART": "WART", "EST": "EST", "TMST": "TMST", "ChST": "ChST", "BOT": "BOT", "UYT": "UYT", "VET": "VET", "HNPMX": "HNPMX", "AKST": "AKST", "AKDT": "AKDT", "GYT": "GYT", "AWST": "AWST", "EDT": "EDT", "CLST": "CLST", "IST": "IST", "BT": "BT", "HAT": "HAT", "HKT": "HKT", "TMT": "TMT", "ECT": "ECT", "MESZ": "MESZ", "AEDT": "AEDT", "HECU": "HECU", "GFT": "GFT", "COT": "COT", "HKST": "HKST", "CAT": "CAT", "WITA": "WITA", "GMT": "GMT", "HAST": "HAST", "JDT": "JDT", "ACWST": "ACWST", "AEST": "AEST", "CHADT": "CHADT", "ADT": "ADT", "MEZ": "MEZ", "AWDT": "AWDT", "HNT": "HNT", "EAT": "EAT", "ACDT": "ACDT", "SGT": "SGT", "ACST": "ACST", "PDT": "PDT", "UYST": "UYST", "WAST": "WAST", "OEZ": "OEZ", "SAST": "SAST", "CST": "CST", "SRT": "SRT", "HNEG": "HNEG", "LHST": "LHST", "MYT": "MYT", "JST": "JST", "WESZ": "WESZ", "WIT": "WIT", "∅∅∅": "∅∅∅", "ARST": "ARST", "WAT": "WAT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "HNCU": "HNCU", "HADT": "HADT", "PST": "PST", "CHAST": "CHAST", "WARST": "WARST", "CDT": "CDT", "MST": "MST", "WIB": "WIB", "AST": "AST", "LHDT": "LHDT", "MDT": "MDT", "NZDT": "NZDT", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "WEZ": "WEZ", "HNOG": "HNOG", "HEOG": "HEOG", "CLT": "CLT", "NZST": "NZST", "HEPMX": "HEPMX"}, - } - } -  -@@ -116,7 +101,7 @@ func (teo *teo_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (teo *teo_UG) MonthsAbbreviated() []string { -- return teo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (teo *teo_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (teo *teo_UG) MonthsNarrow() []string { -- return teo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (teo *teo_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (teo *teo_UG) MonthsWide() []string { -- return teo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (teo *teo_UG) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := teo.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, teo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, teo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, teo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, teo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'teo_UG' -@@ -254,68 +190,7 @@ func (teo *teo_UG) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := teo.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, teo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, teo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, teo.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, teo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, teo.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'teo_UG' -@@ -323,27 +198,6 @@ func (teo *teo_UG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -352,17 +206,6 @@ func (teo *teo_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, teo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -371,17 +214,6 @@ func (teo *teo_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, teo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -390,19 +222,6 @@ func (teo *teo_UG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, teo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, teo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -411,19 +230,6 @@ func (teo *teo_UG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -432,26 +238,6 @@ func (teo *teo_UG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -460,30 +246,6 @@ func (teo *teo_UG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -492,34 +254,5 @@ func (teo *teo_UG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, teo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := teo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/th/th.go b/th/th.go -index 097c7d6..95f53bc 100644 ---- a/th/th.go -+++ b/th/th.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ปีก่อน ค.ศ.", "ค.ศ."}, - erasNarrow: []string{"ก่อน ค.ศ.", "ค.ศ."}, - erasWide: []string{"ปีก่อนคริสต์ศักราช", "คริสต์ศักราช"}, -- timezones: map[string]string{"IST": "เวลาอินเดีย", "SGT": "เวลาสิงคโปร์", "CDT": "เวลาออมแสงตอนกลางในอเมริกาเหนือ", "BT": "เวลาภูฏาน", "AEDT": "เวลาออมแสงทางตะวันออกของออสเตรเลีย", "AWST": "เวลามาตรฐานทางตะวันตกของออสเตรเลีย", "CHADT": "เวลาออมแสงแชทัม", "BOT": "เวลาโบลิเวีย", "LHDT": "เวลาออมแสงลอร์ดโฮว์", "CLST": "เวลาฤดูร้อนชิลี", "ChST": "เวลาชามอร์โร", "WARST": "เวลาฤดูร้อนทางตะวันตกของอาร์เจนตินา", "MDT": "เวลาฤดูร้อนมาเก๊า", "CST": "เวลามาตรฐานตอนกลางในอเมริกาเหนือ", "UYT": "เวลามาตรฐานอุรุกวัย", "SRT": "เวลาซูรินาเม", "ARST": "เวลาฤดูร้อนอาร์เจนตินา", "HKT": "เวลามาตรฐานฮ่องกง", "GFT": "เวลาเฟรนช์เกียนา", "HEPMX": "เวลาออมแสงแปซิฟิกเม็กซิโก", "ECT": "เวลาเอกวาดอร์", "WART": "เวลามาตรฐานทางตะวันตกของอาร์เจนตินา", "HADT": "เวลาออมแสงฮาวาย-อะลูเชียน", "HEOG": "เวลาฤดูร้อนกรีนแลนด์ตะวันตก", "WITA": "เวลาอินโดนีเซียตอนกลาง", "MESZ": "เวลาฤดูร้อนยุโรปกลาง", "HNEG": "เวลามาตรฐานกรีนแลนด์ตะวันออก", "HKST": "เวลาฤดูร้อนฮ่องกง", "∅∅∅": "เวลาฤดูร้อนแอมะซอน", "COT": "เวลามาตรฐานโคลอมเบีย", "LHST": "เวลามาตรฐานลอร์ดโฮว์", "JDT": "เวลาออมแสงญี่ปุ่น", "GMT": "เวลามาตรฐานกรีนิช", "HAST": "เวลามาตรฐานฮาวาย-อะลูเชียน", "ACWDT": "เวลาออมแสงทางตะวันตกตอนกลางของออสเตรเลีย", "ART": "เวลามาตรฐานอาร์เจนตินา", "WEZ": "เวลามาตรฐานยุโรปตะวันตก", "AEST": "เวลามาตรฐานทางตะวันออกของออสเตรเลีย", "ADT": "เวลาออมแสงของแอตแลนติก", "MST": "เวลามาตรฐานมาเก๊า", "MYT": "เวลามาเลเซีย", "EDT": "เวลาออมแสงทางตะวันออกในอเมริกาเหนือ", "AKST": "เวลามาตรฐานอะแลสกา", "VET": "เวลาเวเนซุเอลา", "TMST": "เวลาฤดูร้อนเติร์กเมนิสถาน", "WAST": "เวลาฤดูร้อนแอฟริกาตะวันตก", "OESZ": "เวลาฤดูร้อนยุโรปตะวันออก", "EAT": "เวลาแอฟริกาตะวันออก", "HNT": "เวลามาตรฐานนิวฟันด์แลนด์", "PST": "เวลามาตรฐานแปซิฟิกในอเมริกาเหนือ", "WESZ": "เวลาฤดูร้อนยุโรปตะวันตก", "AST": "เวลามาตรฐานแอตแลนติก", "UYST": "เวลาฤดูร้อนอุรุกวัย", "HNPM": "เวลามาตรฐานแซงปีแยร์และมีเกอลง", "ACST": "เวลามาตรฐานทางตอนกลางของออสเตรเลีย", "WAT": "เวลามาตรฐานแอฟริกาตะวันตก", "HNNOMX": "เวลามาตรฐานเม็กซิโกตะวันตกเฉียงเหนือ", "AKDT": "เวลาออมแสงของอะแลสกา", "WIT": "เวลาอินโดนีเซียฝั่งตะวันออก", "ACWST": "เวลามาตรฐานทางตะวันตกตอนกลางของออสเตรเลีย", "PDT": "เวลาออมแสงแปซิฟิกในอเมริกาเหนือ", "ACDT": "เวลาออมแสงทางตอนกลางของออสเตรเลีย", "COST": "เวลาฤดูร้อนโคลอมเบีย", "HAT": "เวลาออมแสงนิวฟันด์แลนด์", "AWDT": "เวลาออมแสงทางตะวันตกของออสเตรเลีย", "CHAST": "เวลามาตรฐานแชทัม", "HECU": "เวลาออมแสงของคิวบา", "GYT": "เวลากายอานา", "HNOG": "เวลามาตรฐานกรีนแลนด์ตะวันตก", "MEZ": "เวลามาตรฐานยุโรปกลาง", "SAST": "เวลาแอฟริกาใต้", "HEEG": "เวลาฤดูร้อนกรีนแลนด์ตะวันออก", "HNPMX": "เวลามาตรฐานแปซิฟิกเม็กซิโก", "WIB": "เวลาอินโดนีเซียฝั่งตะวันตก", "NZST": "เวลามาตรฐานนิวซีแลนด์", "OEZ": "เวลามาตรฐานยุโรปตะวันออก", "CAT": "เวลาแอฟริกากลาง", "HENOMX": "เวลาออมแสงเม็กซิโกตะวันตกเฉียงเหนือ", "HNCU": "เวลามาตรฐานคิวบา", "EST": "เวลามาตรฐานทางตะวันออกในอเมริกาเหนือ", "HEPM": "เวลาออมแสงของแซงปีแยร์และมีเกอลง", "NZDT": "เวลาออมแสงนิวซีแลนด์", "JST": "เวลามาตรฐานญี่ปุ่น", "CLT": "เวลามาตรฐานชิลี", "TMT": "เวลามาตรฐานเติร์กเมนิสถาน"}, -+ timezones: map[string]string{"COT": "เวลามาตรฐานโคลอมเบีย", "HEPM": "เวลาออมแสงของแซงปีแยร์และมีเกอลง", "JST": "เวลามาตรฐานญี่ปุ่น", "UYST": "เวลาฤดูร้อนอุรุกวัย", "AWST": "เวลามาตรฐานทางตะวันตกของออสเตรเลีย", "VET": "เวลาเวเนซุเอลา", "WAST": "เวลาฤดูร้อนแอฟริกาตะวันตก", "CAT": "เวลาแอฟริกากลาง", "CDT": "เวลาออมแสงตอนกลางในอเมริกาเหนือ", "GMT": "เวลามาตรฐานกรีนิช", "SRT": "เวลาซูรินาเม", "PDT": "เวลาออมแสงแปซิฟิกในอเมริกาเหนือ", "AKST": "เวลามาตรฐานอะแลสกา", "TMT": "เวลามาตรฐานเติร์กเมนิสถาน", "ECT": "เวลาเอกวาดอร์", "HAST": "เวลามาตรฐานฮาวาย-อะลูเชียน", "HNEG": "เวลามาตรฐานกรีนแลนด์ตะวันออก", "AST": "เวลามาตรฐานแอตแลนติก", "BT": "เวลาภูฏาน", "ACWST": "เวลามาตรฐานทางตะวันตกตอนกลางของออสเตรเลีย", "SGT": "เวลาสิงคโปร์", "SAST": "เวลาแอฟริกาใต้", "EST": "เวลามาตรฐานทางตะวันออกในอเมริกาเหนือ", "EDT": "เวลาออมแสงทางตะวันออกในอเมริกาเหนือ", "NZST": "เวลามาตรฐานนิวซีแลนด์", "WEZ": "เวลามาตรฐานยุโรปตะวันตก", "WESZ": "เวลาฤดูร้อนยุโรปตะวันตก", "AKDT": "เวลาออมแสงของอะแลสกา", "WART": "เวลามาตรฐานทางตะวันตกของอาร์เจนตินา", "GYT": "เวลากายอานา", "TMST": "เวลาฤดูร้อนเติร์กเมนิสถาน", "AWDT": "เวลาออมแสงทางตะวันตกของออสเตรเลีย", "MDT": "เวลาฤดูร้อนมาเก๊า", "HEEG": "เวลาฤดูร้อนกรีนแลนด์ตะวันออก", "IST": "เวลาอินเดีย", "HNT": "เวลามาตรฐานนิวฟันด์แลนด์", "HKST": "เวลาฤดูร้อนฮ่องกง", "MST": "เวลามาตรฐานมาเก๊า", "HENOMX": "เวลาออมแสงเม็กซิโกตะวันตกเฉียงเหนือ", "HEPMX": "เวลาออมแสงแปซิฟิกเม็กซิโก", "GFT": "เวลาเฟรนช์เกียนา", "WIB": "เวลาอินโดนีเซียฝั่งตะวันตก", "HNNOMX": "เวลามาตรฐานเม็กซิโกตะวันตกเฉียงเหนือ", "LHST": "เวลามาตรฐานลอร์ดโฮว์", "ADT": "เวลาออมแสงของแอตแลนติก", "LHDT": "เวลาออมแสงลอร์ดโฮว์", "CHAST": "เวลามาตรฐานแชทัม", "HNCU": "เวลามาตรฐานคิวบา", "WIT": "เวลาอินโดนีเซียฝั่งตะวันออก", "HKT": "เวลามาตรฐานฮ่องกง", "CST": "เวลามาตรฐานตอนกลางในอเมริกาเหนือ", "ChST": "เวลาชามอร์โร", "HAT": "เวลาออมแสงนิวฟันด์แลนด์", "NZDT": "เวลาออมแสงนิวซีแลนด์", "JDT": "เวลาออมแสงญี่ปุ่น", "WAT": "เวลามาตรฐานแอฟริกาตะวันตก", "CHADT": "เวลาออมแสงแชทัม", "PST": "เวลามาตรฐานแปซิฟิกในอเมริกาเหนือ", "HECU": "เวลาออมแสงของคิวบา", "HNPMX": "เวลามาตรฐานแปซิฟิกเม็กซิโก", "OESZ": "เวลาฤดูร้อนยุโรปตะวันออก", "∅∅∅": "เวลาฤดูร้อนบราซิเลีย", "MYT": "เวลามาเลเซีย", "HNPM": "เวลามาตรฐานแซงปีแยร์และมีเกอลง", "EAT": "เวลาแอฟริกาตะวันออก", "HADT": "เวลาออมแสงฮาวาย-อะลูเชียน", "ACWDT": "เวลาออมแสงทางตะวันตกตอนกลางของออสเตรเลีย", "OEZ": "เวลามาตรฐานยุโรปตะวันออก", "CLT": "เวลามาตรฐานชิลี", "WITA": "เวลาอินโดนีเซียตอนกลาง", "BOT": "เวลาโบลิเวีย", "MEZ": "เวลามาตรฐานยุโรปกลาง", "AEST": "เวลามาตรฐานทางตะวันออกของออสเตรเลีย", "UYT": "เวลามาตรฐานอุรุกวัย", "HNOG": "เวลามาตรฐานกรีนแลนด์ตะวันตก", "HEOG": "เวลาฤดูร้อนกรีนแลนด์ตะวันตก", "ART": "เวลามาตรฐานอาร์เจนตินา", "ARST": "เวลาฤดูร้อนอาร์เจนตินา", "AEDT": "เวลาออมแสงทางตะวันออกของออสเตรเลีย", "ACST": "เวลามาตรฐานทางตอนกลางของออสเตรเลีย", "ACDT": "เวลาออมแสงทางตอนกลางของออสเตรเลีย", "WARST": "เวลาฤดูร้อนทางตะวันตกของอาร์เจนตินา", "COST": "เวลาฤดูร้อนโคลอมเบีย", "CLST": "เวลาฤดูร้อนชิลี", "MESZ": "เวลาฤดูร้อนยุโรปกลาง"}, - } - } -  -diff --git a/th_TH/th_TH.go b/th_TH/th_TH.go -index c751f61..59bc96f 100644 ---- a/th_TH/th_TH.go -+++ b/th_TH/th_TH.go -@@ -10,68 +10,45 @@ import ( - ) -  - type th_TH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'th_TH' locale - func New() locales.Translator { - return &th_TH{ -- locale: "th_TH", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."}, -- monthsNarrow: []string{"", "ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค."}, -- monthsWide: []string{"", "มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"}, -- daysAbbreviated: []string{"อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."}, -- daysNarrow: []string{"อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"}, -- daysShort: []string{"อา.", "จ.", "อ.", "พ.", "พฤ.", "ศ.", "ส."}, -- daysWide: []string{"วันอาทิตย์", "วันจันทร์", "วันอังคาร", "วันพุธ", "วันพฤหัสบดี", "วันศุกร์", "วันเสาร์"}, -- periodsAbbreviated: []string{"ก่อนเที่ยง", "หลังเที่ยง"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"ก่อนเที่ยง", "หลังเที่ยง"}, -- erasAbbreviated: []string{"ปีก่อน ค.ศ.", "ค.ศ."}, -- erasNarrow: []string{"ก่อน ค.ศ.", "ค.ศ."}, -- erasWide: []string{"ปีก่อนคริสต์ศักราช", "คริสต์ศักราช"}, -- timezones: map[string]string{"AST": "เวลามาตรฐานแอตแลนติก", "AEDT": "เวลาออมแสงทางตะวันออกของออสเตรเลีย", "WITA": "เวลาอินโดนีเซียตอนกลาง", "MESZ": "เวลาฤดูร้อนยุโรปกลาง", "GFT": "เวลาเฟรนช์เกียนา", "WARST": "เวลาฤดูร้อนทางตะวันตกของอาร์เจนตินา", "GMT": "เวลามาตรฐานกรีนิช", "OESZ": "เวลาฤดูร้อนยุโรปตะวันออก", "WESZ": "เวลาฤดูร้อนยุโรปตะวันตก", "HNT": "เวลามาตรฐานนิวฟันด์แลนด์", "PDT": "เวลาออมแสงแปซิฟิกในอเมริกาเหนือ", "ACDT": "เวลาออมแสงทางตอนกลางของออสเตรเลีย", "COT": "เวลามาตรฐานโคลอมเบีย", "EST": "เวลามาตรฐานทางตะวันออกในอเมริกาเหนือ", "HEPMX": "เวลาออมแสงแปซิฟิกเม็กซิโก", "WART": "เวลามาตรฐานทางตะวันตกของอาร์เจนตินา", "BT": "เวลาภูฏาน", "SRT": "เวลาซูรินาเม", "WEZ": "เวลามาตรฐานยุโรปตะวันตก", "ACWST": "เวลามาตรฐานทางตะวันตกตอนกลางของออสเตรเลีย", "NZDT": "เวลาออมแสงนิวซีแลนด์", "CHAST": "เวลามาตรฐานแชทัม", "ChST": "เวลาชามอร์โร", "CST": "เวลามาตรฐานตอนกลางในอเมริกาเหนือ", "TMT": "เวลามาตรฐานเติร์กเมนิสถาน", "WAT": "เวลามาตรฐานแอฟริกาตะวันตก", "MYT": "เวลามาเลเซีย", "UYST": "เวลาฤดูร้อนอุรุกวัย", "WAST": "เวลาฤดูร้อนแอฟริกาตะวันตก", "HKT": "เวลามาตรฐานฮ่องกง", "HNPMX": "เวลามาตรฐานแปซิฟิกเม็กซิโก", "LHDT": "เวลาออมแสงลอร์ดโฮว์", "CLT": "เวลามาตรฐานชิลี", "ECT": "เวลาเอกวาดอร์", "MDT": "เวลาฤดูร้อนมาเก๊า", "ARST": "เวลาฤดูร้อนอาร์เจนตินา", "HEOG": "เวลาฤดูร้อนกรีนแลนด์ตะวันตก", "AWDT": "เวลาออมแสงทางตะวันตกของออสเตรเลีย", "HNCU": "เวลามาตรฐานคิวบา", "EDT": "เวลาออมแสงทางตะวันออกในอเมริกาเหนือ", "MST": "เวลามาตรฐานมาเก๊า", "ART": "เวลามาตรฐานอาร์เจนตินา", "JDT": "เวลาออมแสงญี่ปุ่น", "TMST": "เวลาฤดูร้อนเติร์กเมนิสถาน", "AKDT": "เวลาออมแสงของอะแลสกา", "HAT": "เวลาออมแสงนิวฟันด์แลนด์", "AKST": "เวลามาตรฐานอะแลสกา", "HNOG": "เวลามาตรฐานกรีนแลนด์ตะวันตก", "HKST": "เวลาฤดูร้อนฮ่องกง", "LHST": "เวลามาตรฐานลอร์ดโฮว์", "SAST": "เวลาแอฟริกาใต้", "EAT": "เวลาแอฟริกาตะวันออก", "OEZ": "เวลามาตรฐานยุโรปตะวันออก", "CAT": "เวลาแอฟริกากลาง", "HNNOMX": "เวลามาตรฐานเม็กซิโกตะวันตกเฉียงเหนือ", "HENOMX": "เวลาออมแสงเม็กซิโกตะวันตกเฉียงเหนือ", "GYT": "เวลากายอานา", "NZST": "เวลามาตรฐานนิวซีแลนด์", "CHADT": "เวลาออมแสงแชทัม", "∅∅∅": "เวลาฤดูร้อนแอมะซอน", "ACST": "เวลามาตรฐานทางตอนกลางของออสเตรเลีย", "WIB": "เวลาอินโดนีเซียฝั่งตะวันตก", "HADT": "เวลาออมแสงฮาวาย-อะลูเชียน", "VET": "เวลาเวเนซุเอลา", "HEPM": "เวลาออมแสงของแซงปีแยร์และมีเกอลง", "HNEG": "เวลามาตรฐานกรีนแลนด์ตะวันออก", "UYT": "เวลามาตรฐานอุรุกวัย", "PST": "เวลามาตรฐานแปซิฟิกในอเมริกาเหนือ", "ACWDT": "เวลาออมแสงทางตะวันตกตอนกลางของออสเตรเลีย", "AEST": "เวลามาตรฐานทางตะวันออกของออสเตรเลีย", "HEEG": "เวลาฤดูร้อนกรีนแลนด์ตะวันออก", "SGT": "เวลาสิงคโปร์", "CDT": "เวลาออมแสงตอนกลางในอเมริกาเหนือ", "ADT": "เวลาออมแสงของแอตแลนติก", "AWST": "เวลามาตรฐานทางตะวันตกของออสเตรเลีย", "HNPM": "เวลามาตรฐานแซงปีแยร์และมีเกอลง", "CLST": "เวลาฤดูร้อนชิลี", "JST": "เวลามาตรฐานญี่ปุ่น", "COST": "เวลาฤดูร้อนโคลอมเบีย", "WIT": "เวลาอินโดนีเซียฝั่งตะวันออก", "HAST": "เวลามาตรฐานฮาวาย-อะลูเชียน", "MEZ": "เวลามาตรฐานยุโรปกลาง", "IST": "เวลาอินเดีย", "BOT": "เวลาโบลิเวีย", "HECU": "เวลาออมแสงของคิวบา"}, -+ locale: "th_TH", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "NZDT": "NZDT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "UYST": "UYST", "EDT": "EDT", "HKST": "HKST", "TMT": "TMT", "CAT": "CAT", "MEZ": "MEZ", "HEEG": "HEEG", "HAT": "HAT", "HNOG": "HNOG", "HKT": "HKT", "MYT": "MYT", "GYT": "GYT", "CLT": "CLT", "CLST": "CLST", "GMT": "GMT", "HEPM": "HEPM", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "COST": "COST", "MDT": "MDT", "ChST": "ChST", "EAT": "EAT", "HAST": "HAST", "AEST": "AEST", "AEDT": "AEDT", "ECT": "ECT", "AST": "AST", "ADT": "ADT", "HNPM": "HNPM", "AKDT": "AKDT", "MST": "MST", "ART": "ART", "ACST": "ACST", "WAST": "WAST", "COT": "COT", "NZST": "NZST", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "PST": "PST", "HEOG": "HEOG", "MESZ": "MESZ", "ACWDT": "ACWDT", "IST": "IST", "GFT": "GFT", "HNT": "HNT", "ACWST": "ACWST", "CHADT": "CHADT", "WEZ": "WEZ", "AKST": "AKST", "OESZ": "OESZ", "WARST": "WARST", "WITA": "WITA", "SRT": "SRT", "JST": "JST", "WAT": "WAT", "TMST": "TMST", "CDT": "CDT", "PDT": "PDT", "BT": "BT", "WESZ": "WESZ", "HECU": "HECU", "WIT": "WIT", "ARST": "ARST", "BOT": "BOT", "ACDT": "ACDT", "JDT": "JDT", "CHAST": "CHAST", "EST": "EST", "WIB": "WIB", "HNEG": "HNEG", "LHST": "LHST", "SGT": "SGT", "VET": "VET", "WART": "WART", "CST": "CST", "HADT": "HADT", "HEPMX": "HEPMX", "OEZ": "OEZ", "AWST": "AWST", "UYT": "UYT", "HNCU": "HNCU"}, - } - } -  -@@ -117,7 +94,7 @@ func (th *th_TH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (th *th_TH) MonthsAbbreviated() []string { -- return th.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (th *th_TH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (th *th_TH) MonthsNarrow() []string { -- return th.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (th *th_TH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (th *th_TH) MonthsWide() []string { -- return th.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (th *th_TH) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'th_TH' and handles both Whole and Real numbers based on 'v' - func (th *th_TH) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, th.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, th.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, th.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'th_TH' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (th *th_TH) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, th.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, th.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, th.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'th_TH' -@@ -257,56 +174,7 @@ func (th *th_TH) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := th.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, th.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, th.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, th.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, th.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'th_TH' -@@ -315,68 +183,7 @@ func (th *th_TH) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := th.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, th.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, th.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, th.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, th.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, th.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'th_TH' -@@ -384,17 +191,6 @@ func (th *th_TH) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -403,17 +199,6 @@ func (th *th_TH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, th.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -422,25 +207,6 @@ func (th *th_TH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, th.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() < 0 { -- b = append(b, th.erasAbbreviated[0]...) -- } else { -- b = append(b, th.erasAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,27 +215,6 @@ func (th *th_TH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, th.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xe0, 0xb8, 0x97, 0xe0, 0xb8, 0xb5, 0xe0, 0xb9, 0x88, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, th.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() < 0 { -- b = append(b, th.erasWide[0]...) -- } else { -- b = append(b, th.erasWide[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,19 +223,6 @@ func (th *th_TH) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, th.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -499,26 +231,6 @@ func (th *th_TH) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, th.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, th.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -527,26 +239,6 @@ func (th *th_TH) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xb8, 0x99, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0xac, 0xe0, 0xb8, 0xb4, 0xe0, 0xb8, 0x81, 0xe0, 0xb8, 0xb2, 0x20}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xb8, 0x99, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0x97, 0xe0, 0xb8, 0xb5, 0x20}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xb8, 0xa7, 0xe0, 0xb8, 0xb4, 0xe0, 0xb8, 0x99, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0x97, 0xe0, 0xb8, 0xb5, 0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -555,30 +247,5 @@ func (th *th_TH) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xb8, 0x99, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0xac, 0xe0, 0xb8, 0xb4, 0xe0, 0xb8, 0x81, 0xe0, 0xb8, 0xb2, 0x20}...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xb8, 0x99, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0x97, 0xe0, 0xb8, 0xb5, 0x20}...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0xe0, 0xb8, 0xa7, 0xe0, 0xb8, 0xb4, 0xe0, 0xb8, 0x99, 0xe0, 0xb8, 0xb2, 0xe0, 0xb8, 0x97, 0xe0, 0xb8, 0xb5, 0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := th.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ti/ti.go b/ti/ti.go -index 8d100e1..6934c47 100644 ---- a/ti/ti.go -+++ b/ti/ti.go -@@ -66,7 +66,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ዓ/ዓ", "ዓ/ም"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ዓ/ዓ", "ዓመተ ምህረት"}, -- timezones: map[string]string{"ACST": "ACST", "ART": "ART", "HNOG": "HNOG", "NZST": "NZST", "EST": "EST", "WEZ": "WEZ", "HEPM": "HEPM", "CHADT": "CHADT", "AKDT": "AKDT", "OEZ": "OEZ", "WARST": "WARST", "ECT": "ECT", "WIT": "WIT", "AWST": "AWST", "AWDT": "AWDT", "AEDT": "AEDT", "ACWDT": "ACWDT", "ARST": "ARST", "HEOG": "HEOG", "JST": "JST", "TMT": "TMT", "COT": "COT", "BT": "BT", "CHAST": "CHAST", "LHDT": "LHDT", "HECU": "HECU", "SGT": "SGT", "WITA": "WITA", "CLT": "CLT", "HEEG": "HEEG", "HADT": "HADT", "VET": "VET", "PDT": "PDT", "HAST": "HAST", "HKST": "HKST", "HNPM": "HNPM", "ACDT": "ACDT", "HEPMX": "HEPMX", "AKST": "AKST", "ADT": "ADT", "MST": "MST", "GMT": "GMT", "WIB": "WIB", "HNEG": "HNEG", "BOT": "BOT", "CDT": "CDT", "GYT": "GYT", "ACWST": "ACWST", "COST": "COST", "MESZ": "MESZ", "IST": "IST", "ChST": "ChST", "SAST": "SAST", "TMST": "TMST", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "WART": "WART", "CST": "CST", "UYT": "UYT", "HAT": "HAT", "HNPMX": "HNPMX", "NZDT": "NZDT", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "CLST": "CLST", "WAST": "WAST", "UYST": "UYST", "PST": "PST", "HKT": "HKT", "EDT": "EDT", "GFT": "GFT", "MDT": "MDT", "SRT": "SRT", "LHST": "LHST", "WESZ": "WESZ", "AEST": "AEST", "JDT": "JDT", "WAT": "WAT", "CAT": "CAT", "AST": "AST", "MYT": "MYT", "HNT": "HNT", "EAT": "EAT", "HENOMX": "HENOMX", "HNCU": "HNCU"}, -+ timezones: map[string]string{"HEOG": "HEOG", "ChST": "ChST", "AWST": "AWST", "AWDT": "AWDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "OEZ": "OEZ", "HAT": "HAT", "SAST": "SAST", "NZDT": "NZDT", "HAST": "HAST", "MESZ": "MESZ", "BT": "BT", "WART": "WART", "GYT": "GYT", "VET": "VET", "HEPMX": "HEPMX", "WESZ": "WESZ", "TMT": "TMT", "HNEG": "HNEG", "MDT": "MDT", "SGT": "SGT", "WIT": "WIT", "COST": "COST", "CHADT": "CHADT", "HNNOMX": "HNNOMX", "JDT": "JDT", "ECT": "ECT", "CDT": "CDT", "PST": "PST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "HKT": "HKT", "UYT": "UYT", "WEZ": "WEZ", "ACDT": "ACDT", "HEEG": "HEEG", "HNPM": "HNPM", "ARST": "ARST", "SRT": "SRT", "ADT": "ADT", "AEDT": "AEDT", "CAT": "CAT", "WITA": "WITA", "HENOMX": "HENOMX", "AEST": "AEST", "MST": "MST", "CST": "CST", "EDT": "EDT", "GMT": "GMT", "AST": "AST", "MEZ": "MEZ", "HEPM": "HEPM", "UYST": "UYST", "AKST": "AKST", "OESZ": "OESZ", "IST": "IST", "TMST": "TMST", "EAT": "EAT", "LHST": "LHST", "MYT": "MYT", "WAST": "WAST", "HNOG": "HNOG", "NZST": "NZST", "ACST": "ACST", "HNCU": "HNCU", "HECU": "HECU", "COT": "COT", "HKST": "HKST", "CLT": "CLT", "CLST": "CLST", "ART": "ART", "BOT": "BOT", "LHDT": "LHDT", "HNT": "HNT", "EST": "EST", "GFT": "GFT", "HADT": "HADT", "PDT": "PDT", "AKDT": "AKDT", "WAT": "WAT", "JST": "JST", "HNPMX": "HNPMX", "WARST": "WARST", "WIB": "WIB"}, - } - } -  -diff --git a/ti_ER/ti_ER.go b/ti_ER/ti_ER.go -index e512681..3e57b86 100644 ---- a/ti_ER/ti_ER.go -+++ b/ti_ER/ti_ER.go -@@ -42,31 +42,17 @@ type ti_ER struct { - // New returns a new instance of translator for the 'ti_ER' locale - func New() locales.Translator { - return &ti_ER{ -- locale: "ti_ER", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "Nfk", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ጥሪ", "ለካ", "መጋ", "ሚያ", "ግን", "ሰነ", "ሓም", "ነሓ", "መስ", "ጥቅ", "ሕዳ", "ታሕ"}, -- monthsNarrow: []string{"", "ጥ", "ለ", "መ", "ሚ", "ግ", "ሰ", "ሓ", "ነ", "መ", "ጥ", "ሕ", "ታ"}, -- monthsWide: []string{"", "ጥሪ", "ለካቲት", "መጋቢት", "ሚያዝያ", "ግንቦት", "ሰነ", "ሓምለ", "ነሓሰ", "መስከረም", "ጥቅምቲ", "ሕዳር", "ታሕሳስ"}, -- daysAbbreviated: []string{"ሰን", "ሰኑ", "ሰሉ", "ረቡ", "ሓሙ", "ዓር", "ቀዳ"}, -- daysNarrow: []string{"ሰ", "ሰ", "ሰ", "ረ", "ሓ", "ዓ", "ቀ"}, -- daysShort: []string{"ሰን", "ሰኑ", "ሰሉ", "ረቡ", "ሓሙ", "ዓር", "ቀዳ"}, -- daysWide: []string{"ሰንበት", "ሰኑይ", "ሠሉስ", "ረቡዕ", "ኃሙስ", "ዓርቢ", "ቀዳም"}, -- periodsAbbreviated: []string{"ንጉሆ ሰዓተ", "ድሕር ሰዓት"}, -- periodsWide: []string{"ንጉሆ ሰዓተ", "ድሕር ሰዓት"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WEZ": "WEZ", "JST": "JST", "COST": "COST", "BOT": "BOT", "GMT": "GMT", "MDT": "MDT", "NZDT": "NZDT", "SAST": "SAST", "JDT": "JDT", "GFT": "GFT", "WART": "WART", "UYST": "UYST", "MST": "MST", "NZST": "NZST", "WAT": "WAT", "OESZ": "OESZ", "CDT": "CDT", "BT": "BT", "HNOG": "HNOG", "IST": "IST", "COT": "COT", "WIT": "WIT", "ACWST": "ACWST", "HKT": "HKT", "LHST": "LHST", "HAST": "HAST", "SRT": "SRT", "AEST": "AEST", "ACDT": "ACDT", "AWDT": "AWDT", "∅∅∅": "∅∅∅", "EAT": "EAT", "CST": "CST", "HADT": "HADT", "ART": "ART", "ARST": "ARST", "HEOG": "HEOG", "HECU": "HECU", "HNPMX": "HNPMX", "SGT": "SGT", "WIB": "WIB", "HNT": "HNT", "MESZ": "MESZ", "CLT": "CLT", "OEZ": "OEZ", "AST": "AST", "UYT": "UYT", "HEEG": "HEEG", "TMST": "TMST", "HNPM": "HNPM", "HEPM": "HEPM", "HNNOMX": "HNNOMX", "MYT": "MYT", "VET": "VET", "ACWDT": "ACWDT", "PDT": "PDT", "WITA": "WITA", "HAT": "HAT", "HNCU": "HNCU", "EST": "EST", "GYT": "GYT", "CHADT": "CHADT", "MEZ": "MEZ", "ChST": "ChST", "HENOMX": "HENOMX", "ACST": "ACST", "HEPMX": "HEPMX", "AKST": "AKST", "AKDT": "AKDT", "CHAST": "CHAST", "CLST": "CLST", "TMT": "TMT", "LHDT": "LHDT", "WAST": "WAST", "ECT": "ECT", "ADT": "ADT", "WESZ": "WESZ", "HKST": "HKST", "AEDT": "AEDT", "AWST": "AWST", "CAT": "CAT", "PST": "PST", "HNEG": "HNEG", "WARST": "WARST", "EDT": "EDT"}, -+ locale: "ti_ER", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "Nfk", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ daysNarrow: []string{"ሰ", "ሰ", "ሰ", "ረ", "ሓ", "ዓ", "ቀ"}, -+ erasAbbreviated: []string{"", ""}, -+ erasNarrow: []string{"", ""}, -+ erasWide: []string{"", ""}, -+ timezones: map[string]string{"WITA": "WITA", "BOT": "BOT", "UYT": "UYT", "PDT": "PDT", "ACWST": "ACWST", "HNCU": "HNCU", "AKDT": "AKDT", "CLT": "CLT", "WARST": "WARST", "COT": "COT", "EST": "EST", "HKT": "HKT", "HNT": "HNT", "ECT": "ECT", "HADT": "HADT", "HNEG": "HNEG", "HEEG": "HEEG", "COST": "COST", "WIB": "WIB", "WAT": "WAT", "HEOG": "HEOG", "NZST": "NZST", "GMT": "GMT", "ChST": "ChST", "CHADT": "CHADT", "HEPMX": "HEPMX", "ADT": "ADT", "JDT": "JDT", "AEST": "AEST", "AEDT": "AEDT", "UYST": "UYST", "SGT": "SGT", "HECU": "HECU", "EDT": "EDT", "ART": "ART", "PST": "PST", "HKST": "HKST", "HEPM": "HEPM", "AST": "AST", "SRT": "SRT", "ACST": "ACST", "ACDT": "ACDT", "WESZ": "WESZ", "AKST": "AKST", "OEZ": "OEZ", "CAT": "CAT", "AWST": "AWST", "BT": "BT", "HNPMX": "HNPMX", "WAST": "WAST", "AWDT": "AWDT", "VET": "VET", "CLST": "CLST", "HENOMX": "HENOMX", "JST": "JST", "HNPM": "HNPM", "WEZ": "WEZ", "∅∅∅": "∅∅∅", "HAST": "HAST", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "OESZ": "OESZ", "WART": "WART", "HNOG": "HNOG", "MDT": "MDT", "TMST": "TMST", "TMT": "TMT", "ARST": "ARST", "CHAST": "CHAST", "IST": "IST", "ACWDT": "ACWDT", "SAST": "SAST", "GYT": "GYT", "NZDT": "NZDT", "MESZ": "MESZ", "GFT": "GFT", "CST": "CST", "WIT": "WIT", "MST": "MST", "EAT": "EAT", "LHST": "LHST", "MYT": "MYT", "HAT": "HAT", "CDT": "CDT"}, - } - } -  -@@ -119,7 +105,7 @@ func (ti *ti_ER) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ti *ti_ER) MonthsAbbreviated() []string { -- return ti.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +115,7 @@ func (ti *ti_ER) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ti *ti_ER) MonthsNarrow() []string { -- return ti.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +125,7 @@ func (ti *ti_ER) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ti *ti_ER) MonthsWide() []string { -- return ti.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,73 +171,13 @@ func (ti *ti_ER) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ti_ER' and handles both Whole and Real numbers based on 'v' - func (ti *ti_ER) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ti.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ti.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ti_ER' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ti *ti_ER) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ti.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ti.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ti_ER' -@@ -259,56 +185,7 @@ func (ti *ti_ER) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ti.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ti.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ti.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ti.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ti_ER' -@@ -317,64 +194,7 @@ func (ti *ti_ER) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ti.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ti.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ti.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ti.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ti_ER' -@@ -382,27 +202,6 @@ func (ti *ti_ER) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -411,21 +210,6 @@ func (ti *ti_ER) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ti.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,21 +218,6 @@ func (ti *ti_ER) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ti.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,32 +226,6 @@ func (ti *ti_ER) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ti.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xe1, 0x8d, 0xa3, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ti.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0xe1, 0x88, 0x98, 0xe1, 0x8b, 0x93, 0xe1, 0x88, 0x8d, 0xe1, 0x89, 0xb2, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Year() < 0 { -- b = append(b, ti.erasWide[0]...) -- } else { -- b = append(b, ti.erasWide[1]...) -- } -- - return string(b) - } -  -@@ -491,28 +234,6 @@ func (ti *ti_ER) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -521,35 +242,6 @@ func (ti *ti_ER) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -558,40 +250,6 @@ func (ti *ti_ER) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -600,44 +258,5 @@ func (ti *ti_ER) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ti.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ti_ET/ti_ET.go b/ti_ET/ti_ET.go -index aca53b3..2f77db5 100644 ---- a/ti_ET/ti_ET.go -+++ b/ti_ET/ti_ET.go -@@ -42,31 +42,13 @@ type ti_ET struct { - // New returns a new instance of translator for the 'ti_ET' locale - func New() locales.Translator { - return &ti_ET{ -- locale: "ti_ET", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "ጥሪ", "ለካ", "መጋ", "ሚያ", "ግን", "ሰነ", "ሓም", "ነሓ", "መስ", "ጥቅ", "ሕዳ", "ታሕ"}, -- monthsNarrow: []string{"", "ጥ", "ለ", "መ", "ሚ", "ግ", "ሰ", "ሓ", "ነ", "መ", "ጥ", "ሕ", "ታ"}, -- monthsWide: []string{"", "ጥሪ", "ለካቲት", "መጋቢት", "ሚያዝያ", "ግንቦት", "ሰነ", "ሓምለ", "ነሓሰ", "መስከረም", "ጥቅምቲ", "ሕዳር", "ታሕሳስ"}, -- daysAbbreviated: []string{"ሰን", "ሰኑ", "ሰሉ", "ረቡ", "ሓሙ", "ዓር", "ቀዳ"}, -- daysNarrow: []string{"ሰ", "ሰ", "ሰ", "ረ", "ሓ", "ዓ", "ቀ"}, -- daysShort: []string{"ሰን", "ሰኑ", "ሰሉ", "ረቡ", "ሓሙ", "ዓር", "ቀዳ"}, -- daysWide: []string{"ሰንበት", "ሰኑይ", "ሠሉስ", "ረቡዕ", "ኃሙስ", "ዓርቢ", "ቀዳም"}, -- periodsAbbreviated: []string{"ንጉሆ ሰዓተ", "ድሕር ሰዓት"}, -- periodsWide: []string{"ንጉሆ ሰዓተ", "ድሕር ሰዓት"}, -- erasAbbreviated: []string{"ዓ/ዓ", "ዓ/ም"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ዓ/ዓ", "ዓመተ ምህረት"}, -- timezones: map[string]string{"CLST": "CLST", "ACST": "ACST", "EST": "EST", "WITA": "WITA", "CHAST": "CHAST", "MYT": "MYT", "AKDT": "AKDT", "VET": "VET", "SAST": "SAST", "MST": "MST", "AEDT": "AEDT", "MESZ": "MESZ", "CHADT": "CHADT", "ACDT": "ACDT", "CST": "CST", "CDT": "CDT", "SRT": "SRT", "HAT": "HAT", "NZST": "NZST", "GFT": "GFT", "TMT": "TMT", "COT": "COT", "AKST": "AKST", "AST": "AST", "PST": "PST", "HKST": "HKST", "WAST": "WAST", "UYT": "UYT", "ADT": "ADT", "JST": "JST", "EAT": "EAT", "BOT": "BOT", "COST": "COST", "MDT": "MDT", "HNPMX": "HNPMX", "ACWDT": "ACWDT", "CLT": "CLT", "ChST": "ChST", "CAT": "CAT", "HNT": "HNT", "∅∅∅": "∅∅∅", "ARST": "ARST", "AWST": "AWST", "NZDT": "NZDT", "WAT": "WAT", "GYT": "GYT", "BT": "BT", "HNOG": "HNOG", "HNPM": "HNPM", "ART": "ART", "HKT": "HKT", "OEZ": "OEZ", "HENOMX": "HENOMX", "WEZ": "WEZ", "HEEG": "HEEG", "JDT": "JDT", "OESZ": "OESZ", "HAST": "HAST", "HEOG": "HEOG", "ACWST": "ACWST", "HADT": "HADT", "AWDT": "AWDT", "IST": "IST", "LHST": "LHST", "HNNOMX": "HNNOMX", "GMT": "GMT", "SGT": "SGT", "HNCU": "HNCU", "HEPM": "HEPM", "MEZ": "MEZ", "WART": "WART", "EDT": "EDT", "HEPMX": "HEPMX", "WIB": "WIB", "WIT": "WIT", "WESZ": "WESZ", "AEST": "AEST", "HNEG": "HNEG", "TMST": "TMST", "ECT": "ECT", "WARST": "WARST", "HECU": "HECU", "UYST": "UYST", "PDT": "PDT", "LHDT": "LHDT"}, -+ locale: "ti_ET", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"GFT": "GFT", "GYT": "GYT", "HKST": "HKST", "HADT": "HADT", "MYT": "MYT", "IST": "IST", "CHAST": "CHAST", "HECU": "HECU", "∅∅∅": "∅∅∅", "EST": "EST", "GMT": "GMT", "ART": "ART", "HAST": "HAST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "AWST": "AWST", "JST": "JST", "ACWDT": "ACWDT", "HNCU": "HNCU", "AKDT": "AKDT", "AWDT": "AWDT", "PDT": "PDT", "TMT": "TMT", "CLT": "CLT", "CLST": "CLST", "SRT": "SRT", "MESZ": "MESZ", "WIT": "WIT", "EAT": "EAT", "ACST": "ACST", "JDT": "JDT", "HEPMX": "HEPMX", "HAT": "HAT", "ARST": "ARST", "PST": "PST", "SGT": "SGT", "HNT": "HNT", "WART": "WART", "HKT": "HKT", "CST": "CST", "MST": "MST", "LHST": "LHST", "LHDT": "LHDT", "SAST": "SAST", "TMST": "TMST", "MDT": "MDT", "HEEG": "HEEG", "HENOMX": "HENOMX", "HNPM": "HNPM", "CHADT": "CHADT", "WESZ": "WESZ", "CAT": "CAT", "AKST": "AKST", "WARST": "WARST", "HNOG": "HNOG", "WIB": "WIB", "UYST": "UYST", "COST": "COST", "ADT": "ADT", "VET": "VET", "HNPMX": "HNPMX", "OEZ": "OEZ", "OESZ": "OESZ", "EDT": "EDT", "ECT": "ECT", "MEZ": "MEZ", "ACDT": "ACDT", "BT": "BT", "WEZ": "WEZ", "WAST": "WAST", "HEOG": "HEOG", "AEST": "AEST", "UYT": "UYT", "NZST": "NZST", "AST": "AST", "BOT": "BOT", "AEDT": "AEDT", "COT": "COT", "WAT": "WAT", "WITA": "WITA", "CDT": "CDT", "NZDT": "NZDT", "ChST": "ChST", "HEPM": "HEPM", "ACWST": "ACWST"}, - } - } -  -@@ -119,7 +101,7 @@ func (ti *ti_ET) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ti *ti_ET) MonthsAbbreviated() []string { -- return ti.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +111,7 @@ func (ti *ti_ET) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ti *ti_ET) MonthsNarrow() []string { -- return ti.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +121,7 @@ func (ti *ti_ET) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ti *ti_ET) MonthsWide() []string { -- return ti.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,73 +167,13 @@ func (ti *ti_ET) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ti_ET' and handles both Whole and Real numbers based on 'v' - func (ti *ti_ET) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ti.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ti.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ti_ET' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ti *ti_ET) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ti.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ti.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ti_ET' -@@ -259,56 +181,7 @@ func (ti *ti_ET) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ti.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ti.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ti.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ti.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ti_ET' -@@ -317,64 +190,7 @@ func (ti *ti_ET) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ti.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ti.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ti.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ti.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ti.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ti_ET' -@@ -382,27 +198,6 @@ func (ti *ti_ET) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -411,21 +206,6 @@ func (ti *ti_ET) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ti.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2d}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,21 +214,6 @@ func (ti *ti_ET) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ti.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -457,32 +222,6 @@ func (ti *ti_ET) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ti.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xe1, 0x8d, 0xa3, 0x20}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ti.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20, 0xe1, 0x88, 0x98, 0xe1, 0x8b, 0x93, 0xe1, 0x88, 0x8d, 0xe1, 0x89, 0xb2, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Year() < 0 { -- b = append(b, ti.erasWide[0]...) -- } else { -- b = append(b, ti.erasWide[1]...) -- } -- - return string(b) - } -  -@@ -491,28 +230,6 @@ func (ti *ti_ET) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -521,35 +238,6 @@ func (ti *ti_ET) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -558,40 +246,6 @@ func (ti *ti_ET) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -600,44 +254,5 @@ func (ti *ti_ET) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ti.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ti.periodsAbbreviated[0]...) -- } else { -- b = append(b, ti.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ti.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/tk/tk.go b/tk/tk.go -index c276a30..1b8d244 100644 ---- a/tk/tk.go -+++ b/tk/tk.go -@@ -66,7 +66,7 @@ func New() locales.Translator { - daysAbbreviated: []string{"ýb", "db", "sb", "çb", "pb", "an", "şb"}, - daysNarrow: []string{"Ý", "D", "S", "Ç", "P", "A", "Ş"}, - daysWide: []string{"ýekşenbe", "duşenbe", "sişenbe", "çarşenbe", "penşenbe", "anna", "şenbe"}, -- timezones: map[string]string{"UYST": "Urugwaý, tomusky wagt", "ART": "Argentina, standart wagt", "NZST": "Täze Zelandiýa, standart wagt", "ACDT": "Merkezi Awstraliýa, tomusky wagt", "OESZ": "Gündogar Ýewropa, tomusky wagt", "GFT": "Fransuz Gwiana", "HEPMX": "Meksikan Ýuwaş umman, tomusky wagt", "GYT": "Gaýana", "HADT": "Gawaý-Aleut, tomusky wagt", "BT": "Butan", "AEST": "Gündogar Awstraliýa, standart wagt", "AEDT": "Gündogar Awstraliýa, tomusky wagt", "NZDT": "Täze Zelandiýa, tomusky wagt", "WAST": "Günbatar Afrika, tomusky wagt", "UYT": "Urugwaý, standart wagt", "HNOG": "Günbatar Grenlandiýa, standart wagt", "ACWDT": "Merkezi Awstraliýa, günbatar tarap, tomusky wagt", "WARST": "Günbatar Argentina, tomusky wagt", "EDT": "Günorta Amerika, tomusky wagt", "PST": "Ýuwaş umman, standart wagt", "ACWST": "Merkezi Awstraliýa, günbatar tarap, standart wagt", "MEZ": "Merkezi Ýewropa, standart wagt", "LHST": "Lord-Hau, standart wagt", "CLT": "Çili, standart wagt", "COT": "Kolumbiýa, standart wagt", "WART": "Günbatar Argentina, standart wagt", "HNCU": "Kuba, standart wagt", "MYT": "Malaýziýa", "AKDT": "Alýaska, tomusky wagt", "WESZ": "Günbatar Ýewropa, tomusky wagt", "LHDT": "Lord-Hau, tomusky wagt", "TMT": "Türkmenistan, standart wagt", "CAT": "Merkezi Afrika", "GMT": "Grinwiç boýunça orta wagt", "CDT": "Merkezi Amerika, tomusky wagt", "HNT": "Nýufaundlend, standart wagt", "HAT": "Nýufaundlend, tomusky wagt", "MESZ": "Merkezi Ýewropa, tomusky wagt", "WAT": "Günbatar Afrika, standart wagt", "∅∅∅": "Azor adalary, tomusky wagt", "HEEG": "Gündogar Grenlandiýa, tomusky wagt", "HEOG": "Günbatar Grenlandiýa, tomusky wagt", "JST": "Ýaponiýa, standart wagt", "HECU": "Kuba, tomusky wagt", "HAST": "Gawaý-Aleut, standart wagt", "ARST": "Argentina, tomusky wagt", "WEZ": "Günbatar Ýewropa, standart wagt", "AWDT": "Günbatar Awstraliýa, tomusky wagt", "HNPM": "Sen Pýer we Mikelon, standart wagt", "HNPMX": "Meksikan Ýuwaş umman, standart wagt", "AKST": "Alýaska, standart wagt", "WITA": "Merkezi Indoneziýa", "JDT": "Ýaponiýa, tomusky wagt", "BOT": "Boliwiýa", "COST": "Kolumbiýa, tomusky wagt", "HNNOMX": "D.g.-G.b. Meksika, standart wagt", "CST": "Merkezi Amerika, standart wagt", "SRT": "Surinam", "HKT": "Gonkong, standart wagt", "CLST": "Çili, tomusky wagt", "SGT": "Singapur, standart wagt", "HKST": "Gonkong, tomusky wagt", "ChST": "Çamorro", "ACST": "Merkezi Awstraliýa, standart wagt", "EST": "Günorta Amerika, standart wagt", "HEPM": "Sen Pýer we Mikelon, tomusky wagt", "CHAST": "Çatem, standart wagt", "EAT": "Gündogar Afrika", "ADT": "Atlantika, tomusky wagt", "PDT": "Ýuwaş umman, tomusky wagt", "AWST": "Günbatar Awstraliýa, standart wagt", "CHADT": "Çatem, tomusky wagt", "IST": "Hindistan", "HNEG": "Gündogar Grenlandiýa, standart wagt", "ECT": "Ekwador", "HENOMX": "D.g.-G.b. Meksika, tomusky wagt", "MDT": "MDT", "AST": "Atlantika, standart wagt", "VET": "Wenesuela", "WIT": "Gündogar Indoneziýa", "SAST": "Günorta Afrika, standart wagt", "TMST": "Türkmenistan, tomusky wagt", "OEZ": "Gündogar Ýewropa, standart wagt", "MST": "MST", "WIB": "Günbatar Indoneziýa"}, -+ timezones: map[string]string{"AEDT": "Gündogar Awstraliýa, tomusky wagt", "HKT": "Gonkong, standart wagt", "CLST": "Çili, tomusky wagt", "AKDT": "Alýaska, tomusky wagt", "SAST": "Günorta Afrika, standart wagt", "NZST": "Täze Zelandiýa, standart wagt", "SRT": "Surinam", "ACDT": "Merkezi Awstraliýa, tomusky wagt", "WESZ": "Günbatar Ýewropa, tomusky wagt", "HNCU": "Kuba, standart wagt", "HECU": "Kuba, tomusky wagt", "MST": "Daglyk ýeri, standart wagt (ABŞ)", "MDT": "Daglyk ýeri, tomusky wagt (ABŞ)", "HNT": "Nýufaundlend, standart wagt", "NZDT": "Täze Zelandiýa, tomusky wagt", "CDT": "Merkezi Amerika, tomusky wagt", "HAST": "Gawaý-Aleut, standart wagt", "JST": "Ýaponiýa, standart wagt", "WAT": "Günbatar Afrika, standart wagt", "GYT": "Gaýana", "EDT": "Günorta Amerika, tomusky wagt", "CAT": "Merkezi Afrika", "ChST": "Çamorro", "ARST": "Argentina, tomusky wagt", "HEPM": "Sen Pýer we Mikelon, tomusky wagt", "VET": "Wenesuela", "COST": "Kolumbiýa, tomusky wagt", "EST": "Günorta Amerika, standart wagt", "TMT": "Türkmenistan, standart wagt", "JDT": "Ýaponiýa, tomusky wagt", "WEZ": "Günbatar Ýewropa, standart wagt", "OEZ": "Gündogar Ýewropa, standart wagt", "OESZ": "Gündogar Ýewropa, tomusky wagt", "CHADT": "Çatem, tomusky wagt", "BT": "Butan", "AEST": "Gündogar Awstraliýa, standart wagt", "HAT": "Nýufaundlend, tomusky wagt", "WART": "Günbatar Argentina, standart wagt", "CST": "Merkezi Amerika, standart wagt", "ADT": "Atlantika, tomusky wagt", "ART": "Argentina, standart wagt", "CLT": "Çili, standart wagt", "MESZ": "Merkezi Ýewropa, tomusky wagt", "HENOMX": "D.g.-G.b. Meksika, tomusky wagt", "∅∅∅": "∅∅∅", "HNPMX": "Meksikan Ýuwaş umman, standart wagt", "HNOG": "Günbatar Grenlandiýa, standart wagt", "EAT": "Gündogar Afrika", "HKST": "Gonkong, tomusky wagt", "ECT": "Ekwador", "AST": "Atlantika, standart wagt", "HEOG": "Günbatar Grenlandiýa, tomusky wagt", "MEZ": "Merkezi Ýewropa, standart wagt", "HNEG": "Gündogar Grenlandiýa, standart wagt", "MYT": "Malaýziýa", "UYST": "Urugwaý, tomusky wagt", "IST": "Hindistan", "AKST": "Alýaska, standart wagt", "WARST": "Günbatar Argentina, tomusky wagt", "COT": "Kolumbiýa, standart wagt", "HNNOMX": "D.g.-G.b. Meksika, standart wagt", "LHDT": "Lord-Hau, tomusky wagt", "UYT": "Urugwaý, standart wagt", "ACWST": "Merkezi Awstraliýa, günbatar tarap, standart wagt", "SGT": "Singapur, standart wagt", "BOT": "Boliwiýa", "AWST": "Günbatar Awstraliýa, standart wagt", "PDT": "Ýuwaş umman, tomusky wagt", "HADT": "Gawaý-Aleut, tomusky wagt", "HEEG": "Gündogar Grenlandiýa, tomusky wagt", "HNPM": "Sen Pýer we Mikelon, standart wagt", "HEPMX": "Meksikan Ýuwaş umman, tomusky wagt", "GMT": "Grinwiç boýunça orta wagt", "ACWDT": "Merkezi Awstraliýa, günbatar tarap, tomusky wagt", "WAST": "Günbatar Afrika, tomusky wagt", "GFT": "Fransuz Gwiana", "ACST": "Merkezi Awstraliýa, standart wagt", "AWDT": "Günbatar Awstraliýa, tomusky wagt", "LHST": "Lord-Hau, standart wagt", "CHAST": "Çatem, standart wagt", "PST": "Ýuwaş umman, standart wagt", "WIT": "Gündogar Indoneziýa", "TMST": "Türkmenistan, tomusky wagt", "WITA": "Merkezi Indoneziýa", "WIB": "Günbatar Indoneziýa"}, - } - } -  -diff --git a/tk_TM/tk_TM.go b/tk_TM/tk_TM.go -index dca4c57..1e9d802 100644 ---- a/tk_TM/tk_TM.go -+++ b/tk_TM/tk_TM.go -@@ -10,63 +10,45 @@ import ( - ) -  - type tk_TM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- percentSuffix string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'tk_TM' locale - func New() locales.Translator { - return &tk_TM{ -- locale: "tk_TM", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "ýan", "few", "mart", "apr", "maý", "iýun", "iýul", "awg", "sen", "okt", "noý", "dek"}, -- monthsNarrow: []string{"", "Ý", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "ýanwar", "fewral", "mart", "aprel", "maý", "iýun", "iýul", "awgust", "sentýabr", "oktýabr", "noýabr", "dekabr"}, -- daysAbbreviated: []string{"ýb", "db", "sb", "çb", "pb", "an", "şb"}, -- daysNarrow: []string{"Ý", "D", "S", "Ç", "P", "A", "Ş"}, -- daysWide: []string{"ýekşenbe", "duşenbe", "sişenbe", "çarşenbe", "penşenbe", "anna", "şenbe"}, -- timezones: map[string]string{"NZST": "Täze Zelandiýa, standart wagt", "∅∅∅": "Amazonka, tomusky wagt", "WIB": "Günbatar Indoneziýa", "ACWST": "Merkezi Awstraliýa, günbatar tarap, standart wagt", "AEDT": "Gündogar Awstraliýa, tomusky wagt", "WAST": "Günbatar Afrika, tomusky wagt", "WART": "Günbatar Argentina, standart wagt", "SGT": "Singapur, standart wagt", "HNPMX": "Meksikan Ýuwaş umman, standart wagt", "AEST": "Gündogar Awstraliýa, standart wagt", "HKT": "Gonkong, standart wagt", "ChST": "Çamorro", "OESZ": "Gündogar Ýewropa, tomusky wagt", "HEPMX": "Meksikan Ýuwaş umman, tomusky wagt", "ARST": "Argentina, tomusky wagt", "AWST": "Günbatar Awstraliýa, standart wagt", "MESZ": "Merkezi Ýewropa, tomusky wagt", "JST": "Ýaponiýa, standart wagt", "HENOMX": "D.g.-G.b. Meksika, tomusky wagt", "ADT": "Atlantika, tomusky wagt", "HEOG": "Günbatar Grenlandiýa, tomusky wagt", "PDT": "Ýuwaş umman, tomusky wagt", "HEPM": "Sen Pýer we Mikelon, tomusky wagt", "EAT": "Gündogar Afrika", "HNCU": "Kuba, standart wagt", "MDT": "MDT", "UYT": "Urugwaý, standart wagt", "AST": "Atlantika, standart wagt", "WIT": "Gündogar Indoneziýa", "NZDT": "Täze Zelandiýa, tomusky wagt", "HECU": "Kuba, tomusky wagt", "WESZ": "Günbatar Ýewropa, tomusky wagt", "MEZ": "Merkezi Ýewropa, standart wagt", "LHST": "Lord-Hau, standart wagt", "IST": "Hindistan", "GFT": "Fransuz Gwiana", "ACDT": "Merkezi Awstraliýa, tomusky wagt", "CDT": "Merkezi Amerika, tomusky wagt", "EDT": "Günorta Amerika, tomusky wagt", "BT": "Butan", "LHDT": "Lord-Hau, tomusky wagt", "CHAST": "Çatem, standart wagt", "CLST": "Çili, tomusky wagt", "COT": "Kolumbiýa, standart wagt", "COST": "Kolumbiýa, tomusky wagt", "EST": "Günorta Amerika, standart wagt", "WITA": "Merkezi Indoneziýa", "ACST": "Merkezi Awstraliýa, standart wagt", "WARST": "Günbatar Argentina, tomusky wagt", "AKST": "Alýaska, standart wagt", "HNPM": "Sen Pýer we Mikelon, standart wagt", "WEZ": "Günbatar Ýewropa, standart wagt", "HNT": "Nýufaundlend, standart wagt", "CHADT": "Çatem, tomusky wagt", "CLT": "Çili, standart wagt", "BOT": "Boliwiýa", "CAT": "Merkezi Afrika", "CST": "Merkezi Amerika, standart wagt", "HAST": "Gawaý-Aleut, standart wagt", "ART": "Argentina, standart wagt", "TMT": "Türkmenistan, standart wagt", "GMT": "Grinwiç boýunça orta wagt", "HNOG": "Günbatar Grenlandiýa, standart wagt", "AWDT": "Günbatar Awstraliýa, tomusky wagt", "HKST": "Gonkong, tomusky wagt", "SAST": "Günorta Afrika, standart wagt", "UYST": "Urugwaý, tomusky wagt", "VET": "Wenesuela", "PST": "Ýuwaş umman, standart wagt", "ACWDT": "Merkezi Awstraliýa, günbatar tarap, tomusky wagt", "JDT": "Ýaponiýa, tomusky wagt", "HEEG": "Gündogar Grenlandiýa, tomusky wagt", "WAT": "Günbatar Afrika, standart wagt", "MYT": "Malaýziýa", "TMST": "Türkmenistan, tomusky wagt", "GYT": "Gaýana", "HADT": "Gawaý-Aleut, tomusky wagt", "HNEG": "Gündogar Grenlandiýa, standart wagt", "OEZ": "Gündogar Ýewropa, standart wagt", "SRT": "Surinam", "HAT": "Nýufaundlend, tomusky wagt", "ECT": "Ekwador", "HNNOMX": "D.g.-G.b. Meksika, standart wagt", "MST": "MST", "AKDT": "Alýaska, tomusky wagt"}, -+ locale: "tk_TM", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "VET": "VET", "AKST": "AKST", "HKST": "HKST", "MYT": "MYT", "CHAST": "CHAST", "COST": "COST", "ACDT": "ACDT", "BT": "BT", "ECT": "ECT", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "HEOG": "HEOG", "WAST": "WAST", "EDT": "EDT", "CDT": "CDT", "WIB": "WIB", "BOT": "BOT", "HAST": "HAST", "AWDT": "AWDT", "ACWDT": "ACWDT", "GFT": "GFT", "SAST": "SAST", "∅∅∅": "∅∅∅", "EAT": "EAT", "IST": "IST", "CHADT": "CHADT", "HNPMX": "HNPMX", "OEZ": "OEZ", "CLST": "CLST", "WITA": "WITA", "AEST": "AEST", "TMST": "TMST", "ChST": "ChST", "SRT": "SRT", "HENOMX": "HENOMX", "HNPM": "HNPM", "WEZ": "WEZ", "COT": "COT", "ART": "ART", "MESZ": "MESZ", "WESZ": "WESZ", "SGT": "SGT", "OESZ": "OESZ", "WART": "WART", "HNOG": "HNOG", "EST": "EST", "CST": "CST", "GMT": "GMT", "AWST": "AWST", "LHDT": "LHDT", "JST": "JST", "ACWST": "ACWST", "AEDT": "AEDT", "TMT": "TMT", "NZST": "NZST", "NZDT": "NZDT", "UYST": "UYST", "HNCU": "HNCU", "AKDT": "AKDT", "GYT": "GYT", "MST": "MST", "AST": "AST", "ARST": "ARST", "PST": "PST", "PDT": "PDT", "UYT": "UYT", "WAT": "WAT", "HNT": "HNT", "WIT": "WIT", "HKT": "HKT", "CAT": "CAT", "CLT": "CLT", "ADT": "ADT", "MEZ": "MEZ", "ACST": "ACST", "HEEG": "HEEG", "LHST": "LHST", "JDT": "JDT", "HECU": "HECU", "HEPMX": "HEPMX", "WARST": "WARST", "MDT": "MDT", "HAT": "HAT"}, - } - } -  -@@ -119,7 +101,7 @@ func (tk *tk_TM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (tk *tk_TM) MonthsAbbreviated() []string { -- return tk.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -129,7 +111,7 @@ func (tk *tk_TM) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (tk *tk_TM) MonthsNarrow() []string { -- return tk.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -139,7 +121,7 @@ func (tk *tk_TM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (tk *tk_TM) MonthsWide() []string { -- return tk.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -185,77 +167,13 @@ func (tk *tk_TM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'tk_TM' and handles both Whole and Real numbers based on 'v' - func (tk *tk_TM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(tk.group) - 1; j >= 0; j-- { -- b = append(b, tk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'tk_TM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (tk *tk_TM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tk.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, tk.percentSuffix...) -- -- b = append(b, tk.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'tk_TM' -@@ -263,58 +181,7 @@ func (tk *tk_TM) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(tk.group) - 1; j >= 0; j-- { -- b = append(b, tk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, tk.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'tk_TM' -@@ -323,65 +190,7 @@ func (tk *tk_TM) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(tk.group) - 1; j >= 0; j-- { -- b = append(b, tk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, tk.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, tk.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, tk.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'tk_TM' -@@ -389,27 +198,6 @@ func (tk *tk_TM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -418,17 +206,6 @@ func (tk *tk_TM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tk.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,17 +214,6 @@ func (tk *tk_TM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -456,20 +222,6 @@ func (tk *tk_TM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, tk.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -478,19 +230,6 @@ func (tk *tk_TM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -499,26 +238,6 @@ func (tk *tk_TM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -527,30 +246,6 @@ func (tk *tk_TM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -559,34 +254,5 @@ func (tk *tk_TM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, tk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := tk.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/to/to.go b/to/to.go -index a49f350..e53829d 100644 ---- a/to/to.go -+++ b/to/to.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KM", "TS"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ki muʻa", "taʻu ʻo Sīsū"}, -- timezones: map[string]string{"EDT": "houa fakaʻamelika-tokelau hahake taimi liliu", "UYT": "houa fakaʻulukuai taimi totonu", "WESZ": "houa fakaʻeulope-hihifo taimi liliu", "WITA": "houa fakaʻinitonisia-loto", "CHADT": "houa fakasatihami taimi liliu", "WIT": "houa fakaʻinitonisia-hahake", "GFT": "houa fakakuiana-fakafalanisē", "TMST": "houa fakatūkimenisitani taimi liliu", "ChST": "houa fakakamolo", "COT": "houa fakakolomipia taimi totonu", "HNPMX": "houa fakamekisikou-pasifika taimi totonu", "ACWDT": "houa fakaʻaositelēlia-loto-hihifo taimi liliu", "CLT": "houa fakasili taimi totonu", "ACDT": "houa fakaʻaositelēlia-loto taimi liliu", "WAT": "houa fakaʻafelika-hihifo taimi totonu", "CDT": "houa fakaʻamelika-tokelau loto taimi liliu", "AST": "houa fakaʻamelika-tokelau ʻatalanitiki taimi totonu", "UYST": "houa fakaʻulukuai taimi liliu", "AWDT": "houa fakaʻaositelēlia-hihifo taimi liliu", "∅∅∅": "houa fakaʻamasōne taimi liliu", "ECT": "houa fakaʻekuetoa", "AWST": "houa fakaʻaositelēlia-hihifo taimi totonu", "SAST": "houa fakaʻafelika-tonga", "HNEG": "houa fakafonuamata-hahake taimi totonu", "ACST": "houa fakaʻaositelēlia-loto taimi totonu", "WAST": "houa fakaʻafelika-hihifo taimi liliu", "HENOMX": "houa fakamekisikou-tokelauhihifo taimi liliu", "MST": "houa fakamakau taimi totonu", "JST": "houa fakasiapani taimi totonu", "EAT": "houa fakaʻafelika-hahake", "HEPMX": "houa fakamekisikou-pasifika taimi liliu", "HNT": "houa fakafonuaʻilofoʻou taimi totonu", "ART": "houa fakaʻasenitina taimi totonu", "NZST": "houa fakanuʻusila taimi totonu", "GMT": "houa fakakiliniuisi mālie", "WARST": "houa fakaʻasenitina-hihifo taimi liliu", "SGT": "houa fakasingapoa", "ARST": "houa fakaʻasenitina taimi liliu", "NZDT": "houa fakanuʻusila taimi liliu", "CLST": "houa fakasili taimi liliu", "BOT": "houa fakapolīvia", "HNNOMX": "houa fakamekisikou-tokelauhihifo taimi totonu", "HAST": "houa fakahauaʻi taimi totonu", "HNPM": "houa fakasā-piea-mo-mikeloni taimi totonu", "CHAST": "houa fakasatihami taimi totonu", "LHST": "houa fakamotuʻeikihoue taimi totonu", "LHDT": "houa fakamotuʻeikihoue taimi liliu", "MEZ": "houa fakaʻeulope-loto taimi totonu", "TMT": "houa fakatūkimenisitani taimi totonu", "EST": "houa fakaʻamelika-tokelau hahake taimi totonu", "VET": "houa fakavenesuela", "SRT": "houa fakasuliname", "PDT": "houa fakaʻamelika-tokelau pasifika taimi liliu", "HEPM": "houa fakasā-piea-mo-mikeloni taimi liliu", "CAT": "houa fakaʻafelika-loto", "WART": "houa fakaʻasenitina-hihifo taimi totonu", "ADT": "houa fakaʻamelika-tokelau ʻatalanitiki taimi liliu", "GYT": "houa fakakuiana", "ACWST": "houa fakaʻaositelēlia-loto-hihifo taimi totonu", "HEOG": "houa fakafonuamata-hihifo taimi liliu", "MESZ": "houa fakaʻeulope-loto taimi liliu", "CST": "houa fakaʻamelika-tokelau loto taimi totonu", "BT": "houa fakapūtani", "PST": "houa fakaʻamelika-tokelau pasifika taimi totonu", "HEEG": "houa fakafonuamata-hahake taimi liliu", "MYT": "houa fakamaleisia", "HADT": "houa fakahauaʻi taimi liliu", "HAT": "houa fakafonuaʻilofoʻou taimi liliu", "HNOG": "houa fakafonuamata-hihifo taimi totonu", "HKT": "houa fakahongi-kongi taimi totonu", "AEDT": "houa fakaʻaositelēlia-hahake taimi liliu", "IST": "houa fakaʻinitia", "OEZ": "houa fakaʻeulope-hahake taimi totonu", "AKST": "houa fakaʻalasika taimi totonu", "AKDT": "houa fakaʻalasika taimi liliu", "WIB": "houa fakaʻinitonisia-hihifo", "HKST": "houa fakahongi-kongi taimi liliu", "AEST": "houa fakaʻaositelēlia-hahake taimi totonu", "HNCU": "houa fakakiupa taimi totonu", "HECU": "houa fakakiupa taimi liliu", "MDT": "houa fakamakau taimi liliu", "WEZ": "houa fakaʻeulope-hihifo taimi totonu", "JDT": "houa fakasiapani taimi liliu", "OESZ": "houa fakaʻeulope-hahake taimi liliu", "COST": "houa fakakolomipia taimi liliu"}, -+ timezones: map[string]string{"CHADT": "houa fakasatihami taimi liliu", "PDT": "houa fakaʻamelika-tokelau pasifika taimi liliu", "GYT": "houa fakakuiana", "MDT": "houa fakamakau taimi liliu", "EAT": "houa fakaʻafelika-hahake", "MESZ": "houa fakaʻeulope-loto taimi liliu", "LHST": "houa fakamotuʻeikihoue taimi totonu", "UYT": "houa fakaʻulukuai taimi totonu", "WIB": "houa fakaʻinitonisia-hihifo", "NZST": "houa fakanuʻusila taimi totonu", "JST": "houa fakasiapani taimi totonu", "MYT": "houa fakamaleisia", "HEPM": "houa fakasā-piea-mo-mikeloni taimi liliu", "VET": "houa fakavenesuela", "WIT": "houa fakaʻinitonisia-hahake", "EDT": "houa fakaʻamelika-tokelau hahake taimi liliu", "TMT": "houa fakatūkimenisitani taimi totonu", "WITA": "houa fakaʻinitonisia-loto", "NZDT": "houa fakanuʻusila taimi liliu", "HNEG": "houa fakafonuamata-hahake taimi totonu", "WESZ": "houa fakaʻeulope-hihifo taimi liliu", "MEZ": "houa fakaʻeulope-loto taimi totonu", "AWDT": "houa fakaʻaositelēlia-hihifo taimi liliu", "UYST": "houa fakaʻulukuai taimi liliu", "ACWDT": "houa fakaʻaositelēlia-loto-hihifo taimi liliu", "WAT": "houa fakaʻafelika-hihifo taimi totonu", "WART": "houa fakaʻasenitina-hihifo taimi totonu", "TMST": "houa fakatūkimenisitani taimi liliu", "HEEG": "houa fakafonuamata-hahake taimi liliu", "SGT": "houa fakasingapoa", "HKT": "houa fakahongi-kongi taimi totonu", "BOT": "houa fakapolīvia", "ACWST": "houa fakaʻaositelēlia-loto-hihifo taimi totonu", "WAST": "houa fakaʻafelika-hihifo taimi liliu", "AKDT": "houa fakaʻalasika taimi liliu", "OEZ": "houa fakaʻeulope-hahake taimi totonu", "HNOG": "houa fakafonuamata-hihifo taimi totonu", "HEOG": "houa fakafonuamata-hihifo taimi liliu", "EST": "houa fakaʻamelika-tokelau hahake taimi totonu", "ART": "houa fakaʻasenitina taimi totonu", "HNNOMX": "houa fakamekisikou-tokelauhihifo taimi totonu", "HENOMX": "houa fakamekisikou-tokelauhihifo taimi liliu", "AEST": "houa fakaʻaositelēlia-hahake taimi totonu", "PST": "houa fakaʻamelika-tokelau pasifika taimi totonu", "CST": "houa fakaʻamelika-tokelau loto taimi totonu", "ARST": "houa fakaʻasenitina taimi liliu", "AEDT": "houa fakaʻaositelēlia-hahake taimi liliu", "HEPMX": "houa fakamekisikou-pasifika taimi liliu", "AST": "houa fakaʻamelika-tokelau ʻatalanitiki taimi totonu", "SAST": "houa fakaʻafelika-tonga", "HKST": "houa fakahongi-kongi taimi liliu", "CLST": "houa fakasili taimi liliu", "ChST": "houa fakakamolo", "BT": "houa fakapūtani", "HNPMX": "houa fakamekisikou-pasifika taimi totonu", "HNT": "houa fakafonuaʻilofoʻou taimi totonu", "ECT": "houa fakaʻekuetoa", "SRT": "houa fakasuliname", "ACDT": "houa fakaʻaositelēlia-loto taimi liliu", "AWST": "houa fakaʻaositelēlia-hihifo taimi totonu", "IST": "houa fakaʻinitia", "WARST": "houa fakaʻasenitina-hihifo taimi liliu", "∅∅∅": "houa fakaʻāsolesi taimi liliu", "CDT": "houa fakaʻamelika-tokelau loto taimi liliu", "CHAST": "houa fakasatihami taimi totonu", "AKST": "houa fakaʻalasika taimi totonu", "GFT": "houa fakakuiana-fakafalanisē", "COST": "houa fakakolomipia taimi liliu", "MST": "houa fakamakau taimi totonu", "ADT": "houa fakaʻamelika-tokelau ʻatalanitiki taimi liliu", "HAST": "houa fakahauaʻi taimi totonu", "OESZ": "houa fakaʻeulope-hahake taimi liliu", "HAT": "houa fakafonuaʻilofoʻou taimi liliu", "CLT": "houa fakasili taimi totonu", "GMT": "houa fakakiliniuisi mālie", "HADT": "houa fakahauaʻi taimi liliu", "ACST": "houa fakaʻaositelēlia-loto taimi totonu", "JDT": "houa fakasiapani taimi liliu", "HNPM": "houa fakasā-piea-mo-mikeloni taimi totonu", "HNCU": "houa fakakiupa taimi totonu", "HECU": "houa fakakiupa taimi liliu", "CAT": "houa fakaʻafelika-loto", "LHDT": "houa fakamotuʻeikihoue taimi liliu", "WEZ": "houa fakaʻeulope-hihifo taimi totonu", "COT": "houa fakakolomipia taimi totonu"}, - } - } -  -diff --git a/to_TO/to_TO.go b/to_TO/to_TO.go -index 59639ed..3c742c6 100644 ---- a/to_TO/to_TO.go -+++ b/to_TO/to_TO.go -@@ -10,68 +10,45 @@ import ( - ) -  - type to_TO struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyNegativePrefix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'to_TO' locale - func New() locales.Translator { - return &to_TO{ -- locale: "to_TO", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "Sān", "Fēp", "Maʻa", "ʻEpe", "Mē", "Sun", "Siu", "ʻAok", "Sep", "ʻOka", "Nōv", "Tīs"}, -- monthsNarrow: []string{"", "S", "F", "M", "E", "M", "S", "S", "A", "S", "O", "N", "T"}, -- monthsWide: []string{"", "Sānuali", "Fēpueli", "Maʻasi", "ʻEpeleli", "Mē", "Sune", "Siulai", "ʻAokosi", "Sepitema", "ʻOkatopa", "Nōvema", "Tīsema"}, -- daysAbbreviated: []string{"Sāp", "Mōn", "Tūs", "Pul", "Tuʻa", "Fal", "Tok"}, -- daysNarrow: []string{"S", "M", "T", "P", "T", "F", "T"}, -- daysShort: []string{"Sāp", "Mōn", "Tūs", "Pul", "Tuʻa", "Fal", "Tok"}, -- daysWide: []string{"Sāpate", "Mōnite", "Tūsite", "Pulelulu", "Tuʻapulelulu", "Falaite", "Tokonaki"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"AM", "PM"}, -- periodsWide: []string{"hengihengi", "efiafi"}, -- erasAbbreviated: []string{"KM", "TS"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ki muʻa", "taʻu ʻo Sīsū"}, -- timezones: map[string]string{"VET": "houa fakavenesuela", "ARST": "houa fakaʻasenitina taimi liliu", "AEDT": "houa fakaʻaositelēlia-hahake taimi liliu", "AWST": "houa fakaʻaositelēlia-hihifo taimi totonu", "HEPM": "houa fakasā-piea-mo-mikeloni taimi liliu", "∅∅∅": "houa fakaʻāsolesi taimi liliu", "HNNOMX": "houa fakamekisikou-tokelauhihifo taimi totonu", "HNPMX": "houa fakamekisikou-pasifika taimi totonu", "BT": "houa fakapūtani", "AEST": "houa fakaʻaositelēlia-hahake taimi totonu", "HKT": "houa fakahongi-kongi taimi totonu", "GFT": "houa fakakuiana-fakafalanisē", "WARST": "houa fakaʻasenitina-hihifo taimi liliu", "HNT": "houa fakafonuaʻilofoʻou taimi totonu", "AWDT": "houa fakaʻaositelēlia-hihifo taimi liliu", "HNEG": "houa fakafonuamata-hahake taimi totonu", "WIT": "houa fakaʻinitonisia-hahake", "EDT": "houa fakaʻamelika-tokelau hahake taimi liliu", "AKST": "houa fakaʻalasika taimi totonu", "WIB": "houa fakaʻinitonisia-hihifo", "ACWDT": "houa fakaʻaositelēlia-loto-hihifo taimi liliu", "MESZ": "houa fakaʻeulope-loto taimi liliu", "IST": "houa fakaʻinitia", "GMT": "houa fakakiliniuisi mālie", "CLST": "houa fakasili taimi liliu", "HEOG": "houa fakafonuamata-hihifo taimi liliu", "SGT": "houa fakasingapoa", "MST": "houa fakamakau taimi totonu", "ADT": "houa fakaʻamelika-tokelau ʻatalanitiki taimi liliu", "HAST": "houa fakahauaʻi taimi totonu", "WESZ": "houa fakaʻeulope-hihifo taimi liliu", "ACDT": "houa fakaʻaositelēlia-loto taimi liliu", "COST": "houa fakakolomipia taimi liliu", "SRT": "houa fakasuliname", "HEEG": "houa fakafonuamata-hahake taimi liliu", "TMT": "houa fakatūkimenisitani taimi totonu", "UYST": "houa fakaʻulukuai taimi liliu", "MEZ": "houa fakaʻeulope-loto taimi totonu", "JST": "houa fakasiapani taimi totonu", "ChST": "houa fakakamolo", "TMST": "houa fakatūkimenisitani taimi liliu", "HNPM": "houa fakasā-piea-mo-mikeloni taimi totonu", "AKDT": "houa fakaʻalasika taimi liliu", "ART": "houa fakaʻasenitina taimi totonu", "HKST": "houa fakahongi-kongi taimi liliu", "LHDT": "houa fakamotuʻeikihoue taimi liliu", "WAT": "houa fakaʻafelika-hihifo taimi totonu", "MDT": "houa fakamakau taimi liliu", "CST": "houa fakaʻamelika-tokelau loto taimi totonu", "CDT": "houa fakaʻamelika-tokelau loto taimi liliu", "AST": "houa fakaʻamelika-tokelau ʻatalanitiki taimi totonu", "HAT": "houa fakafonuaʻilofoʻou taimi liliu", "HNOG": "houa fakafonuamata-hihifo taimi totonu", "NZST": "houa fakanuʻusila taimi totonu", "CHADT": "houa fakasatihami taimi liliu", "HNCU": "houa fakakiupa taimi totonu", "OESZ": "houa fakaʻeulope-hahake taimi liliu", "CAT": "houa fakaʻafelika-loto", "JDT": "houa fakasiapani taimi liliu", "NZDT": "houa fakanuʻusila taimi liliu", "HADT": "houa fakahauaʻi taimi liliu", "PDT": "houa fakaʻamelika-tokelau pasifika taimi liliu", "WITA": "houa fakaʻinitonisia-loto", "LHST": "houa fakamotuʻeikihoue taimi totonu", "CHAST": "houa fakasatihami taimi totonu", "MYT": "houa fakamaleisia", "HECU": "houa fakakiupa taimi liliu", "WEZ": "houa fakaʻeulope-hihifo taimi totonu", "CLT": "houa fakasili taimi totonu", "WART": "houa fakaʻasenitina-hihifo taimi totonu", "GYT": "houa fakakuiana", "PST": "houa fakaʻamelika-tokelau pasifika taimi totonu", "OEZ": "houa fakaʻeulope-hahake taimi totonu", "ECT": "houa fakaʻekuetoa", "HENOMX": "houa fakamekisikou-tokelauhihifo taimi liliu", "EST": "houa fakaʻamelika-tokelau hahake taimi totonu", "UYT": "houa fakaʻulukuai taimi totonu", "ACWST": "houa fakaʻaositelēlia-loto-hihifo taimi totonu", "SAST": "houa fakaʻafelika-tonga", "BOT": "houa fakapolīvia", "WAST": "houa fakaʻafelika-hihifo taimi liliu", "COT": "houa fakakolomipia taimi totonu", "ACST": "houa fakaʻaositelēlia-loto taimi totonu", "EAT": "houa fakaʻafelika-hahake", "HEPMX": "houa fakamekisikou-pasifika taimi liliu"}, -+ locale: "to_TO", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WITA": "WITA", "NZDT": "NZDT", "SRT": "SRT", "HENOMX": "HENOMX", "HNCU": "HNCU", "HNT": "HNT", "JST": "JST", "CHAST": "CHAST", "WESZ": "WESZ", "WIB": "WIB", "HAST": "HAST", "PDT": "PDT", "AKST": "AKST", "HNOG": "HNOG", "EDT": "EDT", "GYT": "GYT", "CDT": "CDT", "HNEG": "HNEG", "JDT": "JDT", "PST": "PST", "BT": "BT", "WAST": "WAST", "GFT": "GFT", "CLST": "CLST", "BOT": "BOT", "ACWDT": "ACWDT", "SGT": "SGT", "VET": "VET", "HNPMX": "HNPMX", "TMT": "TMT", "ECT": "ECT", "HADT": "HADT", "LHST": "LHST", "HEPM": "HEPM", "MDT": "MDT", "ACST": "ACST", "ACDT": "ACDT", "AEDT": "AEDT", "UYT": "UYT", "WAT": "WAT", "WARST": "WARST", "CAT": "CAT", "AWST": "AWST", "IST": "IST", "AEST": "AEST", "EAT": "EAT", "MEZ": "MEZ", "HEEG": "HEEG", "HNPM": "HNPM", "SAST": "SAST", "∅∅∅": "∅∅∅", "GMT": "GMT", "HNNOMX": "HNNOMX", "CLT": "CLT", "WEZ": "WEZ", "OEZ": "OEZ", "OESZ": "OESZ", "COST": "COST", "MESZ": "MESZ", "AWDT": "AWDT", "CHADT": "CHADT", "HEOG": "HEOG", "HKT": "HKT", "WART": "WART", "CST": "CST", "MST": "MST", "NZST": "NZST", "AST": "AST", "LHDT": "LHDT", "MYT": "MYT", "UYST": "UYST", "ADT": "ADT", "ART": "ART", "ARST": "ARST", "HECU": "HECU", "HAT": "HAT", "ChST": "ChST", "WIT": "WIT", "COT": "COT", "TMST": "TMST", "ACWST": "ACWST", "HEPMX": "HEPMX", "AKDT": "AKDT", "EST": "EST", "HKST": "HKST"}, - } - } -  -@@ -117,7 +94,7 @@ func (to *to_TO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (to *to_TO) MonthsAbbreviated() []string { -- return to.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +104,7 @@ func (to *to_TO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (to *to_TO) MonthsNarrow() []string { -- return to.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +114,7 @@ func (to *to_TO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (to *to_TO) MonthsWide() []string { -- return to.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +160,13 @@ func (to *to_TO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'to_TO' and handles both Whole and Real numbers based on 'v' - func (to *to_TO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, to.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, to.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, to.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'to_TO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (to *to_TO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, to.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, to.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, to.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'to_TO' -@@ -257,60 +174,7 @@ func (to *to_TO) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := to.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, to.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, to.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(to.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, to.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, to.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, to.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'to_TO' -@@ -319,72 +183,7 @@ func (to *to_TO) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := to.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, to.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, to.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(to.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, to.currencyNegativePrefix[j]) -- } -- -- b = append(b, to.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(to.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, to.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, to.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'to_TO' -@@ -392,17 +191,6 @@ func (to *to_TO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -411,17 +199,6 @@ func (to *to_TO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, to.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -430,17 +207,6 @@ func (to *to_TO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, to.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,19 +215,6 @@ func (to *to_TO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, to.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, to.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,28 +223,6 @@ func (to *to_TO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, to.periodsAbbreviated[0]...) -- } else { -- b = append(b, to.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -500,35 +231,6 @@ func (to *to_TO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, to.periodsAbbreviated[0]...) -- } else { -- b = append(b, to.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -537,40 +239,6 @@ func (to *to_TO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, to.periodsAbbreviated[0]...) -- } else { -- b = append(b, to.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,44 +247,5 @@ func (to *to_TO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, to.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, to.periodsAbbreviated[0]...) -- } else { -- b = append(b, to.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := to.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/tr/tr.go b/tr/tr.go -index e10e0c3..c47dab9 100644 ---- a/tr/tr.go -+++ b/tr/tr.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"MÖ", "MS"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Milattan Önce", "Milattan Sonra"}, -- timezones: map[string]string{"MST": "Makao Standart Saati", "WESZ": "Batı Avrupa Yaz Saati", "HNEG": "Doğu Grönland Standart Saati", "COT": "Kolombiya Standart Saati", "ADT": "Atlantik Yaz Saati", "NZDT": "Yeni Zelanda Yaz Saati", "TMT": "Türkmenistan Standart Saati", "ACDT": "Orta Avustralya Yaz Saati", "MDT": "Makao Yaz Saati", "UYST": "Uruguay Yaz Saati", "HKT": "Hong Kong Standart Saati", "MEZ": "Orta Avrupa Standart Saati", "JDT": "Japonya Yaz Saati", "WAST": "Batı Afrika Yaz Saati", "HNNOMX": "Kuzeybatı Meksika Standart Saati", "WIT": "Doğu Endonezya Saati", "LHST": "Lord Howe Standart Saati", "JST": "Japonya Standart Saati", "GMT": "Greenwich Ortalama Saati", "WIB": "Batı Endonezya Saati", "ACWST": "İçbatı Avustralya Standart Saati", "ARST": "Arjantin Yaz Saati", "PDT": "Kuzey Amerika Pasifik Yaz Saati", "HNPM": "Saint Pierre ve Miquelon Standart Saati", "NZST": "Yeni Zelanda Standart Saati", "WARST": "Batı Arjantin Yaz Saati", "EST": "Kuzey Amerika Doğu Standart Saati", "CLST": "Şili Yaz Saati", "MYT": "Malezya Saati", "HEOG": "Batı Grönland Yaz Saati", "HKST": "Hong Kong Yaz Saati", "AWST": "Batı Avustralya Standart Saati", "CLT": "Şili Standart Saati", "GFT": "Fransız Guyanası Saati", "BOT": "Bolivya Saati", "HAST": "Hawaii-Aleut Standart Saati", "BT": "Bhutan Saati", "ACWDT": "İçbatı Avustralya Yaz Saati", "ChST": "Chamorro Saati", "CST": "Kuzey Amerika Merkezi Standart Saati", "CDT": "Kuzey Amerika Merkezi Yaz Saati", "SRT": "Surinam Saati", "CHADT": "Chatham Yaz Saati", "OESZ": "Doğu Avrupa Yaz Saati", "HNPMX": "Meksika Pasifik Kıyısı Standart Saati", "AKDT": "Alaska Yaz Saati", "ECT": "Ekvador Saati", "WART": "Batı Arjantin Standart Saati", "TMST": "Türkmenistan Yaz Saati", "AKST": "Alaska Standart Saati", "HADT": "Hawaii-Aleut Yaz Saati", "VET": "Venezuela Saati", "HAT": "Newfoundland Yaz Saati", "HNOG": "Batı Grönland Standart Saati", "WITA": "Orta Endonezya Saati", "CAT": "Orta Afrika Saati", "HEPMX": "Meksika Pasifik Kıyısı Yaz Saati", "AST": "Atlantik Standart Saati", "AEDT": "Doğu Avustralya Yaz Saati", "CHAST": "Chatham Standart Saati", "MESZ": "Orta Avrupa Yaz Saati", "SAST": "Güney Afrika Standart Saati", "ACST": "Orta Avustralya Standart Saati", "COST": "Kolombiya Yaz Saati", "HENOMX": "Kuzeybatı Meksika Yaz Saati", "HNT": "Newfoundland Standart Saati", "WEZ": "Batı Avrupa Standart Saati", "AWDT": "Batı Avustralya Yaz Saati", "HEEG": "Doğu Grönland Yaz Saati", "∅∅∅": "Peru Yaz Saati", "EDT": "Kuzey Amerika Doğu Yaz Saati", "PST": "Kuzey Amerika Pasifik Standart Saati", "AEST": "Doğu Avustralya Standart Saati", "HEPM": "Saint Pierre ve Miquelon Yaz Saati", "OEZ": "Doğu Avrupa Standart Saati", "EAT": "Doğu Afrika Saati", "HECU": "Küba Yaz Saati", "SGT": "Singapur Standart Saati", "GYT": "Guyana Saati", "UYT": "Uruguay Standart Saati", "ART": "Arjantin Standart Saati", "LHDT": "Lord Howe Yaz Saati", "WAT": "Batı Afrika Standart Saati", "HNCU": "Küba Standart Saati", "IST": "Hindistan Standart Saati"}, -+ timezones: map[string]string{"HEPM": "Saint Pierre ve Miquelon Yaz Saati", "ACWST": "İçbatı Avustralya Standart Saati", "HNT": "Newfoundland Standart Saati", "TMST": "Türkmenistan Yaz Saati", "CDT": "Kuzey Amerika Merkezi Yaz Saati", "MST": "Makao Standart Saati", "AST": "Atlantik Standart Saati", "HAST": "Hawaii-Aleut Standart Saati", "WEZ": "Batı Avrupa Standart Saati", "SAST": "Güney Afrika Standart Saati", "HNOG": "Batı Grönland Standart Saati", "EDT": "Kuzey Amerika Doğu Yaz Saati", "HENOMX": "Kuzeybatı Meksika Yaz Saati", "HNCU": "Küba Standart Saati", "PDT": "Kuzey Amerika Pasifik Yaz Saati", "WAST": "Batı Afrika Yaz Saati", "WIB": "Batı Endonezya Saati", "ACST": "Orta Avustralya Standart Saati", "HNEG": "Doğu Grönland Standart Saati", "GFT": "Fransız Guyanası Saati", "UYST": "Uruguay Yaz Saati", "AKST": "Alaska Standart Saati", "HKST": "Hong Kong Yaz Saati", "CLST": "Şili Yaz Saati", "NZDT": "Yeni Zelanda Yaz Saati", "ECT": "Ekvador Saati", "EAT": "Doğu Afrika Saati", "AEST": "Doğu Avustralya Standart Saati", "GYT": "Guyana Saati", "COT": "Kolombiya Standart Saati", "NZST": "Yeni Zelanda Standart Saati", "ART": "Arjantin Standart Saati", "OEZ": "Doğu Avrupa Standart Saati", "SRT": "Surinam Saati", "AWST": "Batı Avustralya Standart Saati", "SGT": "Singapur Standart Saati", "HECU": "Küba Yaz Saati", "HNPMX": "Meksika Pasifik Kıyısı Standart Saati", "HEPMX": "Meksika Pasifik Kıyısı Yaz Saati", "AKDT": "Alaska Yaz Saati", "∅∅∅": "Brasilia Yaz Saati", "EST": "Kuzey Amerika Doğu Standart Saati", "MDT": "Makao Yaz Saati", "ARST": "Arjantin Yaz Saati", "AWDT": "Batı Avustralya Yaz Saati", "CHADT": "Chatham Yaz Saati", "HAT": "Newfoundland Yaz Saati", "WART": "Batı Arjantin Standart Saati", "HEEG": "Doğu Grönland Yaz Saati", "WAT": "Batı Afrika Standart Saati", "OESZ": "Doğu Avrupa Yaz Saati", "TMT": "Türkmenistan Standart Saati", "CAT": "Orta Afrika Saati", "MYT": "Malezya Saati", "BT": "Bhutan Saati", "COST": "Kolombiya Yaz Saati", "LHST": "Lord Howe Standart Saati", "HNPM": "Saint Pierre ve Miquelon Standart Saati", "CLT": "Şili Standart Saati", "GMT": "Greenwich Ortalama Saati", "HADT": "Hawaii-Aleut Yaz Saati", "VET": "Venezuela Saati", "AEDT": "Doğu Avustralya Yaz Saati", "UYT": "Uruguay Standart Saati", "HEOG": "Batı Grönland Yaz Saati", "CST": "Kuzey Amerika Merkezi Standart Saati", "ChST": "Chamorro Saati", "ACDT": "Orta Avustralya Yaz Saati", "LHDT": "Lord Howe Yaz Saati", "IST": "Hindistan Standart Saati", "CHAST": "Chatham Standart Saati", "WARST": "Batı Arjantin Yaz Saati", "HKT": "Hong Kong Standart Saati", "WITA": "Orta Endonezya Saati", "BOT": "Bolivya Saati", "MEZ": "Orta Avrupa Standart Saati", "JST": "Japonya Standart Saati", "ACWDT": "İçbatı Avustralya Yaz Saati", "WESZ": "Batı Avrupa Yaz Saati", "WIT": "Doğu Endonezya Saati", "ADT": "Atlantik Yaz Saati", "MESZ": "Orta Avrupa Yaz Saati", "HNNOMX": "Kuzeybatı Meksika Standart Saati", "JDT": "Japonya Yaz Saati", "PST": "Kuzey Amerika Pasifik Standart Saati"}, - } - } -  -diff --git a/tr_CY/tr_CY.go b/tr_CY/tr_CY.go -index 5e16bc6..05394c7 100644 ---- a/tr_CY/tr_CY.go -+++ b/tr_CY/tr_CY.go -@@ -10,68 +10,45 @@ import ( - ) -  - type tr_CY struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'tr_CY' locale - func New() locales.Translator { - return &tr_CY{ -- locale: "tr_CY", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"}, -- monthsNarrow: []string{"", "O", "Ş", "M", "N", "M", "H", "T", "A", "E", "E", "K", "A"}, -- monthsWide: []string{"", "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"}, -- daysAbbreviated: []string{"Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"}, -- daysNarrow: []string{"P", "P", "S", "Ç", "P", "C", "C"}, -- daysShort: []string{"Pa", "Pt", "Sa", "Ça", "Pe", "Cu", "Ct"}, -- daysWide: []string{"Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"}, -- periodsAbbreviated: []string{"ÖÖ", "ÖS"}, -- periodsNarrow: []string{"öö", "ös"}, -- periodsWide: []string{"ÖÖ", "ÖS"}, -- erasAbbreviated: []string{"MÖ", "MS"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Milattan Önce", "Milattan Sonra"}, -- timezones: map[string]string{"HNCU": "Küba Standart Saati", "WIB": "Batı Endonezya Saati", "AEDT": "Doğu Avustralya Yaz Saati", "SAST": "Güney Afrika Standart Saati", "COST": "Kolombiya Yaz Saati", "HNNOMX": "Kuzeybatı Meksika Standart Saati", "HEOG": "Batı Grönland Yaz Saati", "GFT": "Fransız Guyanası Saati", "EST": "Kuzey Amerika Doğu Standart Saati", "HADT": "Hawaii-Aleut Yaz Saati", "NZST": "Yeni Zelanda Standart Saati", "NZDT": "Yeni Zelanda Yaz Saati", "IST": "Hindistan Standart Saati", "HNEG": "Doğu Grönland Standart Saati", "CDT": "Kuzey Amerika Merkezi Yaz Saati", "WESZ": "Batı Avrupa Yaz Saati", "HAT": "Newfoundland Yaz Saati", "AWST": "Batı Avustralya Standart Saati", "ACST": "Orta Avustralya Standart Saati", "WARST": "Batı Arjantin Yaz Saati", "SGT": "Singapur Standart Saati", "MST": "Makao Standart Saati", "TMST": "Türkmenistan Yaz Saati", "EDT": "Kuzey Amerika Doğu Yaz Saati", "AKST": "Alaska Standart Saati", "PST": "Kuzey Amerika Pasifik Standart Saati", "HNPM": "Saint Pierre ve Miquelon Standart Saati", "∅∅∅": "Amazon Yaz Saati", "JDT": "Japonya Yaz Saati", "BOT": "Bolivya Saati", "AWDT": "Batı Avustralya Yaz Saati", "ChST": "Chamorro Saati", "HENOMX": "Kuzeybatı Meksika Yaz Saati", "HECU": "Küba Yaz Saati", "HEEG": "Doğu Grönland Yaz Saati", "WAST": "Batı Afrika Yaz Saati", "CST": "Kuzey Amerika Merkezi Standart Saati", "WIT": "Doğu Endonezya Saati", "GMT": "Greenwich Ortalama Saati", "UYT": "Uruguay Standart Saati", "SRT": "Surinam Saati", "ARST": "Arjantin Yaz Saati", "HEPM": "Saint Pierre ve Miquelon Yaz Saati", "LHST": "Lord Howe Standart Saati", "LHDT": "Lord Howe Yaz Saati", "OESZ": "Doğu Avrupa Yaz Saati", "HKT": "Hong Kong Standart Saati", "ECT": "Ekvador Saati", "AKDT": "Alaska Yaz Saati", "ACWST": "İçbatı Avustralya Standart Saati", "AEST": "Doğu Avustralya Standart Saati", "HNOG": "Batı Grönland Standart Saati", "MESZ": "Orta Avrupa Yaz Saati", "UYST": "Uruguay Yaz Saati", "VET": "Venezuela Saati", "ART": "Arjantin Standart Saati", "HNPMX": "Meksika Pasifik Kıyısı Standart Saati", "GYT": "Guyana Saati", "HKST": "Hong Kong Yaz Saati", "HNT": "Newfoundland Standart Saati", "CHADT": "Chatham Yaz Saati", "TMT": "Türkmenistan Standart Saati", "EAT": "Doğu Afrika Saati", "WART": "Batı Arjantin Standart Saati", "WAT": "Batı Afrika Standart Saati", "MDT": "Makao Yaz Saati", "HEPMX": "Meksika Pasifik Kıyısı Yaz Saati", "AST": "Atlantik Standart Saati", "CHAST": "Chatham Standart Saati", "CLT": "Şili Standart Saati", "JST": "Japonya Standart Saati", "ACDT": "Orta Avustralya Yaz Saati", "ADT": "Atlantik Yaz Saati", "CLST": "Şili Yaz Saati", "WEZ": "Batı Avrupa Standart Saati", "ACWDT": "İçbatı Avustralya Yaz Saati", "WITA": "Orta Endonezya Saati", "MEZ": "Orta Avrupa Standart Saati", "OEZ": "Doğu Avrupa Standart Saati", "HAST": "Hawaii-Aleut Standart Saati", "BT": "Bhutan Saati", "CAT": "Orta Afrika Saati", "COT": "Kolombiya Standart Saati", "MYT": "Malezya Saati", "PDT": "Kuzey Amerika Pasifik Yaz Saati"}, -+ locale: "tr_CY", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "LHST": "LHST", "LHDT": "LHDT", "GYT": "GYT", "JST": "JST", "EDT": "EDT", "ACDT": "ACDT", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "TMST": "TMST", "ADT": "ADT", "GMT": "GMT", "HKT": "HKT", "HEEG": "HEEG", "AWST": "AWST", "WESZ": "WESZ", "HEPMX": "HEPMX", "HAT": "HAT", "WIT": "WIT", "SAST": "SAST", "ARST": "ARST", "TMT": "TMT", "HADT": "HADT", "MESZ": "MESZ", "HEPM": "HEPM", "ACWDT": "ACWDT", "HECU": "HECU", "AKDT": "AKDT", "COST": "COST", "WARST": "WARST", "CLST": "CLST", "NZST": "NZST", "ART": "ART", "ACST": "ACST", "AWDT": "AWDT", "PST": "PST", "PDT": "PDT", "SGT": "SGT", "OESZ": "OESZ", "JDT": "JDT", "UYT": "UYT", "WAST": "WAST", "AKST": "AKST", "OEZ": "OEZ", "HNT": "HNT", "COT": "COT", "BOT": "BOT", "VET": "VET", "HEOG": "HEOG", "CLT": "CLT", "NZDT": "NZDT", "AST": "AST", "BT": "BT", "UYST": "UYST", "WEZ": "WEZ", "HNCU": "HNCU", "CDT": "CDT", "SRT": "SRT", "AEDT": "AEDT", "CHADT": "CHADT", "EST": "EST", "CAT": "CAT", "MST": "MST", "MDT": "MDT", "ChST": "ChST", "HNPM": "HNPM", "HNPMX": "HNPMX", "WITA": "WITA", "ECT": "ECT", "EAT": "EAT", "HAST": "HAST", "MEZ": "MEZ", "MYT": "MYT", "ACWST": "ACWST", "HKST": "HKST", "AEST": "AEST", "CHAST": "CHAST", "WAT": "WAT", "CST": "CST", "WIB": "WIB", "HNEG": "HNEG", "IST": "IST", "GFT": "GFT", "WART": "WART", "HNOG": "HNOG"}, - } - } -  -@@ -135,7 +112,7 @@ func (tr *tr_CY) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (tr *tr_CY) MonthsAbbreviated() []string { -- return tr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (tr *tr_CY) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (tr *tr_CY) MonthsNarrow() []string { -- return tr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (tr *tr_CY) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (tr *tr_CY) MonthsWide() []string { -- return tr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,86 +178,13 @@ func (tr *tr_CY) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'tr_CY' and handles both Whole and Real numbers based on 'v' - func (tr *tr_CY) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'tr_CY' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (tr *tr_CY) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tr.minus[0]) -- } -- -- b = append(b, tr.percent[0]) -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'tr_CY' -@@ -288,56 +192,7 @@ func (tr *tr_CY) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tr.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, tr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'tr_CY' -@@ -346,68 +201,7 @@ func (tr *tr_CY) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, tr.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, tr.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'tr_CY' -@@ -415,23 +209,6 @@ func (tr *tr_CY) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,17 +217,6 @@ func (tr *tr_CY) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -459,17 +225,6 @@ func (tr *tr_CY) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,20 +233,6 @@ func (tr *tr_CY) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, tr.daysWide[t.Weekday()]...) -- - return string(b) - } -  -diff --git a/tr_TR/tr_TR.go b/tr_TR/tr_TR.go -index 47645b3..3cc0641 100644 ---- a/tr_TR/tr_TR.go -+++ b/tr_TR/tr_TR.go -@@ -10,68 +10,45 @@ import ( - ) -  - type tr_TR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'tr_TR' locale - func New() locales.Translator { - return &tr_TR{ -- locale: "tr_TR", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"}, -- monthsNarrow: []string{"", "O", "Ş", "M", "N", "M", "H", "T", "A", "E", "E", "K", "A"}, -- monthsWide: []string{"", "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"}, -- daysAbbreviated: []string{"Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"}, -- daysNarrow: []string{"P", "P", "S", "Ç", "P", "C", "C"}, -- daysShort: []string{"Pa", "Pt", "Sa", "Ça", "Pe", "Cu", "Ct"}, -- daysWide: []string{"Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"}, -- periodsAbbreviated: []string{"ÖÖ", "ÖS"}, -- periodsNarrow: []string{"öö", "ös"}, -- periodsWide: []string{"ÖÖ", "ÖS"}, -- erasAbbreviated: []string{"MÖ", "MS"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Milattan Önce", "Milattan Sonra"}, -- timezones: map[string]string{"WARST": "Batı Arjantin Yaz Saati", "EDT": "Kuzey Amerika Doğu Yaz Saati", "UYST": "Uruguay Yaz Saati", "WITA": "Orta Endonezya Saati", "ACDT": "Orta Avustralya Yaz Saati", "HKT": "Hong Kong Standart Saati", "HEPM": "Saint Pierre ve Miquelon Yaz Saati", "IST": "Hindistan Standart Saati", "JDT": "Japonya Yaz Saati", "TMT": "Türkmenistan Standart Saati", "CAT": "Orta Afrika Saati", "PST": "Kuzey Amerika Pasifik Standart Saati", "CHADT": "Chatham Yaz Saati", "JST": "Japonya Standart Saati", "HNEG": "Doğu Grönland Standart Saati", "MYT": "Malezya Saati", "ACWDT": "İçbatı Avustralya Yaz Saati", "ARST": "Arjantin Yaz Saati", "MEZ": "Orta Avrupa Standart Saati", "CLT": "Şili Standart Saati", "WAT": "Batı Afrika Standart Saati", "HNPMX": "Meksika Pasifik Kıyısı Standart Saati", "HEPMX": "Meksika Pasifik Kıyısı Yaz Saati", "HNPM": "Saint Pierre ve Miquelon Standart Saati", "AEDT": "Doğu Avustralya Yaz Saati", "EAT": "Doğu Afrika Saati", "COT": "Kolombiya Standart Saati", "HECU": "Küba Yaz Saati", "PDT": "Kuzey Amerika Pasifik Yaz Saati", "ACWST": "İçbatı Avustralya Standart Saati", "WAST": "Batı Afrika Yaz Saati", "SGT": "Singapur Standart Saati", "LHDT": "Lord Howe Yaz Saati", "HKST": "Hong Kong Yaz Saati", "SAST": "Güney Afrika Standart Saati", "TMST": "Türkmenistan Yaz Saati", "EST": "Kuzey Amerika Doğu Standart Saati", "MDT": "Makao Yaz Saati", "WIB": "Batı Endonezya Saati", "HAST": "Hawaii-Aleut Standart Saati", "HNOG": "Batı Grönland Standart Saati", "OEZ": "Doğu Avrupa Standart Saati", "GMT": "Greenwich Ortalama Saati", "HNCU": "Küba Standart Saati", "SRT": "Surinam Saati", "NZST": "Yeni Zelanda Standart Saati", "AWST": "Batı Avustralya Standart Saati", "ACST": "Orta Avustralya Standart Saati", "COST": "Kolombiya Yaz Saati", "MST": "Makao Standart Saati", "UYT": "Uruguay Standart Saati", "HADT": "Hawaii-Aleut Yaz Saati", "WIT": "Doğu Endonezya Saati", "CLST": "Şili Yaz Saati", "HEEG": "Doğu Grönland Yaz Saati", "∅∅∅": "Peru Yaz Saati", "AKDT": "Alaska Yaz Saati", "ADT": "Atlantik Yaz Saati", "HAT": "Newfoundland Yaz Saati", "ART": "Arjantin Standart Saati", "WART": "Batı Arjantin Standart Saati", "HENOMX": "Kuzeybatı Meksika Yaz Saati", "CDT": "Kuzey Amerika Merkezi Yaz Saati", "LHST": "Lord Howe Standart Saati", "CST": "Kuzey Amerika Merkezi Standart Saati", "WEZ": "Batı Avrupa Standart Saati", "WESZ": "Batı Avrupa Yaz Saati", "HNT": "Newfoundland Standart Saati", "AWDT": "Batı Avustralya Yaz Saati", "ChST": "Chamorro Saati", "GFT": "Fransız Guyanası Saati", "HNNOMX": "Kuzeybatı Meksika Standart Saati", "VET": "Venezuela Saati", "HEOG": "Batı Grönland Yaz Saati", "AEST": "Doğu Avustralya Standart Saati", "MESZ": "Orta Avrupa Yaz Saati", "OESZ": "Doğu Avrupa Yaz Saati", "CHAST": "Chatham Standart Saati", "BOT": "Bolivya Saati", "NZDT": "Yeni Zelanda Yaz Saati", "ECT": "Ekvador Saati", "GYT": "Guyana Saati", "AKST": "Alaska Standart Saati", "AST": "Atlantik Standart Saati", "BT": "Bhutan Saati"}, -+ locale: "tr_TR", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ChST": "ChST", "HADT": "HADT", "BT": "BT", "OEZ": "OEZ", "SAST": "SAST", "NZST": "NZST", "CHAST": "CHAST", "WEZ": "WEZ", "HEPMX": "HEPMX", "OESZ": "OESZ", "CAT": "CAT", "HNPM": "HNPM", "JDT": "JDT", "ACWDT": "ACWDT", "AKST": "AKST", "JST": "JST", "EDT": "EDT", "LHST": "LHST", "HNT": "HNT", "TMST": "TMST", "MST": "MST", "GMT": "GMT", "MESZ": "MESZ", "HEPM": "HEPM", "ACWST": "ACWST", "GYT": "GYT", "HEOG": "HEOG", "HKST": "HKST", "WIB": "WIB", "HEEG": "HEEG", "IST": "IST", "HNPMX": "HNPMX", "HAT": "HAT", "COT": "COT", "ACDT": "ACDT", "SRT": "SRT", "MEZ": "MEZ", "HNEG": "HNEG", "AWDT": "AWDT", "MYT": "MYT", "UYT": "UYT", "WAST": "WAST", "AST": "AST", "COST": "COST", "EST": "EST", "WART": "WART", "CDT": "CDT", "BOT": "BOT", "UYST": "UYST", "WESZ": "WESZ", "WARST": "WARST", "TMT": "TMT", "WITA": "WITA", "ECT": "ECT", "EAT": "EAT", "HAST": "HAST", "AEDT": "AEDT", "SGT": "SGT", "HECU": "HECU", "NZDT": "NZDT", "AWST": "AWST", "WAT": "WAT", "HNOG": "HNOG", "ARST": "ARST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "PDT": "PDT", "HNCU": "HNCU", "AKDT": "AKDT", "WIT": "WIT", "CLT": "CLT", "CST": "CST", "AEST": "AEST", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "LHDT": "LHDT", "PST": "PST", "VET": "VET", "GFT": "GFT", "MDT": "MDT", "ART": "ART", "ACST": "ACST", "HKT": "HKT", "CLST": "CLST", "ADT": "ADT"}, - } - } -  -@@ -135,7 +112,7 @@ func (tr *tr_TR) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (tr *tr_TR) MonthsAbbreviated() []string { -- return tr.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (tr *tr_TR) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (tr *tr_TR) MonthsNarrow() []string { -- return tr.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (tr *tr_TR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (tr *tr_TR) MonthsWide() []string { -- return tr.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,86 +178,13 @@ func (tr *tr_TR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'tr_TR' and handles both Whole and Real numbers based on 'v' - func (tr *tr_TR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'tr_TR' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (tr *tr_TR) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tr.minus[0]) -- } -- -- b = append(b, tr.percent[0]) -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'tr_TR' -@@ -288,56 +192,7 @@ func (tr *tr_TR) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tr.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, tr.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'tr_TR' -@@ -346,68 +201,7 @@ func (tr *tr_TR) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tr.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tr.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, tr.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, tr.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tr.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, tr.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'tr_TR' -@@ -415,23 +209,6 @@ func (tr *tr_TR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -440,17 +217,6 @@ func (tr *tr_TR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tr.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -459,17 +225,6 @@ func (tr *tr_TR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -478,20 +233,6 @@ func (tr *tr_TR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tr.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, tr.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -500,19 +241,6 @@ func (tr *tr_TR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -521,26 +249,6 @@ func (tr *tr_TR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -549,30 +257,6 @@ func (tr *tr_TR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -581,34 +265,5 @@ func (tr *tr_TR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, tr.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := tr.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/twq/twq.go b/twq/twq.go -index 870ecd3..272bdf8 100644 ---- a/twq/twq.go -+++ b/twq/twq.go -@@ -61,7 +61,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"IJ", "IZ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Isaa jine", "Isaa zamanoo"}, -- timezones: map[string]string{"LHDT": "LHDT", "TMT": "TMT", "WARST": "WARST", "SGT": "SGT", "EST": "EST", "WIT": "WIT", "HAT": "HAT", "HNPM": "HNPM", "NZST": "NZST", "BOT": "BOT", "GFT": "GFT", "OESZ": "OESZ", "CDT": "CDT", "GYT": "GYT", "ART": "ART", "HNOG": "HNOG", "HEOG": "HEOG", "WITA": "WITA", "LHST": "LHST", "WAST": "WAST", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "HNT": "HNT", "AWST": "AWST", "∅∅∅": "∅∅∅", "BT": "BT", "PDT": "PDT", "ACWDT": "ACWDT", "CLT": "CLT", "TMST": "TMST", "ADT": "ADT", "HAST": "HAST", "VET": "VET", "WESZ": "WESZ", "JDT": "JDT", "ChST": "ChST", "GMT": "GMT", "HNPMX": "HNPMX", "AST": "AST", "PST": "PST", "ACDT": "ACDT", "HNCU": "HNCU", "HADT": "HADT", "SRT": "SRT", "MEZ": "MEZ", "NZDT": "NZDT", "CHAST": "CHAST", "AKDT": "AKDT", "HEPM": "HEPM", "MESZ": "MESZ", "JST": "JST", "CAT": "CAT", "MDT": "MDT", "AWDT": "AWDT", "SAST": "SAST", "ARST": "ARST", "HKST": "HKST", "WART": "WART", "HENOMX": "HENOMX", "CST": "CST", "MYT": "MYT", "UYT": "UYT", "HKT": "HKT", "WAT": "WAT", "OEZ": "OEZ", "COT": "COT", "COST": "COST", "CHADT": "CHADT", "EAT": "EAT", "EDT": "EDT", "HEEG": "HEEG", "HECU": "HECU", "HEPMX": "HEPMX", "IST": "IST", "CLST": "CLST", "WIB": "WIB", "HNEG": "HNEG", "ACST": "ACST", "ECT": "ECT", "MST": "MST", "AKST": "AKST", "UYST": "UYST", "ACWST": "ACWST", "AEST": "AEST", "AEDT": "AEDT"}, -+ timezones: map[string]string{"MESZ": "MESZ", "ACDT": "ACDT", "AEDT": "AEDT", "GYT": "GYT", "HKST": "HKST", "TMT": "TMT", "WITA": "WITA", "HNEG": "HNEG", "HECU": "HECU", "GFT": "GFT", "HNT": "HNT", "SAST": "SAST", "TMST": "TMST", "CAT": "CAT", "CST": "CST", "LHDT": "LHDT", "PST": "PST", "WART": "WART", "WARST": "WARST", "COST": "COST", "WIB": "WIB", "GMT": "GMT", "ChST": "ChST", "ARST": "ARST", "EAT": "EAT", "MEZ": "MEZ", "CHAST": "CHAST", "PDT": "PDT", "AKST": "AKST", "WESZ": "WESZ", "AWST": "AWST", "HEPM": "HEPM", "SGT": "SGT", "WAT": "WAT", "WAST": "WAST", "MST": "MST", "HADT": "HADT", "HENOMX": "HENOMX", "CHADT": "CHADT", "UYT": "UYT", "EDT": "EDT", "HEOG": "HEOG", "ACST": "ACST", "JDT": "JDT", "∅∅∅": "∅∅∅", "BT": "BT", "HEPMX": "HEPMX", "WIT": "WIT", "EST": "EST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "WEZ": "WEZ", "HNCU": "HNCU", "AKDT": "AKDT", "MDT": "MDT", "VET": "VET", "NZST": "NZST", "ART": "ART", "SRT": "SRT", "MYT": "MYT", "HNOG": "HNOG", "ACWST": "ACWST", "AST": "AST", "ADT": "ADT", "HAST": "HAST", "LHST": "LHST", "HNPM": "HNPM", "OEZ": "OEZ", "OESZ": "OESZ", "JST": "JST", "UYST": "UYST", "AEST": "AEST", "HNPMX": "HNPMX", "ECT": "ECT", "BOT": "BOT", "IST": "IST", "ACWDT": "ACWDT", "CDT": "CDT", "NZDT": "NZDT", "CLST": "CLST", "HEEG": "HEEG", "HAT": "HAT", "COT": "COT", "HKT": "HKT", "CLT": "CLT"}, - } - } -  -diff --git a/twq_NE/twq_NE.go b/twq_NE/twq_NE.go -index d54a15a..c82d4f2 100644 ---- a/twq_NE/twq_NE.go -+++ b/twq_NE/twq_NE.go -@@ -42,26 +42,13 @@ type twq_NE struct { - // New returns a new instance of translator for the 'twq_NE' locale - func New() locales.Translator { - return &twq_NE{ -- locale: "twq_NE", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Žan", "Fee", "Mar", "Awi", "Me", "Žuw", "Žuy", "Ut", "Sek", "Okt", "Noo", "Dee"}, -- monthsNarrow: []string{"", "Ž", "F", "M", "A", "M", "Ž", "Ž", "U", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Žanwiye", "Feewiriye", "Marsi", "Awiril", "Me", "Žuweŋ", "Žuyye", "Ut", "Sektanbur", "Oktoobur", "Noowanbur", "Deesanbur"}, -- daysAbbreviated: []string{"Alh", "Ati", "Ata", "Ala", "Alm", "Alz", "Asi"}, -- daysNarrow: []string{"H", "T", "T", "L", "L", "L", "S"}, -- daysWide: []string{"Alhadi", "Atinni", "Atalaata", "Alarba", "Alhamiisa", "Alzuma", "Asibti"}, -- periodsAbbreviated: []string{"Subbaahi", "Zaarikay b"}, -- periodsWide: []string{"Subbaahi", "Zaarikay b"}, -- erasAbbreviated: []string{"IJ", "IZ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Isaa jine", "Isaa zamanoo"}, -- timezones: map[string]string{"EAT": "EAT", "EDT": "EDT", "ACWDT": "ACWDT", "HEOG": "HEOG", "HNPM": "HNPM", "MEZ": "MEZ", "LHDT": "LHDT", "TMST": "TMST", "BOT": "BOT", "MYT": "MYT", "ART": "ART", "AEST": "AEST", "CAT": "CAT", "ADT": "ADT", "GYT": "GYT", "HNOG": "HNOG", "GFT": "GFT", "OEZ": "OEZ", "CDT": "CDT", "LHST": "LHST", "JDT": "JDT", "CHADT": "CHADT", "TMT": "TMT", "ChST": "ChST", "AKDT": "AKDT", "UYST": "UYST", "WITA": "WITA", "HNT": "HNT", "PST": "PST", "AEDT": "AEDT", "WAST": "WAST", "EST": "EST", "BT": "BT", "SRT": "SRT", "PDT": "PDT", "ACDT": "ACDT", "COST": "COST", "AST": "AST", "HAST": "HAST", "MST": "MST", "MESZ": "MESZ", "SAST": "SAST", "CLST": "CLST", "HNEG": "HNEG", "WARST": "WARST", "GMT": "GMT", "SGT": "SGT", "HKT": "HKT", "AWST": "AWST", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "VET": "VET", "WART": "WART", "COT": "COT", "HNPMX": "HNPMX", "NZST": "NZST", "ACWST": "ACWST", "WEZ": "WEZ", "HKST": "HKST", "HEPM": "HEPM", "ACST": "ACST", "ECT": "ECT", "HECU": "HECU", "CST": "CST", "WESZ": "WESZ", "HENOMX": "HENOMX", "MDT": "MDT", "HAT": "HAT", "WIB": "WIB", "CHAST": "CHAST", "JST": "JST", "AWDT": "AWDT", "CLT": "CLT", "HEEG": "HEEG", "WAT": "WAT", "OESZ": "OESZ", "UYT": "UYT", "HADT": "HADT", "ARST": "ARST", "WIT": "WIT", "NZDT": "NZDT", "IST": "IST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "AKST": "AKST"}, -+ locale: "twq_NE", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYST": "UYST", "∅∅∅": "∅∅∅", "NZST": "NZST", "JST": "JST", "HKT": "HKT", "SRT": "SRT", "CHAST": "CHAST", "CLT": "CLT", "HNEG": "HNEG", "HEEG": "HEEG", "IST": "IST", "WIT": "WIT", "GYT": "GYT", "ACWDT": "ACWDT", "AEST": "AEST", "ACST": "ACST", "AWST": "AWST", "ACWST": "ACWST", "VET": "VET", "HNCU": "HNCU", "COT": "COT", "TMT": "TMT", "MEZ": "MEZ", "ACDT": "ACDT", "HECU": "HECU", "AKDT": "AKDT", "WART": "WART", "CLST": "CLST", "WITA": "WITA", "ART": "ART", "AWDT": "AWDT", "BT": "BT", "AEDT": "AEDT", "SGT": "SGT", "GFT": "GFT", "TMST": "TMST", "HENOMX": "HENOMX", "HNPM": "HNPM", "GMT": "GMT", "JDT": "JDT", "WESZ": "WESZ", "HNT": "HNT", "NZDT": "NZDT", "HAST": "HAST", "PDT": "PDT", "CAT": "CAT", "MST": "MST", "ECT": "ECT", "PST": "PST", "EAT": "EAT", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "UYT": "UYT", "OEZ": "OEZ", "SAST": "SAST", "CST": "CST", "BOT": "BOT", "LHST": "LHST", "HEPMX": "HEPMX", "WEZ": "WEZ", "WAT": "WAT", "WAST": "WAST", "HEOG": "HEOG", "EST": "EST", "HADT": "HADT", "WARST": "WARST", "ARST": "ARST", "MESZ": "MESZ", "LHDT": "LHDT", "AKST": "AKST", "HAT": "HAT", "COST": "COST", "EDT": "EDT", "WIB": "WIB", "MYT": "MYT", "HNOG": "HNOG", "AST": "AST", "ADT": "ADT", "ChST": "ChST", "CHADT": "CHADT", "HNPMX": "HNPMX", "OESZ": "OESZ", "HKST": "HKST", "CDT": "CDT", "MDT": "MDT"}, - } - } -  -@@ -107,7 +94,7 @@ func (twq *twq_NE) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (twq *twq_NE) MonthsAbbreviated() []string { -- return twq.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -117,7 +104,7 @@ func (twq *twq_NE) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (twq *twq_NE) MonthsNarrow() []string { -- return twq.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -127,7 +114,7 @@ func (twq *twq_NE) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (twq *twq_NE) MonthsWide() []string { -- return twq.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -173,75 +160,13 @@ func (twq *twq_NE) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'twq_NE' and handles both Whole and Real numbers based on 'v' - func (twq *twq_NE) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, twq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(twq.group) - 1; j >= 0; j-- { -- b = append(b, twq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, twq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'twq_NE' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (twq *twq_NE) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, twq.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, twq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, twq.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'twq_NE' -@@ -249,56 +174,7 @@ func (twq *twq_NE) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := twq.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, twq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(twq.group) - 1; j >= 0; j-- { -- b = append(b, twq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, twq.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, twq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'twq_NE' -@@ -307,63 +183,7 @@ func (twq *twq_NE) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := twq.currencies[currency] -- l := len(s) + len(symbol) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, twq.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(twq.group) - 1; j >= 0; j-- { -- b = append(b, twq.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, twq.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, twq.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'twq_NE' -@@ -371,17 +191,6 @@ func (twq *twq_NE) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -390,17 +199,6 @@ func (twq *twq_NE) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, twq.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -409,17 +207,6 @@ func (twq *twq_NE) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, twq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -428,19 +215,6 @@ func (twq *twq_NE) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, twq.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, twq.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,19 +223,6 @@ func (twq *twq_NE) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -470,26 +231,6 @@ func (twq *twq_NE) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -498,30 +239,6 @@ func (twq *twq_NE) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -530,34 +247,5 @@ func (twq *twq_NE) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, twq.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := twq.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/tzm/tzm.go b/tzm/tzm.go -index 78ea5cd..deece41 100644 ---- a/tzm/tzm.go -+++ b/tzm/tzm.go -@@ -65,7 +65,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ZƐ", "ḌƐ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Zdat Ɛisa (TAƔ)", "Ḍeffir Ɛisa (TAƔ)"}, -- timezones: map[string]string{"MST": "MST", "WIT": "WIT", "AEST": "AEST", "AEDT": "AEDT", "MEZ": "MEZ", "OESZ": "OESZ", "HNCU": "HNCU", "ADT": "ADT", "MYT": "MYT", "ACWST": "ACWST", "BOT": "BOT", "EAT": "EAT", "HNNOMX": "HNNOMX", "GMT": "GMT", "EST": "EST", "CHADT": "CHADT", "SAST": "SAST", "JST": "JST", "EDT": "EDT", "HKT": "HKT", "WITA": "WITA", "NZDT": "NZDT", "LHST": "LHST", "LHDT": "LHDT", "CST": "CST", "VET": "VET", "HEOG": "HEOG", "IST": "IST", "WAST": "WAST", "AWDT": "AWDT", "WARST": "WARST", "BT": "BT", "ARST": "ARST", "WEZ": "WEZ", "HEPMX": "HEPMX", "AWST": "AWST", "JDT": "JDT", "SGT": "SGT", "HEPM": "HEPM", "NZST": "NZST", "TMST": "TMST", "ECT": "ECT", "HECU": "HECU", "AST": "AST", "UYST": "UYST", "HNOG": "HNOG", "COT": "COT", "GYT": "GYT", "HAST": "HAST", "HAT": "HAT", "CLST": "CLST", "ACST": "ACST", "OEZ": "OEZ", "CAT": "CAT", "COST": "COST", "WIB": "WIB", "SRT": "SRT", "HKST": "HKST", "AKDT": "AKDT", "CDT": "CDT", "HENOMX": "HENOMX", "MDT": "MDT", "WESZ": "WESZ", "GFT": "GFT", "TMT": "TMT", "WAT": "WAT", "AKST": "AKST", "PST": "PST", "HNPM": "HNPM", "HEEG": "HEEG", "HNPMX": "HNPMX", "HNT": "HNT", "CHAST": "CHAST", "HNEG": "HNEG", "WART": "WART", "UYT": "UYT", "HADT": "HADT", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "CLT": "CLT", "ChST": "ChST", "ACDT": "ACDT", "ART": "ART", "PDT": "PDT", "MESZ": "MESZ"}, -+ timezones: map[string]string{"TMST": "TMST", "EST": "EST", "ART": "ART", "WAST": "WAST", "WIT": "WIT", "HEOG": "HEOG", "SAST": "SAST", "WIB": "WIB", "CST": "CST", "GMT": "GMT", "ACST": "ACST", "JDT": "JDT", "AEDT": "AEDT", "PDT": "PDT", "WESZ": "WESZ", "CLT": "CLT", "WITA": "WITA", "ADT": "ADT", "ACWDT": "ACWDT", "IST": "IST", "HNPMX": "HNPMX", "AKST": "AKST", "HNOG": "HNOG", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "HNT": "HNT", "NZDT": "NZDT", "HADT": "HADT", "ARST": "ARST", "ACDT": "ACDT", "LHST": "LHST", "HECU": "HECU", "GYT": "GYT", "ECT": "ECT", "MDT": "MDT", "PST": "PST", "MEZ": "MEZ", "HEPM": "HEPM", "CHADT": "CHADT", "UYST": "UYST", "COT": "COT", "HKT": "HKT", "HKST": "HKST", "BOT": "BOT", "VET": "VET", "WAT": "WAT", "OEZ": "OEZ", "OESZ": "OESZ", "AWDT": "AWDT", "HNEG": "HNEG", "AWST": "AWST", "AEST": "AEST", "CHAST": "CHAST", "WEZ": "WEZ", "SGT": "SGT", "NZST": "NZST", "CDT": "CDT", "COST": "COST", "HENOMX": "HENOMX", "GFT": "GFT", "TMT": "TMT", "CLST": "CLST", "MST": "MST", "HAST": "HAST", "HEEG": "HEEG", "MESZ": "MESZ", "JST": "JST", "HEPMX": "HEPMX", "HAT": "HAT", "SRT": "SRT", "EAT": "EAT", "BT": "BT", "UYT": "UYT", "MYT": "MYT", "HNPM": "HNPM", "LHDT": "LHDT", "∅∅∅": "∅∅∅", "WART": "WART", "EDT": "EDT", "ChST": "ChST", "ACWST": "ACWST", "AKDT": "AKDT", "WARST": "WARST", "CAT": "CAT", "AST": "AST"}, - } - } -  -diff --git a/tzm_MA/tzm_MA.go b/tzm_MA/tzm_MA.go -index 07ecfef..0de55af 100644 ---- a/tzm_MA/tzm_MA.go -+++ b/tzm_MA/tzm_MA.go -@@ -10,62 +10,45 @@ import ( - ) -  - type tzm_MA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'tzm_MA' locale - func New() locales.Translator { - return &tzm_MA{ -- locale: "tzm_MA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Yen", "Yeb", "Mar", "Ibr", "May", "Yun", "Yul", "Ɣuc", "Cut", "Kṭu", "Nwa", "Duj"}, -- monthsNarrow: []string{"", "Y", "Y", "M", "I", "M", "Y", "Y", "Ɣ", "C", "K", "N", "D"}, -- monthsWide: []string{"", "Yennayer", "Yebrayer", "Mars", "Ibrir", "Mayyu", "Yunyu", "Yulyuz", "Ɣuct", "Cutanbir", "Kṭuber", "Nwanbir", "Dujanbir"}, -- daysAbbreviated: []string{"Asa", "Ayn", "Asn", "Akr", "Akw", "Asm", "Asḍ"}, -- daysNarrow: []string{"A", "A", "A", "A", "A", "A", "A"}, -- daysWide: []string{"Asamas", "Aynas", "Asinas", "Akras", "Akwas", "Asimwas", "Asiḍyas"}, -- periodsAbbreviated: []string{"Zdat azal", "Ḍeffir aza"}, -- periodsWide: []string{"Zdat azal", "Ḍeffir aza"}, -- erasAbbreviated: []string{"ZƐ", "ḌƐ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Zdat Ɛisa (TAƔ)", "Ḍeffir Ɛisa (TAƔ)"}, -- timezones: map[string]string{"COT": "COT", "HENOMX": "HENOMX", "HNCU": "HNCU", "MDT": "MDT", "MYT": "MYT", "AKST": "AKST", "JDT": "JDT", "TMT": "TMT", "WIT": "WIT", "WEZ": "WEZ", "HECU": "HECU", "HEPMX": "HEPMX", "ADT": "ADT", "HEPM": "HEPM", "SAST": "SAST", "EAT": "EAT", "ACDT": "ACDT", "WART": "WART", "SGT": "SGT", "UYST": "UYST", "HAST": "HAST", "AEDT": "AEDT", "HNEG": "HNEG", "ACST": "ACST", "MESZ": "MESZ", "NZST": "NZST", "ART": "ART", "AWST": "AWST", "IST": "IST", "WAT": "WAT", "VET": "VET", "ACWST": "ACWST", "COST": "COST", "AST": "AST", "EST": "EST", "EDT": "EDT", "BT": "BT", "HAT": "HAT", "ARST": "ARST", "AWDT": "AWDT", "JST": "JST", "ECT": "ECT", "WITA": "WITA", "LHDT": "LHDT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "MST": "MST", "SRT": "SRT", "ACWDT": "ACWDT", "OESZ": "OESZ", "GMT": "GMT", "GFT": "GFT", "AKDT": "AKDT", "CST": "CST", "CLT": "CLT", "HEEG": "HEEG", "OEZ": "OEZ", "HADT": "HADT", "HNPM": "HNPM", "CHAST": "CHAST", "GYT": "GYT", "HKST": "HKST", "HNT": "HNT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "BOT": "BOT", "WAST": "WAST", "PDT": "PDT", "WESZ": "WESZ", "CLST": "CLST", "TMST": "TMST", "CDT": "CDT", "HNOG": "HNOG", "PST": "PST", "AEST": "AEST", "MEZ": "MEZ", "CAT": "CAT", "WIB": "WIB", "UYT": "UYT", "HEOG": "HEOG", "HKT": "HKT", "LHST": "LHST", "NZDT": "NZDT", "ChST": "ChST", "WARST": "WARST"}, -+ locale: "tzm_MA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "PST": "PST", "OESZ": "OESZ", "NZDT": "NZDT", "COST": "COST", "MEZ": "MEZ", "SGT": "SGT", "HEPMX": "HEPMX", "WIT": "WIT", "TMST": "TMST", "CLT": "CLT", "ARST": "ARST", "HAST": "HAST", "HADT": "HADT", "WEZ": "WEZ", "WAST": "WAST", "WART": "WART", "WITA": "WITA", "ChST": "ChST", "AST": "AST", "EAT": "EAT", "AWST": "AWST", "UYT": "UYT", "HNT": "HNT", "∅∅∅": "∅∅∅", "HNCU": "HNCU", "WESZ": "WESZ", "AKDT": "AKDT", "EST": "EST", "HNPM": "HNPM", "AEST": "AEST", "AEDT": "AEDT", "OEZ": "OEZ", "EDT": "EDT", "CAT": "CAT", "WIB": "WIB", "LHDT": "LHDT", "IST": "IST", "VET": "VET", "PDT": "PDT", "GMT": "GMT", "CST": "CST", "HEEG": "HEEG", "ACWST": "ACWST", "UYST": "UYST", "NZST": "NZST", "JDT": "JDT", "WARST": "WARST", "COT": "COT", "ART": "ART", "ACST": "ACST", "HNNOMX": "HNNOMX", "LHST": "LHST", "CHAST": "CHAST", "CDT": "CDT", "ACDT": "ACDT", "HNEG": "HNEG", "HEPM": "HEPM", "HECU": "HECU", "BOT": "BOT", "MESZ": "MESZ", "WAT": "WAT", "TMT": "TMT", "MST": "MST", "HAT": "HAT", "ADT": "ADT", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "GYT": "GYT", "HNOG": "HNOG", "HEOG": "HEOG", "MYT": "MYT", "AWDT": "AWDT", "BT": "BT", "CLST": "CLST", "SRT": "SRT", "AKST": "AKST", "SAST": "SAST", "HKST": "HKST", "HKT": "HKT", "MDT": "MDT", "ECT": "ECT", "JST": "JST", "CHADT": "CHADT", "GFT": "GFT"}, - } - } -  -@@ -118,7 +101,7 @@ func (tzm *tzm_MA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (tzm *tzm_MA) MonthsAbbreviated() []string { -- return tzm.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -128,7 +111,7 @@ func (tzm *tzm_MA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (tzm *tzm_MA) MonthsNarrow() []string { -- return tzm.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -138,7 +121,7 @@ func (tzm *tzm_MA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (tzm *tzm_MA) MonthsWide() []string { -- return tzm.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -198,58 +181,7 @@ func (tzm *tzm_MA) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tzm.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tzm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(tzm.group) - 1; j >= 0; j-- { -- b = append(b, tzm.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, tzm.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tzm.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, tzm.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'tzm_MA' -@@ -258,65 +190,7 @@ func (tzm *tzm_MA) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := tzm.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, tzm.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(tzm.group) - 1; j >= 0; j-- { -- b = append(b, tzm.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, tzm.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, tzm.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, tzm.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, tzm.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'tzm_MA' -@@ -324,27 +198,6 @@ func (tzm *tzm_MA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -353,17 +206,6 @@ func (tzm *tzm_MA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tzm.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -372,17 +214,6 @@ func (tzm *tzm_MA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tzm.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -391,19 +222,6 @@ func (tzm *tzm_MA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, tzm.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, tzm.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/ug/ug.go b/ug/ug.go -index 40f7a9d..8c50673 100644 ---- a/ug/ug.go -+++ b/ug/ug.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BCE", "مىلادىيە"}, - erasNarrow: []string{"BCE", "مىلادىيە"}, - erasWide: []string{"مىلادىيەدىن بۇرۇن", "مىلادىيە"}, -- timezones: map[string]string{"HNPM": "ساينىت پىئېر ۋە مىكېلون ئۆلچەملىك ۋاقتى", "MEZ": "ئوتتۇرا ياۋروپا ئۆلچەملىك ۋاقتى", "NZST": "يېڭى زېلاندىيە ئۆلچەملىك ۋاقتى", "TMST": "تۈركمەنىستان يازلىق ۋاقتى", "ACST": "ئاۋسترالىيە ئوتتۇرا قىسىم ئۆلچەملىك ۋاقتى", "BT": "بۇتان ۋاقتى", "AWST": "ئاۋسترالىيە غەربىي قىسىم ئۆلچەملىك ۋاقتى", "IST": "ھىندىستان ئۆلچەملىك ۋاقتى", "GFT": "فىرانسىيەگە قاراشلىق گىۋىيانا ۋاقتى", "BOT": "بولىۋىيە ۋاقتى", "OESZ": "شەرقىي ياۋروپا يازلىق ۋاقتى", "WART": "غەربىي ئارگېنتىنا ئۆلچەملىك ۋاقتى", "HKT": "شياڭگاڭ ئۆلچەملىك ۋاقتى", "HEPM": "ساينىت پىئېر ۋە مىكېلون يازلىق ۋاقتى", "JDT": "ياپونىيە يازلىق ۋاقتى", "COT": "كولومبىيە ئۆلچەملىك ۋاقتى", "SRT": "سۇرىنام ۋاقتى", "ART": "ئارگېنتىنا ئۆلچەملىك ۋاقتى", "HEOG": "غەربىي گىرېنلاند يازلىق ۋاقتى", "AEDT": "ئاۋسترالىيە شەرقىي قىسىم يازلىق ۋاقتى", "CHADT": "چاتام يازلىق ۋاقتى", "LHST": "لورد-خاي ئۆلچەملىك ۋاقتى", "WAT": "غەربىي ئافرىقا ئۆلچەملىك ۋاقتى", "ACWST": "ئاۋستىرالىيە ئوتتۇرا غەربىي قىسىم ئۆلچەملىك ۋاقتى", "ACWDT": "ئاۋسترالىيە ئوتتۇرا غەربىي قىسىم يازلىق ۋاقتى", "NZDT": "يېڭى زېلاندىيە يازلىق ۋاقتى", "∅∅∅": "ئامازون يازلىق ۋاقتى", "CDT": "ئوتتۇرا قىسىم يازلىق ۋاقتى", "ACDT": "ئاۋسترالىيە ئوتتۇرا قىسىم يازلىق ۋاقتى", "ECT": "ئېكۋادور ۋاقتى", "UYT": "ئۇرۇگۋاي ئۆلچەملىك ۋاقتى", "HNOG": "غەربىي گىرېنلاند ئۆلچەملىك ۋاقتى", "AWDT": "ئاۋسترالىيە غەربىي قىسىم يازلىق ۋاقتى", "WITA": "ئوتتۇرا ھىندونېزىيە ۋاقتى", "EDT": "شەرقىي قىسىم يازلىق ۋاقتى", "MDT": "ئاۋمېن يازلىق ۋاقتى", "ADT": "ئاتلانتىك ئوكيان يازلىق ۋاقتى", "UYST": "ئۇرۇگۋاي يازلىق ۋاقتى", "WEZ": "غەربىي ياۋروپا ئۆلچەملىك ۋاقتى", "CHAST": "چاتام ئۆلچەملىك ۋاقتى", "HENOMX": "مېكسىكا غەربىي شىمالىي قىسىم يازلىق ۋاقتى", "HNPMX": "مېكسىكا تىنچ ئوكيان ئۆلچەملىك ۋاقتى", "CST": "ئوتتۇرا قىسىم ئۆلچەملىك ۋاقتى", "AKST": "ئالياسكا ئۆلچەملىك ۋاقتى", "ARST": "ئارگېنتىنا يازلىق ۋاقتى", "HEEG": "شەرقىي گىرېنلاند يازلىق ۋاقتى", "SGT": "سىنگاپور ۋاقتى", "MST": "ئاۋمېن ئۆلچەملىك ۋاقتى", "MYT": "مالايشىيا ۋاقتى", "AKDT": "ئالياسكا يازلىق ۋاقتى", "WIT": "شەرقىي ھىندونېزىيە ۋاقتى", "JST": "ياپونىيە ئۆلچەملىك ۋاقتى", "HEPMX": "مېكسىكا تىنچ ئوكيان يازلىق ۋاقتى", "GYT": "گىۋىيانا ۋاقتى", "HADT": "ھاۋاي-ئالېيۇت يازلىق ۋاقتى", "VET": "ۋېنېزۇئېلا ۋاقتى", "PST": "تىنچ ئوكيان ئۆلچەملىك ۋاقتى", "WESZ": "غەربىي ياۋروپا يازلىق ۋاقتى", "ChST": "چاموررو ئۆلچەملىك ۋاقتى", "WARST": "غەربىي ئارگېنتىنا يازلىق ۋاقتى", "COST": "كولومبىيە يازلىق ۋاقتى", "HNCU": "كۇبا ئۆلچەملىك ۋاقتى", "HAST": "ھاۋاي-ئالېيۇت ئۆلچەملىك ۋاقتى", "HAT": "نىۋفوئۇنلاند يازلىق ۋاقتى", "HNEG": "شەرقىي گىرېنلاند ئۆلچەملىك ۋاقتى", "HNNOMX": "مېكسىكا غەربىي شىمالىي قىسىم ئۆلچەملىك ۋاقتى", "PDT": "تىنچ ئوكيان يازلىق ۋاقتى", "HKST": "شياڭگاڭ يازلىق ۋاقتى", "HNT": "نىۋفوئۇنلاند ئۆلچەملىك ۋاقتى", "LHDT": "لورد-خاي يازلىق ۋاقتى", "CLST": "چىلى يازلىق ۋاقتى", "TMT": "تۈركمەنىستان ئۆلچەملىك ۋاقتى", "WAST": "غەربىي ئافرىقا يازلىق ۋاقتى", "GMT": "گىرىنۋىچ ۋاقتى", "AST": "ئاتلانتىك ئوكيان ئۆلچەملىك ۋاقتى", "SAST": "جەنۇبىي ئافرىقا ئۆلچەملىك ۋاقتى", "CLT": "چىلى ئۆلچەملىك ۋاقتى", "OEZ": "شەرقىي ياۋروپا ئۆلچەملىك ۋاقتى", "AEST": "ئاۋسترالىيە شەرقىي قىسىم ئۆلچەملىك ۋاقتى", "MESZ": "ئوتتۇرا ياۋروپا يازلىق ۋاقتى", "CAT": "ئوتتۇرا ئافرىقا ۋاقتى", "EAT": "شەرقىي ئافرىقا ۋاقتى", "HECU": "كۇبا يازلىق ۋاقتى", "EST": "شەرقىي قىسىم ئۆلچەملىك ۋاقتى", "WIB": "غەربىي ھىندونېزىيە ۋاقتى"}, -+ timezones: map[string]string{"AKDT": "ئالياسكا يازلىق ۋاقتى", "HKT": "شياڭگاڭ ئۆلچەملىك ۋاقتى", "HKST": "شياڭگاڭ يازلىق ۋاقتى", "GMT": "گىرىنۋىچ ۋاقتى", "HADT": "ھاۋاي-ئالېيۇت يازلىق ۋاقتى", "ACWST": "ئاۋستىرالىيە ئوتتۇرا غەربىي قىسىم ئۆلچەملىك ۋاقتى", "GYT": "گىۋىيانا ۋاقتى", "WITA": "ئوتتۇرا ھىندونېزىيە ۋاقتى", "HNNOMX": "مېكسىكا غەربىي شىمالىي قىسىم ئۆلچەملىك ۋاقتى", "LHDT": "لورد-خاي يازلىق ۋاقتى", "HEPM": "ساينىت پىئېر ۋە مىكېلون يازلىق ۋاقتى", "TMT": "تۈركمەنىستان ئۆلچەملىك ۋاقتى", "CAT": "ئوتتۇرا ئافرىقا ۋاقتى", "AWDT": "ئاۋسترالىيە غەربىي قىسىم يازلىق ۋاقتى", "CHADT": "چاتام يازلىق ۋاقتى", "∅∅∅": "ئاكرى يازلىق ۋاقتى", "WESZ": "غەربىي ياۋروپا يازلىق ۋاقتى", "EST": "شەرقىي قىسىم ئۆلچەملىك ۋاقتى", "WIB": "غەربىي ھىندونېزىيە ۋاقتى", "ACST": "ئاۋسترالىيە ئوتتۇرا قىسىم ئۆلچەملىك ۋاقتى", "HNEG": "شەرقىي گىرېنلاند ئۆلچەملىك ۋاقتى", "IST": "ھىندىستان ئۆلچەملىك ۋاقتى", "SRT": "سۇرىنام ۋاقتى", "WAST": "غەربىي ئافرىقا يازلىق ۋاقتى", "OEZ": "شەرقىي ياۋروپا ئۆلچەملىك ۋاقتى", "MEZ": "ئوتتۇرا ياۋروپا ئۆلچەملىك ۋاقتى", "UYST": "ئۇرۇگۋاي يازلىق ۋاقتى", "ACWDT": "ئاۋسترالىيە ئوتتۇرا غەربىي قىسىم يازلىق ۋاقتى", "COT": "كولومبىيە ئۆلچەملىك ۋاقتى", "ACDT": "ئاۋسترالىيە ئوتتۇرا قىسىم يازلىق ۋاقتى", "LHST": "لورد-خاي ئۆلچەملىك ۋاقتى", "CHAST": "چاتام ئۆلچەملىك ۋاقتى", "HEOG": "غەربىي گىرېنلاند يازلىق ۋاقتى", "HAST": "ھاۋاي-ئالېيۇت ئۆلچەملىك ۋاقتى", "HAT": "نىۋفوئۇنلاند يازلىق ۋاقتى", "WART": "غەربىي ئارگېنتىنا ئۆلچەملىك ۋاقتى", "HNCU": "كۇبا ئۆلچەملىك ۋاقتى", "HNT": "نىۋفوئۇنلاند ئۆلچەملىك ۋاقتى", "COST": "كولومبىيە يازلىق ۋاقتى", "ChST": "چاموررو ئۆلچەملىك ۋاقتى", "ART": "ئارگېنتىنا ئۆلچەملىك ۋاقتى", "HENOMX": "مېكسىكا غەربىي شىمالىي قىسىم يازلىق ۋاقتى", "PST": "تىنچ ئوكيان ئۆلچەملىك ۋاقتى", "BT": "بۇتان ۋاقتى", "WEZ": "غەربىي ياۋروپا ئۆلچەملىك ۋاقتى", "SGT": "سىنگاپور ۋاقتى", "HECU": "كۇبا يازلىق ۋاقتى", "AST": "ئاتلانتىك ئوكيان ئۆلچەملىك ۋاقتى", "ADT": "ئاتلانتىك ئوكيان يازلىق ۋاقتى", "MYT": "مالايشىيا ۋاقتى", "HEPMX": "مېكسىكا تىنچ ئوكيان يازلىق ۋاقتى", "CLT": "چىلى ئۆلچەملىك ۋاقتى", "NZST": "يېڭى زېلاندىيە ئۆلچەملىك ۋاقتى", "EDT": "شەرقىي قىسىم يازلىق ۋاقتى", "HEEG": "شەرقىي گىرېنلاند يازلىق ۋاقتى", "JST": "ياپونىيە ئۆلچەملىك ۋاقتى", "WAT": "غەربىي ئافرىقا ئۆلچەملىك ۋاقتى", "HNOG": "غەربىي گىرېنلاند ئۆلچەملىك ۋاقتى", "MST": "تاغ ئۆلچەملىك ۋاقتى", "JDT": "ياپونىيە يازلىق ۋاقتى", "OESZ": "شەرقىي ياۋروپا يازلىق ۋاقتى", "HNPM": "ساينىت پىئېر ۋە مىكېلون ئۆلچەملىك ۋاقتى", "HNPMX": "مېكسىكا تىنچ ئوكيان ئۆلچەملىك ۋاقتى", "AKST": "ئالياسكا ئۆلچەملىك ۋاقتى", "EAT": "شەرقىي ئافرىقا ۋاقتى", "MESZ": "ئوتتۇرا ياۋروپا يازلىق ۋاقتى", "AEST": "ئاۋسترالىيە شەرقىي قىسىم ئۆلچەملىك ۋاقتى", "AEDT": "ئاۋسترالىيە شەرقىي قىسىم يازلىق ۋاقتى", "VET": "ۋېنېزۇئېلا ۋاقتى", "ARST": "ئارگېنتىنا يازلىق ۋاقتى", "MDT": "تاغ يازلىق ۋاقتى", "BOT": "بولىۋىيە ۋاقتى", "SAST": "جەنۇبىي ئافرىقا ئۆلچەملىك ۋاقتى", "TMST": "تۈركمەنىستان يازلىق ۋاقتى", "CDT": "ئوتتۇرا قىسىم يازلىق ۋاقتى", "GFT": "فىرانسىيەگە قاراشلىق گىۋىيانا ۋاقتى", "WARST": "غەربىي ئارگېنتىنا يازلىق ۋاقتى", "WIT": "شەرقىي ھىندونېزىيە ۋاقتى", "ECT": "ئېكۋادور ۋاقتى", "UYT": "ئۇرۇگۋاي ئۆلچەملىك ۋاقتى", "CLST": "چىلى يازلىق ۋاقتى", "NZDT": "يېڭى زېلاندىيە يازلىق ۋاقتى", "AWST": "ئاۋسترالىيە غەربىي قىسىم ئۆلچەملىك ۋاقتى", "PDT": "تىنچ ئوكيان يازلىق ۋاقتى", "CST": "ئوتتۇرا قىسىم ئۆلچەملىك ۋاقتى"}, - } - } -  -diff --git a/ug_CN/ug_CN.go b/ug_CN/ug_CN.go -index a9acbba..2e9379a 100644 ---- a/ug_CN/ug_CN.go -+++ b/ug_CN/ug_CN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type ug_CN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'ug_CN' locale - func New() locales.Translator { - return &ug_CN{ -- locale: "ug_CN", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "يانۋار", "فېۋرال", "مارت", "ئاپرېل", "ماي", "ئىيۇن", "ئىيۇل", "ئاۋغۇست", "سېنتەبىر", "ئۆكتەبىر", "نويابىر", "دېكابىر"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "يانۋار", "فېۋرال", "مارت", "ئاپرېل", "ماي", "ئىيۇن", "ئىيۇل", "ئاۋغۇست", "سېنتەبىر", "ئۆكتەبىر", "نويابىر", "دېكابىر"}, -- daysAbbreviated: []string{"يە", "دۈ", "سە", "چا", "پە", "جۈ", "شە"}, -- daysNarrow: []string{"ي", "د", "س", "چ", "پ", "ج", "ش"}, -- daysShort: []string{"ي", "د", "س", "چ", "پ", "ج", "ش"}, -- daysWide: []string{"يەكشەنبە", "دۈشەنبە", "سەيشەنبە", "چارشەنبە", "پەيشەنبە", "جۈمە", "شەنبە"}, -- periodsAbbreviated: []string{"چ.ب", "چ.ك"}, -- periodsNarrow: []string{"ب", "ك"}, -- periodsWide: []string{"چۈشتىن بۇرۇن", "چۈشتىن كېيىن"}, -- erasAbbreviated: []string{"BCE", "مىلادىيە"}, -- erasNarrow: []string{"BCE", "مىلادىيە"}, -- erasWide: []string{"مىلادىيەدىن بۇرۇن", "مىلادىيە"}, -- timezones: map[string]string{"IST": "ھىندىستان ئۆلچەملىك ۋاقتى", "ChST": "چاموررو ئۆلچەملىك ۋاقتى", "COST": "كولومبىيە يازلىق ۋاقتى", "HNNOMX": "مېكسىكا غەربىي شىمالىي قىسىم ئۆلچەملىك ۋاقتى", "SGT": "سىنگاپور ۋاقتى", "HNPMX": "مېكسىكا تىنچ ئوكيان ئۆلچەملىك ۋاقتى", "LHST": "لورد-خاي ئۆلچەملىك ۋاقتى", "NZDT": "يېڭى زېلاندىيە يازلىق ۋاقتى", "WAST": "غەربىي ئافرىقا يازلىق ۋاقتى", "LHDT": "لورد-خاي يازلىق ۋاقتى", "SAST": "جەنۇبىي ئافرىقا ئۆلچەملىك ۋاقتى", "ACDT": "ئاۋسترالىيە ئوتتۇرا قىسىم يازلىق ۋاقتى", "GMT": "گىرىنۋىچ ۋاقتى", "HADT": "ھاۋاي-ئالېيۇت يازلىق ۋاقتى", "VET": "ۋېنېزۇئېلا ۋاقتى", "BT": "بۇتان ۋاقتى", "NZST": "يېڭى زېلاندىيە ئۆلچەملىك ۋاقتى", "AWDT": "ئاۋسترالىيە غەربىي قىسىم يازلىق ۋاقتى", "HEPM": "ساينىت پىئېر ۋە مىكېلون يازلىق ۋاقتى", "CLST": "چىلى يازلىق ۋاقتى", "HECU": "كۇبا يازلىق ۋاقتى", "EDT": "شەرقىي قىسىم يازلىق ۋاقتى", "MDT": "ئاۋمېن يازلىق ۋاقتى", "HAT": "نىۋفوئۇنلاند يازلىق ۋاقتى", "BOT": "بولىۋىيە ۋاقتى", "WAT": "غەربىي ئافرىقا ئۆلچەملىك ۋاقتى", "WART": "غەربىي ئارگېنتىنا ئۆلچەملىك ۋاقتى", "AEST": "ئاۋسترالىيە شەرقىي قىسىم ئۆلچەملىك ۋاقتى", "WEZ": "غەربىي ياۋروپا ئۆلچەملىك ۋاقتى", "AWST": "ئاۋسترالىيە غەربىي قىسىم ئۆلچەملىك ۋاقتى", "∅∅∅": "ئامازون يازلىق ۋاقتى", "CST": "ئوتتۇرا قىسىم ئۆلچەملىك ۋاقتى", "ARST": "ئارگېنتىنا يازلىق ۋاقتى", "WESZ": "غەربىي ياۋروپا يازلىق ۋاقتى", "AEDT": "ئاۋسترالىيە شەرقىي قىسىم يازلىق ۋاقتى", "JDT": "ياپونىيە يازلىق ۋاقتى", "WARST": "غەربىي ئارگېنتىنا يازلىق ۋاقتى", "HNCU": "كۇبا ئۆلچەملىك ۋاقتى", "WIT": "شەرقىي ھىندونېزىيە ۋاقتى", "ART": "ئارگېنتىنا ئۆلچەملىك ۋاقتى", "COT": "كولومبىيە ئۆلچەملىك ۋاقتى", "HEEG": "شەرقىي گىرېنلاند يازلىق ۋاقتى", "HKST": "شياڭگاڭ يازلىق ۋاقتى", "TMT": "تۈركمەنىستان ئۆلچەملىك ۋاقتى", "TMST": "تۈركمەنىستان يازلىق ۋاقتى", "HENOMX": "مېكسىكا غەربىي شىمالىي قىسىم يازلىق ۋاقتى", "EST": "شەرقىي قىسىم ئۆلچەملىك ۋاقتى", "CDT": "ئوتتۇرا قىسىم يازلىق ۋاقتى", "ADT": "ئاتلانتىك ئوكيان يازلىق ۋاقتى", "ACWDT": "ئاۋسترالىيە ئوتتۇرا غەربىي قىسىم يازلىق ۋاقتى", "AKST": "ئالياسكا ئۆلچەملىك ۋاقتى", "WITA": "ئوتتۇرا ھىندونېزىيە ۋاقتى", "HNEG": "شەرقىي گىرېنلاند ئۆلچەملىك ۋاقتى", "CAT": "ئوتتۇرا ئافرىقا ۋاقتى", "AST": "ئاتلانتىك ئوكيان ئۆلچەملىك ۋاقتى", "GYT": "گىۋىيانا ۋاقتى", "UYT": "ئۇرۇگۋاي ئۆلچەملىك ۋاقتى", "SRT": "سۇرىنام ۋاقتى", "PDT": "تىنچ ئوكيان يازلىق ۋاقتى", "HKT": "شياڭگاڭ ئۆلچەملىك ۋاقتى", "HNPM": "ساينىت پىئېر ۋە مىكېلون ئۆلچەملىك ۋاقتى", "ACST": "ئاۋسترالىيە ئوتتۇرا قىسىم ئۆلچەملىك ۋاقتى", "OEZ": "شەرقىي ياۋروپا ئۆلچەملىك ۋاقتى", "AKDT": "ئالياسكا يازلىق ۋاقتى", "HNOG": "غەربىي گىرېنلاند ئۆلچەملىك ۋاقتى", "UYST": "ئۇرۇگۋاي يازلىق ۋاقتى", "WIB": "غەربىي ھىندونېزىيە ۋاقتى", "JST": "ياپونىيە ئۆلچەملىك ۋاقتى", "MYT": "مالايشىيا ۋاقتى", "GFT": "فىرانسىيەگە قاراشلىق گىۋىيانا ۋاقتى", "ACWST": "ئاۋستىرالىيە ئوتتۇرا غەربىي قىسىم ئۆلچەملىك ۋاقتى", "CHAST": "چاتام ئۆلچەملىك ۋاقتى", "CLT": "چىلى ئۆلچەملىك ۋاقتى", "MST": "ئاۋمېن ئۆلچەملىك ۋاقتى", "HEPMX": "مېكسىكا تىنچ ئوكيان يازلىق ۋاقتى", "HNT": "نىۋفوئۇنلاند ئۆلچەملىك ۋاقتى", "OESZ": "شەرقىي ياۋروپا يازلىق ۋاقتى", "ECT": "ئېكۋادور ۋاقتى", "EAT": "شەرقىي ئافرىقا ۋاقتى", "HEOG": "غەربىي گىرېنلاند يازلىق ۋاقتى", "CHADT": "چاتام يازلىق ۋاقتى", "MEZ": "ئوتتۇرا ياۋروپا ئۆلچەملىك ۋاقتى", "MESZ": "ئوتتۇرا ياۋروپا يازلىق ۋاقتى", "HAST": "ھاۋاي-ئالېيۇت ئۆلچەملىك ۋاقتى", "PST": "تىنچ ئوكيان ئۆلچەملىك ۋاقتى"}, -+ locale: "ug_CN", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SAST": "SAST", "COST": "COST", "AST": "AST", "JDT": "JDT", "TMST": "TMST", "HAST": "HAST", "LHST": "LHST", "ACWDT": "ACWDT", "ACDT": "ACDT", "HNT": "HNT", "WART": "WART", "WITA": "WITA", "WIB": "WIB", "UYT": "UYT", "VET": "VET", "HNCU": "HNCU", "AKDT": "AKDT", "ADT": "ADT", "BOT": "BOT", "MESZ": "MESZ", "HNPM": "HNPM", "PDT": "PDT", "HEOG": "HEOG", "MEZ": "MEZ", "IST": "IST", "BT": "BT", "CHADT": "CHADT", "WESZ": "WESZ", "∅∅∅": "∅∅∅", "TMT": "TMT", "CDT": "CDT", "WEZ": "WEZ", "HAT": "HAT", "WARST": "WARST", "AEDT": "AEDT", "OEZ": "OEZ", "CAT": "CAT", "NZDT": "NZDT", "ECT": "ECT", "ART": "ART", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "GFT": "GFT", "HKST": "HKST", "HNEG": "HNEG", "AWDT": "AWDT", "CHAST": "CHAST", "HEPMX": "HEPMX", "WAT": "WAT", "HKT": "HKT", "MST": "MST", "JST": "JST", "PST": "PST", "HNOG": "HNOG", "EST": "EST", "EDT": "EDT", "CST": "CST", "HEEG": "HEEG", "NZST": "NZST", "ChST": "ChST", "LHDT": "LHDT", "ACWST": "ACWST", "HNPMX": "HNPMX", "CLST": "CLST", "GMT": "GMT", "HENOMX": "HENOMX", "SGT": "SGT", "WIT": "WIT", "CLT": "CLT", "ARST": "ARST", "WAST": "WAST", "COT": "COT", "MDT": "MDT", "AEST": "AEST", "UYST": "UYST", "HECU": "HECU", "AKST": "AKST", "MYT": "MYT", "OESZ": "OESZ", "GYT": "GYT", "SRT": "SRT", "EAT": "EAT", "HADT": "HADT", "ACST": "ACST", "AWST": "AWST"}, - } - } -  -@@ -135,7 +112,7 @@ func (ug *ug_CN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ug *ug_CN) MonthsAbbreviated() []string { -- return ug.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (ug *ug_CN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ug *ug_CN) MonthsNarrow() []string { -- return ug.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (ug *ug_CN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ug *ug_CN) MonthsWide() []string { -- return ug.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,73 +178,13 @@ func (ug *ug_CN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ug_CN' and handles both Whole and Real numbers based on 'v' - func (ug *ug_CN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ug.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ug.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ug.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ug_CN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ug *ug_CN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ug.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, ug.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ug.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ug_CN' -@@ -275,56 +192,7 @@ func (ug *ug_CN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ug.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ug.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ug.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, ug.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ug.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ug_CN' -@@ -333,68 +201,7 @@ func (ug *ug_CN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ug.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ug.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ug.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, ug.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ug.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, ug.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ug_CN' -@@ -402,28 +209,6 @@ func (ug *ug_CN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -432,17 +217,6 @@ func (ug *ug_CN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ug.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +225,6 @@ func (ug *ug_CN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ug.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +233,6 @@ func (ug *ug_CN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, ug.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = append(b, ug.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -491,28 +241,6 @@ func (ug *ug_CN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ug.periodsAbbreviated[0]...) -- } else { -- b = append(b, ug.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -521,35 +249,6 @@ func (ug *ug_CN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ug.periodsAbbreviated[0]...) -- } else { -- b = append(b, ug.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -558,40 +257,6 @@ func (ug *ug_CN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ug.periodsAbbreviated[0]...) -- } else { -- b = append(b, ug.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -600,44 +265,5 @@ func (ug *ug_CN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ug.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ug.periodsAbbreviated[0]...) -- } else { -- b = append(b, ug.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ug.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/uk/uk.go b/uk/uk.go -index 15f851d..5220417 100644 ---- a/uk/uk.go -+++ b/uk/uk.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"до н. е.", "н. е."}, - erasNarrow: []string{"до н.е.", "н.е."}, - erasWide: []string{"до нашої ери", "нашої ери"}, -- timezones: map[string]string{"HAST": "за стандартним гавайсько-алеутським часом", "JDT": "за японським літнім часом", "HNCU": "за стандартним часом на Кубі", "AKST": "за стандартним часом на Алясці", "CST": "за північноамериканським центральним стандартним часом", "PDT": "за північноамериканським тихоокеанським літнім часом", "IST": "за індійським стандартним часом", "ChST": "за часом на Північних Маріанських островах", "BOT": "за болівійським часом", "SGT": "за часом у Сінгапурі", "MDT": "MDT", "GYT": "за часом у Гаяні", "HNPM": "за стандартним часом на островах Сен-П’єр і Мікелон", "WART": "за стандартним західноаргентинським часом", "LHST": "за стандартним часом на острові Лорд-Хау", "WARST": "за літнім за західноаргентинським часом", "COT": "за стандартним колумбійським часом", "AST": "за атлантичним стандартним часом", "MYT": "за часом у Малайзії", "AEDT": "за літнім східноавстралійським часом", "HEPM": "за літнім часом на островах Сен-П’єр і Мікелон", "NZDT": "за літнім часом у Новій Зеландії", "CAT": "за центральноафриканським часом", "WITA": "за центральноіндонезійським часом", "HNNOMX": "за стандартним північнозахідним часом у Мексиці", "EDT": "за північноамериканським східним літнім часом", "CDT": "за північноамериканським центральним літнім часом", "HADT": "за літнім гавайсько-алеутським часом", "VET": "за часом у Венесуелі", "WIT": "за східноіндонезійським часом", "HNT": "за стандартним часом на острові Ньюфаундленд", "AWST": "за стандартним західноавстралійським часом", "AWDT": "за літнім західноавстралійським часом", "NZST": "за стандартним часом у Новій Зеландії", "HNOG": "за стандартним західним часом у Гренландії", "AEST": "за стандартним східноавстралійським часом", "JST": "за японським стандартним часом", "UYST": "за літнім часом в Уругваї", "HEOG": "за літнім західним часом у Гренландії", "HKT": "за стандартним часом у Гонконзі", "TMST": "за літнім часом у Туркменістані", "HECU": "за літнім часом на Кубі", "HNPMX": "за стандартним тихоокеанським часом у Мексиці", "PST": "за північноамериканським тихоокеанським стандартним часом", "ACWDT": "за літнім центральнозахідним австралійським часом", "ACST": "за стандартним центральноавстралійським часом", "ACDT": "за літнім центральноавстралійським часом", "ECT": "за часом в Еквадорі", "HKST": "за літнім часом у Гонконзі", "CLST": "за літнім чилійським часом", "TMT": "за стандартним часом у Туркменістані", "EAT": "за східноафриканським часом", "WAT": "за західноафриканським стандартним часом", "EST": "за північноамериканським східним стандартним часом", "AKDT": "за літнім часом на Алясці", "SRT": "за часом у Суринамі", "CHADT": "за літнім часом на архіпелазі Чатем", "HEEG": "за літнім східним часом у Гренландії", "GFT": "за часом Французької Гвіани", "HENOMX": "за літнім північнозахідним часом у Мексиці", "WESZ": "за західноєвропейським літнім часом", "LHDT": "за літнім часом на острові Лорд-Хау", "SAST": "за південноафриканським часом", "CLT": "за стандартним чилійським часом", "∅∅∅": "за літнім часом на Амазонці", "OEZ": "за східноєвропейським стандартним часом", "ADT": "за атлантичним літнім часом", "ARST": "за літнім аргентинським часом", "ACWST": "за стандартним центральнозахідним австралійським часом", "MEZ": "за центральноєвропейським стандартним часом", "CHAST": "за стандартним часом на архіпелазі Чатем", "WAST": "за західноафриканським літнім часом", "MST": "MST", "BT": "за часом у Бутані", "ART": "за стандартним аргентинським часом", "WEZ": "за західноєвропейським стандартним часом", "MESZ": "за центральноєвропейським літнім часом", "HNEG": "за стандартним східним часом у Гренландії", "OESZ": "за східноєвропейським літнім часом", "WIB": "за західноіндонезійським часом", "HAT": "за літнім часом у Ньюфаундленд", "COST": "за літнім колумбійським часом", "GMT": "за Гринвічем", "HEPMX": "за літнім тихоокеанським часом у Мексиці", "UYT": "за стандартним часом в Уругваї"}, -+ timezones: map[string]string{"WIT": "за східноіндонезійським часом", "TMT": "за стандартним часом у Туркменістані", "SRT": "за часом у Суринамі", "VET": "за часом у Венесуелі", "HECU": "за літнім часом на Кубі", "HKT": "за стандартним часом у Гонконзі", "AST": "за атлантичним стандартним часом", "EAT": "за східноафриканським часом", "WEZ": "за західноєвропейським стандартним часом", "HNPM": "за стандартним часом на островах Сен-П’єр і Мікелон", "PST": "за північноамериканським тихоокеанським стандартним часом", "WAT": "за західноафриканським стандартним часом", "HNT": "за стандартним часом на острові Ньюфаундленд", "EST": "за північноамериканським східним стандартним часом", "MST": "MST", "HAST": "за стандартним гавайсько-алеутським часом", "WARST": "за літнім за західноаргентинським часом", "SAST": "за південноафриканським часом", "ART": "за стандартним аргентинським часом", "GFT": "за часом Французької Гвіани", "CDT": "за північноамериканським центральним літнім часом", "ARST": "за літнім аргентинським часом", "CHAST": "за стандартним часом на архіпелазі Чатем", "IST": "за індійським стандартним часом", "MEZ": "за центральноєвропейським стандартним часом", "UYST": "за літнім часом в Уругваї", "GYT": "за часом у Гаяні", "CAT": "за центральноафриканським часом", "NZDT": "за літнім часом у Новій Зеландії", "GMT": "за Гринвічем", "ACWST": "за стандартним центральнозахідним австралійським часом", "WESZ": "за західноєвропейським літнім часом", "WAST": "за західноафриканським літнім часом", "HAT": "за літнім часом у Ньюфаундленд", "HNOG": "за стандартним західним часом у Гренландії", "BOT": "за болівійським часом", "HNNOMX": "за стандартним північнозахідним часом у Мексиці", "HEEG": "за літнім східним часом у Гренландії", "UYT": "за стандартним часом в Уругваї", "SGT": "за часом у Сінгапурі", "OEZ": "за східноєвропейським стандартним часом", "COT": "за стандартним колумбійським часом", "MDT": "MDT", "ACST": "за стандартним центральноавстралійським часом", "ACDT": "за літнім центральноавстралійським часом", "MYT": "за часом у Малайзії", "HEPM": "за літнім часом на островах Сен-П’єр і Мікелон", "HEOG": "за літнім західним часом у Гренландії", "HKST": "за літнім часом у Гонконзі", "WITA": "за центральноіндонезійським часом", "WIB": "за західноіндонезійським часом", "AWST": "за стандартним західноавстралійським часом", "HNCU": "за стандартним часом на Кубі", "HNPMX": "за стандартним тихоокеанським часом у Мексиці", "WART": "за стандартним західноаргентинським часом", "CLT": "за стандартним чилійським часом", "CST": "за північноамериканським центральним стандартним часом", "HNEG": "за стандартним східним часом у Гренландії", "LHST": "за стандартним часом на острові Лорд-Хау", "JST": "за японським стандартним часом", "JDT": "за японським літнім часом", "PDT": "за північноамериканським тихоокеанським літнім часом", "COST": "за літнім колумбійським часом", "NZST": "за стандартним часом у Новій Зеландії", "ECT": "за часом в Еквадорі", "ChST": "за часом на Північних Маріанських островах", "BT": "за часом у Бутані", "AKST": "за стандартним часом на Алясці", "ADT": "за атлантичним літнім часом", "CHADT": "за літнім часом на архіпелазі Чатем", "HEPMX": "за літнім тихоокеанським часом у Мексиці", "AKDT": "за літнім часом на Алясці", "TMST": "за літнім часом у Туркменістані", "HADT": "за літнім гавайсько-алеутським часом", "HENOMX": "за літнім північнозахідним часом у Мексиці", "CLST": "за літнім чилійським часом", "MESZ": "за центральноєвропейським літнім часом", "AEST": "за стандартним східноавстралійським часом", "AEDT": "за літнім східноавстралійським часом", "LHDT": "за літнім часом на острові Лорд-Хау", "ACWDT": "за літнім центральнозахідним австралійським часом", "OESZ": "за східноєвропейським літнім часом", "∅∅∅": "за літнім бразильським часом", "EDT": "за північноамериканським східним літнім часом", "AWDT": "за літнім західноавстралійським часом"}, - } - } -  -@@ -100,8 +100,8 @@ func (uk *uk) CardinalPluralRule(num float64, v uint64) locales.PluralRule { -  - n := math.Abs(num) - i := int64(n) -- iMod100 := i % 100 - iMod10 := i % 10 -+ iMod100 := i % 100 -  - if v == 0 && iMod10 == 1 && iMod100 != 11 { - return locales.PluralRuleOne -diff --git a/uk_UA/uk_UA.go b/uk_UA/uk_UA.go -index cd46bc3..799c6e6 100644 ---- a/uk_UA/uk_UA.go -+++ b/uk_UA/uk_UA.go -@@ -10,68 +10,45 @@ import ( - ) -  - type uk_UA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'uk_UA' locale - func New() locales.Translator { - return &uk_UA{ -- locale: "uk_UA", -- pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -- pluralsOrdinal: []locales.PluralRule{4, 6}, -- pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "січ.", "лют.", "бер.", "квіт.", "трав.", "черв.", "лип.", "серп.", "вер.", "жовт.", "лист.", "груд."}, -- monthsNarrow: []string{"", "с", "л", "б", "к", "т", "ч", "л", "с", "в", "ж", "л", "г"}, -- monthsWide: []string{"", "січня", "лютого", "березня", "квітня", "травня", "червня", "липня", "серпня", "вересня", "жовтня", "листопада", "грудня"}, -- daysAbbreviated: []string{"нд", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysNarrow: []string{"Н", "П", "В", "С", "Ч", "П", "С"}, -- daysShort: []string{"нд", "пн", "вт", "ср", "чт", "пт", "сб"}, -- daysWide: []string{"неділя", "понеділок", "вівторок", "середа", "четвер", "пʼятниця", "субота"}, -- periodsAbbreviated: []string{"дп", "пп"}, -- periodsNarrow: []string{"дп", "пп"}, -- periodsWide: []string{"дп", "пп"}, -- erasAbbreviated: []string{"до н. е.", "н. е."}, -- erasNarrow: []string{"до н.е.", "н.е."}, -- erasWide: []string{"до нашої ери", "нашої ери"}, -- timezones: map[string]string{"HKT": "за стандартним часом у Гонконзі", "HEPM": "за літнім часом на островах Сен-П’єр і Мікелон", "CAT": "за центральноафриканським часом", "MST": "за північноамериканським гірським стандартним часом", "WIT": "за східноіндонезійським часом", "ARST": "за літнім аргентинським часом", "PST": "за північноамериканським тихоокеанським стандартним часом", "HNPM": "за стандартним часом на островах Сен-П’єр і Мікелон", "CST": "за північноамериканським центральним стандартним часом", "MYT": "за часом у Малайзії", "UYST": "за літнім часом в Уругваї", "SAST": "за південноафриканським часом", "ChST": "за часом на Північних Маріанських островах", "PDT": "за північноамериканським тихоокеанським літнім часом", "WAT": "за західноафриканським стандартним часом", "GMT": "за Гринвічем", "HEPMX": "за літнім тихоокеанським часом у Мексиці", "BT": "за часом у Бутані", "WEZ": "за західноєвропейським стандартним часом", "WESZ": "за західноєвропейським літнім часом", "LHDT": "за літнім часом на острові Лорд-Хау", "AWDT": "за літнім західноавстралійським часом", "IST": "за індійським стандартним часом", "CLT": "за стандартним чилійським часом", "OESZ": "за східноєвропейським літнім часом", "WARST": "за літнім за західноаргентинським часом", "AST": "за атлантичним стандартним часом", "GYT": "за часом у Гаяні", "HNOG": "за стандартним західним часом у Гренландії", "JDT": "за японським літнім часом", "HNNOMX": "за стандартним північнозахідним часом у Мексиці", "HADT": "за літнім гавайсько-алеутським часом", "NZDT": "за літнім часом у Новій Зеландії", "JST": "за японським стандартним часом", "∅∅∅": "за літнім часом на Амазонці", "HEEG": "за літнім східним часом у Гренландії", "HEOG": "за літнім західним часом у Гренландії", "AWST": "за стандартним західноавстралійським часом", "WITA": "за центральноіндонезійським часом", "ACDT": "за літнім центральноавстралійським часом", "EAT": "за східноафриканським часом", "WIB": "за західноіндонезійським часом", "MDT": "за північноамериканським гірським літнім часом", "ACWST": "за стандартним центральнозахідним австралійським часом", "NZST": "за стандартним часом у Новій Зеландії", "CHAST": "за стандартним часом на архіпелазі Чатем", "EST": "за північноамериканським східним стандартним часом", "AKST": "за стандартним часом на Алясці", "CDT": "за північноамериканським центральним літнім часом", "ACWDT": "за літнім центральнозахідним австралійським часом", "WAST": "за західноафриканським літнім часом", "OEZ": "за східноєвропейським стандартним часом", "VET": "за часом у Венесуелі", "SRT": "за часом у Суринамі", "CHADT": "за літнім часом на архіпелазі Чатем", "HAT": "за літнім часом у Ньюфаундленд", "ART": "за стандартним аргентинським часом", "TMT": "за стандартним часом у Туркменістані", "COT": "за стандартним колумбійським часом", "WART": "за стандартним західноаргентинським часом", "ADT": "за атлантичним літнім часом", "UYT": "за стандартним часом в Уругваї", "HAST": "за стандартним гавайсько-алеутським часом", "HECU": "за літнім часом на Кубі", "HNPMX": "за стандартним тихоокеанським часом у Мексиці", "SGT": "за часом у Сінгапурі", "ACST": "за стандартним центральноавстралійським часом", "ECT": "за часом в Еквадорі", "AKDT": "за літнім часом на Алясці", "LHST": "за стандартним часом на острові Лорд-Хау", "GFT": "за часом Французької Гвіани", "MESZ": "за центральноєвропейським літнім часом", "HNEG": "за стандартним східним часом у Гренландії", "HENOMX": "за літнім північнозахідним часом у Мексиці", "AEDT": "за літнім східноавстралійським часом", "CLST": "за літнім чилійським часом", "COST": "за літнім колумбійським часом", "HNCU": "за стандартним часом на Кубі", "HNT": "за стандартним часом на острові Ньюфаундленд", "HKST": "за літнім часом у Гонконзі", "AEST": "за стандартним східноавстралійським часом", "EDT": "за північноамериканським східним літнім часом", "MEZ": "за центральноєвропейським стандартним часом", "BOT": "за болівійським часом", "TMST": "за літнім часом у Туркменістані"}, -+ locale: "uk_UA", -+ pluralsCardinal: []locales.PluralRule{2, 4, 5, 6}, -+ pluralsOrdinal: []locales.PluralRule{4, 6}, -+ pluralsRange: []locales.PluralRule{2, 4, 5, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WAT": "WAT", "GFT": "GFT", "CLT": "CLT", "HAST": "HAST", "LHST": "LHST", "∅∅∅": "∅∅∅", "AEDT": "AEDT", "MST": "MST", "WIB": "WIB", "JDT": "JDT", "IST": "IST", "COT": "COT", "HNT": "HNT", "WART": "WART", "TMST": "TMST", "CAT": "CAT", "ECT": "ECT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "EAT": "EAT", "HAT": "HAT", "EST": "EST", "NZDT": "NZDT", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "WAST": "WAST", "AKST": "AKST", "HKT": "HKT", "ACDT": "ACDT", "HNPM": "HNPM", "CHAST": "CHAST", "WESZ": "WESZ", "SGT": "SGT", "HADT": "HADT", "AWDT": "AWDT", "LHDT": "LHDT", "WEZ": "WEZ", "ACWST": "ACWST", "COST": "COST", "ChST": "ChST", "OESZ": "OESZ", "ART": "ART", "MESZ": "MESZ", "HEEG": "HEEG", "AWST": "AWST", "UYT": "UYT", "BT": "BT", "WIT": "WIT", "EDT": "EDT", "HKST": "HKST", "CDT": "CDT", "HEPM": "HEPM", "VET": "VET", "OEZ": "OEZ", "AST": "AST", "HNCU": "HNCU", "GYT": "GYT", "TMT": "TMT", "ADT": "ADT", "GMT": "GMT", "HNEG": "HNEG", "MYT": "MYT", "SAST": "SAST", "WITA": "WITA", "ARST": "ARST", "BOT": "BOT", "SRT": "SRT", "ACST": "ACST", "JST": "JST", "AKDT": "AKDT", "CHADT": "CHADT", "WARST": "WARST", "HNOG": "HNOG", "CLST": "CLST", "MDT": "MDT", "UYST": "UYST", "PST": "PST", "PDT": "PDT", "NZST": "NZST", "MEZ": "MEZ", "HECU": "HECU", "CST": "CST", "AEST": "AEST", "HEOG": "HEOG"}, - } - } -  -@@ -177,7 +154,7 @@ func (uk *uk_UA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (uk *uk_UA) MonthsAbbreviated() []string { -- return uk.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -187,7 +164,7 @@ func (uk *uk_UA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (uk *uk_UA) MonthsNarrow() []string { -- return uk.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -197,7 +174,7 @@ func (uk *uk_UA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (uk *uk_UA) MonthsWide() []string { -- return uk.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -243,75 +220,13 @@ func (uk *uk_UA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'uk_UA' and handles both Whole and Real numbers based on 'v' - func (uk *uk_UA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uk.group) - 1; j >= 0; j-- { -- b = append(b, uk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'uk_UA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (uk *uk_UA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uk.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, uk.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'uk_UA' -@@ -319,56 +234,7 @@ func (uk *uk_UA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uk.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uk.group) - 1; j >= 0; j-- { -- b = append(b, uk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uk.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'uk_UA' -@@ -377,64 +243,7 @@ func (uk *uk_UA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uk.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uk.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uk.group) - 1; j >= 0; j-- { -- b = append(b, uk.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, uk.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uk.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, uk.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'uk_UA' -@@ -442,27 +251,6 @@ func (uk *uk_UA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2e}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -471,20 +259,6 @@ func (uk *uk_UA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, uk.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd1, 0x80}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -493,20 +267,6 @@ func (uk *uk_UA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, uk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd1, 0x80}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -515,22 +275,6 @@ func (uk *uk_UA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, uk.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, uk.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20, 0xd1, 0x80}...) -- b = append(b, []byte{0x2e}...) -- - return string(b) - } -  -@@ -539,19 +283,6 @@ func (uk *uk_UA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -560,26 +291,6 @@ func (uk *uk_UA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -588,30 +299,6 @@ func (uk *uk_UA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -620,34 +307,5 @@ func (uk *uk_UA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uk.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := uk.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ur/ur.go b/ur/ur.go -index a4ccf46..10e3898 100644 ---- a/ur/ur.go -+++ b/ur/ur.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"قبل مسیح", "عیسوی"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"قبل مسیح", "عیسوی"}, -- timezones: map[string]string{"EST": "ایسٹرن اسٹینڈرڈ ٹائم", "UYT": "یوروگوئے کا معیاری وقت", "AST": "اٹلانٹک اسٹینڈرڈ ٹائم", "BT": "بھوٹان کا وقت", "SAST": "جنوبی افریقہ سٹینڈرڈ ٹائم", "JDT": "جاپان ڈے لائٹ ٹائم", "BOT": "بولیویا کا وقت", "HECU": "کیوبا ڈے لائٹ ٹائم", "MDT": "MDT", "ACWST": "آسٹریلین سنٹرل ویسٹرن اسٹینڈرڈ ٹائم", "CHAST": "چیتھم اسٹینڈرڈ ٹائم", "EAT": "مشرقی افریقہ ٹائم", "WAST": "مغربی افریقہ سمر ٹائم", "CDT": "سنٹرل ڈے لائٹ ٹائم", "WIB": "مغربی انڈونیشیا ٹائم", "HADT": "ہوائی الیوٹیئن ڈے لائٹ ٹائم", "HEOG": "مغربی گرین لینڈ کا موسم گرما کا وقت", "HNT": "نیو فاؤنڈ لینڈ اسٹینڈرڈ ٹائم", "AWDT": "آسٹریلین ویسٹرن ڈے لائٹ ٹائم", "MEZ": "وسطی یورپ کا معیاری وقت", "CHADT": "چیتھم ڈے لائٹ ٹائم", "JST": "جاپان سٹینڈرڈ ٹائم", "WESZ": "مغربی یورپ کا موسم گرما کا وقت", "AEST": "آسٹریلین ایسٹرن اسٹینڈرڈ ٹائم", "AEDT": "آسٹریلین ایسٹرن ڈے لائٹ ٹائم", "AWST": "آسٹریلیا ویسٹرن اسٹینڈرڈ ٹائم", "ACDT": "آسٹریلین سنٹرل ڈے لائٹ ٹائم", "WAT": "مغربی افریقہ سٹینڈرڈ ٹائم", "HENOMX": "شمال مغربی میکسیکو ڈے لائٹ ٹائم", "SRT": "سورینام کا وقت", "GFT": "فرینچ گیانا کا وقت", "GMT": "گرین وچ کا اصل وقت", "SGT": "سنگاپور سٹینڈرڈ ٹائم", "UYST": "یوروگوئے کا موسم گرما کا وقت", "PDT": "پیسفک ڈے لائٹ ٹائم", "WEZ": "مغربی یورپ کا معیاری وقت", "HAT": "نیو فاؤنڈ لینڈ ڈے لائٹ ٹائم", "NZDT": "نیوزی لینڈ ڈے لائٹ ٹائم", "TMT": "ترکمانستان کا معیاری وقت", "CAT": "وسطی افریقہ ٹائم", "ECT": "ایکواڈور کا وقت", "WART": "مغربی ارجنٹینا کا معیاری وقت", "∅∅∅": "ازوریس کا موسم گرما کا وقت", "MST": "MST", "HNPMX": "میکسیکن پیسفک اسٹینڈرڈ ٹائم", "HKST": "ہانگ کانگ سمر ٹائم", "HNPM": "سینٹ پیئر اور مکلیئون اسٹینڈرڈ ٹائم", "LHDT": "لارڈ ہووے ڈے لائٹ ٹائم", "HEEG": "مشرقی گرین لینڈ کا موسم گرما کا وقت", "WIT": "مشرقی انڈونیشیا ٹائم", "HKT": "ہانگ کانگ سٹینڈرڈ ٹائم", "HNEG": "مشرقی گرین لینڈ اسٹینڈرڈ ٹائم", "GYT": "گیانا کا وقت", "VET": "وینزوئیلا کا وقت", "WITA": "وسطی انڈونیشیا ٹائم", "NZST": "نیوزی لینڈ کا معیاری وقت", "WARST": "مغربی ارجنٹینا کا موسم گرما کا وقت", "MYT": "ملیشیا ٹائم", "HEPM": "سینٹ پیئر اور مکلیئون ڈے لائٹ ٹائم", "MESZ": "وسطی یورپ کا موسم گرما کا وقت", "TMST": "ترکمانستان کا موسم گرما کا وقت", "COT": "کولمبیا کا معیاری وقت", "COST": "کولمبیا کا موسم گرما کا وقت", "HEPMX": "میکسیکن پیسفک ڈے لائٹ ٹائم", "AKDT": "الاسکا ڈے لائٹ ٹائم", "CST": "سنٹرل اسٹینڈرڈ ٹائم", "ChST": "چامورو سٹینڈرڈ ٹائم", "ACWDT": "آسٹریلین سنٹرل ویسٹرن ڈے لائٹ ٹائم", "HNOG": "مغربی گرین لینڈ اسٹینڈرڈ ٹائم", "PST": "پیسفک اسٹینڈرڈ ٹائم", "ARST": "ارجنٹینا سمر ٹائم", "OESZ": "مشرقی یورپ کا موسم گرما کا وقت", "HNNOMX": "شمال مغربی میکسیکو اسٹینڈرڈ ٹائم", "AKST": "الاسکا اسٹینڈرڈ ٹائم", "ADT": "اٹلانٹک ڈے لائٹ ٹائم", "HAST": "ہوائی الیوٹیئن اسٹینڈرڈ ٹائم", "IST": "ہندوستان کا معیاری وقت", "CLT": "چلی کا معیاری وقت", "CLST": "چلی کا موسم گرما کا وقت", "ACST": "آسٹریلین سنٹرل اسٹینڈرڈ ٹائم", "OEZ": "مشرقی یورپ کا معیاری وقت", "HNCU": "کیوبا اسٹینڈرڈ ٹائم", "EDT": "ایسٹرن ڈے لائٹ ٹائم", "ART": "ارجنٹینا سٹینڈرڈ ٹائم", "LHST": "لارڈ ہووے اسٹینڈرڈ ٹائم"}, -+ timezones: map[string]string{"NZDT": "نیوزی لینڈ ڈے لائٹ ٹائم", "ChST": "چامورو سٹینڈرڈ ٹائم", "ACDT": "آسٹریلین سنٹرل ڈے لائٹ ٹائم", "HEEG": "مشرقی گرین لینڈ کا موسم گرما کا وقت", "JDT": "جاپان ڈے لائٹ ٹائم", "AEST": "آسٹریلین ایسٹرن اسٹینڈرڈ ٹائم", "UYT": "یوروگوئے کا معیاری وقت", "MST": "MST", "OEZ": "مشرقی یورپ کا معیاری وقت", "HKT": "ہانگ کانگ سٹینڈرڈ ٹائم", "SGT": "سنگاپور سٹینڈرڈ ٹائم", "WIT": "مشرقی انڈونیشیا ٹائم", "MYT": "ملیشیا ٹائم", "BOT": "بولیویا کا وقت", "HENOMX": "شمال مغربی میکسیکو ڈے لائٹ ٹائم", "WESZ": "مغربی یورپ کا موسم گرما کا وقت", "COST": "کولمبیا کا موسم گرما کا وقت", "EDT": "ایسٹرن ڈے لائٹ ٹائم", "GMT": "گرین وچ کا اصل وقت", "MEZ": "وسطی یورپ کا معیاری وقت", "CHADT": "چیتھم ڈے لائٹ ٹائم", "AKDT": "الاسکا ڈے لائٹ ٹائم", "GYT": "گیانا کا وقت", "EST": "ایسٹرن اسٹینڈرڈ ٹائم", "ECT": "ایکواڈور کا وقت", "LHST": "لارڈ ہووے اسٹینڈرڈ ٹائم", "LHDT": "لارڈ ہووے ڈے لائٹ ٹائم", "HAST": "ہوائی الیوٹیئن اسٹینڈرڈ ٹائم", "HEPMX": "میکسیکن پیسفک ڈے لائٹ ٹائم", "TMT": "ترکمانستان کا معیاری وقت", "CST": "سنٹرل اسٹینڈرڈ ٹائم", "∅∅∅": "ازوریس کا موسم گرما کا وقت", "WIB": "مغربی انڈونیشیا ٹائم", "HNNOMX": "شمال مغربی میکسیکو اسٹینڈرڈ ٹائم", "BT": "بھوٹان کا وقت", "CLST": "چلی کا موسم گرما کا وقت", "OESZ": "مشرقی یورپ کا موسم گرما کا وقت", "HNPMX": "میکسیکن پیسفک اسٹینڈرڈ ٹائم", "WITA": "وسطی انڈونیشیا ٹائم", "HEPM": "سینٹ پیئر اور مکلیئون ڈے لائٹ ٹائم", "PST": "پیسفک اسٹینڈرڈ ٹائم", "WEZ": "مغربی یورپ کا معیاری وقت", "WAT": "مغربی افریقہ سٹینڈرڈ ٹائم", "HNT": "نیو فاؤنڈ لینڈ اسٹینڈرڈ ٹائم", "CLT": "چلی کا معیاری وقت", "SAST": "جنوبی افریقہ سٹینڈرڈ ٹائم", "UYST": "یوروگوئے کا موسم گرما کا وقت", "NZST": "نیوزی لینڈ کا معیاری وقت", "ART": "ارجنٹینا سٹینڈرڈ ٹائم", "HADT": "ہوائی الیوٹیئن ڈے لائٹ ٹائم", "JST": "جاپان سٹینڈرڈ ٹائم", "VET": "وینزوئیلا کا وقت", "HECU": "کیوبا ڈے لائٹ ٹائم", "CDT": "سنٹرل ڈے لائٹ ٹائم", "AWDT": "آسٹریلین ویسٹرن ڈے لائٹ ٹائم", "WAST": "مغربی افریقہ سمر ٹائم", "HNOG": "مغربی گرین لینڈ اسٹینڈرڈ ٹائم", "HEOG": "مغربی گرین لینڈ کا موسم گرما کا وقت", "ARST": "ارجنٹینا سمر ٹائم", "ADT": "اٹلانٹک ڈے لائٹ ٹائم", "AEDT": "آسٹریلین ایسٹرن ڈے لائٹ ٹائم", "HNCU": "کیوبا اسٹینڈرڈ ٹائم", "HAT": "نیو فاؤنڈ لینڈ ڈے لائٹ ٹائم", "CAT": "وسطی افریقہ ٹائم", "AWST": "آسٹریلیا ویسٹرن اسٹینڈرڈ ٹائم", "HNPM": "سینٹ پیئر اور مکلیئون اسٹینڈرڈ ٹائم", "CHAST": "چیتھم اسٹینڈرڈ ٹائم", "AKST": "الاسکا اسٹینڈرڈ ٹائم", "COT": "کولمبیا کا معیاری وقت", "HKST": "ہانگ کانگ سمر ٹائم", "AST": "اٹلانٹک اسٹینڈرڈ ٹائم", "EAT": "مشرقی افریقہ ٹائم", "MESZ": "وسطی یورپ کا موسم گرما کا وقت", "ACST": "آسٹریلین سنٹرل اسٹینڈرڈ ٹائم", "HNEG": "مشرقی گرین لینڈ اسٹینڈرڈ ٹائم", "IST": "ہندوستان کا معیاری وقت", "PDT": "پیسفک ڈے لائٹ ٹائم", "ACWST": "آسٹریلین سنٹرل ویسٹرن اسٹینڈرڈ ٹائم", "SRT": "سورینام کا وقت", "GFT": "فرینچ گیانا کا وقت", "ACWDT": "آسٹریلین سنٹرل ویسٹرن ڈے لائٹ ٹائم", "WART": "مغربی ارجنٹینا کا معیاری وقت", "WARST": "مغربی ارجنٹینا کا موسم گرما کا وقت", "TMST": "ترکمانستان کا موسم گرما کا وقت", "MDT": "MDT"}, - } - } -  -diff --git a/ur_IN/ur_IN.go b/ur_IN/ur_IN.go -index a55aa5c..254ef08 100644 ---- a/ur_IN/ur_IN.go -+++ b/ur_IN/ur_IN.go -@@ -48,30 +48,14 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{2, 6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "‎-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositivePrefix: " ", - currencyNegativePrefix: " ", -- monthsAbbreviated: []string{"", "جنوری", "فروری", "مارچ", "اپریل", "مئی", "جون", "جولائی", "اگست", "ستمبر", "اکتوبر", "نومبر", "دسمبر"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "جنوری", "فروری", "مارچ", "اپریل", "مئی", "جون", "جولائی", "اگست", "ستمبر", "اکتوبر", "نومبر", "دسمبر"}, - daysAbbreviated: []string{"اتوار", "پیر", "منگل", "بدھ", "جمعرات", "جمعہ", "ہفتہ"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, - daysShort: []string{"اتوار", "پیر", "منگل", "بدھ", "جمعرات", "جمعہ", "ہفتہ"}, - daysWide: []string{"اتوار", "پیر", "منگل", "بدھ", "جمعرات", "جمعہ", "ہفتہ"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"قبل مسیح", "عیسوی"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"قبل مسیح", "عیسوی"}, -- timezones: map[string]string{"UYST": "یوروگوئے سمر ٹائم", "AKST": "الاسکا اسٹینڈرڈ ٹائم", "ChST": "چامورو سٹینڈرڈ ٹائم", "WAST": "مغربی افریقہ سمر ٹائم", "GMT": "گرین وچ مین ٹائم", "SGT": "سنگاپور سٹینڈرڈ ٹائم", "AST": "اٹلانٹک اسٹینڈرڈ ٹائم", "AWDT": "آسٹریلین ویسٹرن ڈے لائٹ ٹائم", "ACWST": "آسٹریلین سنٹرل ویسٹرن اسٹینڈرڈ ٹائم", "ART": "ارجنٹینا سٹینڈرڈ ٹائم", "ARST": "ارجنٹینا سمر ٹائم", "ACDT": "آسٹریلین سنٹرل ڈے لائٹ ٹائم", "HEPMX": "میکسیکن پیسفک ڈے لائٹ ٹائم", "CDT": "سنٹرل ڈے لائٹ ٹائم", "HADT": "ہوائی الیوٹیئن ڈے لائٹ ٹائم", "HEOG": "مغربی گرین لینڈ کا موسم گرما کا وقت", "NZDT": "نیوزی لینڈ ڈے لائٹ ٹائم", "JDT": "جاپان ڈے لائٹ ٹائم", "ADT": "اٹلانٹک ڈے لائٹ ٹائم", "HNOG": "مغربی گرین لینڈ اسٹینڈرڈ ٹائم", "ACWDT": "آسٹریلین سنٹرل ویسٹرن ڈے لائٹ ٹائم", "HKST": "ہانگ کانگ سمر ٹائم", "MEZ": "وسطی یورپ کا معیاری وقت", "HEPM": "سینٹ پیئر اور مکلیئون ڈے لائٹ ٹائم", "CHAST": "چیتھم اسٹینڈرڈ ٹائم", "CLST": "چلی سمر ٹائم", "EAT": "مشرقی افریقہ ٹائم", "COST": "کولمبیا سمر ٹائم", "UYT": "یوروگوئے سٹینڈرڈ ٹائم", "PST": "پیسفک اسٹینڈرڈ ٹائم", "WEZ": "مغربی یورپ کا معیاری وقت", "HNT": "نیو فاؤنڈ لینڈ اسٹینڈرڈ ٹائم", "ACST": "آسٹریلین سنٹرل اسٹینڈرڈ ٹائم", "WART": "مغربی ارجنٹینا سٹینڈرڈ ٹائم", "HNNOMX": "شمال مغربی میکسیکو اسٹینڈرڈ ٹائم", "HENOMX": "شمال مغربی میکسیکو ڈے لائٹ ٹائم", "HECU": "کیوبا ڈے لائٹ ٹائم", "CLT": "چلی سٹینڈرڈ ٹائم", "GFT": "فرینچ گیانا ٹائم", "WARST": "مغربی ارجنٹینا سمر ٹائم", "HNPMX": "میکسیکن پیسفک اسٹینڈرڈ ٹائم", "AKDT": "الاسکا ڈے لائٹ ٹائم", "SRT": "سورینام ٹائم", "SAST": "جنوبی افریقہ سٹینڈرڈ ٹائم", "LHST": "لارڈ ہووے اسٹینڈرڈ ٹائم", "HNEG": "مشرقی گرین لینڈ اسٹینڈرڈ ٹائم", "∅∅∅": "پیرو سمر ٹائم", "CAT": "وسطی افریقہ ٹائم", "CST": "سنٹرل اسٹینڈرڈ ٹائم", "HNPM": "سینٹ پیئر اور مکلیئون اسٹینڈرڈ ٹائم", "MESZ": "وسطی یورپ کا موسم گرما کا وقت", "ECT": "ایکواڈور ٹائم", "COT": "کولمبیا سٹینڈرڈ ٹائم", "HAT": "نیو فاؤنڈ لینڈ ڈے لائٹ ٹائم", "TMST": "ترکمانستان سمر ٹائم", "CHADT": "چیتھم ڈے لائٹ ٹائم", "WAT": "مغربی افریقہ سٹینڈرڈ ٹائم", "OEZ": "مشرقی یورپ کا معیاری وقت", "HNCU": "کیوبا اسٹینڈرڈ ٹائم", "HAST": "ہوائی الیوٹیئن اسٹینڈرڈ ٹائم", "VET": "وینزوئیلا ٹائم", "LHDT": "لارڈ ہووے ڈے لائٹ ٹائم", "EST": "ایسٹرن اسٹینڈرڈ ٹائم", "MYT": "ملیشیا ٹائم", "BT": "بھوٹان ٹائم", "PDT": "پیسفک ڈے لائٹ ٹائم", "AEST": "آسٹریلین ایسٹرن اسٹینڈرڈ ٹائم", "HEEG": "مشرقی گرین لینڈ کا موسم گرما کا وقت", "MST": "MST", "GYT": "گیانا ٹائم", "AEDT": "آسٹریلین ایسٹرن ڈے لائٹ ٹائم", "AWST": "آسٹریلیا ویسٹرن اسٹینڈرڈ ٹائم", "WITA": "وسطی انڈونیشیا ٹائم", "MDT": "MDT", "WIT": "مشرقی انڈونیشیا ٹائم", "HKT": "ہانگ کانگ سٹینڈرڈ ٹائم", "BOT": "بولیویا ٹائم", "OESZ": "مشرقی یورپ کا موسم گرما کا وقت", "WESZ": "مغربی یورپ کا موسم گرما کا وقت", "IST": "انڈیا سٹینڈرڈ ٹائم", "JST": "جاپان سٹینڈرڈ ٹائم", "TMT": "ترکمانستان سٹینڈرڈ ٹائم", "EDT": "ایسٹرن ڈے لائٹ ٹائم", "WIB": "مغربی انڈونیشیا ٹائم", "NZST": "نیوزی لینڈ سٹینڈرڈ ٹائم"}, -+ timezones: map[string]string{"MEZ": "وسطی یورپ کا معیاری وقت", "ACST": "ACST", "WAST": "WAST", "AKST": "AKST", "EST": "EST", "ART": "ART", "SRT": "سورینام ٹائم", "ACWST": "ACWST", "EAT": "EAT", "WART": "مغربی ارجنٹینا سٹینڈرڈ ٹائم", "SAST": "SAST", "AEDT": "AEDT", "HEPMX": "HEPMX", "OEZ": "OEZ", "WIB": "WIB", "HNEG": "HNEG", "AWDT": "AWDT", "WIT": "WIT", "CLT": "چلی سٹینڈرڈ ٹائم", "ARST": "ARST", "HECU": "HECU", "OESZ": "OESZ", "IST": "انڈیا سٹینڈرڈ ٹائم", "NZST": "نیوزی لینڈ سٹینڈرڈ ٹائم", "HENOMX": "HENOMX", "AWST": "AWST", "HNOG": "HNOG", "HKT": "HKT", "HKST": "HKST", "HADT": "HADT", "UYT": "یوروگوئے سٹینڈرڈ ٹائم", "HAT": "HAT", "PST": "PST", "PDT": "PDT", "BT": "بھوٹان ٹائم", "AEST": "AEST", "CHAST": "CHAST", "AST": "AST", "LHST": "LHST", "JDT": "JDT", "TMT": "ترکمانستان سٹینڈرڈ ٹائم", "TMST": "ترکمانستان سمر ٹائم", "HNPMX": "HNPMX", "AKDT": "AKDT", "HNT": "HNT", "MESZ": "وسطی یورپ کا موسم گرما کا وقت", "HEPM": "HEPM", "WEZ": "WEZ", "WESZ": "WESZ", "COT": "کولمبیا سٹینڈرڈ ٹائم", "ADT": "ADT", "ChST": "ChST", "HAST": "HAST", "ECT": "ایکواڈور ٹائم", "ACWDT": "ACWDT", "SGT": "SGT", "VET": "وینزوئیلا ٹائم", "BOT": "بولیویا ٹائم", "HNNOMX": "HNNOMX", "∅∅∅": "∅∅∅", "HNPM": "HNPM", "CHADT": "CHADT", "HNCU": "HNCU", "GFT": "فرینچ گیانا ٹائم", "WARST": "مغربی ارجنٹینا سمر ٹائم", "MST": "MST", "MDT": "MDT", "GMT": "گرین وچ مین ٹائم", "GYT": "گیانا ٹائم", "HEEG": "HEEG", "WAT": "WAT", "COST": "کولمبیا سمر ٹائم", "HEOG": "HEOG", "EDT": "EDT", "WITA": "WITA", "CDT": "CDT", "ACDT": "ACDT", "CAT": "CAT", "CLST": "چلی سمر ٹائم", "JST": "JST", "UYST": "یوروگوئے سمر ٹائم", "NZDT": "نیوزی لینڈ ڈے لائٹ ٹائم", "LHDT": "LHDT", "MYT": "MYT", "CST": "CST"}, - } - } -  -@@ -125,7 +109,7 @@ func (ur *ur_IN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ur *ur_IN) MonthsAbbreviated() []string { -- return ur.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -135,7 +119,7 @@ func (ur *ur_IN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ur *ur_IN) MonthsNarrow() []string { -- return ur.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -145,7 +129,7 @@ func (ur *ur_IN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ur *ur_IN) MonthsWide() []string { -- return ur.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -191,77 +175,13 @@ func (ur *ur_IN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ur_IN' and handles both Whole and Real numbers based on 'v' - func (ur *ur_IN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ur_IN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ur *ur_IN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ur.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ur.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ur_IN' -@@ -269,7 +189,7 @@ func (ur *ur_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ur.currencies[currency] -- l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - inSecondary := false -@@ -312,9 +232,7 @@ func (ur *ur_IN) FmtCurrency(num float64, v uint64, currency currency.Type) stri - } -  - if num < 0 { -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -+ b = append(b, ur.minus[0]) - } -  - // reverse -@@ -342,7 +260,7 @@ func (ur *ur_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ur.currencies[currency] -- l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - inSecondary := false -@@ -386,9 +304,7 @@ func (ur *ur_IN) FmtAccounting(num float64, v uint64, currency currency.Type) st - b = append(b, ur.currencyNegativePrefix[j]) - } -  -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -+ b = append(b, ur.minus[0]) -  - } else { -  -@@ -426,17 +342,6 @@ func (ur *ur_IN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -445,17 +350,6 @@ func (ur *ur_IN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ur.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -464,17 +358,6 @@ func (ur *ur_IN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ur.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -483,19 +366,6 @@ func (ur *ur_IN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ur.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ur.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -504,28 +374,6 @@ func (ur *ur_IN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -534,35 +382,6 @@ func (ur *ur_IN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -571,40 +390,6 @@ func (ur *ur_IN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -613,44 +398,5 @@ func (ur *ur_IN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ur.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/ur_PK/ur_PK.go b/ur_PK/ur_PK.go -index 4d1c371..c4955ea 100644 ---- a/ur_PK/ur_PK.go -+++ b/ur_PK/ur_PK.go -@@ -42,32 +42,13 @@ type ur_PK struct { - // New returns a new instance of translator for the 'ur_PK' locale - func New() locales.Translator { - return &ur_PK{ -- locale: "ur_PK", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "‎-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "جنوری", "فروری", "مارچ", "اپریل", "مئی", "جون", "جولائی", "اگست", "ستمبر", "اکتوبر", "نومبر", "دسمبر"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "جنوری", "فروری", "مارچ", "اپریل", "مئی", "جون", "جولائی", "اگست", "ستمبر", "اکتوبر", "نومبر", "دسمبر"}, -- daysAbbreviated: []string{"اتوار", "سوموار", "منگل", "بدھ", "جمعرات", "جمعہ", "ہفتہ"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"اتوار", "سوموار", "منگل", "بدھ", "جمعرات", "جمعہ", "ہفتہ"}, -- daysWide: []string{"اتوار", "سوموار", "منگل", "بدھ", "جمعرات", "جمعہ", "ہفتہ"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"قبل مسیح", "عیسوی"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"قبل مسیح", "عیسوی"}, -- timezones: map[string]string{"EAT": "مشرقی افریقہ ٹائم", "WART": "مغربی ارجنٹینا کا معیاری وقت", "HNCU": "کیوبا اسٹینڈرڈ ٹائم", "ARST": "ارجنٹینا سمر ٹائم", "AWDT": "آسٹریلین ویسٹرن ڈے لائٹ ٹائم", "JST": "جاپان سٹینڈرڈ ٹائم", "HEEG": "مشرقی گرین لینڈ کا موسم گرما کا وقت", "ACWST": "آسٹریلین سنٹرل ویسٹرن اسٹینڈرڈ ٹائم", "HAST": "ہوائی الیوٹیئن اسٹینڈرڈ ٹائم", "AEST": "آسٹریلین ایسٹرن اسٹینڈرڈ ٹائم", "TMST": "ترکمانستان کا موسم گرما کا وقت", "SGT": "سنگاپور سٹینڈرڈ ٹائم", "EDT": "ایسٹرن ڈے لائٹ ٹائم", "CDT": "سنٹرل ڈے لائٹ ٹائم", "HEPM": "سینٹ پیئر اور مکلیئون ڈے لائٹ ٹائم", "IST": "ہندوستان کا معیاری وقت", "ChST": "چامورو سٹینڈرڈ ٹائم", "HECU": "کیوبا ڈے لائٹ ٹائم", "∅∅∅": "امیزون کا موسم گرما کا وقت", "JDT": "جاپان ڈے لائٹ ٹائم", "HNEG": "مشرقی گرین لینڈ اسٹینڈرڈ ٹائم", "HENOMX": "شمال مغربی میکسیکو ڈے لائٹ ٹائم", "ACWDT": "آسٹریلین سنٹرل ویسٹرن ڈے لائٹ ٹائم", "HAT": "نیو فاؤنڈ لینڈ ڈے لائٹ ٹائم", "PST": "پیسفک اسٹینڈرڈ ٹائم", "WITA": "وسطی انڈونیشیا ٹائم", "MYT": "ملیشیا ٹائم", "UYST": "یوروگوئے کا موسم گرما کا وقت", "WIB": "مغربی انڈونیشیا ٹائم", "TMT": "ترکمانستان کا معیاری وقت", "MST": "MST", "HADT": "ہوائی الیوٹیئن ڈے لائٹ ٹائم", "AWST": "آسٹریلیا ویسٹرن اسٹینڈرڈ ٹائم", "ACST": "آسٹریلین سنٹرل اسٹینڈرڈ ٹائم", "OEZ": "مشرقی یورپ کا معیاری وقت", "AST": "اٹلانٹک اسٹینڈرڈ ٹائم", "HNNOMX": "شمال مغربی میکسیکو اسٹینڈرڈ ٹائم", "AKDT": "الاسکا ڈے لائٹ ٹائم", "VET": "وینزوئیلا کا وقت", "HEOG": "مغربی گرین لینڈ کا موسم گرما کا وقت", "HKT": "ہانگ کانگ سٹینڈرڈ ٹائم", "AEDT": "آسٹریلین ایسٹرن ڈے لائٹ ٹائم", "CHAST": "چیتھم اسٹینڈرڈ ٹائم", "HNPM": "سینٹ پیئر اور مکلیئون اسٹینڈرڈ ٹائم", "CHADT": "چیتھم ڈے لائٹ ٹائم", "MEZ": "وسطی یورپ کا معیاری وقت", "SAST": "جنوبی افریقہ سٹینڈرڈ ٹائم", "UYT": "یوروگوئے کا معیاری وقت", "GFT": "فرینچ گیانا کا وقت", "ACDT": "آسٹریلین سنٹرل ڈے لائٹ ٹائم", "HNPMX": "میکسیکن پیسفک اسٹینڈرڈ ٹائم", "EST": "ایسٹرن اسٹینڈرڈ ٹائم", "CLST": "چلی کا موسم گرما کا وقت", "COT": "کولمبیا کا معیاری وقت", "CST": "سنٹرل اسٹینڈرڈ ٹائم", "PDT": "پیسفک ڈے لائٹ ٹائم", "NZDT": "نیوزی لینڈ ڈے لائٹ ٹائم", "MESZ": "وسطی یورپ کا موسم گرما کا وقت", "LHDT": "لارڈ ہووے ڈے لائٹ ٹائم", "WIT": "مشرقی انڈونیشیا ٹائم", "HKST": "ہانگ کانگ سمر ٹائم", "BOT": "بولیویا کا وقت", "WAT": "مغربی افریقہ سٹینڈرڈ ٹائم", "WAST": "مغربی افریقہ سمر ٹائم", "CLT": "چلی کا معیاری وقت", "ECT": "ایکواڈور کا وقت", "HEPMX": "میکسیکن پیسفک ڈے لائٹ ٹائم", "SRT": "سورینام کا وقت", "ART": "ارجنٹینا سٹینڈرڈ ٹائم", "WESZ": "مغربی یورپ کا موسم گرما کا وقت", "NZST": "نیوزی لینڈ کا معیاری وقت", "LHST": "لارڈ ہووے اسٹینڈرڈ ٹائم", "WARST": "مغربی ارجنٹینا کا موسم گرما کا وقت", "ADT": "اٹلانٹک ڈے لائٹ ٹائم", "GYT": "گیانا کا وقت", "BT": "بھوٹان کا وقت", "HNT": "نیو فاؤنڈ لینڈ اسٹینڈرڈ ٹائم", "HNOG": "مغربی گرین لینڈ اسٹینڈرڈ ٹائم", "WEZ": "مغربی یورپ کا معیاری وقت", "MDT": "MDT", "AKST": "الاسکا اسٹینڈرڈ ٹائم", "OESZ": "مشرقی یورپ کا موسم گرما کا وقت", "CAT": "وسطی افریقہ ٹائم", "COST": "کولمبیا کا موسم گرما کا وقت", "GMT": "گرین وچ کا اصل وقت"}, -+ locale: "ur_PK", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNPMX": "HNPMX", "HEPMX": "HEPMX", "WARST": "WARST", "TMT": "TMT", "CLT": "CLT", "HAST": "HAST", "CHAST": "CHAST", "IST": "IST", "HECU": "HECU", "∅∅∅": "∅∅∅", "WITA": "WITA", "WIB": "WIB", "GMT": "GMT", "MEZ": "MEZ", "ACWST": "ACWST", "HNCU": "HNCU", "COT": "COT", "HNOG": "HNOG", "ChST": "ChST", "ACDT": "ACDT", "WEZ": "WEZ", "WAT": "WAT", "OESZ": "OESZ", "EAT": "EAT", "CHADT": "CHADT", "WART": "WART", "NZDT": "NZDT", "HEPM": "HEPM", "ACWDT": "ACWDT", "CLST": "CLST", "LHDT": "LHDT", "AEDT": "AEDT", "VET": "VET", "CST": "CST", "MYT": "MYT", "JDT": "JDT", "BT": "BT", "HNT": "HNT", "AST": "AST", "HNPM": "HNPM", "SGT": "SGT", "ACST": "ACST", "HNEG": "HNEG", "AKST": "AKST", "GFT": "GFT", "TMST": "TMST", "MDT": "MDT", "AWST": "AWST", "AEST": "AEST", "WESZ": "WESZ", "GYT": "GYT", "HKT": "HKT", "HKST": "HKST", "EDT": "EDT", "UYT": "UYT", "WAST": "WAST", "NZST": "NZST", "HEEG": "HEEG", "JST": "JST", "PST": "PST", "PDT": "PDT", "HAT": "HAT", "ECT": "ECT", "ADT": "ADT", "AWDT": "AWDT", "CDT": "CDT", "HADT": "HADT", "HENOMX": "HENOMX", "MESZ": "MESZ", "UYST": "UYST", "COST": "COST", "HEOG": "HEOG", "CAT": "CAT", "HNNOMX": "HNNOMX", "BOT": "BOT", "SRT": "SRT", "LHST": "LHST", "WIT": "WIT", "EST": "EST", "MST": "MST", "ART": "ART", "AKDT": "AKDT", "OEZ": "OEZ", "SAST": "SAST", "ARST": "ARST"}, - } - } -  -@@ -121,7 +102,7 @@ func (ur *ur_PK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (ur *ur_PK) MonthsAbbreviated() []string { -- return ur.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -131,7 +112,7 @@ func (ur *ur_PK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (ur *ur_PK) MonthsNarrow() []string { -- return ur.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -141,7 +122,7 @@ func (ur *ur_PK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (ur *ur_PK) MonthsWide() []string { -- return ur.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -187,77 +168,13 @@ func (ur *ur_PK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'ur_PK' and handles both Whole and Real numbers based on 'v' - func (ur *ur_PK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'ur_PK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (ur *ur_PK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 6 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ur.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, ur.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ur_PK' -@@ -265,58 +182,7 @@ func (ur *ur_PK) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ur.currencies[currency] -- l := len(s) + len(symbol) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ur.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ur_PK' -@@ -325,66 +191,7 @@ func (ur *ur_PK) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := ur.currencies[currency] -- l := len(s) + len(symbol) + 5 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, ur.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, ur.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(ur.minus) - 1; j >= 0; j-- { -- b = append(b, ur.minus[j]) -- } -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, ur.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'ur_PK' -@@ -392,17 +199,6 @@ func (ur *ur_PK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -411,17 +207,6 @@ func (ur *ur_PK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, ur.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -430,17 +215,6 @@ func (ur *ur_PK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ur.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -449,19 +223,6 @@ func (ur *ur_PK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, ur.daysWide[t.Weekday()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, ur.monthsWide[t.Month()]...) -- b = append(b, []byte{0xd8, 0x8c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,28 +231,6 @@ func (ur *ur_PK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -500,35 +239,6 @@ func (ur *ur_PK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -537,40 +247,6 @@ func (ur *ur_PK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -579,44 +255,5 @@ func (ur *ur_PK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, ur.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, ur.periodsAbbreviated[0]...) -- } else { -- b = append(b, ur.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := ur.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/uz/uz.go b/uz/uz.go -index c679072..b9c9d8c 100644 ---- a/uz/uz.go -+++ b/uz/uz.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"m.a.", "milodiy"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"HAST": "Gavayi-aleut standart vaqti", "PST": "Tinch okeani standart vaqti", "CHAST": "Chatem standart vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "AKST": "Alyaska standart vaqti", "AEST": "Sharqiy Avstraliya standart vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "TMT": "Turkmaniston standart vaqti", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "GYT": "Gayana vaqti", "UYT": "Urugvay standart vaqti", "MST": "Tog‘ standart vaqti (AQSH)", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "BOT": "Boliviya vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "JDT": "Yaponiya yozgi vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "PDT": "Tinch okeani yozgi vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "ECT": "Ekvador vaqti", "AST": "Atlantika standart vaqti", "SRT": "Surinam vaqti", "HNT": "Nyufaundlend standart vaqti", "SAST": "Janubiy Afrika standart vaqti", "JST": "Yaponiya standart vaqti", "GFT": "Fransuz Gvianasi vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "WAT": "Gʻarbiy Afrika standart vaqti", "EST": "Sharqiy Amerika standart vaqti", "VET": "Venesuela vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "SGT": "Singapur vaqti", "AKDT": "Alyaska yozgi vaqti", "WEZ": "G‘arbiy Yevropa standart vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "ChST": "Chamorro standart vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "MYT": "Malayziya vaqti", "ART": "Argentina standart vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "WAST": "Gʻarbiy Afrika yozgi vaqti", "CST": "Markaziy Amerika standart vaqti", "CDT": "Markaziy Amerika yozgi vaqti", "BT": "Butan vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "IST": "Hindiston vaqti", "CAT": "Markaziy Afrika vaqti", "COT": "Kolumbiya standart vaqti", "EAT": "Sharqiy Afrika vaqti", "COST": "Kolumbiya yozgi vaqti", "HECU": "Kuba yozgi vaqti", "AWST": "G‘arbiy Avstraliya standart vaqti", "UYST": "Urugvay yozgi vaqti", "CHADT": "Chatem yozgi vaqti", "LHST": "Lord-Xau standart vaqti", "NZST": "Yangi Zelandiya standart vaqti", "TMST": "Turkmaniston yozgi vaqti", "HNCU": "Kuba standart vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "ADT": "Atlantika yozgi vaqti", "WIT": "Sharqiy Indoneziya vaqti", "HKT": "Gonkong standart vaqti", "LHDT": "Lord-Xau yozgi vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "GMT": "Grinvich o‘rtacha vaqti", "WIB": "Gʻarbiy Indoneziya vaqti", "HAT": "Nyufaundlend yozgi vaqti", "WITA": "Markaziy Indoneziya vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "CLT": "Chili standart vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "MDT": "Tog‘ yozgi vaqti (AQSH)", "HADT": "Gavayi-aleut yozgi vaqti", "ARST": "Argentina yozgi vaqti", "HKST": "Gonkong yozgi vaqti", "CLST": "Chili yozgi vaqti", "∅∅∅": "Amazonka yozgi vaqti"}, -+ timezones: map[string]string{"WAST": "Gʻarbiy Afrika yozgi vaqti", "IST": "Hindiston vaqti", "PDT": "Tinch okeani yozgi vaqti", "UYST": "Urugvay yozgi vaqti", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "HKST": "Gonkong yozgi vaqti", "MST": "MST", "WIB": "Gʻarbiy Indoneziya vaqti", "BT": "Butan vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "SGT": "Singapur vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "HAT": "Nyufaundlend yozgi vaqti", "SAST": "Janubiy Afrika standart vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "GMT": "Grinvich o‘rtacha vaqti", "JST": "Yaponiya standart vaqti", "PST": "Tinch okeani standart vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "HNT": "Nyufaundlend standart vaqti", "CAT": "Markaziy Afrika vaqti", "NZST": "Yangi Zelandiya standart vaqti", "BOT": "Boliviya vaqti", "SRT": "Surinam vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "MDT": "MDT", "MYT": "Malayziya vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "AKDT": "Alyaska yozgi vaqti", "GYT": "Gayana vaqti", "TMST": "Turkmaniston yozgi vaqti", "CLST": "Chili yozgi vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "∅∅∅": "Braziliya yozgi vaqti", "HKT": "Gonkong standart vaqti", "WITA": "Markaziy Indoneziya vaqti", "AST": "Atlantika standart vaqti", "ART": "Argentina standart vaqti", "EAT": "Sharqiy Afrika vaqti", "CHADT": "Chatem yozgi vaqti", "VET": "Venesuela vaqti", "HECU": "Kuba yozgi vaqti", "HNCU": "Kuba standart vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "ADT": "Atlantika yozgi vaqti", "HADT": "Gavayi-aleut yozgi vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "AWST": "G‘arbiy Avstraliya standart vaqti", "AEST": "Sharqiy Avstraliya standart vaqti", "UYT": "Urugvay standart vaqti", "WIT": "Sharqiy Indoneziya vaqti", "CLT": "Chili standart vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "HAST": "Gavayi-aleut standart vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "CDT": "Markaziy Amerika yozgi vaqti", "ECT": "Ekvador vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "LHST": "Lord-Xau standart vaqti", "JDT": "Yaponiya yozgi vaqti", "WAT": "Gʻarbiy Afrika standart vaqti", "COST": "Kolumbiya yozgi vaqti", "EST": "Sharqiy Amerika standart vaqti", "WEZ": "G‘arbiy Yevropa standart vaqti", "GFT": "Fransuz Gvianasi vaqti", "CST": "Markaziy Amerika standart vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "AKST": "Alyaska standart vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "COT": "Kolumbiya standart vaqti", "ARST": "Argentina yozgi vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "LHDT": "Lord-Xau yozgi vaqti", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "TMT": "Turkmaniston standart vaqti", "ChST": "Chamorro standart vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "CHAST": "Chatem standart vaqti"}, - } - } -  -diff --git a/uz_Arab/uz_Arab.go b/uz_Arab/uz_Arab.go -index 7c1fae2..a3f3954 100644 ---- a/uz_Arab/uz_Arab.go -+++ b/uz_Arab/uz_Arab.go -@@ -50,28 +50,19 @@ func New() locales.Translator { - pluralsRange: []locales.PluralRule{2, 6}, - decimal: "٫", - group: "٬", -- minus: "-", - percent: "٪", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "؋", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: " ", - currencyNegativeSuffix: " ", - monthsAbbreviated: []string{"", "جنو", "فبر", "مار", "اپر", "می", "جون", "جول", "اگس", "سپت", "اکت", "نوم", "دسم"}, -- monthsNarrow: []string{"", "Y", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, - monthsWide: []string{"", "جنوری", "فبروری", "مارچ", "اپریل", "می", "جون", "جولای", "اگست", "سپتمبر", "اکتوبر", "نومبر", "دسمبر"}, - daysAbbreviated: []string{"ی.", "د.", "س.", "چ.", "پ.", "ج.", "ش."}, -- daysNarrow: []string{"Y", "D", "S", "C", "P", "J", "S"}, -- daysShort: []string{"Ya", "Du", "Se", "Ch", "Pa", "Ju", "Sh"}, - daysWide: []string{"یکشنبه", "دوشنبه", "سه\u200cشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"}, -- periodsAbbreviated: []string{"TO", "TK"}, -- periodsNarrow: []string{"TO", "TK"}, -- periodsWide: []string{"TO", "TK"}, - erasAbbreviated: []string{"ق.م.", "م."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"IST": "Hindiston vaqti", "SAST": "Janubiy Afrika standart vaqti", "CLT": "Chili standart vaqti", "HNCU": "Kuba standart vaqti", "LHDT": "Lord-Xau yozgi vaqti", "CHAST": "Chatem standart vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "ART": "Argentina standart vaqti", "AWST": "G‘arbiy Avstraliya standart vaqti", "MST": "MST", "HAST": "Gavayi-aleut standart vaqti", "SRT": "Surinam vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "CDT": "Markaziy Amerika yozgi vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "HECU": "Kuba yozgi vaqti", "MDT": "MDT", "ARST": "Argentina yozgi vaqti", "TMST": "Turkmaniston yozgi vaqti", "WAST": "Gʻarbiy Afrika yozgi vaqti", "AST": "Atlantika standart vaqti", "HKT": "Gonkong standart vaqti", "AKST": "Alyaska standart vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "AEST": "Sharqiy Avstraliya standart vaqti", "WAT": "Gʻarbiy Afrika standart vaqti", "HNT": "Nyufaundlend standart vaqti", "BOT": "Boliviya vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "TMT": "Turkmaniston standart vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "JST": "Yaponiya standart vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "VET": "Venesuela vaqti", "HKST": "Gonkong yozgi vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "CHADT": "Chatem yozgi vaqti", "GMT": "Grinvich o‘rtacha vaqti", "CST": "Markaziy Amerika standart vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "AKDT": "Alyaska yozgi vaqti", "PDT": "Tinch okeani yozgi vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "CLST": "Chili yozgi vaqti", "EAT": "Sharqiy Afrika vaqti", "MYT": "Malayziya vaqti", "PST": "Tinch okeani standart vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "WITA": "Markaziy Indoneziya vaqti", "COST": "Kolumbiya yozgi vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "UYT": "Urugvay standart vaqti", "UYST": "Urugvay yozgi vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "EST": "Sharqiy Amerika standart vaqti", "ADT": "Atlantika yozgi vaqti", "GYT": "Gayana vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "ChST": "Chamorro standart vaqti", "ECT": "Ekvador vaqti", "COT": "Kolumbiya standart vaqti", "GFT": "Fransuz Gvianasi vaqti", "BT": "Butan vaqti", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "HADT": "Gavayi-aleut yozgi vaqti", "WEZ": "G‘arbiy Yevropa standart vaqti", "LHST": "Lord-Xau standart vaqti", "NZST": "Yangi Zelandiya standart vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "SGT": "Singapur vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "JDT": "Yaponiya yozgi vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "HAT": "Nyufaundlend yozgi vaqti", "WIT": "Sharqiy Indoneziya vaqti", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "∅∅∅": "Amazonka yozgi vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "CAT": "Markaziy Afrika vaqti", "WIB": "Gʻarbiy Indoneziya vaqti"}, -+ timezones: map[string]string{"AEST": "AEST", "CHAST": "CHAST", "IST": "IST", "COT": "COT", "CLST": "CLST", "HNPM": "HNPM", "WESZ": "WESZ", "AKDT": "AKDT", "CLT": "CLT", "ChST": "ChST", "JDT": "JDT", "AEDT": "AEDT", "UYST": "UYST", "HAT": "HAT", "COST": "COST", "WAST": "WAST", "SAST": "SAST", "TMST": "TMST", "HADT": "HADT", "WARST": "WARST", "TMT": "TMT", "SRT": "SRT", "HEPM": "HEPM", "MEZ": "MEZ", "OESZ": "OESZ", "EST": "EST", "CDT": "CDT", "MDT": "MDT", "BOT": "BOT", "EAT": "EAT", "HECU": "HECU", "OEZ": "OEZ", "HKT": "HKT", "WIB": "WIB", "ADT": "ADT", "AWDT": "AWDT", "CHADT": "CHADT", "EDT": "EDT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HEPMX": "HEPMX", "HKST": "HKST", "ACST": "ACST", "JST": "JST", "MYT": "MYT", "HNCU": "HNCU", "SGT": "SGT", "WAT": "WAT", "WART": "WART", "HEOG": "HEOG", "CAT": "CAT", "PST": "PST", "AKST": "AKST", "MESZ": "MESZ", "UYT": "UYT", "HNPMX": "HNPMX", "VET": "VET", "MST": "MST", "GMT": "GMT", "HNEG": "HNEG", "ACDT": "ACDT", "LHST": "LHST", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "PDT": "PDT", "HNT": "HNT", "HNOG": "HNOG", "CST": "CST", "LHDT": "LHDT", "AWST": "AWST", "ACWST": "ACWST", "WEZ": "WEZ", "GFT": "GFT", "WITA": "WITA", "AST": "AST", "HEEG": "HEEG", "HAST": "HAST", "WIT": "WIT", "GYT": "GYT", "ECT": "ECT", "NZST": "NZST", "ART": "ART", "ARST": "ARST", "BT": "BT", "NZDT": "NZDT"}, - } - } -  -@@ -145,7 +136,7 @@ func (uz *uz_Arab) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (uz *uz_Arab) MonthsNarrow() []string { -- return uz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -201,79 +192,13 @@ func (uz *uz_Arab) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'uz_Arab' and handles both Whole and Real numbers based on 'v' - func (uz *uz_Arab) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(uz.decimal) - 1; j >= 0; j-- { -- b = append(b, uz.decimal[j]) -- } -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'uz_Arab' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (uz *uz_Arab) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- for j := len(uz.decimal) - 1; j >= 0; j-- { -- b = append(b, uz.decimal[j]) -- } -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, uz.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Arab' -@@ -281,7 +206,7 @@ func (uz *uz_Arab) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -@@ -343,7 +268,7 @@ func (uz *uz_Arab) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -+ l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 - count := 0 - inWhole := v == 0 - b := make([]byte, 0, l) -diff --git a/uz_Arab_AF/uz_Arab_AF.go b/uz_Arab_AF/uz_Arab_AF.go -index 88a96d7..e97c36d 100644 ---- a/uz_Arab_AF/uz_Arab_AF.go -+++ b/uz_Arab_AF/uz_Arab_AF.go -@@ -10,68 +10,45 @@ import ( - ) -  - type uz_Arab_AF struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'uz_Arab_AF' locale - func New() locales.Translator { - return &uz_Arab_AF{ -- locale: "uz_Arab_AF", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avg", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "Y", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avgust", "sentabr", "oktabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"Yak", "Dush", "Sesh", "Chor", "Pay", "Jum", "Shan"}, -- daysNarrow: []string{"Y", "D", "S", "C", "P", "J", "S"}, -- daysShort: []string{"Ya", "Du", "Se", "Ch", "Pa", "Ju", "Sh"}, -- daysWide: []string{"yakshanba", "dushanba", "seshanba", "chorshanba", "payshanba", "juma", "shanba"}, -- periodsAbbreviated: []string{"TO", "TK"}, -- periodsNarrow: []string{"TO", "TK"}, -- periodsWide: []string{"TO", "TK"}, -- erasAbbreviated: []string{"m.a.", "milodiy"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CLT": "Chili standart vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "PST": "Tinch okeani standart vaqti", "ARST": "Argentina yozgi vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "HADT": "Gavayi-aleut yozgi vaqti", "HAT": "Nyufaundlend yozgi vaqti", "ART": "Argentina standart vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "WAST": "Gʻarbiy Afrika yozgi vaqti", "MST": "MST", "WIB": "Gʻarbiy Indoneziya vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "COT": "Kolumbiya standart vaqti", "UYST": "Urugvay yozgi vaqti", "HNT": "Nyufaundlend standart vaqti", "NZST": "Yangi Zelandiya standart vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "COST": "Kolumbiya yozgi vaqti", "AKDT": "Alyaska yozgi vaqti", "BT": "Butan vaqti", "CLST": "Chili yozgi vaqti", "WAT": "Gʻarbiy Afrika standart vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "MYT": "Malayziya vaqti", "JDT": "Yaponiya yozgi vaqti", "TMT": "Turkmaniston standart vaqti", "BOT": "Boliviya vaqti", "GFT": "Fransuz Gvianasi vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "MDT": "MDT", "WEZ": "G‘arbiy Yevropa standart vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "LHDT": "Lord-Xau yozgi vaqti", "CHADT": "Chatem yozgi vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "GYT": "Gayana vaqti", "VET": "Venesuela vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "SAST": "Janubiy Afrika standart vaqti", "ChST": "Chamorro standart vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "HNCU": "Kuba standart vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "JST": "Yaponiya standart vaqti", "HKST": "Gonkong yozgi vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "AKST": "Alyaska standart vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "TMST": "Turkmaniston yozgi vaqti", "HECU": "Kuba yozgi vaqti", "EST": "Sharqiy Amerika standart vaqti", "UYT": "Urugvay standart vaqti", "CST": "Markaziy Amerika standart vaqti", "ADT": "Atlantika yozgi vaqti", "∅∅∅": "Amazonka yozgi vaqti", "EAT": "Sharqiy Afrika vaqti", "GMT": "Grinvich o‘rtacha vaqti", "WIT": "Sharqiy Indoneziya vaqti", "AWST": "G‘arbiy Avstraliya standart vaqti", "IST": "Hindiston vaqti", "WITA": "Markaziy Indoneziya vaqti", "ECT": "Ekvador vaqti", "SGT": "Singapur vaqti", "AST": "Atlantika standart vaqti", "PDT": "Tinch okeani yozgi vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "HKT": "Gonkong standart vaqti", "CAT": "Markaziy Afrika vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "AEST": "Sharqiy Avstraliya standart vaqti", "LHST": "Lord-Xau standart vaqti", "HAST": "Gavayi-aleut standart vaqti", "SRT": "Surinam vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "CHAST": "Chatem standart vaqti", "CDT": "Markaziy Amerika yozgi vaqti"}, -+ locale: "uz_Arab_AF", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WART": "WART", "ART": "ART", "MDT": "MDT", "HENOMX": "HENOMX", "WEZ": "WEZ", "HNCU": "HNCU", "WIB": "WIB", "IST": "IST", "CLT": "CLT", "WITA": "WITA", "GMT": "GMT", "SGT": "SGT", "WESZ": "WESZ", "AKST": "AKST", "COST": "COST", "PDT": "PDT", "ACWST": "ACWST", "ACST": "ACST", "LHDT": "LHDT", "HNPM": "HNPM", "CHADT": "CHADT", "OESZ": "OESZ", "GYT": "GYT", "HEOG": "HEOG", "ChST": "ChST", "HEPMX": "HEPMX", "LHST": "LHST", "HEPM": "HEPM", "WAT": "WAT", "AKDT": "AKDT", "HAT": "HAT", "HKST": "HKST", "SRT": "SRT", "HNEG": "HNEG", "UYT": "UYT", "UYST": "UYST", "WAST": "WAST", "OEZ": "OEZ", "WARST": "WARST", "ADT": "ADT", "AWDT": "AWDT", "JST": "JST", "WIT": "WIT", "CAT": "CAT", "NZDT": "NZDT", "AST": "AST", "TMST": "TMST", "CLST": "CLST", "HAST": "HAST", "MYT": "MYT", "GFT": "GFT", "SAST": "SAST", "COT": "COT", "EDT": "EDT", "PST": "PST", "VET": "VET", "HNPMX": "HNPMX", "HADT": "HADT", "HEEG": "HEEG", "AWST": "AWST", "HECU": "HECU", "HNT": "HNT", "HKT": "HKT", "TMT": "TMT", "MST": "MST", "BT": "BT", "EST": "EST", "CST": "CST", "CDT": "CDT", "CHAST": "CHAST", "AEST": "AEST", "ACDT": "ACDT", "HNOG": "HNOG", "ECT": "ECT", "MEZ": "MEZ", "MESZ": "MESZ", "EAT": "EAT", "HNNOMX": "HNNOMX", "JDT": "JDT", "ACWDT": "ACWDT", "∅∅∅": "∅∅∅", "NZST": "NZST", "ARST": "ARST", "BOT": "BOT", "AEDT": "AEDT"}, - } - } -  -@@ -135,7 +112,7 @@ func (uz *uz_Arab_AF) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (uz *uz_Arab_AF) MonthsAbbreviated() []string { -- return uz.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (uz *uz_Arab_AF) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (uz *uz_Arab_AF) MonthsNarrow() []string { -- return uz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (uz *uz_Arab_AF) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (uz *uz_Arab_AF) MonthsWide() []string { -- return uz.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,75 +178,13 @@ func (uz *uz_Arab_AF) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'uz_Arab_AF' and handles both Whole and Real numbers based on 'v' - func (uz *uz_Arab_AF) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'uz_Arab_AF' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (uz *uz_Arab_AF) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, uz.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Arab_AF' -@@ -277,58 +192,7 @@ func (uz *uz_Arab_AF) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, uz.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Arab_AF' -@@ -337,65 +201,7 @@ func (uz *uz_Arab_AF) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, uz.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, uz.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, uz.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'uz_Arab_AF' -@@ -403,27 +209,6 @@ func (uz *uz_Arab_AF) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -432,17 +217,6 @@ func (uz *uz_Arab_AF) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +225,6 @@ func (uz *uz_Arab_AF) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +233,6 @@ func (uz *uz_Arab_AF) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, uz.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +241,6 @@ func (uz *uz_Arab_AF) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +249,6 @@ func (uz *uz_Arab_AF) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,28 +257,6 @@ func (uz *uz_Arab_AF) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -570,32 +265,5 @@ func (uz *uz_Arab_AF) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := uz.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/uz_Cyrl/uz_Cyrl.go b/uz_Cyrl/uz_Cyrl.go -index fcec1bb..9ba2f1d 100644 ---- a/uz_Cyrl/uz_Cyrl.go -+++ b/uz_Cyrl/uz_Cyrl.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"BOT": "Боливия вақти", "WARST": "Ғарбий Аргентина ёзги вақти", "HNPM": "Сент-Пьер ва Микелон стандарт вақти", "MESZ": "Марказий Европа ёзги вақти", "NZDT": "Янги Зеландия кундузги вақти", "CHAST": "Чатхам стандарт вақти", "WAT": "Ғарбий Африка стандарт вақти", "ADT": "Атлантика кундузги вақти", "AWST": "Ғарбий Австралия стандарт вақти", "HNCU": "Куба стандарт вақти", "MST": "MST", "HNPMX": "Meksika Tinch okeani standart vaqti", "WIT": "Шарқий Индонезия вақти", "BT": "Бутан вақти", "WEZ": "Ғарбий Европа стандарт вақти", "HNT": "Ньюфаундленд стандарт вақти", "HEOG": "Ғарбий Гренландия ёзги вақти", "AEST": "Шарқий Австралия стандарт вақти", "JST": "Япония стандарт вақти", "TMST": "Туркманистон ёзги вақти", "SGT": "Сингапур вақти", "HECU": "Куба кундузги вақти", "CST": "Шимолий Америка марказий стандарт вақти", "ACWDT": "Марказий Австралия Ғарбий кундузги вақти", "CLST": "Чили ёзги вақти", "WART": "Ғарбий Аргентина стандарт вақти", "GMT": "Гринвич вақти", "WIB": "Ғарбий Индонезия вақти", "TMT": "Туркманистон стандарт вақти", "GYT": "Гайана вақти", "SRT": "Суринам вақти", "PST": "Шимолий Америка тинч океани стандарт вақти", "PDT": "Шимолий Америка тинч океани кундузги вақти", "ACST": "Марказий Австралия стандарт вақти", "ECT": "Эквадор вақти", "COST": "Колумбия ёзги вақти", "HADT": "Гавайи-алеут кундузги вақти", "HAT": "Ньюфаундленд кундузги вақти", "GFT": "Француз Гвианаси вақти", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "AST": "Атлантика стандарт вақти", "UYST": "Уругвай ёзги вақти", "HKT": "Гонконг стандарт вақти", "HEPM": "Сент-Пьер ва Микелон кундузги вақти", "IST": "Ҳиндистон вақти", "CLT": "Чили стандарт вақти", "JDT": "Япония кундузги вақти", "OESZ": "Шарқий Европа ёзги вақти", "EDT": "Шимолий Америка шарқий кундузги вақти", "ACWST": "Марказий Австралия Ғарбий стандарт вақти", "ARST": "Аргентина ёзги вақти", "WITA": "Марказий Индонезия вақти", "NZST": "Янги Зеландия стандарт вақти", "ChST": "Каморро вақти", "HNEG": "Шарқий Гренландия стандарт вақти", "EST": "Шимолий Америка шарқий стандарт вақти", "AEDT": "Шарқий Австралия кундузги вақти", "MEZ": "Марказий Европа стандарт вақти", "LHST": "Лорд Хове стандарт вақти", "CHADT": "Чатхам кундузги вақти", "WAST": "Ғарбий Африка ёзги вақти", "∅∅∅": "Перу ёзги вақти", "COT": "Колумбия стандарт вақти", "HAST": "Гавайи-алеут стандарт вақти", "ART": "Аргентина стандарт вақти", "HKST": "Гонконг ёзги вақти", "HEEG": "Шарқий Гренландия ёзги вақти", "ACDT": "Марказий Австралия кундузги вақти", "EAT": "Шарқий Африка вақти", "OEZ": "Шарқий Европа стандарт вақти", "MDT": "MDT", "CDT": "Шимолий Америка марказий кундузги вақти", "VET": "Венесуэла вақти", "HNOG": "Ғарбий Гренландия стандарт вақти", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "AKST": "Аляска стандарт вақти", "CAT": "Марказий Африка вақти", "MYT": "Малайзия вақти", "UYT": "Уругвай стандарт вақти", "WESZ": "Ғарбий Европа ёзги вақти", "LHDT": "Лорд Хове кундузги вақти", "SAST": "Жанубий Африка вақти", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "AKDT": "Аляска кундузги вақти", "AWDT": "Ғарбий Австралия кундузги вақти"}, -+ timezones: map[string]string{"HNOG": "Ғарбий Гренландия стандарт вақти", "HKST": "Гонконг ёзги вақти", "CLT": "Чили стандарт вақти", "MDT": "MDT", "NZST": "Янги Зеландия стандарт вақти", "ChST": "Каморро вақти", "AEST": "Шарқий Австралия стандарт вақти", "COST": "Колумбия ёзги вақти", "EDT": "Шимолий Америка шарқий кундузги вақти", "CDT": "Шимолий Америка марказий кундузги вақти", "BOT": "Боливия вақти", "SRT": "Суринам вақти", "HAST": "Гавайи-алеут стандарт вақти", "AEDT": "Шарқий Австралия кундузги вақти", "UYT": "Уругвай стандарт вақти", "COT": "Колумбия стандарт вақти", "HEOG": "Ғарбий Гренландия ёзги вақти", "EST": "Шимолий Америка шарқий стандарт вақти", "HKT": "Гонконг стандарт вақти", "CLST": "Чили ёзги вақти", "ADT": "Атлантика кундузги вақти", "EAT": "Шарқий Африка вақти", "HNCU": "Куба стандарт вақти", "WART": "Ғарбий Аргентина стандарт вақти", "GYT": "Гайана вақти", "ACDT": "Марказий Австралия кундузги вақти", "LHST": "Лорд Хове стандарт вақти", "HEPM": "Сент-Пьер ва Микелон кундузги вақти", "JDT": "Япония кундузги вақти", "AST": "Атлантика стандарт вақти", "ART": "Аргентина стандарт вақти", "JST": "Япония стандарт вақти", "PST": "Шимолий Америка тинч океани стандарт вақти", "WIT": "Шарқий Индонезия вақти", "CAT": "Марказий Африка вақти", "WIB": "Ғарбий Индонезия вақти", "MEZ": "Марказий Европа стандарт вақти", "SGT": "Сингапур вақти", "HEPMX": "HEPMX", "AKST": "Аляска стандарт вақти", "OEZ": "Шарқий Европа стандарт вақти", "VET": "Венесуэла вақти", "WAT": "Ғарбий Африка стандарт вақти", "AWDT": "Ғарбий Австралия кундузги вақти", "UYST": "Уругвай ёзги вақти", "WESZ": "Ғарбий Европа ёзги вақти", "WAST": "Ғарбий Африка ёзги вақти", "WITA": "Марказий Индонезия вақти", "MST": "MST", "MYT": "Малайзия вақти", "ACWST": "Марказий Австралия Ғарбий стандарт вақти", "AKDT": "Аляска кундузги вақти", "HAT": "Ньюфаундленд кундузги вақти", "HADT": "Гавайи-алеут кундузги вақти", "HNEG": "Шарқий Гренландия стандарт вақти", "ACWDT": "Марказий Австралия Ғарбий кундузги вақти", "ECT": "Эквадор вақти", "MESZ": "Марказий Европа ёзги вақти", "HEEG": "Шарқий Гренландия ёзги вақти", "CHAST": "Чатхам стандарт вақти", "HNPMX": "HNPMX", "OESZ": "Шарқий Европа ёзги вақти", "HNT": "Ньюфаундленд стандарт вақти", "SAST": "Жанубий Африка вақти", "PDT": "Шимолий Америка тинч океани кундузги вақти", "BT": "Бутан вақти", "WEZ": "Ғарбий Европа стандарт вақти", "ARST": "Аргентина ёзги вақти", "∅∅∅": "Бразилия ёзги вақти", "TMT": "Туркманистон стандарт вақти", "TMST": "Туркманистон ёзги вақти", "NZDT": "Янги Зеландия кундузги вақти", "CHADT": "Чатхам кундузги вақти", "HECU": "Куба кундузги вақти", "GFT": "Француз Гвианаси вақти", "AWST": "Ғарбий Австралия стандарт вақти", "IST": "Ҳиндистон вақти", "WARST": "Ғарбий Аргентина ёзги вақти", "CST": "Шимолий Америка марказий стандарт вақти", "GMT": "Гринвич вақти", "ACST": "Марказий Австралия стандарт вақти", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "LHDT": "Лорд Хове кундузги вақти", "HNPM": "Сент-Пьер ва Микелон стандарт вақти"}, - } - } -  -diff --git a/uz_Cyrl_UZ/uz_Cyrl_UZ.go b/uz_Cyrl_UZ/uz_Cyrl_UZ.go -index f189940..6a11fdc 100644 ---- a/uz_Cyrl_UZ/uz_Cyrl_UZ.go -+++ b/uz_Cyrl_UZ/uz_Cyrl_UZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type uz_Cyrl_UZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'uz_Cyrl_UZ' locale - func New() locales.Translator { - return &uz_Cyrl_UZ{ -- locale: "uz_Cyrl_UZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avg", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "Y", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avgust", "sentabr", "oktabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"Yak", "Dush", "Sesh", "Chor", "Pay", "Jum", "Shan"}, -- daysNarrow: []string{"Y", "D", "S", "C", "P", "J", "S"}, -- daysShort: []string{"Ya", "Du", "Se", "Ch", "Pa", "Ju", "Sh"}, -- daysWide: []string{"yakshanba", "dushanba", "seshanba", "chorshanba", "payshanba", "juma", "shanba"}, -- periodsAbbreviated: []string{"TO", "TK"}, -- periodsNarrow: []string{"TO", "TK"}, -- periodsWide: []string{"TO", "TK"}, -- erasAbbreviated: []string{"m.a.", "milodiy"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"WITA": "Markaziy Indoneziya vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "EST": "Sharqiy Amerika standart vaqti", "HADT": "Gavayi-aleut yozgi vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "WEZ": "G‘arbiy Yevropa standart vaqti", "HKST": "Gonkong yozgi vaqti", "GMT": "Grinvich o‘rtacha vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "CDT": "Markaziy Amerika yozgi vaqti", "AST": "Atlantika standart vaqti", "GYT": "Gayana vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "HAT": "Nyufaundlend yozgi vaqti", "PDT": "Tinch okeani yozgi vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "AKST": "Alyaska standart vaqti", "CST": "Markaziy Amerika standart vaqti", "AWST": "G‘arbiy Avstraliya standart vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "∅∅∅": "Peru yozgi vaqti", "PST": "Tinch okeani standart vaqti", "LHST": "Lord-Xau standart vaqti", "JST": "Yaponiya standart vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "EAT": "Sharqiy Afrika vaqti", "HNCU": "Kuba standart vaqti", "HAST": "Gavayi-aleut standart vaqti", "SRT": "Surinam vaqti", "ARST": "Argentina yozgi vaqti", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "MYT": "Malayziya vaqti", "BOT": "Boliviya vaqti", "NZST": "Yangi Zelandiya standart vaqti", "CHADT": "Chatem yozgi vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "HECU": "Kuba yozgi vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "WIT": "Sharqiy Indoneziya vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "COST": "Kolumbiya yozgi vaqti", "ADT": "Atlantika yozgi vaqti", "UYT": "Urugvay standart vaqti", "SAST": "Janubiy Afrika standart vaqti", "WAST": "Gʻarbiy Afrika yozgi vaqti", "WAT": "Gʻarbiy Afrika standart vaqti", "VET": "Venesuela vaqti", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "TMT": "Turkmaniston standart vaqti", "ChST": "Chamorro standart vaqti", "JDT": "Yaponiya yozgi vaqti", "CLT": "Chili standart vaqti", "GFT": "Fransuz Gvianasi vaqti", "AKDT": "Alyaska yozgi vaqti", "WIB": "Gʻarbiy Indoneziya vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "HKT": "Gonkong standart vaqti", "LHDT": "Lord-Xau yozgi vaqti", "CAT": "Markaziy Afrika vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "BT": "Butan vaqti", "CHAST": "Chatem standart vaqti", "ECT": "Ekvador vaqti", "MST": "MST", "UYST": "Urugvay yozgi vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "IST": "Hindiston vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "HNT": "Nyufaundlend standart vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "CLST": "Chili yozgi vaqti", "TMST": "Turkmaniston yozgi vaqti", "COT": "Kolumbiya standart vaqti", "SGT": "Singapur vaqti", "MDT": "MDT", "ART": "Argentina standart vaqti", "AEST": "Sharqiy Avstraliya standart vaqti"}, -+ locale: "uz_Cyrl_UZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MST": "MST", "GMT": "GMT", "AEST": "AEST", "COST": "COST", "TMST": "TMST", "ACWDT": "ACWDT", "HECU": "HECU", "CLT": "CLT", "AWDT": "AWDT", "UYST": "UYST", "AKST": "AKST", "OEZ": "OEZ", "HKST": "HKST", "ECT": "ECT", "ARST": "ARST", "HNPM": "HNPM", "AWST": "AWST", "PST": "PST", "HNCU": "HNCU", "HKT": "HKT", "WITA": "WITA", "MESZ": "MESZ", "ACST": "ACST", "CHAST": "CHAST", "PDT": "PDT", "MYT": "MYT", "HEPMX": "HEPMX", "COT": "COT", "GYT": "GYT", "WESZ": "WESZ", "SGT": "SGT", "ChST": "ChST", "SRT": "SRT", "HEEG": "HEEG", "CHADT": "CHADT", "IST": "IST", "HNOG": "HNOG", "SAST": "SAST", "EDT": "EDT", "ART": "ART", "HAST": "HAST", "HENOMX": "HENOMX", "ACDT": "ACDT", "HEPM": "HEPM", "CLST": "CLST", "ADT": "ADT", "JST": "JST", "AKDT": "AKDT", "TMT": "TMT", "EST": "EST", "BOT": "BOT", "HNPMX": "HNPMX", "LHDT": "LHDT", "WAST": "WAST", "WART": "WART", "WARST": "WARST", "NZST": "NZST", "AEDT": "AEDT", "UYT": "UYT", "∅∅∅": "∅∅∅", "CAT": "CAT", "JDT": "JDT", "GFT": "GFT", "MEZ": "MEZ", "LHST": "LHST", "BT": "BT", "NZDT": "NZDT", "WIB": "WIB", "CDT": "CDT", "AST": "AST", "HNEG": "HNEG", "VET": "VET", "HNT": "HNT", "HAT": "HAT", "HEOG": "HEOG", "CST": "CST", "HADT": "HADT", "WEZ": "WEZ", "WIT": "WIT", "OESZ": "OESZ", "MDT": "MDT", "EAT": "EAT", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "WAT": "WAT"}, - } - } -  -@@ -135,7 +112,7 @@ func (uz *uz_Cyrl_UZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (uz *uz_Cyrl_UZ) MonthsAbbreviated() []string { -- return uz.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (uz *uz_Cyrl_UZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (uz *uz_Cyrl_UZ) MonthsNarrow() []string { -- return uz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (uz *uz_Cyrl_UZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (uz *uz_Cyrl_UZ) MonthsWide() []string { -- return uz.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,75 +178,13 @@ func (uz *uz_Cyrl_UZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'uz_Cyrl_UZ' and handles both Whole and Real numbers based on 'v' - func (uz *uz_Cyrl_UZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'uz_Cyrl_UZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (uz *uz_Cyrl_UZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, uz.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Cyrl_UZ' -@@ -277,58 +192,7 @@ func (uz *uz_Cyrl_UZ) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, uz.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Cyrl_UZ' -@@ -337,65 +201,7 @@ func (uz *uz_Cyrl_UZ) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, uz.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, uz.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, uz.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'uz_Cyrl_UZ' -@@ -403,27 +209,6 @@ func (uz *uz_Cyrl_UZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -432,17 +217,6 @@ func (uz *uz_Cyrl_UZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +225,6 @@ func (uz *uz_Cyrl_UZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +233,6 @@ func (uz *uz_Cyrl_UZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, uz.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +241,6 @@ func (uz *uz_Cyrl_UZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +249,6 @@ func (uz *uz_Cyrl_UZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,28 +257,6 @@ func (uz *uz_Cyrl_UZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -570,32 +265,5 @@ func (uz *uz_Cyrl_UZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := uz.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/uz_Latn/uz_Latn.go b/uz_Latn/uz_Latn.go -index ff7acd5..52e889f 100644 ---- a/uz_Latn/uz_Latn.go -+++ b/uz_Latn/uz_Latn.go -@@ -10,68 +10,45 @@ import ( - ) -  - type uz_Latn struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'uz_Latn' locale - func New() locales.Translator { - return &uz_Latn{ -- locale: "uz_Latn", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avg", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "Y", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avgust", "sentabr", "oktabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"Yak", "Dush", "Sesh", "Chor", "Pay", "Jum", "Shan"}, -- daysNarrow: []string{"Y", "D", "S", "C", "P", "J", "S"}, -- daysShort: []string{"Ya", "Du", "Se", "Ch", "Pa", "Ju", "Sh"}, -- daysWide: []string{"yakshanba", "dushanba", "seshanba", "chorshanba", "payshanba", "juma", "shanba"}, -- periodsAbbreviated: []string{"TO", "TK"}, -- periodsNarrow: []string{"TO", "TK"}, -- periodsWide: []string{"TO", "TK"}, -- erasAbbreviated: []string{"m.a.", "milodiy"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"CDT": "Markaziy Amerika yozgi vaqti", "UYT": "Urugvay standart vaqti", "AKST": "Alyaska standart vaqti", "HADT": "Gavayi-aleut yozgi vaqti", "WIT": "Sharqiy Indoneziya vaqti", "SRT": "Surinam vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "CHADT": "Chatem yozgi vaqti", "GFT": "Fransuz Gvianasi vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "∅∅∅": "Azor orollari yozgi vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "MYT": "Malayziya vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "ChST": "Chamorro standart vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "CST": "Markaziy Amerika standart vaqti", "UYST": "Urugvay yozgi vaqti", "HNT": "Nyufaundlend standart vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "LHDT": "Lord-Xau yozgi vaqti", "BOT": "Boliviya vaqti", "CAT": "Markaziy Afrika vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "SGT": "Singapur vaqti", "HAST": "Gavayi-aleut standart vaqti", "PDT": "Tinch okeani yozgi vaqti", "JDT": "Yaponiya yozgi vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "HNCU": "Kuba standart vaqti", "WIB": "Gʻarbiy Indoneziya vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "AWST": "G‘arbiy Avstraliya standart vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "CLT": "Chili standart vaqti", "ECT": "Ekvador vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "VET": "Venesuela vaqti", "WITA": "Markaziy Indoneziya vaqti", "JST": "Yaponiya standart vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "WAST": "Gʻarbiy Afrika yozgi vaqti", "MST": "MST", "GYT": "Gayana vaqti", "HAT": "Nyufaundlend yozgi vaqti", "ARST": "Argentina yozgi vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "COT": "Kolumbiya standart vaqti", "HECU": "Kuba yozgi vaqti", "PST": "Tinch okeani standart vaqti", "WEZ": "G‘arbiy Yevropa standart vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "HKST": "Gonkong yozgi vaqti", "TMST": "Turkmaniston yozgi vaqti", "AST": "Atlantika standart vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "TMT": "Turkmaniston standart vaqti", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "CHAST": "Chatem standart vaqti", "NZST": "Yangi Zelandiya standart vaqti", "AEST": "Sharqiy Avstraliya standart vaqti", "SAST": "Janubiy Afrika standart vaqti", "MDT": "MDT", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "BT": "Butan vaqti", "HKT": "Gonkong standart vaqti", "EAT": "Sharqiy Afrika vaqti", "ADT": "Atlantika yozgi vaqti", "AKDT": "Alyaska yozgi vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "LHST": "Lord-Xau standart vaqti", "COST": "Kolumbiya yozgi vaqti", "EST": "Sharqiy Amerika standart vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "IST": "Hindiston vaqti", "GMT": "Grinvich o‘rtacha vaqti", "ART": "Argentina standart vaqti", "CLST": "Chili yozgi vaqti", "WAT": "Gʻarbiy Afrika standart vaqti"}, -+ locale: "uz_Latn", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKDT": "AKDT", "HNNOMX": "HNNOMX", "PST": "PST", "CHADT": "CHADT", "UYST": "UYST", "WAST": "WAST", "WIT": "WIT", "CAT": "CAT", "HADT": "HADT", "MESZ": "MESZ", "HEPM": "HEPM", "JDT": "JDT", "BT": "BT", "AKST": "AKST", "TMT": "TMT", "EST": "EST", "MST": "MST", "GMT": "GMT", "ChST": "ChST", "HNCU": "HNCU", "WARST": "WARST", "HEOG": "HEOG", "CLT": "CLT", "NZST": "NZST", "HAST": "HAST", "MEZ": "MEZ", "HEPMX": "HEPMX", "OEZ": "OEZ", "HKST": "HKST", "TMST": "TMST", "HKT": "HKT", "WITA": "WITA", "ART": "ART", "GFT": "GFT", "OESZ": "OESZ", "WART": "WART", "SAST": "SAST", "AST": "AST", "BOT": "BOT", "HEEG": "HEEG", "JST": "JST", "VET": "VET", "HAT": "HAT", "EDT": "EDT", "MDT": "MDT", "IST": "IST", "ACDT": "ACDT", "HENOMX": "HENOMX", "MYT": "MYT", "AEDT": "AEDT", "GYT": "GYT", "CDT": "CDT", "EAT": "EAT", "ACST": "ACST", "UYT": "UYT", "HNT": "HNT", "AWDT": "AWDT", "COT": "COT", "NZDT": "NZDT", "WIB": "WIB", "CHAST": "CHAST", "PDT": "PDT", "ACWDT": "ACWDT", "AEST": "AEST", "HNPMX": "HNPMX", "WEZ": "WEZ", "HNEG": "HNEG", "LHST": "LHST", "WESZ": "WESZ", "ADT": "ADT", "ACWST": "ACWST", "LHDT": "LHDT", "AWST": "AWST", "WAT": "WAT", "ECT": "ECT", "ARST": "ARST", "SRT": "SRT", "HNOG": "HNOG", "CLST": "CLST", "CST": "CST", "∅∅∅": "∅∅∅", "COST": "COST", "SGT": "SGT", "HECU": "HECU", "HNPM": "HNPM"}, - } - } -  -@@ -135,7 +112,7 @@ func (uz *uz_Latn) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (uz *uz_Latn) MonthsAbbreviated() []string { -- return uz.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (uz *uz_Latn) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (uz *uz_Latn) MonthsNarrow() []string { -- return uz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (uz *uz_Latn) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (uz *uz_Latn) MonthsWide() []string { -- return uz.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,75 +178,13 @@ func (uz *uz_Latn) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'uz_Latn' and handles both Whole and Real numbers based on 'v' - func (uz *uz_Latn) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'uz_Latn' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (uz *uz_Latn) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, uz.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Latn' -@@ -277,58 +192,7 @@ func (uz *uz_Latn) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, uz.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Latn' -@@ -337,65 +201,7 @@ func (uz *uz_Latn) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, uz.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, uz.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, uz.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'uz_Latn' -@@ -403,27 +209,6 @@ func (uz *uz_Latn) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -432,17 +217,6 @@ func (uz *uz_Latn) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +225,6 @@ func (uz *uz_Latn) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +233,6 @@ func (uz *uz_Latn) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, uz.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +241,6 @@ func (uz *uz_Latn) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +249,6 @@ func (uz *uz_Latn) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,28 +257,6 @@ func (uz *uz_Latn) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -570,32 +265,5 @@ func (uz *uz_Latn) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := uz.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/uz_Latn_UZ/uz_Latn_UZ.go b/uz_Latn_UZ/uz_Latn_UZ.go -index 32082b9..b3d9960 100644 ---- a/uz_Latn_UZ/uz_Latn_UZ.go -+++ b/uz_Latn_UZ/uz_Latn_UZ.go -@@ -10,68 +10,45 @@ import ( - ) -  - type uz_Latn_UZ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'uz_Latn_UZ' locale - func New() locales.Translator { - return &uz_Latn_UZ{ -- locale: "uz_Latn_UZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "yan", "fev", "mar", "apr", "may", "iyn", "iyl", "avg", "sen", "okt", "noy", "dek"}, -- monthsNarrow: []string{"", "Y", "F", "M", "A", "M", "I", "I", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "yanvar", "fevral", "mart", "aprel", "may", "iyun", "iyul", "avgust", "sentabr", "oktabr", "noyabr", "dekabr"}, -- daysAbbreviated: []string{"Yak", "Dush", "Sesh", "Chor", "Pay", "Jum", "Shan"}, -- daysNarrow: []string{"Y", "D", "S", "C", "P", "J", "S"}, -- daysShort: []string{"Ya", "Du", "Se", "Ch", "Pa", "Ju", "Sh"}, -- daysWide: []string{"yakshanba", "dushanba", "seshanba", "chorshanba", "payshanba", "juma", "shanba"}, -- periodsAbbreviated: []string{"TO", "TK"}, -- periodsNarrow: []string{"TO", "TK"}, -- periodsWide: []string{"TO", "TK"}, -- erasAbbreviated: []string{"m.a.", "milodiy"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"AWST": "G‘arbiy Avstraliya standart vaqti", "AWDT": "G‘arbiy Avstraliya yozgi vaqti", "NZST": "Yangi Zelandiya standart vaqti", "IST": "Hindiston vaqti", "ACST": "Markaziy Avstraliya standart vaqti", "CST": "Markaziy Amerika standart vaqti", "AST": "Atlantika standart vaqti", "WITA": "Markaziy Indoneziya vaqti", "HECU": "Kuba yozgi vaqti", "HKST": "Gonkong yozgi vaqti", "MEZ": "Markaziy Yevropa standart vaqti", "COT": "Kolumbiya standart vaqti", "MESZ": "Markaziy Yevropa yozgi vaqti", "∅∅∅": "Amazonka yozgi vaqti", "JST": "Yaponiya standart vaqti", "UYT": "Urugvay standart vaqti", "HKT": "Gonkong standart vaqti", "AEDT": "Sharqiy Avstraliya yozgi vaqti", "JDT": "Yaponiya yozgi vaqti", "HAST": "Gavayi-aleut standart vaqti", "HADT": "Gavayi-aleut yozgi vaqti", "EST": "Sharqiy Amerika standart vaqti", "HEPMX": "Meksika Tinch okeani yozgi vaqti", "WESZ": "G‘arbiy Yevropa yozgi vaqti", "CLST": "Chili yozgi vaqti", "WAT": "Gʻarbiy Afrika standart vaqti", "TMST": "Turkmaniston yozgi vaqti", "ChST": "Chamorro standart vaqti", "CDT": "Markaziy Amerika yozgi vaqti", "WIT": "Sharqiy Indoneziya vaqti", "HEPM": "Sen-Pyer va Mikelon yozgi vaqti", "WAST": "Gʻarbiy Afrika yozgi vaqti", "WART": "Gʻarbiy Argentina standart vaqti", "SGT": "Singapur vaqti", "ADT": "Atlantika yozgi vaqti", "SRT": "Surinam vaqti", "CHAST": "Chatem standart vaqti", "CHADT": "Chatem yozgi vaqti", "HEEG": "Sharqiy Grenlandiya yozgi vaqti", "GFT": "Fransuz Gvianasi vaqti", "ARST": "Argentina yozgi vaqti", "TMT": "Turkmaniston standart vaqti", "ECT": "Ekvador vaqti", "COST": "Kolumbiya yozgi vaqti", "EDT": "Sharqiy Amerika yozgi vaqti", "GYT": "Gayana vaqti", "MYT": "Malayziya vaqti", "HNT": "Nyufaundlend standart vaqti", "HNOG": "G‘arbiy Grenlandiya standart vaqti", "HEOG": "G‘arbiy Grenlandiya yozgi vaqti", "PDT": "Tinch okeani yozgi vaqti", "HNPM": "Sen-Pyer va Mikelon standart vaqti", "HNPMX": "Meksika Tinch okeani standart vaqti", "AKST": "Alyaska standart vaqti", "MDT": "Tog‘ yozgi vaqti (AQSH)", "BT": "Butan vaqti", "NZDT": "Yangi Zelandiya yozgi vaqti", "SAST": "Janubiy Afrika standart vaqti", "GMT": "Grinvich o‘rtacha vaqti", "AKDT": "Alyaska yozgi vaqti", "WIB": "Gʻarbiy Indoneziya vaqti", "ACWST": "Markaziy Avstraliya g‘arbiy standart vaqti", "PST": "Tinch okeani standart vaqti", "HNEG": "Sharqiy Grenlandiya standart vaqti", "ACDT": "Markaziy Avstraliya yozgi vaqti", "OEZ": "Sharqiy Yevropa standart vaqti", "CAT": "Markaziy Afrika vaqti", "UYST": "Urugvay yozgi vaqti", "MST": "Tog‘ standart vaqti (AQSH)", "ART": "Argentina standart vaqti", "WEZ": "G‘arbiy Yevropa standart vaqti", "LHDT": "Lord-Xau yozgi vaqti", "HNNOMX": "Shimoli-g‘arbiy Meksika standart vaqti", "HENOMX": "Shimoli-g‘arbiy Meksika yozgi vaqti", "WARST": "Gʻarbiy Argentina yozgi vaqti", "AEST": "Sharqiy Avstraliya standart vaqti", "LHST": "Lord-Xau standart vaqti", "BOT": "Boliviya vaqti", "CLT": "Chili standart vaqti", "OESZ": "Sharqiy Yevropa yozgi vaqti", "EAT": "Sharqiy Afrika vaqti", "HNCU": "Kuba standart vaqti", "VET": "Venesuela vaqti", "ACWDT": "Markaziy Avstraliya g‘arbiy yozgi vaqti", "HAT": "Nyufaundlend yozgi vaqti"}, -+ locale: "uz_Latn_UZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYT": "UYT", "TMST": "TMST", "AWST": "AWST", "∅∅∅": "∅∅∅", "PST": "PST", "ACWDT": "ACWDT", "WAST": "WAST", "WIT": "WIT", "HKST": "HKST", "CST": "CST", "BOT": "BOT", "UYST": "UYST", "PDT": "PDT", "ACWST": "ACWST", "AKDT": "AKDT", "HAT": "HAT", "WARST": "WARST", "CLST": "CLST", "JST": "JST", "LHDT": "LHDT", "HNPM": "HNPM", "AEDT": "AEDT", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "HNCU": "HNCU", "HNT": "HNT", "MEZ": "MEZ", "EST": "EST", "CLT": "CLT", "CDT": "CDT", "AST": "AST", "SAST": "SAST", "EAT": "EAT", "HEEG": "HEEG", "EDT": "EDT", "GMT": "GMT", "SRT": "SRT", "JDT": "JDT", "HEPM": "HEPM", "WESZ": "WESZ", "MST": "MST", "AKST": "AKST", "HNOG": "HNOG", "CAT": "CAT", "ChST": "ChST", "MESZ": "MESZ", "HENOMX": "HENOMX", "AWDT": "AWDT", "IST": "IST", "HECU": "HECU", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "BT": "BT", "NZDT": "NZDT", "AEST": "AEST", "ART": "ART", "ARST": "ARST", "COT": "COT", "OESZ": "OESZ", "HKT": "HKT", "WIB": "WIB", "ADT": "ADT", "HNEG": "HNEG", "GYT": "GYT", "COST": "COST", "TMT": "TMT", "WITA": "WITA", "HAST": "HAST", "VET": "VET", "WART": "WART", "LHST": "LHST", "GFT": "GFT", "NZST": "NZST", "CHADT": "CHADT", "HADT": "HADT", "CHAST": "CHAST", "MDT": "MDT", "ACDT": "ACDT", "MYT": "MYT", "WEZ": "WEZ", "SGT": "SGT", "WAT": "WAT", "HEOG": "HEOG", "ECT": "ECT", "ACST": "ACST"}, - } - } -  -@@ -135,7 +112,7 @@ func (uz *uz_Latn_UZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (uz *uz_Latn_UZ) MonthsAbbreviated() []string { -- return uz.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -145,7 +122,7 @@ func (uz *uz_Latn_UZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (uz *uz_Latn_UZ) MonthsNarrow() []string { -- return uz.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -155,7 +132,7 @@ func (uz *uz_Latn_UZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (uz *uz_Latn_UZ) MonthsWide() []string { -- return uz.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -201,75 +178,13 @@ func (uz *uz_Latn_UZ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'uz_Latn_UZ' and handles both Whole and Real numbers based on 'v' - func (uz *uz_Latn_UZ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'uz_Latn_UZ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (uz *uz_Latn_UZ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, uz.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Latn_UZ' -@@ -277,58 +192,7 @@ func (uz *uz_Latn_UZ) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, uz.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, uz.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'uz_Latn_UZ' -@@ -337,65 +201,7 @@ func (uz *uz_Latn_UZ) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := uz.currencies[currency] -- l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, uz.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(uz.group) - 1; j >= 0; j-- { -- b = append(b, uz.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, uz.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, uz.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, uz.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, uz.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'uz_Latn_UZ' -@@ -403,27 +209,6 @@ func (uz *uz_Latn_UZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -432,17 +217,6 @@ func (uz *uz_Latn_UZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -451,17 +225,6 @@ func (uz *uz_Latn_UZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -470,19 +233,6 @@ func (uz *uz_Latn_UZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, uz.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2d}...) -- b = append(b, uz.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -491,19 +241,6 @@ func (uz *uz_Latn_UZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -512,26 +249,6 @@ func (uz *uz_Latn_UZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -540,28 +257,6 @@ func (uz *uz_Latn_UZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -  -@@ -570,32 +265,5 @@ func (uz *uz_Latn_UZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, uz.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x28}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := uz.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x29}...) -- - return string(b) - } -diff --git a/vai/vai.go b/vai/vai.go -index 71db3c2..0f8f448 100644 ---- a/vai/vai.go -+++ b/vai/vai.go -@@ -56,7 +56,7 @@ func New() locales.Translator { - currencyNegativeSuffix: ")", - monthsWide: []string{"", "ꖨꕪꖃ ꔞꕮ", "ꕒꕡꖝꖕ", "ꕾꖺ", "ꖢꖕ", "ꖑꕱ", "6", "7", "ꗛꔕ", "ꕢꕌ", "ꕭꖃ", "ꔞꘋꕔꕿ ꕸꖃꗏ", "ꖨꕪꕱ ꗏꕮ"}, - daysWide: []string{"ꕞꕌꔵ", "ꗳꗡꘉ", "ꕚꕞꕚ", "ꕉꕞꕒ", "ꕉꔤꕆꕢ", "ꕉꔤꕀꕮ", "ꔻꔬꔳ"}, -- timezones: map[string]string{"VET": "VET", "LHDT": "LHDT", "JDT": "JDT", "CAT": "CAT", "OESZ": "OESZ", "AKDT": "AKDT", "CST": "CST", "CDT": "CDT", "HADT": "HADT", "WESZ": "WESZ", "OEZ": "OEZ", "SGT": "SGT", "HECU": "HECU", "HNCU": "HNCU", "BT": "BT", "HEPM": "HEPM", "CHADT": "CHADT", "CLT": "CLT", "∅∅∅": "∅∅∅", "WAST": "WAST", "UYST": "UYST", "AKST": "AKST", "AWDT": "AWDT", "HKST": "HKST", "WITA": "WITA", "NZST": "NZST", "COST": "COST", "MDT": "MDT", "HNPMX": "HNPMX", "AWST": "AWST", "HEEG": "HEEG", "EAT": "EAT", "WART": "WART", "UYT": "UYT", "ADT": "ADT", "PST": "PST", "BOT": "BOT", "ECT": "ECT", "EDT": "EDT", "MEZ": "MEZ", "CHAST": "CHAST", "ACST": "ACST", "HNNOMX": "HNNOMX", "HEPMX": "HEPMX", "COT": "COT", "HENOMX": "HENOMX", "PDT": "PDT", "ARST": "ARST", "CLST": "CLST", "TMT": "TMT", "HAST": "HAST", "SRT": "SRT", "ART": "ART", "AEST": "AEST", "TMST": "TMST", "AST": "AST", "MST": "MST", "HNT": "HNT", "HKT": "HKT", "HNPM": "HNPM", "ChST": "ChST", "EST": "EST", "WIT": "WIT", "HEOG": "HEOG", "MESZ": "MESZ", "HNEG": "HNEG", "GFT": "GFT", "ACWST": "ACWST", "HAT": "HAT", "LHST": "LHST", "ACDT": "ACDT", "ACWDT": "ACWDT", "NZDT": "NZDT", "IST": "IST", "WARST": "WARST", "WAT": "WAT", "MYT": "MYT", "GYT": "GYT", "WIB": "WIB", "HNOG": "HNOG", "AEDT": "AEDT", "SAST": "SAST", "JST": "JST", "WEZ": "WEZ", "GMT": "GMT"}, -+ timezones: map[string]string{"HENOMX": "HENOMX", "LHST": "LHST", "PST": "PST", "ECT": "ECT", "WIB": "WIB", "SRT": "SRT", "MESZ": "MESZ", "HNEG": "HNEG", "NZST": "NZST", "MST": "MST", "PDT": "PDT", "AEDT": "AEDT", "AEST": "AEST", "WAST": "WAST", "EDT": "EDT", "HADT": "HADT", "HNNOMX": "HNNOMX", "UYST": "UYST", "JDT": "JDT", "CHADT": "CHADT", "HAT": "HAT", "MEZ": "MEZ", "AWST": "AWST", "JST": "JST", "AWDT": "AWDT", "WESZ": "WESZ", "ARST": "ARST", "GYT": "GYT", "TMT": "TMT", "WITA": "WITA", "CDT": "CDT", "GMT": "GMT", "∅∅∅": "∅∅∅", "GFT": "GFT", "WARST": "WARST", "AKDT": "AKDT", "HEOG": "HEOG", "HKST": "HKST", "TMST": "TMST", "CLT": "CLT", "EAT": "EAT", "ACDT": "ACDT", "AKST": "AKST", "WIT": "WIT", "CLST": "CLST", "NZDT": "NZDT", "HAST": "HAST", "WEZ": "WEZ", "WAT": "WAT", "CHAST": "CHAST", "HNCU": "HNCU", "HNT": "HNT", "WART": "WART", "HEEG": "HEEG", "UYT": "UYT", "ACWST": "ACWST", "COT": "COT", "COST": "COST", "HKT": "HKT", "CAT": "CAT", "CST": "CST", "LHDT": "LHDT", "HNPM": "HNPM", "SAST": "SAST", "BOT": "BOT", "BT": "BT", "OESZ": "OESZ", "HNPMX": "HNPMX", "HNOG": "HNOG", "EST": "EST", "ACST": "ACST", "HEPM": "HEPM", "VET": "VET", "ADT": "ADT", "ChST": "ChST", "MDT": "MDT", "SGT": "SGT", "HECU": "HECU", "HEPMX": "HEPMX", "AST": "AST", "OEZ": "OEZ", "ART": "ART", "MYT": "MYT", "IST": "IST", "ACWDT": "ACWDT"}, - } - } -  -diff --git a/vai_Latn/vai_Latn.go b/vai_Latn/vai_Latn.go -index 3838551..7afe855 100644 ---- a/vai_Latn/vai_Latn.go -+++ b/vai_Latn/vai_Latn.go -@@ -56,7 +56,7 @@ func New() locales.Translator { - currencyNegativeSuffix: ")", - monthsWide: []string{"", "luukao kemã", "ɓandaɓu", "vɔɔ", "fulu", "goo", "6", "7", "kɔnde", "saah", "galo", "kenpkato ɓololɔ", "luukao lɔma"}, - daysWide: []string{"lahadi", "tɛɛnɛɛ", "talata", "alaba", "aimisa", "aijima", "siɓiti"}, -- timezones: map[string]string{"CLT": "CLT", "BOT": "BOT", "ACDT": "ACDT", "GMT": "GMT", "HNCU": "HNCU", "HNPMX": "HNPMX", "UYST": "UYST", "BT": "BT", "IST": "IST", "AST": "AST", "GYT": "GYT", "AKDT": "AKDT", "AEST": "AEST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "OESZ": "OESZ", "EAT": "EAT", "MDT": "MDT", "ARST": "ARST", "HNOG": "HNOG", "AWDT": "AWDT", "MEZ": "MEZ", "JDT": "JDT", "OEZ": "OEZ", "WIT": "WIT", "ART": "ART", "PST": "PST", "WITA": "WITA", "AWST": "AWST", "LHDT": "LHDT", "ACST": "ACST", "COST": "COST", "HENOMX": "HENOMX", "HNT": "HNT", "AEDT": "AEDT", "HKST": "HKST", "HNPM": "HNPM", "JST": "JST", "HAST": "HAST", "EST": "EST", "MST": "MST", "CST": "CST", "SRT": "SRT", "HEOG": "HEOG", "TMST": "TMST", "COT": "COT", "HADT": "HADT", "WAST": "WAST", "HEPMX": "HEPMX", "UYT": "UYT", "PDT": "PDT", "ACWDT": "ACWDT", "LHST": "LHST", "NZST": "NZST", "SAST": "SAST", "WARST": "WARST", "HNNOMX": "HNNOMX", "SGT": "SGT", "HECU": "HECU", "MESZ": "MESZ", "NZDT": "NZDT", "ECT": "ECT", "ADT": "ADT", "WIB": "WIB", "HAT": "HAT", "WEZ": "WEZ", "GFT": "GFT", "CAT": "CAT", "CDT": "CDT", "VET": "VET", "CLST": "CLST", "TMT": "TMT", "EDT": "EDT", "WESZ": "WESZ", "HEPM": "HEPM", "CHAST": "CHAST", "HEEG": "HEEG", "WAT": "WAT", "CHADT": "CHADT", "ChST": "ChST", "WART": "WART", "MYT": "MYT", "AKST": "AKST", "ACWST": "ACWST", "HKT": "HKT"}, -+ timezones: map[string]string{"HEEG": "HEEG", "LHST": "LHST", "CHAST": "CHAST", "WITA": "WITA", "HAST": "HAST", "OEZ": "OEZ", "WARST": "WARST", "GYT": "GYT", "MYT": "MYT", "ART": "ART", "AST": "AST", "UYST": "UYST", "WART": "WART", "∅∅∅": "∅∅∅", "TMST": "TMST", "WEZ": "WEZ", "AWDT": "AWDT", "VET": "VET", "JDT": "JDT", "AWST": "AWST", "BT": "BT", "CHADT": "CHADT", "AKDT": "AKDT", "ECT": "ECT", "ChST": "ChST", "HNOG": "HNOG", "JST": "JST", "NZDT": "NZDT", "IST": "IST", "HEOG": "HEOG", "EDT": "EDT", "HECU": "HECU", "AKST": "AKST", "GFT": "GFT", "HNT": "HNT", "CDT": "CDT", "PDT": "PDT", "UYT": "UYT", "ACDT": "ACDT", "HNPM": "HNPM", "ARST": "ARST", "HADT": "HADT", "EAT": "EAT", "HENOMX": "HENOMX", "HNCU": "HNCU", "HKT": "HKT", "MST": "MST", "ACST": "ACST", "HEPMX": "HEPMX", "COST": "COST", "WIB": "WIB", "ACWST": "ACWST", "ACWDT": "ACWDT", "WAST": "WAST", "OESZ": "OESZ", "NZST": "NZST", "MESZ": "MESZ", "CAT": "CAT", "LHDT": "LHDT", "MDT": "MDT", "CST": "CST", "GMT": "GMT", "PST": "PST", "HNPMX": "HNPMX", "WESZ": "WESZ", "EST": "EST", "CLT": "CLT", "WAT": "WAT", "BOT": "BOT", "SRT": "SRT", "HNEG": "HNEG", "HEPM": "HEPM", "AEST": "AEST", "AEDT": "AEDT", "SAST": "SAST", "TMT": "TMT", "SGT": "SGT", "WIT": "WIT", "CLST": "CLST", "ADT": "ADT", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "HAT": "HAT", "COT": "COT", "HKST": "HKST"}, - } - } -  -diff --git a/vai_Latn_LR/vai_Latn_LR.go b/vai_Latn_LR/vai_Latn_LR.go -index 0821e4b..9ff9447 100644 ---- a/vai_Latn_LR/vai_Latn_LR.go -+++ b/vai_Latn_LR/vai_Latn_LR.go -@@ -10,53 +10,45 @@ import ( - ) -  - type vai_Latn_LR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'vai_Latn_LR' locale - func New() locales.Translator { - return &vai_Latn_LR{ -- locale: "vai_Latn_LR", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsWide: []string{"", "ꖨꕪꖃ ꔞꕮ", "ꕒꕡꖝꖕ", "ꕾꖺ", "ꖢꖕ", "ꖑꕱ", "6", "7", "ꗛꔕ", "ꕢꕌ", "ꕭꖃ", "ꔞꘋꕔꕿ ꕸꖃꗏ", "ꖨꕪꕱ ꗏꕮ"}, -- daysWide: []string{"ꕞꕌꔵ", "ꗳꗡꘉ", "ꕚꕞꕚ", "ꕉꕞꕒ", "ꕉꔤꕆꕢ", "ꕉꔤꕀꕮ", "ꔻꔬꔳ"}, -- timezones: map[string]string{"PST": "PST", "COT": "COT", "HADT": "HADT", "LHST": "LHST", "IST": "IST", "GFT": "GFT", "OESZ": "OESZ", "COST": "COST", "CST": "CST", "ADT": "ADT", "AWST": "AWST", "MESZ": "MESZ", "ACST": "ACST", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "AKDT": "AKDT", "MDT": "MDT", "HNT": "HNT", "JST": "JST", "GYT": "GYT", "WIB": "WIB", "WIT": "WIT", "HAT": "HAT", "ACDT": "ACDT", "WARST": "WARST", "SGT": "SGT", "HAST": "HAST", "EDT": "EDT", "HEPMX": "HEPMX", "ACWDT": "ACWDT", "WITA": "WITA", "BOT": "BOT", "HEEG": "HEEG", "TMST": "TMST", "CAT": "CAT", "HNCU": "HNCU", "AKST": "AKST", "MYT": "MYT", "WEZ": "WEZ", "HKST": "HKST", "HENOMX": "HENOMX", "TMT": "TMT", "CDT": "CDT", "AST": "AST", "UYT": "UYT", "SRT": "SRT", "MEZ": "MEZ", "CHADT": "CHADT", "SAST": "SAST", "HECU": "HECU", "UYST": "UYST", "MST": "MST", "HEOG": "HEOG", "CLT": "CLT", "GMT": "GMT", "BT": "BT", "HNOG": "HNOG", "HKT": "HKT", "EAT": "EAT", "WAST": "WAST", "WESZ": "WESZ", "AEDT": "AEDT", "AWDT": "AWDT", "HNPM": "HNPM", "NZST": "NZST", "∅∅∅": "∅∅∅", "HNEG": "HNEG", "VET": "VET", "PDT": "PDT", "ACWST": "ACWST", "HEPM": "HEPM", "NZDT": "NZDT", "CHAST": "CHAST", "CLST": "CLST", "WAT": "WAT", "ECT": "ECT", "HNPMX": "HNPMX", "AEST": "AEST", "LHDT": "LHDT", "JDT": "JDT", "ChST": "ChST", "WART": "WART", "ART": "ART", "ARST": "ARST", "EST": "EST"}, -+ locale: "vai_Latn_LR", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ACWST": "ACWST", "AEST": "AEST", "AKST": "AKST", "NZST": "NZST", "AST": "AST", "HAST": "HAST", "EAT": "EAT", "LHDT": "LHDT", "WART": "WART", "TMT": "TMT", "EST": "EST", "GFT": "GFT", "HEOG": "HEOG", "MDT": "MDT", "MESZ": "MESZ", "AEDT": "AEDT", "CHAST": "CHAST", "UYST": "UYST", "ChST": "ChST", "ACDT": "ACDT", "VET": "VET", "HNCU": "HNCU", "HNPMX": "HNPMX", "WIT": "WIT", "HNOG": "HNOG", "ECT": "ECT", "AWDT": "AWDT", "PDT": "PDT", "AKDT": "AKDT", "WARST": "WARST", "BT": "BT", "WEZ": "WEZ", "OESZ": "OESZ", "HNT": "HNT", "GYT": "GYT", "CST": "CST", "MYT": "MYT", "PST": "PST", "COST": "COST", "WITA": "WITA", "HKST": "HKST", "CAT": "CAT", "MST": "MST", "ART": "ART", "HNNOMX": "HNNOMX", "HEPM": "HEPM", "COT": "COT", "WIB": "WIB", "LHST": "LHST", "OEZ": "OEZ", "HAT": "HAT", "HECU": "HECU", "HKT": "HKT", "CDT": "CDT", "ACST": "ACST", "HEEG": "HEEG", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "HENOMX": "HENOMX", "AWST": "AWST", "SGT": "SGT", "NZDT": "NZDT", "GMT": "GMT", "ADT": "ADT", "HADT": "HADT", "HNEG": "HNEG", "HEPMX": "HEPMX", "WESZ": "WESZ", "WAST": "WAST", "SAST": "SAST", "BOT": "BOT", "ACWDT": "ACWDT", "UYT": "UYT", "TMST": "TMST", "EDT": "EDT", "CLT": "CLT", "HNPM": "HNPM", "IST": "IST", "WAT": "WAT", "ARST": "ARST", "SRT": "SRT", "JST": "JST", "CLST": "CLST", "MEZ": "MEZ", "JDT": "JDT"}, - } - } -  -@@ -122,7 +114,7 @@ func (vai *vai_Latn_LR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (vai *vai_Latn_LR) MonthsWide() []string { -- return vai.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -168,42 +160,7 @@ func (vai *vai_Latn_LR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'vai_Latn_LR' and handles both Whole and Real numbers based on 'v' - func (vai *vai_Latn_LR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, vai.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'vai_Latn_LR' and handles both Whole and Real numbers based on 'v' -@@ -217,56 +174,7 @@ func (vai *vai_Latn_LR) FmtCurrency(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vai.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, vai.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vai.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'vai_Latn_LR' -@@ -275,68 +183,7 @@ func (vai *vai_Latn_LR) FmtAccounting(num float64, v uint64, currency currency.T -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vai.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, vai.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vai.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, vai.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'vai_Latn_LR' -@@ -344,27 +191,6 @@ func (vai *vai_Latn_LR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -373,17 +199,6 @@ func (vai *vai_Latn_LR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -392,17 +207,6 @@ func (vai *vai_Latn_LR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -411,19 +215,6 @@ func (vai *vai_Latn_LR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, vai.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,28 +223,6 @@ func (vai *vai_Latn_LR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -462,35 +231,6 @@ func (vai *vai_Latn_LR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -499,40 +239,6 @@ func (vai *vai_Latn_LR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,44 +247,5 @@ func (vai *vai_Latn_LR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := vai.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/vai_Vaii/vai_Vaii.go b/vai_Vaii/vai_Vaii.go -index f38dfe1..b545a3d 100644 ---- a/vai_Vaii/vai_Vaii.go -+++ b/vai_Vaii/vai_Vaii.go -@@ -10,53 +10,45 @@ import ( - ) -  - type vai_Vaii struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'vai_Vaii' locale - func New() locales.Translator { - return &vai_Vaii{ -- locale: "vai_Vaii", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsWide: []string{"", "ꖨꕪꖃ ꔞꕮ", "ꕒꕡꖝꖕ", "ꕾꖺ", "ꖢꖕ", "ꖑꕱ", "6", "7", "ꗛꔕ", "ꕢꕌ", "ꕭꖃ", "ꔞꘋꕔꕿ ꕸꖃꗏ", "ꖨꕪꕱ ꗏꕮ"}, -- daysWide: []string{"ꕞꕌꔵ", "ꗳꗡꘉ", "ꕚꕞꕚ", "ꕉꕞꕒ", "ꕉꔤꕆꕢ", "ꕉꔤꕀꕮ", "ꔻꔬꔳ"}, -- timezones: map[string]string{"AKDT": "AKDT", "PST": "PST", "JST": "JST", "ACDT": "ACDT", "OEZ": "OEZ", "EAT": "EAT", "GMT": "GMT", "HNCU": "HNCU", "HEOG": "HEOG", "CAT": "CAT", "WART": "WART", "COST": "COST", "ART": "ART", "LHDT": "LHDT", "TMST": "TMST", "OESZ": "OESZ", "SGT": "SGT", "UYT": "UYT", "CHAST": "CHAST", "CLT": "CLT", "TMT": "TMT", "COT": "COT", "ARST": "ARST", "HKST": "HKST", "HNNOMX": "HNNOMX", "GYT": "GYT", "BT": "BT", "∅∅∅": "∅∅∅", "HENOMX": "HENOMX", "HECU": "HECU", "MDT": "MDT", "CDT": "CDT", "WIB": "WIB", "VET": "VET", "ChST": "ChST", "AST": "AST", "WARST": "WARST", "SRT": "SRT", "AEST": "AEST", "AEDT": "AEDT", "HEPM": "HEPM", "NZDT": "NZDT", "GFT": "GFT", "ECT": "ECT", "AKST": "AKST", "HADT": "HADT", "WIT": "WIT", "AWDT": "AWDT", "LHST": "LHST", "HNPMX": "HNPMX", "MYT": "MYT", "CHADT": "CHADT", "HEEG": "HEEG", "MST": "MST", "ACWDT": "ACWDT", "EST": "EST", "CST": "CST", "ADT": "ADT", "HAST": "HAST", "AWST": "AWST", "MESZ": "MESZ", "ACST": "ACST", "HNT": "HNT", "HNOG": "HNOG", "WESZ": "WESZ", "MEZ": "MEZ", "NZST": "NZST", "SAST": "SAST", "HNEG": "HNEG", "HAT": "HAT", "PDT": "PDT", "WAST": "WAST", "HEPMX": "HEPMX", "ACWST": "ACWST", "WITA": "WITA", "HKT": "HKT", "CLST": "CLST", "BOT": "BOT", "WEZ": "WEZ", "HNPM": "HNPM", "IST": "IST", "JDT": "JDT", "WAT": "WAT", "EDT": "EDT", "UYST": "UYST"}, -+ locale: "vai_Vaii", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HADT": "HADT", "AWDT": "AWDT", "CAT": "CAT", "WITA": "WITA", "MDT": "MDT", "HEEG": "HEEG", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "PST": "PST", "BT": "BT", "GFT": "GFT", "COST": "COST", "BOT": "BOT", "SRT": "SRT", "LHST": "LHST", "HECU": "HECU", "HAT": "HAT", "COT": "COT", "MST": "MST", "AKST": "AKST", "WARST": "WARST", "HEOG": "HEOG", "CHADT": "CHADT", "UYST": "UYST", "SGT": "SGT", "WART": "WART", "HNOG": "HNOG", "ADT": "ADT", "ACDT": "ACDT", "HEPMX": "HEPMX", "SAST": "SAST", "HKT": "HKT", "TMT": "TMT", "CLST": "CLST", "ART": "ART", "IST": "IST", "GYT": "GYT", "EDT": "EDT", "VET": "VET", "ACWST": "ACWST", "TMST": "TMST", "CLT": "CLT", "ECT": "ECT", "AWST": "AWST", "WAST": "WAST", "JDT": "JDT", "UYT": "UYT", "PDT": "PDT", "WAT": "WAT", "HNT": "HNT", "CST": "CST", "ACWDT": "ACWDT", "WIB": "WIB", "GMT": "GMT", "EST": "EST", "HNEG": "HNEG", "LHDT": "LHDT", "AEDT": "AEDT", "CHAST": "CHAST", "HNPMX": "HNPMX", "HKST": "HKST", "HNNOMX": "HNNOMX", "WEZ": "WEZ", "WIT": "WIT", "HENOMX": "HENOMX", "JST": "JST", "HEPM": "HEPM", "MESZ": "MESZ", "ACST": "ACST", "WESZ": "WESZ", "NZST": "NZST", "NZDT": "NZDT", "ARST": "ARST", "AST": "AST", "MEZ": "MEZ", "HAST": "HAST", "MYT": "MYT", "AEST": "AEST", "HNCU": "HNCU", "AKDT": "AKDT", "OEZ": "OEZ", "OESZ": "OESZ", "EAT": "EAT", "ChST": "ChST", "CDT": "CDT"}, - } - } -  -@@ -122,7 +114,7 @@ func (vai *vai_Vaii) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (vai *vai_Vaii) MonthsWide() []string { -- return vai.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -168,42 +160,7 @@ func (vai *vai_Vaii) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'vai_Vaii' and handles both Whole and Real numbers based on 'v' - func (vai *vai_Vaii) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, vai.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'vai_Vaii' and handles both Whole and Real numbers based on 'v' -@@ -217,56 +174,7 @@ func (vai *vai_Vaii) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vai.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, vai.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vai.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'vai_Vaii' -@@ -275,68 +183,7 @@ func (vai *vai_Vaii) FmtAccounting(num float64, v uint64, currency currency.Type -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vai.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, vai.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vai.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, vai.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'vai_Vaii' -@@ -344,27 +191,6 @@ func (vai *vai_Vaii) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -373,17 +199,6 @@ func (vai *vai_Vaii) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -392,17 +207,6 @@ func (vai *vai_Vaii) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -411,19 +215,6 @@ func (vai *vai_Vaii) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, vai.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,28 +223,6 @@ func (vai *vai_Vaii) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -462,35 +231,6 @@ func (vai *vai_Vaii) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -499,40 +239,6 @@ func (vai *vai_Vaii) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,44 +247,5 @@ func (vai *vai_Vaii) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := vai.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/vai_Vaii_LR/vai_Vaii_LR.go b/vai_Vaii_LR/vai_Vaii_LR.go -index 4608674..942afc6 100644 ---- a/vai_Vaii_LR/vai_Vaii_LR.go -+++ b/vai_Vaii_LR/vai_Vaii_LR.go -@@ -10,53 +10,45 @@ import ( - ) -  - type vai_Vaii_LR struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'vai_Vaii_LR' locale - func New() locales.Translator { - return &vai_Vaii_LR{ -- locale: "vai_Vaii_LR", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsWide: []string{"", "ꖨꕪꖃ ꔞꕮ", "ꕒꕡꖝꖕ", "ꕾꖺ", "ꖢꖕ", "ꖑꕱ", "6", "7", "ꗛꔕ", "ꕢꕌ", "ꕭꖃ", "ꔞꘋꕔꕿ ꕸꖃꗏ", "ꖨꕪꕱ ꗏꕮ"}, -- daysWide: []string{"ꕞꕌꔵ", "ꗳꗡꘉ", "ꕚꕞꕚ", "ꕉꕞꕒ", "ꕉꔤꕆꕢ", "ꕉꔤꕀꕮ", "ꔻꔬꔳ"}, -- timezones: map[string]string{"CST": "CST", "ACWST": "ACWST", "AWST": "AWST", "JST": "JST", "CLT": "CLT", "GFT": "GFT", "ACST": "ACST", "WART": "WART", "HNCU": "HNCU", "HEPM": "HEPM", "HECU": "HECU", "EDT": "EDT", "HAST": "HAST", "VET": "VET", "WEZ": "WEZ", "WITA": "WITA", "AEST": "AEST", "MYT": "MYT", "HADT": "HADT", "HNT": "HNT", "ChST": "ChST", "HNNOMX": "HNNOMX", "SGT": "SGT", "HEPMX": "HEPMX", "AKST": "AKST", "GYT": "GYT", "HEOG": "HEOG", "NZDT": "NZDT", "MEZ": "MEZ", "ADT": "ADT", "CAT": "CAT", "WARST": "WARST", "COT": "COT", "WESZ": "WESZ", "LHST": "LHST", "∅∅∅": "∅∅∅", "HEEG": "HEEG", "TMST": "TMST", "GMT": "GMT", "AKDT": "AKDT", "CDT": "CDT", "WIB": "WIB", "BT": "BT", "SAST": "SAST", "HNEG": "HNEG", "BOT": "BOT", "NZST": "NZST", "ACDT": "ACDT", "EAT": "EAT", "TMT": "TMT", "OESZ": "OESZ", "ECT": "ECT", "AST": "AST", "ART": "ART", "MESZ": "MESZ", "CLST": "CLST", "WAST": "WAST", "COST": "COST", "IST": "IST", "MDT": "MDT", "SRT": "SRT", "ACWDT": "ACWDT", "HNOG": "HNOG", "CHADT": "CHADT", "JDT": "JDT", "WAT": "WAT", "OEZ": "OEZ", "MST": "MST", "WIT": "WIT", "ARST": "ARST", "AEDT": "AEDT", "AWDT": "AWDT", "UYST": "UYST", "PST": "PST", "PDT": "PDT", "HKT": "HKT", "HKST": "HKST", "HENOMX": "HENOMX", "CHAST": "CHAST", "LHDT": "LHDT", "UYT": "UYT", "HAT": "HAT", "HNPM": "HNPM", "HNPMX": "HNPMX", "EST": "EST"}, -+ locale: "vai_Vaii_LR", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MESZ": "MESZ", "AWDT": "AWDT", "BT": "BT", "HKST": "HKST", "CAT": "CAT", "HNEG": "HNEG", "WEZ": "WEZ", "SGT": "SGT", "HNOG": "HNOG", "EAT": "EAT", "GYT": "GYT", "HKT": "HKT", "AST": "AST", "ACDT": "ACDT", "JDT": "JDT", "UYST": "UYST", "HNT": "HNT", "WART": "WART", "GMT": "GMT", "HADT": "HADT", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "WITA": "WITA", "CDT": "CDT", "WIB": "WIB", "COT": "COT", "HEOG": "HEOG", "MDT": "MDT", "NZST": "NZST", "AWST": "AWST", "HNCU": "HNCU", "WAST": "WAST", "AKST": "AKST", "OESZ": "OESZ", "BOT": "BOT", "GFT": "GFT", "HEEG": "HEEG", "HENOMX": "HENOMX", "UYT": "UYT", "AEDT": "AEDT", "HEPMX": "HEPMX", "HAT": "HAT", "ECT": "ECT", "ChST": "ChST", "LHDT": "LHDT", "PST": "PST", "AEST": "AEST", "HNPMX": "HNPMX", "AKDT": "AKDT", "PDT": "PDT", "WARST": "WARST", "ACST": "ACST", "LHST": "LHST", "MYT": "MYT", "HEPM": "HEPM", "EST": "EST", "MST": "MST", "NZDT": "NZDT", "JST": "JST", "CHAST": "CHAST", "IST": "IST", "ACWST": "ACWST", "HECU": "HECU", "WESZ": "WESZ", "VET": "VET", "HAST": "HAST", "CST": "CST", "ART": "ART", "HNPM": "HNPM", "CHADT": "CHADT", "ACWDT": "ACWDT", "WIT": "WIT", "CLT": "CLT", "WAT": "WAT", "OEZ": "OEZ", "TMT": "TMT", "ARST": "ARST", "SRT": "SRT", "HNNOMX": "HNNOMX", "COST": "COST", "CLST": "CLST", "SAST": "SAST", "EDT": "EDT", "TMST": "TMST", "ADT": "ADT"}, - } - } -  -@@ -122,7 +114,7 @@ func (vai *vai_Vaii_LR) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (vai *vai_Vaii_LR) MonthsWide() []string { -- return vai.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -168,42 +160,7 @@ func (vai *vai_Vaii_LR) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'vai_Vaii_LR' and handles both Whole and Real numbers based on 'v' - func (vai *vai_Vaii_LR) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, vai.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'vai_Vaii_LR' and handles both Whole and Real numbers based on 'v' -@@ -217,56 +174,7 @@ func (vai *vai_Vaii_LR) FmtCurrency(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vai.currencies[currency] -- l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, vai.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vai.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'vai_Vaii_LR' -@@ -275,68 +183,7 @@ func (vai *vai_Vaii_LR) FmtAccounting(num float64, v uint64, currency currency.T -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vai.currencies[currency] -- l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vai.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vai.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, vai.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vai.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, vai.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'vai_Vaii_LR' -@@ -344,27 +191,6 @@ func (vai *vai_Vaii_LR) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -373,17 +199,6 @@ func (vai *vai_Vaii_LR) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -392,17 +207,6 @@ func (vai *vai_Vaii_LR) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -411,19 +215,6 @@ func (vai *vai_Vaii_LR) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, vai.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vai.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -432,28 +223,6 @@ func (vai *vai_Vaii_LR) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -462,35 +231,6 @@ func (vai *vai_Vaii_LR) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- - return string(b) - } -  -@@ -499,40 +239,6 @@ func (vai *vai_Vaii_LR) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -541,44 +247,5 @@ func (vai *vai_Vaii_LR) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vai.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, vai.periodsAbbreviated[0]...) -- } else { -- b = append(b, vai.periodsAbbreviated[1]...) -- } -- -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := vai.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/vi/vi.go b/vi/vi.go -index 8ec5f2e..ebcab6e 100644 ---- a/vi/vi.go -+++ b/vi/vi.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"tr. CN", "sau CN"}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"HADT": "Giờ Mùa Hè Hawaii-Aleutian", "BT": "Giờ Bhutan", "CHADT": "Giờ Mùa Hè Chatham", "CLST": "Giờ Mùa Hè Chile", "GFT": "Giờ Guiana thuộc Pháp", "OEZ": "Giờ Chuẩn Đông Âu", "SGT": "Giờ Singapore", "UYT": "Giờ Chuẩn Uruguay", "PST": "Giờ chuẩn Thái Bình Dương", "PDT": "Giờ Mùa hè Thái Bình Dương", "CLT": "Giờ Chuẩn Chile", "WART": "Giờ chuẩn miền mây Argentina", "SRT": "Giờ Suriname", "HNEG": "Giờ Chuẩn Miền Đông Greenland", "HENOMX": "Giờ Mùa Hè Tây Bắc Mexico", "HECU": "Giờ Mùa Hè Cuba", "GYT": "Giờ Guyana", "HEPM": "Giờ Mùa Hè Saint Pierre và Miquelon", "GMT": "Giờ Trung bình Greenwich", "HEPMX": "Giờ Mùa Hè Thái Bình Dương Mexico", "CST": "Giờ chuẩn miền trung", "HNPM": "Giờ Chuẩn St. Pierre và Miquelon", "NZST": "Giờ Chuẩn New Zealand", "HNNOMX": "Giờ Chuẩn Tây Bắc Mexico", "EST": "Giờ chuẩn miền đông", "WESZ": "Giờ Mùa hè Tây Âu", "ARST": "Giờ Mùa Hè Argentina", "ChST": "Giờ Chamorro", "OESZ": "Giờ Mùa Hè Đông Âu", "WIT": "Giờ Miền Đông Indonesia", "HEEG": "Giờ Mùa Hè Miền Đông Greenland", "ACDT": "Giờ Mùa Hè Miền Trung Nước Úc", "AEDT": "Giờ Mùa Hè Miền Đông Nước Úc", "BOT": "Giờ Bolivia", "COT": "Giờ Chuẩn Colombia", "MDT": "Giờ Mùa Hè Ma Cao", "AKST": "Giờ Chuẩn Alaska", "HAST": "Giờ Chuẩn Hawaii-Aleutian", "WEZ": "Giờ Chuẩn Tây Âu", "JST": "Giờ Chuẩn Nhật Bản", "HNPMX": "Giờ Chuẩn Thái Bình Dương Mexico", "CDT": "Giờ mùa hè miền trung", "UYST": "Giờ Mùa Hè Uruguay", "HKST": "Giờ Mùa Hè Hồng Kông", "AWDT": "Giờ Mùa Hè Miền Tây Nước Úc", "CAT": "Giờ Trung Phi", "WAST": "Giờ Mùa Hè Tây Phi", "WARST": "Giờ mùa hè miền tây Argentina", "WIB": "Giờ Miền Tây Indonesia", "ACWST": "Giờ Chuẩn Miền Trung Tây Nước Úc", "HNOG": "Giờ Chuẩn Miền Tây Greenland", "TMST": "Giờ Mùa Hè Turkmenistan", "ECT": "Giờ Ecuador", "HNCU": "Giờ Chuẩn Cuba", "LHDT": "Giờ Mùa Hè Lord Howe", "SAST": "Giờ Chuẩn Nam Phi", "VET": "Giờ Venezuela", "ART": "Giờ Chuẩn Argentina", "WITA": "Giờ Miền Trung Indonesia", "HEOG": "Giờ Mùa Hè Miền Tây Greenland", "LHST": "Giờ Chuẩn Lord Howe", "IST": "Giờ Chuẩn Ấn Độ", "ACST": "Giờ Chuẩn Miền Trung Nước Úc", "EAT": "Giờ Đông Phi", "ADT": "Giờ Mùa hè Đại Tây Dương", "MYT": "Giờ Malaysia", "NZDT": "Giờ Mùa Hè New Zealand", "HNT": "Giờ Chuẩn Newfoundland", "AEST": "Giờ Chuẩn Miền Đông Nước Úc", "AWST": "Giờ Chuẩn Miền Tây Nước Úc", "CHAST": "Giờ Chuẩn Chatham", "∅∅∅": "Giờ Mùa Hè Amazon", "WAT": "Giờ Chuẩn Tây Phi", "MST": "Giờ Chuẩn Ma Cao", "AST": "Giờ Chuẩn Đại Tây Dương", "HAT": "Giờ Mùa Hè Newfoundland", "AKDT": "Giờ Mùa Hè Alaska", "ACWDT": "Giờ Mùa Hè Miền Trung Tây Nước Úc", "MEZ": "Giờ Chuẩn Trung Âu", "MESZ": "Giờ Mùa Hè Trung Âu", "JDT": "Giờ Mùa Hè Nhật Bản", "TMT": "Giờ Chuẩn Turkmenistan", "COST": "Giờ Mùa Hè Colombia", "EDT": "Giờ mùa hè miền đông", "HKT": "Giờ Chuẩn Hồng Kông"}, -+ timezones: map[string]string{"∅∅∅": "Giờ Mùa Hè Brasilia", "CLST": "Giờ Mùa Hè Chile", "HNPM": "Giờ Chuẩn St. Pierre và Miquelon", "TMT": "Giờ Chuẩn Turkmenistan", "NZST": "Giờ Chuẩn New Zealand", "ADT": "Giờ Mùa hè Đại Tây Dương", "ACST": "Giờ Chuẩn Miền Trung Nước Úc", "JDT": "Giờ Mùa Hè Nhật Bản", "AEDT": "Giờ Mùa Hè Miền Đông Nước Úc", "HAT": "Giờ Mùa Hè Newfoundland", "BOT": "Giờ Bolivia", "HEEG": "Giờ Mùa Hè Miền Đông Greenland", "BT": "Giờ Bhutan", "WAST": "Giờ Mùa Hè Tây Phi", "WIT": "Giờ Miền Đông Indonesia", "EDT": "Giờ mùa hè miền đông", "TMST": "Giờ Mùa Hè Turkmenistan", "ECT": "Giờ Ecuador", "WIB": "Giờ Miền Tây Indonesia", "MDT": "Giờ Mùa Hè Ma Cao", "ARST": "Giờ Mùa Hè Argentina", "IST": "Giờ Chuẩn Ấn Độ", "SGT": "Giờ Singapore", "WITA": "Giờ Miền Trung Indonesia", "CDT": "Giờ mùa hè miền trung", "MST": "Giờ Chuẩn Ma Cao", "NZDT": "Giờ Mùa Hè New Zealand", "SRT": "Giờ Suriname", "AWST": "Giờ Chuẩn Miền Tây Nước Úc", "HECU": "Giờ Mùa Hè Cuba", "AKDT": "Giờ Mùa Hè Alaska", "HKT": "Giờ Chuẩn Hồng Kông", "CLT": "Giờ Chuẩn Chile", "HAST": "Giờ Chuẩn Hawaii-Aleutian", "MESZ": "Giờ Mùa Hè Trung Âu", "HNEG": "Giờ Chuẩn Miền Đông Greenland", "LHST": "Giờ Chuẩn Lord Howe", "LHDT": "Giờ Mùa Hè Lord Howe", "GFT": "Giờ Guiana thuộc Pháp", "AWDT": "Giờ Mùa Hè Miền Tây Nước Úc", "MYT": "Giờ Malaysia", "CHAST": "Giờ Chuẩn Chatham", "CHADT": "Giờ Mùa Hè Chatham", "WESZ": "Giờ Mùa hè Tây Âu", "PST": "Giờ chuẩn Thái Bình Dương", "PDT": "Giờ Mùa hè Thái Bình Dương", "HNPMX": "Giờ Chuẩn Thái Bình Dương Mexico", "WEZ": "Giờ Chuẩn Tây Âu", "VET": "Giờ Venezuela", "WARST": "Giờ mùa hè miền tây Argentina", "HNOG": "Giờ Chuẩn Miền Tây Greenland", "EST": "Giờ chuẩn miền đông", "CAT": "Giờ Trung Phi", "ART": "Giờ Chuẩn Argentina", "ChST": "Giờ Chamorro", "HADT": "Giờ Mùa Hè Hawaii-Aleutian", "AKST": "Giờ Chuẩn Alaska", "HEOG": "Giờ Mùa Hè Miền Tây Greenland", "HEPMX": "Giờ Mùa Hè Thái Bình Dương Mexico", "HNT": "Giờ Chuẩn Newfoundland", "GYT": "Giờ Guyana", "HKST": "Giờ Mùa Hè Hồng Kông", "GMT": "Giờ Trung bình Greenwich", "MEZ": "Giờ Chuẩn Trung Âu", "JST": "Giờ Chuẩn Nhật Bản", "ACWDT": "Giờ Mùa Hè Miền Trung Tây Nước Úc", "AEST": "Giờ Chuẩn Miền Đông Nước Úc", "SAST": "Giờ Chuẩn Nam Phi", "COT": "Giờ Chuẩn Colombia", "COST": "Giờ Mùa Hè Colombia", "AST": "Giờ Chuẩn Đại Tây Dương", "UYT": "Giờ Chuẩn Uruguay", "EAT": "Giờ Đông Phi", "HNNOMX": "Giờ Chuẩn Tây Bắc Mexico", "ACWST": "Giờ Chuẩn Miền Trung Tây Nước Úc", "WART": "Giờ chuẩn miền mây Argentina", "CST": "Giờ chuẩn miền trung", "HENOMX": "Giờ Mùa Hè Tây Bắc Mexico", "UYST": "Giờ Mùa Hè Uruguay", "HNCU": "Giờ Chuẩn Cuba", "OESZ": "Giờ Mùa Hè Đông Âu", "ACDT": "Giờ Mùa Hè Miền Trung Nước Úc", "HEPM": "Giờ Mùa Hè Saint Pierre và Miquelon", "WAT": "Giờ Chuẩn Tây Phi", "OEZ": "Giờ Chuẩn Đông Âu"}, - } - } -  -diff --git a/vi_VN/vi_VN.go b/vi_VN/vi_VN.go -index bb8073a..30547bb 100644 ---- a/vi_VN/vi_VN.go -+++ b/vi_VN/vi_VN.go -@@ -10,68 +10,45 @@ import ( - ) -  - type vi_VN struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'vi_VN' locale - func New() locales.Translator { - return &vi_VN{ -- locale: "vi_VN", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{2, 6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ",", -- group: ".", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "thg 1", "thg 2", "thg 3", "thg 4", "thg 5", "thg 6", "thg 7", "thg 8", "thg 9", "thg 10", "thg 11", "thg 12"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "tháng 1", "tháng 2", "tháng 3", "tháng 4", "tháng 5", "tháng 6", "tháng 7", "tháng 8", "tháng 9", "tháng 10", "tháng 11", "tháng 12"}, -- daysAbbreviated: []string{"CN", "Th 2", "Th 3", "Th 4", "Th 5", "Th 6", "Th 7"}, -- daysNarrow: []string{"CN", "T2", "T3", "T4", "T5", "T6", "T7"}, -- daysShort: []string{"CN", "T2", "T3", "T4", "T5", "T6", "T7"}, -- daysWide: []string{"Chủ Nhật", "Thứ Hai", "Thứ Ba", "Thứ Tư", "Thứ Năm", "Thứ Sáu", "Thứ Bảy"}, -- periodsAbbreviated: []string{"SA", "CH"}, -- periodsNarrow: []string{"s", "c"}, -- periodsWide: []string{"SA", "CH"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"tr. CN", "sau CN"}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"AEST": "Giờ Chuẩn Miền Đông Nước Úc", "GFT": "Giờ Guiana thuộc Pháp", "SRT": "Giờ Suriname", "WEZ": "Giờ Chuẩn Tây Âu", "HNT": "Giờ Chuẩn Newfoundland", "AWDT": "Giờ Mùa Hè Miền Tây Nước Úc", "HKT": "Giờ Chuẩn Hồng Kông", "HNPM": "Giờ Chuẩn St. Pierre và Miquelon", "MEZ": "Giờ Chuẩn Trung Âu", "LHDT": "Giờ Mùa Hè Lord Howe", "ECT": "Giờ Ecuador", "WART": "Giờ chuẩn miền mây Argentina", "GMT": "Giờ Trung bình Greenwich", "NZDT": "Giờ Mùa Hè New Zealand", "IST": "Giờ Chuẩn Ấn Độ", "TMST": "Giờ Mùa Hè Turkmenistan", "HEPMX": "Giờ Mùa Hè Thái Bình Dương Mexico", "WIB": "Giờ Miền Tây Indonesia", "HAST": "Giờ Chuẩn Hawaii-Aleutian", "HADT": "Giờ Mùa Hè Hawaii-Aleutian", "VET": "Giờ Venezuela", "∅∅∅": "Giờ Mùa Hè Peru", "OEZ": "Giờ Chuẩn Đông Âu", "HNCU": "Giờ Chuẩn Cuba", "MESZ": "Giờ Mùa Hè Trung Âu", "CLT": "Giờ Chuẩn Chile", "BOT": "Giờ Bolivia", "PDT": "Giờ Mùa hè Thái Bình Dương", "HNOG": "Giờ Chuẩn Miền Tây Greenland", "CHAST": "Giờ Chuẩn Chatham", "WIT": "Giờ Miền Đông Indonesia", "HNNOMX": "Giờ Chuẩn Tây Bắc Mexico", "SGT": "Giờ Singapore", "ADT": "Giờ Mùa hè Đại Tây Dương", "SAST": "Giờ Chuẩn Nam Phi", "WAST": "Giờ Mùa Hè Tây Phi", "HAT": "Giờ Mùa Hè Newfoundland", "LHST": "Giờ Chuẩn Lord Howe", "HEEG": "Giờ Mùa Hè Miền Đông Greenland", "HNPMX": "Giờ Chuẩn Thái Bình Dương Mexico", "ARST": "Giờ Mùa Hè Argentina", "WITA": "Giờ Miền Trung Indonesia", "CDT": "Giờ mùa hè miền trung", "HENOMX": "Giờ Mùa Hè Tây Bắc Mexico", "EST": "Giờ chuẩn miền đông", "MST": "Giờ Chuẩn Ma Cao", "HNEG": "Giờ Chuẩn Miền Đông Greenland", "OESZ": "Giờ Mùa Hè Đông Âu", "BT": "Giờ Bhutan", "HEOG": "Giờ Mùa Hè Miền Tây Greenland", "EAT": "Giờ Đông Phi", "EDT": "Giờ mùa hè miền đông", "AKST": "Giờ Chuẩn Alaska", "AWST": "Giờ Chuẩn Miền Tây Nước Úc", "HKST": "Giờ Mùa Hè Hồng Kông", "AEDT": "Giờ Mùa Hè Miền Đông Nước Úc", "TMT": "Giờ Chuẩn Turkmenistan", "ACST": "Giờ Chuẩn Miền Trung Nước Úc", "COT": "Giờ Chuẩn Colombia", "HECU": "Giờ Mùa Hè Cuba", "WESZ": "Giờ Mùa hè Tây Âu", "PST": "Giờ chuẩn Thái Bình Dương", "NZST": "Giờ Chuẩn New Zealand", "CHADT": "Giờ Mùa Hè Chatham", "JDT": "Giờ Mùa Hè Nhật Bản", "ChST": "Giờ Chamorro", "WARST": "Giờ mùa hè miền tây Argentina", "CST": "Giờ chuẩn miền trung", "GYT": "Giờ Guyana", "AST": "Giờ Chuẩn Đại Tây Dương", "ACWST": "Giờ Chuẩn Miền Trung Tây Nước Úc", "ACWDT": "Giờ Mùa Hè Miền Trung Tây Nước Úc", "ACDT": "Giờ Mùa Hè Miền Trung Nước Úc", "WAT": "Giờ Chuẩn Tây Phi", "MDT": "Giờ Mùa Hè Ma Cao", "UYT": "Giờ Chuẩn Uruguay", "AKDT": "Giờ Mùa Hè Alaska", "HEPM": "Giờ Mùa Hè Saint Pierre và Miquelon", "CLST": "Giờ Mùa Hè Chile", "JST": "Giờ Chuẩn Nhật Bản", "COST": "Giờ Mùa Hè Colombia", "MYT": "Giờ Malaysia", "UYST": "Giờ Mùa Hè Uruguay", "CAT": "Giờ Trung Phi", "ART": "Giờ Chuẩn Argentina"}, -+ locale: "vi_VN", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{2, 6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HAT": "HAT", "WART": "WART", "NZST": "NZST", "ADT": "ADT", "HENOMX": "HENOMX", "AWDT": "AWDT", "AEST": "AEST", "CHADT": "CHADT", "SAST": "SAST", "HNNOMX": "HNNOMX", "IST": "IST", "AKDT": "AKDT", "AWST": "AWST", "HEPM": "HEPM", "PST": "PST", "UYST": "UYST", "VET": "VET", "HNT": "HNT", "CST": "CST", "EAT": "EAT", "ACDT": "ACDT", "HECU": "HECU", "WAST": "WAST", "GFT": "GFT", "WIT": "WIT", "WITA": "WITA", "CDT": "CDT", "ECT": "ECT", "ACST": "ACST", "JST": "JST", "UYT": "UYT", "OEZ": "OEZ", "MDT": "MDT", "NZDT": "NZDT", "HEOG": "HEOG", "EST": "EST", "HKT": "HKT", "ACWST": "ACWST", "WARST": "WARST", "HKST": "HKST", "SRT": "SRT", "MEZ": "MEZ", "MYT": "MYT", "AEDT": "AEDT", "HEPMX": "HEPMX", "OESZ": "OESZ", "GMT": "GMT", "BOT": "BOT", "HAST": "HAST", "ACWDT": "ACWDT", "HNCU": "HNCU", "CLT": "CLT", "HNEG": "HNEG", "LHDT": "LHDT", "HNPM": "HNPM", "WAT": "WAT", "AKST": "AKST", "COST": "COST", "∅∅∅": "∅∅∅", "TMT": "TMT", "TMST": "TMST", "CAT": "CAT", "MST": "MST", "MESZ": "MESZ", "HEEG": "HEEG", "PDT": "PDT", "CHAST": "CHAST", "WEZ": "WEZ", "GYT": "GYT", "COT": "COT", "WIB": "WIB", "AST": "AST", "ChST": "ChST", "ART": "ART", "HADT": "HADT", "EDT": "EDT", "BT": "BT", "HNOG": "HNOG", "ARST": "ARST", "HNPMX": "HNPMX", "CLST": "CLST", "LHST": "LHST", "JDT": "JDT", "WESZ": "WESZ", "SGT": "SGT"}, - } - } -  -@@ -124,7 +101,7 @@ func (vi *vi_VN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (vi *vi_VN) MonthsAbbreviated() []string { -- return vi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -134,7 +111,7 @@ func (vi *vi_VN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (vi *vi_VN) MonthsNarrow() []string { -- return vi.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -144,7 +121,7 @@ func (vi *vi_VN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (vi *vi_VN) MonthsWide() []string { -- return vi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -190,73 +167,13 @@ func (vi *vi_VN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'vi_VN' and handles both Whole and Real numbers based on 'v' - func (vi *vi_VN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vi.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, vi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'vi_VN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (vi *vi_VN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vi.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, vi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, vi.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'vi_VN' -@@ -264,56 +181,7 @@ func (vi *vi_VN) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vi.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vi.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, vi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, vi.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'vi_VN' -@@ -322,63 +190,7 @@ func (vi *vi_VN) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vi.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vi.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vi.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, vi.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vi.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, vi.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, vi.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'vi_VN' -@@ -386,27 +198,6 @@ func (vi *vi_VN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -415,17 +206,6 @@ func (vi *vi_VN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vi.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -434,17 +214,6 @@ func (vi *vi_VN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -453,19 +222,6 @@ func (vi *vi_VN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, vi.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -474,19 +230,6 @@ func (vi *vi_VN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -495,26 +238,6 @@ func (vi *vi_VN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -523,30 +246,6 @@ func (vi *vi_VN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -555,34 +254,5 @@ func (vi *vi_VN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := vi.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/vo/vo.go b/vo/vo.go -index 6c29b87..a2824b9 100644 ---- a/vo/vo.go -+++ b/vo/vo.go -@@ -57,7 +57,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"b. t. kr.", "p. t. kr."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"b. t. kr.", "p. t. kr."}, -- timezones: map[string]string{"WEZ": "WEZ", "AEDT": "AEDT", "AKDT": "AKDT", "ADT": "ADT", "GYT": "GYT", "MESZ": "MESZ", "COST": "COST", "ART": "ART", "MEZ": "MEZ", "CLST": "CLST", "BOT": "BOT", "∅∅∅": "∅∅∅", "OESZ": "OESZ", "HNNOMX": "HNNOMX", "MDT": "MDT", "MYT": "MYT", "CDT": "CDT", "HADT": "HADT", "HNEG": "HNEG", "ACST": "ACST", "WESZ": "WESZ", "ACWDT": "ACWDT", "NZDT": "NZDT", "JST": "JST", "HECU": "HECU", "SRT": "SRT", "AST": "AST", "WIT": "WIT", "HNPM": "HNPM", "LHDT": "LHDT", "OEZ": "OEZ", "MST": "MST", "BT": "BT", "PST": "PST", "ARST": "ARST", "AWDT": "AWDT", "LHST": "LHST", "GFT": "GFT", "SGT": "SGT", "HEPMX": "HEPMX", "CST": "CST", "HNOG": "HNOG", "AEST": "AEST", "HEPM": "HEPM", "WAST": "WAST", "GMT": "GMT", "EDT": "EDT", "AKST": "AKST", "HAST": "HAST", "VET": "VET", "ACWST": "ACWST", "HAT": "HAT", "EAT": "EAT", "HENOMX": "HENOMX", "WITA": "WITA", "JDT": "JDT", "HNPMX": "HNPMX", "AWST": "AWST", "HKT": "HKT", "IST": "IST", "COT": "COT", "PDT": "PDT", "UYT": "UYT", "UYST": "UYST", "CHADT": "CHADT", "ChST": "ChST", "ECT": "ECT", "EST": "EST", "HNT": "HNT", "CLT": "CLT", "ACDT": "ACDT", "WAT": "WAT", "HNCU": "HNCU", "HKST": "HKST", "HEEG": "HEEG", "TMST": "TMST", "WIB": "WIB", "NZST": "NZST", "CHAST": "CHAST", "CAT": "CAT", "WART": "WART", "HEOG": "HEOG", "SAST": "SAST", "TMT": "TMT", "WARST": "WARST"}, -+ timezones: map[string]string{"HNNOMX": "HNNOMX", "LHST": "LHST", "LHDT": "LHDT", "PDT": "PDT", "GFT": "GFT", "CDT": "CDT", "ECT": "ECT", "HNPM": "HNPM", "HEPM": "HEPM", "IST": "IST", "WAT": "WAT", "NZDT": "NZDT", "ARST": "ARST", "CHAST": "CHAST", "UYST": "UYST", "HECU": "HECU", "OEZ": "OEZ", "HNT": "HNT", "WITA": "WITA", "MDT": "MDT", "HEEG": "HEEG", "WAST": "WAST", "HNOG": "HNOG", "AKST": "AKST", "MST": "MST", "NZST": "NZST", "EAT": "EAT", "ACDT": "ACDT", "HENOMX": "HENOMX", "UYT": "UYT", "HNPMX": "HNPMX", "COST": "COST", "HEOG": "HEOG", "HKST": "HKST", "JST": "JST", "JDT": "JDT", "GYT": "GYT", "VET": "VET", "HNCU": "HNCU", "∅∅∅": "∅∅∅", "WIB": "WIB", "ADT": "ADT", "MYT": "MYT", "SGT": "SGT", "AEST": "AEST", "CHADT": "CHADT", "CLST": "CLST", "MESZ": "MESZ", "ACWDT": "ACWDT", "OESZ": "OESZ", "WART": "WART", "HNEG": "HNEG", "AWDT": "AWDT", "BT": "BT", "EST": "EST", "TMT": "TMT", "TMST": "TMST", "CST": "CST", "HADT": "HADT", "AWST": "AWST", "AEDT": "AEDT", "PST": "PST", "AKDT": "AKDT", "HAT": "HAT", "CLT": "CLT", "ACST": "ACST", "WIT": "WIT", "SAST": "SAST", "COT": "COT", "AST": "AST", "GMT": "GMT", "ART": "ART", "EDT": "EDT", "HKT": "HKT", "ChST": "ChST", "MEZ": "MEZ", "HEPMX": "HEPMX", "WEZ": "WEZ", "WARST": "WARST", "CAT": "CAT", "BOT": "BOT", "SRT": "SRT", "HAST": "HAST", "ACWST": "ACWST", "WESZ": "WESZ"}, - } - } -  -diff --git a/vo_001/vo_001.go b/vo_001/vo_001.go -index b2248cb..e0344c7 100644 ---- a/vo_001/vo_001.go -+++ b/vo_001/vo_001.go -@@ -42,22 +42,13 @@ type vo_001 struct { - // New returns a new instance of translator for the 'vo_001' locale - func New() locales.Translator { - return &vo_001{ -- locale: "vo_001", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "yan", "feb", "mäz", "prl", "may", "yun", "yul", "gst", "set", "ton", "nov", "dek"}, -- monthsNarrow: []string{"", "Y", "F", "M", "P", "M", "Y", "Y", "G", "S", "T", "N", "D"}, -- monthsWide: []string{"", "yanul", "febul", "mäzul", "prilul", "mayul", "yunul", "yulul", "gustul", "setul", "tobul", "novul", "dekul"}, -- daysAbbreviated: []string{"su.", "mu.", "tu.", "ve.", "dö.", "fr.", "zä."}, -- daysNarrow: []string{"S", "M", "T", "V", "D", "F", "Z"}, -- daysWide: []string{"sudel", "mudel", "tudel", "vedel", "dödel", "fridel", "zädel"}, -- erasAbbreviated: []string{"b. t. kr.", "p. t. kr."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"b. t. kr.", "p. t. kr."}, -- timezones: map[string]string{"HADT": "HADT", "HNT": "HNT", "ARST": "ARST", "ACWST": "ACWST", "AEST": "AEST", "∅∅∅": "∅∅∅", "HAST": "HAST", "CHADT": "CHADT", "JDT": "JDT", "ECT": "ECT", "EDT": "EDT", "ADT": "ADT", "SRT": "SRT", "ACWDT": "ACWDT", "HKST": "HKST", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "GMT": "GMT", "HAT": "HAT", "SAST": "SAST", "OESZ": "OESZ", "HNOG": "HNOG", "HEOG": "HEOG", "AWST": "AWST", "NZDT": "NZDT", "TMST": "TMST", "ChST": "ChST", "HNPMX": "HNPMX", "IST": "IST", "ACST": "ACST", "GYT": "GYT", "UYT": "UYT", "UYST": "UYST", "LHDT": "LHDT", "CLT": "CLT", "BOT": "BOT", "HEPMX": "HEPMX", "MDT": "MDT", "PDT": "PDT", "MESZ": "MESZ", "JST": "JST", "EST": "EST", "MYT": "MYT", "SGT": "SGT", "MST": "MST", "WIT": "WIT", "AEDT": "AEDT", "NZST": "NZST", "CAT": "CAT", "WAT": "WAT", "COT": "COT", "AKDT": "AKDT", "VET": "VET", "BT": "BT", "CHAST": "CHAST", "WART": "WART", "AST": "AST", "WITA": "WITA", "MEZ": "MEZ", "CLST": "CLST", "WARST": "WARST", "WEZ": "WEZ", "AWDT": "AWDT", "LHST": "LHST", "TMT": "TMT", "HEPM": "HEPM", "COST": "COST", "HENOMX": "HENOMX", "CDT": "CDT", "EAT": "EAT", "CST": "CST", "WAST": "WAST", "WIB": "WIB", "ART": "ART", "WESZ": "WESZ", "HKT": "HKT", "GFT": "GFT", "ACDT": "ACDT", "OEZ": "OEZ", "PST": "PST", "HNPM": "HNPM", "HEEG": "HEEG", "HNCU": "HNCU", "HECU": "HECU", "AKST": "AKST"}, -+ locale: "vo_001", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKST": "AKST", "OEZ": "OEZ", "BOT": "BOT", "MEZ": "MEZ", "ACWST": "ACWST", "OESZ": "OESZ", "HEOG": "HEOG", "CDT": "CDT", "PST": "PST", "UYST": "UYST", "WEZ": "WEZ", "WAT": "WAT", "WAST": "WAST", "HNT": "HNT", "HKT": "HKT", "NZST": "NZST", "ARST": "ARST", "MST": "MST", "MYT": "MYT", "BT": "BT", "WARST": "WARST", "TMT": "TMT", "TMST": "TMST", "EAT": "EAT", "PDT": "PDT", "CHADT": "CHADT", "WESZ": "WESZ", "MDT": "MDT", "HNEG": "HNEG", "JDT": "JDT", "COT": "COT", "CAT": "CAT", "CLT": "CLT", "HAST": "HAST", "HENOMX": "HENOMX", "LHST": "LHST", "EST": "EST", "NZDT": "NZDT", "ADT": "ADT", "GMT": "GMT", "MESZ": "MESZ", "AWST": "AWST", "HNPMX": "HNPMX", "COST": "COST", "HKST": "HKST", "WIB": "WIB", "ChST": "ChST", "JST": "JST", "ACWDT": "ACWDT", "ART": "ART", "HADT": "HADT", "HNNOMX": "HNNOMX", "AEDT": "AEDT", "UYT": "UYT", "GYT": "GYT", "HNOG": "HNOG", "ACDT": "ACDT", "HNPM": "HNPM", "HEPM": "HEPM", "∅∅∅": "∅∅∅", "AEST": "AEST", "SAST": "SAST", "ECT": "ECT", "SRT": "SRT", "HEEG": "HEEG", "HNCU": "HNCU", "CST": "CST", "AWDT": "AWDT", "IST": "IST", "HEPMX": "HEPMX", "ACST": "ACST", "LHDT": "LHDT", "VET": "VET", "HECU": "HECU", "WART": "WART", "WITA": "WITA", "CHAST": "CHAST", "SGT": "SGT", "AKDT": "AKDT", "EDT": "EDT", "AST": "AST", "GFT": "GFT", "HAT": "HAT", "WIT": "WIT", "CLST": "CLST"}, - } - } -  -@@ -110,7 +101,7 @@ func (vo *vo_001) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (vo *vo_001) MonthsAbbreviated() []string { -- return vo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -120,7 +111,7 @@ func (vo *vo_001) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (vo *vo_001) MonthsNarrow() []string { -- return vo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -130,7 +121,7 @@ func (vo *vo_001) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (vo *vo_001) MonthsWide() []string { -- return vo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -207,28 +198,6 @@ func (vo *vo_001) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2d}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2d}...) -- -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -237,17 +206,6 @@ func (vo *vo_001) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, vo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -256,17 +214,6 @@ func (vo *vo_001) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, vo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -275,20 +222,6 @@ func (vo *vo_001) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x20}...) -- b = append(b, vo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x61}...) -- b = append(b, []byte{0x20, 0x64}...) -- b = append(b, []byte{0x2e, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x69, 0x64}...) -- - return string(b) - } -  -@@ -297,19 +230,6 @@ func (vo *vo_001) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -318,26 +238,6 @@ func (vo *vo_001) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -346,30 +246,6 @@ func (vo *vo_001) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -378,34 +254,5 @@ func (vo *vo_001) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := vo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/vun/vun.go b/vun/vun.go -index 6d71c51..e711bd6 100644 ---- a/vun/vun.go -+++ b/vun/vun.go -@@ -59,7 +59,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"KK", "BK"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kabla ya Kristu", "Baada ya Kristu"}, -- timezones: map[string]string{"HNNOMX": "HNNOMX", "MDT": "MDT", "UYST": "UYST", "WAT": "WAT", "HNPMX": "HNPMX", "CDT": "CDT", "AWST": "AWST", "WITA": "WITA", "MESZ": "MESZ", "GFT": "GFT", "OESZ": "OESZ", "GMT": "GMT", "HNCU": "HNCU", "BT": "BT", "HAT": "HAT", "NZDT": "NZDT", "ECT": "ECT", "ACWST": "ACWST", "AEDT": "AEDT", "WESZ": "WESZ", "ACWDT": "ACWDT", "JDT": "JDT", "TMT": "TMT", "WAST": "WAST", "HAST": "HAST", "PDT": "PDT", "WEZ": "WEZ", "AEST": "AEST", "CAT": "CAT", "SGT": "SGT", "AST": "AST", "HKT": "HKT", "HNPM": "HNPM", "HEPM": "HEPM", "COT": "COT", "EDT": "EDT", "AKST": "AKST", "HNT": "HNT", "ARST": "ARST", "HKST": "HKST", "SAST": "SAST", "CLST": "CLST", "∅∅∅": "∅∅∅", "WARST": "WARST", "ART": "ART", "HNOG": "HNOG", "WIT": "WIT", "MST": "MST", "SRT": "SRT", "ACST": "ACST", "OEZ": "OEZ", "EST": "EST", "PST": "PST", "HEOG": "HEOG", "LHDT": "LHDT", "HADT": "HADT", "VET": "VET", "BOT": "BOT", "EAT": "EAT", "WART": "WART", "HENOMX": "HENOMX", "HECU": "HECU", "MYT": "MYT", "CHADT": "CHADT", "GYT": "GYT", "UYT": "UYT", "CLT": "CLT", "ChST": "ChST", "ACDT": "ACDT", "COST": "COST", "AKDT": "AKDT", "CST": "CST", "WIB": "WIB", "AWDT": "AWDT", "LHST": "LHST", "TMST": "TMST", "HEPMX": "HEPMX", "ADT": "ADT", "NZST": "NZST", "JST": "JST", "HNEG": "HNEG", "HEEG": "HEEG", "MEZ": "MEZ", "CHAST": "CHAST", "IST": "IST"}, -+ timezones: map[string]string{"COT": "COT", "MST": "MST", "HENOMX": "HENOMX", "MESZ": "MESZ", "HNPM": "HNPM", "MYT": "MYT", "UYST": "UYST", "OEZ": "OEZ", "BOT": "BOT", "EAT": "EAT", "AEDT": "AEDT", "CHADT": "CHADT", "SRT": "SRT", "OESZ": "OESZ", "COST": "COST", "HKST": "HKST", "WART": "WART", "WITA": "WITA", "CST": "CST", "MDT": "MDT", "AST": "AST", "ADT": "ADT", "WEZ": "WEZ", "HAT": "HAT", "HKT": "HKT", "CAT": "CAT", "JDT": "JDT", "CHAST": "CHAST", "HADT": "HADT", "AWST": "AWST", "AWDT": "AWDT", "AKST": "AKST", "TMT": "TMT", "ART": "ART", "HNEG": "HNEG", "LHDT": "LHDT", "HEOG": "HEOG", "HNCU": "HNCU", "WIB": "WIB", "CDT": "CDT", "NZST": "NZST", "HEPM": "HEPM", "ACWDT": "ACWDT", "PDT": "PDT", "BT": "BT", "VET": "VET", "GYT": "GYT", "CLST": "CLST", "GMT": "GMT", "HAST": "HAST", "UYT": "UYT", "WIT": "WIT", "∅∅∅": "∅∅∅", "ARST": "ARST", "ChST": "ChST", "ACST": "ACST", "AEST": "AEST", "HECU": "HECU", "EDT": "EDT", "IST": "IST", "WESZ": "WESZ", "WAST": "WAST", "HNT": "HNT", "HNOG": "HNOG", "CLT": "CLT", "ECT": "ECT", "HNNOMX": "HNNOMX", "ACDT": "ACDT", "LHST": "LHST", "WAT": "WAT", "NZDT": "NZDT", "PST": "PST", "HNPMX": "HNPMX", "SGT": "SGT", "AKDT": "AKDT", "GFT": "GFT", "EST": "EST", "HEEG": "HEEG", "MEZ": "MEZ", "JST": "JST", "ACWST": "ACWST", "HEPMX": "HEPMX", "WARST": "WARST", "SAST": "SAST", "TMST": "TMST"}, - } - } -  -diff --git a/vun_TZ/vun_TZ.go b/vun_TZ/vun_TZ.go -index bdee973..5c1b385 100644 ---- a/vun_TZ/vun_TZ.go -+++ b/vun_TZ/vun_TZ.go -@@ -42,24 +42,13 @@ type vun_TZ struct { - // New returns a new instance of translator for the 'vun_TZ' locale - func New() locales.Translator { - return &vun_TZ{ -- locale: "vun_TZ", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprilyi", "Mei", "Junyi", "Julyai", "Agusti", "Septemba", "Oktoba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"}, -- daysNarrow: []string{"J", "J", "J", "J", "A", "I", "J"}, -- daysWide: []string{"Jumapilyi", "Jumatatuu", "Jumanne", "Jumatanu", "Alhamisi", "Ijumaa", "Jumamosi"}, -- periodsAbbreviated: []string{"utuko", "kyiukonyi"}, -- periodsWide: []string{"utuko", "kyiukonyi"}, -- erasAbbreviated: []string{"KK", "BK"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kabla ya Kristu", "Baada ya Kristu"}, -- timezones: map[string]string{"AST": "AST", "MYT": "MYT", "MST": "MST", "MDT": "MDT", "ART": "ART", "WESZ": "WESZ", "CLT": "CLT", "CDT": "CDT", "HEEG": "HEEG", "OESZ": "OESZ", "ChST": "ChST", "WITA": "WITA", "NZST": "NZST", "WAT": "WAT", "EST": "EST", "WIT": "WIT", "GFT": "GFT", "ACST": "ACST", "ACDT": "ACDT", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "∅∅∅": "∅∅∅", "CAT": "CAT", "HNOG": "HNOG", "HEPM": "HEPM", "SGT": "SGT", "HNT": "HNT", "AKST": "AKST", "HAT": "HAT", "HEOG": "HEOG", "AEST": "AEST", "WART": "WART", "UYST": "UYST", "ACWST": "ACWST", "WIB": "WIB", "HKST": "HKST", "HNPM": "HNPM", "MESZ": "MESZ", "LHST": "LHST", "JDT": "JDT", "WARST": "WARST", "HNCU": "HNCU", "GYT": "GYT", "HECU": "HECU", "SRT": "SRT", "SAST": "SAST", "TMT": "TMT", "EAT": "EAT", "WAST": "WAST", "COST": "COST", "HNNOMX": "HNNOMX", "CST": "CST", "AEDT": "AEDT", "AWST": "AWST", "JST": "JST", "GMT": "GMT", "HAST": "HAST", "VET": "VET", "BT": "BT", "CHADT": "CHADT", "HADT": "HADT", "PDT": "PDT", "LHDT": "LHDT", "TMST": "TMST", "EDT": "EDT", "UYT": "UYT", "AKDT": "AKDT", "ARST": "ARST", "PST": "PST", "IST": "IST", "CLST": "CLST", "BOT": "BOT", "COT": "COT", "ADT": "ADT", "HNEG": "HNEG", "ECT": "ECT", "HEPMX": "HEPMX", "HKT": "HKT", "AWDT": "AWDT", "OEZ": "OEZ", "ACWDT": "ACWDT", "CHAST": "CHAST", "MEZ": "MEZ", "NZDT": "NZDT", "WEZ": "WEZ"}, -+ locale: "vun_TZ", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CAT": "CAT", "ACST": "ACST", "MYT": "MYT", "UYT": "UYT", "PDT": "PDT", "OESZ": "OESZ", "HEOG": "HEOG", "WEZ": "WEZ", "WARST": "WARST", "COST": "COST", "EST": "EST", "EDT": "EDT", "HNOG": "HNOG", "MST": "MST", "HNEG": "HNEG", "JST": "JST", "ACWDT": "ACWDT", "AEST": "AEST", "WAT": "WAT", "WART": "WART", "HADT": "HADT", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "PST": "PST", "HKT": "HKT", "ECT": "ECT", "EAT": "EAT", "HENOMX": "HENOMX", "HEPM": "HEPM", "BT": "BT", "TMST": "TMST", "CDT": "CDT", "HNNOMX": "HNNOMX", "NZDT": "NZDT", "AWST": "AWST", "LHDT": "LHDT", "SGT": "SGT", "HEPMX": "HEPMX", "SAST": "SAST", "JDT": "JDT", "WAST": "WAST", "COT": "COT", "MDT": "MDT", "ARST": "ARST", "ACDT": "ACDT", "AEDT": "AEDT", "AKST": "AKST", "OEZ": "OEZ", "GYT": "GYT", "ADT": "ADT", "AWDT": "AWDT", "CHADT": "CHADT", "HECU": "HECU", "SRT": "SRT", "BOT": "BOT", "HAST": "HAST", "HEEG": "HEEG", "VET": "VET", "HNT": "HNT", "TMT": "TMT", "CLT": "CLT", "ChST": "ChST", "IST": "IST", "CST": "CST", "NZST": "NZST", "ACWST": "ACWST", "WITA": "WITA", "WIB": "WIB", "GMT": "GMT", "ART": "ART", "CHAST": "CHAST", "HNPMX": "HNPMX", "GFT": "GFT", "HAT": "HAT", "CLST": "CLST", "WESZ": "WESZ", "HNCU": "HNCU", "WIT": "WIT", "UYST": "UYST", "AKDT": "AKDT", "HKST": "HKST", "AST": "AST", "MESZ": "MESZ", "LHST": "LHST", "HNPM": "HNPM"}, - } - } -  -@@ -112,7 +101,7 @@ func (vun *vun_TZ) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (vun *vun_TZ) MonthsAbbreviated() []string { -- return vun.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -122,7 +111,7 @@ func (vun *vun_TZ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (vun *vun_TZ) MonthsNarrow() []string { -- return vun.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -132,7 +121,7 @@ func (vun *vun_TZ) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (vun *vun_TZ) MonthsWide() []string { -- return vun.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -192,56 +181,7 @@ func (vun *vun_TZ) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vun.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vun.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vun.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, vun.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vun.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'vun_TZ' -@@ -250,64 +190,7 @@ func (vun *vun_TZ) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := vun.currencies[currency] -- l := len(s) + len(symbol) + 0 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, vun.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, vun.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, vun.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, vun.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'vun_TZ' -@@ -315,27 +198,6 @@ func (vun *vun_TZ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -344,17 +206,6 @@ func (vun *vun_TZ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vun.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -363,17 +214,6 @@ func (vun *vun_TZ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vun.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -382,19 +222,6 @@ func (vun *vun_TZ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, vun.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, vun.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -403,19 +230,6 @@ func (vun *vun_TZ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -424,26 +238,6 @@ func (vun *vun_TZ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -452,30 +246,6 @@ func (vun *vun_TZ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -484,34 +254,5 @@ func (vun *vun_TZ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, vun.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := vun.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/wae/wae.go b/wae/wae.go -index c9fef7b..cddb28a 100644 ---- a/wae/wae.go -+++ b/wae/wae.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"v. Chr.", "n. Chr"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"", ""}, -- timezones: map[string]string{"JDT": "JDT", "HNCU": "HNCU", "HKT": "HKT", "SRT": "SRT", "AWDT": "AWDT", "CHAST": "CHAST", "SAST": "SAST", "WAST": "WAST", "HNNOMX": "HNNOMX", "MST": "MST", "CST": "CST", "NZST": "NZST", "VET": "VET", "ART": "ART", "PDT": "PDT", "HNPM": "HNPM", "TMST": "TMST", "ChST": "ChST", "ACST": "ACST", "WARST": "WARST", "HEPMX": "HEPMX", "HNOG": "HNOG", "MEZ": "Mitteleuropäiši Standardzit", "∅∅∅": "∅∅∅", "HNPMX": "HNPMX", "WIB": "WIB", "BT": "BT", "HAT": "HAT", "LHDT": "LHDT", "WART": "WART", "AKDT": "AKDT", "HNT": "HNT", "JST": "JST", "OESZ": "Ošteuropäiši Summerzit", "HENOMX": "HENOMX", "MESZ": "Mitteleuropäiši Summerzit", "IST": "IST", "EST": "EST", "WITA": "WITA", "CHADT": "CHADT", "GFT": "GFT", "TMT": "TMT", "OEZ": "Ošteuropäiši Standardzit", "COT": "COT", "AST": "Atlantiši Standardzit", "LHST": "LHST", "WAT": "WAT", "GMT": "GMT", "MDT": "MDT", "UYST": "UYST", "ACWST": "ACWST", "ACDT": "ACDT", "COST": "COST", "HEOG": "HEOG", "WESZ": "Wešteuropäiši Summerzit", "HNEG": "HNEG", "AKST": "AKST", "AEST": "AEST", "AEDT": "AEDT", "AWST": "AWST", "HKST": "HKST", "HEEG": "HEEG", "CAT": "CAT", "EDT": "EDT", "HAST": "HAST", "NZDT": "NZDT", "CLST": "CLST", "ECT": "ECT", "ARST": "ARST", "ACWDT": "ACWDT", "CLT": "CLT", "SGT": "SGT", "GYT": "GYT", "HADT": "HADT", "PST": "PST", "WEZ": "Wešteuropäiši Standardzit", "MYT": "MYT", "UYT": "UYT", "HEPM": "HEPM", "BOT": "BOT", "EAT": "EAT", "HECU": "HECU", "CDT": "CDT", "ADT": "Atlantiši Summerzit", "WIT": "WIT"}, -+ timezones: map[string]string{"TMT": "TMT", "ADT": "Atlantiši Summerzit", "LHST": "LHST", "ACWDT": "ACWDT", "HECU": "HECU", "SAST": "SAST", "IST": "IST", "PST": "PST", "ACWST": "ACWST", "ARST": "ARST", "MEZ": "Mitteleuropäiši Standardzit", "HNPM": "HNPM", "UYT": "UYT", "∅∅∅": "∅∅∅", "WAST": "WAST", "WITA": "WITA", "ECT": "ECT", "CHAST": "CHAST", "HNPMX": "HNPMX", "OEZ": "Ošteuropäiši Standardzit", "EST": "EST", "HKST": "HKST", "AWDT": "AWDT", "COST": "COST", "CST": "CST", "HENOMX": "HENOMX", "MYT": "MYT", "WESZ": "Wešteuropäiši Summerzit", "CDT": "CDT", "SGT": "SGT", "TMST": "TMST", "HAST": "HAST", "HNNOMX": "HNNOMX", "WIT": "WIT", "HNOG": "HNOG", "CHADT": "CHADT", "HEPMX": "HEPMX", "BOT": "BOT", "JST": "JST", "HNT": "HNT", "HAT": "HAT", "GYT": "GYT", "AKST": "AKST", "HEOG": "HEOG", "EDT": "EDT", "GMT": "GMT", "ChST": "ChST", "MDT": "MDT", "SRT": "SRT", "LHDT": "LHDT", "CLT": "CLT", "AST": "Atlantiši Standardzit", "OESZ": "Ošteuropäiši Summerzit", "WARST": "WARST", "COT": "COT", "CLST": "CLST", "HNCU": "HNCU", "WAT": "WAT", "AKDT": "AKDT", "MESZ": "Mitteleuropäiši Summerzit", "HEPM": "HEPM", "UYST": "UYST", "BT": "BT", "VET": "VET", "GFT": "GFT", "PDT": "PDT", "HKT": "HKT", "WIB": "WIB", "AEST": "AEST", "WEZ": "Wešteuropäiši Standardzit", "NZDT": "NZDT", "MST": "MST", "HNEG": "HNEG", "HEEG": "HEEG", "AWST": "AWST", "JDT": "JDT", "HADT": "HADT", "ACST": "ACST", "ACDT": "ACDT", "AEDT": "AEDT", "NZST": "NZST", "ART": "ART", "EAT": "EAT", "WART": "WART", "CAT": "CAT"}, - } - } -  -diff --git a/wae_CH/wae_CH.go b/wae_CH/wae_CH.go -index 905ec50..449dd5c 100644 ---- a/wae_CH/wae_CH.go -+++ b/wae_CH/wae_CH.go -@@ -10,64 +10,45 @@ import ( - ) -  - type wae_CH struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'wae_CH' locale - func New() locales.Translator { - return &wae_CH{ -- locale: "wae_CH", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: "’", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "Jen", "Hor", "Mär", "Abr", "Mei", "Brá", "Hei", "Öig", "Her", "Wím", "Win", "Chr"}, -- monthsNarrow: []string{"", "J", "H", "M", "A", "M", "B", "H", "Ö", "H", "W", "W", "C"}, -- monthsWide: []string{"", "Jenner", "Hornig", "Märze", "Abrille", "Meije", "Bráčet", "Heiwet", "Öigšte", "Herbštmánet", "Wímánet", "Wintermánet", "Chrištmánet"}, -- daysAbbreviated: []string{"Sun", "Män", "Ziš", "Mit", "Fró", "Fri", "Sam"}, -- daysNarrow: []string{"S", "M", "Z", "M", "F", "F", "S"}, -- daysWide: []string{"Sunntag", "Mäntag", "Zištag", "Mittwuč", "Fróntag", "Fritag", "Samštag"}, -- erasAbbreviated: []string{"v. Chr.", "n. Chr"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"", ""}, -- timezones: map[string]string{"MESZ": "Mitteleuropäiši Summerzit", "JDT": "JDT", "ACDT": "ACDT", "OEZ": "Ošteuropäiši Standardzit", "WAST": "WAST", "HNPMX": "HNPMX", "PDT": "PDT", "ECT": "ECT", "AST": "Atlantiši Standardzit", "MYT": "MYT", "OESZ": "Ošteuropäiši Summerzit", "CAT": "CAT", "WARST": "WARST", "HENOMX": "HENOMX", "HNCU": "HNCU", "HECU": "HECU", "BOT": "BOT", "LHST": "LHST", "LHDT": "LHDT", "IST": "IST", "HEPMX": "HEPMX", "ARST": "ARST", "HKT": "HKT", "NZDT": "NZDT", "WAT": "WAT", "COT": "COT", "HNPM": "HNPM", "MEZ": "Mitteleuropäiši Standardzit", "TMT": "TMT", "ACWST": "ACWST", "WITA": "WITA", "ACST": "ACST", "GMT": "GMT", "EDT": "EDT", "MST": "MST", "PST": "PST", "SAST": "SAST", "JST": "JST", "SGT": "SGT", "WIB": "WIB", "HNNOMX": "HNNOMX", "HAT": "HAT", "HNOG": "HNOG", "AEST": "AEST", "AEDT": "AEDT", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "ChST": "ChST", "EST": "EST", "CST": "CST", "HAST": "HAST", "VET": "VET", "HEOG": "HEOG", "ACWDT": "ACWDT", "HNEG": "HNEG", "WART": "WART", "COST": "COST", "HADT": "HADT", "WIT": "WIT", "BT": "BT", "NZST": "NZST", "GFT": "GFT", "MDT": "MDT", "CDT": "CDT", "ART": "ART", "HKST": "HKST", "HEPM": "HEPM", "EAT": "EAT", "UYT": "UYT", "SRT": "SRT", "WEZ": "Wešteuropäiši Standardzit", "WESZ": "Wešteuropäiši Summerzit", "AWDT": "AWDT", "CLT": "CLT", "HEEG": "HEEG", "UYST": "UYST", "HNT": "HNT", "CHADT": "CHADT", "CLST": "CLST", "ADT": "Atlantiši Summerzit", "GYT": "GYT", "AWST": "AWST", "TMST": "TMST", "AKST": "AKST", "AKDT": "AKDT"}, -+ locale: "wae_CH", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "WAST": "WAST", "AKDT": "AKDT", "ECT": "ECT", "HEEG": "HEEG", "CHADT": "CHADT", "PST": "PST", "HECU": "HECU", "HAT": "HAT", "MEZ": "MEZ", "ACST": "ACST", "WEZ": "WEZ", "WARST": "WARST", "GMT": "GMT", "HAST": "HAST", "UYST": "UYST", "OESZ": "OESZ", "CAT": "CAT", "HNT": "HNT", "WART": "WART", "SGT": "SGT", "COT": "COT", "HKST": "HKST", "SRT": "SRT", "HNNOMX": "HNNOMX", "HNPM": "HNPM", "BT": "BT", "CHAST": "CHAST", "IST": "IST", "AKST": "AKST", "HNOG": "HNOG", "∅∅∅": "∅∅∅", "HEPM": "HEPM", "LHDT": "LHDT", "ACWST": "ACWST", "AEDT": "AEDT", "HEOG": "HEOG", "WIB": "WIB", "CDT": "CDT", "ACDT": "ACDT", "AWST": "AWST", "SAST": "SAST", "AST": "AST", "HENOMX": "HENOMX", "WAT": "WAT", "GFT": "GFT", "HKT": "HKT", "WITA": "WITA", "HADT": "HADT", "VET": "VET", "TMT": "TMT", "EST": "EST", "PDT": "PDT", "OEZ": "OEZ", "GYT": "GYT", "CLT": "CLT", "ARST": "ARST", "MESZ": "MESZ", "JST": "JST", "JDT": "JDT", "EDT": "EDT", "COST": "COST", "NZDT": "NZDT", "MST": "MST", "MDT": "MDT", "LHST": "LHST", "HNCU": "HNCU", "CLST": "CLST", "ChST": "ChST", "BOT": "BOT", "AWDT": "AWDT", "ADT": "ADT", "EAT": "EAT", "HNEG": "HNEG", "HNPMX": "HNPMX", "WIT": "WIT", "CST": "CST", "AEST": "AEST", "WESZ": "WESZ", "TMST": "TMST", "NZST": "NZST", "ART": "ART", "MYT": "MYT", "ACWDT": "ACWDT", "UYT": "UYT"}, - } - } -  -@@ -120,7 +101,7 @@ func (wae *wae_CH) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (wae *wae_CH) MonthsAbbreviated() []string { -- return wae.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -130,7 +111,7 @@ func (wae *wae_CH) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (wae *wae_CH) MonthsNarrow() []string { -- return wae.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -140,7 +121,7 @@ func (wae *wae_CH) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (wae *wae_CH) MonthsWide() []string { -- return wae.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -200,40 +181,7 @@ func (wae *wae_CH) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := wae.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, wae.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(wae.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, wae.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, wae.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, wae.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'wae_CH' -@@ -242,57 +190,7 @@ func (wae *wae_CH) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := wae.currencies[currency] -- l := len(s) + len(symbol) + 4 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, wae.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(wae.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, wae.currencyNegativePrefix[j]) -- } -- -- b = append(b, wae.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(wae.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, wae.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, wae.currencyNegativeSuffix...) -- } else { -- -- b = append(b, wae.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'wae_CH' -@@ -308,17 +206,6 @@ func (wae *wae_CH) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, wae.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -327,17 +214,6 @@ func (wae *wae_CH) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, wae.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -346,19 +222,6 @@ func (wae *wae_CH) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, wae.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2e, 0x20}...) -- b = append(b, wae.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -diff --git a/xog/xog.go b/xog/xog.go -index 3f0a44a..705e727 100644 ---- a/xog/xog.go -+++ b/xog/xog.go -@@ -63,7 +63,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"AZ", "AF"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Kulisto nga azilawo", "Kulisto nga affile"}, -- timezones: map[string]string{"CST": "CST", "BT": "BT", "SRT": "SRT", "HNT": "HNT", "NZST": "NZST", "SAST": "SAST", "UYT": "UYT", "WAT": "WAT", "NZDT": "NZDT", "CDT": "CDT", "WESZ": "WESZ", "ACWST": "ACWST", "ART": "ART", "HEOG": "HEOG", "HKT": "HKT", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "ACST": "ACST", "GFT": "GFT", "MEZ": "MEZ", "ACDT": "ACDT", "ECT": "ECT", "WIB": "WIB", "AST": "AST", "ACWDT": "ACWDT", "HNPM": "HNPM", "CHAST": "CHAST", "MDT": "MDT", "HECU": "HECU", "UYST": "UYST", "ADT": "ADT", "WIT": "WIT", "WEZ": "WEZ", "AEDT": "AEDT", "HEPM": "HEPM", "HNCU": "HNCU", "TMT": "TMT", "JST": "JST", "MYT": "MYT", "AEST": "AEST", "BOT": "BOT", "COT": "COT", "PDT": "PDT", "WITA": "WITA", "LHDT": "LHDT", "OESZ": "OESZ", "HEPMX": "HEPMX", "WAST": "WAST", "WARST": "WARST", "HADT": "HADT", "PST": "PST", "OEZ": "OEZ", "AKST": "AKST", "VET": "VET", "HAT": "HAT", "CLT": "CLT", "CLST": "CLST", "HAST": "HAST", "EDT": "EDT", "CHADT": "CHADT", "COST": "COST", "HNPMX": "HNPMX", "IST": "IST", "WART": "WART", "GMT": "GMT", "∅∅∅": "∅∅∅", "EST": "EST", "AWDT": "AWDT", "LHST": "LHST", "ChST": "ChST", "TMST": "TMST", "HENOMX": "HENOMX", "EAT": "EAT", "CAT": "CAT", "JDT": "JDT", "HEEG": "HEEG", "AWST": "AWST", "MST": "MST", "AKDT": "AKDT", "GYT": "GYT", "ARST": "ARST", "HNOG": "HNOG", "HKST": "HKST", "HNEG": "HNEG", "SGT": "SGT"}, -+ timezones: map[string]string{"CAT": "CAT", "ADT": "ADT", "ChST": "ChST", "HNNOMX": "HNNOMX", "MEZ": "MEZ", "ACST": "ACST", "CHADT": "CHADT", "BOT": "BOT", "PDT": "PDT", "HNCU": "HNCU", "WESZ": "WESZ", "HKT": "HKT", "CST": "CST", "HNEG": "HNEG", "HEOG": "HEOG", "GMT": "GMT", "JST": "JST", "AWDT": "AWDT", "BT": "BT", "CLST": "CLST", "ECT": "ECT", "MDT": "MDT", "HENOMX": "HENOMX", "UYST": "UYST", "HECU": "HECU", "WART": "WART", "NZDT": "NZDT", "HAST": "HAST", "MESZ": "MESZ", "LHST": "LHST", "CHAST": "CHAST", "PST": "PST", "WEZ": "WEZ", "AKST": "AKST", "SRT": "SRT", "COST": "COST", "∅∅∅": "∅∅∅", "JDT": "JDT", "AWST": "AWST", "WAT": "WAT", "HNT": "HNT", "HAT": "HAT", "HKST": "HKST", "WITA": "WITA", "NZST": "NZST", "ACWDT": "ACWDT", "HNPMX": "HNPMX", "SGT": "SGT", "MYT": "MYT", "AEDT": "AEDT", "AKDT": "AKDT", "GFT": "GFT", "WARST": "WARST", "TMT": "TMT", "WIB": "WIB", "AEST": "AEST", "IST": "IST", "OEZ": "OEZ", "TMST": "TMST", "AST": "AST", "ACDT": "ACDT", "HNPM": "HNPM", "WAST": "WAST", "WIT": "WIT", "HADT": "HADT", "HEEG": "HEEG", "GYT": "GYT", "EDT": "EDT", "MST": "MST", "ART": "ART", "EAT": "EAT", "HEPMX": "HEPMX", "VET": "VET", "OESZ": "OESZ", "SAST": "SAST", "COT": "COT", "EST": "EST", "HEPM": "HEPM", "CLT": "CLT", "CDT": "CDT", "ARST": "ARST", "LHDT": "LHDT", "ACWST": "ACWST", "UYT": "UYT", "HNOG": "HNOG"}, - } - } -  -diff --git a/xog_UG/xog_UG.go b/xog_UG/xog_UG.go -index 1c064d8..4be8ed2 100644 ---- a/xog_UG/xog_UG.go -+++ b/xog_UG/xog_UG.go -@@ -10,60 +10,45 @@ import ( - ) -  - type xog_UG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'xog_UG' locale - func New() locales.Translator { - return &xog_UG{ -- locale: "xog_UG", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativeSuffix: " ", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apu", "Maa", "Juu", "Jul", "Agu", "Seb", "Oki", "Nov", "Des"}, -- monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "Janwaliyo", "Febwaliyo", "Marisi", "Apuli", "Maayi", "Juuni", "Julaayi", "Agusito", "Sebuttemba", "Okitobba", "Novemba", "Desemba"}, -- daysAbbreviated: []string{"Sabi", "Bala", "Kubi", "Kusa", "Kuna", "Kuta", "Muka"}, -- daysNarrow: []string{"S", "B", "B", "S", "K", "K", "M"}, -- daysWide: []string{"Sabiiti", "Balaza", "Owokubili", "Owokusatu", "Olokuna", "Olokutaanu", "Olomukaaga"}, -- periodsAbbreviated: []string{"Munkyo", "Eigulo"}, -- periodsWide: []string{"Munkyo", "Eigulo"}, -- erasAbbreviated: []string{"AZ", "AF"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Kulisto nga azilawo", "Kulisto nga affile"}, -- timezones: map[string]string{"WAST": "WAST", "HAT": "HAT", "MESZ": "MESZ", "JST": "JST", "TMT": "TMT", "OESZ": "OESZ", "ChST": "ChST", "MST": "MST", "AWDT": "AWDT", "LHDT": "LHDT", "ACST": "ACST", "WARST": "WARST", "CDT": "CDT", "UYT": "UYT", "ACWDT": "ACWDT", "ECT": "ECT", "HNNOMX": "HNNOMX", "SGT": "SGT", "HNCU": "HNCU", "AST": "AST", "GYT": "GYT", "AEST": "AEST", "HKST": "HKST", "HNPM": "HNPM", "MEZ": "MEZ", "LHST": "LHST", "BOT": "BOT", "EDT": "EDT", "AKDT": "AKDT", "AWST": "AWST", "CHADT": "CHADT", "GFT": "GFT", "WAT": "WAT", "OEZ": "OEZ", "WART": "WART", "MDT": "MDT", "HADT": "HADT", "ARST": "ARST", "CAT": "CAT", "COT": "COT", "CLST": "CLST", "HENOMX": "HENOMX", "AKST": "AKST", "BT": "BT", "WEZ": "WEZ", "HEOG": "HEOG", "ACDT": "ACDT", "∅∅∅": "∅∅∅", "COST": "COST", "GMT": "GMT", "SRT": "SRT", "HKT": "HKT", "CLT": "CLT", "EST": "EST", "WIB": "WIB", "HAST": "HAST", "TMST": "TMST", "MYT": "MYT", "WIT": "WIT", "ACWST": "ACWST", "NZST": "NZST", "HNPMX": "HNPMX", "CST": "CST", "WESZ": "WESZ", "ART": "ART", "CHAST": "CHAST", "ADT": "ADT", "VET": "VET", "PST": "PST", "PDT": "PDT", "HNOG": "HNOG", "AEDT": "AEDT", "IST": "IST", "HNEG": "HNEG", "HEEG": "HEEG", "EAT": "EAT", "HEPMX": "HEPMX", "UYST": "UYST", "HNT": "HNT", "WITA": "WITA", "HEPM": "HEPM", "SAST": "SAST", "JDT": "JDT", "HECU": "HECU", "NZDT": "NZDT"}, -+ locale: "xog_UG", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNNOMX": "HNNOMX", "UYST": "UYST", "∅∅∅": "∅∅∅", "ChST": "ChST", "AKDT": "AKDT", "HEOG": "HEOG", "NZST": "NZST", "NZDT": "NZDT", "CDT": "CDT", "CHAST": "CHAST", "HNT": "HNT", "CLT": "CLT", "HENOMX": "HENOMX", "MEZ": "MEZ", "ACDT": "ACDT", "HEPM": "HEPM", "AWST": "AWST", "MST": "MST", "GMT": "GMT", "HADT": "HADT", "UYT": "UYT", "PST": "PST", "PDT": "PDT", "EDT": "EDT", "MDT": "MDT", "AKST": "AKST", "HAT": "HAT", "GYT": "GYT", "HEEG": "HEEG", "ACST": "ACST", "ACWDT": "ACWDT", "VET": "VET", "HEPMX": "HEPMX", "ART": "ART", "BOT": "BOT", "CAT": "CAT", "WITA": "WITA", "HNCU": "HNCU", "GFT": "GFT", "WARST": "WARST", "HNOG": "HNOG", "TMST": "TMST", "MESZ": "MESZ", "ACWST": "ACWST", "ECT": "ECT", "HKT": "HKT", "HKST": "HKST", "EAT": "EAT", "AEST": "AEST", "CHADT": "CHADT", "WAT": "WAT", "WAST": "WAST", "COST": "COST", "HNEG": "HNEG", "LHST": "LHST", "LHDT": "LHDT", "AEDT": "AEDT", "WART": "WART", "HNPM": "HNPM", "JST": "JST", "HNPMX": "HNPMX", "WESZ": "WESZ", "ARST": "ARST", "AST": "AST", "SRT": "SRT", "MYT": "MYT", "HECU": "HECU", "SAST": "SAST", "EST": "EST", "WIB": "WIB", "AWDT": "AWDT", "IST": "IST", "OESZ": "OESZ", "HAST": "HAST", "JDT": "JDT", "OEZ": "OEZ", "CST": "CST", "WIT": "WIT", "TMT": "TMT", "CLST": "CLST", "ADT": "ADT", "BT": "BT", "WEZ": "WEZ", "SGT": "SGT", "COT": "COT"}, - } - } -  -@@ -116,7 +101,7 @@ func (xog *xog_UG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (xog *xog_UG) MonthsAbbreviated() []string { -- return xog.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +111,7 @@ func (xog *xog_UG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (xog *xog_UG) MonthsNarrow() []string { -- return xog.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +121,7 @@ func (xog *xog_UG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (xog *xog_UG) MonthsWide() []string { -- return xog.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -196,56 +181,7 @@ func (xog *xog_UG) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := xog.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, xog.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, xog.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, xog.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, xog.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, xog.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'xog_UG' -@@ -254,63 +190,7 @@ func (xog *xog_UG) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := xog.currencies[currency] -- l := len(s) + len(symbol) + 2 + 0*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, xog.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, xog.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, xog.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, xog.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, xog.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, xog.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'xog_UG' -@@ -318,27 +198,6 @@ func (xog *xog_UG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -347,17 +206,6 @@ func (xog *xog_UG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, xog.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -366,17 +214,6 @@ func (xog *xog_UG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, xog.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -385,19 +222,6 @@ func (xog *xog_UG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, xog.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, xog.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -406,19 +230,6 @@ func (xog *xog_UG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -427,26 +238,6 @@ func (xog *xog_UG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -455,30 +246,6 @@ func (xog *xog_UG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -487,34 +254,5 @@ func (xog *xog_UG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, xog.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := xog.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/yav/yav.go b/yav/yav.go -index f59175c..33643d6 100644 ---- a/yav/yav.go -+++ b/yav/yav.go -@@ -66,7 +66,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"k.Y.", "+J.C."}, - erasNarrow: []string{"", ""}, - erasWide: []string{"katikupíen Yésuse", "ékélémkúnupíén n"}, -- timezones: map[string]string{"ECT": "ECT", "WART": "WART", "COT": "COT", "AKST": "AKST", "PDT": "PDT", "WEZ": "WEZ", "LHST": "LHST", "JDT": "JDT", "AWST": "AWST", "AWDT": "AWDT", "ACDT": "ACDT", "CLT": "CLT", "HEEG": "HEEG", "TMST": "TMST", "HADT": "HADT", "WESZ": "WESZ", "MEZ": "MEZ", "SAST": "SAST", "WAST": "WAST", "HNNOMX": "HNNOMX", "MST": "MST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "GYT": "GYT", "HNPM": "HNPM", "HEPM": "HEPM", "SRT": "SRT", "AEDT": "AEDT", "HNOG": "HNOG", "HKT": "HKT", "ACST": "ACST", "HNCU": "HNCU", "WAT": "WAT", "WARST": "WARST", "MDT": "MDT", "UYT": "UYT", "HAST": "HAST", "HEOG": "HEOG", "NZDT": "NZDT", "CHAST": "CHAST", "EST": "EST", "NZST": "NZST", "ChST": "ChST", "GFT": "GFT", "OEZ": "OEZ", "OESZ": "OESZ", "HKST": "HKST", "LHDT": "LHDT", "CLST": "CLST", "GMT": "GMT", "SGT": "SGT", "UYST": "UYST", "AST": "AST", "WIT": "WIT", "ACWST": "ACWST", "CAT": "CAT", "EAT": "EAT", "HNT": "HNT", "WITA": "WITA", "VET": "VET", "HECU": "HECU", "ADT": "ADT", "MYT": "MYT", "CST": "CST", "CDT": "CDT", "ARST": "ARST", "IST": "IST", "JST": "JST", "AKDT": "AKDT", "BT": "BT", "HAT": "HAT", "AEST": "AEST", "CHADT": "CHADT", "HENOMX": "HENOMX", "COST": "COST", "HNEG": "HNEG", "TMT": "TMT", "ART": "ART", "BOT": "BOT", "WIB": "WIB", "EDT": "EDT", "PST": "PST", "ACWDT": "ACWDT", "MESZ": "MESZ", "∅∅∅": "∅∅∅"}, -+ timezones: map[string]string{"SRT": "SRT", "ACST": "ACST", "WEZ": "WEZ", "HNCU": "HNCU", "HEPMX": "HEPMX", "WART": "WART", "ADT": "ADT", "AST": "AST", "HKST": "HKST", "CAT": "CAT", "TMT": "TMT", "HEEG": "HEEG", "UYST": "UYST", "VET": "VET", "OESZ": "OESZ", "HKT": "HKT", "MEZ": "MEZ", "CHAST": "CHAST", "HECU": "HECU", "HEOG": "HEOG", "∅∅∅": "∅∅∅", "ARST": "ARST", "HENOMX": "HENOMX", "JDT": "JDT", "PST": "PST", "NZDT": "NZDT", "GMT": "GMT", "CDT": "CDT", "MST": "MST", "HADT": "HADT", "UYT": "UYT", "PDT": "PDT", "AEDT": "AEDT", "WIT": "WIT", "SAST": "SAST", "ART": "ART", "HNEG": "HNEG", "AWDT": "AWDT", "HNPM": "HNPM", "WAST": "WAST", "ChST": "ChST", "COST": "COST", "ECT": "ECT", "WIB": "WIB", "BOT": "BOT", "ACWST": "ACWST", "SGT": "SGT", "OEZ": "OEZ", "WARST": "WARST", "AEST": "AEST", "HNPMX": "HNPMX", "WAT": "WAT", "HNNOMX": "HNNOMX", "HNT": "HNT", "JST": "JST", "HEPM": "HEPM", "CHADT": "CHADT", "WESZ": "WESZ", "COT": "COT", "HNOG": "HNOG", "MDT": "MDT", "NZST": "NZST", "LHST": "LHST", "ACWDT": "ACWDT", "EDT": "EDT", "CLT": "CLT", "EST": "EST", "TMST": "TMST", "CST": "CST", "MESZ": "MESZ", "AWST": "AWST", "AKDT": "AKDT", "HAT": "HAT", "ACDT": "ACDT", "IST": "IST", "GFT": "GFT", "EAT": "EAT", "HAST": "HAST", "LHDT": "LHDT", "MYT": "MYT", "CLST": "CLST", "WITA": "WITA", "BT": "BT", "AKST": "AKST", "GYT": "GYT"}, - } - } -  -diff --git a/yav_CM/yav_CM.go b/yav_CM/yav_CM.go -index 08bab37..e9b0397 100644 ---- a/yav_CM/yav_CM.go -+++ b/yav_CM/yav_CM.go -@@ -10,63 +10,45 @@ import ( - ) -  - type yav_CM struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'yav_CM' locale - func New() locales.Translator { - return &yav_CM{ -- locale: "yav_CM", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- timeSeparator: ":", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositiveSuffix: " ", -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: " )", -- monthsAbbreviated: []string{"", "o.1", "o.2", "o.3", "o.4", "o.5", "o.6", "o.7", "o.8", "o.9", "o.10", "o.11", "o.12"}, -- monthsWide: []string{"", "pikítíkítie, oólí ú kutúan", "siɛyɛ́, oóli ú kándíɛ", "ɔnsúmbɔl, oóli ú kátátúɛ", "mesiŋ, oóli ú kénie", "ensil, oóli ú kátánuɛ", "ɔsɔn", "efute", "pisuyú", "imɛŋ i puɔs", "imɛŋ i putúk,oóli ú kátíɛ", "makandikɛ", "pilɔndɔ́"}, -- daysAbbreviated: []string{"sd", "md", "mw", "et", "kl", "fl", "ss"}, -- daysNarrow: []string{"s", "m", "m", "e", "k", "f", "s"}, -- daysWide: []string{"sɔ́ndiɛ", "móndie", "muányáŋmóndie", "metúkpíápɛ", "kúpélimetúkpiapɛ", "feléte", "séselé"}, -- periodsAbbreviated: []string{"kiɛmɛ́ɛm", "kisɛ́ndɛ"}, -- periodsWide: []string{"kiɛmɛ́ɛm", "kisɛ́ndɛ"}, -- erasAbbreviated: []string{"k.Y.", "+J.C."}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"katikupíen Yésuse", "ékélémkúnupíén n"}, -- timezones: map[string]string{"WIB": "WIB", "HEOG": "HEOG", "CAT": "CAT", "WART": "WART", "MYT": "MYT", "GMT": "GMT", "CST": "CST", "CDT": "CDT", "WEZ": "WEZ", "NZST": "NZST", "OESZ": "OESZ", "ECT": "ECT", "COT": "COT", "JST": "JST", "EDT": "EDT", "AKST": "AKST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "UYT": "UYT", "ARST": "ARST", "MEZ": "MEZ", "ACST": "ACST", "ACDT": "ACDT", "COST": "COST", "JDT": "JDT", "PDT": "PDT", "CHADT": "CHADT", "PST": "PST", "AEST": "AEST", "CHAST": "CHAST", "IST": "IST", "HNEG": "HNEG", "WAST": "WAST", "HECU": "HECU", "HNOG": "HNOG", "SAST": "SAST", "ChST": "ChST", "HEEG": "HEEG", "TMST": "TMST", "HADT": "HADT", "HNT": "HNT", "NZDT": "NZDT", "HKT": "HKT", "HKST": "HKST", "LHST": "LHST", "WAT": "WAT", "MDT": "MDT", "ACWDT": "ACWDT", "AWDT": "AWDT", "WITA": "WITA", "CLT": "CLT", "SGT": "SGT", "HNCU": "HNCU", "AST": "AST", "LHDT": "LHDT", "MST": "MST", "AEDT": "AEDT", "AWST": "AWST", "HEPMX": "HEPMX", "ART": "ART", "HAT": "HAT", "TMT": "TMT", "WARST": "WARST", "HAST": "HAST", "SRT": "SRT", "HNPM": "HNPM", "OEZ": "OEZ", "UYST": "UYST", "AKDT": "AKDT", "BT": "BT", "WESZ": "WESZ", "BOT": "BOT", "GFT": "GFT", "ADT": "ADT", "VET": "VET", "WIT": "WIT", "CLST": "CLST", "HNPMX": "HNPMX", "GYT": "GYT", "HEPM": "HEPM", "ACWST": "ACWST", "MESZ": "MESZ", "∅∅∅": "∅∅∅", "EAT": "EAT", "EST": "EST"}, -+ locale: "yav_CM", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AKST": "AKST", "WAT": "WAT", "HAST": "HAST", "HKT": "HKT", "CLST": "CLST", "CHADT": "CHADT", "WESZ": "WESZ", "WEZ": "WEZ", "HEEG": "HEEG", "MESZ": "MESZ", "HNPM": "HNPM", "AWST": "AWST", "HNOG": "HNOG", "HEOG": "HEOG", "ART": "ART", "GFT": "GFT", "MST": "MST", "HADT": "HADT", "PDT": "PDT", "HNT": "HNT", "EST": "EST", "EDT": "EDT", "NZDT": "NZDT", "HEPM": "HEPM", "JST": "JST", "HNPMX": "HNPMX", "WAST": "WAST", "TMST": "TMST", "LHDT": "LHDT", "MYT": "MYT", "CLT": "CLT", "ECT": "ECT", "GMT": "GMT", "AST": "AST", "AKDT": "AKDT", "WARST": "WARST", "HAT": "HAT", "COST": "COST", "PST": "PST", "IST": "IST", "HEPMX": "HEPMX", "BOT": "BOT", "SRT": "SRT", "HENOMX": "HENOMX", "JDT": "JDT", "UYT": "UYT", "SGT": "SGT", "WIB": "WIB", "CDT": "CDT", "ACWST": "ACWST", "ACWDT": "ACWDT", "CHAST": "CHAST", "WIT": "WIT", "SAST": "SAST", "MDT": "MDT", "BT": "BT", "ChST": "ChST", "HNNOMX": "HNNOMX", "UYST": "UYST", "HECU": "HECU", "OEZ": "OEZ", "WITA": "WITA", "NZST": "NZST", "CST": "CST", "HNEG": "HNEG", "AEST": "AEST", "OESZ": "OESZ", "GYT": "GYT", "HKST": "HKST", "ARST": "ARST", "ACST": "ACST", "ACDT": "ACDT", "LHST": "LHST", "AWDT": "AWDT", "WART": "WART", "∅∅∅": "∅∅∅", "TMT": "TMT", "CAT": "CAT", "ADT": "ADT", "EAT": "EAT", "HNCU": "HNCU", "COT": "COT", "MEZ": "MEZ", "AEDT": "AEDT", "VET": "VET"}, - } - } -  -@@ -112,7 +94,7 @@ func (yav *yav_CM) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (yav *yav_CM) MonthsAbbreviated() []string { -- return yav.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -132,7 +114,7 @@ func (yav *yav_CM) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (yav *yav_CM) MonthsWide() []string { -- return yav.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -178,75 +160,13 @@ func (yav *yav_CM) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'yav_CM' and handles both Whole and Real numbers based on 'v' - func (yav *yav_CM) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yav.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(yav.group) - 1; j >= 0; j-- { -- b = append(b, yav.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yav.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'yav_CM' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (yav *yav_CM) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 1 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yav.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yav.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, yav.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'yav_CM' -@@ -254,58 +174,7 @@ func (yav *yav_CM) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yav.currencies[currency] -- l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yav.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(yav.group) - 1; j >= 0; j-- { -- b = append(b, yav.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yav.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yav.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, yav.currencyPositiveSuffix...) -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'yav_CM' -@@ -314,65 +183,7 @@ func (yav *yav_CM) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yav.currencies[currency] -- l := len(s) + len(symbol) + 5 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yav.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(yav.group) - 1; j >= 0; j-- { -- b = append(b, yav.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, yav.currencyNegativePrefix[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yav.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, yav.currencyNegativeSuffix...) -- b = append(b, symbol...) -- } else { -- -- b = append(b, yav.currencyPositiveSuffix...) -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'yav_CM' -@@ -380,17 +191,6 @@ func (yav *yav_CM) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -399,17 +199,6 @@ func (yav *yav_CM) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yav.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -418,17 +207,6 @@ func (yav *yav_CM) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yav.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -437,19 +215,6 @@ func (yav *yav_CM) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, yav.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yav.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -458,19 +223,6 @@ func (yav *yav_CM) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -479,26 +231,6 @@ func (yav *yav_CM) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -507,30 +239,6 @@ func (yav *yav_CM) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -539,34 +247,5 @@ func (yav *yav_CM) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yav.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := yav.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/yi/yi.go b/yi/yi.go -index 44ac989..da8f599 100644 ---- a/yi/yi.go -+++ b/yi/yi.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - daysWide: []string{"זונטיק", "מאָנטיק", "דינסטיק", "מיטוואך", "דאנערשטיק", "פֿרײַטיק", "שבת"}, - periodsAbbreviated: []string{"פֿאַרמיטאָג", "נאָכמיטאָג"}, - periodsWide: []string{"פֿאַרמיטאָג", "נאָכמיטאָג"}, -- timezones: map[string]string{"HEEG": "HEEG", "EST": "EST", "AKST": "AKST", "WIB": "WIB", "HAT": "HAT", "HNEG": "HNEG", "JDT": "JDT", "BOT": "BOT", "EDT": "EDT", "HNPMX": "HNPMX", "HADT": "HADT", "ARST": "ARST", "HKST": "HKST", "JST": "JST", "TMT": "TMT", "WIT": "WIT", "SRT": "SRT", "ACWST": "ACWST", "AEDT": "AEDT", "AWDT": "AWDT", "CHADT": "CHADT", "IST": "IST", "OESZ": "OESZ", "WARST": "WARST", "MDT": "MDT", "CDT": "CDT", "HNT": "HNT", "MESZ": "MESZ", "GYT": "GYT", "HAST": "HAST", "HENOMX": "HENOMX", "MST": "MST", "UYT": "UYT", "UYST": "UYST", "AKDT": "AKDT", "AWST": "AWST", "WITA": "WITA", "CLST": "CLST", "WAT": "WAT", "OEZ": "OEZ", "HNNOMX": "HNNOMX", "SGT": "SGT", "HNCU": "HNCU", "HECU": "HECU", "PDT": "PDT", "CST": "CST", "HNPM": "HNPM", "CLT": "CLT", "ACDT": "ACDT", "WEZ": "WEZ", "WESZ": "WESZ", "HNOG": "HNOG", "HEOG": "HEOG", "MEZ": "MEZ", "CAT": "CAT", "COT": "COT", "COST": "COST", "BT": "BT", "ART": "ART", "NZST": "NZST", "WAST": "WAST", "ECT": "ECT", "WART": "WART", "ADT": "ADT", "PST": "PST", "SAST": "SAST", "TMST": "TMST", "GMT": "GMT", "LHDT": "LHDT", "AST": "AST", "HKT": "HKT", "CHAST": "CHAST", "GFT": "GFT", "EAT": "EAT", "HEPMX": "HEPMX", "MYT": "MYT", "VET": "VET", "AEST": "AEST", "LHST": "LHST", "ACST": "ACST", "∅∅∅": "∅∅∅", "ACWDT": "ACWDT", "HEPM": "HEPM", "NZDT": "NZDT", "ChST": "ChST"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "NZDT": "NZDT", "AWST": "AWST", "BT": "BT", "SGT": "SGT", "CST": "CST", "ACWST": "ACWST", "HNOG": "HNOG", "HKST": "HKST", "SAST": "SAST", "NZST": "NZST", "GMT": "GMT", "LHDT": "LHDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "AKDT": "AKDT", "OESZ": "OESZ", "AWDT": "AWDT", "HNPM": "HNPM", "WEZ": "WEZ", "WESZ": "WESZ", "WARST": "WARST", "ECT": "ECT", "MDT": "MDT", "MESZ": "MESZ", "LHST": "LHST", "PDT": "PDT", "AEST": "AEST", "AKST": "AKST", "TMT": "TMT", "SRT": "SRT", "IST": "IST", "AEDT": "AEDT", "CHADT": "CHADT", "VET": "VET", "WAST": "WAST", "∅∅∅": "∅∅∅", "EST": "EST", "TMST": "TMST", "ACDT": "ACDT", "PST": "PST", "GFT": "GFT", "COT": "COT", "ACST": "ACST", "CHAST": "CHAST", "HEOG": "HEOG", "ARST": "ARST", "WIB": "WIB", "ADT": "ADT", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "COST": "COST", "CLT": "CLT", "EDT": "EDT", "HAST": "HAST", "OEZ": "OEZ", "WART": "WART", "AST": "AST", "ChST": "ChST", "UYST": "UYST", "GYT": "GYT", "CAT": "CAT", "BOT": "BOT", "HENOMX": "HENOMX", "HECU": "HECU", "HNPMX": "HNPMX", "WIT": "WIT", "CDT": "CDT", "HEPM": "HEPM", "JST": "JST", "JDT": "JDT", "ART": "ART", "MEZ": "MEZ", "EAT": "EAT", "HADT": "HADT", "HNEG": "HNEG", "WAT": "WAT", "HAT": "HAT", "CLST": "CLST", "WITA": "WITA", "MST": "MST", "MYT": "MYT", "UYT": "UYT", "HNT": "HNT", "HKT": "HKT"}, - } - } -  -diff --git a/yi_001/yi_001.go b/yi_001/yi_001.go -index abeca58..efa145c 100644 ---- a/yi_001/yi_001.go -+++ b/yi_001/yi_001.go -@@ -10,66 +10,45 @@ import ( - ) -  - type yi_001 struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyPositivePrefix string -- currencyPositiveSuffix string -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'yi_001' locale - func New() locales.Translator { - return &yi_001{ -- locale: "yi_001", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyPositivePrefix: " ", -- currencyPositiveSuffix: "K", -- currencyNegativePrefix: " ", -- currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "יאַנואַר", "פֿעברואַר", "מערץ", "אַפּריל", "מיי", "יוני", "יולי", "אויגוסט", "סעפּטעמבער", "אקטאבער", "נאוועמבער", "דעצעמבער"}, -- monthsWide: []string{"", "יאַנואַר", "פֿעברואַר", "מערץ", "אַפּריל", "מיי", "יוני", "יולי", "אויגוסט", "סעפּטעמבער", "אקטאבער", "נאוועמבער", "דעצעמבער"}, -- daysAbbreviated: []string{"זונטיק", "מאָנטיק", "דינסטיק", "מיטוואך", "דאנערשטיק", "פֿרײַטיק", "שבת"}, -- daysShort: []string{"זונטיק", "מאָנטיק", "דינסטיק", "מיטוואך", "דאנערשטיק", "פֿרײַטיק", "שבת"}, -- daysWide: []string{"זונטיק", "מאָנטיק", "דינסטיק", "מיטוואך", "דאנערשטיק", "פֿרײַטיק", "שבת"}, -- periodsAbbreviated: []string{"פֿאַרמיטאָג", "נאָכמיטאָג"}, -- periodsWide: []string{"פֿאַרמיטאָג", "נאָכמיטאָג"}, -- timezones: map[string]string{"HKT": "HKT", "WITA": "WITA", "CLST": "CLST", "ChST": "ChST", "OEZ": "OEZ", "HECU": "HECU", "HNPMX": "HNPMX", "CST": "CST", "AST": "AST", "AWST": "AWST", "LHDT": "LHDT", "ACWDT": "ACWDT", "HAT": "HAT", "HEOG": "HEOG", "LHST": "LHST", "ART": "ART", "AWDT": "AWDT", "CHADT": "CHADT", "GMT": "GMT", "EDT": "EDT", "MST": "MST", "ADT": "ADT", "IST": "IST", "∅∅∅": "∅∅∅", "WART": "WART", "COT": "COT", "HNOG": "HNOG", "CHAST": "CHAST", "ACST": "ACST", "ACWST": "ACWST", "HNT": "HNT", "MEZ": "MEZ", "MESZ": "MESZ", "NZST": "NZST", "JST": "JST", "TMST": "TMST", "WAT": "WAT", "HADT": "HADT", "MDT": "MDT", "AKST": "AKST", "AKDT": "AKDT", "CDT": "CDT", "WIB": "WIB", "WIT": "WIT", "HNEG": "HNEG", "SGT": "SGT", "HAST": "HAST", "ARST": "ARST", "AEDT": "AEDT", "WAST": "WAST", "WARST": "WARST", "AEST": "AEST", "HKST": "HKST", "HNPM": "HNPM", "HEPM": "HEPM", "HEPMX": "HEPMX", "VET": "VET", "WEZ": "WEZ", "WESZ": "WESZ", "CLT": "CLT", "ACDT": "ACDT", "HEEG": "HEEG", "GFT": "GFT", "OESZ": "OESZ", "PST": "PST", "NZDT": "NZDT", "JDT": "JDT", "EAT": "EAT", "ECT": "ECT", "MYT": "MYT", "SRT": "SRT", "PDT": "PDT", "SAST": "SAST", "COST": "COST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNCU": "HNCU", "GYT": "GYT", "UYT": "UYT", "UYST": "UYST", "BOT": "BOT", "TMT": "TMT", "CAT": "CAT", "EST": "EST", "BT": "BT"}, -+ locale: "yi_001", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"SGT": "SGT", "WAST": "WAST", "WART": "WART", "EST": "EST", "HKT": "HKT", "CLST": "CLST", "LHST": "LHST", "COT": "COT", "CAT": "CAT", "AWST": "AWST", "ADT": "ADT", "HNEG": "HNEG", "HEPM": "HEPM", "CHAST": "CHAST", "HEPMX": "HEPMX", "OEZ": "OEZ", "SAST": "SAST", "NZDT": "NZDT", "HNPMX": "HNPMX", "AKST": "AKST", "MEZ": "MEZ", "WEZ": "WEZ", "WIT": "WIT", "HNOG": "HNOG", "GYT": "GYT", "TMST": "TMST", "HNPM": "HNPM", "CDT": "CDT", "GMT": "GMT", "AWDT": "AWDT", "ACWST": "ACWST", "IST": "IST", "HNCU": "HNCU", "HKST": "HKST", "ECT": "ECT", "NZST": "NZST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AEST": "AEST", "COST": "COST", "WIB": "WIB", "ART": "ART", "EAT": "EAT", "HADT": "HADT", "WESZ": "WESZ", "WARST": "WARST", "MDT": "MDT", "BOT": "BOT", "JST": "JST", "UYST": "UYST", "PST": "PST", "BT": "BT", "HAT": "HAT", "TMT": "TMT", "AST": "AST", "CLT": "CLT", "CST": "CST", "SRT": "SRT", "ACST": "ACST", "LHDT": "LHDT", "ACWDT": "ACWDT", "WITA": "WITA", "HEOG": "HEOG", "EDT": "EDT", "WAT": "WAT", "GFT": "GFT", "MST": "MST", "UYT": "UYT", "HECU": "HECU", "VET": "VET", "HNT": "HNT", "AEDT": "AEDT", "ChST": "ChST", "HEEG": "HEEG", "MYT": "MYT", "∅∅∅": "∅∅∅", "PDT": "PDT", "ARST": "ARST", "JDT": "JDT", "CHADT": "CHADT", "AKDT": "AKDT", "OESZ": "OESZ", "HAST": "HAST", "ACDT": "ACDT", "MESZ": "MESZ"}, - } - } -  -@@ -123,7 +102,7 @@ func (yi *yi_001) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (yi *yi_001) MonthsAbbreviated() []string { -- return yi.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -143,7 +122,7 @@ func (yi *yi_001) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (yi *yi_001) MonthsWide() []string { -- return yi.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -203,40 +182,7 @@ func (yi *yi_001) FmtCurrency(num float64, v uint64, currency currency.Type) str -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yi.currencies[currency] -- l := len(s) + len(symbol) + 5 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yi.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(yi.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, yi.currencyPositivePrefix[j]) -- } -- -- if num < 0 { -- b = append(b, yi.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, yi.currencyPositiveSuffix...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'yi_001' -@@ -245,57 +191,7 @@ func (yi *yi_001) FmtAccounting(num float64, v uint64, currency currency.Type) s -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yi.currencies[currency] -- l := len(s) + len(symbol) + 5 -- -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yi.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(yi.currencyNegativePrefix) - 1; j >= 0; j-- { -- b = append(b, yi.currencyNegativePrefix[j]) -- } -- -- b = append(b, yi.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- for j := len(yi.currencyPositivePrefix) - 1; j >= 0; j-- { -- b = append(b, yi.currencyPositivePrefix[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if num < 0 { -- b = append(b, yi.currencyNegativeSuffix...) -- } else { -- -- b = append(b, yi.currencyPositiveSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'yi_001' -@@ -303,27 +199,6 @@ func (yi *yi_001) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -332,17 +207,6 @@ func (yi *yi_001) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xd7, 0x98, 0xd7, 0x9f, 0x20}...) -- b = append(b, yi.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -351,17 +215,6 @@ func (yi *yi_001) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xd7, 0x98, 0xd7, 0x9f, 0x20}...) -- b = append(b, yi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -370,19 +223,6 @@ func (yi *yi_001) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, yi.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xd7, 0x98, 0xd7, 0x9f, 0x20}...) -- b = append(b, yi.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -391,19 +231,6 @@ func (yi *yi_001) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -412,26 +239,6 @@ func (yi *yi_001) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -440,30 +247,6 @@ func (yi *yi_001) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -472,34 +255,5 @@ func (yi *yi_001) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yi.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := yi.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/yo/yo.go b/yo/yo.go -index bac72e8..ad213d2 100644 ---- a/yo/yo.go -+++ b/yo/yo.go -@@ -70,7 +70,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"", ""}, - erasNarrow: []string{"", ""}, - erasWide: []string{"Saju Kristi", "Lehin Kristi"}, -- timezones: map[string]string{"HEEG": "HEEG", "ACST": "ACST", "ADT": "ADT", "WITA": "WITA", "SAST": "SAST", "JDT": "JDT", "HNCU": "HNCU", "EST": "EST", "HNPMX": "HNPMX", "ART": "ART", "HKT": "HKT", "HEPM": "HEPM", "MESZ": "MESZ", "LHDT": "LHDT", "CLST": "CLST", "AEST": "AEST", "HNPM": "HNPM", "VET": "VET", "EAT": "EAT", "WAT": "WAT", "TMT": "TMT", "ACDT": "ACDT", "HEPMX": "HEPMX", "AKDT": "AKDT", "PST": "PST", "ChST": "ChST", "HNEG": "HNEG", "SGT": "SGT", "WEZ": "WEZ", "HNOG": "HNOG", "HKST": "HKST", "OEZ": "OEZ", "WIB": "WIB", "BT": "BT", "HNT": "HNT", "ARST": "ARST", "AEDT": "AEDT", "WAST": "WAST", "HAST": "HAST", "ACWDT": "ACWDT", "HEOG": "HEOG", "BOT": "BOT", "UYT": "UYT", "GYT": "GYT", "WIT": "WIT", "HENOMX": "HENOMX", "MDT": "MDT", "CAT": "CAT", "WART": "WART", "COST": "COST", "MEZ": "MEZ", "CLT": "CLT", "AST": "AST", "∅∅∅": "∅∅∅", "COT": "COT", "ECT": "ECT", "WARST": "WARST", "EDT": "EDT", "UYST": "UYST", "CST": "CST", "ACWST": "ACWST", "CHADT": "CHADT", "OESZ": "OESZ", "IST": "IST", "GFT": "GFT", "AWST": "AWST", "NZDT": "NZDT", "MST": "MST", "AKST": "AKST", "CDT": "CDT", "WESZ": "WESZ", "JST": "JST", "HECU": "HECU", "CHAST": "CHAST", "TMST": "TMST", "MYT": "MYT", "HADT": "HADT", "SRT": "SRT", "HAT": "HAT", "AWDT": "AWDT", "NZST": "NZST", "GMT": "GMT", "PDT": "PDT", "LHST": "LHST", "HNNOMX": "HNNOMX"}, -+ timezones: map[string]string{"HADT": "HADT", "AWDT": "AWDT", "ACWST": "ACWST", "UYST": "UYST", "WEZ": "WEZ", "WAST": "WAST", "MYT": "MYT", "ACWDT": "ACWDT", "COT": "COT", "EAT": "EAT", "CHAST": "CHAST", "WESZ": "WESZ", "AKST": "AKST", "AKDT": "AKDT", "JDT": "JDT", "HECU": "HECU", "HNPMX": "HNPMX", "OEZ": "OEZ", "OESZ": "OESZ", "HKT": "HKT", "ART": "ART", "BOT": "BOT", "SRT": "SRT", "HNEG": "HNEG", "AEDT": "AEDT", "PST": "PST", "TMST": "TMST", "ARST": "ARST", "HENOMX": "HENOMX", "AWST": "AWST", "GYT": "GYT", "EDT": "EDT", "TMT": "TMT", "HEPM": "HEPM", "MESZ": "MESZ", "HNPM": "HNPM", "UYT": "UYT", "IST": "IST", "CAT": "CAT", "MEZ": "MEZ", "ACST": "ACST", "ACDT": "ACDT", "LHST": "LHST", "VET": "VET", "WIT": "WIT", "HEOG": "HEOG", "WARST": "WARST", "WITA": "WITA", "MST": "MST", "ChST": "ChST", "HEEG": "HEEG", "JST": "JST", "LHDT": "LHDT", "HNCU": "HNCU", "WIB": "WIB", "MDT": "MDT", "SGT": "SGT", "HNT": "HNT", "HAT": "HAT", "SAST": "SAST", "GMT": "GMT", "PDT": "PDT", "CLST": "CLST", "HNOG": "HNOG", "ECT": "ECT", "NZDT": "NZDT", "ADT": "ADT", "HNNOMX": "HNNOMX", "CHADT": "CHADT", "BT": "BT", "WAT": "WAT", "COST": "COST", "CLT": "CLT", "CST": "CST", "NZST": "NZST", "HKST": "HKST", "AEST": "AEST", "∅∅∅": "∅∅∅", "HEPMX": "HEPMX", "CDT": "CDT", "AST": "AST", "HAST": "HAST", "GFT": "GFT", "WART": "WART", "EST": "EST"}, - } - } -  -diff --git a/yo_BJ/yo_BJ.go b/yo_BJ/yo_BJ.go -index 536e8ee..6b00d4c 100644 ---- a/yo_BJ/yo_BJ.go -+++ b/yo_BJ/yo_BJ.go -@@ -10,67 +10,53 @@ import ( - ) -  - type yo_BJ struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'yo_BJ' locale - func New() locales.Translator { - return &yo_BJ{ -- locale: "yo_BJ", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Shɛ́rɛ́", "Èrèlè", "Ɛrɛ̀nà", "Ìgbé", "Ɛ̀bibi", "Òkúdu", "Agɛmɔ", "Ògún", "Owewe", "Ɔ̀wàrà", "Bélú", "Ɔ̀pɛ̀"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Oshù Shɛ́rɛ́", "Oshù Èrèlè", "Oshù Ɛrɛ̀nà", "Oshù Ìgbé", "Oshù Ɛ̀bibi", "Oshù Òkúdu", "Oshù Agɛmɔ", "Oshù Ògún", "Oshù Owewe", "Oshù Ɔ̀wàrà", "Oshù Bélú", "Oshù Ɔ̀pɛ̀"}, -- daysAbbreviated: []string{"Àìkú", "Ajé", "Ìsɛ́gun", "Ɔjɔ́rú", "Ɔjɔ́bɔ", "Ɛtì", "Àbámɛ́ta"}, -- daysShort: []string{"Àìkú", "Ajé", "Ìsɛ́gun", "Ɔjɔ́rú", "Ɔjɔ́bɔ", "Ɛtì", "Àbámɛ́ta"}, -- daysWide: []string{"Ɔjɔ́ Àìkú", "Ɔjɔ́ Ajé", "Ɔjɔ́ Ìsɛ́gun", "Ɔjɔ́rú", "Ɔjɔ́bɔ", "Ɔjɔ́ Ɛtì", "Ɔjɔ́ Àbámɛ́ta"}, -- periodsAbbreviated: []string{"Àárɔ̀", "Ɔ̀sán"}, -- periodsNarrow: []string{"Àárɔ̀", "Ɔ̀sán"}, -- periodsWide: []string{"Àárɔ̀", "Ɔ̀sán"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Saju Kristi", "Lehin Kristi"}, -- timezones: map[string]string{"WIB": "WIB", "ACWST": "ACWST", "CHADT": "CHADT", "JDT": "JDT", "MEZ": "MEZ", "LHST": "LHST", "TMT": "TMT", "AKDT": "AKDT", "HADT": "HADT", "BT": "BT", "PST": "PST", "AEST": "AEST", "HAST": "HAST", "WIT": "WIT", "ART": "ART", "EAT": "EAT", "HKST": "HKST", "MESZ": "MESZ", "HEEG": "HEEG", "WAST": "WAST", "HNCU": "HNCU", "WEZ": "WEZ", "LHDT": "LHDT", "CLST": "CLST", "OESZ": "OESZ", "WARST": "WARST", "MYT": "MYT", "HNT": "HNT", "SAST": "SAST", "BOT": "BOT", "OEZ": "OEZ", "UYST": "UYST", "CST": "CST", "HNEG": "HNEG", "GFT": "GFT", "SGT": "SGT", "HNOG": "HNOG", "ChST": "ChST", "MST": "MST", "SRT": "SRT", "HAT": "HAT", "TMST": "TMST", "ECT": "ECT", "HNNOMX": "HNNOMX", "ADT": "ADT", "HKT": "HKT", "HNPM": "HNPM", "HEPM": "HEPM", "CAT": "CAT", "CLT": "CLT", "∅∅∅": "∅∅∅", "COT": "COT", "CDT": "CDT", "VET": "VET", "WESZ": "WESZ", "ACWDT": "ACWDT", "HEOG": "HEOG", "GMT": "GMT", "HNPMX": "HNPMX", "AST": "AST", "AWST": "AWST", "CHAST": "CHAST", "EST": "EST", "MDT": "MDT", "ARST": "ARST", "HECU": "HECU", "WAT": "WAT", "WART": "WART", "COST": "COST", "AKST": "AKST", "WITA": "WITA", "NZST": "NZST", "NZDT": "NZDT", "ACDT": "ACDT", "HEPMX": "HEPMX", "GYT": "GYT", "JST": "JST", "EDT": "EDT", "ACST": "ACST", "HENOMX": "HENOMX", "UYT": "UYT", "PDT": "PDT", "AEDT": "AEDT", "AWDT": "AWDT", "IST": "IST"}, -+ locale: "yo_BJ", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ monthsAbbreviated: []string{"", "Shɛ́rɛ́", "Èrèlè", "Ɛrɛ̀nà", "Ìgbé", "Ɛ̀bibi", "Òkúdu", "Agɛmɔ", "Ògún", "Owewe", "Ɔ̀wàrà", "Bélú", "Ɔ̀pɛ̀"}, -+ monthsWide: []string{"", "Oshù Shɛ́rɛ́", "Oshù Èrèlè", "Oshù Ɛrɛ̀nà", "Oshù Ìgbé", "Oshù Ɛ̀bibi", "Oshù Òkúdu", "Oshù Agɛmɔ", "Oshù Ògún", "Oshù Owewe", "Oshù Ɔ̀wàrà", "Oshù Bélú", "Oshù Ɔ̀pɛ̀"}, -+ daysAbbreviated: []string{"Àìkú", "Ajé", "Ìsɛ́gun", "Ɔjɔ́rú", "Ɔjɔ́bɔ", "Ɛtì", "Àbámɛ́ta"}, -+ daysShort: []string{"Àìkú", "Ajé", "Ìsɛ́gun", "Ɔjɔ́rú", "Ɔjɔ́bɔ", "Ɛtì", "Àbámɛ́ta"}, -+ daysWide: []string{"Ɔjɔ́ Àìkú", "Ɔjɔ́ Ajé", "Ɔjɔ́ Ìsɛ́gun", "Ɔjɔ́rú", "Ɔjɔ́bɔ", "Ɔjɔ́ Ɛtì", "Ɔjɔ́ Àbámɛ́ta"}, -+ periodsAbbreviated: []string{"Àárɔ̀", "Ɔ̀sán"}, -+ periodsNarrow: []string{"Àárɔ̀", "Ɔ̀sán"}, -+ periodsWide: []string{"Àárɔ̀", "Ɔ̀sán"}, -+ timezones: map[string]string{"HECU": "HECU", "WARST": "WARST", "COT": "COT", "EDT": "EDT", "MESZ": "MESZ", "ARST": "ARST", "ACDT": "ACDT", "AWST": "AWST", "AEDT": "AEDT", "BT": "BT", "VET": "VET", "WAT": "WAT", "GMT": "GMT", "ECT": "ECT", "JST": "JST", "MYT": "MYT", "WEZ": "WEZ", "HNT": "HNT", "MEZ": "MEZ", "JDT": "JDT", "UYST": "UYST", "IST": "IST", "HNCU": "HNCU", "AKDT": "AKDT", "OESZ": "OESZ", "WITA": "WITA", "HAST": "HAST", "HNPM": "HNPM", "ACWDT": "ACWDT", "HAT": "HAT", "EST": "EST", "ChST": "ChST", "HADT": "HADT", "HEPM": "HEPM", "CHAST": "CHAST", "TMT": "TMT", "CDT": "CDT", "ADT": "ADT", "HNOG": "HNOG", "CLT": "CLT", "CLST": "CLST", "LHDT": "LHDT", "AWDT": "AWDT", "WIB": "WIB", "EAT": "EAT", "HNNOMX": "HNNOMX", "PST": "PST", "HEPMX": "HEPMX", "WESZ": "WESZ", "SGT": "SGT", "HKST": "HKST", "TMST": "TMST", "SRT": "SRT", "NZST": "NZST", "BOT": "BOT", "∅∅∅": "∅∅∅", "GFT": "GFT", "HEOG": "HEOG", "HKT": "HKT", "NZDT": "NZDT", "ART": "ART", "ACST": "ACST", "HNEG": "HNEG", "WART": "WART", "WIT": "WIT", "MST": "MST", "AEST": "AEST", "OEZ": "OEZ", "GYT": "GYT", "COST": "COST", "CST": "CST", "HENOMX": "HENOMX", "HEEG": "HEEG", "LHST": "LHST", "WAST": "WAST", "MDT": "MDT", "CHADT": "CHADT", "PDT": "PDT", "ACWST": "ACWST", "SAST": "SAST", "AST": "AST", "HNPMX": "HNPMX", "AKST": "AKST", "CAT": "CAT", "UYT": "UYT"}, - } - } -  -@@ -126,7 +112,7 @@ func (yo *yo_BJ) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (yo *yo_BJ) MonthsNarrow() []string { -- return yo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -182,73 +168,13 @@ func (yo *yo_BJ) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'yo_BJ' and handles both Whole and Real numbers based on 'v' - func (yo *yo_BJ) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'yo_BJ' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (yo *yo_BJ) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, yo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'yo_BJ' -@@ -256,56 +182,7 @@ func (yo *yo_BJ) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yo.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, yo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'yo_BJ' -@@ -314,68 +191,7 @@ func (yo *yo_BJ) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yo.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, yo.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, yo.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'yo_BJ' -@@ -383,27 +199,6 @@ func (yo *yo_BJ) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -412,17 +207,6 @@ func (yo *yo_BJ) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -431,17 +215,6 @@ func (yo *yo_BJ) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,19 +223,6 @@ func (yo *yo_BJ) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, yo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +231,6 @@ func (yo *yo_BJ) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -492,26 +239,6 @@ func (yo *yo_BJ) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -520,30 +247,6 @@ func (yo *yo_BJ) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -552,34 +255,5 @@ func (yo *yo_BJ) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := yo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/yo_NG/yo_NG.go b/yo_NG/yo_NG.go -index ab9a276..b86c1c2 100644 ---- a/yo_NG/yo_NG.go -+++ b/yo_NG/yo_NG.go -@@ -10,67 +10,45 @@ import ( - ) -  - type yo_NG struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'yo_NG' locale - func New() locales.Translator { - return &yo_NG{ -- locale: "yo_NG", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Ṣẹ́rẹ́", "Èrèlè", "Ẹrẹ̀nà", "Ìgbé", "Ẹ̀bibi", "Òkúdu", "Agẹmọ", "Ògún", "Owewe", "Ọ̀wàrà", "Bélú", "Ọ̀pẹ̀"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "Oṣù Ṣẹ́rẹ́", "Oṣù Èrèlè", "Oṣù Ẹrẹ̀nà", "Oṣù Ìgbé", "Oṣù Ẹ̀bibi", "Oṣù Òkúdu", "Oṣù Agẹmọ", "Oṣù Ògún", "Oṣù Owewe", "Oṣù Ọ̀wàrà", "Oṣù Bélú", "Oṣù Ọ̀pẹ̀"}, -- daysAbbreviated: []string{"Àìkú", "Ajé", "Ìsẹ́gun", "Ọjọ́rú", "Ọjọ́bọ", "Ẹtì", "Àbámẹ́ta"}, -- daysShort: []string{"Àìkú", "Ajé", "Ìsẹ́gun", "Ọjọ́rú", "Ọjọ́bọ", "Ẹtì", "Àbámẹ́ta"}, -- daysWide: []string{"Ọjọ́ Àìkú", "Ọjọ́ Ajé", "Ọjọ́ Ìsẹ́gun", "Ọjọ́rú", "Ọjọ́bọ", "Ọjọ́ Ẹtì", "Ọjọ́ Àbámẹ́ta"}, -- periodsAbbreviated: []string{"Àárọ̀", "Ọ̀sán"}, -- periodsNarrow: []string{"Àárọ̀", "Ọ̀sán"}, -- periodsWide: []string{"Àárọ̀", "Ọ̀sán"}, -- erasAbbreviated: []string{"", ""}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"Saju Kristi", "Lehin Kristi"}, -- timezones: map[string]string{"HNCU": "HNCU", "UYT": "UYT", "CST": "CST", "SRT": "SRT", "IST": "IST", "HNEG": "HNEG", "ACDT": "ACDT", "GMT": "GMT", "EST": "EST", "MDT": "MDT", "WESZ": "WESZ", "SAST": "SAST", "CLST": "CLST", "∅∅∅": "∅∅∅", "ChST": "ChST", "CHAST": "CHAST", "EAT": "EAT", "AKDT": "AKDT", "AST": "AST", "HNOG": "HNOG", "BOT": "BOT", "COT": "COT", "CDT": "CDT", "WIT": "WIT", "MYT": "MYT", "ACWST": "ACWST", "HNT": "HNT", "ARST": "ARST", "JST": "JST", "ACST": "ACST", "OEZ": "OEZ", "HEPMX": "HEPMX", "CAT": "CAT", "HECU": "HECU", "WIB": "WIB", "HADT": "HADT", "HAT": "HAT", "AEDT": "AEDT", "WAST": "WAST", "OESZ": "OESZ", "WEZ": "WEZ", "MST": "MST", "UYST": "UYST", "HEOG": "HEOG", "PST": "PST", "HKT": "HKT", "HNPM": "HNPM", "HEPM": "HEPM", "CHADT": "CHADT", "ADT": "ADT", "HAST": "HAST", "LHST": "LHST", "TMT": "TMT", "WARST": "WARST", "GYT": "GYT", "VET": "VET", "AEST": "AEST", "MEZ": "MEZ", "ECT": "ECT", "HENOMX": "HENOMX", "WAT": "WAT", "HNPMX": "HNPMX", "BT": "BT", "ART": "ART", "WITA": "WITA", "MESZ": "MESZ", "LHDT": "LHDT", "GFT": "GFT", "CLT": "CLT", "TMST": "TMST", "HNNOMX": "HNNOMX", "ACWDT": "ACWDT", "SGT": "SGT", "AKST": "AKST", "NZDT": "NZDT", "JDT": "JDT", "HEEG": "HEEG", "COST": "COST", "AWST": "AWST", "NZST": "NZST", "PDT": "PDT", "AWDT": "AWDT", "HKST": "HKST", "WART": "WART", "EDT": "EDT"}, -+ locale: "yo_NG", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"MEZ": "MEZ", "ACST": "ACST", "AEDT": "AEDT", "CHAST": "CHAST", "VET": "VET", "WART": "WART", "BOT": "BOT", "AWST": "AWST", "JDT": "JDT", "WARST": "WARST", "CLT": "CLT", "CLST": "CLST", "CST": "CST", "HENOMX": "HENOMX", "LHDT": "LHDT", "HAT": "HAT", "TMST": "TMST", "MDT": "MDT", "ChST": "ChST", "ART": "ART", "HEPMX": "HEPMX", "AKST": "AKST", "HNOG": "HNOG", "ACDT": "ACDT", "WEZ": "WEZ", "WAST": "WAST", "HADT": "HADT", "PST": "PST", "EDT": "EDT", "HKST": "HKST", "HNEG": "HNEG", "WESZ": "WESZ", "HNCU": "HNCU", "UYT": "UYT", "BT": "BT", "ACWDT": "ACWDT", "GFT": "GFT", "AWDT": "AWDT", "SRT": "SRT", "CHADT": "CHADT", "COT": "COT", "ARST": "ARST", "MST": "MST", "ECT": "ECT", "GMT": "GMT", "HNPM": "HNPM", "ACWST": "ACWST", "OEZ": "OEZ", "WIT": "WIT", "SAST": "SAST", "CAT": "CAT", "WIB": "WIB", "MESZ": "MESZ", "HNPMX": "HNPMX", "AKDT": "AKDT", "OESZ": "OESZ", "HEOG": "HEOG", "TMT": "TMT", "WITA": "WITA", "NZST": "NZST", "HEEG": "HEEG", "HECU": "HECU", "∅∅∅": "∅∅∅", "UYST": "UYST", "MYT": "MYT", "WAT": "WAT", "LHST": "LHST", "EAT": "EAT", "HEPM": "HEPM", "PDT": "PDT", "SGT": "SGT", "ADT": "ADT", "HAST": "HAST", "JST": "JST", "COST": "COST", "EST": "EST", "HKT": "HKT", "CDT": "CDT", "NZDT": "NZDT", "AST": "AST", "HNNOMX": "HNNOMX", "IST": "IST", "HNT": "HNT", "GYT": "GYT", "AEST": "AEST"}, - } - } -  -@@ -116,7 +94,7 @@ func (yo *yo_NG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (yo *yo_NG) MonthsAbbreviated() []string { -- return yo.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -126,7 +104,7 @@ func (yo *yo_NG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (yo *yo_NG) MonthsNarrow() []string { -- return yo.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -136,7 +114,7 @@ func (yo *yo_NG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (yo *yo_NG) MonthsWide() []string { -- return yo.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -182,73 +160,13 @@ func (yo *yo_NG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'yo_NG' and handles both Whole and Real numbers based on 'v' - func (yo *yo_NG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'yo_NG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (yo *yo_NG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, yo.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'yo_NG' -@@ -256,56 +174,7 @@ func (yo *yo_NG) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yo.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, yo.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'yo_NG' -@@ -314,68 +183,7 @@ func (yo *yo_NG) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yo.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yo.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yo.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, yo.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yo.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, yo.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'yo_NG' -@@ -383,27 +191,6 @@ func (yo *yo_NG) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Day() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Month() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -412,17 +199,6 @@ func (yo *yo_NG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yo.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -431,17 +207,6 @@ func (yo *yo_NG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -450,19 +215,6 @@ func (yo *yo_NG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, yo.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, yo.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -471,19 +223,6 @@ func (yo *yo_NG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -492,26 +231,6 @@ func (yo *yo_NG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -520,30 +239,6 @@ func (yo *yo_NG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -552,34 +247,5 @@ func (yo *yo_NG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yo.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := yo.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/yue/yue.go b/yue/yue.go -index 4f147bb..a9718cc 100644 ---- a/yue/yue.go -+++ b/yue/yue.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"西元前", "西元"}, - erasNarrow: []string{"西元前", "西元"}, - erasWide: []string{"西元前", "西元"}, -- timezones: map[string]string{"TMT": "土庫曼標準時間", "OEZ": "東歐標準時間", "HEPM": "聖皮埃爾和密克隆群島夏令時間", "HEPMX": "墨西哥太平洋夏令時間", "ART": "阿根廷標準時間", "HNOG": "格陵蘭西部標準時間", "WITA": "印尼中部時間", "HNPM": "聖皮埃爾和密克隆群島標準時間", "CHAST": "查坦群島標準時間", "CLST": "智利夏令時間", "EDT": "東部夏令時間", "AKST": "阿拉斯加標準時間", "ACWST": "澳洲中西部標準時間", "AWDT": "澳洲西部夏令時間", "ACST": "澳洲中部標準時間", "ACDT": "澳洲中部夏令時間", "WAST": "西非夏令時間", "SGT": "新加坡標準時間", "HNCU": "古巴標準時間", "PDT": "太平洋夏令時間", "BOT": "玻利維亞時間", "UYT": "烏拉圭標準時間", "GYT": "蓋亞那時間", "HNT": "紐芬蘭標準時間", "HAT": "紐芬蘭夏令時間", "HNPMX": "墨西哥太平洋標準時間", "ARST": "阿根廷夏令時間", "JDT": "日本夏令時間", "CAT": "中非時間", "GMT": "格林威治標準時間", "WIT": "印尼東部時間", "HKT": "香港標準時間", "MESZ": "中歐夏令時間", "HEEG": "格陵蘭東部夏令時間", "HNNOMX": "墨西哥西北部標準時間", "ACWDT": "澳洲中西部夏令時間", "ADT": "大西洋夏令時間", "MEZ": "中歐標準時間", "NZDT": "紐西蘭夏令時間", "CLT": "智利標準時間", "OESZ": "東歐夏令時間", "MST": "澳門標準時間", "AST": "大西洋標準時間", "NZST": "紐西蘭標準時間", "ChST": "查莫洛時間", "EAT": "東非時間", "CDT": "中部夏令時間", "AEDT": "澳洲東部夏令時間", "HADT": "夏威夷-阿留申夏令時間", "WEZ": "西歐標準時間", "LHDT": "豪勳爵島夏令時間", "CHADT": "查坦群島夏令時間", "JST": "日本標準時間", "AKDT": "阿拉斯加夏令時間", "MYT": "馬來西亞時間", "WIB": "印尼西部時間", "HEOG": "格陵蘭西部夏令時間", "AWST": "澳洲西部標準時間", "COT": "哥倫比亞標準時間", "HENOMX": "墨西哥西北部夏令時間", "MDT": "澳門夏令時間", "UYST": "烏拉圭夏令時間", "VET": "委內瑞拉時間", "BT": "不丹時間", "∅∅∅": "亞馬遜夏令時間", "HNEG": "格陵蘭東部標準時間", "WESZ": "西歐夏令時間", "AEST": "澳洲東部標準時間", "PST": "太平洋標準時間", "IST": "印度標準時間", "TMST": "土庫曼夏令時間", "ECT": "厄瓜多時間", "COST": "哥倫比亞夏令時間", "EST": "東部標準時間", "HAST": "夏威夷-阿留申標準時間", "HKST": "香港夏令時間", "LHST": "豪勳爵島標準時間", "SAST": "南非標準時間", "GFT": "法屬圭亞那時間", "WART": "阿根廷西部標準時間", "HECU": "古巴夏令時間", "SRT": "蘇利南時間", "WAT": "西非標準時間", "WARST": "阿根廷西部夏令時間", "CST": "中部標準時間"}, -+ timezones: map[string]string{"NZDT": "紐西蘭夏令時間", "WIB": "印尼西部時間", "ADT": "大西洋夏令時間", "HNPMX": "墨西哥太平洋標準時間", "OESZ": "東歐夏令時間", "HNT": "紐芬蘭標準時間", "CLST": "智利夏令時間", "GMT": "格林威治標準時間", "IST": "印度標準時間", "AKST": "阿拉斯加標準時間", "WARST": "阿根廷西部夏令時間", "MESZ": "中歐夏令時間", "AWST": "澳洲西部標準時間", "MYT": "馬來西亞時間", "HEPM": "聖皮埃爾和密克隆群島夏令時間", "ACWST": "澳洲中西部標準時間", "UYT": "烏拉圭標準時間", "HNCU": "古巴標準時間", "WAT": "西非標準時間", "WIT": "印尼東部時間", "BOT": "玻利維亞時間", "WESZ": "西歐夏令時間", "VET": "委內瑞拉時間", "OEZ": "東歐標準時間", "SAST": "南非標準時間", "COT": "哥倫比亞標準時間", "EST": "東部標準時間", "ART": "阿根廷標準時間", "HAST": "夏威夷-阿留申標準時間", "HEEG": "格陵蘭東部夏令時間", "HNNOMX": "墨西哥西北部標準時間", "HAT": "紐芬蘭夏令時間", "CAT": "中非時間", "CST": "中部標準時間", "MST": "澳門標準時間", "ACWDT": "澳洲中西部夏令時間", "CHADT": "查坦群島夏令時間", "HEPMX": "墨西哥太平洋夏令時間", "HEOG": "格陵蘭西部夏令時間", "NZST": "紐西蘭標準時間", "SRT": "蘇利南時間", "ACDT": "澳洲中部夏令時間", "HENOMX": "墨西哥西北部夏令時間", "PST": "太平洋標準時間", "COST": "哥倫比亞夏令時間", "LHST": "豪勳爵島標準時間", "UYST": "烏拉圭夏令時間", "ChST": "查莫洛時間", "AWDT": "澳洲西部夏令時間", "WART": "阿根廷西部標準時間", "HNEG": "格陵蘭東部標準時間", "JST": "日本標準時間", "AEST": "澳洲東部標準時間", "CHAST": "查坦群島標準時間", "TMT": "土庫曼標準時間", "ARST": "阿根廷夏令時間", "HNPM": "聖皮埃爾和密克隆群島標準時間", "JDT": "日本夏令時間", "CLT": "智利標準時間", "LHDT": "豪勳爵島夏令時間", "AEDT": "澳洲東部夏令時間", "WAST": "西非夏令時間", "GFT": "法屬圭亞那時間", "GYT": "蓋亞那時間", "HKST": "香港夏令時間", "CDT": "中部夏令時間", "∅∅∅": "艾克夏令時間", "BT": "不丹時間", "SGT": "新加坡標準時間", "HECU": "古巴夏令時間", "EDT": "東部夏令時間", "HKT": "香港標準時間", "TMST": "土庫曼夏令時間", "ECT": "厄瓜多時間", "AST": "大西洋標準時間", "EAT": "東非時間", "ACST": "澳洲中部標準時間", "PDT": "太平洋夏令時間", "HNOG": "格陵蘭西部標準時間", "WITA": "印尼中部時間", "MDT": "澳門夏令時間", "HADT": "夏威夷-阿留申夏令時間", "MEZ": "中歐標準時間", "WEZ": "西歐標準時間", "AKDT": "阿拉斯加夏令時間"}, - } - } -  -diff --git a/yue_HK/yue_HK.go b/yue_HK/yue_HK.go -index 9ee0ccf..55d7ffb 100644 ---- a/yue_HK/yue_HK.go -+++ b/yue_HK/yue_HK.go -@@ -42,32 +42,13 @@ type yue_HK struct { - // New returns a new instance of translator for the 'yue_HK' locale - func New() locales.Translator { - return &yue_HK{ -- locale: "yue_HK", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- daysAbbreviated: []string{"週日", "週一", "週二", "週三", "週四", "週五", "週六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"西元前", "西元"}, -- erasNarrow: []string{"西元前", "西元"}, -- erasWide: []string{"西元前", "西元"}, -- timezones: map[string]string{"MDT": "山區夏令時間", "HADT": "夏威夷-阿留申夏令時間", "GFT": "法屬圭亞那時間", "WART": "阿根廷西部標準時間", "UYST": "烏拉圭夏令時間", "BT": "不丹時間", "HEOG": "格陵蘭西部夏令時間", "CHADT": "查坦群島夏令時間", "HNEG": "格陵蘭東部標準時間", "EDT": "東部夏令時間", "WEZ": "西歐標準時間", "WESZ": "西歐夏令時間", "JST": "日本標準時間", "BOT": "玻利維亞時間", "HEEG": "格陵蘭東部夏令時間", "HECU": "古巴夏令時間", "∅∅∅": "亞馬遜夏令時間", "ART": "阿根廷標準時間", "ARST": "阿根廷夏令時間", "PDT": "太平洋夏令時間", "HNT": "紐芬蘭標準時間", "HAT": "紐芬蘭夏令時間", "HKST": "香港夏令時間", "NZST": "紐西蘭標準時間", "HNCU": "古巴標準時間", "HEPMX": "墨西哥太平洋夏令時間", "CST": "中部標準時間", "CDT": "中部夏令時間", "HNPM": "聖皮埃爾和密克隆群島標準時間", "SAST": "南非標準時間", "CLT": "智利標準時間", "TMT": "土庫曼標準時間", "AST": "大西洋標準時間", "HAST": "夏威夷-阿留申標準時間", "ACWDT": "澳洲中西部夏令時間", "OESZ": "東歐夏令時間", "COT": "哥倫比亞標準時間", "COST": "哥倫比亞夏令時間", "ADT": "大西洋夏令時間", "LHDT": "豪勳爵島夏令時間", "JDT": "日本夏令時間", "ECT": "厄瓜多時間", "HKT": "香港標準時間", "AKDT": "阿拉斯加夏令時間", "HNOG": "格陵蘭西部標準時間", "PST": "太平洋標準時間", "HEPM": "聖皮埃爾和密克隆群島夏令時間", "HENOMX": "墨西哥西北部夏令時間", "AEDT": "澳洲東部夏令時間", "MESZ": "中歐夏令時間", "EST": "東部標準時間", "GYT": "蓋亞那時間", "MYT": "馬來西亞時間", "IST": "印度標準時間", "TMST": "土庫曼夏令時間", "ChST": "查莫洛時間", "HNPMX": "墨西哥太平洋標準時間", "AKST": "阿拉斯加標準時間", "WIT": "印尼東部時間", "AWST": "澳洲西部標準時間", "MEZ": "中歐標準時間", "WAT": "西非標準時間", "WAST": "西非夏令時間", "OEZ": "東歐標準時間", "WIB": "印尼西部時間", "AWDT": "澳洲西部夏令時間", "HNNOMX": "墨西哥西北部標準時間", "SRT": "蘇利南時間", "CAT": "中非時間", "GMT": "格林威治標準時間", "WITA": "印尼中部時間", "EAT": "東非時間", "SGT": "新加坡標準時間", "CLST": "智利夏令時間", "MST": "山區標準時間", "VET": "委內瑞拉時間", "ACWST": "澳洲中西部標準時間", "AEST": "澳洲東部標準時間", "LHST": "豪勳爵島標準時間", "NZDT": "紐西蘭夏令時間", "CHAST": "查坦群島標準時間", "ACST": "澳洲中部標準時間", "ACDT": "澳洲中部夏令時間", "WARST": "阿根廷西部夏令時間", "UYT": "烏拉圭標準時間"}, -+ locale: "yue_HK", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"AWST": "AWST", "AEST": "AEST", "EDT": "EDT", "HAST": "HAST", "HADT": "HADT", "HENOMX": "HENOMX", "LHDT": "LHDT", "CHAST": "CHAST", "COST": "COST", "GMT": "GMT", "ARST": "ARST", "ACST": "ACST", "ACDT": "ACDT", "HNEG": "HNEG", "CAT": "CAT", "MST": "MST", "NZST": "NZST", "ART": "ART", "HEEG": "HEEG", "CHADT": "CHADT", "WAT": "WAT", "BOT": "BOT", "EAT": "EAT", "MEZ": "MEZ", "ChST": "ChST", "SGT": "SGT", "HECU": "HECU", "SAST": "SAST", "TMT": "TMT", "CLST": "CLST", "AWDT": "AWDT", "MYT": "MYT", "JDT": "JDT", "WIB": "WIB", "ECT": "ECT", "WESZ": "WESZ", "HEOG": "HEOG", "MDT": "MDT", "AKST": "AKST", "COT": "COT", "HNPM": "HNPM", "∅∅∅": "∅∅∅", "WAST": "WAST", "WARST": "WARST", "WIT": "WIT", "GYT": "GYT", "MESZ": "MESZ", "PDT": "PDT", "HNCU": "HNCU", "HAT": "HAT", "WART": "WART", "HKT": "HKT", "HEPM": "HEPM", "IST": "IST", "VET": "VET", "OESZ": "OESZ", "NZDT": "NZDT", "SRT": "SRT", "AEDT": "AEDT", "EST": "EST", "CST": "CST", "AST": "AST", "ADT": "ADT", "JST": "JST", "BT": "BT", "ACWDT": "ACWDT", "TMST": "TMST", "HNPMX": "HNPMX", "GFT": "GFT", "HKST": "HKST", "AKDT": "AKDT", "CLT": "CLT", "CDT": "CDT", "UYST": "UYST", "PST": "PST", "HEPMX": "HEPMX", "LHST": "LHST", "UYT": "UYT", "HNOG": "HNOG", "OEZ": "OEZ", "HNT": "HNT", "WITA": "WITA", "HNNOMX": "HNNOMX", "ACWST": "ACWST", "WEZ": "WEZ"}, - } - } -  -@@ -113,7 +94,7 @@ func (yue *yue_HK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (yue *yue_HK) MonthsAbbreviated() []string { -- return yue.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (yue *yue_HK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (yue *yue_HK) MonthsNarrow() []string { -- return yue.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (yue *yue_HK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (yue *yue_HK) MonthsWide() []string { -- return yue.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (yue *yue_HK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'yue_HK' and handles both Whole and Real numbers based on 'v' - func (yue *yue_HK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yue.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yue.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yue.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'yue_HK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (yue *yue_HK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yue.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, yue.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, yue.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'yue_HK' -@@ -253,56 +174,7 @@ func (yue *yue_HK) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yue.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yue.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yue.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, yue.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yue.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'yue_HK' -@@ -311,64 +183,7 @@ func (yue *yue_HK) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := yue.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, yue.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, yue.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, yue.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, yue.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'yue_HK' -@@ -376,17 +191,6 @@ func (yue *yue_HK) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -395,18 +199,6 @@ func (yue *yue_HK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +207,6 @@ func (yue *yue_HK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (yue *yue_HK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5, 0x20}...) -- b = append(b, yue.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +223,6 @@ func (yue *yue_HK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, yue.periodsAbbreviated[0]...) -- } else { -- b = append(b, yue.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +231,6 @@ func (yue *yue_HK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, yue.periodsAbbreviated[0]...) -- } else { -- b = append(b, yue.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,40 +239,6 @@ func (yue *yue_HK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, yue.periodsAbbreviated[0]...) -- } else { -- b = append(b, yue.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x5b}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x5d}...) -- - return string(b) - } -  -@@ -563,44 +247,5 @@ func (yue *yue_HK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, yue.periodsAbbreviated[0]...) -- } else { -- b = append(b, yue.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, yue.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20, 0x5b}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := yue.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x5d}...) -- - return string(b) - } -diff --git a/zgh/zgh.go b/zgh/zgh.go -index 5810eb3..df16f11 100644 ---- a/zgh/zgh.go -+++ b/zgh/zgh.go -@@ -69,7 +69,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"ⴷⴰⵄ", "ⴷⴼⵄ"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"ⴷⴰⵜ ⵏ ⵄⵉⵙⴰ", "ⴷⴼⴼⵉⵔ ⵏ ⵄⵉⵙⴰ"}, -- timezones: map[string]string{"ChST": "ChST", "HENOMX": "HENOMX", "GYT": "GYT", "ACWST": "ACWST", "HNT": "HNT", "ART": "ART", "HKST": "HKST", "LHDT": "LHDT", "WART": "WART", "SGT": "SGT", "UYT": "UYT", "HEPM": "HEPM", "CLT": "CLT", "TMT": "TMT", "ACST": "ACST", "HNPMX": "HNPMX", "MYT": "MYT", "ARST": "ARST", "HEOG": "HEOG", "JST": "JST", "WAT": "WAT", "LHST": "LHST", "HNEG": "HNEG", "COST": "COST", "HECU": "HECU", "CST": "CST", "CDT": "CDT", "VET": "VET", "NZST": "NZST", "CHAST": "CHAST", "HEEG": "HEEG", "ACDT": "ACDT", "∅∅∅": "∅∅∅", "CAT": "CAT", "HEPMX": "HEPMX", "AST": "AST", "ADT": "ADT", "EST": "EST", "HAT": "HAT", "MEZ": "MEZ", "MESZ": "MESZ", "OEZ": "OEZ", "EDT": "EDT", "MST": "MST", "WIB": "WIB", "HADT": "HADT", "SRT": "SRT", "AWDT": "AWDT", "BOT": "BOT", "UYST": "UYST", "HAST": "HAST", "PST": "PST", "AEST": "AEST", "HKT": "HKT", "EAT": "EAT", "OESZ": "OESZ", "MDT": "MDT", "AKDT": "AKDT", "PDT": "PDT", "ACWDT": "ACWDT", "WITA": "WITA", "COT": "COT", "WESZ": "WESZ", "AEDT": "AEDT", "AWST": "AWST", "NZDT": "NZDT", "SAST": "SAST", "IST": "IST", "HNNOMX": "HNNOMX", "GMT": "GMT", "HNPM": "HNPM", "WIT": "WIT", "WEZ": "WEZ", "WAST": "WAST", "ECT": "ECT", "HNCU": "HNCU", "BT": "BT", "CHADT": "CHADT", "JDT": "JDT", "WARST": "WARST", "HNOG": "HNOG", "CLST": "CLST", "GFT": "GFT", "TMST": "TMST", "AKST": "AKST"}, -+ timezones: map[string]string{"ACST": "ACST", "MEZ": "MEZ", "JST": "JST", "CLST": "CLST", "BOT": "BOT", "WAT": "WAT", "COST": "COST", "EDT": "EDT", "ART": "ART", "AST": "AST", "JDT": "JDT", "PST": "PST", "CHAST": "CHAST", "HAT": "HAT", "HEOG": "HEOG", "MST": "MST", "GMT": "GMT", "WESZ": "WESZ", "WAST": "WAST", "WARST": "WARST", "EST": "EST", "HENOMX": "HENOMX", "ACWDT": "ACWDT", "AKDT": "AKDT", "COT": "COT", "PDT": "PDT", "HNCU": "HNCU", "HEPMX": "HEPMX", "AEST": "AEST", "SGT": "SGT", "OESZ": "OESZ", "HADT": "HADT", "LHST": "LHST", "HNPM": "HNPM", "AWST": "AWST", "ACDT": "ACDT", "GYT": "GYT", "HKST": "HKST", "TMT": "TMT", "∅∅∅": "∅∅∅", "CLT": "CLT", "HAST": "HAST", "CHADT": "CHADT", "IST": "IST", "SAST": "SAST", "TMST": "TMST", "ARST": "ARST", "AWDT": "AWDT", "ACWST": "ACWST", "AEDT": "AEDT", "EAT": "EAT", "MESZ": "MESZ", "OEZ": "OEZ", "NZDT": "NZDT", "SRT": "SRT", "WITA": "WITA", "ChST": "ChST", "LHDT": "LHDT", "HEPM": "HEPM", "VET": "VET", "NZST": "NZST", "ECT": "ECT", "MDT": "MDT", "CDT": "CDT", "HNNOMX": "HNNOMX", "HNPMX": "HNPMX", "WEZ": "WEZ", "WART": "WART", "HECU": "HECU", "AKST": "AKST", "MYT": "MYT", "UYT": "UYT", "UYST": "UYST", "CST": "CST", "ADT": "ADT", "BT": "BT", "WIT": "WIT", "HKT": "HKT", "CAT": "CAT", "WIB": "WIB", "HNEG": "HNEG", "HEEG": "HEEG", "GFT": "GFT", "HNT": "HNT", "HNOG": "HNOG"}, - } - } -  -diff --git a/zgh_MA/zgh_MA.go b/zgh_MA/zgh_MA.go -index 9e94924..512c6ea 100644 ---- a/zgh_MA/zgh_MA.go -+++ b/zgh_MA/zgh_MA.go -@@ -18,7 +18,6 @@ type zgh_MA struct { - group string - minus string - percent string -- percentSuffix string - perMille string - timeSeparator string - inifinity string -@@ -43,33 +42,13 @@ type zgh_MA struct { - // New returns a new instance of translator for the 'zgh_MA' locale - func New() locales.Translator { - return &zgh_MA{ -- locale: "zgh_MA", -- pluralsCardinal: nil, -- pluralsOrdinal: nil, -- pluralsRange: nil, -- decimal: ",", -- group: " ", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- percentSuffix: " ", -- monthsAbbreviated: []string{"", "ⵉⵏⵏ", "ⴱⵕⴰ", "ⵎⴰⵕ", "ⵉⴱⵔ", "ⵎⴰⵢ", "ⵢⵓⵏ", "ⵢⵓⵍ", "ⵖⵓⵛ", "ⵛⵓⵜ", "ⴽⵜⵓ", "ⵏⵓⵡ", "ⴷⵓⵊ"}, -- monthsNarrow: []string{"", "ⵉ", "ⴱ", "ⵎ", "ⵉ", "ⵎ", "ⵢ", "ⵢ", "ⵖ", "ⵛ", "ⴽ", "ⵏ", "ⴷ"}, -- monthsWide: []string{"", "ⵉⵏⵏⴰⵢⵔ", "ⴱⵕⴰⵢⵕ", "ⵎⴰⵕⵚ", "ⵉⴱⵔⵉⵔ", "ⵎⴰⵢⵢⵓ", "ⵢⵓⵏⵢⵓ", "ⵢⵓⵍⵢⵓⵣ", "ⵖⵓⵛⵜ", "ⵛⵓⵜⴰⵏⴱⵉⵔ", "ⴽⵜⵓⴱⵔ", "ⵏⵓⵡⴰⵏⴱⵉⵔ", "ⴷⵓⵊⴰⵏⴱⵉⵔ"}, -- daysAbbreviated: []string{"ⴰⵙⴰ", "ⴰⵢⵏ", "ⴰⵙⵉ", "ⴰⴽⵕ", "ⴰⴽⵡ", "ⴰⵙⵉⵎ", "ⴰⵙⵉⴹ"}, -- daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"}, -- daysShort: []string{"ⴰⵙⴰ", "ⴰⵢⵏ", "ⴰⵙⵉ", "ⴰⴽⵕ", "ⴰⴽⵡ", "ⴰⵙⵉⵎ", "ⴰⵙⵉⴹ"}, -- daysWide: []string{"ⴰⵙⴰⵎⴰⵙ", "ⴰⵢⵏⴰⵙ", "ⴰⵙⵉⵏⴰⵙ", "ⴰⴽⵕⴰⵙ", "ⴰⴽⵡⴰⵙ", "ⴰⵙⵉⵎⵡⴰⵙ", "ⴰⵙⵉⴹⵢⴰⵙ"}, -- periodsAbbreviated: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- periodsNarrow: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- periodsWide: []string{"ⵜⵉⴼⴰⵡⵜ", "ⵜⴰⴷⴳⴳⵯⴰⵜ"}, -- erasAbbreviated: []string{"ⴷⴰⵄ", "ⴷⴼⵄ"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"ⴷⴰⵜ ⵏ ⵄⵉⵙⴰ", "ⴷⴼⴼⵉⵔ ⵏ ⵄⵉⵙⴰ"}, -- timezones: map[string]string{"NZDT": "NZDT", "COST": "COST", "ADT": "ADT", "PST": "PST", "AWST": "AWST", "WAST": "WAST", "OESZ": "OESZ", "SGT": "SGT", "HNPMX": "HNPMX", "AKST": "AKST", "NZST": "NZST", "CHAST": "CHAST", "∅∅∅": "∅∅∅", "MYT": "MYT", "HEOG": "HEOG", "AEDT": "AEDT", "CLT": "CLT", "COT": "COT", "HNNOMX": "HNNOMX", "HNCU": "HNCU", "AST": "AST", "GYT": "GYT", "HKST": "HKST", "WART": "WART", "WARST": "WARST", "UYT": "UYT", "PDT": "PDT", "WEZ": "WEZ", "ART": "ART", "AWDT": "AWDT", "MESZ": "MESZ", "HNEG": "HNEG", "TMT": "TMT", "CAT": "CAT", "EST": "EST", "BT": "BT", "HNT": "HNT", "HNPM": "HNPM", "LHDT": "LHDT", "SAST": "SAST", "JST": "JST", "ACDT": "ACDT", "WAT": "WAT", "MDT": "MDT", "WESZ": "WESZ", "CLST": "CLST", "HEEG": "HEEG", "EDT": "EDT", "UYST": "UYST", "HADT": "HADT", "VET": "VET", "HNOG": "HNOG", "JDT": "JDT", "WIT": "WIT", "ARST": "ARST", "AEST": "AEST", "TMST": "TMST", "EAT": "EAT", "HAT": "HAT", "HEPM": "HEPM", "ChST": "ChST", "BOT": "BOT", "MST": "MST", "WIB": "WIB", "SRT": "SRT", "HKT": "HKT", "WITA": "WITA", "ECT": "ECT", "GMT": "GMT", "CST": "CST", "GFT": "GFT", "HENOMX": "HENOMX", "ACWST": "ACWST", "ACWDT": "ACWDT", "MEZ": "MEZ", "LHST": "LHST", "IST": "IST", "ACST": "ACST", "OEZ": "OEZ", "HEPMX": "HEPMX", "CHADT": "CHADT", "HECU": "HECU", "AKDT": "AKDT", "CDT": "CDT", "HAST": "HAST"}, -+ locale: "zgh_MA", -+ pluralsCardinal: nil, -+ pluralsOrdinal: nil, -+ pluralsRange: nil, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HNCU": "HNCU", "ADT": "ADT", "NZST": "NZST", "HEEG": "HEEG", "HNPM": "HNPM", "COT": "COT", "HKT": "HKT", "CLST": "CLST", "ACDT": "ACDT", "WEZ": "WEZ", "AKDT": "AKDT", "GFT": "GFT", "CDT": "CDT", "MDT": "MDT", "HEPM": "HEPM", "JST": "JST", "CHADT": "CHADT", "WART": "WART", "HAT": "HAT", "WAT": "WAT", "WAST": "WAST", "TMT": "TMT", "ACWST": "ACWST", "HKST": "HKST", "GMT": "GMT", "EAT": "EAT", "ACST": "ACST", "AEST": "AEST", "SGT": "SGT", "VET": "VET", "ECT": "ECT", "AWDT": "AWDT", "BT": "BT", "HEOG": "HEOG", "ART": "ART", "BOT": "BOT", "WIT": "WIT", "NZDT": "NZDT", "AST": "AST", "LHDT": "LHDT", "JDT": "JDT", "PST": "PST", "AEDT": "AEDT", "OESZ": "OESZ", "MYT": "MYT", "UYST": "UYST", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "EDT": "EDT", "CLT": "CLT", "CAT": "CAT", "PDT": "PDT", "CHAST": "CHAST", "HNT": "HNT", "GYT": "GYT", "EST": "EST", "CST": "CST", "WIB": "WIB", "ARST": "ARST", "HAST": "HAST", "LHST": "LHST", "UYT": "UYT", "OEZ": "OEZ", "HNOG": "HNOG", "MST": "MST", "HNEG": "HNEG", "IST": "IST", "WESZ": "WESZ", "HADT": "HADT", "SRT": "SRT", "ACWDT": "ACWDT", "WARST": "WARST", "COST": "COST", "WITA": "WITA", "ChST": "ChST", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "AWST": "AWST", "∅∅∅": "∅∅∅", "TMST": "TMST", "MEZ": "MEZ", "MESZ": "MESZ", "HECU": "HECU", "AKST": "AKST", "SAST": "SAST"}, - } - } -  -@@ -115,7 +94,7 @@ func (zgh *zgh_MA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zgh *zgh_MA) MonthsAbbreviated() []string { -- return zgh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -125,7 +104,7 @@ func (zgh *zgh_MA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zgh *zgh_MA) MonthsNarrow() []string { -- return zgh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -135,7 +114,7 @@ func (zgh *zgh_MA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zgh *zgh_MA) MonthsWide() []string { -- return zgh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -181,77 +160,13 @@ func (zgh *zgh_MA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zgh_MA' and handles both Whole and Real numbers based on 'v' - func (zgh *zgh_MA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zgh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(zgh.group) - 1; j >= 0; j-- { -- b = append(b, zgh.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zgh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zgh_MA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zgh *zgh_MA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 5 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zgh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zgh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zgh.percentSuffix...) -- -- b = append(b, zgh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zgh_MA' -@@ -259,56 +174,7 @@ func (zgh *zgh_MA) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zgh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zgh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(zgh.group) - 1; j >= 0; j-- { -- b = append(b, zgh.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zgh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zgh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- b = append(b, symbol...) -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zgh_MA' -@@ -317,63 +183,7 @@ func (zgh *zgh_MA) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zgh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zgh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- for j := len(zgh.group) - 1; j >= 0; j-- { -- b = append(b, zgh.group[j]) -- } -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- b = append(b, zgh.minus[0]) -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zgh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, symbol...) -- } else { -- -- b = append(b, symbol...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zgh_MA' -@@ -381,17 +191,6 @@ func (zgh *zgh_MA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -400,17 +199,6 @@ func (zgh *zgh_MA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, zgh.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -419,17 +207,6 @@ func (zgh *zgh_MA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, zgh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -438,19 +215,6 @@ func (zgh *zgh_MA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, zgh.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x20}...) -- b = append(b, zgh.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -459,19 +223,6 @@ func (zgh *zgh_MA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -480,26 +231,6 @@ func (zgh *zgh_MA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -508,30 +239,6 @@ func (zgh *zgh_MA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -540,34 +247,5 @@ func (zgh *zgh_MA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zgh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := zgh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } -diff --git a/zh/zh.go b/zh/zh.go -index 411ecf6..ad020f8 100644 ---- a/zh/zh.go -+++ b/zh/zh.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"公元前", "公元"}, - erasNarrow: []string{"公元前", "公元"}, - erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"AEDT": "澳大利亚东部夏令时间", "CLT": "智利标准时间", "HEEG": "格陵兰岛东部夏令时间", "HECU": "古巴夏令时间", "ADT": "大西洋夏令时间", "HKT": "香港标准时间", "WIB": "印度尼西亚西部时间", "HAST": "夏威夷-阿留申标准时间", "WESZ": "西欧夏令时间", "HKST": "香港夏令时间", "MESZ": "中欧夏令时间", "ACDT": "澳大利亚中部夏令时间", "ARST": "阿根廷夏令时间", "IST": "印度时间", "SGT": "新加坡标准时间", "AST": "大西洋标准时间", "UYT": "乌拉圭标准时间", "VET": "委内瑞拉时间", "NZDT": "新西兰夏令时间", "ACST": "澳大利亚中部标准时间", "HEPMX": "墨西哥太平洋夏令时间", "CDT": "北美中部夏令时间", "NZST": "新西兰标准时间", "CHADT": "查坦夏令时间", "EST": "北美东部标准时间", "MYT": "马来西亚时间", "PDT": "北美太平洋夏令时间", "AEST": "澳大利亚东部标准时间", "MEZ": "中欧标准时间", "CST": "北美中部标准时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "LHDT": "豪勋爵岛夏令时间", "HNEG": "格陵兰岛东部标准时间", "TMST": "土库曼斯坦夏令时间", "HENOMX": "墨西哥西北部夏令时间", "GMT": "格林尼治标准时间", "ART": "阿根廷标准时间", "HEOG": "格陵兰岛西部夏令时间", "AWDT": "澳大利亚西部夏令时间", "LHST": "豪勋爵岛标准时间", "JDT": "日本夏令时间", "GFT": "法属圭亚那标准时间", "WART": "阿根廷西部标准时间", "WARST": "阿根廷西部夏令时间", "COT": "哥伦比亚标准时间", "COST": "哥伦比亚夏令时间", "HNT": "纽芬兰标准时间", "SAST": "南部非洲时间", "∅∅∅": "亚马逊夏令时间", "CAT": "中部非洲时间", "WAST": "西部非洲夏令时间", "OESZ": "东欧夏令时间", "HNNOMX": "墨西哥西北部标准时间", "EDT": "北美东部夏令时间", "GYT": "圭亚那时间", "HADT": "夏威夷-阿留申夏令时间", "JST": "日本标准时间", "EAT": "东部非洲时间", "WAT": "西部非洲标准时间", "AKDT": "阿拉斯加夏令时间", "WEZ": "西欧标准时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "TMT": "土库曼斯坦标准时间", "OEZ": "东欧标准时间", "HNPMX": "墨西哥太平洋标准时间", "AKST": "阿拉斯加标准时间", "ACWST": "澳大利亚中西部标准时间", "HNCU": "古巴标准时间", "MST": "澳门标准时间", "PST": "北美太平洋标准时间", "HAT": "纽芬兰夏令时间", "WITA": "印度尼西亚中部时间", "CLST": "智利夏令时间", "BOT": "玻利维亚标准时间", "ECT": "厄瓜多尔标准时间", "UYST": "乌拉圭夏令时间", "SRT": "苏里南时间", "ACWDT": "澳大利亚中西部夏令时间", "HNOG": "格陵兰岛西部标准时间", "AWST": "澳大利亚西部标准时间", "CHAST": "查坦标准时间", "ChST": "查莫罗时间", "MDT": "澳门夏令时间", "WIT": "印度尼西亚东部时间", "BT": "不丹时间"}, -+ timezones: map[string]string{"AEDT": "澳大利亚东部夏令时间", "BOT": "玻利维亚标准时间", "ACST": "澳大利亚中部标准时间", "HEEG": "格陵兰岛东部夏令时间", "LHST": "豪勋爵岛标准时间", "PST": "北美太平洋标准时间", "BT": "不丹时间", "CAT": "中部非洲时间", "CLT": "智利标准时间", "ARST": "阿根廷夏令时间", "MEZ": "中欧标准时间", "HENOMX": "墨西哥西北部夏令时间", "AWDT": "澳大利亚西部夏令时间", "WARST": "阿根廷西部夏令时间", "WIT": "印度尼西亚东部时间", "TMT": "土库曼斯坦标准时间", "TMST": "土库曼斯坦夏令时间", "SAST": "南部非洲时间", "HNOG": "格陵兰岛西部标准时间", "WAT": "西部非洲标准时间", "OEZ": "东欧标准时间", "UYST": "乌拉圭夏令时间", "SGT": "新加坡标准时间", "AKDT": "阿拉斯加夏令时间", "HAT": "纽芬兰夏令时间", "WART": "阿根廷西部标准时间", "COST": "哥伦比亚夏令时间", "EST": "北美东部标准时间", "JDT": "日本夏令时间", "HEOG": "格陵兰岛西部夏令时间", "AST": "大西洋标准时间", "HNNOMX": "墨西哥西北部标准时间", "WEZ": "西欧标准时间", "HEPMX": "墨西哥太平洋夏令时间", "AKST": "阿拉斯加标准时间", "∅∅∅": "亚速尔群岛夏令时间", "NZDT": "新西兰夏令时间", "PDT": "北美太平洋夏令时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "WESZ": "西欧夏令时间", "HNCU": "古巴标准时间", "GFT": "法属圭亚那标准时间", "GYT": "圭亚那时间", "ChST": "查莫罗时间", "HAST": "夏威夷-阿留申标准时间", "HECU": "古巴夏令时间", "MST": "澳门标准时间", "HNEG": "格陵兰岛东部标准时间", "ADT": "大西洋夏令时间", "MESZ": "中欧夏令时间", "WITA": "印度尼西亚中部时间", "ECT": "厄瓜多尔标准时间", "IST": "印度时间", "CHADT": "查坦夏令时间", "MDT": "澳门夏令时间", "AWST": "澳大利亚西部标准时间", "ART": "阿根廷标准时间", "AEST": "澳大利亚东部标准时间", "COT": "哥伦比亚标准时间", "CLST": "智利夏令时间", "CDT": "北美中部夏令时间", "LHDT": "豪勋爵岛夏令时间", "WAST": "西部非洲夏令时间", "OESZ": "东欧夏令时间", "HKT": "香港标准时间", "SRT": "苏里南时间", "HADT": "夏威夷-阿留申夏令时间", "ACDT": "澳大利亚中部夏令时间", "JST": "日本标准时间", "HKST": "香港夏令时间", "GMT": "格林尼治标准时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "UYT": "乌拉圭标准时间", "ACWST": "澳大利亚中西部标准时间", "HNPMX": "墨西哥太平洋标准时间", "HNT": "纽芬兰标准时间", "WIB": "印度尼西亚西部时间", "MYT": "马来西亚时间", "NZST": "新西兰标准时间", "EAT": "东部非洲时间", "ACWDT": "澳大利亚中西部夏令时间", "CHAST": "查坦标准时间", "VET": "委内瑞拉时间", "EDT": "北美东部夏令时间", "CST": "北美中部标准时间"}, - } - } -  -diff --git a/zh_Hans/zh_Hans.go b/zh_Hans/zh_Hans.go -index cecad1b..f3bb287 100644 ---- a/zh_Hans/zh_Hans.go -+++ b/zh_Hans/zh_Hans.go -@@ -42,32 +42,13 @@ type zh_Hans struct { - // New returns a new instance of translator for the 'zh_Hans' locale - func New() locales.Translator { - return &zh_Hans{ -- locale: "zh_Hans", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"MDT": "北美山区夏令时间", "ACWST": "澳大利亚中西部标准时间", "HECU": "古巴夏令时间", "HEPMX": "墨西哥太平洋夏令时间", "AST": "大西洋标准时间", "PDT": "北美太平洋夏令时间", "ACWDT": "澳大利亚中西部夏令时间", "HAT": "纽芬兰夏令时间", "CAT": "中部非洲时间", "GYT": "圭亚那时间", "UYT": "乌拉圭标准时间", "HAST": "夏威夷-阿留申标准时间", "ARST": "阿根廷夏令时间", "HKT": "香港标准时间", "MESZ": "中欧夏令时间", "NZST": "新西兰标准时间", "SAST": "南部非洲时间", "CST": "北美中部标准时间", "OESZ": "东欧夏令时间", "CLT": "智利标准时间", "NZDT": "新西兰夏令时间", "COT": "哥伦比亚标准时间", "ADT": "大西洋夏令时间", "CHAST": "查坦标准时间", "HNEG": "格陵兰岛东部标准时间", "WAST": "西部非洲夏令时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "HADT": "夏威夷-阿留申夏令时间", "BT": "不丹时间", "PST": "北美太平洋标准时间", "ART": "阿根廷标准时间", "MEZ": "中欧标准时间", "CHADT": "查坦夏令时间", "IST": "印度时间", "AKDT": "阿拉斯加夏令时间", "GFT": "法属圭亚那标准时间", "WIB": "印度尼西亚西部时间", "CLST": "智利夏令时间", "JDT": "日本夏令时间", "EAT": "东部非洲时间", "HNNOMX": "墨西哥西北部标准时间", "CDT": "北美中部夏令时间", "WIT": "印度尼西亚东部时间", "WESZ": "西欧夏令时间", "AWDT": "澳大利亚西部夏令时间", "HKST": "香港夏令时间", "∅∅∅": "亚马逊夏令时间", "BOT": "玻利维亚标准时间", "ACST": "澳大利亚中部标准时间", "VET": "委内瑞拉时间", "WART": "阿根廷西部标准时间", "UYST": "乌拉圭夏令时间", "MST": "北美山区标准时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "ChST": "查莫罗时间", "OEZ": "东欧标准时间", "ECT": "厄瓜多尔标准时间", "AKST": "阿拉斯加标准时间", "AEDT": "澳大利亚东部夏令时间", "LHST": "豪勋爵岛标准时间", "HNPMX": "墨西哥太平洋标准时间", "HNT": "纽芬兰标准时间", "WITA": "印度尼西亚中部时间", "HEEG": "格陵兰岛东部夏令时间", "TMST": "土库曼斯坦夏令时间", "WARST": "阿根廷西部夏令时间", "GMT": "格林尼治标准时间", "SRT": "苏里南时间", "ACDT": "澳大利亚中部夏令时间", "HNCU": "古巴标准时间", "EDT": "北美东部夏令时间", "JST": "日本标准时间", "WEZ": "西欧标准时间", "AWST": "澳大利亚西部标准时间", "LHDT": "豪勋爵岛夏令时间", "HENOMX": "墨西哥西北部夏令时间", "SGT": "新加坡标准时间", "MYT": "马来西亚时间", "HEOG": "格陵兰岛西部夏令时间", "AEST": "澳大利亚东部标准时间", "TMT": "土库曼斯坦标准时间", "WAT": "西部非洲标准时间", "COST": "哥伦比亚夏令时间", "EST": "北美东部标准时间", "HNOG": "格陵兰岛西部标准时间"}, -+ locale: "zh_Hans", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"ADT": "ADT", "UYST": "UYST", "IST": "IST", "PDT": "PDT", "WESZ": "WESZ", "VET": "VET", "WART": "WART", "CAT": "CAT", "MST": "MST", "BT": "BT", "HNPMX": "HNPMX", "WEZ": "WEZ", "HAT": "HAT", "LHDT": "LHDT", "HNPM": "HNPM", "AEST": "AEST", "HEOG": "HEOG", "EST": "EST", "CLST": "CLST", "ARST": "ARST", "HADT": "HADT", "HNNOMX": "HNNOMX", "MYT": "MYT", "GFT": "GFT", "WIB": "WIB", "CDT": "CDT", "ECT": "ECT", "ACWST": "ACWST", "WAST": "WAST", "OESZ": "OESZ", "NZDT": "NZDT", "AST": "AST", "HEPMX": "HEPMX", "WIT": "WIT", "COT": "COT", "HNOG": "HNOG", "EDT": "EDT", "CLT": "CLT", "ChST": "ChST", "HNT": "HNT", "HKST": "HKST", "EAT": "EAT", "∅∅∅": "∅∅∅", "GMT": "GMT", "ART": "ART", "ACDT": "ACDT", "HENOMX": "HENOMX", "AWDT": "AWDT", "HECU": "HECU", "WARST": "WARST", "HEEG": "HEEG", "JST": "JST", "CHADT": "CHADT", "UYT": "UYT", "OEZ": "OEZ", "AKST": "AKST", "MDT": "MDT", "BOT": "BOT", "SRT": "SRT", "HAST": "HAST", "LHST": "LHST", "AEDT": "AEDT", "PST": "PST", "SAST": "SAST", "NZST": "NZST", "AWST": "AWST", "HNCU": "HNCU", "COST": "COST", "MEZ": "MEZ", "HNEG": "HNEG", "JDT": "JDT", "HEPM": "HEPM", "CST": "CST", "MESZ": "MESZ", "ACWDT": "ACWDT", "SGT": "SGT", "HKT": "HKT", "TMT": "TMT", "TMST": "TMST", "ACST": "ACST", "CHAST": "CHAST", "WAT": "WAT", "AKDT": "AKDT", "GYT": "GYT", "WITA": "WITA"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hans) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hans) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hans) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hans) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hans) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hans) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hans) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hans' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hans) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hans' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hans) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans' -@@ -253,56 +174,7 @@ func (zh *zh_Hans) FmtCurrency(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans' -@@ -311,64 +183,7 @@ func (zh *zh_Hans) FmtAccounting(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hans' -@@ -376,17 +191,6 @@ func (zh *zh_Hans) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -395,18 +199,6 @@ func (zh *zh_Hans) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +207,6 @@ func (zh *zh_Hans) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (zh *zh_Hans) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +223,6 @@ func (zh *zh_Hans) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +231,6 @@ func (zh *zh_Hans) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,39 +239,6 @@ func (zh *zh_Hans) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,43 +247,5 @@ func (zh *zh_Hans) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hans_CN/zh_Hans_CN.go b/zh_Hans_CN/zh_Hans_CN.go -index 9e85675..8b45e9e 100644 ---- a/zh_Hans_CN/zh_Hans_CN.go -+++ b/zh_Hans_CN/zh_Hans_CN.go -@@ -42,32 +42,13 @@ type zh_Hans_CN struct { - // New returns a new instance of translator for the 'zh_Hans_CN' locale - func New() locales.Translator { - return &zh_Hans_CN{ -- locale: "zh_Hans_CN", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"CHADT": "查坦夏令时间", "HEEG": "格陵兰岛东部夏令时间", "TMT": "土库曼斯坦标准时间", "WESZ": "西欧夏令时间", "GMT": "格林尼治标准时间", "HECU": "古巴夏令时间", "OESZ": "东欧夏令时间", "HNOG": "格陵兰岛西部标准时间", "ACWDT": "澳大利亚中西部夏令时间", "ART": "阿根廷标准时间", "ARST": "阿根廷夏令时间", "LHDT": "豪勋爵岛夏令时间", "CLST": "智利夏令时间", "ECT": "厄瓜多尔标准时间", "AKDT": "阿拉斯加夏令时间", "CST": "北美中部标准时间", "ACWST": "澳大利亚中西部标准时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "CAT": "中部非洲时间", "EAT": "东部非洲时间", "HNNOMX": "墨西哥西北部标准时间", "EST": "北美东部标准时间", "AST": "大西洋标准时间", "HADT": "夏威夷-阿留申夏令时间", "NZST": "新西兰标准时间", "BOT": "玻利维亚标准时间", "AKST": "阿拉斯加标准时间", "HNT": "纽芬兰标准时间", "JST": "日本标准时间", "HNPMX": "墨西哥太平洋标准时间", "HEPMX": "墨西哥太平洋夏令时间", "GYT": "圭亚那时间", "UYST": "乌拉圭夏令时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "HAT": "纽芬兰夏令时间", "HKT": "香港标准时间", "LHST": "豪勋爵岛标准时间", "JDT": "日本夏令时间", "WART": "阿根廷西部标准时间", "PDT": "北美太平洋夏令时间", "WITA": "印度尼西亚中部时间", "MEZ": "中欧标准时间", "GFT": "法属圭亚那标准时间", "MYT": "马来西亚时间", "VET": "委内瑞拉时间", "IST": "印度时间", "CLT": "智利标准时间", "WARST": "阿根廷西部夏令时间", "MDT": "北美山区夏令时间", "MESZ": "中欧夏令时间", "ACDT": "澳大利亚中部夏令时间", "WAST": "西部非洲夏令时间", "CDT": "北美中部夏令时间", "BT": "不丹时间", "SRT": "苏里南时间", "HKST": "香港夏令时间", "CHAST": "查坦标准时间", "SAST": "南部非洲时间", "WAT": "西部非洲标准时间", "COT": "哥伦比亚标准时间", "COST": "哥伦比亚夏令时间", "WIB": "印度尼西亚西部时间", "HNCU": "古巴标准时间", "ADT": "大西洋夏令时间", "SGT": "新加坡标准时间", "AWST": "澳大利亚西部标准时间", "AWDT": "澳大利亚西部夏令时间", "ChST": "查莫罗时间", "HNEG": "格陵兰岛东部标准时间", "HENOMX": "墨西哥西北部夏令时间", "UYT": "乌拉圭标准时间", "HAST": "夏威夷-阿留申标准时间", "HEOG": "格陵兰岛西部夏令时间", "AEST": "澳大利亚东部标准时间", "ACST": "澳大利亚中部标准时间", "EDT": "北美东部夏令时间", "WIT": "印度尼西亚东部时间", "PST": "北美太平洋标准时间", "WEZ": "西欧标准时间", "AEDT": "澳大利亚东部夏令时间", "NZDT": "新西兰夏令时间", "∅∅∅": "亚马逊夏令时间", "TMST": "土库曼斯坦夏令时间", "OEZ": "东欧标准时间", "MST": "北美山区标准时间"}, -+ locale: "zh_Hans_CN", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CST": "CST", "SRT": "SRT", "LHDT": "LHDT", "MYT": "MYT", "CDT": "CDT", "ADT": "ADT", "BOT": "BOT", "WESZ": "WESZ", "HNT": "HNT", "AWDT": "AWDT", "ACWDT": "ACWDT", "UYST": "UYST", "SAST": "SAST", "TMT": "TMT", "MST": "MST", "NZST": "NZST", "ART": "ART", "HNEG": "HNEG", "UYT": "UYT", "HEOG": "HEOG", "TMST": "TMST", "AST": "AST", "HNPM": "HNPM", "IST": "IST", "ACWST": "ACWST", "CHAST": "CHAST", "HEPMX": "HEPMX", "OESZ": "OESZ", "GMT": "GMT", "PDT": "PDT", "CHADT": "CHADT", "GYT": "GYT", "COT": "COT", "CLST": "CLST", "MDT": "MDT", "ACST": "ACST", "VET": "VET", "HKST": "HKST", "ECT": "ECT", "ACDT": "ACDT", "HENOMX": "HENOMX", "AWST": "AWST", "PST": "PST", "AEDT": "AEDT", "WITA": "WITA", "JDT": "JDT", "AEST": "AEST", "HNCU": "HNCU", "CLT": "CLT", "HEEG": "HEEG", "HEPM": "HEPM", "AKST": "AKST", "COST": "COST", "HNOG": "HNOG", "ChST": "ChST", "LHST": "LHST", "WAT": "WAT", "AKDT": "AKDT", "ARST": "ARST", "EAT": "EAT", "MESZ": "MESZ", "WART": "WART", "WARST": "WARST", "WIT": "WIT", "∅∅∅": "∅∅∅", "WEZ": "WEZ", "HADT": "HADT", "MEZ": "MEZ", "HNPMX": "HNPMX", "EST": "EST", "EDT": "EDT", "CAT": "CAT", "OEZ": "OEZ", "HKT": "HKT", "NZDT": "NZDT", "WIB": "WIB", "HAST": "HAST", "HNNOMX": "HNNOMX", "JST": "JST", "BT": "BT", "SGT": "SGT", "HECU": "HECU", "WAST": "WAST", "GFT": "GFT", "HAT": "HAT"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hans_CN) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hans_CN) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hans_CN) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hans_CN) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hans_CN) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hans_CN) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hans_CN) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hans_CN' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hans_CN) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hans_CN' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hans_CN) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_CN' -@@ -253,56 +174,7 @@ func (zh *zh_Hans_CN) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_CN' -@@ -311,64 +183,7 @@ func (zh *zh_Hans_CN) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hans_CN' -@@ -376,17 +191,6 @@ func (zh *zh_Hans_CN) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -395,18 +199,6 @@ func (zh *zh_Hans_CN) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +207,6 @@ func (zh *zh_Hans_CN) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (zh *zh_Hans_CN) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +223,6 @@ func (zh *zh_Hans_CN) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +231,6 @@ func (zh *zh_Hans_CN) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,39 +239,6 @@ func (zh *zh_Hans_CN) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,43 +247,5 @@ func (zh *zh_Hans_CN) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hans_HK/zh_Hans_HK.go b/zh_Hans_HK/zh_Hans_HK.go -index a2d987c..62c2400 100644 ---- a/zh_Hans_HK/zh_Hans_HK.go -+++ b/zh_Hans_HK/zh_Hans_HK.go -@@ -42,32 +42,13 @@ type zh_Hans_HK struct { - // New returns a new instance of translator for the 'zh_Hans_HK' locale - func New() locales.Translator { - return &zh_Hans_HK{ -- locale: "zh_Hans_HK", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"HAST": "夏威夷-阿留申标准时间", "PST": "北美太平洋标准时间", "WITA": "印度尼西亚中部时间", "HNEG": "格陵兰岛东部标准时间", "BOT": "玻利维亚标准时间", "ACST": "澳大利亚中部标准时间", "HNCU": "古巴标准时间", "CDT": "北美中部夏令时间", "ChST": "查莫罗时间", "HENOMX": "墨西哥西北部夏令时间", "ACWST": "澳大利亚中西部标准时间", "MEZ": "中欧标准时间", "CHADT": "查坦夏令时间", "JST": "日本标准时间", "CLST": "智利夏令时间", "TMST": "土库曼斯坦夏令时间", "COST": "哥伦比亚夏令时间", "MDT": "澳门夏令时间", "UYST": "乌拉圭夏令时间", "OEZ": "东欧标准时间", "WART": "阿根廷西部标准时间", "CLT": "智利标准时间", "WARST": "阿根廷西部夏令时间", "COT": "哥伦比亚标准时间", "LHST": "豪勋爵岛标准时间", "HEPMX": "墨西哥太平洋夏令时间", "AKDT": "阿拉斯加夏令时间", "CST": "北美中部标准时间", "ADT": "大西洋夏令时间", "HKT": "香港标准时间", "ACDT": "澳大利亚中部夏令时间", "OESZ": "东欧夏令时间", "HNPMX": "墨西哥太平洋标准时间", "AEDT": "澳大利亚东部夏令时间", "JDT": "日本夏令时间", "EST": "北美东部标准时间", "HKST": "香港夏令时间", "MESZ": "中欧夏令时间", "MST": "澳门标准时间", "WESZ": "西欧夏令时间", "AEST": "澳大利亚东部标准时间", "WAT": "西部非洲标准时间", "ECT": "厄瓜多尔标准时间", "EDT": "北美东部夏令时间", "GYT": "圭亚那时间", "WIT": "印度尼西亚东部时间", "HAT": "纽芬兰夏令时间", "UYT": "乌拉圭标准时间", "HADT": "夏威夷-阿留申夏令时间", "ARST": "阿根廷夏令时间", "WEZ": "西欧标准时间", "AWST": "澳大利亚西部标准时间", "WAST": "西部非洲夏令时间", "AST": "大西洋标准时间", "MYT": "马来西亚时间", "TMT": "土库曼斯坦标准时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "CHAST": "查坦标准时间", "LHDT": "豪勋爵岛夏令时间", "HEOG": "格陵兰岛西部夏令时间", "AWDT": "澳大利亚西部夏令时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "IST": "印度时间", "SRT": "苏里南时间", "HNT": "纽芬兰标准时间", "ART": "阿根廷标准时间", "HNOG": "格陵兰岛西部标准时间", "NZST": "新西兰标准时间", "CAT": "中部非洲时间", "HECU": "古巴夏令时间", "WIB": "印度尼西亚西部时间", "NZDT": "新西兰夏令时间", "SAST": "南部非洲时间", "AKST": "阿拉斯加标准时间", "VET": "委内瑞拉时间", "ACWDT": "澳大利亚中西部夏令时间", "GMT": "格林尼治标准时间", "HEEG": "格陵兰岛东部夏令时间", "GFT": "法属圭亚那标准时间", "SGT": "新加坡标准时间", "BT": "不丹时间", "PDT": "北美太平洋夏令时间", "∅∅∅": "秘鲁夏令时间", "EAT": "东部非洲时间", "HNNOMX": "墨西哥西北部标准时间"}, -+ locale: "zh_Hans_HK", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"CST": "CST", "ART": "ART", "ARST": "ARST", "HADT": "HADT", "MEZ": "MEZ", "LHST": "LHST", "HNPMX": "HNPMX", "HKST": "HKST", "AKST": "AKST", "GMT": "GMT", "EAT": "EAT", "IST": "IST", "SGT": "SGT", "HECU": "HECU", "WAT": "WAT", "HEEG": "HEEG", "HNPM": "HNPM", "WEZ": "WEZ", "HNT": "HNT", "MDT": "MDT", "ACWDT": "ACWDT", "HNCU": "HNCU", "EDT": "EDT", "CDT": "CDT", "BOT": "BOT", "ACDT": "ACDT", "HNEG": "HNEG", "JDT": "JDT", "∅∅∅": "∅∅∅", "WAST": "WAST", "EST": "EST", "SAST": "SAST", "HEOG": "HEOG", "TMT": "TMT", "MESZ": "MESZ", "AWST": "AWST", "MYT": "MYT", "HEPMX": "HEPMX", "OEZ": "OEZ", "TMST": "TMST", "SRT": "SRT", "AWDT": "AWDT", "HAT": "HAT", "WITA": "WITA", "JST": "JST", "CHADT": "CHADT", "PST": "PST", "PDT": "PDT", "WESZ": "WESZ", "HAST": "HAST", "ACST": "ACST", "BT": "BT", "COST": "COST", "NZDT": "NZDT", "GFT": "GFT", "HKT": "HKT", "MST": "MST", "HNNOMX": "HNNOMX", "LHDT": "LHDT", "HEPM": "HEPM", "VET": "VET", "UYST": "UYST", "ACWST": "ACWST", "GYT": "GYT", "CAT": "CAT", "CLST": "CLST", "ECT": "ECT", "UYT": "UYT", "AEST": "AEST", "AEDT": "AEDT", "AKDT": "AKDT", "WARST": "WARST", "ChST": "ChST", "NZST": "NZST", "WIB": "WIB", "ADT": "ADT", "HENOMX": "HENOMX", "CHAST": "CHAST", "WART": "WART", "COT": "COT", "HNOG": "HNOG", "OESZ": "OESZ", "WIT": "WIT", "CLT": "CLT", "AST": "AST"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hans_HK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hans_HK) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hans_HK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hans_HK) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hans_HK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hans_HK) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hans_HK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hans_HK' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hans_HK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hans_HK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hans_HK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_HK' -@@ -253,56 +174,7 @@ func (zh *zh_Hans_HK) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_HK' -@@ -311,64 +183,7 @@ func (zh *zh_Hans_HK) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hans_HK' -@@ -395,18 +210,6 @@ func (zh *zh_Hans_HK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +218,6 @@ func (zh *zh_Hans_HK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +226,6 @@ func (zh *zh_Hans_HK) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +234,6 @@ func (zh *zh_Hans_HK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +242,6 @@ func (zh *zh_Hans_HK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,39 +250,6 @@ func (zh *zh_Hans_HK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,43 +258,5 @@ func (zh *zh_Hans_HK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hans_MO/zh_Hans_MO.go b/zh_Hans_MO/zh_Hans_MO.go -index c3d9bdb..f2b336c 100644 ---- a/zh_Hans_MO/zh_Hans_MO.go -+++ b/zh_Hans_MO/zh_Hans_MO.go -@@ -42,32 +42,13 @@ type zh_Hans_MO struct { - // New returns a new instance of translator for the 'zh_Hans_MO' locale - func New() locales.Translator { - return &zh_Hans_MO{ -- locale: "zh_Hans_MO", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"CLST": "智利夏令时间", "∅∅∅": "亚马逊夏令时间", "TMT": "土库曼斯坦标准时间", "ACST": "澳大利亚中部标准时间", "WAT": "西部非洲标准时间", "HEOG": "格陵兰岛西部夏令时间", "WESZ": "西欧夏令时间", "WITA": "印度尼西亚中部时间", "WARST": "阿根廷西部夏令时间", "HNNOMX": "墨西哥西北部标准时间", "HNT": "纽芬兰标准时间", "AEDT": "澳大利亚东部夏令时间", "HKT": "香港标准时间", "EAT": "东部非洲时间", "ECT": "厄瓜多尔标准时间", "AKST": "阿拉斯加标准时间", "AST": "大西洋标准时间", "PDT": "北美太平洋夏令时间", "LHST": "豪勋爵岛标准时间", "IST": "印度时间", "CLT": "智利标准时间", "WART": "阿根廷西部标准时间", "BT": "不丹时间", "PST": "北美太平洋标准时间", "MESZ": "中欧夏令时间", "ChST": "查莫罗时间", "GFT": "法属圭亚那标准时间", "GMT": "格林尼治标准时间", "WAST": "西部非洲夏令时间", "HECU": "古巴夏令时间", "HAST": "夏威夷-阿留申标准时间", "VET": "委内瑞拉时间", "NZDT": "新西兰夏令时间", "MDT": "北美山区夏令时间", "HAT": "纽芬兰夏令时间", "ACDT": "澳大利亚中部夏令时间", "MYT": "马来西亚时间", "HADT": "夏威夷-阿留申夏令时间", "HNEG": "格陵兰岛东部标准时间", "ACWDT": "澳大利亚中西部夏令时间", "ARST": "阿根廷夏令时间", "CHAST": "查坦标准时间", "HEEG": "格陵兰岛东部夏令时间", "TMST": "土库曼斯坦夏令时间", "GYT": "圭亚那时间", "CST": "北美中部标准时间", "ADT": "大西洋夏令时间", "OEZ": "东欧标准时间", "COT": "哥伦比亚标准时间", "OESZ": "东欧夏令时间", "EST": "北美东部标准时间", "WIB": "印度尼西亚西部时间", "WEZ": "西欧标准时间", "AEST": "澳大利亚东部标准时间", "JST": "日本标准时间", "HNCU": "古巴标准时间", "UYST": "乌拉圭夏令时间", "AKDT": "阿拉斯加夏令时间", "MST": "北美山区标准时间", "EDT": "北美东部夏令时间", "HEPMX": "墨西哥太平洋夏令时间", "MEZ": "中欧标准时间", "CAT": "中部非洲时间", "HNOG": "格陵兰岛西部标准时间", "AWST": "澳大利亚西部标准时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "UYT": "乌拉圭标准时间", "ACWST": "澳大利亚中西部标准时间", "AWDT": "澳大利亚西部夏令时间", "SGT": "新加坡标准时间", "WIT": "印度尼西亚东部时间", "CHADT": "查坦夏令时间", "BOT": "玻利维亚标准时间", "SAST": "南部非洲时间", "SRT": "苏里南时间", "ART": "阿根廷标准时间", "HKST": "香港夏令时间", "CDT": "北美中部夏令时间", "HNPMX": "墨西哥太平洋标准时间", "COST": "哥伦比亚夏令时间", "HENOMX": "墨西哥西北部夏令时间", "LHDT": "豪勋爵岛夏令时间", "NZST": "新西兰标准时间", "JDT": "日本夏令时间"}, -+ locale: "zh_Hans_MO", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"UYT": "UYT", "UYST": "UYST", "WESZ": "WESZ", "WIT": "WIT", "AST": "AST", "ChST": "ChST", "ART": "ART", "HNEG": "HNEG", "SAST": "SAST", "ECT": "ECT", "GMT": "GMT", "ARST": "ARST", "MEZ": "MEZ", "HNNOMX": "HNNOMX", "PDT": "PDT", "CHAST": "CHAST", "OESZ": "OESZ", "WARST": "WARST", "HEOG": "HEOG", "WIB": "WIB", "EAT": "EAT", "JDT": "JDT", "HEPMX": "HEPMX", "ADT": "ADT", "MESZ": "MESZ", "LHST": "LHST", "HECU": "HECU", "HNPMX": "HNPMX", "WART": "WART", "GYT": "GYT", "CST": "CST", "HEEG": "HEEG", "MYT": "MYT", "PST": "PST", "ACWDT": "ACWDT", "AEDT": "AEDT", "WITA": "WITA", "NZDT": "NZDT", "HNCU": "HNCU", "WAT": "WAT", "WAST": "WAST", "CDT": "CDT", "MDT": "MDT", "NZST": "NZST", "COST": "COST", "TMT": "TMT", "BT": "BT", "AEST": "AEST", "VET": "VET", "HNT": "HNT", "CHADT": "CHADT", "SGT": "SGT", "AKDT": "AKDT", "HKT": "HKT", "HKST": "HKST", "CAT": "CAT", "MST": "MST", "BOT": "BOT", "ACDT": "ACDT", "AWST": "AWST", "LHDT": "LHDT", "HNPM": "HNPM", "HENOMX": "HENOMX", "WEZ": "WEZ", "OEZ": "OEZ", "HAT": "HAT", "ACWST": "ACWST", "GFT": "GFT", "COT": "COT", "EDT": "EDT", "TMST": "TMST", "CLST": "CLST", "HAST": "HAST", "AWDT": "AWDT", "ACST": "ACST", "IST": "IST", "∅∅∅": "∅∅∅", "AKST": "AKST", "HNOG": "HNOG", "EST": "EST", "CLT": "CLT", "SRT": "SRT", "HADT": "HADT", "HEPM": "HEPM", "JST": "JST"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hans_MO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hans_MO) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hans_MO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hans_MO) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hans_MO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hans_MO) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hans_MO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hans_MO' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hans_MO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hans_MO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hans_MO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_MO' -@@ -253,56 +174,7 @@ func (zh *zh_Hans_MO) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_MO' -@@ -311,64 +183,7 @@ func (zh *zh_Hans_MO) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hans_MO' -@@ -395,18 +210,6 @@ func (zh *zh_Hans_MO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +218,6 @@ func (zh *zh_Hans_MO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +226,6 @@ func (zh *zh_Hans_MO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +234,6 @@ func (zh *zh_Hans_MO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +242,6 @@ func (zh *zh_Hans_MO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,39 +250,6 @@ func (zh *zh_Hans_MO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,43 +258,5 @@ func (zh *zh_Hans_MO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hans_SG/zh_Hans_SG.go b/zh_Hans_SG/zh_Hans_SG.go -index d3eb810..2d53d63 100644 ---- a/zh_Hans_SG/zh_Hans_SG.go -+++ b/zh_Hans_SG/zh_Hans_SG.go -@@ -42,32 +42,13 @@ type zh_Hans_SG struct { - // New returns a new instance of translator for the 'zh_Hans_SG' locale - func New() locales.Translator { - return &zh_Hans_SG{ -- locale: "zh_Hans_SG", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"ACDT": "澳大利亚中部夏令时间", "HAT": "纽芬兰夏令时间", "LHDT": "豪勋爵岛夏令时间", "EAT": "东部非洲时间", "AKDT": "阿拉斯加夏令时间", "WEZ": "西欧标准时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "HNNOMX": "墨西哥西北部标准时间", "MST": "澳门标准时间", "BT": "不丹时间", "CLT": "智利标准时间", "HNEG": "格陵兰岛东部标准时间", "GMT": "格林尼治标准时间", "SGT": "新加坡标准时间", "HNT": "纽芬兰标准时间", "HNOG": "格陵兰岛西部标准时间", "HKT": "香港标准时间", "NZST": "新西兰标准时间", "TMST": "土库曼斯坦夏令时间", "CAT": "中部非洲时间", "OESZ": "东欧夏令时间", "ECT": "厄瓜多尔标准时间", "HNCU": "古巴标准时间", "VET": "委内瑞拉时间", "ACWST": "澳大利亚中西部标准时间", "BOT": "玻利维亚标准时间", "ADT": "大西洋夏令时间", "MEZ": "中欧标准时间", "IST": "印度时间", "WAST": "西部非洲夏令时间", "HADT": "夏威夷-阿留申夏令时间", "PST": "北美太平洋标准时间", "JST": "日本标准时间", "COST": "哥伦比亚夏令时间", "HENOMX": "墨西哥西北部夏令时间", "AST": "大西洋标准时间", "GYT": "圭亚那时间", "ART": "阿根廷标准时间", "HEOG": "格陵兰岛西部夏令时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "OEZ": "东欧标准时间", "∅∅∅": "秘鲁夏令时间", "MYT": "马来西亚时间", "ARST": "阿根廷夏令时间", "HECU": "古巴夏令时间", "CST": "北美中部标准时间", "SRT": "苏里南时间", "JDT": "日本夏令时间", "ChST": "查莫罗时间", "HEPMX": "墨西哥太平洋夏令时间", "UYT": "乌拉圭标准时间", "AEST": "澳大利亚东部标准时间", "AWDT": "澳大利亚西部夏令时间", "CHADT": "查坦夏令时间", "WAT": "西部非洲标准时间", "WIB": "印度尼西亚西部时间", "GFT": "法属圭亚那标准时间", "EDT": "北美东部夏令时间", "AKST": "阿拉斯加标准时间", "LHST": "豪勋爵岛标准时间", "HEEG": "格陵兰岛东部夏令时间", "WARST": "阿根廷西部夏令时间", "HNPMX": "墨西哥太平洋标准时间", "UYST": "乌拉圭夏令时间", "WIT": "印度尼西亚东部时间", "WITA": "印度尼西亚中部时间", "SAST": "南部非洲时间", "ACST": "澳大利亚中部标准时间", "EST": "北美东部标准时间", "MDT": "澳门夏令时间", "PDT": "北美太平洋夏令时间", "WESZ": "西欧夏令时间", "ACWDT": "澳大利亚中西部夏令时间", "MESZ": "中欧夏令时间", "NZDT": "新西兰夏令时间", "WART": "阿根廷西部标准时间", "COT": "哥伦比亚标准时间", "CDT": "北美中部夏令时间", "HAST": "夏威夷-阿留申标准时间", "AEDT": "澳大利亚东部夏令时间", "AWST": "澳大利亚西部标准时间", "HKST": "香港夏令时间", "CHAST": "查坦标准时间", "CLST": "智利夏令时间", "TMT": "土库曼斯坦标准时间"}, -+ locale: "zh_Hans_SG", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "$", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIT": "WIT", "HNOG": "HNOG", "TMT": "TMT", "HNEG": "HNEG", "WEZ": "WEZ", "VET": "VET", "SGT": "SGT", "GFT": "GFT", "MST": "MST", "NZDT": "NZDT", "HAST": "HAST", "HADT": "HADT", "CHAST": "CHAST", "GYT": "GYT", "COT": "COT", "WITA": "WITA", "MDT": "MDT", "EAT": "EAT", "UYT": "UYT", "WAT": "WAT", "HNPM": "HNPM", "HNCU": "HNCU", "AST": "AST", "CAT": "CAT", "CDT": "CDT", "∅∅∅": "∅∅∅", "ACWST": "ACWST", "HEPMX": "HEPMX", "AKST": "AKST", "WARST": "WARST", "HKT": "HKT", "TMST": "TMST", "ARST": "ARST", "MESZ": "MESZ", "BT": "BT", "HECU": "HECU", "ACDT": "ACDT", "HAT": "HAT", "ECT": "ECT", "ART": "ART", "HEPM": "HEPM", "PST": "PST", "HNT": "HNT", "IST": "IST", "PDT": "PDT", "WAST": "WAST", "HEOG": "HEOG", "NZST": "NZST", "ACST": "ACST", "AWDT": "AWDT", "MYT": "MYT", "COST": "COST", "HNPMX": "HNPMX", "OEZ": "OEZ", "WART": "WART", "JDT": "JDT", "UYST": "UYST", "ACWDT": "ACWDT", "AEDT": "AEDT", "EST": "EST", "HEEG": "HEEG", "HNNOMX": "HNNOMX", "AWST": "AWST", "BOT": "BOT", "MEZ": "MEZ", "HKST": "HKST", "CST": "CST", "ADT": "ADT", "ChST": "ChST", "LHDT": "LHDT", "WESZ": "WESZ", "WIB": "WIB", "SAST": "SAST", "CLT": "CLT", "CLST": "CLST", "GMT": "GMT", "SRT": "SRT", "LHST": "LHST", "JST": "JST", "AEST": "AEST", "OESZ": "OESZ", "EDT": "EDT", "HENOMX": "HENOMX", "CHADT": "CHADT", "AKDT": "AKDT"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hans_SG) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hans_SG) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hans_SG) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hans_SG) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hans_SG) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hans_SG) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hans_SG) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hans_SG' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hans_SG) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hans_SG' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hans_SG) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_SG' -@@ -253,56 +174,7 @@ func (zh *zh_Hans_SG) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hans_SG' -@@ -311,64 +183,7 @@ func (zh *zh_Hans_SG) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hans_SG' -@@ -405,18 +220,6 @@ func (zh *zh_Hans_SG) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -425,18 +228,6 @@ func (zh *zh_Hans_SG) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -445,19 +236,6 @@ func (zh *zh_Hans_SG) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -466,27 +244,6 @@ func (zh *zh_Hans_SG) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -495,34 +252,6 @@ func (zh *zh_Hans_SG) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -531,39 +260,6 @@ func (zh *zh_Hans_SG) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -572,43 +268,5 @@ func (zh *zh_Hans_SG) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hant/zh_Hant.go b/zh_Hant/zh_Hant.go -index 1f0a53a..39f46a0 100644 ---- a/zh_Hant/zh_Hant.go -+++ b/zh_Hant/zh_Hant.go -@@ -67,7 +67,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"西元前", "西元"}, - erasNarrow: []string{"西元前", "西元"}, - erasWide: []string{"西元前", "西元"}, -- timezones: map[string]string{"ART": "阿根廷標準時間", "ARST": "阿根廷夏令時間", "ACDT": "澳洲中部夏令時間", "WAT": "西非標準時間", "HNPM": "聖皮埃爾和密克隆群島標準時間", "COT": "哥倫比亞標準時間", "GYT": "蓋亞那時間", "WIB": "印尼西部時間", "BT": "不丹時間", "HKT": "香港標準時間", "WITA": "印尼中部時間", "LHDT": "豪勳爵島夏令時間", "GFT": "法屬圭亞那時間", "HNNOMX": "墨西哥西北部標準時間", "HENOMX": "墨西哥西北部夏令時間", "HNCU": "古巴標準時間", "VET": "委內瑞拉時間", "AEDT": "澳洲東部夏令時間", "JST": "日本標準時間", "CAT": "中非時間", "SRT": "蘇利南時間", "WEZ": "西歐標準時間", "ACWDT": "澳洲中西部夏令時間", "PDT": "太平洋夏令時間", "HEEG": "格陵蘭東部夏令時間", "MST": "澳門標準時間", "WART": "阿根廷西部標準時間", "UYST": "烏拉圭夏令時間", "CLT": "智利標準時間", "∅∅∅": "亞馬遜夏令時間", "ACST": "澳洲中部標準時間", "EAT": "東非時間", "EDT": "東部夏令時間", "CST": "中部標準時間", "HAST": "夏威夷-阿留申標準時間", "ACWST": "澳洲中西部標準時間", "CHADT": "查坦群島夏令時間", "IST": "印度標準時間", "AWST": "澳洲西部標準時間", "COST": "哥倫比亞夏令時間", "AKDT": "阿拉斯加夏令時間", "WESZ": "西歐夏令時間", "HEOG": "格陵蘭西部夏令時間", "MESZ": "中歐夏令時間", "HNEG": "格陵蘭東部標準時間", "HEPMX": "墨西哥太平洋夏令時間", "AKST": "阿拉斯加標準時間", "AWDT": "澳洲西部夏令時間", "TMT": "土庫曼標準時間", "SGT": "新加坡標準時間", "JDT": "日本夏令時間", "OEZ": "東歐標準時間", "ECT": "厄瓜多時間", "MDT": "澳門夏令時間", "EST": "東部標準時間", "ADT": "大西洋夏令時間", "CHAST": "查坦群島標準時間", "MEZ": "中歐標準時間", "WAST": "西非夏令時間", "WIT": "印尼東部時間", "HNOG": "格陵蘭西部標準時間", "NZDT": "紐西蘭夏令時間", "SAST": "南非標準時間", "HECU": "古巴夏令時間", "MYT": "馬來西亞時間", "UYT": "烏拉圭標準時間", "HEPM": "聖皮埃爾和密克隆群島夏令時間", "NZST": "紐西蘭標準時間", "AEST": "澳洲東部標準時間", "ChST": "查莫洛時間", "AST": "大西洋標準時間", "OESZ": "東歐夏令時間", "WARST": "阿根廷西部夏令時間", "HNPMX": "墨西哥太平洋標準時間", "CDT": "中部夏令時間", "HADT": "夏威夷-阿留申夏令時間", "HNT": "紐芬蘭標準時間", "CLST": "智利夏令時間", "BOT": "玻利維亞時間", "HAT": "紐芬蘭夏令時間", "HKST": "香港夏令時間", "GMT": "格林威治標準時間", "PST": "太平洋標準時間", "LHST": "豪勳爵島標準時間", "TMST": "土庫曼夏令時間"}, -+ timezones: map[string]string{"HEPMX": "墨西哥太平洋夏令時間", "HEOG": "格陵蘭西部夏令時間", "CDT": "中部夏令時間", "ART": "阿根廷標準時間", "AWDT": "澳洲西部夏令時間", "WESZ": "西歐夏令時間", "HNCU": "古巴標準時間", "NZDT": "紐西蘭夏令時間", "HEPM": "聖皮埃爾和密克隆群島夏令時間", "UYT": "烏拉圭標準時間", "SGT": "新加坡標準時間", "HKT": "香港標準時間", "WIB": "印尼西部時間", "ChST": "查莫洛時間", "HKST": "香港夏令時間", "CST": "中部標準時間", "EAT": "東非時間", "HNPM": "聖皮埃爾和密克隆群島標準時間", "AEDT": "澳洲東部夏令時間", "SAST": "南非標準時間", "CLT": "智利標準時間", "CHAST": "查坦群島標準時間", "OESZ": "東歐夏令時間", "HADT": "夏威夷-阿留申夏令時間", "CAT": "中非時間", "NZST": "紐西蘭標準時間", "ADT": "大西洋夏令時間", "GMT": "格林威治標準時間", "MESZ": "中歐夏令時間", "HNNOMX": "墨西哥西北部標準時間", "WART": "阿根廷西部標準時間", "WARST": "阿根廷西部夏令時間", "ACWDT": "澳洲中西部夏令時間", "LHDT": "豪勳爵島夏令時間", "PDT": "太平洋夏令時間", "CHADT": "查坦群島夏令時間", "BT": "不丹時間", "OEZ": "東歐標準時間", "MYT": "馬來西亞時間", "HNT": "紐芬蘭標準時間", "HAT": "紐芬蘭夏令時間", "COT": "哥倫比亞標準時間", "EST": "東部標準時間", "EDT": "東部夏令時間", "WITA": "印尼中部時間", "∅∅∅": "亞馬遜夏令時間", "WAT": "西非標準時間", "IST": "印度標準時間", "AST": "大西洋標準時間", "BOT": "玻利維亞時間", "HENOMX": "墨西哥西北部夏令時間", "VET": "委內瑞拉時間", "TMST": "土庫曼夏令時間", "CLST": "智利夏令時間", "MST": "澳門標準時間", "HNEG": "格陵蘭東部標準時間", "HEEG": "格陵蘭東部夏令時間", "AEST": "澳洲東部標準時間", "WIT": "印尼東部時間", "COST": "哥倫比亞夏令時間", "HAST": "夏威夷-阿留申標準時間", "AWST": "澳洲西部標準時間", "LHST": "豪勳爵島標準時間", "HECU": "古巴夏令時間", "HNOG": "格陵蘭西部標準時間", "TMT": "土庫曼標準時間", "MEZ": "中歐標準時間", "ACST": "澳洲中部標準時間", "JDT": "日本夏令時間", "AKST": "阿拉斯加標準時間", "GFT": "法屬圭亞那時間", "ECT": "厄瓜多時間", "SRT": "蘇利南時間", "JST": "日本標準時間", "WEZ": "西歐標準時間", "MDT": "澳門夏令時間", "ACWST": "澳洲中西部標準時間", "AKDT": "阿拉斯加夏令時間", "GYT": "蓋亞那時間", "PST": "太平洋標準時間", "WAST": "西非夏令時間", "ARST": "阿根廷夏令時間", "UYST": "烏拉圭夏令時間", "HNPMX": "墨西哥太平洋標準時間", "ACDT": "澳洲中部夏令時間"}, - } - } -  -diff --git a/zh_Hant_HK/zh_Hant_HK.go b/zh_Hant_HK/zh_Hant_HK.go -index e631368..ca5c469 100644 ---- a/zh_Hant_HK/zh_Hant_HK.go -+++ b/zh_Hant_HK/zh_Hant_HK.go -@@ -48,30 +48,14 @@ func New() locales.Translator { - pluralsCardinal: []locales.PluralRule{6}, - pluralsOrdinal: []locales.PluralRule{6}, - pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", - timeSeparator: ":", -- inifinity: "∞", - currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "₩", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "NT$", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, - currencyPositiveSuffix: "K", - currencyNegativeSuffix: "K", -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, - erasAbbreviated: []string{"公元前", "公元"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"MDT": "澳门夏令时间", "CST": "北美中部標準時間", "CHADT": "查坦夏令时间", "JDT": "日本夏令时间", "HEEG": "格陵兰岛东部夏令时间", "EAT": "东部非洲时间", "WAT": "西部非洲标准时间", "PST": "北美太平洋標準時間", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "LHDT": "豪勋爵岛夏令时间", "HNPMX": "墨西哥太平洋标准时间", "CDT": "中部夏令時間", "UYT": "乌拉圭标准时间", "UYST": "乌拉圭夏令时间", "ACWDT": "澳大利亚中西部夏令时间", "SGT": "新加坡時間", "EST": "北美東部標準時間", "HADT": "夏威夷-阿留申夏令时间", "HKST": "香港夏令时间", "SAST": "南非時間", "JST": "日本标准时间", "WARST": "阿根廷西部夏令时间", "EDT": "北美東部夏令時間", "AKST": "阿拉斯加标准时间", "WIB": "印度尼西亚西部时间", "WIT": "印度尼西亚东部时间", "IST": "印度時間", "MYT": "马来西亚时间", "HNEG": "格陵兰岛东部标准时间", "HENOMX": "墨西哥西北部夏令时间", "COT": "哥伦比亚标准时间", "HEOG": "格陵兰岛西部夏令时间", "AEST": "澳大利亚东部标准时间", "ACST": "澳大利亚中部标准时间", "ACDT": "澳大利亚中部夏令时间", "CAT": "中部非洲时间", "HNOG": "格陵兰岛西部标准时间", "AWST": "澳大利亚西部标准时间", "CLST": "智利夏令时间", "HNNOMX": "墨西哥西北部标准时间", "NZDT": "新西兰夏令时间", "MEZ": "中欧标准时间", "GMT": "格林尼治标准时间", "ADT": "大西洋夏令时间", "SRT": "蘇里南時間", "BT": "不丹时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "HNCU": "古巴标准时间", "AST": "大西洋标准时间", "WESZ": "西欧夏令时间", "WAST": "西部非洲夏令时间", "ACWST": "澳大利亚中西部标准时间", "HNT": "纽芬兰标准时间", "WITA": "印度尼西亚中部时间", "CHAST": "查坦标准时间", "MESZ": "中欧夏令时间", "BOT": "玻利维亚标准时间", "HEPMX": "墨西哥太平洋夏令时间", "AKDT": "阿拉斯加夏令时间", "AWDT": "澳大利亚西部夏令时间", "AEDT": "澳大利亚东部夏令时间", "LHST": "豪勋爵岛标准时间", "ECT": "厄瓜多爾時間", "GYT": "圭亞那時間", "PDT": "北美太平洋夏令時間", "NZST": "新西兰标准时间", "TMST": "土库曼斯坦夏令时间", "COST": "哥伦比亚夏令时间", "ARST": "阿根廷夏令时间", "GFT": "法属圭亚那标准时间", "TMT": "土库曼斯坦标准时间", "∅∅∅": "亚速尔群岛夏令时间", "MST": "澳门标准时间", "HAST": "夏威夷-阿留申标准时间", "WEZ": "西欧标准时间", "ART": "阿根廷标准时间", "OEZ": "东欧标准时间", "HAT": "纽芬兰夏令时间", "CLT": "智利标准时间", "WART": "阿根廷西部标准时间", "HECU": "古巴夏令时间", "VET": "委内瑞拉时间", "HKT": "香港标准时间", "ChST": "查莫罗时间", "OESZ": "东欧夏令时间"}, -+ timezones: map[string]string{"NZDT": "NZDT", "ART": "ART", "EAT": "EAT", "MESZ": "MESZ", "ACDT": "ACDT", "HNT": "HNT", "WITA": "WITA", "HNEG": "HNEG", "HEPM": "HEPM", "HNCU": "HNCU", "HEOG": "HEOG", "HKST": "HKST", "HADT": "HADT", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "HNPM": "HNPM", "AKDT": "AKDT", "WIB": "WIB", "MST": "MST", "ADT": "ADT", "JDT": "JDT", "LHST": "LHST", "ACWST": "ACWST", "VET": "VET", "OESZ": "OESZ", "ChST": "ChST", "MEZ": "MEZ", "MYT": "MYT", "UYST": "UYST", "HEPMX": "HEPMX", "WAST": "WAST", "CLT": "CLT", "ECT": "厄瓜多爾時間", "CHAST": "CHAST", "UYT": "UYT", "CDT": "中部夏令時間", "ARST": "ARST", "JST": "JST", "COT": "COT", "TMST": "TMST", "MDT": "MDT", "CHADT": "CHADT", "∅∅∅": "∅∅∅", "CAT": "CAT", "GMT": "GMT", "BOT": "BOT", "SGT": "新加坡時間", "AKST": "AKST", "GFT": "GFT", "HAST": "HAST", "SRT": "蘇里南時間", "HEEG": "HEEG", "AWDT": "AWDT", "WESZ": "WESZ", "PST": "北美太平洋標準時間", "PDT": "北美太平洋夏令時間", "WEZ": "WEZ", "HECU": "HECU", "HAT": "HAT", "HKT": "HKT", "CST": "北美中部標準時間", "BT": "BT", "OEZ": "OEZ", "WARST": "WARST", "GYT": "圭亞那時間", "TMT": "TMT", "CLST": "CLST", "NZST": "NZST", "ACST": "ACST", "IST": "印度時間", "WAT": "WAT", "SAST": "南非時間", "AST": "AST", "LHDT": "LHDT", "AEDT": "AEDT", "HNPMX": "HNPMX", "WART": "WART", "COST": "COST", "HNOG": "HNOG", "EST": "北美東部標準時間", "EDT": "北美東部夏令時間", "AWST": "AWST", "AEST": "AEST", "ACWDT": "ACWDT", "WIT": "WIT"}, - } - } -  -@@ -117,7 +101,7 @@ func (zh *zh_Hant_HK) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hant_HK) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -127,7 +111,7 @@ func (zh *zh_Hant_HK) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hant_HK) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -137,7 +121,7 @@ func (zh *zh_Hant_HK) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hant_HK) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -183,73 +167,13 @@ func (zh *zh_Hant_HK) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hant_HK' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hant_HK) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hant_HK' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hant_HK) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hant_HK' -@@ -257,7 +181,7 @@ func (zh *zh_Hant_HK) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 3 -+ l := len(s) + len(symbol) + 1 -  - b := make([]byte, 0, l) -  -@@ -295,7 +219,7 @@ func (zh *zh_Hant_HK) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 3 -+ l := len(s) + len(symbol) + 1 -  - b := make([]byte, 0, l) -  -@@ -364,18 +288,6 @@ func (zh *zh_Hant_HK) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -384,18 +296,6 @@ func (zh *zh_Hant_HK) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -425,27 +325,6 @@ func (zh *zh_Hant_HK) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -454,34 +333,6 @@ func (zh *zh_Hant_HK) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -490,39 +341,6 @@ func (zh *zh_Hant_HK) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -531,43 +349,5 @@ func (zh *zh_Hant_HK) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hant_MO/zh_Hant_MO.go b/zh_Hant_MO/zh_Hant_MO.go -index 1a406cb..66354f8 100644 ---- a/zh_Hant_MO/zh_Hant_MO.go -+++ b/zh_Hant_MO/zh_Hant_MO.go -@@ -42,32 +42,13 @@ type zh_Hant_MO struct { - // New returns a new instance of translator for the 'zh_Hant_MO' locale - func New() locales.Translator { - return &zh_Hant_MO{ -- locale: "zh_Hant_MO", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"WARST": "阿根廷西部夏令时间", "MST": "澳门标准时间", "SRT": "苏里南时间", "ACST": "澳大利亚中部标准时间", "ACDT": "澳大利亚中部夏令时间", "UYT": "乌拉圭标准时间", "EDT": "北美东部夏令时间", "HAT": "纽芬兰夏令时间", "HEOG": "格陵兰岛西部夏令时间", "∅∅∅": "亚马逊夏令时间", "GFT": "法属圭亚那标准时间", "WAT": "西部非洲标准时间", "GMT": "格林尼治标准时间", "LHDT": "豪勋爵岛夏令时间", "OESZ": "东欧夏令时间", "SGT": "新加坡标准时间", "NZST": "新西兰标准时间", "CHADT": "查坦夏令时间", "JST": "日本标准时间", "EST": "北美东部标准时间", "AEST": "澳大利亚东部标准时间", "NZDT": "新西兰夏令时间", "ACWDT": "澳大利亚中西部夏令时间", "HNOG": "格陵兰岛西部标准时间", "WITA": "印度尼西亚中部时间", "HNEG": "格陵兰岛东部标准时间", "OEZ": "东欧标准时间", "HNNOMX": "墨西哥西北部标准时间", "AKST": "阿拉斯加标准时间", "MDT": "澳门夏令时间", "CST": "北美中部标准时间", "ARST": "阿根廷夏令时间", "CHAST": "查坦标准时间", "MESZ": "中欧夏令时间", "WART": "阿根廷西部标准时间", "ADT": "大西洋夏令时间", "VET": "委内瑞拉时间", "ART": "阿根廷标准时间", "AEDT": "澳大利亚东部夏令时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "CLST": "智利夏令时间", "GYT": "圭亚那时间", "UYST": "乌拉圭夏令时间", "HAST": "夏威夷-阿留申标准时间", "HKT": "香港标准时间", "TMST": "土库曼斯坦夏令时间", "EAT": "东部非洲时间", "HNCU": "古巴标准时间", "ACWST": "澳大利亚中西部标准时间", "MEZ": "中欧标准时间", "LHST": "豪勋爵岛标准时间", "WAST": "西部非洲夏令时间", "COT": "哥伦比亚标准时间", "COST": "哥伦比亚夏令时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "WEZ": "西欧标准时间", "SAST": "南部非洲时间", "IST": "印度时间", "JDT": "日本夏令时间", "HEEG": "格陵兰岛东部夏令时间", "MYT": "马来西亚时间", "BT": "不丹时间", "WIT": "印度尼西亚东部时间", "HNT": "纽芬兰标准时间", "PDT": "北美太平洋夏令时间", "AWST": "澳大利亚西部标准时间", "ECT": "厄瓜多尔标准时间", "CAT": "中部非洲时间", "HECU": "古巴夏令时间", "CDT": "北美中部夏令时间", "ChST": "查莫罗时间", "BOT": "玻利维亚标准时间", "AST": "大西洋标准时间", "AWDT": "澳大利亚西部夏令时间", "TMT": "土库曼斯坦标准时间", "AKDT": "阿拉斯加夏令时间", "WIB": "印度尼西亚西部时间", "PST": "北美太平洋标准时间", "HADT": "夏威夷-阿留申夏令时间", "WESZ": "西欧夏令时间", "HKST": "香港夏令时间", "CLT": "智利标准时间", "HENOMX": "墨西哥西北部夏令时间", "HNPMX": "墨西哥太平洋标准时间", "HEPMX": "墨西哥太平洋夏令时间"}, -+ locale: "zh_Hant_MO", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP$", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"EAT": "EAT", "BT": "BT", "CHADT": "CHADT", "UYST": "UYST", "SGT": "SGT", "VET": "VET", "HNCU": "HNCU", "JST": "JST", "JDT": "JDT", "HADT": "HADT", "ACST": "ACST", "HNEG": "HNEG", "UYT": "UYT", "TMT": "TMT", "OEZ": "OEZ", "HNT": "HNT", "HAT": "HAT", "MDT": "MDT", "AST": "AST", "PST": "PST", "GFT": "GFT", "OESZ": "OESZ", "GYT": "GYT", "HKST": "HKST", "CLT": "CLT", "ChST": "ChST", "ART": "ART", "BOT": "BOT", "LHST": "LHST", "COST": "COST", "HEOG": "HEOG", "EDT": "EDT", "WITA": "WITA", "NZST": "NZST", "NZDT": "NZDT", "ACDT": "ACDT", "MYT": "MYT", "IST": "IST", "WEZ": "WEZ", "HKT": "HKT", "HNNOMX": "HNNOMX", "HNOG": "HNOG", "MESZ": "MESZ", "AWDT": "AWDT", "CLST": "CLST", "ECT": "ECT", "ARST": "ARST", "AEDT": "AEDT", "WESZ": "WESZ", "WART": "WART", "WARST": "WARST", "MST": "MST", "AWST": "AWST", "ACWST": "ACWST", "ACWDT": "ACWDT", "HEPMX": "HEPMX", "WIT": "WIT", "EST": "EST", "CAT": "CAT", "CDT": "CDT", "HEEG": "HEEG", "HENOMX": "HENOMX", "HAST": "HAST", "LHDT": "LHDT", "PDT": "PDT", "CHAST": "CHAST", "HNPMX": "HNPMX", "WAT": "WAT", "WAST": "WAST", "SAST": "SAST", "TMST": "TMST", "ADT": "ADT", "MEZ": "MEZ", "HNPM": "HNPM", "HEPM": "HEPM", "HECU": "HECU", "AKST": "AKST", "WIB": "WIB", "GMT": "GMT", "SRT": "SRT", "AKDT": "AKDT", "COT": "COT", "∅∅∅": "∅∅∅", "CST": "CST", "AEST": "AEST"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hant_MO) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hant_MO) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hant_MO) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hant_MO) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hant_MO) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hant_MO) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hant_MO) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hant_MO' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hant_MO) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hant_MO' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hant_MO) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hant_MO' -@@ -253,56 +174,7 @@ func (zh *zh_Hant_MO) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hant_MO' -@@ -311,64 +183,7 @@ func (zh *zh_Hant_MO) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hant_MO' -@@ -376,17 +191,6 @@ func (zh *zh_Hant_MO) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -395,18 +199,6 @@ func (zh *zh_Hant_MO) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +207,6 @@ func (zh *zh_Hant_MO) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (zh *zh_Hant_MO) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +223,6 @@ func (zh *zh_Hant_MO) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +231,6 @@ func (zh *zh_Hant_MO) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,39 +239,6 @@ func (zh *zh_Hant_MO) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,43 +247,5 @@ func (zh *zh_Hant_MO) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zh_Hant_TW/zh_Hant_TW.go b/zh_Hant_TW/zh_Hant_TW.go -index d0849d0..946c567 100644 ---- a/zh_Hant_TW/zh_Hant_TW.go -+++ b/zh_Hant_TW/zh_Hant_TW.go -@@ -42,32 +42,13 @@ type zh_Hant_TW struct { - // New returns a new instance of translator for the 'zh_Hant_TW' locale - func New() locales.Translator { - return &zh_Hant_TW{ -- locale: "zh_Hant_TW", -- pluralsCardinal: []locales.PluralRule{6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- monthsAbbreviated: []string{"", "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"}, -- monthsNarrow: []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"}, -- monthsWide: []string{"", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"}, -- daysAbbreviated: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysNarrow: []string{"日", "一", "二", "三", "四", "五", "六"}, -- daysShort: []string{"周日", "周一", "周二", "周三", "周四", "周五", "周六"}, -- daysWide: []string{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}, -- periodsAbbreviated: []string{"上午", "下午"}, -- periodsNarrow: []string{"上午", "下午"}, -- periodsWide: []string{"上午", "下午"}, -- erasAbbreviated: []string{"公元前", "公元"}, -- erasNarrow: []string{"公元前", "公元"}, -- erasWide: []string{"公元前", "公元"}, -- timezones: map[string]string{"AEST": "澳大利亚东部标准时间", "TMT": "土库曼斯坦标准时间", "AWST": "澳大利亚西部标准时间", "OEZ": "东欧标准时间", "WARST": "阿根廷西部夏令时间", "PDT": "北美太平洋夏令时间", "AKST": "阿拉斯加标准时间", "CST": "北美中部标准时间", "MYT": "马来西亚时间", "UYT": "乌拉圭标准时间", "AEDT": "澳大利亚东部夏令时间", "SGT": "新加坡标准时间", "HNPMX": "墨西哥太平洋标准时间", "HEPMX": "墨西哥太平洋夏令时间", "MESZ": "中欧夏令时间", "LHDT": "豪勋爵岛夏令时间", "CLST": "智利夏令时间", "HECU": "古巴夏令时间", "GMT": "格林尼治标准时间", "NZDT": "新西兰夏令时间", "ADT": "大西洋夏令时间", "HAST": "夏威夷-阿留申标准时间", "PST": "北美太平洋标准时间", "HNT": "纽芬兰标准时间", "CHADT": "查坦夏令时间", "TMST": "土库曼斯坦夏令时间", "COST": "哥伦比亚夏令时间", "GYT": "圭亚那时间", "UYST": "乌拉圭夏令时间", "HADT": "夏威夷-阿留申夏令时间", "IST": "印度时间", "ACST": "澳大利亚中部标准时间", "∅∅∅": "秘鲁夏令时间", "WIB": "印度尼西亚西部时间", "COT": "哥伦比亚标准时间", "EDT": "北美东部夏令时间", "VET": "委内瑞拉时间", "BT": "不丹时间", "HEOG": "格陵兰岛西部夏令时间", "WAT": "西部非洲标准时间", "WAST": "西部非洲夏令时间", "WART": "阿根廷西部标准时间", "WESZ": "西欧夏令时间", "HKST": "香港夏令时间", "CLT": "智利标准时间", "MDT": "澳门夏令时间", "SRT": "苏里南时间", "HNPM": "圣皮埃尔和密克隆群岛标准时间", "ECT": "厄瓜多尔标准时间", "HAT": "纽芬兰夏令时间", "HNOG": "格陵兰岛西部标准时间", "JDT": "日本夏令时间", "GFT": "法属圭亚那标准时间", "MST": "澳门标准时间", "LHST": "豪勋爵岛标准时间", "SAST": "南部非洲时间", "ACWST": "澳大利亚中西部标准时间", "ART": "阿根廷标准时间", "HKT": "香港标准时间", "AWDT": "澳大利亚西部夏令时间", "ChST": "查莫罗时间", "HNCU": "古巴标准时间", "EST": "北美东部标准时间", "AST": "大西洋标准时间", "WIT": "印度尼西亚东部时间", "WEZ": "西欧标准时间", "HEPM": "圣皮埃尔和密克隆群岛夏令时间", "NZST": "新西兰标准时间", "HNEG": "格陵兰岛东部标准时间", "HNNOMX": "墨西哥西北部标准时间", "HENOMX": "墨西哥西北部夏令时间", "AKDT": "阿拉斯加夏令时间", "ACWDT": "澳大利亚中西部夏令时间", "WITA": "印度尼西亚中部时间", "HEEG": "格陵兰岛东部夏令时间", "ACDT": "澳大利亚中部夏令时间", "EAT": "东部非洲时间", "CDT": "北美中部夏令时间", "OESZ": "东欧夏令时间", "CAT": "中部非洲时间", "CHAST": "查坦标准时间", "BOT": "玻利维亚标准时间", "ARST": "阿根廷夏令时间", "MEZ": "中欧标准时间", "JST": "日本标准时间"}, -+ locale: "zh_Hant_TW", -+ pluralsCardinal: []locales.PluralRule{6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"WIT": "WIT", "AWST": "AWST", "LHST": "LHST", "ACWDT": "ACWDT", "HNCU": "HNCU", "WART": "WART", "TMST": "TMST", "CLT": "CLT", "MDT": "MDT", "ACDT": "ACDT", "HENOMX": "HENOMX", "CHADT": "CHADT", "UYT": "UYT", "JST": "JST", "ACWST": "ACWST", "HAT": "HAT", "CDT": "CDT", "ChST": "ChST", "ARST": "ARST", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "EDT": "EDT", "HKT": "HKT", "CLST": "CLST", "WITA": "WITA", "MYT": "MYT", "JDT": "JDT", "PST": "PST", "GFT": "GFT", "HNOG": "HNOG", "HEOG": "HEOG", "MEZ": "MEZ", "∅∅∅": "∅∅∅", "IST": "IST", "AEST": "AEST", "COT": "COT", "SAST": "SAST", "GYT": "GYT", "HKST": "HKST", "BOT": "BOT", "EAT": "EAT", "WEZ": "WEZ", "HNPMX": "HNPMX", "AKST": "AKST", "TMT": "TMT", "AEDT": "AEDT", "WAT": "WAT", "NZST": "NZST", "NZDT": "NZDT", "PDT": "PDT", "HNT": "HNT", "EST": "EST", "SRT": "SRT", "LHDT": "LHDT", "UYST": "UYST", "VET": "VET", "WAST": "WAST", "WIB": "WIB", "HNPM": "HNPM", "HEPMX": "HEPMX", "ADT": "ADT", "GMT": "GMT", "WARST": "WARST", "ECT": "ECT", "MESZ": "MESZ", "ACST": "ACST", "BT": "BT", "SGT": "SGT", "ART": "ART", "HAST": "HAST", "CHAST": "CHAST", "AKDT": "AKDT", "HECU": "HECU", "OESZ": "OESZ", "MST": "MST", "AST": "AST", "HADT": "HADT", "HEEG": "HEEG", "WESZ": "WESZ", "OEZ": "OEZ", "COST": "COST", "CAT": "CAT", "CST": "CST", "HNEG": "HNEG", "HEPM": "HEPM"}, - } - } -  -@@ -113,7 +94,7 @@ func (zh *zh_Hant_TW) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zh *zh_Hant_TW) MonthsAbbreviated() []string { -- return zh.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -123,7 +104,7 @@ func (zh *zh_Hant_TW) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zh *zh_Hant_TW) MonthsNarrow() []string { -- return zh.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -133,7 +114,7 @@ func (zh *zh_Hant_TW) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zh *zh_Hant_TW) MonthsWide() []string { -- return zh.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -179,73 +160,13 @@ func (zh *zh_Hant_TW) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zh_Hant_TW' and handles both Whole and Real numbers based on 'v' - func (zh *zh_Hant_TW) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zh_Hant_TW' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zh *zh_Hant_TW) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zh.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hant_TW' -@@ -253,56 +174,7 @@ func (zh *zh_Hant_TW) FmtCurrency(num float64, v uint64, currency currency.Type) -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zh.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zh_Hant_TW' -@@ -311,64 +183,7 @@ func (zh *zh_Hant_TW) FmtAccounting(num float64, v uint64, currency currency.Typ -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zh.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zh.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zh.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zh.minus[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zh.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zh_Hant_TW' -@@ -376,17 +191,6 @@ func (zh *zh_Hant_TW) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- - return string(b) - } -  -@@ -395,18 +199,6 @@ func (zh *zh_Hant_TW) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -415,18 +207,6 @@ func (zh *zh_Hant_TW) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- - return string(b) - } -  -@@ -435,19 +215,6 @@ func (zh *zh_Hant_TW) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- -- b = append(b, []byte{0xe5, 0xb9, 0xb4}...) -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0xe6, 0x9c, 0x88}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0xe6, 0x97, 0xa5}...) -- b = append(b, zh.daysWide[t.Weekday()]...) -- - return string(b) - } -  -@@ -456,27 +223,6 @@ func (zh *zh_Hant_TW) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -485,34 +231,6 @@ func (zh *zh_Hant_TW) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -521,39 +239,6 @@ func (zh *zh_Hant_TW) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- b = append(b, tz...) -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -562,43 +247,5 @@ func (zh *zh_Hant_TW) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- tz, _ := t.Zone() -- -- if btz, ok := zh.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- -- b = append(b, []byte{0x20}...) -- -- if t.Hour() < 12 { -- b = append(b, zh.periodsAbbreviated[0]...) -- } else { -- b = append(b, zh.periodsAbbreviated[1]...) -- } -- -- h := t.Hour() -- -- if h > 12 { -- h -= 12 -- } -- -- b = strconv.AppendInt(b, int64(h), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zh.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -diff --git a/zu/zu.go b/zu/zu.go -index 2debb9d..47ba444 100644 ---- a/zu/zu.go -+++ b/zu/zu.go -@@ -71,7 +71,7 @@ func New() locales.Translator { - erasAbbreviated: []string{"BC", "AD"}, - erasNarrow: []string{"", ""}, - erasWide: []string{"BC", "AD"}, -- timezones: map[string]string{"GMT": "Isikhathi sase-Greenwich Mean", "ACWST": "Isikhathi sase-Australian Central West esivamile", "ARST": "Isikhathi sase-Argentina sasehlobo", "HNEG": "Isikhathi sase-East Greenland esijwayelekile", "ACST": "Isikhathi sase-Australian Central esivamile", "EAT": "Isikhathi saseMpumalanga Afrika", "HNPMX": "Isikhathi sase-Mexican Pacific esijwayelekile", "AWST": "Isikhathi sase-Australian Western esivamile", "SAST": "Isikhathi esijwayelekile saseNingizimu Afrika", "∅∅∅": "Isikhathi sase-Amazon sasehlobo", "AEST": "Isikhathi esivamile sase-Australian East", "WAT": "Isikhathi esijwayelekile saseNtshonalanga Afrika", "WIT": "Isikhathi sase-Eastern Indonesia", "AKDT": "Isikhathi sase-Alaska sasemini", "UYT": "Isikhathi sase-Uruguay esijwayelekile", "ACWDT": "Isikhathi sasemini sase-Australian Central West", "CHAST": "Isikhathi esivamile sase-Chatham", "AKST": "Isikhathi sase-Alaska esijwayelekile", "EST": "Isikhathi sase-North American East esijwayelekile", "WIB": "Isikhathi sase-Western Indonesia", "WESZ": "Isikhathi sasehlobo sase-Western Europe", "AWDT": "Isikhathi sase-Australian Western sasemini", "HKT": "Isikhathi esivamile sase-Hong Kong", "ACDT": "Isikhathi sase-Australian Central sasemini", "HENOMX": "Isikhathi sase-Northwest Mexico sasemini", "TMST": "Isikhathi sehlobo sase-Turkmenistan", "HAT": "Isikhathi sase-Newfoundland sasemini", "AEDT": "Isikhathi sasemini sase-Australian East", "HEEG": "Isikhathi sase-East Greenland sasemini", "CAT": "Isikhathi sase-Central Africa", "COST": "Isikhathi sase-Colombia sasehlobo", "HADT": "Isikhathi sase-Hawaii-Aleutia sasemini", "OEZ": "Isikhathi esijwayelekile sase-Eastern Europe", "COT": "Isikhathi sase-Colombia esijwayelekile", "AST": "Isikhathi sase-Atlantic esijwayelekile", "HAST": "Isikhathi sase-Hawaii-Aleutia esijwayelekile", "WEZ": "Isikhathi esijwayelekile sase-Western Europe", "HNT": "Isikhathi sase-Newfoundland esijwayelekile", "PDT": "Isikhathi sase-North American Pacific sasemini", "WITA": "Isikhathi sase-Central Indonesia", "NZST": "Isikhathi esivamile sase-New Zealand", "BOT": "Isikhathi sase-Bolivia", "HNNOMX": "Isikhathi sase-Northwest Mexico esijwayelekile", "ADT": "Isikhathi sase-Atlantic sasemini", "GYT": "Isikhathi sase-Guyana", "HEOG": "Isikhathi sase-West Greenland sasehlobo", "HKST": "Isikhathi sehlobo sase-Hong Kong", "HEPM": "Isikhathi sase-Saint Pierre nase-Miquelon sasemini", "TMT": "Isikhathi esivamile sase-Turkmenistan", "WAST": "Isikhathi sasehlobo saseNtshonalanga Afrika", "SGT": "Isikhathi esivamile sase-Singapore", "HEPMX": "Isikhathi sase-Mexican Pacific sasemini", "CST": "Isikhathi sase-North American Central esijwayelekile", "MYT": "Isikhathi sase-Malaysia", "NZDT": "Isikhathi sasemini sase-New Zealand", "ECT": "Isikhathi sase-Ecuador", "WART": "Isikhathi saseNyakatho ne-Argentina esijwayelekile", "WARST": "Isikhathi saseNyakatho ne-Argentina sasehlobo", "MST": "MST", "MEZ": "Isikhathi esijwayelekile sase-Central Europe", "CLST": "Isikhathi sase-Chile sasehlobo", "CHADT": "Isikhathi sasemini sase-Chatham", "UYST": "Isikhathi sase-Uruguay sasehlobo", "LHST": "Isikhathi sase-Lord Howe esivamile", "LHDT": "Isikhathi sase-Lord Howe sasemini", "CLT": "Isikhathi sase-Chile esijwayelekile", "JDT": "Isikhathi semini sase-Japan", "GFT": "Isikhathi sase-French Guiana", "OESZ": "Isikhathi sasehlobo sase-Eastern Europe", "HNCU": "Isikhathi sase-Cuba esijwayelekile", "VET": "Isikhathi sase-Venezuela", "MESZ": "Isikhathi sasehlobo sase-Central Europe", "IST": "Isikhathi sase-India esivamile", "HNPM": "Iikhathi sase-Saint Pierre nase-Miquelon esijwayelekile", "HECU": "Isikhathi sase-Cuba sasemini", "MDT": "MDT", "EDT": "Isikhathi sase-North American East sasemini", "BT": "Isikhathi sase-Bhutan", "JST": "Isikhathi esivamile sase-Japan", "ChST": "Isikhathi esijwayelekile sase-Chamorro", "ART": "Isikhathi sase-Argentina esijwayelekile", "HNOG": "Isikhathi sase-West Greenland esijwayelekile", "PST": "Isikhathi sase-North American Pacific esijwayelekile", "CDT": "Isikhathi sase-North American Central sasemini", "SRT": "Isikhathi sase-Suriname"}, -+ timezones: map[string]string{"HNPMX": "Isikhathi sase-Mexican Pacific esijwayelekile", "MDT": "MDT", "WIB": "Isikhathi sase-Western Indonesia", "UYST": "Isikhathi sase-Uruguay sasehlobo", "TMT": "Isikhathi esivamile sase-Turkmenistan", "ChST": "Isikhathi esijwayelekile sase-Chamorro", "WAST": "Isikhathi sasehlobo saseNtshonalanga Afrika", "SAST": "Isikhathi esijwayelekile saseNingizimu Afrika", "ECT": "Isikhathi sase-Ecuador", "JST": "Isikhathi esivamile sase-Japan", "CHADT": "Isikhathi sasemini sase-Chatham", "WAT": "Isikhathi esijwayelekile saseNtshonalanga Afrika", "HNT": "Isikhathi sase-Newfoundland esijwayelekile", "COT": "Isikhathi sase-Colombia esijwayelekile", "CLST": "Isikhathi sase-Chile sasehlobo", "NZDT": "Isikhathi sasemini sase-New Zealand", "EAT": "Isikhathi saseMpumalanga Afrika", "AKST": "Isikhathi sase-Alaska esijwayelekile", "EDT": "Isikhathi sase-North American East sasemini", "MESZ": "Isikhathi sasehlobo sase-Central Europe", "HEEG": "Isikhathi sase-East Greenland sasemini", "IST": "Isikhathi sase-India esivamile", "WIT": "Isikhathi sase-Eastern Indonesia", "TMST": "Isikhathi sehlobo sase-Turkmenistan", "HNNOMX": "Isikhathi sase-Northwest Mexico esijwayelekile", "HEPM": "Isikhathi sase-Saint Pierre nase-Miquelon sasemini", "CHAST": "Isikhathi esivamile sase-Chatham", "HNCU": "Isikhathi sase-Cuba esijwayelekile", "HECU": "Isikhathi sase-Cuba sasemini", "CLT": "Isikhathi sase-Chile esijwayelekile", "GMT": "Isikhathi sase-Greenwich Mean", "BOT": "Isikhathi sase-Bolivia", "ART": "Isikhathi sase-Argentina esijwayelekile", "SRT": "Isikhathi sase-Suriname", "HNPM": "Iikhathi sase-Saint Pierre nase-Miquelon esijwayelekile", "GYT": "Isikhathi sase-Guyana", "WITA": "Isikhathi sase-Central Indonesia", "NZST": "Isikhathi esivamile sase-New Zealand", "AST": "Isikhathi sase-Atlantic esijwayelekile", "COST": "Isikhathi sase-Colombia sasehlobo", "MST": "MST", "AEDT": "Isikhathi sasemini sase-Australian East", "SGT": "Isikhathi esivamile sase-Singapore", "AKDT": "Isikhathi sase-Alaska sasemini", "OESZ": "Isikhathi sasehlobo sase-Eastern Europe", "GFT": "Isikhathi sase-French Guiana", "HAT": "Isikhathi sase-Newfoundland sasemini", "HKST": "Isikhathi sehlobo sase-Hong Kong", "∅∅∅": "Isikhathi sasehlobo sase-Azores", "ARST": "Isikhathi sase-Argentina sasehlobo", "HNEG": "Isikhathi sase-East Greenland esijwayelekile", "LHDT": "Isikhathi sase-Lord Howe sasemini", "MYT": "Isikhathi sase-Malaysia", "UYT": "Isikhathi sase-Uruguay esijwayelekile", "PST": "Isikhathi sase-North American Pacific esijwayelekile", "PDT": "Isikhathi sase-North American Pacific sasemini", "ACST": "Isikhathi sase-Australian Central esivamile", "ACDT": "Isikhathi sase-Australian Central sasemini", "AWST": "Isikhathi sase-Australian Western esivamile", "WESZ": "Isikhathi sasehlobo sase-Western Europe", "WART": "Isikhathi saseNyakatho ne-Argentina esijwayelekile", "WARST": "Isikhathi saseNyakatho ne-Argentina sasehlobo", "HEPMX": "Isikhathi sase-Mexican Pacific sasemini", "OEZ": "Isikhathi esijwayelekile sase-Eastern Europe", "HNOG": "Isikhathi sase-West Greenland esijwayelekile", "HEOG": "Isikhathi sase-West Greenland sasehlobo", "CAT": "Isikhathi sase-Central Africa", "ACWDT": "Isikhathi sasemini sase-Australian Central West", "WEZ": "Isikhathi esijwayelekile sase-Western Europe", "HAST": "Isikhathi sase-Hawaii-Aleutia esijwayelekile", "HADT": "Isikhathi sase-Hawaii-Aleutia sasemini", "HENOMX": "Isikhathi sase-Northwest Mexico sasemini", "LHST": "Isikhathi sase-Lord Howe esivamile", "CST": "Isikhathi sase-North American Central esijwayelekile", "CDT": "Isikhathi sase-North American Central sasemini", "ADT": "Isikhathi sase-Atlantic sasemini", "BT": "Isikhathi sase-Bhutan", "ACWST": "Isikhathi sase-Australian Central West esivamile", "AEST": "Isikhathi esivamile sase-Australian East", "VET": "Isikhathi sase-Venezuela", "EST": "Isikhathi sase-North American East esijwayelekile", "MEZ": "Isikhathi esijwayelekile sase-Central Europe", "AWDT": "Isikhathi sase-Australian Western sasemini", "JDT": "Isikhathi semini sase-Japan", "HKT": "Isikhathi esivamile sase-Hong Kong"}, - } - } -  -diff --git a/zu_ZA/zu_ZA.go b/zu_ZA/zu_ZA.go -index 7c2ea51..964d6fe 100644 ---- a/zu_ZA/zu_ZA.go -+++ b/zu_ZA/zu_ZA.go -@@ -10,68 +10,45 @@ import ( - ) -  - type zu_ZA struct { -- locale string -- pluralsCardinal []locales.PluralRule -- pluralsOrdinal []locales.PluralRule -- pluralsRange []locales.PluralRule -- decimal string -- group string -- minus string -- percent string -- perMille string -- timeSeparator string -- inifinity string -- currencies []string // idx = enum of currency code -- currencyNegativePrefix string -- currencyNegativeSuffix string -- monthsAbbreviated []string -- monthsNarrow []string -- monthsWide []string -- daysAbbreviated []string -- daysNarrow []string -- daysShort []string -- daysWide []string -- periodsAbbreviated []string -- periodsNarrow []string -- periodsShort []string -- periodsWide []string -- erasAbbreviated []string -- erasNarrow []string -- erasWide []string -- timezones map[string]string -+ locale string -+ pluralsCardinal []locales.PluralRule -+ pluralsOrdinal []locales.PluralRule -+ pluralsRange []locales.PluralRule -+ decimal string -+ group string -+ minus string -+ percent string -+ perMille string -+ timeSeparator string -+ inifinity string -+ currencies []string // idx = enum of currency code -+ monthsAbbreviated []string -+ monthsNarrow []string -+ monthsWide []string -+ daysAbbreviated []string -+ daysNarrow []string -+ daysShort []string -+ daysWide []string -+ periodsAbbreviated []string -+ periodsNarrow []string -+ periodsShort []string -+ periodsWide []string -+ erasAbbreviated []string -+ erasNarrow []string -+ erasWide []string -+ timezones map[string]string - } -  - // New returns a new instance of translator for the 'zu_ZA' locale - func New() locales.Translator { - return &zu_ZA{ -- locale: "zu_ZA", -- pluralsCardinal: []locales.PluralRule{2, 6}, -- pluralsOrdinal: []locales.PluralRule{6}, -- pluralsRange: []locales.PluralRule{2, 6}, -- decimal: ".", -- group: ",", -- minus: "-", -- percent: "%", -- perMille: "‰", -- timeSeparator: ":", -- inifinity: "∞", -- currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -- currencyNegativePrefix: "(", -- currencyNegativeSuffix: ")", -- monthsAbbreviated: []string{"", "Jan", "Feb", "Mas", "Eph", "Mey", "Jun", "Jul", "Aga", "Sep", "Okt", "Nov", "Dis"}, -- monthsNarrow: []string{"", "J", "F", "M", "E", "M", "J", "J", "A", "S", "O", "N", "D"}, -- monthsWide: []string{"", "UMasingana", "Februwari", "Mashi", "Ephreli", "Meyi", "Juni", "Julayi", "Agasti", "Septhemba", "Okthoba", "Novemba", "Disemba"}, -- daysAbbreviated: []string{"Son", "Mso", "Bil", "Tha", "Sin", "Hla", "Mgq"}, -- daysNarrow: []string{"S", "M", "B", "T", "S", "H", "M"}, -- daysShort: []string{"Son", "Mso", "Bil", "Tha", "Sin", "Hla", "Mgq"}, -- daysWide: []string{"ISonto", "UMsombuluko", "ULwesibili", "ULwesithathu", "ULwesine", "ULwesihlanu", "UMgqibelo"}, -- periodsAbbreviated: []string{"AM", "PM"}, -- periodsNarrow: []string{"a", "p"}, -- periodsWide: []string{"AM", "PM"}, -- erasAbbreviated: []string{"BC", "AD"}, -- erasNarrow: []string{"", ""}, -- erasWide: []string{"BC", "AD"}, -- timezones: map[string]string{"ART": "Isikhathi sase-Argentina esijwayelekile", "AEST": "Isikhathi esivamile sase-Australian East", "EDT": "Isikhathi sase-North American East sasemini", "GYT": "Isikhathi sase-Guyana", "AST": "Isikhathi sase-Atlantic esijwayelekile", "WESZ": "Isikhathi sasehlobo sase-Western Europe", "SRT": "Isikhathi sase-Suriname", "MYT": "Isikhathi sase-Malaysia", "AKDT": "Isikhathi sase-Alaska sasemini", "ADT": "Isikhathi sase-Atlantic sasemini", "HAST": "Isikhathi sase-Hawaii-Aleutia esijwayelekile", "∅∅∅": "Isikhathi sase-Amazon sasehlobo", "EAT": "Isikhathi saseMpumalanga Afrika", "MST": "MST", "MDT": "MDT", "WITA": "Isikhathi sase-Central Indonesia", "MESZ": "Isikhathi sasehlobo sase-Central Europe", "GFT": "Isikhathi sase-French Guiana", "CST": "Isikhathi sase-North American Central esijwayelekile", "SAST": "Isikhathi esijwayelekile saseNingizimu Afrika", "ChST": "Isikhathi esijwayelekile sase-Chamorro", "WAST": "Isikhathi sasehlobo saseNtshonalanga Afrika", "HNPMX": "Isikhathi sase-Mexican Pacific esijwayelekile", "AEDT": "Isikhathi sasemini sase-Australian East", "OESZ": "Isikhathi sasehlobo sase-Eastern Europe", "HKT": "Isikhathi esivamile sase-Hong Kong", "CHADT": "Isikhathi sasemini sase-Chatham", "MEZ": "Isikhathi esijwayelekile sase-Central Europe", "CLT": "Isikhathi sase-Chile esijwayelekile", "CAT": "Isikhathi sase-Central Africa", "UYT": "Isikhathi sase-Uruguay esijwayelekile", "HNPM": "Iikhathi sase-Saint Pierre nase-Miquelon esijwayelekile", "HEPM": "Isikhathi sase-Saint Pierre nase-Miquelon sasemini", "HNEG": "Isikhathi sase-East Greenland esijwayelekile", "HNNOMX": "Isikhathi sase-Northwest Mexico esijwayelekile", "PST": "Isikhathi sase-North American Pacific esijwayelekile", "PDT": "Isikhathi sase-North American Pacific sasemini", "WIB": "Isikhathi sase-Western Indonesia", "ACWDT": "Isikhathi sasemini sase-Australian Central West", "HENOMX": "Isikhathi sase-Northwest Mexico sasemini", "SGT": "Isikhathi esivamile sase-Singapore", "EST": "Isikhathi sase-North American East esijwayelekile", "CDT": "Isikhathi sase-North American Central sasemini", "WIT": "Isikhathi sase-Eastern Indonesia", "HEOG": "Isikhathi sase-West Greenland sasehlobo", "WEZ": "Isikhathi esijwayelekile sase-Western Europe", "NZST": "Isikhathi esivamile sase-New Zealand", "CLST": "Isikhathi sase-Chile sasehlobo", "TMT": "Isikhathi esivamile sase-Turkmenistan", "WAT": "Isikhathi esijwayelekile saseNtshonalanga Afrika", "COST": "Isikhathi sase-Colombia sasehlobo", "VET": "Isikhathi sase-Venezuela", "HKST": "Isikhathi sehlobo sase-Hong Kong", "JST": "Isikhathi esivamile sase-Japan", "ECT": "Isikhathi sase-Ecuador", "HECU": "Isikhathi sase-Cuba sasemini", "AKST": "Isikhathi sase-Alaska esijwayelekile", "CHAST": "Isikhathi esivamile sase-Chatham", "IST": "Isikhathi sase-India esivamile", "TMST": "Isikhathi sehlobo sase-Turkmenistan", "WART": "Isikhathi saseNyakatho ne-Argentina esijwayelekile", "GMT": "Isikhathi sase-Greenwich Mean", "HNT": "Isikhathi sase-Newfoundland esijwayelekile", "BT": "Isikhathi sase-Bhutan", "LHDT": "Isikhathi sase-Lord Howe sasemini", "BOT": "Isikhathi sase-Bolivia", "ACDT": "Isikhathi sase-Australian Central sasemini", "WARST": "Isikhathi saseNyakatho ne-Argentina sasehlobo", "UYST": "Isikhathi sase-Uruguay sasehlobo", "COT": "Isikhathi sase-Colombia esijwayelekile", "ACWST": "Isikhathi sase-Australian Central West esivamile", "ARST": "Isikhathi sase-Argentina sasehlobo", "AWST": "Isikhathi sase-Australian Western esivamile", "HNCU": "Isikhathi sase-Cuba esijwayelekile", "HEPMX": "Isikhathi sase-Mexican Pacific sasemini", "HADT": "Isikhathi sase-Hawaii-Aleutia sasemini", "HNOG": "Isikhathi sase-West Greenland esijwayelekile", "JDT": "Isikhathi semini sase-Japan", "HEEG": "Isikhathi sase-East Greenland sasemini", "ACST": "Isikhathi sase-Australian Central esivamile", "OEZ": "Isikhathi esijwayelekile sase-Eastern Europe", "HAT": "Isikhathi sase-Newfoundland sasemini", "AWDT": "Isikhathi sase-Australian Western sasemini", "LHST": "Isikhathi sase-Lord Howe esivamile", "NZDT": "Isikhathi sasemini sase-New Zealand"}, -+ locale: "zu_ZA", -+ pluralsCardinal: []locales.PluralRule{2, 6}, -+ pluralsOrdinal: []locales.PluralRule{6}, -+ pluralsRange: []locales.PluralRule{2, 6}, -+ timeSeparator: ":", -+ currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"}, -+ timezones: map[string]string{"HEPMX": "HEPMX", "HAST": "HAST", "MEZ": "MEZ", "CHADT": "CHADT", "MYT": "MYT", "AEDT": "AEDT", "CHAST": "CHAST", "GFT": "GFT", "CST": "CST", "SRT": "SRT", "NZST": "NZST", "ACDT": "ACDT", "OEZ": "OEZ", "WARST": "WARST", "EDT": "EDT", "HEPM": "HEPM", "JDT": "JDT", "HAT": "HAT", "WART": "WART", "ECT": "ECT", "HNCU": "HNCU", "SAST": "SAST", "UYST": "UYST", "IST": "IST", "ART": "ART", "ACWST": "ACWST", "PDT": "PDT", "AKST": "AKST", "COST": "COST", "ChST": "ChST", "BOT": "BOT", "HNNOMX": "HNNOMX", "AWDT": "AWDT", "WESZ": "WESZ", "WAT": "WAT", "CLT": "CLT", "MST": "MST", "SGT": "SGT", "WITA": "WITA", "AST": "AST", "HECU": "HECU", "HENOMX": "HENOMX", "WIT": "WIT", "HNT": "HNT", "ARST": "ARST", "AEST": "AEST", "TMST": "TMST", "CAT": "CAT", "HADT": "HADT", "HNPM": "HNPM", "LHDT": "LHDT", "VET": "VET", "∅∅∅": "∅∅∅", "WAST": "WAST", "AKDT": "AKDT", "MDT": "MDT", "HNEG": "HNEG", "OESZ": "OESZ", "GYT": "GYT", "CDT": "CDT", "TMT": "TMT", "ACST": "ACST", "ACWDT": "ACWDT", "JST": "JST", "UYT": "UYT", "PST": "PST", "HNPMX": "HNPMX", "HNOG": "HNOG", "HKST": "HKST", "GMT": "GMT", "NZDT": "NZDT", "ADT": "ADT", "HEEG": "HEEG", "AWST": "AWST", "COT": "COT", "HEOG": "HEOG", "CLST": "CLST", "EAT": "EAT", "MESZ": "MESZ", "LHST": "LHST", "BT": "BT", "WEZ": "WEZ", "EST": "EST", "HKT": "HKT", "WIB": "WIB"}, - } - } -  -@@ -136,7 +113,7 @@ func (zu *zu_ZA) MonthAbbreviated(month time.Month) string { -  - // MonthsAbbreviated returns the locales abbreviated months - func (zu *zu_ZA) MonthsAbbreviated() []string { -- return zu.monthsAbbreviated[1:] -+ return nil - } -  - // MonthNarrow returns the locales narrow month given the 'month' provided -@@ -146,7 +123,7 @@ func (zu *zu_ZA) MonthNarrow(month time.Month) string { -  - // MonthsNarrow returns the locales narrow months - func (zu *zu_ZA) MonthsNarrow() []string { -- return zu.monthsNarrow[1:] -+ return nil - } -  - // MonthWide returns the locales wide month given the 'month' provided -@@ -156,7 +133,7 @@ func (zu *zu_ZA) MonthWide(month time.Month) string { -  - // MonthsWide returns the locales wide months - func (zu *zu_ZA) MonthsWide() []string { -- return zu.monthsWide[1:] -+ return nil - } -  - // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided -@@ -202,73 +179,13 @@ func (zu *zu_ZA) WeekdaysWide() []string { - // FmtNumber returns 'num' with digits/precision of 'v' for 'zu_ZA' and handles both Whole and Real numbers based on 'v' - func (zu *zu_ZA) FmtNumber(num float64, v uint64) string { -  -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtPercent returns 'num' with digits/precision of 'v' for 'zu_ZA' and handles both Whole and Real numbers based on 'v' - // NOTE: 'num' passed into FmtPercent is assumed to be in percent already - func (zu *zu_ZA) FmtPercent(num float64, v uint64) string { -- s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) -- l := len(s) + 3 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zu.decimal[0]) -- continue -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- b = append(b, zu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- b = append(b, zu.percent...) -- -- return string(b) -+ return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - } -  - // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'zu_ZA' -@@ -276,56 +193,7 @@ func (zu *zu_ZA) FmtCurrency(num float64, v uint64, currency currency.Type) stri -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zu.currencies[currency] -- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- if num < 0 { -- b = append(b, zu.minus[0]) -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'zu_ZA' -@@ -334,68 +202,7 @@ func (zu *zu_ZA) FmtAccounting(num float64, v uint64, currency currency.Type) st -  - s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64) - symbol := zu.currencies[currency] -- l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3 -- count := 0 -- inWhole := v == 0 -- b := make([]byte, 0, l) -- -- for i := len(s) - 1; i >= 0; i-- { -- -- if s[i] == '.' { -- b = append(b, zu.decimal[0]) -- inWhole = true -- continue -- } -- -- if inWhole { -- if count == 3 { -- b = append(b, zu.group[0]) -- count = 1 -- } else { -- count++ -- } -- } -- -- b = append(b, s[i]) -- } -- -- if num < 0 { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- b = append(b, zu.currencyNegativePrefix[0]) -- -- } else { -- -- for j := len(symbol) - 1; j >= 0; j-- { -- b = append(b, symbol[j]) -- } -- -- } -- -- // reverse -- for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { -- b[i], b[j] = b[j], b[i] -- } -- -- if int(v) < 2 { -- -- if v == 0 { -- b = append(b, zu.decimal...) -- } -- -- for i := 0; i < 2-int(v); i++ { -- b = append(b, '0') -- } -- } -- -- if num < 0 { -- b = append(b, zu.currencyNegativeSuffix...) -- } -- -- return string(b) -+ return string(append(append([]byte{}, symbol...), s...)) - } -  - // FmtDateShort returns the short date representation of 't' for 'zu_ZA' -@@ -403,17 +210,6 @@ func (zu *zu_ZA) FmtDateShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = strconv.AppendInt(b, int64(t.Month()), 10) -- b = append(b, []byte{0x2f}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2f}...) -- -- if t.Year() > 9 { -- b = append(b, strconv.Itoa(t.Year())[2:]...) -- } else { -- b = append(b, strconv.Itoa(t.Year())[1:]...) -- } -- - return string(b) - } -  -@@ -422,17 +218,6 @@ func (zu *zu_ZA) FmtDateMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, zu.monthsAbbreviated[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -441,17 +226,6 @@ func (zu *zu_ZA) FmtDateLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, zu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -460,19 +234,6 @@ func (zu *zu_ZA) FmtDateFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- b = append(b, zu.daysWide[t.Weekday()]...) -- b = append(b, []byte{0x2c, 0x20}...) -- b = append(b, zu.monthsWide[t.Month()]...) -- b = append(b, []byte{0x20}...) -- b = strconv.AppendInt(b, int64(t.Day()), 10) -- b = append(b, []byte{0x2c, 0x20}...) -- -- if t.Year() > 0 { -- b = strconv.AppendInt(b, int64(t.Year()), 10) -- } else { -- b = strconv.AppendInt(b, int64(t.Year()*-1), 10) -- } -- - return string(b) - } -  -@@ -481,19 +242,6 @@ func (zu *zu_ZA) FmtTimeShort(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- - return string(b) - } -  -@@ -502,26 +250,6 @@ func (zu *zu_ZA) FmtTimeMedium(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- - return string(b) - } -  -@@ -530,30 +258,6 @@ func (zu *zu_ZA) FmtTimeLong(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- b = append(b, tz...) -- - return string(b) - } -  -@@ -562,34 +266,5 @@ func (zu *zu_ZA) FmtTimeFull(t time.Time) string { -  - b := make([]byte, 0, 32) -  -- if t.Hour() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Hour()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Minute() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Minute()), 10) -- b = append(b, zu.timeSeparator...) -- -- if t.Second() < 10 { -- b = append(b, '0') -- } -- -- b = strconv.AppendInt(b, int64(t.Second()), 10) -- b = append(b, []byte{0x20}...) -- -- tz, _ := t.Zone() -- -- if btz, ok := zu.timezones[tz]; ok { -- b = append(b, btz...) -- } else { -- b = append(b, tz...) -- } -- - return string(b) - } diff --git a/vendor/github.com/go-playground/universal-translator/.gitignore b/vendor/github.com/go-playground/universal-translator/.gitignore deleted file mode 100644 index 26617857e..000000000 --- a/vendor/github.com/go-playground/universal-translator/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof \ No newline at end of file diff --git a/vendor/github.com/go-playground/universal-translator/README.md b/vendor/github.com/go-playground/universal-translator/README.md deleted file mode 100644 index 24aef1585..000000000 --- a/vendor/github.com/go-playground/universal-translator/README.md +++ /dev/null @@ -1,90 +0,0 @@ -## universal-translator - -![Project status](https://img.shields.io/badge/version-0.16.0-green.svg) -[![Build Status](https://semaphoreci.com/api/v1/joeybloggs/universal-translator/branches/master/badge.svg)](https://semaphoreci.com/joeybloggs/universal-translator) -[![Coverage Status](https://coveralls.io/repos/github/go-playground/universal-translator/badge.svg)](https://coveralls.io/github/go-playground/universal-translator) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/universal-translator)](https://goreportcard.com/report/github.com/go-playground/universal-translator) -[![GoDoc](https://godoc.org/github.com/go-playground/universal-translator?status.svg)](https://godoc.org/github.com/go-playground/universal-translator) -![License](https://img.shields.io/dub/l/vibe-d.svg) -[![Gitter](https://badges.gitter.im/go-playground/universal-translator.svg)](https://gitter.im/go-playground/universal-translator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -Universal Translator is an i18n Translator for Go/Golang using CLDR data + pluralization rules - -Why another i18n library? --------------------------- -Because none of the plural rules seem to be correct out there, including the previous implementation of this package, -so I took it upon myself to create [locales](https://github.com/go-playground/locales) for everyone to use; this package -is a thin wrapper around [locales](https://github.com/go-playground/locales) in order to store and translate text for -use in your applications. - -Features --------- -- [x] Rules generated from the [CLDR](http://cldr.unicode.org/index/downloads) data, v30.0.3 -- [x] Contains Cardinal, Ordinal and Range Plural Rules -- [x] Contains Month, Weekday and Timezone translations built in -- [x] Contains Date & Time formatting functions -- [x] Contains Number, Currency, Accounting and Percent formatting functions -- [x] Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere ) -- [x] Support loading translations from files -- [x] Exporting translations to file(s), mainly for getting them professionally translated -- [ ] Code Generation for translation files -> Go code.. i.e. after it has been professionally translated -- [ ] Tests for all languages, I need help with this, please see [here](https://github.com/go-playground/locales/issues/1) - -Installation ------------ - -Use go get - -```shell -go get github.com/go-playground/universal-translator -``` - -Usage & Documentation -------- - -Please see https://godoc.org/github.com/go-playground/universal-translator for usage docs - -##### Examples: - -- [Basic](https://github.com/go-playground/universal-translator/tree/master/examples/basic) -- [Full - no files](https://github.com/go-playground/universal-translator/tree/master/examples/full-no-files) -- [Full - with files](https://github.com/go-playground/universal-translator/tree/master/examples/full-with-files) - -File formatting --------------- -All types, Plain substitution, Cardinal, Ordinal and Range translations can all be contained withing the same file(s); -they are only separated for easy viewing. - -##### Examples: - -- [Formats](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats) - -##### Basic Makeup -NOTE: not all fields are needed for all translation types, see [examples](https://github.com/go-playground/universal-translator/tree/master/examples/file-formats) -```json -{ - "locale": "en", - "key": "days-left", - "trans": "You have {0} day left.", - "type": "Cardinal", - "rule": "One", - "override": false -} -``` -|Field|Description| -|---|---| -|locale|The locale for which the translation is for.| -|key|The translation key that will be used to store and lookup each translation; normally it is a string or integer.| -|trans|The actual translation text.| -|type|The type of translation Cardinal, Ordinal, Range or "" for a plain substitution(not required to be defined if plain used)| -|rule|The plural rule for which the translation is for eg. One, Two, Few, Many or Other.(not required to be defined if plain used)| -|override|If you wish to override an existing translation that has already been registered, set this to 'true'. 99% of the time there is no need to define it.| - -Help With Tests ---------------- -To anyone interesting in helping or contributing, I sure could use some help creating tests for each language. -Please see issue [here](https://github.com/go-playground/locales/issues/1) for details. - -License ------- -Distributed under MIT License, please see license file in code for more details. diff --git a/vendor/github.com/go-playground/universal-translator/benchmarks_test.go b/vendor/github.com/go-playground/universal-translator/benchmarks_test.go deleted file mode 100644 index 3f5d0a4c4..000000000 --- a/vendor/github.com/go-playground/universal-translator/benchmarks_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package ut - -import ( - "testing" - - "github.com/go-playground/locales/en" -) - -func BenchmarkBasicTranslation(b *testing.B) { - - en := en.New() - ut := New(en, en) - loc, found := ut.FindTranslator("en") - if !found { - b.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - expected error - override bool - }{ - { - key: "welcome", - trans: "Welcome to the site", - expected: nil, - }, - { - key: "welcome-user", - trans: "Welcome to the site {0}", - expected: nil, - }, - { - key: "welcome-user2", - trans: "Welcome to the site {0}, your location is {1}", - expected: nil, - }, - } - - for _, tt := range translations { - if err := loc.Add(tt.key, tt.trans, tt.override); err != nil { - b.Fatalf("adding translation '%s' failed with key '%s'", tt.trans, tt.key) - } - } - - var err error - - b.ResetTimer() - - b.Run("", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err = loc.T("welcome"); err != nil { - b.Error(err) - } - } - }) - - b.Run("Parallel", func(b *testing.B) { - - b.RunParallel(func(pb *testing.PB) { - - for pb.Next() { - if _, err = loc.T("welcome"); err != nil { - b.Error(err) - } - } - }) - }) - - b.Run("With1Param", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err = loc.T("welcome-user", "Joeybloggs"); err != nil { - b.Error(err) - } - } - }) - - b.Run("ParallelWith1Param", func(b *testing.B) { - - b.RunParallel(func(pb *testing.PB) { - - for pb.Next() { - if _, err = loc.T("welcome-user", "Joeybloggs"); err != nil { - b.Error(err) - } - } - }) - }) - - b.Run("With2Param", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err = loc.T("welcome-user2", "Joeybloggs", "/dev/tty0"); err != nil { - b.Error(err) - } - } - }) - - b.Run("ParallelWith2Param", func(b *testing.B) { - - b.RunParallel(func(pb *testing.PB) { - - for pb.Next() { - if _, err = loc.T("welcome-user2", "Joeybloggs", "/dev/tty0"); err != nil { - b.Error(err) - } - } - }) - }) -} diff --git a/vendor/github.com/go-playground/universal-translator/errors.go b/vendor/github.com/go-playground/universal-translator/errors.go deleted file mode 100644 index 38b163b62..000000000 --- a/vendor/github.com/go-playground/universal-translator/errors.go +++ /dev/null @@ -1,148 +0,0 @@ -package ut - -import ( - "errors" - "fmt" - - "github.com/go-playground/locales" -) - -var ( - // ErrUnknowTranslation indicates the translation could not be found - ErrUnknowTranslation = errors.New("Unknown Translation") -) - -var _ error = new(ErrConflictingTranslation) -var _ error = new(ErrRangeTranslation) -var _ error = new(ErrOrdinalTranslation) -var _ error = new(ErrCardinalTranslation) -var _ error = new(ErrMissingPluralTranslation) -var _ error = new(ErrExistingTranslator) - -// ErrExistingTranslator is the error representing a conflicting translator -type ErrExistingTranslator struct { - locale string -} - -// Error returns ErrExistingTranslator's internal error text -func (e *ErrExistingTranslator) Error() string { - return fmt.Sprintf("error: conflicting translator for locale '%s'", e.locale) -} - -// ErrConflictingTranslation is the error representing a conflicting translation -type ErrConflictingTranslation struct { - locale string - key interface{} - rule locales.PluralRule - text string -} - -// Error returns ErrConflictingTranslation's internal error text -func (e *ErrConflictingTranslation) Error() string { - - if _, ok := e.key.(string); !ok { - return fmt.Sprintf("error: conflicting key '%#v' rule '%s' with text '%s' for locale '%s', value being ignored", e.key, e.rule, e.text, e.locale) - } - - return fmt.Sprintf("error: conflicting key '%s' rule '%s' with text '%s' for locale '%s', value being ignored", e.key, e.rule, e.text, e.locale) -} - -// ErrRangeTranslation is the error representing a range translation error -type ErrRangeTranslation struct { - text string -} - -// Error returns ErrRangeTranslation's internal error text -func (e *ErrRangeTranslation) Error() string { - return e.text -} - -// ErrOrdinalTranslation is the error representing an ordinal translation error -type ErrOrdinalTranslation struct { - text string -} - -// Error returns ErrOrdinalTranslation's internal error text -func (e *ErrOrdinalTranslation) Error() string { - return e.text -} - -// ErrCardinalTranslation is the error representing a cardinal translation error -type ErrCardinalTranslation struct { - text string -} - -// Error returns ErrCardinalTranslation's internal error text -func (e *ErrCardinalTranslation) Error() string { - return e.text -} - -// ErrMissingPluralTranslation is the error signifying a missing translation given -// the locales plural rules. -type ErrMissingPluralTranslation struct { - locale string - key interface{} - rule locales.PluralRule - translationType string -} - -// Error returns ErrMissingPluralTranslation's internal error text -func (e *ErrMissingPluralTranslation) Error() string { - - if _, ok := e.key.(string); !ok { - return fmt.Sprintf("error: missing '%s' plural rule '%s' for translation with key '%#v' and locale '%s'", e.translationType, e.rule, e.key, e.locale) - } - - return fmt.Sprintf("error: missing '%s' plural rule '%s' for translation with key '%s' and locale '%s'", e.translationType, e.rule, e.key, e.locale) -} - -// ErrMissingBracket is the error representing a missing bracket in a translation -// eg. This is a {0 <-- missing ending '}' -type ErrMissingBracket struct { - locale string - key interface{} - text string -} - -// Error returns ErrMissingBracket error message -func (e *ErrMissingBracket) Error() string { - return fmt.Sprintf("error: missing bracket '{}', in translation. locale: '%s' key: '%v' text: '%s'", e.locale, e.key, e.text) -} - -// ErrBadParamSyntax is the error representing a bad parameter definition in a translation -// eg. This is a {must-be-int} -type ErrBadParamSyntax struct { - locale string - param string - key interface{} - text string -} - -// Error returns ErrBadParamSyntax error message -func (e *ErrBadParamSyntax) Error() string { - return fmt.Sprintf("error: bad parameter syntax, missing parameter '%s' in translation. locale: '%s' key: '%v' text: '%s'", e.param, e.locale, e.key, e.text) -} - -// import/export errors - -// ErrMissingLocale is the error representing an expected locale that could -// not be found aka locale not registered with the UniversalTranslator Instance -type ErrMissingLocale struct { - locale string -} - -// Error returns ErrMissingLocale's internal error text -func (e *ErrMissingLocale) Error() string { - return fmt.Sprintf("error: locale '%s' not registered.", e.locale) -} - -// ErrBadPluralDefinition is the error representing an incorrect plural definition -// usually found within translations defined within files during the import process. -type ErrBadPluralDefinition struct { - tl translation -} - -// Error returns ErrBadPluralDefinition's internal error text -func (e *ErrBadPluralDefinition) Error() string { - return fmt.Sprintf("error: bad plural definition '%#v'", e.tl) -} diff --git a/vendor/github.com/go-playground/universal-translator/import_export.go b/vendor/github.com/go-playground/universal-translator/import_export.go deleted file mode 100644 index 7bd76f26b..000000000 --- a/vendor/github.com/go-playground/universal-translator/import_export.go +++ /dev/null @@ -1,274 +0,0 @@ -package ut - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path/filepath" - - "io" - - "github.com/go-playground/locales" -) - -type translation struct { - Locale string `json:"locale"` - Key interface{} `json:"key"` // either string or integer - Translation string `json:"trans"` - PluralType string `json:"type,omitempty"` - PluralRule string `json:"rule,omitempty"` - OverrideExisting bool `json:"override,omitempty"` -} - -const ( - cardinalType = "Cardinal" - ordinalType = "Ordinal" - rangeType = "Range" -) - -// ImportExportFormat is the format of the file import or export -type ImportExportFormat uint8 - -// supported Export Formats -const ( - FormatJSON ImportExportFormat = iota -) - -// Export writes the translations out to a file on disk. -// -// NOTE: this currently only works with string or int translations keys. -func (t *UniversalTranslator) Export(format ImportExportFormat, dirname string) error { - - _, err := os.Stat(dirname) - fmt.Println(dirname, err, os.IsNotExist(err)) - if err != nil { - - if !os.IsNotExist(err) { - return err - } - - if err = os.MkdirAll(dirname, 0744); err != nil { - return err - } - } - - // build up translations - var trans []translation - var b []byte - var ext string - - for _, locale := range t.translators { - - for k, v := range locale.(*translator).translations { - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k, - Translation: v.text, - }) - } - - for k, pluralTrans := range locale.(*translator).cardinalTanslations { - - for i, plural := range pluralTrans { - - // leave enough for all plural rules - // but not all are set for all languages. - if plural == nil { - continue - } - - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k.(string), - Translation: plural.text, - PluralType: cardinalType, - PluralRule: locales.PluralRule(i).String(), - }) - } - } - - for k, pluralTrans := range locale.(*translator).ordinalTanslations { - - for i, plural := range pluralTrans { - - // leave enough for all plural rules - // but not all are set for all languages. - if plural == nil { - continue - } - - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k.(string), - Translation: plural.text, - PluralType: ordinalType, - PluralRule: locales.PluralRule(i).String(), - }) - } - } - - for k, pluralTrans := range locale.(*translator).rangeTanslations { - - for i, plural := range pluralTrans { - - // leave enough for all plural rules - // but not all are set for all languages. - if plural == nil { - continue - } - - trans = append(trans, translation{ - Locale: locale.Locale(), - Key: k.(string), - Translation: plural.text, - PluralType: rangeType, - PluralRule: locales.PluralRule(i).String(), - }) - } - } - - switch format { - case FormatJSON: - b, err = json.MarshalIndent(trans, "", " ") - ext = ".json" - } - - if err != nil { - return err - } - - err = ioutil.WriteFile(filepath.Join(dirname, fmt.Sprintf("%s%s", locale.Locale(), ext)), b, 0644) - if err != nil { - return err - } - - trans = trans[0:0] - } - - return nil -} - -// Import reads the translations out of a file or directory on disk. -// -// NOTE: this currently only works with string or int translations keys. -func (t *UniversalTranslator) Import(format ImportExportFormat, dirnameOrFilename string) error { - - fi, err := os.Stat(dirnameOrFilename) - if err != nil { - return err - } - - processFn := func(filename string) error { - - f, err := os.Open(filename) - if err != nil { - return err - } - defer f.Close() - - return t.ImportByReader(format, f) - } - - if !fi.IsDir() { - return processFn(dirnameOrFilename) - } - - // recursively go through directory - walker := func(path string, info os.FileInfo, err error) error { - - if info.IsDir() { - return nil - } - - switch format { - case FormatJSON: - // skip non JSON files - if filepath.Ext(info.Name()) != ".json" { - return nil - } - } - - return processFn(path) - } - - return filepath.Walk(dirnameOrFilename, walker) -} - -// ImportByReader imports the the translations found within the contents read from the supplied reader. -// -// NOTE: generally used when assets have been embedded into the binary and are already in memory. -func (t *UniversalTranslator) ImportByReader(format ImportExportFormat, reader io.Reader) error { - - b, err := ioutil.ReadAll(reader) - if err != nil { - return err - } - - var trans []translation - - switch format { - case FormatJSON: - err = json.Unmarshal(b, &trans) - } - - if err != nil { - return err - } - - for _, tl := range trans { - - locale, found := t.FindTranslator(tl.Locale) - if !found { - return &ErrMissingLocale{locale: tl.Locale} - } - - pr := stringToPR(tl.PluralRule) - - if pr == locales.PluralRuleUnknown { - - err = locale.Add(tl.Key, tl.Translation, tl.OverrideExisting) - if err != nil { - return err - } - - continue - } - - switch tl.PluralType { - case cardinalType: - err = locale.AddCardinal(tl.Key, tl.Translation, pr, tl.OverrideExisting) - case ordinalType: - err = locale.AddOrdinal(tl.Key, tl.Translation, pr, tl.OverrideExisting) - case rangeType: - err = locale.AddRange(tl.Key, tl.Translation, pr, tl.OverrideExisting) - default: - return &ErrBadPluralDefinition{tl: tl} - } - - if err != nil { - return err - } - } - - return nil -} - -func stringToPR(s string) locales.PluralRule { - - switch s { - case "One": - return locales.PluralRuleOne - case "Two": - return locales.PluralRuleTwo - case "Few": - return locales.PluralRuleFew - case "Many": - return locales.PluralRuleMany - case "Other": - return locales.PluralRuleOther - default: - return locales.PluralRuleUnknown - } - -} diff --git a/vendor/github.com/go-playground/universal-translator/import_export_test.go b/vendor/github.com/go-playground/universal-translator/import_export_test.go deleted file mode 100644 index e6a850557..000000000 --- a/vendor/github.com/go-playground/universal-translator/import_export_test.go +++ /dev/null @@ -1,789 +0,0 @@ -package ut - -import ( - "fmt" - "path/filepath" - "testing" - - "os" - - "github.com/go-playground/locales" - "github.com/go-playground/locales/en" - "github.com/go-playground/locales/nl" -) - -// NOTES: -// - Run "go test" to run tests -// - Run "gocov test | gocov report" to report on test converage by file -// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called -// -// or -// -// -- may be a good idea to change to output path to somewherelike /tmp -// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html -// - -func TestExportImportBasic(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - expected error - expectedError bool - override bool - }{ - { - key: "test_trans", - trans: "Welcome {0}", - expected: nil, - }, - { - key: -1, - trans: "Welcome {0}", - expected: nil, - }, - { - key: "test_trans2", - trans: "{0} to the {1}.", - expected: nil, - }, - { - key: "test_trans3", - trans: "Welcome {0} to the {1}", - expected: nil, - }, - { - key: "test_trans4", - trans: "{0}{1}", - expected: nil, - }, - { - key: "test_trans", - trans: "{0}{1}", - expected: &ErrConflictingTranslation{locale: en.Locale(), key: "test_trans", text: "{0}{1}"}, - expectedError: true, - }, - { - key: -1, - trans: "{0}{1}", - expected: &ErrConflictingTranslation{locale: en.Locale(), key: -1, text: "{0}{1}"}, - expectedError: true, - }, - { - key: "test_trans", - trans: "Welcome {0} to the {1}.", - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := en.Add(tt.key, tt.trans, tt.override) - if err != tt.expected { - if !tt.expectedError { - t.Errorf("Expected '%s' Got '%s'", tt.expected, err) - } else { - if err.Error() != tt.expected.Error() { - t.Errorf("Expected '%s' Got '%s'", tt.expected.Error(), err.Error()) - } - } - } - } - - dirname := "testdata/translations" - defer os.RemoveAll(dirname) - - err := uni.Export(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - uni = New(e, e) - - err = uni.Import(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - en, found = uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - tests := []struct { - key interface{} - params []string - expected string - expectedError bool - }{ - { - key: "test_trans", - params: []string{"Joeybloggs", "The Test"}, - expected: "Welcome Joeybloggs to the The Test.", - }, - { - key: "test_trans2", - params: []string{"Joeybloggs", "The Test"}, - expected: "Joeybloggs to the The Test.", - }, - { - key: "test_trans3", - params: []string{"Joeybloggs", "The Test"}, - expected: "Welcome Joeybloggs to the The Test", - }, - { - key: "test_trans4", - params: []string{"Joeybloggs", "The Test"}, - expected: "JoeybloggsThe Test", - }, - // bad translation - { - key: "non-existant-key", - params: []string{"Joeybloggs", "The Test"}, - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := en.T(tt.key, tt.params...) - if s != tt.expected { - if !tt.expectedError || (tt.expectedError && err != ErrUnknowTranslation) { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } - } -} - -func TestExportImportCardinal(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - // bad translation - { - key: "cardinal_test", - trans: "You have a day left.", - rule: locales.PluralRuleOne, - expected: &ErrCardinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddCardinal'. locale: '%s' key: '%v' text: '%s'", paramZero, en.Locale(), "cardinal_test", "You have a day left.")}, - expectedError: true, - }, - { - key: "cardinal_test", - trans: "You have {0} day", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "cardinal_test", - trans: "You have {0} days left.", - rule: locales.PluralRuleOther, - expected: nil, - }, - { - key: "cardinal_test", - trans: "You have {0} days left.", - rule: locales.PluralRuleOther, - expected: &ErrConflictingTranslation{locale: en.Locale(), key: "cardinal_test", rule: locales.PluralRuleOther, text: "You have {0} days left."}, - expectedError: true, - }, - { - key: "cardinal_test", - trans: "You have {0} day left.", - rule: locales.PluralRuleOne, - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := en.AddCardinal(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '%s' Got '%s'", tt.expected, err) - } - } - } - - dirname := "testdata/translations" - defer os.RemoveAll(dirname) - - err := uni.Export(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - uni = New(e, e) - - err = uni.Import(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - en, found = uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - tests := []struct { - key interface{} - num float64 - digits uint64 - param string - expected string - expectedError bool - }{ - { - key: "cardinal_test", - num: 1, - digits: 0, - param: string(en.FmtNumber(1, 0)), - expected: "You have 1 day left.", - }, - // bad translation key - { - key: "non-existant", - num: 1, - digits: 0, - param: string(en.FmtNumber(1, 0)), - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := en.C(tt.key, tt.num, tt.digits, tt.param) - if err != nil { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '' Got '%s'", err) - } - } - - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestExportImportOrdinal(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - // bad translation - { - key: "day", - trans: "st", - rule: locales.PluralRuleOne, - expected: &ErrOrdinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddOrdinal'. locale: '%s' key: '%v' text: '%s'", paramZero, en.Locale(), "day", "st")}, - expectedError: true, - }, - { - key: "day", - trans: "{0}sfefewt", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "day", - trans: "{0}nd", - rule: locales.PluralRuleTwo, - expected: nil, - }, - { - key: "day", - trans: "{0}rd", - rule: locales.PluralRuleFew, - expected: nil, - }, - { - key: "day", - trans: "{0}th", - rule: locales.PluralRuleOther, - expected: nil, - }, - // bad translation - { - key: "day", - trans: "{0}th", - rule: locales.PluralRuleOther, - expected: &ErrConflictingTranslation{locale: en.Locale(), key: "day", rule: locales.PluralRuleOther, text: "{0}th"}, - expectedError: true, - }, - { - key: "day", - trans: "{0}st", - rule: locales.PluralRuleOne, - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := en.AddOrdinal(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '' Got '%s'", err) - } - } - } - - dirname := "testdata/translations" - defer os.RemoveAll(dirname) - - err := uni.Export(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - uni = New(e, e) - - err = uni.Import(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - en, found = uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - tests := []struct { - key interface{} - num float64 - digits uint64 - param string - expected string - expectedError bool - }{ - { - key: "day", - num: 1, - digits: 0, - param: string(en.FmtNumber(1, 0)), - expected: "1st", - }, - { - key: "day", - num: 2, - digits: 0, - param: string(en.FmtNumber(2, 0)), - expected: "2nd", - }, - { - key: "day", - num: 3, - digits: 0, - param: string(en.FmtNumber(3, 0)), - expected: "3rd", - }, - { - key: "day", - num: 4, - digits: 0, - param: string(en.FmtNumber(4, 0)), - expected: "4th", - }, - { - key: "day", - num: 10258.43, - digits: 0, - param: string(en.FmtNumber(10258.43, 0)), - expected: "10,258th", - }, - // bad translation - { - key: "d-day", - num: 10258.43, - digits: 0, - param: string(en.FmtNumber(10258.43, 0)), - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := en.O(tt.key, tt.num, tt.digits, tt.param) - if err != nil { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '' Got '%s'", err) - } - } - - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestExportImportRange(t *testing.T) { - - n := nl.New() - uni := New(n, n) - - // dutch - nl, found := uni.GetTranslator("nl") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - // bad translation - { - key: "day", - trans: "er -{1} dag vertrokken", - rule: locales.PluralRuleOne, - expected: &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, are you sure you're adding a Range Translation? locale: '%s' key: '%s' text: '%s'", paramZero, nl.Locale(), "day", "er -{1} dag vertrokken")}, - expectedError: true, - }, - // bad translation - { - key: "day", - trans: "er {0}- dag vertrokken", - rule: locales.PluralRuleOne, - expected: &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, a Range Translation requires two parameters. locale: '%s' key: '%s' text: '%s'", paramOne, nl.Locale(), "day", "er {0}- dag vertrokken")}, - expectedError: true, - }, - { - key: "day", - trans: "er {0}-{1} dag", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "day", - trans: "er zijn {0}-{1} dagen over", - rule: locales.PluralRuleOther, - expected: nil, - }, - // bad translation - { - key: "day", - trans: "er zijn {0}-{1} dagen over", - rule: locales.PluralRuleOther, - expected: &ErrConflictingTranslation{locale: nl.Locale(), key: "day", rule: locales.PluralRuleOther, text: "er zijn {0}-{1} dagen over"}, - expectedError: true, - }, - { - key: "day", - trans: "er {0}-{1} dag vertrokken", - rule: locales.PluralRuleOne, - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := nl.AddRange(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '%#v' Got '%s'", tt.expected, err) - } - } - } - - dirname := "testdata/translations" - defer os.RemoveAll(dirname) - - err := uni.Export(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - uni = New(n, n) - - err = uni.Import(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - nl, found = uni.GetTranslator("nl") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - tests := []struct { - key interface{} - num1 float64 - digits1 uint64 - num2 float64 - digits2 uint64 - param1 string - param2 string - expected string - expectedError bool - }{ - { - key: "day", - num1: 1, - digits1: 0, - num2: 2, - digits2: 0, - param1: string(nl.FmtNumber(1, 0)), - param2: string(nl.FmtNumber(2, 0)), - expected: "er zijn 1-2 dagen over", - }, - { - key: "day", - num1: 0, - digits1: 0, - num2: 1, - digits2: 0, - param1: string(nl.FmtNumber(0, 0)), - param2: string(nl.FmtNumber(1, 0)), - expected: "er 0-1 dag vertrokken", - }, - { - key: "day", - num1: 0, - digits1: 0, - num2: 2, - digits2: 0, - param1: string(nl.FmtNumber(0, 0)), - param2: string(nl.FmtNumber(2, 0)), - expected: "er zijn 0-2 dagen over", - }, - // bad translations from here - { - key: "d-day", - num1: 0, - digits1: 0, - num2: 2, - digits2: 0, - param1: string(nl.FmtNumber(0, 0)), - param2: string(nl.FmtNumber(2, 0)), - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := nl.R(tt.key, tt.num1, tt.digits1, tt.num2, tt.digits2, tt.param1, tt.param2) - if err != nil { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '' Got '%s'", err) - } - } - - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestImportRecursive(t *testing.T) { - - e := en.New() - uni := New(e, e) - - dirname := "testdata/nested1" - err := uni.Import(FormatJSON, dirname) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - en, found := uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - tests := []struct { - key interface{} - params []string - expected string - expectedError bool - }{ - { - key: "test_trans", - params: []string{"Joeybloggs", "The Test"}, - expected: "Welcome Joeybloggs to the The Test.", - }, - { - key: "test_trans2", - params: []string{"Joeybloggs", "The Test"}, - expected: "Joeybloggs to the The Test.", - }, - { - key: "test_trans3", - params: []string{"Joeybloggs", "The Test"}, - expected: "Welcome Joeybloggs to the The Test", - }, - { - key: "test_trans4", - params: []string{"Joeybloggs", "The Test"}, - expected: "JoeybloggsThe Test", - }, - // bad translation - { - key: "non-existant-key", - params: []string{"Joeybloggs", "The Test"}, - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := en.T(tt.key, tt.params...) - if s != tt.expected { - if !tt.expectedError || (tt.expectedError && err != ErrUnknowTranslation) { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } - } -} - -func TestBadImport(t *testing.T) { - - // test non existant file - e := en.New() - uni := New(e, e) - - filename := "testdata/non-existant-file.json" - expected := "stat testdata/non-existant-file.json: no such file or directory" - err := uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test bad parameter basic translation - filename = "testdata/bad-translation1.json" - expected = "error: bad parameter syntax, missing parameter '{0}' in translation. locale: 'en' key: 'test_trans3' text: 'Welcome {lettersnotpermitted} to the {1}'" - err = uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test missing bracket basic translation - filename = "testdata/bad-translation2.json" - expected = "error: missing bracket '{}', in translation. locale: 'en' key: 'test_trans3' text: 'Welcome {0 to the {1}'" - err = uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test missing locale basic translation - filename = "testdata/bad-translation3.json" - expected = "error: locale 'nl' not registered." - err = uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test bad plural definition - filename = "testdata/bad-translation4.json" - expected = "error: bad plural definition 'ut.translation{Locale:\"en\", Key:\"cardinal_test\", Translation:\"You have {0} day left.\", PluralType:\"NotAPluralType\", PluralRule:\"One\", OverrideExisting:false}'" - err = uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test bad plural rule for locale - filename = "testdata/bad-translation5.json" - expected = "error: cardinal plural rule 'Many' does not exist for locale 'en' key: 'cardinal_test' text: 'You have {0} day left.'" - err = uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test invalid JSON - filename = "testdata/bad-translation6.json" - expected = "invalid character ']' after object key:value pair" - err = uni.Import(FormatJSON, filename) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test bad io.Reader - f, err := os.Open(filename) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - f.Close() - - expected = "read testdata/bad-translation6.json: bad file descriptor" - err = uni.ImportByReader(FormatJSON, f) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } -} - -func TestBadExport(t *testing.T) { - - // test readonly directory - e := en.New() - uni := New(e, e) - - en, found := uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - dirname := "testdata/readonly" - err := os.Mkdir(dirname, 0444) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - defer os.RemoveAll(dirname) - - en.Add("day", "this is a day", false) - - expected := "open testdata/readonly/en.json: permission denied" - err = uni.Export(FormatJSON, dirname) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - // test exporting into directory inside readonly directory - expected = "stat testdata/readonly/inner: permission denied" - err = uni.Export(FormatJSON, filepath.Join(dirname, "inner")) - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } -} diff --git a/vendor/github.com/go-playground/universal-translator/logo.png b/vendor/github.com/go-playground/universal-translator/logo.png deleted file mode 100644 index a37aa8c0cd0f6e1b98e0be3eb2531ebc6ac6717b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16598 zcmV(yK*U_<=i=1Q$^7;0v#+eDrK0%p z>%6(N%f`XBv#;pk-N3xJlaY`9`tZ@r#>d0H&B?^Dtf>F`_3`TEoSK)csHK;dl)1LD z{xUb9o}0zMyZALSjf{%1BqI0!{{5jc`1SO`zPq8KpwB5MBz`@`DJHxnB>jUjr=XpP zhJ*ceGX0V>qah&tt}xmxDK3XPA9F;SA|8N$duRs?{%JJ*T{HG>5AcL8I*&O1Ju^KN z1^!Yp@h&apFDzno38}29au*Y6VF#%(B=Pd^`t{{04g#CPRH8PEL>89OH1Y4=wM`?Y+cnsCD|dZGb#-yb zPbYsY6v#U#TTlf1)HKmxCR88|TWkfi;WgJmEa>U!iH1CPzc%zlFUrZIxOpL50SAW2 zHrkRe-Bv8!+}rP-U23*Bp`mB-jzz%dHuKoF($TRq)t%&MEAPFIet}u?$D-;-NTfd? zqGBFudL7@{$H>RCmXS~SDk-e2cr(q3b}2D4;I^fdk8wf@!NHcex`pmIGxX}ykX2Zk zP#l(MXu)GF(Pvk zb5n$3uu@QfLrR3XE#bH{zmF;My}ImfZ|eE@n0GU+i65iC#kVv_JUkHP6q^ z=b4$1KRnawHnN9;XOVD+dTcU@PWtQI+{V7)vVb@}2{~W|d768ob{*KawLyATCMyBY zhk?3y?SQh*YZ(!U#KDNg9qaM-(p?CZPE$X(8z(y`Rk002FaNkl8uC7fajE|-h>jHG2b9lbevz(KOfu`z+X2)PND2t1w1WGFmB z;BZ@Tf}w8eW!d6lVUNJlhe<3w@VLAr5!hqYo=(frj?qrXhNe@r$z?o#)_BC$c#6Tn zw%ibJSrePzu1EE-o7FRWE@Bmr=0#t-W8=a(6GTqoYvcqTWN@=@*0!nMye8HIu2(T+Ak@9J5Z~>D99iw*`m8V%yP8G^_lKA3_-39D4+I+C1zz z%PxAIjtxqC6rEeEoK;TYRK5moFT3e)S;c473ltAKvc{hCWlVc;gKFP7(_^pP+TQSQ zjTnnuLBc{Sdb7KSnYy{T8Mi%*-`7X=bnva_VNVf!d<1rL=-JH6uuGF1?^y5f9AB6q zotFt+&fvKN9wTt?2px9TxG)4b)AV}%MO>l#`PSCbhc8CH z(ahGS3jt5QrHGrvLqpybTd3aT!_Ma3C?0!8iS}-@N4$|3Vjk~Odfkur_B2j4Q=ai9 zwCdFE-MgodJ$v@--@hOJdcD5T)wQs^+~2>veB#83lSsEgpFKBQ8LAYfrz?!j@VGrK zfD?mhnuhu zc6A*>`uqE-yqo0c(WA$Y&khU>p!`akr_C16;qx9(K3}Q48GMs(2|#W(U+C>U+gs?p z^6}jBk0WP#6@}XUG1|MFxifa;Gu`Gf@{^8r3D0vJ&-0ExB2Qql!KaO@u%q%RuxCa- z=nDq{@3OWa?o`}pF?bNzz;Q^nz?4c2d1Yzhk<6eIWaeu#=B8Cm810v^Rke)+e)?h zH``r9!+0zn64TyHj(U9NCw8Ir?OU83bm-%VH;0Wb>dWQso<4o4T$akBA7WgT3iz&_ zN#||w+mrl%lwSPt^Vg61UR6`~YFWHi_l{!JcULueSU zuU#7-U!wAd^F!yiGqsgYce}fpeBa&ns10GwH=8Hj)>BVDk~}BH;~@vhCnx{=D_1_h z9(z4@+Q`0r`z}a*NhgoKotri}dCcg8TMu47d)M~vT^slBr56_$zkgrMPE@N|O(WZ! zsLQ%0YpP1+LKrd6^35*)GUSB5)MzwrJS8#U4D>#RSz-pt?c=lJXO zeSaQ*)aC{sacalkE(o<+>1c~WPfGnKtu-k`2YJOl(N%r)u4fVPB7smYkR!~c!2?5` z13>TVn~)3sx0VVE3qQ8?KZ&MxkE4I%0~`Az9FB(`>c8OVKkXPppkEAHPbYRdx2|$6 zf*j~H;Ex?orIrKyj}eYAQ%S`h#fdpw@Cz<58T?>}2zx?ZT|%y(T{~Xpi=gkZTF;#e z3F=$F{`}PNFa>wR$HyM5Ztd#os_vSakjh6}Iy<|C2zX8|>ielr&R9gEe{Fo0|8gK| zkY8VlfcpEtiRi!U(S93Z-L~--2kINT8Vb8(?fP;$%dGar++*t=TX-4CqacXL~rY1d|=Z=r( zT@Q{j(+PIADfOvY)=!t^b(wRg^=0R7n8aR zGu)okchJ@@r~V1+Ujz8JBY#ZBac;u{>vE*5fRzYXDa*3>N)mKP)O|L;_+)+@W$#W_ z1HCSw0BPQbdWUK^n3k3~2){GaaiQou{J~fvivE1qGekZm14C^s_>uYe_~`Zew$6dh z&dz2jY$hilM;G9l1sq4)7Rn-P`H|OEqLr&S14g)DnOR!8zA!U0bMNinM7RaVpGDl; zY-jGh@Wtt|F$}V_tG&EfzS=j}cU7%lLF4S~p35Z7OJBR(*!bOV-xB?PmY6P)N+eR& zm~-CP8no)@pwxKED3P8YEr^+%?8q=F+vn#4EnG5nUJd7iSCx$h8STYo>M5XqKb%>U znOOtZDR(?fN4Uox1Ub*XkD$wZHf)e>(EIqv@I>f+HsGnMd7^oAVqjvh1vQ|K6RZ%6 zS(agDR(SBQc^!rdmzN8vK88rJqp)LqgEnqF@z805HGQJ@1$%=?VI znx@@zXBFMuwRP&sqPpVZvLw6xjS9oC{Zv}oug2jiu%}ZIcF@Ph^RCBI+pC^=W&^+h zj2nbIz;VS1L`O&K^(`$vP;`|5u!wLu!{jbqrQrBbaLVo`2m4qAM6qoVHq>>S?SyR` z*c}LXS5Tn6g}o`iI4?0VQ5zK%Rio1xlm=zWuo0G1 z^py0Jec*;-d4*BepMTH?oH9ZSY$|#H{6GG`^dbW~(Tbd;`3i5jm;5kK&YSMhLvC&3 zHVlp9eiusn*^WX_1XErv-9)w42ysdA?Q+H zW2CX6=ZBNdm?l$Xli3vMR5s}}x+#0!T+v)!UV9=H(9Y8J_>rsU{BkbR#TC3Ak&M^yN+acyB-!s$e-Ut;vL8ySlm4a z;eC8dRw94`tf=X%Uv6%$8=aRI9J<1TIMbMW6^gFu(4jHQl%}SF=r%{bpn^hWvR;$u# z?d{>=gnV=2*2E~n{(eP81u1Vp-=CRI+4rUIi{BUTb=|}MLKVTK$?cJhCIQZa#yajY zS(}2N?bT>;%*x8uf2KJB_nPh{ry9GsF6g#rFPyoz{6b}Ux%JHA;^J%)xNpWt!c`tW z{u(CNPsL)vuD!{O6hY2%>I8qZSX5O>PtGWEy~`Lmb<%8B>Xe$#4z(JbN}bN!q|z#P z103ko^(ZQx!H{Jz7!K^;PuL-zok!n77@PpuN3`=QIJaXNJwN>xw8No`D|!K~UHql+Qv5HWo# zB}cT^)aaC12QmqJ`hK3=ZTlv`6W5{ViSOGfIrW*|Np9;)2Kq```l9tRy)3$O^iF?{ zPUxJ75m{!I-KK-QaAxVc*K(Nd4R;SXqMht4{NEVX+)5Xg*@A@Hq<~LB?(fg+E!|uH zU3PZ%u1f#x_XH9a#ZAHrAeO}~uDGbkZnqajX~LVrJ32BtOdr;k&6(!Li-vb=RcYZo z`qr(9iCZ7x(X%SDkm@`-$X^FI#FKA=?VA8jd`GrF3{<|9@ts|UOIx>`TRl)x)i(4! zVqK1178248PoY+zy&b-K_%Oy7g$1LI+PVzSss7D$wDbGdl?MTRO~_3yx};tzTQz$r zSe*>=WM;>E0%_2DZ|vGpUk`K^A_F2WgkGGN_tjVSqN1X_;l#xEe>Y_`nRX?JRuvab z&g~`&C+yn9tq{;bzH_ItrY6OpN)iIAqhPS4RrcG0}H-ItzJ63yu82&@oOwU+_mf1X}n+g2RO*VZncK44<-BB z+G+Yq=F+7-dwvP<@5T-$&i;rIO9hgIw?BI0!*bRmde8z!{OebMCn_45k1IEu%%;5w zZ2pLs8`5bugFNbyN1`6vx%0719fnqA*1>c_p8opl;C9=-g_85G(`0|)akx&hT0i8E z*A@6EL~^dPMBnD8U_geo*8BDX#{gcTd}-NoZ9(W=)2}TPcDLmocn>*d*J+ov2jn5X zXFPA=Qd371{#Zkjvdg7$5|ZN*kx0rQ<9P{LJPXA|<1mAld=H zeF6pxh+y>)4x?&9&JdUXE;854k?u3tb-luOx$vDg{YKA04)&K8U7-bQ)+Wt*$g!p+ zd>R)h=2(eXDrI1_slN=}1S%ohp zYxPt}n<|U+ZLLX3DU^`n%%gKDue)jSGZ|@jXG+Vz=eq5l&YUz)X3nM`O}_;8bW6G= z_o!T>E7p}a=o+%+4G~%088Lh6<#L=(cY(ZrFR_KH+jR%FgZ+7u*Ku0ym53ZDlD%;M zDK00U$79jCFr3=+e>+Zd8Kbx^y8rpdw;+ePi0(rEcF{vXXUH9M*J=IbOtmtzv9U2p zZ8n=LDb51T5%B!EI7_u9F0HyYe&&bWyDz1GlxsT+qsKmW{8-WTmSZB|aUiV( zp-$K&$n7N5VfYthn(2a0mpq8WDj|Q##oe9cXkS151>`UX`LAYm5)73sDbrS_7t)At z*5MiTSA0^HksSw%*X)LU1ay357LSh~J$h6Zm8R3Ap?k~D-LOHIy{AFm-Px^**;QYa zRWHuV0((CzdpO8}4s*y3Xwud&^^FK$SLZ;dLr&F+Ft25_rg2cGMHE*=P(hwTxPLCH!Q#wALd+)uu>YY1x z@80P^ABRO1AI(Ks%hl*K+3~t~e6n@AtgJn{^)dCj`q*8&RP*TJAcw=-+1WIg>Og-! zi0R>uof>t-y6A!jjiN=dZvEf4lN?@2@VXN~XWf0N=0ImPpPrm-n>8vX&)n@Ol2R#B znbf1LwNQFh?-AAi|L(|>>jb9nKL5a# z9Oin*V%Hps8x@|4J7>=Pz-uLu-d02$AM6y*6+OQCyoDT5;^I)icc$llc4<5}_oyZ} z9q6GAFnMu9vAj6DbA5(iJ=DU~vNpz>?Ab;zfJ01KKV`b&+4+RMK#-yA2MrCG_ zjasUD`OG&}adz8*Hiir*E=5IYiqq0M(?ZkbGuepsVqLeqJEOB(2kKohauw41-dFoo zTMPU9LH@!E;jl%)zA-iRc}Di9+Jk~xPK8|TB|^jN?%g<&O~C;*1>ZTr|1HqT^~&AZ zt2|$RWm0odWs$lF-$Id8uw<=`?m#1}vaQK}T3tBj~iK{rDR^4%a1L}Fip6pKf zo^E+P(CcIO@2Z!pRH`=%LEgUw>`rv2>e~rA)5v2sH_8=VnBt-*_gW4*wPuqbAjy{F zg8t9slNhyMMJprJo3Y9#Q_FY~k2ZAkutg4!9=0@%*iP77rNsdba<2F7igPm&jID>o z#Kgo_Rqc*a9xqlw4X(wq?9avVNq zlfWb>_yT3k)!mnn1Ko?Cg6jldkn@@v0Zpnql3mf#LUJI^Vez+xlB;b|b15a~Lmi@X zJWG2YK1tUT^v0&MU$F+&){6@@u6Tr zjdB19{%^XtMFoAbLxMTGeca3`Dl2Pk)9Z^WWs<-7woPeKX~Znm6;#ut=)i4DZGI`h zOUtV7N~y{@4xQgO_dr`{X@zvA z9J2{nIpTZ?Ix9NJfxgt`Nv!vrR&C#Sx@&moL?lHYuRFE;i^icGLGYMgK=2as!*F+y zzYB7^=2C^ii(DQ062r07cvB{%yjs=fMwz`zF6@(vkk(-#is~cOIV0CsxT=)reLM7O z{`m-UPzCo=aF7%BcH;2FTvT^-HCu;GT{Si0(*uFSLtPj@?fr^guIS!|F@Y(-mgIM0 zaW8WisqhzQofDQsa1z#?_ca*OC3#HY)*TC(}?XH@?&Z-WxtL~JYjrGCdlLMQysqz8SfFa-G>$_VQx`Nh36<)yN?DnC)#7fB z!>_%4IZIsJ+?=ICB0tL7{@(1QvYaHs45Uw{tXPiEHi zq;9v>)C6A~O&ks3E?4zOPYwjEGlgLhcHN7M-5uy4zvVcsRg7q(#oprRXf3(HQ)IUJ z(u5qhYprT2kK(wXIgT4Cestix!M$rbb2e+FyM>a9riL|Pi${b zWYL!fd*tdHml<@G>e3Yo=eHL4-U>46j7L+xp|&jsyRdcav_GR z?TLwOu)`KNH6uRBVLeKlQl-)kmWV=@sXCVuBE7nXm4b>5UH&(vkkqhs7x<)`RO!=hk@B#+>Rab5%2HV z@qUDT;C_V5J-1;)dF|B@?)S7eM0aW)%WxBPyXuLse{y(u{0LS@BmIVYYLo{hWD2@W zboZVy!GJQ!6dA~Det&WKgV$KiKP2R^X|e|>@v@5htOl`G9KBCW0iDKWi+vohILtX5 z^p*J^*^es_9A7ZZoR6G~M`F*2FVBc^fIH)yC5P$^JM5o4eyi0V`;&p#WgX~oN6;>J z0et0m>jc5dfw0Ihzd--h$)=yy!QEN%TWxJW>+df)pr5|OSDf3oFFG2ZXzc}>q&b_B zMpg&^BI6+advZH0JMHW&ICIl5U)0LyHUE0eet<6}U*hm=L-*YCgZ@xG46Ceyo+d7D zd3%z`xob`i3j~46u;DJPA=%%@|0kPmUi4qEJc4B@?^XHJXFAqO`V1r1zKLtsR*;NE zNzF#Pd#CU{q(+zR9chQO!m{&Hv4xPQX#j3VXTf1#kFu$KhQ1i<)SPUJuM zj6L-LfC+56y*~W^lm#th`;^yuyU3>Y=Bs#gX zxN*THx|cicONSWMm{YK(W-A(|v90N^r041!rU`A>rg4C?uVnZw%yymDml4p z^m^gTU=MovKC&c}*us#r9&ZPCq7Nqfe2aR-pda$Z&s?U*NA?7pOv(Y%6~k)7gUQK0 zPXzxS#^$&-EO5FRvD@!aGJV(U+5=erBbz^6`zYjanHk5nd2`k^-vU{R(Sp&GUG>oM zZ5lf{)4a0iGhRQkVSen#&u&g#tE(%ltE+q2en+0jqO)y0J_P+)(#k#;`K>=vJhLjj zDUys|mm@j;KfzeA0IK^LwAwBofAX$JdD#!-1bxj)vM1(_E%vq6zP{+w){!n8mrh3; zP?>3?t*o`RwXLm94=ZA`CPfMH&zg&g9c98Cs=H{;pvT01{ONu+!|ngfTKN5O>D1Ks z9zV8_B>{)%4%Nf)K|f~~9kP!c9En^VwmOiYuRDl&ySn`A%x**wgO0!UE)4c?Ms(|g2CMy12+&Pq_u%a! ziOWhQZw%-Gfyx`CR6=wgpC=AI^yt$zfZw|H0Q}u;1(u~|^$B3tVn=nvYQ4ed2zgxS zE>vK*U!tfik_qSiodN)Tp2_W+;!qadsW~ZX1U+VRZAlf|$MhE>%)cUcmcFa5x76XP zJduPuW)*eUUzl&>!y);g^^r$>h9i^xfsWT$ICA<@{~MmBOC;O{I_0brprKJlb|J+N zgZ&Vmu|4|e&9I`IX0;XsGxg9iuu zuqIF5#P}!U6;uFJ7mT4u{r~d{{YO5J)tr*#)Qq8zwfTvo#i?CPtTX5!huvS|)--)a zw#q}{A!(XCZ|$>Mts^5NR&tLlRg*lYuGAyZt6S$YJjeGH{cYSNYBb}WgdFH;5svdY zJ~6}?^eSp<6xf?_U?H9R$5?|PZITxa^q>|(e$2hsyTr=+`}M~s1`m^+} zk2rdWpck2C5|LhA$x9JQGc#F_$6+?9IdeQ+jvIysW^EuLAuqlmuUj6mzB@0AxVyL$ z4qu-aJCQT;`sS@0+g~r-xOdA*nUt*3k`V|&2YJh}RphC_r-R6Ig#F?g!ysM&;#ElG zL7#6|M+Tbw0&44d(q-Q%l06rGzZ+>}TLX6*pw|{x?0MNM(^eHS2w6q_?+H`NP_lgzP>mx6aB=_u_k3P+) z?qe7vNjYG^WP0@gS$Q~#=Lw3FI z^kQ#lUte#p+rA4F$6!E4qNPdBj>arwkE;qgrLh@`!#X>ea{d=7=N{8m702;%aa^D< zV6csc@^TEk>mZD>DT%9=&`nn;gh)mlB7!rdB9AJME`b_S!eiwj ztdeHfL{c_bjmTcch>`u}|Hkh*x3{+)Iw$_<;Qj;ar@!axl#^7s(}uH{Y;^fAa2w@GE+?S3Ep z{Oz~%^F4tvUh2BKPS&D;Oly$Rx%c=!JlS~bVug~%%PXR^tFgEVUFh02#JbG1Hj4fs zK|iWiefYX6=Vd3lDs^3Z}T+Ya;&Ni@f!YgQA1J`fWyK%5;X(4!FEX-yLqx}StO zvq`UuOHP2T0^S!C>=UXTiWi?HgPSd*;fB$KaJ9bkRLETcolYqut+(&mx3K>6{O>(6 z(xBB&wIz3z1iCvgYY78VLd(Bg2Z+2ir8OlLRQf6^D$l010h^$|1oUdv`+2I5dGy!v zw0Uo7b($(eu6+&YXc+P65lgLzaR@ILFc;IX>f_gL+Az^7-f8e=hu$F%q3A7}estPl zClWei9YrA0N6X`Y}!prk%Okx6*BdR;WvleVA97X%R&DC&^KGs4G%(E9BPQ3WVdbTMFDE;wHAn3hB92y`<(J4RpFY&niX{j{c{56Ajx2`3ml z3fQ;c>p4Jo)B2IDr>0~gI!SKW&s+)ExP68iybs8Cn>KJ{GmNBl7`%LMaDv`qk|)q8 zHxsyH^j%19*lhfyv{Tm^M^|oc=wK(aO{nJfg)QB^NrbM+Cg#s=d3U|a7w%$7!w0WjnU;tsxcgfeU z!?dyx7KV9G__}WK*;7dg`FeRQjqo#4cN+G;pa+uVW{6GJVKT>Y@9r}s&UvEy?;{8Q z&z$ienRm*$b0Z@-4u%F5>Am6&pQ(Y?1u=tp?;Tih9fz8ispN9RXD5#@M; zUofRC52d6oL`9K%EKJWmrz2O^$de5Sa+{ki%nln=5G-1gS{}57_x38x_&7y$jFZ## zx)WV0t*op2e!iCY`o#BDyx=f6mT!;;VjCm~uFlJ6-XzA55Fs*gIpRz!<4JhY;1C}BLr<47kbpwp6LEtidvj$ud5s%uc(|KfsBujHs zu&DiuCeolf92|`Gx_Pw4UJ1D9V@qY-!+W&I#AW{29FwE2=PFt>@h#h zt83>+6l!>Rt$O|(1e@nSZo3i;tX{b|f1ug3=c{HsbI`g!Gpgm$tGA*1!O`1o2iI&x ze~V5d{Gu)+_2JOdQD)kZ&6#$XrqM%POeS3#xfef}x)b&Uawo^A)iBnHv>qa$3)#(Y zR|nLNF`uH5`Pw=Zv9=FJftcKx8M3trvP+}!MTCi;sSA~5@A^0wGD`#u@a zPY`s4>LQPxrPgNUXj3-qyEOLw<+i9bTa1v~Ku*z7&4C=f5?|kSQ)=pZSd@+)E_k?i zT4z2LVvRNH_2KEyau{9QA$#!gq;zw5EY|%xY(Y?Tu#1U(cRSU3Gql}Tr)Y!D;p>R+ zw(%-nUWEudt==&Ci0tMwJzX_LXTGT6u(Dv*>;aNd?bVmxQmIcUh_B~$Q*>zk{BFCy z%pTQYi!|7RM07$f6{4IEt}wZ~n3}pV7`B(#d)`p&b9#qEXHK?S^3&g(9w0+5GT9D{ zo{2i14x5j6bdF8;-V3=)J5(Y%&2B&sX#e?~Q^vo)NsRsGcy@L+4^NhF5{B*of!({N zr1aDBlG4(W&u9R;Zx5Bg*H2tkDNxI_=3$*$U6)m$%_z_Y_}WHCZGMPxqc+5MF~Ead zK!>mIj*LSIZ(1DGV+O=DsDIvc4_o5X4y&biF6F@NB*$Env3I157c78za&+`6tm$S$ ze7FT2*N~7?+Y>w32|7|a0vn=R8TE4rzCm92=1_5cNsWYotuwTg^)7#}SqeWW=VL&W z&F(X5U%YriMdV_JR;AL`W#y~TvkAJeX|ru=?%Td#qwm~S^`r3rdWmkw(A_ZEroDXB-mrlx2GAF?s==(t${^?w zUiWO9p;$Nv7+M5$C|z)MitbC$BcpUVD^JsFOHju4S{?LWD!ggyMk3}wPEN{}u3wi8 zkUd1N|8nb6fB#&6Z@)!7hCdi0E?dJqLVU;gxrsU|WE*0l z%F)~gbllSvYF?;4p6^DdPo+Iefy}C|^Ia#!LicZx|=kx;>#>W*m5$35-OP}~2($)sWSM+5L zV}#I2OF4kVH+~tA(W`!DFJ@7pL)Lh~OgZ6=68MPisZB)3;w5VTVLA2y%=mIR^!oVN za9o=7%<|Go>#b`m-M`^#21YutbVv5&T}nwX)w)%$9r>>m^wyho>i54Tc5$@-0|-^qv5389|oe03Z9LVZLDo@$A6KChyh0HFb zH|ekA^*^-Xq<(=~-FL`Hb?zd+to(?BY9G`5mrZ$+6K9vnVpwKiz>6mbx@hn2sV$OM zx`58#I~W^2XUVr*-@~%AlU^LLIT;BlEKM=)I%iqUKdFR$1L*kb*CV^R%J|T279Vra znbN;OkGa_B0*5r+_(=H?N}9)@vyFLnOlern>=agSth1P*!@GE9=pzJ1!2Y8(j?VDtI3JWOqCdKV*>@q}he~y2-0s-K{cKKo9a*x=?b8&f7b>u^^`# z%sPvuKfgeogGi~_NSvZWKRhb=lQR0m(e&}y`hKv*ItTLp1ie~L)Q%>VE6@SmrS>9S zop8E9eaLtW=m4kEnA=l$nS}C3RVZb_Q zLr^-sTY=1-lhBT_YrJoOi%O^Huy^;Q?o>K=1xUtEJY7?Lw5zbeUY7t>e@cVp)&9rjhRZL@fiLU zrln!fK{?De4Re>ji@tQZr)STlo*U5|+k?w_7{SVxy8+FklYbz`r^BqH6dUm7(J8rS zCC8(KT(EbX@d`PmvtZT@qCVohi>Ld*B$kaXduBN)RY5fS4+&j-@}B`Z#sT6_jg1|5 zQ#-m;e1nd%<0_h=PNX#j&POZG76Kd8g+`pxtWE^ zON@Zd>}y5+D#o}g10)b5_$AIpgIp6BNR=*F+*~lm}B~8kn%Sz?&C8hFo&_{(Bb_!y|k|xpJD$#tM6v`FKZc zQ~INxPFy{1I_G(iQ*?DcnQ5hw1GXa-K4flvSxOT1azhW<|(3Ixh;XVH5*TL2eCp0E53{WhKEG`gQ5;{d6>n1~Y%ma5 ze%K}aNC~DK+Vp_bAjJX&l~pX!HM@JUkSiCE6(PF9szj`{VmUYnXKNuyYDA-?mnbI= zsh~ZyRfU{fDpf5|C4zE^Q2q(TcV>4o9$LVOR9;-yQ7`@Y`{vD?H?#AWj`#f-Tvb8Q zUxWKlaGD_9;s-W;cL!JpYxaX9{H|njNAxrP{08)3)lS)azB%(9Qkr}U?AFTRqbo-b zTZUFDhsq_bTvp4Lx;{EpLvo`M^rK}B=xpIG%i}ZL;Rk1KDR4;S-xqIb96ccCbGjfp zVqD)Z!Ce(JzK^vBkLS;AqgJx}6XJ(3+PUn0kpH{vllyxveEH@X`^Y5bH zJ^uSU3>{aL@axuK2%L&cu2tNv0bO7hWcOYE(F<#j|L_L}`pfU;&!0?zdu64RR?CK= zOP65uu<`3BHspiAXcZJDAca~fGrg@ zXaUNypPzhv!T|cGVXbP_jO{5Sw?W=(En_)N(2?B$eXCq1IZZ<^LUX_)o>TO(4;^ez zlZuqxP(hyLE{ivC?6?#-Q@L5-8-bNImmP%IEA*pTR~CjEX8 z>A)_?&e&qn8IoWk7-CsWpnHEm4E)p9JqzF|z|j9S{59x_T{BPGjLSp#~jHQiDq zsGg;YW;(C;L2N8*xG7Ur(2`b z8bu!(CFsatG1p-T$UZs|9U086-xhmRX~Aq@w%2m8^k#3-ZFF_ndLtHP`GtGq!0v zF(NuA?-t2{4)Wg*ku4V(*eCs~(j&iZ!r?(axGLfd-NZEC>G{!N$R4mC5ZNI+Vej5I zn}=C>ihe7XZ|1j>Eu(4}O4({!B`sA-!_$vinp{q`q;;za^stn1OfTsG&iSKXRNxrc%gd^^9xB5b@^qq~|8u$i?VRV;s)e zf3rCiOXGobOKn<)Va2d;l?Zwhi&p#<);vsZwwX=Nn-#}|`{(8h+MJ%4vvZD?gEOtE0_g@+bTz-JE3tKTXm%mBT z^LK7yBdUL~7w|#fgS3hXN=v3Unl-gnBF?@MADXTjHBuFI^^8Owlkn`cr-xk~GHVT6 z#mn>-^h(q-l*t_jANT-SAV8EK@>Q9n2(Ueq}&dkrOkQyCnK;ggPO| z!yt^^*Ig{wK!&^Lanorve**{f19reCeD?G>rPnliRX8yXIZHf5&~vKoNYWQ(*fz-* z;M!rwjoWTUpPSd?b=&sliR6qt&>W%*1D%m$NS>BNOZ>WuaL+ZDw=a%ugIoqxhoO$i zPT7Ip&JOh1>l3g~w^?jVcxVAZ8$PIk`gn^Ic*!H^URYH!r*tQ3yJ=+Z`dpMqp7Gq=oE`nlZHw)q z<}8`Pyv9Ty7BW^A+L-Fd;#SWMUWE3$YX$SzC9eC9%Tsndasz)S=<92=XoJ-|7oJLw z{ubjnFh|C`N(Vmp@h9Zzu?)~L%jvq8Fy|4~qlIEtuefH^p6h8iEpuL&)dX@RGsN9F z`N);~?C60q#6BxMSIPP{#5UbJp5PceOX}Lf{8tqHgB#sJ!AgJ^y4)AOy<2b!$cE8t%=oOIDMpsA~@74TSHqZwM`NJLD9VqXm`O76C)V;u~ zRZEY*_`}3`kgxeg8yII7;h9nLG|;s=vi7XrsO$6fLN-&V7xe|#?6KXt9?95quH7GD z)A{Y2ocy^Uxcj0H_yc`-JoMifd%DEn8K5(EA=JU=ucIf&ylJtPPZ13ae}EbQrV zV26r&v4U421KtMG8GFGj7VWNxQ_yGk`{d-P)Sm!n`72G`LEb*lp9=jK8G`zrYrqR+?Y^hyzW7cvbqA4f-Sr5ueUzLvaeN$c zN4~mq=gtS4q#5s%SFUt3c+fwz)XZ9+$XWABkh2YCQFBE14o3Rk8(kf|4|{N)uJ1bFF9hp%-l;Rvb+;eJ;5k1mnn*vn zRR5`tmENP7u0(G#8I97WR;;HNeh)bt=Pb5U&1rCd;(_ZHiyEwno#Y`YP z=)oSiJ!{S?@Z$sdh<6zNiBL0eLe3l2ve3@Qxsb|0^hxP~+r$6B&T?ARtbF0Q@`N77 z;R&Z;nSQP}xQPjUTE$82e&nx658Oi1fxoe{+C1BsAngAEz5qf00MAd3Cq<=4x Z{{;$xH 0 && tarr[rule] != nil && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text} - } - - } else { - tarr = make([]*transText, 7, 7) - t.cardinalTanslations[key] = tarr - } - - trans := &transText{ - text: text, - indexes: make([]int, 2, 2), - } - - tarr[rule] = trans - - idx := strings.Index(text, paramZero) - if idx == -1 { - tarr[rule] = nil - return &ErrCardinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddCardinal'. locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)} - } - - trans.indexes[0] = idx - trans.indexes[1] = idx + len(paramZero) - - return nil -} - -// AddOrdinal adds an ordinal plural translation for a particular language/locale -// {0} is the only replacement type accepted and only one variable is accepted as -// multiple cannot be used for a plural rule determination, unless it is a range; -// see AddRange below. -// eg. in locale 'en' one: '{0}st day of spring' other: '{0}nd day of spring' - 1st, 2nd, 3rd... -func (t *translator) AddOrdinal(key interface{}, text string, rule locales.PluralRule, override bool) error { - - var verified bool - - // verify plural rule exists for locale - for _, pr := range t.PluralsOrdinal() { - if pr == rule { - verified = true - break - } - } - - if !verified { - return &ErrOrdinalTranslation{text: fmt.Sprintf("error: ordinal plural rule '%s' does not exist for locale '%s' key: '%v' text: '%s'", rule, t.Locale(), key, text)} - } - - tarr, ok := t.ordinalTanslations[key] - if ok { - // verify not adding a conflicting record - if len(tarr) > 0 && tarr[rule] != nil && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text} - } - - } else { - tarr = make([]*transText, 7, 7) - t.ordinalTanslations[key] = tarr - } - - trans := &transText{ - text: text, - indexes: make([]int, 2, 2), - } - - tarr[rule] = trans - - idx := strings.Index(text, paramZero) - if idx == -1 { - tarr[rule] = nil - return &ErrOrdinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddOrdinal'. locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)} - } - - trans.indexes[0] = idx - trans.indexes[1] = idx + len(paramZero) - - return nil -} - -// AddRange adds a range plural translation for a particular language/locale -// {0} and {1} are the only replacement types accepted and only these are accepted. -// eg. in locale 'nl' one: '{0}-{1} day left' other: '{0}-{1} days left' -func (t *translator) AddRange(key interface{}, text string, rule locales.PluralRule, override bool) error { - - var verified bool - - // verify plural rule exists for locale - for _, pr := range t.PluralsRange() { - if pr == rule { - verified = true - break - } - } - - if !verified { - return &ErrRangeTranslation{text: fmt.Sprintf("error: range plural rule '%s' does not exist for locale '%s' key: '%v' text: '%s'", rule, t.Locale(), key, text)} - } - - tarr, ok := t.rangeTanslations[key] - if ok { - // verify not adding a conflicting record - if len(tarr) > 0 && tarr[rule] != nil && !override { - return &ErrConflictingTranslation{locale: t.Locale(), key: key, rule: rule, text: text} - } - - } else { - tarr = make([]*transText, 7, 7) - t.rangeTanslations[key] = tarr - } - - trans := &transText{ - text: text, - indexes: make([]int, 4, 4), - } - - tarr[rule] = trans - - idx := strings.Index(text, paramZero) - if idx == -1 { - tarr[rule] = nil - return &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, are you sure you're adding a Range Translation? locale: '%s' key: '%v' text: '%s'", paramZero, t.Locale(), key, text)} - } - - trans.indexes[0] = idx - trans.indexes[1] = idx + len(paramZero) - - idx = strings.Index(text, paramOne) - if idx == -1 { - tarr[rule] = nil - return &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, a Range Translation requires two parameters. locale: '%s' key: '%v' text: '%s'", paramOne, t.Locale(), key, text)} - } - - trans.indexes[2] = idx - trans.indexes[3] = idx + len(paramOne) - - return nil -} - -// T creates the translation for the locale given the 'key' and params passed in -func (t *translator) T(key interface{}, params ...string) (string, error) { - - trans, ok := t.translations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - b := make([]byte, 0, 64) - - var start, end, count int - - for i := 0; i < len(trans.indexes); i++ { - end = trans.indexes[i] - b = append(b, trans.text[start:end]...) - b = append(b, params[count]...) - i++ - start = trans.indexes[i] - count++ - } - - b = append(b, trans.text[start:]...) - - return string(b), nil -} - -// C creates the cardinal translation for the locale given the 'key', 'num' and 'digit' arguments and param passed in -func (t *translator) C(key interface{}, num float64, digits uint64, param string) (string, error) { - - tarr, ok := t.cardinalTanslations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - rule := t.CardinalPluralRule(num, digits) - - trans := tarr[rule] - - b := make([]byte, 0, 64) - b = append(b, trans.text[:trans.indexes[0]]...) - b = append(b, param...) - b = append(b, trans.text[trans.indexes[1]:]...) - - return string(b), nil -} - -// O creates the ordinal translation for the locale given the 'key', 'num' and 'digit' arguments and param passed in -func (t *translator) O(key interface{}, num float64, digits uint64, param string) (string, error) { - - tarr, ok := t.ordinalTanslations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - rule := t.OrdinalPluralRule(num, digits) - - trans := tarr[rule] - - b := make([]byte, 0, 64) - b = append(b, trans.text[:trans.indexes[0]]...) - b = append(b, param...) - b = append(b, trans.text[trans.indexes[1]:]...) - - return string(b), nil -} - -// R creates the range translation for the locale given the 'key', 'num1', 'digit1', 'num2' and 'digit2' arguments -// and 'param1' and 'param2' passed in -func (t *translator) R(key interface{}, num1 float64, digits1 uint64, num2 float64, digits2 uint64, param1, param2 string) (string, error) { - - tarr, ok := t.rangeTanslations[key] - if !ok { - return unknownTranslation, ErrUnknowTranslation - } - - rule := t.RangePluralRule(num1, digits1, num2, digits2) - - trans := tarr[rule] - - b := make([]byte, 0, 64) - b = append(b, trans.text[:trans.indexes[0]]...) - b = append(b, param1...) - b = append(b, trans.text[trans.indexes[1]:trans.indexes[2]]...) - b = append(b, param2...) - b = append(b, trans.text[trans.indexes[3]:]...) - - return string(b), nil -} - -// VerifyTranslations checks to ensures that no plural rules have been -// missed within the translations. -func (t *translator) VerifyTranslations() error { - - for k, v := range t.cardinalTanslations { - - for _, rule := range t.PluralsCardinal() { - - if v[rule] == nil { - return &ErrMissingPluralTranslation{locale: t.Locale(), translationType: "plural", rule: rule, key: k} - } - } - } - - for k, v := range t.ordinalTanslations { - - for _, rule := range t.PluralsOrdinal() { - - if v[rule] == nil { - return &ErrMissingPluralTranslation{locale: t.Locale(), translationType: "ordinal", rule: rule, key: k} - } - } - } - - for k, v := range t.rangeTanslations { - - for _, rule := range t.PluralsRange() { - - if v[rule] == nil { - return &ErrMissingPluralTranslation{locale: t.Locale(), translationType: "range", rule: rule, key: k} - } - } - } - - return nil -} diff --git a/vendor/github.com/go-playground/universal-translator/translator_test.go b/vendor/github.com/go-playground/universal-translator/translator_test.go deleted file mode 100644 index 837d2d39c..000000000 --- a/vendor/github.com/go-playground/universal-translator/translator_test.go +++ /dev/null @@ -1,858 +0,0 @@ -package ut - -import ( - "fmt" - "testing" - - "github.com/go-playground/locales" - "github.com/go-playground/locales/en" - "github.com/go-playground/locales/en_CA" - "github.com/go-playground/locales/nl" -) - -// NOTES: -// - Run "go test" to run tests -// - Run "gocov test | gocov report" to report on test converage by file -// - Run "gocov test | gocov annotate -" to report on all code and functions, those ,marked with "MISS" were never called -// -// or -// -// -- may be a good idea to change to output path to somewherelike /tmp -// go test -coverprofile cover.out && go tool cover -html=cover.out -o cover.html -// - -func TestBasicTranslation(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") // or fallback if fails to find 'en' - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - expected error - expectedError bool - override bool - }{ - { - key: "test_trans", - trans: "Welcome {0}", - expected: nil, - }, - { - key: -1, - trans: "Welcome {0}", - expected: nil, - }, - { - key: "test_trans2", - trans: "{0} to the {1}.", - expected: nil, - }, - { - key: "test_trans3", - trans: "Welcome {0} to the {1}", - expected: nil, - }, - { - key: "test_trans4", - trans: "{0}{1}", - expected: nil, - }, - { - key: "test_trans", - trans: "{0}{1}", - expected: &ErrConflictingTranslation{locale: en.Locale(), key: "test_trans", text: "{0}{1}"}, - expectedError: true, - }, - { - key: -1, - trans: "{0}{1}", - expected: &ErrConflictingTranslation{locale: en.Locale(), key: -1, text: "{0}{1}"}, - expectedError: true, - }, - { - key: "test_trans", - trans: "Welcome {0} to the {1}.", - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := en.Add(tt.key, tt.trans, tt.override) - if err != tt.expected { - if !tt.expectedError { - t.Errorf("Expected '%s' Got '%s'", tt.expected, err) - } else { - if err.Error() != tt.expected.Error() { - t.Errorf("Expected '%s' Got '%s'", tt.expected.Error(), err.Error()) - } - } - } - } - - tests := []struct { - key interface{} - params []string - expected string - expectedError bool - }{ - { - key: "test_trans", - params: []string{"Joeybloggs", "The Test"}, - expected: "Welcome Joeybloggs to the The Test.", - }, - { - key: "test_trans2", - params: []string{"Joeybloggs", "The Test"}, - expected: "Joeybloggs to the The Test.", - }, - { - key: "test_trans3", - params: []string{"Joeybloggs", "The Test"}, - expected: "Welcome Joeybloggs to the The Test", - }, - { - key: "test_trans4", - params: []string{"Joeybloggs", "The Test"}, - expected: "JoeybloggsThe Test", - }, - // bad translation - { - key: "non-existant-key", - params: []string{"Joeybloggs", "The Test"}, - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - s, err := en.T(tt.key, tt.params...) - if s != tt.expected { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } - } -} - -func TestCardinalTranslation(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - // bad translation - { - key: "cardinal_test", - trans: "You have a day left.", - rule: locales.PluralRuleOne, - expected: &ErrCardinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddCardinal'. locale: '%s' key: '%v' text: '%s'", paramZero, en.Locale(), "cardinal_test", "You have a day left.")}, - expectedError: true, - }, - // bad translation - { - key: "cardinal_test", - trans: "You have a day left few.", - rule: locales.PluralRuleFew, - expected: &ErrCardinalTranslation{text: fmt.Sprintf("error: cardinal plural rule '%s' does not exist for locale '%s' key: '%s' text: '%s'", locales.PluralRuleFew, en.Locale(), "cardinal_test", "You have a day left few.")}, - expectedError: true, - }, - { - key: "cardinal_test", - trans: "You have {0} day", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "cardinal_test", - trans: "You have {0} days left.", - rule: locales.PluralRuleOther, - expected: nil, - }, - { - key: "cardinal_test", - trans: "You have {0} days left.", - rule: locales.PluralRuleOther, - expected: &ErrConflictingTranslation{locale: en.Locale(), key: "cardinal_test", rule: locales.PluralRuleOther, text: "You have {0} days left."}, - expectedError: true, - }, - { - key: "cardinal_test", - trans: "You have {0} day left.", - rule: locales.PluralRuleOne, - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := en.AddCardinal(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '' Got '%s'", err) - } - } - } - - tests := []struct { - key interface{} - num float64 - digits uint64 - param string - expected string - expectedError bool - }{ - { - key: "cardinal_test", - num: 1, - digits: 0, - param: string(en.FmtNumber(1, 0)), - expected: "You have 1 day left.", - }, - // bad translation key - { - key: "non-existant", - num: 1, - digits: 0, - param: string(en.FmtNumber(1, 0)), - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := en.C(tt.key, tt.num, tt.digits, tt.param) - if err != nil { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '' Got '%s'", err) - } - } - - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestOrdinalTranslation(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - // bad translation - { - key: "day", - trans: "st", - rule: locales.PluralRuleOne, - expected: &ErrOrdinalTranslation{text: fmt.Sprintf("error: parameter '%s' not found, may want to use 'Add' instead of 'AddOrdinal'. locale: '%s' key: '%v' text: '%s'", paramZero, en.Locale(), "day", "st")}, - expectedError: true, - }, - // bad translation - { - key: "day", - trans: "st", - rule: locales.PluralRuleMany, - expected: &ErrOrdinalTranslation{text: fmt.Sprintf("error: ordinal plural rule '%s' does not exist for locale '%s' key: '%s' text: '%s'", locales.PluralRuleMany, en.Locale(), "day", "st")}, - expectedError: true, - }, - { - key: "day", - trans: "{0}st", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "day", - trans: "{0}nd", - rule: locales.PluralRuleTwo, - expected: nil, - }, - { - key: "day", - trans: "{0}rd", - rule: locales.PluralRuleFew, - expected: nil, - }, - { - key: "day", - trans: "{0}th", - rule: locales.PluralRuleOther, - expected: nil, - }, - // bad translation - { - key: "day", - trans: "{0}th", - rule: locales.PluralRuleOther, - expected: &ErrConflictingTranslation{locale: en.Locale(), key: "day", rule: locales.PluralRuleOther, text: "{0}th"}, - expectedError: true, - }, - { - key: "day", - trans: "{0}st", - rule: locales.PluralRuleOne, - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := en.AddOrdinal(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '' Got '%s'", err) - } - } - } - - tests := []struct { - key interface{} - num float64 - digits uint64 - param string - expected string - expectedError bool - }{ - { - key: "day", - num: 1, - digits: 0, - param: string(en.FmtNumber(1, 0)), - expected: "1st", - }, - { - key: "day", - num: 2, - digits: 0, - param: string(en.FmtNumber(2, 0)), - expected: "2nd", - }, - { - key: "day", - num: 3, - digits: 0, - param: string(en.FmtNumber(3, 0)), - expected: "3rd", - }, - { - key: "day", - num: 4, - digits: 0, - param: string(en.FmtNumber(4, 0)), - expected: "4th", - }, - { - key: "day", - num: 10258.43, - digits: 0, - param: string(en.FmtNumber(10258.43, 0)), - expected: "10,258th", - }, - // bad translation - { - key: "d-day", - num: 10258.43, - digits: 0, - param: string(en.FmtNumber(10258.43, 0)), - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := en.O(tt.key, tt.num, tt.digits, tt.param) - if err != nil { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '' Got '%s'", err) - } - } - - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestRangeTranslation(t *testing.T) { - - n := nl.New() - uni := New(n, n) - - // dutch - nl, found := uni.GetTranslator("nl") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - // bad translation - { - key: "day", - trans: "er -{1} dag vertrokken", - rule: locales.PluralRuleOne, - expected: &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, are you sure you're adding a Range Translation? locale: '%s' key: '%s' text: '%s'", paramZero, nl.Locale(), "day", "er -{1} dag vertrokken")}, - expectedError: true, - }, - // bad translation - { - key: "day", - trans: "er {0}- dag vertrokken", - rule: locales.PluralRuleMany, - expected: &ErrRangeTranslation{text: fmt.Sprintf("error: range plural rule '%s' does not exist for locale '%s' key: '%s' text: '%s'", locales.PluralRuleMany, nl.Locale(), "day", "er {0}- dag vertrokken")}, - expectedError: true, - }, - // bad translation - { - key: "day", - trans: "er {0}- dag vertrokken", - rule: locales.PluralRuleOne, - expected: &ErrRangeTranslation{text: fmt.Sprintf("error: parameter '%s' not found, a Range Translation requires two parameters. locale: '%s' key: '%s' text: '%s'", paramOne, nl.Locale(), "day", "er {0}- dag vertrokken")}, - expectedError: true, - }, - { - key: "day", - trans: "er {0}-{1} dag", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "day", - trans: "er zijn {0}-{1} dagen over", - rule: locales.PluralRuleOther, - expected: nil, - }, - // bad translation - { - key: "day", - trans: "er zijn {0}-{1} dagen over", - rule: locales.PluralRuleOther, - expected: &ErrConflictingTranslation{locale: nl.Locale(), key: "day", rule: locales.PluralRuleOther, text: "er zijn {0}-{1} dagen over"}, - expectedError: true, - }, - { - key: "day", - trans: "er {0}-{1} dag vertrokken", - rule: locales.PluralRuleOne, - expected: nil, - override: true, - }, - } - - for _, tt := range translations { - - err := nl.AddRange(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '%#v' Got '%s'", tt.expected, err) - } - } - } - - tests := []struct { - key interface{} - num1 float64 - digits1 uint64 - num2 float64 - digits2 uint64 - param1 string - param2 string - expected string - expectedError bool - }{ - { - key: "day", - num1: 1, - digits1: 0, - num2: 2, - digits2: 0, - param1: string(nl.FmtNumber(1, 0)), - param2: string(nl.FmtNumber(2, 0)), - expected: "er zijn 1-2 dagen over", - }, - { - key: "day", - num1: 0, - digits1: 0, - num2: 1, - digits2: 0, - param1: string(nl.FmtNumber(0, 0)), - param2: string(nl.FmtNumber(1, 0)), - expected: "er 0-1 dag vertrokken", - }, - { - key: "day", - num1: 0, - digits1: 0, - num2: 2, - digits2: 0, - param1: string(nl.FmtNumber(0, 0)), - param2: string(nl.FmtNumber(2, 0)), - expected: "er zijn 0-2 dagen over", - }, - // bad translations from here - { - key: "d-day", - num1: 0, - digits1: 0, - num2: 2, - digits2: 0, - param1: string(nl.FmtNumber(0, 0)), - param2: string(nl.FmtNumber(2, 0)), - expected: "", - expectedError: true, - }, - } - - for _, tt := range tests { - - s, err := nl.R(tt.key, tt.num1, tt.digits1, tt.num2, tt.digits2, tt.param1, tt.param2) - if err != nil { - if !tt.expectedError && err != ErrUnknowTranslation { - t.Errorf("Expected '' Got '%s'", err) - } - } - - if s != tt.expected { - t.Errorf("Expected '%s' Got '%s'", tt.expected, s) - } - } -} - -func TestFallbackTranslator(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - if en.Locale() != "en" { - t.Errorf("Expected '%s' Got '%s'", "en", en.Locale()) - } - - fallback, _ := uni.GetTranslator("nl") - if fallback.Locale() != "en" { - t.Errorf("Expected '%s' Got '%s'", "en", fallback.Locale()) - } - - en, _ = uni.FindTranslator("nl", "en") - if en.Locale() != "en" { - t.Errorf("Expected '%s' Got '%s'", "en", en.Locale()) - } - - fallback, _ = uni.FindTranslator("nl") - if fallback.Locale() != "en" { - t.Errorf("Expected '%s' Got '%s'", "en", fallback.Locale()) - } -} - -func TestAddTranslator(t *testing.T) { - - e := en.New() - n := nl.New() - uni := New(e, n) - - tests := []struct { - trans locales.Translator - expected error - expectedError bool - override bool - }{ - { - trans: en_CA.New(), - expected: nil, - override: false, - }, - { - trans: n, - expected: &ErrExistingTranslator{locale: n.Locale()}, - expectedError: true, - override: false, - }, - { - trans: e, - expected: &ErrExistingTranslator{locale: e.Locale()}, - expectedError: true, - override: false, - }, - { - trans: e, - expected: nil, - override: true, - }, - } - - for _, tt := range tests { - - err := uni.AddTranslator(tt.trans, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '%s' Got '%s'", tt.expected, err) - } - } - } -} - -func TestVerifyTranslations(t *testing.T) { - - n := nl.New() - // dutch - uni := New(n, n) - - loc, _ := uni.GetTranslator("nl") - if loc.Locale() != "nl" { - t.Errorf("Expected '%s' Got '%s'", "nl", loc.Locale()) - } - - // cardinal checks - - err := loc.AddCardinal("day", "je {0} dag hebben verlaten", locales.PluralRuleOne, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - // fail cardinal rules - expected := &ErrMissingPluralTranslation{locale: loc.Locale(), translationType: "plural", rule: locales.PluralRuleOther, key: "day"} - err = loc.VerifyTranslations() - if err == nil || err.Error() != expected.Error() { - t.Errorf("Expected '%s' Got '%s'", expected, err) - } - - // success cardinal - err = loc.AddCardinal("day", "je {0} dagen hebben verlaten", locales.PluralRuleOther, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - err = loc.VerifyTranslations() - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - // range checks - err = loc.AddRange("day", "je {0}-{1} dagen hebben verlaten", locales.PluralRuleOther, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - // fail range rules - expected = &ErrMissingPluralTranslation{locale: loc.Locale(), translationType: "range", rule: locales.PluralRuleOne, key: "day"} - err = loc.VerifyTranslations() - if err == nil || err.Error() != expected.Error() { - t.Errorf("Expected '%s' Got '%s'", expected, err) - } - - // success range - err = loc.AddRange("day", "je {0}-{1} dag hebben verlaten", locales.PluralRuleOne, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - err = loc.VerifyTranslations() - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - // ok so 'nl' aka dutch, ony has one plural rule for ordinals, so going to switch to english from here which has 4 - - err = uni.AddTranslator(en.New(), false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - loc, _ = uni.GetTranslator("en") - if loc.Locale() != "en" { - t.Errorf("Expected '%s' Got '%s'", "en", loc.Locale()) - } - - // ordinal checks - - err = loc.AddOrdinal("day", "{0}st", locales.PluralRuleOne, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - err = loc.AddOrdinal("day", "{0}rd", locales.PluralRuleFew, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - err = loc.AddOrdinal("day", "{0}th", locales.PluralRuleOther, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - // fail ordinal rules - expected = &ErrMissingPluralTranslation{locale: loc.Locale(), translationType: "ordinal", rule: locales.PluralRuleTwo, key: "day"} - err = loc.VerifyTranslations() - if err == nil || err.Error() != expected.Error() { - t.Errorf("Expected '%s' Got '%s'", expected, err) - } - - // success ordinal - - err = loc.AddOrdinal("day", "{0}nd", locales.PluralRuleTwo, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - err = loc.VerifyTranslations() - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } -} - -func TestVerifyTranslationsWithNonStringKeys(t *testing.T) { - - n := nl.New() - // dutch - uni := New(n, n) - - loc, _ := uni.GetTranslator("nl") - if loc.Locale() != "nl" { - t.Errorf("Expected '%s' Got '%s'", "nl", loc.Locale()) - } - - // cardinal checks - - err := loc.AddCardinal(-1, "je {0} dag hebben verlaten", locales.PluralRuleOne, false) - if err != nil { - t.Fatalf("Expected '' Got '%s'", err) - } - - // fail cardinal rules - expected := &ErrMissingPluralTranslation{locale: loc.Locale(), translationType: "plural", rule: locales.PluralRuleOther, key: -1} - err = loc.VerifyTranslations() - if err == nil || err.Error() != expected.Error() { - t.Errorf("Expected '%s' Got '%s'", expected, err) - } -} - -func TestGetFallback(t *testing.T) { - - // dutch - n := nl.New() - e := en.New() - - uni := New(e, n) - - trans := uni.GetFallback() - - expected := "en" - - if trans.Locale() != expected { - t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale()) - } -} - -func TestVerifyUTTranslations(t *testing.T) { - - e := en.New() - uni := New(e, e) - en, found := uni.GetTranslator("en") - if !found { - t.Fatalf("Expected '%t' Got '%t'", true, found) - } - - translations := []struct { - key interface{} - trans string - rule locales.PluralRule - expected error - expectedError bool - override bool - }{ - { - key: "day", - trans: "{0}st", - rule: locales.PluralRuleOne, - expected: nil, - }, - { - key: "day", - trans: "{0}nd", - rule: locales.PluralRuleTwo, - expected: nil, - }, - { - key: "day", - trans: "{0}rd", - rule: locales.PluralRuleFew, - expected: nil, - }, - // intentionally leaving out plural other - // { - // key: "day", - // trans: "{0}th", - // rule: locales.PluralRuleOther, - // expected: nil, - // }, - } - - for _, tt := range translations { - - err := en.AddOrdinal(tt.key, tt.trans, tt.rule, tt.override) - if err != tt.expected { - if !tt.expectedError || err.Error() != tt.expected.Error() { - t.Errorf("Expected '' Got '%s'", err) - } - } - } - - expected := "error: missing 'ordinal' plural rule 'Other' for translation with key 'day' and locale 'en'" - err := uni.VerifyTranslations() - if err == nil || err.Error() != expected { - t.Fatalf("Expected '%s' Got '%s'", expected, err) - } - - err = en.AddOrdinal("day", "{0}th", locales.PluralRuleOther, false) - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } - - err = uni.VerifyTranslations() - if err != nil { - t.Fatalf("Expected '%v' Got '%s'", nil, err) - } -} diff --git a/vendor/github.com/go-playground/universal-translator/universal_translator.go b/vendor/github.com/go-playground/universal-translator/universal_translator.go deleted file mode 100644 index dbf707f5c..000000000 --- a/vendor/github.com/go-playground/universal-translator/universal_translator.go +++ /dev/null @@ -1,113 +0,0 @@ -package ut - -import ( - "strings" - - "github.com/go-playground/locales" -) - -// UniversalTranslator holds all locale & translation data -type UniversalTranslator struct { - translators map[string]Translator - fallback Translator -} - -// New returns a new UniversalTranslator instance set with -// the fallback locale and locales it should support -func New(fallback locales.Translator, supportedLocales ...locales.Translator) *UniversalTranslator { - - t := &UniversalTranslator{ - translators: make(map[string]Translator), - } - - for _, v := range supportedLocales { - - trans := newTranslator(v) - t.translators[strings.ToLower(trans.Locale())] = trans - - if fallback.Locale() == v.Locale() { - t.fallback = trans - } - } - - if t.fallback == nil && fallback != nil { - t.fallback = newTranslator(fallback) - } - - return t -} - -// FindTranslator trys to find a Translator based on an array of locales -// and returns the first one it can find, otherwise returns the -// fallback translator. -func (t *UniversalTranslator) FindTranslator(locales ...string) (trans Translator, found bool) { - - for _, locale := range locales { - - if trans, found = t.translators[strings.ToLower(locale)]; found { - return - } - } - - return t.fallback, false -} - -// GetTranslator returns the specified translator for the given locale, -// or fallback if not found -func (t *UniversalTranslator) GetTranslator(locale string) (trans Translator, found bool) { - - if trans, found = t.translators[strings.ToLower(locale)]; found { - return - } - - return t.fallback, false -} - -// GetFallback returns the fallback locale -func (t *UniversalTranslator) GetFallback() Translator { - return t.fallback -} - -// AddTranslator adds the supplied translator, if it already exists the override param -// will be checked and if false an error will be returned, otherwise the translator will be -// overridden; if the fallback matches the supplied translator it will be overridden as well -// NOTE: this is normally only used when translator is embedded within a library -func (t *UniversalTranslator) AddTranslator(translator locales.Translator, override bool) error { - - lc := strings.ToLower(translator.Locale()) - _, ok := t.translators[lc] - if ok && !override { - return &ErrExistingTranslator{locale: translator.Locale()} - } - - trans := newTranslator(translator) - - if t.fallback.Locale() == translator.Locale() { - - // because it's optional to have a fallback, I don't impose that limitation - // don't know why you wouldn't but... - if !override { - return &ErrExistingTranslator{locale: translator.Locale()} - } - - t.fallback = trans - } - - t.translators[lc] = trans - - return nil -} - -// VerifyTranslations runs through all locales and identifies any issues -// eg. missing plural rules for a locale -func (t *UniversalTranslator) VerifyTranslations() (err error) { - - for _, trans := range t.translators { - err = trans.VerifyTranslations() - if err != nil { - return - } - } - - return -} diff --git a/vendor/github.com/golang/protobuf/.gitignore b/vendor/github.com/golang/protobuf/.gitignore deleted file mode 100644 index 8f5b596b1..000000000 --- a/vendor/github.com/golang/protobuf/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.DS_Store -*.[568ao] -*.ao -*.so -*.pyc -._* -.nfs.* -[568a].out -*~ -*.orig -core -_obj -_test -_testmain.go -protoc-gen-go/testdata/multi/*.pb.go -_conformance/_conformance diff --git a/vendor/github.com/golang/protobuf/.travis.yml b/vendor/github.com/golang/protobuf/.travis.yml deleted file mode 100644 index 93c67805b..000000000 --- a/vendor/github.com/golang/protobuf/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -sudo: false -language: go -go: -- 1.6.x -- 1.7.x -- 1.8.x -- 1.9.x - -install: - - go get -v -d -t github.com/golang/protobuf/... - - curl -L https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip -o /tmp/protoc.zip - - unzip /tmp/protoc.zip -d $HOME/protoc - -env: - - PATH=$HOME/protoc/bin:$PATH - -script: - - make all test diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS deleted file mode 100644 index 15167cd74..000000000 --- a/vendor/github.com/golang/protobuf/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/github.com/golang/protobuf/CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS deleted file mode 100644 index 1c4577e96..000000000 --- a/vendor/github.com/golang/protobuf/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 1b1b1921e..000000000 --- a/vendor/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/golang/protobuf/Make.protobuf b/vendor/github.com/golang/protobuf/Make.protobuf deleted file mode 100644 index 15071de10..000000000 --- a/vendor/github.com/golang/protobuf/Make.protobuf +++ /dev/null @@ -1,40 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Includable Makefile to add a rule for generating .pb.go files from .proto files -# (Google protocol buffer descriptions). -# Typical use if myproto.proto is a file in package mypackage in this directory: -# -# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf - -%.pb.go: %.proto - protoc --go_out=. $< - diff --git a/vendor/github.com/golang/protobuf/Makefile b/vendor/github.com/golang/protobuf/Makefile deleted file mode 100644 index a1421d8b7..000000000 --- a/vendor/github.com/golang/protobuf/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -all: install - -install: - go install ./proto ./jsonpb ./ptypes - go install ./protoc-gen-go - -test: - go test ./proto ./jsonpb ./ptypes - make -C protoc-gen-go/testdata test - -clean: - go clean ./... - -nuke: - go clean -i ./... - -regenerate: - make -C protoc-gen-go/descriptor regenerate - make -C protoc-gen-go/plugin regenerate - make -C protoc-gen-go/testdata regenerate - make -C proto/testdata regenerate - make -C jsonpb/jsonpb_test_proto regenerate - make -C _conformance regenerate diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md deleted file mode 100644 index 207eb6b48..000000000 --- a/vendor/github.com/golang/protobuf/README.md +++ /dev/null @@ -1,243 +0,0 @@ -# Go support for Protocol Buffers - -[![Build Status](https://travis-ci.org/golang/protobuf.svg?branch=master)](https://travis-ci.org/golang/protobuf) - -Google's data interchange format. -Copyright 2010 The Go Authors. -https://github.com/golang/protobuf - -This package and the code it generates requires at least Go 1.4. - -This software implements Go bindings for protocol buffers. For -information about protocol buffers themselves, see - https://developers.google.com/protocol-buffers/ - -## Installation ## - -To use this software, you must: -- Install the standard C++ implementation of protocol buffers from - https://developers.google.com/protocol-buffers/ -- Of course, install the Go compiler and tools from - https://golang.org/ - See - https://golang.org/doc/install - for details or, if you are using gccgo, follow the instructions at - https://golang.org/doc/install/gccgo -- Grab the code from the repository and install the proto package. - The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`. - The compiler plugin, protoc-gen-go, will be installed in $GOBIN, - defaulting to $GOPATH/bin. It must be in your $PATH for the protocol - compiler, protoc, to find it. - -This software has two parts: a 'protocol compiler plugin' that -generates Go source files that, once compiled, can access and manage -protocol buffers; and a library that implements run-time support for -encoding (marshaling), decoding (unmarshaling), and accessing protocol -buffers. - -There is support for gRPC in Go using protocol buffers. -See the note at the bottom of this file for details. - -There are no insertion points in the plugin. - - -## Using protocol buffers with Go ## - -Once the software is installed, there are two steps to using it. -First you must compile the protocol buffer definitions and then import -them, with the support library, into your program. - -To compile the protocol buffer definition, run protoc with the --go_out -parameter set to the directory you want to output the Go code to. - - protoc --go_out=. *.proto - -The generated files will be suffixed .pb.go. See the Test code below -for an example using such a file. - - -The package comment for the proto library contains text describing -the interface provided in Go for protocol buffers. Here is an edited -version. - -========== - -The proto package converts data structures to and from the -wire format of protocol buffers. It works in concert with the -Go source code generated for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - Helpers for getting values are superseded by the - GetFoo methods and their use is deprecated. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed with the enum's type name. Enum types have - a String method, and a Enum method to assist in message construction. - - Nested groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -When the .proto file specifies `syntax="proto3"`, there are some differences: - - - Non-repeated fields of non-message type are values instead of pointers. - - Enum types do not get an Enum method. - -Consider file test.proto, containing - -```proto - syntax = "proto2"; - package example; - - enum FOO { X = 17; }; - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - } -``` - -To create and play with a Test object from the example package, - -```go - package main - - import ( - "log" - - "github.com/golang/protobuf/proto" - "path/to/example" - ) - - func main() { - test := &example.Test { - Label: proto.String("hello"), - Type: proto.Int32(17), - Reps: []int64{1, 2, 3}, - Optionalgroup: &example.Test_OptionalGroup { - RequiredField: proto.String("good bye"), - }, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &example.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // etc. - } -``` - -## Parameters ## - -To pass extra parameters to the plugin, use a comma-separated -parameter list separated from the output directory by a colon: - - - protoc --go_out=plugins=grpc,import_path=mypackage:. *.proto - - -- `import_prefix=xxx` - a prefix that is added onto the beginning of - all imports. Useful for things like generating protos in a - subdirectory, or regenerating vendored protobufs in-place. -- `import_path=foo/bar` - used as the package if no input files - declare `go_package`. If it contains slashes, everything up to the - rightmost slash is ignored. -- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to - load. The only plugin in this repo is `grpc`. -- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is - associated with Go package quux/shme. This is subject to the - import_prefix parameter. - -## gRPC Support ## - -If a proto file specifies RPC services, protoc-gen-go can be instructed to -generate code compatible with gRPC (http://www.grpc.io/). To do this, pass -the `plugins` parameter to protoc-gen-go; the usual way is to insert it into -the --go_out argument to protoc: - - protoc --go_out=plugins=grpc:. *.proto - -## Compatibility ## - -The library and the generated code are expected to be stable over time. -However, we reserve the right to make breaking changes without notice for the -following reasons: - -- Security. A security issue in the specification or implementation may come to - light whose resolution requires breaking compatibility. We reserve the right - to address such security issues. -- Unspecified behavior. There are some aspects of the Protocol Buffers - specification that are undefined. Programs that depend on such unspecified - behavior may break in future releases. -- Specification errors or changes. If it becomes necessary to address an - inconsistency, incompleteness, or change in the Protocol Buffers - specification, resolving the issue could affect the meaning or legality of - existing programs. We reserve the right to address such issues, including - updating the implementations. -- Bugs. If the library has a bug that violates the specification, a program - that depends on the buggy behavior may break if the bug is fixed. We reserve - the right to fix such bugs. -- Adding methods or fields to generated structs. These may conflict with field - names that already exist in a schema, causing applications to break. When the - code generator encounters a field in the schema that would collide with a - generated field or method name, the code generator will append an underscore - to the generated field or method name. -- Adding, removing, or changing methods or fields in generated structs that - start with `XXX`. These parts of the generated code are exported out of - necessity, but should not be considered part of the public API. -- Adding, removing, or changing unexported symbols in generated code. - -Any breaking changes outside of these will be announced 6 months in advance to -protobuf@googlegroups.com. - -You should, whenever possible, use generated code created by the `protoc-gen-go` -tool built at the same commit as the `proto` package. The `proto` package -declares package-level constants in the form `ProtoPackageIsVersionX`. -Application code and generated code may depend on one of these constants to -ensure that compilation will fail if the available version of the proto library -is too old. Whenever we make a change to the generated code that requires newer -library support, in the same commit we will increment the version number of the -generated code and declare a new package-level constant whose name incorporates -the latest version number. Removing a compatibility constant is considered a -breaking change and would be subject to the announcement policy stated above. - -The `protoc-gen-go/generator` package exposes a plugin interface, -which is used by the gRPC code generation. This interface is not -supported and is subject to incompatible changes without notice. diff --git a/vendor/github.com/golang/protobuf/proto/Makefile b/vendor/github.com/golang/protobuf/proto/Makefile deleted file mode 100644 index e2e0651a9..000000000 --- a/vendor/github.com/golang/protobuf/proto/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -install: - go install - -test: install generate-test-pbs - go test - - -generate-test-pbs: - make install - make -C testdata - protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto - make diff --git a/vendor/github.com/golang/protobuf/proto/all_test.go b/vendor/github.com/golang/protobuf/proto/all_test.go deleted file mode 100644 index 41451a407..000000000 --- a/vendor/github.com/golang/protobuf/proto/all_test.go +++ /dev/null @@ -1,2278 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "math/rand" - "reflect" - "runtime/debug" - "strings" - "testing" - "time" - - . "github.com/golang/protobuf/proto" - . "github.com/golang/protobuf/proto/testdata" -) - -var globalO *Buffer - -func old() *Buffer { - if globalO == nil { - globalO = NewBuffer(nil) - } - globalO.Reset() - return globalO -} - -func equalbytes(b1, b2 []byte, t *testing.T) { - if len(b1) != len(b2) { - t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) - return - } - for i := 0; i < len(b1); i++ { - if b1[i] != b2[i] { - t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) - } - } -} - -func initGoTestField() *GoTestField { - f := new(GoTestField) - f.Label = String("label") - f.Type = String("type") - return f -} - -// These are all structurally equivalent but the tag numbers differ. -// (It's remarkable that required, optional, and repeated all have -// 8 letters.) -func initGoTest_RequiredGroup() *GoTest_RequiredGroup { - return &GoTest_RequiredGroup{ - RequiredField: String("required"), - } -} - -func initGoTest_OptionalGroup() *GoTest_OptionalGroup { - return &GoTest_OptionalGroup{ - RequiredField: String("optional"), - } -} - -func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { - return &GoTest_RepeatedGroup{ - RequiredField: String("repeated"), - } -} - -func initGoTest(setdefaults bool) *GoTest { - pb := new(GoTest) - if setdefaults { - pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) - pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) - pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) - pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) - pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) - pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) - pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) - pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) - pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) - pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) - pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted - pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) - pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) - } - - pb.Kind = GoTest_TIME.Enum() - pb.RequiredField = initGoTestField() - pb.F_BoolRequired = Bool(true) - pb.F_Int32Required = Int32(3) - pb.F_Int64Required = Int64(6) - pb.F_Fixed32Required = Uint32(32) - pb.F_Fixed64Required = Uint64(64) - pb.F_Uint32Required = Uint32(3232) - pb.F_Uint64Required = Uint64(6464) - pb.F_FloatRequired = Float32(3232) - pb.F_DoubleRequired = Float64(6464) - pb.F_StringRequired = String("string") - pb.F_BytesRequired = []byte("bytes") - pb.F_Sint32Required = Int32(-32) - pb.F_Sint64Required = Int64(-64) - pb.Requiredgroup = initGoTest_RequiredGroup() - - return pb -} - -func fail(msg string, b *bytes.Buffer, s string, t *testing.T) { - data := b.Bytes() - ld := len(data) - ls := len(s) / 2 - - fmt.Printf("fail %s ld=%d ls=%d\n", msg, ld, ls) - - // find the interesting spot - n - n := ls - if ld < ls { - n = ld - } - j := 0 - for i := 0; i < n; i++ { - bs := hex(s[j])*16 + hex(s[j+1]) - j += 2 - if data[i] == bs { - continue - } - n = i - break - } - l := n - 10 - if l < 0 { - l = 0 - } - h := n + 10 - - // find the interesting spot - n - fmt.Printf("is[%d]:", l) - for i := l; i < h; i++ { - if i >= ld { - fmt.Printf(" --") - continue - } - fmt.Printf(" %.2x", data[i]) - } - fmt.Printf("\n") - - fmt.Printf("sb[%d]:", l) - for i := l; i < h; i++ { - if i >= ls { - fmt.Printf(" --") - continue - } - bs := hex(s[j])*16 + hex(s[j+1]) - j += 2 - fmt.Printf(" %.2x", bs) - } - fmt.Printf("\n") - - t.Fail() - - // t.Errorf("%s: \ngood: %s\nbad: %x", msg, s, b.Bytes()) - // Print the output in a partially-decoded format; can - // be helpful when updating the test. It produces the output - // that is pasted, with minor edits, into the argument to verify(). - // data := b.Bytes() - // nesting := 0 - // for b.Len() > 0 { - // start := len(data) - b.Len() - // var u uint64 - // u, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on varint:", err) - // return - // } - // wire := u & 0x7 - // tag := u >> 3 - // switch wire { - // case WireVarint: - // v, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on varint:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireFixed32: - // v, err := DecodeFixed32(b) - // if err != nil { - // fmt.Printf("decode error on fixed32:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireFixed64: - // v, err := DecodeFixed64(b) - // if err != nil { - // fmt.Printf("decode error on fixed64:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" // field %d, encoding %d, value %d\n", - // data[start:len(data)-b.Len()], tag, wire, v) - // case WireBytes: - // nb, err := DecodeVarint(b) - // if err != nil { - // fmt.Printf("decode error on bytes:", err) - // return - // } - // after_tag := len(data) - b.Len() - // str := make([]byte, nb) - // _, err = b.Read(str) - // if err != nil { - // fmt.Printf("decode error on bytes:", err) - // return - // } - // fmt.Printf("\t\t\"%x\" \"%x\" // field %d, encoding %d (FIELD)\n", - // data[start:after_tag], str, tag, wire) - // case WireStartGroup: - // nesting++ - // fmt.Printf("\t\t\"%x\"\t\t// start group field %d level %d\n", - // data[start:len(data)-b.Len()], tag, nesting) - // case WireEndGroup: - // fmt.Printf("\t\t\"%x\"\t\t// end group field %d level %d\n", - // data[start:len(data)-b.Len()], tag, nesting) - // nesting-- - // default: - // fmt.Printf("unrecognized wire type %d\n", wire) - // return - // } - // } -} - -func hex(c uint8) uint8 { - if '0' <= c && c <= '9' { - return c - '0' - } - if 'a' <= c && c <= 'f' { - return 10 + c - 'a' - } - if 'A' <= c && c <= 'F' { - return 10 + c - 'A' - } - return 0 -} - -func equal(b []byte, s string, t *testing.T) bool { - if 2*len(b) != len(s) { - // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) - fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) - return false - } - for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { - x := hex(s[j])*16 + hex(s[j+1]) - if b[i] != x { - // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) - fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) - return false - } - } - return true -} - -func overify(t *testing.T, pb *GoTest, expected string) { - o := old() - err := o.Marshal(pb) - if err != nil { - fmt.Printf("overify marshal-1 err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("expected = %s", expected) - } - if !equal(o.Bytes(), expected, t) { - o.DebugPrint("overify neq 1", o.Bytes()) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = o.Unmarshal(pbd) - if err != nil { - t.Fatalf("overify unmarshal err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("string = %s", expected) - } - o.Reset() - err = o.Marshal(pbd) - if err != nil { - t.Errorf("overify marshal-2 err = %v", err) - o.DebugPrint("", o.Bytes()) - t.Fatalf("string = %s", expected) - } - if !equal(o.Bytes(), expected, t) { - o.DebugPrint("overify neq 2", o.Bytes()) - t.Fatalf("string = %s", expected) - } -} - -// Simple tests for numeric encode/decode primitives (varint, etc.) -func TestNumericPrimitives(t *testing.T) { - for i := uint64(0); i < 1e6; i += 111 { - o := old() - if o.EncodeVarint(i) != nil { - t.Error("EncodeVarint") - break - } - x, e := o.DecodeVarint() - if e != nil { - t.Fatal("DecodeVarint") - } - if x != i { - t.Fatal("varint decode fail:", i, x) - } - - o = old() - if o.EncodeFixed32(i) != nil { - t.Fatal("encFixed32") - } - x, e = o.DecodeFixed32() - if e != nil { - t.Fatal("decFixed32") - } - if x != i { - t.Fatal("fixed32 decode fail:", i, x) - } - - o = old() - if o.EncodeFixed64(i*1234567) != nil { - t.Error("encFixed64") - break - } - x, e = o.DecodeFixed64() - if e != nil { - t.Error("decFixed64") - break - } - if x != i*1234567 { - t.Error("fixed64 decode fail:", i*1234567, x) - break - } - - o = old() - i32 := int32(i - 12345) - if o.EncodeZigzag32(uint64(i32)) != nil { - t.Fatal("EncodeZigzag32") - } - x, e = o.DecodeZigzag32() - if e != nil { - t.Fatal("DecodeZigzag32") - } - if x != uint64(uint32(i32)) { - t.Fatal("zigzag32 decode fail:", i32, x) - } - - o = old() - i64 := int64(i - 12345) - if o.EncodeZigzag64(uint64(i64)) != nil { - t.Fatal("EncodeZigzag64") - } - x, e = o.DecodeZigzag64() - if e != nil { - t.Fatal("DecodeZigzag64") - } - if x != uint64(i64) { - t.Fatal("zigzag64 decode fail:", i64, x) - } - } -} - -// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. -type fakeMarshaler struct { - b []byte - err error -} - -func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } -func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } -func (f *fakeMarshaler) ProtoMessage() {} -func (f *fakeMarshaler) Reset() {} - -type msgWithFakeMarshaler struct { - M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` -} - -func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } -func (m *msgWithFakeMarshaler) ProtoMessage() {} -func (m *msgWithFakeMarshaler) Reset() {} - -// Simple tests for proto messages that implement the Marshaler interface. -func TestMarshalerEncoding(t *testing.T) { - tests := []struct { - name string - m Message - want []byte - errType reflect.Type - }{ - { - name: "Marshaler that fails", - m: &fakeMarshaler{ - err: errors.New("some marshal err"), - b: []byte{5, 6, 7}, - }, - // Since the Marshal method returned bytes, they should be written to the - // buffer. (For efficiency, we assume that Marshal implementations are - // always correct w.r.t. RequiredNotSetError and output.) - want: []byte{5, 6, 7}, - errType: reflect.TypeOf(errors.New("some marshal err")), - }, - { - name: "Marshaler that fails with RequiredNotSetError", - m: &msgWithFakeMarshaler{ - M: &fakeMarshaler{ - err: &RequiredNotSetError{}, - b: []byte{5, 6, 7}, - }, - }, - // Since there's an error that can be continued after, - // the buffer should be written. - want: []byte{ - 10, 3, // for &msgWithFakeMarshaler - 5, 6, 7, // for &fakeMarshaler - }, - errType: reflect.TypeOf(&RequiredNotSetError{}), - }, - { - name: "Marshaler that succeeds", - m: &fakeMarshaler{ - b: []byte{0, 1, 2, 3, 4, 127, 255}, - }, - want: []byte{0, 1, 2, 3, 4, 127, 255}, - }, - } - for _, test := range tests { - b := NewBuffer(nil) - err := b.Marshal(test.m) - if reflect.TypeOf(err) != test.errType { - t.Errorf("%s: got err %T(%v) wanted %T", test.name, err, err, test.errType) - } - if !reflect.DeepEqual(test.want, b.Bytes()) { - t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) - } - if size := Size(test.m); size != len(b.Bytes()) { - t.Errorf("%s: Size(_) = %v, but marshaled to %v bytes", test.name, size, len(b.Bytes())) - } - - m, mErr := Marshal(test.m) - if !bytes.Equal(b.Bytes(), m) { - t.Errorf("%s: Marshal returned %v, but (*Buffer).Marshal wrote %v", test.name, m, b.Bytes()) - } - if !reflect.DeepEqual(err, mErr) { - t.Errorf("%s: Marshal err = %q, but (*Buffer).Marshal returned %q", - test.name, fmt.Sprint(mErr), fmt.Sprint(err)) - } - } -} - -// Simple tests for bytes -func TestBytesPrimitives(t *testing.T) { - o := old() - bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} - if o.EncodeRawBytes(bytes) != nil { - t.Error("EncodeRawBytes") - } - decb, e := o.DecodeRawBytes(false) - if e != nil { - t.Error("DecodeRawBytes") - } - equalbytes(bytes, decb, t) -} - -// Simple tests for strings -func TestStringPrimitives(t *testing.T) { - o := old() - s := "now is the time" - if o.EncodeStringBytes(s) != nil { - t.Error("enc_string") - } - decs, e := o.DecodeStringBytes() - if e != nil { - t.Error("dec_string") - } - if s != decs { - t.Error("string encode/decode fail:", s, decs) - } -} - -// Do we catch the "required bit not set" case? -func TestRequiredBit(t *testing.T) { - o := old() - pb := new(GoTest) - err := o.Marshal(pb) - if err == nil { - t.Error("did not catch missing required fields") - } else if strings.Index(err.Error(), "Kind") < 0 { - t.Error("wrong error type:", err) - } -} - -// Check that all fields are nil. -// Clearly silly, and a residue from a more interesting test with an earlier, -// different initialization property, but it once caught a compiler bug so -// it lives. -func checkInitialized(pb *GoTest, t *testing.T) { - if pb.F_BoolDefaulted != nil { - t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) - } - if pb.F_Int32Defaulted != nil { - t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) - } - if pb.F_Int64Defaulted != nil { - t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) - } - if pb.F_Fixed32Defaulted != nil { - t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) - } - if pb.F_Fixed64Defaulted != nil { - t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) - } - if pb.F_Uint32Defaulted != nil { - t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) - } - if pb.F_Uint64Defaulted != nil { - t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) - } - if pb.F_FloatDefaulted != nil { - t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) - } - if pb.F_DoubleDefaulted != nil { - t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) - } - if pb.F_StringDefaulted != nil { - t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) - } - if pb.F_BytesDefaulted != nil { - t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) - } - if pb.F_Sint32Defaulted != nil { - t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) - } - if pb.F_Sint64Defaulted != nil { - t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) - } -} - -// Does Reset() reset? -func TestReset(t *testing.T) { - pb := initGoTest(true) - // muck with some values - pb.F_BoolDefaulted = Bool(false) - pb.F_Int32Defaulted = Int32(237) - pb.F_Int64Defaulted = Int64(12346) - pb.F_Fixed32Defaulted = Uint32(32000) - pb.F_Fixed64Defaulted = Uint64(666) - pb.F_Uint32Defaulted = Uint32(323232) - pb.F_Uint64Defaulted = nil - pb.F_FloatDefaulted = nil - pb.F_DoubleDefaulted = Float64(0) - pb.F_StringDefaulted = String("gotcha") - pb.F_BytesDefaulted = []byte("asdfasdf") - pb.F_Sint32Defaulted = Int32(123) - pb.F_Sint64Defaulted = Int64(789) - pb.Reset() - checkInitialized(pb, t) -} - -// All required fields set, no defaults provided. -func TestEncodeDecode1(t *testing.T) { - pb := initGoTest(false) - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 0x20 - "714000000000000000"+ // field 14, encoding 1, value 0x40 - "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 - "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" - "b304"+ // field 70, encoding 3, start group - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // field 70, encoding 4, end group - "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f") // field 103, encoding 0, 0x7f zigzag64 -} - -// All required fields set, defaults provided. -func TestEncodeDecode2(t *testing.T) { - pb := initGoTest(true) - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All default fields set to their default value by hand -func TestEncodeDecode3(t *testing.T) { - pb := initGoTest(false) - pb.F_BoolDefaulted = Bool(true) - pb.F_Int32Defaulted = Int32(32) - pb.F_Int64Defaulted = Int64(64) - pb.F_Fixed32Defaulted = Uint32(320) - pb.F_Fixed64Defaulted = Uint64(640) - pb.F_Uint32Defaulted = Uint32(3200) - pb.F_Uint64Defaulted = Uint64(6400) - pb.F_FloatDefaulted = Float32(314159) - pb.F_DoubleDefaulted = Float64(271828) - pb.F_StringDefaulted = String("hello, \"world!\"\n") - pb.F_BytesDefaulted = []byte("Bignose") - pb.F_Sint32Defaulted = Int32(-32) - pb.F_Sint64Defaulted = Int64(-64) - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, defaults provided, all non-defaulted optional fields have values. -func TestEncodeDecode4(t *testing.T) { - pb := initGoTest(true) - pb.Table = String("hello") - pb.Param = Int32(7) - pb.OptionalField = initGoTestField() - pb.F_BoolOptional = Bool(true) - pb.F_Int32Optional = Int32(32) - pb.F_Int64Optional = Int64(64) - pb.F_Fixed32Optional = Uint32(3232) - pb.F_Fixed64Optional = Uint64(6464) - pb.F_Uint32Optional = Uint32(323232) - pb.F_Uint64Optional = Uint64(646464) - pb.F_FloatOptional = Float32(32.) - pb.F_DoubleOptional = Float64(64.) - pb.F_StringOptional = String("hello") - pb.F_BytesOptional = []byte("Bignose") - pb.F_Sint32Optional = Int32(-32) - pb.F_Sint64Optional = Int64(-64) - pb.Optionalgroup = initGoTest_OptionalGroup() - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" - "1807"+ // field 3, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "f00101"+ // field 30, encoding 0, value 1 - "f80120"+ // field 31, encoding 0, value 32 - "800240"+ // field 32, encoding 0, value 64 - "8d02a00c0000"+ // field 33, encoding 5, value 3232 - "91024019000000000000"+ // field 34, encoding 1, value 6464 - "9802a0dd13"+ // field 35, encoding 0, value 323232 - "a002c0ba27"+ // field 36, encoding 0, value 646464 - "ad0200000042"+ // field 37, encoding 5, value 32.0 - "b1020000000000005040"+ // field 38, encoding 1, value 64.0 - "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "d305"+ // start group field 90 level 1 - "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" - "d405"+ // end group field 90 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" - "f0123f"+ // field 302, encoding 0, value 63 - "f8127f"+ // field 303, encoding 0, value 127 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, defaults provided, all repeated fields given two values. -func TestEncodeDecode5(t *testing.T) { - pb := initGoTest(true) - pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} - pb.F_BoolRepeated = []bool{false, true} - pb.F_Int32Repeated = []int32{32, 33} - pb.F_Int64Repeated = []int64{64, 65} - pb.F_Fixed32Repeated = []uint32{3232, 3333} - pb.F_Fixed64Repeated = []uint64{6464, 6565} - pb.F_Uint32Repeated = []uint32{323232, 333333} - pb.F_Uint64Repeated = []uint64{646464, 656565} - pb.F_FloatRepeated = []float32{32., 33.} - pb.F_DoubleRepeated = []float64{64., 65.} - pb.F_StringRepeated = []string{"hello", "sailor"} - pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} - pb.F_Sint32Repeated = []int32{32, -32} - pb.F_Sint64Repeated = []int64{64, -64} - pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) - "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "a00100"+ // field 20, encoding 0, value 0 - "a00101"+ // field 20, encoding 0, value 1 - "a80120"+ // field 21, encoding 0, value 32 - "a80121"+ // field 21, encoding 0, value 33 - "b00140"+ // field 22, encoding 0, value 64 - "b00141"+ // field 22, encoding 0, value 65 - "bd01a00c0000"+ // field 23, encoding 5, value 3232 - "bd01050d0000"+ // field 23, encoding 5, value 3333 - "c1014019000000000000"+ // field 24, encoding 1, value 6464 - "c101a519000000000000"+ // field 24, encoding 1, value 6565 - "c801a0dd13"+ // field 25, encoding 0, value 323232 - "c80195ac14"+ // field 25, encoding 0, value 333333 - "d001c0ba27"+ // field 26, encoding 0, value 646464 - "d001b58928"+ // field 26, encoding 0, value 656565 - "dd0100000042"+ // field 27, encoding 5, value 32.0 - "dd0100000442"+ // field 27, encoding 5, value 33.0 - "e1010000000000005040"+ // field 28, encoding 1, value 64.0 - "e1010000000000405040"+ // field 28, encoding 1, value 65.0 - "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" - "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" - "c00201"+ // field 40, encoding 0, value 1 - "c80220"+ // field 41, encoding 0, value 32 - "d00240"+ // field 42, encoding 0, value 64 - "dd0240010000"+ // field 43, encoding 5, value 320 - "e1028002000000000000"+ // field 44, encoding 1, value 640 - "e8028019"+ // field 45, encoding 0, value 3200 - "f0028032"+ // field 46, encoding 0, value 6400 - "fd02e0659948"+ // field 47, encoding 5, value 314159.0 - "81030000000050971041"+ // field 48, encoding 1, value 271828.0 - "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "8305"+ // start group field 80 level 1 - "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" - "8405"+ // end group field 80 level 1 - "8305"+ // start group field 80 level 1 - "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" - "8405"+ // end group field 80 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "ca0c03"+"626967"+ // field 201, encoding 2, string "big" - "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" - "d00c40"+ // field 202, encoding 0, value 32 - "d00c3f"+ // field 202, encoding 0, value -32 - "d80c8001"+ // field 203, encoding 0, value 64 - "d80c7f"+ // field 203, encoding 0, value -64 - "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" - "90193f"+ // field 402, encoding 0, value 63 - "98197f") // field 403, encoding 0, value 127 - -} - -// All required fields set, all packed repeated fields given two values. -func TestEncodeDecode6(t *testing.T) { - pb := initGoTest(false) - pb.F_BoolRepeatedPacked = []bool{false, true} - pb.F_Int32RepeatedPacked = []int32{32, 33} - pb.F_Int64RepeatedPacked = []int64{64, 65} - pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} - pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} - pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} - pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} - pb.F_FloatRepeatedPacked = []float32{32., 33.} - pb.F_DoubleRepeatedPacked = []float64{64., 65.} - pb.F_Sint32RepeatedPacked = []int32{32, -32} - pb.F_Sint64RepeatedPacked = []int64{64, -64} - - overify(t, pb, - "0807"+ // field 1, encoding 0, value 7 - "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) - "5001"+ // field 10, encoding 0, value 1 - "5803"+ // field 11, encoding 0, value 3 - "6006"+ // field 12, encoding 0, value 6 - "6d20000000"+ // field 13, encoding 5, value 32 - "714000000000000000"+ // field 14, encoding 1, value 64 - "78a019"+ // field 15, encoding 0, value 3232 - "8001c032"+ // field 16, encoding 0, value 6464 - "8d0100004a45"+ // field 17, encoding 5, value 3232.0 - "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 - "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" - "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 - "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 - "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 - "aa0308"+ // field 53, encoding 2, 8 bytes - "a00c0000050d0000"+ // value 3232, value 3333 - "b20310"+ // field 54, encoding 2, 16 bytes - "4019000000000000a519000000000000"+ // value 6464, value 6565 - "ba0306"+ // field 55, encoding 2, 6 bytes - "a0dd1395ac14"+ // value 323232, value 333333 - "c20306"+ // field 56, encoding 2, 6 bytes - "c0ba27b58928"+ // value 646464, value 656565 - "ca0308"+ // field 57, encoding 2, 8 bytes - "0000004200000442"+ // value 32.0, value 33.0 - "d20310"+ // field 58, encoding 2, 16 bytes - "00000000000050400000000000405040"+ // value 64.0, value 65.0 - "b304"+ // start group field 70 level 1 - "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" - "b404"+ // end group field 70 level 1 - "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" - "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 - "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 - "b21f02"+ // field 502, encoding 2, 2 bytes - "403f"+ // value 32, value -32 - "ba1f03"+ // field 503, encoding 2, 3 bytes - "80017f") // value 64, value -64 -} - -// Test that we can encode empty bytes fields. -func TestEncodeDecodeBytes1(t *testing.T) { - pb := initGoTest(false) - - // Create our bytes - pb.F_BytesRequired = []byte{} - pb.F_BytesRepeated = [][]byte{{}} - pb.F_BytesOptional = []byte{} - - d, err := Marshal(pb) - if err != nil { - t.Error(err) - } - - pbd := new(GoTest) - if err := Unmarshal(d, pbd); err != nil { - t.Error(err) - } - - if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { - t.Error("required empty bytes field is incorrect") - } - if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { - t.Error("repeated empty bytes field is incorrect") - } - if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { - t.Error("optional empty bytes field is incorrect") - } -} - -// Test that we encode nil-valued fields of a repeated bytes field correctly. -// Since entries in a repeated field cannot be nil, nil must mean empty value. -func TestEncodeDecodeBytes2(t *testing.T) { - pb := initGoTest(false) - - // Create our bytes - pb.F_BytesRepeated = [][]byte{nil} - - d, err := Marshal(pb) - if err != nil { - t.Error(err) - } - - pbd := new(GoTest) - if err := Unmarshal(d, pbd); err != nil { - t.Error(err) - } - - if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { - t.Error("Unexpected value for repeated bytes field") - } -} - -// All required fields set, defaults provided, all repeated fields given two values. -func TestSkippingUnrecognizedFields(t *testing.T) { - o := old() - pb := initGoTestField() - - // Marshal it normally. - o.Marshal(pb) - - // Now new a GoSkipTest record. - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - // Marshal it into same buffer. - o.Marshal(skip) - - pbd := new(GoTestField) - o.Unmarshal(pbd) - - // The __unrecognized field should be a marshaling of GoSkipTest - skipd := new(GoSkipTest) - - o.SetBuf(pbd.XXX_unrecognized) - o.Unmarshal(skipd) - - if *skipd.SkipInt32 != *skip.SkipInt32 { - t.Error("skip int32", skipd.SkipInt32) - } - if *skipd.SkipFixed32 != *skip.SkipFixed32 { - t.Error("skip fixed32", skipd.SkipFixed32) - } - if *skipd.SkipFixed64 != *skip.SkipFixed64 { - t.Error("skip fixed64", skipd.SkipFixed64) - } - if *skipd.SkipString != *skip.SkipString { - t.Error("skip string", *skipd.SkipString) - } - if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { - t.Error("skip group int32", skipd.Skipgroup.GroupInt32) - } - if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { - t.Error("skip group string", *skipd.Skipgroup.GroupString) - } -} - -// Check that unrecognized fields of a submessage are preserved. -func TestSubmessageUnrecognizedFields(t *testing.T) { - nm := &NewMessage{ - Nested: &NewMessage_Nested{ - Name: String("Nigel"), - FoodGroup: String("carbs"), - }, - } - b, err := Marshal(nm) - if err != nil { - t.Fatalf("Marshal of NewMessage: %v", err) - } - - // Unmarshal into an OldMessage. - om := new(OldMessage) - if err := Unmarshal(b, om); err != nil { - t.Fatalf("Unmarshal to OldMessage: %v", err) - } - exp := &OldMessage{ - Nested: &OldMessage_Nested{ - Name: String("Nigel"), - // normal protocol buffer users should not do this - XXX_unrecognized: []byte("\x12\x05carbs"), - }, - } - if !Equal(om, exp) { - t.Errorf("om = %v, want %v", om, exp) - } - - // Clone the OldMessage. - om = Clone(om).(*OldMessage) - if !Equal(om, exp) { - t.Errorf("Clone(om) = %v, want %v", om, exp) - } - - // Marshal the OldMessage, then unmarshal it into an empty NewMessage. - if b, err = Marshal(om); err != nil { - t.Fatalf("Marshal of OldMessage: %v", err) - } - t.Logf("Marshal(%v) -> %q", om, b) - nm2 := new(NewMessage) - if err := Unmarshal(b, nm2); err != nil { - t.Fatalf("Unmarshal to NewMessage: %v", err) - } - if !Equal(nm, nm2) { - t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) - } -} - -// Check that an int32 field can be upgraded to an int64 field. -func TestNegativeInt32(t *testing.T) { - om := &OldMessage{ - Num: Int32(-1), - } - b, err := Marshal(om) - if err != nil { - t.Fatalf("Marshal of OldMessage: %v", err) - } - - // Check the size. It should be 11 bytes; - // 1 for the field/wire type, and 10 for the negative number. - if len(b) != 11 { - t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) - } - - // Unmarshal into a NewMessage. - nm := new(NewMessage) - if err := Unmarshal(b, nm); err != nil { - t.Fatalf("Unmarshal to NewMessage: %v", err) - } - want := &NewMessage{ - Num: Int64(-1), - } - if !Equal(nm, want) { - t.Errorf("nm = %v, want %v", nm, want) - } -} - -// Check that we can grow an array (repeated field) to have many elements. -// This test doesn't depend only on our encoding; for variety, it makes sure -// we create, encode, and decode the correct contents explicitly. It's therefore -// a bit messier. -// This test also uses (and hence tests) the Marshal/Unmarshal functions -// instead of the methods. -func TestBigRepeated(t *testing.T) { - pb := initGoTest(true) - - // Create the arrays - const N = 50 // Internally the library starts much smaller. - pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) - pb.F_Sint64Repeated = make([]int64, N) - pb.F_Sint32Repeated = make([]int32, N) - pb.F_BytesRepeated = make([][]byte, N) - pb.F_StringRepeated = make([]string, N) - pb.F_DoubleRepeated = make([]float64, N) - pb.F_FloatRepeated = make([]float32, N) - pb.F_Uint64Repeated = make([]uint64, N) - pb.F_Uint32Repeated = make([]uint32, N) - pb.F_Fixed64Repeated = make([]uint64, N) - pb.F_Fixed32Repeated = make([]uint32, N) - pb.F_Int64Repeated = make([]int64, N) - pb.F_Int32Repeated = make([]int32, N) - pb.F_BoolRepeated = make([]bool, N) - pb.RepeatedField = make([]*GoTestField, N) - - // Fill in the arrays with checkable values. - igtf := initGoTestField() - igtrg := initGoTest_RepeatedGroup() - for i := 0; i < N; i++ { - pb.Repeatedgroup[i] = igtrg - pb.F_Sint64Repeated[i] = int64(i) - pb.F_Sint32Repeated[i] = int32(i) - s := fmt.Sprint(i) - pb.F_BytesRepeated[i] = []byte(s) - pb.F_StringRepeated[i] = s - pb.F_DoubleRepeated[i] = float64(i) - pb.F_FloatRepeated[i] = float32(i) - pb.F_Uint64Repeated[i] = uint64(i) - pb.F_Uint32Repeated[i] = uint32(i) - pb.F_Fixed64Repeated[i] = uint64(i) - pb.F_Fixed32Repeated[i] = uint32(i) - pb.F_Int64Repeated[i] = int64(i) - pb.F_Int32Repeated[i] = int32(i) - pb.F_BoolRepeated[i] = i%2 == 0 - pb.RepeatedField[i] = igtf - } - - // Marshal. - buf, _ := Marshal(pb) - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - Unmarshal(buf, pbd) - - // Check the checkable values - for i := uint64(0); i < N; i++ { - if pbd.Repeatedgroup[i] == nil { // TODO: more checking? - t.Error("pbd.Repeatedgroup bad") - } - var x uint64 - x = uint64(pbd.F_Sint64Repeated[i]) - if x != i { - t.Error("pbd.F_Sint64Repeated bad", x, i) - } - x = uint64(pbd.F_Sint32Repeated[i]) - if x != i { - t.Error("pbd.F_Sint32Repeated bad", x, i) - } - s := fmt.Sprint(i) - equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) - if pbd.F_StringRepeated[i] != s { - t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) - } - x = uint64(pbd.F_DoubleRepeated[i]) - if x != i { - t.Error("pbd.F_DoubleRepeated bad", x, i) - } - x = uint64(pbd.F_FloatRepeated[i]) - if x != i { - t.Error("pbd.F_FloatRepeated bad", x, i) - } - x = pbd.F_Uint64Repeated[i] - if x != i { - t.Error("pbd.F_Uint64Repeated bad", x, i) - } - x = uint64(pbd.F_Uint32Repeated[i]) - if x != i { - t.Error("pbd.F_Uint32Repeated bad", x, i) - } - x = pbd.F_Fixed64Repeated[i] - if x != i { - t.Error("pbd.F_Fixed64Repeated bad", x, i) - } - x = uint64(pbd.F_Fixed32Repeated[i]) - if x != i { - t.Error("pbd.F_Fixed32Repeated bad", x, i) - } - x = uint64(pbd.F_Int64Repeated[i]) - if x != i { - t.Error("pbd.F_Int64Repeated bad", x, i) - } - x = uint64(pbd.F_Int32Repeated[i]) - if x != i { - t.Error("pbd.F_Int32Repeated bad", x, i) - } - if pbd.F_BoolRepeated[i] != (i%2 == 0) { - t.Error("pbd.F_BoolRepeated bad", x, i) - } - if pbd.RepeatedField[i] == nil { // TODO: more checking? - t.Error("pbd.RepeatedField bad") - } - } -} - -// Verify we give a useful message when decoding to the wrong structure type. -func TestTypeMismatch(t *testing.T) { - pb1 := initGoTest(true) - - // Marshal - o := old() - o.Marshal(pb1) - - // Now Unmarshal it to the wrong type. - pb2 := initGoTestField() - err := o.Unmarshal(pb2) - if err == nil { - t.Error("expected error, got no error") - } else if !strings.Contains(err.Error(), "bad wiretype") { - t.Error("expected bad wiretype error, got", err) - } -} - -func encodeDecode(t *testing.T, in, out Message, msg string) { - buf, err := Marshal(in) - if err != nil { - t.Fatalf("failed marshaling %v: %v", msg, err) - } - if err := Unmarshal(buf, out); err != nil { - t.Fatalf("failed unmarshaling %v: %v", msg, err) - } -} - -func TestPackedNonPackedDecoderSwitching(t *testing.T) { - np, p := new(NonPackedTest), new(PackedTest) - - // non-packed -> packed - np.A = []int32{0, 1, 1, 2, 3, 5} - encodeDecode(t, np, p, "non-packed -> packed") - if !reflect.DeepEqual(np.A, p.B) { - t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) - } - - // packed -> non-packed - np.Reset() - p.B = []int32{3, 1, 4, 1, 5, 9} - encodeDecode(t, p, np, "packed -> non-packed") - if !reflect.DeepEqual(p.B, np.A) { - t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) - } -} - -func TestProto1RepeatedGroup(t *testing.T) { - pb := &MessageList{ - Message: []*MessageList_Message{ - { - Name: String("blah"), - Count: Int32(7), - }, - // NOTE: pb.Message[1] is a nil - nil, - }, - } - - o := old() - err := o.Marshal(pb) - if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { - t.Fatalf("unexpected or no error when marshaling: %v", err) - } -} - -// Test that enums work. Checks for a bug introduced by making enums -// named types instead of int32: newInt32FromUint64 would crash with -// a type mismatch in reflect.PointTo. -func TestEnum(t *testing.T) { - pb := new(GoEnum) - pb.Foo = FOO_FOO1.Enum() - o := old() - if err := o.Marshal(pb); err != nil { - t.Fatal("error encoding enum:", err) - } - pb1 := new(GoEnum) - if err := o.Unmarshal(pb1); err != nil { - t.Fatal("error decoding enum:", err) - } - if *pb1.Foo != FOO_FOO1 { - t.Error("expected 7 but got ", *pb1.Foo) - } -} - -// Enum types have String methods. Check that enum fields can be printed. -// We don't care what the value actually is, just as long as it doesn't crash. -func TestPrintingNilEnumFields(t *testing.T) { - pb := new(GoEnum) - _ = fmt.Sprintf("%+v", pb) -} - -// Verify that absent required fields cause Marshal/Unmarshal to return errors. -func TestRequiredFieldEnforcement(t *testing.T) { - pb := new(GoTestField) - _, err := Marshal(pb) - if err == nil { - t.Error("marshal: expected error, got nil") - } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Label") { - t.Errorf("marshal: bad error type: %v", err) - } - - // A slightly sneaky, yet valid, proto. It encodes the same required field twice, - // so simply counting the required fields is insufficient. - // field 1, encoding 2, value "hi" - buf := []byte("\x0A\x02hi\x0A\x02hi") - err = Unmarshal(buf, pb) - if err == nil { - t.Error("unmarshal: expected error, got nil") - } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "{Unknown}") { - t.Errorf("unmarshal: bad error type: %v", err) - } -} - -// Verify that absent required fields in groups cause Marshal/Unmarshal to return errors. -func TestRequiredFieldEnforcementGroups(t *testing.T) { - pb := &GoTestRequiredGroupField{Group: &GoTestRequiredGroupField_Group{}} - if _, err := Marshal(pb); err == nil { - t.Error("marshal: expected error, got nil") - } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") { - t.Errorf("marshal: bad error type: %v", err) - } - - buf := []byte{11, 12} - if err := Unmarshal(buf, pb); err == nil { - t.Error("unmarshal: expected error, got nil") - } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.{Unknown}") { - t.Errorf("unmarshal: bad error type: %v", err) - } -} - -func TestTypedNilMarshal(t *testing.T) { - // A typed nil should return ErrNil and not crash. - { - var m *GoEnum - if _, err := Marshal(m); err != ErrNil { - t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err) - } - } - - { - m := &Communique{Union: &Communique_Msg{nil}} - if _, err := Marshal(m); err == nil || err == ErrNil { - t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, err) - } - } -} - -// A type that implements the Marshaler interface, but is not nillable. -type nonNillableInt uint64 - -func (nni nonNillableInt) Marshal() ([]byte, error) { - return EncodeVarint(uint64(nni)), nil -} - -type NNIMessage struct { - nni nonNillableInt -} - -func (*NNIMessage) Reset() {} -func (*NNIMessage) String() string { return "" } -func (*NNIMessage) ProtoMessage() {} - -// A type that implements the Marshaler interface and is nillable. -type nillableMessage struct { - x uint64 -} - -func (nm *nillableMessage) Marshal() ([]byte, error) { - return EncodeVarint(nm.x), nil -} - -type NMMessage struct { - nm *nillableMessage -} - -func (*NMMessage) Reset() {} -func (*NMMessage) String() string { return "" } -func (*NMMessage) ProtoMessage() {} - -// Verify a type that uses the Marshaler interface, but has a nil pointer. -func TestNilMarshaler(t *testing.T) { - // Try a struct with a Marshaler field that is nil. - // It should be directly marshable. - nmm := new(NMMessage) - if _, err := Marshal(nmm); err != nil { - t.Error("unexpected error marshaling nmm: ", err) - } - - // Try a struct with a Marshaler field that is not nillable. - nnim := new(NNIMessage) - nnim.nni = 7 - var _ Marshaler = nnim.nni // verify it is truly a Marshaler - if _, err := Marshal(nnim); err != nil { - t.Error("unexpected error marshaling nnim: ", err) - } -} - -func TestAllSetDefaults(t *testing.T) { - // Exercise SetDefaults with all scalar field types. - m := &Defaults{ - // NaN != NaN, so override that here. - F_Nan: Float32(1.7), - } - expected := &Defaults{ - F_Bool: Bool(true), - F_Int32: Int32(32), - F_Int64: Int64(64), - F_Fixed32: Uint32(320), - F_Fixed64: Uint64(640), - F_Uint32: Uint32(3200), - F_Uint64: Uint64(6400), - F_Float: Float32(314159), - F_Double: Float64(271828), - F_String: String(`hello, "world!"` + "\n"), - F_Bytes: []byte("Bignose"), - F_Sint32: Int32(-32), - F_Sint64: Int64(-64), - F_Enum: Defaults_GREEN.Enum(), - F_Pinf: Float32(float32(math.Inf(1))), - F_Ninf: Float32(float32(math.Inf(-1))), - F_Nan: Float32(1.7), - StrZero: String(""), - } - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) - } -} - -func TestSetDefaultsWithSetField(t *testing.T) { - // Check that a set value is not overridden. - m := &Defaults{ - F_Int32: Int32(12), - } - SetDefaults(m) - if v := m.GetF_Int32(); v != 12 { - t.Errorf("m.FInt32 = %v, want 12", v) - } -} - -func TestSetDefaultsWithSubMessage(t *testing.T) { - m := &OtherMessage{ - Key: Int64(123), - Inner: &InnerMessage{ - Host: String("gopher"), - }, - } - expected := &OtherMessage{ - Key: Int64(123), - Inner: &InnerMessage{ - Host: String("gopher"), - Port: Int32(4000), - }, - } - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("\n got %v\nwant %v", m, expected) - } -} - -func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { - m := &MyMessage{ - RepInner: []*InnerMessage{{}}, - } - expected := &MyMessage{ - RepInner: []*InnerMessage{{ - Port: Int32(4000), - }}, - } - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("\n got %v\nwant %v", m, expected) - } -} - -func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { - m := &MyMessage{ - Pet: []string{"turtle", "wombat"}, - } - expected := Clone(m) - SetDefaults(m) - if !Equal(m, expected) { - t.Errorf("\n got %v\nwant %v", m, expected) - } -} - -func TestMaximumTagNumber(t *testing.T) { - m := &MaxTag{ - LastField: String("natural goat essence"), - } - buf, err := Marshal(m) - if err != nil { - t.Fatalf("proto.Marshal failed: %v", err) - } - m2 := new(MaxTag) - if err := Unmarshal(buf, m2); err != nil { - t.Fatalf("proto.Unmarshal failed: %v", err) - } - if got, want := m2.GetLastField(), *m.LastField; got != want { - t.Errorf("got %q, want %q", got, want) - } -} - -func TestJSON(t *testing.T) { - m := &MyMessage{ - Count: Int32(4), - Pet: []string{"bunny", "kitty"}, - Inner: &InnerMessage{ - Host: String("cauchy"), - }, - Bikeshed: MyMessage_GREEN.Enum(), - } - const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` - - b, err := json.Marshal(m) - if err != nil { - t.Fatalf("json.Marshal failed: %v", err) - } - s := string(b) - if s != expected { - t.Errorf("got %s\nwant %s", s, expected) - } - - received := new(MyMessage) - if err := json.Unmarshal(b, received); err != nil { - t.Fatalf("json.Unmarshal failed: %v", err) - } - if !Equal(received, m) { - t.Fatalf("got %s, want %s", received, m) - } - - // Test unmarshalling of JSON with symbolic enum name. - const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` - received.Reset() - if err := json.Unmarshal([]byte(old), received); err != nil { - t.Fatalf("json.Unmarshal failed: %v", err) - } - if !Equal(received, m) { - t.Fatalf("got %s, want %s", received, m) - } -} - -func TestBadWireType(t *testing.T) { - b := []byte{7<<3 | 6} // field 7, wire type 6 - pb := new(OtherMessage) - if err := Unmarshal(b, pb); err == nil { - t.Errorf("Unmarshal did not fail") - } else if !strings.Contains(err.Error(), "unknown wire type") { - t.Errorf("wrong error: %v", err) - } -} - -func TestBytesWithInvalidLength(t *testing.T) { - // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. - b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} - Unmarshal(b, new(MyMessage)) -} - -func TestLengthOverflow(t *testing.T) { - // Overflowing a length should not panic. - b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} - Unmarshal(b, new(MyMessage)) -} - -func TestVarintOverflow(t *testing.T) { - // Overflowing a 64-bit length should not be allowed. - b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} - if err := Unmarshal(b, new(MyMessage)); err == nil { - t.Fatalf("Overflowed uint64 length without error") - } -} - -func TestUnmarshalFuzz(t *testing.T) { - const N = 1000 - seed := time.Now().UnixNano() - t.Logf("RNG seed is %d", seed) - rng := rand.New(rand.NewSource(seed)) - buf := make([]byte, 20) - for i := 0; i < N; i++ { - for j := range buf { - buf[j] = byte(rng.Intn(256)) - } - fuzzUnmarshal(t, buf) - } -} - -func TestMergeMessages(t *testing.T) { - pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} - data, err := Marshal(pb) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - pb1 := new(MessageList) - if err := Unmarshal(data, pb1); err != nil { - t.Fatalf("first Unmarshal: %v", err) - } - if err := Unmarshal(data, pb1); err != nil { - t.Fatalf("second Unmarshal: %v", err) - } - if len(pb1.Message) != 1 { - t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) - } - - pb2 := new(MessageList) - if err := UnmarshalMerge(data, pb2); err != nil { - t.Fatalf("first UnmarshalMerge: %v", err) - } - if err := UnmarshalMerge(data, pb2); err != nil { - t.Fatalf("second UnmarshalMerge: %v", err) - } - if len(pb2.Message) != 2 { - t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) - } -} - -func TestExtensionMarshalOrder(t *testing.T) { - m := &MyMessage{Count: Int(123)} - if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { - t.Fatalf("SetExtension: %v", err) - } - if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { - t.Fatalf("SetExtension: %v", err) - } - if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { - t.Fatalf("SetExtension: %v", err) - } - - // Serialize m several times, and check we get the same bytes each time. - var orig []byte - for i := 0; i < 100; i++ { - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - if i == 0 { - orig = b - continue - } - if !bytes.Equal(b, orig) { - t.Errorf("Bytes differ on attempt #%d", i) - } - } -} - -// Many extensions, because small maps might not iterate differently on each iteration. -var exts = []*ExtensionDesc{ - E_X201, - E_X202, - E_X203, - E_X204, - E_X205, - E_X206, - E_X207, - E_X208, - E_X209, - E_X210, - E_X211, - E_X212, - E_X213, - E_X214, - E_X215, - E_X216, - E_X217, - E_X218, - E_X219, - E_X220, - E_X221, - E_X222, - E_X223, - E_X224, - E_X225, - E_X226, - E_X227, - E_X228, - E_X229, - E_X230, - E_X231, - E_X232, - E_X233, - E_X234, - E_X235, - E_X236, - E_X237, - E_X238, - E_X239, - E_X240, - E_X241, - E_X242, - E_X243, - E_X244, - E_X245, - E_X246, - E_X247, - E_X248, - E_X249, - E_X250, -} - -func TestMessageSetMarshalOrder(t *testing.T) { - m := &MyMessageSet{} - for _, x := range exts { - if err := SetExtension(m, x, &Empty{}); err != nil { - t.Fatalf("SetExtension: %v", err) - } - } - - buf, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - // Serialize m several times, and check we get the same bytes each time. - for i := 0; i < 10; i++ { - b1, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - if !bytes.Equal(b1, buf) { - t.Errorf("Bytes differ on re-Marshal #%d", i) - } - - m2 := &MyMessageSet{} - if err := Unmarshal(buf, m2); err != nil { - t.Errorf("Unmarshal: %v", err) - } - b2, err := Marshal(m2) - if err != nil { - t.Errorf("re-Marshal: %v", err) - } - if !bytes.Equal(b2, buf) { - t.Errorf("Bytes differ on round-trip #%d", i) - } - } -} - -func TestUnmarshalMergesMessages(t *testing.T) { - // If a nested message occurs twice in the input, - // the fields should be merged when decoding. - a := &OtherMessage{ - Key: Int64(123), - Inner: &InnerMessage{ - Host: String("polhode"), - Port: Int32(1234), - }, - } - aData, err := Marshal(a) - if err != nil { - t.Fatalf("Marshal(a): %v", err) - } - b := &OtherMessage{ - Weight: Float32(1.2), - Inner: &InnerMessage{ - Host: String("herpolhode"), - Connected: Bool(true), - }, - } - bData, err := Marshal(b) - if err != nil { - t.Fatalf("Marshal(b): %v", err) - } - want := &OtherMessage{ - Key: Int64(123), - Weight: Float32(1.2), - Inner: &InnerMessage{ - Host: String("herpolhode"), - Port: Int32(1234), - Connected: Bool(true), - }, - } - got := new(OtherMessage) - if err := Unmarshal(append(aData, bData...), got); err != nil { - t.Fatalf("Unmarshal: %v", err) - } - if !Equal(got, want) { - t.Errorf("\n got %v\nwant %v", got, want) - } -} - -func TestEncodingSizes(t *testing.T) { - tests := []struct { - m Message - n int - }{ - {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, - {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, - {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, - {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, - } - for _, test := range tests { - b, err := Marshal(test.m) - if err != nil { - t.Errorf("Marshal(%v): %v", test.m, err) - continue - } - if len(b) != test.n { - t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) - } - } -} - -func TestRequiredNotSetError(t *testing.T) { - pb := initGoTest(false) - pb.RequiredField.Label = nil - pb.F_Int32Required = nil - pb.F_Int64Required = nil - - expected := "0807" + // field 1, encoding 0, value 7 - "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) - "5001" + // field 10, encoding 0, value 1 - "6d20000000" + // field 13, encoding 5, value 0x20 - "714000000000000000" + // field 14, encoding 1, value 0x40 - "78a019" + // field 15, encoding 0, value 0xca0 = 3232 - "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 - "8d0100004a45" + // field 17, encoding 5, value 3232.0 - "9101000000000040b940" + // field 18, encoding 1, value 6464.0 - "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" - "b304" + // field 70, encoding 3, start group - "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" - "b404" + // field 70, encoding 4, end group - "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" - "b0063f" + // field 102, encoding 0, 0x3f zigzag32 - "b8067f" // field 103, encoding 0, 0x7f zigzag64 - - o := old() - bytes, err := Marshal(pb) - if _, ok := err.(*RequiredNotSetError); !ok { - fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("expected = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-1 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 1", bytes) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = Unmarshal(bytes, pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { - t.Errorf("unmarshal wrong err msg: %v", err) - } - bytes, err = Marshal(pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", bytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-2 wrong err msg: %v", err) - } - if !equal(bytes, expected, t) { - o.DebugPrint("neq 2", bytes) - t.Fatalf("string = %s", expected) - } -} - -func fuzzUnmarshal(t *testing.T, data []byte) { - defer func() { - if e := recover(); e != nil { - t.Errorf("These bytes caused a panic: %+v", data) - t.Logf("Stack:\n%s", debug.Stack()) - t.FailNow() - } - }() - - pb := new(MyMessage) - Unmarshal(data, pb) -} - -func TestMapFieldMarshal(t *testing.T) { - m := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Rob", - 4: "Ian", - 8: "Dave", - }, - } - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - - // b should be the concatenation of these three byte sequences in some order. - parts := []string{ - "\n\a\b\x01\x12\x03Rob", - "\n\a\b\x04\x12\x03Ian", - "\n\b\b\x08\x12\x04Dave", - } - ok := false - for i := range parts { - for j := range parts { - if j == i { - continue - } - for k := range parts { - if k == i || k == j { - continue - } - try := parts[i] + parts[j] + parts[k] - if bytes.Equal(b, []byte(try)) { - ok = true - break - } - } - } - } - if !ok { - t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) - } - t.Logf("FYI b: %q", b) - - (new(Buffer)).DebugPrint("Dump of b", b) -} - -func TestMapFieldRoundTrips(t *testing.T) { - m := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Rob", - 4: "Ian", - 8: "Dave", - }, - MsgMapping: map[int64]*FloatingPoint{ - 0x7001: &FloatingPoint{F: Float64(2.0)}, - }, - ByteMapping: map[bool][]byte{ - false: []byte("that's not right!"), - true: []byte("aye, 'tis true!"), - }, - } - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - t.Logf("FYI b: %q", b) - m2 := new(MessageWithMap) - if err := Unmarshal(b, m2); err != nil { - t.Fatalf("Unmarshal: %v", err) - } - for _, pair := range [][2]interface{}{ - {m.NameMapping, m2.NameMapping}, - {m.MsgMapping, m2.MsgMapping}, - {m.ByteMapping, m2.ByteMapping}, - } { - if !reflect.DeepEqual(pair[0], pair[1]) { - t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", pair[0], pair[1]) - } - } -} - -func TestMapFieldWithNil(t *testing.T) { - m1 := &MessageWithMap{ - MsgMapping: map[int64]*FloatingPoint{ - 1: nil, - }, - } - b, err := Marshal(m1) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - m2 := new(MessageWithMap) - if err := Unmarshal(b, m2); err != nil { - t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) - } - if v, ok := m2.MsgMapping[1]; !ok { - t.Error("msg_mapping[1] not present") - } else if v != nil { - t.Errorf("msg_mapping[1] not nil: %v", v) - } -} - -func TestMapFieldWithNilBytes(t *testing.T) { - m1 := &MessageWithMap{ - ByteMapping: map[bool][]byte{ - false: []byte{}, - true: nil, - }, - } - n := Size(m1) - b, err := Marshal(m1) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - if n != len(b) { - t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b)) - } - m2 := new(MessageWithMap) - if err := Unmarshal(b, m2); err != nil { - t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) - } - if v, ok := m2.ByteMapping[false]; !ok { - t.Error("byte_mapping[false] not present") - } else if len(v) != 0 { - t.Errorf("byte_mapping[false] not empty: %#v", v) - } - if v, ok := m2.ByteMapping[true]; !ok { - t.Error("byte_mapping[true] not present") - } else if len(v) != 0 { - t.Errorf("byte_mapping[true] not empty: %#v", v) - } -} - -func TestDecodeMapFieldMissingKey(t *testing.T) { - b := []byte{ - 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes - // no key - 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m" - } - got := &MessageWithMap{} - err := Unmarshal(b, got) - if err != nil { - t.Fatalf("failed to marshal map with missing key: %v", err) - } - want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}} - if !Equal(got, want) { - t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want) - } -} - -func TestDecodeMapFieldMissingValue(t *testing.T) { - b := []byte{ - 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes - 0x08, 0x01, // varint key, value 1 - // no value - } - got := &MessageWithMap{} - err := Unmarshal(b, got) - if err != nil { - t.Fatalf("failed to marshal map with missing value: %v", err) - } - want := &MessageWithMap{NameMapping: map[int32]string{1: ""}} - if !Equal(got, want) { - t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want) - } -} - -func TestOneof(t *testing.T) { - m := &Communique{} - b, err := Marshal(m) - if err != nil { - t.Fatalf("Marshal of empty message with oneof: %v", err) - } - if len(b) != 0 { - t.Errorf("Marshal of empty message yielded too many bytes: %v", b) - } - - m = &Communique{ - Union: &Communique_Name{"Barry"}, - } - - // Round-trip. - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof: %v", err) - } - if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) - t.Errorf("Incorrect marshal of message with oneof: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof: %v", err) - } - if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { - t.Errorf("After round trip, Union = %+v", m.Union) - } - if name := m.GetName(); name != "Barry" { - t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") - } - - // Let's try with a message in the oneof. - m.Union = &Communique_Msg{&Strings{StringField: String("deep deep string")}} - b, err = Marshal(m) - if err != nil { - t.Fatalf("Marshal of message with oneof set to message: %v", err) - } - if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) - t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) - } - m.Reset() - if err := Unmarshal(b, m); err != nil { - t.Fatalf("Unmarshal of message with oneof set to message: %v", err) - } - ss, ok := m.Union.(*Communique_Msg) - if !ok || ss.Msg.GetStringField() != "deep deep string" { - t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) - } -} - -func TestInefficientPackedBool(t *testing.T) { - // https://github.com/golang/protobuf/issues/76 - inp := []byte{ - 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes - // Usually a bool should take a single byte, - // but it is permitted to be any varint. - 0xb9, 0x30, - } - if err := Unmarshal(inp, new(MoreRepeated)); err != nil { - t.Error(err) - } -} - -// Benchmarks - -func testMsg() *GoTest { - pb := initGoTest(true) - const N = 1000 // Internally the library starts much smaller. - pb.F_Int32Repeated = make([]int32, N) - pb.F_DoubleRepeated = make([]float64, N) - for i := 0; i < N; i++ { - pb.F_Int32Repeated[i] = int32(i) - pb.F_DoubleRepeated[i] = float64(i) - } - return pb -} - -func bytesMsg() *GoTest { - pb := initGoTest(true) - buf := make([]byte, 4000) - for i := range buf { - buf[i] = byte(i) - } - pb.F_BytesDefaulted = buf - return pb -} - -func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { - d, _ := marshal(pb) - b.SetBytes(int64(len(d))) - b.ResetTimer() - for i := 0; i < b.N; i++ { - marshal(pb) - } -} - -func benchmarkBufferMarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - p.Reset() - err := p.Marshal(pb0) - return p.Bytes(), err - }) -} - -func benchmarkSize(b *testing.B, pb Message) { - benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { - Size(pb) - return nil, nil - }) -} - -func newOf(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - return reflect.New(in.Type().Elem()).Interface().(Message) -} - -func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { - d, _ := Marshal(pb) - b.SetBytes(int64(len(d))) - pbd := newOf(pb) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - unmarshal(d, pbd) - } -} - -func benchmarkBufferUnmarshal(b *testing.B, pb Message) { - p := NewBuffer(nil) - benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { - p.SetBuf(d) - return p.Unmarshal(pb0) - }) -} - -// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} - -func BenchmarkMarshal(b *testing.B) { - benchmarkMarshal(b, testMsg(), Marshal) -} - -func BenchmarkBufferMarshal(b *testing.B) { - benchmarkBufferMarshal(b, testMsg()) -} - -func BenchmarkSize(b *testing.B) { - benchmarkSize(b, testMsg()) -} - -func BenchmarkUnmarshal(b *testing.B) { - benchmarkUnmarshal(b, testMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshal(b *testing.B) { - benchmarkBufferUnmarshal(b, testMsg()) -} - -func BenchmarkMarshalBytes(b *testing.B) { - benchmarkMarshal(b, bytesMsg(), Marshal) -} - -func BenchmarkBufferMarshalBytes(b *testing.B) { - benchmarkBufferMarshal(b, bytesMsg()) -} - -func BenchmarkSizeBytes(b *testing.B) { - benchmarkSize(b, bytesMsg()) -} - -func BenchmarkUnmarshalBytes(b *testing.B) { - benchmarkUnmarshal(b, bytesMsg(), Unmarshal) -} - -func BenchmarkBufferUnmarshalBytes(b *testing.B) { - benchmarkBufferUnmarshal(b, bytesMsg()) -} - -func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { - b.StopTimer() - pb := initGoTestField() - skip := &GoSkipTest{ - SkipInt32: Int32(32), - SkipFixed32: Uint32(3232), - SkipFixed64: Uint64(6464), - SkipString: String("skipper"), - Skipgroup: &GoSkipTest_SkipGroup{ - GroupInt32: Int32(75), - GroupString: String("wxyz"), - }, - } - - pbd := new(GoTestField) - p := NewBuffer(nil) - p.Marshal(pb) - p.Marshal(skip) - p2 := NewBuffer(nil) - - b.StartTimer() - for i := 0; i < b.N; i++ { - p2.SetBuf(p.Bytes()) - p2.Unmarshal(pbd) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/any_test.go b/vendor/github.com/golang/protobuf/proto/any_test.go deleted file mode 100644 index 1a3c22ed4..000000000 --- a/vendor/github.com/golang/protobuf/proto/any_test.go +++ /dev/null @@ -1,300 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "strings" - "testing" - - "github.com/golang/protobuf/proto" - - pb "github.com/golang/protobuf/proto/proto3_proto" - testpb "github.com/golang/protobuf/proto/testdata" - anypb "github.com/golang/protobuf/ptypes/any" -) - -var ( - expandedMarshaler = proto.TextMarshaler{ExpandAny: true} - expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true} -) - -// anyEqual reports whether two messages which may be google.protobuf.Any or may -// contain google.protobuf.Any fields are equal. We can't use proto.Equal for -// comparison, because semantically equivalent messages may be marshaled to -// binary in different tag order. Instead, trust that TextMarshaler with -// ExpandAny option works and compare the text marshaling results. -func anyEqual(got, want proto.Message) bool { - // if messages are proto.Equal, no need to marshal. - if proto.Equal(got, want) { - return true - } - g := expandedMarshaler.Text(got) - w := expandedMarshaler.Text(want) - return g == w -} - -type golden struct { - m proto.Message - t, c string -} - -var goldenMessages = makeGolden() - -func makeGolden() []golden { - nested := &pb.Nested{Bunny: "Monty"} - nb, err := proto.Marshal(nested) - if err != nil { - panic(err) - } - m1 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m2 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m3 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, - } - m4 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, - } - m5 := &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb} - - any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} - proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")}) - proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar")) - any1b, err := proto.Marshal(any1) - if err != nil { - panic(err) - } - any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}} - proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")}) - any2b, err := proto.Marshal(any2) - if err != nil { - panic(err) - } - m6 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, - ManyThings: []*anypb.Any{ - &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, - &anypb.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, - }, - } - - const ( - m1Golden = ` -name: "David" -result_count: 47 -anything: < - [type.googleapis.com/proto3_proto.Nested]: < - bunny: "Monty" - > -> -` - m2Golden = ` -name: "David" -result_count: 47 -anything: < - ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: < - bunny: "Monty" - > -> -` - m3Golden = ` -name: "David" -result_count: 47 -anything: < - ["type.googleapis.com/\"/proto3_proto.Nested"]: < - bunny: "Monty" - > -> -` - m4Golden = ` -name: "David" -result_count: 47 -anything: < - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Monty" - > -> -` - m5Golden = ` -[type.googleapis.com/proto3_proto.Nested]: < - bunny: "Monty" -> -` - m6Golden = ` -name: "David" -result_count: 47 -anything: < - [type.googleapis.com/testdata.MyMessage]: < - count: 47 - name: "David" - [testdata.Ext.more]: < - data: "foo" - > - [testdata.Ext.text]: "bar" - > -> -many_things: < - [type.googleapis.com/testdata.MyMessage]: < - count: 42 - bikeshed: GREEN - rep_bytes: "roboto" - [testdata.Ext.more]: < - data: "baz" - > - > -> -many_things: < - [type.googleapis.com/testdata.MyMessage]: < - count: 47 - name: "David" - [testdata.Ext.more]: < - data: "foo" - > - [testdata.Ext.text]: "bar" - > -> -` - ) - return []golden{ - {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "}, - {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "}, - {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "}, - {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "}, - {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "}, - {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "}, - } -} - -func TestMarshalGolden(t *testing.T) { - for _, tt := range goldenMessages { - if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want { - t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want) - } - if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want { - t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want) - } - } -} - -func TestUnmarshalGolden(t *testing.T) { - for _, tt := range goldenMessages { - want := tt.m - got := proto.Clone(tt.m) - got.Reset() - if err := proto.UnmarshalText(tt.t, got); err != nil { - t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err) - } - if !anyEqual(got, want) { - t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want) - } - got.Reset() - if err := proto.UnmarshalText(tt.c, got); err != nil { - t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err) - } - if !anyEqual(got, want) { - t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want) - } - } -} - -func TestMarshalUnknownAny(t *testing.T) { - m := &pb.Message{ - Anything: &anypb.Any{ - TypeUrl: "foo", - Value: []byte("bar"), - }, - } - want := `anything: < - type_url: "foo" - value: "bar" -> -` - got := expandedMarshaler.Text(m) - if got != want { - t.Errorf("got\n`%s`\nwant\n`%s`", got, want) - } -} - -func TestAmbiguousAny(t *testing.T) { - pb := &anypb.Any{} - err := proto.UnmarshalText(` - type_url: "ttt/proto3_proto.Nested" - value: "\n\x05Monty" - `, pb) - t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err) - if err != nil { - t.Errorf("failed to parse ambiguous Any message: %v", err) - } -} - -func TestUnmarshalOverwriteAny(t *testing.T) { - pb := &anypb.Any{} - err := proto.UnmarshalText(` - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Monty" - > - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Rabbit of Caerbannog" - > - `, pb) - want := `line 7: Any message unpacked multiple times, or "type_url" already set` - if err.Error() != want { - t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) - } -} - -func TestUnmarshalAnyMixAndMatch(t *testing.T) { - pb := &anypb.Any{} - err := proto.UnmarshalText(` - value: "\n\x05Monty" - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Rabbit of Caerbannog" - > - `, pb) - want := `line 5: Any message unpacked multiple times, or "value" already set` - if err.Error() != want { - t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go deleted file mode 100644 index e392575b3..000000000 --- a/vendor/github.com/golang/protobuf/proto/clone.go +++ /dev/null @@ -1,229 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Protocol buffer deep copy and merge. -// TODO: RawMessage. - -package proto - -import ( - "log" - "reflect" - "strings" -) - -// Clone returns a deep copy of a protocol buffer. -func Clone(pb Message) Message { - in := reflect.ValueOf(pb) - if in.IsNil() { - return pb - } - - out := reflect.New(in.Type().Elem()) - // out is empty so a merge is a deep copy. - mergeStruct(out.Elem(), in.Elem()) - return out.Interface().(Message) -} - -// Merge merges src into dst. -// Required and optional fields that are set in src will be set to that value in dst. -// Elements of repeated fields will be appended. -// Merge panics if src and dst are not the same type, or if dst is nil. -func Merge(dst, src Message) { - in := reflect.ValueOf(src) - out := reflect.ValueOf(dst) - if out.IsNil() { - panic("proto: nil destination") - } - if in.Type() != out.Type() { - // Explicit test prior to mergeStruct so that mistyped nils will fail - panic("proto: type mismatch") - } - if in.IsNil() { - // Merging nil into non-nil is a quiet no-op - return - } - mergeStruct(out.Elem(), in.Elem()) -} - -func mergeStruct(out, in reflect.Value) { - sprop := GetProperties(in.Type()) - for i := 0; i < in.NumField(); i++ { - f := in.Type().Field(i) - if strings.HasPrefix(f.Name, "XXX_") { - continue - } - mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) - } - - if emIn, ok := extendable(in.Addr().Interface()); ok { - emOut, _ := extendable(out.Addr().Interface()) - mIn, muIn := emIn.extensionsRead() - if mIn != nil { - mOut := emOut.extensionsWrite() - muIn.Lock() - mergeExtension(mOut, mIn) - muIn.Unlock() - } - } - - uf := in.FieldByName("XXX_unrecognized") - if !uf.IsValid() { - return - } - uin := uf.Bytes() - if len(uin) > 0 { - out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) - } -} - -// mergeAny performs a merge between two values of the same type. -// viaPtr indicates whether the values were indirected through a pointer (implying proto2). -// prop is set if this is a struct field (it may be nil). -func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { - if in.Type() == protoMessageType { - if !in.IsNil() { - if out.IsNil() { - out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) - } else { - Merge(out.Interface().(Message), in.Interface().(Message)) - } - } - return - } - switch in.Kind() { - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, - reflect.String, reflect.Uint32, reflect.Uint64: - if !viaPtr && isProto3Zero(in) { - return - } - out.Set(in) - case reflect.Interface: - // Probably a oneof field; copy non-nil values. - if in.IsNil() { - return - } - // Allocate destination if it is not set, or set to a different type. - // Otherwise we will merge as normal. - if out.IsNil() || out.Elem().Type() != in.Elem().Type() { - out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) - } - mergeAny(out.Elem(), in.Elem(), false, nil) - case reflect.Map: - if in.Len() == 0 { - return - } - if out.IsNil() { - out.Set(reflect.MakeMap(in.Type())) - } - // For maps with value types of *T or []byte we need to deep copy each value. - elemKind := in.Type().Elem().Kind() - for _, key := range in.MapKeys() { - var val reflect.Value - switch elemKind { - case reflect.Ptr: - val = reflect.New(in.Type().Elem().Elem()) - mergeAny(val, in.MapIndex(key), false, nil) - case reflect.Slice: - val = in.MapIndex(key) - val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) - default: - val = in.MapIndex(key) - } - out.SetMapIndex(key, val) - } - case reflect.Ptr: - if in.IsNil() { - return - } - if out.IsNil() { - out.Set(reflect.New(in.Elem().Type())) - } - mergeAny(out.Elem(), in.Elem(), true, nil) - case reflect.Slice: - if in.IsNil() { - return - } - if in.Type().Elem().Kind() == reflect.Uint8 { - // []byte is a scalar bytes field, not a repeated field. - - // Edge case: if this is in a proto3 message, a zero length - // bytes field is considered the zero value, and should not - // be merged. - if prop != nil && prop.proto3 && in.Len() == 0 { - return - } - - // Make a deep copy. - // Append to []byte{} instead of []byte(nil) so that we never end up - // with a nil result. - out.SetBytes(append([]byte{}, in.Bytes()...)) - return - } - n := in.Len() - if out.IsNil() { - out.Set(reflect.MakeSlice(in.Type(), 0, n)) - } - switch in.Type().Elem().Kind() { - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, - reflect.String, reflect.Uint32, reflect.Uint64: - out.Set(reflect.AppendSlice(out, in)) - default: - for i := 0; i < n; i++ { - x := reflect.Indirect(reflect.New(in.Type().Elem())) - mergeAny(x, in.Index(i), false, nil) - out.Set(reflect.Append(out, x)) - } - } - case reflect.Struct: - mergeStruct(out, in) - default: - // unknown type, so not a protocol buffer - log.Printf("proto: don't know how to copy %v", in) - } -} - -func mergeExtension(out, in map[int32]Extension) { - for extNum, eIn := range in { - eOut := Extension{desc: eIn.desc} - if eIn.value != nil { - v := reflect.New(reflect.TypeOf(eIn.value)).Elem() - mergeAny(v, reflect.ValueOf(eIn.value), false, nil) - eOut.value = v.Interface() - } - if eIn.enc != nil { - eOut.enc = make([]byte, len(eIn.enc)) - copy(eOut.enc, eIn.enc) - } - - out[extNum] = eOut - } -} diff --git a/vendor/github.com/golang/protobuf/proto/clone_test.go b/vendor/github.com/golang/protobuf/proto/clone_test.go deleted file mode 100644 index f607ff49e..000000000 --- a/vendor/github.com/golang/protobuf/proto/clone_test.go +++ /dev/null @@ -1,300 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - "github.com/golang/protobuf/proto" - - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/protobuf/proto/testdata" -) - -var cloneTestMessage = &pb.MyMessage{ - Count: proto.Int32(42), - Name: proto.String("Dave"), - Pet: []string{"bunny", "kitty", "horsey"}, - Inner: &pb.InnerMessage{ - Host: proto.String("niles"), - Port: proto.Int32(9099), - Connected: proto.Bool(true), - }, - Others: []*pb.OtherMessage{ - { - Value: []byte("some bytes"), - }, - }, - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(6), - }, - RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, -} - -func init() { - ext := &pb.Ext{ - Data: proto.String("extension"), - } - if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { - panic("SetExtension: " + err.Error()) - } -} - -func TestClone(t *testing.T) { - m := proto.Clone(cloneTestMessage).(*pb.MyMessage) - if !proto.Equal(m, cloneTestMessage) { - t.Errorf("Clone(%v) = %v", cloneTestMessage, m) - } - - // Verify it was a deep copy. - *m.Inner.Port++ - if proto.Equal(m, cloneTestMessage) { - t.Error("Mutating clone changed the original") - } - // Byte fields and repeated fields should be copied. - if &m.Pet[0] == &cloneTestMessage.Pet[0] { - t.Error("Pet: repeated field not copied") - } - if &m.Others[0] == &cloneTestMessage.Others[0] { - t.Error("Others: repeated field not copied") - } - if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { - t.Error("Others[0].Value: bytes field not copied") - } - if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { - t.Error("RepBytes: repeated field not copied") - } - if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { - t.Error("RepBytes[0]: bytes field not copied") - } -} - -func TestCloneNil(t *testing.T) { - var m *pb.MyMessage - if c := proto.Clone(m); !proto.Equal(m, c) { - t.Errorf("Clone(%v) = %v", m, c) - } -} - -var mergeTests = []struct { - src, dst, want proto.Message -}{ - { - src: &pb.MyMessage{ - Count: proto.Int32(42), - }, - dst: &pb.MyMessage{ - Name: proto.String("Dave"), - }, - want: &pb.MyMessage{ - Count: proto.Int32(42), - Name: proto.String("Dave"), - }, - }, - { - src: &pb.MyMessage{ - Inner: &pb.InnerMessage{ - Host: proto.String("hey"), - Connected: proto.Bool(true), - }, - Pet: []string{"horsey"}, - Others: []*pb.OtherMessage{ - { - Value: []byte("some bytes"), - }, - }, - }, - dst: &pb.MyMessage{ - Inner: &pb.InnerMessage{ - Host: proto.String("niles"), - Port: proto.Int32(9099), - }, - Pet: []string{"bunny", "kitty"}, - Others: []*pb.OtherMessage{ - { - Key: proto.Int64(31415926535), - }, - { - // Explicitly test a src=nil field - Inner: nil, - }, - }, - }, - want: &pb.MyMessage{ - Inner: &pb.InnerMessage{ - Host: proto.String("hey"), - Connected: proto.Bool(true), - Port: proto.Int32(9099), - }, - Pet: []string{"bunny", "kitty", "horsey"}, - Others: []*pb.OtherMessage{ - { - Key: proto.Int64(31415926535), - }, - {}, - { - Value: []byte("some bytes"), - }, - }, - }, - }, - { - src: &pb.MyMessage{ - RepBytes: [][]byte{[]byte("wow")}, - }, - dst: &pb.MyMessage{ - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(6), - }, - RepBytes: [][]byte{[]byte("sham")}, - }, - want: &pb.MyMessage{ - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(6), - }, - RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, - }, - }, - // Check that a scalar bytes field replaces rather than appends. - { - src: &pb.OtherMessage{Value: []byte("foo")}, - dst: &pb.OtherMessage{Value: []byte("bar")}, - want: &pb.OtherMessage{Value: []byte("foo")}, - }, - { - src: &pb.MessageWithMap{ - NameMapping: map[int32]string{6: "Nigel"}, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)}, - 0x4002: &pb.FloatingPoint{ - F: proto.Float64(2.0), - }, - }, - ByteMapping: map[bool][]byte{true: []byte("wowsa")}, - }, - dst: &pb.MessageWithMap{ - NameMapping: map[int32]string{ - 6: "Bruce", // should be overwritten - 7: "Andrew", - }, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4002: &pb.FloatingPoint{ - F: proto.Float64(3.0), - Exact: proto.Bool(true), - }, // the entire message should be overwritten - }, - }, - want: &pb.MessageWithMap{ - NameMapping: map[int32]string{ - 6: "Nigel", - 7: "Andrew", - }, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4001: &pb.FloatingPoint{F: proto.Float64(2.0)}, - 0x4002: &pb.FloatingPoint{ - F: proto.Float64(2.0), - }, - }, - ByteMapping: map[bool][]byte{true: []byte("wowsa")}, - }, - }, - // proto3 shouldn't merge zero values, - // in the same way that proto2 shouldn't merge nils. - { - src: &proto3pb.Message{ - Name: "Aaron", - Data: []byte(""), // zero value, but not nil - }, - dst: &proto3pb.Message{ - HeightInCm: 176, - Data: []byte("texas!"), - }, - want: &proto3pb.Message{ - Name: "Aaron", - HeightInCm: 176, - Data: []byte("texas!"), - }, - }, - // Oneof fields should merge by assignment. - { - src: &pb.Communique{ - Union: &pb.Communique_Number{41}, - }, - dst: &pb.Communique{ - Union: &pb.Communique_Name{"Bobby Tables"}, - }, - want: &pb.Communique{ - Union: &pb.Communique_Number{41}, - }, - }, - // Oneof nil is the same as not set. - { - src: &pb.Communique{}, - dst: &pb.Communique{ - Union: &pb.Communique_Name{"Bobby Tables"}, - }, - want: &pb.Communique{ - Union: &pb.Communique_Name{"Bobby Tables"}, - }, - }, - { - src: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Cute: true}, // replace - "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, // insert - }, - }, - dst: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Bunny: "lost"}, // replaced - "kay_c": &proto3pb.Nested{Bunny: "bunny"}, // keep - }, - }, - want: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": &proto3pb.Nested{Cute: true}, - "kay_b": &proto3pb.Nested{Bunny: "rabbit"}, - "kay_c": &proto3pb.Nested{Bunny: "bunny"}, - }, - }, - }, -} - -func TestMerge(t *testing.T) { - for _, m := range mergeTests { - got := proto.Clone(m.dst) - proto.Merge(got, m.src) - if !proto.Equal(got, m.want) { - t.Errorf("Merge(%v, %v)\n got %v\nwant %v\n", m.dst, m.src, got, m.want) - } - } -} diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go deleted file mode 100644 index aa207298f..000000000 --- a/vendor/github.com/golang/protobuf/proto/decode.go +++ /dev/null @@ -1,970 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for decoding protocol buffer data to construct in-memory representations. - */ - -import ( - "errors" - "fmt" - "io" - "os" - "reflect" -) - -// errOverflow is returned when an integer is too large to be represented. -var errOverflow = errors.New("proto: integer overflow") - -// ErrInternalBadWireType is returned by generated code when an incorrect -// wire type is encountered. It does not get returned to user code. -var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") - -// The fundamental decoders that interpret bytes on the wire. -// Those that take integer types all return uint64 and are -// therefore of type valueDecoder. - -// DecodeVarint reads a varint-encoded integer from the slice. -// It returns the integer and the number of bytes consumed, or -// zero if there is not enough. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func DecodeVarint(buf []byte) (x uint64, n int) { - for shift := uint(0); shift < 64; shift += 7 { - if n >= len(buf) { - return 0, 0 - } - b := uint64(buf[n]) - n++ - x |= (b & 0x7F) << shift - if (b & 0x80) == 0 { - return x, n - } - } - - // The number is too large to represent in a 64-bit value. - return 0, 0 -} - -func (p *Buffer) decodeVarintSlow() (x uint64, err error) { - i := p.index - l := len(p.buf) - - for shift := uint(0); shift < 64; shift += 7 { - if i >= l { - err = io.ErrUnexpectedEOF - return - } - b := p.buf[i] - i++ - x |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - p.index = i - return - } - } - - // The number is too large to represent in a 64-bit value. - err = errOverflow - return -} - -// DecodeVarint reads a varint-encoded integer from the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) DecodeVarint() (x uint64, err error) { - i := p.index - buf := p.buf - - if i >= len(buf) { - return 0, io.ErrUnexpectedEOF - } else if buf[i] < 0x80 { - p.index++ - return uint64(buf[i]), nil - } else if len(buf)-i < 10 { - return p.decodeVarintSlow() - } - - var b uint64 - // we already checked the first byte - x = uint64(buf[i]) - 0x80 - i++ - - b = uint64(buf[i]) - i++ - x += b << 7 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 7 - - b = uint64(buf[i]) - i++ - x += b << 14 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 14 - - b = uint64(buf[i]) - i++ - x += b << 21 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 21 - - b = uint64(buf[i]) - i++ - x += b << 28 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 28 - - b = uint64(buf[i]) - i++ - x += b << 35 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 35 - - b = uint64(buf[i]) - i++ - x += b << 42 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 42 - - b = uint64(buf[i]) - i++ - x += b << 49 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 49 - - b = uint64(buf[i]) - i++ - x += b << 56 - if b&0x80 == 0 { - goto done - } - x -= 0x80 << 56 - - b = uint64(buf[i]) - i++ - x += b << 63 - if b&0x80 == 0 { - goto done - } - // x -= 0x80 << 63 // Always zero. - - return 0, errOverflow - -done: - p.index = i - return x, nil -} - -// DecodeFixed64 reads a 64-bit integer from the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) DecodeFixed64() (x uint64, err error) { - // x, err already 0 - i := p.index + 8 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-8]) - x |= uint64(p.buf[i-7]) << 8 - x |= uint64(p.buf[i-6]) << 16 - x |= uint64(p.buf[i-5]) << 24 - x |= uint64(p.buf[i-4]) << 32 - x |= uint64(p.buf[i-3]) << 40 - x |= uint64(p.buf[i-2]) << 48 - x |= uint64(p.buf[i-1]) << 56 - return -} - -// DecodeFixed32 reads a 32-bit integer from the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) DecodeFixed32() (x uint64, err error) { - // x, err already 0 - i := p.index + 4 - if i < 0 || i > len(p.buf) { - err = io.ErrUnexpectedEOF - return - } - p.index = i - - x = uint64(p.buf[i-4]) - x |= uint64(p.buf[i-3]) << 8 - x |= uint64(p.buf[i-2]) << 16 - x |= uint64(p.buf[i-1]) << 24 - return -} - -// DecodeZigzag64 reads a zigzag-encoded 64-bit integer -// from the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) DecodeZigzag64() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) - return -} - -// DecodeZigzag32 reads a zigzag-encoded 32-bit integer -// from the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) DecodeZigzag32() (x uint64, err error) { - x, err = p.DecodeVarint() - if err != nil { - return - } - x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) - return -} - -// These are not ValueDecoders: they produce an array of bytes or a string. -// bytes, embedded messages - -// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { - n, err := p.DecodeVarint() - if err != nil { - return nil, err - } - - nb := int(n) - if nb < 0 { - return nil, fmt.Errorf("proto: bad byte length %d", nb) - } - end := p.index + nb - if end < p.index || end > len(p.buf) { - return nil, io.ErrUnexpectedEOF - } - - if !alloc { - // todo: check if can get more uses of alloc=false - buf = p.buf[p.index:end] - p.index += nb - return - } - - buf = make([]byte, nb) - copy(buf, p.buf[p.index:]) - p.index += nb - return -} - -// DecodeStringBytes reads an encoded string from the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) DecodeStringBytes() (s string, err error) { - buf, err := p.DecodeRawBytes(false) - if err != nil { - return - } - return string(buf), nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -// If the protocol buffer has extensions, and the field matches, add it as an extension. -// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. -func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { - oi := o.index - - err := o.skip(t, tag, wire) - if err != nil { - return err - } - - if !unrecField.IsValid() { - return nil - } - - ptr := structPointer_Bytes(base, unrecField) - - // Add the skipped field to struct field - obuf := o.buf - - o.buf = *ptr - o.EncodeVarint(uint64(tag<<3 | wire)) - *ptr = append(o.buf, obuf[oi:o.index]...) - - o.buf = obuf - - return nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -func (o *Buffer) skip(t reflect.Type, tag, wire int) error { - - var u uint64 - var err error - - switch wire { - case WireVarint: - _, err = o.DecodeVarint() - case WireFixed64: - _, err = o.DecodeFixed64() - case WireBytes: - _, err = o.DecodeRawBytes(false) - case WireFixed32: - _, err = o.DecodeFixed32() - case WireStartGroup: - for { - u, err = o.DecodeVarint() - if err != nil { - break - } - fwire := int(u & 0x7) - if fwire == WireEndGroup { - break - } - ftag := int(u >> 3) - err = o.skip(t, ftag, fwire) - if err != nil { - break - } - } - default: - err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) - } - return err -} - -// Unmarshaler is the interface representing objects that can -// unmarshal themselves. The method should reset the receiver before -// decoding starts. The argument points to data that may be -// overwritten, so implementations should not keep references to the -// buffer. -type Unmarshaler interface { - Unmarshal([]byte) error -} - -// Unmarshal parses the protocol buffer representation in buf and places the -// decoded result in pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// Unmarshal resets pb before starting to unmarshal, so any -// existing data in pb is always removed. Use UnmarshalMerge -// to preserve and append to existing data. -func Unmarshal(buf []byte, pb Message) error { - pb.Reset() - return UnmarshalMerge(buf, pb) -} - -// UnmarshalMerge parses the protocol buffer representation in buf and -// writes the decoded result to pb. If the struct underlying pb does not match -// the data in buf, the results can be unpredictable. -// -// UnmarshalMerge merges into existing data in pb. -// Most code should use Unmarshal instead. -func UnmarshalMerge(buf []byte, pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - return u.Unmarshal(buf) - } - return NewBuffer(buf).Unmarshal(pb) -} - -// DecodeMessage reads a count-delimited message from the Buffer. -func (p *Buffer) DecodeMessage(pb Message) error { - enc, err := p.DecodeRawBytes(false) - if err != nil { - return err - } - return NewBuffer(enc).Unmarshal(pb) -} - -// DecodeGroup reads a tag-delimited group from the Buffer. -func (p *Buffer) DecodeGroup(pb Message) error { - typ, base, err := getbase(pb) - if err != nil { - return err - } - return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) -} - -// Unmarshal parses the protocol buffer representation in the -// Buffer and places the decoded result in pb. If the struct -// underlying pb does not match the data in the buffer, the results can be -// unpredictable. -// -// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. -func (p *Buffer) Unmarshal(pb Message) error { - // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - err := u.Unmarshal(p.buf[p.index:]) - p.index = len(p.buf) - return err - } - - typ, base, err := getbase(pb) - if err != nil { - return err - } - - err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) - - if collectStats { - stats.Decode++ - } - - return err -} - -// unmarshalType does the work of unmarshaling a structure. -func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { - var state errorState - required, reqFields := prop.reqCount, uint64(0) - - var err error - for err == nil && o.index < len(o.buf) { - oi := o.index - var u uint64 - u, err = o.DecodeVarint() - if err != nil { - break - } - wire := int(u & 0x7) - if wire == WireEndGroup { - if is_group { - if required > 0 { - // Not enough information to determine the exact field. - // (See below.) - return &RequiredNotSetError{"{Unknown}"} - } - return nil // input is satisfied - } - return fmt.Errorf("proto: %s: wiretype end group for non-group", st) - } - tag := int(u >> 3) - if tag <= 0 { - return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) - } - fieldnum, ok := prop.decoderTags.get(tag) - if !ok { - // Maybe it's an extension? - if prop.extendable { - if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - extmap := e.extensionsWrite() - ext := extmap[int32(tag)] // may be missing - ext.enc = append(ext.enc, o.buf[oi:o.index]...) - extmap[int32(tag)] = ext - } - continue - } - } - // Maybe it's a oneof? - if prop.oneofUnmarshaler != nil { - m := structPointer_Interface(base, st).(Message) - // First return value indicates whether tag is a oneof field. - ok, err = prop.oneofUnmarshaler(m, tag, wire, o) - if err == ErrInternalBadWireType { - // Map the error to something more descriptive. - // Do the formatting here to save generated code space. - err = fmt.Errorf("bad wiretype for oneof field in %T", m) - } - if ok { - continue - } - } - err = o.skipAndSave(st, tag, wire, base, prop.unrecField) - continue - } - p := prop.Prop[fieldnum] - - if p.dec == nil { - fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) - continue - } - dec := p.dec - if wire != WireStartGroup && wire != p.WireType { - if wire == WireBytes && p.packedDec != nil { - // a packable field - dec = p.packedDec - } else { - err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) - continue - } - } - decErr := dec(o, p, base) - if decErr != nil && !state.shouldContinue(decErr, p) { - err = decErr - } - if err == nil && p.Required { - // Successfully decoded a required field. - if tag <= 64 { - // use bitmap for fields 1-64 to catch field reuse. - var mask uint64 = 1 << uint64(tag-1) - if reqFields&mask == 0 { - // new required field - reqFields |= mask - required-- - } - } else { - // This is imprecise. It can be fooled by a required field - // with a tag > 64 that is encoded twice; that's very rare. - // A fully correct implementation would require allocating - // a data structure, which we would like to avoid. - required-- - } - } - } - if err == nil { - if is_group { - return io.ErrUnexpectedEOF - } - if state.err != nil { - return state.err - } - if required > 0 { - // Not enough information to determine the exact field. If we use extra - // CPU, we could determine the field only if the missing required field - // has a tag <= 64 and we check reqFields. - return &RequiredNotSetError{"{Unknown}"} - } - } - return err -} - -// Individual type decoders -// For each, -// u is the decoded value, -// v is a pointer to the field (pointer) in the struct - -// Sizes of the pools to allocate inside the Buffer. -// The goal is modest amortization and allocation -// on at least 16-byte boundaries. -const ( - boolPoolSize = 16 - uint32PoolSize = 8 - uint64PoolSize = 4 -) - -// Decode a bool. -func (o *Buffer) dec_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - if len(o.bools) == 0 { - o.bools = make([]bool, boolPoolSize) - } - o.bools[0] = u != 0 - *structPointer_Bool(base, p.field) = &o.bools[0] - o.bools = o.bools[1:] - return nil -} - -func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - *structPointer_BoolVal(base, p.field) = u != 0 - return nil -} - -// Decode an int32. -func (o *Buffer) dec_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) - return nil -} - -func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) - return nil -} - -// Decode an int64. -func (o *Buffer) dec_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64_Set(structPointer_Word64(base, p.field), o, u) - return nil -} - -func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64Val_Set(structPointer_Word64Val(base, p.field), o, u) - return nil -} - -// Decode a string. -func (o *Buffer) dec_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_String(base, p.field) = &s - return nil -} - -func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_StringVal(base, p.field) = s - return nil -} - -// Decode a slice of bytes ([]byte). -func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - *structPointer_Bytes(base, p.field) = b - return nil -} - -// Decode a slice of bools ([]bool). -func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - v := structPointer_BoolSlice(base, p.field) - *v = append(*v, u != 0) - return nil -} - -// Decode a slice of bools ([]bool) in packed format. -func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { - v := structPointer_BoolSlice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded bools - fin := o.index + nb - if fin < o.index { - return errOverflow - } - - y := *v - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - y = append(y, u != 0) - } - - *v = y - return nil -} - -// Decode a slice of int32s ([]int32). -func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - structPointer_Word32Slice(base, p.field).Append(uint32(u)) - return nil -} - -// Decode a slice of int32s ([]int32) in packed format. -func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int32s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(uint32(u)) - } - return nil -} - -// Decode a slice of int64s ([]int64). -func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - - structPointer_Word64Slice(base, p.field).Append(u) - return nil -} - -// Decode a slice of int64s ([]int64) in packed format. -func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int64s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(u) - } - return nil -} - -// Decode a slice of strings ([]string). -func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - v := structPointer_StringSlice(base, p.field) - *v = append(*v, s) - return nil -} - -// Decode a slice of slice of bytes ([][]byte). -func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - v := structPointer_BytesSlice(base, p.field) - *v = append(*v, b) - return nil -} - -// Decode a map field. -func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - oi := o.index // index at the end of this map entry - o.index -= len(raw) // move buffer back to start of map entry - - mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V - if mptr.Elem().IsNil() { - mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) - } - v := mptr.Elem() // map[K]V - - // Prepare addressable doubly-indirect placeholders for the key and value types. - // See enc_new_map for why. - keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K - keybase := toStructPointer(keyptr.Addr()) // **K - - var valbase structPointer - var valptr reflect.Value - switch p.mtype.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valptr = reflect.ValueOf(&dummy) // *[]byte - valbase = toStructPointer(valptr) // *[]byte - case reflect.Ptr: - // message; valptr is **Msg; need to allocate the intermediate pointer - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valptr.Set(reflect.New(valptr.Type().Elem())) - valbase = toStructPointer(valptr) - default: - // everything else - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valbase = toStructPointer(valptr.Addr()) // **V - } - - // Decode. - // This parses a restricted wire format, namely the encoding of a message - // with two fields. See enc_new_map for the format. - for o.index < oi { - // tagcode for key and value properties are always a single byte - // because they have tags 1 and 2. - tagcode := o.buf[o.index] - o.index++ - switch tagcode { - case p.mkeyprop.tagcode[0]: - if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { - return err - } - case p.mvalprop.tagcode[0]: - if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { - return err - } - default: - // TODO: Should we silently skip this instead? - return fmt.Errorf("proto: bad map data tag %d", raw[0]) - } - } - keyelem, valelem := keyptr.Elem(), valptr.Elem() - if !keyelem.IsValid() { - keyelem = reflect.Zero(p.mtype.Key()) - } - if !valelem.IsValid() { - valelem = reflect.Zero(p.mtype.Elem()) - } - - v.SetMapIndex(keyelem, valelem) - return nil -} - -// Decode a group. -func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - return o.unmarshalType(p.stype, p.sprop, true, bas) -} - -// Decode an embedded message. -func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := structPointer_Interface(bas, p.stype) - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of embedded messages. -func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, false, base) -} - -// Decode a slice of embedded groups. -func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, true, base) -} - -// Decode a slice of structs ([]*struct). -func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { - v := reflect.New(p.stype) - bas := toStructPointer(v) - structPointer_StructPointerSlice(base, p.field).Append(bas) - - if is_group { - err := o.unmarshalType(p.stype, p.sprop, is_group, bas) - return err - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := v.Interface() - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, bas) - - o.buf = obuf - o.index = oi - - return err -} diff --git a/vendor/github.com/golang/protobuf/proto/decode_test.go b/vendor/github.com/golang/protobuf/proto/decode_test.go deleted file mode 100644 index 2c4c31d12..000000000 --- a/vendor/github.com/golang/protobuf/proto/decode_test.go +++ /dev/null @@ -1,258 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build go1.7 - -package proto_test - -import ( - "fmt" - "testing" - - "github.com/golang/protobuf/proto" - tpb "github.com/golang/protobuf/proto/proto3_proto" -) - -var ( - bytesBlackhole []byte - msgBlackhole = new(tpb.Message) -) - -// BenchmarkVarint32ArraySmall shows the performance on an array of small int32 fields (1 and -// 2 bytes long). -func BenchmarkVarint32ArraySmall(b *testing.B) { - for i := uint(1); i <= 10; i++ { - dist := genInt32Dist([7]int{0, 3, 1}, 1<2GB. - ErrTooLarge = errors.New("proto: message encodes to over 2 GB") -) - -// The fundamental encoders that put bytes on the wire. -// Those that take integer types all accept uint64 and are -// therefore of type valueEncoder. - -const maxVarintBytes = 10 // maximum length of a varint - -// maxMarshalSize is the largest allowed size of an encoded protobuf, -// since C++ and Java use signed int32s for the size. -const maxMarshalSize = 1<<31 - 1 - -// EncodeVarint returns the varint encoding of x. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -// Not used by the package itself, but helpful to clients -// wishing to use the same encoding. -func EncodeVarint(x uint64) []byte { - var buf [maxVarintBytes]byte - var n int - for n = 0; x > 127; n++ { - buf[n] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - buf[n] = uint8(x) - n++ - return buf[0:n] -} - -// EncodeVarint writes a varint-encoded integer to the Buffer. -// This is the format for the -// int32, int64, uint32, uint64, bool, and enum -// protocol buffer types. -func (p *Buffer) EncodeVarint(x uint64) error { - for x >= 1<<7 { - p.buf = append(p.buf, uint8(x&0x7f|0x80)) - x >>= 7 - } - p.buf = append(p.buf, uint8(x)) - return nil -} - -// SizeVarint returns the varint encoding size of an integer. -func SizeVarint(x uint64) int { - return sizeVarint(x) -} - -func sizeVarint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} - -// EncodeFixed64 writes a 64-bit integer to the Buffer. -// This is the format for the -// fixed64, sfixed64, and double protocol buffer types. -func (p *Buffer) EncodeFixed64(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24), - uint8(x>>32), - uint8(x>>40), - uint8(x>>48), - uint8(x>>56)) - return nil -} - -func sizeFixed64(x uint64) int { - return 8 -} - -// EncodeFixed32 writes a 32-bit integer to the Buffer. -// This is the format for the -// fixed32, sfixed32, and float protocol buffer types. -func (p *Buffer) EncodeFixed32(x uint64) error { - p.buf = append(p.buf, - uint8(x), - uint8(x>>8), - uint8(x>>16), - uint8(x>>24)) - return nil -} - -func sizeFixed32(x uint64) int { - return 4 -} - -// EncodeZigzag64 writes a zigzag-encoded 64-bit integer -// to the Buffer. -// This is the format used for the sint64 protocol buffer type. -func (p *Buffer) EncodeZigzag64(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint((x << 1) ^ uint64((int64(x) >> 63))) -} - -func sizeZigzag64(x uint64) int { - return sizeVarint((x << 1) ^ uint64((int64(x) >> 63))) -} - -// EncodeZigzag32 writes a zigzag-encoded 32-bit integer -// to the Buffer. -// This is the format used for the sint32 protocol buffer type. -func (p *Buffer) EncodeZigzag32(x uint64) error { - // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -func sizeZigzag32(x uint64) int { - return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - -// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. -// This is the format used for the bytes protocol buffer -// type and for embedded messages. -func (p *Buffer) EncodeRawBytes(b []byte) error { - p.EncodeVarint(uint64(len(b))) - p.buf = append(p.buf, b...) - return nil -} - -func sizeRawBytes(b []byte) int { - return sizeVarint(uint64(len(b))) + - len(b) -} - -// EncodeStringBytes writes an encoded string to the Buffer. -// This is the format used for the proto2 string type. -func (p *Buffer) EncodeStringBytes(s string) error { - p.EncodeVarint(uint64(len(s))) - p.buf = append(p.buf, s...) - return nil -} - -func sizeStringBytes(s string) int { - return sizeVarint(uint64(len(s))) + - len(s) -} - -// Marshaler is the interface representing objects that can marshal themselves. -type Marshaler interface { - Marshal() ([]byte, error) -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, returning the data. -func Marshal(pb Message) ([]byte, error) { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - return m.Marshal() - } - p := NewBuffer(nil) - err := p.Marshal(pb) - if p.buf == nil && err == nil { - // Return a non-nil slice on success. - return []byte{}, nil - } - return p.buf, err -} - -// EncodeMessage writes the protocol buffer to the Buffer, -// prefixed by a varint-encoded length. -func (p *Buffer) EncodeMessage(pb Message) error { - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - var state errorState - err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) - } - return err -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, writing the result to the -// Buffer. -func (p *Buffer) Marshal(pb Message) error { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - data, err := m.Marshal() - p.buf = append(p.buf, data...) - return err - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - err = p.enc_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Encode++ // Parens are to work around a goimports bug. - } - - if len(p.buf) > maxMarshalSize { - return ErrTooLarge - } - return err -} - -// Size returns the encoded size of a protocol buffer. -func Size(pb Message) (n int) { - // Can the object marshal itself? If so, Size is slow. - // TODO: add Size to Marshaler, or add a Sizer interface. - if m, ok := pb.(Marshaler); ok { - b, _ := m.Marshal() - return len(b) - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return 0 - } - if err == nil { - n = size_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Size++ // Parens are to work around a goimports bug. - } - - return -} - -// Individual type encoders. - -// Encode a bool. -func (o *Buffer) enc_bool(p *Properties, base structPointer) error { - v := *structPointer_Bool(base, p.field) - if v == nil { - return ErrNil - } - x := 0 - if *v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - if !v { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, 1) - return nil -} - -func size_bool(p *Properties, base structPointer) int { - v := *structPointer_Bool(base, p.field) - if v == nil { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -func size_proto3_bool(p *Properties, base structPointer) int { - v := *structPointer_BoolVal(base, p.field) - if !v && !p.oneof { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode an int32. -func (o *Buffer) enc_int32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a uint32. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := word32_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := word32_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode an int64. -func (o *Buffer) enc_int64(p *Properties, base structPointer) error { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return ErrNil - } - x := word64_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return 0 - } - x := word64_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -func size_proto3_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a string. -func (o *Buffer) enc_string(p *Properties, base structPointer) error { - v := *structPointer_String(base, p.field) - if v == nil { - return ErrNil - } - x := *v - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(x) - return nil -} - -func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - if v == "" { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_string(p *Properties, base structPointer) (n int) { - v := *structPointer_String(base, p.field) - if v == nil { - return 0 - } - x := *v - n += len(p.tagcode) - n += sizeStringBytes(x) - return -} - -func size_proto3_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - if v == "" && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeStringBytes(v) - return -} - -// All protocol buffer fields are nillable, but be careful. -func isNil(v reflect.Value) bool { - switch v.Kind() { - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() - } - return false -} - -// Encode a message struct. -func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return state.err - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -func size_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a group struct. -func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { - var state errorState - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return ErrNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - err := o.enc_struct(p.sprop, b) - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return state.err -} - -func size_struct_group(p *Properties, base structPointer) (n int) { - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return 0 - } - - n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) - n += size_struct(p.sprop, b) - n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return -} - -// Encode a slice of bools ([]bool). -func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - for _, x := range s { - o.buf = append(o.buf, p.tagcode...) - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_bool(p *Properties, base structPointer) int { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - return l * (len(p.tagcode) + 1) // each bool takes exactly one byte -} - -// Encode a slice of bools ([]bool) in packed format. -func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(l)) // each bool takes exactly one byte - for _, x := range s { - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_packed_bool(p *Properties, base structPointer) (n int) { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - n += len(p.tagcode) - n += sizeVarint(uint64(l)) - n += l // each bool takes exactly one byte - return -} - -// Encode a slice of bytes ([]byte). -func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func size_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -// Encode a slice of int32s ([]int32). -func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of int32s ([]int32) in packed format. -func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(buf, uint64(x)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - bufSize += p.valSize(uint64(x)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of uint32s ([]uint32). -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := s.Index(i) - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := s.Index(i) - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of uint32s ([]uint32) in packed format. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, uint64(s.Index(i))) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(uint64(s.Index(i))) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of int64s ([]int64). -func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, s.Index(i)) - } - return nil -} - -func size_slice_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - n += p.valSize(s.Index(i)) - } - return -} - -// Encode a slice of int64s ([]int64) in packed format. -func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, s.Index(i)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(s.Index(i)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of slice of bytes ([][]byte). -func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(ss[i]) - } - return nil -} - -func size_slice_slice_byte(p *Properties, base structPointer) (n int) { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return 0 - } - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeRawBytes(ss[i]) - } - return -} - -// Encode a slice of strings ([]string). -func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(ss[i]) - } - return nil -} - -func size_slice_string(p *Properties, base structPointer) (n int) { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeStringBytes(ss[i]) - } - return -} - -// Encode a slice of message structs ([]*struct). -func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - } - return state.err -} - -func size_slice_struct_message(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -// Encode a slice of group structs ([]*struct). -func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return errRepeatedHasNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - - err := o.enc_struct(p.sprop, b) - - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - } - return state.err -} - -func size_slice_struct_group(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) - n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return // return size up to this point - } - - n += size_struct(p.sprop, b) - } - return -} - -// Encode an extension map. -func (o *Buffer) enc_map(p *Properties, base structPointer) error { - exts := structPointer_ExtMap(base, p.field) - if err := encodeExtensionsMap(*exts); err != nil { - return err - } - - return o.enc_map_body(*exts) -} - -func (o *Buffer) enc_exts(p *Properties, base structPointer) error { - exts := structPointer_Extensions(base, p.field) - - v, mu := exts.extensionsRead() - if v == nil { - return nil - } - - mu.Lock() - defer mu.Unlock() - if err := encodeExtensionsMap(v); err != nil { - return err - } - - return o.enc_map_body(v) -} - -func (o *Buffer) enc_map_body(v map[int32]Extension) error { - // Fast-path for common cases: zero or one extensions. - if len(v) <= 1 { - for _, e := range v { - o.buf = append(o.buf, e.enc...) - } - return nil - } - - // Sort keys to provide a deterministic encoding. - keys := make([]int, 0, len(v)) - for k := range v { - keys = append(keys, int(k)) - } - sort.Ints(keys) - - for _, k := range keys { - o.buf = append(o.buf, v[int32(k)].enc...) - } - return nil -} - -func size_map(p *Properties, base structPointer) int { - v := structPointer_ExtMap(base, p.field) - return extensionsMapSize(*v) -} - -func size_exts(p *Properties, base structPointer) int { - v := structPointer_Extensions(base, p.field) - return extensionsSize(v) -} - -// Encode a map field. -func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { - var state errorState // XXX: or do we need to plumb this through? - - /* - A map defined as - map map_field = N; - is encoded in the same way as - message MapFieldEntry { - key_type key = 1; - value_type value = 2; - } - repeated MapFieldEntry map_field = N; - */ - - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - if v.Len() == 0 { - return nil - } - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - enc := func() error { - if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { - return err - } - if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil { - return err - } - return nil - } - - // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - - keycopy.Set(key) - valcopy.Set(val) - - o.buf = append(o.buf, p.tagcode...) - if err := o.enc_len_thing(enc, &state); err != nil { - return err - } - } - return nil -} - -func size_new_map(p *Properties, base structPointer) int { - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - n := 0 - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - keycopy.Set(key) - valcopy.Set(val) - - // Tag codes for key and val are the responsibility of the sub-sizer. - keysize := p.mkeyprop.size(p.mkeyprop, keybase) - valsize := p.mvalprop.size(p.mvalprop, valbase) - entry := keysize + valsize - // Add on tag code and length of map entry itself. - n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry - } - return n -} - -// mapEncodeScratch returns a new reflect.Value matching the map's value type, -// and a structPointer suitable for passing to an encoder or sizer. -func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { - // Prepare addressable doubly-indirect placeholders for the key and value types. - // This is needed because the element-type encoders expect **T, but the map iteration produces T. - - keycopy = reflect.New(mapType.Key()).Elem() // addressable K - keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K - keyptr.Set(keycopy.Addr()) // - keybase = toStructPointer(keyptr.Addr()) // **K - - // Value types are more varied and require special handling. - switch mapType.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte - valbase = toStructPointer(valcopy.Addr()) - case reflect.Ptr: - // message; the generated field type is map[K]*Msg (so V is *Msg), - // so we only need one level of indirection. - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valbase = toStructPointer(valcopy.Addr()) - default: - // everything else - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V - valptr.Set(valcopy.Addr()) // - valbase = toStructPointer(valptr.Addr()) // **V - } - return -} - -// Encode a struct. -func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { - var state errorState - // Encode fields in tag order so that decoders may use optimizations - // that depend on the ordering. - // https://developers.google.com/protocol-buffers/docs/encoding#order - for _, i := range prop.order { - p := prop.Prop[i] - if p.enc != nil { - err := p.enc(o, p, base) - if err != nil { - if err == ErrNil { - if p.Required && state.err == nil { - state.err = &RequiredNotSetError{p.Name} - } - } else if err == errRepeatedHasNil { - // Give more context to nil values in repeated fields. - return errors.New("repeated field " + p.OrigName + " has nil element") - } else if !state.shouldContinue(err, p) { - return err - } - } - if len(o.buf) > maxMarshalSize { - return ErrTooLarge - } - } - } - - // Do oneof fields. - if prop.oneofMarshaler != nil { - m := structPointer_Interface(base, prop.stype).(Message) - if err := prop.oneofMarshaler(m, o); err == ErrNil { - return errOneofHasNil - } else if err != nil { - return err - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - if len(o.buf)+len(v) > maxMarshalSize { - return ErrTooLarge - } - if len(v) > 0 { - o.buf = append(o.buf, v...) - } - } - - return state.err -} - -func size_struct(prop *StructProperties, base structPointer) (n int) { - for _, i := range prop.order { - p := prop.Prop[i] - if p.size != nil { - n += p.size(p, base) - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - n += len(v) - } - - // Factor in any oneof fields. - if prop.oneofSizer != nil { - m := structPointer_Interface(base, prop.stype).(Message) - n += prop.oneofSizer(m) - } - - return -} - -var zeroes [20]byte // longer than any conceivable sizeVarint - -// Encode a struct, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { - return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) -} - -// Encode something, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { - iLen := len(o.buf) - o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length - iMsg := len(o.buf) - err := enc() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - lMsg := len(o.buf) - iMsg - lLen := sizeVarint(uint64(lMsg)) - switch x := lLen - (iMsg - iLen); { - case x > 0: // actual length is x bytes larger than the space we reserved - // Move msg x bytes right. - o.buf = append(o.buf, zeroes[:x]...) - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - case x < 0: // actual length is x bytes smaller than the space we reserved - // Move msg x bytes left. - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - o.buf = o.buf[:len(o.buf)+x] // x is negative - } - // Encode the length in the reserved space. - o.buf = o.buf[:iLen] - o.EncodeVarint(uint64(lMsg)) - o.buf = o.buf[:len(o.buf)+lMsg] - return state.err -} - -// errorState maintains the first error that occurs and updates that error -// with additional context. -type errorState struct { - err error -} - -// shouldContinue reports whether encoding should continue upon encountering the -// given error. If the error is RequiredNotSetError, shouldContinue returns true -// and, if this is the first appearance of that error, remembers it for future -// reporting. -// -// If prop is not nil, it may update any error with additional context about the -// field with the error. -func (s *errorState) shouldContinue(err error, prop *Properties) bool { - // Ignore unset required fields. - reqNotSet, ok := err.(*RequiredNotSetError) - if !ok { - return false - } - if s.err == nil { - if prop != nil { - err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} - } - s.err = err - } - return true -} diff --git a/vendor/github.com/golang/protobuf/proto/encode_test.go b/vendor/github.com/golang/protobuf/proto/encode_test.go deleted file mode 100644 index a7209475f..000000000 --- a/vendor/github.com/golang/protobuf/proto/encode_test.go +++ /dev/null @@ -1,85 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build go1.7 - -package proto_test - -import ( - "strconv" - "testing" - - "github.com/golang/protobuf/proto" - tpb "github.com/golang/protobuf/proto/proto3_proto" - "github.com/golang/protobuf/ptypes" -) - -var ( - blackhole []byte -) - -// BenchmarkAny creates increasingly large arbitrary Any messages. The type is always the -// same. -func BenchmarkAny(b *testing.B) { - data := make([]byte, 1<<20) - quantum := 1 << 10 - for i := uint(0); i <= 10; i++ { - b.Run(strconv.Itoa(quantum<= len(o.buf) { - break - } - } - return value.Interface(), nil -} - -// GetExtensions returns a slice of the extensions present in pb that are also listed in es. -// The returned slice has the same length as es; missing extensions will appear as nil elements. -func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { - epb, ok := extendable(pb) - if !ok { - return nil, errors.New("proto: not an extendable proto") - } - extensions = make([]interface{}, len(es)) - for i, e := range es { - extensions[i], err = GetExtension(epb, e) - if err == ErrMissingExtension { - err = nil - } - if err != nil { - return - } - } - return -} - -// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. -// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing -// just the Field field, which defines the extension's field number. -func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { - epb, ok := extendable(pb) - if !ok { - return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb) - } - registeredExtensions := RegisteredExtensions(pb) - - emap, mu := epb.extensionsRead() - if emap == nil { - return nil, nil - } - mu.Lock() - defer mu.Unlock() - extensions := make([]*ExtensionDesc, 0, len(emap)) - for extid, e := range emap { - desc := e.desc - if desc == nil { - desc = registeredExtensions[extid] - if desc == nil { - desc = &ExtensionDesc{Field: extid} - } - } - - extensions = append(extensions, desc) - } - return extensions, nil -} - -// SetExtension sets the specified extension of pb to the specified value. -func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { - epb, ok := extendable(pb) - if !ok { - return errors.New("proto: not an extendable proto") - } - if err := checkExtensionTypes(epb, extension); err != nil { - return err - } - typ := reflect.TypeOf(extension.ExtensionType) - if typ != reflect.TypeOf(value) { - return errors.New("proto: bad extension value type") - } - // nil extension values need to be caught early, because the - // encoder can't distinguish an ErrNil due to a nil extension - // from an ErrNil due to a missing field. Extensions are - // always optional, so the encoder would just swallow the error - // and drop all the extensions from the encoded message. - if reflect.ValueOf(value).IsNil() { - return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) - } - - extmap := epb.extensionsWrite() - extmap[extension.Field] = Extension{desc: extension, value: value} - return nil -} - -// ClearAllExtensions clears all extensions from pb. -func ClearAllExtensions(pb Message) { - epb, ok := extendable(pb) - if !ok { - return - } - m := epb.extensionsWrite() - for k := range m { - delete(m, k) - } -} - -// A global registry of extensions. -// The generated code will register the generated descriptors by calling RegisterExtension. - -var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) - -// RegisterExtension is called from the generated code. -func RegisterExtension(desc *ExtensionDesc) { - st := reflect.TypeOf(desc.ExtendedType).Elem() - m := extensionMaps[st] - if m == nil { - m = make(map[int32]*ExtensionDesc) - extensionMaps[st] = m - } - if _, ok := m[desc.Field]; ok { - panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) - } - m[desc.Field] = desc -} - -// RegisteredExtensions returns a map of the registered extensions of a -// protocol buffer struct, indexed by the extension number. -// The argument pb should be a nil pointer to the struct type. -func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { - return extensionMaps[reflect.TypeOf(pb).Elem()] -} diff --git a/vendor/github.com/golang/protobuf/proto/extensions_test.go b/vendor/github.com/golang/protobuf/proto/extensions_test.go deleted file mode 100644 index b6d9114c5..000000000 --- a/vendor/github.com/golang/protobuf/proto/extensions_test.go +++ /dev/null @@ -1,536 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "bytes" - "fmt" - "reflect" - "sort" - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/proto/testdata" - "golang.org/x/sync/errgroup" -) - -func TestGetExtensionsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", err) - } - exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ - pb.E_Ext_More, - pb.E_Ext_Text, - }) - if err != nil { - t.Fatalf("GetExtensions() failed: %s", err) - } - if exts[0] != ext1 { - t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) - } - if exts[1] != nil { - t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) - } -} - -func TestExtensionDescsWithMissingExtensions(t *testing.T) { - msg := &pb.MyMessage{Count: proto.Int32(0)} - extdesc1 := pb.E_Ext_More - if descs, err := proto.ExtensionDescs(msg); len(descs) != 0 || err != nil { - t.Errorf("proto.ExtensionDescs: got %d descs, error %v; want 0, nil", len(descs), err) - } - - ext1 := &pb.Ext{} - if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { - t.Fatalf("Could not set ext1: %s", err) - } - extdesc2 := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 123456789, - Name: "a.b", - Tag: "varint,123456789,opt", - } - ext2 := proto.Bool(false) - if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { - t.Fatalf("Could not set ext2: %s", err) - } - - b, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Could not marshal msg: %v", err) - } - if err := proto.Unmarshal(b, msg); err != nil { - t.Fatalf("Could not unmarshal into msg: %v", err) - } - - descs, err := proto.ExtensionDescs(msg) - if err != nil { - t.Fatalf("proto.ExtensionDescs: got error %v", err) - } - sortExtDescs(descs) - wantDescs := []*proto.ExtensionDesc{extdesc1, &proto.ExtensionDesc{Field: extdesc2.Field}} - if !reflect.DeepEqual(descs, wantDescs) { - t.Errorf("proto.ExtensionDescs(msg) sorted extension ids: got %+v, want %+v", descs, wantDescs) - } -} - -type ExtensionDescSlice []*proto.ExtensionDesc - -func (s ExtensionDescSlice) Len() int { return len(s) } -func (s ExtensionDescSlice) Less(i, j int) bool { return s[i].Field < s[j].Field } -func (s ExtensionDescSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -func sortExtDescs(s []*proto.ExtensionDesc) { - sort.Sort(ExtensionDescSlice(s)) -} - -func TestGetExtensionStability(t *testing.T) { - check := func(m *pb.MyMessage) bool { - ext1, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - ext2, err := proto.GetExtension(m, pb.E_Ext_More) - if err != nil { - t.Fatalf("GetExtension() failed: %s", err) - } - return ext1 == ext2 - } - msg := &pb.MyMessage{Count: proto.Int32(4)} - ext0 := &pb.Ext{} - if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { - t.Fatalf("Could not set ext1: %s", ext0) - } - if !check(msg) { - t.Errorf("GetExtension() not stable before marshaling") - } - bb, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("Marshal() failed: %s", err) - } - msg1 := &pb.MyMessage{} - err = proto.Unmarshal(bb, msg1) - if err != nil { - t.Fatalf("Unmarshal() failed: %s", err) - } - if !check(msg1) { - t.Errorf("GetExtension() not stable after unmarshaling") - } -} - -func TestGetExtensionDefaults(t *testing.T) { - var setFloat64 float64 = 1 - var setFloat32 float32 = 2 - var setInt32 int32 = 3 - var setInt64 int64 = 4 - var setUint32 uint32 = 5 - var setUint64 uint64 = 6 - var setBool = true - var setBool2 = false - var setString = "Goodnight string" - var setBytes = []byte("Goodnight bytes") - var setEnum = pb.DefaultsMessage_TWO - - type testcase struct { - ext *proto.ExtensionDesc // Extension we are testing. - want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). - def interface{} // Expected value of extension after ClearExtension(). - } - tests := []testcase{ - {pb.E_NoDefaultDouble, setFloat64, nil}, - {pb.E_NoDefaultFloat, setFloat32, nil}, - {pb.E_NoDefaultInt32, setInt32, nil}, - {pb.E_NoDefaultInt64, setInt64, nil}, - {pb.E_NoDefaultUint32, setUint32, nil}, - {pb.E_NoDefaultUint64, setUint64, nil}, - {pb.E_NoDefaultSint32, setInt32, nil}, - {pb.E_NoDefaultSint64, setInt64, nil}, - {pb.E_NoDefaultFixed32, setUint32, nil}, - {pb.E_NoDefaultFixed64, setUint64, nil}, - {pb.E_NoDefaultSfixed32, setInt32, nil}, - {pb.E_NoDefaultSfixed64, setInt64, nil}, - {pb.E_NoDefaultBool, setBool, nil}, - {pb.E_NoDefaultBool, setBool2, nil}, - {pb.E_NoDefaultString, setString, nil}, - {pb.E_NoDefaultBytes, setBytes, nil}, - {pb.E_NoDefaultEnum, setEnum, nil}, - {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, - {pb.E_DefaultFloat, setFloat32, float32(3.14)}, - {pb.E_DefaultInt32, setInt32, int32(42)}, - {pb.E_DefaultInt64, setInt64, int64(43)}, - {pb.E_DefaultUint32, setUint32, uint32(44)}, - {pb.E_DefaultUint64, setUint64, uint64(45)}, - {pb.E_DefaultSint32, setInt32, int32(46)}, - {pb.E_DefaultSint64, setInt64, int64(47)}, - {pb.E_DefaultFixed32, setUint32, uint32(48)}, - {pb.E_DefaultFixed64, setUint64, uint64(49)}, - {pb.E_DefaultSfixed32, setInt32, int32(50)}, - {pb.E_DefaultSfixed64, setInt64, int64(51)}, - {pb.E_DefaultBool, setBool, true}, - {pb.E_DefaultBool, setBool2, true}, - {pb.E_DefaultString, setString, "Hello, string"}, - {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, - {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, - } - - checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { - val, err := proto.GetExtension(msg, test.ext) - if err != nil { - if valWant != nil { - return fmt.Errorf("GetExtension(): %s", err) - } - if want := proto.ErrMissingExtension; err != want { - return fmt.Errorf("Unexpected error: got %v, want %v", err, want) - } - return nil - } - - // All proto2 extension values are either a pointer to a value or a slice of values. - ty := reflect.TypeOf(val) - tyWant := reflect.TypeOf(test.ext.ExtensionType) - if got, want := ty, tyWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) - } - tye := ty.Elem() - tyeWant := tyWant.Elem() - if got, want := tye, tyeWant; got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) - } - - // Check the name of the type of the value. - // If it is an enum it will be type int32 with the name of the enum. - if got, want := tye.Name(), tye.Name(); got != want { - return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) - } - - // Check that value is what we expect. - // If we have a pointer in val, get the value it points to. - valExp := val - if ty.Kind() == reflect.Ptr { - valExp = reflect.ValueOf(val).Elem().Interface() - } - if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { - return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) - } - - return nil - } - - setTo := func(test testcase) interface{} { - setTo := reflect.ValueOf(test.want) - if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { - setTo = reflect.New(typ).Elem() - setTo.Set(reflect.New(setTo.Type().Elem())) - setTo.Elem().Set(reflect.ValueOf(test.want)) - } - return setTo.Interface() - } - - for _, test := range tests { - msg := &pb.DefaultsMessage{} - name := test.ext.Name - - // Check the initial value. - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - - // Set the per-type value and check value. - name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) - if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { - t.Errorf("%s: SetExtension(): %v", name, err) - continue - } - if err := checkVal(test, msg, test.want); err != nil { - t.Errorf("%s: %v", name, err) - continue - } - - // Set and check the value. - name += " (cleared)" - proto.ClearExtension(msg, test.ext) - if err := checkVal(test, msg, test.def); err != nil { - t.Errorf("%s: %v", name, err) - } - } -} - -func TestExtensionsRoundTrip(t *testing.T) { - msg := &pb.MyMessage{} - ext1 := &pb.Ext{ - Data: proto.String("hi"), - } - ext2 := &pb.Ext{ - Data: proto.String("there"), - } - exists := proto.HasExtension(msg, pb.E_Ext_More) - if exists { - t.Error("Extension More present unexpectedly") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { - t.Error(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { - t.Error(err) - } - e, err := proto.GetExtension(msg, pb.E_Ext_More) - if err != nil { - t.Error(err) - } - x, ok := e.(*pb.Ext) - if !ok { - t.Errorf("e has type %T, expected testdata.Ext", e) - } else if *x.Data != "there" { - t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) - } - proto.ClearExtension(msg, pb.E_Ext_More) - if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { - t.Errorf("got %v, expected ErrMissingExtension", e) - } - if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { - t.Error("expected bad extension error, got nil") - } - if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { - t.Error("expected extension err") - } - if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { - t.Error("expected some sort of type mismatch error, got nil") - } -} - -func TestNilExtension(t *testing.T) { - msg := &pb.MyMessage{ - Count: proto.Int32(1), - } - if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { - t.Fatal(err) - } - if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { - t.Error("expected SetExtension to fail due to a nil extension") - } else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want { - t.Errorf("expected error %v, got %v", want, err) - } - // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update - // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. -} - -func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { - // Add a repeated extension to the result. - tests := []struct { - name string - ext []*pb.ComplexExtension - }{ - { - "two fields", - []*pb.ComplexExtension{ - {First: proto.Int32(7)}, - {Second: proto.Int32(11)}, - }, - }, - { - "repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {Third: []int32{2000}}, - }, - }, - { - "two fields and repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {First: proto.Int32(9)}, - {Second: proto.Int32(21)}, - {Third: []int32{2000}}, - }, - }, - } - for _, test := range tests { - // Marshal message with a repeated extension. - msg1 := new(pb.OtherMessage) - err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) - if err != nil { - t.Fatalf("[%s] Error setting extension: %v", test.name, err) - } - b, err := proto.Marshal(msg1) - if err != nil { - t.Fatalf("[%s] Error marshaling message: %v", test.name, err) - } - - // Unmarshal and read the merged proto. - msg2 := new(pb.OtherMessage) - err = proto.Unmarshal(b, msg2) - if err != nil { - t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) - } - e, err := proto.GetExtension(msg2, pb.E_RComplex) - if err != nil { - t.Fatalf("[%s] Error getting extension: %v", test.name, err) - } - ext := e.([]*pb.ComplexExtension) - if ext == nil { - t.Fatalf("[%s] Invalid extension", test.name) - } - if !reflect.DeepEqual(ext, test.ext) { - t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext) - } - } -} - -func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { - // We may see multiple instances of the same extension in the wire - // format. For example, the proto compiler may encode custom options in - // this way. Here, we verify that we merge the extensions together. - tests := []struct { - name string - ext []*pb.ComplexExtension - }{ - { - "two fields", - []*pb.ComplexExtension{ - {First: proto.Int32(7)}, - {Second: proto.Int32(11)}, - }, - }, - { - "repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {Third: []int32{2000}}, - }, - }, - { - "two fields and repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {First: proto.Int32(9)}, - {Second: proto.Int32(21)}, - {Third: []int32{2000}}, - }, - }, - } - for _, test := range tests { - var buf bytes.Buffer - var want pb.ComplexExtension - - // Generate a serialized representation of a repeated extension - // by catenating bytes together. - for i, e := range test.ext { - // Merge to create the wanted proto. - proto.Merge(&want, e) - - // serialize the message - msg := new(pb.OtherMessage) - err := proto.SetExtension(msg, pb.E_Complex, e) - if err != nil { - t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) - } - b, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) - } - buf.Write(b) - } - - // Unmarshal and read the merged proto. - msg2 := new(pb.OtherMessage) - err := proto.Unmarshal(buf.Bytes(), msg2) - if err != nil { - t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) - } - e, err := proto.GetExtension(msg2, pb.E_Complex) - if err != nil { - t.Fatalf("[%s] Error getting extension: %v", test.name, err) - } - ext := e.(*pb.ComplexExtension) - if ext == nil { - t.Fatalf("[%s] Invalid extension", test.name) - } - if !reflect.DeepEqual(*ext, want) { - t.Errorf("[%s] Wrong value for ComplexExtension: got: %s want: %s\n", test.name, ext, want) - } - } -} - -func TestClearAllExtensions(t *testing.T) { - // unregistered extension - desc := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 101010100, - Name: "emptyextension", - Tag: "varint,0,opt", - } - m := &pb.MyMessage{} - if proto.HasExtension(m, desc) { - t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) - } - if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { - t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) - } - if !proto.HasExtension(m, desc) { - t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m)) - } - proto.ClearAllExtensions(m) - if proto.HasExtension(m, desc) { - t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) - } -} - -func TestMarshalRace(t *testing.T) { - // unregistered extension - desc := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 101010100, - Name: "emptyextension", - Tag: "varint,0,opt", - } - - m := &pb.MyMessage{Count: proto.Int32(4)} - if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { - t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) - } - - var g errgroup.Group - for n := 3; n > 0; n-- { - g.Go(func() error { - _, err := proto.Marshal(m) - return err - }) - } - if err := g.Wait(); err != nil { - t.Fatal(err) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go deleted file mode 100644 index 1c225504a..000000000 --- a/vendor/github.com/golang/protobuf/proto/lib.go +++ /dev/null @@ -1,897 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package proto converts data structures to and from the wire format of -protocol buffers. It works in concert with the Go source code generated -for .proto files by the protocol compiler. - -A summary of the properties of the protocol buffer interface -for a protocol buffer variable v: - - - Names are turned from camel_case to CamelCase for export. - - There are no methods on v to set fields; just treat - them as structure fields. - - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. - - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. - - A Reset() method will restore a protobuf struct to its zero state. - - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. - - Repeated fields are slices. - - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field - - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. - - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. - - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. - - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. - - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. - - Marshal and Unmarshal are functions to encode and decode the wire format. - -When the .proto file specifies `syntax="proto3"`, there are some differences: - - - Non-repeated fields of non-message type are values instead of pointers. - - Enum types do not get an Enum method. - -The simplest way to describe this is to see an example. -Given file test.proto, containing - - package example; - - enum FOO { X = 17; } - - message Test { - required string label = 1; - optional int32 type = 2 [default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } - oneof union { - int32 number = 6; - string name = 7; - } - } - -The resulting file, test.pb.go, is: - - package example - - import proto "github.com/golang/protobuf/proto" - import math "math" - - type FOO int32 - const ( - FOO_X FOO = 17 - ) - var FOO_name = map[int32]string{ - 17: "X", - } - var FOO_value = map[string]int32{ - "X": 17, - } - - func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p - } - func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) - } - func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data) - if err != nil { - return err - } - *x = FOO(value) - return nil - } - - type Test struct { - Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` - Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` - Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` - Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - // Types that are valid to be assigned to Union: - // *Test_Number - // *Test_Name - Union isTest_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` - } - func (m *Test) Reset() { *m = Test{} } - func (m *Test) String() string { return proto.CompactTextString(m) } - func (*Test) ProtoMessage() {} - - type isTest_Union interface { - isTest_Union() - } - - type Test_Number struct { - Number int32 `protobuf:"varint,6,opt,name=number"` - } - type Test_Name struct { - Name string `protobuf:"bytes,7,opt,name=name"` - } - - func (*Test_Number) isTest_Union() {} - func (*Test_Name) isTest_Union() {} - - func (m *Test) GetUnion() isTest_Union { - if m != nil { - return m.Union - } - return nil - } - const Default_Test_Type int32 = 77 - - func (m *Test) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" - } - - func (m *Test) GetType() int32 { - if m != nil && m.Type != nil { - return *m.Type - } - return Default_Test_Type - } - - func (m *Test) GetOptionalgroup() *Test_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil - } - - type Test_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` - } - func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } - func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } - - func (m *Test_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" - } - - func (m *Test) GetNumber() int32 { - if x, ok := m.GetUnion().(*Test_Number); ok { - return x.Number - } - return 0 - } - - func (m *Test) GetName() string { - if x, ok := m.GetUnion().(*Test_Name); ok { - return x.Name - } - return "" - } - - func init() { - proto.RegisterEnum("example.FOO", FOO_name, FOO_value) - } - -To create and play with a Test object: - - package main - - import ( - "log" - - "github.com/golang/protobuf/proto" - pb "./example.pb" - ) - - func main() { - test := &pb.Test{ - Label: proto.String("hello"), - Type: proto.Int32(17), - Reps: []int64{1, 2, 3}, - Optionalgroup: &pb.Test_OptionalGroup{ - RequiredField: proto.String("good bye"), - }, - Union: &pb.Test_Name{"fred"}, - } - data, err := proto.Marshal(test) - if err != nil { - log.Fatal("marshaling error: ", err) - } - newTest := &pb.Test{} - err = proto.Unmarshal(data, newTest) - if err != nil { - log.Fatal("unmarshaling error: ", err) - } - // Now test and newTest contain the same data. - if test.GetLabel() != newTest.GetLabel() { - log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) - } - // Use a type switch to determine which oneof was set. - switch u := test.Union.(type) { - case *pb.Test_Number: // u.Number contains the number. - case *pb.Test_Name: // u.Name contains the string. - } - // etc. - } -*/ -package proto - -import ( - "encoding/json" - "fmt" - "log" - "reflect" - "sort" - "strconv" - "sync" -) - -// Message is implemented by generated protocol buffer messages. -type Message interface { - Reset() - String() string - ProtoMessage() -} - -// Stats records allocation details about the protocol buffer encoders -// and decoders. Useful for tuning the library itself. -type Stats struct { - Emalloc uint64 // mallocs in encode - Dmalloc uint64 // mallocs in decode - Encode uint64 // number of encodes - Decode uint64 // number of decodes - Chit uint64 // number of cache hits - Cmiss uint64 // number of cache misses - Size uint64 // number of sizes -} - -// Set to true to enable stats collection. -const collectStats = false - -var stats Stats - -// GetStats returns a copy of the global Stats structure. -func GetStats() Stats { return stats } - -// A Buffer is a buffer manager for marshaling and unmarshaling -// protocol buffers. It may be reused between invocations to -// reduce memory usage. It is not necessary to use a Buffer; -// the global functions Marshal and Unmarshal create a -// temporary Buffer and are fine for most applications. -type Buffer struct { - buf []byte // encode/decode byte stream - index int // read point - - // pools of basic types to amortize allocation. - bools []bool - uint32s []uint32 - uint64s []uint64 - - // extra pools, only used with pointer_reflect.go - int32s []int32 - int64s []int64 - float32s []float32 - float64s []float64 -} - -// NewBuffer allocates a new Buffer and initializes its internal data to -// the contents of the argument slice. -func NewBuffer(e []byte) *Buffer { - return &Buffer{buf: e} -} - -// Reset resets the Buffer, ready for marshaling a new protocol buffer. -func (p *Buffer) Reset() { - p.buf = p.buf[0:0] // for reading/writing - p.index = 0 // for reading -} - -// SetBuf replaces the internal buffer with the slice, -// ready for unmarshaling the contents of the slice. -func (p *Buffer) SetBuf(s []byte) { - p.buf = s - p.index = 0 -} - -// Bytes returns the contents of the Buffer. -func (p *Buffer) Bytes() []byte { return p.buf } - -/* - * Helper routines for simplifying the creation of optional fields of basic type. - */ - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { - return &v -} - -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { - return &v -} - -// Int is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it, but unlike Int32 -// its argument value is an int. -func Int(v int) *int32 { - p := new(int32) - *p = int32(v) - return p -} - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { - return &v -} - -// Float32 is a helper routine that allocates a new float32 value -// to store v and returns a pointer to it. -func Float32(v float32) *float32 { - return &v -} - -// Float64 is a helper routine that allocates a new float64 value -// to store v and returns a pointer to it. -func Float64(v float64) *float64 { - return &v -} - -// Uint32 is a helper routine that allocates a new uint32 value -// to store v and returns a pointer to it. -func Uint32(v uint32) *uint32 { - return &v -} - -// Uint64 is a helper routine that allocates a new uint64 value -// to store v and returns a pointer to it. -func Uint64(v uint64) *uint64 { - return &v -} - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { - return &v -} - -// EnumName is a helper function to simplify printing protocol buffer enums -// by name. Given an enum map and a value, it returns a useful string. -func EnumName(m map[int32]string, v int32) string { - s, ok := m[v] - if ok { - return s - } - return strconv.Itoa(int(v)) -} - -// UnmarshalJSONEnum is a helper function to simplify recovering enum int values -// from their JSON-encoded representation. Given a map from the enum's symbolic -// names to its int values, and a byte buffer containing the JSON-encoded -// value, it returns an int32 that can be cast to the enum type by the caller. -// -// The function can deal with both JSON representations, numeric and symbolic. -func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { - if data[0] == '"' { - // New style: enums are strings. - var repr string - if err := json.Unmarshal(data, &repr); err != nil { - return -1, err - } - val, ok := m[repr] - if !ok { - return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) - } - return val, nil - } - // Old style: enums are ints. - var val int32 - if err := json.Unmarshal(data, &val); err != nil { - return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) - } - return val, nil -} - -// DebugPrint dumps the encoded data in b in a debugging format with a header -// including the string s. Used in testing but made available for general debugging. -func (p *Buffer) DebugPrint(s string, b []byte) { - var u uint64 - - obuf := p.buf - index := p.index - p.buf = b - p.index = 0 - depth := 0 - - fmt.Printf("\n--- %s ---\n", s) - -out: - for { - for i := 0; i < depth; i++ { - fmt.Print(" ") - } - - index := p.index - if index == len(p.buf) { - break - } - - op, err := p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: fetching op err %v\n", index, err) - break out - } - tag := op >> 3 - wire := op & 7 - - switch wire { - default: - fmt.Printf("%3d: t=%3d unknown wire=%d\n", - index, tag, wire) - break out - - case WireBytes: - var r []byte - - r, err = p.DecodeRawBytes(false) - if err != nil { - break out - } - fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) - if len(r) <= 6 { - for i := 0; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } else { - for i := 0; i < 3; i++ { - fmt.Printf(" %.2x", r[i]) - } - fmt.Printf(" ..") - for i := len(r) - 3; i < len(r); i++ { - fmt.Printf(" %.2x", r[i]) - } - } - fmt.Printf("\n") - - case WireFixed32: - u, err = p.DecodeFixed32() - if err != nil { - fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) - - case WireFixed64: - u, err = p.DecodeFixed64() - if err != nil { - fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) - - case WireVarint: - u, err = p.DecodeVarint() - if err != nil { - fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) - break out - } - fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) - - case WireStartGroup: - fmt.Printf("%3d: t=%3d start\n", index, tag) - depth++ - - case WireEndGroup: - depth-- - fmt.Printf("%3d: t=%3d end\n", index, tag) - } - } - - if depth != 0 { - fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) - } - fmt.Printf("\n") - - p.buf = obuf - p.index = index -} - -// SetDefaults sets unset protocol buffer fields to their default values. -// It only modifies fields that are both unset and have defined defaults. -// It recursively sets default values in any non-nil sub-messages. -func SetDefaults(pb Message) { - setDefaults(reflect.ValueOf(pb), true, false) -} - -// v is a pointer to a struct. -func setDefaults(v reflect.Value, recur, zeros bool) { - v = v.Elem() - - defaultMu.RLock() - dm, ok := defaults[v.Type()] - defaultMu.RUnlock() - if !ok { - dm = buildDefaultMessage(v.Type()) - defaultMu.Lock() - defaults[v.Type()] = dm - defaultMu.Unlock() - } - - for _, sf := range dm.scalars { - f := v.Field(sf.index) - if !f.IsNil() { - // field already set - continue - } - dv := sf.value - if dv == nil && !zeros { - // no explicit default, and don't want to set zeros - continue - } - fptr := f.Addr().Interface() // **T - // TODO: Consider batching the allocations we do here. - switch sf.kind { - case reflect.Bool: - b := new(bool) - if dv != nil { - *b = dv.(bool) - } - *(fptr.(**bool)) = b - case reflect.Float32: - f := new(float32) - if dv != nil { - *f = dv.(float32) - } - *(fptr.(**float32)) = f - case reflect.Float64: - f := new(float64) - if dv != nil { - *f = dv.(float64) - } - *(fptr.(**float64)) = f - case reflect.Int32: - // might be an enum - if ft := f.Type(); ft != int32PtrType { - // enum - f.Set(reflect.New(ft.Elem())) - if dv != nil { - f.Elem().SetInt(int64(dv.(int32))) - } - } else { - // int32 field - i := new(int32) - if dv != nil { - *i = dv.(int32) - } - *(fptr.(**int32)) = i - } - case reflect.Int64: - i := new(int64) - if dv != nil { - *i = dv.(int64) - } - *(fptr.(**int64)) = i - case reflect.String: - s := new(string) - if dv != nil { - *s = dv.(string) - } - *(fptr.(**string)) = s - case reflect.Uint8: - // exceptional case: []byte - var b []byte - if dv != nil { - db := dv.([]byte) - b = make([]byte, len(db)) - copy(b, db) - } else { - b = []byte{} - } - *(fptr.(*[]byte)) = b - case reflect.Uint32: - u := new(uint32) - if dv != nil { - *u = dv.(uint32) - } - *(fptr.(**uint32)) = u - case reflect.Uint64: - u := new(uint64) - if dv != nil { - *u = dv.(uint64) - } - *(fptr.(**uint64)) = u - default: - log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) - } - } - - for _, ni := range dm.nested { - f := v.Field(ni) - // f is *T or []*T or map[T]*T - switch f.Kind() { - case reflect.Ptr: - if f.IsNil() { - continue - } - setDefaults(f, recur, zeros) - - case reflect.Slice: - for i := 0; i < f.Len(); i++ { - e := f.Index(i) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - - case reflect.Map: - for _, k := range f.MapKeys() { - e := f.MapIndex(k) - if e.IsNil() { - continue - } - setDefaults(e, recur, zeros) - } - } - } -} - -var ( - // defaults maps a protocol buffer struct type to a slice of the fields, - // with its scalar fields set to their proto-declared non-zero default values. - defaultMu sync.RWMutex - defaults = make(map[reflect.Type]defaultMessage) - - int32PtrType = reflect.TypeOf((*int32)(nil)) -) - -// defaultMessage represents information about the default values of a message. -type defaultMessage struct { - scalars []scalarField - nested []int // struct field index of nested messages -} - -type scalarField struct { - index int // struct field index - kind reflect.Kind // element type (the T in *T or []T) - value interface{} // the proto-declared default value, or nil -} - -// t is a struct type. -func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { - sprop := GetProperties(t) - for _, prop := range sprop.Prop { - fi, ok := sprop.decoderTags.get(prop.Tag) - if !ok { - // XXX_unrecognized - continue - } - ft := t.Field(fi).Type - - sf, nested, err := fieldDefault(ft, prop) - switch { - case err != nil: - log.Print(err) - case nested: - dm.nested = append(dm.nested, fi) - case sf != nil: - sf.index = fi - dm.scalars = append(dm.scalars, *sf) - } - } - - return dm -} - -// fieldDefault returns the scalarField for field type ft. -// sf will be nil if the field can not have a default. -// nestedMessage will be true if this is a nested message. -// Note that sf.index is not set on return. -func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { - var canHaveDefault bool - switch ft.Kind() { - case reflect.Ptr: - if ft.Elem().Kind() == reflect.Struct { - nestedMessage = true - } else { - canHaveDefault = true // proto2 scalar field - } - - case reflect.Slice: - switch ft.Elem().Kind() { - case reflect.Ptr: - nestedMessage = true // repeated message - case reflect.Uint8: - canHaveDefault = true // bytes field - } - - case reflect.Map: - if ft.Elem().Kind() == reflect.Ptr { - nestedMessage = true // map with message values - } - } - - if !canHaveDefault { - if nestedMessage { - return nil, true, nil - } - return nil, false, nil - } - - // We now know that ft is a pointer or slice. - sf = &scalarField{kind: ft.Elem().Kind()} - - // scalar fields without defaults - if !prop.HasDefault { - return sf, false, nil - } - - // a scalar field: either *T or []byte - switch ft.Elem().Kind() { - case reflect.Bool: - x, err := strconv.ParseBool(prop.Default) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Float32: - x, err := strconv.ParseFloat(prop.Default, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) - } - sf.value = float32(x) - case reflect.Float64: - x, err := strconv.ParseFloat(prop.Default, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.Int32: - x, err := strconv.ParseInt(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) - } - sf.value = int32(x) - case reflect.Int64: - x, err := strconv.ParseInt(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) - } - sf.value = x - case reflect.String: - sf.value = prop.Default - case reflect.Uint8: - // []byte (not *uint8) - sf.value = []byte(prop.Default) - case reflect.Uint32: - x, err := strconv.ParseUint(prop.Default, 10, 32) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) - } - sf.value = uint32(x) - case reflect.Uint64: - x, err := strconv.ParseUint(prop.Default, 10, 64) - if err != nil { - return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) - } - sf.value = x - default: - return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) - } - - return sf, false, nil -} - -// Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. - -func mapKeys(vs []reflect.Value) sort.Interface { - s := mapKeySorter{ - vs: vs, - // default Less function: textual comparison - less: func(a, b reflect.Value) bool { - return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) - }, - } - - // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; - // numeric keys are sorted numerically. - if len(vs) == 0 { - return s - } - switch vs[0].Kind() { - case reflect.Int32, reflect.Int64: - s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } - case reflect.Uint32, reflect.Uint64: - s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } - } - - return s -} - -type mapKeySorter struct { - vs []reflect.Value - less func(a, b reflect.Value) bool -} - -func (s mapKeySorter) Len() int { return len(s.vs) } -func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } -func (s mapKeySorter) Less(i, j int) bool { - return s.less(s.vs[i], s.vs[j]) -} - -// isProto3Zero reports whether v is a zero proto3 value. -func isProto3Zero(v reflect.Value) bool { - switch v.Kind() { - case reflect.Bool: - return !v.Bool() - case reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint32, reflect.Uint64: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.String: - return v.String() == "" - } - return false -} - -// ProtoPackageIsVersion2 is referenced from generated protocol buffer files -// to assert that that code is compatible with this version of the proto package. -const ProtoPackageIsVersion2 = true - -// ProtoPackageIsVersion1 is referenced from generated protocol buffer files -// to assert that that code is compatible with this version of the proto package. -const ProtoPackageIsVersion1 = true diff --git a/vendor/github.com/golang/protobuf/proto/map_test.go b/vendor/github.com/golang/protobuf/proto/map_test.go deleted file mode 100644 index 313e87924..000000000 --- a/vendor/github.com/golang/protobuf/proto/map_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package proto_test - -import ( - "fmt" - "testing" - - "github.com/golang/protobuf/proto" - ppb "github.com/golang/protobuf/proto/proto3_proto" -) - -func marshalled() []byte { - m := &ppb.IntMaps{} - for i := 0; i < 1000; i++ { - m.Maps = append(m.Maps, &ppb.IntMap{ - Rtt: map[int32]int32{1: 2}, - }) - } - b, err := proto.Marshal(m) - if err != nil { - panic(fmt.Sprintf("Can't marshal %+v: %v", m, err)) - } - return b -} - -func BenchmarkConcurrentMapUnmarshal(b *testing.B) { - in := marshalled() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - var out ppb.IntMaps - if err := proto.Unmarshal(in, &out); err != nil { - b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) - } - } - }) -} - -func BenchmarkSequentialMapUnmarshal(b *testing.B) { - in := marshalled() - b.ResetTimer() - for i := 0; i < b.N; i++ { - var out ppb.IntMaps - if err := proto.Unmarshal(in, &out); err != nil { - b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) - } - } -} diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go deleted file mode 100644 index fd982decd..000000000 --- a/vendor/github.com/golang/protobuf/proto/message_set.go +++ /dev/null @@ -1,311 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Support for message sets. - */ - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" -) - -// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. -// A message type ID is required for storing a protocol buffer in a message set. -var errNoMessageTypeID = errors.New("proto does not have a message type ID") - -// The first two types (_MessageSet_Item and messageSet) -// model what the protocol compiler produces for the following protocol message: -// message MessageSet { -// repeated group Item = 1 { -// required int32 type_id = 2; -// required string message = 3; -// }; -// } -// That is the MessageSet wire format. We can't use a proto to generate these -// because that would introduce a circular dependency between it and this package. - -type _MessageSet_Item struct { - TypeId *int32 `protobuf:"varint,2,req,name=type_id"` - Message []byte `protobuf:"bytes,3,req,name=message"` -} - -type messageSet struct { - Item []*_MessageSet_Item `protobuf:"group,1,rep"` - XXX_unrecognized []byte - // TODO: caching? -} - -// Make sure messageSet is a Message. -var _ Message = (*messageSet)(nil) - -// messageTypeIder is an interface satisfied by a protocol buffer type -// that may be stored in a MessageSet. -type messageTypeIder interface { - MessageTypeId() int32 -} - -func (ms *messageSet) find(pb Message) *_MessageSet_Item { - mti, ok := pb.(messageTypeIder) - if !ok { - return nil - } - id := mti.MessageTypeId() - for _, item := range ms.Item { - if *item.TypeId == id { - return item - } - } - return nil -} - -func (ms *messageSet) Has(pb Message) bool { - if ms.find(pb) != nil { - return true - } - return false -} - -func (ms *messageSet) Unmarshal(pb Message) error { - if item := ms.find(pb); item != nil { - return Unmarshal(item.Message, pb) - } - if _, ok := pb.(messageTypeIder); !ok { - return errNoMessageTypeID - } - return nil // TODO: return error instead? -} - -func (ms *messageSet) Marshal(pb Message) error { - msg, err := Marshal(pb) - if err != nil { - return err - } - if item := ms.find(pb); item != nil { - // reuse existing item - item.Message = msg - return nil - } - - mti, ok := pb.(messageTypeIder) - if !ok { - return errNoMessageTypeID - } - - mtid := mti.MessageTypeId() - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: &mtid, - Message: msg, - }) - return nil -} - -func (ms *messageSet) Reset() { *ms = messageSet{} } -func (ms *messageSet) String() string { return CompactTextString(ms) } -func (*messageSet) ProtoMessage() {} - -// Support for the message_set_wire_format message option. - -func skipVarint(buf []byte) []byte { - i := 0 - for ; buf[i]&0x80 != 0; i++ { - } - return buf[i+1:] -} - -// MarshalMessageSet encodes the extension map represented by m in the message set wire format. -// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSet(exts interface{}) ([]byte, error) { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - if err := encodeExtensions(exts); err != nil { - return nil, err - } - m, _ = exts.extensionsRead() - case map[int32]Extension: - if err := encodeExtensionsMap(exts); err != nil { - return nil, err - } - m = exts - default: - return nil, errors.New("proto: not an extension map") - } - - // Sort extension IDs to provide a deterministic encoding. - // See also enc_map in encode.go. - ids := make([]int, 0, len(m)) - for id := range m { - ids = append(ids, int(id)) - } - sort.Ints(ids) - - ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} - for _, id := range ids { - e := m[int32(id)] - // Remove the wire type and field number varint, as well as the length varint. - msg := skipVarint(skipVarint(e.enc)) - - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: Int32(int32(id)), - Message: msg, - }) - } - return Marshal(ms) -} - -// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. -// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSet(buf []byte, exts interface{}) error { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - m = exts.extensionsWrite() - case map[int32]Extension: - m = exts - default: - return errors.New("proto: not an extension map") - } - - ms := new(messageSet) - if err := Unmarshal(buf, ms); err != nil { - return err - } - for _, item := range ms.Item { - id := *item.TypeId - msg := item.Message - - // Restore wire type and field number varint, plus length varint. - // Be careful to preserve duplicate items. - b := EncodeVarint(uint64(id)<<3 | WireBytes) - if ext, ok := m[id]; ok { - // Existing data; rip off the tag and length varint - // so we join the new data correctly. - // We can assume that ext.enc is set because we are unmarshaling. - o := ext.enc[len(b):] // skip wire type and field number - _, n := DecodeVarint(o) // calculate length of length varint - o = o[n:] // skip length varint - msg = append(o, msg...) // join old data and new data - } - b = append(b, EncodeVarint(uint64(len(msg)))...) - b = append(b, msg...) - - m[id] = Extension{enc: b} - } - return nil -} - -// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. -// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { - var m map[int32]Extension - switch exts := exts.(type) { - case *XXX_InternalExtensions: - m, _ = exts.extensionsRead() - case map[int32]Extension: - m = exts - default: - return nil, errors.New("proto: not an extension map") - } - var b bytes.Buffer - b.WriteByte('{') - - // Process the map in key order for deterministic output. - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) // int32Slice defined in text.go - - for i, id := range ids { - ext := m[id] - if i > 0 { - b.WriteByte(',') - } - - msd, ok := messageSetMap[id] - if !ok { - // Unknown type; we can't render it, so skip it. - continue - } - fmt.Fprintf(&b, `"[%s]":`, msd.name) - - x := ext.value - if x == nil { - x = reflect.New(msd.t.Elem()).Interface() - if err := Unmarshal(ext.enc, x.(Message)); err != nil { - return nil, err - } - } - d, err := json.Marshal(x) - if err != nil { - return nil, err - } - b.Write(d) - } - b.WriteByte('}') - return b.Bytes(), nil -} - -// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. -// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. -func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { - // Common-case fast path. - if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { - return nil - } - - // This is fairly tricky, and it's not clear that it is needed. - return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") -} - -// A global registry of types that can be used in a MessageSet. - -var messageSetMap = make(map[int32]messageSetDesc) - -type messageSetDesc struct { - t reflect.Type // pointer to struct - name string -} - -// RegisterMessageSetType is called from the generated code. -func RegisterMessageSetType(m Message, fieldNum int32, name string) { - messageSetMap[fieldNum] = messageSetDesc{ - t: reflect.TypeOf(m), - name: name, - } -} diff --git a/vendor/github.com/golang/protobuf/proto/message_set_test.go b/vendor/github.com/golang/protobuf/proto/message_set_test.go deleted file mode 100644 index 353a3ea76..000000000 --- a/vendor/github.com/golang/protobuf/proto/message_set_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "bytes" - "testing" -) - -func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { - // Check that a repeated message set entry will be concatenated. - in := &messageSet{ - Item: []*_MessageSet_Item{ - {TypeId: Int32(12345), Message: []byte("hoo")}, - {TypeId: Int32(12345), Message: []byte("hah")}, - }, - } - b, err := Marshal(in) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - t.Logf("Marshaled bytes: %q", b) - - var extensions XXX_InternalExtensions - if err := UnmarshalMessageSet(b, &extensions); err != nil { - t.Fatalf("UnmarshalMessageSet: %v", err) - } - ext, ok := extensions.p.extensionMap[12345] - if !ok { - t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) - } - // Skip wire type/field number and length varints. - got := skipVarint(skipVarint(ext.enc)) - if want := []byte("hoohah"); !bytes.Equal(got, want) { - t.Errorf("Combined extension is %q, want %q", got, want) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go deleted file mode 100644 index fb512e2e1..000000000 --- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go +++ /dev/null @@ -1,484 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build appengine js - -// This file contains an implementation of proto field accesses using package reflect. -// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can -// be used on App Engine. - -package proto - -import ( - "math" - "reflect" -) - -// A structPointer is a pointer to a struct. -type structPointer struct { - v reflect.Value -} - -// toStructPointer returns a structPointer equivalent to the given reflect value. -// The reflect value must itself be a pointer to a struct. -func toStructPointer(v reflect.Value) structPointer { - return structPointer{v} -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p.v.IsNil() -} - -// Interface returns the struct pointer as an interface value. -func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { - return p.v.Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. -// In this implementation, a field is identified by the sequence of field indices -// passed to reflect's FieldByIndex. -type field []int - -// toField returns a field equivalent to the given reflect field. -func toField(f *reflect.StructField) field { - return f.Index -} - -// invalidField is an invalid field identifier. -var invalidField = field(nil) - -// IsValid reports whether the field identifier is valid. -func (f field) IsValid() bool { return f != nil } - -// field returns the given field in the struct as a reflect value. -func structPointer_field(p structPointer, f field) reflect.Value { - // Special case: an extension map entry with a value of type T - // passes a *T to the struct-handling code with a zero field, - // expecting that it will be treated as equivalent to *struct{ X T }, - // which has the same memory layout. We have to handle that case - // specially, because reflect will panic if we call FieldByIndex on a - // non-struct. - if f == nil { - return p.v.Elem() - } - - return p.v.Elem().FieldByIndex(f) -} - -// ifield returns the given field in the struct as an interface value. -func structPointer_ifield(p structPointer, f field) interface{} { - return structPointer_field(p, f).Addr().Interface() -} - -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return structPointer_ifield(p, f).(*[]byte) -} - -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return structPointer_ifield(p, f).(*[][]byte) -} - -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return structPointer_ifield(p, f).(**bool) -} - -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return structPointer_ifield(p, f).(*bool) -} - -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return structPointer_ifield(p, f).(*[]bool) -} - -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return structPointer_ifield(p, f).(**string) -} - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return structPointer_ifield(p, f).(*string) -} - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return structPointer_ifield(p, f).(*[]string) -} - -// Extensions returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return structPointer_ifield(p, f).(*XXX_InternalExtensions) -} - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return structPointer_ifield(p, f).(*map[int32]Extension) -} - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return structPointer_field(p, f).Addr() -} - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - structPointer_field(p, f).Set(q.v) -} - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return structPointer{structPointer_field(p, f)} -} - -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { - return structPointerSlice{structPointer_field(p, f)} -} - -// A structPointerSlice represents the address of a slice of pointers to structs -// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. -type structPointerSlice struct { - v reflect.Value -} - -func (p structPointerSlice) Len() int { return p.v.Len() } -func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } -func (p structPointerSlice) Append(q structPointer) { - p.v.Set(reflect.Append(p.v, q.v)) -} - -var ( - int32Type = reflect.TypeOf(int32(0)) - uint32Type = reflect.TypeOf(uint32(0)) - float32Type = reflect.TypeOf(float32(0)) - int64Type = reflect.TypeOf(int64(0)) - uint64Type = reflect.TypeOf(uint64(0)) - float64Type = reflect.TypeOf(float64(0)) -) - -// A word32 represents a field of type *int32, *uint32, *float32, or *enum. -// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. -type word32 struct { - v reflect.Value -} - -// IsNil reports whether p is nil. -func word32_IsNil(p word32) bool { - return p.v.IsNil() -} - -// Set sets p to point at a newly allocated word with bits set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - t := p.v.Type().Elem() - switch t { - case int32Type: - if len(o.int32s) == 0 { - o.int32s = make([]int32, uint32PoolSize) - } - o.int32s[0] = int32(x) - p.v.Set(reflect.ValueOf(&o.int32s[0])) - o.int32s = o.int32s[1:] - return - case uint32Type: - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - p.v.Set(reflect.ValueOf(&o.uint32s[0])) - o.uint32s = o.uint32s[1:] - return - case float32Type: - if len(o.float32s) == 0 { - o.float32s = make([]float32, uint32PoolSize) - } - o.float32s[0] = math.Float32frombits(x) - p.v.Set(reflect.ValueOf(&o.float32s[0])) - o.float32s = o.float32s[1:] - return - } - - // must be enum - p.v.Set(reflect.New(t)) - p.v.Elem().SetInt(int64(int32(x))) -} - -// Get gets the bits pointed at by p, as a uint32. -func word32_Get(p word32) uint32 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32{structPointer_field(p, f)} -} - -// A word32Val represents a field of type int32, uint32, float32, or enum. -// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. -type word32Val struct { - v reflect.Value -} - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - switch p.v.Type() { - case int32Type: - p.v.SetInt(int64(x)) - return - case uint32Type: - p.v.SetUint(uint64(x)) - return - case float32Type: - p.v.SetFloat(float64(math.Float32frombits(x))) - return - } - - // must be enum - p.v.SetInt(int64(int32(x))) -} - -// Get gets the bits pointed at by p, as a uint32. -func word32Val_Get(p word32Val) uint32 { - elem := p.v - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val{structPointer_field(p, f)} -} - -// A word32Slice is a slice of 32-bit values. -// That is, v.Type() is []int32, []uint32, []float32, or []enum. -type word32Slice struct { - v reflect.Value -} - -func (p word32Slice) Append(x uint32) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int32: - elem.SetInt(int64(int32(x))) - case reflect.Uint32: - elem.SetUint(uint64(x)) - case reflect.Float32: - elem.SetFloat(float64(math.Float32frombits(x))) - } -} - -func (p word32Slice) Len() int { - return p.v.Len() -} - -func (p word32Slice) Index(i int) uint32 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") -} - -// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) word32Slice { - return word32Slice{structPointer_field(p, f)} -} - -// word64 is like word32 but for 64-bit values. -type word64 struct { - v reflect.Value -} - -func word64_Set(p word64, o *Buffer, x uint64) { - t := p.v.Type().Elem() - switch t { - case int64Type: - if len(o.int64s) == 0 { - o.int64s = make([]int64, uint64PoolSize) - } - o.int64s[0] = int64(x) - p.v.Set(reflect.ValueOf(&o.int64s[0])) - o.int64s = o.int64s[1:] - return - case uint64Type: - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - p.v.Set(reflect.ValueOf(&o.uint64s[0])) - o.uint64s = o.uint64s[1:] - return - case float64Type: - if len(o.float64s) == 0 { - o.float64s = make([]float64, uint64PoolSize) - } - o.float64s[0] = math.Float64frombits(x) - p.v.Set(reflect.ValueOf(&o.float64s[0])) - o.float64s = o.float64s[1:] - return - } - panic("unreachable") -} - -func word64_IsNil(p word64) bool { - return p.v.IsNil() -} - -func word64_Get(p word64) uint64 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") -} - -func structPointer_Word64(p structPointer, f field) word64 { - return word64{structPointer_field(p, f)} -} - -// word64Val is like word32Val but for 64-bit values. -type word64Val struct { - v reflect.Value -} - -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - switch p.v.Type() { - case int64Type: - p.v.SetInt(int64(x)) - return - case uint64Type: - p.v.SetUint(x) - return - case float64Type: - p.v.SetFloat(math.Float64frombits(x)) - return - } - panic("unreachable") -} - -func word64Val_Get(p word64Val) uint64 { - elem := p.v - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") -} - -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val{structPointer_field(p, f)} -} - -type word64Slice struct { - v reflect.Value -} - -func (p word64Slice) Append(x uint64) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int64: - elem.SetInt(int64(int64(x))) - case reflect.Uint64: - elem.SetUint(uint64(x)) - case reflect.Float64: - elem.SetFloat(float64(math.Float64frombits(x))) - } -} - -func (p word64Slice) Len() int { - return p.v.Len() -} - -func (p word64Slice) Index(i int) uint64 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return uint64(elem.Uint()) - case reflect.Float64: - return math.Float64bits(float64(elem.Float())) - } - panic("unreachable") -} - -func structPointer_Word64Slice(p structPointer, f field) word64Slice { - return word64Slice{structPointer_field(p, f)} -} diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go deleted file mode 100644 index 6b5567d47..000000000 --- a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go +++ /dev/null @@ -1,270 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build !appengine,!js - -// This file contains the implementation of the proto field accesses using package unsafe. - -package proto - -import ( - "reflect" - "unsafe" -) - -// NOTE: These type_Foo functions would more idiomatically be methods, -// but Go does not allow methods on pointer types, and we must preserve -// some pointer type for the garbage collector. We use these -// funcs with clunky names as our poor approximation to methods. -// -// An alternative would be -// type structPointer struct { p unsafe.Pointer } -// but that does not registerize as well. - -// A structPointer is a pointer to a struct. -type structPointer unsafe.Pointer - -// toStructPointer returns a structPointer equivalent to the given reflect value. -func toStructPointer(v reflect.Value) structPointer { - return structPointer(unsafe.Pointer(v.Pointer())) -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p == nil -} - -// Interface returns the struct pointer, assumed to have element type t, -// as an interface value. -func structPointer_Interface(p structPointer, t reflect.Type) interface{} { - return reflect.NewAt(t, unsafe.Pointer(p)).Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. -// In this implementation, a field is identified by its byte offset from the start of the struct. -type field uintptr - -// toField returns a field equivalent to the given reflect field. -func toField(f *reflect.StructField) field { - return field(f.Offset) -} - -// invalidField is an invalid field identifier. -const invalidField = ^field(0) - -// IsValid reports whether the field identifier is valid. -func (f field) IsValid() bool { - return f != ^field(0) -} - -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) -} - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q -} - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { - return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). -type structPointerSlice []structPointer - -func (v *structPointerSlice) Len() int { return len(*v) } -func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } -func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } - -// A word32 is the address of a "pointer to 32-bit value" field. -type word32 **uint32 - -// IsNil reports whether *v is nil. -func word32_IsNil(p word32) bool { - return *p == nil -} - -// Set sets *v to point at a newly allocated word set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - *p = &o.uint32s[0] - o.uint32s = o.uint32s[1:] -} - -// Get gets the value pointed at by *v. -func word32_Get(p word32) uint32 { - return **p -} - -// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// A word32Val is the address of a 32-bit value field. -type word32Val *uint32 - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - *p = x -} - -// Get gets the value pointed at by p. -func word32Val_Get(p word32Val) uint32 { - return *p -} - -// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// A word32Slice is a slice of 32-bit values. -type word32Slice []uint32 - -func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } -func (v *word32Slice) Len() int { return len(*v) } -func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } - -// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) *word32Slice { - return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -// word64 is like word32 but for 64-bit values. -type word64 **uint64 - -func word64_Set(p word64, o *Buffer, x uint64) { - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - *p = &o.uint64s[0] - o.uint64s = o.uint64s[1:] -} - -func word64_IsNil(p word64) bool { - return *p == nil -} - -func word64_Get(p word64) uint64 { - return **p -} - -func structPointer_Word64(p structPointer, f field) word64 { - return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// word64Val is like word32Val but for 64-bit values. -type word64Val *uint64 - -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - *p = x -} - -func word64Val_Get(p word64Val) uint64 { - return *p -} - -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -// word64Slice is like word32Slice but for 64-bit values. -type word64Slice []uint64 - -func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } -func (v *word64Slice) Len() int { return len(*v) } -func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } - -func structPointer_Word64Slice(p structPointer, f field) *word64Slice { - return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go deleted file mode 100644 index ec2289c00..000000000 --- a/vendor/github.com/golang/protobuf/proto/properties.go +++ /dev/null @@ -1,872 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -/* - * Routines for encoding data into the wire format for protocol buffers. - */ - -import ( - "fmt" - "log" - "os" - "reflect" - "sort" - "strconv" - "strings" - "sync" -) - -const debug bool = false - -// Constants that identify the encoding of a value on the wire. -const ( - WireVarint = 0 - WireFixed64 = 1 - WireBytes = 2 - WireStartGroup = 3 - WireEndGroup = 4 - WireFixed32 = 5 -) - -const startSize = 10 // initial slice/string sizes - -// Encoders are defined in encode.go -// An encoder outputs the full representation of a field, including its -// tag and encoder type. -type encoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueEncoder encodes a single integer in a particular encoding. -type valueEncoder func(o *Buffer, x uint64) error - -// Sizers are defined in encode.go -// A sizer returns the encoded size of a field, including its tag and encoder -// type. -type sizer func(prop *Properties, base structPointer) int - -// A valueSizer returns the encoded size of a single integer in a particular -// encoding. -type valueSizer func(x uint64) int - -// Decoders are defined in decode.go -// A decoder creates a value from its wire representation. -// Unrecognized subelements are saved in unrec. -type decoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueDecoder decodes a single integer in a particular encoding. -type valueDecoder func(o *Buffer) (x uint64, err error) - -// A oneofMarshaler does the marshaling for all oneof fields in a message. -type oneofMarshaler func(Message, *Buffer) error - -// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. -type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) - -// A oneofSizer does the sizing for all oneof fields in a message. -type oneofSizer func(Message) int - -// tagMap is an optimization over map[int]int for typical protocol buffer -// use-cases. Encoded protocol buffers are often in tag order with small tag -// numbers. -type tagMap struct { - fastTags []int - slowTags map[int]int -} - -// tagMapFastLimit is the upper bound on the tag number that will be stored in -// the tagMap slice rather than its map. -const tagMapFastLimit = 1024 - -func (p *tagMap) get(t int) (int, bool) { - if t > 0 && t < tagMapFastLimit { - if t >= len(p.fastTags) { - return 0, false - } - fi := p.fastTags[t] - return fi, fi >= 0 - } - fi, ok := p.slowTags[t] - return fi, ok -} - -func (p *tagMap) put(t int, fi int) { - if t > 0 && t < tagMapFastLimit { - for len(p.fastTags) < t+1 { - p.fastTags = append(p.fastTags, -1) - } - p.fastTags[t] = fi - return - } - if p.slowTags == nil { - p.slowTags = make(map[int]int) - } - p.slowTags[t] = fi -} - -// StructProperties represents properties for all the fields of a struct. -// decoderTags and decoderOrigNames should only be used by the decoder. -type StructProperties struct { - Prop []*Properties // properties for each field - reqCount int // required count - decoderTags tagMap // map from proto tag to struct field number - decoderOrigNames map[string]int // map from original name to struct field number - order []int // list of struct field numbers in tag order - unrecField field // field id of the XXX_unrecognized []byte field - extendable bool // is this an extendable proto - - oneofMarshaler oneofMarshaler - oneofUnmarshaler oneofUnmarshaler - oneofSizer oneofSizer - stype reflect.Type - - // OneofTypes contains information about the oneof fields in this message. - // It is keyed by the original name of a field. - OneofTypes map[string]*OneofProperties -} - -// OneofProperties represents information about a specific field in a oneof. -type OneofProperties struct { - Type reflect.Type // pointer to generated struct type for this oneof field - Field int // struct field number of the containing oneof in the message - Prop *Properties -} - -// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. -// See encode.go, (*Buffer).enc_struct. - -func (sp *StructProperties) Len() int { return len(sp.order) } -func (sp *StructProperties) Less(i, j int) bool { - return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag -} -func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } - -// Properties represents the protocol-specific behavior of a single struct field. -type Properties struct { - Name string // name of the field, for error messages - OrigName string // original name before protocol compiler (always set) - JSONName string // name to use for JSON; determined by protoc - Wire string - WireType int - Tag int - Required bool - Optional bool - Repeated bool - Packed bool // relevant for repeated primitives only - Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only - oneof bool // whether this is a oneof field - - Default string // default value - HasDefault bool // whether an explicit default was provided - def_uint64 uint64 - - enc encoder - valEnc valueEncoder // set for bool and numeric types only - field field - tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) - tagbuf [8]byte - stype reflect.Type // set for struct types only - sprop *StructProperties // set for struct types only - isMarshaler bool - isUnmarshaler bool - - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only - - size sizer - valSize valueSizer // set for bool and numeric types only - - dec decoder - valDec valueDecoder // set for bool and numeric types only - - // If this is a packable field, this will be the decoder for the packed version of the field. - packedDec decoder -} - -// String formats the properties in the protobuf struct field tag style. -func (p *Properties) String() string { - s := p.Wire - s = "," - s += strconv.Itoa(p.Tag) - if p.Required { - s += ",req" - } - if p.Optional { - s += ",opt" - } - if p.Repeated { - s += ",rep" - } - if p.Packed { - s += ",packed" - } - s += ",name=" + p.OrigName - if p.JSONName != p.OrigName { - s += ",json=" + p.JSONName - } - if p.proto3 { - s += ",proto3" - } - if p.oneof { - s += ",oneof" - } - if len(p.Enum) > 0 { - s += ",enum=" + p.Enum - } - if p.HasDefault { - s += ",def=" + p.Default - } - return s -} - -// Parse populates p by parsing a string in the protobuf struct field tag style. -func (p *Properties) Parse(s string) { - // "bytes,49,opt,name=foo,def=hello!" - fields := strings.Split(s, ",") // breaks def=, but handled below. - if len(fields) < 2 { - fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) - return - } - - p.Wire = fields[0] - switch p.Wire { - case "varint": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeVarint - p.valDec = (*Buffer).DecodeVarint - p.valSize = sizeVarint - case "fixed32": - p.WireType = WireFixed32 - p.valEnc = (*Buffer).EncodeFixed32 - p.valDec = (*Buffer).DecodeFixed32 - p.valSize = sizeFixed32 - case "fixed64": - p.WireType = WireFixed64 - p.valEnc = (*Buffer).EncodeFixed64 - p.valDec = (*Buffer).DecodeFixed64 - p.valSize = sizeFixed64 - case "zigzag32": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag32 - p.valDec = (*Buffer).DecodeZigzag32 - p.valSize = sizeZigzag32 - case "zigzag64": - p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag64 - p.valDec = (*Buffer).DecodeZigzag64 - p.valSize = sizeZigzag64 - case "bytes", "group": - p.WireType = WireBytes - // no numeric converter for non-numeric types - default: - fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) - return - } - - var err error - p.Tag, err = strconv.Atoi(fields[1]) - if err != nil { - return - } - - for i := 2; i < len(fields); i++ { - f := fields[i] - switch { - case f == "req": - p.Required = true - case f == "opt": - p.Optional = true - case f == "rep": - p.Repeated = true - case f == "packed": - p.Packed = true - case strings.HasPrefix(f, "name="): - p.OrigName = f[5:] - case strings.HasPrefix(f, "json="): - p.JSONName = f[5:] - case strings.HasPrefix(f, "enum="): - p.Enum = f[5:] - case f == "proto3": - p.proto3 = true - case f == "oneof": - p.oneof = true - case strings.HasPrefix(f, "def="): - p.HasDefault = true - p.Default = f[4:] // rest of string - if i+1 < len(fields) { - // Commas aren't escaped, and def is always last. - p.Default += "," + strings.Join(fields[i+1:], ",") - break - } - } - } -} - -func logNoSliceEnc(t1, t2 reflect.Type) { - fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) -} - -var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() - -// Initialize the fields for encoding and decoding. -func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { - p.enc = nil - p.dec = nil - p.size = nil - - switch t1 := typ; t1.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) - - // proto3 scalar types - - case reflect.Bool: - p.enc = (*Buffer).enc_proto3_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_proto3_bool - case reflect.Int32: - p.enc = (*Buffer).enc_proto3_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_proto3_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_proto3_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_proto3_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - case reflect.String: - p.enc = (*Buffer).enc_proto3_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_proto3_string - - case reflect.Ptr: - switch t2 := t1.Elem(); t2.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) - break - case reflect.Bool: - p.enc = (*Buffer).enc_bool - p.dec = (*Buffer).dec_bool - p.size = size_bool - case reflect.Int32: - p.enc = (*Buffer).enc_int32 - p.dec = (*Buffer).dec_int32 - p.size = size_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_uint32 - p.dec = (*Buffer).dec_int32 // can reuse - p.size = size_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_int64 - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_int32 - p.size = size_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_int64 // can just treat them as bits - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.String: - p.enc = (*Buffer).enc_string - p.dec = (*Buffer).dec_string - p.size = size_string - case reflect.Struct: - p.stype = t1.Elem() - p.isMarshaler = isMarshaler(t1) - p.isUnmarshaler = isUnmarshaler(t1) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_struct_message - p.dec = (*Buffer).dec_struct_message - p.size = size_struct_message - } else { - p.enc = (*Buffer).enc_struct_group - p.dec = (*Buffer).dec_struct_group - p.size = size_struct_group - } - } - - case reflect.Slice: - switch t2 := t1.Elem(); t2.Kind() { - default: - logNoSliceEnc(t1, t2) - break - case reflect.Bool: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_bool - p.size = size_slice_packed_bool - } else { - p.enc = (*Buffer).enc_slice_bool - p.size = size_slice_bool - } - p.dec = (*Buffer).dec_slice_bool - p.packedDec = (*Buffer).dec_slice_packed_bool - case reflect.Int32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int32 - p.size = size_slice_packed_int32 - } else { - p.enc = (*Buffer).enc_slice_int32 - p.size = size_slice_int32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Uint32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Int64, reflect.Uint64: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - case reflect.Uint8: - p.dec = (*Buffer).dec_slice_byte - if p.proto3 { - p.enc = (*Buffer).enc_proto3_slice_byte - p.size = size_proto3_slice_byte - } else { - p.enc = (*Buffer).enc_slice_byte - p.size = size_slice_byte - } - case reflect.Float32, reflect.Float64: - switch t2.Bits() { - case 32: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case 64: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - default: - logNoSliceEnc(t1, t2) - break - } - case reflect.String: - p.enc = (*Buffer).enc_slice_string - p.dec = (*Buffer).dec_slice_string - p.size = size_slice_string - case reflect.Ptr: - switch t3 := t2.Elem(); t3.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) - break - case reflect.Struct: - p.stype = t2.Elem() - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_slice_struct_message - p.dec = (*Buffer).dec_slice_struct_message - p.size = size_slice_struct_message - } else { - p.enc = (*Buffer).enc_slice_struct_group - p.dec = (*Buffer).dec_slice_struct_group - p.size = size_slice_struct_group - } - } - case reflect.Slice: - switch t2.Elem().Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) - break - case reflect.Uint8: - p.enc = (*Buffer).enc_slice_slice_byte - p.dec = (*Buffer).dec_slice_slice_byte - p.size = size_slice_slice_byte - } - } - - case reflect.Map: - p.enc = (*Buffer).enc_new_map - p.dec = (*Buffer).dec_new_map - p.size = size_new_map - - p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} - vtype := p.mtype.Elem() - if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { - // The value type is not a message (*T) or bytes ([]byte), - // so we need encoders for the pointer to this type. - vtype = reflect.PtrTo(vtype) - } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) - } - - // precalculate tag code - wire := p.WireType - if p.Packed { - wire = WireBytes - } - x := uint32(p.Tag)<<3 | uint32(wire) - i := 0 - for i = 0; x > 127; i++ { - p.tagbuf[i] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - p.tagbuf[i] = uint8(x) - p.tagcode = p.tagbuf[0 : i+1] - - if p.stype != nil { - if lockGetProp { - p.sprop = GetProperties(p.stype) - } else { - p.sprop = getPropertiesLocked(p.stype) - } - } -} - -var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() -) - -// isMarshaler reports whether type t implements Marshaler. -func isMarshaler(t reflect.Type) bool { - // We're checking for (likely) pointer-receiver methods - // so if t is not a pointer, something is very wrong. - // The calls above only invoke isMarshaler on pointer types. - if t.Kind() != reflect.Ptr { - panic("proto: misuse of isMarshaler") - } - return t.Implements(marshalerType) -} - -// isUnmarshaler reports whether type t implements Unmarshaler. -func isUnmarshaler(t reflect.Type) bool { - // We're checking for (likely) pointer-receiver methods - // so if t is not a pointer, something is very wrong. - // The calls above only invoke isUnmarshaler on pointer types. - if t.Kind() != reflect.Ptr { - panic("proto: misuse of isUnmarshaler") - } - return t.Implements(unmarshalerType) -} - -// Init populates the properties from a protocol buffer struct tag. -func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { - p.init(typ, name, tag, f, true) -} - -func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { - // "bytes,49,opt,def=hello!" - p.Name = name - p.OrigName = name - if f != nil { - p.field = toField(f) - } - if tag == "" { - return - } - p.Parse(tag) - p.setEncAndDec(typ, f, lockGetProp) -} - -var ( - propertiesMu sync.RWMutex - propertiesMap = make(map[reflect.Type]*StructProperties) -) - -// GetProperties returns the list of properties for the type represented by t. -// t must represent a generated struct type of a protocol message. -func GetProperties(t reflect.Type) *StructProperties { - if t.Kind() != reflect.Struct { - panic("proto: type must have kind struct") - } - - // Most calls to GetProperties in a long-running program will be - // retrieving details for types we have seen before. - propertiesMu.RLock() - sprop, ok := propertiesMap[t] - propertiesMu.RUnlock() - if ok { - if collectStats { - stats.Chit++ - } - return sprop - } - - propertiesMu.Lock() - sprop = getPropertiesLocked(t) - propertiesMu.Unlock() - return sprop -} - -// getPropertiesLocked requires that propertiesMu is held. -func getPropertiesLocked(t reflect.Type) *StructProperties { - if prop, ok := propertiesMap[t]; ok { - if collectStats { - stats.Chit++ - } - return prop - } - if collectStats { - stats.Cmiss++ - } - - prop := new(StructProperties) - // in case of recursive protos, fill this in now. - propertiesMap[t] = prop - - // build properties - prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) || - reflect.PtrTo(t).Implements(extendableProtoV1Type) - prop.unrecField = invalidField - prop.Prop = make([]*Properties, t.NumField()) - prop.order = make([]int, t.NumField()) - - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - p := new(Properties) - name := f.Name - p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - - if f.Name == "XXX_InternalExtensions" { // special case - p.enc = (*Buffer).enc_exts - p.dec = nil // not needed - p.size = size_exts - } else if f.Name == "XXX_extensions" { // special case - p.enc = (*Buffer).enc_map - p.dec = nil // not needed - p.size = size_map - } else if f.Name == "XXX_unrecognized" { // special case - prop.unrecField = toField(&f) - } - oneof := f.Tag.Get("protobuf_oneof") // special case - if oneof != "" { - // Oneof fields don't use the traditional protobuf tag. - p.OrigName = oneof - } - prop.Prop[i] = p - prop.order[i] = i - if debug { - print(i, " ", f.Name, " ", t.String(), " ") - if p.Tag > 0 { - print(p.String()) - } - print("\n") - } - if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" { - fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") - } - } - - // Re-order prop.order. - sort.Sort(prop) - - type oneofMessage interface { - XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) - } - if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { - var oots []interface{} - prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() - prop.stype = t - - // Interpret oneof metadata. - prop.OneofTypes = make(map[string]*OneofProperties) - for _, oot := range oots { - oop := &OneofProperties{ - Type: reflect.ValueOf(oot).Type(), // *T - Prop: new(Properties), - } - sft := oop.Type.Elem().Field(0) - oop.Prop.Name = sft.Name - oop.Prop.Parse(sft.Tag.Get("protobuf")) - // There will be exactly one interface field that - // this new value is assignable to. - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if f.Type.Kind() != reflect.Interface { - continue - } - if !oop.Type.AssignableTo(f.Type) { - continue - } - oop.Field = i - break - } - prop.OneofTypes[oop.Prop.OrigName] = oop - } - } - - // build required counts - // build tags - reqCount := 0 - prop.decoderOrigNames = make(map[string]int) - for i, p := range prop.Prop { - if strings.HasPrefix(p.Name, "XXX_") { - // Internal fields should not appear in tags/origNames maps. - // They are handled specially when encoding and decoding. - continue - } - if p.Required { - reqCount++ - } - prop.decoderTags.put(p.Tag, i) - prop.decoderOrigNames[p.OrigName] = i - } - prop.reqCount = reqCount - - return prop -} - -// Return the Properties object for the x[0]'th field of the structure. -func propByIndex(t reflect.Type, x []int) *Properties { - if len(x) != 1 { - fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) - return nil - } - prop := GetProperties(t) - return prop.Prop[x[0]] -} - -// Get the address and type of a pointer to a struct from an interface. -func getbase(pb Message) (t reflect.Type, b structPointer, err error) { - if pb == nil { - err = ErrNil - return - } - // get the reflect type of the pointer to the struct. - t = reflect.TypeOf(pb) - // get the address of the struct. - value := reflect.ValueOf(pb) - b = toStructPointer(value) - return -} - -// A global registry of enum types. -// The generated code will register the generated maps by calling RegisterEnum. - -var enumValueMaps = make(map[string]map[string]int32) - -// RegisterEnum is called from the generated code to install the enum descriptor -// maps into the global table to aid parsing text format protocol buffers. -func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { - if _, ok := enumValueMaps[typeName]; ok { - panic("proto: duplicate enum registered: " + typeName) - } - enumValueMaps[typeName] = valueMap -} - -// EnumValueMap returns the mapping from names to integers of the -// enum type enumType, or a nil if not found. -func EnumValueMap(enumType string) map[string]int32 { - return enumValueMaps[enumType] -} - -// A registry of all linked message types. -// The string is a fully-qualified proto name ("pkg.Message"). -var ( - protoTypes = make(map[string]reflect.Type) - revProtoTypes = make(map[reflect.Type]string) -) - -// RegisterType is called from generated code and maps from the fully qualified -// proto name to the type (pointer to struct) of the protocol buffer. -func RegisterType(x Message, name string) { - if _, ok := protoTypes[name]; ok { - // TODO: Some day, make this a panic. - log.Printf("proto: duplicate proto type registered: %s", name) - return - } - t := reflect.TypeOf(x) - protoTypes[name] = t - revProtoTypes[t] = name -} - -// MessageName returns the fully-qualified proto name for the given message type. -func MessageName(x Message) string { - type xname interface { - XXX_MessageName() string - } - if m, ok := x.(xname); ok { - return m.XXX_MessageName() - } - return revProtoTypes[reflect.TypeOf(x)] -} - -// MessageType returns the message type (pointer to struct) for a named message. -func MessageType(name string) reflect.Type { return protoTypes[name] } - -// A registry of all linked proto files. -var ( - protoFiles = make(map[string][]byte) // file name => fileDescriptor -) - -// RegisterFile is called from generated code and maps from the -// full file name of a .proto file to its compressed FileDescriptorProto. -func RegisterFile(filename string, fileDescriptor []byte) { - protoFiles[filename] = fileDescriptor -} - -// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. -func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/golang/protobuf/proto/proto3_test.go b/vendor/github.com/golang/protobuf/proto/proto3_test.go deleted file mode 100644 index 735837f2d..000000000 --- a/vendor/github.com/golang/protobuf/proto/proto3_test.go +++ /dev/null @@ -1,135 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "testing" - - "github.com/golang/protobuf/proto" - pb "github.com/golang/protobuf/proto/proto3_proto" - tpb "github.com/golang/protobuf/proto/testdata" -) - -func TestProto3ZeroValues(t *testing.T) { - tests := []struct { - desc string - m proto.Message - }{ - {"zero message", &pb.Message{}}, - {"empty bytes field", &pb.Message{Data: []byte{}}}, - } - for _, test := range tests { - b, err := proto.Marshal(test.m) - if err != nil { - t.Errorf("%s: proto.Marshal: %v", test.desc, err) - continue - } - if len(b) > 0 { - t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) - } - } -} - -func TestRoundTripProto3(t *testing.T) { - m := &pb.Message{ - Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" - Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 - HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 - Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" - ResultCount: 47, // (0 | 7<<3): 0x38 0x2f - TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 - Score: 8.1, // (5 | 9<<3): 0x4d <8.1> - - Key: []uint64{1, 0xdeadbeef}, - Nested: &pb.Nested{ - Bunny: "Monty", - }, - } - t.Logf(" m: %v", m) - - b, err := proto.Marshal(m) - if err != nil { - t.Fatalf("proto.Marshal: %v", err) - } - t.Logf(" b: %q", b) - - m2 := new(pb.Message) - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatalf("proto.Unmarshal: %v", err) - } - t.Logf("m2: %v", m2) - - if !proto.Equal(m, m2) { - t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) - } -} - -func TestGettersForBasicTypesExist(t *testing.T) { - var m pb.Message - if got := m.GetNested().GetBunny(); got != "" { - t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got) - } - if got := m.GetNested().GetCute(); got { - t.Errorf("m.GetNested().GetCute() = %t, want false", got) - } -} - -func TestProto3SetDefaults(t *testing.T) { - in := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: new(tpb.SubDefaults), - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": new(tpb.SubDefaults), - }, - } - - got := proto.Clone(in).(*pb.Message) - proto.SetDefaults(got) - - // There are no defaults in proto3. Everything should be the zero value, but - // we need to remember to set defaults for nested proto2 messages. - want := &pb.Message{ - Terrain: map[string]*pb.Nested{ - "meadow": new(pb.Nested), - }, - Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, - Proto2Value: map[string]*tpb.SubDefaults{ - "badlands": &tpb.SubDefaults{N: proto.Int64(7)}, - }, - } - - if !proto.Equal(got, want) { - t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) - } -} diff --git a/vendor/github.com/golang/protobuf/proto/size2_test.go b/vendor/github.com/golang/protobuf/proto/size2_test.go deleted file mode 100644 index a2729c39a..000000000 --- a/vendor/github.com/golang/protobuf/proto/size2_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "testing" -) - -// This is a separate file and package from size_test.go because that one uses -// generated messages and thus may not be in package proto without having a circular -// dependency, whereas this file tests unexported details of size.go. - -func TestVarintSize(t *testing.T) { - // Check the edge cases carefully. - testCases := []struct { - n uint64 - size int - }{ - {0, 1}, - {1, 1}, - {127, 1}, - {128, 2}, - {16383, 2}, - {16384, 3}, - {1<<63 - 1, 9}, - {1 << 63, 10}, - } - for _, tc := range testCases { - size := sizeVarint(tc.n) - if size != tc.size { - t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) - } - } -} diff --git a/vendor/github.com/golang/protobuf/proto/size_test.go b/vendor/github.com/golang/protobuf/proto/size_test.go deleted file mode 100644 index af1034dc7..000000000 --- a/vendor/github.com/golang/protobuf/proto/size_test.go +++ /dev/null @@ -1,164 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "log" - "strings" - "testing" - - . "github.com/golang/protobuf/proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/protobuf/proto/testdata" -) - -var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} - -// messageWithExtension2 is in equal_test.go. -var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} - -func init() { - if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { - log.Panicf("SetExtension: %v", err) - } - if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { - log.Panicf("SetExtension: %v", err) - } - - // Force messageWithExtension3 to have the extension encoded. - Marshal(messageWithExtension3) - -} - -var SizeTests = []struct { - desc string - pb Message -}{ - {"empty", &pb.OtherMessage{}}, - // Basic types. - {"bool", &pb.Defaults{F_Bool: Bool(true)}}, - {"int32", &pb.Defaults{F_Int32: Int32(12)}}, - {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, - {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, - {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, - {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, - {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, - {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, - {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, - {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, - {"float", &pb.Defaults{F_Float: Float32(12.6)}}, - {"double", &pb.Defaults{F_Double: Float64(13.9)}}, - {"string", &pb.Defaults{F_String: String("niles")}}, - {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, - {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, - {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, - {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, - {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, - // Repeated. - {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, - {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, - {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, - {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, - {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, - {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ - // Need enough large numbers to verify that the header is counting the number of bytes - // for the field, not the number of elements. - 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, - 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, - }}}, - {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, - {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, - // Nested. - {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, - {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, - // Other things. - {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, - {"extension (unencoded)", messageWithExtension1}, - {"extension (encoded)", messageWithExtension3}, - // proto3 message - {"proto3 empty", &proto3pb.Message{}}, - {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, - {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, - {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, - {"proto3 float", &proto3pb.Message{Score: 12.6}}, - {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, - {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, - {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, - {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, - {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: []byte{}}}}, - - {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, - {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: &pb.FloatingPoint{F: Float64(2.0)}}}}, - {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, - {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte{}}}}, - - {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, - {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, - {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, - - {"oneof not set", &pb.Oneof{}}, - {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{true}}}, - {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{0}}}, - {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{1 << 20}}}, - {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{42}}}, - {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{43}}}, - {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{44}}}, - {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{45}}}, - {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{46}}}, - {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{47.1}}}, - {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{48.9}}}, - {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{"Rhythmic Fman"}}}, - {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{[]byte("let go")}}}, - {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{50}}}, - {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{51}}}, - {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{pb.MyMessage_BLUE}}}, - {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, - {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{&pb.GoTestField{Label: String("k"), Type: String("v")}}}}, - {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{&pb.Oneof_F_Group{X: Int32(52)}}}}, - {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{1}}}, - {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{1}, Tormato: &pb.Oneof_Value{2}}}, -} - -func TestSize(t *testing.T) { - for _, tc := range SizeTests { - size := Size(tc.pb) - b, err := Marshal(tc.pb) - if err != nil { - t.Errorf("%v: Marshal failed: %v", tc.desc, err) - continue - } - if size != len(b) { - t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) - t.Logf("%v: bytes: %#v", tc.desc, b) - } - } -} diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go deleted file mode 100644 index 965876bf0..000000000 --- a/vendor/github.com/golang/protobuf/proto/text.go +++ /dev/null @@ -1,854 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for writing the text protocol buffer format. - -import ( - "bufio" - "bytes" - "encoding" - "errors" - "fmt" - "io" - "log" - "math" - "reflect" - "sort" - "strings" -) - -var ( - newline = []byte("\n") - spaces = []byte(" ") - gtNewline = []byte(">\n") - endBraceNewline = []byte("}\n") - backslashN = []byte{'\\', 'n'} - backslashR = []byte{'\\', 'r'} - backslashT = []byte{'\\', 't'} - backslashDQ = []byte{'\\', '"'} - backslashBS = []byte{'\\', '\\'} - posInf = []byte("inf") - negInf = []byte("-inf") - nan = []byte("nan") -) - -type writer interface { - io.Writer - WriteByte(byte) error -} - -// textWriter is an io.Writer that tracks its indentation level. -type textWriter struct { - ind int - complete bool // if the current position is a complete line - compact bool // whether to write out as a one-liner - w writer -} - -func (w *textWriter) WriteString(s string) (n int, err error) { - if !strings.Contains(s, "\n") { - if !w.compact && w.complete { - w.writeIndent() - } - w.complete = false - return io.WriteString(w.w, s) - } - // WriteString is typically called without newlines, so this - // codepath and its copy are rare. We copy to avoid - // duplicating all of Write's logic here. - return w.Write([]byte(s)) -} - -func (w *textWriter) Write(p []byte) (n int, err error) { - newlines := bytes.Count(p, newline) - if newlines == 0 { - if !w.compact && w.complete { - w.writeIndent() - } - n, err = w.w.Write(p) - w.complete = false - return n, err - } - - frags := bytes.SplitN(p, newline, newlines+1) - if w.compact { - for i, frag := range frags { - if i > 0 { - if err := w.w.WriteByte(' '); err != nil { - return n, err - } - n++ - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - } - return n, nil - } - - for i, frag := range frags { - if w.complete { - w.writeIndent() - } - nn, err := w.w.Write(frag) - n += nn - if err != nil { - return n, err - } - if i+1 < len(frags) { - if err := w.w.WriteByte('\n'); err != nil { - return n, err - } - n++ - } - } - w.complete = len(frags[len(frags)-1]) == 0 - return n, nil -} - -func (w *textWriter) WriteByte(c byte) error { - if w.compact && c == '\n' { - c = ' ' - } - if !w.compact && w.complete { - w.writeIndent() - } - err := w.w.WriteByte(c) - w.complete = c == '\n' - return err -} - -func (w *textWriter) indent() { w.ind++ } - -func (w *textWriter) unindent() { - if w.ind == 0 { - log.Print("proto: textWriter unindented too far") - return - } - w.ind-- -} - -func writeName(w *textWriter, props *Properties) error { - if _, err := w.WriteString(props.OrigName); err != nil { - return err - } - if props.Wire != "group" { - return w.WriteByte(':') - } - return nil -} - -// raw is the interface satisfied by RawMessage. -type raw interface { - Bytes() []byte -} - -func requiresQuotes(u string) bool { - // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. - for _, ch := range u { - switch { - case ch == '.' || ch == '/' || ch == '_': - continue - case '0' <= ch && ch <= '9': - continue - case 'A' <= ch && ch <= 'Z': - continue - case 'a' <= ch && ch <= 'z': - continue - default: - return true - } - } - return false -} - -// isAny reports whether sv is a google.protobuf.Any message -func isAny(sv reflect.Value) bool { - type wkt interface { - XXX_WellKnownType() string - } - t, ok := sv.Addr().Interface().(wkt) - return ok && t.XXX_WellKnownType() == "Any" -} - -// writeProto3Any writes an expanded google.protobuf.Any message. -// -// It returns (false, nil) if sv value can't be unmarshaled (e.g. because -// required messages are not linked in). -// -// It returns (true, error) when sv was written in expanded format or an error -// was encountered. -func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { - turl := sv.FieldByName("TypeUrl") - val := sv.FieldByName("Value") - if !turl.IsValid() || !val.IsValid() { - return true, errors.New("proto: invalid google.protobuf.Any message") - } - - b, ok := val.Interface().([]byte) - if !ok { - return true, errors.New("proto: invalid google.protobuf.Any message") - } - - parts := strings.Split(turl.String(), "/") - mt := MessageType(parts[len(parts)-1]) - if mt == nil { - return false, nil - } - m := reflect.New(mt.Elem()) - if err := Unmarshal(b, m.Interface().(Message)); err != nil { - return false, nil - } - w.Write([]byte("[")) - u := turl.String() - if requiresQuotes(u) { - writeString(w, u) - } else { - w.Write([]byte(u)) - } - if w.compact { - w.Write([]byte("]:<")) - } else { - w.Write([]byte("]: <\n")) - w.ind++ - } - if err := tm.writeStruct(w, m.Elem()); err != nil { - return true, err - } - if w.compact { - w.Write([]byte("> ")) - } else { - w.ind-- - w.Write([]byte(">\n")) - } - return true, nil -} - -func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { - if tm.ExpandAny && isAny(sv) { - if canExpand, err := tm.writeProto3Any(w, sv); canExpand { - return err - } - } - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < sv.NumField(); i++ { - fv := sv.Field(i) - props := sprops.Prop[i] - name := st.Field(i).Name - - if strings.HasPrefix(name, "XXX_") { - // There are two XXX_ fields: - // XXX_unrecognized []byte - // XXX_extensions map[int32]proto.Extension - // The first is handled here; - // the second is handled at the bottom of this function. - if name == "XXX_unrecognized" && !fv.IsNil() { - if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Field not filled in. This could be an optional field or - // a required field that wasn't filled in. Either way, there - // isn't anything we can show for it. - continue - } - if fv.Kind() == reflect.Slice && fv.IsNil() { - // Repeated field that is empty, or a bytes field that is unused. - continue - } - - if props.Repeated && fv.Kind() == reflect.Slice { - // Repeated field. - for j := 0; j < fv.Len(); j++ { - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - v := fv.Index(j) - if v.Kind() == reflect.Ptr && v.IsNil() { - // A nil message in a repeated field is not valid, - // but we can handle that more gracefully than panicking. - if _, err := w.Write([]byte("\n")); err != nil { - return err - } - continue - } - if err := tm.writeAny(w, v, props); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if fv.Kind() == reflect.Map { - // Map fields are rendered as a repeated struct with key/value fields. - keys := fv.MapKeys() - sort.Sort(mapKeys(keys)) - for _, key := range keys { - val := fv.MapIndex(key) - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - // open struct - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - // key - if _, err := w.WriteString("key:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - // nil values aren't legal, but we can avoid panicking because of them. - if val.Kind() != reflect.Ptr || !val.IsNil() { - // value - if _, err := w.WriteString("value:"); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - // close struct - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - } - continue - } - if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { - // empty bytes field - continue - } - if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { - // proto3 non-repeated scalar field; skip if zero value - if isProto3Zero(fv) { - continue - } - } - - if fv.Kind() == reflect.Interface { - // Check if it is a oneof. - if st.Field(i).Tag.Get("protobuf_oneof") != "" { - // fv is nil, or holds a pointer to generated struct. - // That generated struct has exactly one field, - // which has a protobuf struct tag. - if fv.IsNil() { - continue - } - inner := fv.Elem().Elem() // interface -> *T -> T - tag := inner.Type().Field(0).Tag.Get("protobuf") - props = new(Properties) // Overwrite the outer props var, but not its pointee. - props.Parse(tag) - // Write the value in the oneof, not the oneof itself. - fv = inner.Field(0) - - // Special case to cope with malformed messages gracefully: - // If the value in the oneof is a nil pointer, don't panic - // in writeAny. - if fv.Kind() == reflect.Ptr && fv.IsNil() { - // Use errors.New so writeAny won't render quotes. - msg := errors.New("/* nil */") - fv = reflect.ValueOf(&msg).Elem() - } - } - } - - if err := writeName(w, props); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if b, ok := fv.Interface().(raw); ok { - if err := writeRaw(w, b.Bytes()); err != nil { - return err - } - continue - } - - // Enums have a String method, so writeAny will work fine. - if err := tm.writeAny(w, fv, props); err != nil { - return err - } - - if err := w.WriteByte('\n'); err != nil { - return err - } - } - - // Extensions (the XXX_extensions field). - pv := sv.Addr() - if _, ok := extendable(pv.Interface()); ok { - if err := tm.writeExtensions(w, pv); err != nil { - return err - } - } - - return nil -} - -// writeRaw writes an uninterpreted raw message. -func writeRaw(w *textWriter, b []byte) error { - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if err := writeUnknownStruct(w, b); err != nil { - return err - } - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - return nil -} - -// writeAny writes an arbitrary field. -func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { - v = reflect.Indirect(v) - - // Floats have special cases. - if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { - x := v.Float() - var b []byte - switch { - case math.IsInf(x, 1): - b = posInf - case math.IsInf(x, -1): - b = negInf - case math.IsNaN(x): - b = nan - } - if b != nil { - _, err := w.Write(b) - return err - } - // Other values are handled below. - } - - // We don't attempt to serialise every possible value type; only those - // that can occur in protocol buffers. - switch v.Kind() { - case reflect.Slice: - // Should only be a []byte; repeated fields are handled in writeStruct. - if err := writeString(w, string(v.Bytes())); err != nil { - return err - } - case reflect.String: - if err := writeString(w, v.String()); err != nil { - return err - } - case reflect.Struct: - // Required/optional group/message. - var bra, ket byte = '<', '>' - if props != nil && props.Wire == "group" { - bra, ket = '{', '}' - } - if err := w.WriteByte(bra); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if etm, ok := v.Interface().(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() - if err != nil { - return err - } - if _, err = w.Write(text); err != nil { - return err - } - } else if err := tm.writeStruct(w, v); err != nil { - return err - } - w.unindent() - if err := w.WriteByte(ket); err != nil { - return err - } - default: - _, err := fmt.Fprint(w, v.Interface()) - return err - } - return nil -} - -// equivalent to C's isprint. -func isprint(c byte) bool { - return c >= 0x20 && c < 0x7f -} - -// writeString writes a string in the protocol buffer text format. -// It is similar to strconv.Quote except we don't use Go escape sequences, -// we treat the string as a byte sequence, and we use octal escapes. -// These differences are to maintain interoperability with the other -// languages' implementations of the text format. -func writeString(w *textWriter, s string) error { - // use WriteByte here to get any needed indent - if err := w.WriteByte('"'); err != nil { - return err - } - // Loop over the bytes, not the runes. - for i := 0; i < len(s); i++ { - var err error - // Divergence from C++: we don't escape apostrophes. - // There's no need to escape them, and the C++ parser - // copes with a naked apostrophe. - switch c := s[i]; c { - case '\n': - _, err = w.w.Write(backslashN) - case '\r': - _, err = w.w.Write(backslashR) - case '\t': - _, err = w.w.Write(backslashT) - case '"': - _, err = w.w.Write(backslashDQ) - case '\\': - _, err = w.w.Write(backslashBS) - default: - if isprint(c) { - err = w.w.WriteByte(c) - } else { - _, err = fmt.Fprintf(w.w, "\\%03o", c) - } - } - if err != nil { - return err - } - } - return w.WriteByte('"') -} - -func writeUnknownStruct(w *textWriter, data []byte) (err error) { - if !w.compact { - if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { - return err - } - } - b := NewBuffer(data) - for b.index < len(b.buf) { - x, err := b.DecodeVarint() - if err != nil { - _, err := fmt.Fprintf(w, "/* %v */\n", err) - return err - } - wire, tag := x&7, x>>3 - if wire == WireEndGroup { - w.unindent() - if _, err := w.Write(endBraceNewline); err != nil { - return err - } - continue - } - if _, err := fmt.Fprint(w, tag); err != nil { - return err - } - if wire != WireStartGroup { - if err := w.WriteByte(':'); err != nil { - return err - } - } - if !w.compact || wire == WireStartGroup { - if err := w.WriteByte(' '); err != nil { - return err - } - } - switch wire { - case WireBytes: - buf, e := b.DecodeRawBytes(false) - if e == nil { - _, err = fmt.Fprintf(w, "%q", buf) - } else { - _, err = fmt.Fprintf(w, "/* %v */", e) - } - case WireFixed32: - x, err = b.DecodeFixed32() - err = writeUnknownInt(w, x, err) - case WireFixed64: - x, err = b.DecodeFixed64() - err = writeUnknownInt(w, x, err) - case WireStartGroup: - err = w.WriteByte('{') - w.indent() - case WireVarint: - x, err = b.DecodeVarint() - err = writeUnknownInt(w, x, err) - default: - _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) - } - if err != nil { - return err - } - if err = w.WriteByte('\n'); err != nil { - return err - } - } - return nil -} - -func writeUnknownInt(w *textWriter, x uint64, err error) error { - if err == nil { - _, err = fmt.Fprint(w, x) - } else { - _, err = fmt.Fprintf(w, "/* %v */", err) - } - return err -} - -type int32Slice []int32 - -func (s int32Slice) Len() int { return len(s) } -func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } -func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// writeExtensions writes all the extensions in pv. -// pv is assumed to be a pointer to a protocol message struct that is extendable. -func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { - emap := extensionMaps[pv.Type().Elem()] - ep, _ := extendable(pv.Interface()) - - // Order the extensions by ID. - // This isn't strictly necessary, but it will give us - // canonical output, which will also make testing easier. - m, mu := ep.extensionsRead() - if m == nil { - return nil - } - mu.Lock() - ids := make([]int32, 0, len(m)) - for id := range m { - ids = append(ids, id) - } - sort.Sort(int32Slice(ids)) - mu.Unlock() - - for _, extNum := range ids { - ext := m[extNum] - var desc *ExtensionDesc - if emap != nil { - desc = emap[extNum] - } - if desc == nil { - // Unknown extension. - if err := writeUnknownStruct(w, ext.enc); err != nil { - return err - } - continue - } - - pb, err := GetExtension(ep, desc) - if err != nil { - return fmt.Errorf("failed getting extension: %v", err) - } - - // Repeated extensions will appear as a slice. - if !desc.repeated() { - if err := tm.writeExtension(w, desc.Name, pb); err != nil { - return err - } - } else { - v := reflect.ValueOf(pb) - for i := 0; i < v.Len(); i++ { - if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { - return err - } - } - } - } - return nil -} - -func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { - if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte(' '); err != nil { - return err - } - } - if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { - return err - } - if err := w.WriteByte('\n'); err != nil { - return err - } - return nil -} - -func (w *textWriter) writeIndent() { - if !w.complete { - return - } - remain := w.ind * 2 - for remain > 0 { - n := remain - if n > len(spaces) { - n = len(spaces) - } - w.w.Write(spaces[:n]) - remain -= n - } - w.complete = false -} - -// TextMarshaler is a configurable text format marshaler. -type TextMarshaler struct { - Compact bool // use compact text format (one line). - ExpandAny bool // expand google.protobuf.Any messages of known types -} - -// Marshal writes a given protocol buffer in text format. -// The only errors returned are from w. -func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { - val := reflect.ValueOf(pb) - if pb == nil || val.IsNil() { - w.Write([]byte("")) - return nil - } - var bw *bufio.Writer - ww, ok := w.(writer) - if !ok { - bw = bufio.NewWriter(w) - ww = bw - } - aw := &textWriter{ - w: ww, - complete: true, - compact: tm.Compact, - } - - if etm, ok := pb.(encoding.TextMarshaler); ok { - text, err := etm.MarshalText() - if err != nil { - return err - } - if _, err = aw.Write(text); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil - } - // Dereference the received pointer so we don't have outer < and >. - v := reflect.Indirect(val) - if err := tm.writeStruct(aw, v); err != nil { - return err - } - if bw != nil { - return bw.Flush() - } - return nil -} - -// Text is the same as Marshal, but returns the string directly. -func (tm *TextMarshaler) Text(pb Message) string { - var buf bytes.Buffer - tm.Marshal(&buf, pb) - return buf.String() -} - -var ( - defaultTextMarshaler = TextMarshaler{} - compactTextMarshaler = TextMarshaler{Compact: true} -) - -// TODO: consider removing some of the Marshal functions below. - -// MarshalText writes a given protocol buffer in text format. -// The only errors returned are from w. -func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } - -// MarshalTextString is the same as MarshalText, but returns the string directly. -func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } - -// CompactText writes a given protocol buffer in compact text format (one line). -func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } - -// CompactTextString is the same as CompactText, but returns the string directly. -func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go deleted file mode 100644 index 5e14513f2..000000000 --- a/vendor/github.com/golang/protobuf/proto/text_parser.go +++ /dev/null @@ -1,895 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -// Functions for parsing the Text protocol buffer format. -// TODO: message sets. - -import ( - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" - "unicode/utf8" -) - -// Error string emitted when deserializing Any and fields are already set -const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" - -type ParseError struct { - Message string - Line int // 1-based line number - Offset int // 0-based byte offset from start of input -} - -func (p *ParseError) Error() string { - if p.Line == 1 { - // show offset only for first line - return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) - } - return fmt.Sprintf("line %d: %v", p.Line, p.Message) -} - -type token struct { - value string - err *ParseError - line int // line number - offset int // byte number from start of input, not start of line - unquoted string // the unquoted version of value, if it was a quoted string -} - -func (t *token) String() string { - if t.err == nil { - return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) - } - return fmt.Sprintf("parse error: %v", t.err) -} - -type textParser struct { - s string // remaining input - done bool // whether the parsing is finished (success or error) - backed bool // whether back() was called - offset, line int - cur token -} - -func newTextParser(s string) *textParser { - p := new(textParser) - p.s = s - p.line = 1 - p.cur.line = 1 - return p -} - -func (p *textParser) errorf(format string, a ...interface{}) *ParseError { - pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} - p.cur.err = pe - p.done = true - return pe -} - -// Numbers and identifiers are matched by [-+._A-Za-z0-9] -func isIdentOrNumberChar(c byte) bool { - switch { - case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': - return true - case '0' <= c && c <= '9': - return true - } - switch c { - case '-', '+', '.', '_': - return true - } - return false -} - -func isWhitespace(c byte) bool { - switch c { - case ' ', '\t', '\n', '\r': - return true - } - return false -} - -func isQuote(c byte) bool { - switch c { - case '"', '\'': - return true - } - return false -} - -func (p *textParser) skipWhitespace() { - i := 0 - for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { - if p.s[i] == '#' { - // comment; skip to end of line or input - for i < len(p.s) && p.s[i] != '\n' { - i++ - } - if i == len(p.s) { - break - } - } - if p.s[i] == '\n' { - p.line++ - } - i++ - } - p.offset += i - p.s = p.s[i:len(p.s)] - if len(p.s) == 0 { - p.done = true - } -} - -func (p *textParser) advance() { - // Skip whitespace - p.skipWhitespace() - if p.done { - return - } - - // Start of non-whitespace - p.cur.err = nil - p.cur.offset, p.cur.line = p.offset, p.line - p.cur.unquoted = "" - switch p.s[0] { - case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': - // Single symbol - p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] - case '"', '\'': - // Quoted string - i := 1 - for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { - if p.s[i] == '\\' && i+1 < len(p.s) { - // skip escaped char - i++ - } - i++ - } - if i >= len(p.s) || p.s[i] != p.s[0] { - p.errorf("unmatched quote") - return - } - unq, err := unquoteC(p.s[1:i], rune(p.s[0])) - if err != nil { - p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) - return - } - p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] - p.cur.unquoted = unq - default: - i := 0 - for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { - i++ - } - if i == 0 { - p.errorf("unexpected byte %#x", p.s[0]) - return - } - p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] - } - p.offset += len(p.cur.value) -} - -var ( - errBadUTF8 = errors.New("proto: bad UTF-8") - errBadHex = errors.New("proto: bad hexadecimal") -) - -func unquoteC(s string, quote rune) (string, error) { - // This is based on C++'s tokenizer.cc. - // Despite its name, this is *not* parsing C syntax. - // For instance, "\0" is an invalid quoted string. - - // Avoid allocation in trivial cases. - simple := true - for _, r := range s { - if r == '\\' || r == quote { - simple = false - break - } - } - if simple { - return s, nil - } - - buf := make([]byte, 0, 3*len(s)/2) - for len(s) > 0 { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", errBadUTF8 - } - s = s[n:] - if r != '\\' { - if r < utf8.RuneSelf { - buf = append(buf, byte(r)) - } else { - buf = append(buf, string(r)...) - } - continue - } - - ch, tail, err := unescape(s) - if err != nil { - return "", err - } - buf = append(buf, ch...) - s = tail - } - return string(buf), nil -} - -func unescape(s string) (ch string, tail string, err error) { - r, n := utf8.DecodeRuneInString(s) - if r == utf8.RuneError && n == 1 { - return "", "", errBadUTF8 - } - s = s[n:] - switch r { - case 'a': - return "\a", s, nil - case 'b': - return "\b", s, nil - case 'f': - return "\f", s, nil - case 'n': - return "\n", s, nil - case 'r': - return "\r", s, nil - case 't': - return "\t", s, nil - case 'v': - return "\v", s, nil - case '?': - return "?", s, nil // trigraph workaround - case '\'', '"', '\\': - return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': - if len(s) < 2 { - return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) - } - base := 8 - ss := s[:2] - s = s[2:] - if r == 'x' || r == 'X' { - base = 16 - } else { - ss = string(r) + ss - } - i, err := strconv.ParseUint(ss, base, 8) - if err != nil { - return "", "", err - } - return string([]byte{byte(i)}), s, nil - case 'u', 'U': - n := 4 - if r == 'U' { - n = 8 - } - if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) - } - - bs := make([]byte, n/2) - for i := 0; i < n; i += 2 { - a, ok1 := unhex(s[i]) - b, ok2 := unhex(s[i+1]) - if !ok1 || !ok2 { - return "", "", errBadHex - } - bs[i/2] = a<<4 | b - } - s = s[n:] - return string(bs), s, nil - } - return "", "", fmt.Errorf(`unknown escape \%c`, r) -} - -// Adapted from src/pkg/strconv/quote.go. -func unhex(b byte) (v byte, ok bool) { - switch { - case '0' <= b && b <= '9': - return b - '0', true - case 'a' <= b && b <= 'f': - return b - 'a' + 10, true - case 'A' <= b && b <= 'F': - return b - 'A' + 10, true - } - return 0, false -} - -// Back off the parser by one token. Can only be done between calls to next(). -// It makes the next advance() a no-op. -func (p *textParser) back() { p.backed = true } - -// Advances the parser and returns the new current token. -func (p *textParser) next() *token { - if p.backed || p.done { - p.backed = false - return &p.cur - } - p.advance() - if p.done { - p.cur.value = "" - } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { - // Look for multiple quoted strings separated by whitespace, - // and concatenate them. - cat := p.cur - for { - p.skipWhitespace() - if p.done || !isQuote(p.s[0]) { - break - } - p.advance() - if p.cur.err != nil { - return &p.cur - } - cat.value += " " + p.cur.value - cat.unquoted += p.cur.unquoted - } - p.done = false // parser may have seen EOF, but we want to return cat - p.cur = cat - } - return &p.cur -} - -func (p *textParser) consumeToken(s string) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != s { - p.back() - return p.errorf("expected %q, found %q", s, tok.value) - } - return nil -} - -// Return a RequiredNotSetError indicating which required field was not set. -func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { - st := sv.Type() - sprops := GetProperties(st) - for i := 0; i < st.NumField(); i++ { - if !isNil(sv.Field(i)) { - continue - } - - props := sprops.Prop[i] - if props.Required { - return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} - } - } - return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen -} - -// Returns the index in the struct for the named field, as well as the parsed tag properties. -func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { - i, ok := sprops.decoderOrigNames[name] - if ok { - return i, sprops.Prop[i], true - } - return -1, nil, false -} - -// Consume a ':' from the input stream (if the next token is a colon), -// returning an error if a colon is needed but not present. -func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ":" { - // Colon is optional when the field is a group or message. - needColon := true - switch props.Wire { - case "group": - needColon = false - case "bytes": - // A "bytes" field is either a message, a string, or a repeated field; - // those three become *T, *string and []T respectively, so we can check for - // this field being a pointer to a non-string. - if typ.Kind() == reflect.Ptr { - // *T or *string - if typ.Elem().Kind() == reflect.String { - break - } - } else if typ.Kind() == reflect.Slice { - // []T or []*T - if typ.Elem().Kind() != reflect.Ptr { - break - } - } else if typ.Kind() == reflect.String { - // The proto3 exception is for a string field, - // which requires a colon. - break - } - needColon = false - } - if needColon { - return p.errorf("expected ':', found %q", tok.value) - } - p.back() - } - return nil -} - -func (p *textParser) readStruct(sv reflect.Value, terminator string) error { - st := sv.Type() - sprops := GetProperties(st) - reqCount := sprops.reqCount - var reqFieldErr error - fieldSet := make(map[string]bool) - // A struct is a sequence of "name: value", terminated by one of - // '>' or '}', or the end of the input. A name may also be - // "[extension]" or "[type/url]". - // - // The whole struct can also be an expanded Any message, like: - // [type/url] < ... struct contents ... > - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - if tok.value == "[" { - // Looks like an extension or an Any. - // - // TODO: Check whether we need to handle - // namespace rooted names (e.g. ".something.Foo"). - extName, err := p.consumeExtName() - if err != nil { - return err - } - - if s := strings.LastIndex(extName, "/"); s >= 0 { - // If it contains a slash, it's an Any type URL. - messageName := extName[s+1:] - mt := MessageType(messageName) - if mt == nil { - return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) - } - tok = p.next() - if tok.err != nil { - return tok.err - } - // consume an optional colon - if tok.value == ":" { - tok = p.next() - if tok.err != nil { - return tok.err - } - } - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - v := reflect.New(mt.Elem()) - if pe := p.readStruct(v.Elem(), terminator); pe != nil { - return pe - } - b, err := Marshal(v.Interface().(Message)) - if err != nil { - return p.errorf("failed to marshal message of type %q: %v", messageName, err) - } - if fieldSet["type_url"] { - return p.errorf(anyRepeatedlyUnpacked, "type_url") - } - if fieldSet["value"] { - return p.errorf(anyRepeatedlyUnpacked, "value") - } - sv.FieldByName("TypeUrl").SetString(extName) - sv.FieldByName("Value").SetBytes(b) - fieldSet["type_url"] = true - fieldSet["value"] = true - continue - } - - var desc *ExtensionDesc - // This could be faster, but it's functional. - // TODO: Do something smarter than a linear scan. - for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { - if d.Name == extName { - desc = d - break - } - } - if desc == nil { - return p.errorf("unrecognized extension %q", extName) - } - - props := &Properties{} - props.Parse(desc.Tag) - - typ := reflect.TypeOf(desc.ExtensionType) - if err := p.checkForColon(props, typ); err != nil { - return err - } - - rep := desc.repeated() - - // Read the extension structure, and set it in - // the value we're constructing. - var ext reflect.Value - if !rep { - ext = reflect.New(typ).Elem() - } else { - ext = reflect.New(typ.Elem()).Elem() - } - if err := p.readAny(ext, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - ep := sv.Addr().Interface().(Message) - if !rep { - SetExtension(ep, desc, ext.Interface()) - } else { - old, err := GetExtension(ep, desc) - var sl reflect.Value - if err == nil { - sl = reflect.ValueOf(old) // existing slice - } else { - sl = reflect.MakeSlice(typ, 0, 1) - } - sl = reflect.Append(sl, ext) - SetExtension(ep, desc, sl.Interface()) - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - continue - } - - // This is a normal, non-extension field. - name := tok.value - var dst reflect.Value - fi, props, ok := structFieldByName(sprops, name) - if ok { - dst = sv.Field(fi) - } else if oop, ok := sprops.OneofTypes[name]; ok { - // It is a oneof. - props = oop.Prop - nv := reflect.New(oop.Type.Elem()) - dst = nv.Elem().Field(0) - field := sv.Field(oop.Field) - if !field.IsNil() { - return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) - } - field.Set(nv) - } - if !dst.IsValid() { - return p.errorf("unknown field name %q in %v", name, st) - } - - if dst.Kind() == reflect.Map { - // Consume any colon. - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Construct the map if it doesn't already exist. - if dst.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - key := reflect.New(dst.Type().Key()).Elem() - val := reflect.New(dst.Type().Elem()).Elem() - - // The map entry should be this sequence of tokens: - // < key : KEY value : VALUE > - // However, implementations may omit key or value, and technically - // we should support them in any order. See b/28924776 for a time - // this went wrong. - - tok := p.next() - var terminator string - switch tok.value { - case "<": - terminator = ">" - case "{": - terminator = "}" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - for { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == terminator { - break - } - switch tok.value { - case "key": - if err := p.consumeToken(":"); err != nil { - return err - } - if err := p.readAny(key, props.mkeyprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { - return err - } - if err := p.readAny(val, props.mvalprop); err != nil { - return err - } - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - default: - p.back() - return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) - } - } - - dst.SetMapIndex(key, val) - continue - } - - // Check that it's not already set if it's not a repeated field. - if !props.Repeated && fieldSet[name] { - return p.errorf("non-repeated field %q was repeated", name) - } - - if err := p.checkForColon(props, dst.Type()); err != nil { - return err - } - - // Parse into the field. - fieldSet[name] = true - if err := p.readAny(dst, props); err != nil { - if _, ok := err.(*RequiredNotSetError); !ok { - return err - } - reqFieldErr = err - } - if props.Required { - reqCount-- - } - - if err := p.consumeOptionalSeparator(); err != nil { - return err - } - - } - - if reqCount > 0 { - return p.missingRequiredFieldError(sv) - } - return reqFieldErr -} - -// consumeExtName consumes extension name or expanded Any type URL and the -// following ']'. It returns the name or URL consumed. -func (p *textParser) consumeExtName() (string, error) { - tok := p.next() - if tok.err != nil { - return "", tok.err - } - - // If extension name or type url is quoted, it's a single token. - if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { - name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) - if err != nil { - return "", err - } - return name, p.consumeToken("]") - } - - // Consume everything up to "]" - var parts []string - for tok.value != "]" { - parts = append(parts, tok.value) - tok = p.next() - if tok.err != nil { - return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) - } - } - return strings.Join(parts, ""), nil -} - -// consumeOptionalSeparator consumes an optional semicolon or comma. -// It is used in readStruct to provide backward compatibility. -func (p *textParser) consumeOptionalSeparator() error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value != ";" && tok.value != "," { - p.back() - } - return nil -} - -func (p *textParser) readAny(v reflect.Value, props *Properties) error { - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "" { - return p.errorf("unexpected EOF") - } - - switch fv := v; fv.Kind() { - case reflect.Slice: - at := v.Type() - if at.Elem().Kind() == reflect.Uint8 { - // Special case for []byte - if tok.value[0] != '"' && tok.value[0] != '\'' { - // Deliberately written out here, as the error after - // this switch statement would write "invalid []byte: ...", - // which is not as user-friendly. - return p.errorf("invalid string: %v", tok.value) - } - bytes := []byte(tok.unquoted) - fv.Set(reflect.ValueOf(bytes)) - return nil - } - // Repeated field. - if tok.value == "[" { - // Repeated field with list notation, like [1,2,3]. - for { - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - err := p.readAny(fv.Index(fv.Len()-1), props) - if err != nil { - return err - } - tok := p.next() - if tok.err != nil { - return tok.err - } - if tok.value == "]" { - break - } - if tok.value != "," { - return p.errorf("Expected ']' or ',' found %q", tok.value) - } - } - return nil - } - // One value of the repeated field. - p.back() - fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) - return p.readAny(fv.Index(fv.Len()-1), props) - case reflect.Bool: - // true/1/t/True or false/f/0/False. - switch tok.value { - case "true", "1", "t", "True": - fv.SetBool(true) - return nil - case "false", "0", "f", "False": - fv.SetBool(false) - return nil - } - case reflect.Float32, reflect.Float64: - v := tok.value - // Ignore 'f' for compatibility with output generated by C++, but don't - // remove 'f' when the value is "-inf" or "inf". - if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { - v = v[:len(v)-1] - } - if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { - fv.SetFloat(f) - return nil - } - case reflect.Int32: - if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { - fv.SetInt(x) - return nil - } - - if len(props.Enum) == 0 { - break - } - m, ok := enumValueMaps[props.Enum] - if !ok { - break - } - x, ok := m[tok.value] - if !ok { - break - } - fv.SetInt(int64(x)) - return nil - case reflect.Int64: - if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { - fv.SetInt(x) - return nil - } - - case reflect.Ptr: - // A basic field (indirected through pointer), or a repeated message/group - p.back() - fv.Set(reflect.New(fv.Type().Elem())) - return p.readAny(fv.Elem(), props) - case reflect.String: - if tok.value[0] == '"' || tok.value[0] == '\'' { - fv.SetString(tok.unquoted) - return nil - } - case reflect.Struct: - var terminator string - switch tok.value { - case "{": - terminator = "}" - case "<": - terminator = ">" - default: - return p.errorf("expected '{' or '<', found %q", tok.value) - } - // TODO: Handle nested messages which implement encoding.TextUnmarshaler. - return p.readStruct(fv, terminator) - case reflect.Uint32: - if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(x) - return nil - } - case reflect.Uint64: - if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { - fv.SetUint(x) - return nil - } - } - return p.errorf("invalid %v: %v", v.Type(), tok.value) -} - -// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb -// before starting to unmarshal, so any existing data in pb is always removed. -// If a required field is not set and no other error occurs, -// UnmarshalText returns *RequiredNotSetError. -func UnmarshalText(s string, pb Message) error { - if um, ok := pb.(encoding.TextUnmarshaler); ok { - err := um.UnmarshalText([]byte(s)) - return err - } - pb.Reset() - v := reflect.ValueOf(pb) - if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { - return pe - } - return nil -} diff --git a/vendor/github.com/golang/protobuf/proto/text_parser_test.go b/vendor/github.com/golang/protobuf/proto/text_parser_test.go deleted file mode 100644 index 8f7cb4d27..000000000 --- a/vendor/github.com/golang/protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,673 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "math" - "reflect" - "testing" - - . "github.com/golang/protobuf/proto" - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - . "github.com/golang/protobuf/proto/testdata" -) - -type UnmarshalTextTest struct { - in string - err string // if "", no error expected - out *MyMessage -} - -func buildExtStructTest(text string) UnmarshalTextTest { - msg := &MyMessage{ - Count: Int32(42), - } - SetExtension(msg, E_Ext_More, &Ext{ - Data: String("Hello, world!"), - }) - return UnmarshalTextTest{in: text, out: msg} -} - -func buildExtDataTest(text string) UnmarshalTextTest { - msg := &MyMessage{ - Count: Int32(42), - } - SetExtension(msg, E_Ext_Text, String("Hello, world!")) - SetExtension(msg, E_Ext_Number, Int32(1729)) - return UnmarshalTextTest{in: text, out: msg} -} - -func buildExtRepStringTest(text string) UnmarshalTextTest { - msg := &MyMessage{ - Count: Int32(42), - } - if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { - panic(err) - } - return UnmarshalTextTest{in: text, out: msg} -} - -var unMarshalTextTests = []UnmarshalTextTest{ - // Basic - { - in: " count:42\n name:\"Dave\" ", - out: &MyMessage{ - Count: Int32(42), - Name: String("Dave"), - }, - }, - - // Empty quoted string - { - in: `count:42 name:""`, - out: &MyMessage{ - Count: Int32(42), - Name: String(""), - }, - }, - - // Quoted string concatenation with double quotes - { - in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - - // Quoted string concatenation with single quotes - { - in: "count:42 name: 'My name is '\n'elsewhere'", - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - - // Quoted string concatenations with mixed quotes - { - in: "count:42 name: 'My name is '\n\"elsewhere\"", - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - { - in: "count:42 name: \"My name is \"\n'elsewhere'", - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - - // Quoted string with escaped apostrophe - { - in: `count:42 name: "HOLIDAY - New Year\'s Day"`, - out: &MyMessage{ - Count: Int32(42), - Name: String("HOLIDAY - New Year's Day"), - }, - }, - - // Quoted string with single quote - { - in: `count:42 name: 'Roger "The Ramster" Ramjet'`, - out: &MyMessage{ - Count: Int32(42), - Name: String(`Roger "The Ramster" Ramjet`), - }, - }, - - // Quoted string with all the accepted special characters from the C++ test - { - in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", - out: &MyMessage{ - Count: Int32(42), - Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), - }, - }, - - // Quoted string with quoted backslash - { - in: `count:42 name: "\\'xyz"`, - out: &MyMessage{ - Count: Int32(42), - Name: String(`\'xyz`), - }, - }, - - // Quoted string with UTF-8 bytes. - { - in: "count:42 name: '\303\277\302\201\xAB'", - out: &MyMessage{ - Count: Int32(42), - Name: String("\303\277\302\201\xAB"), - }, - }, - - // Bad quoted string - { - in: `inner: < host: "\0" >` + "\n", - err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, - }, - - // Number too large for int64 - { - in: "count: 1 others { key: 123456789012345678901 }", - err: "line 1.23: invalid int64: 123456789012345678901", - }, - - // Number too large for int32 - { - in: "count: 1234567890123", - err: "line 1.7: invalid int32: 1234567890123", - }, - - // Number in hexadecimal - { - in: "count: 0x2beef", - out: &MyMessage{ - Count: Int32(0x2beef), - }, - }, - - // Number in octal - { - in: "count: 024601", - out: &MyMessage{ - Count: Int32(024601), - }, - }, - - // Floating point number with "f" suffix - { - in: "count: 4 others:< weight: 17.0f >", - out: &MyMessage{ - Count: Int32(4), - Others: []*OtherMessage{ - { - Weight: Float32(17), - }, - }, - }, - }, - - // Floating point positive infinity - { - in: "count: 4 bigfloat: inf", - out: &MyMessage{ - Count: Int32(4), - Bigfloat: Float64(math.Inf(1)), - }, - }, - - // Floating point negative infinity - { - in: "count: 4 bigfloat: -inf", - out: &MyMessage{ - Count: Int32(4), - Bigfloat: Float64(math.Inf(-1)), - }, - }, - - // Number too large for float32 - { - in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", - err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", - }, - - // Number posing as a quoted string - { - in: `inner: < host: 12 >` + "\n", - err: `line 1.15: invalid string: 12`, - }, - - // Quoted string posing as int32 - { - in: `count: "12"`, - err: `line 1.7: invalid int32: "12"`, - }, - - // Quoted string posing a float32 - { - in: `others:< weight: "17.4" >`, - err: `line 1.17: invalid float32: "17.4"`, - }, - - // Enum - { - in: `count:42 bikeshed: BLUE`, - out: &MyMessage{ - Count: Int32(42), - Bikeshed: MyMessage_BLUE.Enum(), - }, - }, - - // Repeated field - { - in: `count:42 pet: "horsey" pet:"bunny"`, - out: &MyMessage{ - Count: Int32(42), - Pet: []string{"horsey", "bunny"}, - }, - }, - - // Repeated field with list notation - { - in: `count:42 pet: ["horsey", "bunny"]`, - out: &MyMessage{ - Count: Int32(42), - Pet: []string{"horsey", "bunny"}, - }, - }, - - // Repeated message with/without colon and <>/{} - { - in: `count:42 others:{} others{} others:<> others:{}`, - out: &MyMessage{ - Count: Int32(42), - Others: []*OtherMessage{ - {}, - {}, - {}, - {}, - }, - }, - }, - - // Missing colon for inner message - { - in: `count:42 inner < host: "cauchy.syd" >`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("cauchy.syd"), - }, - }, - }, - - // Missing colon for string field - { - in: `name "Dave"`, - err: `line 1.5: expected ':', found "\"Dave\""`, - }, - - // Missing colon for int32 field - { - in: `count 42`, - err: `line 1.6: expected ':', found "42"`, - }, - - // Missing required field - { - in: `name: "Pawel"`, - err: `proto: required field "testdata.MyMessage.count" not set`, - out: &MyMessage{ - Name: String("Pawel"), - }, - }, - - // Missing required field in a required submessage - { - in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`, - err: `proto: required field "testdata.InnerMessage.host" not set`, - out: &MyMessage{ - Count: Int32(42), - WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}}, - }, - }, - - // Repeated non-repeated field - { - in: `name: "Rob" name: "Russ"`, - err: `line 1.12: non-repeated field "name" was repeated`, - }, - - // Group - { - in: `count: 17 SomeGroup { group_field: 12 }`, - out: &MyMessage{ - Count: Int32(17), - Somegroup: &MyMessage_SomeGroup{ - GroupField: Int32(12), - }, - }, - }, - - // Semicolon between fields - { - in: `count:3;name:"Calvin"`, - out: &MyMessage{ - Count: Int32(3), - Name: String("Calvin"), - }, - }, - // Comma between fields - { - in: `count:4,name:"Ezekiel"`, - out: &MyMessage{ - Count: Int32(4), - Name: String("Ezekiel"), - }, - }, - - // Boolean false - { - in: `count:42 inner { host: "example.com" connected: false }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean true - { - in: `count:42 inner { host: "example.com" connected: true }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - // Boolean 0 - { - in: `count:42 inner { host: "example.com" connected: 0 }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean 1 - { - in: `count:42 inner { host: "example.com" connected: 1 }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - // Boolean f - { - in: `count:42 inner { host: "example.com" connected: f }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean t - { - in: `count:42 inner { host: "example.com" connected: t }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - // Boolean False - { - in: `count:42 inner { host: "example.com" connected: False }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean True - { - in: `count:42 inner { host: "example.com" connected: True }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - - // Extension - buildExtStructTest(`count: 42 [testdata.Ext.more]:`), - buildExtStructTest(`count: 42 [testdata.Ext.more] {data:"Hello, world!"}`), - buildExtDataTest(`count: 42 [testdata.Ext.text]:"Hello, world!" [testdata.Ext.number]:1729`), - buildExtRepStringTest(`count: 42 [testdata.greeting]:"bula" [testdata.greeting]:"hola"`), - - // Big all-in-one - { - in: "count:42 # Meaning\n" + - `name:"Dave" ` + - `quote:"\"I didn't want to go.\"" ` + - `pet:"bunny" ` + - `pet:"kitty" ` + - `pet:"horsey" ` + - `inner:<` + - ` host:"footrest.syd" ` + - ` port:7001 ` + - ` connected:true ` + - `> ` + - `others:<` + - ` key:3735928559 ` + - ` value:"\x01A\a\f" ` + - `> ` + - `others:<` + - " weight:58.9 # Atomic weight of Co\n" + - ` inner:<` + - ` host:"lesha.mtv" ` + - ` port:8002 ` + - ` >` + - `>`, - out: &MyMessage{ - Count: Int32(42), - Name: String("Dave"), - Quote: String(`"I didn't want to go."`), - Pet: []string{"bunny", "kitty", "horsey"}, - Inner: &InnerMessage{ - Host: String("footrest.syd"), - Port: Int32(7001), - Connected: Bool(true), - }, - Others: []*OtherMessage{ - { - Key: Int64(3735928559), - Value: []byte{0x1, 'A', '\a', '\f'}, - }, - { - Weight: Float32(58.9), - Inner: &InnerMessage{ - Host: String("lesha.mtv"), - Port: Int32(8002), - }, - }, - }, - }, - }, -} - -func TestUnmarshalText(t *testing.T) { - for i, test := range unMarshalTextTests { - pb := new(MyMessage) - err := UnmarshalText(test.in, pb) - if test.err == "" { - // We don't expect failure. - if err != nil { - t.Errorf("Test %d: Unexpected error: %v", i, err) - } else if !reflect.DeepEqual(pb, test.out) { - t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", - i, pb, test.out) - } - } else { - // We do expect failure. - if err == nil { - t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) - } else if err.Error() != test.err { - t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", - i, err.Error(), test.err) - } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !reflect.DeepEqual(pb, test.out) { - t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", - i, pb, test.out) - } - } - } -} - -func TestUnmarshalTextCustomMessage(t *testing.T) { - msg := &textMessage{} - if err := UnmarshalText("custom", msg); err != nil { - t.Errorf("Unexpected error from custom unmarshal: %v", err) - } - if UnmarshalText("not custom", msg) == nil { - t.Errorf("Didn't get expected error from custom unmarshal") - } -} - -// Regression test; this caused a panic. -func TestRepeatedEnum(t *testing.T) { - pb := new(RepeatedEnum) - if err := UnmarshalText("color: RED", pb); err != nil { - t.Fatal(err) - } - exp := &RepeatedEnum{ - Color: []RepeatedEnum_Color{RepeatedEnum_RED}, - } - if !Equal(pb, exp) { - t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) - } -} - -func TestProto3TextParsing(t *testing.T) { - m := new(proto3pb.Message) - const in = `name: "Wallace" true_scotsman: true` - want := &proto3pb.Message{ - Name: "Wallace", - TrueScotsman: true, - } - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -func TestMapParsing(t *testing.T) { - m := new(MessageWithMap) - const in = `name_mapping: name_mapping:` + - `msg_mapping:,>` + // separating commas are okay - `msg_mapping>` + // no colon after "value" - `msg_mapping:>` + // omitted key - `msg_mapping:` + // omitted value - `byte_mapping:` + - `byte_mapping:<>` // omitted key and value - want := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Beatles", - 1234: "Feist", - }, - MsgMapping: map[int64]*FloatingPoint{ - -4: {F: Float64(2.0)}, - -2: {F: Float64(4.0)}, - 0: {F: Float64(5.0)}, - 1: nil, - }, - ByteMapping: map[bool][]byte{ - false: nil, - true: []byte("so be it"), - }, - } - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } -} - -func TestOneofParsing(t *testing.T) { - const in = `name:"Shrek"` - m := new(Communique) - want := &Communique{Union: &Communique_Name{"Shrek"}} - if err := UnmarshalText(in, m); err != nil { - t.Fatal(err) - } - if !Equal(m, want) { - t.Errorf("\n got %v\nwant %v", m, want) - } - - const inOverwrite = `name:"Shrek" number:42` - m = new(Communique) - testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'" - if err := UnmarshalText(inOverwrite, m); err == nil { - t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr) - } else if err.Error() != testErr { - t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v", - err.Error(), testErr) - } - -} - -var benchInput string - -func init() { - benchInput = "count: 4\n" - for i := 0; i < 1000; i++ { - benchInput += "pet: \"fido\"\n" - } - - // Check it is valid input. - pb := new(MyMessage) - err := UnmarshalText(benchInput, pb) - if err != nil { - panic("Bad benchmark input: " + err.Error()) - } -} - -func BenchmarkUnmarshalText(b *testing.B) { - pb := new(MyMessage) - for i := 0; i < b.N; i++ { - UnmarshalText(benchInput, pb) - } - b.SetBytes(int64(len(benchInput))) -} diff --git a/vendor/github.com/golang/protobuf/proto/text_test.go b/vendor/github.com/golang/protobuf/proto/text_test.go deleted file mode 100644 index 3eabacac8..000000000 --- a/vendor/github.com/golang/protobuf/proto/text_test.go +++ /dev/null @@ -1,474 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto_test - -import ( - "bytes" - "errors" - "io/ioutil" - "math" - "strings" - "testing" - - "github.com/golang/protobuf/proto" - - proto3pb "github.com/golang/protobuf/proto/proto3_proto" - pb "github.com/golang/protobuf/proto/testdata" -) - -// textMessage implements the methods that allow it to marshal and unmarshal -// itself as text. -type textMessage struct { -} - -func (*textMessage) MarshalText() ([]byte, error) { - return []byte("custom"), nil -} - -func (*textMessage) UnmarshalText(bytes []byte) error { - if string(bytes) != "custom" { - return errors.New("expected 'custom'") - } - return nil -} - -func (*textMessage) Reset() {} -func (*textMessage) String() string { return "" } -func (*textMessage) ProtoMessage() {} - -func newTestMessage() *pb.MyMessage { - msg := &pb.MyMessage{ - Count: proto.Int32(42), - Name: proto.String("Dave"), - Quote: proto.String(`"I didn't want to go."`), - Pet: []string{"bunny", "kitty", "horsey"}, - Inner: &pb.InnerMessage{ - Host: proto.String("footrest.syd"), - Port: proto.Int32(7001), - Connected: proto.Bool(true), - }, - Others: []*pb.OtherMessage{ - { - Key: proto.Int64(0xdeadbeef), - Value: []byte{1, 65, 7, 12}, - }, - { - Weight: proto.Float32(6.022), - Inner: &pb.InnerMessage{ - Host: proto.String("lesha.mtv"), - Port: proto.Int32(8002), - }, - }, - }, - Bikeshed: pb.MyMessage_BLUE.Enum(), - Somegroup: &pb.MyMessage_SomeGroup{ - GroupField: proto.Int32(8), - }, - // One normally wouldn't do this. - // This is an undeclared tag 13, as a varint (wire type 0) with value 4. - XXX_unrecognized: []byte{13<<3 | 0, 4}, - } - ext := &pb.Ext{ - Data: proto.String("Big gobs for big rats"), - } - if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { - panic(err) - } - greetings := []string{"adg", "easy", "cow"} - if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { - panic(err) - } - - // Add an unknown extension. We marshal a pb.Ext, and fake the ID. - b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) - if err != nil { - panic(err) - } - b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) - proto.SetRawExtension(msg, 201, b) - - // Extensions can be plain fields, too, so let's test that. - b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) - proto.SetRawExtension(msg, 202, b) - - return msg -} - -const text = `count: 42 -name: "Dave" -quote: "\"I didn't want to go.\"" -pet: "bunny" -pet: "kitty" -pet: "horsey" -inner: < - host: "footrest.syd" - port: 7001 - connected: true -> -others: < - key: 3735928559 - value: "\001A\007\014" -> -others: < - weight: 6.022 - inner: < - host: "lesha.mtv" - port: 8002 - > -> -bikeshed: BLUE -SomeGroup { - group_field: 8 -} -/* 2 unknown bytes */ -13: 4 -[testdata.Ext.more]: < - data: "Big gobs for big rats" -> -[testdata.greeting]: "adg" -[testdata.greeting]: "easy" -[testdata.greeting]: "cow" -/* 13 unknown bytes */ -201: "\t3G skiing" -/* 3 unknown bytes */ -202: 19 -` - -func TestMarshalText(t *testing.T) { - buf := new(bytes.Buffer) - if err := proto.MarshalText(buf, newTestMessage()); err != nil { - t.Fatalf("proto.MarshalText: %v", err) - } - s := buf.String() - if s != text { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) - } -} - -func TestMarshalTextCustomMessage(t *testing.T) { - buf := new(bytes.Buffer) - if err := proto.MarshalText(buf, &textMessage{}); err != nil { - t.Fatalf("proto.MarshalText: %v", err) - } - s := buf.String() - if s != "custom" { - t.Errorf("Got %q, expected %q", s, "custom") - } -} -func TestMarshalTextNil(t *testing.T) { - want := "" - tests := []proto.Message{nil, (*pb.MyMessage)(nil)} - for i, test := range tests { - buf := new(bytes.Buffer) - if err := proto.MarshalText(buf, test); err != nil { - t.Fatal(err) - } - if got := buf.String(); got != want { - t.Errorf("%d: got %q want %q", i, got, want) - } - } -} - -func TestMarshalTextUnknownEnum(t *testing.T) { - // The Color enum only specifies values 0-2. - m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} - got := m.String() - const want = `bikeshed:3 ` - if got != want { - t.Errorf("\n got %q\nwant %q", got, want) - } -} - -func TestTextOneof(t *testing.T) { - tests := []struct { - m proto.Message - want string - }{ - // zero message - {&pb.Communique{}, ``}, - // scalar field - {&pb.Communique{Union: &pb.Communique_Number{4}}, `number:4`}, - // message field - {&pb.Communique{Union: &pb.Communique_Msg{ - &pb.Strings{StringField: proto.String("why hello!")}, - }}, `msg:`}, - // bad oneof (should not panic) - {&pb.Communique{Union: &pb.Communique_Msg{nil}}, `msg:/* nil */`}, - } - for _, test := range tests { - got := strings.TrimSpace(test.m.String()) - if got != test.want { - t.Errorf("\n got %s\nwant %s", got, test.want) - } - } -} - -func BenchmarkMarshalTextBuffered(b *testing.B) { - buf := new(bytes.Buffer) - m := newTestMessage() - for i := 0; i < b.N; i++ { - buf.Reset() - proto.MarshalText(buf, m) - } -} - -func BenchmarkMarshalTextUnbuffered(b *testing.B) { - w := ioutil.Discard - m := newTestMessage() - for i := 0; i < b.N; i++ { - proto.MarshalText(w, m) - } -} - -func compact(src string) string { - // s/[ \n]+/ /g; s/ $//; - dst := make([]byte, len(src)) - space, comment := false, false - j := 0 - for i := 0; i < len(src); i++ { - if strings.HasPrefix(src[i:], "/*") { - comment = true - i++ - continue - } - if comment && strings.HasPrefix(src[i:], "*/") { - comment = false - i++ - continue - } - if comment { - continue - } - c := src[i] - if c == ' ' || c == '\n' { - space = true - continue - } - if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { - space = false - } - if c == '{' { - space = false - } - if space { - dst[j] = ' ' - j++ - space = false - } - dst[j] = c - j++ - } - if space { - dst[j] = ' ' - j++ - } - return string(dst[0:j]) -} - -var compactText = compact(text) - -func TestCompactText(t *testing.T) { - s := proto.CompactTextString(newTestMessage()) - if s != compactText { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) - } -} - -func TestStringEscaping(t *testing.T) { - testCases := []struct { - in *pb.Strings - out string - }{ - { - // Test data from C++ test (TextFormatTest.StringEscape). - // Single divergence: we don't escape apostrophes. - &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, - "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", - }, - { - // Test data from the same C++ test. - &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, - "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", - }, - { - // Some UTF-8. - &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, - `string_field: "\000\001\377\201"` + "\n", - }, - } - - for i, tc := range testCases { - var buf bytes.Buffer - if err := proto.MarshalText(&buf, tc.in); err != nil { - t.Errorf("proto.MarsalText: %v", err) - continue - } - s := buf.String() - if s != tc.out { - t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) - continue - } - - // Check round-trip. - pb := new(pb.Strings) - if err := proto.UnmarshalText(s, pb); err != nil { - t.Errorf("#%d: UnmarshalText: %v", i, err) - continue - } - if !proto.Equal(pb, tc.in) { - t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pb) - } - } -} - -// A limitedWriter accepts some output before it fails. -// This is a proxy for something like a nearly-full or imminently-failing disk, -// or a network connection that is about to die. -type limitedWriter struct { - b bytes.Buffer - limit int -} - -var outOfSpace = errors.New("proto: insufficient space") - -func (w *limitedWriter) Write(p []byte) (n int, err error) { - var avail = w.limit - w.b.Len() - if avail <= 0 { - return 0, outOfSpace - } - if len(p) <= avail { - return w.b.Write(p) - } - n, _ = w.b.Write(p[:avail]) - return n, outOfSpace -} - -func TestMarshalTextFailing(t *testing.T) { - // Try lots of different sizes to exercise more error code-paths. - for lim := 0; lim < len(text); lim++ { - buf := new(limitedWriter) - buf.limit = lim - err := proto.MarshalText(buf, newTestMessage()) - // We expect a certain error, but also some partial results in the buffer. - if err != outOfSpace { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) - } - s := buf.b.String() - x := text[:buf.limit] - if s != x { - t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) - } - } -} - -func TestFloats(t *testing.T) { - tests := []struct { - f float64 - want string - }{ - {0, "0"}, - {4.7, "4.7"}, - {math.Inf(1), "inf"}, - {math.Inf(-1), "-inf"}, - {math.NaN(), "nan"}, - } - for _, test := range tests { - msg := &pb.FloatingPoint{F: &test.f} - got := strings.TrimSpace(msg.String()) - want := `f:` + test.want - if got != want { - t.Errorf("f=%f: got %q, want %q", test.f, got, want) - } - } -} - -func TestRepeatedNilText(t *testing.T) { - m := &pb.MessageList{ - Message: []*pb.MessageList_Message{ - nil, - &pb.MessageList_Message{ - Name: proto.String("Horse"), - }, - nil, - }, - } - want := `Message -Message { - name: "Horse" -} -Message -` - if s := proto.MarshalTextString(m); s != want { - t.Errorf(" got: %s\nwant: %s", s, want) - } -} - -func TestProto3Text(t *testing.T) { - tests := []struct { - m proto.Message - want string - }{ - // zero message - {&proto3pb.Message{}, ``}, - // zero message except for an empty byte slice - {&proto3pb.Message{Data: []byte{}}, ``}, - // trivial case - {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, - // empty map - {&pb.MessageWithMap{}, ``}, - // non-empty map; map format is the same as a repeated struct, - // and they are sorted by key (numerically for numeric keys). - { - &pb.MessageWithMap{NameMapping: map[int32]string{ - -1: "Negatory", - 7: "Lucky", - 1234: "Feist", - 6345789: "Otis", - }}, - `name_mapping: ` + - `name_mapping: ` + - `name_mapping: ` + - `name_mapping:`, - }, - // map with nil value; not well-defined, but we shouldn't crash - { - &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, - `msg_mapping:`, - }, - } - for _, test := range tests { - got := strings.TrimSpace(test.m.String()) - if got != test.want { - t.Errorf("\n got %s\nwant %s", got, test.want) - } - } -} diff --git a/vendor/github.com/google/go-github/.gitignore b/vendor/github.com/google/go-github/.gitignore deleted file mode 100644 index 3515c4b97..000000000 --- a/vendor/github.com/google/go-github/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.test -coverage.out diff --git a/vendor/github.com/google/go-github/.travis.yml b/vendor/github.com/google/go-github/.travis.yml deleted file mode 100644 index f575d459e..000000000 --- a/vendor/github.com/google/go-github/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -sudo: false -language: go -go: - - 1.9.x - - 1.8.x - - 1.7.x - - master -matrix: - allow_failures: - - go: master - fast_finish: true -env: - secure: "IrnPmy/rkIP6Nrbqji+u7MCAibQlA6WvPLEllmDQ2yZP/uIe3wLwwYbTu9BOkgzoLA+f8PA6u3pp/RhY/rtaM4NzHAO2nVfGIv9UHUQ3NGq0DYS6rODjVKhq7vkhELoagRewyqFVN4rE0LnExkknRMgjQfRke6/DA7u7Xm8JyhY=" # COVERALLS_TOKEN -install: - - go get golang.org/x/tools/cmd/cover - - go get github.com/mattn/goveralls - - # Do not install go-github yet, since we want it to happen inside the script step. -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d -s .) - - go generate -x ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code) # Check that go generate ./... produces a zero diff; clean up any changes afterwards. - - go tool vet . - - go test -v -race ./... - - go test -v -tags=integration -run=^$ ./test/integration # Check that integration test builds successfully, but don't run any of the tests (they hit live GitHub API). - - # Generate test coverage report. This must be after all other tests. - #- rm github/github-accessors.go # exclude generated code - #- go test -v -covermode=count -coverprofile=coverage.out ./github - #- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/vendor/github.com/google/go-github/AUTHORS b/vendor/github.com/google/go-github/AUTHORS index c15c465a4..862f2c864 100644 --- a/vendor/github.com/google/go-github/AUTHORS +++ b/vendor/github.com/google/go-github/AUTHORS @@ -17,6 +17,7 @@ Alec Thomas Aleks Clark Alex Bramley Alexander Harkness +Allen Sun Amey Sakhadeo Andreas Garnæs Andrew Ryabchun @@ -24,23 +25,31 @@ Andy Hume Andy Lindeman Anshuman Bhartiya Antoine Pelisse +Anubha Kushwaha +appilon Aravind Arıl Bozoluk Austin Dizzy +Ben Batha Beshr Kayali Beyang Liu Billy Lynch Björn Häuser Brad Harris +Brad Moylan Bradley Falzon +Brandon Cook Brian Egizi Bryan Boreham Cami Diez Carlos Alexandro Becker chandresh-pancholi +Charles Fenwick Elliott Charlie Yan +Chris King Chris Roche Chris Schaefer +Christoph Sassenberg Colin Misare Craig Peterson Cristian Maglie @@ -49,12 +58,20 @@ Daniel Leavitt Dave Du Cros Dave Henderson David Deng +David Jannotta +Davide Zipeto +Dennis Webb +Dhi Aurrahman Diego Lapiduz Dmitri Shuralyov dmnlk Don Petersen Doug Turner Drew Fradette +Eli Uriegas +Elliott Beach +Emerson Wood +eperm erwinvaneyk Fabrice Filippo Valsorda @@ -63,11 +80,14 @@ Francesc Gil Francis Fredrik Jönsson Garrett Squire +George Kontridze Georgy Buranov Gnahz Google Inc. griffin_stewie +Guillaume Jacquet Guz Alexander +Guðmundur Bjarni Ólafsson Hanno Hecker Hari haran haya14busa @@ -78,13 +98,20 @@ Isao Jonas isqua Jameel Haffejee Jan Kosecki +Jeremy Morris +Jesse Newland Jihoon Chung Jimmi Dyson +Joan Saum Joe Tsai +John Barton John Engelman +jpbelanger-mtl Juan Basso +Julien Garcia Gonzalez Julien Rostand Justin Abrahms +Jusung Lee jzhoucliqr Katrina Owen Keita Urashima @@ -92,47 +119,67 @@ Kevin Burke Konrad Malawski Kookheon Kwon Krzysztof Kowalczyk +Kshitij Saraogi kyokomi Lucas Alcantara Luke Evers +Luke Kysow Luke Roberts Luke Young Maksim Zhylinski Martin-Louis Bright +Marwan Sulaiman Mat Geist +Matt Matt Brender Matt Landis Maxime Bury +Michael Spiegel Michael Tiller Michał Glapa Nathan VanBenschoten Neil O'Toole Nick Miyake Nick Spragg +Nikhita Raghunath Noah Zoschke ns-cweber +Oleg Kovalov Ondřej Kupka Panagiotis Moustafellos +Parham Alvani Parker Moore +parkhyukjun89 Pavel Shtanko +Pete Wagner +Petr Shevtsov Pierre Carrier Piotr Zurek Quinn Slack Rackspace US, Inc. +Radek Simko +Radliński Ignacy +Rajendra arora RaviTeja Pothana rc1140 Red Hat, Inc. Rob Figueiredo +Rohit Upadhyay Ronak Jain Ruben Vereecken Ryan Lower Sahil Dua saisi Sam Minnée +Sandeep Sukhani Sander van Harmelen +Sanket Payghan +Sarasa Kisaragi Sean Wang +Sebastian Mandrean Sebastian Mæland Pedersen Sevki +Shagun Khemka Shawn Catanzarite Shawn Smith sona-tar @@ -145,6 +192,7 @@ ttacon Varadarajan Aravamudhan Victor Castell Victor Vrantchan +Vlad Ungureanu Will Maier William Bailey Yann Malet diff --git a/vendor/github.com/google/go-github/CONTRIBUTING.md b/vendor/github.com/google/go-github/CONTRIBUTING.md deleted file mode 100644 index 68a23f005..000000000 --- a/vendor/github.com/google/go-github/CONTRIBUTING.md +++ /dev/null @@ -1,114 +0,0 @@ -# How to contribute # - -We'd love to accept your patches and contributions to this project. There are -a just a few small guidelines you need to follow. - - -## Contributor License Agreement ## - -Contributions to any Google project must be accompanied by a Contributor -License Agreement. This is not a copyright **assignment**, it simply gives -Google permission to use and redistribute your contributions as part of the -project. Head over to to see your current -agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. - - -## Submitting a patch ## - - 1. It's generally best to start by opening a new issue describing the bug or - feature you're intending to fix. Even if you think it's relatively minor, - it's helpful to know what people are working on. Mention in the initial - issue that you are planning to work on that bug or feature so that it can - be assigned to you. - - 1. Follow the normal process of [forking][] the project, and setup a new - branch to work in. It's important that each group of changes be done in - separate branches in order to ensure that a pull request only includes the - commits related to that bug or feature. - - 1. Go makes it very simple to ensure properly formatted code, so always run - `go fmt` on your code before committing it. You should also run - [golint][] over your code. As noted in the [golint readme][], it's not - strictly necessary that your code be completely "lint-free", but this will - help you find common style issues. - - 1. Any significant changes should almost always be accompanied by tests. The - project already has good test coverage, so look at some of the existing - tests if you're unsure how to go about it. [gocov][] and [gocov-html][] - are invaluable tools for seeing which parts of your code aren't being - exercised by your tests. - - 1. Please run: - * `go generate github.com/google/go-github/...` - * `go test github.com/google/go-github/...` - * `go vet github.com/google/go-github/...` - - 1. Do your best to have [well-formed commit messages][] for each change. - This provides consistency throughout the project, and ensures that commit - messages are able to be formatted properly by various git tools. - - 1. Finally, push the commits to your fork and submit a [pull request][]. - -[forking]: https://help.github.com/articles/fork-a-repo -[golint]: https://github.com/golang/lint -[golint readme]: https://github.com/golang/lint/blob/master/README -[gocov]: https://github.com/axw/gocov -[gocov-html]: https://github.com/matm/gocov-html -[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html -[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits -[pull request]: https://help.github.com/articles/creating-a-pull-request - - -## Other notes on code organization ## - -Currently, everything is defined in the main `github` package, with API methods -broken into separate service objects. These services map directly to how -the [GitHub API documentation][] is organized, so use that as your guide for -where to put new methods. - -Code is organized in files also based pretty closely on the GitHub API -documentation, following the format `{service}_{api}.go`. For example, methods -defined at live in -[repos_hooks.go][]. - -[GitHub API documentation]: https://developer.github.com/v3/ -[repos_hooks.go]: https://github.com/google/go-github/blob/master/github/repos_hooks.go - - -## Maintainer's Guide ## - -(These notes are mostly only for people merging in pull requests.) - -**Verify CLAs.** CLAs must be on file for the pull request submitter and commit -author(s). Google's CLA verification system should handle this automatically -and will set commit statuses as appropriate. If there's ever any question about -a pull request, ask [willnorris](https://github.com/willnorris). - -**Always try to maintain a clean, linear git history.** With very few -exceptions, running `git log` should not show a bunch of branching and merging. - -Never use the GitHub "merge" button, since it always creates a merge commit. -Instead, check out the pull request locally ([these git aliases -help][git-aliases]), then cherry-pick or rebase them onto master. If there are -small cleanup commits, especially as a result of addressing code review -comments, these should almost always be squashed down to a single commit. Don't -bother squashing commits that really deserve to be separate though. If needed, -feel free to amend additional small changes to the code or commit message that -aren't worth going through code review for. - -If you made any changes like squashing commits, rebasing onto master, etc, then -GitHub won't recognize that this is the same commit in order to mark the pull -request as "merged". So instead, amend the commit message to include a line -"Fixes #0", referencing the pull request number. This would be in addition to -any other "Fixes" lines for closing related issues. If you forget to do this, -you can also leave a comment on the pull request [like this][rebase-comment]. -If you made any other changes, it's worth noting that as well, [like -this][modified-comment]. - -[git-aliases]: https://github.com/willnorris/dotfiles/blob/d640d010c23b1116bdb3d4dc12088ed26120d87d/git/.gitconfig#L13-L15 -[rebase-comment]: https://github.com/google/go-github/pull/277#issuecomment-183035491 -[modified-comment]: https://github.com/google/go-github/pull/280#issuecomment-184859046 diff --git a/vendor/github.com/google/go-github/LICENSE b/vendor/github.com/google/go-github/LICENSE index 53d5374a7..28b6486f0 100644 --- a/vendor/github.com/google/go-github/LICENSE +++ b/vendor/github.com/google/go-github/LICENSE @@ -25,317 +25,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------- - -Some documentation is taken from the GitHub Developer site -, which is available under the following Creative -Commons Attribution 3.0 License. This applies only to the go-github source -code and would not apply to any compiled binaries. - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY -BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND -CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined above) for the purposes of this - License. - c. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - d. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - e. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - f. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - g. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - h. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - i. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - -2. Fair Dealing Rights. Nothing in this License is intended to reduce, -limit, or restrict any uses free from copyright or rights arising from -limitations or exceptions that are provided for in connection with the -copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights in -other media and formats. Subject to Section 8(f), all rights not expressly -granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(b), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(b), as requested. - b. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Section 3(b), in the case of an Adaptation, - a credit identifying the use of the Work in the Adaptation (e.g., - "French translation of the Work by Original Author," or "Screenplay - based on original Work by Original Author"). The credit required by - this Section 4 (b) may be implemented in any reasonable manner; - provided, however, that in the case of a Adaptation or Collection, at - a minimum such credit will appear, if a credit for all contributing - authors of the Adaptation or Collection appears, then as part of these - credits and in a manner at least as prominent as the credits for the - other contributing authors. For the avoidance of doubt, You may only - use the credit required by this Section for the purpose of attribution - in the manner set out above and, by exercising Your rights under this - License, You may not implicitly or explicitly assert or imply any - connection with, sponsorship or endorsement by the Original Author, - Licensor and/or Attribution Parties, as appropriate, of You or Your - use of the Work, without the separate, express prior written - permission of the Original Author, Licensor and/or Attribution - Parties. - c. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE -LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR -ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of this License. - - Creative Commons may be contacted at http://creativecommons.org/. diff --git a/vendor/github.com/google/go-github/README.md b/vendor/github.com/google/go-github/README.md deleted file mode 100644 index d751b8cd0..000000000 --- a/vendor/github.com/google/go-github/README.md +++ /dev/null @@ -1,245 +0,0 @@ -# go-github # - -go-github is a Go client library for accessing the [GitHub API v3][]. - -**Documentation:** [![GoDoc](https://godoc.org/github.com/google/go-github/github?status.svg)](https://godoc.org/github.com/google/go-github/github) -**Mailing List:** [go-github@googlegroups.com](https://groups.google.com/group/go-github) -**Build Status:** [![Build Status](https://travis-ci.org/google/go-github.svg?branch=master)](https://travis-ci.org/google/go-github) -**Test Coverage:** [![Test Coverage](https://coveralls.io/repos/google/go-github/badge.svg?branch=master)](https://coveralls.io/r/google/go-github?branch=master) - -go-github requires Go version 1.7 or greater. - -If you're interested in using the [GraphQL API v4][], the recommended library is -[shurcooL/githubql][]. - -## Usage ## - -```go -import "github.com/google/go-github/github" -``` - -Construct a new GitHub client, then use the various services on the client to -access different parts of the GitHub API. For example: - -```go -client := github.NewClient(nil) - -// list all organizations for user "willnorris" -orgs, _, err := client.Organizations.List(ctx, "willnorris", nil) -``` - -Some API methods have optional parameters that can be passed. For example: - -```go -client := github.NewClient(nil) - -// list public repositories for org "github" -opt := &github.RepositoryListByOrgOptions{Type: "public"} -repos, _, err := client.Repositories.ListByOrg(ctx, "github", opt) -``` - -The services of a client divide the API into logical chunks and correspond to -the structure of the GitHub API documentation at -https://developer.github.com/v3/. - -### Authentication ### - -The go-github library does not directly handle authentication. Instead, when -creating a new client, pass an `http.Client` that can handle authentication for -you. The easiest and recommended way to do this is using the [oauth2][] -library, but you can always use any other library that provides an -`http.Client`. If you have an OAuth2 access token (for example, a [personal -API token][]), you can use it with the oauth2 library using: - -```go -import "golang.org/x/oauth2" - -func main() { - ctx := context.Background() - ts := oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: "... your access token ..."}, - ) - tc := oauth2.NewClient(ctx, ts) - - client := github.NewClient(tc) - - // list all repositories for the authenticated user - repos, _, err := client.Repositories.List(ctx, "", nil) -} -``` - -Note that when using an authenticated Client, all calls made by the client will -include the specified OAuth token. Therefore, authenticated clients should -almost never be shared between different users. - -See the [oauth2 docs][] for complete instructions on using that library. - -For API methods that require HTTP Basic Authentication, use the -[`BasicAuthTransport`](https://godoc.org/github.com/google/go-github/github#BasicAuthTransport). - -GitHub Apps authentication can be provided by the [ghinstallation](https://github.com/bradleyfalzon/ghinstallation) -package. - -```go -import "github.com/bradleyfalzon/ghinstallation" - -func main() { - // Wrap the shared transport for use with the integration ID 1 authenticating with installation ID 99. - itr, err := ghinstallation.NewKeyFromFile(http.DefaultTransport, 1, 99, "2016-10-19.private-key.pem") - if err != nil { - // Handle error. - } - - // Use installation transport with client. - client := github.NewClient(&http.Client{Transport: itr}) - - // Use client... -} -``` - -### Rate Limiting ### - -GitHub imposes a rate limit on all API clients. Unauthenticated clients are -limited to 60 requests per hour, while authenticated clients can make up to -5,000 requests per hour. The Search API has a custom rate limit. Unauthenticated -clients are limited to 10 requests per minute, while authenticated clients -can make up to 30 requests per minute. To receive the higher rate limit when -making calls that are not issued on behalf of a user, -use `UnauthenticatedRateLimitedTransport`. - -The returned `Response.Rate` value contains the rate limit information -from the most recent API call. If a recent enough response isn't -available, you can use `RateLimits` to fetch the most up-to-date rate -limit data for the client. - -To detect an API rate limit error, you can check if its type is `*github.RateLimitError`: - -```go -repos, _, err := client.Repositories.List(ctx, "", nil) -if _, ok := err.(*github.RateLimitError); ok { - log.Println("hit rate limit") -} -``` - -Learn more about GitHub rate limiting at -https://developer.github.com/v3/#rate-limiting. - -### Accepted Status ### - -Some endpoints may return a 202 Accepted status code, meaning that the -information required is not yet ready and was scheduled to be gathered on -the GitHub side. Methods known to behave like this are documented specifying -this behavior. - -To detect this condition of error, you can check if its type is -`*github.AcceptedError`: - -```go -stats, _, err := client.Repositories.ListContributorsStats(ctx, org, repo) -if _, ok := err.(*github.AcceptedError); ok { - log.Println("scheduled on GitHub side") -} -``` - -### Conditional Requests ### - -The GitHub API has good support for conditional requests which will help -prevent you from burning through your rate limit, as well as help speed up your -application. `go-github` does not handle conditional requests directly, but is -instead designed to work with a caching `http.Transport`. We recommend using -https://github.com/gregjones/httpcache for that. - -Learn more about GitHub conditional requests at -https://developer.github.com/v3/#conditional-requests. - -### Creating and Updating Resources ### - -All structs for GitHub resources use pointer values for all non-repeated fields. -This allows distinguishing between unset fields and those set to a zero-value. -Helper functions have been provided to easily create these pointers for string, -bool, and int values. For example: - -```go -// create a new private repository named "foo" -repo := &github.Repository{ - Name: github.String("foo"), - Private: github.Bool(true), -} -client.Repositories.Create(ctx, "", repo) -``` - -Users who have worked with protocol buffers should find this pattern familiar. - -### Pagination ### - -All requests for resource collections (repos, pull requests, issues, etc.) -support pagination. Pagination options are described in the -`github.ListOptions` struct and passed to the list methods directly or as an -embedded type of a more specific list options struct (for example -`github.PullRequestListOptions`). Pages information is available via the -`github.Response` struct. - -```go -client := github.NewClient(nil) - -opt := &github.RepositoryListByOrgOptions{ - ListOptions: github.ListOptions{PerPage: 10}, -} -// get all pages of results -var allRepos []*github.Repository -for { - repos, resp, err := client.Repositories.ListByOrg(ctx, "github", opt) - if err != nil { - return err - } - allRepos = append(allRepos, repos...) - if resp.NextPage == 0 { - break - } - opt.Page = resp.NextPage -} -``` - -For complete usage of go-github, see the full [package docs][]. - -[GitHub API v3]: https://developer.github.com/v3/ -[oauth2]: https://github.com/golang/oauth2 -[oauth2 docs]: https://godoc.org/golang.org/x/oauth2 -[personal API token]: https://github.com/blog/1509-personal-api-tokens -[package docs]: https://godoc.org/github.com/google/go-github/github -[GraphQL API v4]: https://developer.github.com/v4/ -[shurcooL/githubql]: https://github.com/shurcooL/githubql - -### Integration Tests ### - -You can run integration tests from the `test` directory. See the integration tests [README](test/README.md). - -## Roadmap ## - -This library is being initially developed for an internal application at -Google, so API methods will likely be implemented in the order that they are -needed by that application. You can track the status of implementation in -[this Google spreadsheet][roadmap]. Eventually, I would like to cover the entire -GitHub API, so contributions are of course [always welcome][contributing]. The -calling pattern is pretty well established, so adding new methods is relatively -straightforward. - -[roadmap]: https://docs.google.com/spreadsheet/ccc?key=0ApoVX4GOiXr-dGNKN1pObFh6ek1DR2FKUjBNZ1FmaEE&usp=sharing -[contributing]: CONTRIBUTING.md - - -## Google App Engine ## - -Go on App Engine Classic (which as of this writing uses Go 1.6) can not use -the `"context"` import and still relies on `"golang.org/x/net/context"`. -As a result, if you wish to continue to use `go-github` on App Engine Classic, -you will need to rewrite all the `"context"` imports using the following command: - - gofmt -w -r '"context" -> "golang.org/x/net/context"' *.go - -See `with_appengine.go` for more details. - -## License ## - -This library is distributed under the BSD-style license found in the [LICENSE](./LICENSE) -file. diff --git a/vendor/github.com/google/go-github/github/activity_events.go b/vendor/github.com/google/go-github/github/activity_events.go index 6b35056f4..a919b11c5 100644 --- a/vendor/github.com/google/go-github/github/activity_events.go +++ b/vendor/github.com/google/go-github/github/activity_events.go @@ -15,7 +15,7 @@ import ( // Event represents a GitHub event. type Event struct { Type *string `json:"type,omitempty"` - Public *bool `json:"public"` + Public *bool `json:"public,omitempty"` RawPayload *json.RawMessage `json:"payload,omitempty"` Repo *Repository `json:"repo,omitempty"` Actor *User `json:"actor,omitempty"` @@ -32,6 +32,10 @@ func (e Event) String() string { // a value of the corresponding struct type will be returned. func (e *Event) ParsePayload() (payload interface{}, err error) { switch *e.Type { + case "CheckRunEvent": + payload = &CheckRunEvent{} + case "CheckSuiteEvent": + payload = &CheckSuiteEvent{} case "CommitCommentEvent": payload = &CommitCommentEvent{} case "CreateEvent": @@ -56,6 +60,8 @@ func (e *Event) ParsePayload() (payload interface{}, err error) { payload = &IssuesEvent{} case "LabelEvent": payload = &LabelEvent{} + case "MarketplacePurchaseEvent": + payload = &MarketplacePurchaseEvent{} case "MemberEvent": payload = &MemberEvent{} case "MembershipEvent": diff --git a/vendor/github.com/google/go-github/github/activity_events_test.go b/vendor/github.com/google/go-github/github/activity_events_test.go deleted file mode 100644 index 2b59d11be..000000000 --- a/vendor/github.com/google/go-github/github/activity_events_test.go +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestActivityService_ListEvents(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListEvents(context.Background(), opt) - if err != nil { - t.Errorf("Activities.ListEvents returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Activities.ListEvents returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListRepositoryEvents(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListRepositoryEvents(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Activities.ListRepositoryEvents returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Activities.ListRepositoryEvents returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListRepositoryEvents_invalidOwner(t *testing.T) { - _, _, err := client.Activity.ListRepositoryEvents(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestActivityService_ListIssueEventsForRepository(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":1},{"id":2}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListIssueEventsForRepository(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Activities.ListIssueEventsForRepository returned error: %v", err) - } - - want := []*IssueEvent{{ID: Int(1)}, {ID: Int(2)}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Activities.ListIssueEventsForRepository returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListIssueEventsForRepository_invalidOwner(t *testing.T) { - _, _, err := client.Activity.ListIssueEventsForRepository(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestActivityService_ListEventsForRepoNetwork(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/networks/o/r/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListEventsForRepoNetwork(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Activities.ListEventsForRepoNetwork returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Activities.ListEventsForRepoNetwork returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListEventsForRepoNetwork_invalidOwner(t *testing.T) { - _, _, err := client.Activity.ListEventsForRepoNetwork(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestActivityService_ListEventsForOrganization(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListEventsForOrganization(context.Background(), "o", opt) - if err != nil { - t.Errorf("Activities.ListEventsForOrganization returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Activities.ListEventsForOrganization returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListEventsForOrganization_invalidOrg(t *testing.T) { - _, _, err := client.Activity.ListEventsForOrganization(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestActivityService_ListEventsPerformedByUser_all(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListEventsPerformedByUser(context.Background(), "u", false, opt) - if err != nil { - t.Errorf("Events.ListPerformedByUser returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Events.ListPerformedByUser returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListEventsPerformedByUser_publicOnly(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/events/public", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - events, _, err := client.Activity.ListEventsPerformedByUser(context.Background(), "u", true, nil) - if err != nil { - t.Errorf("Events.ListPerformedByUser returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Events.ListPerformedByUser returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListEventsPerformedByUser_invalidUser(t *testing.T) { - _, _, err := client.Activity.ListEventsPerformedByUser(context.Background(), "%", false, nil) - testURLParseError(t, err) -} - -func TestActivityService_ListEventsReceivedByUser_all(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/received_events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListEventsReceivedByUser(context.Background(), "u", false, opt) - if err != nil { - t.Errorf("Events.ListReceivedByUser returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Events.ListReceivedUser returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListEventsReceivedByUser_publicOnly(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/received_events/public", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - events, _, err := client.Activity.ListEventsReceivedByUser(context.Background(), "u", true, nil) - if err != nil { - t.Errorf("Events.ListReceivedByUser returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Events.ListReceivedByUser returned %+v, want %+v", events, want) - } -} - -func TestActivityService_ListEventsReceivedByUser_invalidUser(t *testing.T) { - _, _, err := client.Activity.ListEventsReceivedByUser(context.Background(), "%", false, nil) - testURLParseError(t, err) -} - -func TestActivityService_ListUserEventsForOrganization(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/events/orgs/o", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":"1"},{"id":"2"}]`) - }) - - opt := &ListOptions{Page: 2} - events, _, err := client.Activity.ListUserEventsForOrganization(context.Background(), "o", "u", opt) - if err != nil { - t.Errorf("Activities.ListUserEventsForOrganization returned error: %v", err) - } - - want := []*Event{{ID: String("1")}, {ID: String("2")}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Activities.ListUserEventsForOrganization returned %+v, want %+v", events, want) - } -} - -func TestActivityService_EventParsePayload_typed(t *testing.T) { - raw := []byte(`{"type": "PushEvent","payload":{"push_id": 1}}`) - var event *Event - if err := json.Unmarshal(raw, &event); err != nil { - t.Fatalf("Unmarshal Event returned error: %v", err) - } - - want := &PushEvent{PushID: Int(1)} - got, err := event.ParsePayload() - if err != nil { - t.Fatalf("ParsePayload returned unexpected error: %v", err) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("Event.ParsePayload returned %+v, want %+v", got, want) - } -} - -// TestEvent_Payload_untyped checks that unrecognized events are parsed to an -// interface{} value (instead of being discarded or throwing an error), for -// forward compatibility with new event types. -func TestActivityService_EventParsePayload_untyped(t *testing.T) { - raw := []byte(`{"type": "UnrecognizedEvent","payload":{"field": "val"}}`) - var event *Event - if err := json.Unmarshal(raw, &event); err != nil { - t.Fatalf("Unmarshal Event returned error: %v", err) - } - - want := map[string]interface{}{"field": "val"} - got, err := event.ParsePayload() - if err != nil { - t.Fatalf("ParsePayload returned unexpected error: %v", err) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("Event.ParsePayload returned %+v, want %+v", got, want) - } -} - -func TestActivityService_EventParsePayload_installation(t *testing.T) { - raw := []byte(`{"type": "PullRequestEvent","payload":{"installation":{"id":1}}}`) - var event *Event - if err := json.Unmarshal(raw, &event); err != nil { - t.Fatalf("Unmarshal Event returned error: %v", err) - } - - want := &PullRequestEvent{Installation: &Installation{ID: Int(1)}} - got, err := event.ParsePayload() - if err != nil { - t.Fatalf("ParsePayload returned unexpected error: %v", err) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("Event.ParsePayload returned %+v, want %+v", got, want) - } -} diff --git a/vendor/github.com/google/go-github/github/activity_notifications_test.go b/vendor/github.com/google/go-github/github/activity_notifications_test.go deleted file mode 100644 index cab8f94da..000000000 --- a/vendor/github.com/google/go-github/github/activity_notifications_test.go +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestActivityService_ListNotification(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/notifications", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "all": "true", - "participating": "true", - "since": "2006-01-02T15:04:05Z", - "before": "2007-03-04T15:04:05Z", - }) - - fmt.Fprint(w, `[{"id":"1", "subject":{"title":"t"}}]`) - }) - - opt := &NotificationListOptions{ - All: true, - Participating: true, - Since: time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC), - Before: time.Date(2007, 03, 04, 15, 04, 05, 0, time.UTC), - } - notifications, _, err := client.Activity.ListNotifications(context.Background(), opt) - if err != nil { - t.Errorf("Activity.ListNotifications returned error: %v", err) - } - - want := []*Notification{{ID: String("1"), Subject: &NotificationSubject{Title: String("t")}}} - if !reflect.DeepEqual(notifications, want) { - t.Errorf("Activity.ListNotifications returned %+v, want %+v", notifications, want) - } -} - -func TestActivityService_ListRepositoryNotification(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/notifications", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id":"1"}]`) - }) - - notifications, _, err := client.Activity.ListRepositoryNotifications(context.Background(), "o", "r", nil) - if err != nil { - t.Errorf("Activity.ListRepositoryNotifications returned error: %v", err) - } - - want := []*Notification{{ID: String("1")}} - if !reflect.DeepEqual(notifications, want) { - t.Errorf("Activity.ListRepositoryNotifications returned %+v, want %+v", notifications, want) - } -} - -func TestActivityService_MarkNotificationsRead(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/notifications", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - testHeader(t, r, "Content-Type", "application/json") - testBody(t, r, `{"last_read_at":"2006-01-02T15:04:05Z"}`+"\n") - - w.WriteHeader(http.StatusResetContent) - }) - - _, err := client.Activity.MarkNotificationsRead(context.Background(), time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC)) - if err != nil { - t.Errorf("Activity.MarkNotificationsRead returned error: %v", err) - } -} - -func TestActivityService_MarkRepositoryNotificationsRead(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/notifications", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - testHeader(t, r, "Content-Type", "application/json") - testBody(t, r, `{"last_read_at":"2006-01-02T15:04:05Z"}`+"\n") - - w.WriteHeader(http.StatusResetContent) - }) - - _, err := client.Activity.MarkRepositoryNotificationsRead(context.Background(), "o", "r", time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC)) - if err != nil { - t.Errorf("Activity.MarkRepositoryNotificationsRead returned error: %v", err) - } -} - -func TestActivityService_GetThread(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/notifications/threads/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":"1"}`) - }) - - notification, _, err := client.Activity.GetThread(context.Background(), "1") - if err != nil { - t.Errorf("Activity.GetThread returned error: %v", err) - } - - want := &Notification{ID: String("1")} - if !reflect.DeepEqual(notification, want) { - t.Errorf("Activity.GetThread returned %+v, want %+v", notification, want) - } -} - -func TestActivityService_MarkThreadRead(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/notifications/threads/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PATCH") - w.WriteHeader(http.StatusResetContent) - }) - - _, err := client.Activity.MarkThreadRead(context.Background(), "1") - if err != nil { - t.Errorf("Activity.MarkThreadRead returned error: %v", err) - } -} - -func TestActivityService_GetThreadSubscription(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/notifications/threads/1/subscription", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"subscribed":true}`) - }) - - sub, _, err := client.Activity.GetThreadSubscription(context.Background(), "1") - if err != nil { - t.Errorf("Activity.GetThreadSubscription returned error: %v", err) - } - - want := &Subscription{Subscribed: Bool(true)} - if !reflect.DeepEqual(sub, want) { - t.Errorf("Activity.GetThreadSubscription returned %+v, want %+v", sub, want) - } -} - -func TestActivityService_SetThreadSubscription(t *testing.T) { - setup() - defer teardown() - - input := &Subscription{Subscribed: Bool(true)} - - mux.HandleFunc("/notifications/threads/1/subscription", func(w http.ResponseWriter, r *http.Request) { - v := new(Subscription) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ignored":true}`) - }) - - sub, _, err := client.Activity.SetThreadSubscription(context.Background(), "1", input) - if err != nil { - t.Errorf("Activity.SetThreadSubscription returned error: %v", err) - } - - want := &Subscription{Ignored: Bool(true)} - if !reflect.DeepEqual(sub, want) { - t.Errorf("Activity.SetThreadSubscription returned %+v, want %+v", sub, want) - } -} - -func TestActivityService_DeleteThreadSubscription(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/notifications/threads/1/subscription", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Activity.DeleteThreadSubscription(context.Background(), "1") - if err != nil { - t.Errorf("Activity.DeleteThreadSubscription returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/activity_star.go b/vendor/github.com/google/go-github/github/activity_star.go index d5b067127..5ae5c1016 100644 --- a/vendor/github.com/google/go-github/github/activity_star.go +++ b/vendor/github.com/google/go-github/github/activity_star.go @@ -8,6 +8,7 @@ package github import ( "context" "fmt" + "strings" ) // StarredRepository is returned by ListStarred. @@ -84,8 +85,9 @@ func (s *ActivityService) ListStarred(ctx context.Context, user string, opt *Act return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeStarringPreview) + // TODO: remove custom Accept header when APIs fully launch + acceptHeaders := []string{mediaTypeStarringPreview, mediaTypeTopicsPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var repos []*StarredRepository resp, err := s.client.Do(ctx, req, &repos) diff --git a/vendor/github.com/google/go-github/github/activity_star_test.go b/vendor/github.com/google/go-github/github/activity_star_test.go deleted file mode 100644 index 542bfc66b..000000000 --- a/vendor/github.com/google/go-github/github/activity_star_test.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestActivityService_ListStargazers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/stargazers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeStarringPreview) - testFormValues(t, r, values{ - "page": "2", - }) - - fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","user":{"id":1}}]`) - }) - - stargazers, _, err := client.Activity.ListStargazers(context.Background(), "o", "r", &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Activity.ListStargazers returned error: %v", err) - } - - want := []*Stargazer{{StarredAt: &Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}, User: &User{ID: Int(1)}}} - if !reflect.DeepEqual(stargazers, want) { - t.Errorf("Activity.ListStargazers returned %+v, want %+v", stargazers, want) - } -} - -func TestActivityService_ListStarred_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/starred", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeStarringPreview) - fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":1}}]`) - }) - - repos, _, err := client.Activity.ListStarred(context.Background(), "", nil) - if err != nil { - t.Errorf("Activity.ListStarred returned error: %v", err) - } - - want := []*StarredRepository{{StarredAt: &Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}, Repository: &Repository{ID: Int(1)}}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Activity.ListStarred returned %+v, want %+v", repos, want) - } -} - -func TestActivityService_ListStarred_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/starred", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeStarringPreview) - testFormValues(t, r, values{ - "sort": "created", - "direction": "asc", - "page": "2", - }) - fmt.Fprint(w, `[{"starred_at":"2002-02-10T15:30:00Z","repo":{"id":2}}]`) - }) - - opt := &ActivityListStarredOptions{"created", "asc", ListOptions{Page: 2}} - repos, _, err := client.Activity.ListStarred(context.Background(), "u", opt) - if err != nil { - t.Errorf("Activity.ListStarred returned error: %v", err) - } - - want := []*StarredRepository{{StarredAt: &Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}, Repository: &Repository{ID: Int(2)}}} - if !reflect.DeepEqual(repos, want) { - t.Errorf("Activity.ListStarred returned %+v, want %+v", repos, want) - } -} - -func TestActivityService_ListStarred_invalidUser(t *testing.T) { - _, _, err := client.Activity.ListStarred(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestActivityService_IsStarred_hasStar(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/starred/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - star, _, err := client.Activity.IsStarred(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.IsStarred returned error: %v", err) - } - if want := true; star != want { - t.Errorf("Activity.IsStarred returned %+v, want %+v", star, want) - } -} - -func TestActivityService_IsStarred_noStar(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/starred/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - star, _, err := client.Activity.IsStarred(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.IsStarred returned error: %v", err) - } - if want := false; star != want { - t.Errorf("Activity.IsStarred returned %+v, want %+v", star, want) - } -} - -func TestActivityService_IsStarred_invalidID(t *testing.T) { - _, _, err := client.Activity.IsStarred(context.Background(), "%", "%") - testURLParseError(t, err) -} - -func TestActivityService_Star(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/starred/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - }) - - _, err := client.Activity.Star(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.Star returned error: %v", err) - } -} - -func TestActivityService_Star_invalidID(t *testing.T) { - _, err := client.Activity.Star(context.Background(), "%", "%") - testURLParseError(t, err) -} - -func TestActivityService_Unstar(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/starred/o/r", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Activity.Unstar(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.Unstar returned error: %v", err) - } -} - -func TestActivityService_Unstar_invalidID(t *testing.T) { - _, err := client.Activity.Unstar(context.Background(), "%", "%") - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/activity_test.go b/vendor/github.com/google/go-github/github/activity_test.go deleted file mode 100644 index 98567a254..000000000 --- a/vendor/github.com/google/go-github/github/activity_test.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "net/http" - "reflect" - "testing" -) - -func TestActivityService_List(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/feeds", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - w.WriteHeader(http.StatusOK) - w.Write(feedsJSON) - }) - - got, _, err := client.Activity.ListFeeds(context.Background()) - if err != nil { - t.Errorf("Activity.ListFeeds returned error: %v", err) - } - if want := wantFeeds; !reflect.DeepEqual(got, want) { - t.Errorf("Activity.ListFeeds = %+v, want %+v", got, want) - } -} - -var feedsJSON = []byte(`{ - "timeline_url": "https://github.com/timeline", - "user_url": "https://github.com/{user}", - "current_user_public_url": "https://github.com/defunkt", - "current_user_url": "https://github.com/defunkt.private?token=abc123", - "current_user_actor_url": "https://github.com/defunkt.private.actor?token=abc123", - "current_user_organization_url": "", - "current_user_organization_urls": [ - "https://github.com/organizations/github/defunkt.private.atom?token=abc123" - ], - "_links": { - "timeline": { - "href": "https://github.com/timeline", - "type": "application/atom+xml" - }, - "user": { - "href": "https://github.com/{user}", - "type": "application/atom+xml" - }, - "current_user_public": { - "href": "https://github.com/defunkt", - "type": "application/atom+xml" - }, - "current_user": { - "href": "https://github.com/defunkt.private?token=abc123", - "type": "application/atom+xml" - }, - "current_user_actor": { - "href": "https://github.com/defunkt.private.actor?token=abc123", - "type": "application/atom+xml" - }, - "current_user_organization": { - "href": "", - "type": "" - }, - "current_user_organizations": [ - { - "href": "https://github.com/organizations/github/defunkt.private.atom?token=abc123", - "type": "application/atom+xml" - } - ] - } -}`) - -var wantFeeds = &Feeds{ - TimelineURL: String("https://github.com/timeline"), - UserURL: String("https://github.com/{user}"), - CurrentUserPublicURL: String("https://github.com/defunkt"), - CurrentUserURL: String("https://github.com/defunkt.private?token=abc123"), - CurrentUserActorURL: String("https://github.com/defunkt.private.actor?token=abc123"), - CurrentUserOrganizationURL: String(""), - CurrentUserOrganizationURLs: []string{ - "https://github.com/organizations/github/defunkt.private.atom?token=abc123", - }, - Links: &struct { - Timeline *FeedLink `json:"timeline,omitempty"` - User *FeedLink `json:"user,omitempty"` - CurrentUserPublic *FeedLink `json:"current_user_public,omitempty"` - CurrentUser *FeedLink `json:"current_user,omitempty"` - CurrentUserActor *FeedLink `json:"current_user_actor,omitempty"` - CurrentUserOrganization *FeedLink `json:"current_user_organization,omitempty"` - CurrentUserOrganizations []FeedLink `json:"current_user_organizations,omitempty"` - }{ - Timeline: &FeedLink{ - HRef: String("https://github.com/timeline"), - Type: String("application/atom+xml"), - }, - User: &FeedLink{ - HRef: String("https://github.com/{user}"), - Type: String("application/atom+xml"), - }, - CurrentUserPublic: &FeedLink{ - HRef: String("https://github.com/defunkt"), - Type: String("application/atom+xml"), - }, - CurrentUser: &FeedLink{ - HRef: String("https://github.com/defunkt.private?token=abc123"), - Type: String("application/atom+xml"), - }, - CurrentUserActor: &FeedLink{ - HRef: String("https://github.com/defunkt.private.actor?token=abc123"), - Type: String("application/atom+xml"), - }, - CurrentUserOrganization: &FeedLink{ - HRef: String(""), - Type: String(""), - }, - CurrentUserOrganizations: []FeedLink{ - { - HRef: String("https://github.com/organizations/github/defunkt.private.atom?token=abc123"), - Type: String("application/atom+xml"), - }, - }, - }, -} diff --git a/vendor/github.com/google/go-github/github/activity_watching_test.go b/vendor/github.com/google/go-github/github/activity_watching_test.go deleted file mode 100644 index d765f67e9..000000000 --- a/vendor/github.com/google/go-github/github/activity_watching_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestActivityService_ListWatchers(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/subscribers", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - - fmt.Fprint(w, `[{"id":1}]`) - }) - - watchers, _, err := client.Activity.ListWatchers(context.Background(), "o", "r", &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Activity.ListWatchers returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(watchers, want) { - t.Errorf("Activity.ListWatchers returned %+v, want %+v", watchers, want) - } -} - -func TestActivityService_ListWatched_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/subscriptions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - watched, _, err := client.Activity.ListWatched(context.Background(), "", &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Activity.ListWatched returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(watched, want) { - t.Errorf("Activity.ListWatched returned %+v, want %+v", watched, want) - } -} - -func TestActivityService_ListWatched_specifiedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/users/u/subscriptions", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - watched, _, err := client.Activity.ListWatched(context.Background(), "u", &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Activity.ListWatched returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(watched, want) { - t.Errorf("Activity.ListWatched returned %+v, want %+v", watched, want) - } -} - -func TestActivityService_GetRepositorySubscription_true(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/subscription", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"subscribed":true}`) - }) - - sub, _, err := client.Activity.GetRepositorySubscription(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.GetRepositorySubscription returned error: %v", err) - } - - want := &Subscription{Subscribed: Bool(true)} - if !reflect.DeepEqual(sub, want) { - t.Errorf("Activity.GetRepositorySubscription returned %+v, want %+v", sub, want) - } -} - -func TestActivityService_GetRepositorySubscription_false(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/subscription", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - sub, _, err := client.Activity.GetRepositorySubscription(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.GetRepositorySubscription returned error: %v", err) - } - - var want *Subscription - if !reflect.DeepEqual(sub, want) { - t.Errorf("Activity.GetRepositorySubscription returned %+v, want %+v", sub, want) - } -} - -func TestActivityService_GetRepositorySubscription_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/subscription", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusBadRequest) - }) - - _, _, err := client.Activity.GetRepositorySubscription(context.Background(), "o", "r") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } -} - -func TestActivityService_SetRepositorySubscription(t *testing.T) { - setup() - defer teardown() - - input := &Subscription{Subscribed: Bool(true)} - - mux.HandleFunc("/repos/o/r/subscription", func(w http.ResponseWriter, r *http.Request) { - v := new(Subscription) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ignored":true}`) - }) - - sub, _, err := client.Activity.SetRepositorySubscription(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Activity.SetRepositorySubscription returned error: %v", err) - } - - want := &Subscription{Ignored: Bool(true)} - if !reflect.DeepEqual(sub, want) { - t.Errorf("Activity.SetRepositorySubscription returned %+v, want %+v", sub, want) - } -} - -func TestActivityService_DeleteRepositorySubscription(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/subscription", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Activity.DeleteRepositorySubscription(context.Background(), "o", "r") - if err != nil { - t.Errorf("Activity.DeleteRepositorySubscription returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/admin.go b/vendor/github.com/google/go-github/github/admin.go index d0f055bcf..2d96733a1 100644 --- a/vendor/github.com/google/go-github/github/admin.go +++ b/vendor/github.com/google/go-github/github/admin.go @@ -19,7 +19,7 @@ type AdminService service // TeamLDAPMapping represents the mapping between a GitHub team and an LDAP group. type TeamLDAPMapping struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` LDAPDN *string `json:"ldap_dn,omitempty"` URL *string `json:"url,omitempty"` Name *string `json:"name,omitempty"` @@ -38,7 +38,7 @@ func (m TeamLDAPMapping) String() string { // UserLDAPMapping represents the mapping between a GitHub user and an LDAP user. type UserLDAPMapping struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` LDAPDN *string `json:"ldap_dn,omitempty"` Login *string `json:"login,omitempty"` AvatarURL *string `json:"avatar_url,omitempty"` @@ -84,7 +84,7 @@ func (s *AdminService) UpdateUserLDAPMapping(ctx context.Context, user string, m // UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group. // // GitHub API docs: https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team -func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { +func (s *AdminService) UpdateTeamLDAPMapping(ctx context.Context, team int64, mapping *TeamLDAPMapping) (*TeamLDAPMapping, *Response, error) { u := fmt.Sprintf("admin/ldap/teams/%v/mapping", team) req, err := s.client.NewRequest("PATCH", u, mapping) if err != nil { diff --git a/vendor/github.com/google/go-github/github/admin_stats.go b/vendor/github.com/google/go-github/github/admin_stats.go index 1550d250e..b5645f8c1 100644 --- a/vendor/github.com/google/go-github/github/admin_stats.go +++ b/vendor/github.com/google/go-github/github/admin_stats.go @@ -108,7 +108,7 @@ func (s UserStats) String() string { return Stringify(s) } -//GistStats represents the number of total, private and public gists. +// GistStats represents the number of total, private and public gists. type GistStats struct { TotalGists *int `json:"total_gists,omitempty"` PrivateGists *int `json:"private_gists,omitempty"` diff --git a/vendor/github.com/google/go-github/github/admin_stats_test.go b/vendor/github.com/google/go-github/github/admin_stats_test.go deleted file mode 100644 index d2d979a10..000000000 --- a/vendor/github.com/google/go-github/github/admin_stats_test.go +++ /dev/null @@ -1,142 +0,0 @@ -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestAdminService_GetAdminStats(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/enterprise/stats/all", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - fmt.Fprint(w, ` -{ - "repos": { - "total_repos": 212, - "root_repos": 194, - "fork_repos": 18, - "org_repos": 51, - "total_pushes": 3082, - "total_wikis": 15 - }, - "hooks": { - "total_hooks": 27, - "active_hooks": 23, - "inactive_hooks": 4 - }, - "pages": { - "total_pages": 36 - }, - "orgs": { - "total_orgs": 33, - "disabled_orgs": 0, - "total_teams": 60, - "total_team_members": 314 - }, - "users": { - "total_users": 254, - "admin_users": 45, - "suspended_users": 21 - }, - "pulls": { - "total_pulls": 86, - "merged_pulls": 60, - "mergeable_pulls": 21, - "unmergeable_pulls": 3 - }, - "issues": { - "total_issues": 179, - "open_issues": 83, - "closed_issues": 96 - }, - "milestones": { - "total_milestones": 7, - "open_milestones": 6, - "closed_milestones": 1 - }, - "gists": { - "total_gists": 178, - "private_gists": 151, - "public_gists": 25 - }, - "comments": { - "total_commit_comments": 6, - "total_gist_comments": 28, - "total_issue_comments": 366, - "total_pull_request_comments": 30 - } -} -`) - }) - - stats, _, err := client.Admin.GetAdminStats(context.Background()) - if err != nil { - t.Errorf("AdminService.GetAdminStats returned error: %v", err) - } - - want := &AdminStats{ - Repos: &RepoStats{ - TotalRepos: Int(212), - RootRepos: Int(194), - ForkRepos: Int(18), - OrgRepos: Int(51), - TotalPushes: Int(3082), - TotalWikis: Int(15), - }, - Hooks: &HookStats{ - TotalHooks: Int(27), - ActiveHooks: Int(23), - InactiveHooks: Int(4), - }, - Pages: &PageStats{ - TotalPages: Int(36), - }, - Orgs: &OrgStats{ - TotalOrgs: Int(33), - DisabledOrgs: Int(0), - TotalTeams: Int(60), - TotalTeamMembers: Int(314), - }, - Users: &UserStats{ - TotalUsers: Int(254), - AdminUsers: Int(45), - SuspendedUsers: Int(21), - }, - Pulls: &PullStats{ - TotalPulls: Int(86), - MergedPulls: Int(60), - MergablePulls: Int(21), - UnmergablePulls: Int(3), - }, - Issues: &IssueStats{ - TotalIssues: Int(179), - OpenIssues: Int(83), - ClosedIssues: Int(96), - }, - Milestones: &MilestoneStats{ - TotalMilestones: Int(7), - OpenMilestones: Int(6), - ClosedMilestones: Int(1), - }, - Gists: &GistStats{ - TotalGists: Int(178), - PrivateGists: Int(151), - PublicGists: Int(25), - }, - Comments: &CommentStats{ - TotalCommitComments: Int(6), - TotalGistComments: Int(28), - TotalIssueComments: Int(366), - TotalPullRequestComments: Int(30), - }, - } - if !reflect.DeepEqual(stats, want) { - t.Errorf("AdminService.GetAdminStats returned %+v, want %+v", stats, want) - } -} diff --git a/vendor/github.com/google/go-github/github/admin_test.go b/vendor/github.com/google/go-github/github/admin_test.go deleted file mode 100644 index 32a870eb4..000000000 --- a/vendor/github.com/google/go-github/github/admin_test.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestAdminService_UpdateUserLDAPMapping(t *testing.T) { - setup() - defer teardown() - - input := &UserLDAPMapping{ - LDAPDN: String("uid=asdf,ou=users,dc=github,dc=com"), - } - - mux.HandleFunc("/admin/ldap/users/u/mapping", func(w http.ResponseWriter, r *http.Request) { - v := new(UserLDAPMapping) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1,"ldap_dn":"uid=asdf,ou=users,dc=github,dc=com"}`) - }) - - mapping, _, err := client.Admin.UpdateUserLDAPMapping(context.Background(), "u", input) - if err != nil { - t.Errorf("Admin.UpdateUserLDAPMapping returned error: %v", err) - } - - want := &UserLDAPMapping{ - ID: Int(1), - LDAPDN: String("uid=asdf,ou=users,dc=github,dc=com"), - } - if !reflect.DeepEqual(mapping, want) { - t.Errorf("Admin.UpdateUserLDAPMapping returned %+v, want %+v", mapping, want) - } -} - -func TestAdminService_UpdateTeamLDAPMapping(t *testing.T) { - setup() - defer teardown() - - input := &TeamLDAPMapping{ - LDAPDN: String("cn=Enterprise Ops,ou=teams,dc=github,dc=com"), - } - - mux.HandleFunc("/admin/ldap/teams/1/mapping", func(w http.ResponseWriter, r *http.Request) { - v := new(TeamLDAPMapping) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `{"id":1,"ldap_dn":"cn=Enterprise Ops,ou=teams,dc=github,dc=com"}`) - }) - - mapping, _, err := client.Admin.UpdateTeamLDAPMapping(context.Background(), 1, input) - if err != nil { - t.Errorf("Admin.UpdateTeamLDAPMapping returned error: %v", err) - } - - want := &TeamLDAPMapping{ - ID: Int(1), - LDAPDN: String("cn=Enterprise Ops,ou=teams,dc=github,dc=com"), - } - if !reflect.DeepEqual(mapping, want) { - t.Errorf("Admin.UpdateTeamLDAPMapping returned %+v, want %+v", mapping, want) - } -} diff --git a/vendor/github.com/google/go-github/github/apps.go b/vendor/github.com/google/go-github/github/apps.go index a83ea7c2e..32d4f2f45 100644 --- a/vendor/github.com/google/go-github/github/apps.go +++ b/vendor/github.com/google/go-github/github/apps.go @@ -19,7 +19,8 @@ type AppsService service // App represents a GitHub App. type App struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` Owner *User `json:"owner,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` @@ -35,6 +36,36 @@ type InstallationToken struct { ExpiresAt *time.Time `json:"expires_at,omitempty"` } +// InstallationPermissions lists the permissions for metadata, contents, issues and single file for an installation. +type InstallationPermissions struct { + Metadata *string `json:"metadata,omitempty"` + Contents *string `json:"contents,omitempty"` + Issues *string `json:"issues,omitempty"` + SingleFile *string `json:"single_file,omitempty"` +} + +// Installation represents a GitHub Apps installation. +type Installation struct { + ID *int64 `json:"id,omitempty"` + AppID *int64 `json:"app_id,omitempty"` + TargetID *int64 `json:"target_id,omitempty"` + Account *User `json:"account,omitempty"` + AccessTokensURL *string `json:"access_tokens_url,omitempty"` + RepositoriesURL *string `json:"repositories_url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + TargetType *string `json:"target_type,omitempty"` + SingleFileName *string `json:"single_file_name,omitempty"` + RepositorySelection *string `json:"repository_selection,omitempty"` + Events []string `json:"events,omitempty"` + Permissions *InstallationPermissions `json:"permissions,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` +} + +func (i Installation) String() string { + return Stringify(i) +} + // Get a single GitHub App. Passing the empty string will get // the authenticated GitHub App. // @@ -97,24 +128,8 @@ func (s *AppsService) ListInstallations(ctx context.Context, opt *ListOptions) ( // GetInstallation returns the specified installation. // // GitHub API docs: https://developer.github.com/v3/apps/#get-a-single-installation -func (s *AppsService) GetInstallation(ctx context.Context, id int) (*Installation, *Response, error) { - u := fmt.Sprintf("app/installations/%v", id) - - req, err := s.client.NewRequest("GET", u, nil) - if err != nil { - return nil, nil, err - } - - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeIntegrationPreview) - - i := new(Installation) - resp, err := s.client.Do(ctx, req, i) - if err != nil { - return nil, resp, err - } - - return i, resp, nil +func (s *AppsService) GetInstallation(ctx context.Context, id int64) (*Installation, *Response, error) { + return s.getInstallation(ctx, fmt.Sprintf("app/installations/%v", id)) } // ListUserInstallations lists installations that are accessible to the authenticated user. @@ -148,7 +163,7 @@ func (s *AppsService) ListUserInstallations(ctx context.Context, opt *ListOption // CreateInstallationToken creates a new installation token. // // GitHub API docs: https://developer.github.com/v3/apps/#create-a-new-installation-token -func (s *AppsService) CreateInstallationToken(ctx context.Context, id int) (*InstallationToken, *Response, error) { +func (s *AppsService) CreateInstallationToken(ctx context.Context, id int64) (*InstallationToken, *Response, error) { u := fmt.Sprintf("installations/%v/access_tokens", id) req, err := s.client.NewRequest("POST", u, nil) @@ -167,3 +182,49 @@ func (s *AppsService) CreateInstallationToken(ctx context.Context, id int) (*Ins return t, resp, nil } + +// FindOrganizationInstallation finds the organization's installation information. +// +// GitHub API docs: https://developer.github.com/v3/apps/#find-organization-installation +func (s *AppsService) FindOrganizationInstallation(ctx context.Context, org string) (*Installation, *Response, error) { + return s.getInstallation(ctx, fmt.Sprintf("orgs/%v/installation", org)) +} + +// FindRepositoryInstallation finds the repository's installation information. +// +// GitHub API docs: https://developer.github.com/v3/apps/#find-repository-installation +func (s *AppsService) FindRepositoryInstallation(ctx context.Context, owner, repo string) (*Installation, *Response, error) { + return s.getInstallation(ctx, fmt.Sprintf("repos/%v/%v/installation", owner, repo)) +} + +// FindRepositoryInstallationByID finds the repository's installation information. +// +// Note: FindRepositoryInstallationByID uses the undocumented GitHub API endpoint /repositories/:id/installation. +func (s *AppsService) FindRepositoryInstallationByID(ctx context.Context, id int64) (*Installation, *Response, error) { + return s.getInstallation(ctx, fmt.Sprintf("repositories/%d/installation", id)) +} + +// FindUserInstallation finds the user's installation information. +// +// GitHub API docs: https://developer.github.com/v3/apps/#find-repository-installation +func (s *AppsService) FindUserInstallation(ctx context.Context, user string) (*Installation, *Response, error) { + return s.getInstallation(ctx, fmt.Sprintf("users/%v/installation", user)) +} + +func (s *AppsService) getInstallation(ctx context.Context, url string) (*Installation, *Response, error) { + req, err := s.client.NewRequest("GET", url, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeIntegrationPreview) + + i := new(Installation) + resp, err := s.client.Do(ctx, req, i) + if err != nil { + return nil, resp, err + } + + return i, resp, nil +} diff --git a/vendor/github.com/google/go-github/github/apps_installation.go b/vendor/github.com/google/go-github/github/apps_installation.go index ccac316c4..ccfecb8d8 100644 --- a/vendor/github.com/google/go-github/github/apps_installation.go +++ b/vendor/github.com/google/go-github/github/apps_installation.go @@ -10,19 +10,6 @@ import ( "fmt" ) -// Installation represents a GitHub Apps installation. -type Installation struct { - ID *int `json:"id,omitempty"` - Account *User `json:"account,omitempty"` - AccessTokensURL *string `json:"access_tokens_url,omitempty"` - RepositoriesURL *string `json:"repositories_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` -} - -func (i Installation) String() string { - return Stringify(i) -} - // ListRepos lists the repositories that are accessible to the authenticated installation. // // GitHub API docs: https://developer.github.com/v3/apps/installations/#list-repositories @@ -55,7 +42,7 @@ func (s *AppsService) ListRepos(ctx context.Context, opt *ListOptions) ([]*Repos // to the authenticated user for an installation. // // GitHub API docs: https://developer.github.com/v3/apps/installations/#list-repositories-accessible-to-the-user-for-an-installation -func (s *AppsService) ListUserRepos(ctx context.Context, id int, opt *ListOptions) ([]*Repository, *Response, error) { +func (s *AppsService) ListUserRepos(ctx context.Context, id int64, opt *ListOptions) ([]*Repository, *Response, error) { u := fmt.Sprintf("user/installations/%v/repositories", id) u, err := addOptions(u, opt) if err != nil { @@ -67,6 +54,9 @@ func (s *AppsService) ListUserRepos(ctx context.Context, id int, opt *ListOption return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeIntegrationPreview) + var r struct { Repositories []*Repository `json:"repositories"` } @@ -81,7 +71,7 @@ func (s *AppsService) ListUserRepos(ctx context.Context, id int, opt *ListOption // AddRepository adds a single repository to an installation. // // GitHub API docs: https://developer.github.com/v3/apps/installations/#add-repository-to-installation -func (s *AppsService) AddRepository(ctx context.Context, instID, repoID int) (*Repository, *Response, error) { +func (s *AppsService) AddRepository(ctx context.Context, instID, repoID int64) (*Repository, *Response, error) { u := fmt.Sprintf("apps/installations/%v/repositories/%v", instID, repoID) req, err := s.client.NewRequest("PUT", u, nil) if err != nil { @@ -100,7 +90,7 @@ func (s *AppsService) AddRepository(ctx context.Context, instID, repoID int) (*R // RemoveRepository removes a single repository from an installation. // // GitHub docs: https://developer.github.com/v3/apps/installations/#remove-repository-from-installation -func (s *AppsService) RemoveRepository(ctx context.Context, instID, repoID int) (*Response, error) { +func (s *AppsService) RemoveRepository(ctx context.Context, instID, repoID int64) (*Response, error) { u := fmt.Sprintf("apps/installations/%v/repositories/%v", instID, repoID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/apps_installation_test.go b/vendor/github.com/google/go-github/github/apps_installation_test.go deleted file mode 100644 index ec796cd33..000000000 --- a/vendor/github.com/google/go-github/github/apps_installation_test.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestAppsService_ListRepos(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/installation/repositories", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `{"repositories": [{"id":1}]}`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - repositories, _, err := client.Apps.ListRepos(context.Background(), opt) - if err != nil { - t.Errorf("Apps.ListRepos returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(repositories, want) { - t.Errorf("Apps.ListRepos returned %+v, want %+v", repositories, want) - } -} - -func TestAppsService_ListUserRepos(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/installations/1/repositories", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `{"repositories": [{"id":1}]}`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - repositories, _, err := client.Apps.ListUserRepos(context.Background(), 1, opt) - if err != nil { - t.Errorf("Apps.ListUserRepos returned error: %v", err) - } - - want := []*Repository{{ID: Int(1)}} - if !reflect.DeepEqual(repositories, want) { - t.Errorf("Apps.ListUserRepos returned %+v, want %+v", repositories, want) - } -} - -func TestAppsService_AddRepository(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/apps/installations/1/repositories/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - fmt.Fprint(w, `{"id":1,"name":"n","description":"d","owner":{"login":"l"},"license":{"key":"mit"}}`) - }) - - repo, _, err := client.Apps.AddRepository(context.Background(), 1, 1) - if err != nil { - t.Errorf("Apps.AddRepository returned error: %v", err) - } - - want := &Repository{ID: Int(1), Name: String("n"), Description: String("d"), Owner: &User{Login: String("l")}, License: &License{Key: String("mit")}} - if !reflect.DeepEqual(repo, want) { - t.Errorf("AddRepository returned %+v, want %+v", repo, want) - } -} - -func TestAppsService_RemoveRepository(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/apps/installations/1/repositories/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Apps.RemoveRepository(context.Background(), 1, 1) - if err != nil { - t.Errorf("Apps.RemoveRepository returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/apps_marketplace.go b/vendor/github.com/google/go-github/github/apps_marketplace.go new file mode 100644 index 000000000..3f35b9155 --- /dev/null +++ b/vendor/github.com/google/go-github/github/apps_marketplace.go @@ -0,0 +1,168 @@ +// Copyright 2017 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// MarketplaceService handles communication with the marketplace related +// methods of the GitHub API. +// +// GitHub API docs: https://developer.github.com/v3/apps/marketplace/ +type MarketplaceService struct { + client *Client + // Stubbed controls whether endpoints that return stubbed data are used + // instead of production endpoints. Stubbed data is fake data that's useful + // for testing your GitHub Apps. Stubbed data is hard-coded and will not + // change based on actual subscriptions. + // + // GitHub API docs: https://developer.github.com/v3/apps/marketplace/ + Stubbed bool +} + +// MarketplacePlan represents a GitHub Apps Marketplace Listing Plan. +type MarketplacePlan struct { + URL *string `json:"url,omitempty"` + AccountsURL *string `json:"accounts_url,omitempty"` + ID *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + MonthlyPriceInCents *int `json:"monthly_price_in_cents,omitempty"` + YearlyPriceInCents *int `json:"yearly_price_in_cents,omitempty"` + PriceModel *string `json:"price_model,omitempty"` + UnitName *string `json:"unit_name,omitempty"` + Bullets *[]string `json:"bullets,omitempty"` +} + +// MarketplacePurchase represents a GitHub Apps Marketplace Purchase. +type MarketplacePurchase struct { + BillingCycle *string `json:"billing_cycle,omitempty"` + NextBillingDate *string `json:"next_billing_date,omitempty"` + UnitCount *int `json:"unit_count,omitempty"` + Plan *MarketplacePlan `json:"plan,omitempty"` + Account *MarketplacePlanAccount `json:"account,omitempty"` +} + +// MarketplacePlanAccount represents a GitHub Account (user or organization) on a specific plan. +type MarketplacePlanAccount struct { + URL *string `json:"url,omitempty"` + Type *string `json:"type,omitempty"` + ID *int64 `json:"id,omitempty"` + Login *string `json:"login,omitempty"` + Email *string `json:"email,omitempty"` + OrganizationBillingEmail *string `json:"organization_billing_email,omitempty"` + MarketplacePurchase *MarketplacePurchase `json:"marketplace_purchase,omitempty"` +} + +// ListPlans lists all plans for your Marketplace listing. +// +// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#list-all-plans-for-your-marketplace-listing +func (s *MarketplaceService) ListPlans(ctx context.Context, opt *ListOptions) ([]*MarketplacePlan, *Response, error) { + uri := s.marketplaceURI("plans") + u, err := addOptions(uri, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var plans []*MarketplacePlan + resp, err := s.client.Do(ctx, req, &plans) + if err != nil { + return nil, resp, err + } + + return plans, resp, nil +} + +// ListPlanAccountsForPlan lists all GitHub accounts (user or organization) on a specific plan. +// +// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#list-all-github-accounts-user-or-organization-on-a-specific-plan +func (s *MarketplaceService) ListPlanAccountsForPlan(ctx context.Context, planID int64, opt *ListOptions) ([]*MarketplacePlanAccount, *Response, error) { + uri := s.marketplaceURI(fmt.Sprintf("plans/%v/accounts", planID)) + u, err := addOptions(uri, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var accounts []*MarketplacePlanAccount + resp, err := s.client.Do(ctx, req, &accounts) + if err != nil { + return nil, resp, err + } + + return accounts, resp, nil +} + +// ListPlanAccountsForAccount lists all GitHub accounts (user or organization) associated with an account. +// +// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#check-if-a-github-account-is-associated-with-any-marketplace-listing +func (s *MarketplaceService) ListPlanAccountsForAccount(ctx context.Context, accountID int64, opt *ListOptions) ([]*MarketplacePlanAccount, *Response, error) { + uri := s.marketplaceURI(fmt.Sprintf("accounts/%v", accountID)) + u, err := addOptions(uri, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var accounts []*MarketplacePlanAccount + resp, err := s.client.Do(ctx, req, &accounts) + if err != nil { + return nil, resp, err + } + + return accounts, resp, nil +} + +// ListMarketplacePurchasesForUser lists all GitHub marketplace purchases made by a user. +// +// GitHub API docs: https://developer.github.com/v3/apps/marketplace/#get-a-users-marketplace-purchases +func (s *MarketplaceService) ListMarketplacePurchasesForUser(ctx context.Context, opt *ListOptions) ([]*MarketplacePurchase, *Response, error) { + uri := "user/marketplace_purchases" + if s.Stubbed { + uri = "user/marketplace_purchases/stubbed" + } + + u, err := addOptions(uri, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var purchases []*MarketplacePurchase + resp, err := s.client.Do(ctx, req, &purchases) + if err != nil { + return nil, resp, err + } + + return purchases, resp, nil +} + +func (s *MarketplaceService) marketplaceURI(endpoint string) string { + url := "marketplace_listing" + if s.Stubbed { + url = "marketplace_listing/stubbed" + } + return url + "/" + endpoint +} diff --git a/vendor/github.com/google/go-github/github/apps_test.go b/vendor/github.com/google/go-github/github/apps_test.go deleted file mode 100644 index 9ef1f4682..000000000 --- a/vendor/github.com/google/go-github/github/apps_test.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestAppsService_Get_authenticatedApp(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/app", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - app, _, err := client.Apps.Get(context.Background(), "") - if err != nil { - t.Errorf("Apps.Get returned error: %v", err) - } - - want := &App{ID: Int(1)} - if !reflect.DeepEqual(app, want) { - t.Errorf("Apps.Get returned %+v, want %+v", app, want) - } -} - -func TestAppsService_Get_specifiedApp(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/apps/a", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - fmt.Fprint(w, `{"html_url":"https://github.com/apps/a"}`) - }) - - app, _, err := client.Apps.Get(context.Background(), "a") - if err != nil { - t.Errorf("Apps.Get returned error: %v", err) - } - - want := &App{HTMLURL: String("https://github.com/apps/a")} - if !reflect.DeepEqual(app, want) { - t.Errorf("Apps.Get returned %+v, want %+v", *app.HTMLURL, *want.HTMLURL) - } -} - -func TestAppsService_ListInstallations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/app/installations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - installations, _, err := client.Apps.ListInstallations(context.Background(), opt) - if err != nil { - t.Errorf("Apps.ListInstallations returned error: %v", err) - } - - want := []*Installation{{ID: Int(1)}} - if !reflect.DeepEqual(installations, want) { - t.Errorf("Apps.ListInstallations returned %+v, want %+v", installations, want) - } -} - -func TestAppsService_GetInstallation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/app/installations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - installation, _, err := client.Apps.GetInstallation(context.Background(), 1) - if err != nil { - t.Errorf("Apps.GetInstallation returned error: %v", err) - } - - want := &Installation{ID: Int(1)} - if !reflect.DeepEqual(installation, want) { - t.Errorf("Apps.GetInstallation returned %+v, want %+v", installation, want) - } -} - -func TestAppsService_ListUserInstallations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/installations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `{"installations":[{"id":1}]}`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - installations, _, err := client.Apps.ListUserInstallations(context.Background(), opt) - if err != nil { - t.Errorf("Apps.ListUserInstallations returned error: %v", err) - } - - want := []*Installation{{ID: Int(1)}} - if !reflect.DeepEqual(installations, want) { - t.Errorf("Apps.ListUserInstallations returned %+v, want %+v", installations, want) - } -} - -func TestAppsService_CreateInstallationToken(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/installations/1/access_tokens", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeIntegrationPreview) - fmt.Fprint(w, `{"token":"t"}`) - }) - - token, _, err := client.Apps.CreateInstallationToken(context.Background(), 1) - if err != nil { - t.Errorf("Apps.CreateInstallationToken returned error: %v", err) - } - - want := &InstallationToken{Token: String("t")} - if !reflect.DeepEqual(token, want) { - t.Errorf("Apps.CreateInstallationToken returned %+v, want %+v", token, want) - } -} diff --git a/vendor/github.com/google/go-github/github/authorizations.go b/vendor/github.com/google/go-github/github/authorizations.go index 638745ac1..190205b02 100644 --- a/vendor/github.com/google/go-github/github/authorizations.go +++ b/vendor/github.com/google/go-github/github/authorizations.go @@ -54,7 +54,7 @@ type AuthorizationsService service // Authorization represents an individual GitHub authorization. type Authorization struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` Scopes []Scope `json:"scopes,omitempty"` Token *string `json:"token,omitempty"` @@ -88,7 +88,7 @@ func (a AuthorizationApp) String() string { // Grant represents an OAuth application that has been granted access to an account. type Grant struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` App *AuthorizationApp `json:"app,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` @@ -160,7 +160,7 @@ func (s *AuthorizationsService) List(ctx context.Context, opt *ListOptions) ([]* // Get a single authorization. // // GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization -func (s *AuthorizationsService) Get(ctx context.Context, id int) (*Authorization, *Response, error) { +func (s *AuthorizationsService) Get(ctx context.Context, id int64) (*Authorization, *Response, error) { u := fmt.Sprintf("authorizations/%d", id) req, err := s.client.NewRequest("GET", u, nil) @@ -234,7 +234,7 @@ func (s *AuthorizationsService) GetOrCreateForApp(ctx context.Context, clientID // Edit a single authorization. // // GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization -func (s *AuthorizationsService) Edit(ctx context.Context, id int, auth *AuthorizationUpdateRequest) (*Authorization, *Response, error) { +func (s *AuthorizationsService) Edit(ctx context.Context, id int64, auth *AuthorizationUpdateRequest) (*Authorization, *Response, error) { u := fmt.Sprintf("authorizations/%d", id) req, err := s.client.NewRequest("PATCH", u, auth) @@ -254,7 +254,7 @@ func (s *AuthorizationsService) Edit(ctx context.Context, id int, auth *Authoriz // Delete a single authorization. // // GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization -func (s *AuthorizationsService) Delete(ctx context.Context, id int) (*Response, error) { +func (s *AuthorizationsService) Delete(ctx context.Context, id int64) (*Response, error) { u := fmt.Sprintf("authorizations/%d", id) req, err := s.client.NewRequest("DELETE", u, nil) @@ -366,7 +366,7 @@ func (s *AuthorizationsService) ListGrants(ctx context.Context, opt *ListOptions // GetGrant gets a single OAuth application grant. // // GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant -func (s *AuthorizationsService) GetGrant(ctx context.Context, id int) (*Grant, *Response, error) { +func (s *AuthorizationsService) GetGrant(ctx context.Context, id int64) (*Grant, *Response, error) { u := fmt.Sprintf("applications/grants/%d", id) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -387,7 +387,7 @@ func (s *AuthorizationsService) GetGrant(ctx context.Context, id int) (*Grant, * // the user. // // GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#delete-a-grant -func (s *AuthorizationsService) DeleteGrant(ctx context.Context, id int) (*Response, error) { +func (s *AuthorizationsService) DeleteGrant(ctx context.Context, id int64) (*Response, error) { u := fmt.Sprintf("applications/grants/%d", id) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/authorizations_test.go b/vendor/github.com/google/go-github/github/authorizations_test.go deleted file mode 100644 index 61bf21252..000000000 --- a/vendor/github.com/google/go-github/github/authorizations_test.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright 2015 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestAuthorizationsService_List(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/authorizations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "1", "per_page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - got, _, err := client.Authorizations.List(context.Background(), opt) - if err != nil { - t.Errorf("Authorizations.List returned error: %v", err) - } - - want := []*Authorization{{ID: Int(1)}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorizations.List returned %+v, want %+v", *got[0].ID, *want[0].ID) - } -} - -func TestAuthorizationsService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/authorizations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - got, _, err := client.Authorizations.Get(context.Background(), 1) - if err != nil { - t.Errorf("Authorizations.Get returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorizations.Get returned auth %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_Create(t *testing.T) { - setup() - defer teardown() - - input := &AuthorizationRequest{ - Note: String("test"), - } - - mux.HandleFunc("/authorizations", func(w http.ResponseWriter, r *http.Request) { - v := new(AuthorizationRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ID":1}`) - }) - - got, _, err := client.Authorizations.Create(context.Background(), input) - if err != nil { - t.Errorf("Authorizations.Create returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorization.Create returned %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_GetOrCreateForApp(t *testing.T) { - setup() - defer teardown() - - input := &AuthorizationRequest{ - Note: String("test"), - } - - mux.HandleFunc("/authorizations/clients/id", func(w http.ResponseWriter, r *http.Request) { - v := new(AuthorizationRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ID":1}`) - }) - - got, _, err := client.Authorizations.GetOrCreateForApp(context.Background(), "id", input) - if err != nil { - t.Errorf("Authorizations.GetOrCreateForApp returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorization.GetOrCreateForApp returned %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_GetOrCreateForApp_Fingerprint(t *testing.T) { - setup() - defer teardown() - - input := &AuthorizationRequest{ - Note: String("test"), - Fingerprint: String("fp"), - } - - mux.HandleFunc("/authorizations/clients/id/fp", func(w http.ResponseWriter, r *http.Request) { - v := new(AuthorizationRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ID":1}`) - }) - - got, _, err := client.Authorizations.GetOrCreateForApp(context.Background(), "id", input) - if err != nil { - t.Errorf("Authorizations.GetOrCreateForApp returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorization.GetOrCreateForApp returned %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_Edit(t *testing.T) { - setup() - defer teardown() - - input := &AuthorizationUpdateRequest{ - Note: String("test"), - } - - mux.HandleFunc("/authorizations/1", func(w http.ResponseWriter, r *http.Request) { - v := new(AuthorizationUpdateRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"ID":1}`) - }) - - got, _, err := client.Authorizations.Edit(context.Background(), 1, input) - if err != nil { - t.Errorf("Authorizations.Edit returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorization.Update returned %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_Delete(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/authorizations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Authorizations.Delete(context.Background(), 1) - if err != nil { - t.Errorf("Authorizations.Delete returned error: %v", err) - } -} - -func TestAuthorizationsService_Check(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/id/tokens/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - got, _, err := client.Authorizations.Check(context.Background(), "id", "t") - if err != nil { - t.Errorf("Authorizations.Check returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorizations.Check returned auth %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_Reset(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/id/tokens/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - fmt.Fprint(w, `{"ID":1}`) - }) - - got, _, err := client.Authorizations.Reset(context.Background(), "id", "t") - if err != nil { - t.Errorf("Authorizations.Reset returned error: %v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorizations.Reset returned auth %+v, want %+v", got, want) - } -} - -func TestAuthorizationsService_Revoke(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/id/tokens/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Authorizations.Revoke(context.Background(), "id", "t") - if err != nil { - t.Errorf("Authorizations.Revoke returned error: %v", err) - } -} - -func TestListGrants(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/grants", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id": 1}]`) - }) - - got, _, err := client.Authorizations.ListGrants(context.Background(), nil) - if err != nil { - t.Errorf("OAuthAuthorizations.ListGrants returned error: %v", err) - } - - want := []*Grant{{ID: Int(1)}} - if !reflect.DeepEqual(got, want) { - t.Errorf("OAuthAuthorizations.ListGrants = %+v, want %+v", got, want) - } -} - -func TestListGrants_withOptions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/grants", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[{"id": 1}]`) - }) - - _, _, err := client.Authorizations.ListGrants(context.Background(), &ListOptions{Page: 2}) - if err != nil { - t.Errorf("OAuthAuthorizations.ListGrants returned error: %v", err) - } -} - -func TestGetGrant(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/grants/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id": 1}`) - }) - - got, _, err := client.Authorizations.GetGrant(context.Background(), 1) - if err != nil { - t.Errorf("OAuthAuthorizations.GetGrant returned error: %v", err) - } - - want := &Grant{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("OAuthAuthorizations.GetGrant = %+v, want %+v", got, want) - } -} - -func TestDeleteGrant(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/applications/grants/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Authorizations.DeleteGrant(context.Background(), 1) - if err != nil { - t.Errorf("OAuthAuthorizations.DeleteGrant returned error: %v", err) - } -} - -func TestAuthorizationsService_CreateImpersonation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/admin/users/u/authorizations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - fmt.Fprint(w, `{"id":1}`) - }) - - req := &AuthorizationRequest{Scopes: []Scope{ScopePublicRepo}} - got, _, err := client.Authorizations.CreateImpersonation(context.Background(), "u", req) - if err != nil { - t.Errorf("Authorizations.CreateImpersonation returned error: %+v", err) - } - - want := &Authorization{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("Authorizations.CreateImpersonation returned %+v, want %+v", *got.ID, *want.ID) - } -} - -func TestAuthorizationsService_DeleteImpersonation(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/admin/users/u/authorizations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Authorizations.DeleteImpersonation(context.Background(), "u") - if err != nil { - t.Errorf("Authorizations.DeleteImpersonation returned error: %+v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/checks.go b/vendor/github.com/google/go-github/github/checks.go new file mode 100644 index 000000000..2a6ce4193 --- /dev/null +++ b/vendor/github.com/google/go-github/github/checks.go @@ -0,0 +1,421 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" +) + +// ChecksService provides access to the Checks API in the +// GitHub API. +// +// GitHub API docs: https://developer.github.com/v3/checks/ +type ChecksService service + +// CheckRun represents a GitHub check run on a repository associated with a GitHub app. +type CheckRun struct { + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + HeadSHA *string `json:"head_sha,omitempty"` + ExternalID *string `json:"external_id,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + Status *string `json:"status,omitempty"` + Conclusion *string `json:"conclusion,omitempty"` + StartedAt *Timestamp `json:"started_at,omitempty"` + CompletedAt *Timestamp `json:"completed_at,omitempty"` + Output *CheckRunOutput `json:"output,omitempty"` + Name *string `json:"name,omitempty"` + CheckSuite *CheckSuite `json:"check_suite,omitempty"` + App *App `json:"app,omitempty"` + PullRequests []*PullRequest `json:"pull_requests,omitempty"` +} + +// CheckRunOutput represents the output of a CheckRun. +type CheckRunOutput struct { + Title *string `json:"title,omitempty"` + Summary *string `json:"summary,omitempty"` + Text *string `json:"text,omitempty"` + AnnotationsCount *int `json:"annotations_count,omitempty"` + AnnotationsURL *string `json:"annotations_url,omitempty"` + Annotations []*CheckRunAnnotation `json:"annotations,omitempty"` + Images []*CheckRunImage `json:"images,omitempty"` +} + +// CheckRunAnnotation represents an annotation object for a CheckRun output. +type CheckRunAnnotation struct { + Path *string `json:"path,omitempty"` + BlobHRef *string `json:"blob_href,omitempty"` + StartLine *int `json:"start_line,omitempty"` + EndLine *int `json:"end_line,omitempty"` + AnnotationLevel *string `json:"annotation_level,omitempty"` + Message *string `json:"message,omitempty"` + Title *string `json:"title,omitempty"` + RawDetails *string `json:"raw_details,omitempty"` +} + +// CheckRunImage represents an image object for a CheckRun output. +type CheckRunImage struct { + Alt *string `json:"alt,omitempty"` + ImageURL *string `json:"image_url,omitempty"` + Caption *string `json:"caption,omitempty"` +} + +// CheckSuite represents a suite of check runs. +type CheckSuite struct { + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + HeadBranch *string `json:"head_branch,omitempty"` + HeadSHA *string `json:"head_sha,omitempty"` + URL *string `json:"url,omitempty"` + BeforeSHA *string `json:"before,omitempty"` + AfterSHA *string `json:"after,omitempty"` + Status *string `json:"status,omitempty"` + Conclusion *string `json:"conclusion,omitempty"` + App *App `json:"app,omitempty"` + Repository *Repository `json:"repository,omitempty"` + PullRequests []*PullRequest `json:"pull_requests,omitempty"` +} + +func (c CheckRun) String() string { + return Stringify(c) +} + +func (c CheckSuite) String() string { + return Stringify(c) +} + +// GetCheckRun gets a check-run for a repository. +// +// GitHub API docs: https://developer.github.com/v3/checks/runs/#get-a-single-check-run +func (s *ChecksService) GetCheckRun(ctx context.Context, owner, repo string, checkRunID int64) (*CheckRun, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-runs/%v", owner, repo, checkRunID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + checkRun := new(CheckRun) + resp, err := s.client.Do(ctx, req, checkRun) + if err != nil { + return nil, resp, err + } + + return checkRun, resp, nil +} + +// GetCheckSuite gets a single check suite. +// +// GitHub API docs: https://developer.github.com/v3/checks/suites/#get-a-single-check-suite +func (s *ChecksService) GetCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64) (*CheckSuite, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-suites/%v", owner, repo, checkSuiteID) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + checkSuite := new(CheckSuite) + resp, err := s.client.Do(ctx, req, checkSuite) + if err != nil { + return nil, resp, err + } + + return checkSuite, resp, nil +} + +// CreateCheckRunOptions sets up parameters needed to create a CheckRun. +type CreateCheckRunOptions struct { + Name string `json:"name"` // The name of the check (e.g., "code-coverage"). (Required.) + HeadBranch string `json:"head_branch"` // The name of the branch to perform a check against. (Required.) + HeadSHA string `json:"head_sha"` // The SHA of the commit. (Required.) + DetailsURL *string `json:"details_url,omitempty"` // The URL of the integrator's site that has the full details of the check. (Optional.) + ExternalID *string `json:"external_id,omitempty"` // A reference for the run on the integrator's system. (Optional.) + Status *string `json:"status,omitempty"` // The current status. Can be one of "queued", "in_progress", or "completed". Default: "queued". (Optional.) + Conclusion *string `json:"conclusion,omitempty"` // Can be one of "success", "failure", "neutral", "cancelled", "timed_out", or "action_required". (Optional. Required if you provide a status of "completed".) + StartedAt *Timestamp `json:"started_at,omitempty"` // The time that the check run began. (Optional.) + CompletedAt *Timestamp `json:"completed_at,omitempty"` // The time the check completed. (Optional. Required if you provide conclusion.) + Output *CheckRunOutput `json:"output,omitempty"` // Provide descriptive details about the run. (Optional) +} + +// CreateCheckRun creates a check run for repository. +// +// GitHub API docs: https://developer.github.com/v3/checks/runs/#create-a-check-run +func (s *ChecksService) CreateCheckRun(ctx context.Context, owner, repo string, opt CreateCheckRunOptions) (*CheckRun, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-runs", owner, repo) + req, err := s.client.NewRequest("POST", u, opt) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + checkRun := new(CheckRun) + resp, err := s.client.Do(ctx, req, checkRun) + if err != nil { + return nil, resp, err + } + + return checkRun, resp, nil +} + +// UpdateCheckRunOptions sets up parameters needed to update a CheckRun. +type UpdateCheckRunOptions struct { + Name string `json:"name"` // The name of the check (e.g., "code-coverage"). (Required.) + HeadBranch *string `json:"head_branch,omitempty"` // The name of the branch to perform a check against. (Optional.) + HeadSHA *string `json:"head_sha,omitempty"` // The SHA of the commit. (Optional.) + DetailsURL *string `json:"details_url,omitempty"` // The URL of the integrator's site that has the full details of the check. (Optional.) + ExternalID *string `json:"external_id,omitempty"` // A reference for the run on the integrator's system. (Optional.) + Status *string `json:"status,omitempty"` // The current status. Can be one of "queued", "in_progress", or "completed". Default: "queued". (Optional.) + Conclusion *string `json:"conclusion,omitempty"` // Can be one of "success", "failure", "neutral", "cancelled", "timed_out", or "action_required". (Optional. Required if you provide a status of "completed".) + CompletedAt *Timestamp `json:"completed_at,omitempty"` // The time the check completed. (Optional. Required if you provide conclusion.) + Output *CheckRunOutput `json:"output,omitempty"` // Provide descriptive details about the run. (Optional) +} + +// UpdateCheckRun updates a check run for a specific commit in a repository. +// +// GitHub API docs: https://developer.github.com/v3/checks/runs/#update-a-check-run +func (s *ChecksService) UpdateCheckRun(ctx context.Context, owner, repo string, checkRunID int64, opt UpdateCheckRunOptions) (*CheckRun, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-runs/%v", owner, repo, checkRunID) + req, err := s.client.NewRequest("PATCH", u, opt) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + checkRun := new(CheckRun) + resp, err := s.client.Do(ctx, req, checkRun) + if err != nil { + return nil, resp, err + } + + return checkRun, resp, nil +} + +// ListCheckRunAnnotations lists the annotations for a check run. +// +// GitHub API docs: https://developer.github.com/v3/checks/runs/#list-annotations-for-a-check-run +func (s *ChecksService) ListCheckRunAnnotations(ctx context.Context, owner, repo string, checkRunID int64, opt *ListOptions) ([]*CheckRunAnnotation, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-runs/%v/annotations", owner, repo, checkRunID) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + var checkRunAnnotations []*CheckRunAnnotation + resp, err := s.client.Do(ctx, req, &checkRunAnnotations) + if err != nil { + return nil, resp, err + } + + return checkRunAnnotations, resp, nil +} + +// ListCheckRunsOptions represents parameters to list check runs. +type ListCheckRunsOptions struct { + CheckName *string `url:"check_name,omitempty"` // Returns check runs with the specified name. + Status *string `url:"status,omitempty"` // Returns check runs with the specified status. Can be one of "queued", "in_progress", or "completed". + Filter *string `url:"filter,omitempty"` // Filters check runs by their completed_at timestamp. Can be one of "latest" (returning the most recent check runs) or "all". Default: "latest" + + ListOptions +} + +// ListCheckRunsResults represents the result of a check run list. +type ListCheckRunsResults struct { + Total *int `json:"total_count,omitempty"` + CheckRuns []*CheckRun `json:"check_runs,omitempty"` +} + +// ListCheckRunsForRef lists check runs for a specific ref. +// +// GitHub API docs: https://developer.github.com/v3/checks/runs/#list-check-runs-for-a-specific-ref +func (s *ChecksService) ListCheckRunsForRef(ctx context.Context, owner, repo, ref string, opt *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/commits/%v/check-runs", owner, repo, ref) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + var checkRunResults *ListCheckRunsResults + resp, err := s.client.Do(ctx, req, &checkRunResults) + if err != nil { + return nil, resp, err + } + + return checkRunResults, resp, nil +} + +// ListCheckRunsCheckSuite lists check runs for a check suite. +// +// GitHub API docs: https://developer.github.com/v3/checks/runs/#list-check-runs-in-a-check-suite +func (s *ChecksService) ListCheckRunsCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64, opt *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-suites/%v/check-runs", owner, repo, checkSuiteID) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + var checkRunResults *ListCheckRunsResults + resp, err := s.client.Do(ctx, req, &checkRunResults) + if err != nil { + return nil, resp, err + } + + return checkRunResults, resp, nil +} + +// ListCheckSuiteOptions represents parameters to list check suites. +type ListCheckSuiteOptions struct { + CheckName *string `url:"check_name,omitempty"` // Filters checks suites by the name of the check run. + AppID *int `url:"app_id,omitempty"` // Filters check suites by GitHub App id. + + ListOptions +} + +// ListCheckSuiteResults represents the result of a check run list. +type ListCheckSuiteResults struct { + Total *int `json:"total_count,omitempty"` + CheckSuites []*CheckSuite `json:"check_suites,omitempty"` +} + +// ListCheckSuitesForRef lists check suite for a specific ref. +// +// GitHub API docs: https://developer.github.com/v3/checks/suites/#list-check-suites-for-a-specific-ref +func (s *ChecksService) ListCheckSuitesForRef(ctx context.Context, owner, repo, ref string, opt *ListCheckSuiteOptions) (*ListCheckSuiteResults, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/commits/%v/check-suites", owner, repo, ref) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + var checkSuiteResults *ListCheckSuiteResults + resp, err := s.client.Do(ctx, req, &checkSuiteResults) + if err != nil { + return nil, resp, err + } + + return checkSuiteResults, resp, nil +} + +// AutoTriggerCheck enables or disables automatic creation of CheckSuite events upon pushes to the repository. +type AutoTriggerCheck struct { + AppID *int64 `json:"app_id,omitempty"` // The id of the GitHub App. (Required.) + Setting *bool `json:"setting,omitempty"` // Set to "true" to enable automatic creation of CheckSuite events upon pushes to the repository, or "false" to disable them. Default: "true" (Required.) +} + +// CheckSuitePreferenceOptions set options for check suite preferences for a repository. +type CheckSuitePreferenceOptions struct { + PreferenceList *PreferenceList `json:"auto_trigger_checks,omitempty"` // A list of auto trigger checks that can be set for a check suite in a repository. +} + +// CheckSuitePreferenceResults represents the results of the preference set operation. +type CheckSuitePreferenceResults struct { + Preferences *PreferenceList `json:"preferences,omitempty"` + Repository *Repository `json:"repository,omitempty"` +} + +// PreferenceList represents a list of auto trigger checks for repository +type PreferenceList struct { + AutoTriggerChecks []*AutoTriggerCheck `json:"auto_trigger_checks,omitempty"` // A slice of auto trigger checks that can be set for a check suite in a repository. +} + +// SetCheckSuitePreferences changes the default automatic flow when creating check suites. +// +// GitHub API docs: https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository +func (s *ChecksService) SetCheckSuitePreferences(ctx context.Context, owner, repo string, opt CheckSuitePreferenceOptions) (*CheckSuitePreferenceResults, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-suites/preferences", owner, repo) + req, err := s.client.NewRequest("PATCH", u, opt) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + var checkSuitePrefResults *CheckSuitePreferenceResults + resp, err := s.client.Do(ctx, req, &checkSuitePrefResults) + if err != nil { + return nil, resp, err + } + + return checkSuitePrefResults, resp, nil +} + +// CreateCheckSuiteOptions sets up parameters to manually create a check suites +type CreateCheckSuiteOptions struct { + HeadSHA string `json:"head_sha"` // The sha of the head commit. (Required.) + HeadBranch *string `json:"head_branch,omitempty"` // The name of the head branch where the code changes are implemented. +} + +// CreateCheckSuite manually creates a check suite for a repository. +// +// GitHub API docs: https://developer.github.com/v3/checks/suites/#create-a-check-suite +func (s *ChecksService) CreateCheckSuite(ctx context.Context, owner, repo string, opt CreateCheckSuiteOptions) (*CheckSuite, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-suites", owner, repo) + req, err := s.client.NewRequest("POST", u, opt) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + checkSuite := new(CheckSuite) + resp, err := s.client.Do(ctx, req, checkSuite) + if err != nil { + return nil, resp, err + } + + return checkSuite, resp, nil +} + +// ReRequestCheckSuite triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. +// +// GitHub API docs: https://developer.github.com/v3/checks/suites/#rerequest-check-suite +func (s *ChecksService) ReRequestCheckSuite(ctx context.Context, owner, repo string, checkSuiteID int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/check-suites/%v/rerequest", owner, repo, checkSuiteID) + + req, err := s.client.NewRequest("POST", u, nil) + if err != nil { + return nil, err + } + + req.Header.Set("Accept", mediaTypeCheckRunsPreview) + + resp, err := s.client.Do(ctx, req, nil) + return resp, err +} diff --git a/vendor/github.com/google/go-github/github/doc.go b/vendor/github.com/google/go-github/github/doc.go index 4ba03cb3c..96445d264 100644 --- a/vendor/github.com/google/go-github/github/doc.go +++ b/vendor/github.com/google/go-github/github/doc.go @@ -30,6 +30,13 @@ The services of a client divide the API into logical chunks and correspond to the structure of the GitHub API documentation at https://developer.github.com/v3/. +NOTE: Using the https://godoc.org/context package, one can easily +pass cancelation signals and deadlines to various services of the client for +handling a request. In case there is no context available, then context.Background() +can be used as a starting point. + +For more sample code snippets, head over to the https://github.com/google/go-github/tree/master/example directory. + Authentication The go-github library does not directly handle authentication. Instead, when @@ -176,16 +183,5 @@ github.Response struct. opt.Page = resp.NextPage } -Google App Engine - -Go on App Engine Classic (which as of this writing uses Go 1.6) can not use -the "context" import and still relies on "golang.org/x/net/context". -As a result, if you wish to continue to use "go-github" on App Engine Classic, -you will need to rewrite all the "context" imports using the following command: - - gofmt -w -r '"context" -> "golang.org/x/net/context"' *.go - -See "with_appengine.go" for more details. - */ package github diff --git a/vendor/github.com/google/go-github/github/event_types.go b/vendor/github.com/google/go-github/github/event_types.go index c6b29b9a2..9f49b34f9 100644 --- a/vendor/github.com/google/go-github/github/event_types.go +++ b/vendor/github.com/google/go-github/github/event_types.go @@ -7,6 +7,38 @@ package github +// CheckRunEvent is triggered when a check run is "created", "updated", or "re-requested". +// The Webhook event name is "check_run". +// +// GitHub API docs: https://developer.github.com/v3/activity/events/types/#checkrunevent +type CheckRunEvent struct { + CheckRun *CheckRun `json:"check_run,omitempty"` + // The action performed. Can be "created", "updated" or "re-requested". + Action *string `json:"action,omitempty"` + + // The following fields are only populated by Webhook events. + Repo *Repository `json:"repository,omitempty"` + Org *Organization `json:"organization,omitempty"` + Sender *User `json:"sender,omitempty"` + Installation *Installation `json:"installation,omitempty"` +} + +// CheckSuiteEvent is triggered when a check suite is "completed", "requested", or "re-requested". +// The Webhook event name is "check_suite". +// +// GitHub API docs: https://developer.github.com/v3/activity/events/types/#checksuiteevent +type CheckSuiteEvent struct { + CheckSuite *CheckSuite `json:"check_suite,omitempty"` + // The action performed. Can be "completed", "requested" or "re-requested". + Action *string `json:"action,omitempty"` + + // The following fields are only populated by Webhook events. + Repo *Repository `json:"repository,omitempty"` + Org *Organization `json:"organization,omitempty"` + Sender *User `json:"sender,omitempty"` + Installation *Installation `json:"installation,omitempty"` +} + // CommitCommentEvent is triggered when a commit comment is created. // The Webhook event name is "commit_comment". // @@ -194,6 +226,7 @@ type TeamChange struct { type InstallationEvent struct { // The action that was performed. Can be either "created" or "deleted". Action *string `json:"action,omitempty"` + Repositories []*Repository `json:"repositories,omitempty"` Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` } @@ -268,6 +301,24 @@ type LabelEvent struct { Installation *Installation `json:"installation,omitempty"` } +// MarketplacePurchaseEvent is triggered when a user purchases, cancels, or changes +// their GitHub Marketplace plan. +// Webhook event name "marketplace_purchase". +// +// Github API docs: https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent +type MarketplacePurchaseEvent struct { + // Action is the action that was performed. Possible values are: + // "purchased", "cancelled", "changed". + Action *string `json:"action,omitempty"` + + // The following fields are only populated by Webhook events. + EffectiveDate *Timestamp `json:"effective_date,omitempty"` + MarketplacePurchase *MarketplacePurchase `json:"marketplace_purchase,omitempty"` + PreviousMarketplacePurchase *MarketplacePurchase `json:"previous_marketplace_purchase,omitempty"` + Sender *User `json:"sender,omitempty"` + Installation *Installation `json:"installation,omitempty"` +} + // MemberEvent is triggered when a user is added as a collaborator to a repository. // The Webhook event name is "member". // @@ -374,7 +425,7 @@ type PageBuildEvent struct { Build *PagesBuild `json:"build,omitempty"` // The following fields are only populated by Webhook events. - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Repo *Repository `json:"repository,omitempty"` Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` @@ -387,7 +438,7 @@ type PingEvent struct { // Random string of GitHub zen. Zen *string `json:"zen,omitempty"` // The ID of the webhook that triggered the ping. - HookID *int `json:"hook_id,omitempty"` + HookID *int64 `json:"hook_id,omitempty"` // The webhook configuration. Hook *Hook `json:"hook,omitempty"` Installation *Installation `json:"installation,omitempty"` @@ -416,7 +467,7 @@ type ProjectEvent struct { type ProjectCardEvent struct { Action *string `json:"action,omitempty"` Changes *ProjectCardChange `json:"changes,omitempty"` - AfterID *int `json:"after_id,omitempty"` + AfterID *int64 `json:"after_id,omitempty"` ProjectCard *ProjectCard `json:"project_card,omitempty"` // The following fields are only populated by Webhook events. @@ -433,7 +484,7 @@ type ProjectCardEvent struct { type ProjectColumnEvent struct { Action *string `json:"action,omitempty"` Changes *ProjectColumnChange `json:"changes,omitempty"` - AfterID *int `json:"after_id,omitempty"` + AfterID *int64 `json:"after_id,omitempty"` ProjectColumn *ProjectColumn `json:"project_column,omitempty"` // The following fields are only populated by Webhook events. @@ -461,20 +512,31 @@ type PublicEvent struct { // // GitHub API docs: https://developer.github.com/v3/activity/events/types/#pullrequestevent type PullRequestEvent struct { - // Action is the action that was performed. Possible values are: "assigned", - // "unassigned", "labeled", "unlabeled", "opened", "closed", or "reopened", - // "synchronize", "edited". If the action is "closed" and the merged key is false, + // Action is the action that was performed. Possible values are: + // "assigned", "unassigned", "review_requested", "review_request_removed", "labeled", "unlabeled", + // "opened", "closed", "reopened", "synchronize", "edited". + // If the action is "closed" and the merged key is false, // the pull request was closed with unmerged commits. If the action is "closed" // and the merged key is true, the pull request was merged. Action *string `json:"action,omitempty"` + Assignee *User `json:"assignee,omitempty"` Number *int `json:"number,omitempty"` PullRequest *PullRequest `json:"pull_request,omitempty"` // The following fields are only populated by Webhook events. - Changes *EditChange `json:"changes,omitempty"` - Repo *Repository `json:"repository,omitempty"` - Sender *User `json:"sender,omitempty"` - Installation *Installation `json:"installation,omitempty"` + Changes *EditChange `json:"changes,omitempty"` + // RequestedReviewer is populated in "review_requested", "review_request_removed" event deliveries. + // A request affecting multiple reviewers at once is split into multiple + // such event deliveries, each with a single, different RequestedReviewer. + RequestedReviewer *User `json:"requested_reviewer,omitempty"` + Repo *Repository `json:"repository,omitempty"` + Sender *User `json:"sender,omitempty"` + Installation *Installation `json:"installation,omitempty"` + Label *Label `json:"label,omitempty"` // Populated in "labeled" event deliveries. + + // The following field is only present when the webhook is triggered on + // a repository belonging to an organization. + Organization *Organization `json:"organization,omitempty"` } // PullRequestReviewEvent is triggered when a review is submitted on a pull @@ -521,7 +583,7 @@ type PullRequestReviewCommentEvent struct { // // GitHub API docs: https://developer.github.com/v3/activity/events/types/#pushevent type PushEvent struct { - PushID *int `json:"push_id,omitempty"` + PushID *int64 `json:"push_id,omitempty"` Head *string `json:"head,omitempty"` Ref *string `json:"ref,omitempty"` Size *int `json:"size,omitempty"` @@ -573,38 +635,39 @@ func (p PushEventCommit) String() string { // PushEventRepository represents the repo object in a PushEvent payload. type PushEventRepository struct { - ID *int `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - FullName *string `json:"full_name,omitempty"` - Owner *PushEventRepoOwner `json:"owner,omitempty"` - Private *bool `json:"private,omitempty"` - Description *string `json:"description,omitempty"` - Fork *bool `json:"fork,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PushedAt *Timestamp `json:"pushed_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - Homepage *string `json:"homepage,omitempty"` - Size *int `json:"size,omitempty"` - StargazersCount *int `json:"stargazers_count,omitempty"` - WatchersCount *int `json:"watchers_count,omitempty"` - Language *string `json:"language,omitempty"` - HasIssues *bool `json:"has_issues,omitempty"` - HasDownloads *bool `json:"has_downloads,omitempty"` - HasWiki *bool `json:"has_wiki,omitempty"` - HasPages *bool `json:"has_pages,omitempty"` - ForksCount *int `json:"forks_count,omitempty"` - OpenIssuesCount *int `json:"open_issues_count,omitempty"` - DefaultBranch *string `json:"default_branch,omitempty"` - MasterBranch *string `json:"master_branch,omitempty"` - Organization *string `json:"organization,omitempty"` - URL *string `json:"url,omitempty"` - ArchiveURL *string `json:"archive_url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - StatusesURL *string `json:"statuses_url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - SSHURL *string `json:"ssh_url,omitempty"` - CloneURL *string `json:"clone_url,omitempty"` - SVNURL *string `json:"svn_url,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Name *string `json:"name,omitempty"` + FullName *string `json:"full_name,omitempty"` + Owner *User `json:"owner,omitempty"` + Private *bool `json:"private,omitempty"` + Description *string `json:"description,omitempty"` + Fork *bool `json:"fork,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + PushedAt *Timestamp `json:"pushed_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + Homepage *string `json:"homepage,omitempty"` + Size *int `json:"size,omitempty"` + StargazersCount *int `json:"stargazers_count,omitempty"` + WatchersCount *int `json:"watchers_count,omitempty"` + Language *string `json:"language,omitempty"` + HasIssues *bool `json:"has_issues,omitempty"` + HasDownloads *bool `json:"has_downloads,omitempty"` + HasWiki *bool `json:"has_wiki,omitempty"` + HasPages *bool `json:"has_pages,omitempty"` + ForksCount *int `json:"forks_count,omitempty"` + OpenIssuesCount *int `json:"open_issues_count,omitempty"` + DefaultBranch *string `json:"default_branch,omitempty"` + MasterBranch *string `json:"master_branch,omitempty"` + Organization *string `json:"organization,omitempty"` + URL *string `json:"url,omitempty"` + ArchiveURL *string `json:"archive_url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + StatusesURL *string `json:"statuses_url,omitempty"` + GitURL *string `json:"git_url,omitempty"` + SSHURL *string `json:"ssh_url,omitempty"` + CloneURL *string `json:"clone_url,omitempty"` + SVNURL *string `json:"svn_url,omitempty"` } // PushEventRepoOwner is a basic representation of user/org in a PushEvent payload. @@ -663,7 +726,7 @@ type StatusEvent struct { Branches []*Branch `json:"branches,omitempty"` // The following fields are only populated by Webhook events. - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Name *string `json:"name,omitempty"` Context *string `json:"context,omitempty"` Commit *RepositoryCommit `json:"commit,omitempty"` diff --git a/vendor/github.com/google/go-github/github/examples_test.go b/vendor/github.com/google/go-github/github/examples_test.go deleted file mode 100644 index f09d6505a..000000000 --- a/vendor/github.com/google/go-github/github/examples_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github_test - -import ( - "context" - "fmt" - "log" - - "github.com/google/go-github/github" -) - -func ExampleClient_Markdown() { - client := github.NewClient(nil) - - input := "# heading #\n\nLink to issue #1" - opt := &github.MarkdownOptions{Mode: "gfm", Context: "google/go-github"} - - output, _, err := client.Markdown(context.Background(), input, opt) - if err != nil { - fmt.Println(err) - } - - fmt.Println(output) -} - -func ExampleRepositoriesService_GetReadme() { - client := github.NewClient(nil) - - readme, _, err := client.Repositories.GetReadme(context.Background(), "google", "go-github", nil) - if err != nil { - fmt.Println(err) - return - } - - content, err := readme.GetContent() - if err != nil { - fmt.Println(err) - return - } - - fmt.Printf("google/go-github README:\n%v\n", content) -} - -func ExampleRepositoriesService_List() { - client := github.NewClient(nil) - - user := "willnorris" - opt := &github.RepositoryListOptions{Type: "owner", Sort: "updated", Direction: "desc"} - - repos, _, err := client.Repositories.List(context.Background(), user, opt) - if err != nil { - fmt.Println(err) - } - - fmt.Printf("Recently updated repositories by %q: %v", user, github.Stringify(repos)) -} - -func ExampleUsersService_ListAll() { - client := github.NewClient(nil) - opts := &github.UserListOptions{} - for { - users, _, err := client.Users.ListAll(context.Background(), opts) - if err != nil { - log.Fatalf("error listing users: %v", err) - } - if len(users) == 0 { - break - } - opts.Since = *users[len(users)-1].ID - // Process users... - } -} diff --git a/vendor/github.com/google/go-github/github/gen-accessors.go b/vendor/github.com/google/go-github/github/gen-accessors.go new file mode 100644 index 000000000..fe92206fc --- /dev/null +++ b/vendor/github.com/google/go-github/github/gen-accessors.go @@ -0,0 +1,332 @@ +// Copyright 2017 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// gen-accessors generates accessor methods for structs with pointer fields. +// +// It is meant to be used by the go-github authors in conjunction with the +// go generate tool before sending a commit to GitHub. +package main + +import ( + "bytes" + "flag" + "fmt" + "go/ast" + "go/format" + "go/parser" + "go/token" + "io/ioutil" + "log" + "os" + "sort" + "strings" + "text/template" +) + +const ( + fileSuffix = "-accessors.go" +) + +var ( + verbose = flag.Bool("v", false, "Print verbose log messages") + + sourceTmpl = template.Must(template.New("source").Parse(source)) + + // blacklistStructMethod lists "struct.method" combos to skip. + blacklistStructMethod = map[string]bool{ + "RepositoryContent.GetContent": true, + "Client.GetBaseURL": true, + "Client.GetUploadURL": true, + "ErrorResponse.GetResponse": true, + "RateLimitError.GetResponse": true, + "AbuseRateLimitError.GetResponse": true, + } + // blacklistStruct lists structs to skip. + blacklistStruct = map[string]bool{ + "Client": true, + } +) + +func logf(fmt string, args ...interface{}) { + if *verbose { + log.Printf(fmt, args...) + } +} + +func main() { + flag.Parse() + fset := token.NewFileSet() + + pkgs, err := parser.ParseDir(fset, ".", sourceFilter, 0) + if err != nil { + log.Fatal(err) + return + } + + for pkgName, pkg := range pkgs { + t := &templateData{ + filename: pkgName + fileSuffix, + Year: 2017, + Package: pkgName, + Imports: map[string]string{}, + } + for filename, f := range pkg.Files { + logf("Processing %v...", filename) + if err := t.processAST(f); err != nil { + log.Fatal(err) + } + } + if err := t.dump(); err != nil { + log.Fatal(err) + } + } + logf("Done.") +} + +func (t *templateData) processAST(f *ast.File) error { + for _, decl := range f.Decls { + gd, ok := decl.(*ast.GenDecl) + if !ok { + continue + } + for _, spec := range gd.Specs { + ts, ok := spec.(*ast.TypeSpec) + if !ok { + continue + } + // Skip unexported identifiers. + if !ts.Name.IsExported() { + logf("Struct %v is unexported; skipping.", ts.Name) + continue + } + // Check if the struct is blacklisted. + if blacklistStruct[ts.Name.Name] { + logf("Struct %v is blacklisted; skipping.", ts.Name) + continue + } + st, ok := ts.Type.(*ast.StructType) + if !ok { + continue + } + for _, field := range st.Fields.List { + se, ok := field.Type.(*ast.StarExpr) + if len(field.Names) == 0 || !ok { + continue + } + + fieldName := field.Names[0] + // Skip unexported identifiers. + if !fieldName.IsExported() { + logf("Field %v is unexported; skipping.", fieldName) + continue + } + // Check if "struct.method" is blacklisted. + if key := fmt.Sprintf("%v.Get%v", ts.Name, fieldName); blacklistStructMethod[key] { + logf("Method %v is blacklisted; skipping.", key) + continue + } + + switch x := se.X.(type) { + case *ast.ArrayType: + t.addArrayType(x, ts.Name.String(), fieldName.String()) + case *ast.Ident: + t.addIdent(x, ts.Name.String(), fieldName.String()) + case *ast.MapType: + t.addMapType(x, ts.Name.String(), fieldName.String()) + case *ast.SelectorExpr: + t.addSelectorExpr(x, ts.Name.String(), fieldName.String()) + default: + logf("processAST: type %q, field %q, unknown %T: %+v", ts.Name, fieldName, x, x) + } + } + } + } + return nil +} + +func sourceFilter(fi os.FileInfo) bool { + return !strings.HasSuffix(fi.Name(), "_test.go") && !strings.HasSuffix(fi.Name(), fileSuffix) +} + +func (t *templateData) dump() error { + if len(t.Getters) == 0 { + logf("No getters for %v; skipping.", t.filename) + return nil + } + + // Sort getters by ReceiverType.FieldName. + sort.Sort(byName(t.Getters)) + + var buf bytes.Buffer + if err := sourceTmpl.Execute(&buf, t); err != nil { + return err + } + clean, err := format.Source(buf.Bytes()) + if err != nil { + return err + } + + logf("Writing %v...", t.filename) + return ioutil.WriteFile(t.filename, clean, 0644) +} + +func newGetter(receiverType, fieldName, fieldType, zeroValue string, namedStruct bool) *getter { + return &getter{ + sortVal: strings.ToLower(receiverType) + "." + strings.ToLower(fieldName), + ReceiverVar: strings.ToLower(receiverType[:1]), + ReceiverType: receiverType, + FieldName: fieldName, + FieldType: fieldType, + ZeroValue: zeroValue, + NamedStruct: namedStruct, + } +} + +func (t *templateData) addArrayType(x *ast.ArrayType, receiverType, fieldName string) { + var eltType string + switch elt := x.Elt.(type) { + case *ast.Ident: + eltType = elt.String() + default: + logf("addArrayType: type %q, field %q: unknown elt type: %T %+v; skipping.", receiverType, fieldName, elt, elt) + return + } + + t.Getters = append(t.Getters, newGetter(receiverType, fieldName, "[]"+eltType, "nil", false)) +} + +func (t *templateData) addIdent(x *ast.Ident, receiverType, fieldName string) { + var zeroValue string + var namedStruct = false + switch x.String() { + case "int", "int64": + zeroValue = "0" + case "string": + zeroValue = `""` + case "bool": + zeroValue = "false" + case "Timestamp": + zeroValue = "Timestamp{}" + default: + zeroValue = "nil" + namedStruct = true + } + + t.Getters = append(t.Getters, newGetter(receiverType, fieldName, x.String(), zeroValue, namedStruct)) +} + +func (t *templateData) addMapType(x *ast.MapType, receiverType, fieldName string) { + var keyType string + switch key := x.Key.(type) { + case *ast.Ident: + keyType = key.String() + default: + logf("addMapType: type %q, field %q: unknown key type: %T %+v; skipping.", receiverType, fieldName, key, key) + return + } + + var valueType string + switch value := x.Value.(type) { + case *ast.Ident: + valueType = value.String() + default: + logf("addMapType: type %q, field %q: unknown value type: %T %+v; skipping.", receiverType, fieldName, value, value) + return + } + + fieldType := fmt.Sprintf("map[%v]%v", keyType, valueType) + zeroValue := fmt.Sprintf("map[%v]%v{}", keyType, valueType) + t.Getters = append(t.Getters, newGetter(receiverType, fieldName, fieldType, zeroValue, false)) +} + +func (t *templateData) addSelectorExpr(x *ast.SelectorExpr, receiverType, fieldName string) { + if strings.ToLower(fieldName[:1]) == fieldName[:1] { // Non-exported field. + return + } + + var xX string + if xx, ok := x.X.(*ast.Ident); ok { + xX = xx.String() + } + + switch xX { + case "time", "json": + if xX == "json" { + t.Imports["encoding/json"] = "encoding/json" + } else { + t.Imports[xX] = xX + } + fieldType := fmt.Sprintf("%v.%v", xX, x.Sel.Name) + zeroValue := fmt.Sprintf("%v.%v{}", xX, x.Sel.Name) + if xX == "time" && x.Sel.Name == "Duration" { + zeroValue = "0" + } + t.Getters = append(t.Getters, newGetter(receiverType, fieldName, fieldType, zeroValue, false)) + default: + logf("addSelectorExpr: xX %q, type %q, field %q: unknown x=%+v; skipping.", xX, receiverType, fieldName, x) + } +} + +type templateData struct { + filename string + Year int + Package string + Imports map[string]string + Getters []*getter +} + +type getter struct { + sortVal string // Lower-case version of "ReceiverType.FieldName". + ReceiverVar string // The one-letter variable name to match the ReceiverType. + ReceiverType string + FieldName string + FieldType string + ZeroValue string + NamedStruct bool // Getter for named struct. +} + +type byName []*getter + +func (b byName) Len() int { return len(b) } +func (b byName) Less(i, j int) bool { return b[i].sortVal < b[j].sortVal } +func (b byName) Swap(i, j int) { b[i], b[j] = b[j], b[i] } + +const source = `// Copyright {{.Year}} The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by gen-accessors; DO NOT EDIT. + +package {{.Package}} +{{with .Imports}} +import ( + {{- range . -}} + "{{.}}" + {{end -}} +) +{{end}} +{{range .Getters}} +{{if .NamedStruct}} +// Get{{.FieldName}} returns the {{.FieldName}} field. +func ({{.ReceiverVar}} *{{.ReceiverType}}) Get{{.FieldName}}() *{{.FieldType}} { + if {{.ReceiverVar}} == nil { + return {{.ZeroValue}} + } + return {{.ReceiverVar}}.{{.FieldName}} +} +{{else}} +// Get{{.FieldName}} returns the {{.FieldName}} field if it's non-nil, zero value otherwise. +func ({{.ReceiverVar}} *{{.ReceiverType}}) Get{{.FieldName}}() {{.FieldType}} { + if {{.ReceiverVar}} == nil || {{.ReceiverVar}}.{{.FieldName}} == nil { + return {{.ZeroValue}} + } + return *{{.ReceiverVar}}.{{.FieldName}} +} +{{end}} +{{end}} +` diff --git a/vendor/github.com/google/go-github/github/gists.go b/vendor/github.com/google/go-github/github/gists.go index 15276ea1d..15e0bc2cd 100644 --- a/vendor/github.com/google/go-github/github/gists.go +++ b/vendor/github.com/google/go-github/github/gists.go @@ -30,6 +30,7 @@ type Gist struct { GitPushURL *string `json:"git_push_url,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (g Gist) String() string { @@ -60,6 +61,7 @@ type GistCommit struct { User *User `json:"user,omitempty"` ChangeStatus *CommitStats `json:"change_status,omitempty"` CommittedAt *Timestamp `json:"committed_at,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (gc GistCommit) String() string { @@ -73,6 +75,7 @@ type GistFork struct { ID *string `json:"id,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (gf GistFork) String() string { @@ -175,6 +178,7 @@ func (s *GistsService) Get(ctx context.Context, id string) (*Gist, *Response, er if err != nil { return nil, nil, err } + gist := new(Gist) resp, err := s.client.Do(ctx, req, gist) if err != nil { @@ -193,6 +197,7 @@ func (s *GistsService) GetRevision(ctx context.Context, id, sha string) (*Gist, if err != nil { return nil, nil, err } + gist := new(Gist) resp, err := s.client.Do(ctx, req, gist) if err != nil { @@ -211,6 +216,7 @@ func (s *GistsService) Create(ctx context.Context, gist *Gist) (*Gist, *Response if err != nil { return nil, nil, err } + g := new(Gist) resp, err := s.client.Do(ctx, req, g) if err != nil { @@ -229,6 +235,7 @@ func (s *GistsService) Edit(ctx context.Context, id string, gist *Gist) (*Gist, if err != nil { return nil, nil, err } + g := new(Gist) resp, err := s.client.Do(ctx, req, g) if err != nil { diff --git a/vendor/github.com/google/go-github/github/gists_comments.go b/vendor/github.com/google/go-github/github/gists_comments.go index 2d0722375..d5322e3d8 100644 --- a/vendor/github.com/google/go-github/github/gists_comments.go +++ b/vendor/github.com/google/go-github/github/gists_comments.go @@ -13,7 +13,7 @@ import ( // GistComment represents a Gist comment. type GistComment struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` Body *string `json:"body,omitempty"` User *User `json:"user,omitempty"` @@ -51,7 +51,7 @@ func (s *GistsService) ListComments(ctx context.Context, gistID string, opt *Lis // GetComment retrieves a single comment from a gist. // // GitHub API docs: https://developer.github.com/v3/gists/comments/#get-a-single-comment -func (s *GistsService) GetComment(ctx context.Context, gistID string, commentID int) (*GistComment, *Response, error) { +func (s *GistsService) GetComment(ctx context.Context, gistID string, commentID int64) (*GistComment, *Response, error) { u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -89,7 +89,7 @@ func (s *GistsService) CreateComment(ctx context.Context, gistID string, comment // EditComment edits an existing gist comment. // // GitHub API docs: https://developer.github.com/v3/gists/comments/#edit-a-comment -func (s *GistsService) EditComment(ctx context.Context, gistID string, commentID int, comment *GistComment) (*GistComment, *Response, error) { +func (s *GistsService) EditComment(ctx context.Context, gistID string, commentID int64, comment *GistComment) (*GistComment, *Response, error) { u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID) req, err := s.client.NewRequest("PATCH", u, comment) if err != nil { @@ -108,7 +108,7 @@ func (s *GistsService) EditComment(ctx context.Context, gistID string, commentID // DeleteComment deletes a gist comment. // // GitHub API docs: https://developer.github.com/v3/gists/comments/#delete-a-comment -func (s *GistsService) DeleteComment(ctx context.Context, gistID string, commentID int) (*Response, error) { +func (s *GistsService) DeleteComment(ctx context.Context, gistID string, commentID int64) (*Response, error) { u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { diff --git a/vendor/github.com/google/go-github/github/gists_comments_test.go b/vendor/github.com/google/go-github/github/gists_comments_test.go deleted file mode 100644 index 4b6841363..000000000 --- a/vendor/github.com/google/go-github/github/gists_comments_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGistsService_ListComments(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id": 1}]`) - }) - - opt := &ListOptions{Page: 2} - comments, _, err := client.Gists.ListComments(context.Background(), "1", opt) - if err != nil { - t.Errorf("Gists.Comments returned error: %v", err) - } - - want := []*GistComment{{ID: Int(1)}} - if !reflect.DeepEqual(comments, want) { - t.Errorf("Gists.ListComments returned %+v, want %+v", comments, want) - } -} - -func TestGistsService_ListComments_invalidID(t *testing.T) { - _, _, err := client.Gists.ListComments(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestGistsService_GetComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/comments/2", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id": 1}`) - }) - - comment, _, err := client.Gists.GetComment(context.Background(), "1", 2) - if err != nil { - t.Errorf("Gists.GetComment returned error: %v", err) - } - - want := &GistComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Gists.GetComment returned %+v, want %+v", comment, want) - } -} - -func TestGistsService_GetComment_invalidID(t *testing.T) { - _, _, err := client.Gists.GetComment(context.Background(), "%", 1) - testURLParseError(t, err) -} - -func TestGistsService_CreateComment(t *testing.T) { - setup() - defer teardown() - - input := &GistComment{ID: Int(1), Body: String("b")} - - mux.HandleFunc("/gists/1/comments", func(w http.ResponseWriter, r *http.Request) { - v := new(GistComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Gists.CreateComment(context.Background(), "1", input) - if err != nil { - t.Errorf("Gists.CreateComment returned error: %v", err) - } - - want := &GistComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Gists.CreateComment returned %+v, want %+v", comment, want) - } -} - -func TestGistsService_CreateComment_invalidID(t *testing.T) { - _, _, err := client.Gists.CreateComment(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestGistsService_EditComment(t *testing.T) { - setup() - defer teardown() - - input := &GistComment{ID: Int(1), Body: String("b")} - - mux.HandleFunc("/gists/1/comments/2", func(w http.ResponseWriter, r *http.Request) { - v := new(GistComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Gists.EditComment(context.Background(), "1", 2, input) - if err != nil { - t.Errorf("Gists.EditComment returned error: %v", err) - } - - want := &GistComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Gists.EditComment returned %+v, want %+v", comment, want) - } -} - -func TestGistsService_EditComment_invalidID(t *testing.T) { - _, _, err := client.Gists.EditComment(context.Background(), "%", 1, nil) - testURLParseError(t, err) -} - -func TestGistsService_DeleteComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/comments/2", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Gists.DeleteComment(context.Background(), "1", 2) - if err != nil { - t.Errorf("Gists.Delete returned error: %v", err) - } -} - -func TestGistsService_DeleteComment_invalidID(t *testing.T) { - _, err := client.Gists.DeleteComment(context.Background(), "%", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/gists_test.go b/vendor/github.com/google/go-github/github/gists_test.go deleted file mode 100644 index 6065f277d..000000000 --- a/vendor/github.com/google/go-github/github/gists_test.go +++ /dev/null @@ -1,507 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestGistsService_List_specifiedUser(t *testing.T) { - setup() - defer teardown() - - since := "2013-01-01T00:00:00Z" - - mux.HandleFunc("/users/u/gists", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "since": since, - }) - fmt.Fprint(w, `[{"id": "1"}]`) - }) - - opt := &GistListOptions{Since: time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)} - gists, _, err := client.Gists.List(context.Background(), "u", opt) - if err != nil { - t.Errorf("Gists.List returned error: %v", err) - } - - want := []*Gist{{ID: String("1")}} - if !reflect.DeepEqual(gists, want) { - t.Errorf("Gists.List returned %+v, want %+v", gists, want) - } -} - -func TestGistsService_List_authenticatedUser(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `[{"id": "1"}]`) - }) - - gists, _, err := client.Gists.List(context.Background(), "", nil) - if err != nil { - t.Errorf("Gists.List returned error: %v", err) - } - - want := []*Gist{{ID: String("1")}} - if !reflect.DeepEqual(gists, want) { - t.Errorf("Gists.List returned %+v, want %+v", gists, want) - } -} - -func TestGistsService_List_invalidUser(t *testing.T) { - _, _, err := client.Gists.List(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestGistsService_ListAll(t *testing.T) { - setup() - defer teardown() - - since := "2013-01-01T00:00:00Z" - - mux.HandleFunc("/gists/public", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "since": since, - }) - fmt.Fprint(w, `[{"id": "1"}]`) - }) - - opt := &GistListOptions{Since: time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)} - gists, _, err := client.Gists.ListAll(context.Background(), opt) - if err != nil { - t.Errorf("Gists.ListAll returned error: %v", err) - } - - want := []*Gist{{ID: String("1")}} - if !reflect.DeepEqual(gists, want) { - t.Errorf("Gists.ListAll returned %+v, want %+v", gists, want) - } -} - -func TestGistsService_ListStarred(t *testing.T) { - setup() - defer teardown() - - since := "2013-01-01T00:00:00Z" - - mux.HandleFunc("/gists/starred", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "since": since, - }) - fmt.Fprint(w, `[{"id": "1"}]`) - }) - - opt := &GistListOptions{Since: time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)} - gists, _, err := client.Gists.ListStarred(context.Background(), opt) - if err != nil { - t.Errorf("Gists.ListStarred returned error: %v", err) - } - - want := []*Gist{{ID: String("1")}} - if !reflect.DeepEqual(gists, want) { - t.Errorf("Gists.ListStarred returned %+v, want %+v", gists, want) - } -} - -func TestGistsService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id": "1"}`) - }) - - gist, _, err := client.Gists.Get(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Get returned error: %v", err) - } - - want := &Gist{ID: String("1")} - if !reflect.DeepEqual(gist, want) { - t.Errorf("Gists.Get returned %+v, want %+v", gist, want) - } -} - -func TestGistsService_Get_invalidID(t *testing.T) { - _, _, err := client.Gists.Get(context.Background(), "%") - testURLParseError(t, err) -} - -func TestGistsService_GetRevision(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/s", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id": "1"}`) - }) - - gist, _, err := client.Gists.GetRevision(context.Background(), "1", "s") - if err != nil { - t.Errorf("Gists.Get returned error: %v", err) - } - - want := &Gist{ID: String("1")} - if !reflect.DeepEqual(gist, want) { - t.Errorf("Gists.Get returned %+v, want %+v", gist, want) - } -} - -func TestGistsService_GetRevision_invalidID(t *testing.T) { - _, _, err := client.Gists.GetRevision(context.Background(), "%", "%") - testURLParseError(t, err) -} - -func TestGistsService_Create(t *testing.T) { - setup() - defer teardown() - - input := &Gist{ - Description: String("Gist description"), - Public: Bool(false), - Files: map[GistFilename]GistFile{ - "test.txt": {Content: String("Gist file content")}, - }, - } - - mux.HandleFunc("/gists", func(w http.ResponseWriter, r *http.Request) { - v := new(Gist) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, - ` - { - "id": "1", - "description": "Gist description", - "public": false, - "files": { - "test.txt": { - "filename": "test.txt" - } - } - }`) - }) - - gist, _, err := client.Gists.Create(context.Background(), input) - if err != nil { - t.Errorf("Gists.Create returned error: %v", err) - } - - want := &Gist{ - ID: String("1"), - Description: String("Gist description"), - Public: Bool(false), - Files: map[GistFilename]GistFile{ - "test.txt": {Filename: String("test.txt")}, - }, - } - if !reflect.DeepEqual(gist, want) { - t.Errorf("Gists.Create returned %+v, want %+v", gist, want) - } -} - -func TestGistsService_Edit(t *testing.T) { - setup() - defer teardown() - - input := &Gist{ - Description: String("New description"), - Files: map[GistFilename]GistFile{ - "new.txt": {Content: String("new file content")}, - }, - } - - mux.HandleFunc("/gists/1", func(w http.ResponseWriter, r *http.Request) { - v := new(Gist) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, - ` - { - "id": "1", - "description": "new description", - "public": false, - "files": { - "test.txt": { - "filename": "test.txt" - }, - "new.txt": { - "filename": "new.txt" - } - } - }`) - }) - - gist, _, err := client.Gists.Edit(context.Background(), "1", input) - if err != nil { - t.Errorf("Gists.Edit returned error: %v", err) - } - - want := &Gist{ - ID: String("1"), - Description: String("new description"), - Public: Bool(false), - Files: map[GistFilename]GistFile{ - "test.txt": {Filename: String("test.txt")}, - "new.txt": {Filename: String("new.txt")}, - }, - } - if !reflect.DeepEqual(gist, want) { - t.Errorf("Gists.Edit returned %+v, want %+v", gist, want) - } -} - -func TestGistsService_Edit_invalidID(t *testing.T) { - _, _, err := client.Gists.Edit(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestGistsService_ListCommits(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, nil) - fmt.Fprint(w, ` - [ - { - "url": "https://api.github.com/gists/1/1", - "version": "1", - "user": { - "id": 1 - }, - "change_status": { - "deletions": 0, - "additions": 180, - "total": 180 - }, - "committed_at": "2010-01-01T00:00:00Z" - } - ] - `) - }) - - gistCommits, _, err := client.Gists.ListCommits(context.Background(), "1", nil) - if err != nil { - t.Errorf("Gists.ListCommits returned error: %v", err) - } - - want := []*GistCommit{{ - URL: String("https://api.github.com/gists/1/1"), - Version: String("1"), - User: &User{ID: Int(1)}, - CommittedAt: &Timestamp{time.Date(2010, 1, 1, 00, 00, 00, 0, time.UTC)}, - ChangeStatus: &CommitStats{ - Additions: Int(180), - Deletions: Int(0), - Total: Int(180), - }}} - - if !reflect.DeepEqual(gistCommits, want) { - t.Errorf("Gists.ListCommits returned %+v, want %+v", gistCommits, want) - } -} - -func TestGistsService_ListCommits_withOptions(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/commits", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "2", - }) - fmt.Fprint(w, `[]`) - }) - - _, _, err := client.Gists.ListCommits(context.Background(), "1", &ListOptions{Page: 2}) - if err != nil { - t.Errorf("Gists.ListCommits returned error: %v", err) - } -} - -func TestGistsService_Delete(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Gists.Delete(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Delete returned error: %v", err) - } -} - -func TestGistsService_Delete_invalidID(t *testing.T) { - _, err := client.Gists.Delete(context.Background(), "%") - testURLParseError(t, err) -} - -func TestGistsService_Star(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/star", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - }) - - _, err := client.Gists.Star(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Star returned error: %v", err) - } -} - -func TestGistsService_Star_invalidID(t *testing.T) { - _, err := client.Gists.Star(context.Background(), "%") - testURLParseError(t, err) -} - -func TestGistsService_Unstar(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/star", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Gists.Unstar(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Unstar returned error: %v", err) - } -} - -func TestGistsService_Unstar_invalidID(t *testing.T) { - _, err := client.Gists.Unstar(context.Background(), "%") - testURLParseError(t, err) -} - -func TestGistsService_IsStarred_hasStar(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/star", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNoContent) - }) - - star, _, err := client.Gists.IsStarred(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Starred returned error: %v", err) - } - if want := true; star != want { - t.Errorf("Gists.Starred returned %+v, want %+v", star, want) - } -} - -func TestGistsService_IsStarred_noStar(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/star", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - star, _, err := client.Gists.IsStarred(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Starred returned error: %v", err) - } - if want := false; star != want { - t.Errorf("Gists.Starred returned %+v, want %+v", star, want) - } -} - -func TestGistsService_IsStarred_invalidID(t *testing.T) { - _, _, err := client.Gists.IsStarred(context.Background(), "%") - testURLParseError(t, err) -} - -func TestGistsService_Fork(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/forks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - fmt.Fprint(w, `{"id": "2"}`) - }) - - gist, _, err := client.Gists.Fork(context.Background(), "1") - if err != nil { - t.Errorf("Gists.Fork returned error: %v", err) - } - - want := &Gist{ID: String("2")} - if !reflect.DeepEqual(gist, want) { - t.Errorf("Gists.Fork returned %+v, want %+v", gist, want) - } -} - -func TestGistsService_ListForks(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gists/1/forks", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, nil) - fmt.Fprint(w, ` - [ - {"url": "https://api.github.com/gists/1", - "user": {"id": 1}, - "id": "1", - "created_at": "2010-01-01T00:00:00Z", - "updated_at": "2013-01-01T00:00:00Z" - } - ] - `) - }) - - gistForks, _, err := client.Gists.ListForks(context.Background(), "1") - if err != nil { - t.Errorf("Gists.ListForks returned error: %v", err) - } - - want := []*GistFork{{ - URL: String("https://api.github.com/gists/1"), - ID: String("1"), - User: &User{ID: Int(1)}, - CreatedAt: &Timestamp{time.Date(2010, 1, 1, 00, 00, 00, 0, time.UTC)}, - UpdatedAt: &Timestamp{time.Date(2013, 1, 1, 00, 00, 00, 0, time.UTC)}}} - - if !reflect.DeepEqual(gistForks, want) { - t.Errorf("Gists.ListForks returned %+v, want %+v", gistForks, want) - } -} - -func TestGistsService_Fork_invalidID(t *testing.T) { - _, _, err := client.Gists.Fork(context.Background(), "%") - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/git_blobs.go b/vendor/github.com/google/go-github/github/git_blobs.go index 67ea74a19..70aee14a7 100644 --- a/vendor/github.com/google/go-github/github/git_blobs.go +++ b/vendor/github.com/google/go-github/github/git_blobs.go @@ -6,6 +6,7 @@ package github import ( + "bytes" "context" "fmt" ) @@ -17,9 +18,10 @@ type Blob struct { SHA *string `json:"sha,omitempty"` Size *int `json:"size,omitempty"` URL *string `json:"url,omitempty"` + NodeID *string `json:"node_id,omitempty"` } -// GetBlob fetchs a blob from a repo given a SHA. +// GetBlob fetches a blob from a repo given a SHA. // // GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob func (s *GitService) GetBlob(ctx context.Context, owner string, repo string, sha string) (*Blob, *Response, error) { @@ -34,6 +36,23 @@ func (s *GitService) GetBlob(ctx context.Context, owner string, repo string, sha return blob, resp, err } +// GetBlobRaw fetches a blob's contents from a repo. +// Unlike GetBlob, it returns the raw bytes rather than the base64-encoded data. +// +// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob +func (s *GitService) GetBlobRaw(ctx context.Context, owner, repo, sha string) ([]byte, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha) + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + req.Header.Set("Accept", "application/vnd.github.v3.raw") + + var buf bytes.Buffer + resp, err := s.client.Do(ctx, req, &buf) + return buf.Bytes(), resp, err +} + // CreateBlob creates a blob object. // // GitHub API docs: https://developer.github.com/v3/git/blobs/#create-a-blob diff --git a/vendor/github.com/google/go-github/github/git_blobs_test.go b/vendor/github.com/google/go-github/github/git_blobs_test.go deleted file mode 100644 index 00861bb9a..000000000 --- a/vendor/github.com/google/go-github/github/git_blobs_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGitService_GetBlob(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/blobs/s", func(w http.ResponseWriter, r *http.Request) { - if m := "GET"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - fmt.Fprint(w, `{ - "sha": "s", - "content": "blob content" - }`) - }) - - blob, _, err := client.Git.GetBlob(context.Background(), "o", "r", "s") - if err != nil { - t.Errorf("Git.GetBlob returned error: %v", err) - } - - want := Blob{ - SHA: String("s"), - Content: String("blob content"), - } - - if !reflect.DeepEqual(*blob, want) { - t.Errorf("Blob.Get returned %+v, want %+v", *blob, want) - } -} - -func TestGitService_GetBlob_invalidOwner(t *testing.T) { - _, _, err := client.Git.GetBlob(context.Background(), "%", "%", "%") - testURLParseError(t, err) -} - -func TestGitService_CreateBlob(t *testing.T) { - setup() - defer teardown() - - input := &Blob{ - SHA: String("s"), - Content: String("blob content"), - Encoding: String("utf-8"), - Size: Int(12), - } - - mux.HandleFunc("/repos/o/r/git/blobs", func(w http.ResponseWriter, r *http.Request) { - v := new(Blob) - json.NewDecoder(r.Body).Decode(v) - - if m := "POST"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - - want := input - if !reflect.DeepEqual(v, want) { - t.Errorf("Git.CreateBlob request body: %+v, want %+v", v, want) - } - - fmt.Fprint(w, `{ - "sha": "s", - "content": "blob content", - "encoding": "utf-8", - "size": 12 - }`) - }) - - blob, _, err := client.Git.CreateBlob(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Git.CreateBlob returned error: %v", err) - } - - want := input - - if !reflect.DeepEqual(*blob, *want) { - t.Errorf("Git.CreateBlob returned %+v, want %+v", *blob, *want) - } -} - -func TestGitService_CreateBlob_invalidOwner(t *testing.T) { - _, _, err := client.Git.CreateBlob(context.Background(), "%", "%", &Blob{}) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/git_commits.go b/vendor/github.com/google/go-github/github/git_commits.go index 3c49a8a29..1eb48a8e2 100644 --- a/vendor/github.com/google/go-github/github/git_commits.go +++ b/vendor/github.com/google/go-github/github/git_commits.go @@ -31,6 +31,7 @@ type Commit struct { HTMLURL *string `json:"html_url,omitempty"` URL *string `json:"url,omitempty"` Verification *SignatureVerification `json:"verification,omitempty"` + NodeID *string `json:"node_id,omitempty"` // CommentCount is the number of GitHub comments on the commit. This // is only populated for requests that fetch GitHub data like @@ -67,7 +68,7 @@ func (s *GitService) GetCommit(ctx context.Context, owner string, repo string, s return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeGitSigningPreview) c := new(Commit) diff --git a/vendor/github.com/google/go-github/github/git_commits_test.go b/vendor/github.com/google/go-github/github/git_commits_test.go deleted file mode 100644 index cd392329e..000000000 --- a/vendor/github.com/google/go-github/github/git_commits_test.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGitService_GetCommit(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/commits/s", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - fmt.Fprint(w, `{"sha":"s","message":"m","author":{"name":"n"}}`) - }) - - commit, _, err := client.Git.GetCommit(context.Background(), "o", "r", "s") - if err != nil { - t.Errorf("Git.GetCommit returned error: %v", err) - } - - want := &Commit{SHA: String("s"), Message: String("m"), Author: &CommitAuthor{Name: String("n")}} - if !reflect.DeepEqual(commit, want) { - t.Errorf("Git.GetCommit returned %+v, want %+v", commit, want) - } -} - -func TestGitService_GetCommit_invalidOwner(t *testing.T) { - _, _, err := client.Git.GetCommit(context.Background(), "%", "%", "%") - testURLParseError(t, err) -} - -func TestGitService_CreateCommit(t *testing.T) { - setup() - defer teardown() - - input := &Commit{ - Message: String("m"), - Tree: &Tree{SHA: String("t")}, - Parents: []Commit{{SHA: String("p")}}, - } - - mux.HandleFunc("/repos/o/r/git/commits", func(w http.ResponseWriter, r *http.Request) { - v := new(createCommit) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - - want := &createCommit{ - Message: input.Message, - Tree: String("t"), - Parents: []string{"p"}, - } - if !reflect.DeepEqual(v, want) { - t.Errorf("Request body = %+v, want %+v", v, want) - } - fmt.Fprint(w, `{"sha":"s"}`) - }) - - commit, _, err := client.Git.CreateCommit(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Git.CreateCommit returned error: %v", err) - } - - want := &Commit{SHA: String("s")} - if !reflect.DeepEqual(commit, want) { - t.Errorf("Git.CreateCommit returned %+v, want %+v", commit, want) - } -} - -func TestGitService_CreateCommit_invalidOwner(t *testing.T) { - _, _, err := client.Git.CreateCommit(context.Background(), "%", "%", &Commit{}) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/git_refs.go b/vendor/github.com/google/go-github/github/git_refs.go index e78fdc6c0..3b2ced233 100644 --- a/vendor/github.com/google/go-github/github/git_refs.go +++ b/vendor/github.com/google/go-github/github/git_refs.go @@ -18,6 +18,7 @@ type Reference struct { Ref *string `json:"ref"` URL *string `json:"url"` Object *GitObject `json:"object"` + NodeID *string `json:"node_id,omitempty"` } func (r Reference) String() string { diff --git a/vendor/github.com/google/go-github/github/git_refs_test.go b/vendor/github.com/google/go-github/github/git_refs_test.go deleted file mode 100644 index 62025bf44..000000000 --- a/vendor/github.com/google/go-github/github/git_refs_test.go +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGitService_GetRef_singleRef(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "ref": "refs/heads/b", - "url": "https://api.github.com/repos/o/r/git/refs/heads/b", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }`) - }) - - ref, _, err := client.Git.GetRef(context.Background(), "o", "r", "refs/heads/b") - if err != nil { - t.Fatalf("Git.GetRef returned error: %v", err) - } - - want := &Reference{ - Ref: String("refs/heads/b"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/b"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - } - if !reflect.DeepEqual(ref, want) { - t.Errorf("Git.GetRef returned %+v, want %+v", ref, want) - } - - // without 'refs/' prefix - if _, _, err := client.Git.GetRef(context.Background(), "o", "r", "heads/b"); err != nil { - t.Errorf("Git.GetRef returned error: %v", err) - } -} - -func TestGitService_GetRef_multipleRefs(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "ref": "refs/heads/booger", - "url": "https://api.github.com/repos/o/r/git/refs/heads/booger", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }, - { - "ref": "refs/heads/bandsaw", - "url": "https://api.github.com/repos/o/r/git/refs/heads/bandsaw", - "object": { - "type": "commit", - "sha": "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac", - "url": "https://api.github.com/repos/o/r/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac" - } - } - ] - `) - }) - - _, _, err := client.Git.GetRef(context.Background(), "o", "r", "refs/heads/b") - want := "no exact match found for this ref" - if err.Error() != want { - t.Errorf("Git.GetRef returned %+v, want %+v", err, want) - } - -} - -func TestGitService_GetRefs_singleRef(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - { - "ref": "refs/heads/b", - "url": "https://api.github.com/repos/o/r/git/refs/heads/b", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }`) - }) - - refs, _, err := client.Git.GetRefs(context.Background(), "o", "r", "refs/heads/b") - if err != nil { - t.Fatalf("Git.GetRefs returned error: %v", err) - } - - ref := refs[0] - want := &Reference{ - Ref: String("refs/heads/b"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/b"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - } - if !reflect.DeepEqual(ref, want) { - t.Errorf("Git.GetRefs returned %+v, want %+v", ref, want) - } - - // without 'refs/' prefix - if _, _, err := client.Git.GetRefs(context.Background(), "o", "r", "heads/b"); err != nil { - t.Errorf("Git.GetRefs returned error: %v", err) - } -} - -func TestGitService_GetRefs_multipleRefs(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "ref": "refs/heads/booger", - "url": "https://api.github.com/repos/o/r/git/refs/heads/booger", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }, - { - "ref": "refs/heads/bandsaw", - "url": "https://api.github.com/repos/o/r/git/refs/heads/bandsaw", - "object": { - "type": "commit", - "sha": "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac", - "url": "https://api.github.com/repos/o/r/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac" - } - } - ] - `) - }) - - refs, _, err := client.Git.GetRefs(context.Background(), "o", "r", "refs/heads/b") - if err != nil { - t.Errorf("Git.GetRefs returned error: %v", err) - } - - want := &Reference{ - Ref: String("refs/heads/booger"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/booger"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - } - if !reflect.DeepEqual(refs[0], want) { - t.Errorf("Git.GetRefs returned %+v, want %+v", refs[0], want) - } -} - -// TestGitService_GetRefs_noRefs tests for behaviour resulting from an unexpected GH response. This should never actually happen. -func TestGitService_GetRefs_noRefs(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, "[]") - }) - - _, _, err := client.Git.GetRefs(context.Background(), "o", "r", "refs/heads/b") - want := "unexpected response from GitHub API: an array of refs with length 0" - if err.Error() != want { - t.Errorf("Git.GetRefs returned %+v, want %+v", err, want) - } - -} - -func TestGitService_ListRefs(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, ` - [ - { - "ref": "refs/heads/branchA", - "url": "https://api.github.com/repos/o/r/git/refs/heads/branchA", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }, - { - "ref": "refs/heads/branchB", - "url": "https://api.github.com/repos/o/r/git/refs/heads/branchB", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - } - ]`) - }) - - refs, _, err := client.Git.ListRefs(context.Background(), "o", "r", nil) - if err != nil { - t.Errorf("Git.ListRefs returned error: %v", err) - } - - want := []*Reference{ - { - Ref: String("refs/heads/branchA"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/branchA"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - }, - { - Ref: String("refs/heads/branchB"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/branchB"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - }, - } - if !reflect.DeepEqual(refs, want) { - t.Errorf("Git.ListRefs returned %+v, want %+v", refs, want) - } -} - -func TestGitService_ListRefs_options(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/t", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"ref": "r"}]`) - }) - - opt := &ReferenceListOptions{Type: "t", ListOptions: ListOptions{Page: 2}} - refs, _, err := client.Git.ListRefs(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Git.ListRefs returned error: %v", err) - } - - want := []*Reference{{Ref: String("r")}} - if !reflect.DeepEqual(refs, want) { - t.Errorf("Git.ListRefs returned %+v, want %+v", refs, want) - } -} - -func TestGitService_CreateRef(t *testing.T) { - setup() - defer teardown() - - args := &createRefRequest{ - Ref: String("refs/heads/b"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - } - - mux.HandleFunc("/repos/o/r/git/refs", func(w http.ResponseWriter, r *http.Request) { - v := new(createRefRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, args) { - t.Errorf("Request body = %+v, want %+v", v, args) - } - fmt.Fprint(w, ` - { - "ref": "refs/heads/b", - "url": "https://api.github.com/repos/o/r/git/refs/heads/b", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }`) - }) - - ref, _, err := client.Git.CreateRef(context.Background(), "o", "r", &Reference{ - Ref: String("refs/heads/b"), - Object: &GitObject{ - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - }) - if err != nil { - t.Errorf("Git.CreateRef returned error: %v", err) - } - - want := &Reference{ - Ref: String("refs/heads/b"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/b"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - } - if !reflect.DeepEqual(ref, want) { - t.Errorf("Git.CreateRef returned %+v, want %+v", ref, want) - } - - // without 'refs/' prefix - _, _, err = client.Git.CreateRef(context.Background(), "o", "r", &Reference{ - Ref: String("heads/b"), - Object: &GitObject{ - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - }) - if err != nil { - t.Errorf("Git.CreateRef returned error: %v", err) - } -} - -func TestGitService_UpdateRef(t *testing.T) { - setup() - defer teardown() - - args := &updateRefRequest{ - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - Force: Bool(true), - } - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - v := new(updateRefRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, args) { - t.Errorf("Request body = %+v, want %+v", v, args) - } - fmt.Fprint(w, ` - { - "ref": "refs/heads/b", - "url": "https://api.github.com/repos/o/r/git/refs/heads/b", - "object": { - "type": "commit", - "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", - "url": "https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" - } - }`) - }) - - ref, _, err := client.Git.UpdateRef(context.Background(), "o", "r", &Reference{ - Ref: String("refs/heads/b"), - Object: &GitObject{SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd")}, - }, true) - if err != nil { - t.Errorf("Git.UpdateRef returned error: %v", err) - } - - want := &Reference{ - Ref: String("refs/heads/b"), - URL: String("https://api.github.com/repos/o/r/git/refs/heads/b"), - Object: &GitObject{ - Type: String("commit"), - SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd"), - URL: String("https://api.github.com/repos/o/r/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"), - }, - } - if !reflect.DeepEqual(ref, want) { - t.Errorf("Git.UpdateRef returned %+v, want %+v", ref, want) - } - - // without 'refs/' prefix - _, _, err = client.Git.UpdateRef(context.Background(), "o", "r", &Reference{ - Ref: String("heads/b"), - Object: &GitObject{SHA: String("aa218f56b14c9653891f9e74264a383fa43fefbd")}, - }, true) - if err != nil { - t.Errorf("Git.UpdateRef returned error: %v", err) - } -} - -func TestGitService_DeleteRef(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/refs/heads/b", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Git.DeleteRef(context.Background(), "o", "r", "refs/heads/b") - if err != nil { - t.Errorf("Git.DeleteRef returned error: %v", err) - } - - // without 'refs/' prefix - if _, err := client.Git.DeleteRef(context.Background(), "o", "r", "heads/b"); err != nil { - t.Errorf("Git.DeleteRef returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/git_tags.go b/vendor/github.com/google/go-github/github/git_tags.go index 08df3d3d1..90398b380 100644 --- a/vendor/github.com/google/go-github/github/git_tags.go +++ b/vendor/github.com/google/go-github/github/git_tags.go @@ -19,6 +19,7 @@ type Tag struct { Tagger *CommitAuthor `json:"tagger,omitempty"` Object *GitObject `json:"object,omitempty"` Verification *SignatureVerification `json:"verification,omitempty"` + NodeID *string `json:"node_id,omitempty"` } // createTagRequest represents the body of a CreateTag request. This is mostly @@ -42,7 +43,7 @@ func (s *GitService) GetTag(ctx context.Context, owner string, repo string, sha return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. + // TODO: remove custom Accept headers when APIs fully launch. req.Header.Set("Accept", mediaTypeGitSigningPreview) tag := new(Tag) diff --git a/vendor/github.com/google/go-github/github/git_tags_test.go b/vendor/github.com/google/go-github/github/git_tags_test.go deleted file mode 100644 index 7031fe8a4..000000000 --- a/vendor/github.com/google/go-github/github/git_tags_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGitService_GetTag(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/tags/s", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeGitSigningPreview) - - fmt.Fprint(w, `{"tag": "t"}`) - }) - - tag, _, err := client.Git.GetTag(context.Background(), "o", "r", "s") - if err != nil { - t.Errorf("Git.GetTag returned error: %v", err) - } - - want := &Tag{Tag: String("t")} - if !reflect.DeepEqual(tag, want) { - t.Errorf("Git.GetTag returned %+v, want %+v", tag, want) - } -} - -func TestGitService_CreateTag(t *testing.T) { - setup() - defer teardown() - - input := &createTagRequest{Tag: String("t"), Object: String("s")} - - mux.HandleFunc("/repos/o/r/git/tags", func(w http.ResponseWriter, r *http.Request) { - v := new(createTagRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"tag": "t"}`) - }) - - tag, _, err := client.Git.CreateTag(context.Background(), "o", "r", &Tag{ - Tag: input.Tag, - Object: &GitObject{SHA: input.Object}, - }) - if err != nil { - t.Errorf("Git.CreateTag returned error: %v", err) - } - - want := &Tag{Tag: String("t")} - if !reflect.DeepEqual(tag, want) { - t.Errorf("Git.GetTag returned %+v, want %+v", tag, want) - } -} diff --git a/vendor/github.com/google/go-github/github/git_trees.go b/vendor/github.com/google/go-github/github/git_trees.go index 4d6809a88..4bc291354 100644 --- a/vendor/github.com/google/go-github/github/git_trees.go +++ b/vendor/github.com/google/go-github/github/git_trees.go @@ -14,6 +14,12 @@ import ( type Tree struct { SHA *string `json:"sha,omitempty"` Entries []TreeEntry `json:"tree,omitempty"` + + // Truncated is true if the number of items in the tree + // exceeded GitHub's maximum limit and the Entries were truncated + // in the response. Only populated for requests that fetch + // trees like Git.GetTree. + Truncated *bool `json:"truncated,omitempty"` } func (t Tree) String() string { diff --git a/vendor/github.com/google/go-github/github/git_trees_test.go b/vendor/github.com/google/go-github/github/git_trees_test.go deleted file mode 100644 index 29728eee3..000000000 --- a/vendor/github.com/google/go-github/github/git_trees_test.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGitService_GetTree(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/git/trees/s", func(w http.ResponseWriter, r *http.Request) { - if m := "GET"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - fmt.Fprint(w, `{ - "sha": "s", - "tree": [ { "type": "blob" } ] - }`) - }) - - tree, _, err := client.Git.GetTree(context.Background(), "o", "r", "s", true) - if err != nil { - t.Errorf("Git.GetTree returned error: %v", err) - } - - want := Tree{ - SHA: String("s"), - Entries: []TreeEntry{ - { - Type: String("blob"), - }, - }, - } - if !reflect.DeepEqual(*tree, want) { - t.Errorf("Tree.Get returned %+v, want %+v", *tree, want) - } -} - -func TestGitService_GetTree_invalidOwner(t *testing.T) { - _, _, err := client.Git.GetTree(context.Background(), "%", "%", "%", false) - testURLParseError(t, err) -} - -func TestGitService_CreateTree(t *testing.T) { - setup() - defer teardown() - - input := []TreeEntry{ - { - Path: String("file.rb"), - Mode: String("100644"), - Type: String("blob"), - SHA: String("7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"), - }, - } - - mux.HandleFunc("/repos/o/r/git/trees", func(w http.ResponseWriter, r *http.Request) { - v := new(createTree) - json.NewDecoder(r.Body).Decode(v) - - if m := "POST"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - - want := &createTree{ - BaseTree: "b", - Entries: input, - } - if !reflect.DeepEqual(v, want) { - t.Errorf("Git.CreateTree request body: %+v, want %+v", v, want) - } - - fmt.Fprint(w, `{ - "sha": "cd8274d15fa3ae2ab983129fb037999f264ba9a7", - "tree": [ - { - "path": "file.rb", - "mode": "100644", - "type": "blob", - "size": 132, - "sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b" - } - ] - }`) - }) - - tree, _, err := client.Git.CreateTree(context.Background(), "o", "r", "b", input) - if err != nil { - t.Errorf("Git.CreateTree returned error: %v", err) - } - - want := Tree{ - String("cd8274d15fa3ae2ab983129fb037999f264ba9a7"), - []TreeEntry{ - { - Path: String("file.rb"), - Mode: String("100644"), - Type: String("blob"), - Size: Int(132), - SHA: String("7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"), - }, - }, - } - - if !reflect.DeepEqual(*tree, want) { - t.Errorf("Git.CreateTree returned %+v, want %+v", *tree, want) - } -} - -func TestGitService_CreateTree_Content(t *testing.T) { - setup() - defer teardown() - - input := []TreeEntry{ - { - Path: String("content.md"), - Mode: String("100644"), - Content: String("file content"), - }, - } - - mux.HandleFunc("/repos/o/r/git/trees", func(w http.ResponseWriter, r *http.Request) { - v := new(createTree) - json.NewDecoder(r.Body).Decode(v) - - if m := "POST"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - - want := &createTree{ - BaseTree: "b", - Entries: input, - } - if !reflect.DeepEqual(v, want) { - t.Errorf("Git.CreateTree request body: %+v, want %+v", v, want) - } - - fmt.Fprint(w, `{ - "sha": "5c6780ad2c68743383b740fd1dab6f6a33202b11", - "url": "https://api.github.com/repos/o/r/git/trees/5c6780ad2c68743383b740fd1dab6f6a33202b11", - "tree": [ - { - "mode": "100644", - "type": "blob", - "sha": "aad8feacf6f8063150476a7b2bd9770f2794c08b", - "path": "content.md", - "size": 12, - "url": "https://api.github.com/repos/o/r/git/blobs/aad8feacf6f8063150476a7b2bd9770f2794c08b" - } - ] - }`) - }) - - tree, _, err := client.Git.CreateTree(context.Background(), "o", "r", "b", input) - if err != nil { - t.Errorf("Git.CreateTree returned error: %v", err) - } - - want := Tree{ - String("5c6780ad2c68743383b740fd1dab6f6a33202b11"), - []TreeEntry{ - { - Path: String("content.md"), - Mode: String("100644"), - Type: String("blob"), - Size: Int(12), - SHA: String("aad8feacf6f8063150476a7b2bd9770f2794c08b"), - URL: String("https://api.github.com/repos/o/r/git/blobs/aad8feacf6f8063150476a7b2bd9770f2794c08b"), - }, - }, - } - - if !reflect.DeepEqual(*tree, want) { - t.Errorf("Git.CreateTree returned %+v, want %+v", *tree, want) - } -} - -func TestGitService_CreateTree_invalidOwner(t *testing.T) { - _, _, err := client.Git.CreateTree(context.Background(), "%", "%", "", nil) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/github-accessors.go b/vendor/github.com/google/go-github/github/github-accessors.go index 92cd1b0bb..888273d7e 100644 --- a/vendor/github.com/google/go-github/github/github-accessors.go +++ b/vendor/github.com/google/go-github/github/github-accessors.go @@ -28,6 +28,86 @@ func (a *AdminEnforcement) GetURL() string { return *a.URL } +// GetComments returns the Comments field. +func (a *AdminStats) GetComments() *CommentStats { + if a == nil { + return nil + } + return a.Comments +} + +// GetGists returns the Gists field. +func (a *AdminStats) GetGists() *GistStats { + if a == nil { + return nil + } + return a.Gists +} + +// GetHooks returns the Hooks field. +func (a *AdminStats) GetHooks() *HookStats { + if a == nil { + return nil + } + return a.Hooks +} + +// GetIssues returns the Issues field. +func (a *AdminStats) GetIssues() *IssueStats { + if a == nil { + return nil + } + return a.Issues +} + +// GetMilestones returns the Milestones field. +func (a *AdminStats) GetMilestones() *MilestoneStats { + if a == nil { + return nil + } + return a.Milestones +} + +// GetOrgs returns the Orgs field. +func (a *AdminStats) GetOrgs() *OrgStats { + if a == nil { + return nil + } + return a.Orgs +} + +// GetPages returns the Pages field. +func (a *AdminStats) GetPages() *PageStats { + if a == nil { + return nil + } + return a.Pages +} + +// GetPulls returns the Pulls field. +func (a *AdminStats) GetPulls() *PullStats { + if a == nil { + return nil + } + return a.Pulls +} + +// GetRepos returns the Repos field. +func (a *AdminStats) GetRepos() *RepoStats { + if a == nil { + return nil + } + return a.Repos +} + +// GetUsers returns the Users field. +func (a *AdminStats) GetUsers() *UserStats { + if a == nil { + return nil + } + return a.Users +} + // GetVerifiablePasswordAuthentication returns the VerifiablePasswordAuthentication field if it's non-nil, zero value otherwise. func (a *APIMeta) GetVerifiablePasswordAuthentication() bool { if a == nil || a.VerifiablePasswordAuthentication == nil { @@ -69,7 +149,7 @@ func (a *App) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *App) GetID() int { +func (a *App) GetID() int64 { if a == nil || a.ID == nil { return 0 } @@ -84,6 +164,22 @@ func (a *App) GetName() string { return *a.Name } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (a *App) GetNodeID() string { + if a == nil || a.NodeID == nil { + return "" + } + return *a.NodeID +} + +// GetOwner returns the Owner field. +func (a *App) GetOwner() *User { + if a == nil { + return nil + } + return a.Owner +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (a *App) GetUpdatedAt() time.Time { if a == nil || a.UpdatedAt == nil { @@ -92,6 +188,14 @@ func (a *App) GetUpdatedAt() time.Time { return *a.UpdatedAt } +// GetApp returns the App field. +func (a *Authorization) GetApp() *AuthorizationApp { + if a == nil { + return nil + } + return a.App +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (a *Authorization) GetCreatedAt() Timestamp { if a == nil || a.CreatedAt == nil { @@ -117,7 +221,7 @@ func (a *Authorization) GetHashedToken() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (a *Authorization) GetID() int { +func (a *Authorization) GetID() int64 { if a == nil || a.ID == nil { return 0 } @@ -172,6 +276,14 @@ func (a *Authorization) GetURL() string { return *a.URL } +// GetUser returns the User field. +func (a *Authorization) GetUser() *User { + if a == nil { + return nil + } + return a.User +} + // GetClientID returns the ClientID field if it's non-nil, zero value otherwise. func (a *AuthorizationApp) GetClientID() string { if a == nil || a.ClientID == nil { @@ -260,6 +372,22 @@ func (a *AuthorizationUpdateRequest) GetNoteURL() string { return *a.NoteURL } +// GetAppID returns the AppID field if it's non-nil, zero value otherwise. +func (a *AutoTriggerCheck) GetAppID() int64 { + if a == nil || a.AppID == nil { + return 0 + } + return *a.AppID +} + +// GetSetting returns the Setting field if it's non-nil, zero value otherwise. +func (a *AutoTriggerCheck) GetSetting() bool { + if a == nil || a.Setting == nil { + return false + } + return *a.Setting +} + // GetContent returns the Content field if it's non-nil, zero value otherwise. func (b *Blob) GetContent() string { if b == nil || b.Content == nil { @@ -276,6 +404,14 @@ func (b *Blob) GetEncoding() string { return *b.Encoding } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (b *Blob) GetNodeID() string { + if b == nil || b.NodeID == nil { + return "" + } + return *b.NodeID +} + // GetSHA returns the SHA field if it's non-nil, zero value otherwise. func (b *Blob) GetSHA() string { if b == nil || b.SHA == nil { @@ -300,6 +436,14 @@ func (b *Blob) GetURL() string { return *b.URL } +// GetCommit returns the Commit field. +func (b *Branch) GetCommit() *RepositoryCommit { + if b == nil { + return nil + } + return b.Commit +} + // GetName returns the Name field if it's non-nil, zero value otherwise. func (b *Branch) GetName() string { if b == nil || b.Name == nil { @@ -316,3376 +460,5992 @@ func (b *Branch) GetProtected() bool { return *b.Protected } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetBody() string { - if c == nil || c.Body == nil { - return "" +// GetApp returns the App field. +func (c *CheckRun) GetApp() *App { + if c == nil { + return nil } - return *c.Body + return c.App } -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetKey() string { - if c == nil || c.Key == nil { +// GetCheckSuite returns the CheckSuite field. +func (c *CheckRun) GetCheckSuite() *CheckSuite { + if c == nil { + return nil + } + return c.CheckSuite +} + +// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetCompletedAt() Timestamp { + if c == nil || c.CompletedAt == nil { + return Timestamp{} + } + return *c.CompletedAt +} + +// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetConclusion() string { + if c == nil || c.Conclusion == nil { return "" } - return *c.Key + return *c.Conclusion } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetName() string { - if c == nil || c.Name == nil { +// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetExternalID() string { + if c == nil || c.ExternalID == nil { return "" } - return *c.Name + return *c.ExternalID } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CodeOfConduct) GetURL() string { - if c == nil || c.URL == nil { +// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetHeadSHA() string { + if c == nil || c.HeadSHA == nil { return "" } - return *c.URL + return *c.HeadSHA } // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetHTMLURL() string { +func (c *CheckRun) GetHTMLURL() string { if c == nil || c.HTMLURL == nil { return "" } return *c.HTMLURL } +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetID() int64 { + if c == nil || c.ID == nil { + return 0 + } + return *c.ID +} + // GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetName() string { +func (c *CheckRun) GetName() string { if c == nil || c.Name == nil { return "" } return *c.Name } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetPath() string { - if c == nil || c.Path == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetNodeID() string { + if c == nil || c.NodeID == nil { return "" } - return *c.Path + return *c.NodeID } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CodeResult) GetSHA() string { - if c == nil || c.SHA == nil { - return "" +// GetOutput returns the Output field. +func (c *CheckRun) GetOutput() *CheckRunOutput { + if c == nil { + return nil } - return *c.SHA + return c.Output } -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (c *CodeSearchResult) GetIncompleteResults() bool { - if c == nil || c.IncompleteResults == nil { - return false +// GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetStartedAt() Timestamp { + if c == nil || c.StartedAt == nil { + return Timestamp{} } - return *c.IncompleteResults + return *c.StartedAt } -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *CodeSearchResult) GetTotal() int { - if c == nil || c.Total == nil { - return 0 +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetStatus() string { + if c == nil || c.Status == nil { + return "" } - return *c.Total + return *c.Status } -// GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetCommitURL() string { - if c == nil || c.CommitURL == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CheckRun) GetURL() string { + if c == nil || c.URL == nil { return "" } - return *c.CommitURL + return *c.URL } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetName() string { - if c == nil || c.Name == nil { +// GetAnnotationLevel returns the AnnotationLevel field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetAnnotationLevel() string { + if c == nil || c.AnnotationLevel == nil { return "" } - return *c.Name + return *c.AnnotationLevel } -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetRepositoryURL() string { - if c == nil || c.RepositoryURL == nil { +// GetBlobHRef returns the BlobHRef field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetBlobHRef() string { + if c == nil || c.BlobHRef == nil { return "" } - return *c.RepositoryURL + return *c.BlobHRef } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetSHA() string { - if c == nil || c.SHA == nil { +// GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetEndLine() int { + if c == nil || c.EndLine == nil { + return 0 + } + return *c.EndLine +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetMessage() string { + if c == nil || c.Message == nil { return "" } - return *c.SHA + return *c.Message } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetState() string { - if c == nil || c.State == nil { +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetPath() string { + if c == nil || c.Path == nil { return "" } - return *c.State + return *c.Path } -// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. -func (c *CombinedStatus) GetTotalCount() int { - if c == nil || c.TotalCount == nil { - return 0 +// GetRawDetails returns the RawDetails field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetRawDetails() string { + if c == nil || c.RawDetails == nil { + return "" } - return *c.TotalCount + return *c.RawDetails } -// GetTotalCommitComments returns the TotalCommitComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalCommitComments() int { - if c == nil || c.TotalCommitComments == nil { +// GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetStartLine() int { + if c == nil || c.StartLine == nil { return 0 } - return *c.TotalCommitComments + return *c.StartLine } -// GetTotalGistComments returns the TotalGistComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalGistComments() int { - if c == nil || c.TotalGistComments == nil { - return 0 +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetTitle() string { + if c == nil || c.Title == nil { + return "" } - return *c.TotalGistComments + return *c.Title } -// GetTotalIssueComments returns the TotalIssueComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalIssueComments() int { - if c == nil || c.TotalIssueComments == nil { - return 0 +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (c *CheckRunEvent) GetAction() string { + if c == nil || c.Action == nil { + return "" } - return *c.TotalIssueComments + return *c.Action } -// GetTotalPullRequestComments returns the TotalPullRequestComments field if it's non-nil, zero value otherwise. -func (c *CommentStats) GetTotalPullRequestComments() int { - if c == nil || c.TotalPullRequestComments == nil { - return 0 +// GetCheckRun returns the CheckRun field. +func (c *CheckRunEvent) GetCheckRun() *CheckRun { + if c == nil { + return nil } - return *c.TotalPullRequestComments + return c.CheckRun } -// GetCommentCount returns the CommentCount field if it's non-nil, zero value otherwise. -func (c *Commit) GetCommentCount() int { - if c == nil || c.CommentCount == nil { - return 0 +// GetInstallation returns the Installation field. +func (c *CheckRunEvent) GetInstallation() *Installation { + if c == nil { + return nil } - return *c.CommentCount + return c.Installation } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *Commit) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" +// GetOrg returns the Org field. +func (c *CheckRunEvent) GetOrg() *Organization { + if c == nil { + return nil } - return *c.HTMLURL + return c.Org } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (c *Commit) GetMessage() string { - if c == nil || c.Message == nil { +// GetRepo returns the Repo field. +func (c *CheckRunEvent) GetRepo() *Repository { + if c == nil { + return nil + } + return c.Repo +} + +// GetSender returns the Sender field. +func (c *CheckRunEvent) GetSender() *User { + if c == nil { + return nil + } + return c.Sender +} + +// GetAlt returns the Alt field if it's non-nil, zero value otherwise. +func (c *CheckRunImage) GetAlt() string { + if c == nil || c.Alt == nil { return "" } - return *c.Message + return *c.Alt } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *Commit) GetSHA() string { - if c == nil || c.SHA == nil { +// GetCaption returns the Caption field if it's non-nil, zero value otherwise. +func (c *CheckRunImage) GetCaption() string { + if c == nil || c.Caption == nil { return "" } - return *c.SHA + return *c.Caption } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *Commit) GetURL() string { - if c == nil || c.URL == nil { +// GetImageURL returns the ImageURL field if it's non-nil, zero value otherwise. +func (c *CheckRunImage) GetImageURL() string { + if c == nil || c.ImageURL == nil { return "" } - return *c.URL + return *c.ImageURL } -// GetDate returns the Date field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetDate() time.Time { - if c == nil || c.Date == nil { - return time.Time{} +// GetAnnotationsCount returns the AnnotationsCount field if it's non-nil, zero value otherwise. +func (c *CheckRunOutput) GetAnnotationsCount() int { + if c == nil || c.AnnotationsCount == nil { + return 0 } - return *c.Date + return *c.AnnotationsCount } -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetEmail() string { - if c == nil || c.Email == nil { +// GetAnnotationsURL returns the AnnotationsURL field if it's non-nil, zero value otherwise. +func (c *CheckRunOutput) GetAnnotationsURL() string { + if c == nil || c.AnnotationsURL == nil { return "" } - return *c.Email + return *c.AnnotationsURL } -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetLogin() string { - if c == nil || c.Login == nil { +// GetSummary returns the Summary field if it's non-nil, zero value otherwise. +func (c *CheckRunOutput) GetSummary() string { + if c == nil || c.Summary == nil { return "" } - return *c.Login + return *c.Summary } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (c *CommitAuthor) GetName() string { - if c == nil || c.Name == nil { +// GetText returns the Text field if it's non-nil, zero value otherwise. +func (c *CheckRunOutput) GetText() string { + if c == nil || c.Text == nil { return "" } - return *c.Name + return *c.Text } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (c *CommitCommentEvent) GetAction() string { - if c == nil || c.Action == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (c *CheckRunOutput) GetTitle() string { + if c == nil || c.Title == nil { return "" } - return *c.Action + return *c.Title } -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetAdditions() int { - if c == nil || c.Additions == nil { - return 0 +// GetAfterSHA returns the AfterSHA field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetAfterSHA() string { + if c == nil || c.AfterSHA == nil { + return "" } - return *c.Additions + return *c.AfterSHA } -// GetBlobURL returns the BlobURL field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetBlobURL() string { - if c == nil || c.BlobURL == nil { - return "" +// GetApp returns the App field. +func (c *CheckSuite) GetApp() *App { + if c == nil { + return nil } - return *c.BlobURL + return c.App } -// GetChanges returns the Changes field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetChanges() int { - if c == nil || c.Changes == nil { - return 0 +// GetBeforeSHA returns the BeforeSHA field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetBeforeSHA() string { + if c == nil || c.BeforeSHA == nil { + return "" } - return *c.Changes + return *c.BeforeSHA } -// GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetContentsURL() string { - if c == nil || c.ContentsURL == nil { +// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetConclusion() string { + if c == nil || c.Conclusion == nil { return "" } - return *c.ContentsURL + return *c.Conclusion } -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetDeletions() int { - if c == nil || c.Deletions == nil { - return 0 +// GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetHeadBranch() string { + if c == nil || c.HeadBranch == nil { + return "" } - return *c.Deletions + return *c.HeadBranch } -// GetFilename returns the Filename field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetFilename() string { - if c == nil || c.Filename == nil { +// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetHeadSHA() string { + if c == nil || c.HeadSHA == nil { return "" } - return *c.Filename + return *c.HeadSHA } -// GetPatch returns the Patch field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetPatch() string { - if c == nil || c.Patch == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetID() int64 { + if c == nil || c.ID == nil { + return 0 } - return *c.Patch + return *c.ID } -// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetRawURL() string { - if c == nil || c.RawURL == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetNodeID() string { + if c == nil || c.NodeID == nil { return "" } - return *c.RawURL + return *c.NodeID } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetSHA() string { - if c == nil || c.SHA == nil { - return "" +// GetRepository returns the Repository field. +func (c *CheckSuite) GetRepository() *Repository { + if c == nil { + return nil } - return *c.SHA + return c.Repository } // GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CommitFile) GetStatus() string { +func (c *CheckSuite) GetStatus() string { if c == nil || c.Status == nil { return "" } return *c.Status } -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetCommentsURL() string { - if c == nil || c.CommentsURL == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CheckSuite) GetURL() string { + if c == nil || c.URL == nil { return "" } - return *c.CommentsURL + return *c.URL } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (c *CheckSuiteEvent) GetAction() string { + if c == nil || c.Action == nil { return "" } - return *c.HTMLURL + return *c.Action } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetSHA() string { - if c == nil || c.SHA == nil { - return "" +// GetCheckSuite returns the CheckSuite field. +func (c *CheckSuiteEvent) GetCheckSuite() *CheckSuite { + if c == nil { + return nil } - return *c.SHA + return c.CheckSuite } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CommitResult) GetURL() string { - if c == nil || c.URL == nil { - return "" +// GetInstallation returns the Installation field. +func (c *CheckSuiteEvent) GetInstallation() *Installation { + if c == nil { + return nil } - return *c.URL + return c.Installation } -// GetAheadBy returns the AheadBy field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetAheadBy() int { - if c == nil || c.AheadBy == nil { - return 0 +// GetOrg returns the Org field. +func (c *CheckSuiteEvent) GetOrg() *Organization { + if c == nil { + return nil } - return *c.AheadBy + return c.Org } -// GetBehindBy returns the BehindBy field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetBehindBy() int { - if c == nil || c.BehindBy == nil { - return 0 +// GetRepo returns the Repo field. +func (c *CheckSuiteEvent) GetRepo() *Repository { + if c == nil { + return nil } - return *c.BehindBy + return c.Repo } -// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetDiffURL() string { - if c == nil || c.DiffURL == nil { - return "" +// GetSender returns the Sender field. +func (c *CheckSuiteEvent) GetSender() *User { + if c == nil { + return nil } - return *c.DiffURL + return c.Sender } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" +// GetPreferenceList returns the PreferenceList field. +func (c *CheckSuitePreferenceOptions) GetPreferenceList() *PreferenceList { + if c == nil { + return nil } - return *c.HTMLURL + return c.PreferenceList } -// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetPatchURL() string { - if c == nil || c.PatchURL == nil { - return "" +// GetPreferences returns the Preferences field. +func (c *CheckSuitePreferenceResults) GetPreferences() *PreferenceList { + if c == nil { + return nil } - return *c.PatchURL + return c.Preferences } -// GetPermalinkURL returns the PermalinkURL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetPermalinkURL() string { - if c == nil || c.PermalinkURL == nil { +// GetRepository returns the Repository field. +func (c *CheckSuitePreferenceResults) GetRepository() *Repository { + if c == nil { + return nil + } + return c.Repository +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetBody() string { + if c == nil || c.Body == nil { return "" } - return *c.PermalinkURL + return *c.Body } -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetStatus() string { - if c == nil || c.Status == nil { +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetKey() string { + if c == nil || c.Key == nil { return "" } - return *c.Status + return *c.Key } -// GetTotalCommits returns the TotalCommits field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetTotalCommits() int { - if c == nil || c.TotalCommits == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CodeOfConduct) GetName() string { + if c == nil || c.Name == nil { + return "" } - return *c.TotalCommits + return *c.Name } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *CommitsComparison) GetURL() string { +func (c *CodeOfConduct) GetURL() string { if c == nil || c.URL == nil { return "" } return *c.URL } -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (c *CommitsSearchResult) GetIncompleteResults() bool { - if c == nil || c.IncompleteResults == nil { - return false +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *CodeResult) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" } - return *c.IncompleteResults + return *c.HTMLURL } -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *CommitsSearchResult) GetTotal() int { - if c == nil || c.Total == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CodeResult) GetName() string { + if c == nil || c.Name == nil { + return "" } - return *c.Total + return *c.Name } -// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. -func (c *CommitStats) GetAdditions() int { - if c == nil || c.Additions == nil { - return 0 +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (c *CodeResult) GetPath() string { + if c == nil || c.Path == nil { + return "" } - return *c.Additions + return *c.Path } -// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. -func (c *CommitStats) GetDeletions() int { - if c == nil || c.Deletions == nil { - return 0 +// GetRepository returns the Repository field. +func (c *CodeResult) GetRepository() *Repository { + if c == nil { + return nil } - return *c.Deletions + return c.Repository } -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *CommitStats) GetTotal() int { - if c == nil || c.Total == nil { - return 0 +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (c *CodeResult) GetSHA() string { + if c == nil || c.SHA == nil { + return "" } - return *c.Total + return *c.SHA } -// GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetHealthPercentage() int { - if c == nil || c.HealthPercentage == nil { - return 0 +// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. +func (c *CodeSearchResult) GetIncompleteResults() bool { + if c == nil || c.IncompleteResults == nil { + return false } - return *c.HealthPercentage + return *c.IncompleteResults } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetUpdatedAt() time.Time { - if c == nil || c.UpdatedAt == nil { - return time.Time{} +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (c *CodeSearchResult) GetTotal() int { + if c == nil || c.Total == nil { + return 0 } - return *c.UpdatedAt + return *c.Total } -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetAvatarURL() string { - if c == nil || c.AvatarURL == nil { +// GetCommitURL returns the CommitURL field if it's non-nil, zero value otherwise. +func (c *CombinedStatus) GetCommitURL() string { + if c == nil || c.CommitURL == nil { return "" } - return *c.AvatarURL + return *c.CommitURL } -// GetContributions returns the Contributions field if it's non-nil, zero value otherwise. -func (c *Contributor) GetContributions() int { - if c == nil || c.Contributions == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CombinedStatus) GetName() string { + if c == nil || c.Name == nil { + return "" } - return *c.Contributions + return *c.Name } -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetEventsURL() string { - if c == nil || c.EventsURL == nil { +// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. +func (c *CombinedStatus) GetRepositoryURL() string { + if c == nil || c.RepositoryURL == nil { return "" } - return *c.EventsURL + return *c.RepositoryURL } -// GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetFollowersURL() string { - if c == nil || c.FollowersURL == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (c *CombinedStatus) GetSHA() string { + if c == nil || c.SHA == nil { return "" } - return *c.FollowersURL + return *c.SHA } -// GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetFollowingURL() string { - if c == nil || c.FollowingURL == nil { +// GetState returns the State field if it's non-nil, zero value otherwise. +func (c *CombinedStatus) GetState() string { + if c == nil || c.State == nil { return "" } - return *c.FollowingURL + return *c.State } -// GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetGistsURL() string { - if c == nil || c.GistsURL == nil { - return "" +// GetTotalCount returns the TotalCount field if it's non-nil, zero value otherwise. +func (c *CombinedStatus) GetTotalCount() int { + if c == nil || c.TotalCount == nil { + return 0 } - return *c.GistsURL + return *c.TotalCount } -// GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. -func (c *Contributor) GetGravatarID() string { - if c == nil || c.GravatarID == nil { - return "" +// GetTotalCommitComments returns the TotalCommitComments field if it's non-nil, zero value otherwise. +func (c *CommentStats) GetTotalCommitComments() int { + if c == nil || c.TotalCommitComments == nil { + return 0 } - return *c.GravatarID + return *c.TotalCommitComments } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetHTMLURL() string { - if c == nil || c.HTMLURL == nil { - return "" +// GetTotalGistComments returns the TotalGistComments field if it's non-nil, zero value otherwise. +func (c *CommentStats) GetTotalGistComments() int { + if c == nil || c.TotalGistComments == nil { + return 0 } - return *c.HTMLURL + return *c.TotalGistComments } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (c *Contributor) GetID() int { - if c == nil || c.ID == nil { +// GetTotalIssueComments returns the TotalIssueComments field if it's non-nil, zero value otherwise. +func (c *CommentStats) GetTotalIssueComments() int { + if c == nil || c.TotalIssueComments == nil { return 0 } - return *c.ID + return *c.TotalIssueComments } -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (c *Contributor) GetLogin() string { - if c == nil || c.Login == nil { - return "" +// GetTotalPullRequestComments returns the TotalPullRequestComments field if it's non-nil, zero value otherwise. +func (c *CommentStats) GetTotalPullRequestComments() int { + if c == nil || c.TotalPullRequestComments == nil { + return 0 } - return *c.Login + return *c.TotalPullRequestComments } -// GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetOrganizationsURL() string { - if c == nil || c.OrganizationsURL == nil { - return "" +// GetAuthor returns the Author field. +func (c *Commit) GetAuthor() *CommitAuthor { + if c == nil { + return nil } - return *c.OrganizationsURL + return c.Author } -// GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetReceivedEventsURL() string { - if c == nil || c.ReceivedEventsURL == nil { - return "" +// GetCommentCount returns the CommentCount field if it's non-nil, zero value otherwise. +func (c *Commit) GetCommentCount() int { + if c == nil || c.CommentCount == nil { + return 0 } - return *c.ReceivedEventsURL + return *c.CommentCount } -// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetReposURL() string { - if c == nil || c.ReposURL == nil { - return "" +// GetCommitter returns the Committer field. +func (c *Commit) GetCommitter() *CommitAuthor { + if c == nil { + return nil } - return *c.ReposURL + return c.Committer } -// GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. -func (c *Contributor) GetSiteAdmin() bool { - if c == nil || c.SiteAdmin == nil { - return false +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *Commit) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" } - return *c.SiteAdmin + return *c.HTMLURL } -// GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetStarredURL() string { - if c == nil || c.StarredURL == nil { +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (c *Commit) GetMessage() string { + if c == nil || c.Message == nil { return "" } - return *c.StarredURL + return *c.Message } -// GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetSubscriptionsURL() string { - if c == nil || c.SubscriptionsURL == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (c *Commit) GetNodeID() string { + if c == nil || c.NodeID == nil { return "" } - return *c.SubscriptionsURL + return *c.NodeID } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (c *Contributor) GetType() string { - if c == nil || c.Type == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (c *Commit) GetSHA() string { + if c == nil || c.SHA == nil { return "" } - return *c.Type + return *c.SHA +} + +// GetStats returns the Stats field. +func (c *Commit) GetStats() *CommitStats { + if c == nil { + return nil + } + return c.Stats +} + +// GetTree returns the Tree field. +func (c *Commit) GetTree() *Tree { + if c == nil { + return nil + } + return c.Tree } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (c *Contributor) GetURL() string { +func (c *Commit) GetURL() string { if c == nil || c.URL == nil { return "" } return *c.URL } -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (c *ContributorStats) GetTotal() int { - if c == nil || c.Total == nil { - return 0 +// GetVerification returns the Verification field. +func (c *Commit) GetVerification() *SignatureVerification { + if c == nil { + return nil } - return *c.Total + return c.Verification } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (c *createCommit) GetMessage() string { - if c == nil || c.Message == nil { - return "" +// GetDate returns the Date field if it's non-nil, zero value otherwise. +func (c *CommitAuthor) GetDate() time.Time { + if c == nil || c.Date == nil { + return time.Time{} } - return *c.Message + return *c.Date } -// GetTree returns the Tree field if it's non-nil, zero value otherwise. -func (c *createCommit) GetTree() string { - if c == nil || c.Tree == nil { +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (c *CommitAuthor) GetEmail() string { + if c == nil || c.Email == nil { return "" } - return *c.Tree + return *c.Email } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetDescription() string { - if c == nil || c.Description == nil { +// GetLogin returns the Login field if it's non-nil, zero value otherwise. +func (c *CommitAuthor) GetLogin() string { + if c == nil || c.Login == nil { return "" } - return *c.Description + return *c.Login } -// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetMasterBranch() string { - if c == nil || c.MasterBranch == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *CommitAuthor) GetName() string { + if c == nil || c.Name == nil { return "" } - return *c.MasterBranch + return *c.Name } -// GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetPusherType() string { - if c == nil || c.PusherType == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (c *CommitCommentEvent) GetAction() string { + if c == nil || c.Action == nil { return "" } - return *c.PusherType + return *c.Action } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetRef() string { - if c == nil || c.Ref == nil { - return "" +// GetComment returns the Comment field. +func (c *CommitCommentEvent) GetComment() *RepositoryComment { + if c == nil { + return nil } - return *c.Ref + return c.Comment } -// GetRefType returns the RefType field if it's non-nil, zero value otherwise. -func (c *CreateEvent) GetRefType() string { - if c == nil || c.RefType == nil { - return "" +// GetInstallation returns the Installation field. +func (c *CommitCommentEvent) GetInstallation() *Installation { + if c == nil { + return nil } - return *c.RefType + return c.Installation } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (c *createRefRequest) GetRef() string { - if c == nil || c.Ref == nil { - return "" +// GetRepo returns the Repo field. +func (c *CommitCommentEvent) GetRepo() *Repository { + if c == nil { + return nil } - return *c.Ref + return c.Repo } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (c *createRefRequest) GetSHA() string { - if c == nil || c.SHA == nil { - return "" +// GetSender returns the Sender field. +func (c *CommitCommentEvent) GetSender() *User { + if c == nil { + return nil } - return *c.SHA + return c.Sender } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (c *createTagRequest) GetMessage() string { - if c == nil || c.Message == nil { - return "" +// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetAdditions() int { + if c == nil || c.Additions == nil { + return 0 } - return *c.Message + return *c.Additions } -// GetObject returns the Object field if it's non-nil, zero value otherwise. -func (c *createTagRequest) GetObject() string { - if c == nil || c.Object == nil { +// GetBlobURL returns the BlobURL field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetBlobURL() string { + if c == nil || c.BlobURL == nil { return "" } - return *c.Object + return *c.BlobURL } -// GetTag returns the Tag field if it's non-nil, zero value otherwise. -func (c *createTagRequest) GetTag() string { - if c == nil || c.Tag == nil { - return "" +// GetChanges returns the Changes field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetChanges() int { + if c == nil || c.Changes == nil { + return 0 } - return *c.Tag + return *c.Changes } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (c *createTagRequest) GetType() string { - if c == nil || c.Type == nil { +// GetContentsURL returns the ContentsURL field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetContentsURL() string { + if c == nil || c.ContentsURL == nil { return "" } - return *c.Type + return *c.ContentsURL } -// GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. -func (d *DeleteEvent) GetPusherType() string { - if d == nil || d.PusherType == nil { - return "" +// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetDeletions() int { + if c == nil || c.Deletions == nil { + return 0 } - return *d.PusherType + return *c.Deletions } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (d *DeleteEvent) GetRef() string { - if d == nil || d.Ref == nil { +// GetFilename returns the Filename field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetFilename() string { + if c == nil || c.Filename == nil { return "" } - return *d.Ref + return *c.Filename } -// GetRefType returns the RefType field if it's non-nil, zero value otherwise. -func (d *DeleteEvent) GetRefType() string { - if d == nil || d.RefType == nil { +// GetPatch returns the Patch field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetPatch() string { + if c == nil || c.Patch == nil { return "" } - return *d.RefType + return *c.Patch } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (d *Deployment) GetCreatedAt() Timestamp { - if d == nil || d.CreatedAt == nil { - return Timestamp{} +// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetRawURL() string { + if c == nil || c.RawURL == nil { + return "" } - return *d.CreatedAt + return *c.RawURL } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *Deployment) GetDescription() string { - if d == nil || d.Description == nil { +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetSHA() string { + if c == nil || c.SHA == nil { return "" } - return *d.Description + return *c.SHA } -// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. -func (d *Deployment) GetEnvironment() string { - if d == nil || d.Environment == nil { +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *CommitFile) GetStatus() string { + if c == nil || c.Status == nil { return "" } - return *d.Environment + return *c.Status } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (d *Deployment) GetID() int { - if d == nil || d.ID == nil { - return 0 +// GetAuthor returns the Author field. +func (c *CommitResult) GetAuthor() *User { + if c == nil { + return nil } - return *d.ID + return c.Author } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (d *Deployment) GetRef() string { - if d == nil || d.Ref == nil { +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (c *CommitResult) GetCommentsURL() string { + if c == nil || c.CommentsURL == nil { return "" } - return *d.Ref + return *c.CommentsURL +} + +// GetCommit returns the Commit field. +func (c *CommitResult) GetCommit() *Commit { + if c == nil { + return nil + } + return c.Commit +} + +// GetCommitter returns the Committer field. +func (c *CommitResult) GetCommitter() *User { + if c == nil { + return nil + } + return c.Committer +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *CommitResult) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" + } + return *c.HTMLURL +} + +// GetRepository returns the Repository field. +func (c *CommitResult) GetRepository() *Repository { + if c == nil { + return nil + } + return c.Repository +} + +// GetScore returns the Score field. +func (c *CommitResult) GetScore() *float64 { + if c == nil { + return nil + } + return c.Score +} + +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (c *CommitResult) GetSHA() string { + if c == nil || c.SHA == nil { + return "" + } + return *c.SHA +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CommitResult) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + +// GetAheadBy returns the AheadBy field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetAheadBy() int { + if c == nil || c.AheadBy == nil { + return 0 + } + return *c.AheadBy +} + +// GetBaseCommit returns the BaseCommit field. +func (c *CommitsComparison) GetBaseCommit() *RepositoryCommit { + if c == nil { + return nil + } + return c.BaseCommit +} + +// GetBehindBy returns the BehindBy field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetBehindBy() int { + if c == nil || c.BehindBy == nil { + return 0 + } + return *c.BehindBy +} + +// GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetDiffURL() string { + if c == nil || c.DiffURL == nil { + return "" + } + return *c.DiffURL +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" + } + return *c.HTMLURL +} + +// GetMergeBaseCommit returns the MergeBaseCommit field. +func (c *CommitsComparison) GetMergeBaseCommit() *RepositoryCommit { + if c == nil { + return nil + } + return c.MergeBaseCommit +} + +// GetPatchURL returns the PatchURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetPatchURL() string { + if c == nil || c.PatchURL == nil { + return "" + } + return *c.PatchURL +} + +// GetPermalinkURL returns the PermalinkURL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetPermalinkURL() string { + if c == nil || c.PermalinkURL == nil { + return "" + } + return *c.PermalinkURL +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetStatus() string { + if c == nil || c.Status == nil { + return "" + } + return *c.Status +} + +// GetTotalCommits returns the TotalCommits field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetTotalCommits() int { + if c == nil || c.TotalCommits == nil { + return 0 + } + return *c.TotalCommits +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *CommitsComparison) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + +// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. +func (c *CommitsSearchResult) GetIncompleteResults() bool { + if c == nil || c.IncompleteResults == nil { + return false + } + return *c.IncompleteResults +} + +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (c *CommitsSearchResult) GetTotal() int { + if c == nil || c.Total == nil { + return 0 + } + return *c.Total +} + +// GetAdditions returns the Additions field if it's non-nil, zero value otherwise. +func (c *CommitStats) GetAdditions() int { + if c == nil || c.Additions == nil { + return 0 + } + return *c.Additions +} + +// GetDeletions returns the Deletions field if it's non-nil, zero value otherwise. +func (c *CommitStats) GetDeletions() int { + if c == nil || c.Deletions == nil { + return 0 + } + return *c.Deletions +} + +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (c *CommitStats) GetTotal() int { + if c == nil || c.Total == nil { + return 0 + } + return *c.Total +} + +// GetCodeOfConduct returns the CodeOfConduct field. +func (c *CommunityHealthFiles) GetCodeOfConduct() *Metric { + if c == nil { + return nil + } + return c.CodeOfConduct +} + +// GetContributing returns the Contributing field. +func (c *CommunityHealthFiles) GetContributing() *Metric { + if c == nil { + return nil + } + return c.Contributing +} + +// GetIssueTemplate returns the IssueTemplate field. +func (c *CommunityHealthFiles) GetIssueTemplate() *Metric { + if c == nil { + return nil + } + return c.IssueTemplate +} + +// GetLicense returns the License field. +func (c *CommunityHealthFiles) GetLicense() *Metric { + if c == nil { + return nil + } + return c.License +} + +// GetPullRequestTemplate returns the PullRequestTemplate field. +func (c *CommunityHealthFiles) GetPullRequestTemplate() *Metric { + if c == nil { + return nil + } + return c.PullRequestTemplate +} + +// GetReadme returns the Readme field. +func (c *CommunityHealthFiles) GetReadme() *Metric { + if c == nil { + return nil + } + return c.Readme +} + +// GetFiles returns the Files field. +func (c *CommunityHealthMetrics) GetFiles() *CommunityHealthFiles { + if c == nil { + return nil + } + return c.Files +} + +// GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetHealthPercentage() int { + if c == nil || c.HealthPercentage == nil { + return 0 + } + return *c.HealthPercentage +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetUpdatedAt() time.Time { + if c == nil || c.UpdatedAt == nil { + return time.Time{} + } + return *c.UpdatedAt +} + +// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetAvatarURL() string { + if c == nil || c.AvatarURL == nil { + return "" + } + return *c.AvatarURL +} + +// GetContributions returns the Contributions field if it's non-nil, zero value otherwise. +func (c *Contributor) GetContributions() int { + if c == nil || c.Contributions == nil { + return 0 + } + return *c.Contributions +} + +// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetEventsURL() string { + if c == nil || c.EventsURL == nil { + return "" + } + return *c.EventsURL +} + +// GetFollowersURL returns the FollowersURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetFollowersURL() string { + if c == nil || c.FollowersURL == nil { + return "" + } + return *c.FollowersURL +} + +// GetFollowingURL returns the FollowingURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetFollowingURL() string { + if c == nil || c.FollowingURL == nil { + return "" + } + return *c.FollowingURL +} + +// GetGistsURL returns the GistsURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetGistsURL() string { + if c == nil || c.GistsURL == nil { + return "" + } + return *c.GistsURL +} + +// GetGravatarID returns the GravatarID field if it's non-nil, zero value otherwise. +func (c *Contributor) GetGravatarID() string { + if c == nil || c.GravatarID == nil { + return "" + } + return *c.GravatarID +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetHTMLURL() string { + if c == nil || c.HTMLURL == nil { + return "" + } + return *c.HTMLURL +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (c *Contributor) GetID() int64 { + if c == nil || c.ID == nil { + return 0 + } + return *c.ID +} + +// GetLogin returns the Login field if it's non-nil, zero value otherwise. +func (c *Contributor) GetLogin() string { + if c == nil || c.Login == nil { + return "" + } + return *c.Login +} + +// GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetOrganizationsURL() string { + if c == nil || c.OrganizationsURL == nil { + return "" + } + return *c.OrganizationsURL +} + +// GetReceivedEventsURL returns the ReceivedEventsURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetReceivedEventsURL() string { + if c == nil || c.ReceivedEventsURL == nil { + return "" + } + return *c.ReceivedEventsURL +} + +// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetReposURL() string { + if c == nil || c.ReposURL == nil { + return "" + } + return *c.ReposURL +} + +// GetSiteAdmin returns the SiteAdmin field if it's non-nil, zero value otherwise. +func (c *Contributor) GetSiteAdmin() bool { + if c == nil || c.SiteAdmin == nil { + return false + } + return *c.SiteAdmin +} + +// GetStarredURL returns the StarredURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetStarredURL() string { + if c == nil || c.StarredURL == nil { + return "" + } + return *c.StarredURL +} + +// GetSubscriptionsURL returns the SubscriptionsURL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetSubscriptionsURL() string { + if c == nil || c.SubscriptionsURL == nil { + return "" + } + return *c.SubscriptionsURL +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (c *Contributor) GetType() string { + if c == nil || c.Type == nil { + return "" + } + return *c.Type +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *Contributor) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + +// GetAuthor returns the Author field. +func (c *ContributorStats) GetAuthor() *Contributor { + if c == nil { + return nil + } + return c.Author +} + +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (c *ContributorStats) GetTotal() int { + if c == nil || c.Total == nil { + return 0 + } + return *c.Total +} + +// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. +func (c *CreateCheckRunOptions) GetCompletedAt() Timestamp { + if c == nil || c.CompletedAt == nil { + return Timestamp{} + } + return *c.CompletedAt +} + +// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. +func (c *CreateCheckRunOptions) GetConclusion() string { + if c == nil || c.Conclusion == nil { + return "" + } + return *c.Conclusion +} + +// GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. +func (c *CreateCheckRunOptions) GetDetailsURL() string { + if c == nil || c.DetailsURL == nil { + return "" + } + return *c.DetailsURL +} + +// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. +func (c *CreateCheckRunOptions) GetExternalID() string { + if c == nil || c.ExternalID == nil { + return "" + } + return *c.ExternalID +} + +// GetOutput returns the Output field. +func (c *CreateCheckRunOptions) GetOutput() *CheckRunOutput { + if c == nil { + return nil + } + return c.Output +} + +// GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise. +func (c *CreateCheckRunOptions) GetStartedAt() Timestamp { + if c == nil || c.StartedAt == nil { + return Timestamp{} + } + return *c.StartedAt +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *CreateCheckRunOptions) GetStatus() string { + if c == nil || c.Status == nil { + return "" + } + return *c.Status +} + +// GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. +func (c *CreateCheckSuiteOptions) GetHeadBranch() string { + if c == nil || c.HeadBranch == nil { + return "" + } + return *c.HeadBranch +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CreateEvent) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + +// GetInstallation returns the Installation field. +func (c *CreateEvent) GetInstallation() *Installation { + if c == nil { + return nil + } + return c.Installation +} + +// GetMasterBranch returns the MasterBranch field if it's non-nil, zero value otherwise. +func (c *CreateEvent) GetMasterBranch() string { + if c == nil || c.MasterBranch == nil { + return "" + } + return *c.MasterBranch +} + +// GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. +func (c *CreateEvent) GetPusherType() string { + if c == nil || c.PusherType == nil { + return "" + } + return *c.PusherType +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (c *CreateEvent) GetRef() string { + if c == nil || c.Ref == nil { + return "" + } + return *c.Ref +} + +// GetRefType returns the RefType field if it's non-nil, zero value otherwise. +func (c *CreateEvent) GetRefType() string { + if c == nil || c.RefType == nil { + return "" + } + return *c.RefType +} + +// GetRepo returns the Repo field. +func (c *CreateEvent) GetRepo() *Repository { + if c == nil { + return nil + } + return c.Repo +} + +// GetSender returns the Sender field. +func (c *CreateEvent) GetSender() *User { + if c == nil { + return nil + } + return c.Sender +} + +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (c *CreateOrgInvitationOptions) GetEmail() string { + if c == nil || c.Email == nil { + return "" + } + return *c.Email +} + +// GetInviteeID returns the InviteeID field if it's non-nil, zero value otherwise. +func (c *CreateOrgInvitationOptions) GetInviteeID() int64 { + if c == nil || c.InviteeID == nil { + return 0 + } + return *c.InviteeID +} + +// GetRole returns the Role field if it's non-nil, zero value otherwise. +func (c *CreateOrgInvitationOptions) GetRole() string { + if c == nil || c.Role == nil { + return "" + } + return *c.Role +} + +// GetInstallation returns the Installation field. +func (d *DeleteEvent) GetInstallation() *Installation { + if d == nil { + return nil + } + return d.Installation +} + +// GetPusherType returns the PusherType field if it's non-nil, zero value otherwise. +func (d *DeleteEvent) GetPusherType() string { + if d == nil || d.PusherType == nil { + return "" + } + return *d.PusherType +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (d *DeleteEvent) GetRef() string { + if d == nil || d.Ref == nil { + return "" + } + return *d.Ref +} + +// GetRefType returns the RefType field if it's non-nil, zero value otherwise. +func (d *DeleteEvent) GetRefType() string { + if d == nil || d.RefType == nil { + return "" + } + return *d.RefType +} + +// GetRepo returns the Repo field. +func (d *DeleteEvent) GetRepo() *Repository { + if d == nil { + return nil + } + return d.Repo +} + +// GetSender returns the Sender field. +func (d *DeleteEvent) GetSender() *User { + if d == nil { + return nil + } + return d.Sender +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (d *Deployment) GetCreatedAt() Timestamp { + if d == nil || d.CreatedAt == nil { + return Timestamp{} + } + return *d.CreatedAt +} + +// GetCreator returns the Creator field. +func (d *Deployment) GetCreator() *User { + if d == nil { + return nil + } + return d.Creator +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (d *Deployment) GetDescription() string { + if d == nil || d.Description == nil { + return "" + } + return *d.Description +} + +// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. +func (d *Deployment) GetEnvironment() string { + if d == nil || d.Environment == nil { + return "" + } + return *d.Environment +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (d *Deployment) GetID() int64 { + if d == nil || d.ID == nil { + return 0 + } + return *d.ID +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (d *Deployment) GetNodeID() string { + if d == nil || d.NodeID == nil { + return "" + } + return *d.NodeID +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (d *Deployment) GetRef() string { + if d == nil || d.Ref == nil { + return "" + } + return *d.Ref +} + +// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. +func (d *Deployment) GetRepositoryURL() string { + if d == nil || d.RepositoryURL == nil { + return "" + } + return *d.RepositoryURL +} + +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (d *Deployment) GetSHA() string { + if d == nil || d.SHA == nil { + return "" + } + return *d.SHA +} + +// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. +func (d *Deployment) GetStatusesURL() string { + if d == nil || d.StatusesURL == nil { + return "" + } + return *d.StatusesURL +} + +// GetTask returns the Task field if it's non-nil, zero value otherwise. +func (d *Deployment) GetTask() string { + if d == nil || d.Task == nil { + return "" + } + return *d.Task +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (d *Deployment) GetUpdatedAt() Timestamp { + if d == nil || d.UpdatedAt == nil { + return Timestamp{} + } + return *d.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (d *Deployment) GetURL() string { + if d == nil || d.URL == nil { + return "" + } + return *d.URL +} + +// GetDeployment returns the Deployment field. +func (d *DeploymentEvent) GetDeployment() *Deployment { + if d == nil { + return nil + } + return d.Deployment +} + +// GetInstallation returns the Installation field. +func (d *DeploymentEvent) GetInstallation() *Installation { + if d == nil { + return nil + } + return d.Installation +} + +// GetRepo returns the Repo field. +func (d *DeploymentEvent) GetRepo() *Repository { + if d == nil { + return nil + } + return d.Repo +} + +// GetSender returns the Sender field. +func (d *DeploymentEvent) GetSender() *User { + if d == nil { + return nil + } + return d.Sender +} + +// GetAutoMerge returns the AutoMerge field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetAutoMerge() bool { + if d == nil || d.AutoMerge == nil { + return false + } + return *d.AutoMerge +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetDescription() string { + if d == nil || d.Description == nil { + return "" + } + return *d.Description +} + +// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetEnvironment() string { + if d == nil || d.Environment == nil { + return "" + } + return *d.Environment +} + +// GetPayload returns the Payload field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetPayload() string { + if d == nil || d.Payload == nil { + return "" + } + return *d.Payload +} + +// GetProductionEnvironment returns the ProductionEnvironment field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetProductionEnvironment() bool { + if d == nil || d.ProductionEnvironment == nil { + return false + } + return *d.ProductionEnvironment +} + +// GetRef returns the Ref field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetRef() string { + if d == nil || d.Ref == nil { + return "" + } + return *d.Ref +} + +// GetRequiredContexts returns the RequiredContexts field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetRequiredContexts() []string { + if d == nil || d.RequiredContexts == nil { + return nil + } + return *d.RequiredContexts +} + +// GetTask returns the Task field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetTask() string { + if d == nil || d.Task == nil { + return "" + } + return *d.Task +} + +// GetTransientEnvironment returns the TransientEnvironment field if it's non-nil, zero value otherwise. +func (d *DeploymentRequest) GetTransientEnvironment() bool { + if d == nil || d.TransientEnvironment == nil { + return false + } + return *d.TransientEnvironment +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetCreatedAt() Timestamp { + if d == nil || d.CreatedAt == nil { + return Timestamp{} + } + return *d.CreatedAt +} + +// GetCreator returns the Creator field. +func (d *DeploymentStatus) GetCreator() *User { + if d == nil { + return nil + } + return d.Creator +} + +// GetDeploymentURL returns the DeploymentURL field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetDeploymentURL() string { + if d == nil || d.DeploymentURL == nil { + return "" + } + return *d.DeploymentURL +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetDescription() string { + if d == nil || d.Description == nil { + return "" + } + return *d.Description +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetID() int64 { + if d == nil || d.ID == nil { + return 0 + } + return *d.ID +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetNodeID() string { + if d == nil || d.NodeID == nil { + return "" + } + return *d.NodeID +} + +// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetRepositoryURL() string { + if d == nil || d.RepositoryURL == nil { + return "" + } + return *d.RepositoryURL +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetState() string { + if d == nil || d.State == nil { + return "" + } + return *d.State +} + +// GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetTargetURL() string { + if d == nil || d.TargetURL == nil { + return "" + } + return *d.TargetURL +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (d *DeploymentStatus) GetUpdatedAt() Timestamp { + if d == nil || d.UpdatedAt == nil { + return Timestamp{} + } + return *d.UpdatedAt +} + +// GetDeployment returns the Deployment field. +func (d *DeploymentStatusEvent) GetDeployment() *Deployment { + if d == nil { + return nil + } + return d.Deployment +} + +// GetDeploymentStatus returns the DeploymentStatus field. +func (d *DeploymentStatusEvent) GetDeploymentStatus() *DeploymentStatus { + if d == nil { + return nil + } + return d.DeploymentStatus +} + +// GetInstallation returns the Installation field. +func (d *DeploymentStatusEvent) GetInstallation() *Installation { + if d == nil { + return nil + } + return d.Installation +} + +// GetRepo returns the Repo field. +func (d *DeploymentStatusEvent) GetRepo() *Repository { + if d == nil { + return nil + } + return d.Repo +} + +// GetSender returns the Sender field. +func (d *DeploymentStatusEvent) GetSender() *User { + if d == nil { + return nil + } + return d.Sender +} + +// GetAutoInactive returns the AutoInactive field if it's non-nil, zero value otherwise. +func (d *DeploymentStatusRequest) GetAutoInactive() bool { + if d == nil || d.AutoInactive == nil { + return false + } + return *d.AutoInactive +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (d *DeploymentStatusRequest) GetDescription() string { + if d == nil || d.Description == nil { + return "" + } + return *d.Description +} + +// GetEnvironmentURL returns the EnvironmentURL field if it's non-nil, zero value otherwise. +func (d *DeploymentStatusRequest) GetEnvironmentURL() string { + if d == nil || d.EnvironmentURL == nil { + return "" + } + return *d.EnvironmentURL +} + +// GetLogURL returns the LogURL field if it's non-nil, zero value otherwise. +func (d *DeploymentStatusRequest) GetLogURL() string { + if d == nil || d.LogURL == nil { + return "" + } + return *d.LogURL +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (d *DeploymentStatusRequest) GetState() string { + if d == nil || d.State == nil { + return "" + } + return *d.State +} + +// GetAuthor returns the Author field. +func (d *DiscussionComment) GetAuthor() *User { + if d == nil { + return nil + } + return d.Author +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetBody() string { + if d == nil || d.Body == nil { + return "" + } + return *d.Body +} + +// GetBodyHTML returns the BodyHTML field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetBodyHTML() string { + if d == nil || d.BodyHTML == nil { + return "" + } + return *d.BodyHTML +} + +// GetBodyVersion returns the BodyVersion field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetBodyVersion() string { + if d == nil || d.BodyVersion == nil { + return "" + } + return *d.BodyVersion +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetCreatedAt() Timestamp { + if d == nil || d.CreatedAt == nil { + return Timestamp{} + } + return *d.CreatedAt +} + +// GetDiscussionURL returns the DiscussionURL field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetDiscussionURL() string { + if d == nil || d.DiscussionURL == nil { + return "" + } + return *d.DiscussionURL +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetHTMLURL() string { + if d == nil || d.HTMLURL == nil { + return "" + } + return *d.HTMLURL +} + +// GetLastEditedAt returns the LastEditedAt field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetLastEditedAt() Timestamp { + if d == nil || d.LastEditedAt == nil { + return Timestamp{} + } + return *d.LastEditedAt +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetNodeID() string { + if d == nil || d.NodeID == nil { + return "" + } + return *d.NodeID +} + +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetNumber() int { + if d == nil || d.Number == nil { + return 0 + } + return *d.Number +} + +// GetReactions returns the Reactions field. +func (d *DiscussionComment) GetReactions() *Reactions { + if d == nil { + return nil + } + return d.Reactions +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetUpdatedAt() Timestamp { + if d == nil || d.UpdatedAt == nil { + return Timestamp{} + } + return *d.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (d *DiscussionComment) GetURL() string { + if d == nil || d.URL == nil { + return "" + } + return *d.URL +} + +// GetTeams returns the Teams field if it's non-nil, zero value otherwise. +func (d *DismissalRestrictionsRequest) GetTeams() []string { + if d == nil || d.Teams == nil { + return nil + } + return *d.Teams +} + +// GetUsers returns the Users field if it's non-nil, zero value otherwise. +func (d *DismissalRestrictionsRequest) GetUsers() []string { + if d == nil || d.Users == nil { + return nil + } + return *d.Users +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (d *DraftReviewComment) GetBody() string { + if d == nil || d.Body == nil { + return "" + } + return *d.Body +} + +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (d *DraftReviewComment) GetPath() string { + if d == nil || d.Path == nil { + return "" + } + return *d.Path +} + +// GetPosition returns the Position field if it's non-nil, zero value otherwise. +func (d *DraftReviewComment) GetPosition() int { + if d == nil || d.Position == nil { + return 0 + } + return *d.Position +} + +// GetActor returns the Actor field. +func (e *Event) GetActor() *User { + if e == nil { + return nil + } + return e.Actor +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (e *Event) GetCreatedAt() time.Time { + if e == nil || e.CreatedAt == nil { + return time.Time{} + } + return *e.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (e *Event) GetID() string { + if e == nil || e.ID == nil { + return "" + } + return *e.ID +} + +// GetOrg returns the Org field. +func (e *Event) GetOrg() *Organization { + if e == nil { + return nil + } + return e.Org +} + +// GetPublic returns the Public field if it's non-nil, zero value otherwise. +func (e *Event) GetPublic() bool { + if e == nil || e.Public == nil { + return false + } + return *e.Public +} + +// GetRawPayload returns the RawPayload field if it's non-nil, zero value otherwise. +func (e *Event) GetRawPayload() json.RawMessage { + if e == nil || e.RawPayload == nil { + return json.RawMessage{} + } + return *e.RawPayload +} + +// GetRepo returns the Repo field. +func (e *Event) GetRepo() *Repository { + if e == nil { + return nil + } + return e.Repo +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (e *Event) GetType() string { + if e == nil || e.Type == nil { + return "" + } + return *e.Type +} + +// GetHRef returns the HRef field if it's non-nil, zero value otherwise. +func (f *FeedLink) GetHRef() string { + if f == nil || f.HRef == nil { + return "" + } + return *f.HRef +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (f *FeedLink) GetType() string { + if f == nil || f.Type == nil { + return "" + } + return *f.Type +} + +// GetCurrentUserActorURL returns the CurrentUserActorURL field if it's non-nil, zero value otherwise. +func (f *Feeds) GetCurrentUserActorURL() string { + if f == nil || f.CurrentUserActorURL == nil { + return "" + } + return *f.CurrentUserActorURL +} + +// GetCurrentUserOrganizationURL returns the CurrentUserOrganizationURL field if it's non-nil, zero value otherwise. +func (f *Feeds) GetCurrentUserOrganizationURL() string { + if f == nil || f.CurrentUserOrganizationURL == nil { + return "" + } + return *f.CurrentUserOrganizationURL +} + +// GetCurrentUserPublicURL returns the CurrentUserPublicURL field if it's non-nil, zero value otherwise. +func (f *Feeds) GetCurrentUserPublicURL() string { + if f == nil || f.CurrentUserPublicURL == nil { + return "" + } + return *f.CurrentUserPublicURL +} + +// GetCurrentUserURL returns the CurrentUserURL field if it's non-nil, zero value otherwise. +func (f *Feeds) GetCurrentUserURL() string { + if f == nil || f.CurrentUserURL == nil { + return "" + } + return *f.CurrentUserURL +} + +// GetTimelineURL returns the TimelineURL field if it's non-nil, zero value otherwise. +func (f *Feeds) GetTimelineURL() string { + if f == nil || f.TimelineURL == nil { + return "" + } + return *f.TimelineURL +} + +// GetUserURL returns the UserURL field if it's non-nil, zero value otherwise. +func (f *Feeds) GetUserURL() string { + if f == nil || f.UserURL == nil { + return "" + } + return *f.UserURL +} + +// GetForkee returns the Forkee field. +func (f *ForkEvent) GetForkee() *Repository { + if f == nil { + return nil + } + return f.Forkee +} + +// GetInstallation returns the Installation field. +func (f *ForkEvent) GetInstallation() *Installation { + if f == nil { + return nil + } + return f.Installation +} + +// GetRepo returns the Repo field. +func (f *ForkEvent) GetRepo() *Repository { + if f == nil { + return nil + } + return f.Repo +} + +// GetSender returns the Sender field. +func (f *ForkEvent) GetSender() *User { + if f == nil { + return nil + } + return f.Sender +} + +// GetComments returns the Comments field if it's non-nil, zero value otherwise. +func (g *Gist) GetComments() int { + if g == nil || g.Comments == nil { + return 0 + } + return *g.Comments +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (g *Gist) GetCreatedAt() time.Time { + if g == nil || g.CreatedAt == nil { + return time.Time{} + } + return *g.CreatedAt +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (g *Gist) GetDescription() string { + if g == nil || g.Description == nil { + return "" + } + return *g.Description +} + +// GetGitPullURL returns the GitPullURL field if it's non-nil, zero value otherwise. +func (g *Gist) GetGitPullURL() string { + if g == nil || g.GitPullURL == nil { + return "" + } + return *g.GitPullURL +} + +// GetGitPushURL returns the GitPushURL field if it's non-nil, zero value otherwise. +func (g *Gist) GetGitPushURL() string { + if g == nil || g.GitPushURL == nil { + return "" + } + return *g.GitPushURL +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (g *Gist) GetHTMLURL() string { + if g == nil || g.HTMLURL == nil { + return "" + } + return *g.HTMLURL +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (g *Gist) GetID() string { + if g == nil || g.ID == nil { + return "" + } + return *g.ID +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (g *Gist) GetNodeID() string { + if g == nil || g.NodeID == nil { + return "" + } + return *g.NodeID +} + +// GetOwner returns the Owner field. +func (g *Gist) GetOwner() *User { + if g == nil { + return nil + } + return g.Owner +} + +// GetPublic returns the Public field if it's non-nil, zero value otherwise. +func (g *Gist) GetPublic() bool { + if g == nil || g.Public == nil { + return false + } + return *g.Public +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (g *Gist) GetUpdatedAt() time.Time { + if g == nil || g.UpdatedAt == nil { + return time.Time{} + } + return *g.UpdatedAt +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (g *GistComment) GetBody() string { + if g == nil || g.Body == nil { + return "" + } + return *g.Body +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (g *GistComment) GetCreatedAt() time.Time { + if g == nil || g.CreatedAt == nil { + return time.Time{} + } + return *g.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (g *GistComment) GetID() int64 { + if g == nil || g.ID == nil { + return 0 + } + return *g.ID +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (g *GistComment) GetURL() string { + if g == nil || g.URL == nil { + return "" + } + return *g.URL +} + +// GetUser returns the User field. +func (g *GistComment) GetUser() *User { + if g == nil { + return nil + } + return g.User +} + +// GetChangeStatus returns the ChangeStatus field. +func (g *GistCommit) GetChangeStatus() *CommitStats { + if g == nil { + return nil + } + return g.ChangeStatus +} + +// GetCommittedAt returns the CommittedAt field if it's non-nil, zero value otherwise. +func (g *GistCommit) GetCommittedAt() Timestamp { + if g == nil || g.CommittedAt == nil { + return Timestamp{} + } + return *g.CommittedAt +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (g *GistCommit) GetNodeID() string { + if g == nil || g.NodeID == nil { + return "" + } + return *g.NodeID +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (g *GistCommit) GetURL() string { + if g == nil || g.URL == nil { + return "" + } + return *g.URL +} + +// GetUser returns the User field. +func (g *GistCommit) GetUser() *User { + if g == nil { + return nil + } + return g.User +} + +// GetVersion returns the Version field if it's non-nil, zero value otherwise. +func (g *GistCommit) GetVersion() string { + if g == nil || g.Version == nil { + return "" + } + return *g.Version +} + +// GetContent returns the Content field if it's non-nil, zero value otherwise. +func (g *GistFile) GetContent() string { + if g == nil || g.Content == nil { + return "" + } + return *g.Content +} + +// GetFilename returns the Filename field if it's non-nil, zero value otherwise. +func (g *GistFile) GetFilename() string { + if g == nil || g.Filename == nil { + return "" + } + return *g.Filename +} + +// GetLanguage returns the Language field if it's non-nil, zero value otherwise. +func (g *GistFile) GetLanguage() string { + if g == nil || g.Language == nil { + return "" + } + return *g.Language +} + +// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. +func (g *GistFile) GetRawURL() string { + if g == nil || g.RawURL == nil { + return "" + } + return *g.RawURL +} + +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (g *GistFile) GetSize() int { + if g == nil || g.Size == nil { + return 0 + } + return *g.Size +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (g *GistFile) GetType() string { + if g == nil || g.Type == nil { + return "" + } + return *g.Type +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (g *GistFork) GetCreatedAt() Timestamp { + if g == nil || g.CreatedAt == nil { + return Timestamp{} + } + return *g.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (g *GistFork) GetID() string { + if g == nil || g.ID == nil { + return "" + } + return *g.ID +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (g *GistFork) GetNodeID() string { + if g == nil || g.NodeID == nil { + return "" + } + return *g.NodeID +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (g *GistFork) GetUpdatedAt() Timestamp { + if g == nil || g.UpdatedAt == nil { + return Timestamp{} + } + return *g.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (g *GistFork) GetURL() string { + if g == nil || g.URL == nil { + return "" + } + return *g.URL +} + +// GetUser returns the User field. +func (g *GistFork) GetUser() *User { + if g == nil { + return nil + } + return g.User +} + +// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. +func (g *GistStats) GetPrivateGists() int { + if g == nil || g.PrivateGists == nil { + return 0 + } + return *g.PrivateGists +} + +// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. +func (g *GistStats) GetPublicGists() int { + if g == nil || g.PublicGists == nil { + return 0 + } + return *g.PublicGists +} + +// GetTotalGists returns the TotalGists field if it's non-nil, zero value otherwise. +func (g *GistStats) GetTotalGists() int { + if g == nil || g.TotalGists == nil { + return 0 + } + return *g.TotalGists +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (g *Gitignore) GetName() string { + if g == nil || g.Name == nil { + return "" + } + return *g.Name +} + +// GetSource returns the Source field if it's non-nil, zero value otherwise. +func (g *Gitignore) GetSource() string { + if g == nil || g.Source == nil { + return "" + } + return *g.Source +} + +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (g *GitObject) GetSHA() string { + if g == nil || g.SHA == nil { + return "" + } + return *g.SHA +} + +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (g *GitObject) GetType() string { + if g == nil || g.Type == nil { + return "" + } + return *g.Type +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (g *GitObject) GetURL() string { + if g == nil || g.URL == nil { + return "" + } + return *g.URL +} + +// GetInstallation returns the Installation field. +func (g *GollumEvent) GetInstallation() *Installation { + if g == nil { + return nil + } + return g.Installation +} + +// GetRepo returns the Repo field. +func (g *GollumEvent) GetRepo() *Repository { + if g == nil { + return nil + } + return g.Repo +} + +// GetSender returns the Sender field. +func (g *GollumEvent) GetSender() *User { + if g == nil { + return nil + } + return g.Sender +} + +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (g *GPGEmail) GetEmail() string { + if g == nil || g.Email == nil { + return "" + } + return *g.Email +} + +// GetVerified returns the Verified field if it's non-nil, zero value otherwise. +func (g *GPGEmail) GetVerified() bool { + if g == nil || g.Verified == nil { + return false + } + return *g.Verified +} + +// GetCanCertify returns the CanCertify field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetCanCertify() bool { + if g == nil || g.CanCertify == nil { + return false + } + return *g.CanCertify +} + +// GetCanEncryptComms returns the CanEncryptComms field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetCanEncryptComms() bool { + if g == nil || g.CanEncryptComms == nil { + return false + } + return *g.CanEncryptComms +} + +// GetCanEncryptStorage returns the CanEncryptStorage field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetCanEncryptStorage() bool { + if g == nil || g.CanEncryptStorage == nil { + return false + } + return *g.CanEncryptStorage +} + +// GetCanSign returns the CanSign field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetCanSign() bool { + if g == nil || g.CanSign == nil { + return false + } + return *g.CanSign +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetCreatedAt() time.Time { + if g == nil || g.CreatedAt == nil { + return time.Time{} + } + return *g.CreatedAt +} + +// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetExpiresAt() time.Time { + if g == nil || g.ExpiresAt == nil { + return time.Time{} + } + return *g.ExpiresAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetID() int64 { + if g == nil || g.ID == nil { + return 0 + } + return *g.ID +} + +// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetKeyID() string { + if g == nil || g.KeyID == nil { + return "" + } + return *g.KeyID +} + +// GetPrimaryKeyID returns the PrimaryKeyID field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetPrimaryKeyID() int64 { + if g == nil || g.PrimaryKeyID == nil { + return 0 + } + return *g.PrimaryKeyID +} + +// GetPublicKey returns the PublicKey field if it's non-nil, zero value otherwise. +func (g *GPGKey) GetPublicKey() string { + if g == nil || g.PublicKey == nil { + return "" + } + return *g.PublicKey +} + +// GetApp returns the App field. +func (g *Grant) GetApp() *AuthorizationApp { + if g == nil { + return nil + } + return g.App +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (g *Grant) GetCreatedAt() Timestamp { + if g == nil || g.CreatedAt == nil { + return Timestamp{} + } + return *g.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (g *Grant) GetID() int64 { + if g == nil || g.ID == nil { + return 0 + } + return *g.ID +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (g *Grant) GetUpdatedAt() Timestamp { + if g == nil || g.UpdatedAt == nil { + return Timestamp{} + } + return *g.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (g *Grant) GetURL() string { + if g == nil || g.URL == nil { + return "" + } + return *g.URL +} + +// GetActive returns the Active field if it's non-nil, zero value otherwise. +func (h *Hook) GetActive() bool { + if h == nil || h.Active == nil { + return false + } + return *h.Active +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (h *Hook) GetCreatedAt() time.Time { + if h == nil || h.CreatedAt == nil { + return time.Time{} + } + return *h.CreatedAt +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (h *Hook) GetID() int64 { + if h == nil || h.ID == nil { + return 0 + } + return *h.ID +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (h *Hook) GetName() string { + if h == nil || h.Name == nil { + return "" + } + return *h.Name +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (h *Hook) GetUpdatedAt() time.Time { + if h == nil || h.UpdatedAt == nil { + return time.Time{} + } + return *h.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (h *Hook) GetURL() string { + if h == nil || h.URL == nil { + return "" + } + return *h.URL +} + +// GetActiveHooks returns the ActiveHooks field if it's non-nil, zero value otherwise. +func (h *HookStats) GetActiveHooks() int { + if h == nil || h.ActiveHooks == nil { + return 0 + } + return *h.ActiveHooks +} + +// GetInactiveHooks returns the InactiveHooks field if it's non-nil, zero value otherwise. +func (h *HookStats) GetInactiveHooks() int { + if h == nil || h.InactiveHooks == nil { + return 0 + } + return *h.InactiveHooks +} + +// GetTotalHooks returns the TotalHooks field if it's non-nil, zero value otherwise. +func (h *HookStats) GetTotalHooks() int { + if h == nil || h.TotalHooks == nil { + return 0 + } + return *h.TotalHooks +} + +// GetAuthorsCount returns the AuthorsCount field if it's non-nil, zero value otherwise. +func (i *Import) GetAuthorsCount() int { + if i == nil || i.AuthorsCount == nil { + return 0 + } + return *i.AuthorsCount +} + +// GetAuthorsURL returns the AuthorsURL field if it's non-nil, zero value otherwise. +func (i *Import) GetAuthorsURL() string { + if i == nil || i.AuthorsURL == nil { + return "" + } + return *i.AuthorsURL +} + +// GetCommitCount returns the CommitCount field if it's non-nil, zero value otherwise. +func (i *Import) GetCommitCount() int { + if i == nil || i.CommitCount == nil { + return 0 + } + return *i.CommitCount +} + +// GetFailedStep returns the FailedStep field if it's non-nil, zero value otherwise. +func (i *Import) GetFailedStep() string { + if i == nil || i.FailedStep == nil { + return "" + } + return *i.FailedStep +} + +// GetHasLargeFiles returns the HasLargeFiles field if it's non-nil, zero value otherwise. +func (i *Import) GetHasLargeFiles() bool { + if i == nil || i.HasLargeFiles == nil { + return false + } + return *i.HasLargeFiles +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (i *Import) GetHTMLURL() string { + if i == nil || i.HTMLURL == nil { + return "" + } + return *i.HTMLURL +} + +// GetHumanName returns the HumanName field if it's non-nil, zero value otherwise. +func (i *Import) GetHumanName() string { + if i == nil || i.HumanName == nil { + return "" + } + return *i.HumanName +} + +// GetLargeFilesCount returns the LargeFilesCount field if it's non-nil, zero value otherwise. +func (i *Import) GetLargeFilesCount() int { + if i == nil || i.LargeFilesCount == nil { + return 0 + } + return *i.LargeFilesCount +} + +// GetLargeFilesSize returns the LargeFilesSize field if it's non-nil, zero value otherwise. +func (i *Import) GetLargeFilesSize() int { + if i == nil || i.LargeFilesSize == nil { + return 0 + } + return *i.LargeFilesSize +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (i *Import) GetMessage() string { + if i == nil || i.Message == nil { + return "" + } + return *i.Message +} + +// GetPercent returns the Percent field if it's non-nil, zero value otherwise. +func (i *Import) GetPercent() int { + if i == nil || i.Percent == nil { + return 0 + } + return *i.Percent +} + +// GetPushPercent returns the PushPercent field if it's non-nil, zero value otherwise. +func (i *Import) GetPushPercent() int { + if i == nil || i.PushPercent == nil { + return 0 + } + return *i.PushPercent } // GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (d *Deployment) GetRepositoryURL() string { - if d == nil || d.RepositoryURL == nil { +func (i *Import) GetRepositoryURL() string { + if i == nil || i.RepositoryURL == nil { + return "" + } + return *i.RepositoryURL +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (i *Import) GetStatus() string { + if i == nil || i.Status == nil { + return "" + } + return *i.Status +} + +// GetStatusText returns the StatusText field if it's non-nil, zero value otherwise. +func (i *Import) GetStatusText() string { + if i == nil || i.StatusText == nil { + return "" + } + return *i.StatusText +} + +// GetTFVCProject returns the TFVCProject field if it's non-nil, zero value otherwise. +func (i *Import) GetTFVCProject() string { + if i == nil || i.TFVCProject == nil { + return "" + } + return *i.TFVCProject +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (i *Import) GetURL() string { + if i == nil || i.URL == nil { + return "" + } + return *i.URL +} + +// GetUseLFS returns the UseLFS field if it's non-nil, zero value otherwise. +func (i *Import) GetUseLFS() string { + if i == nil || i.UseLFS == nil { + return "" + } + return *i.UseLFS +} + +// GetVCS returns the VCS field if it's non-nil, zero value otherwise. +func (i *Import) GetVCS() string { + if i == nil || i.VCS == nil { + return "" + } + return *i.VCS +} + +// GetVCSPassword returns the VCSPassword field if it's non-nil, zero value otherwise. +func (i *Import) GetVCSPassword() string { + if i == nil || i.VCSPassword == nil { + return "" + } + return *i.VCSPassword +} + +// GetVCSURL returns the VCSURL field if it's non-nil, zero value otherwise. +func (i *Import) GetVCSURL() string { + if i == nil || i.VCSURL == nil { + return "" + } + return *i.VCSURL +} + +// GetVCSUsername returns the VCSUsername field if it's non-nil, zero value otherwise. +func (i *Import) GetVCSUsername() string { + if i == nil || i.VCSUsername == nil { + return "" + } + return *i.VCSUsername +} + +// GetAccessTokensURL returns the AccessTokensURL field if it's non-nil, zero value otherwise. +func (i *Installation) GetAccessTokensURL() string { + if i == nil || i.AccessTokensURL == nil { + return "" + } + return *i.AccessTokensURL +} + +// GetAccount returns the Account field. +func (i *Installation) GetAccount() *User { + if i == nil { + return nil + } + return i.Account +} + +// GetAppID returns the AppID field if it's non-nil, zero value otherwise. +func (i *Installation) GetAppID() int64 { + if i == nil || i.AppID == nil { + return 0 + } + return *i.AppID +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (i *Installation) GetCreatedAt() Timestamp { + if i == nil || i.CreatedAt == nil { + return Timestamp{} + } + return *i.CreatedAt +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (i *Installation) GetHTMLURL() string { + if i == nil || i.HTMLURL == nil { + return "" + } + return *i.HTMLURL +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (i *Installation) GetID() int64 { + if i == nil || i.ID == nil { + return 0 + } + return *i.ID +} + +// GetPermissions returns the Permissions field. +func (i *Installation) GetPermissions() *InstallationPermissions { + if i == nil { + return nil + } + return i.Permissions +} + +// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. +func (i *Installation) GetRepositoriesURL() string { + if i == nil || i.RepositoriesURL == nil { + return "" + } + return *i.RepositoriesURL +} + +// GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. +func (i *Installation) GetRepositorySelection() string { + if i == nil || i.RepositorySelection == nil { + return "" + } + return *i.RepositorySelection +} + +// GetSingleFileName returns the SingleFileName field if it's non-nil, zero value otherwise. +func (i *Installation) GetSingleFileName() string { + if i == nil || i.SingleFileName == nil { + return "" + } + return *i.SingleFileName +} + +// GetTargetID returns the TargetID field if it's non-nil, zero value otherwise. +func (i *Installation) GetTargetID() int64 { + if i == nil || i.TargetID == nil { + return 0 + } + return *i.TargetID +} + +// GetTargetType returns the TargetType field if it's non-nil, zero value otherwise. +func (i *Installation) GetTargetType() string { + if i == nil || i.TargetType == nil { + return "" + } + return *i.TargetType +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (i *Installation) GetUpdatedAt() Timestamp { + if i == nil || i.UpdatedAt == nil { + return Timestamp{} + } + return *i.UpdatedAt +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (i *InstallationEvent) GetAction() string { + if i == nil || i.Action == nil { + return "" + } + return *i.Action +} + +// GetInstallation returns the Installation field. +func (i *InstallationEvent) GetInstallation() *Installation { + if i == nil { + return nil + } + return i.Installation +} + +// GetSender returns the Sender field. +func (i *InstallationEvent) GetSender() *User { + if i == nil { + return nil + } + return i.Sender +} + +// GetContents returns the Contents field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetContents() string { + if i == nil || i.Contents == nil { + return "" + } + return *i.Contents +} + +// GetIssues returns the Issues field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetIssues() string { + if i == nil || i.Issues == nil { + return "" + } + return *i.Issues +} + +// GetMetadata returns the Metadata field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetMetadata() string { + if i == nil || i.Metadata == nil { + return "" + } + return *i.Metadata +} + +// GetSingleFile returns the SingleFile field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetSingleFile() string { + if i == nil || i.SingleFile == nil { return "" } - return *d.RepositoryURL + return *i.SingleFile } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (d *Deployment) GetSHA() string { - if d == nil || d.SHA == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (i *InstallationRepositoriesEvent) GetAction() string { + if i == nil || i.Action == nil { return "" } - return *d.SHA + return *i.Action } -// GetStatusesURL returns the StatusesURL field if it's non-nil, zero value otherwise. -func (d *Deployment) GetStatusesURL() string { - if d == nil || d.StatusesURL == nil { +// GetInstallation returns the Installation field. +func (i *InstallationRepositoriesEvent) GetInstallation() *Installation { + if i == nil { + return nil + } + return i.Installation +} + +// GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. +func (i *InstallationRepositoriesEvent) GetRepositorySelection() string { + if i == nil || i.RepositorySelection == nil { return "" } - return *d.StatusesURL + return *i.RepositorySelection } -// GetTask returns the Task field if it's non-nil, zero value otherwise. -func (d *Deployment) GetTask() string { - if d == nil || d.Task == nil { +// GetSender returns the Sender field. +func (i *InstallationRepositoriesEvent) GetSender() *User { + if i == nil { + return nil + } + return i.Sender +} + +// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. +func (i *InstallationToken) GetExpiresAt() time.Time { + if i == nil || i.ExpiresAt == nil { + return time.Time{} + } + return *i.ExpiresAt +} + +// GetToken returns the Token field if it's non-nil, zero value otherwise. +func (i *InstallationToken) GetToken() string { + if i == nil || i.Token == nil { return "" } - return *d.Task + return *i.Token +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (i *Invitation) GetCreatedAt() time.Time { + if i == nil || i.CreatedAt == nil { + return time.Time{} + } + return *i.CreatedAt +} + +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (i *Invitation) GetEmail() string { + if i == nil || i.Email == nil { + return "" + } + return *i.Email +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (i *Invitation) GetID() int64 { + if i == nil || i.ID == nil { + return 0 + } + return *i.ID +} + +// GetInvitationTeamURL returns the InvitationTeamURL field if it's non-nil, zero value otherwise. +func (i *Invitation) GetInvitationTeamURL() string { + if i == nil || i.InvitationTeamURL == nil { + return "" + } + return *i.InvitationTeamURL +} + +// GetInviter returns the Inviter field. +func (i *Invitation) GetInviter() *User { + if i == nil { + return nil + } + return i.Inviter +} + +// GetLogin returns the Login field if it's non-nil, zero value otherwise. +func (i *Invitation) GetLogin() string { + if i == nil || i.Login == nil { + return "" + } + return *i.Login +} + +// GetRole returns the Role field if it's non-nil, zero value otherwise. +func (i *Invitation) GetRole() string { + if i == nil || i.Role == nil { + return "" + } + return *i.Role +} + +// GetTeamCount returns the TeamCount field if it's non-nil, zero value otherwise. +func (i *Invitation) GetTeamCount() int { + if i == nil || i.TeamCount == nil { + return 0 + } + return *i.TeamCount +} + +// GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. +func (i *Issue) GetActiveLockReason() string { + if i == nil || i.ActiveLockReason == nil { + return "" + } + return *i.ActiveLockReason +} + +// GetAssignee returns the Assignee field. +func (i *Issue) GetAssignee() *User { + if i == nil { + return nil + } + return i.Assignee +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (i *Issue) GetBody() string { + if i == nil || i.Body == nil { + return "" + } + return *i.Body +} + +// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. +func (i *Issue) GetClosedAt() time.Time { + if i == nil || i.ClosedAt == nil { + return time.Time{} + } + return *i.ClosedAt +} + +// GetClosedBy returns the ClosedBy field. +func (i *Issue) GetClosedBy() *User { + if i == nil { + return nil + } + return i.ClosedBy +} + +// GetComments returns the Comments field if it's non-nil, zero value otherwise. +func (i *Issue) GetComments() int { + if i == nil || i.Comments == nil { + return 0 + } + return *i.Comments +} + +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetCommentsURL() string { + if i == nil || i.CommentsURL == nil { + return "" + } + return *i.CommentsURL +} + +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (i *Issue) GetCreatedAt() time.Time { + if i == nil || i.CreatedAt == nil { + return time.Time{} + } + return *i.CreatedAt +} + +// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetEventsURL() string { + if i == nil || i.EventsURL == nil { + return "" + } + return *i.EventsURL +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetHTMLURL() string { + if i == nil || i.HTMLURL == nil { + return "" + } + return *i.HTMLURL +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (i *Issue) GetID() int64 { + if i == nil || i.ID == nil { + return 0 + } + return *i.ID +} + +// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetLabelsURL() string { + if i == nil || i.LabelsURL == nil { + return "" + } + return *i.LabelsURL +} + +// GetLocked returns the Locked field if it's non-nil, zero value otherwise. +func (i *Issue) GetLocked() bool { + if i == nil || i.Locked == nil { + return false + } + return *i.Locked +} + +// GetMilestone returns the Milestone field. +func (i *Issue) GetMilestone() *Milestone { + if i == nil { + return nil + } + return i.Milestone +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (i *Issue) GetNodeID() string { + if i == nil || i.NodeID == nil { + return "" + } + return *i.NodeID +} + +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (i *Issue) GetNumber() int { + if i == nil || i.Number == nil { + return 0 + } + return *i.Number +} + +// GetPullRequestLinks returns the PullRequestLinks field. +func (i *Issue) GetPullRequestLinks() *PullRequestLinks { + if i == nil { + return nil + } + return i.PullRequestLinks +} + +// GetReactions returns the Reactions field. +func (i *Issue) GetReactions() *Reactions { + if i == nil { + return nil + } + return i.Reactions +} + +// GetRepository returns the Repository field. +func (i *Issue) GetRepository() *Repository { + if i == nil { + return nil + } + return i.Repository +} + +// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. +func (i *Issue) GetRepositoryURL() string { + if i == nil || i.RepositoryURL == nil { + return "" + } + return *i.RepositoryURL +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (i *Issue) GetState() string { + if i == nil || i.State == nil { + return "" + } + return *i.State +} + +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (i *Issue) GetTitle() string { + if i == nil || i.Title == nil { + return "" + } + return *i.Title } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (d *Deployment) GetUpdatedAt() Timestamp { - if d == nil || d.UpdatedAt == nil { - return Timestamp{} +func (i *Issue) GetUpdatedAt() time.Time { + if i == nil || i.UpdatedAt == nil { + return time.Time{} } - return *d.UpdatedAt + return *i.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (d *Deployment) GetURL() string { - if d == nil || d.URL == nil { +func (i *Issue) GetURL() string { + if i == nil || i.URL == nil { + return "" + } + return *i.URL +} + +// GetUser returns the User field. +func (i *Issue) GetUser() *User { + if i == nil { + return nil + } + return i.User +} + +// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetAuthorAssociation() string { + if i == nil || i.AuthorAssociation == nil { return "" } - return *d.URL + return *i.AuthorAssociation } -// GetAutoMerge returns the AutoMerge field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetAutoMerge() bool { - if d == nil || d.AutoMerge == nil { - return false +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetBody() string { + if i == nil || i.Body == nil { + return "" } - return *d.AutoMerge + return *i.Body } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetDescription() string { - if d == nil || d.Description == nil { - return "" +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetCreatedAt() time.Time { + if i == nil || i.CreatedAt == nil { + return time.Time{} } - return *d.Description + return *i.CreatedAt } -// GetEnvironment returns the Environment field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetEnvironment() string { - if d == nil || d.Environment == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetHTMLURL() string { + if i == nil || i.HTMLURL == nil { return "" } - return *d.Environment + return *i.HTMLURL } -// GetPayload returns the Payload field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetPayload() string { - if d == nil || d.Payload == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetID() int64 { + if i == nil || i.ID == nil { + return 0 } - return *d.Payload + return *i.ID } -// GetProductionEnvironment returns the ProductionEnvironment field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetProductionEnvironment() bool { - if d == nil || d.ProductionEnvironment == nil { - return false +// GetIssueURL returns the IssueURL field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetIssueURL() string { + if i == nil || i.IssueURL == nil { + return "" } - return *d.ProductionEnvironment + return *i.IssueURL } -// GetRef returns the Ref field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetRef() string { - if d == nil || d.Ref == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetNodeID() string { + if i == nil || i.NodeID == nil { return "" } - return *d.Ref + return *i.NodeID } -// GetRequiredContexts returns the RequiredContexts field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetRequiredContexts() []string { - if d == nil || d.RequiredContexts == nil { +// GetReactions returns the Reactions field. +func (i *IssueComment) GetReactions() *Reactions { + if i == nil { return nil } - return *d.RequiredContexts + return i.Reactions } -// GetTask returns the Task field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetTask() string { - if d == nil || d.Task == nil { - return "" +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetUpdatedAt() time.Time { + if i == nil || i.UpdatedAt == nil { + return time.Time{} } - return *d.Task + return *i.UpdatedAt } -// GetTransientEnvironment returns the TransientEnvironment field if it's non-nil, zero value otherwise. -func (d *DeploymentRequest) GetTransientEnvironment() bool { - if d == nil || d.TransientEnvironment == nil { - return false +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (i *IssueComment) GetURL() string { + if i == nil || i.URL == nil { + return "" } - return *d.TransientEnvironment + return *i.URL } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetCreatedAt() Timestamp { - if d == nil || d.CreatedAt == nil { - return Timestamp{} +// GetUser returns the User field. +func (i *IssueComment) GetUser() *User { + if i == nil { + return nil } - return *d.CreatedAt + return i.User } -// GetDeploymentURL returns the DeploymentURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetDeploymentURL() string { - if d == nil || d.DeploymentURL == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (i *IssueCommentEvent) GetAction() string { + if i == nil || i.Action == nil { return "" } - return *d.DeploymentURL + return *i.Action } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetDescription() string { - if d == nil || d.Description == nil { - return "" +// GetChanges returns the Changes field. +func (i *IssueCommentEvent) GetChanges() *EditChange { + if i == nil { + return nil } - return *d.Description + return i.Changes } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetID() int { - if d == nil || d.ID == nil { - return 0 +// GetComment returns the Comment field. +func (i *IssueCommentEvent) GetComment() *IssueComment { + if i == nil { + return nil } - return *d.ID + return i.Comment } -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetRepositoryURL() string { - if d == nil || d.RepositoryURL == nil { - return "" +// GetInstallation returns the Installation field. +func (i *IssueCommentEvent) GetInstallation() *Installation { + if i == nil { + return nil } - return *d.RepositoryURL + return i.Installation } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetState() string { - if d == nil || d.State == nil { - return "" +// GetIssue returns the Issue field. +func (i *IssueCommentEvent) GetIssue() *Issue { + if i == nil { + return nil } - return *d.State + return i.Issue } -// GetTargetURL returns the TargetURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetTargetURL() string { - if d == nil || d.TargetURL == nil { - return "" +// GetRepo returns the Repo field. +func (i *IssueCommentEvent) GetRepo() *Repository { + if i == nil { + return nil } - return *d.TargetURL + return i.Repo } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (d *DeploymentStatus) GetUpdatedAt() Timestamp { - if d == nil || d.UpdatedAt == nil { - return Timestamp{} +// GetSender returns the Sender field. +func (i *IssueCommentEvent) GetSender() *User { + if i == nil { + return nil } - return *d.UpdatedAt + return i.Sender } -// GetAutoInactive returns the AutoInactive field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetAutoInactive() bool { - if d == nil || d.AutoInactive == nil { - return false +// GetActor returns the Actor field. +func (i *IssueEvent) GetActor() *User { + if i == nil { + return nil } - return *d.AutoInactive + return i.Actor } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetDescription() string { - if d == nil || d.Description == nil { - return "" +// GetAssignee returns the Assignee field. +func (i *IssueEvent) GetAssignee() *User { + if i == nil { + return nil } - return *d.Description + return i.Assignee } -// GetEnvironmentURL returns the EnvironmentURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetEnvironmentURL() string { - if d == nil || d.EnvironmentURL == nil { - return "" +// GetAssigner returns the Assigner field. +func (i *IssueEvent) GetAssigner() *User { + if i == nil { + return nil } - return *d.EnvironmentURL + return i.Assigner } -// GetLogURL returns the LogURL field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetLogURL() string { - if d == nil || d.LogURL == nil { +// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. +func (i *IssueEvent) GetCommitID() string { + if i == nil || i.CommitID == nil { return "" } - return *d.LogURL + return *i.CommitID } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (d *DeploymentStatusRequest) GetState() string { - if d == nil || d.State == nil { - return "" +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (i *IssueEvent) GetCreatedAt() time.Time { + if i == nil || i.CreatedAt == nil { + return time.Time{} } - return *d.State + return *i.CreatedAt } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (d *DraftReviewComment) GetBody() string { - if d == nil || d.Body == nil { +// GetEvent returns the Event field if it's non-nil, zero value otherwise. +func (i *IssueEvent) GetEvent() string { + if i == nil || i.Event == nil { return "" } - return *d.Body + return *i.Event } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (d *DraftReviewComment) GetPath() string { - if d == nil || d.Path == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (i *IssueEvent) GetID() int64 { + if i == nil || i.ID == nil { + return 0 } - return *d.Path + return *i.ID } -// GetPosition returns the Position field if it's non-nil, zero value otherwise. -func (d *DraftReviewComment) GetPosition() int { - if d == nil || d.Position == nil { - return 0 +// GetIssue returns the Issue field. +func (i *IssueEvent) GetIssue() *Issue { + if i == nil { + return nil } - return *d.Position + return i.Issue } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (e *Event) GetCreatedAt() time.Time { - if e == nil || e.CreatedAt == nil { - return time.Time{} +// GetLabel returns the Label field. +func (i *IssueEvent) GetLabel() *Label { + if i == nil { + return nil } - return *e.CreatedAt + return i.Label } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (e *Event) GetID() string { - if e == nil || e.ID == nil { +// GetLockReason returns the LockReason field if it's non-nil, zero value otherwise. +func (i *IssueEvent) GetLockReason() string { + if i == nil || i.LockReason == nil { return "" } - return *e.ID + return *i.LockReason } -// GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (e *Event) GetPublic() bool { - if e == nil || e.Public == nil { - return false +// GetMilestone returns the Milestone field. +func (i *IssueEvent) GetMilestone() *Milestone { + if i == nil { + return nil } - return *e.Public + return i.Milestone } -// GetRawPayload returns the RawPayload field if it's non-nil, zero value otherwise. -func (e *Event) GetRawPayload() json.RawMessage { - if e == nil || e.RawPayload == nil { - return json.RawMessage{} +// GetRename returns the Rename field. +func (i *IssueEvent) GetRename() *Rename { + if i == nil { + return nil } - return *e.RawPayload + return i.Rename } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (e *Event) GetType() string { - if e == nil || e.Type == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (i *IssueEvent) GetURL() string { + if i == nil || i.URL == nil { return "" } - return *e.Type + return *i.URL } -// GetHRef returns the HRef field if it's non-nil, zero value otherwise. -func (f *FeedLink) GetHRef() string { - if f == nil || f.HRef == nil { +// GetAssignee returns the Assignee field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetAssignee() string { + if i == nil || i.Assignee == nil { return "" } - return *f.HRef + return *i.Assignee } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (f *FeedLink) GetType() string { - if f == nil || f.Type == nil { - return "" +// GetAssignees returns the Assignees field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetAssignees() []string { + if i == nil || i.Assignees == nil { + return nil } - return *f.Type + return *i.Assignees } -// GetCurrentUserActorURL returns the CurrentUserActorURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserActorURL() string { - if f == nil || f.CurrentUserActorURL == nil { +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetBody() string { + if i == nil || i.Body == nil { return "" } - return *f.CurrentUserActorURL + return *i.Body } -// GetCurrentUserOrganizationURL returns the CurrentUserOrganizationURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserOrganizationURL() string { - if f == nil || f.CurrentUserOrganizationURL == nil { - return "" +// GetLabels returns the Labels field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetLabels() []string { + if i == nil || i.Labels == nil { + return nil + } + return *i.Labels +} + +// GetMilestone returns the Milestone field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetMilestone() int { + if i == nil || i.Milestone == nil { + return 0 } - return *f.CurrentUserOrganizationURL + return *i.Milestone } -// GetCurrentUserPublicURL returns the CurrentUserPublicURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserPublicURL() string { - if f == nil || f.CurrentUserPublicURL == nil { +// GetState returns the State field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetState() string { + if i == nil || i.State == nil { return "" } - return *f.CurrentUserPublicURL + return *i.State } -// GetCurrentUserURL returns the CurrentUserURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetCurrentUserURL() string { - if f == nil || f.CurrentUserURL == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (i *IssueRequest) GetTitle() string { + if i == nil || i.Title == nil { return "" } - return *f.CurrentUserURL + return *i.Title } -// GetTimelineURL returns the TimelineURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetTimelineURL() string { - if f == nil || f.TimelineURL == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (i *IssuesEvent) GetAction() string { + if i == nil || i.Action == nil { return "" } - return *f.TimelineURL + return *i.Action } -// GetUserURL returns the UserURL field if it's non-nil, zero value otherwise. -func (f *Feeds) GetUserURL() string { - if f == nil || f.UserURL == nil { - return "" +// GetAssignee returns the Assignee field. +func (i *IssuesEvent) GetAssignee() *User { + if i == nil { + return nil } - return *f.UserURL + return i.Assignee } -// GetComments returns the Comments field if it's non-nil, zero value otherwise. -func (g *Gist) GetComments() int { - if g == nil || g.Comments == nil { - return 0 +// GetChanges returns the Changes field. +func (i *IssuesEvent) GetChanges() *EditChange { + if i == nil { + return nil } - return *g.Comments + return i.Changes } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *Gist) GetCreatedAt() time.Time { - if g == nil || g.CreatedAt == nil { - return time.Time{} +// GetInstallation returns the Installation field. +func (i *IssuesEvent) GetInstallation() *Installation { + if i == nil { + return nil } - return *g.CreatedAt + return i.Installation } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (g *Gist) GetDescription() string { - if g == nil || g.Description == nil { - return "" +// GetIssue returns the Issue field. +func (i *IssuesEvent) GetIssue() *Issue { + if i == nil { + return nil } - return *g.Description + return i.Issue } -// GetGitPullURL returns the GitPullURL field if it's non-nil, zero value otherwise. -func (g *Gist) GetGitPullURL() string { - if g == nil || g.GitPullURL == nil { - return "" +// GetLabel returns the Label field. +func (i *IssuesEvent) GetLabel() *Label { + if i == nil { + return nil } - return *g.GitPullURL + return i.Label } -// GetGitPushURL returns the GitPushURL field if it's non-nil, zero value otherwise. -func (g *Gist) GetGitPushURL() string { - if g == nil || g.GitPushURL == nil { - return "" +// GetRepo returns the Repo field. +func (i *IssuesEvent) GetRepo() *Repository { + if i == nil { + return nil } - return *g.GitPushURL + return i.Repo } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (g *Gist) GetHTMLURL() string { - if g == nil || g.HTMLURL == nil { - return "" +// GetSender returns the Sender field. +func (i *IssuesEvent) GetSender() *User { + if i == nil { + return nil } - return *g.HTMLURL + return i.Sender } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *Gist) GetID() string { - if g == nil || g.ID == nil { - return "" +// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. +func (i *IssuesSearchResult) GetIncompleteResults() bool { + if i == nil || i.IncompleteResults == nil { + return false } - return *g.ID + return *i.IncompleteResults } -// GetPublic returns the Public field if it's non-nil, zero value otherwise. -func (g *Gist) GetPublic() bool { - if g == nil || g.Public == nil { - return false +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (i *IssuesSearchResult) GetTotal() int { + if i == nil || i.Total == nil { + return 0 } - return *g.Public + return *i.Total } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (g *Gist) GetUpdatedAt() time.Time { - if g == nil || g.UpdatedAt == nil { - return time.Time{} +// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. +func (i *IssueStats) GetClosedIssues() int { + if i == nil || i.ClosedIssues == nil { + return 0 } - return *g.UpdatedAt + return *i.ClosedIssues } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (g *GistComment) GetBody() string { - if g == nil || g.Body == nil { - return "" +// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. +func (i *IssueStats) GetOpenIssues() int { + if i == nil || i.OpenIssues == nil { + return 0 } - return *g.Body + return *i.OpenIssues } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *GistComment) GetCreatedAt() time.Time { - if g == nil || g.CreatedAt == nil { - return time.Time{} +// GetTotalIssues returns the TotalIssues field if it's non-nil, zero value otherwise. +func (i *IssueStats) GetTotalIssues() int { + if i == nil || i.TotalIssues == nil { + return 0 } - return *g.CreatedAt + return *i.TotalIssues } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *GistComment) GetID() int { - if g == nil || g.ID == nil { +func (k *Key) GetID() int64 { + if k == nil || k.ID == nil { return 0 } - return *g.ID + return *k.ID } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GistComment) GetURL() string { - if g == nil || g.URL == nil { +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (k *Key) GetKey() string { + if k == nil || k.Key == nil { return "" } - return *g.URL + return *k.Key } -// GetCommittedAt returns the CommittedAt field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetCommittedAt() Timestamp { - if g == nil || g.CommittedAt == nil { - return Timestamp{} +// GetReadOnly returns the ReadOnly field if it's non-nil, zero value otherwise. +func (k *Key) GetReadOnly() bool { + if k == nil || k.ReadOnly == nil { + return false } - return *g.CommittedAt + return *k.ReadOnly } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetURL() string { - if g == nil || g.URL == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (k *Key) GetTitle() string { + if k == nil || k.Title == nil { return "" } - return *g.URL + return *k.Title } -// GetVersion returns the Version field if it's non-nil, zero value otherwise. -func (g *GistCommit) GetVersion() string { - if g == nil || g.Version == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (k *Key) GetURL() string { + if k == nil || k.URL == nil { return "" } - return *g.Version + return *k.URL } -// GetContent returns the Content field if it's non-nil, zero value otherwise. -func (g *GistFile) GetContent() string { - if g == nil || g.Content == nil { +// GetColor returns the Color field if it's non-nil, zero value otherwise. +func (l *Label) GetColor() string { + if l == nil || l.Color == nil { return "" } - return *g.Content + return *l.Color } -// GetFilename returns the Filename field if it's non-nil, zero value otherwise. -func (g *GistFile) GetFilename() string { - if g == nil || g.Filename == nil { - return "" +// GetDefault returns the Default field if it's non-nil, zero value otherwise. +func (l *Label) GetDefault() bool { + if l == nil || l.Default == nil { + return false } - return *g.Filename + return *l.Default } -// GetLanguage returns the Language field if it's non-nil, zero value otherwise. -func (g *GistFile) GetLanguage() string { - if g == nil || g.Language == nil { +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (l *Label) GetDescription() string { + if l == nil || l.Description == nil { return "" } - return *g.Language + return *l.Description } -// GetRawURL returns the RawURL field if it's non-nil, zero value otherwise. -func (g *GistFile) GetRawURL() string { - if g == nil || g.RawURL == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (l *Label) GetID() int64 { + if l == nil || l.ID == nil { + return 0 } - return *g.RawURL + return *l.ID } -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (g *GistFile) GetSize() int { - if g == nil || g.Size == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (l *Label) GetName() string { + if l == nil || l.Name == nil { + return "" } - return *g.Size + return *l.Name } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (g *GistFile) GetType() string { - if g == nil || g.Type == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (l *Label) GetNodeID() string { + if l == nil || l.NodeID == nil { return "" } - return *g.Type + return *l.NodeID } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *GistFork) GetCreatedAt() Timestamp { - if g == nil || g.CreatedAt == nil { - return Timestamp{} +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (l *Label) GetURL() string { + if l == nil || l.URL == nil { + return "" } - return *g.CreatedAt + return *l.URL } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *GistFork) GetID() string { - if g == nil || g.ID == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (l *LabelEvent) GetAction() string { + if l == nil || l.Action == nil { return "" } - return *g.ID + return *l.Action } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (g *GistFork) GetUpdatedAt() Timestamp { - if g == nil || g.UpdatedAt == nil { - return Timestamp{} +// GetChanges returns the Changes field. +func (l *LabelEvent) GetChanges() *EditChange { + if l == nil { + return nil } - return *g.UpdatedAt + return l.Changes } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GistFork) GetURL() string { - if g == nil || g.URL == nil { - return "" +// GetInstallation returns the Installation field. +func (l *LabelEvent) GetInstallation() *Installation { + if l == nil { + return nil } - return *g.URL + return l.Installation } -// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. -func (g *GistStats) GetPrivateGists() int { - if g == nil || g.PrivateGists == nil { - return 0 +// GetLabel returns the Label field. +func (l *LabelEvent) GetLabel() *Label { + if l == nil { + return nil } - return *g.PrivateGists + return l.Label } -// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. -func (g *GistStats) GetPublicGists() int { - if g == nil || g.PublicGists == nil { - return 0 +// GetOrg returns the Org field. +func (l *LabelEvent) GetOrg() *Organization { + if l == nil { + return nil } - return *g.PublicGists + return l.Org } -// GetTotalGists returns the TotalGists field if it's non-nil, zero value otherwise. -func (g *GistStats) GetTotalGists() int { - if g == nil || g.TotalGists == nil { - return 0 +// GetRepo returns the Repo field. +func (l *LabelEvent) GetRepo() *Repository { + if l == nil { + return nil } - return *g.TotalGists + return l.Repo } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (g *Gitignore) GetName() string { - if g == nil || g.Name == nil { +// GetColor returns the Color field if it's non-nil, zero value otherwise. +func (l *LabelResult) GetColor() string { + if l == nil || l.Color == nil { return "" } - return *g.Name + return *l.Color +} + +// GetDefault returns the Default field if it's non-nil, zero value otherwise. +func (l *LabelResult) GetDefault() bool { + if l == nil || l.Default == nil { + return false + } + return *l.Default } -// GetSource returns the Source field if it's non-nil, zero value otherwise. -func (g *Gitignore) GetSource() string { - if g == nil || g.Source == nil { +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (l *LabelResult) GetDescription() string { + if l == nil || l.Description == nil { return "" } - return *g.Source + return *l.Description } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (g *GitObject) GetSHA() string { - if g == nil || g.SHA == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (l *LabelResult) GetID() int64 { + if l == nil || l.ID == nil { + return 0 } - return *g.SHA + return *l.ID } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (g *GitObject) GetType() string { - if g == nil || g.Type == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (l *LabelResult) GetName() string { + if l == nil || l.Name == nil { return "" } - return *g.Type + return *l.Name } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *GitObject) GetURL() string { - if g == nil || g.URL == nil { - return "" +// GetScore returns the Score field. +func (l *LabelResult) GetScore() *float64 { + if l == nil { + return nil } - return *g.URL + return l.Score } -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (g *GPGEmail) GetEmail() string { - if g == nil || g.Email == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (l *LabelResult) GetURL() string { + if l == nil || l.URL == nil { return "" } - return *g.Email + return *l.URL } -// GetVerified returns the Verified field if it's non-nil, zero value otherwise. -func (g *GPGEmail) GetVerified() bool { - if g == nil || g.Verified == nil { +// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. +func (l *LabelsSearchResult) GetIncompleteResults() bool { + if l == nil || l.IncompleteResults == nil { return false } - return *g.Verified + return *l.IncompleteResults } -// GetCanCertify returns the CanCertify field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanCertify() bool { - if g == nil || g.CanCertify == nil { - return false +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (l *LabelsSearchResult) GetTotal() int { + if l == nil || l.Total == nil { + return 0 } - return *g.CanCertify + return *l.Total } -// GetCanEncryptComms returns the CanEncryptComms field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanEncryptComms() bool { - if g == nil || g.CanEncryptComms == nil { - return false +// GetOID returns the OID field if it's non-nil, zero value otherwise. +func (l *LargeFile) GetOID() string { + if l == nil || l.OID == nil { + return "" } - return *g.CanEncryptComms + return *l.OID } -// GetCanEncryptStorage returns the CanEncryptStorage field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanEncryptStorage() bool { - if g == nil || g.CanEncryptStorage == nil { - return false +// GetPath returns the Path field if it's non-nil, zero value otherwise. +func (l *LargeFile) GetPath() string { + if l == nil || l.Path == nil { + return "" } - return *g.CanEncryptStorage + return *l.Path } -// GetCanSign returns the CanSign field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCanSign() bool { - if g == nil || g.CanSign == nil { - return false +// GetRefName returns the RefName field if it's non-nil, zero value otherwise. +func (l *LargeFile) GetRefName() string { + if l == nil || l.RefName == nil { + return "" } - return *g.CanSign + return *l.RefName } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetCreatedAt() time.Time { - if g == nil || g.CreatedAt == nil { - return time.Time{} +// GetSize returns the Size field if it's non-nil, zero value otherwise. +func (l *LargeFile) GetSize() int { + if l == nil || l.Size == nil { + return 0 } - return *g.CreatedAt + return *l.Size } -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetExpiresAt() time.Time { - if g == nil || g.ExpiresAt == nil { - return time.Time{} +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (l *License) GetBody() string { + if l == nil || l.Body == nil { + return "" } - return *g.ExpiresAt + return *l.Body } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetID() int { - if g == nil || g.ID == nil { - return 0 +// GetConditions returns the Conditions field if it's non-nil, zero value otherwise. +func (l *License) GetConditions() []string { + if l == nil || l.Conditions == nil { + return nil } - return *g.ID + return *l.Conditions } -// GetKeyID returns the KeyID field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetKeyID() string { - if g == nil || g.KeyID == nil { +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (l *License) GetDescription() string { + if l == nil || l.Description == nil { return "" } - return *g.KeyID + return *l.Description } -// GetPrimaryKeyID returns the PrimaryKeyID field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetPrimaryKeyID() int { - if g == nil || g.PrimaryKeyID == nil { - return 0 +// GetFeatured returns the Featured field if it's non-nil, zero value otherwise. +func (l *License) GetFeatured() bool { + if l == nil || l.Featured == nil { + return false } - return *g.PrimaryKeyID + return *l.Featured } -// GetPublicKey returns the PublicKey field if it's non-nil, zero value otherwise. -func (g *GPGKey) GetPublicKey() string { - if g == nil || g.PublicKey == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (l *License) GetHTMLURL() string { + if l == nil || l.HTMLURL == nil { return "" } - return *g.PublicKey + return *l.HTMLURL } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (g *Grant) GetCreatedAt() Timestamp { - if g == nil || g.CreatedAt == nil { - return Timestamp{} +// GetImplementation returns the Implementation field if it's non-nil, zero value otherwise. +func (l *License) GetImplementation() string { + if l == nil || l.Implementation == nil { + return "" } - return *g.CreatedAt + return *l.Implementation } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (g *Grant) GetID() int { - if g == nil || g.ID == nil { - return 0 +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (l *License) GetKey() string { + if l == nil || l.Key == nil { + return "" } - return *g.ID + return *l.Key } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (g *Grant) GetUpdatedAt() Timestamp { - if g == nil || g.UpdatedAt == nil { - return Timestamp{} +// GetLimitations returns the Limitations field if it's non-nil, zero value otherwise. +func (l *License) GetLimitations() []string { + if l == nil || l.Limitations == nil { + return nil } - return *g.UpdatedAt + return *l.Limitations } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (g *Grant) GetURL() string { - if g == nil || g.URL == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (l *License) GetName() string { + if l == nil || l.Name == nil { return "" } - return *g.URL + return *l.Name } -// GetActive returns the Active field if it's non-nil, zero value otherwise. -func (h *Hook) GetActive() bool { - if h == nil || h.Active == nil { - return false +// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. +func (l *License) GetPermissions() []string { + if l == nil || l.Permissions == nil { + return nil } - return *h.Active + return *l.Permissions } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (h *Hook) GetCreatedAt() time.Time { - if h == nil || h.CreatedAt == nil { - return time.Time{} +// GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. +func (l *License) GetSPDXID() string { + if l == nil || l.SPDXID == nil { + return "" } - return *h.CreatedAt + return *l.SPDXID } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (h *Hook) GetID() int { - if h == nil || h.ID == nil { - return 0 +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (l *License) GetURL() string { + if l == nil || l.URL == nil { + return "" } - return *h.ID + return *l.URL } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (h *Hook) GetName() string { - if h == nil || h.Name == nil { +// GetCheckName returns the CheckName field if it's non-nil, zero value otherwise. +func (l *ListCheckRunsOptions) GetCheckName() string { + if l == nil || l.CheckName == nil { return "" } - return *h.Name + return *l.CheckName } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (h *Hook) GetUpdatedAt() time.Time { - if h == nil || h.UpdatedAt == nil { - return time.Time{} +// GetFilter returns the Filter field if it's non-nil, zero value otherwise. +func (l *ListCheckRunsOptions) GetFilter() string { + if l == nil || l.Filter == nil { + return "" } - return *h.UpdatedAt + return *l.Filter } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (h *Hook) GetURL() string { - if h == nil || h.URL == nil { +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (l *ListCheckRunsOptions) GetStatus() string { + if l == nil || l.Status == nil { return "" } - return *h.URL + return *l.Status } -// GetActiveHooks returns the ActiveHooks field if it's non-nil, zero value otherwise. -func (h *HookStats) GetActiveHooks() int { - if h == nil || h.ActiveHooks == nil { +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (l *ListCheckRunsResults) GetTotal() int { + if l == nil || l.Total == nil { return 0 } - return *h.ActiveHooks + return *l.Total } -// GetInactiveHooks returns the InactiveHooks field if it's non-nil, zero value otherwise. -func (h *HookStats) GetInactiveHooks() int { - if h == nil || h.InactiveHooks == nil { +// GetAppID returns the AppID field if it's non-nil, zero value otherwise. +func (l *ListCheckSuiteOptions) GetAppID() int { + if l == nil || l.AppID == nil { return 0 } - return *h.InactiveHooks + return *l.AppID } -// GetTotalHooks returns the TotalHooks field if it's non-nil, zero value otherwise. -func (h *HookStats) GetTotalHooks() int { - if h == nil || h.TotalHooks == nil { - return 0 +// GetCheckName returns the CheckName field if it's non-nil, zero value otherwise. +func (l *ListCheckSuiteOptions) GetCheckName() string { + if l == nil || l.CheckName == nil { + return "" } - return *h.TotalHooks + return *l.CheckName } -// GetAuthorsCount returns the AuthorsCount field if it's non-nil, zero value otherwise. -func (i *Import) GetAuthorsCount() int { - if i == nil || i.AuthorsCount == nil { +// GetTotal returns the Total field if it's non-nil, zero value otherwise. +func (l *ListCheckSuiteResults) GetTotal() int { + if l == nil || l.Total == nil { return 0 } - return *i.AuthorsCount + return *l.Total } -// GetAuthorsURL returns the AuthorsURL field if it's non-nil, zero value otherwise. -func (i *Import) GetAuthorsURL() string { - if i == nil || i.AuthorsURL == nil { +// GetAccountsURL returns the AccountsURL field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetAccountsURL() string { + if m == nil || m.AccountsURL == nil { return "" } - return *i.AuthorsURL + return *m.AccountsURL } -// GetCommitCount returns the CommitCount field if it's non-nil, zero value otherwise. -func (i *Import) GetCommitCount() int { - if i == nil || i.CommitCount == nil { +// GetBullets returns the Bullets field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetBullets() []string { + if m == nil || m.Bullets == nil { + return nil + } + return *m.Bullets +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetDescription() string { + if m == nil || m.Description == nil { + return "" + } + return *m.Description +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetID() int64 { + if m == nil || m.ID == nil { return 0 } - return *i.CommitCount + return *m.ID } -// GetFailedStep returns the FailedStep field if it's non-nil, zero value otherwise. -func (i *Import) GetFailedStep() string { - if i == nil || i.FailedStep == nil { - return "" +// GetMonthlyPriceInCents returns the MonthlyPriceInCents field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetMonthlyPriceInCents() int { + if m == nil || m.MonthlyPriceInCents == nil { + return 0 } - return *i.FailedStep + return *m.MonthlyPriceInCents } -// GetHasLargeFiles returns the HasLargeFiles field if it's non-nil, zero value otherwise. -func (i *Import) GetHasLargeFiles() bool { - if i == nil || i.HasLargeFiles == nil { - return false +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetName() string { + if m == nil || m.Name == nil { + return "" } - return *i.HasLargeFiles + return *m.Name } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *Import) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { +// GetPriceModel returns the PriceModel field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetPriceModel() string { + if m == nil || m.PriceModel == nil { return "" } - return *i.HTMLURL + return *m.PriceModel } -// GetHumanName returns the HumanName field if it's non-nil, zero value otherwise. -func (i *Import) GetHumanName() string { - if i == nil || i.HumanName == nil { +// GetUnitName returns the UnitName field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetUnitName() string { + if m == nil || m.UnitName == nil { return "" } - return *i.HumanName + return *m.UnitName } -// GetLargeFilesCount returns the LargeFilesCount field if it's non-nil, zero value otherwise. -func (i *Import) GetLargeFilesCount() int { - if i == nil || i.LargeFilesCount == nil { - return 0 +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetURL() string { + if m == nil || m.URL == nil { + return "" } - return *i.LargeFilesCount + return *m.URL } -// GetLargeFilesSize returns the LargeFilesSize field if it's non-nil, zero value otherwise. -func (i *Import) GetLargeFilesSize() int { - if i == nil || i.LargeFilesSize == nil { +// GetYearlyPriceInCents returns the YearlyPriceInCents field if it's non-nil, zero value otherwise. +func (m *MarketplacePlan) GetYearlyPriceInCents() int { + if m == nil || m.YearlyPriceInCents == nil { return 0 } - return *i.LargeFilesSize + return *m.YearlyPriceInCents } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (i *Import) GetMessage() string { - if i == nil || i.Message == nil { +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (m *MarketplacePlanAccount) GetEmail() string { + if m == nil || m.Email == nil { return "" } - return *i.Message + return *m.Email } -// GetPercent returns the Percent field if it's non-nil, zero value otherwise. -func (i *Import) GetPercent() int { - if i == nil || i.Percent == nil { +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (m *MarketplacePlanAccount) GetID() int64 { + if m == nil || m.ID == nil { return 0 } - return *i.Percent + return *m.ID } -// GetPushPercent returns the PushPercent field if it's non-nil, zero value otherwise. -func (i *Import) GetPushPercent() int { - if i == nil || i.PushPercent == nil { - return 0 +// GetLogin returns the Login field if it's non-nil, zero value otherwise. +func (m *MarketplacePlanAccount) GetLogin() string { + if m == nil || m.Login == nil { + return "" } - return *i.PushPercent + return *m.Login } -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (i *Import) GetRepositoryURL() string { - if i == nil || i.RepositoryURL == nil { - return "" +// GetMarketplacePurchase returns the MarketplacePurchase field. +func (m *MarketplacePlanAccount) GetMarketplacePurchase() *MarketplacePurchase { + if m == nil { + return nil } - return *i.RepositoryURL + return m.MarketplacePurchase } -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (i *Import) GetStatus() string { - if i == nil || i.Status == nil { +// GetOrganizationBillingEmail returns the OrganizationBillingEmail field if it's non-nil, zero value otherwise. +func (m *MarketplacePlanAccount) GetOrganizationBillingEmail() string { + if m == nil || m.OrganizationBillingEmail == nil { return "" } - return *i.Status + return *m.OrganizationBillingEmail } -// GetStatusText returns the StatusText field if it's non-nil, zero value otherwise. -func (i *Import) GetStatusText() string { - if i == nil || i.StatusText == nil { +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (m *MarketplacePlanAccount) GetType() string { + if m == nil || m.Type == nil { return "" } - return *i.StatusText + return *m.Type } -// GetTFVCProject returns the TFVCProject field if it's non-nil, zero value otherwise. -func (i *Import) GetTFVCProject() string { - if i == nil || i.TFVCProject == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (m *MarketplacePlanAccount) GetURL() string { + if m == nil || m.URL == nil { return "" } - return *i.TFVCProject + return *m.URL } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *Import) GetURL() string { - if i == nil || i.URL == nil { - return "" +// GetAccount returns the Account field. +func (m *MarketplacePurchase) GetAccount() *MarketplacePlanAccount { + if m == nil { + return nil } - return *i.URL + return m.Account } -// GetUseLFS returns the UseLFS field if it's non-nil, zero value otherwise. -func (i *Import) GetUseLFS() string { - if i == nil || i.UseLFS == nil { +// GetBillingCycle returns the BillingCycle field if it's non-nil, zero value otherwise. +func (m *MarketplacePurchase) GetBillingCycle() string { + if m == nil || m.BillingCycle == nil { return "" } - return *i.UseLFS + return *m.BillingCycle } -// GetVCS returns the VCS field if it's non-nil, zero value otherwise. -func (i *Import) GetVCS() string { - if i == nil || i.VCS == nil { +// GetNextBillingDate returns the NextBillingDate field if it's non-nil, zero value otherwise. +func (m *MarketplacePurchase) GetNextBillingDate() string { + if m == nil || m.NextBillingDate == nil { return "" } - return *i.VCS + return *m.NextBillingDate } -// GetVCSPassword returns the VCSPassword field if it's non-nil, zero value otherwise. -func (i *Import) GetVCSPassword() string { - if i == nil || i.VCSPassword == nil { - return "" +// GetPlan returns the Plan field. +func (m *MarketplacePurchase) GetPlan() *MarketplacePlan { + if m == nil { + return nil } - return *i.VCSPassword + return m.Plan } -// GetVCSURL returns the VCSURL field if it's non-nil, zero value otherwise. -func (i *Import) GetVCSURL() string { - if i == nil || i.VCSURL == nil { - return "" +// GetUnitCount returns the UnitCount field if it's non-nil, zero value otherwise. +func (m *MarketplacePurchase) GetUnitCount() int { + if m == nil || m.UnitCount == nil { + return 0 } - return *i.VCSURL + return *m.UnitCount } -// GetVCSUsername returns the VCSUsername field if it's non-nil, zero value otherwise. -func (i *Import) GetVCSUsername() string { - if i == nil || i.VCSUsername == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (m *MarketplacePurchaseEvent) GetAction() string { + if m == nil || m.Action == nil { return "" } - return *i.VCSUsername + return *m.Action } -// GetAccessTokensURL returns the AccessTokensURL field if it's non-nil, zero value otherwise. -func (i *Installation) GetAccessTokensURL() string { - if i == nil || i.AccessTokensURL == nil { - return "" +// GetEffectiveDate returns the EffectiveDate field if it's non-nil, zero value otherwise. +func (m *MarketplacePurchaseEvent) GetEffectiveDate() Timestamp { + if m == nil || m.EffectiveDate == nil { + return Timestamp{} } - return *i.AccessTokensURL + return *m.EffectiveDate } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *Installation) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { - return "" +// GetInstallation returns the Installation field. +func (m *MarketplacePurchaseEvent) GetInstallation() *Installation { + if m == nil { + return nil } - return *i.HTMLURL + return m.Installation } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *Installation) GetID() int { - if i == nil || i.ID == nil { - return 0 +// GetMarketplacePurchase returns the MarketplacePurchase field. +func (m *MarketplacePurchaseEvent) GetMarketplacePurchase() *MarketplacePurchase { + if m == nil { + return nil } - return *i.ID + return m.MarketplacePurchase } -// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. -func (i *Installation) GetRepositoriesURL() string { - if i == nil || i.RepositoriesURL == nil { - return "" +// GetPreviousMarketplacePurchase returns the PreviousMarketplacePurchase field. +func (m *MarketplacePurchaseEvent) GetPreviousMarketplacePurchase() *MarketplacePurchase { + if m == nil { + return nil } - return *i.RepositoriesURL + return m.PreviousMarketplacePurchase } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *InstallationEvent) GetAction() string { - if i == nil || i.Action == nil { - return "" +// GetSender returns the Sender field. +func (m *MarketplacePurchaseEvent) GetSender() *User { + if m == nil { + return nil } - return *i.Action + return m.Sender } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *InstallationRepositoriesEvent) GetAction() string { - if i == nil || i.Action == nil { +// GetText returns the Text field if it's non-nil, zero value otherwise. +func (m *Match) GetText() string { + if m == nil || m.Text == nil { return "" } - return *i.Action + return *m.Text } -// GetRepositorySelection returns the RepositorySelection field if it's non-nil, zero value otherwise. -func (i *InstallationRepositoriesEvent) GetRepositorySelection() string { - if i == nil || i.RepositorySelection == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (m *MemberEvent) GetAction() string { + if m == nil || m.Action == nil { return "" } - return *i.RepositorySelection + return *m.Action } -// GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. -func (i *InstallationToken) GetExpiresAt() time.Time { - if i == nil || i.ExpiresAt == nil { - return time.Time{} +// GetInstallation returns the Installation field. +func (m *MemberEvent) GetInstallation() *Installation { + if m == nil { + return nil } - return *i.ExpiresAt + return m.Installation } -// GetToken returns the Token field if it's non-nil, zero value otherwise. -func (i *InstallationToken) GetToken() string { - if i == nil || i.Token == nil { - return "" +// GetMember returns the Member field. +func (m *MemberEvent) GetMember() *User { + if m == nil { + return nil } - return *i.Token + return m.Member } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *Invitation) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} +// GetRepo returns the Repo field. +func (m *MemberEvent) GetRepo() *Repository { + if m == nil { + return nil } - return *i.CreatedAt + return m.Repo } -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (i *Invitation) GetEmail() string { - if i == nil || i.Email == nil { - return "" +// GetSender returns the Sender field. +func (m *MemberEvent) GetSender() *User { + if m == nil { + return nil } - return *i.Email + return m.Sender } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *Invitation) GetID() int { - if i == nil || i.ID == nil { - return 0 +// GetOrganization returns the Organization field. +func (m *Membership) GetOrganization() *Organization { + if m == nil { + return nil } - return *i.ID + return m.Organization } -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (i *Invitation) GetLogin() string { - if i == nil || i.Login == nil { +// GetOrganizationURL returns the OrganizationURL field if it's non-nil, zero value otherwise. +func (m *Membership) GetOrganizationURL() string { + if m == nil || m.OrganizationURL == nil { return "" } - return *i.Login + return *m.OrganizationURL } // GetRole returns the Role field if it's non-nil, zero value otherwise. -func (i *Invitation) GetRole() string { - if i == nil || i.Role == nil { +func (m *Membership) GetRole() string { + if m == nil || m.Role == nil { return "" } - return *i.Role + return *m.Role } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (i *Issue) GetBody() string { - if i == nil || i.Body == nil { +// GetState returns the State field if it's non-nil, zero value otherwise. +func (m *Membership) GetState() string { + if m == nil || m.State == nil { return "" } - return *i.Body -} - -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (i *Issue) GetClosedAt() time.Time { - if i == nil || i.ClosedAt == nil { - return time.Time{} - } - return *i.ClosedAt -} - -// GetComments returns the Comments field if it's non-nil, zero value otherwise. -func (i *Issue) GetComments() int { - if i == nil || i.Comments == nil { - return 0 - } - return *i.Comments + return *m.State } -// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetCommentsURL() string { - if i == nil || i.CommentsURL == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (m *Membership) GetURL() string { + if m == nil || m.URL == nil { return "" } - return *i.CommentsURL + return *m.URL } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *Issue) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} +// GetUser returns the User field. +func (m *Membership) GetUser() *User { + if m == nil { + return nil } - return *i.CreatedAt + return m.User } -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetEventsURL() string { - if i == nil || i.EventsURL == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (m *MembershipEvent) GetAction() string { + if m == nil || m.Action == nil { return "" } - return *i.EventsURL + return *m.Action } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { - return "" +// GetInstallation returns the Installation field. +func (m *MembershipEvent) GetInstallation() *Installation { + if m == nil { + return nil } - return *i.HTMLURL + return m.Installation } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *Issue) GetID() int { - if i == nil || i.ID == nil { - return 0 +// GetMember returns the Member field. +func (m *MembershipEvent) GetMember() *User { + if m == nil { + return nil } - return *i.ID + return m.Member } -// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetLabelsURL() string { - if i == nil || i.LabelsURL == nil { - return "" +// GetOrg returns the Org field. +func (m *MembershipEvent) GetOrg() *Organization { + if m == nil { + return nil } - return *i.LabelsURL + return m.Org } -// GetLocked returns the Locked field if it's non-nil, zero value otherwise. -func (i *Issue) GetLocked() bool { - if i == nil || i.Locked == nil { - return false +// GetScope returns the Scope field if it's non-nil, zero value otherwise. +func (m *MembershipEvent) GetScope() string { + if m == nil || m.Scope == nil { + return "" } - return *i.Locked + return *m.Scope } -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (i *Issue) GetNumber() int { - if i == nil || i.Number == nil { - return 0 +// GetSender returns the Sender field. +func (m *MembershipEvent) GetSender() *User { + if m == nil { + return nil } - return *i.Number + return m.Sender } -// GetRepositoryURL returns the RepositoryURL field if it's non-nil, zero value otherwise. -func (i *Issue) GetRepositoryURL() string { - if i == nil || i.RepositoryURL == nil { - return "" +// GetTeam returns the Team field. +func (m *MembershipEvent) GetTeam() *Team { + if m == nil { + return nil } - return *i.RepositoryURL + return m.Team } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (i *Issue) GetState() string { - if i == nil || i.State == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (m *Metric) GetHTMLURL() string { + if m == nil || m.HTMLURL == nil { return "" } - return *i.State + return *m.HTMLURL } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (i *Issue) GetTitle() string { - if i == nil || i.Title == nil { +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (m *Metric) GetKey() string { + if m == nil || m.Key == nil { return "" } - return *i.Title + return *m.Key } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (i *Issue) GetUpdatedAt() time.Time { - if i == nil || i.UpdatedAt == nil { - return time.Time{} +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (m *Metric) GetName() string { + if m == nil || m.Name == nil { + return "" } - return *i.UpdatedAt + return *m.Name } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *Issue) GetURL() string { - if i == nil || i.URL == nil { +func (m *Metric) GetURL() string { + if m == nil || m.URL == nil { return "" } - return *i.URL + return *m.URL } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetBody() string { - if i == nil || i.Body == nil { +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (m *Migration) GetCreatedAt() string { + if m == nil || m.CreatedAt == nil { return "" } - return *i.Body + return *m.CreatedAt } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { - return time.Time{} +// GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. +func (m *Migration) GetExcludeAttachments() bool { + if m == nil || m.ExcludeAttachments == nil { + return false } - return *i.CreatedAt + return *m.ExcludeAttachments } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetHTMLURL() string { - if i == nil || i.HTMLURL == nil { +// GetGUID returns the GUID field if it's non-nil, zero value otherwise. +func (m *Migration) GetGUID() string { + if m == nil || m.GUID == nil { return "" } - return *i.HTMLURL + return *m.GUID } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetID() int { - if i == nil || i.ID == nil { +func (m *Migration) GetID() int64 { + if m == nil || m.ID == nil { return 0 } - return *i.ID + return *m.ID } -// GetIssueURL returns the IssueURL field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetIssueURL() string { - if i == nil || i.IssueURL == nil { +// GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. +func (m *Migration) GetLockRepositories() bool { + if m == nil || m.LockRepositories == nil { + return false + } + return *m.LockRepositories +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (m *Migration) GetState() string { + if m == nil || m.State == nil { return "" } - return *i.IssueURL + return *m.State } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetUpdatedAt() time.Time { - if i == nil || i.UpdatedAt == nil { - return time.Time{} +func (m *Migration) GetUpdatedAt() string { + if m == nil || m.UpdatedAt == nil { + return "" } - return *i.UpdatedAt + return *m.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *IssueComment) GetURL() string { - if i == nil || i.URL == nil { +func (m *Migration) GetURL() string { + if m == nil || m.URL == nil { return "" } - return *i.URL + return *m.URL } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *IssueCommentEvent) GetAction() string { - if i == nil || i.Action == nil { - return "" +// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. +func (m *Milestone) GetClosedAt() time.Time { + if m == nil || m.ClosedAt == nil { + return time.Time{} } - return *i.Action + return *m.ClosedAt } -// GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetCommitID() string { - if i == nil || i.CommitID == nil { - return "" +// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. +func (m *Milestone) GetClosedIssues() int { + if m == nil || m.ClosedIssues == nil { + return 0 } - return *i.CommitID + return *m.ClosedIssues } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetCreatedAt() time.Time { - if i == nil || i.CreatedAt == nil { +func (m *Milestone) GetCreatedAt() time.Time { + if m == nil || m.CreatedAt == nil { return time.Time{} } - return *i.CreatedAt + return *m.CreatedAt } -// GetEvent returns the Event field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetEvent() string { - if i == nil || i.Event == nil { - return "" +// GetCreator returns the Creator field. +func (m *Milestone) GetCreator() *User { + if m == nil { + return nil } - return *i.Event + return m.Creator } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetID() int { - if i == nil || i.ID == nil { - return 0 +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (m *Milestone) GetDescription() string { + if m == nil || m.Description == nil { + return "" } - return *i.ID + return *m.Description } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (i *IssueEvent) GetURL() string { - if i == nil || i.URL == nil { - return "" +// GetDueOn returns the DueOn field if it's non-nil, zero value otherwise. +func (m *Milestone) GetDueOn() time.Time { + if m == nil || m.DueOn == nil { + return time.Time{} } - return *i.URL + return *m.DueOn } -// GetAssignee returns the Assignee field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetAssignee() string { - if i == nil || i.Assignee == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (m *Milestone) GetHTMLURL() string { + if m == nil || m.HTMLURL == nil { return "" } - return *i.Assignee + return *m.HTMLURL } -// GetAssignees returns the Assignees field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetAssignees() []string { - if i == nil || i.Assignees == nil { - return nil +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (m *Milestone) GetID() int64 { + if m == nil || m.ID == nil { + return 0 } - return *i.Assignees + return *m.ID } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetBody() string { - if i == nil || i.Body == nil { +// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. +func (m *Milestone) GetLabelsURL() string { + if m == nil || m.LabelsURL == nil { return "" } - return *i.Body + return *m.LabelsURL } -// GetLabels returns the Labels field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetLabels() []string { - if i == nil || i.Labels == nil { - return nil +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (m *Milestone) GetNodeID() string { + if m == nil || m.NodeID == nil { + return "" } - return *i.Labels + return *m.NodeID } -// GetMilestone returns the Milestone field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetMilestone() int { - if i == nil || i.Milestone == nil { +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (m *Milestone) GetNumber() int { + if m == nil || m.Number == nil { return 0 } - return *i.Milestone + return *m.Number } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetState() string { - if i == nil || i.State == nil { - return "" +// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. +func (m *Milestone) GetOpenIssues() int { + if m == nil || m.OpenIssues == nil { + return 0 } - return *i.State + return *m.OpenIssues } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (i *IssueRequest) GetTitle() string { - if i == nil || i.Title == nil { +// GetState returns the State field if it's non-nil, zero value otherwise. +func (m *Milestone) GetState() string { + if m == nil || m.State == nil { return "" } - return *i.Title + return *m.State } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (i *IssuesEvent) GetAction() string { - if i == nil || i.Action == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (m *Milestone) GetTitle() string { + if m == nil || m.Title == nil { return "" } - return *i.Action + return *m.Title } -// GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. -func (i *IssuesSearchResult) GetIncompleteResults() bool { - if i == nil || i.IncompleteResults == nil { - return false +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (m *Milestone) GetUpdatedAt() time.Time { + if m == nil || m.UpdatedAt == nil { + return time.Time{} } - return *i.IncompleteResults + return *m.UpdatedAt } -// GetTotal returns the Total field if it's non-nil, zero value otherwise. -func (i *IssuesSearchResult) GetTotal() int { - if i == nil || i.Total == nil { - return 0 +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (m *Milestone) GetURL() string { + if m == nil || m.URL == nil { + return "" } - return *i.Total + return *m.URL } -// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. -func (i *IssueStats) GetClosedIssues() int { - if i == nil || i.ClosedIssues == nil { - return 0 +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (m *MilestoneEvent) GetAction() string { + if m == nil || m.Action == nil { + return "" } - return *i.ClosedIssues + return *m.Action } -// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. -func (i *IssueStats) GetOpenIssues() int { - if i == nil || i.OpenIssues == nil { - return 0 +// GetChanges returns the Changes field. +func (m *MilestoneEvent) GetChanges() *EditChange { + if m == nil { + return nil } - return *i.OpenIssues + return m.Changes } -// GetTotalIssues returns the TotalIssues field if it's non-nil, zero value otherwise. -func (i *IssueStats) GetTotalIssues() int { - if i == nil || i.TotalIssues == nil { - return 0 +// GetInstallation returns the Installation field. +func (m *MilestoneEvent) GetInstallation() *Installation { + if m == nil { + return nil } - return *i.TotalIssues + return m.Installation } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (k *Key) GetID() int { - if k == nil || k.ID == nil { - return 0 +// GetMilestone returns the Milestone field. +func (m *MilestoneEvent) GetMilestone() *Milestone { + if m == nil { + return nil } - return *k.ID + return m.Milestone } -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (k *Key) GetKey() string { - if k == nil || k.Key == nil { - return "" +// GetOrg returns the Org field. +func (m *MilestoneEvent) GetOrg() *Organization { + if m == nil { + return nil } - return *k.Key + return m.Org } -// GetReadOnly returns the ReadOnly field if it's non-nil, zero value otherwise. -func (k *Key) GetReadOnly() bool { - if k == nil || k.ReadOnly == nil { - return false +// GetRepo returns the Repo field. +func (m *MilestoneEvent) GetRepo() *Repository { + if m == nil { + return nil } - return *k.ReadOnly + return m.Repo } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (k *Key) GetTitle() string { - if k == nil || k.Title == nil { - return "" +// GetSender returns the Sender field. +func (m *MilestoneEvent) GetSender() *User { + if m == nil { + return nil } - return *k.Title + return m.Sender } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (k *Key) GetURL() string { - if k == nil || k.URL == nil { - return "" +// GetClosedMilestones returns the ClosedMilestones field if it's non-nil, zero value otherwise. +func (m *MilestoneStats) GetClosedMilestones() int { + if m == nil || m.ClosedMilestones == nil { + return 0 } - return *k.URL + return *m.ClosedMilestones } -// GetColor returns the Color field if it's non-nil, zero value otherwise. -func (l *Label) GetColor() string { - if l == nil || l.Color == nil { - return "" +// GetOpenMilestones returns the OpenMilestones field if it's non-nil, zero value otherwise. +func (m *MilestoneStats) GetOpenMilestones() int { + if m == nil || m.OpenMilestones == nil { + return 0 } - return *l.Color + return *m.OpenMilestones } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (l *Label) GetID() int { - if l == nil || l.ID == nil { +// GetTotalMilestones returns the TotalMilestones field if it's non-nil, zero value otherwise. +func (m *MilestoneStats) GetTotalMilestones() int { + if m == nil || m.TotalMilestones == nil { return 0 } - return *l.ID + return *m.TotalMilestones } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (l *Label) GetName() string { - if l == nil || l.Name == nil { +// GetBase returns the Base field if it's non-nil, zero value otherwise. +func (n *NewPullRequest) GetBase() string { + if n == nil || n.Base == nil { return "" } - return *l.Name + return *n.Base } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (l *Label) GetURL() string { - if l == nil || l.URL == nil { +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (n *NewPullRequest) GetBody() string { + if n == nil || n.Body == nil { return "" } - return *l.URL + return *n.Body } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (l *LabelEvent) GetAction() string { - if l == nil || l.Action == nil { +// GetHead returns the Head field if it's non-nil, zero value otherwise. +func (n *NewPullRequest) GetHead() string { + if n == nil || n.Head == nil { return "" } - return *l.Action + return *n.Head } -// GetOID returns the OID field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetOID() string { - if l == nil || l.OID == nil { - return "" +// GetIssue returns the Issue field if it's non-nil, zero value otherwise. +func (n *NewPullRequest) GetIssue() int { + if n == nil || n.Issue == nil { + return 0 } - return *l.OID + return *n.Issue } -// GetPath returns the Path field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetPath() string { - if l == nil || l.Path == nil { - return "" +// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. +func (n *NewPullRequest) GetMaintainerCanModify() bool { + if n == nil || n.MaintainerCanModify == nil { + return false } - return *l.Path + return *n.MaintainerCanModify } -// GetRefName returns the RefName field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetRefName() string { - if l == nil || l.RefName == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (n *NewPullRequest) GetTitle() string { + if n == nil || n.Title == nil { return "" } - return *l.RefName + return *n.Title } -// GetSize returns the Size field if it's non-nil, zero value otherwise. -func (l *LargeFile) GetSize() int { - if l == nil || l.Size == nil { - return 0 +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (n *NewTeam) GetDescription() string { + if n == nil || n.Description == nil { + return "" } - return *l.Size + return *n.Description } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (l *License) GetBody() string { - if l == nil || l.Body == nil { +// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. +func (n *NewTeam) GetLDAPDN() string { + if n == nil || n.LDAPDN == nil { return "" } - return *l.Body + return *n.LDAPDN } -// GetConditions returns the Conditions field if it's non-nil, zero value otherwise. -func (l *License) GetConditions() []string { - if l == nil || l.Conditions == nil { - return nil +// GetParentTeamID returns the ParentTeamID field if it's non-nil, zero value otherwise. +func (n *NewTeam) GetParentTeamID() int64 { + if n == nil || n.ParentTeamID == nil { + return 0 } - return *l.Conditions + return *n.ParentTeamID } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (l *License) GetDescription() string { - if l == nil || l.Description == nil { +// GetPermission returns the Permission field if it's non-nil, zero value otherwise. +func (n *NewTeam) GetPermission() string { + if n == nil || n.Permission == nil { return "" } - return *l.Description + return *n.Permission } -// GetFeatured returns the Featured field if it's non-nil, zero value otherwise. -func (l *License) GetFeatured() bool { - if l == nil || l.Featured == nil { - return false +// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. +func (n *NewTeam) GetPrivacy() string { + if n == nil || n.Privacy == nil { + return "" } - return *l.Featured + return *n.Privacy } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (l *License) GetHTMLURL() string { - if l == nil || l.HTMLURL == nil { +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (n *Notification) GetID() string { + if n == nil || n.ID == nil { return "" } - return *l.HTMLURL + return *n.ID } -// GetImplementation returns the Implementation field if it's non-nil, zero value otherwise. -func (l *License) GetImplementation() string { - if l == nil || l.Implementation == nil { - return "" +// GetLastReadAt returns the LastReadAt field if it's non-nil, zero value otherwise. +func (n *Notification) GetLastReadAt() time.Time { + if n == nil || n.LastReadAt == nil { + return time.Time{} } - return *l.Implementation + return *n.LastReadAt } -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (l *License) GetKey() string { - if l == nil || l.Key == nil { +// GetReason returns the Reason field if it's non-nil, zero value otherwise. +func (n *Notification) GetReason() string { + if n == nil || n.Reason == nil { return "" } - return *l.Key + return *n.Reason } -// GetLimitations returns the Limitations field if it's non-nil, zero value otherwise. -func (l *License) GetLimitations() []string { - if l == nil || l.Limitations == nil { +// GetRepository returns the Repository field. +func (n *Notification) GetRepository() *Repository { + if n == nil { return nil } - return *l.Limitations + return n.Repository } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (l *License) GetName() string { - if l == nil || l.Name == nil { - return "" +// GetSubject returns the Subject field. +func (n *Notification) GetSubject() *NotificationSubject { + if n == nil { + return nil } - return *l.Name + return n.Subject } -// GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. -func (l *License) GetPermissions() []string { - if l == nil || l.Permissions == nil { - return nil +// GetUnread returns the Unread field if it's non-nil, zero value otherwise. +func (n *Notification) GetUnread() bool { + if n == nil || n.Unread == nil { + return false } - return *l.Permissions + return *n.Unread } -// GetSPDXID returns the SPDXID field if it's non-nil, zero value otherwise. -func (l *License) GetSPDXID() string { - if l == nil || l.SPDXID == nil { - return "" +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (n *Notification) GetUpdatedAt() time.Time { + if n == nil || n.UpdatedAt == nil { + return time.Time{} } - return *l.SPDXID + return *n.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (l *License) GetURL() string { - if l == nil || l.URL == nil { +func (n *Notification) GetURL() string { + if n == nil || n.URL == nil { return "" } - return *l.URL + return *n.URL } -// GetContext returns the Context field if it's non-nil, zero value otherwise. -func (m *markdownRequest) GetContext() string { - if m == nil || m.Context == nil { +// GetLatestCommentURL returns the LatestCommentURL field if it's non-nil, zero value otherwise. +func (n *NotificationSubject) GetLatestCommentURL() string { + if n == nil || n.LatestCommentURL == nil { return "" } - return *m.Context + return *n.LatestCommentURL } -// GetMode returns the Mode field if it's non-nil, zero value otherwise. -func (m *markdownRequest) GetMode() string { - if m == nil || m.Mode == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (n *NotificationSubject) GetTitle() string { + if n == nil || n.Title == nil { return "" } - return *m.Mode + return *n.Title } -// GetText returns the Text field if it's non-nil, zero value otherwise. -func (m *markdownRequest) GetText() string { - if m == nil || m.Text == nil { +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (n *NotificationSubject) GetType() string { + if n == nil || n.Type == nil { return "" } - return *m.Text + return *n.Type } -// GetText returns the Text field if it's non-nil, zero value otherwise. -func (m *Match) GetText() string { - if m == nil || m.Text == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (n *NotificationSubject) GetURL() string { + if n == nil || n.URL == nil { return "" } - return *m.Text + return *n.URL } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MemberEvent) GetAction() string { - if m == nil || m.Action == nil { +// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetAvatarURL() string { + if o == nil || o.AvatarURL == nil { return "" } - return *m.Action + return *o.AvatarURL } -// GetOrganizationURL returns the OrganizationURL field if it's non-nil, zero value otherwise. -func (m *Membership) GetOrganizationURL() string { - if m == nil || m.OrganizationURL == nil { +// GetBillingEmail returns the BillingEmail field if it's non-nil, zero value otherwise. +func (o *Organization) GetBillingEmail() string { + if o == nil || o.BillingEmail == nil { return "" } - return *m.OrganizationURL + return *o.BillingEmail } -// GetRole returns the Role field if it's non-nil, zero value otherwise. -func (m *Membership) GetRole() string { - if m == nil || m.Role == nil { +// GetBlog returns the Blog field if it's non-nil, zero value otherwise. +func (o *Organization) GetBlog() string { + if o == nil || o.Blog == nil { return "" } - return *m.Role + return *o.Blog } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *Membership) GetState() string { - if m == nil || m.State == nil { - return "" +// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. +func (o *Organization) GetCollaborators() int { + if o == nil || o.Collaborators == nil { + return 0 } - return *m.State + return *o.Collaborators } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Membership) GetURL() string { - if m == nil || m.URL == nil { +// GetCompany returns the Company field if it's non-nil, zero value otherwise. +func (o *Organization) GetCompany() string { + if o == nil || o.Company == nil { return "" } - return *m.URL + return *o.Company } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MembershipEvent) GetAction() string { - if m == nil || m.Action == nil { - return "" +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (o *Organization) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt == nil { + return time.Time{} } - return *m.Action + return *o.CreatedAt } -// GetScope returns the Scope field if it's non-nil, zero value otherwise. -func (m *MembershipEvent) GetScope() string { - if m == nil || m.Scope == nil { +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (o *Organization) GetDescription() string { + if o == nil || o.Description == nil { return "" } - return *m.Scope + return *o.Description } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (m *Metric) GetHTMLURL() string { - if m == nil || m.HTMLURL == nil { - return "" +// GetDiskUsage returns the DiskUsage field if it's non-nil, zero value otherwise. +func (o *Organization) GetDiskUsage() int { + if o == nil || o.DiskUsage == nil { + return 0 } - return *m.HTMLURL + return *o.DiskUsage } -// GetKey returns the Key field if it's non-nil, zero value otherwise. -func (m *Metric) GetKey() string { - if m == nil || m.Key == nil { +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (o *Organization) GetEmail() string { + if o == nil || o.Email == nil { return "" } - return *m.Key + return *o.Email } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (m *Metric) GetName() string { - if m == nil || m.Name == nil { +// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetEventsURL() string { + if o == nil || o.EventsURL == nil { return "" } - return *m.Name + return *o.EventsURL } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Metric) GetURL() string { - if m == nil || m.URL == nil { - return "" +// GetFollowers returns the Followers field if it's non-nil, zero value otherwise. +func (o *Organization) GetFollowers() int { + if o == nil || o.Followers == nil { + return 0 } - return *m.URL + return *o.Followers } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (m *Migration) GetCreatedAt() string { - if m == nil || m.CreatedAt == nil { - return "" +// GetFollowing returns the Following field if it's non-nil, zero value otherwise. +func (o *Organization) GetFollowing() int { + if o == nil || o.Following == nil { + return 0 } - return *m.CreatedAt + return *o.Following } -// GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. -func (m *Migration) GetExcludeAttachments() bool { - if m == nil || m.ExcludeAttachments == nil { - return false +// GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetHooksURL() string { + if o == nil || o.HooksURL == nil { + return "" } - return *m.ExcludeAttachments + return *o.HooksURL } -// GetGUID returns the GUID field if it's non-nil, zero value otherwise. -func (m *Migration) GetGUID() string { - if m == nil || m.GUID == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetHTMLURL() string { + if o == nil || o.HTMLURL == nil { return "" } - return *m.GUID + return *o.HTMLURL } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *Migration) GetID() int { - if m == nil || m.ID == nil { +func (o *Organization) GetID() int64 { + if o == nil || o.ID == nil { return 0 } - return *m.ID -} - -// GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. -func (m *Migration) GetLockRepositories() bool { - if m == nil || m.LockRepositories == nil { - return false - } - return *m.LockRepositories + return *o.ID } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *Migration) GetState() string { - if m == nil || m.State == nil { +// GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetIssuesURL() string { + if o == nil || o.IssuesURL == nil { return "" } - return *m.State + return *o.IssuesURL } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (m *Migration) GetUpdatedAt() string { - if m == nil || m.UpdatedAt == nil { +// GetLocation returns the Location field if it's non-nil, zero value otherwise. +func (o *Organization) GetLocation() string { + if o == nil || o.Location == nil { return "" } - return *m.UpdatedAt + return *o.Location } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Migration) GetURL() string { - if m == nil || m.URL == nil { +// GetLogin returns the Login field if it's non-nil, zero value otherwise. +func (o *Organization) GetLogin() string { + if o == nil || o.Login == nil { return "" } - return *m.URL + return *o.Login } -// GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise. -func (m *Milestone) GetClosedAt() time.Time { - if m == nil || m.ClosedAt == nil { - return time.Time{} +// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetMembersURL() string { + if o == nil || o.MembersURL == nil { + return "" } - return *m.ClosedAt + return *o.MembersURL } -// GetClosedIssues returns the ClosedIssues field if it's non-nil, zero value otherwise. -func (m *Milestone) GetClosedIssues() int { - if m == nil || m.ClosedIssues == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (o *Organization) GetName() string { + if o == nil || o.Name == nil { + return "" } - return *m.ClosedIssues + return *o.Name } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (m *Milestone) GetCreatedAt() time.Time { - if m == nil || m.CreatedAt == nil { - return time.Time{} +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (o *Organization) GetNodeID() string { + if o == nil || o.NodeID == nil { + return "" } - return *m.CreatedAt + return *o.NodeID } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (m *Milestone) GetDescription() string { - if m == nil || m.Description == nil { - return "" +// GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. +func (o *Organization) GetOwnedPrivateRepos() int { + if o == nil || o.OwnedPrivateRepos == nil { + return 0 } - return *m.Description + return *o.OwnedPrivateRepos } -// GetDueOn returns the DueOn field if it's non-nil, zero value otherwise. -func (m *Milestone) GetDueOn() time.Time { - if m == nil || m.DueOn == nil { - return time.Time{} +// GetPlan returns the Plan field. +func (o *Organization) GetPlan() *Plan { + if o == nil { + return nil } - return *m.DueOn + return o.Plan } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (m *Milestone) GetHTMLURL() string { - if m == nil || m.HTMLURL == nil { - return "" +// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. +func (o *Organization) GetPrivateGists() int { + if o == nil || o.PrivateGists == nil { + return 0 } - return *m.HTMLURL + return *o.PrivateGists } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (m *Milestone) GetID() int { - if m == nil || m.ID == nil { +// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. +func (o *Organization) GetPublicGists() int { + if o == nil || o.PublicGists == nil { return 0 } - return *m.ID + return *o.PublicGists } -// GetLabelsURL returns the LabelsURL field if it's non-nil, zero value otherwise. -func (m *Milestone) GetLabelsURL() string { - if m == nil || m.LabelsURL == nil { +// GetPublicMembersURL returns the PublicMembersURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetPublicMembersURL() string { + if o == nil || o.PublicMembersURL == nil { return "" } - return *m.LabelsURL + return *o.PublicMembersURL } -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (m *Milestone) GetNumber() int { - if m == nil || m.Number == nil { +// GetPublicRepos returns the PublicRepos field if it's non-nil, zero value otherwise. +func (o *Organization) GetPublicRepos() int { + if o == nil || o.PublicRepos == nil { return 0 } - return *m.Number + return *o.PublicRepos } -// GetOpenIssues returns the OpenIssues field if it's non-nil, zero value otherwise. -func (m *Milestone) GetOpenIssues() int { - if m == nil || m.OpenIssues == nil { - return 0 +// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. +func (o *Organization) GetReposURL() string { + if o == nil || o.ReposURL == nil { + return "" } - return *m.OpenIssues + return *o.ReposURL } -// GetState returns the State field if it's non-nil, zero value otherwise. -func (m *Milestone) GetState() string { - if m == nil || m.State == nil { - return "" +// GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. +func (o *Organization) GetTotalPrivateRepos() int { + if o == nil || o.TotalPrivateRepos == nil { + return 0 + } + return *o.TotalPrivateRepos +} + +// GetTwoFactorRequirementEnabled returns the TwoFactorRequirementEnabled field if it's non-nil, zero value otherwise. +func (o *Organization) GetTwoFactorRequirementEnabled() bool { + if o == nil || o.TwoFactorRequirementEnabled == nil { + return false } - return *m.State + return *o.TwoFactorRequirementEnabled } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (m *Milestone) GetTitle() string { - if m == nil || m.Title == nil { +// GetType returns the Type field if it's non-nil, zero value otherwise. +func (o *Organization) GetType() string { + if o == nil || o.Type == nil { return "" } - return *m.Title + return *o.Type } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (m *Milestone) GetUpdatedAt() time.Time { - if m == nil || m.UpdatedAt == nil { +func (o *Organization) GetUpdatedAt() time.Time { + if o == nil || o.UpdatedAt == nil { return time.Time{} } - return *m.UpdatedAt + return *o.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (m *Milestone) GetURL() string { - if m == nil || m.URL == nil { +func (o *Organization) GetURL() string { + if o == nil || o.URL == nil { return "" } - return *m.URL + return *o.URL } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (m *MilestoneEvent) GetAction() string { - if m == nil || m.Action == nil { +func (o *OrganizationEvent) GetAction() string { + if o == nil || o.Action == nil { return "" } - return *m.Action + return *o.Action } -// GetClosedMilestones returns the ClosedMilestones field if it's non-nil, zero value otherwise. -func (m *MilestoneStats) GetClosedMilestones() int { - if m == nil || m.ClosedMilestones == nil { - return 0 +// GetInstallation returns the Installation field. +func (o *OrganizationEvent) GetInstallation() *Installation { + if o == nil { + return nil } - return *m.ClosedMilestones + return o.Installation } -// GetOpenMilestones returns the OpenMilestones field if it's non-nil, zero value otherwise. -func (m *MilestoneStats) GetOpenMilestones() int { - if m == nil || m.OpenMilestones == nil { - return 0 +// GetInvitation returns the Invitation field. +func (o *OrganizationEvent) GetInvitation() *Invitation { + if o == nil { + return nil } - return *m.OpenMilestones + return o.Invitation } -// GetTotalMilestones returns the TotalMilestones field if it's non-nil, zero value otherwise. -func (m *MilestoneStats) GetTotalMilestones() int { - if m == nil || m.TotalMilestones == nil { - return 0 +// GetMembership returns the Membership field. +func (o *OrganizationEvent) GetMembership() *Membership { + if o == nil { + return nil } - return *m.TotalMilestones + return o.Membership } -// GetBase returns the Base field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetBase() string { - if n == nil || n.Base == nil { - return "" +// GetOrganization returns the Organization field. +func (o *OrganizationEvent) GetOrganization() *Organization { + if o == nil { + return nil } - return *n.Base + return o.Organization } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetBody() string { - if n == nil || n.Body == nil { - return "" +// GetSender returns the Sender field. +func (o *OrganizationEvent) GetSender() *User { + if o == nil { + return nil } - return *n.Body + return o.Sender } -// GetHead returns the Head field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetHead() string { - if n == nil || n.Head == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (o *OrgBlockEvent) GetAction() string { + if o == nil || o.Action == nil { return "" } - return *n.Head + return *o.Action } -// GetIssue returns the Issue field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetIssue() int { - if n == nil || n.Issue == nil { - return 0 +// GetBlockedUser returns the BlockedUser field. +func (o *OrgBlockEvent) GetBlockedUser() *User { + if o == nil { + return nil } - return *n.Issue + return o.BlockedUser } -// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetMaintainerCanModify() bool { - if n == nil || n.MaintainerCanModify == nil { - return false +// GetInstallation returns the Installation field. +func (o *OrgBlockEvent) GetInstallation() *Installation { + if o == nil { + return nil } - return *n.MaintainerCanModify + return o.Installation } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (n *NewPullRequest) GetTitle() string { - if n == nil || n.Title == nil { - return "" +// GetOrganization returns the Organization field. +func (o *OrgBlockEvent) GetOrganization() *Organization { + if o == nil { + return nil } - return *n.Title + return o.Organization } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetDescription() string { - if n == nil || n.Description == nil { - return "" +// GetSender returns the Sender field. +func (o *OrgBlockEvent) GetSender() *User { + if o == nil { + return nil } - return *n.Description + return o.Sender } -// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetLDAPDN() string { - if n == nil || n.LDAPDN == nil { - return "" +// GetDisabledOrgs returns the DisabledOrgs field if it's non-nil, zero value otherwise. +func (o *OrgStats) GetDisabledOrgs() int { + if o == nil || o.DisabledOrgs == nil { + return 0 } - return *n.LDAPDN + return *o.DisabledOrgs } -// GetParentTeamID returns the ParentTeamID field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetParentTeamID() int { - if n == nil || n.ParentTeamID == nil { +// GetTotalOrgs returns the TotalOrgs field if it's non-nil, zero value otherwise. +func (o *OrgStats) GetTotalOrgs() int { + if o == nil || o.TotalOrgs == nil { return 0 } - return *n.ParentTeamID + return *o.TotalOrgs } -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetPermission() string { - if n == nil || n.Permission == nil { - return "" +// GetTotalTeamMembers returns the TotalTeamMembers field if it's non-nil, zero value otherwise. +func (o *OrgStats) GetTotalTeamMembers() int { + if o == nil || o.TotalTeamMembers == nil { + return 0 } - return *n.Permission + return *o.TotalTeamMembers } -// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. -func (n *NewTeam) GetPrivacy() string { - if n == nil || n.Privacy == nil { - return "" +// GetTotalTeams returns the TotalTeams field if it's non-nil, zero value otherwise. +func (o *OrgStats) GetTotalTeams() int { + if o == nil || o.TotalTeams == nil { + return 0 } - return *n.Privacy + return *o.TotalTeams } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (n *Notification) GetID() string { - if n == nil || n.ID == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *Page) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *n.ID + return *p.Action } -// GetLastReadAt returns the LastReadAt field if it's non-nil, zero value otherwise. -func (n *Notification) GetLastReadAt() time.Time { - if n == nil || n.LastReadAt == nil { - return time.Time{} +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *Page) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { + return "" } - return *n.LastReadAt + return *p.HTMLURL } -// GetReason returns the Reason field if it's non-nil, zero value otherwise. -func (n *Notification) GetReason() string { - if n == nil || n.Reason == nil { +// GetPageName returns the PageName field if it's non-nil, zero value otherwise. +func (p *Page) GetPageName() string { + if p == nil || p.PageName == nil { return "" } - return *n.Reason + return *p.PageName } -// GetUnread returns the Unread field if it's non-nil, zero value otherwise. -func (n *Notification) GetUnread() bool { - if n == nil || n.Unread == nil { - return false +// GetSHA returns the SHA field if it's non-nil, zero value otherwise. +func (p *Page) GetSHA() string { + if p == nil || p.SHA == nil { + return "" } - return *n.Unread + return *p.SHA } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (n *Notification) GetUpdatedAt() time.Time { - if n == nil || n.UpdatedAt == nil { - return time.Time{} +// GetSummary returns the Summary field if it's non-nil, zero value otherwise. +func (p *Page) GetSummary() string { + if p == nil || p.Summary == nil { + return "" } - return *n.UpdatedAt + return *p.Summary } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (n *Notification) GetURL() string { - if n == nil || n.URL == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (p *Page) GetTitle() string { + if p == nil || p.Title == nil { return "" } - return *n.URL + return *p.Title } -// GetLatestCommentURL returns the LatestCommentURL field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetLatestCommentURL() string { - if n == nil || n.LatestCommentURL == nil { - return "" +// GetBuild returns the Build field. +func (p *PageBuildEvent) GetBuild() *PagesBuild { + if p == nil { + return nil } - return *n.LatestCommentURL + return p.Build } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetTitle() string { - if n == nil || n.Title == nil { - return "" +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *PageBuildEvent) GetID() int64 { + if p == nil || p.ID == nil { + return 0 } - return *n.Title + return *p.ID } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetType() string { - if n == nil || n.Type == nil { - return "" +// GetInstallation returns the Installation field. +func (p *PageBuildEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *n.Type + return p.Installation } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (n *NotificationSubject) GetURL() string { - if n == nil || n.URL == nil { - return "" +// GetRepo returns the Repo field. +func (p *PageBuildEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *n.URL + return p.Repo } -// GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetAvatarURL() string { - if o == nil || o.AvatarURL == nil { - return "" +// GetSender returns the Sender field. +func (p *PageBuildEvent) GetSender() *User { + if p == nil { + return nil } - return *o.AvatarURL + return p.Sender } -// GetBillingEmail returns the BillingEmail field if it's non-nil, zero value otherwise. -func (o *Organization) GetBillingEmail() string { - if o == nil || o.BillingEmail == nil { +// GetCNAME returns the CNAME field if it's non-nil, zero value otherwise. +func (p *Pages) GetCNAME() string { + if p == nil || p.CNAME == nil { return "" } - return *o.BillingEmail + return *p.CNAME } -// GetBlog returns the Blog field if it's non-nil, zero value otherwise. -func (o *Organization) GetBlog() string { - if o == nil || o.Blog == nil { +// GetCustom404 returns the Custom404 field if it's non-nil, zero value otherwise. +func (p *Pages) GetCustom404() bool { + if p == nil || p.Custom404 == nil { + return false + } + return *p.Custom404 +} + +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *Pages) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { return "" } - return *o.Blog + return *p.HTMLURL } -// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. -func (o *Organization) GetCollaborators() int { - if o == nil || o.Collaborators == nil { - return 0 +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (p *Pages) GetStatus() string { + if p == nil || p.Status == nil { + return "" } - return *o.Collaborators + return *p.Status } -// GetCompany returns the Company field if it's non-nil, zero value otherwise. -func (o *Organization) GetCompany() string { - if o == nil || o.Company == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *Pages) GetURL() string { + if p == nil || p.URL == nil { return "" } - return *o.Company + return *p.URL } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (o *Organization) GetCreatedAt() time.Time { - if o == nil || o.CreatedAt == nil { - return time.Time{} +// GetCommit returns the Commit field if it's non-nil, zero value otherwise. +func (p *PagesBuild) GetCommit() string { + if p == nil || p.Commit == nil { + return "" } - return *o.CreatedAt + return *p.Commit } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (o *Organization) GetDescription() string { - if o == nil || o.Description == nil { - return "" +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (p *PagesBuild) GetCreatedAt() Timestamp { + if p == nil || p.CreatedAt == nil { + return Timestamp{} } - return *o.Description + return *p.CreatedAt } -// GetDiskUsage returns the DiskUsage field if it's non-nil, zero value otherwise. -func (o *Organization) GetDiskUsage() int { - if o == nil || o.DiskUsage == nil { +// GetDuration returns the Duration field if it's non-nil, zero value otherwise. +func (p *PagesBuild) GetDuration() int { + if p == nil || p.Duration == nil { return 0 } - return *o.DiskUsage + return *p.Duration } -// GetEmail returns the Email field if it's non-nil, zero value otherwise. -func (o *Organization) GetEmail() string { - if o == nil || o.Email == nil { - return "" +// GetError returns the Error field. +func (p *PagesBuild) GetError() *PagesError { + if p == nil { + return nil } - return *o.Email + return p.Error } -// GetEventsURL returns the EventsURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetEventsURL() string { - if o == nil || o.EventsURL == nil { - return "" +// GetPusher returns the Pusher field. +func (p *PagesBuild) GetPusher() *User { + if p == nil { + return nil } - return *o.EventsURL + return p.Pusher } -// GetFollowers returns the Followers field if it's non-nil, zero value otherwise. -func (o *Organization) GetFollowers() int { - if o == nil || o.Followers == nil { - return 0 +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (p *PagesBuild) GetStatus() string { + if p == nil || p.Status == nil { + return "" } - return *o.Followers + return *p.Status } -// GetFollowing returns the Following field if it's non-nil, zero value otherwise. -func (o *Organization) GetFollowing() int { - if o == nil || o.Following == nil { - return 0 +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *PagesBuild) GetUpdatedAt() Timestamp { + if p == nil || p.UpdatedAt == nil { + return Timestamp{} } - return *o.Following + return *p.UpdatedAt } -// GetHooksURL returns the HooksURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetHooksURL() string { - if o == nil || o.HooksURL == nil { +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *PagesBuild) GetURL() string { + if p == nil || p.URL == nil { return "" } - return *o.HooksURL + return *p.URL } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetHTMLURL() string { - if o == nil || o.HTMLURL == nil { +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (p *PagesError) GetMessage() string { + if p == nil || p.Message == nil { return "" } - return *o.HTMLURL + return *p.Message } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (o *Organization) GetID() int { - if o == nil || o.ID == nil { +// GetTotalPages returns the TotalPages field if it's non-nil, zero value otherwise. +func (p *PageStats) GetTotalPages() int { + if p == nil || p.TotalPages == nil { return 0 } - return *o.ID + return *p.TotalPages } -// GetIssuesURL returns the IssuesURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetIssuesURL() string { - if o == nil || o.IssuesURL == nil { - return "" +// GetHook returns the Hook field. +func (p *PingEvent) GetHook() *Hook { + if p == nil { + return nil } - return *o.IssuesURL + return p.Hook } -// GetLocation returns the Location field if it's non-nil, zero value otherwise. -func (o *Organization) GetLocation() string { - if o == nil || o.Location == nil { - return "" +// GetHookID returns the HookID field if it's non-nil, zero value otherwise. +func (p *PingEvent) GetHookID() int64 { + if p == nil || p.HookID == nil { + return 0 } - return *o.Location + return *p.HookID } -// GetLogin returns the Login field if it's non-nil, zero value otherwise. -func (o *Organization) GetLogin() string { - if o == nil || o.Login == nil { - return "" +// GetInstallation returns the Installation field. +func (p *PingEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *o.Login + return p.Installation } -// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetMembersURL() string { - if o == nil || o.MembersURL == nil { +// GetZen returns the Zen field if it's non-nil, zero value otherwise. +func (p *PingEvent) GetZen() string { + if p == nil || p.Zen == nil { return "" } - return *o.MembersURL + return *p.Zen } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (o *Organization) GetName() string { - if o == nil || o.Name == nil { - return "" +// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. +func (p *Plan) GetCollaborators() int { + if p == nil || p.Collaborators == nil { + return 0 } - return *o.Name + return *p.Collaborators } -// GetOwnedPrivateRepos returns the OwnedPrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetOwnedPrivateRepos() int { - if o == nil || o.OwnedPrivateRepos == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *Plan) GetName() string { + if p == nil || p.Name == nil { + return "" } - return *o.OwnedPrivateRepos + return *p.Name } -// GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. -func (o *Organization) GetPrivateGists() int { - if o == nil || o.PrivateGists == nil { +// GetPrivateRepos returns the PrivateRepos field if it's non-nil, zero value otherwise. +func (p *Plan) GetPrivateRepos() int { + if p == nil || p.PrivateRepos == nil { return 0 } - return *o.PrivateGists + return *p.PrivateRepos } -// GetPublicGists returns the PublicGists field if it's non-nil, zero value otherwise. -func (o *Organization) GetPublicGists() int { - if o == nil || o.PublicGists == nil { +// GetSpace returns the Space field if it's non-nil, zero value otherwise. +func (p *Plan) GetSpace() int { + if p == nil || p.Space == nil { return 0 } - return *o.PublicGists + return *p.Space } -// GetPublicMembersURL returns the PublicMembersURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetPublicMembersURL() string { - if o == nil || o.PublicMembersURL == nil { +// GetConfigURL returns the ConfigURL field if it's non-nil, zero value otherwise. +func (p *PreReceiveHook) GetConfigURL() string { + if p == nil || p.ConfigURL == nil { return "" } - return *o.PublicMembersURL -} - -// GetPublicRepos returns the PublicRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetPublicRepos() int { - if o == nil || o.PublicRepos == nil { - return 0 - } - return *o.PublicRepos + return *p.ConfigURL } -// GetReposURL returns the ReposURL field if it's non-nil, zero value otherwise. -func (o *Organization) GetReposURL() string { - if o == nil || o.ReposURL == nil { +// GetEnforcement returns the Enforcement field if it's non-nil, zero value otherwise. +func (p *PreReceiveHook) GetEnforcement() string { + if p == nil || p.Enforcement == nil { return "" } - return *o.ReposURL + return *p.Enforcement } -// GetTotalPrivateRepos returns the TotalPrivateRepos field if it's non-nil, zero value otherwise. -func (o *Organization) GetTotalPrivateRepos() int { - if o == nil || o.TotalPrivateRepos == nil { +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *PreReceiveHook) GetID() int64 { + if p == nil || p.ID == nil { return 0 } - return *o.TotalPrivateRepos + return *p.ID } -// GetType returns the Type field if it's non-nil, zero value otherwise. -func (o *Organization) GetType() string { - if o == nil || o.Type == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *PreReceiveHook) GetName() string { + if p == nil || p.Name == nil { return "" } - return *o.Type + return *p.Name } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (o *Organization) GetUpdatedAt() time.Time { - if o == nil || o.UpdatedAt == nil { - return time.Time{} +// GetHRef returns the HRef field if it's non-nil, zero value otherwise. +func (p *PRLink) GetHRef() string { + if p == nil || p.HRef == nil { + return "" } - return *o.UpdatedAt + return *p.HRef } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (o *Organization) GetURL() string { - if o == nil || o.URL == nil { - return "" +// GetComments returns the Comments field. +func (p *PRLinks) GetComments() *PRLink { + if p == nil { + return nil } - return *o.URL + return p.Comments } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (o *OrganizationEvent) GetAction() string { - if o == nil || o.Action == nil { - return "" +// GetCommits returns the Commits field. +func (p *PRLinks) GetCommits() *PRLink { + if p == nil { + return nil } - return *o.Action + return p.Commits } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (o *OrgBlockEvent) GetAction() string { - if o == nil || o.Action == nil { - return "" +// GetHTML returns the HTML field. +func (p *PRLinks) GetHTML() *PRLink { + if p == nil { + return nil } - return *o.Action + return p.HTML } -// GetDisabledOrgs returns the DisabledOrgs field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetDisabledOrgs() int { - if o == nil || o.DisabledOrgs == nil { - return 0 +// GetIssue returns the Issue field. +func (p *PRLinks) GetIssue() *PRLink { + if p == nil { + return nil } - return *o.DisabledOrgs + return p.Issue } -// GetTotalOrgs returns the TotalOrgs field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetTotalOrgs() int { - if o == nil || o.TotalOrgs == nil { - return 0 +// GetReviewComment returns the ReviewComment field. +func (p *PRLinks) GetReviewComment() *PRLink { + if p == nil { + return nil } - return *o.TotalOrgs + return p.ReviewComment } -// GetTotalTeamMembers returns the TotalTeamMembers field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetTotalTeamMembers() int { - if o == nil || o.TotalTeamMembers == nil { - return 0 +// GetReviewComments returns the ReviewComments field. +func (p *PRLinks) GetReviewComments() *PRLink { + if p == nil { + return nil } - return *o.TotalTeamMembers + return p.ReviewComments } -// GetTotalTeams returns the TotalTeams field if it's non-nil, zero value otherwise. -func (o *OrgStats) GetTotalTeams() int { - if o == nil || o.TotalTeams == nil { - return 0 +// GetSelf returns the Self field. +func (p *PRLinks) GetSelf() *PRLink { + if p == nil { + return nil } - return *o.TotalTeams + return p.Self } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *Page) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetStatuses returns the Statuses field. +func (p *PRLinks) GetStatuses() *PRLink { + if p == nil { + return nil } - return *p.Action + return p.Statuses } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *Page) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (p *Project) GetBody() string { + if p == nil || p.Body == nil { return "" } - return *p.HTMLURL + return *p.Body } -// GetPageName returns the PageName field if it's non-nil, zero value otherwise. -func (p *Page) GetPageName() string { - if p == nil || p.PageName == nil { +// GetColumnsURL returns the ColumnsURL field if it's non-nil, zero value otherwise. +func (p *Project) GetColumnsURL() string { + if p == nil || p.ColumnsURL == nil { return "" } - return *p.PageName + return *p.ColumnsURL } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (p *Page) GetSHA() string { - if p == nil || p.SHA == nil { - return "" +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (p *Project) GetCreatedAt() Timestamp { + if p == nil || p.CreatedAt == nil { + return Timestamp{} } - return *p.SHA + return *p.CreatedAt } -// GetSummary returns the Summary field if it's non-nil, zero value otherwise. -func (p *Page) GetSummary() string { - if p == nil || p.Summary == nil { - return "" +// GetCreator returns the Creator field. +func (p *Project) GetCreator() *User { + if p == nil { + return nil } - return *p.Summary + return p.Creator } -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *Page) GetTitle() string { - if p == nil || p.Title == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (p *Project) GetHTMLURL() string { + if p == nil || p.HTMLURL == nil { return "" } - return *p.Title + return *p.HTMLURL } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PageBuildEvent) GetID() int { +func (p *Project) GetID() int64 { if p == nil || p.ID == nil { return 0 } return *p.ID } -// GetCNAME returns the CNAME field if it's non-nil, zero value otherwise. -func (p *Pages) GetCNAME() string { - if p == nil || p.CNAME == nil { +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *Project) GetName() string { + if p == nil || p.Name == nil { return "" } - return *p.CNAME + return *p.Name } -// GetCustom404 returns the Custom404 field if it's non-nil, zero value otherwise. -func (p *Pages) GetCustom404() bool { - if p == nil || p.Custom404 == nil { - return false +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *Project) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" } - return *p.Custom404 + return *p.NodeID } -// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. -func (p *Pages) GetHTMLURL() string { - if p == nil || p.HTMLURL == nil { +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (p *Project) GetNumber() int { + if p == nil || p.Number == nil { + return 0 + } + return *p.Number +} + +// GetOwnerURL returns the OwnerURL field if it's non-nil, zero value otherwise. +func (p *Project) GetOwnerURL() string { + if p == nil || p.OwnerURL == nil { return "" } - return *p.HTMLURL + return *p.OwnerURL } -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (p *Pages) GetStatus() string { - if p == nil || p.Status == nil { +// GetState returns the State field if it's non-nil, zero value otherwise. +func (p *Project) GetState() string { + if p == nil || p.State == nil { return "" } - return *p.Status + return *p.State +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *Project) GetUpdatedAt() Timestamp { + if p == nil || p.UpdatedAt == nil { + return Timestamp{} + } + return *p.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Pages) GetURL() string { +func (p *Project) GetURL() string { if p == nil || p.URL == nil { return "" } return *p.URL } -// GetCommit returns the Commit field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetCommit() string { - if p == nil || p.Commit == nil { +// GetArchived returns the Archived field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetArchived() bool { + if p == nil || p.Archived == nil { + return false + } + return *p.Archived +} + +// GetColumnID returns the ColumnID field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetColumnID() int64 { + if p == nil || p.ColumnID == nil { + return 0 + } + return *p.ColumnID +} + +// GetColumnURL returns the ColumnURL field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetColumnURL() string { + if p == nil || p.ColumnURL == nil { return "" } - return *p.Commit + return *p.ColumnURL +} + +// GetContentURL returns the ContentURL field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetContentURL() string { + if p == nil || p.ContentURL == nil { + return "" + } + return *p.ContentURL } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetCreatedAt() Timestamp { +func (p *ProjectCard) GetCreatedAt() Timestamp { if p == nil || p.CreatedAt == nil { return Timestamp{} } return *p.CreatedAt } -// GetDuration returns the Duration field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetDuration() int { - if p == nil || p.Duration == nil { +// GetCreator returns the Creator field. +func (p *ProjectCard) GetCreator() *User { + if p == nil { + return nil + } + return p.Creator +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetID() int64 { + if p == nil || p.ID == nil { return 0 } - return *p.Duration + return *p.ID } -// GetStatus returns the Status field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetStatus() string { - if p == nil || p.Status == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetNodeID() string { + if p == nil || p.NodeID == nil { return "" } - return *p.Status + return *p.NodeID +} + +// GetNote returns the Note field if it's non-nil, zero value otherwise. +func (p *ProjectCard) GetNote() string { + if p == nil || p.Note == nil { + return "" + } + return *p.Note } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetUpdatedAt() Timestamp { +func (p *ProjectCard) GetUpdatedAt() Timestamp { if p == nil || p.UpdatedAt == nil { return Timestamp{} } @@ -3693,87 +6453,103 @@ func (p *PagesBuild) GetUpdatedAt() Timestamp { } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PagesBuild) GetURL() string { +func (p *ProjectCard) GetURL() string { if p == nil || p.URL == nil { return "" } return *p.URL } -// GetMessage returns the Message field if it's non-nil, zero value otherwise. -func (p *PagesError) GetMessage() string { - if p == nil || p.Message == nil { +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *ProjectCardEvent) GetAction() string { + if p == nil || p.Action == nil { return "" } - return *p.Message + return *p.Action } -// GetTotalPages returns the TotalPages field if it's non-nil, zero value otherwise. -func (p *PageStats) GetTotalPages() int { - if p == nil || p.TotalPages == nil { +// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. +func (p *ProjectCardEvent) GetAfterID() int64 { + if p == nil || p.AfterID == nil { return 0 } - return *p.TotalPages + return *p.AfterID } -// GetHookID returns the HookID field if it's non-nil, zero value otherwise. -func (p *PingEvent) GetHookID() int { - if p == nil || p.HookID == nil { - return 0 +// GetChanges returns the Changes field. +func (p *ProjectCardEvent) GetChanges() *ProjectCardChange { + if p == nil { + return nil } - return *p.HookID + return p.Changes } -// GetZen returns the Zen field if it's non-nil, zero value otherwise. -func (p *PingEvent) GetZen() string { - if p == nil || p.Zen == nil { - return "" +// GetInstallation returns the Installation field. +func (p *ProjectCardEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *p.Zen + return p.Installation } -// GetCollaborators returns the Collaborators field if it's non-nil, zero value otherwise. -func (p *Plan) GetCollaborators() int { - if p == nil || p.Collaborators == nil { - return 0 +// GetOrg returns the Org field. +func (p *ProjectCardEvent) GetOrg() *Organization { + if p == nil { + return nil } - return *p.Collaborators + return p.Org } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *Plan) GetName() string { - if p == nil || p.Name == nil { - return "" +// GetProjectCard returns the ProjectCard field. +func (p *ProjectCardEvent) GetProjectCard() *ProjectCard { + if p == nil { + return nil } - return *p.Name + return p.ProjectCard } -// GetPrivateRepos returns the PrivateRepos field if it's non-nil, zero value otherwise. -func (p *Plan) GetPrivateRepos() int { - if p == nil || p.PrivateRepos == nil { - return 0 +// GetRepo returns the Repo field. +func (p *ProjectCardEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.PrivateRepos + return p.Repo } -// GetSpace returns the Space field if it's non-nil, zero value otherwise. -func (p *Plan) GetSpace() int { - if p == nil || p.Space == nil { - return 0 +// GetSender returns the Sender field. +func (p *ProjectCardEvent) GetSender() *User { + if p == nil { + return nil } - return *p.Space + return p.Sender } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *Project) GetBody() string { - if p == nil || p.Body == nil { +// GetArchivedState returns the ArchivedState field if it's non-nil, zero value otherwise. +func (p *ProjectCardListOptions) GetArchivedState() string { + if p == nil || p.ArchivedState == nil { return "" } - return *p.Body + return *p.ArchivedState +} + +// GetArchived returns the Archived field if it's non-nil, zero value otherwise. +func (p *ProjectCardOptions) GetArchived() bool { + if p == nil || p.Archived == nil { + return false + } + return *p.Archived +} + +// GetCardsURL returns the CardsURL field if it's non-nil, zero value otherwise. +func (p *ProjectColumn) GetCardsURL() string { + if p == nil || p.CardsURL == nil { + return "" + } + return *p.CardsURL } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetCreatedAt() Timestamp { +func (p *ProjectColumn) GetCreatedAt() Timestamp { if p == nil || p.CreatedAt == nil { return Timestamp{} } @@ -3781,7 +6557,7 @@ func (p *Project) GetCreatedAt() Timestamp { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *Project) GetID() int { +func (p *ProjectColumn) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -3789,187 +6565,291 @@ func (p *Project) GetID() int { } // GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *Project) GetName() string { +func (p *ProjectColumn) GetName() string { if p == nil || p.Name == nil { return "" } return *p.Name } -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *Project) GetNumber() int { - if p == nil || p.Number == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *ProjectColumn) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" + } + return *p.NodeID +} + +// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. +func (p *ProjectColumn) GetProjectURL() string { + if p == nil || p.ProjectURL == nil { + return "" + } + return *p.ProjectURL +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *ProjectColumn) GetUpdatedAt() Timestamp { + if p == nil || p.UpdatedAt == nil { + return Timestamp{} + } + return *p.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *ProjectColumn) GetURL() string { + if p == nil || p.URL == nil { + return "" + } + return *p.URL +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *ProjectColumnEvent) GetAction() string { + if p == nil || p.Action == nil { + return "" + } + return *p.Action +} + +// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. +func (p *ProjectColumnEvent) GetAfterID() int64 { + if p == nil || p.AfterID == nil { return 0 } - return *p.Number + return *p.AfterID +} + +// GetChanges returns the Changes field. +func (p *ProjectColumnEvent) GetChanges() *ProjectColumnChange { + if p == nil { + return nil + } + return p.Changes +} + +// GetInstallation returns the Installation field. +func (p *ProjectColumnEvent) GetInstallation() *Installation { + if p == nil { + return nil + } + return p.Installation +} + +// GetOrg returns the Org field. +func (p *ProjectColumnEvent) GetOrg() *Organization { + if p == nil { + return nil + } + return p.Org +} + +// GetProjectColumn returns the ProjectColumn field. +func (p *ProjectColumnEvent) GetProjectColumn() *ProjectColumn { + if p == nil { + return nil + } + return p.ProjectColumn +} + +// GetRepo returns the Repo field. +func (p *ProjectColumnEvent) GetRepo() *Repository { + if p == nil { + return nil + } + return p.Repo +} + +// GetSender returns the Sender field. +func (p *ProjectColumnEvent) GetSender() *User { + if p == nil { + return nil + } + return p.Sender +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *ProjectEvent) GetAction() string { + if p == nil || p.Action == nil { + return "" + } + return *p.Action } -// GetOwnerURL returns the OwnerURL field if it's non-nil, zero value otherwise. -func (p *Project) GetOwnerURL() string { - if p == nil || p.OwnerURL == nil { - return "" +// GetChanges returns the Changes field. +func (p *ProjectEvent) GetChanges() *ProjectChange { + if p == nil { + return nil } - return *p.OwnerURL + return p.Changes } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *Project) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} +// GetInstallation returns the Installation field. +func (p *ProjectEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *p.UpdatedAt + return p.Installation } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *Project) GetURL() string { - if p == nil || p.URL == nil { - return "" +// GetOrg returns the Org field. +func (p *ProjectEvent) GetOrg() *Organization { + if p == nil { + return nil } - return *p.URL + return p.Org } -// GetColumnID returns the ColumnID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnID() int { - if p == nil || p.ColumnID == nil { - return 0 +// GetProject returns the Project field. +func (p *ProjectEvent) GetProject() *Project { + if p == nil { + return nil } - return *p.ColumnID + return p.Project } -// GetColumnURL returns the ColumnURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetColumnURL() string { - if p == nil || p.ColumnURL == nil { - return "" +// GetRepo returns the Repo field. +func (p *ProjectEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.ColumnURL + return p.Repo } -// GetContentURL returns the ContentURL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetContentURL() string { - if p == nil || p.ContentURL == nil { - return "" +// GetSender returns the Sender field. +func (p *ProjectEvent) GetSender() *User { + if p == nil { + return nil } - return *p.ContentURL + return p.Sender } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (p *ProjectOptions) GetBody() string { + if p == nil || p.Body == nil { + return "" } - return *p.CreatedAt + return *p.Body } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetID() int { - if p == nil || p.ID == nil { - return 0 +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (p *ProjectOptions) GetName() string { + if p == nil || p.Name == nil { + return "" } - return *p.ID + return *p.Name } -// GetNote returns the Note field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetNote() string { - if p == nil || p.Note == nil { +// GetOrganizationPermission returns the OrganizationPermission field if it's non-nil, zero value otherwise. +func (p *ProjectOptions) GetOrganizationPermission() string { + if p == nil || p.OrganizationPermission == nil { return "" } - return *p.Note + return *p.OrganizationPermission } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} +// GetPublic returns the Public field if it's non-nil, zero value otherwise. +func (p *ProjectOptions) GetPublic() bool { + if p == nil || p.Public == nil { + return false } - return *p.UpdatedAt + return *p.Public } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *ProjectCard) GetURL() string { - if p == nil || p.URL == nil { +// GetState returns the State field if it's non-nil, zero value otherwise. +func (p *ProjectOptions) GetState() string { + if p == nil || p.State == nil { return "" } - return *p.URL + return *p.State } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetEnforceAdmins returns the EnforceAdmins field. +func (p *Protection) GetEnforceAdmins() *AdminEnforcement { + if p == nil { + return nil } - return *p.Action + return p.EnforceAdmins } -// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. -func (p *ProjectCardEvent) GetAfterID() int { - if p == nil || p.AfterID == nil { - return 0 +// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. +func (p *Protection) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcement { + if p == nil { + return nil } - return *p.AfterID + return p.RequiredPullRequestReviews } -// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetCreatedAt() Timestamp { - if p == nil || p.CreatedAt == nil { - return Timestamp{} +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (p *Protection) GetRequiredStatusChecks() *RequiredStatusChecks { + if p == nil { + return nil } - return *p.CreatedAt + return p.RequiredStatusChecks } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetID() int { - if p == nil || p.ID == nil { - return 0 +// GetRestrictions returns the Restrictions field. +func (p *Protection) GetRestrictions() *BranchRestrictions { + if p == nil { + return nil } - return *p.ID + return p.Restrictions } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetName() string { - if p == nil || p.Name == nil { - return "" +// GetRequiredPullRequestReviews returns the RequiredPullRequestReviews field. +func (p *ProtectionRequest) GetRequiredPullRequestReviews() *PullRequestReviewsEnforcementRequest { + if p == nil { + return nil } - return *p.Name + return p.RequiredPullRequestReviews } -// GetProjectURL returns the ProjectURL field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetProjectURL() string { - if p == nil || p.ProjectURL == nil { - return "" +// GetRequiredStatusChecks returns the RequiredStatusChecks field. +func (p *ProtectionRequest) GetRequiredStatusChecks() *RequiredStatusChecks { + if p == nil { + return nil } - return *p.ProjectURL + return p.RequiredStatusChecks } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *ProjectColumn) GetUpdatedAt() Timestamp { - if p == nil || p.UpdatedAt == nil { - return Timestamp{} +// GetRestrictions returns the Restrictions field. +func (p *ProtectionRequest) GetRestrictions() *BranchRestrictionsRequest { + if p == nil { + return nil } - return *p.UpdatedAt + return p.Restrictions } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectColumnEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetInstallation returns the Installation field. +func (p *PublicEvent) GetInstallation() *Installation { + if p == nil { + return nil } - return *p.Action + return p.Installation } -// GetAfterID returns the AfterID field if it's non-nil, zero value otherwise. -func (p *ProjectColumnEvent) GetAfterID() int { - if p == nil || p.AfterID == nil { - return 0 +// GetRepo returns the Repo field. +func (p *PublicEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.AfterID + return p.Repo } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *ProjectEvent) GetAction() string { - if p == nil || p.Action == nil { +// GetSender returns the Sender field. +func (p *PublicEvent) GetSender() *User { + if p == nil { + return nil + } + return p.Sender +} + +// GetActiveLockReason returns the ActiveLockReason field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetActiveLockReason() string { + if p == nil || p.ActiveLockReason == nil { return "" } - return *p.Action + return *p.ActiveLockReason } // GetAdditions returns the Additions field if it's non-nil, zero value otherwise. @@ -3980,6 +6860,30 @@ func (p *PullRequest) GetAdditions() int { return *p.Additions } +// GetAssignee returns the Assignee field. +func (p *PullRequest) GetAssignee() *User { + if p == nil { + return nil + } + return p.Assignee +} + +// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetAuthorAssociation() string { + if p == nil || p.AuthorAssociation == nil { + return "" + } + return *p.AuthorAssociation +} + +// GetBase returns the Base field. +func (p *PullRequest) GetBase() *PullRequestBranch { + if p == nil { + return nil + } + return p.Base +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (p *PullRequest) GetBody() string { if p == nil || p.Body == nil { @@ -4012,6 +6916,14 @@ func (p *PullRequest) GetComments() int { return *p.Comments } +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetCommentsURL() string { + if p == nil || p.CommentsURL == nil { + return "" + } + return *p.CommentsURL +} + // GetCommits returns the Commits field if it's non-nil, zero value otherwise. func (p *PullRequest) GetCommits() int { if p == nil || p.Commits == nil { @@ -4020,6 +6932,14 @@ func (p *PullRequest) GetCommits() int { return *p.Commits } +// GetCommitsURL returns the CommitsURL field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetCommitsURL() string { + if p == nil || p.CommitsURL == nil { + return "" + } + return *p.CommitsURL +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (p *PullRequest) GetCreatedAt() time.Time { if p == nil || p.CreatedAt == nil { @@ -4044,6 +6964,14 @@ func (p *PullRequest) GetDiffURL() string { return *p.DiffURL } +// GetHead returns the Head field. +func (p *PullRequest) GetHead() *PullRequestBranch { + if p == nil { + return nil + } + return p.Head +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (p *PullRequest) GetHTMLURL() string { if p == nil || p.HTMLURL == nil { @@ -4053,7 +6981,7 @@ func (p *PullRequest) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequest) GetID() int { +func (p *PullRequest) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -4068,6 +6996,14 @@ func (p *PullRequest) GetIssueURL() string { return *p.IssueURL } +// GetLinks returns the Links field. +func (p *PullRequest) GetLinks() *PRLinks { + if p == nil { + return nil + } + return p.Links +} + // GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. func (p *PullRequest) GetMaintainerCanModify() bool { if p == nil || p.MaintainerCanModify == nil { @@ -4084,6 +7020,14 @@ func (p *PullRequest) GetMergeable() bool { return *p.Mergeable } +// GetMergeableState returns the MergeableState field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetMergeableState() string { + if p == nil || p.MergeableState == nil { + return "" + } + return *p.MergeableState +} + // GetMergeCommitSHA returns the MergeCommitSHA field if it's non-nil, zero value otherwise. func (p *PullRequest) GetMergeCommitSHA() string { if p == nil || p.MergeCommitSHA == nil { @@ -4108,6 +7052,30 @@ func (p *PullRequest) GetMergedAt() time.Time { return *p.MergedAt } +// GetMergedBy returns the MergedBy field. +func (p *PullRequest) GetMergedBy() *User { + if p == nil { + return nil + } + return p.MergedBy +} + +// GetMilestone returns the Milestone field. +func (p *PullRequest) GetMilestone() *Milestone { + if p == nil { + return nil + } + return p.Milestone +} + +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" + } + return *p.NodeID +} + // GetNumber returns the Number field if it's non-nil, zero value otherwise. func (p *PullRequest) GetNumber() int { if p == nil || p.Number == nil { @@ -4180,6 +7148,14 @@ func (p *PullRequest) GetURL() string { return *p.URL } +// GetUser returns the User field. +func (p *PullRequest) GetUser() *User { + if p == nil { + return nil + } + return p.User +} + // GetLabel returns the Label field if it's non-nil, zero value otherwise. func (p *PullRequestBranch) GetLabel() string { if p == nil || p.Label == nil { @@ -4196,6 +7172,14 @@ func (p *PullRequestBranch) GetRef() string { return *p.Ref } +// GetRepo returns the Repo field. +func (p *PullRequestBranch) GetRepo() *Repository { + if p == nil { + return nil + } + return p.Repo +} + // GetSHA returns the SHA field if it's non-nil, zero value otherwise. func (p *PullRequestBranch) GetSHA() string { if p == nil || p.SHA == nil { @@ -4204,6 +7188,22 @@ func (p *PullRequestBranch) GetSHA() string { return *p.SHA } +// GetUser returns the User field. +func (p *PullRequestBranch) GetUser() *User { + if p == nil { + return nil + } + return p.User +} + +// GetAuthorAssociation returns the AuthorAssociation field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetAuthorAssociation() string { + if p == nil || p.AuthorAssociation == nil { + return "" + } + return *p.AuthorAssociation +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (p *PullRequestComment) GetBody() string { if p == nil || p.Body == nil { @@ -4245,7 +7245,7 @@ func (p *PullRequestComment) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetID() int { +func (p *PullRequestComment) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -4253,7 +7253,7 @@ func (p *PullRequestComment) GetID() int { } // GetInReplyTo returns the InReplyTo field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetInReplyTo() int { +func (p *PullRequestComment) GetInReplyTo() int64 { if p == nil || p.InReplyTo == nil { return 0 } @@ -4292,44 +7292,140 @@ func (p *PullRequestComment) GetPosition() int { return *p.Position } +// GetPullRequestReviewID returns the PullRequestReviewID field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetPullRequestReviewID() int64 { + if p == nil || p.PullRequestReviewID == nil { + return 0 + } + return *p.PullRequestReviewID +} + // GetPullRequestURL returns the PullRequestURL field if it's non-nil, zero value otherwise. func (p *PullRequestComment) GetPullRequestURL() string { if p == nil || p.PullRequestURL == nil { return "" } - return *p.PullRequestURL + return *p.PullRequestURL +} + +// GetReactions returns the Reactions field. +func (p *PullRequestComment) GetReactions() *Reactions { + if p == nil { + return nil + } + return p.Reactions +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetUpdatedAt() time.Time { + if p == nil || p.UpdatedAt == nil { + return time.Time{} + } + return *p.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (p *PullRequestComment) GetURL() string { + if p == nil || p.URL == nil { + return "" + } + return *p.URL +} + +// GetUser returns the User field. +func (p *PullRequestComment) GetUser() *User { + if p == nil { + return nil + } + return p.User +} + +// GetAction returns the Action field if it's non-nil, zero value otherwise. +func (p *PullRequestEvent) GetAction() string { + if p == nil || p.Action == nil { + return "" + } + return *p.Action +} + +// GetAssignee returns the Assignee field. +func (p *PullRequestEvent) GetAssignee() *User { + if p == nil { + return nil + } + return p.Assignee +} + +// GetChanges returns the Changes field. +func (p *PullRequestEvent) GetChanges() *EditChange { + if p == nil { + return nil + } + return p.Changes +} + +// GetInstallation returns the Installation field. +func (p *PullRequestEvent) GetInstallation() *Installation { + if p == nil { + return nil + } + return p.Installation +} + +// GetLabel returns the Label field. +func (p *PullRequestEvent) GetLabel() *Label { + if p == nil { + return nil + } + return p.Label +} + +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (p *PullRequestEvent) GetNumber() int { + if p == nil || p.Number == nil { + return 0 + } + return *p.Number +} + +// GetOrganization returns the Organization field. +func (p *PullRequestEvent) GetOrganization() *Organization { + if p == nil { + return nil + } + return p.Organization } -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetUpdatedAt() time.Time { - if p == nil || p.UpdatedAt == nil { - return time.Time{} +// GetPullRequest returns the PullRequest field. +func (p *PullRequestEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil } - return *p.UpdatedAt + return p.PullRequest } -// GetURL returns the URL field if it's non-nil, zero value otherwise. -func (p *PullRequestComment) GetURL() string { - if p == nil || p.URL == nil { - return "" +// GetRepo returns the Repo field. +func (p *PullRequestEvent) GetRepo() *Repository { + if p == nil { + return nil } - return *p.URL + return p.Repo } -// GetAction returns the Action field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetAction() string { - if p == nil || p.Action == nil { - return "" +// GetRequestedReviewer returns the RequestedReviewer field. +func (p *PullRequestEvent) GetRequestedReviewer() *User { + if p == nil { + return nil } - return *p.Action + return p.RequestedReviewer } -// GetNumber returns the Number field if it's non-nil, zero value otherwise. -func (p *PullRequestEvent) GetNumber() int { - if p == nil || p.Number == nil { - return 0 +// GetSender returns the Sender field. +func (p *PullRequestEvent) GetSender() *User { + if p == nil { + return nil } - return *p.Number + return p.Sender } // GetDiffURL returns the DiffURL field if it's non-nil, zero value otherwise. @@ -4413,7 +7509,7 @@ func (p *PullRequestReview) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PullRequestReview) GetID() int { +func (p *PullRequestReview) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -4444,6 +7540,14 @@ func (p *PullRequestReview) GetSubmittedAt() time.Time { return *p.SubmittedAt } +// GetUser returns the User field. +func (p *PullRequestReview) GetUser() *User { + if p == nil { + return nil + } + return p.User +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (p *PullRequestReviewCommentEvent) GetAction() string { if p == nil || p.Action == nil { @@ -4452,6 +7556,54 @@ func (p *PullRequestReviewCommentEvent) GetAction() string { return *p.Action } +// GetChanges returns the Changes field. +func (p *PullRequestReviewCommentEvent) GetChanges() *EditChange { + if p == nil { + return nil + } + return p.Changes +} + +// GetComment returns the Comment field. +func (p *PullRequestReviewCommentEvent) GetComment() *PullRequestComment { + if p == nil { + return nil + } + return p.Comment +} + +// GetInstallation returns the Installation field. +func (p *PullRequestReviewCommentEvent) GetInstallation() *Installation { + if p == nil { + return nil + } + return p.Installation +} + +// GetPullRequest returns the PullRequest field. +func (p *PullRequestReviewCommentEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil + } + return p.PullRequest +} + +// GetRepo returns the Repo field. +func (p *PullRequestReviewCommentEvent) GetRepo() *Repository { + if p == nil { + return nil + } + return p.Repo +} + +// GetSender returns the Sender field. +func (p *PullRequestReviewCommentEvent) GetSender() *User { + if p == nil { + return nil + } + return p.Sender +} + // GetMessage returns the Message field if it's non-nil, zero value otherwise. func (p *PullRequestReviewDismissalRequest) GetMessage() string { if p == nil || p.Message == nil { @@ -4468,6 +7620,54 @@ func (p *PullRequestReviewEvent) GetAction() string { return *p.Action } +// GetInstallation returns the Installation field. +func (p *PullRequestReviewEvent) GetInstallation() *Installation { + if p == nil { + return nil + } + return p.Installation +} + +// GetOrganization returns the Organization field. +func (p *PullRequestReviewEvent) GetOrganization() *Organization { + if p == nil { + return nil + } + return p.Organization +} + +// GetPullRequest returns the PullRequest field. +func (p *PullRequestReviewEvent) GetPullRequest() *PullRequest { + if p == nil { + return nil + } + return p.PullRequest +} + +// GetRepo returns the Repo field. +func (p *PullRequestReviewEvent) GetRepo() *Repository { + if p == nil { + return nil + } + return p.Repo +} + +// GetReview returns the Review field. +func (p *PullRequestReviewEvent) GetReview() *PullRequestReview { + if p == nil { + return nil + } + return p.Review +} + +// GetSender returns the Sender field. +func (p *PullRequestReviewEvent) GetSender() *User { + if p == nil { + return nil + } + return p.Sender +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (p *PullRequestReviewRequest) GetBody() string { if p == nil || p.Body == nil { @@ -4492,52 +7692,28 @@ func (p *PullRequestReviewRequest) GetEvent() string { return *p.Event } -// GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. -func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { - if p == nil || p.DismissStaleReviews == nil { - return false - } - return *p.DismissStaleReviews -} - -// GetBase returns the Base field if it's non-nil, zero value otherwise. -func (p *pullRequestUpdate) GetBase() string { - if p == nil || p.Base == nil { - return "" +// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. +func (p *PullRequestReviewsEnforcementRequest) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { + if p == nil { + return nil } - return *p.Base + return p.DismissalRestrictionsRequest } -// GetBody returns the Body field if it's non-nil, zero value otherwise. -func (p *pullRequestUpdate) GetBody() string { - if p == nil || p.Body == nil { - return "" +// GetDismissalRestrictionsRequest returns the DismissalRestrictionsRequest field. +func (p *PullRequestReviewsEnforcementUpdate) GetDismissalRestrictionsRequest() *DismissalRestrictionsRequest { + if p == nil { + return nil } - return *p.Body + return p.DismissalRestrictionsRequest } -// GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. -func (p *pullRequestUpdate) GetMaintainerCanModify() bool { - if p == nil || p.MaintainerCanModify == nil { +// GetDismissStaleReviews returns the DismissStaleReviews field if it's non-nil, zero value otherwise. +func (p *PullRequestReviewsEnforcementUpdate) GetDismissStaleReviews() bool { + if p == nil || p.DismissStaleReviews == nil { return false } - return *p.MaintainerCanModify -} - -// GetState returns the State field if it's non-nil, zero value otherwise. -func (p *pullRequestUpdate) GetState() string { - if p == nil || p.State == nil { - return "" - } - return *p.State -} - -// GetTitle returns the Title field if it's non-nil, zero value otherwise. -func (p *pullRequestUpdate) GetTitle() string { - if p == nil || p.Title == nil { - return "" - } - return *p.Title + return *p.DismissStaleReviews } // GetMergablePulls returns the MergablePulls field if it's non-nil, zero value otherwise. @@ -4668,8 +7844,32 @@ func (p *PushEvent) GetHead() string { return *p.Head } +// GetHeadCommit returns the HeadCommit field. +func (p *PushEvent) GetHeadCommit() *PushEventCommit { + if p == nil { + return nil + } + return p.HeadCommit +} + +// GetInstallation returns the Installation field. +func (p *PushEvent) GetInstallation() *Installation { + if p == nil { + return nil + } + return p.Installation +} + +// GetPusher returns the Pusher field. +func (p *PushEvent) GetPusher() *User { + if p == nil { + return nil + } + return p.Pusher +} + // GetPushID returns the PushID field if it's non-nil, zero value otherwise. -func (p *PushEvent) GetPushID() int { +func (p *PushEvent) GetPushID() int64 { if p == nil || p.PushID == nil { return 0 } @@ -4684,6 +7884,22 @@ func (p *PushEvent) GetRef() string { return *p.Ref } +// GetRepo returns the Repo field. +func (p *PushEvent) GetRepo() *PushEventRepository { + if p == nil { + return nil + } + return p.Repo +} + +// GetSender returns the Sender field. +func (p *PushEvent) GetSender() *User { + if p == nil { + return nil + } + return p.Sender +} + // GetSize returns the Size field if it's non-nil, zero value otherwise. func (p *PushEvent) GetSize() int { if p == nil || p.Size == nil { @@ -4692,6 +7908,22 @@ func (p *PushEvent) GetSize() int { return *p.Size } +// GetAuthor returns the Author field. +func (p *PushEventCommit) GetAuthor() *CommitAuthor { + if p == nil { + return nil + } + return p.Author +} + +// GetCommitter returns the Committer field. +func (p *PushEventCommit) GetCommitter() *CommitAuthor { + if p == nil { + return nil + } + return p.Committer +} + // GetDistinct returns the Distinct field if it's non-nil, zero value otherwise. func (p *PushEventCommit) GetDistinct() bool { if p == nil || p.Distinct == nil { @@ -4885,7 +8117,7 @@ func (p *PushEventRepository) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (p *PushEventRepository) GetID() int { +func (p *PushEventRepository) GetID() int64 { if p == nil || p.ID == nil { return 0 } @@ -4916,6 +8148,14 @@ func (p *PushEventRepository) GetName() string { return *p.Name } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (p *PushEventRepository) GetNodeID() string { + if p == nil || p.NodeID == nil { + return "" + } + return *p.NodeID +} + // GetOpenIssuesCount returns the OpenIssuesCount field if it's non-nil, zero value otherwise. func (p *PushEventRepository) GetOpenIssuesCount() int { if p == nil || p.OpenIssuesCount == nil { @@ -4932,6 +8172,14 @@ func (p *PushEventRepository) GetOrganization() string { return *p.Organization } +// GetOwner returns the Owner field. +func (p *PushEventRepository) GetOwner() *User { + if p == nil { + return nil + } + return p.Owner +} + // GetPrivate returns the Private field if it's non-nil, zero value otherwise. func (p *PushEventRepository) GetPrivate() bool { if p == nil || p.Private == nil { @@ -5012,6 +8260,22 @@ func (p *PushEventRepository) GetWatchersCount() int { return *p.WatchersCount } +// GetCore returns the Core field. +func (r *RateLimits) GetCore() *Rate { + if r == nil { + return nil + } + return r.Core +} + +// GetSearch returns the Search field. +func (r *RateLimits) GetSearch() *Rate { + if r == nil { + return nil + } + return r.Search +} + // GetContent returns the Content field if it's non-nil, zero value otherwise. func (r *Reaction) GetContent() string { if r == nil || r.Content == nil { @@ -5021,13 +8285,29 @@ func (r *Reaction) GetContent() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Reaction) GetID() int { +func (r *Reaction) GetID() int64 { if r == nil || r.ID == nil { return 0 } return *r.ID } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Reaction) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetUser returns the User field. +func (r *Reaction) GetUser() *User { + if r == nil { + return nil + } + return r.User +} + // GetConfused returns the Confused field if it's non-nil, zero value otherwise. func (r *Reactions) GetConfused() int { if r == nil || r.Confused == nil { @@ -5092,6 +8372,22 @@ func (r *Reactions) GetURL() string { return *r.URL } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Reference) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + +// GetObject returns the Object field. +func (r *Reference) GetObject() *GitObject { + if r == nil { + return nil + } + return r.Object +} + // GetRef returns the Ref field if it's non-nil, zero value otherwise. func (r *Reference) GetRef() string { if r == nil || r.Ref == nil { @@ -5141,7 +8437,7 @@ func (r *ReleaseAsset) GetDownloadCount() int { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *ReleaseAsset) GetID() int { +func (r *ReleaseAsset) GetID() int64 { if r == nil || r.ID == nil { return 0 } @@ -5164,6 +8460,14 @@ func (r *ReleaseAsset) GetName() string { return *r.Name } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *ReleaseAsset) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + // GetSize returns the Size field if it's non-nil, zero value otherwise. func (r *ReleaseAsset) GetSize() int { if r == nil || r.Size == nil { @@ -5188,6 +8492,14 @@ func (r *ReleaseAsset) GetUpdatedAt() Timestamp { return *r.UpdatedAt } +// GetUploader returns the Uploader field. +func (r *ReleaseAsset) GetUploader() *User { + if r == nil { + return nil + } + return r.Uploader +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (r *ReleaseAsset) GetURL() string { if r == nil || r.URL == nil { @@ -5204,6 +8516,38 @@ func (r *ReleaseEvent) GetAction() string { return *r.Action } +// GetInstallation returns the Installation field. +func (r *ReleaseEvent) GetInstallation() *Installation { + if r == nil { + return nil + } + return r.Installation +} + +// GetRelease returns the Release field. +func (r *ReleaseEvent) GetRelease() *RepositoryRelease { + if r == nil { + return nil + } + return r.Release +} + +// GetRepo returns the Repo field. +func (r *ReleaseEvent) GetRepo() *Repository { + if r == nil { + return nil + } + return r.Repo +} + +// GetSender returns the Sender field. +func (r *ReleaseEvent) GetSender() *User { + if r == nil { + return nil + } + return r.Sender +} + // GetFrom returns the From field if it's non-nil, zero value otherwise. func (r *Rename) GetFrom() string { if r == nil || r.From == nil { @@ -5260,6 +8604,14 @@ func (r *Repository) GetAllowSquashMerge() bool { return *r.AllowSquashMerge } +// GetArchived returns the Archived field if it's non-nil, zero value otherwise. +func (r *Repository) GetArchived() bool { + if r == nil || r.Archived == nil { + return false + } + return *r.Archived +} + // GetArchiveURL returns the ArchiveURL field if it's non-nil, zero value otherwise. func (r *Repository) GetArchiveURL() string { if r == nil || r.ArchiveURL == nil { @@ -5308,6 +8660,14 @@ func (r *Repository) GetCloneURL() string { return *r.CloneURL } +// GetCodeOfConduct returns the CodeOfConduct field. +func (r *Repository) GetCodeOfConduct() *CodeOfConduct { + if r == nil { + return nil + } + return r.CodeOfConduct +} + // GetCollaboratorsURL returns the CollaboratorsURL field if it's non-nil, zero value otherwise. func (r *Repository) GetCollaboratorsURL() string { if r == nil || r.CollaboratorsURL == nil { @@ -5500,6 +8860,14 @@ func (r *Repository) GetHasPages() bool { return *r.HasPages } +// GetHasProjects returns the HasProjects field if it's non-nil, zero value otherwise. +func (r *Repository) GetHasProjects() bool { + if r == nil || r.HasProjects == nil { + return false + } + return *r.HasProjects +} + // GetHasWiki returns the HasWiki field if it's non-nil, zero value otherwise. func (r *Repository) GetHasWiki() bool { if r == nil || r.HasWiki == nil { @@ -5533,7 +8901,7 @@ func (r *Repository) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *Repository) GetID() int { +func (r *Repository) GetID() int64 { if r == nil || r.ID == nil { return 0 } @@ -5596,6 +8964,14 @@ func (r *Repository) GetLanguagesURL() string { return *r.LanguagesURL } +// GetLicense returns the License field. +func (r *Repository) GetLicense() *License { + if r == nil { + return nil + } + return r.License +} + // GetLicenseTemplate returns the LicenseTemplate field if it's non-nil, zero value otherwise. func (r *Repository) GetLicenseTemplate() string { if r == nil || r.LicenseTemplate == nil { @@ -5652,6 +9028,14 @@ func (r *Repository) GetNetworkCount() int { return *r.NetworkCount } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *Repository) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + // GetNotificationsURL returns the NotificationsURL field if it's non-nil, zero value otherwise. func (r *Repository) GetNotificationsURL() string { if r == nil || r.NotificationsURL == nil { @@ -5668,6 +9052,30 @@ func (r *Repository) GetOpenIssuesCount() int { return *r.OpenIssuesCount } +// GetOrganization returns the Organization field. +func (r *Repository) GetOrganization() *Organization { + if r == nil { + return nil + } + return r.Organization +} + +// GetOwner returns the Owner field. +func (r *Repository) GetOwner() *User { + if r == nil { + return nil + } + return r.Owner +} + +// GetParent returns the Parent field. +func (r *Repository) GetParent() *Repository { + if r == nil { + return nil + } + return r.Parent +} + // GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. func (r *Repository) GetPermissions() map[string]bool { if r == nil || r.Permissions == nil { @@ -5716,6 +9124,14 @@ func (r *Repository) GetSize() int { return *r.Size } +// GetSource returns the Source field. +func (r *Repository) GetSource() *Repository { + if r == nil { + return nil + } + return r.Source +} + // GetSSHURL returns the SSHURL field if it's non-nil, zero value otherwise. func (r *Repository) GetSSHURL() string { if r == nil || r.SSHURL == nil { @@ -5789,7 +9205,7 @@ func (r *Repository) GetTagsURL() string { } // GetTeamID returns the TeamID field if it's non-nil, zero value otherwise. -func (r *Repository) GetTeamID() int { +func (r *Repository) GetTeamID() int64 { if r == nil || r.TeamID == nil { return 0 } @@ -5869,7 +9285,7 @@ func (r *RepositoryComment) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryComment) GetID() int { +func (r *RepositoryComment) GetID() int64 { if r == nil || r.ID == nil { return 0 } @@ -5892,6 +9308,14 @@ func (r *RepositoryComment) GetPosition() int { return *r.Position } +// GetReactions returns the Reactions field. +func (r *RepositoryComment) GetReactions() *Reactions { + if r == nil { + return nil + } + return r.Reactions +} + // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. func (r *RepositoryComment) GetUpdatedAt() time.Time { if r == nil || r.UpdatedAt == nil { @@ -5908,6 +9332,22 @@ func (r *RepositoryComment) GetURL() string { return *r.URL } +// GetUser returns the User field. +func (r *RepositoryComment) GetUser() *User { + if r == nil { + return nil + } + return r.User +} + +// GetAuthor returns the Author field. +func (r *RepositoryCommit) GetAuthor() *User { + if r == nil { + return nil + } + return r.Author +} + // GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. func (r *RepositoryCommit) GetCommentsURL() string { if r == nil || r.CommentsURL == nil { @@ -5916,6 +9356,22 @@ func (r *RepositoryCommit) GetCommentsURL() string { return *r.CommentsURL } +// GetCommit returns the Commit field. +func (r *RepositoryCommit) GetCommit() *Commit { + if r == nil { + return nil + } + return r.Commit +} + +// GetCommitter returns the Committer field. +func (r *RepositoryCommit) GetCommitter() *User { + if r == nil { + return nil + } + return r.Committer +} + // GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. func (r *RepositoryCommit) GetHTMLURL() string { if r == nil || r.HTMLURL == nil { @@ -5932,6 +9388,14 @@ func (r *RepositoryCommit) GetSHA() string { return *r.SHA } +// GetStats returns the Stats field. +func (r *RepositoryCommit) GetStats() *CommitStats { + if r == nil { + return nil + } + return r.Stats +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (r *RepositoryCommit) GetURL() string { if r == nil || r.URL == nil { @@ -6020,6 +9484,14 @@ func (r *RepositoryContent) GetURL() string { return *r.URL } +// GetAuthor returns the Author field. +func (r *RepositoryContentFileOptions) GetAuthor() *CommitAuthor { + if r == nil { + return nil + } + return r.Author +} + // GetBranch returns the Branch field if it's non-nil, zero value otherwise. func (r *RepositoryContentFileOptions) GetBranch() string { if r == nil || r.Branch == nil { @@ -6028,6 +9500,14 @@ func (r *RepositoryContentFileOptions) GetBranch() string { return *r.Branch } +// GetCommitter returns the Committer field. +func (r *RepositoryContentFileOptions) GetCommitter() *CommitAuthor { + if r == nil { + return nil + } + return r.Committer +} + // GetMessage returns the Message field if it's non-nil, zero value otherwise. func (r *RepositoryContentFileOptions) GetMessage() string { if r == nil || r.Message == nil { @@ -6044,6 +9524,14 @@ func (r *RepositoryContentFileOptions) GetSHA() string { return *r.SHA } +// GetContent returns the Content field. +func (r *RepositoryContentResponse) GetContent() *RepositoryContent { + if r == nil { + return nil + } + return r.Content +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (r *RepositoryEvent) GetAction() string { if r == nil || r.Action == nil { @@ -6052,6 +9540,38 @@ func (r *RepositoryEvent) GetAction() string { return *r.Action } +// GetInstallation returns the Installation field. +func (r *RepositoryEvent) GetInstallation() *Installation { + if r == nil { + return nil + } + return r.Installation +} + +// GetOrg returns the Org field. +func (r *RepositoryEvent) GetOrg() *Organization { + if r == nil { + return nil + } + return r.Org +} + +// GetRepo returns the Repo field. +func (r *RepositoryEvent) GetRepo() *Repository { + if r == nil { + return nil + } + return r.Repo +} + +// GetSender returns the Sender field. +func (r *RepositoryEvent) GetSender() *User { + if r == nil { + return nil + } + return r.Sender +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (r *RepositoryInvitation) GetCreatedAt() Timestamp { if r == nil || r.CreatedAt == nil { @@ -6069,13 +9589,29 @@ func (r *RepositoryInvitation) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryInvitation) GetID() int { +func (r *RepositoryInvitation) GetID() int64 { if r == nil || r.ID == nil { return 0 } return *r.ID } +// GetInvitee returns the Invitee field. +func (r *RepositoryInvitation) GetInvitee() *User { + if r == nil { + return nil + } + return r.Invitee +} + +// GetInviter returns the Inviter field. +func (r *RepositoryInvitation) GetInviter() *User { + if r == nil { + return nil + } + return r.Inviter +} + // GetPermissions returns the Permissions field if it's non-nil, zero value otherwise. func (r *RepositoryInvitation) GetPermissions() string { if r == nil || r.Permissions == nil { @@ -6084,6 +9620,14 @@ func (r *RepositoryInvitation) GetPermissions() string { return *r.Permissions } +// GetRepo returns the Repo field. +func (r *RepositoryInvitation) GetRepo() *Repository { + if r == nil { + return nil + } + return r.Repo +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (r *RepositoryInvitation) GetURL() string { if r == nil || r.URL == nil { @@ -6132,6 +9676,14 @@ func (r *RepositoryLicense) GetHTMLURL() string { return *r.HTMLURL } +// GetLicense returns the License field. +func (r *RepositoryLicense) GetLicense() *License { + if r == nil { + return nil + } + return r.License +} + // GetName returns the Name field if it's non-nil, zero value otherwise. func (r *RepositoryLicense) GetName() string { if r == nil || r.Name == nil { @@ -6212,6 +9764,14 @@ func (r *RepositoryPermissionLevel) GetPermission() string { return *r.Permission } +// GetUser returns the User field. +func (r *RepositoryPermissionLevel) GetUser() *User { + if r == nil { + return nil + } + return r.User +} + // GetAssetsURL returns the AssetsURL field if it's non-nil, zero value otherwise. func (r *RepositoryRelease) GetAssetsURL() string { if r == nil || r.AssetsURL == nil { @@ -6220,6 +9780,14 @@ func (r *RepositoryRelease) GetAssetsURL() string { return *r.AssetsURL } +// GetAuthor returns the Author field. +func (r *RepositoryRelease) GetAuthor() *User { + if r == nil { + return nil + } + return r.Author +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (r *RepositoryRelease) GetBody() string { if r == nil || r.Body == nil { @@ -6253,7 +9821,7 @@ func (r *RepositoryRelease) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepositoryRelease) GetID() int { +func (r *RepositoryRelease) GetID() int64 { if r == nil || r.ID == nil { return 0 } @@ -6268,6 +9836,14 @@ func (r *RepositoryRelease) GetName() string { return *r.Name } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryRelease) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + // GetPrerelease returns the Prerelease field if it's non-nil, zero value otherwise. func (r *RepositoryRelease) GetPrerelease() bool { if r == nil || r.Prerelease == nil { @@ -6332,6 +9908,14 @@ func (r *RepositoryRelease) GetZipballURL() string { return *r.ZipballURL } +// GetCommit returns the Commit field. +func (r *RepositoryTag) GetCommit() *Commit { + if r == nil { + return nil + } + return r.Commit +} + // GetName returns the Name field if it's non-nil, zero value otherwise. func (r *RepositoryTag) GetName() string { if r == nil || r.Name == nil { @@ -6420,6 +10004,14 @@ func (r *RepoStatus) GetCreatedAt() time.Time { return *r.CreatedAt } +// GetCreator returns the Creator field. +func (r *RepoStatus) GetCreator() *User { + if r == nil { + return nil + } + return r.Creator +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (r *RepoStatus) GetDescription() string { if r == nil || r.Description == nil { @@ -6429,7 +10021,7 @@ func (r *RepoStatus) GetDescription() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (r *RepoStatus) GetID() int { +func (r *RepoStatus) GetID() int64 { if r == nil || r.ID == nil { return 0 } @@ -6468,6 +10060,14 @@ func (r *RepoStatus) GetURL() string { return *r.URL } +// GetStrict returns the Strict field if it's non-nil, zero value otherwise. +func (r *RequiredStatusChecksRequest) GetStrict() bool { + if r == nil || r.Strict == nil { + return false + } + return *r.Strict +} + // GetName returns the Name field if it's non-nil, zero value otherwise. func (s *ServiceHook) GetName() string { if s == nil || s.Name == nil { @@ -6508,8 +10108,16 @@ func (s *SignatureVerification) GetVerified() bool { return *s.Verified } +// GetActor returns the Actor field. +func (s *Source) GetActor() *User { + if s == nil { + return nil + } + return s.Actor +} + // GetID returns the ID field if it's non-nil, zero value otherwise. -func (s *Source) GetID() int { +func (s *Source) GetID() int64 { if s == nil || s.ID == nil { return 0 } @@ -6533,7 +10141,7 @@ func (s *SourceImportAuthor) GetEmail() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (s *SourceImportAuthor) GetID() int { +func (s *SourceImportAuthor) GetID() int64 { if s == nil || s.ID == nil { return 0 } @@ -6588,6 +10196,22 @@ func (s *Stargazer) GetStarredAt() Timestamp { return *s.StarredAt } +// GetUser returns the User field. +func (s *Stargazer) GetUser() *User { + if s == nil { + return nil + } + return s.User +} + +// GetRepository returns the Repository field. +func (s *StarredRepository) GetRepository() *Repository { + if s == nil { + return nil + } + return s.Repository +} + // GetStarredAt returns the StarredAt field if it's non-nil, zero value otherwise. func (s *StarredRepository) GetStarredAt() Timestamp { if s == nil || s.StarredAt == nil { @@ -6596,20 +10220,12 @@ func (s *StarredRepository) GetStarredAt() Timestamp { return *s.StarredAt } -// GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. -func (s *startMigration) GetExcludeAttachments() bool { - if s == nil || s.ExcludeAttachments == nil { - return false - } - return *s.ExcludeAttachments -} - -// GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. -func (s *startMigration) GetLockRepositories() bool { - if s == nil || s.LockRepositories == nil { - return false +// GetCommit returns the Commit field. +func (s *StatusEvent) GetCommit() *RepositoryCommit { + if s == nil { + return nil } - return *s.LockRepositories + return s.Commit } // GetContext returns the Context field if it's non-nil, zero value otherwise. @@ -6637,13 +10253,21 @@ func (s *StatusEvent) GetDescription() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (s *StatusEvent) GetID() int { +func (s *StatusEvent) GetID() int64 { if s == nil || s.ID == nil { return 0 } return *s.ID } +// GetInstallation returns the Installation field. +func (s *StatusEvent) GetInstallation() *Installation { + if s == nil { + return nil + } + return s.Installation +} + // GetName returns the Name field if it's non-nil, zero value otherwise. func (s *StatusEvent) GetName() string { if s == nil || s.Name == nil { @@ -6652,6 +10276,22 @@ func (s *StatusEvent) GetName() string { return *s.Name } +// GetRepo returns the Repo field. +func (s *StatusEvent) GetRepo() *Repository { + if s == nil { + return nil + } + return s.Repo +} + +// GetSender returns the Sender field. +func (s *StatusEvent) GetSender() *User { + if s == nil { + return nil + } + return s.Sender +} + // GetSHA returns the SHA field if it's non-nil, zero value otherwise. func (s *StatusEvent) GetSHA() string { if s == nil || s.SHA == nil { @@ -6748,6 +10388,22 @@ func (t *Tag) GetMessage() string { return *t.Message } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (t *Tag) GetNodeID() string { + if t == nil || t.NodeID == nil { + return "" + } + return *t.NodeID +} + +// GetObject returns the Object field. +func (t *Tag) GetObject() *GitObject { + if t == nil { + return nil + } + return t.Object +} + // GetSHA returns the SHA field if it's non-nil, zero value otherwise. func (t *Tag) GetSHA() string { if t == nil || t.SHA == nil { @@ -6764,6 +10420,14 @@ func (t *Tag) GetTag() string { return *t.Tag } +// GetTagger returns the Tagger field. +func (t *Tag) GetTagger() *CommitAuthor { + if t == nil { + return nil + } + return t.Tagger +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (t *Tag) GetURL() string { if t == nil || t.URL == nil { @@ -6772,96 +10436,304 @@ func (t *Tag) GetURL() string { return *t.URL } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (t *Team) GetDescription() string { - if t == nil || t.Description == nil { +// GetVerification returns the Verification field. +func (t *Tag) GetVerification() *SignatureVerification { + if t == nil { + return nil + } + return t.Verification +} + +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (t *Team) GetDescription() string { + if t == nil || t.Description == nil { + return "" + } + return *t.Description +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (t *Team) GetID() int64 { + if t == nil || t.ID == nil { + return 0 + } + return *t.ID +} + +// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. +func (t *Team) GetLDAPDN() string { + if t == nil || t.LDAPDN == nil { + return "" + } + return *t.LDAPDN +} + +// GetMembersCount returns the MembersCount field if it's non-nil, zero value otherwise. +func (t *Team) GetMembersCount() int { + if t == nil || t.MembersCount == nil { + return 0 + } + return *t.MembersCount +} + +// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. +func (t *Team) GetMembersURL() string { + if t == nil || t.MembersURL == nil { + return "" + } + return *t.MembersURL +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (t *Team) GetName() string { + if t == nil || t.Name == nil { + return "" + } + return *t.Name +} + +// GetOrganization returns the Organization field. +func (t *Team) GetOrganization() *Organization { + if t == nil { + return nil + } + return t.Organization +} + +// GetParent returns the Parent field. +func (t *Team) GetParent() *Team { + if t == nil { + return nil + } + return t.Parent +} + +// GetPermission returns the Permission field if it's non-nil, zero value otherwise. +func (t *Team) GetPermission() string { + if t == nil || t.Permission == nil { + return "" + } + return *t.Permission +} + +// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. +func (t *Team) GetPrivacy() string { + if t == nil || t.Privacy == nil { + return "" + } + return *t.Privacy +} + +// GetReposCount returns the ReposCount field if it's non-nil, zero value otherwise. +func (t *Team) GetReposCount() int { + if t == nil || t.ReposCount == nil { + return 0 + } + return *t.ReposCount +} + +// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. +func (t *Team) GetRepositoriesURL() string { + if t == nil || t.RepositoriesURL == nil { + return "" + } + return *t.RepositoriesURL +} + +// GetSlug returns the Slug field if it's non-nil, zero value otherwise. +func (t *Team) GetSlug() string { + if t == nil || t.Slug == nil { + return "" + } + return *t.Slug +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (t *Team) GetURL() string { + if t == nil || t.URL == nil { + return "" + } + return *t.URL +} + +// GetInstallation returns the Installation field. +func (t *TeamAddEvent) GetInstallation() *Installation { + if t == nil { + return nil + } + return t.Installation +} + +// GetOrg returns the Org field. +func (t *TeamAddEvent) GetOrg() *Organization { + if t == nil { + return nil + } + return t.Org +} + +// GetRepo returns the Repo field. +func (t *TeamAddEvent) GetRepo() *Repository { + if t == nil { + return nil + } + return t.Repo +} + +// GetSender returns the Sender field. +func (t *TeamAddEvent) GetSender() *User { + if t == nil { + return nil + } + return t.Sender +} + +// GetTeam returns the Team field. +func (t *TeamAddEvent) GetTeam() *Team { + if t == nil { + return nil + } + return t.Team +} + +// GetAuthor returns the Author field. +func (t *TeamDiscussion) GetAuthor() *User { + if t == nil { + return nil + } + return t.Author +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetBody() string { + if t == nil || t.Body == nil { + return "" + } + return *t.Body +} + +// GetBodyHTML returns the BodyHTML field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetBodyHTML() string { + if t == nil || t.BodyHTML == nil { + return "" + } + return *t.BodyHTML +} + +// GetBodyVersion returns the BodyVersion field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetBodyVersion() string { + if t == nil || t.BodyVersion == nil { return "" } - return *t.Description + return *t.BodyVersion } -// GetID returns the ID field if it's non-nil, zero value otherwise. -func (t *Team) GetID() int { - if t == nil || t.ID == nil { +// GetCommentsCount returns the CommentsCount field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetCommentsCount() int { + if t == nil || t.CommentsCount == nil { return 0 } - return *t.ID + return *t.CommentsCount } -// GetLDAPDN returns the LDAPDN field if it's non-nil, zero value otherwise. -func (t *Team) GetLDAPDN() string { - if t == nil || t.LDAPDN == nil { +// GetCommentsURL returns the CommentsURL field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetCommentsURL() string { + if t == nil || t.CommentsURL == nil { return "" } - return *t.LDAPDN + return *t.CommentsURL } -// GetMembersCount returns the MembersCount field if it's non-nil, zero value otherwise. -func (t *Team) GetMembersCount() int { - if t == nil || t.MembersCount == nil { - return 0 +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetCreatedAt() Timestamp { + if t == nil || t.CreatedAt == nil { + return Timestamp{} } - return *t.MembersCount + return *t.CreatedAt } -// GetMembersURL returns the MembersURL field if it's non-nil, zero value otherwise. -func (t *Team) GetMembersURL() string { - if t == nil || t.MembersURL == nil { +// GetHTMLURL returns the HTMLURL field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetHTMLURL() string { + if t == nil || t.HTMLURL == nil { return "" } - return *t.MembersURL + return *t.HTMLURL } -// GetName returns the Name field if it's non-nil, zero value otherwise. -func (t *Team) GetName() string { - if t == nil || t.Name == nil { - return "" +// GetLastEditedAt returns the LastEditedAt field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetLastEditedAt() Timestamp { + if t == nil || t.LastEditedAt == nil { + return Timestamp{} } - return *t.Name + return *t.LastEditedAt } -// GetPermission returns the Permission field if it's non-nil, zero value otherwise. -func (t *Team) GetPermission() string { - if t == nil || t.Permission == nil { +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetNodeID() string { + if t == nil || t.NodeID == nil { return "" } - return *t.Permission + return *t.NodeID } -// GetPrivacy returns the Privacy field if it's non-nil, zero value otherwise. -func (t *Team) GetPrivacy() string { - if t == nil || t.Privacy == nil { - return "" +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetNumber() int { + if t == nil || t.Number == nil { + return 0 } - return *t.Privacy + return *t.Number } -// GetReposCount returns the ReposCount field if it's non-nil, zero value otherwise. -func (t *Team) GetReposCount() int { - if t == nil || t.ReposCount == nil { - return 0 +// GetPinned returns the Pinned field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetPinned() bool { + if t == nil || t.Pinned == nil { + return false } - return *t.ReposCount + return *t.Pinned } -// GetRepositoriesURL returns the RepositoriesURL field if it's non-nil, zero value otherwise. -func (t *Team) GetRepositoriesURL() string { - if t == nil || t.RepositoriesURL == nil { +// GetPrivate returns the Private field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetPrivate() bool { + if t == nil || t.Private == nil { + return false + } + return *t.Private +} + +// GetReactions returns the Reactions field. +func (t *TeamDiscussion) GetReactions() *Reactions { + if t == nil { + return nil + } + return t.Reactions +} + +// GetTeamURL returns the TeamURL field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetTeamURL() string { + if t == nil || t.TeamURL == nil { return "" } - return *t.RepositoriesURL + return *t.TeamURL } -// GetSlug returns the Slug field if it's non-nil, zero value otherwise. -func (t *Team) GetSlug() string { - if t == nil || t.Slug == nil { +// GetTitle returns the Title field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetTitle() string { + if t == nil || t.Title == nil { return "" } - return *t.Slug + return *t.Title +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (t *TeamDiscussion) GetUpdatedAt() Timestamp { + if t == nil || t.UpdatedAt == nil { + return Timestamp{} + } + return *t.UpdatedAt } // GetURL returns the URL field if it's non-nil, zero value otherwise. -func (t *Team) GetURL() string { +func (t *TeamDiscussion) GetURL() string { if t == nil || t.URL == nil { return "" } @@ -6876,6 +10748,54 @@ func (t *TeamEvent) GetAction() string { return *t.Action } +// GetChanges returns the Changes field. +func (t *TeamEvent) GetChanges() *TeamChange { + if t == nil { + return nil + } + return t.Changes +} + +// GetInstallation returns the Installation field. +func (t *TeamEvent) GetInstallation() *Installation { + if t == nil { + return nil + } + return t.Installation +} + +// GetOrg returns the Org field. +func (t *TeamEvent) GetOrg() *Organization { + if t == nil { + return nil + } + return t.Org +} + +// GetRepo returns the Repo field. +func (t *TeamEvent) GetRepo() *Repository { + if t == nil { + return nil + } + return t.Repo +} + +// GetSender returns the Sender field. +func (t *TeamEvent) GetSender() *User { + if t == nil { + return nil + } + return t.Sender +} + +// GetTeam returns the Team field. +func (t *TeamEvent) GetTeam() *Team { + if t == nil { + return nil + } + return t.Team +} + // GetDescription returns the Description field if it's non-nil, zero value otherwise. func (t *TeamLDAPMapping) GetDescription() string { if t == nil || t.Description == nil { @@ -6885,7 +10805,7 @@ func (t *TeamLDAPMapping) GetDescription() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (t *TeamLDAPMapping) GetID() int { +func (t *TeamLDAPMapping) GetID() int64 { if t == nil || t.ID == nil { return 0 } @@ -6988,6 +10908,22 @@ func (t *TextMatch) GetProperty() string { return *t.Property } +// GetActor returns the Actor field. +func (t *Timeline) GetActor() *User { + if t == nil { + return nil + } + return t.Actor +} + +// GetAssignee returns the Assignee field. +func (t *Timeline) GetAssignee() *User { + if t == nil { + return nil + } + return t.Assignee +} + // GetCommitID returns the CommitID field if it's non-nil, zero value otherwise. func (t *Timeline) GetCommitID() string { if t == nil || t.CommitID == nil { @@ -7021,13 +10957,45 @@ func (t *Timeline) GetEvent() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (t *Timeline) GetID() int { +func (t *Timeline) GetID() int64 { if t == nil || t.ID == nil { return 0 } return *t.ID } +// GetLabel returns the Label field. +func (t *Timeline) GetLabel() *Label { + if t == nil { + return nil + } + return t.Label +} + +// GetMilestone returns the Milestone field. +func (t *Timeline) GetMilestone() *Milestone { + if t == nil { + return nil + } + return t.Milestone +} + +// GetRename returns the Rename field. +func (t *Timeline) GetRename() *Rename { + if t == nil { + return nil + } + return t.Rename +} + +// GetSource returns the Source field. +func (t *Timeline) GetSource() *Source { + if t == nil { + return nil + } + return t.Source +} + // GetURL returns the URL field if it's non-nil, zero value otherwise. func (t *Timeline) GetURL() string { if t == nil || t.URL == nil { @@ -7156,6 +11124,14 @@ func (t *Tree) GetSHA() string { return *t.SHA } +// GetTruncated returns the Truncated field if it's non-nil, zero value otherwise. +func (t *Tree) GetTruncated() bool { + if t == nil || t.Truncated == nil { + return false + } + return *t.Truncated +} + // GetContent returns the Content field if it's non-nil, zero value otherwise. func (t *TreeEntry) GetContent() string { if t == nil || t.Content == nil { @@ -7212,20 +11188,68 @@ func (t *TreeEntry) GetURL() string { return *t.URL } -// GetForce returns the Force field if it's non-nil, zero value otherwise. -func (u *updateRefRequest) GetForce() bool { - if u == nil || u.Force == nil { - return false +// GetCompletedAt returns the CompletedAt field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetCompletedAt() Timestamp { + if u == nil || u.CompletedAt == nil { + return Timestamp{} } - return *u.Force + return *u.CompletedAt } -// GetSHA returns the SHA field if it's non-nil, zero value otherwise. -func (u *updateRefRequest) GetSHA() string { - if u == nil || u.SHA == nil { +// GetConclusion returns the Conclusion field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetConclusion() string { + if u == nil || u.Conclusion == nil { + return "" + } + return *u.Conclusion +} + +// GetDetailsURL returns the DetailsURL field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetDetailsURL() string { + if u == nil || u.DetailsURL == nil { + return "" + } + return *u.DetailsURL +} + +// GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetExternalID() string { + if u == nil || u.ExternalID == nil { + return "" + } + return *u.ExternalID +} + +// GetHeadBranch returns the HeadBranch field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetHeadBranch() string { + if u == nil || u.HeadBranch == nil { + return "" + } + return *u.HeadBranch +} + +// GetHeadSHA returns the HeadSHA field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetHeadSHA() string { + if u == nil || u.HeadSHA == nil { + return "" + } + return *u.HeadSHA +} + +// GetOutput returns the Output field. +func (u *UpdateCheckRunOptions) GetOutput() *CheckRunOutput { + if u == nil { + return nil + } + return u.Output +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (u *UpdateCheckRunOptions) GetStatus() string { + if u == nil || u.Status == nil { return "" } - return *u.SHA + return *u.Status } // GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. @@ -7365,7 +11389,7 @@ func (u *User) GetHTMLURL() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (u *User) GetID() int { +func (u *User) GetID() int64 { if u == nil || u.ID == nil { return 0 } @@ -7396,6 +11420,14 @@ func (u *User) GetName() string { return *u.Name } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (u *User) GetNodeID() string { + if u == nil || u.NodeID == nil { + return "" + } + return *u.NodeID +} + // GetOrganizationsURL returns the OrganizationsURL field if it's non-nil, zero value otherwise. func (u *User) GetOrganizationsURL() string { if u == nil || u.OrganizationsURL == nil { @@ -7420,6 +11452,14 @@ func (u *User) GetPermissions() map[string]bool { return *u.Permissions } +// GetPlan returns the Plan field. +func (u *User) GetPlan() *Plan { + if u == nil { + return nil + } + return u.Plan +} + // GetPrivateGists returns the PrivateGists field if it's non-nil, zero value otherwise. func (u *User) GetPrivateGists() int { if u == nil || u.PrivateGists == nil { @@ -7524,6 +11564,22 @@ func (u *User) GetURL() string { return *u.URL } +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (u *UserContext) GetMessage() string { + if u == nil || u.Message == nil { + return "" + } + return *u.Message +} + +// GetOcticon returns the Octicon field if it's non-nil, zero value otherwise. +func (u *UserContext) GetOcticon() string { + if u == nil || u.Octicon == nil { + return "" + } + return *u.Octicon +} + // GetEmail returns the Email field if it's non-nil, zero value otherwise. func (u *UserEmail) GetEmail() string { if u == nil || u.Email == nil { @@ -7597,7 +11653,7 @@ func (u *UserLDAPMapping) GetGravatarID() string { } // GetID returns the ID field if it's non-nil, zero value otherwise. -func (u *UserLDAPMapping) GetID() int { +func (u *UserLDAPMapping) GetID() int64 { if u == nil || u.ID == nil { return 0 } @@ -7684,6 +11740,70 @@ func (u *UserLDAPMapping) GetURL() string { return *u.URL } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetCreatedAt() string { + if u == nil || u.CreatedAt == nil { + return "" + } + return *u.CreatedAt +} + +// GetExcludeAttachments returns the ExcludeAttachments field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetExcludeAttachments() bool { + if u == nil || u.ExcludeAttachments == nil { + return false + } + return *u.ExcludeAttachments +} + +// GetGUID returns the GUID field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetGUID() string { + if u == nil || u.GUID == nil { + return "" + } + return *u.GUID +} + +// GetID returns the ID field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetID() int64 { + if u == nil || u.ID == nil { + return 0 + } + return *u.ID +} + +// GetLockRepositories returns the LockRepositories field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetLockRepositories() bool { + if u == nil || u.LockRepositories == nil { + return false + } + return *u.LockRepositories +} + +// GetState returns the State field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetState() string { + if u == nil || u.State == nil { + return "" + } + return *u.State +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetUpdatedAt() string { + if u == nil || u.UpdatedAt == nil { + return "" + } + return *u.UpdatedAt +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (u *UserMigration) GetURL() string { + if u == nil || u.URL == nil { + return "" + } + return *u.URL +} + // GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise. func (u *UsersSearchResult) GetIncompleteResults() bool { if u == nil || u.IncompleteResults == nil { @@ -7732,6 +11852,30 @@ func (w *WatchEvent) GetAction() string { return *w.Action } +// GetInstallation returns the Installation field. +func (w *WatchEvent) GetInstallation() *Installation { + if w == nil { + return nil + } + return w.Installation +} + +// GetRepo returns the Repo field. +func (w *WatchEvent) GetRepo() *Repository { + if w == nil { + return nil + } + return w.Repo +} + +// GetSender returns the Sender field. +func (w *WatchEvent) GetSender() *User { + if w == nil { + return nil + } + return w.Sender +} + // GetEmail returns the Email field if it's non-nil, zero value otherwise. func (w *WebHookAuthor) GetEmail() string { if w == nil || w.Email == nil { @@ -7756,6 +11900,22 @@ func (w *WebHookAuthor) GetUsername() string { return *w.Username } +// GetAuthor returns the Author field. +func (w *WebHookCommit) GetAuthor() *WebHookAuthor { + if w == nil { + return nil + } + return w.Author +} + +// GetCommitter returns the Committer field. +func (w *WebHookCommit) GetCommitter() *WebHookAuthor { + if w == nil { + return nil + } + return w.Committer +} + // GetDistinct returns the Distinct field if it's non-nil, zero value otherwise. func (w *WebHookCommit) GetDistinct() bool { if w == nil || w.Distinct == nil { @@ -7836,6 +11996,22 @@ func (w *WebHookPayload) GetForced() bool { return *w.Forced } +// GetHeadCommit returns the HeadCommit field. +func (w *WebHookPayload) GetHeadCommit() *WebHookCommit { + if w == nil { + return nil + } + return w.HeadCommit +} + +// GetPusher returns the Pusher field. +func (w *WebHookPayload) GetPusher() *User { + if w == nil { + return nil + } + return w.Pusher +} + // GetRef returns the Ref field if it's non-nil, zero value otherwise. func (w *WebHookPayload) GetRef() string { if w == nil || w.Ref == nil { @@ -7844,6 +12020,22 @@ func (w *WebHookPayload) GetRef() string { return *w.Ref } +// GetRepo returns the Repo field. +func (w *WebHookPayload) GetRepo() *Repository { + if w == nil { + return nil + } + return w.Repo +} + +// GetSender returns the Sender field. +func (w *WebHookPayload) GetSender() *User { + if w == nil { + return nil + } + return w.Sender +} + // GetTotal returns the Total field if it's non-nil, zero value otherwise. func (w *WeeklyCommitActivity) GetTotal() int { if w == nil || w.Total == nil { diff --git a/vendor/github.com/google/go-github/github/github.go b/vendor/github.com/google/go-github/github/github.go index db06cfb4f..af1f1b23e 100644 --- a/vendor/github.com/google/go-github/github/github.go +++ b/vendor/github.com/google/go-github/github/github.go @@ -27,10 +27,9 @@ import ( ) const ( - libraryVersion = "14" defaultBaseURL = "https://api.github.com/" uploadBaseURL = "https://uploads.github.com/" - userAgent = "go-github/" + libraryVersion + userAgent = "go-github" headerRateLimit = "X-RateLimit-Limit" headerRateRemaining = "X-RateLimit-Remaining" @@ -46,15 +45,9 @@ const ( // Media Type values to access preview APIs - // https://developer.github.com/changes/2015-03-09-licenses-api/ - mediaTypeLicensesPreview = "application/vnd.github.drax-preview+json" - // https://developer.github.com/changes/2014-12-09-new-attributes-for-stars-api/ mediaTypeStarringPreview = "application/vnd.github.v3.star+json" - // https://developer.github.com/changes/2015-11-11-protected-branches-api/ - mediaTypeProtectedBranchesPreview = "application/vnd.github.loki-preview+json" - // https://help.github.com/enterprise/2.4/admin/guides/migrations/exporting-the-github-com-organization-s-repositories/ mediaTypeMigrationsPreview = "application/vnd.github.wyandotte-preview+json" @@ -100,11 +93,35 @@ const ( // https://developer.github.com/changes/2017-07-17-update-topics-on-repositories/ mediaTypeTopicsPreview = "application/vnd.github.mercy-preview+json" - // https://developer.github.com/changes/2017-07-26-team-review-request-thor-preview/ - mediaTypeTeamReviewPreview = "application/vnd.github.thor-preview+json" - // https://developer.github.com/changes/2017-08-30-preview-nested-teams/ mediaTypeNestedTeamsPreview = "application/vnd.github.hellcat-preview+json" + + // https://developer.github.com/changes/2017-11-09-repository-transfer-api-preview/ + mediaTypeRepositoryTransferPreview = "application/vnd.github.nightshade-preview+json" + + // https://developer.github.com/changes/2018-01-25-organization-invitation-api-preview/ + mediaTypeOrganizationInvitationPreview = "application/vnd.github.dazzler-preview+json" + + // https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews/ + mediaTypeRequiredApprovingReviewsPreview = "application/vnd.github.luke-cage-preview+json" + + // https://developer.github.com/changes/2018-02-22-label-description-search-preview/ + mediaTypeLabelDescriptionSearchPreview = "application/vnd.github.symmetra-preview+json" + + // https://developer.github.com/changes/2018-02-07-team-discussions-api/ + mediaTypeTeamDiscussionsPreview = "application/vnd.github.echo-preview+json" + + // https://developer.github.com/changes/2018-03-21-hovercard-api-preview/ + mediaTypeHovercardPreview = "application/vnd.github.hagar-preview+json" + + // https://developer.github.com/changes/2018-01-10-lock-reason-api-preview/ + mediaTypeLockReasonPreview = "application/vnd.github.sailor-v-preview+json" + + // https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/ + mediaTypeCheckRunsPreview = "application/vnd.github.antiope-preview+json" + + // https://developer.github.com/enterprise/2.13/v3/repos/pre_receive_hooks/ + mediaTypePreReceiveHooksPreview = "application/vnd.github.eye-scream-preview" ) // A Client manages communication with the GitHub API. @@ -133,19 +150,22 @@ type Client struct { Admin *AdminService Apps *AppsService Authorizations *AuthorizationsService + Checks *ChecksService Gists *GistsService Git *GitService Gitignores *GitignoresService Issues *IssuesService + Licenses *LicensesService + Marketplace *MarketplaceService + Migrations *MigrationService Organizations *OrganizationsService Projects *ProjectsService PullRequests *PullRequestsService + Reactions *ReactionsService Repositories *RepositoriesService Search *SearchService + Teams *TeamsService Users *UsersService - Licenses *LicensesService - Migrations *MigrationService - Reactions *ReactionsService } type service struct { @@ -222,11 +242,13 @@ func NewClient(httpClient *http.Client) *Client { c.Admin = (*AdminService)(&c.common) c.Apps = (*AppsService)(&c.common) c.Authorizations = (*AuthorizationsService)(&c.common) + c.Checks = (*ChecksService)(&c.common) c.Gists = (*GistsService)(&c.common) c.Git = (*GitService)(&c.common) c.Gitignores = (*GitignoresService)(&c.common) c.Issues = (*IssuesService)(&c.common) c.Licenses = (*LicensesService)(&c.common) + c.Marketplace = &MarketplaceService{client: c} c.Migrations = (*MigrationService)(&c.common) c.Organizations = (*OrganizationsService)(&c.common) c.Projects = (*ProjectsService)(&c.common) @@ -234,6 +256,7 @@ func NewClient(httpClient *http.Client) *Client { c.Reactions = (*ReactionsService)(&c.common) c.Repositories = (*RepositoriesService)(&c.common) c.Search = (*SearchService)(&c.common) + c.Teams = (*TeamsService)(&c.common) c.Users = (*UsersService)(&c.common) return c } @@ -352,7 +375,9 @@ type Response struct { FirstPage int LastPage int - Rate + // Explicitly specify the Rate type so Rate's String() receiver doesn't + // propagate to Response. + Rate Rate } // newResponse creates a new Response for the provided http.Response. @@ -467,12 +492,7 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Res return nil, err } - - defer func() { - // Drain up to 512 bytes and close the body to let the Transport reuse the connection - io.CopyN(ioutil.Discard, resp.Body, 512) - resp.Body.Close() - }() + defer resp.Body.Close() response := newResponse(resp) @@ -482,18 +502,25 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Res err = CheckResponse(resp) if err != nil { - // even though there was an error, we still return the response - // in case the caller wants to inspect it further - return response, err + // Even though there was an error, we still return the response + // in case the caller wants to inspect it further. + // However, if the error is AcceptedError, decode it below before + // returning from this function and closing the response body. + if _, ok := err.(*AcceptedError); !ok { + return response, err + } } if v != nil { if w, ok := v.(io.Writer); ok { io.Copy(w, resp.Body) } else { - err = json.NewDecoder(resp.Body).Decode(v) - if err == io.EOF { - err = nil // ignore EOF errors caused by empty response body + decErr := json.NewDecoder(resp.Body).Decode(v) + if decErr == io.EOF { + decErr = nil // ignore EOF errors caused by empty response body + } + if decErr != nil { + err = decErr } } } @@ -590,7 +617,7 @@ func (*AcceptedError) Error() string { } // AbuseRateLimitError occurs when GitHub returns 403 Forbidden response with the -// "documentation_url" field value equal to "https://developer.github.com/v3#abuse-rate-limits". +// "documentation_url" field value equal to "https://developer.github.com/v3/#abuse-rate-limits". type AbuseRateLimitError struct { Response *http.Response // HTTP response that caused this error Message string `json:"message"` // error message @@ -682,7 +709,7 @@ func CheckResponse(r *http.Response) error { Response: errorResponse.Response, Message: errorResponse.Message, } - case r.StatusCode == http.StatusForbidden && errorResponse.DocumentationURL == "https://developer.github.com/v3#abuse-rate-limits": + case r.StatusCode == http.StatusForbidden && strings.HasSuffix(errorResponse.DocumentationURL, "/v3/#abuse-rate-limits"): abuseRateLimitError := &AbuseRateLimitError{ Response: errorResponse.Response, Message: errorResponse.Message, @@ -848,14 +875,21 @@ func (t *UnauthenticatedRateLimitedTransport) RoundTrip(req *http.Request) (*htt // To set extra querystring params, we must make a copy of the Request so // that we don't modify the Request we were given. This is required by the // specification of http.RoundTripper. - req = cloneRequest(req) - q := req.URL.Query() + // + // Since we are going to modify only req.URL here, we only need a deep copy + // of req.URL. + req2 := new(http.Request) + *req2 = *req + req2.URL = new(url.URL) + *req2.URL = *req.URL + + q := req2.URL.Query() q.Set("client_id", t.ClientID) q.Set("client_secret", t.ClientSecret) - req.URL.RawQuery = q.Encode() + req2.URL.RawQuery = q.Encode() // Make the HTTP request. - return t.transport().RoundTrip(req) + return t.transport().RoundTrip(req2) } // Client returns an *http.Client that makes requests which are subject to the @@ -887,12 +921,24 @@ type BasicAuthTransport struct { // RoundTrip implements the RoundTripper interface. func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error) { - req = cloneRequest(req) // per RoundTrip contract - req.SetBasicAuth(t.Username, t.Password) + // To set extra headers, we must make a copy of the Request so + // that we don't modify the Request we were given. This is required by the + // specification of http.RoundTripper. + // + // Since we are going to modify only req.Header here, we only need a deep copy + // of req.Header. + req2 := new(http.Request) + *req2 = *req + req2.Header = make(http.Header, len(req.Header)) + for k, s := range req.Header { + req2.Header[k] = append([]string(nil), s...) + } + + req2.SetBasicAuth(t.Username, t.Password) if t.OTP != "" { - req.Header.Set(headerOTP, t.OTP) + req2.Header.Set(headerOTP, t.OTP) } - return t.transport().RoundTrip(req) + return t.transport().RoundTrip(req2) } // Client returns an *http.Client that makes requests that are authenticated @@ -908,20 +954,6 @@ func (t *BasicAuthTransport) transport() http.RoundTripper { return http.DefaultTransport } -// cloneRequest returns a clone of the provided *http.Request. The clone is a -// shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header, len(r.Header)) - for k, s := range r.Header { - r2.Header[k] = append([]string(nil), s...) - } - return r2 -} - // formatRateReset formats d to look like "[rate reset in 2s]" or // "[rate reset in 87m02s]" for the positive durations. And like "[rate limit was reset 87m02s ago]" // for the negative cases. @@ -955,6 +987,10 @@ func Bool(v bool) *bool { return &v } // to store v and returns a pointer to it. func Int(v int) *int { return &v } +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { return &v } + // String is a helper routine that allocates a new string value // to store v and returns a pointer to it. func String(v string) *string { return &v } diff --git a/vendor/github.com/google/go-github/github/github_test.go b/vendor/github.com/google/go-github/github/github_test.go deleted file mode 100644 index cc62fc6b9..000000000 --- a/vendor/github.com/google/go-github/github/github_test.go +++ /dev/null @@ -1,1056 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/http/httptest" - "net/url" - "os" - "path" - "reflect" - "strings" - "testing" - "time" -) - -var ( - // mux is the HTTP request multiplexer used with the test server. - mux *http.ServeMux - - // client is the GitHub client being tested. - client *Client - - // server is a test HTTP server used to provide mock API responses. - server *httptest.Server -) - -const ( - // baseURLPath is a non-empty Client.BaseURL path to use during tests, - // to ensure relative URLs are used for all endpoints. See issue #752. - baseURLPath = "/api-v3" -) - -// setup sets up a test HTTP server along with a github.Client that is -// configured to talk to that test server. Tests should register handlers on -// mux which provide mock responses for the API method being tested. -func setup() { - // test server - mux = http.NewServeMux() - - // We want to ensure that tests catch mistakes where the endpoint URL is - // specified as absolute rather than relative. It only makes a difference - // when there's a non-empty base URL path. So, use that. See issue #752. - apiHandler := http.NewServeMux() - apiHandler.Handle(baseURLPath+"/", http.StripPrefix(baseURLPath, mux)) - apiHandler.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { - fmt.Fprintln(os.Stderr, "FAIL: Client.BaseURL path prefix is not preserved in the request URL:") - fmt.Fprintln(os.Stderr) - fmt.Fprintln(os.Stderr, "\t"+req.URL.String()) - fmt.Fprintln(os.Stderr) - fmt.Fprintln(os.Stderr, "\tDid you accidentally use an absolute endpoint URL rather than relative?") - fmt.Fprintln(os.Stderr, "\tSee https://github.com/google/go-github/issues/752 for information.") - http.Error(w, "Client.BaseURL path prefix is not preserved in the request URL.", http.StatusInternalServerError) - }) - - server = httptest.NewServer(apiHandler) - - // github client configured to use test server - client = NewClient(nil) - url, _ := url.Parse(server.URL + baseURLPath + "/") - client.BaseURL = url - client.UploadURL = url -} - -// teardown closes the test HTTP server. -func teardown() { - server.Close() -} - -// openTestFile creates a new file with the given name and content for testing. -// In order to ensure the exact file name, this function will create a new temp -// directory, and create the file in that directory. It is the caller's -// responsibility to remove the directory and its contents when no longer needed. -func openTestFile(name, content string) (file *os.File, dir string, err error) { - dir, err = ioutil.TempDir("", "go-github") - if err != nil { - return nil, dir, err - } - - file, err = os.OpenFile(path.Join(dir, name), os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600) - if err != nil { - return nil, dir, err - } - - fmt.Fprint(file, content) - - // close and re-open the file to keep file.Stat() happy - file.Close() - file, err = os.Open(file.Name()) - if err != nil { - return nil, dir, err - } - - return file, dir, err -} - -func testMethod(t *testing.T, r *http.Request, want string) { - if got := r.Method; got != want { - t.Errorf("Request method: %v, want %v", got, want) - } -} - -type values map[string]string - -func testFormValues(t *testing.T, r *http.Request, values values) { - want := url.Values{} - for k, v := range values { - want.Set(k, v) - } - - r.ParseForm() - if got := r.Form; !reflect.DeepEqual(got, want) { - t.Errorf("Request parameters: %v, want %v", got, want) - } -} - -func testHeader(t *testing.T, r *http.Request, header string, want string) { - if got := r.Header.Get(header); got != want { - t.Errorf("Header.Get(%q) returned %q, want %q", header, got, want) - } -} - -func testURLParseError(t *testing.T, err error) { - if err == nil { - t.Errorf("Expected error to be returned") - } - if err, ok := err.(*url.Error); !ok || err.Op != "parse" { - t.Errorf("Expected URL parse error, got %+v", err) - } -} - -func testBody(t *testing.T, r *http.Request, want string) { - b, err := ioutil.ReadAll(r.Body) - if err != nil { - t.Errorf("Error reading request body: %v", err) - } - if got := string(b); got != want { - t.Errorf("request Body is %s, want %s", got, want) - } -} - -// Helper function to test that a value is marshalled to JSON as expected. -func testJSONMarshal(t *testing.T, v interface{}, want string) { - j, err := json.Marshal(v) - if err != nil { - t.Errorf("Unable to marshal JSON for %v", v) - } - - w := new(bytes.Buffer) - err = json.Compact(w, []byte(want)) - if err != nil { - t.Errorf("String is not valid json: %s", want) - } - - if w.String() != string(j) { - t.Errorf("json.Marshal(%q) returned %s, want %s", v, j, w) - } - - // now go the other direction and make sure things unmarshal as expected - u := reflect.ValueOf(v).Interface() - if err := json.Unmarshal([]byte(want), u); err != nil { - t.Errorf("Unable to unmarshal JSON for %v", want) - } - - if !reflect.DeepEqual(v, u) { - t.Errorf("json.Unmarshal(%q) returned %s, want %s", want, u, v) - } -} - -func TestNewClient(t *testing.T) { - c := NewClient(nil) - - if got, want := c.BaseURL.String(), defaultBaseURL; got != want { - t.Errorf("NewClient BaseURL is %v, want %v", got, want) - } - if got, want := c.UserAgent, userAgent; got != want { - t.Errorf("NewClient UserAgent is %v, want %v", got, want) - } -} - -func TestNewEnterpriseClient(t *testing.T) { - baseURL := "https://custom-url/" - uploadURL := "https://custom-upload-url/" - c, err := NewEnterpriseClient(baseURL, uploadURL, nil) - if err != nil { - t.Fatalf("NewEnterpriseClient returned unexpected error: %v", err) - } - - if got, want := c.BaseURL.String(), baseURL; got != want { - t.Errorf("NewClient BaseURL is %v, want %v", got, want) - } - if got, want := c.UploadURL.String(), uploadURL; got != want { - t.Errorf("NewClient UploadURL is %v, want %v", got, want) - } -} - -func TestNewEnterpriseClient_addsTrailingSlashToURLs(t *testing.T) { - baseURL := "https://custom-url" - uploadURL := "https://custom-upload-url" - formattedBaseURL := baseURL + "/" - formattedUploadURL := uploadURL + "/" - - c, err := NewEnterpriseClient(baseURL, uploadURL, nil) - if err != nil { - t.Fatalf("NewEnterpriseClient returned unexpected error: %v", err) - } - - if got, want := c.BaseURL.String(), formattedBaseURL; got != want { - t.Errorf("NewClient BaseURL is %v, want %v", got, want) - } - if got, want := c.UploadURL.String(), formattedUploadURL; got != want { - t.Errorf("NewClient UploadURL is %v, want %v", got, want) - } -} - -// Ensure that length of Client.rateLimits is the same as number of fields in RateLimits struct. -func TestClient_rateLimits(t *testing.T) { - if got, want := len(Client{}.rateLimits), reflect.TypeOf(RateLimits{}).NumField(); got != want { - t.Errorf("len(Client{}.rateLimits) is %v, want %v", got, want) - } -} - -func TestNewRequest(t *testing.T) { - c := NewClient(nil) - - inURL, outURL := "/foo", defaultBaseURL+"foo" - inBody, outBody := &User{Login: String("l")}, `{"login":"l"}`+"\n" - req, _ := c.NewRequest("GET", inURL, inBody) - - // test that relative URL was expanded - if got, want := req.URL.String(), outURL; got != want { - t.Errorf("NewRequest(%q) URL is %v, want %v", inURL, got, want) - } - - // test that body was JSON encoded - body, _ := ioutil.ReadAll(req.Body) - if got, want := string(body), outBody; got != want { - t.Errorf("NewRequest(%q) Body is %v, want %v", inBody, got, want) - } - - // test that default user-agent is attached to the request - if got, want := req.Header.Get("User-Agent"), c.UserAgent; got != want { - t.Errorf("NewRequest() User-Agent is %v, want %v", got, want) - } -} - -func TestNewRequest_invalidJSON(t *testing.T) { - c := NewClient(nil) - - type T struct { - A map[interface{}]interface{} - } - _, err := c.NewRequest("GET", ".", &T{}) - - if err == nil { - t.Error("Expected error to be returned.") - } - if err, ok := err.(*json.UnsupportedTypeError); !ok { - t.Errorf("Expected a JSON error; got %#v.", err) - } -} - -func TestNewRequest_badURL(t *testing.T) { - c := NewClient(nil) - _, err := c.NewRequest("GET", ":", nil) - testURLParseError(t, err) -} - -// ensure that no User-Agent header is set if the client's UserAgent is empty. -// This caused a problem with Google's internal http client. -func TestNewRequest_emptyUserAgent(t *testing.T) { - c := NewClient(nil) - c.UserAgent = "" - req, err := c.NewRequest("GET", ".", nil) - if err != nil { - t.Fatalf("NewRequest returned unexpected error: %v", err) - } - if _, ok := req.Header["User-Agent"]; ok { - t.Fatal("constructed request contains unexpected User-Agent header") - } -} - -// If a nil body is passed to github.NewRequest, make sure that nil is also -// passed to http.NewRequest. In most cases, passing an io.Reader that returns -// no content is fine, since there is no difference between an HTTP request -// body that is an empty string versus one that is not set at all. However in -// certain cases, intermediate systems may treat these differently resulting in -// subtle errors. -func TestNewRequest_emptyBody(t *testing.T) { - c := NewClient(nil) - req, err := c.NewRequest("GET", ".", nil) - if err != nil { - t.Fatalf("NewRequest returned unexpected error: %v", err) - } - if req.Body != nil { - t.Fatalf("constructed request contains a non-nil Body") - } -} - -func TestNewRequest_errorForNoTrailingSlash(t *testing.T) { - tests := []struct { - rawurl string - wantError bool - }{ - {rawurl: "https://example.com/api/v3", wantError: true}, - {rawurl: "https://example.com/api/v3/", wantError: false}, - } - c := NewClient(nil) - for _, test := range tests { - u, err := url.Parse(test.rawurl) - if err != nil { - t.Fatalf("url.Parse returned unexpected error: %v.", err) - } - c.BaseURL = u - if _, err := c.NewRequest(http.MethodGet, "test", nil); test.wantError && err == nil { - t.Fatalf("Expected error to be returned.") - } else if !test.wantError && err != nil { - t.Fatalf("NewRequest returned unexpected error: %v.", err) - } - } -} - -func TestNewUploadRequest_errorForNoTrailingSlash(t *testing.T) { - tests := []struct { - rawurl string - wantError bool - }{ - {rawurl: "https://example.com/api/uploads", wantError: true}, - {rawurl: "https://example.com/api/uploads/", wantError: false}, - } - c := NewClient(nil) - for _, test := range tests { - u, err := url.Parse(test.rawurl) - if err != nil { - t.Fatalf("url.Parse returned unexpected error: %v.", err) - } - c.UploadURL = u - if _, err = c.NewUploadRequest("test", nil, 0, ""); test.wantError && err == nil { - t.Fatalf("Expected error to be returned.") - } else if !test.wantError && err != nil { - t.Fatalf("NewUploadRequest returned unexpected error: %v.", err) - } - } -} - -func TestResponse_populatePageValues(t *testing.T) { - r := http.Response{ - Header: http.Header{ - "Link": {`; rel="first",` + - ` ; rel="prev",` + - ` ; rel="next",` + - ` ; rel="last"`, - }, - }, - } - - response := newResponse(&r) - if got, want := response.FirstPage, 1; got != want { - t.Errorf("response.FirstPage: %v, want %v", got, want) - } - if got, want := response.PrevPage, 2; want != got { - t.Errorf("response.PrevPage: %v, want %v", got, want) - } - if got, want := response.NextPage, 4; want != got { - t.Errorf("response.NextPage: %v, want %v", got, want) - } - if got, want := response.LastPage, 5; want != got { - t.Errorf("response.LastPage: %v, want %v", got, want) - } -} - -func TestResponse_populatePageValues_invalid(t *testing.T) { - r := http.Response{ - Header: http.Header{ - "Link": {`,` + - `; rel="first",` + - `https://api.github.com/?page=2; rel="prev",` + - `; rel="next",` + - `; rel="last"`, - }, - }, - } - - response := newResponse(&r) - if got, want := response.FirstPage, 0; got != want { - t.Errorf("response.FirstPage: %v, want %v", got, want) - } - if got, want := response.PrevPage, 0; got != want { - t.Errorf("response.PrevPage: %v, want %v", got, want) - } - if got, want := response.NextPage, 0; got != want { - t.Errorf("response.NextPage: %v, want %v", got, want) - } - if got, want := response.LastPage, 0; got != want { - t.Errorf("response.LastPage: %v, want %v", got, want) - } - - // more invalid URLs - r = http.Response{ - Header: http.Header{ - "Link": {`; rel="first"`}, - }, - } - - response = newResponse(&r) - if got, want := response.FirstPage, 0; got != want { - t.Errorf("response.FirstPage: %v, want %v", got, want) - } -} - -func TestDo(t *testing.T) { - setup() - defer teardown() - - type foo struct { - A string - } - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - if m := "GET"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - fmt.Fprint(w, `{"A":"a"}`) - }) - - req, _ := client.NewRequest("GET", ".", nil) - body := new(foo) - client.Do(context.Background(), req, body) - - want := &foo{"a"} - if !reflect.DeepEqual(body, want) { - t.Errorf("Response body = %v, want %v", body, want) - } -} - -func TestDo_httpError(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "Bad Request", 400) - }) - - req, _ := client.NewRequest("GET", ".", nil) - resp, err := client.Do(context.Background(), req, nil) - - if err == nil { - t.Fatal("Expected HTTP 400 error, got no error.") - } - if resp.StatusCode != 400 { - t.Errorf("Expected HTTP 400 error, got %d status code.", resp.StatusCode) - } -} - -// Test handling of an error caused by the internal http client's Do() -// function. A redirect loop is pretty unlikely to occur within the GitHub -// API, but does allow us to exercise the right code path. -func TestDo_redirectLoop(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, baseURLPath, http.StatusFound) - }) - - req, _ := client.NewRequest("GET", ".", nil) - _, err := client.Do(context.Background(), req, nil) - - if err == nil { - t.Error("Expected error to be returned.") - } - if err, ok := err.(*url.Error); !ok { - t.Errorf("Expected a URL error; got %#v.", err) - } -} - -// Test that an error caused by the internal http client's Do() function -// does not leak the client secret. -func TestDo_sanitizeURL(t *testing.T) { - tp := &UnauthenticatedRateLimitedTransport{ - ClientID: "id", - ClientSecret: "secret", - } - unauthedClient := NewClient(tp.Client()) - unauthedClient.BaseURL = &url.URL{Scheme: "http", Host: "127.0.0.1:0", Path: "/"} // Use port 0 on purpose to trigger a dial TCP error, expect to get "dial tcp 127.0.0.1:0: connect: can't assign requested address". - req, err := unauthedClient.NewRequest("GET", ".", nil) - if err != nil { - t.Fatalf("NewRequest returned unexpected error: %v", err) - } - _, err = unauthedClient.Do(context.Background(), req, nil) - if err == nil { - t.Fatal("Expected error to be returned.") - } - if strings.Contains(err.Error(), "client_secret=secret") { - t.Errorf("Do error contains secret, should be redacted:\n%q", err) - } -} - -func TestDo_rateLimit(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(headerRateLimit, "60") - w.Header().Set(headerRateRemaining, "59") - w.Header().Set(headerRateReset, "1372700873") - }) - - req, _ := client.NewRequest("GET", ".", nil) - resp, err := client.Do(context.Background(), req, nil) - if err != nil { - t.Errorf("Do returned unexpected error: %v", err) - } - if got, want := resp.Rate.Limit, 60; got != want { - t.Errorf("Client rate limit = %v, want %v", got, want) - } - if got, want := resp.Rate.Remaining, 59; got != want { - t.Errorf("Client rate remaining = %v, want %v", got, want) - } - reset := time.Date(2013, 7, 1, 17, 47, 53, 0, time.UTC) - if resp.Rate.Reset.UTC() != reset { - t.Errorf("Client rate reset = %v, want %v", resp.Rate.Reset, reset) - } -} - -// ensure rate limit is still parsed, even for error responses -func TestDo_rateLimit_errorResponse(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(headerRateLimit, "60") - w.Header().Set(headerRateRemaining, "59") - w.Header().Set(headerRateReset, "1372700873") - http.Error(w, "Bad Request", 400) - }) - - req, _ := client.NewRequest("GET", ".", nil) - resp, err := client.Do(context.Background(), req, nil) - if err == nil { - t.Error("Expected error to be returned.") - } - if _, ok := err.(*RateLimitError); ok { - t.Errorf("Did not expect a *RateLimitError error; got %#v.", err) - } - if got, want := resp.Rate.Limit, 60; got != want { - t.Errorf("Client rate limit = %v, want %v", got, want) - } - if got, want := resp.Rate.Remaining, 59; got != want { - t.Errorf("Client rate remaining = %v, want %v", got, want) - } - reset := time.Date(2013, 7, 1, 17, 47, 53, 0, time.UTC) - if resp.Rate.Reset.UTC() != reset { - t.Errorf("Client rate reset = %v, want %v", resp.Rate.Reset, reset) - } -} - -// Ensure *RateLimitError is returned when API rate limit is exceeded. -func TestDo_rateLimit_rateLimitError(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(headerRateLimit, "60") - w.Header().Set(headerRateRemaining, "0") - w.Header().Set(headerRateReset, "1372700873") - w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.WriteHeader(http.StatusForbidden) - fmt.Fprintln(w, `{ - "message": "API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", - "documentation_url": "https://developer.github.com/v3/#rate-limiting" -}`) - }) - - req, _ := client.NewRequest("GET", ".", nil) - _, err := client.Do(context.Background(), req, nil) - - if err == nil { - t.Error("Expected error to be returned.") - } - rateLimitErr, ok := err.(*RateLimitError) - if !ok { - t.Fatalf("Expected a *RateLimitError error; got %#v.", err) - } - if got, want := rateLimitErr.Rate.Limit, 60; got != want { - t.Errorf("rateLimitErr rate limit = %v, want %v", got, want) - } - if got, want := rateLimitErr.Rate.Remaining, 0; got != want { - t.Errorf("rateLimitErr rate remaining = %v, want %v", got, want) - } - reset := time.Date(2013, 7, 1, 17, 47, 53, 0, time.UTC) - if rateLimitErr.Rate.Reset.UTC() != reset { - t.Errorf("rateLimitErr rate reset = %v, want %v", rateLimitErr.Rate.Reset.UTC(), reset) - } -} - -// Ensure a network call is not made when it's known that API rate limit is still exceeded. -func TestDo_rateLimit_noNetworkCall(t *testing.T) { - setup() - defer teardown() - - reset := time.Now().UTC().Add(time.Minute).Round(time.Second) // Rate reset is a minute from now, with 1 second precision. - - mux.HandleFunc("/first", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set(headerRateLimit, "60") - w.Header().Set(headerRateRemaining, "0") - w.Header().Set(headerRateReset, fmt.Sprint(reset.Unix())) - w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.WriteHeader(http.StatusForbidden) - fmt.Fprintln(w, `{ - "message": "API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", - "documentation_url": "https://developer.github.com/v3/#rate-limiting" -}`) - }) - - madeNetworkCall := false - mux.HandleFunc("/second", func(w http.ResponseWriter, r *http.Request) { - madeNetworkCall = true - }) - - // First request is made, and it makes the client aware of rate reset time being in the future. - req, _ := client.NewRequest("GET", "first", nil) - client.Do(context.Background(), req, nil) - - // Second request should not cause a network call to be made, since client can predict a rate limit error. - req, _ = client.NewRequest("GET", "second", nil) - _, err := client.Do(context.Background(), req, nil) - - if madeNetworkCall { - t.Fatal("Network call was made, even though rate limit is known to still be exceeded.") - } - - if err == nil { - t.Error("Expected error to be returned.") - } - rateLimitErr, ok := err.(*RateLimitError) - if !ok { - t.Fatalf("Expected a *RateLimitError error; got %#v.", err) - } - if got, want := rateLimitErr.Rate.Limit, 60; got != want { - t.Errorf("rateLimitErr rate limit = %v, want %v", got, want) - } - if got, want := rateLimitErr.Rate.Remaining, 0; got != want { - t.Errorf("rateLimitErr rate remaining = %v, want %v", got, want) - } - if rateLimitErr.Rate.Reset.UTC() != reset { - t.Errorf("rateLimitErr rate reset = %v, want %v", rateLimitErr.Rate.Reset.UTC(), reset) - } -} - -// Ensure *AbuseRateLimitError is returned when the response indicates that -// the client has triggered an abuse detection mechanism. -func TestDo_rateLimit_abuseRateLimitError(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.WriteHeader(http.StatusForbidden) - // When the abuse rate limit error is of the "temporarily blocked from content creation" type, - // there is no "Retry-After" header. - fmt.Fprintln(w, `{ - "message": "You have triggered an abuse detection mechanism and have been temporarily blocked from content creation. Please retry your request again later.", - "documentation_url": "https://developer.github.com/v3#abuse-rate-limits" -}`) - }) - - req, _ := client.NewRequest("GET", ".", nil) - _, err := client.Do(context.Background(), req, nil) - - if err == nil { - t.Error("Expected error to be returned.") - } - abuseRateLimitErr, ok := err.(*AbuseRateLimitError) - if !ok { - t.Fatalf("Expected a *AbuseRateLimitError error; got %#v.", err) - } - if got, want := abuseRateLimitErr.RetryAfter, (*time.Duration)(nil); got != want { - t.Errorf("abuseRateLimitErr RetryAfter = %v, want %v", got, want) - } -} - -// Ensure *AbuseRateLimitError.RetryAfter is parsed correctly. -func TestDo_rateLimit_abuseRateLimitError_retryAfter(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Retry-After", "123") // Retry after value of 123 seconds. - w.WriteHeader(http.StatusForbidden) - fmt.Fprintln(w, `{ - "message": "You have triggered an abuse detection mechanism ...", - "documentation_url": "https://developer.github.com/v3#abuse-rate-limits" -}`) - }) - - req, _ := client.NewRequest("GET", ".", nil) - _, err := client.Do(context.Background(), req, nil) - - if err == nil { - t.Error("Expected error to be returned.") - } - abuseRateLimitErr, ok := err.(*AbuseRateLimitError) - if !ok { - t.Fatalf("Expected a *AbuseRateLimitError error; got %#v.", err) - } - if abuseRateLimitErr.RetryAfter == nil { - t.Fatalf("abuseRateLimitErr RetryAfter is nil, expected not-nil") - } - if got, want := *abuseRateLimitErr.RetryAfter, 123*time.Second; got != want { - t.Errorf("abuseRateLimitErr RetryAfter = %v, want %v", got, want) - } -} - -func TestDo_noContent(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusNoContent) - }) - - var body json.RawMessage - - req, _ := client.NewRequest("GET", ".", nil) - _, err := client.Do(context.Background(), req, &body) - if err != nil { - t.Fatalf("Do returned unexpected error: %v", err) - } -} - -func TestSanitizeURL(t *testing.T) { - tests := []struct { - in, want string - }{ - {"/?a=b", "/?a=b"}, - {"/?a=b&client_secret=secret", "/?a=b&client_secret=REDACTED"}, - {"/?a=b&client_id=id&client_secret=secret", "/?a=b&client_id=id&client_secret=REDACTED"}, - } - - for _, tt := range tests { - inURL, _ := url.Parse(tt.in) - want, _ := url.Parse(tt.want) - - if got := sanitizeURL(inURL); !reflect.DeepEqual(got, want) { - t.Errorf("sanitizeURL(%v) returned %v, want %v", tt.in, got, want) - } - } -} - -func TestCheckResponse(t *testing.T) { - res := &http.Response{ - Request: &http.Request{}, - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(strings.NewReader(`{"message":"m", - "errors": [{"resource": "r", "field": "f", "code": "c"}], - "block": {"reason": "dmca", "created_at": "2016-03-17T15:39:46Z"}}`)), - } - err := CheckResponse(res).(*ErrorResponse) - - if err == nil { - t.Errorf("Expected error response.") - } - - want := &ErrorResponse{ - Response: res, - Message: "m", - Errors: []Error{{Resource: "r", Field: "f", Code: "c"}}, - Block: &struct { - Reason string `json:"reason,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - }{ - Reason: "dmca", - CreatedAt: &Timestamp{time.Date(2016, 3, 17, 15, 39, 46, 0, time.UTC)}, - }, - } - if !reflect.DeepEqual(err, want) { - t.Errorf("Error = %#v, want %#v", err, want) - } -} - -// ensure that we properly handle API errors that do not contain a response body -func TestCheckResponse_noBody(t *testing.T) { - res := &http.Response{ - Request: &http.Request{}, - StatusCode: http.StatusBadRequest, - Body: ioutil.NopCloser(strings.NewReader("")), - } - err := CheckResponse(res).(*ErrorResponse) - - if err == nil { - t.Errorf("Expected error response.") - } - - want := &ErrorResponse{ - Response: res, - } - if !reflect.DeepEqual(err, want) { - t.Errorf("Error = %#v, want %#v", err, want) - } -} - -func TestParseBooleanResponse_true(t *testing.T) { - result, err := parseBoolResponse(nil) - if err != nil { - t.Errorf("parseBoolResponse returned error: %+v", err) - } - - if want := true; result != want { - t.Errorf("parseBoolResponse returned %+v, want: %+v", result, want) - } -} - -func TestParseBooleanResponse_false(t *testing.T) { - v := &ErrorResponse{Response: &http.Response{StatusCode: http.StatusNotFound}} - result, err := parseBoolResponse(v) - if err != nil { - t.Errorf("parseBoolResponse returned error: %+v", err) - } - - if want := false; result != want { - t.Errorf("parseBoolResponse returned %+v, want: %+v", result, want) - } -} - -func TestParseBooleanResponse_error(t *testing.T) { - v := &ErrorResponse{Response: &http.Response{StatusCode: http.StatusBadRequest}} - result, err := parseBoolResponse(v) - - if err == nil { - t.Errorf("Expected error to be returned.") - } - - if want := false; result != want { - t.Errorf("parseBoolResponse returned %+v, want: %+v", result, want) - } -} - -func TestErrorResponse_Error(t *testing.T) { - res := &http.Response{Request: &http.Request{}} - err := ErrorResponse{Message: "m", Response: res} - if err.Error() == "" { - t.Errorf("Expected non-empty ErrorResponse.Error()") - } -} - -func TestError_Error(t *testing.T) { - err := Error{} - if err.Error() == "" { - t.Errorf("Expected non-empty Error.Error()") - } -} - -func TestRateLimits(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/rate_limit", func(w http.ResponseWriter, r *http.Request) { - if m := "GET"; m != r.Method { - t.Errorf("Request method = %v, want %v", r.Method, m) - } - fmt.Fprint(w, `{"resources":{ - "core": {"limit":2,"remaining":1,"reset":1372700873}, - "search": {"limit":3,"remaining":2,"reset":1372700874} - }}`) - }) - - rate, _, err := client.RateLimits(context.Background()) - if err != nil { - t.Errorf("RateLimits returned error: %v", err) - } - - want := &RateLimits{ - Core: &Rate{ - Limit: 2, - Remaining: 1, - Reset: Timestamp{time.Date(2013, 7, 1, 17, 47, 53, 0, time.UTC).Local()}, - }, - Search: &Rate{ - Limit: 3, - Remaining: 2, - Reset: Timestamp{time.Date(2013, 7, 1, 17, 47, 54, 0, time.UTC).Local()}, - }, - } - if !reflect.DeepEqual(rate, want) { - t.Errorf("RateLimits returned %+v, want %+v", rate, want) - } - - if got, want := client.rateLimits[coreCategory], *want.Core; got != want { - t.Errorf("client.rateLimits[coreCategory] is %+v, want %+v", got, want) - } - if got, want := client.rateLimits[searchCategory], *want.Search; got != want { - t.Errorf("client.rateLimits[searchCategory] is %+v, want %+v", got, want) - } -} - -func TestUnauthenticatedRateLimitedTransport(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - var v, want string - q := r.URL.Query() - if v, want = q.Get("client_id"), "id"; v != want { - t.Errorf("OAuth Client ID = %v, want %v", v, want) - } - if v, want = q.Get("client_secret"), "secret"; v != want { - t.Errorf("OAuth Client Secret = %v, want %v", v, want) - } - }) - - tp := &UnauthenticatedRateLimitedTransport{ - ClientID: "id", - ClientSecret: "secret", - } - unauthedClient := NewClient(tp.Client()) - unauthedClient.BaseURL = client.BaseURL - req, _ := unauthedClient.NewRequest("GET", ".", nil) - unauthedClient.Do(context.Background(), req, nil) -} - -func TestUnauthenticatedRateLimitedTransport_missingFields(t *testing.T) { - // missing ClientID - tp := &UnauthenticatedRateLimitedTransport{ - ClientSecret: "secret", - } - _, err := tp.RoundTrip(nil) - if err == nil { - t.Errorf("Expected error to be returned") - } - - // missing ClientSecret - tp = &UnauthenticatedRateLimitedTransport{ - ClientID: "id", - } - _, err = tp.RoundTrip(nil) - if err == nil { - t.Errorf("Expected error to be returned") - } -} - -func TestUnauthenticatedRateLimitedTransport_transport(t *testing.T) { - // default transport - tp := &UnauthenticatedRateLimitedTransport{ - ClientID: "id", - ClientSecret: "secret", - } - if tp.transport() != http.DefaultTransport { - t.Errorf("Expected http.DefaultTransport to be used.") - } - - // custom transport - tp = &UnauthenticatedRateLimitedTransport{ - ClientID: "id", - ClientSecret: "secret", - Transport: &http.Transport{}, - } - if tp.transport() == http.DefaultTransport { - t.Errorf("Expected custom transport to be used.") - } -} - -func TestBasicAuthTransport(t *testing.T) { - setup() - defer teardown() - - username, password, otp := "u", "p", "123456" - - mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - u, p, ok := r.BasicAuth() - if !ok { - t.Errorf("request does not contain basic auth credentials") - } - if u != username { - t.Errorf("request contained basic auth username %q, want %q", u, username) - } - if p != password { - t.Errorf("request contained basic auth password %q, want %q", p, password) - } - if got, want := r.Header.Get(headerOTP), otp; got != want { - t.Errorf("request contained OTP %q, want %q", got, want) - } - }) - - tp := &BasicAuthTransport{ - Username: username, - Password: password, - OTP: otp, - } - basicAuthClient := NewClient(tp.Client()) - basicAuthClient.BaseURL = client.BaseURL - req, _ := basicAuthClient.NewRequest("GET", ".", nil) - basicAuthClient.Do(context.Background(), req, nil) -} - -func TestBasicAuthTransport_transport(t *testing.T) { - // default transport - tp := &BasicAuthTransport{} - if tp.transport() != http.DefaultTransport { - t.Errorf("Expected http.DefaultTransport to be used.") - } - - // custom transport - tp = &BasicAuthTransport{ - Transport: &http.Transport{}, - } - if tp.transport() == http.DefaultTransport { - t.Errorf("Expected custom transport to be used.") - } -} - -func TestFormatRateReset(t *testing.T) { - d := 120*time.Minute + 12*time.Second - got := formatRateReset(d) - want := "[rate reset in 120m12s]" - if got != want { - t.Errorf("Format is wrong. got: %v, want: %v", got, want) - } - - d = 14*time.Minute + 2*time.Second - got = formatRateReset(d) - want = "[rate reset in 14m02s]" - if got != want { - t.Errorf("Format is wrong. got: %v, want: %v", got, want) - } - - d = 2*time.Minute + 2*time.Second - got = formatRateReset(d) - want = "[rate reset in 2m02s]" - if got != want { - t.Errorf("Format is wrong. got: %v, want: %v", got, want) - } - - d = 12 * time.Second - got = formatRateReset(d) - want = "[rate reset in 12s]" - if got != want { - t.Errorf("Format is wrong. got: %v, want: %v", got, want) - } - - d = -1 * (2*time.Hour + 2*time.Second) - got = formatRateReset(d) - want = "[rate limit was reset 120m02s ago]" - if got != want { - t.Errorf("Format is wrong. got: %v, want: %v", got, want) - } -} diff --git a/vendor/github.com/google/go-github/github/gitignore_test.go b/vendor/github.com/google/go-github/github/gitignore_test.go deleted file mode 100644 index e5a62643b..000000000 --- a/vendor/github.com/google/go-github/github/gitignore_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestGitignoresService_List(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gitignore/templates", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `["C", "Go"]`) - }) - - available, _, err := client.Gitignores.List(context.Background()) - if err != nil { - t.Errorf("Gitignores.List returned error: %v", err) - } - - want := []string{"C", "Go"} - if !reflect.DeepEqual(available, want) { - t.Errorf("Gitignores.List returned %+v, want %+v", available, want) - } -} - -func TestGitignoresService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/gitignore/templates/name", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"name":"Name","source":"template source"}`) - }) - - gitignore, _, err := client.Gitignores.Get(context.Background(), "name") - if err != nil { - t.Errorf("Gitignores.List returned error: %v", err) - } - - want := &Gitignore{Name: String("Name"), Source: String("template source")} - if !reflect.DeepEqual(gitignore, want) { - t.Errorf("Gitignores.Get returned %+v, want %+v", gitignore, want) - } -} - -func TestGitignoresService_Get_invalidTemplate(t *testing.T) { - _, _, err := client.Gitignores.Get(context.Background(), "%") - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/issues.go b/vendor/github.com/google/go-github/github/issues.go index 9b7a9d687..1e0991ce4 100644 --- a/vendor/github.com/google/go-github/github/issues.go +++ b/vendor/github.com/google/go-github/github/issues.go @@ -8,6 +8,7 @@ package github import ( "context" "fmt" + "strings" "time" ) @@ -25,7 +26,7 @@ type IssuesService service // this is an issue, and if PullRequestLinks is not nil, this is a pull request. // The IsPullRequest helper method can be used to check that. type Issue struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Number *int `json:"number,omitempty"` State *string `json:"state,omitempty"` Locked *bool `json:"locked,omitempty"` @@ -50,10 +51,15 @@ type Issue struct { Repository *Repository `json:"repository,omitempty"` Reactions *Reactions `json:"reactions,omitempty"` Assignees []*User `json:"assignees,omitempty"` + NodeID *string `json:"node_id,omitempty"` // TextMatches is only populated from search results that request text matches // See: search.go and https://developer.github.com/v3/search/#text-match-metadata TextMatches []TextMatch `json:"text_matches,omitempty"` + + // ActiveLockReason is populated only when LockReason is provided while locking the issue. + // Possible values are: "off-topic", "too heated", "resolved", and "spam". + ActiveLockReason *string `json:"active_lock_reason,omitempty"` } func (i Issue) String() string { @@ -153,8 +159,9 @@ func (s *IssuesService) listIssues(ctx context.Context, u string, opt *IssueList return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) + // TODO: remove custom Accept headers when APIs fully launch. + acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var issues []*Issue resp, err := s.client.Do(ctx, req, &issues) @@ -220,8 +227,9 @@ func (s *IssuesService) ListByRepo(ctx context.Context, owner string, repo strin return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) + // TODO: remove custom Accept headers when APIs fully launch. + acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLabelDescriptionSearchPreview, mediaTypeIntegrationPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) var issues []*Issue resp, err := s.client.Do(ctx, req, &issues) @@ -242,8 +250,9 @@ func (s *IssuesService) Get(ctx context.Context, owner string, repo string, numb return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches. - req.Header.Set("Accept", mediaTypeReactionsPreview) + // TODO: remove custom Accept headers when APIs fully launch. + acceptHeaders := []string{mediaTypeReactionsPreview, mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview} + req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) issue := new(Issue) resp, err := s.client.Do(ctx, req, issue) @@ -264,6 +273,9 @@ func (s *IssuesService) Create(ctx context.Context, owner string, repo string, i return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + i := new(Issue) resp, err := s.client.Do(ctx, req, i) if err != nil { @@ -283,6 +295,9 @@ func (s *IssuesService) Edit(ctx context.Context, owner string, repo string, num return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + i := new(Issue) resp, err := s.client.Do(ctx, req, i) if err != nil { @@ -292,16 +307,29 @@ func (s *IssuesService) Edit(ctx context.Context, owner string, repo string, num return i, resp, nil } +// LockIssueOptions specifies the optional parameters to the +// IssuesService.Lock method. +type LockIssueOptions struct { + // LockReason specifies the reason to lock this issue. + // Providing a lock reason can help make it clearer to contributors why an issue + // was locked. Possible values are: "off-topic", "too heated", "resolved", and "spam". + LockReason string `json:"lock_reason,omitempty"` +} + // Lock an issue's conversation. // // GitHub API docs: https://developer.github.com/v3/issues/#lock-an-issue -func (s *IssuesService) Lock(ctx context.Context, owner string, repo string, number int) (*Response, error) { +func (s *IssuesService) Lock(ctx context.Context, owner string, repo string, number int, opt *LockIssueOptions) (*Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/%d/lock", owner, repo, number) - req, err := s.client.NewRequest("PUT", u, nil) + req, err := s.client.NewRequest("PUT", u, opt) if err != nil { return nil, err } + if opt != nil { + req.Header.Set("Accept", mediaTypeLockReasonPreview) + } + return s.client.Do(ctx, req, nil) } diff --git a/vendor/github.com/google/go-github/github/issues_assignees_test.go b/vendor/github.com/google/go-github/github/issues_assignees_test.go deleted file mode 100644 index d88a7888a..000000000 --- a/vendor/github.com/google/go-github/github/issues_assignees_test.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestIssuesService_ListAssignees(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/assignees", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 2} - assignees, _, err := client.Issues.ListAssignees(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Issues.ListAssignees returned error: %v", err) - } - - want := []*User{{ID: Int(1)}} - if !reflect.DeepEqual(assignees, want) { - t.Errorf("Issues.ListAssignees returned %+v, want %+v", assignees, want) - } -} - -func TestIssuesService_ListAssignees_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListAssignees(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestIssuesService_IsAssignee_true(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - }) - - assignee, _, err := client.Issues.IsAssignee(context.Background(), "o", "r", "u") - if err != nil { - t.Errorf("Issues.IsAssignee returned error: %v", err) - } - if want := true; assignee != want { - t.Errorf("Issues.IsAssignee returned %+v, want %+v", assignee, want) - } -} - -func TestIssuesService_IsAssignee_false(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - w.WriteHeader(http.StatusNotFound) - }) - - assignee, _, err := client.Issues.IsAssignee(context.Background(), "o", "r", "u") - if err != nil { - t.Errorf("Issues.IsAssignee returned error: %v", err) - } - if want := false; assignee != want { - t.Errorf("Issues.IsAssignee returned %+v, want %+v", assignee, want) - } -} - -func TestIssuesService_IsAssignee_error(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/assignees/u", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - http.Error(w, "BadRequest", http.StatusBadRequest) - }) - - assignee, _, err := client.Issues.IsAssignee(context.Background(), "o", "r", "u") - if err == nil { - t.Errorf("Expected HTTP 400 response") - } - if want := false; assignee != want { - t.Errorf("Issues.IsAssignee returned %+v, want %+v", assignee, want) - } -} - -func TestIssuesService_IsAssignee_invalidOwner(t *testing.T) { - _, _, err := client.Issues.IsAssignee(context.Background(), "%", "r", "u") - testURLParseError(t, err) -} - -func TestIssuesService_AddAssignees(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/assignees", func(w http.ResponseWriter, r *http.Request) { - var assignees struct { - Assignees []string `json:"assignees,omitempty"` - } - json.NewDecoder(r.Body).Decode(&assignees) - - testMethod(t, r, "POST") - want := []string{"user1", "user2"} - if !reflect.DeepEqual(assignees.Assignees, want) { - t.Errorf("assignees = %+v, want %+v", assignees, want) - } - fmt.Fprint(w, `{"number":1,"assignees":[{"login":"user1"},{"login":"user2"}]}`) - }) - - got, _, err := client.Issues.AddAssignees(context.Background(), "o", "r", 1, []string{"user1", "user2"}) - if err != nil { - t.Errorf("Issues.AddAssignees returned error: %v", err) - } - - want := &Issue{Number: Int(1), Assignees: []*User{{Login: String("user1")}, {Login: String("user2")}}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Issues.AddAssignees = %+v, want %+v", got, want) - } -} - -func TestIssuesService_RemoveAssignees(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/assignees", func(w http.ResponseWriter, r *http.Request) { - var assignees struct { - Assignees []string `json:"assignees,omitempty"` - } - json.NewDecoder(r.Body).Decode(&assignees) - - testMethod(t, r, "DELETE") - want := []string{"user1", "user2"} - if !reflect.DeepEqual(assignees.Assignees, want) { - t.Errorf("assignees = %+v, want %+v", assignees, want) - } - fmt.Fprint(w, `{"number":1,"assignees":[]}`) - }) - - got, _, err := client.Issues.RemoveAssignees(context.Background(), "o", "r", 1, []string{"user1", "user2"}) - if err != nil { - t.Errorf("Issues.RemoveAssignees returned error: %v", err) - } - - want := &Issue{Number: Int(1), Assignees: []*User{}} - if !reflect.DeepEqual(got, want) { - t.Errorf("Issues.RemoveAssignees = %+v, want %+v", got, want) - } -} diff --git a/vendor/github.com/google/go-github/github/issues_comments.go b/vendor/github.com/google/go-github/github/issues_comments.go index fd72657cd..ab68afe2f 100644 --- a/vendor/github.com/google/go-github/github/issues_comments.go +++ b/vendor/github.com/google/go-github/github/issues_comments.go @@ -13,15 +13,19 @@ import ( // IssueComment represents a comment left on an issue. type IssueComment struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` Body *string `json:"body,omitempty"` User *User `json:"user,omitempty"` Reactions *Reactions `json:"reactions,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` - URL *string `json:"url,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - IssueURL *string `json:"issue_url,omitempty"` + // AuthorAssociation is the comment author's relationship to the issue's repository. + // Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE". + AuthorAssociation *string `json:"author_association,omitempty"` + URL *string `json:"url,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + IssueURL *string `json:"issue_url,omitempty"` } func (i IssueComment) String() string { @@ -79,8 +83,8 @@ func (s *IssuesService) ListComments(ctx context.Context, owner string, repo str // GetComment fetches the specified issue comment. // // GitHub API docs: https://developer.github.com/v3/issues/comments/#get-a-single-comment -func (s *IssuesService) GetComment(ctx context.Context, owner string, repo string, id int) (*IssueComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id) +func (s *IssuesService) GetComment(ctx context.Context, owner string, repo string, commentID int64) (*IssueComment, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, commentID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { @@ -118,10 +122,11 @@ func (s *IssuesService) CreateComment(ctx context.Context, owner string, repo st } // EditComment updates an issue comment. +// A non-nil comment.Body must be provided. Other comment fields should be left nil. // // GitHub API docs: https://developer.github.com/v3/issues/comments/#edit-a-comment -func (s *IssuesService) EditComment(ctx context.Context, owner string, repo string, id int, comment *IssueComment) (*IssueComment, *Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id) +func (s *IssuesService) EditComment(ctx context.Context, owner string, repo string, commentID int64, comment *IssueComment) (*IssueComment, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, commentID) req, err := s.client.NewRequest("PATCH", u, comment) if err != nil { return nil, nil, err @@ -138,8 +143,8 @@ func (s *IssuesService) EditComment(ctx context.Context, owner string, repo stri // DeleteComment deletes an issue comment. // // GitHub API docs: https://developer.github.com/v3/issues/comments/#delete-a-comment -func (s *IssuesService) DeleteComment(ctx context.Context, owner string, repo string, id int) (*Response, error) { - u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id) +func (s *IssuesService) DeleteComment(ctx context.Context, owner string, repo string, commentID int64) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, commentID) req, err := s.client.NewRequest("DELETE", u, nil) if err != nil { return nil, err diff --git a/vendor/github.com/google/go-github/github/issues_comments_test.go b/vendor/github.com/google/go-github/github/issues_comments_test.go deleted file mode 100644 index 78c486362..000000000 --- a/vendor/github.com/google/go-github/github/issues_comments_test.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestIssuesService_ListComments_allIssues(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - testFormValues(t, r, values{ - "sort": "updated", - "direction": "desc", - "since": "2002-02-10T15:30:00Z", - "page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &IssueListCommentsOptions{ - Sort: "updated", - Direction: "desc", - Since: time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC), - ListOptions: ListOptions{Page: 2}, - } - comments, _, err := client.Issues.ListComments(context.Background(), "o", "r", 0, opt) - if err != nil { - t.Errorf("Issues.ListComments returned error: %v", err) - } - - want := []*IssueComment{{ID: Int(1)}} - if !reflect.DeepEqual(comments, want) { - t.Errorf("Issues.ListComments returned %+v, want %+v", comments, want) - } -} - -func TestIssuesService_ListComments_specificIssue(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/comments", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `[{"id":1}]`) - }) - - comments, _, err := client.Issues.ListComments(context.Background(), "o", "r", 1, nil) - if err != nil { - t.Errorf("Issues.ListComments returned error: %v", err) - } - - want := []*IssueComment{{ID: Int(1)}} - if !reflect.DeepEqual(comments, want) { - t.Errorf("Issues.ListComments returned %+v, want %+v", comments, want) - } -} - -func TestIssuesService_ListComments_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListComments(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_GetComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/comments/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Issues.GetComment(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Issues.GetComment returned error: %v", err) - } - - want := &IssueComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Issues.GetComment returned %+v, want %+v", comment, want) - } -} - -func TestIssuesService_GetComment_invalidOrg(t *testing.T) { - _, _, err := client.Issues.GetComment(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} - -func TestIssuesService_CreateComment(t *testing.T) { - setup() - defer teardown() - - input := &IssueComment{Body: String("b")} - - mux.HandleFunc("/repos/o/r/issues/1/comments", func(w http.ResponseWriter, r *http.Request) { - v := new(IssueComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Issues.CreateComment(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Issues.CreateComment returned error: %v", err) - } - - want := &IssueComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Issues.CreateComment returned %+v, want %+v", comment, want) - } -} - -func TestIssuesService_CreateComment_invalidOrg(t *testing.T) { - _, _, err := client.Issues.CreateComment(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_EditComment(t *testing.T) { - setup() - defer teardown() - - input := &IssueComment{Body: String("b")} - - mux.HandleFunc("/repos/o/r/issues/comments/1", func(w http.ResponseWriter, r *http.Request) { - v := new(IssueComment) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id":1}`) - }) - - comment, _, err := client.Issues.EditComment(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Issues.EditComment returned error: %v", err) - } - - want := &IssueComment{ID: Int(1)} - if !reflect.DeepEqual(comment, want) { - t.Errorf("Issues.EditComment returned %+v, want %+v", comment, want) - } -} - -func TestIssuesService_EditComment_invalidOwner(t *testing.T) { - _, _, err := client.Issues.EditComment(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_DeleteComment(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/comments/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Issues.DeleteComment(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Issues.DeleteComments returned error: %v", err) - } -} - -func TestIssuesService_DeleteComment_invalidOwner(t *testing.T) { - _, err := client.Issues.DeleteComment(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/issues_events.go b/vendor/github.com/google/go-github/github/issues_events.go index 93e5d66fb..f71e46361 100644 --- a/vendor/github.com/google/go-github/github/issues_events.go +++ b/vendor/github.com/google/go-github/github/issues_events.go @@ -13,7 +13,7 @@ import ( // IssueEvent represents an event that occurred around an Issue or Pull Request. type IssueEvent struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` // The User that generated this event. @@ -34,9 +34,13 @@ type IssueEvent struct { // The Actor committed to master a commit mentioning the issue in its commit message. // CommitID holds the SHA1 of the commit. // - // reopened, locked, unlocked + // reopened, unlocked // The Actor did that to the issue. // + // locked + // The Actor locked the issue. + // LockReason holds the reason of locking the issue (if provided while locking). + // // renamed // The Actor changed the issue title from Rename.From to Rename.To. // @@ -64,12 +68,13 @@ type IssueEvent struct { Issue *Issue `json:"issue,omitempty"` // Only present on certain events; see above. - Assignee *User `json:"assignee,omitempty"` - Assigner *User `json:"assigner,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - Milestone *Milestone `json:"milestone,omitempty"` - Label *Label `json:"label,omitempty"` - Rename *Rename `json:"rename,omitempty"` + Assignee *User `json:"assignee,omitempty"` + Assigner *User `json:"assigner,omitempty"` + CommitID *string `json:"commit_id,omitempty"` + Milestone *Milestone `json:"milestone,omitempty"` + Label *Label `json:"label,omitempty"` + Rename *Rename `json:"rename,omitempty"` + LockReason *string `json:"lock_reason,omitempty"` } // ListIssueEvents lists events for the specified issue. @@ -87,6 +92,8 @@ func (s *IssuesService) ListIssueEvents(ctx context.Context, owner, repo string, return nil, nil, err } + req.Header.Set("Accept", mediaTypeLockReasonPreview) + var events []*IssueEvent resp, err := s.client.Do(ctx, req, &events) if err != nil { @@ -123,7 +130,7 @@ func (s *IssuesService) ListRepositoryEvents(ctx context.Context, owner, repo st // GetEvent returns the specified issue event. // // GitHub API docs: https://developer.github.com/v3/issues/events/#get-a-single-event -func (s *IssuesService) GetEvent(ctx context.Context, owner, repo string, id int) (*IssueEvent, *Response, error) { +func (s *IssuesService) GetEvent(ctx context.Context, owner, repo string, id int64) (*IssueEvent, *Response, error) { u := fmt.Sprintf("repos/%v/%v/issues/events/%v", owner, repo, id) req, err := s.client.NewRequest("GET", u, nil) diff --git a/vendor/github.com/google/go-github/github/issues_events_test.go b/vendor/github.com/google/go-github/github/issues_events_test.go deleted file mode 100644 index d85b6223e..000000000 --- a/vendor/github.com/google/go-github/github/issues_events_test.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestIssuesService_ListIssueEvents(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - events, _, err := client.Issues.ListIssueEvents(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("Issues.ListIssueEvents returned error: %v", err) - } - - want := []*IssueEvent{{ID: Int(1)}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Issues.ListIssueEvents returned %+v, want %+v", events, want) - } -} - -func TestIssuesService_ListRepositoryEvents(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/events", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - events, _, err := client.Issues.ListRepositoryEvents(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Issues.ListRepositoryEvents returned error: %v", err) - } - - want := []*IssueEvent{{ID: Int(1)}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Issues.ListRepositoryEvents returned %+v, want %+v", events, want) - } -} - -func TestIssuesService_GetEvent(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/events/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1}`) - }) - - event, _, err := client.Issues.GetEvent(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Issues.GetEvent returned error: %v", err) - } - - want := &IssueEvent{ID: Int(1)} - if !reflect.DeepEqual(event, want) { - t.Errorf("Issues.GetEvent returned %+v, want %+v", event, want) - } -} diff --git a/vendor/github.com/google/go-github/github/issues_labels.go b/vendor/github.com/google/go-github/github/issues_labels.go index b0e34c40f..adcbe0683 100644 --- a/vendor/github.com/google/go-github/github/issues_labels.go +++ b/vendor/github.com/google/go-github/github/issues_labels.go @@ -12,10 +12,13 @@ import ( // Label represents a GitHub label on an Issue type Label struct { - ID *int `json:"id,omitempty"` - URL *string `json:"url,omitempty"` - Name *string `json:"name,omitempty"` - Color *string `json:"color,omitempty"` + ID *int64 `json:"id,omitempty"` + URL *string `json:"url,omitempty"` + Name *string `json:"name,omitempty"` + Color *string `json:"color,omitempty"` + Description *string `json:"description,omitempty"` + Default *bool `json:"default,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (l Label) String() string { @@ -37,6 +40,9 @@ func (s *IssuesService) ListLabels(ctx context.Context, owner string, repo strin return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + var labels []*Label resp, err := s.client.Do(ctx, req, &labels) if err != nil { @@ -56,6 +62,9 @@ func (s *IssuesService) GetLabel(ctx context.Context, owner string, repo string, return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + label := new(Label) resp, err := s.client.Do(ctx, req, label) if err != nil { @@ -75,6 +84,9 @@ func (s *IssuesService) CreateLabel(ctx context.Context, owner string, repo stri return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + l := new(Label) resp, err := s.client.Do(ctx, req, l) if err != nil { @@ -94,6 +106,9 @@ func (s *IssuesService) EditLabel(ctx context.Context, owner string, repo string return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + l := new(Label) resp, err := s.client.Do(ctx, req, l) if err != nil { @@ -130,6 +145,9 @@ func (s *IssuesService) ListLabelsByIssue(ctx context.Context, owner string, rep return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + var labels []*Label resp, err := s.client.Do(ctx, req, &labels) if err != nil { @@ -149,6 +167,9 @@ func (s *IssuesService) AddLabelsToIssue(ctx context.Context, owner string, repo return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + var l []*Label resp, err := s.client.Do(ctx, req, &l) if err != nil { @@ -167,6 +188,10 @@ func (s *IssuesService) RemoveLabelForIssue(ctx context.Context, owner string, r if err != nil { return nil, err } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + return s.client.Do(ctx, req, nil) } @@ -180,6 +205,9 @@ func (s *IssuesService) ReplaceLabelsForIssue(ctx context.Context, owner string, return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + var l []*Label resp, err := s.client.Do(ctx, req, &l) if err != nil { @@ -198,6 +226,10 @@ func (s *IssuesService) RemoveLabelsForIssue(ctx context.Context, owner string, if err != nil { return nil, err } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + return s.client.Do(ctx, req, nil) } @@ -216,6 +248,9 @@ func (s *IssuesService) ListLabelsForMilestone(ctx context.Context, owner string return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeLabelDescriptionSearchPreview) + var labels []*Label resp, err := s.client.Do(ctx, req, &labels) if err != nil { diff --git a/vendor/github.com/google/go-github/github/issues_labels_test.go b/vendor/github.com/google/go-github/github/issues_labels_test.go deleted file mode 100644 index 5380427a1..000000000 --- a/vendor/github.com/google/go-github/github/issues_labels_test.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestIssuesService_ListLabels(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/labels", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"name": "a"},{"name": "b"}]`) - }) - - opt := &ListOptions{Page: 2} - labels, _, err := client.Issues.ListLabels(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Issues.ListLabels returned error: %v", err) - } - - want := []*Label{{Name: String("a")}, {Name: String("b")}} - if !reflect.DeepEqual(labels, want) { - t.Errorf("Issues.ListLabels returned %+v, want %+v", labels, want) - } -} - -func TestIssuesService_ListLabels_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListLabels(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestIssuesService_GetLabel(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/labels/n", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"url":"u", "name": "n", "color": "c"}`) - }) - - label, _, err := client.Issues.GetLabel(context.Background(), "o", "r", "n") - if err != nil { - t.Errorf("Issues.GetLabel returned error: %v", err) - } - - want := &Label{URL: String("u"), Name: String("n"), Color: String("c")} - if !reflect.DeepEqual(label, want) { - t.Errorf("Issues.GetLabel returned %+v, want %+v", label, want) - } -} - -func TestIssuesService_GetLabel_invalidOwner(t *testing.T) { - _, _, err := client.Issues.GetLabel(context.Background(), "%", "%", "%") - testURLParseError(t, err) -} - -func TestIssuesService_CreateLabel(t *testing.T) { - setup() - defer teardown() - - input := &Label{Name: String("n")} - - mux.HandleFunc("/repos/o/r/labels", func(w http.ResponseWriter, r *http.Request) { - v := new(Label) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"url":"u"}`) - }) - - label, _, err := client.Issues.CreateLabel(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Issues.CreateLabel returned error: %v", err) - } - - want := &Label{URL: String("u")} - if !reflect.DeepEqual(label, want) { - t.Errorf("Issues.CreateLabel returned %+v, want %+v", label, want) - } -} - -func TestIssuesService_CreateLabel_invalidOwner(t *testing.T) { - _, _, err := client.Issues.CreateLabel(context.Background(), "%", "%", nil) - testURLParseError(t, err) -} - -func TestIssuesService_EditLabel(t *testing.T) { - setup() - defer teardown() - - input := &Label{Name: String("z")} - - mux.HandleFunc("/repos/o/r/labels/n", func(w http.ResponseWriter, r *http.Request) { - v := new(Label) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"url":"u"}`) - }) - - label, _, err := client.Issues.EditLabel(context.Background(), "o", "r", "n", input) - if err != nil { - t.Errorf("Issues.EditLabel returned error: %v", err) - } - - want := &Label{URL: String("u")} - if !reflect.DeepEqual(label, want) { - t.Errorf("Issues.EditLabel returned %+v, want %+v", label, want) - } -} - -func TestIssuesService_EditLabel_invalidOwner(t *testing.T) { - _, _, err := client.Issues.EditLabel(context.Background(), "%", "%", "%", nil) - testURLParseError(t, err) -} - -func TestIssuesService_DeleteLabel(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/labels/n", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Issues.DeleteLabel(context.Background(), "o", "r", "n") - if err != nil { - t.Errorf("Issues.DeleteLabel returned error: %v", err) - } -} - -func TestIssuesService_DeleteLabel_invalidOwner(t *testing.T) { - _, err := client.Issues.DeleteLabel(context.Background(), "%", "%", "%") - testURLParseError(t, err) -} - -func TestIssuesService_ListLabelsByIssue(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/labels", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"name":"a","id":1},{"name":"b","id":2}]`) - }) - - opt := &ListOptions{Page: 2} - labels, _, err := client.Issues.ListLabelsByIssue(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("Issues.ListLabelsByIssue returned error: %v", err) - } - - want := []*Label{ - {Name: String("a"), ID: Int(1)}, - {Name: String("b"), ID: Int(2)}, - } - if !reflect.DeepEqual(labels, want) { - t.Errorf("Issues.ListLabelsByIssue returned %+v, want %+v", labels, want) - } -} - -func TestIssuesService_ListLabelsByIssue_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListLabelsByIssue(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_AddLabelsToIssue(t *testing.T) { - setup() - defer teardown() - - input := []string{"a", "b"} - - mux.HandleFunc("/repos/o/r/issues/1/labels", func(w http.ResponseWriter, r *http.Request) { - var v []string - json.NewDecoder(r.Body).Decode(&v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `[{"url":"u"}]`) - }) - - labels, _, err := client.Issues.AddLabelsToIssue(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Issues.AddLabelsToIssue returned error: %v", err) - } - - want := []*Label{{URL: String("u")}} - if !reflect.DeepEqual(labels, want) { - t.Errorf("Issues.AddLabelsToIssue returned %+v, want %+v", labels, want) - } -} - -func TestIssuesService_AddLabelsToIssue_invalidOwner(t *testing.T) { - _, _, err := client.Issues.AddLabelsToIssue(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_RemoveLabelForIssue(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/labels/l", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Issues.RemoveLabelForIssue(context.Background(), "o", "r", 1, "l") - if err != nil { - t.Errorf("Issues.RemoveLabelForIssue returned error: %v", err) - } -} - -func TestIssuesService_RemoveLabelForIssue_invalidOwner(t *testing.T) { - _, err := client.Issues.RemoveLabelForIssue(context.Background(), "%", "%", 1, "%") - testURLParseError(t, err) -} - -func TestIssuesService_ReplaceLabelsForIssue(t *testing.T) { - setup() - defer teardown() - - input := []string{"a", "b"} - - mux.HandleFunc("/repos/o/r/issues/1/labels", func(w http.ResponseWriter, r *http.Request) { - var v []string - json.NewDecoder(r.Body).Decode(&v) - - testMethod(t, r, "PUT") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `[{"url":"u"}]`) - }) - - labels, _, err := client.Issues.ReplaceLabelsForIssue(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Issues.ReplaceLabelsForIssue returned error: %v", err) - } - - want := []*Label{{URL: String("u")}} - if !reflect.DeepEqual(labels, want) { - t.Errorf("Issues.ReplaceLabelsForIssue returned %+v, want %+v", labels, want) - } -} - -func TestIssuesService_ReplaceLabelsForIssue_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ReplaceLabelsForIssue(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_RemoveLabelsForIssue(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/labels", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Issues.RemoveLabelsForIssue(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Issues.RemoveLabelsForIssue returned error: %v", err) - } -} - -func TestIssuesService_RemoveLabelsForIssue_invalidOwner(t *testing.T) { - _, err := client.Issues.RemoveLabelsForIssue(context.Background(), "%", "%", 1) - testURLParseError(t, err) -} - -func TestIssuesService_ListLabelsForMilestone(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/milestones/1/labels", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{"page": "2"}) - fmt.Fprint(w, `[{"name": "a"},{"name": "b"}]`) - }) - - opt := &ListOptions{Page: 2} - labels, _, err := client.Issues.ListLabelsForMilestone(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("Issues.ListLabelsForMilestone returned error: %v", err) - } - - want := []*Label{{Name: String("a")}, {Name: String("b")}} - if !reflect.DeepEqual(labels, want) { - t.Errorf("Issues.ListLabelsForMilestone returned %+v, want %+v", labels, want) - } -} - -func TestIssuesService_ListLabelsForMilestone_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListLabelsForMilestone(context.Background(), "%", "%", 1, nil) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/issues_milestones.go b/vendor/github.com/google/go-github/github/issues_milestones.go index e6e882d14..ffe9aae14 100644 --- a/vendor/github.com/google/go-github/github/issues_milestones.go +++ b/vendor/github.com/google/go-github/github/issues_milestones.go @@ -16,7 +16,7 @@ type Milestone struct { URL *string `json:"url,omitempty"` HTMLURL *string `json:"html_url,omitempty"` LabelsURL *string `json:"labels_url,omitempty"` - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` Number *int `json:"number,omitempty"` State *string `json:"state,omitempty"` Title *string `json:"title,omitempty"` @@ -28,6 +28,7 @@ type Milestone struct { UpdatedAt *time.Time `json:"updated_at,omitempty"` ClosedAt *time.Time `json:"closed_at,omitempty"` DueOn *time.Time `json:"due_on,omitempty"` + NodeID *string `json:"node_id,omitempty"` } func (m Milestone) String() string { diff --git a/vendor/github.com/google/go-github/github/issues_milestones_test.go b/vendor/github.com/google/go-github/github/issues_milestones_test.go deleted file mode 100644 index befa1b487..000000000 --- a/vendor/github.com/google/go-github/github/issues_milestones_test.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestIssuesService_ListMilestones(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/milestones", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testFormValues(t, r, values{ - "state": "closed", - "sort": "due_date", - "direction": "asc", - "page": "2", - }) - fmt.Fprint(w, `[{"number":1}]`) - }) - - opt := &MilestoneListOptions{"closed", "due_date", "asc", ListOptions{Page: 2}} - milestones, _, err := client.Issues.ListMilestones(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("IssuesService.ListMilestones returned error: %v", err) - } - - want := []*Milestone{{Number: Int(1)}} - if !reflect.DeepEqual(milestones, want) { - t.Errorf("IssuesService.ListMilestones returned %+v, want %+v", milestones, want) - } -} - -func TestIssuesService_ListMilestones_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListMilestones(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestIssuesService_GetMilestone(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/milestones/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - fmt.Fprint(w, `{"number":1}`) - }) - - milestone, _, err := client.Issues.GetMilestone(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("IssuesService.GetMilestone returned error: %v", err) - } - - want := &Milestone{Number: Int(1)} - if !reflect.DeepEqual(milestone, want) { - t.Errorf("IssuesService.GetMilestone returned %+v, want %+v", milestone, want) - } -} - -func TestIssuesService_GetMilestone_invalidOwner(t *testing.T) { - _, _, err := client.Issues.GetMilestone(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} - -func TestIssuesService_CreateMilestone(t *testing.T) { - setup() - defer teardown() - - input := &Milestone{Title: String("t")} - - mux.HandleFunc("/repos/o/r/milestones", func(w http.ResponseWriter, r *http.Request) { - v := new(Milestone) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"number":1}`) - }) - - milestone, _, err := client.Issues.CreateMilestone(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("IssuesService.CreateMilestone returned error: %v", err) - } - - want := &Milestone{Number: Int(1)} - if !reflect.DeepEqual(milestone, want) { - t.Errorf("IssuesService.CreateMilestone returned %+v, want %+v", milestone, want) - } -} - -func TestIssuesService_CreateMilestone_invalidOwner(t *testing.T) { - _, _, err := client.Issues.CreateMilestone(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestIssuesService_EditMilestone(t *testing.T) { - setup() - defer teardown() - - input := &Milestone{Title: String("t")} - - mux.HandleFunc("/repos/o/r/milestones/1", func(w http.ResponseWriter, r *http.Request) { - v := new(Milestone) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"number":1}`) - }) - - milestone, _, err := client.Issues.EditMilestone(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("IssuesService.EditMilestone returned error: %v", err) - } - - want := &Milestone{Number: Int(1)} - if !reflect.DeepEqual(milestone, want) { - t.Errorf("IssuesService.EditMilestone returned %+v, want %+v", milestone, want) - } -} - -func TestIssuesService_EditMilestone_invalidOwner(t *testing.T) { - _, _, err := client.Issues.EditMilestone(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_DeleteMilestone(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/milestones/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - }) - - _, err := client.Issues.DeleteMilestone(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("IssuesService.DeleteMilestone returned error: %v", err) - } -} - -func TestIssuesService_DeleteMilestone_invalidOwner(t *testing.T) { - _, err := client.Issues.DeleteMilestone(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/issues_test.go b/vendor/github.com/google/go-github/github/issues_test.go deleted file mode 100644 index da60740fb..000000000 --- a/vendor/github.com/google/go-github/github/issues_test.go +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" - "time" -) - -func TestIssuesService_List_all(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/issues", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - testFormValues(t, r, values{ - "filter": "all", - "state": "closed", - "labels": "a,b", - "sort": "updated", - "direction": "asc", - "since": "2002-02-10T15:30:00Z", - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `[{"number":1}]`) - }) - - opt := &IssueListOptions{ - "all", "closed", []string{"a", "b"}, "updated", "asc", - time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC), - ListOptions{Page: 1, PerPage: 2}, - } - issues, _, err := client.Issues.List(context.Background(), true, opt) - if err != nil { - t.Errorf("Issues.List returned error: %v", err) - } - - want := []*Issue{{Number: Int(1)}} - if !reflect.DeepEqual(issues, want) { - t.Errorf("Issues.List returned %+v, want %+v", issues, want) - } -} - -func TestIssuesService_List_owned(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/user/issues", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `[{"number":1}]`) - }) - - issues, _, err := client.Issues.List(context.Background(), false, nil) - if err != nil { - t.Errorf("Issues.List returned error: %v", err) - } - - want := []*Issue{{Number: Int(1)}} - if !reflect.DeepEqual(issues, want) { - t.Errorf("Issues.List returned %+v, want %+v", issues, want) - } -} - -func TestIssuesService_ListByOrg(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/issues", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `[{"number":1}]`) - }) - - issues, _, err := client.Issues.ListByOrg(context.Background(), "o", nil) - if err != nil { - t.Errorf("Issues.ListByOrg returned error: %v", err) - } - - want := []*Issue{{Number: Int(1)}} - if !reflect.DeepEqual(issues, want) { - t.Errorf("Issues.List returned %+v, want %+v", issues, want) - } -} - -func TestIssuesService_ListByOrg_invalidOrg(t *testing.T) { - _, _, err := client.Issues.ListByOrg(context.Background(), "%", nil) - testURLParseError(t, err) -} - -func TestIssuesService_ListByRepo(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - testFormValues(t, r, values{ - "milestone": "*", - "state": "closed", - "assignee": "a", - "creator": "c", - "mentioned": "m", - "labels": "a,b", - "sort": "updated", - "direction": "asc", - "since": "2002-02-10T15:30:00Z", - }) - fmt.Fprint(w, `[{"number":1}]`) - }) - - opt := &IssueListByRepoOptions{ - "*", "closed", "a", "c", "m", []string{"a", "b"}, "updated", "asc", - time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC), - ListOptions{0, 0}, - } - issues, _, err := client.Issues.ListByRepo(context.Background(), "o", "r", opt) - if err != nil { - t.Errorf("Issues.ListByOrg returned error: %v", err) - } - - want := []*Issue{{Number: Int(1)}} - if !reflect.DeepEqual(issues, want) { - t.Errorf("Issues.List returned %+v, want %+v", issues, want) - } -} - -func TestIssuesService_ListByRepo_invalidOwner(t *testing.T) { - _, _, err := client.Issues.ListByRepo(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestIssuesService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeReactionsPreview) - fmt.Fprint(w, `{"number":1, "labels": [{"url": "u", "name": "n", "color": "c"}]}`) - }) - - issue, _, err := client.Issues.Get(context.Background(), "o", "r", 1) - if err != nil { - t.Errorf("Issues.Get returned error: %v", err) - } - - want := &Issue{ - Number: Int(1), - Labels: []Label{{ - URL: String("u"), - Name: String("n"), - Color: String("c"), - }}, - } - if !reflect.DeepEqual(issue, want) { - t.Errorf("Issues.Get returned %+v, want %+v", issue, want) - } -} - -func TestIssuesService_Get_invalidOwner(t *testing.T) { - _, _, err := client.Issues.Get(context.Background(), "%", "r", 1) - testURLParseError(t, err) -} - -func TestIssuesService_Create(t *testing.T) { - setup() - defer teardown() - - input := &IssueRequest{ - Title: String("t"), - Body: String("b"), - Assignee: String("a"), - Labels: &[]string{"l1", "l2"}, - } - - mux.HandleFunc("/repos/o/r/issues", func(w http.ResponseWriter, r *http.Request) { - v := new(IssueRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"number":1}`) - }) - - issue, _, err := client.Issues.Create(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("Issues.Create returned error: %v", err) - } - - want := &Issue{Number: Int(1)} - if !reflect.DeepEqual(issue, want) { - t.Errorf("Issues.Create returned %+v, want %+v", issue, want) - } -} - -func TestIssuesService_Create_invalidOwner(t *testing.T) { - _, _, err := client.Issues.Create(context.Background(), "%", "r", nil) - testURLParseError(t, err) -} - -func TestIssuesService_Edit(t *testing.T) { - setup() - defer teardown() - - input := &IssueRequest{Title: String("t")} - - mux.HandleFunc("/repos/o/r/issues/1", func(w http.ResponseWriter, r *http.Request) { - v := new(IssueRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"number":1}`) - }) - - issue, _, err := client.Issues.Edit(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("Issues.Edit returned error: %v", err) - } - - want := &Issue{Number: Int(1)} - if !reflect.DeepEqual(issue, want) { - t.Errorf("Issues.Edit returned %+v, want %+v", issue, want) - } -} - -func TestIssuesService_Edit_invalidOwner(t *testing.T) { - _, _, err := client.Issues.Edit(context.Background(), "%", "r", 1, nil) - testURLParseError(t, err) -} - -func TestIssuesService_Lock(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "PUT") - - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Issues.Lock(context.Background(), "o", "r", 1); err != nil { - t.Errorf("Issues.Lock returned error: %v", err) - } -} - -func TestIssuesService_Unlock(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/lock", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Issues.Unlock(context.Background(), "o", "r", 1); err != nil { - t.Errorf("Issues.Unlock returned error: %v", err) - } -} - -func TestIsPullRequest(t *testing.T) { - i := new(Issue) - if i.IsPullRequest() == true { - t.Errorf("expected i.IsPullRequest (%v) to return false, got true", i) - } - i.PullRequestLinks = &PullRequestLinks{URL: String("http://example.com")} - if i.IsPullRequest() == false { - t.Errorf("expected i.IsPullRequest (%v) to return true, got false", i) - } -} diff --git a/vendor/github.com/google/go-github/github/issues_timeline.go b/vendor/github.com/google/go-github/github/issues_timeline.go index bc0b10899..9cfda8320 100644 --- a/vendor/github.com/google/go-github/github/issues_timeline.go +++ b/vendor/github.com/google/go-github/github/issues_timeline.go @@ -16,7 +16,7 @@ import ( // It is similar to an IssueEvent but may contain more information. // GitHub API docs: https://developer.github.com/v3/issues/timeline/ type Timeline struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` CommitURL *string `json:"commit_url,omitempty"` @@ -120,7 +120,7 @@ type Timeline struct { // Source represents a reference's source. type Source struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` URL *string `json:"url,omitempty"` Actor *User `json:"actor,omitempty"` } diff --git a/vendor/github.com/google/go-github/github/issues_timeline_test.go b/vendor/github.com/google/go-github/github/issues_timeline_test.go deleted file mode 100644 index 2fd22109b..000000000 --- a/vendor/github.com/google/go-github/github/issues_timeline_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestIssuesService_ListIssueTimeline(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/issues/1/timeline", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeTimelinePreview) - testFormValues(t, r, values{ - "page": "1", - "per_page": "2", - }) - fmt.Fprint(w, `[{"id":1}]`) - }) - - opt := &ListOptions{Page: 1, PerPage: 2} - events, _, err := client.Issues.ListIssueTimeline(context.Background(), "o", "r", 1, opt) - if err != nil { - t.Errorf("Issues.ListIssueTimeline returned error: %v", err) - } - - want := []*Timeline{{ID: Int(1)}} - if !reflect.DeepEqual(events, want) { - t.Errorf("Issues.ListIssueTimeline = %+v, want %+v", events, want) - } -} diff --git a/vendor/github.com/google/go-github/github/licenses.go b/vendor/github.com/google/go-github/github/licenses.go index e9cd1777a..1176d3a8b 100644 --- a/vendor/github.com/google/go-github/github/licenses.go +++ b/vendor/github.com/google/go-github/github/licenses.go @@ -67,9 +67,6 @@ func (s *LicensesService) List(ctx context.Context) ([]*License, *Response, erro return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeLicensesPreview) - var licenses []*License resp, err := s.client.Do(ctx, req, &licenses) if err != nil { @@ -90,9 +87,6 @@ func (s *LicensesService) Get(ctx context.Context, licenseName string) (*License return nil, nil, err } - // TODO: remove custom Accept header when this API fully launches - req.Header.Set("Accept", mediaTypeLicensesPreview) - license := new(License) resp, err := s.client.Do(ctx, req, license) if err != nil { diff --git a/vendor/github.com/google/go-github/github/licenses_test.go b/vendor/github.com/google/go-github/github/licenses_test.go deleted file mode 100644 index 5c06e6598..000000000 --- a/vendor/github.com/google/go-github/github/licenses_test.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2013 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestLicensesService_List(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/licenses", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeLicensesPreview) - fmt.Fprint(w, `[{"key":"mit","name":"MIT","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","featured":true}]`) - }) - - licenses, _, err := client.Licenses.List(context.Background()) - if err != nil { - t.Errorf("Licenses.List returned error: %v", err) - } - - want := []*License{{ - Key: String("mit"), - Name: String("MIT"), - SPDXID: String("MIT"), - URL: String("https://api.github.com/licenses/mit"), - Featured: Bool(true), - }} - if !reflect.DeepEqual(licenses, want) { - t.Errorf("Licenses.List returned %+v, want %+v", licenses, want) - } -} - -func TestLicensesService_Get(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/licenses/mit", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeLicensesPreview) - fmt.Fprint(w, `{"key":"mit","name":"MIT"}`) - }) - - license, _, err := client.Licenses.Get(context.Background(), "mit") - if err != nil { - t.Errorf("Licenses.Get returned error: %v", err) - } - - want := &License{Key: String("mit"), Name: String("MIT")} - if !reflect.DeepEqual(license, want) { - t.Errorf("Licenses.Get returned %+v, want %+v", license, want) - } -} - -func TestLicensesService_Get_invalidTemplate(t *testing.T) { - _, _, err := client.Licenses.Get(context.Background(), "%") - testURLParseError(t, err) -} diff --git a/vendor/github.com/google/go-github/github/messages.go b/vendor/github.com/google/go-github/github/messages.go index 3a4d46440..519c1c03d 100644 --- a/vendor/github.com/google/go-github/github/messages.go +++ b/vendor/github.com/google/go-github/github/messages.go @@ -41,6 +41,8 @@ const ( var ( // eventTypeMapping maps webhooks types to their corresponding go-github struct types. eventTypeMapping = map[string]string{ + "check_run": "CheckRunEvent", + "check_suite": "CheckSuiteEvent", "commit_comment": "CommitCommentEvent", "create": "CreateEvent", "delete": "DeleteEvent", @@ -53,6 +55,7 @@ var ( "issue_comment": "IssueCommentEvent", "issues": "IssuesEvent", "label": "LabelEvent", + "marketplace_purchase": "MarketplacePurchaseEvent", "member": "MemberEvent", "membership": "MembershipEvent", "milestone": "MilestoneEvent", @@ -172,19 +175,19 @@ func ValidatePayload(r *http.Request, secretKey []byte) (payload []byte, err err } sig := r.Header.Get(signatureHeader) - if err := validateSignature(sig, body, secretKey); err != nil { + if err := ValidateSignature(sig, body, secretKey); err != nil { return nil, err } return payload, nil } -// validateSignature validates the signature for the given payload. +// ValidateSignature validates the signature for the given payload. // signature is the GitHub hash signature delivered in the X-Hub-Signature header. // payload is the JSON payload sent by GitHub Webhooks. // secretKey is the GitHub Webhook secret message. // // GitHub API docs: https://developer.github.com/webhooks/securing/#validating-payloads-from-github -func validateSignature(signature string, payload, secretKey []byte) error { +func ValidateSignature(signature string, payload, secretKey []byte) error { messageMAC, hashFunc, err := messageMAC(signature) if err != nil { return err diff --git a/vendor/github.com/google/go-github/github/messages_test.go b/vendor/github.com/google/go-github/github/messages_test.go deleted file mode 100644 index eebfa10d3..000000000 --- a/vendor/github.com/google/go-github/github/messages_test.go +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "bytes" - "encoding/json" - "net/http" - "net/url" - "reflect" - "strings" - "testing" -) - -func TestValidatePayload(t *testing.T) { - const defaultBody = `{"yo":true}` // All tests below use the default request body and signature. - const defaultSignature = "sha1=126f2c800419c60137ce748d7672e77b65cf16d6" - secretKey := []byte("0123456789abcdef") - tests := []struct { - signature string - eventID string - event string - wantEventID string - wantEvent string - wantPayload string - }{ - // The following tests generate expected errors: - {}, // Missing signature - {signature: "yo"}, // Missing signature prefix - {signature: "sha1=yo"}, // Signature not hex string - {signature: "sha1=012345"}, // Invalid signature - // The following tests expect err=nil: - { - signature: defaultSignature, - eventID: "dead-beef", - event: "ping", - wantEventID: "dead-beef", - wantEvent: "ping", - wantPayload: defaultBody, - }, - { - signature: defaultSignature, - event: "ping", - wantEvent: "ping", - wantPayload: defaultBody, - }, - { - signature: "sha256=b1f8020f5b4cd42042f807dd939015c4a418bc1ff7f604dd55b0a19b5d953d9b", - event: "ping", - wantEvent: "ping", - wantPayload: defaultBody, - }, - { - signature: "sha512=8456767023c1195682e182a23b3f5d19150ecea598fde8cb85918f7281b16079471b1329f92b912c4d8bd7455cb159777db8f29608b20c7c87323ba65ae62e1f", - event: "ping", - wantEvent: "ping", - wantPayload: defaultBody, - }, - } - - for _, test := range tests { - buf := bytes.NewBufferString(defaultBody) - req, err := http.NewRequest("GET", "http://localhost/event", buf) - if err != nil { - t.Fatalf("NewRequest: %v", err) - } - if test.signature != "" { - req.Header.Set(signatureHeader, test.signature) - } - req.Header.Set("Content-Type", "application/json") - - got, err := ValidatePayload(req, secretKey) - if err != nil { - if test.wantPayload != "" { - t.Errorf("ValidatePayload(%#v): err = %v, want nil", test, err) - } - continue - } - if string(got) != test.wantPayload { - t.Errorf("ValidatePayload = %q, want %q", got, test.wantPayload) - } - } -} - -func TestValidatePayload_FormGet(t *testing.T) { - payload := `{"yo":true}` - signature := "sha1=3374ef144403e8035423b23b02e2c9d7a4c50368" - secretKey := []byte("0123456789abcdef") - - form := url.Values{} - form.Add("payload", payload) - req, err := http.NewRequest("POST", "http://localhost/event", strings.NewReader(form.Encode())) - if err != nil { - t.Fatalf("NewRequest: %v", err) - } - req.PostForm = form - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - req.Header.Set(signatureHeader, signature) - - got, err := ValidatePayload(req, secretKey) - if err != nil { - t.Errorf("ValidatePayload(%#v): err = %v, want nil", payload, err) - } - if string(got) != payload { - t.Errorf("ValidatePayload = %q, want %q", got, payload) - } - - // check that if payload is invalid we get error - req.Header.Set(signatureHeader, "invalid signature") - if _, err = ValidatePayload(req, nil); err == nil { - t.Error("ValidatePayload = nil, want err") - } -} - -func TestValidatePayload_FormPost(t *testing.T) { - payload := `{"yo":true}` - signature := "sha1=3374ef144403e8035423b23b02e2c9d7a4c50368" - secretKey := []byte("0123456789abcdef") - - form := url.Values{} - form.Set("payload", payload) - buf := bytes.NewBufferString(form.Encode()) - req, err := http.NewRequest("POST", "http://localhost/event", buf) - if err != nil { - t.Fatalf("NewRequest: %v", err) - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - req.Header.Set(signatureHeader, signature) - - got, err := ValidatePayload(req, secretKey) - if err != nil { - t.Errorf("ValidatePayload(%#v): err = %v, want nil", payload, err) - } - if string(got) != payload { - t.Errorf("ValidatePayload = %q, want %q", got, payload) - } - - // check that if payload is invalid we get error - req.Header.Set(signatureHeader, "invalid signature") - if _, err = ValidatePayload(req, nil); err == nil { - t.Error("ValidatePayload = nil, want err") - } -} - -func TestValidatePayload_InvalidContentType(t *testing.T) { - req, err := http.NewRequest("POST", "http://localhost/event", nil) - if err != nil { - t.Fatalf("NewRequest: %v", err) - } - req.Header.Set("Content-Type", "invalid content type") - if _, err = ValidatePayload(req, nil); err == nil { - t.Error("ValidatePayload = nil, want err") - } -} - -func TestParseWebHook(t *testing.T) { - tests := []struct { - payload interface{} - messageType string - }{ - { - payload: &CommitCommentEvent{}, - messageType: "commit_comment", - }, - { - payload: &CreateEvent{}, - messageType: "create", - }, - { - payload: &DeleteEvent{}, - messageType: "delete", - }, - { - payload: &DeploymentEvent{}, - messageType: "deployment", - }, - - { - payload: &DeploymentStatusEvent{}, - messageType: "deployment_status", - }, - { - payload: &ForkEvent{}, - messageType: "fork", - }, - { - payload: &GollumEvent{}, - messageType: "gollum", - }, - { - payload: &InstallationEvent{}, - messageType: "installation", - }, - { - payload: &InstallationRepositoriesEvent{}, - messageType: "installation_repositories", - }, - { - payload: &IssueCommentEvent{}, - messageType: "issue_comment", - }, - { - payload: &IssuesEvent{}, - messageType: "issues", - }, - { - payload: &LabelEvent{}, - messageType: "label", - }, - { - payload: &MemberEvent{}, - messageType: "member", - }, - { - payload: &MembershipEvent{}, - messageType: "membership", - }, - { - payload: &MilestoneEvent{}, - messageType: "milestone", - }, - { - payload: &OrganizationEvent{}, - messageType: "organization", - }, - { - payload: &OrgBlockEvent{}, - messageType: "org_block", - }, - { - payload: &PageBuildEvent{}, - messageType: "page_build", - }, - { - payload: &PingEvent{}, - messageType: "ping", - }, - { - payload: &ProjectEvent{}, - messageType: "project", - }, - { - payload: &ProjectCardEvent{}, - messageType: "project_card", - }, - { - payload: &ProjectColumnEvent{}, - messageType: "project_column", - }, - { - payload: &PublicEvent{}, - messageType: "public", - }, - { - payload: &PullRequestEvent{}, - messageType: "pull_request", - }, - { - payload: &PullRequestReviewEvent{}, - messageType: "pull_request_review", - }, - { - payload: &PullRequestReviewCommentEvent{}, - messageType: "pull_request_review_comment", - }, - { - payload: &PushEvent{}, - messageType: "push", - }, - { - payload: &ReleaseEvent{}, - messageType: "release", - }, - { - payload: &RepositoryEvent{}, - messageType: "repository", - }, - { - payload: &StatusEvent{}, - messageType: "status", - }, - { - payload: &TeamEvent{}, - messageType: "team", - }, - { - payload: &TeamAddEvent{}, - messageType: "team_add", - }, - { - payload: &WatchEvent{}, - messageType: "watch", - }, - } - - for _, test := range tests { - p, err := json.Marshal(test.payload) - if err != nil { - t.Fatalf("Marshal(%#v): %v", test.payload, err) - } - got, err := ParseWebHook(test.messageType, p) - if err != nil { - t.Fatalf("ParseWebHook: %v", err) - } - if want := test.payload; !reflect.DeepEqual(got, want) { - t.Errorf("ParseWebHook(%#v, %#v) = %#v, want %#v", test.messageType, p, got, want) - } - } -} - -func TestDeliveryID(t *testing.T) { - id := "8970a780-244e-11e7-91ca-da3aabcb9793" - req, err := http.NewRequest("POST", "http://localhost", nil) - if err != nil { - t.Fatalf("DeliveryID: %v", err) - } - req.Header.Set("X-Github-Delivery", id) - - got := DeliveryID(req) - if got != id { - t.Errorf("DeliveryID(%#v) = %q, want %q", req, got, id) - } -} diff --git a/vendor/github.com/google/go-github/github/migrations.go b/vendor/github.com/google/go-github/github/migrations.go index 6793269cd..90cc1fae8 100644 --- a/vendor/github.com/google/go-github/github/migrations.go +++ b/vendor/github.com/google/go-github/github/migrations.go @@ -21,7 +21,7 @@ type MigrationService service // Migration represents a GitHub migration (archival). type Migration struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` GUID *string `json:"guid,omitempty"` // State is the current state of a migration. // Possible values are: @@ -128,7 +128,7 @@ func (s *MigrationService) ListMigrations(ctx context.Context, org string) ([]*M // id is the migration ID. // // GitHub API docs: https://developer.github.com/v3/migration/migrations/#get-the-status-of-a-migration -func (s *MigrationService) MigrationStatus(ctx context.Context, org string, id int) (*Migration, *Response, error) { +func (s *MigrationService) MigrationStatus(ctx context.Context, org string, id int64) (*Migration, *Response, error) { u := fmt.Sprintf("orgs/%v/migrations/%v", org, id) req, err := s.client.NewRequest("GET", u, nil) @@ -152,7 +152,7 @@ func (s *MigrationService) MigrationStatus(ctx context.Context, org string, id i // id is the migration ID. // // GitHub API docs: https://developer.github.com/v3/migration/migrations/#download-a-migration-archive -func (s *MigrationService) MigrationArchiveURL(ctx context.Context, org string, id int) (url string, err error) { +func (s *MigrationService) MigrationArchiveURL(ctx context.Context, org string, id int64) (url string, err error) { u := fmt.Sprintf("orgs/%v/migrations/%v/archive", org, id) req, err := s.client.NewRequest("GET", u, nil) @@ -189,7 +189,7 @@ func (s *MigrationService) MigrationArchiveURL(ctx context.Context, org string, // id is the migration ID. // // GitHub API docs: https://developer.github.com/v3/migration/migrations/#delete-a-migration-archive -func (s *MigrationService) DeleteMigration(ctx context.Context, org string, id int) (*Response, error) { +func (s *MigrationService) DeleteMigration(ctx context.Context, org string, id int64) (*Response, error) { u := fmt.Sprintf("orgs/%v/migrations/%v/archive", org, id) req, err := s.client.NewRequest("DELETE", u, nil) @@ -209,7 +209,7 @@ func (s *MigrationService) DeleteMigration(ctx context.Context, org string, id i // is complete and you no longer need the source data. // // GitHub API docs: https://developer.github.com/v3/migration/migrations/#unlock-a-repository -func (s *MigrationService) UnlockRepo(ctx context.Context, org string, id int, repo string) (*Response, error) { +func (s *MigrationService) UnlockRepo(ctx context.Context, org string, id int64, repo string) (*Response, error) { u := fmt.Sprintf("orgs/%v/migrations/%v/repos/%v/lock", org, id, repo) req, err := s.client.NewRequest("DELETE", u, nil) diff --git a/vendor/github.com/google/go-github/github/migrations_source_import.go b/vendor/github.com/google/go-github/github/migrations_source_import.go index aa45a5a36..fd45e7800 100644 --- a/vendor/github.com/google/go-github/github/migrations_source_import.go +++ b/vendor/github.com/google/go-github/github/migrations_source_import.go @@ -117,7 +117,7 @@ func (i Import) String() string { // // GitHub API docs: https://developer.github.com/v3/migration/source_imports/#get-commit-authors type SourceImportAuthor struct { - ID *int `json:"id,omitempty"` + ID *int64 `json:"id,omitempty"` RemoteID *string `json:"remote_id,omitempty"` RemoteName *string `json:"remote_name,omitempty"` Email *string `json:"email,omitempty"` @@ -247,7 +247,7 @@ func (s *MigrationService) CommitAuthors(ctx context.Context, owner, repo string // commits to the repository. // // GitHub API docs: https://developer.github.com/v3/migration/source_imports/#map-a-commit-author -func (s *MigrationService) MapCommitAuthor(ctx context.Context, owner, repo string, id int, author *SourceImportAuthor) (*SourceImportAuthor, *Response, error) { +func (s *MigrationService) MapCommitAuthor(ctx context.Context, owner, repo string, id int64, author *SourceImportAuthor) (*SourceImportAuthor, *Response, error) { u := fmt.Sprintf("repos/%v/%v/import/authors/%v", owner, repo, id) req, err := s.client.NewRequest("PATCH", u, author) if err != nil { diff --git a/vendor/github.com/google/go-github/github/migrations_source_import_test.go b/vendor/github.com/google/go-github/github/migrations_source_import_test.go deleted file mode 100644 index 67b98fb42..000000000 --- a/vendor/github.com/google/go-github/github/migrations_source_import_test.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestMigrationService_StartImport(t *testing.T) { - setup() - defer teardown() - - input := &Import{ - VCS: String("git"), - VCSURL: String("url"), - VCSUsername: String("u"), - VCSPassword: String("p"), - } - - mux.HandleFunc("/repos/o/r/import", func(w http.ResponseWriter, r *http.Request) { - v := new(Import) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PUT") - testHeader(t, r, "Accept", mediaTypeImportPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - w.WriteHeader(http.StatusCreated) - fmt.Fprint(w, `{"status":"importing"}`) - }) - - got, _, err := client.Migrations.StartImport(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("StartImport returned error: %v", err) - } - want := &Import{Status: String("importing")} - if !reflect.DeepEqual(got, want) { - t.Errorf("StartImport = %+v, want %+v", got, want) - } -} - -func TestMigrationService_ImportProgress(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/import", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeImportPreview) - fmt.Fprint(w, `{"status":"complete"}`) - }) - - got, _, err := client.Migrations.ImportProgress(context.Background(), "o", "r") - if err != nil { - t.Errorf("ImportProgress returned error: %v", err) - } - want := &Import{Status: String("complete")} - if !reflect.DeepEqual(got, want) { - t.Errorf("ImportProgress = %+v, want %+v", got, want) - } -} - -func TestMigrationService_UpdateImport(t *testing.T) { - setup() - defer teardown() - - input := &Import{ - VCS: String("git"), - VCSURL: String("url"), - VCSUsername: String("u"), - VCSPassword: String("p"), - } - - mux.HandleFunc("/repos/o/r/import", func(w http.ResponseWriter, r *http.Request) { - v := new(Import) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeImportPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - w.WriteHeader(http.StatusCreated) - fmt.Fprint(w, `{"status":"importing"}`) - }) - - got, _, err := client.Migrations.UpdateImport(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("UpdateImport returned error: %v", err) - } - want := &Import{Status: String("importing")} - if !reflect.DeepEqual(got, want) { - t.Errorf("UpdateImport = %+v, want %+v", got, want) - } -} - -func TestMigrationService_CommitAuthors(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/import/authors", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeImportPreview) - fmt.Fprint(w, `[{"id":1,"name":"a"},{"id":2,"name":"b"}]`) - }) - - got, _, err := client.Migrations.CommitAuthors(context.Background(), "o", "r") - if err != nil { - t.Errorf("CommitAuthors returned error: %v", err) - } - want := []*SourceImportAuthor{ - {ID: Int(1), Name: String("a")}, - {ID: Int(2), Name: String("b")}, - } - if !reflect.DeepEqual(got, want) { - t.Errorf("CommitAuthors = %+v, want %+v", got, want) - } -} - -func TestMigrationService_MapCommitAuthor(t *testing.T) { - setup() - defer teardown() - - input := &SourceImportAuthor{Name: String("n"), Email: String("e")} - - mux.HandleFunc("/repos/o/r/import/authors/1", func(w http.ResponseWriter, r *http.Request) { - v := new(SourceImportAuthor) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeImportPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - fmt.Fprint(w, `{"id": 1}`) - }) - - got, _, err := client.Migrations.MapCommitAuthor(context.Background(), "o", "r", 1, input) - if err != nil { - t.Errorf("MapCommitAuthor returned error: %v", err) - } - want := &SourceImportAuthor{ID: Int(1)} - if !reflect.DeepEqual(got, want) { - t.Errorf("MapCommitAuthor = %+v, want %+v", got, want) - } -} - -func TestMigrationService_SetLFSPreference(t *testing.T) { - setup() - defer teardown() - - input := &Import{UseLFS: String("opt_in")} - - mux.HandleFunc("/repos/o/r/import/lfs", func(w http.ResponseWriter, r *http.Request) { - v := new(Import) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "PATCH") - testHeader(t, r, "Accept", mediaTypeImportPreview) - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - - w.WriteHeader(http.StatusCreated) - fmt.Fprint(w, `{"status":"importing"}`) - }) - - got, _, err := client.Migrations.SetLFSPreference(context.Background(), "o", "r", input) - if err != nil { - t.Errorf("SetLFSPreference returned error: %v", err) - } - want := &Import{Status: String("importing")} - if !reflect.DeepEqual(got, want) { - t.Errorf("SetLFSPreference = %+v, want %+v", got, want) - } -} - -func TestMigrationService_LargeFiles(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/import/large_files", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeImportPreview) - fmt.Fprint(w, `[{"oid":"a"},{"oid":"b"}]`) - }) - - got, _, err := client.Migrations.LargeFiles(context.Background(), "o", "r") - if err != nil { - t.Errorf("LargeFiles returned error: %v", err) - } - want := []*LargeFile{ - {OID: String("a")}, - {OID: String("b")}, - } - if !reflect.DeepEqual(got, want) { - t.Errorf("LargeFiles = %+v, want %+v", got, want) - } -} - -func TestMigrationService_CancelImport(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/repos/o/r/import", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeImportPreview) - w.WriteHeader(http.StatusNoContent) - }) - - _, err := client.Migrations.CancelImport(context.Background(), "o", "r") - if err != nil { - t.Errorf("CancelImport returned error: %v", err) - } -} diff --git a/vendor/github.com/google/go-github/github/migrations_test.go b/vendor/github.com/google/go-github/github/migrations_test.go deleted file mode 100644 index 7e0ac0f75..000000000 --- a/vendor/github.com/google/go-github/github/migrations_test.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2016 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "fmt" - "net/http" - "reflect" - "strings" - "testing" -) - -func TestMigrationService_StartMigration(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/migrations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "POST") - testHeader(t, r, "Accept", mediaTypeMigrationsPreview) - - w.WriteHeader(http.StatusCreated) - w.Write(migrationJSON) - }) - - opt := &MigrationOptions{ - LockRepositories: true, - ExcludeAttachments: false, - } - got, _, err := client.Migrations.StartMigration(context.Background(), "o", []string{"r"}, opt) - if err != nil { - t.Errorf("StartMigration returned error: %v", err) - } - if want := wantMigration; !reflect.DeepEqual(got, want) { - t.Errorf("StartMigration = %+v, want %+v", got, want) - } -} - -func TestMigrationService_ListMigrations(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/migrations", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeMigrationsPreview) - - w.WriteHeader(http.StatusOK) - w.Write([]byte(fmt.Sprintf("[%s]", migrationJSON))) - }) - - got, _, err := client.Migrations.ListMigrations(context.Background(), "o") - if err != nil { - t.Errorf("ListMigrations returned error: %v", err) - } - if want := []*Migration{wantMigration}; !reflect.DeepEqual(got, want) { - t.Errorf("ListMigrations = %+v, want %+v", got, want) - } -} - -func TestMigrationService_MigrationStatus(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/migrations/1", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeMigrationsPreview) - - w.WriteHeader(http.StatusOK) - w.Write(migrationJSON) - }) - - got, _, err := client.Migrations.MigrationStatus(context.Background(), "o", 1) - if err != nil { - t.Errorf("MigrationStatus returned error: %v", err) - } - if want := wantMigration; !reflect.DeepEqual(got, want) { - t.Errorf("MigrationStatus = %+v, want %+v", got, want) - } -} - -func TestMigrationService_MigrationArchiveURL(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/migrations/1/archive", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - testHeader(t, r, "Accept", mediaTypeMigrationsPreview) - - http.Redirect(w, r, "/yo", http.StatusFound) - }) - mux.HandleFunc("/yo", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "GET") - - w.WriteHeader(http.StatusOK) - w.Write([]byte("0123456789abcdef")) - }) - - got, err := client.Migrations.MigrationArchiveURL(context.Background(), "o", 1) - if err != nil { - t.Errorf("MigrationStatus returned error: %v", err) - } - if want := "/yo"; !strings.HasSuffix(got, want) { - t.Errorf("MigrationArchiveURL = %+v, want %+v", got, want) - } -} - -func TestMigrationService_DeleteMigration(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/migrations/1/archive", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeMigrationsPreview) - - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Migrations.DeleteMigration(context.Background(), "o", 1); err != nil { - t.Errorf("DeleteMigration returned error: %v", err) - } -} - -func TestMigrationService_UnlockRepo(t *testing.T) { - setup() - defer teardown() - - mux.HandleFunc("/orgs/o/migrations/1/repos/r/lock", func(w http.ResponseWriter, r *http.Request) { - testMethod(t, r, "DELETE") - testHeader(t, r, "Accept", mediaTypeMigrationsPreview) - - w.WriteHeader(http.StatusNoContent) - }) - - if _, err := client.Migrations.UnlockRepo(context.Background(), "o", 1, "r"); err != nil { - t.Errorf("UnlockRepo returned error: %v", err) - } -} - -var migrationJSON = []byte(`{ - "id": 79, - "guid": "0b989ba4-242f-11e5-81e1-c7b6966d2516", - "state": "pending", - "lock_repositories": true, - "exclude_attachments": false, - "url": "https://api.github.com/orgs/octo-org/migrations/79", - "created_at": "2015-07-06T15:33:38-07:00", - "updated_at": "2015-07-06T15:33:38-07:00", - "repositories": [ - { - "id": 1296269, - "name": "Hello-World", - "full_name": "octocat/Hello-World", - "description": "This your first repo!" - } - ] -}`) - -var wantMigration = &Migration{ - ID: Int(79), - GUID: String("0b989ba4-242f-11e5-81e1-c7b6966d2516"), - State: String("pending"), - LockRepositories: Bool(true), - ExcludeAttachments: Bool(false), - URL: String("https://api.github.com/orgs/octo-org/migrations/79"), - CreatedAt: String("2015-07-06T15:33:38-07:00"), - UpdatedAt: String("2015-07-06T15:33:38-07:00"), - Repositories: []*Repository{ - { - ID: Int(1296269), - Name: String("Hello-World"), - FullName: String("octocat/Hello-World"), - Description: String("This your first repo!"), - }, - }, -} diff --git a/vendor/github.com/google/go-github/github/migrations_user.go b/vendor/github.com/google/go-github/github/migrations_user.go new file mode 100644 index 000000000..ae53e6870 --- /dev/null +++ b/vendor/github.com/google/go-github/github/migrations_user.go @@ -0,0 +1,214 @@ +// Copyright 2018 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "errors" + "fmt" + "net/http" +) + +// UserMigration represents a GitHub migration (archival). +type UserMigration struct { + ID *int64 `json:"id,omitempty"` + GUID *string `json:"guid,omitempty"` + // State is the current state of a migration. + // Possible values are: + // "pending" which means the migration hasn't started yet, + // "exporting" which means the migration is in progress, + // "exported" which means the migration finished successfully, or + // "failed" which means the migration failed. + State *string `json:"state,omitempty"` + // LockRepositories indicates whether repositories are locked (to prevent + // manipulation) while migrating data. + LockRepositories *bool `json:"lock_repositories,omitempty"` + // ExcludeAttachments indicates whether attachments should be excluded from + // the migration (to reduce migration archive file size). + ExcludeAttachments *bool `json:"exclude_attachments,omitempty"` + URL *string `json:"url,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + Repositories []*Repository `json:"repositories,omitempty"` +} + +func (m UserMigration) String() string { + return Stringify(m) +} + +// UserMigrationOptions specifies the optional parameters to Migration methods. +type UserMigrationOptions struct { + // LockRepositories indicates whether repositories should be locked (to prevent + // manipulation) while migrating data. + LockRepositories bool + + // ExcludeAttachments indicates whether attachments should be excluded from + // the migration (to reduce migration archive file size). + ExcludeAttachments bool +} + +// startUserMigration represents the body of a StartMigration request. +type startUserMigration struct { + // Repositories is a slice of repository names to migrate. + Repositories []string `json:"repositories,omitempty"` + + // LockRepositories indicates whether repositories should be locked (to prevent + // manipulation) while migrating data. + LockRepositories *bool `json:"lock_repositories,omitempty"` + + // ExcludeAttachments indicates whether attachments should be excluded from + // the migration (to reduce migration archive file size). + ExcludeAttachments *bool `json:"exclude_attachments,omitempty"` +} + +// StartUserMigration starts the generation of a migration archive. +// repos is a slice of repository names to migrate. +// +// GitHub API docs: https://developer.github.com/v3/migrations/users/#start-a-user-migration +func (s *MigrationService) StartUserMigration(ctx context.Context, repos []string, opt *UserMigrationOptions) (*UserMigration, *Response, error) { + u := "user/migrations" + + body := &startUserMigration{Repositories: repos} + if opt != nil { + body.LockRepositories = Bool(opt.LockRepositories) + body.ExcludeAttachments = Bool(opt.ExcludeAttachments) + } + + req, err := s.client.NewRequest("POST", u, body) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMigrationsPreview) + + m := &UserMigration{} + resp, err := s.client.Do(ctx, req, m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// ListUserMigrations lists the most recent migrations. +// +// GitHub API docs: https://developer.github.com/v3/migrations/users/#get-a-list-of-user-migrations +func (s *MigrationService) ListUserMigrations(ctx context.Context) ([]*UserMigration, *Response, error) { + u := "user/migrations" + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMigrationsPreview) + + var m []*UserMigration + resp, err := s.client.Do(ctx, req, &m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// UserMigrationStatus gets the status of a specific migration archive. +// id is the migration ID. +// +// GitHub API docs: https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration +func (s *MigrationService) UserMigrationStatus(ctx context.Context, id int64) (*UserMigration, *Response, error) { + u := fmt.Sprintf("user/migrations/%v", id) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMigrationsPreview) + + m := &UserMigration{} + resp, err := s.client.Do(ctx, req, m) + if err != nil { + return nil, resp, err + } + + return m, resp, nil +} + +// UserMigrationArchiveURL gets the URL for a specific migration archive. +// id is the migration ID. +// +// GitHub API docs: https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive +func (s *MigrationService) UserMigrationArchiveURL(ctx context.Context, id int64) (string, error) { + url := fmt.Sprintf("user/migrations/%v/archive", id) + + req, err := s.client.NewRequest("GET", url, nil) + if err != nil { + return "", err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMigrationsPreview) + + m := &UserMigration{} + + var loc string + originalRedirect := s.client.client.CheckRedirect + s.client.client.CheckRedirect = func(req *http.Request, via []*http.Request) error { + loc = req.URL.String() + return http.ErrUseLastResponse + } + defer func() { + s.client.client.CheckRedirect = originalRedirect + }() + resp, err := s.client.Do(ctx, req, m) + if err == nil { + return "", errors.New("expected redirect, none provided") + } + loc = resp.Header.Get("Location") + return loc, nil +} + +// DeleteUserMigration will delete a previous migration archive. +// id is the migration ID. +// +// GitHub API docs: https://developer.github.com/v3/migrations/users/#delete-a-user-migration-archive +func (s *MigrationService) DeleteUserMigration(ctx context.Context, id int64) (*Response, error) { + url := fmt.Sprintf("user/migrations/%v/archive", id) + + req, err := s.client.NewRequest("DELETE", url, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMigrationsPreview) + + return s.client.Do(ctx, req, nil) +} + +// UnlockUserRepository will unlock a repo that was locked for migration. +// id is migration ID. +// You should unlock each migrated repository and delete them when the migration +// is complete and you no longer need the source data. +// +// GitHub API docs: https://developer.github.com/v3/migrations/users/#unlock-a-user-repository +func (s *MigrationService) UnlockUserRepo(ctx context.Context, id int64, repo string) (*Response, error) { + url := fmt.Sprintf("user/migrations/%v/repos/%v/lock", id, repo) + + req, err := s.client.NewRequest("DELETE", url, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMigrationsPreview) + + return s.client.Do(ctx, req, nil) +} diff --git a/vendor/github.com/google/go-github/github/misc.go b/vendor/github.com/google/go-github/github/misc.go index 5b8082d3c..e9b0ea22a 100644 --- a/vendor/github.com/google/go-github/github/misc.go +++ b/vendor/github.com/google/go-github/github/misc.go @@ -158,6 +158,10 @@ type APIMeta struct { // An array of IP addresses in CIDR format specifying the addresses // which serve GitHub Pages websites. Pages []string `json:"pages,omitempty"` + + // An Array of IP addresses specifying the addresses that source imports + // will originate from on GitHub.com. + Importer []string `json:"importer,omitempty"` } // APIMeta returns information about GitHub.com, the service. Or, if you access diff --git a/vendor/github.com/google/go-github/github/misc_test.go b/vendor/github.com/google/go-github/github/misc_test.go deleted file mode 100644 index f2b2df44b..000000000 --- a/vendor/github.com/google/go-github/github/misc_test.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2014 The go-github AUTHORS. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package github - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "reflect" - "testing" -) - -func TestMarkdown(t *testing.T) { - setup() - defer teardown() - - input := &markdownRequest{ - Text: String("# text #"), - Mode: String("gfm"), - Context: String("google/go-github"), - } - mux.HandleFunc("/markdown", func(w http.ResponseWriter, r *http.Request) { - v := new(markdownRequest) - json.NewDecoder(r.Body).Decode(v) - - testMethod(t, r, "POST") - if !reflect.DeepEqual(v, input) { - t.Errorf("Request body = %+v, want %+v", v, input) - } - fmt.Fprint(w, `